@threadbase-sh/streamer 1.18.6 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -6,8 +6,8 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __esm = (fn2, res) => function __init() {
10
- return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res;
9
+ var __esm = (fn, res) => function __init() {
10
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
11
11
  };
12
12
  var __commonJS = (cb, mod) => function __require() {
13
13
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
@@ -8966,8 +8966,8 @@ function $constructor(name, initializer3, params) {
8966
8966
  const inst = params?.Parent ? new Definition() : this;
8967
8967
  init(inst, def);
8968
8968
  (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
8969
- for (const fn2 of inst._zod.deferred) {
8970
- fn2();
8969
+ for (const fn of inst._zod.deferred) {
8970
+ fn();
8971
8971
  }
8972
8972
  return inst;
8973
8973
  }
@@ -10693,9 +10693,9 @@ var init_doc = __esm({
10693
10693
  if (this)
10694
10694
  this.args = args;
10695
10695
  }
10696
- indented(fn2) {
10696
+ indented(fn) {
10697
10697
  this.indent += 1;
10698
- fn2(this);
10698
+ fn(this);
10699
10699
  this.indent -= 1;
10700
10700
  }
10701
10701
  write(arg) {
@@ -11163,8 +11163,8 @@ var init_schemas = __esm({
11163
11163
  checks.unshift(inst);
11164
11164
  }
11165
11165
  for (const ch of checks) {
11166
- for (const fn2 of ch._zod.onattach) {
11167
- fn2(inst);
11166
+ for (const fn of ch._zod.onattach) {
11167
+ fn(inst);
11168
11168
  }
11169
11169
  }
11170
11170
  if (checks.length === 0) {
@@ -11919,8 +11919,8 @@ var init_schemas = __esm({
11919
11919
  }
11920
11920
  doc.write(`payload.value = newResult;`);
11921
11921
  doc.write(`return payload;`);
11922
- const fn2 = doc.compile();
11923
- return (payload, ctx) => fn2(shape, payload, ctx);
11922
+ const fn = doc.compile();
11923
+ return (payload, ctx) => fn(shape, payload, ctx);
11924
11924
  };
11925
11925
  let fastpass;
11926
11926
  const isObject2 = isObject;
@@ -20067,10 +20067,10 @@ function _file(Class2, params) {
20067
20067
  });
20068
20068
  }
20069
20069
  // @__NO_SIDE_EFFECTS__
20070
- function _transform(Class2, fn2) {
20070
+ function _transform(Class2, fn) {
20071
20071
  return new Class2({
20072
20072
  type: "transform",
20073
- transform: fn2
20073
+ transform: fn
20074
20074
  });
20075
20075
  }
20076
20076
  // @__NO_SIDE_EFFECTS__
@@ -20158,29 +20158,29 @@ function _promise(Class2, innerType) {
20158
20158
  });
20159
20159
  }
20160
20160
  // @__NO_SIDE_EFFECTS__
20161
- function _custom(Class2, fn2, _params) {
20161
+ function _custom(Class2, fn, _params) {
20162
20162
  const norm = normalizeParams(_params);
20163
20163
  norm.abort ?? (norm.abort = true);
20164
20164
  const schema = new Class2({
20165
20165
  type: "custom",
20166
20166
  check: "custom",
20167
- fn: fn2,
20167
+ fn,
20168
20168
  ...norm
20169
20169
  });
20170
20170
  return schema;
20171
20171
  }
20172
20172
  // @__NO_SIDE_EFFECTS__
20173
- function _refine(Class2, fn2, _params) {
20173
+ function _refine(Class2, fn, _params) {
20174
20174
  const schema = new Class2({
20175
20175
  type: "custom",
20176
20176
  check: "custom",
20177
- fn: fn2,
20177
+ fn,
20178
20178
  ...normalizeParams(_params)
20179
20179
  });
20180
20180
  return schema;
20181
20181
  }
20182
20182
  // @__NO_SIDE_EFFECTS__
20183
- function _superRefine(fn2, params) {
20183
+ function _superRefine(fn, params) {
20184
20184
  const ch = /* @__PURE__ */ _check((payload) => {
20185
20185
  payload.addIssue = (issue2) => {
20186
20186
  if (typeof issue2 === "string") {
@@ -20196,17 +20196,17 @@ function _superRefine(fn2, params) {
20196
20196
  payload.issues.push(issue(_issue));
20197
20197
  }
20198
20198
  };
20199
- return fn2(payload.value, payload);
20199
+ return fn(payload.value, payload);
20200
20200
  }, params);
20201
20201
  return ch;
20202
20202
  }
20203
20203
  // @__NO_SIDE_EFFECTS__
20204
- function _check(fn2, params) {
20204
+ function _check(fn, params) {
20205
20205
  const ch = new $ZodCheck({
20206
20206
  check: "custom",
20207
20207
  ...normalizeParams(params)
20208
20208
  });
20209
- ch._zod.check = fn2;
20209
+ ch._zod.check = fn;
20210
20210
  return ch;
20211
20211
  }
20212
20212
  // @__NO_SIDE_EFFECTS__
@@ -21971,12 +21971,12 @@ function _installLazyMethods(inst, group, methods) {
21971
21971
  return;
21972
21972
  installed.add(group);
21973
21973
  for (const key in methods) {
21974
- const fn2 = methods[key];
21974
+ const fn = methods[key];
21975
21975
  Object.defineProperty(proto, key, {
21976
21976
  configurable: true,
21977
21977
  enumerable: false,
21978
21978
  get() {
21979
- const bound = fn2.bind(this);
21979
+ const bound = fn.bind(this);
21980
21980
  Object.defineProperty(this, key, {
21981
21981
  configurable: true,
21982
21982
  writable: true,
@@ -22293,10 +22293,10 @@ function literal(value, params) {
22293
22293
  function file(params) {
22294
22294
  return _file(ZodFile, params);
22295
22295
  }
22296
- function transform(fn2) {
22296
+ function transform(fn) {
22297
22297
  return new ZodTransform({
22298
22298
  type: "transform",
22299
- transform: fn2
22299
+ transform: fn
22300
22300
  });
22301
22301
  }
22302
22302
  function optional(innerType) {
@@ -22420,22 +22420,22 @@ function _function(params) {
22420
22420
  output: params?.output ?? unknown()
22421
22421
  });
22422
22422
  }
22423
- function check(fn2) {
22423
+ function check(fn) {
22424
22424
  const ch = new $ZodCheck({
22425
22425
  check: "custom"
22426
22426
  // ...util.normalizeParams(params),
22427
22427
  });
22428
- ch._zod.check = fn2;
22428
+ ch._zod.check = fn;
22429
22429
  return ch;
22430
22430
  }
22431
- function custom(fn2, _params) {
22432
- return _custom(ZodCustom, fn2 ?? (() => true), _params);
22431
+ function custom(fn, _params) {
22432
+ return _custom(ZodCustom, fn ?? (() => true), _params);
22433
22433
  }
22434
- function refine(fn2, _params = {}) {
22435
- return _refine(ZodCustom, fn2, _params);
22434
+ function refine(fn, _params = {}) {
22435
+ return _refine(ZodCustom, fn, _params);
22436
22436
  }
22437
- function superRefine(fn2, params) {
22438
- return _superRefine(fn2, params);
22437
+ function superRefine(fn, params) {
22438
+ return _superRefine(fn, params);
22439
22439
  }
22440
22440
  function _instanceof(cls, params = {}) {
22441
22441
  const inst = new ZodCustom({
@@ -22465,10 +22465,10 @@ function json(params) {
22465
22465
  });
22466
22466
  return jsonSchema;
22467
22467
  }
22468
- function preprocess(fn2, schema) {
22468
+ function preprocess(fn, schema) {
22469
22469
  return new ZodPreprocess({
22470
22470
  type: "pipe",
22471
- in: transform(fn2),
22471
+ in: transform(fn),
22472
22472
  out: schema
22473
22473
  });
22474
22474
  }
@@ -22538,8 +22538,8 @@ var init_schemas2 = __esm({
22538
22538
  superRefine(refinement, params) {
22539
22539
  return this.check(superRefine(refinement, params));
22540
22540
  },
22541
- overwrite(fn2) {
22542
- return this.check(_overwrite(fn2));
22541
+ overwrite(fn) {
22542
+ return this.check(_overwrite(fn));
22543
22543
  },
22544
22544
  optional() {
22545
22545
  return optional(this);
@@ -22601,8 +22601,8 @@ var init_schemas2 = __esm({
22601
22601
  isNullable() {
22602
22602
  return this.safeParse(null).success;
22603
22603
  },
22604
- apply(fn2) {
22605
- return fn2(this);
22604
+ apply(fn) {
22605
+ return fn(this);
22606
22606
  }
22607
22607
  });
22608
22608
  Object.defineProperty(inst, "description", {
@@ -25889,9 +25889,9 @@ var require_on_exit_leak_free = __commonJS({
25889
25889
  function callRefs(event) {
25890
25890
  for (const ref of refs[event]) {
25891
25891
  const obj = ref.deref();
25892
- const fn2 = ref.fn;
25892
+ const fn = ref.fn;
25893
25893
  if (obj !== void 0) {
25894
- fn2(obj, event);
25894
+ fn(obj, event);
25895
25895
  }
25896
25896
  }
25897
25897
  refs[event] = [];
@@ -25903,22 +25903,22 @@ var require_on_exit_leak_free = __commonJS({
25903
25903
  uninstall(event);
25904
25904
  }
25905
25905
  }
25906
- function _register(event, obj, fn2) {
25906
+ function _register(event, obj, fn) {
25907
25907
  if (obj === void 0) {
25908
25908
  throw new Error("the object can't be undefined");
25909
25909
  }
25910
25910
  install(event);
25911
25911
  const ref = new WeakRef(obj);
25912
- ref.fn = fn2;
25912
+ ref.fn = fn;
25913
25913
  ensureRegistry();
25914
25914
  registry2.register(obj, ref);
25915
25915
  refs[event].push(ref);
25916
25916
  }
25917
- function register(obj, fn2) {
25918
- _register("exit", obj, fn2);
25917
+ function register(obj, fn) {
25918
+ _register("exit", obj, fn);
25919
25919
  }
25920
- function registerBeforeExit(obj, fn2) {
25921
- _register("beforeExit", obj, fn2);
25920
+ function registerBeforeExit(obj, fn) {
25921
+ _register("beforeExit", obj, fn);
25922
25922
  }
25923
25923
  function unregister(obj) {
25924
25924
  if (registry2 === void 0) {
@@ -26092,9 +26092,9 @@ var require_thread_stream = __commonJS({
26092
26092
  var MAX_STRING = buffer.constants.MAX_STRING_LENGTH;
26093
26093
  function noop() {
26094
26094
  }
26095
- function updateState(stream, fn2) {
26095
+ function updateState(stream, fn) {
26096
26096
  Atomics.add(stream[kImpl].state, SEQ_INDEX, 1);
26097
- fn2();
26097
+ fn();
26098
26098
  Atomics.add(stream[kImpl].state, SEQ_INDEX, 1);
26099
26099
  Atomics.notify(stream[kImpl].state, SEQ_INDEX);
26100
26100
  }
@@ -33254,8 +33254,8 @@ var require_object_utils = __commonJS({
33254
33254
  "use strict";
33255
33255
  Object.defineProperty(exports2, "__esModule", { value: true });
33256
33256
  exports2.mapKeyValues = mapKeyValues;
33257
- function mapKeyValues(obj, fn2) {
33258
- return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, fn2(key, value)]));
33257
+ function mapKeyValues(obj, fn) {
33258
+ return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, fn(key, value)]));
33259
33259
  }
33260
33260
  }
33261
33261
  });
@@ -41145,9 +41145,9 @@ var require_make_client = __commonJS({
41145
41145
  ServiceClientImpl.serviceName = serviceName;
41146
41146
  return ServiceClientImpl;
41147
41147
  }
41148
- function partial2(fn2, path2, serialize, deserialize) {
41148
+ function partial2(fn, path2, serialize, deserialize) {
41149
41149
  return function(...args) {
41150
- return fn2.call(this, path2, serialize, deserialize, ...args);
41150
+ return fn.call(this, path2, serialize, deserialize, ...args);
41151
41151
  };
41152
41152
  }
41153
41153
  function isProtobufTypeDefinition(obj) {
@@ -41563,7 +41563,7 @@ var require_aspromise = __commonJS({
41563
41563
  "node_modules/@protobufjs/aspromise/index.js"(exports2, module2) {
41564
41564
  "use strict";
41565
41565
  module2.exports = asPromise;
41566
- function asPromise(fn2, ctx) {
41566
+ function asPromise(fn, ctx) {
41567
41567
  var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true;
41568
41568
  while (index < arguments.length)
41569
41569
  params[offset++] = arguments[index++];
@@ -41582,7 +41582,7 @@ var require_aspromise = __commonJS({
41582
41582
  }
41583
41583
  };
41584
41584
  try {
41585
- fn2.apply(ctx || null, params);
41585
+ fn.apply(ctx || null, params);
41586
41586
  } catch (err) {
41587
41587
  if (pending) {
41588
41588
  pending = false;
@@ -41702,25 +41702,25 @@ var require_eventemitter = __commonJS({
41702
41702
  function EventEmitter6() {
41703
41703
  this._listeners = /* @__PURE__ */ Object.create(null);
41704
41704
  }
41705
- EventEmitter6.prototype.on = function on2(evt, fn2, ctx) {
41705
+ EventEmitter6.prototype.on = function on(evt, fn, ctx) {
41706
41706
  (this._listeners[evt] || (this._listeners[evt] = [])).push({
41707
- fn: fn2,
41707
+ fn,
41708
41708
  ctx: ctx || this
41709
41709
  });
41710
41710
  return this;
41711
41711
  };
41712
- EventEmitter6.prototype.off = function off(evt, fn2) {
41712
+ EventEmitter6.prototype.off = function off(evt, fn) {
41713
41713
  if (evt === void 0)
41714
41714
  this._listeners = /* @__PURE__ */ Object.create(null);
41715
41715
  else {
41716
- if (fn2 === void 0)
41716
+ if (fn === void 0)
41717
41717
  this._listeners[evt] = [];
41718
41718
  else {
41719
41719
  var listeners = this._listeners[evt];
41720
41720
  if (!listeners)
41721
41721
  return this;
41722
41722
  for (var i = 0; i < listeners.length; )
41723
- if (listeners[i].fn === fn2)
41723
+ if (listeners[i].fn === fn)
41724
41724
  listeners.splice(i, 1);
41725
41725
  else
41726
41726
  ++i;
@@ -42352,8 +42352,8 @@ var require_writer = __commonJS({
42352
42352
  var LongBits = util.LongBits;
42353
42353
  var base643 = util.base64;
42354
42354
  var utf8 = util.utf8;
42355
- function Op(fn2, len, val) {
42356
- this.fn = fn2;
42355
+ function Op(fn, len, val) {
42356
+ this.fn = fn;
42357
42357
  this.len = len;
42358
42358
  this.next = void 0;
42359
42359
  this.val = val;
@@ -42387,8 +42387,8 @@ var require_writer = __commonJS({
42387
42387
  };
42388
42388
  if (util.Array !== Array)
42389
42389
  Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
42390
- Writer.prototype._push = function push(fn2, len, val) {
42391
- this.tail = this.tail.next = new Op(fn2, len, val);
42390
+ Writer.prototype._push = function push(fn, len, val) {
42391
+ this.tail = this.tail.next = new Op(fn, len, val);
42392
42392
  this.len += len;
42393
42393
  return this;
42394
42394
  };
@@ -42787,25 +42787,25 @@ var require_reader = __commonJS({
42787
42787
  BufferReader = BufferReader_;
42788
42788
  Reader.create = create();
42789
42789
  BufferReader._configure();
42790
- var fn2 = util.Long ? "toLong" : (
42790
+ var fn = util.Long ? "toLong" : (
42791
42791
  /* istanbul ignore next */
42792
42792
  "toNumber"
42793
42793
  );
42794
42794
  util.merge(Reader.prototype, {
42795
42795
  int64: function read_int64() {
42796
- return readLongVarint.call(this)[fn2](false);
42796
+ return readLongVarint.call(this)[fn](false);
42797
42797
  },
42798
42798
  uint64: function read_uint64() {
42799
- return readLongVarint.call(this)[fn2](true);
42799
+ return readLongVarint.call(this)[fn](true);
42800
42800
  },
42801
42801
  sint64: function read_sint64() {
42802
- return readLongVarint.call(this).zzDecode()[fn2](false);
42802
+ return readLongVarint.call(this).zzDecode()[fn](false);
42803
42803
  },
42804
42804
  fixed64: function read_fixed64() {
42805
- return readFixed64.call(this)[fn2](true);
42805
+ return readFixed64.call(this)[fn](true);
42806
42806
  },
42807
42807
  sfixed64: function read_sfixed64() {
42808
- return readFixed64.call(this)[fn2](false);
42808
+ return readFixed64.call(this)[fn](false);
42809
42809
  }
42810
42810
  });
42811
42811
  };
@@ -61134,8 +61134,8 @@ var require_writer2 = __commonJS({
61134
61134
  var LongBits = util.LongBits;
61135
61135
  var base643 = util.base64;
61136
61136
  var utf8 = util.utf8;
61137
- function Op(fn2, len, val) {
61138
- this.fn = fn2;
61137
+ function Op(fn, len, val) {
61138
+ this.fn = fn;
61139
61139
  this.len = len;
61140
61140
  this.next = void 0;
61141
61141
  this.val = val;
@@ -61169,8 +61169,8 @@ var require_writer2 = __commonJS({
61169
61169
  };
61170
61170
  if (util.Array !== Array)
61171
61171
  Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
61172
- Writer.prototype._push = function push(fn2, len, val) {
61173
- this.tail = this.tail.next = new Op(fn2, len, val);
61172
+ Writer.prototype._push = function push(fn, len, val) {
61173
+ this.tail = this.tail.next = new Op(fn, len, val);
61174
61174
  this.len += len;
61175
61175
  return this;
61176
61176
  };
@@ -61568,25 +61568,25 @@ var require_reader2 = __commonJS({
61568
61568
  BufferReader = BufferReader_;
61569
61569
  Reader.create = create();
61570
61570
  BufferReader._configure();
61571
- var fn2 = util.Long ? "toLong" : (
61571
+ var fn = util.Long ? "toLong" : (
61572
61572
  /* istanbul ignore next */
61573
61573
  "toNumber"
61574
61574
  );
61575
61575
  util.merge(Reader.prototype, {
61576
61576
  int64: function read_int64() {
61577
- return readLongVarint.call(this)[fn2](false);
61577
+ return readLongVarint.call(this)[fn](false);
61578
61578
  },
61579
61579
  uint64: function read_uint64() {
61580
- return readLongVarint.call(this)[fn2](true);
61580
+ return readLongVarint.call(this)[fn](true);
61581
61581
  },
61582
61582
  sint64: function read_sint64() {
61583
- return readLongVarint.call(this).zzDecode()[fn2](false);
61583
+ return readLongVarint.call(this).zzDecode()[fn](false);
61584
61584
  },
61585
61585
  fixed64: function read_fixed64() {
61586
- return readFixed64.call(this)[fn2](true);
61586
+ return readFixed64.call(this)[fn](true);
61587
61587
  },
61588
61588
  sfixed64: function read_sfixed64() {
61589
- return readFixed64.call(this)[fn2](false);
61589
+ return readFixed64.call(this)[fn](false);
61590
61590
  }
61591
61591
  });
61592
61592
  };
@@ -92749,9 +92749,9 @@ var require_connection = __commonJS({
92749
92749
  *
92750
92750
  * @see https://grpc.io/docs/guides/deadlines/
92751
92751
  */
92752
- async withDeadline(deadline, fn2) {
92752
+ async withDeadline(deadline, fn) {
92753
92753
  const cc = this.callContextStorage.getStore();
92754
- return await this.callContextStorage.run({ ...cc, deadline }, fn2);
92754
+ return await this.callContextStorage.run({ ...cc, deadline }, fn);
92755
92755
  }
92756
92756
  /**
92757
92757
  * Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in
@@ -92775,9 +92775,9 @@ var require_connection = __commonJS({
92775
92775
  */
92776
92776
  // FIXME: `abortSignal` should be cumulative, i.e. if a signal is already set, it should be added
92777
92777
  // to the list of signals, and both the new and existing signal should abort the request.
92778
- async withAbortSignal(abortSignal, fn2) {
92778
+ async withAbortSignal(abortSignal, fn) {
92779
92779
  const cc = this.callContextStorage.getStore();
92780
- return await this.callContextStorage.run({ ...cc, abortSignal }, fn2);
92780
+ return await this.callContextStorage.run({ ...cc, abortSignal }, fn);
92781
92781
  }
92782
92782
  /**
92783
92783
  * Set metadata for any service requests executed in `fn`'s scope.
@@ -92795,12 +92795,12 @@ var require_connection = __commonJS({
92795
92795
  * );
92796
92796
  * ```
92797
92797
  */
92798
- async withMetadata(metadata, fn2) {
92798
+ async withMetadata(metadata, fn) {
92799
92799
  const cc = this.callContextStorage.getStore();
92800
92800
  return await this.callContextStorage.run({
92801
92801
  ...cc,
92802
92802
  metadata: { ...cc?.metadata, ...metadata }
92803
- }, fn2);
92803
+ }, fn);
92804
92804
  }
92805
92805
  /**
92806
92806
  * Set the apiKey for any service requests executed in `fn`'s scope (thus changing the `Authorization` header).
@@ -92815,12 +92815,12 @@ var require_connection = __commonJS({
92815
92815
  * );
92816
92816
  * ```
92817
92817
  */
92818
- async withApiKey(apiKey, fn2) {
92818
+ async withApiKey(apiKey, fn) {
92819
92819
  const cc = this.callContextStorage.getStore();
92820
92820
  return await this.callContextStorage.run({
92821
92821
  ...cc,
92822
92822
  metadata: { ...cc?.metadata, Authorization: `Bearer ${apiKey}` }
92823
- }, fn2);
92823
+ }, fn);
92824
92824
  }
92825
92825
  /**
92826
92826
  * Set the {@link ConnectionOptions.apiKey} for all subsequent requests. A static string or a
@@ -92935,8 +92935,8 @@ var require_base_client = __commonJS({
92935
92935
  *
92936
92936
  * @see https://grpc.io/docs/guides/deadlines/
92937
92937
  */
92938
- async withDeadline(deadline, fn2) {
92939
- return await this.connection.withDeadline(deadline, fn2);
92938
+ async withDeadline(deadline, fn) {
92939
+ return await this.connection.withDeadline(deadline, fn);
92940
92940
  }
92941
92941
  /**
92942
92942
  * Set an {@link AbortSignal} that, when aborted, cancels any ongoing service requests executed in
@@ -92949,8 +92949,8 @@ var require_base_client = __commonJS({
92949
92949
  *
92950
92950
  * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
92951
92951
  */
92952
- async withAbortSignal(abortSignal, fn2) {
92953
- return await this.connection.withAbortSignal(abortSignal, fn2);
92952
+ async withAbortSignal(abortSignal, fn) {
92953
+ return await this.connection.withAbortSignal(abortSignal, fn);
92954
92954
  }
92955
92955
  /**
92956
92956
  * Set metadata for any service requests executed in `fn`'s scope.
@@ -92959,8 +92959,8 @@ var require_base_client = __commonJS({
92959
92959
  *
92960
92960
  * @returns returned value of `fn`
92961
92961
  */
92962
- async withMetadata(metadata, fn2) {
92963
- return await this.connection.withMetadata(metadata, fn2);
92962
+ async withMetadata(metadata, fn) {
92963
+ return await this.connection.withMetadata(metadata, fn);
92964
92964
  }
92965
92965
  get dataConverter() {
92966
92966
  return this.loadedDataConverter;
@@ -96258,8 +96258,8 @@ var require_workflow_client = __commonJS({
96258
96258
  const onStartError = (err) => {
96259
96259
  startWorkflowOperation[withStartWorkflowOperationReject](err);
96260
96260
  };
96261
- const fn2 = (0, interceptors_1.composeInterceptors)(interceptors, "startUpdateWithStart", this._updateWithStartHandler.bind(this, waitForStage, onStart, onStartError));
96262
- const updateOutput = await fn2(startUpdateWithStartInput);
96261
+ const fn = (0, interceptors_1.composeInterceptors)(interceptors, "startUpdateWithStart", this._updateWithStartHandler.bind(this, waitForStage, onStart, onStartError));
96262
+ const updateOutput = await fn(startUpdateWithStartInput);
96263
96263
  let outcome = updateOutput.updateOutcome;
96264
96264
  if (!outcome && waitForStage === workflow_update_stage_1.WorkflowUpdateStage.COMPLETED) {
96265
96265
  outcome = await this._pollForUpdateOutcome(updateOutput.updateId, {
@@ -96799,7 +96799,7 @@ var require_workflow_client = __commonJS({
96799
96799
  _createWorkflowHandle({ workflowId, runId, firstExecutionRunId, interceptors, runIdForResult, ...resultOptions }) {
96800
96800
  const _startUpdate = async (def, waitForStage, options) => {
96801
96801
  const next = this._startUpdateHandler.bind(this, waitForStage);
96802
- const fn2 = (0, interceptors_1.composeInterceptors)(interceptors, "startUpdate", next);
96802
+ const fn = (0, interceptors_1.composeInterceptors)(interceptors, "startUpdate", next);
96803
96803
  const { args, ...opts } = options ?? {};
96804
96804
  const input = {
96805
96805
  workflowExecution: { workflowId, runId },
@@ -96810,7 +96810,7 @@ var require_workflow_client = __commonJS({
96810
96810
  headers: {},
96811
96811
  options: opts
96812
96812
  };
96813
- const output = await fn2(input);
96813
+ const output = await fn(input);
96814
96814
  const handle = this.createWorkflowUpdateHandle(output.updateId, input.workflowExecution.workflowId, output.workflowRunId, output.outcome);
96815
96815
  if (!output.outcome && waitForStage === workflow_update_stage_1.WorkflowUpdateStage.COMPLETED) {
96816
96816
  await this._pollForUpdateOutcome(handle.updateId, input.workflowExecution);
@@ -96825,8 +96825,8 @@ var require_workflow_client = __commonJS({
96825
96825
  },
96826
96826
  async terminate(reason) {
96827
96827
  const next = this.client._terminateWorkflowHandler.bind(this.client);
96828
- const fn2 = (0, interceptors_1.composeInterceptors)(interceptors, "terminate", next);
96829
- return await fn2({
96828
+ const fn = (0, interceptors_1.composeInterceptors)(interceptors, "terminate", next);
96829
+ return await fn({
96830
96830
  workflowExecution: { workflowId, runId },
96831
96831
  reason,
96832
96832
  firstExecutionRunId
@@ -96834,16 +96834,16 @@ var require_workflow_client = __commonJS({
96834
96834
  },
96835
96835
  async cancel() {
96836
96836
  const next = this.client._cancelWorkflowHandler.bind(this.client);
96837
- const fn2 = (0, interceptors_1.composeInterceptors)(interceptors, "cancel", next);
96838
- return await fn2({
96837
+ const fn = (0, interceptors_1.composeInterceptors)(interceptors, "cancel", next);
96838
+ return await fn({
96839
96839
  workflowExecution: { workflowId, runId },
96840
96840
  firstExecutionRunId
96841
96841
  });
96842
96842
  },
96843
96843
  async describe() {
96844
96844
  const next = this.client._describeWorkflowHandler.bind(this.client);
96845
- const fn2 = (0, interceptors_1.composeInterceptors)(interceptors, "describe", next);
96846
- const raw2 = await fn2({
96845
+ const fn = (0, interceptors_1.composeInterceptors)(interceptors, "describe", next);
96846
+ const raw2 = await fn({
96847
96847
  workflowExecution: { workflowId, runId }
96848
96848
  });
96849
96849
  const info = await (0, helpers_1.executionInfoFromRaw)(raw2.workflowExecutionInfo ?? {}, this.client.dataConverter, raw2, this.client.options.namespace);
@@ -96884,8 +96884,8 @@ var require_workflow_client = __commonJS({
96884
96884
  },
96885
96885
  async signal(def, ...args) {
96886
96886
  const next = this.client._signalWorkflowHandler.bind(this.client);
96887
- const fn2 = (0, interceptors_1.composeInterceptors)(interceptors, "signal", next);
96888
- await fn2({
96887
+ const fn = (0, interceptors_1.composeInterceptors)(interceptors, "signal", next);
96888
+ await fn({
96889
96889
  workflowExecution: { workflowId, runId },
96890
96890
  signalName: typeof def === "string" ? def : def.name,
96891
96891
  args,
@@ -96894,8 +96894,8 @@ var require_workflow_client = __commonJS({
96894
96894
  },
96895
96895
  async query(def, ...args) {
96896
96896
  const next = this.client._queryWorkflowHandler.bind(this.client);
96897
- const fn2 = (0, interceptors_1.composeInterceptors)(interceptors, "query", next);
96898
- return fn2({
96897
+ const fn = (0, interceptors_1.composeInterceptors)(interceptors, "query", next);
96898
+ return fn({
96899
96899
  workflowExecution: { workflowId, runId },
96900
96900
  queryRejectCondition: (0, types_1.encodeQueryRejectCondition)(this.client.options.queryRejectCondition),
96901
96901
  queryType: typeof def === "string" ? def : def.name,
@@ -103578,10 +103578,10 @@ var require_textParsers = __commonJS({
103578
103578
  var parseDate2 = require_postgres_date();
103579
103579
  var parseInterval = require_postgres_interval();
103580
103580
  var parseByteA = require_postgres_bytea();
103581
- function allowNull(fn2) {
103581
+ function allowNull(fn) {
103582
103582
  return function nullAllowed(value) {
103583
103583
  if (value === null) return value;
103584
- return fn2(value);
103584
+ return fn(value);
103585
103585
  };
103586
103586
  }
103587
103587
  function parseBool(value) {
@@ -113485,7 +113485,7 @@ var require_nacl_fast = __commonJS({
113485
113485
  var _0 = new Uint8Array(16);
113486
113486
  var _9 = new Uint8Array(32);
113487
113487
  _9[0] = 9;
113488
- var gf0 = gf(), gf1 = gf([1]), _121665 = gf([56129, 1]), D3 = gf([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), D22 = gf([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), X3 = gf([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), Y3 = gf([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), I3 = gf([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
113488
+ var gf0 = gf(), gf1 = gf([1]), _121665 = gf([56129, 1]), D2 = gf([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), D22 = gf([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), X3 = gf([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), Y3 = gf([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), I3 = gf([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
113489
113489
  function ts64(x2, i, h, l) {
113490
113490
  x2[i] = h >> 24 & 255;
113491
113491
  x2[i + 1] = h >> 16 & 255;
@@ -113816,16 +113816,16 @@ var require_nacl_fast = __commonJS({
113816
113816
  function crypto_stream(c, cpos, d, n, k2) {
113817
113817
  var s3 = new Uint8Array(32);
113818
113818
  crypto_core_hsalsa20(s3, n, k2, sigma);
113819
- var sn = new Uint8Array(8);
113820
- for (var i = 0; i < 8; i++) sn[i] = n[i + 16];
113821
- return crypto_stream_salsa20(c, cpos, d, sn, s3);
113819
+ var sn2 = new Uint8Array(8);
113820
+ for (var i = 0; i < 8; i++) sn2[i] = n[i + 16];
113821
+ return crypto_stream_salsa20(c, cpos, d, sn2, s3);
113822
113822
  }
113823
113823
  function crypto_stream_xor(c, cpos, m2, mpos, d, n, k2) {
113824
113824
  var s3 = new Uint8Array(32);
113825
113825
  crypto_core_hsalsa20(s3, n, k2, sigma);
113826
- var sn = new Uint8Array(8);
113827
- for (var i = 0; i < 8; i++) sn[i] = n[i + 16];
113828
- return crypto_stream_salsa20_xor(c, cpos, m2, mpos, d, sn, s3);
113826
+ var sn2 = new Uint8Array(8);
113827
+ for (var i = 0; i < 8; i++) sn2[i] = n[i + 16];
113828
+ return crypto_stream_salsa20_xor(c, cpos, m2, mpos, d, sn2, s3);
113829
113829
  }
113830
113830
  var poly1305 = function(key) {
113831
113831
  this.buffer = new Uint8Array(16);
@@ -115385,7 +115385,7 @@ var require_nacl_fast = __commonJS({
115385
115385
  set25519(r[2], gf1);
115386
115386
  unpack25519(r[1], p2);
115387
115387
  S2(num, r[1]);
115388
- M3(den, num, D3);
115388
+ M3(den, num, D2);
115389
115389
  Z3(num, num, r[2]);
115390
115390
  A2(den, r[2], den);
115391
115391
  S2(den2, den);
@@ -115472,7 +115472,7 @@ var require_nacl_fast = __commonJS({
115472
115472
  crypto_sign_SEEDBYTES,
115473
115473
  crypto_hash_BYTES,
115474
115474
  gf,
115475
- D: D3,
115475
+ D: D2,
115476
115476
  L: L3,
115477
115477
  pack25519,
115478
115478
  unpack25519,
@@ -115663,8 +115663,8 @@ var require_nacl_fast = __commonJS({
115663
115663
  if (x2.length !== y2.length) return false;
115664
115664
  return vn2(x2, 0, y2, 0, x2.length) === 0 ? true : false;
115665
115665
  };
115666
- nacl2.setPRNG = function(fn2) {
115667
- randombytes = fn2;
115666
+ nacl2.setPRNG = function(fn) {
115667
+ randombytes = fn;
115668
115668
  };
115669
115669
  (function() {
115670
115670
  var crypto4 = typeof self !== "undefined" ? self.crypto || self.msCrypto : null;
@@ -115765,24 +115765,24 @@ var require_libheif_bundle = __commonJS({
115765
115765
  "node_modules/libheif-js/libheif-wasm/libheif-bundle.js"(exports2, module2) {
115766
115766
  "use strict";
115767
115767
  var libheif = (() => {
115768
- var xe = Object.create;
115768
+ var xe2 = Object.create;
115769
115769
  var wA = Object.defineProperty;
115770
- var Le2 = Object.getOwnPropertyDescriptor;
115770
+ var Le = Object.getOwnPropertyDescriptor;
115771
115771
  var ye2 = Object.getOwnPropertyNames;
115772
115772
  var Oe2 = Object.getPrototypeOf, Je2 = Object.prototype.hasOwnProperty;
115773
- var be2 = ((f2) => typeof require != "undefined" ? require : typeof Proxy != "undefined" ? new Proxy(f2, { get: (N2, y2) => (typeof require != "undefined" ? require : N2)[y2] }) : f2)(function(f2) {
115773
+ var be2 = ((f2) => typeof require != "undefined" ? require : typeof Proxy != "undefined" ? new Proxy(f2, { get: (N3, y2) => (typeof require != "undefined" ? require : N3)[y2] }) : f2)(function(f2) {
115774
115774
  if (typeof require != "undefined") return require.apply(this, arguments);
115775
115775
  throw Error('Dynamic require of "' + f2 + '" is not supported');
115776
115776
  });
115777
- var Ej = (f2, N2) => () => (N2 || f2((N2 = { exports: {} }).exports, N2), N2.exports), De2 = (f2, N2) => {
115778
- for (var y2 in N2) wA(f2, y2, { get: N2[y2], enumerable: true });
115779
- }, Zj = (f2, N2, y2, K3) => {
115780
- if (N2 && typeof N2 == "object" || typeof N2 == "function") for (let r of ye2(N2)) !Je2.call(f2, r) && r !== y2 && wA(f2, r, { get: () => N2[r], enumerable: !(K3 = Le2(N2, r)) || K3.enumerable });
115777
+ var Ej = (f2, N3) => () => (N3 || f2((N3 = { exports: {} }).exports, N3), N3.exports), De2 = (f2, N3) => {
115778
+ for (var y2 in N3) wA(f2, y2, { get: N3[y2], enumerable: true });
115779
+ }, Zj = (f2, N3, y2, K3) => {
115780
+ if (N3 && typeof N3 == "object" || typeof N3 == "function") for (let r of ye2(N3)) !Je2.call(f2, r) && r !== y2 && wA(f2, r, { get: () => N3[r], enumerable: !(K3 = Le(N3, r)) || K3.enumerable });
115781
115781
  return f2;
115782
115782
  };
115783
- var we2 = (f2, N2, y2) => (y2 = f2 != null ? xe(Oe2(f2)) : {}, Zj(N2 || !f2 || !f2.__esModule ? wA(y2, "default", { value: f2, enumerable: true }) : y2, f2)), Ce2 = (f2) => Zj(wA({}, "__esModule", { value: true }), f2);
115783
+ var we2 = (f2, N3, y2) => (y2 = f2 != null ? xe2(Oe2(f2)) : {}, Zj(N3 || !f2 || !f2.__esModule ? wA(y2, "default", { value: f2, enumerable: true }) : y2, f2)), Ce2 = (f2) => Zj(wA({}, "__esModule", { value: true }), f2);
115784
115784
  var Qj = (() => {
115785
- for (var f2 = new Uint8Array(128), N2 = 0; N2 < 64; N2++) f2[N2 < 26 ? N2 + 65 : N2 < 52 ? N2 + 71 : N2 < 62 ? N2 - 4 : N2 * 4 - 205] = N2;
115785
+ for (var f2 = new Uint8Array(128), N3 = 0; N3 < 64; N3++) f2[N3 < 26 ? N3 + 65 : N3 < 52 ? N3 + 71 : N3 < 62 ? N3 - 4 : N3 * 4 - 205] = N3;
115786
115786
  return (y2) => {
115787
115787
  for (var K3 = y2.length, r = new Uint8Array((K3 - (y2[K3 - 1] == "=") - (y2[K3 - 2] == "=")) * 3 / 4 | 0), z3 = 0, AA = 0; z3 < K3; ) {
115788
115788
  var sj = f2[y2.charCodeAt(z3++)], qA = f2[y2.charCodeAt(z3++)], jA = f2[y2.charCodeAt(z3++)], _A = f2[y2.charCodeAt(z3++)];
@@ -115799,8 +115799,8 @@ var require_libheif_bundle = __commonJS({
115799
115799
  });
115800
115800
  var l6 = Ej((k6, nj) => {
115801
115801
  var r6 = (() => {
115802
- var f2, N2 = typeof document != "undefined" ? (f2 = document.currentScript) == null ? void 0 : f2.src : void 0;
115803
- return typeof __filename != "undefined" && (N2 || (N2 = __filename)), function(y2 = {}) {
115802
+ var f2, N3 = typeof document != "undefined" ? (f2 = document.currentScript) == null ? void 0 : f2.src : void 0;
115803
+ return typeof __filename != "undefined" && (N3 || (N3 = __filename)), function(y2 = {}) {
115804
115804
  var K3, r = y2, z3, AA, sj = new Promise((A2, j2) => {
115805
115805
  z3 = A2, AA = j2;
115806
115806
  }), qA = typeof window == "object", jA = typeof importScripts == "function", _A = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string", Gj = Object.assign({}, r), dj = [], CA = "./this.program", $j = (A2, j2) => {
@@ -115822,7 +115822,7 @@ var require_libheif_bundle = __commonJS({
115822
115822
  }, !r.thisProgram && process.argv.length > 1 && (CA = process.argv[1].replace(/\\/g, "/")), dj = process.argv.slice(2), $j = (A2, j2) => {
115823
115823
  throw process.exitCode = A2, j2;
115824
115824
  };
115825
- } else (qA || jA) && (jA ? M3 = self.location.href : typeof document != "undefined" && document.currentScript && (M3 = document.currentScript.src), N2 && (M3 = N2), M3.startsWith("blob:") ? M3 = "" : M3 = M3.substr(0, M3.replace(/[?#].*/, "").lastIndexOf("/") + 1), aA = (A2) => {
115825
+ } else (qA || jA) && (jA ? M3 = self.location.href : typeof document != "undefined" && document.currentScript && (M3 = document.currentScript.src), N3 && (M3 = N3), M3.startsWith("blob:") ? M3 = "" : M3 = M3.substr(0, M3.replace(/[?#].*/, "").lastIndexOf("/") + 1), aA = (A2) => {
115826
115826
  var j2 = new XMLHttpRequest();
115827
115827
  return j2.open("GET", A2, false), j2.send(null), j2.responseText;
115828
115828
  }, jA && (hA = (A2) => {
@@ -115846,10 +115846,10 @@ var require_libheif_bundle = __commonJS({
115846
115846
  Object.assign(r, Gj), Gj = null, r.arguments && (dj = r.arguments), r.thisProgram && (CA = r.thisProgram), r.quit && ($j = r.quit);
115847
115847
  var KA;
115848
115848
  r.wasmBinary && (KA = r.wasmBinary);
115849
- var mA, pj = false, o6, J3, D3, R2, iA, H2, m2, Hj, cj;
115849
+ var mA, pj = false, o6, J3, D2, R2, iA, H2, m2, Hj, cj;
115850
115850
  function qj() {
115851
115851
  var A2 = mA.buffer;
115852
- r.HEAP8 = J3 = new Int8Array(A2), r.HEAP16 = R2 = new Int16Array(A2), r.HEAPU8 = D3 = new Uint8Array(A2), r.HEAPU16 = iA = new Uint16Array(A2), r.HEAP32 = H2 = new Int32Array(A2), r.HEAPU32 = m2 = new Uint32Array(A2), r.HEAPF32 = Hj = new Float32Array(A2), r.HEAPF64 = cj = new Float64Array(A2);
115852
+ r.HEAP8 = J3 = new Int8Array(A2), r.HEAP16 = R2 = new Int16Array(A2), r.HEAPU8 = D2 = new Uint8Array(A2), r.HEAPU16 = iA = new Uint16Array(A2), r.HEAP32 = H2 = new Int32Array(A2), r.HEAPU32 = m2 = new Uint32Array(A2), r.HEAPF32 = Hj = new Float32Array(A2), r.HEAPF64 = cj = new Float64Array(A2);
115853
115853
  }
115854
115854
  var hj = [], mj = [], Nj = [], i6 = false;
115855
115855
  function E6() {
@@ -115951,7 +115951,7 @@ var require_libheif_bundle = __commonJS({
115951
115951
  }
115952
115952
  }
115953
115953
  return _2;
115954
- }, eA = (A2, j2) => A2 ? kA(D3, A2, j2) : "", N6 = (A2, j2, t2, e) => {
115954
+ }, eA = (A2, j2) => A2 ? kA(D2, A2, j2) : "", N6 = (A2, j2, t2, e) => {
115955
115955
  nA(`Assertion failed: ${eA(A2)}, at: ` + [j2 ? eA(j2) : "unknown filename", t2, e ? eA(e) : "unknown function"]);
115956
115956
  };
115957
115957
  class f6 {
@@ -116955,7 +116955,7 @@ var require_libheif_bundle = __commonJS({
116955
116955
  }, doMsync(A2, j2, t2, e, l) {
116956
116956
  if (!k2.isFile(j2.node.mode)) throw new k2.ErrnoError(43);
116957
116957
  if (e & 2) return 0;
116958
- var _2 = D3.slice(A2, A2 + t2);
116958
+ var _2 = D2.slice(A2, A2 + t2);
116959
116959
  k2.msync(j2, _2, l, t2, e);
116960
116960
  }, getStreamFromFD(A2) {
116961
116961
  var j2 = k2.getStreamChecked(A2);
@@ -117136,7 +117136,7 @@ var require_libheif_bundle = __commonJS({
117136
117136
  for (var A2 = new Array(256), j2 = 0; j2 < 256; ++j2) A2[j2] = String.fromCharCode(j2);
117137
117137
  xj = A2;
117138
117138
  }, xj, C3 = (A2) => {
117139
- for (var j2 = "", t2 = A2; D3[t2]; ) j2 += xj[D3[t2++]];
117139
+ for (var j2 = "", t2 = A2; D2[t2]; ) j2 += xj[D2[t2++]];
117140
117140
  return j2;
117141
117141
  }, GA, v3 = (A2) => {
117142
117142
  throw new GA(A2);
@@ -117162,7 +117162,7 @@ var require_libheif_bundle = __commonJS({
117162
117162
  }, toWireType: function(l, _2) {
117163
117163
  return _2 ? t2 : e;
117164
117164
  }, argPackAdvance: X3, readValueFromPointer: function(l) {
117165
- return this.fromWireType(D3[l]);
117165
+ return this.fromWireType(D2[l]);
117166
117166
  }, destructorFunction: null });
117167
117167
  }, V6 = (A2) => ({ count: A2.count, deleteScheduled: A2.deleteScheduled, preservePointerOnDelete: A2.preservePointerOnDelete, ptr: A2.ptr, ptrType: A2.ptrType, smartPtr: A2.smartPtr, smartPtrType: A2.smartPtrType }), Aj = (A2) => {
117168
117168
  function j2(t2) {
@@ -117417,7 +117417,7 @@ var require_libheif_bundle = __commonJS({
117417
117417
  return t2 ? function(e) {
117418
117418
  return this.fromWireType(J3[e]);
117419
117419
  } : function(e) {
117420
- return this.fromWireType(D3[e]);
117420
+ return this.fromWireType(D2[e]);
117421
117421
  };
117422
117422
  case 2:
117423
117423
  return t2 ? function(e) {
@@ -117513,7 +117513,7 @@ var require_libheif_bundle = __commonJS({
117513
117513
  }, xt2 = (A2, j2, t2) => {
117514
117514
  switch (j2) {
117515
117515
  case 1:
117516
- return t2 ? (e) => J3[e] : (e) => D3[e];
117516
+ return t2 ? (e) => J3[e] : (e) => D2[e];
117517
117517
  case 2:
117518
117518
  return t2 ? (e) => R2[e >> 1] : (e) => iA[e >> 1];
117519
117519
  case 4:
@@ -117542,20 +117542,20 @@ var require_libheif_bundle = __commonJS({
117542
117542
  return new l(J3.buffer, i, o);
117543
117543
  }
117544
117544
  t2 = C3(t2), T2(A2, { name: t2, fromWireType: _2, argPackAdvance: X3, readValueFromPointer: _2 }, { ignoreDuplicateRegistrations: true });
117545
- }, Ot2 = (A2, j2, t2) => zA(A2, D3, j2, t2), Jt2 = (A2, j2) => {
117545
+ }, Ot2 = (A2, j2, t2) => zA(A2, D2, j2, t2), Jt2 = (A2, j2) => {
117546
117546
  j2 = C3(j2);
117547
117547
  var t2 = j2 === "std::string";
117548
117548
  T2(A2, { name: j2, fromWireType(e) {
117549
117549
  var l = m2[e >> 2], _2 = e + 4, a;
117550
117550
  if (t2) for (var o = _2, i = 0; i <= l; ++i) {
117551
117551
  var n = _2 + i;
117552
- if (i == l || D3[n] == 0) {
117552
+ if (i == l || D2[n] == 0) {
117553
117553
  var s3 = n - o, u3 = eA(o, s3);
117554
117554
  a === void 0 ? a = u3 : (a += "\0", a += u3), o = n + 1;
117555
117555
  }
117556
117556
  }
117557
117557
  else {
117558
- for (var d = new Array(l), i = 0; i < l; ++i) d[i] = String.fromCharCode(D3[_2 + i]);
117558
+ for (var d = new Array(l), i = 0; i < l; ++i) d[i] = String.fromCharCode(D2[_2 + i]);
117559
117559
  a = d.join("");
117560
117560
  }
117561
117561
  return Z3(e), a;
@@ -117567,16 +117567,16 @@ var require_libheif_bundle = __commonJS({
117567
117567
  if (m2[o >> 2] = _2, t2 && a) Ot2(l, i, _2 + 1);
117568
117568
  else if (a) for (var n = 0; n < _2; ++n) {
117569
117569
  var s3 = l.charCodeAt(n);
117570
- s3 > 255 && (Z3(i), v3("String has UTF-16 code units that do not fit in 8 bits")), D3[i + n] = s3;
117570
+ s3 > 255 && (Z3(i), v3("String has UTF-16 code units that do not fit in 8 bits")), D2[i + n] = s3;
117571
117571
  }
117572
- else for (var n = 0; n < _2; ++n) D3[i + n] = l[n];
117572
+ else for (var n = 0; n < _2; ++n) D2[i + n] = l[n];
117573
117573
  return e !== null && e.push(Z3, o), o;
117574
117574
  }, argPackAdvance: X3, readValueFromPointer: sA, destructorFunction(e) {
117575
117575
  Z3(e);
117576
117576
  } });
117577
117577
  }, Mj = typeof TextDecoder != "undefined" ? new TextDecoder("utf-16le") : void 0, bt2 = (A2, j2) => {
117578
117578
  for (var t2 = A2, e = t2 >> 1, l = e + j2 / 2; !(e >= l) && iA[e]; ) ++e;
117579
- if (t2 = e << 1, t2 - A2 > 32 && Mj) return Mj.decode(D3.subarray(A2, t2));
117579
+ if (t2 = e << 1, t2 - A2 > 32 && Mj) return Mj.decode(D2.subarray(A2, t2));
117580
117580
  for (var _2 = "", a = 0; !(a >= j2 / 2); ++a) {
117581
117581
  var o = R2[A2 + a * 2 >> 1];
117582
117582
  if (o == 0) break;
@@ -117645,7 +117645,7 @@ var require_libheif_bundle = __commonJS({
117645
117645
  j2 = C3(j2), T2(A2, { isVoid: true, name: j2, argPackAdvance: 0, fromWireType: () => {
117646
117646
  }, toWireType: (t2, e) => {
117647
117647
  } });
117648
- }, Rt2 = (A2, j2, t2) => D3.copyWithin(A2, j2, j2 + t2), Vt2 = {}, Kj = (A2) => {
117648
+ }, Rt2 = (A2, j2, t2) => D2.copyWithin(A2, j2, j2 + t2), Vt2 = {}, Kj = (A2) => {
117649
117649
  var j2 = Vt2[A2];
117650
117650
  return j2 === void 0 ? C3(A2) : j2;
117651
117651
  }, aj = [], Ut2 = (A2, j2, t2, e, l) => (A2 = aj[A2], j2 = P3.toValue(j2), t2 = Kj(t2), A2(j2, j2[t2], e, l)), Yt2 = (A2) => {
@@ -117684,7 +117684,7 @@ var require_libheif_bundle = __commonJS({
117684
117684
  } catch {
117685
117685
  }
117686
117686
  }, ae2 = (A2) => {
117687
- var j2 = D3.length;
117687
+ var j2 = D2.length;
117688
117688
  A2 >>>= 0;
117689
117689
  var t2 = Be2();
117690
117690
  if (A2 > t2) return false;
@@ -123522,15 +123522,16 @@ var require_range = __commonJS({
123522
123522
  };
123523
123523
  var replaceTilde = (comp, options) => {
123524
123524
  const r = options.loose ? re2[t2.TILDELOOSE] : re2[t2.TILDE];
123525
+ const z3 = options.includePrerelease ? "-0" : "";
123525
123526
  return comp.replace(r, (_2, M3, m2, p2, pr2) => {
123526
123527
  debug("tilde", comp, _2, M3, m2, p2, pr2);
123527
123528
  let ret;
123528
123529
  if (isX(M3)) {
123529
123530
  ret = "";
123530
123531
  } else if (isX(m2)) {
123531
- ret = `>=${M3}.0.0 <${+M3 + 1}.0.0-0`;
123532
+ ret = `>=${M3}.0.0${z3} <${+M3 + 1}.0.0-0`;
123532
123533
  } else if (isX(p2)) {
123533
- ret = `>=${M3}.${m2}.0 <${M3}.${+m2 + 1}.0-0`;
123534
+ ret = `>=${M3}.${m2}.0${z3} <${M3}.${+m2 + 1}.0-0`;
123534
123535
  } else if (pr2) {
123535
123536
  debug("replaceTilde pr", pr2);
123536
123537
  ret = `>=${M3}.${m2}.${p2}-${pr2} <${M3}.${+m2 + 1}.0-0`;
@@ -125076,8 +125077,8 @@ var Argument = class {
125076
125077
  * @param {Function} [fn]
125077
125078
  * @return {Argument}
125078
125079
  */
125079
- argParser(fn2) {
125080
- this.parseArg = fn2;
125080
+ argParser(fn) {
125081
+ this.parseArg = fn;
125081
125082
  return this;
125082
125083
  }
125083
125084
  /**
@@ -125840,8 +125841,8 @@ var Option = class {
125840
125841
  * @param {Function} [fn]
125841
125842
  * @return {Option}
125842
125843
  */
125843
- argParser(fn2) {
125844
- this.parseArg = fn2;
125844
+ argParser(fn) {
125845
+ this.parseArg = fn;
125845
125846
  return this;
125846
125847
  }
125847
125848
  /**
@@ -126522,9 +126523,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
126522
126523
  * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing
126523
126524
  * @return {Command} `this` command for chaining
126524
126525
  */
126525
- exitOverride(fn2) {
126526
- if (fn2) {
126527
- this._exitCallback = fn2;
126526
+ exitOverride(fn) {
126527
+ if (fn) {
126528
+ this._exitCallback = fn;
126528
126529
  } else {
126529
126530
  this._exitCallback = (err) => {
126530
126531
  if (err.code !== "commander.executeSubCommandAsync") {
@@ -126564,7 +126565,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
126564
126565
  * @param {Function} fn
126565
126566
  * @return {Command} `this` command for chaining
126566
126567
  */
126567
- action(fn2) {
126568
+ action(fn) {
126568
126569
  const listener = (args) => {
126569
126570
  const expectedArgsCount = this.registeredArguments.length;
126570
126571
  const actionArgs = args.slice(0, expectedArgsCount);
@@ -126574,7 +126575,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
126574
126575
  actionArgs[expectedArgsCount] = this.opts();
126575
126576
  }
126576
126577
  actionArgs.push(this);
126577
- return fn2.apply(this, actionArgs);
126578
+ return fn.apply(this, actionArgs);
126578
126579
  };
126579
126580
  this._actionHandler = listener;
126580
126581
  return this;
@@ -126705,7 +126706,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
126705
126706
  * @return {Command} `this` command for chaining
126706
126707
  * @private
126707
126708
  */
126708
- _optionEx(config2, flags, description, fn2, defaultValue) {
126709
+ _optionEx(config2, flags, description, fn, defaultValue) {
126709
126710
  if (typeof flags === "object" && flags instanceof Option) {
126710
126711
  throw new Error(
126711
126712
  "To add an Option object use addOption() instead of option() or requiredOption()"
@@ -126713,17 +126714,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
126713
126714
  }
126714
126715
  const option = this.createOption(flags, description);
126715
126716
  option.makeOptionMandatory(!!config2.mandatory);
126716
- if (typeof fn2 === "function") {
126717
- option.default(defaultValue).argParser(fn2);
126718
- } else if (fn2 instanceof RegExp) {
126719
- const regex = fn2;
126720
- fn2 = (val, def) => {
126717
+ if (typeof fn === "function") {
126718
+ option.default(defaultValue).argParser(fn);
126719
+ } else if (fn instanceof RegExp) {
126720
+ const regex = fn;
126721
+ fn = (val, def) => {
126721
126722
  const m2 = regex.exec(val);
126722
126723
  return m2 ? m2[0] : def;
126723
126724
  };
126724
- option.default(defaultValue).argParser(fn2);
126725
+ option.default(defaultValue).argParser(fn);
126725
126726
  } else {
126726
- option.default(fn2);
126727
+ option.default(fn);
126727
126728
  }
126728
126729
  return this.addOption(option);
126729
126730
  }
@@ -127336,11 +127337,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
127336
127337
  * @return {(Promise|undefined)}
127337
127338
  * @private
127338
127339
  */
127339
- _chainOrCall(promise2, fn2) {
127340
+ _chainOrCall(promise2, fn) {
127340
127341
  if (promise2?.then && typeof promise2.then === "function") {
127341
- return promise2.then(() => fn2());
127342
+ return promise2.then(() => fn());
127342
127343
  }
127343
- return fn2();
127344
+ return fn();
127344
127345
  }
127345
127346
  /**
127346
127347
  *
@@ -129941,11 +129942,11 @@ var binaryExtensions = /* @__PURE__ */ new Set([
129941
129942
  "zipx"
129942
129943
  ]);
129943
129944
  var isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
129944
- var foreach = (val, fn2) => {
129945
+ var foreach = (val, fn) => {
129945
129946
  if (val instanceof Set) {
129946
- val.forEach(fn2);
129947
+ val.forEach(fn);
129947
129948
  } else {
129948
- fn2(val);
129949
+ fn(val);
129949
129950
  }
129950
129951
  };
129951
129952
  var addAndConvert = (main, prop, item) => {
@@ -134079,14 +134080,19 @@ var POOL_SIZE_MULTIPLIER = 128;
134079
134080
  var pool;
134080
134081
  var poolOffset;
134081
134082
  var fillPool = (bytes) => {
134082
- if (bytes < 0 || bytes > 1024) throw new RangeError("Wrong ID size");
134083
- if (!pool || pool.length < bytes) {
134084
- pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
134085
- import_crypto3.default.randomFillSync(pool);
134086
- poolOffset = 0;
134087
- } else if (poolOffset + bytes > pool.length) {
134088
- import_crypto3.default.randomFillSync(pool);
134089
- poolOffset = 0;
134083
+ if (bytes < 0) throw new RangeError("Wrong ID size");
134084
+ try {
134085
+ if (!pool || pool.length < bytes) {
134086
+ pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
134087
+ import_crypto3.default.randomFillSync(pool);
134088
+ poolOffset = 0;
134089
+ } else if (poolOffset + bytes > pool.length) {
134090
+ import_crypto3.default.randomFillSync(pool);
134091
+ poolOffset = 0;
134092
+ }
134093
+ } catch (e) {
134094
+ pool = void 0;
134095
+ throw e;
134090
134096
  }
134091
134097
  poolOffset += bytes;
134092
134098
  };
@@ -136920,6 +136926,7 @@ var createHonoApp = (deps, upgradeWebSocket) => {
136920
136926
  const start = Date.now();
136921
136927
  const ua2 = c.req.header("user-agent") ?? "";
136922
136928
  await next();
136929
+ if (!deps.logMenubarRequests && c.req.header("x-client") === "menubar") return;
136923
136930
  const ms2 = Date.now() - start;
136924
136931
  httpLog.info(`[req] ${c.req.method} ${c.req.path} \u2192 ${c.res.status} ${ms2}ms`, {
136925
136932
  method: c.req.method,
@@ -140160,11 +140167,11 @@ var binaryExtensions2 = /* @__PURE__ */ new Set([
140160
140167
  "zipx"
140161
140168
  ]);
140162
140169
  var isBinaryPath2 = (filePath) => binaryExtensions2.has(sp.extname(filePath).slice(1).toLowerCase());
140163
- var foreach2 = (val, fn2) => {
140170
+ var foreach2 = (val, fn) => {
140164
140171
  if (val instanceof Set) {
140165
- val.forEach(fn2);
140172
+ val.forEach(fn);
140166
140173
  } else {
140167
- fn2(val);
140174
+ fn(val);
140168
140175
  }
140169
140176
  };
140170
140177
  var addAndConvert2 = (main, prop, item) => {
@@ -141904,7 +141911,7 @@ function computeConversationEtag({
141904
141911
  }
141905
141912
 
141906
141913
  // src/utils/debounce.ts
141907
- function debounce(fn2, waitMs) {
141914
+ function debounce(fn, waitMs) {
141908
141915
  let timer = null;
141909
141916
  let lastArgs = null;
141910
141917
  const run2 = () => {
@@ -141912,7 +141919,7 @@ function debounce(fn2, waitMs) {
141912
141919
  if (lastArgs) {
141913
141920
  const args = lastArgs;
141914
141921
  lastArgs = null;
141915
- fn2(...args);
141922
+ fn(...args);
141916
141923
  }
141917
141924
  };
141918
141925
  const debounced = (...args) => {
@@ -142109,6 +142116,7 @@ var StreamerServer = class {
142109
142116
  cacheReady = false;
142110
142117
  apiKey;
142111
142118
  localNoAuth;
142119
+ logMenubarRequests;
142112
142120
  verbose;
142113
142121
  scanProfiles;
142114
142122
  dbPool = null;
@@ -142153,6 +142161,7 @@ var StreamerServer = class {
142153
142161
  this.sessionStatusBus.setMaxListeners(0);
142154
142162
  this.apiKey = config2.apiKey;
142155
142163
  this.localNoAuth = config2.localNoAuth ?? false;
142164
+ this.logMenubarRequests = config2.logMenubarRequests ?? false;
142156
142165
  this.verbose = config2.verbose ?? false;
142157
142166
  this.disableDb = config2.disableDb ?? false;
142158
142167
  this.scanProfiles = config2.scanProfiles;
@@ -142332,6 +142341,7 @@ var StreamerServer = class {
142332
142341
  const apiDeps = {
142333
142342
  apiKey: this.apiKey,
142334
142343
  localNoAuth: this.localNoAuth,
142344
+ logMenubarRequests: this.logMenubarRequests,
142335
142345
  publicUrl: this.publicUrl,
142336
142346
  browseRoot: this.browseRoot,
142337
142347
  ptyManager: this.ptyManager,
@@ -144588,7 +144598,7 @@ var import_path20 = require("path");
144588
144598
  var import_events5 = require("events");
144589
144599
  var import_assert = __toESM(require("assert"), 1);
144590
144600
  var import_buffer = require("buffer");
144591
- var Ms = __toESM(require("zlib"), 1);
144601
+ var Ps = __toESM(require("zlib"), 1);
144592
144602
  var import_zlib = __toESM(require("zlib"), 1);
144593
144603
  var import_node_path13 = require("path");
144594
144604
  var import_node_path14 = require("path");
@@ -144611,50 +144621,50 @@ var import_node_path18 = __toESM(require("path"), 1);
144611
144621
  var import_node_path19 = require("path");
144612
144622
  var import_node_fs15 = __toESM(require("fs"), 1);
144613
144623
  var import_node_path20 = __toESM(require("path"), 1);
144614
- var Mr = Object.defineProperty;
144615
- var Br = (s3, t2) => {
144616
- for (var e in t2) Mr(s3, e, { get: t2[e], enumerable: true });
144624
+ var zr = Object.defineProperty;
144625
+ var Ur = (s3, t2) => {
144626
+ for (var e in t2) zr(s3, e, { get: t2[e], enumerable: true });
144617
144627
  };
144618
- var xs = typeof process == "object" && process ? process : { stdout: null, stderr: null };
144619
- var zr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof import_node_stream3.default || Ur(s3) || Hr(s3));
144620
- var Ur = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events3.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream3.default.Writable.prototype.pipe;
144621
- var Hr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events3.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
144622
- var q = /* @__PURE__ */ Symbol("EOF");
144623
- var Q2 = /* @__PURE__ */ Symbol("maybeEmitEnd");
144624
- var rt = /* @__PURE__ */ Symbol("emittedEnd");
144625
- var Le = /* @__PURE__ */ Symbol("emittingEnd");
144628
+ var Ds = typeof process == "object" && process ? process : { stdout: null, stderr: null };
144629
+ var Wr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof import_node_stream3.default || Gr(s3) || Zr(s3));
144630
+ var Gr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events3.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream3.default.Writable.prototype.pipe;
144631
+ var Zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events3.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
144632
+ var Q2 = /* @__PURE__ */ Symbol("EOF");
144633
+ var J2 = /* @__PURE__ */ Symbol("maybeEmitEnd");
144634
+ var nt = /* @__PURE__ */ Symbol("emittedEnd");
144635
+ var De = /* @__PURE__ */ Symbol("emittingEnd");
144626
144636
  var qt = /* @__PURE__ */ Symbol("emittedError");
144627
144637
  var Ne = /* @__PURE__ */ Symbol("closed");
144628
- var Ls = /* @__PURE__ */ Symbol("read");
144629
- var De = /* @__PURE__ */ Symbol("flush");
144630
- var Ns = /* @__PURE__ */ Symbol("flushChunk");
144638
+ var Ns = /* @__PURE__ */ Symbol("read");
144639
+ var Ae = /* @__PURE__ */ Symbol("flush");
144640
+ var As = /* @__PURE__ */ Symbol("flushChunk");
144631
144641
  var z2 = /* @__PURE__ */ Symbol("encoding");
144632
144642
  var Mt = /* @__PURE__ */ Symbol("decoder");
144633
144643
  var g = /* @__PURE__ */ Symbol("flowing");
144634
144644
  var Qt = /* @__PURE__ */ Symbol("paused");
144635
144645
  var Bt = /* @__PURE__ */ Symbol("resume");
144636
144646
  var b = /* @__PURE__ */ Symbol("buffer");
144637
- var D2 = /* @__PURE__ */ Symbol("pipes");
144647
+ var N2 = /* @__PURE__ */ Symbol("pipes");
144638
144648
  var _ = /* @__PURE__ */ Symbol("bufferLength");
144639
- var gi = /* @__PURE__ */ Symbol("bufferPush");
144640
- var Ae = /* @__PURE__ */ Symbol("bufferShift");
144649
+ var bi = /* @__PURE__ */ Symbol("bufferPush");
144650
+ var Ie = /* @__PURE__ */ Symbol("bufferShift");
144641
144651
  var L2 = /* @__PURE__ */ Symbol("objectMode");
144642
144652
  var w = /* @__PURE__ */ Symbol("destroyed");
144643
- var bi = /* @__PURE__ */ Symbol("error");
144644
- var _i = /* @__PURE__ */ Symbol("emitData");
144645
- var Ds = /* @__PURE__ */ Symbol("emitEnd");
144646
- var Oi = /* @__PURE__ */ Symbol("emitEnd2");
144653
+ var _i = /* @__PURE__ */ Symbol("error");
144654
+ var Oi = /* @__PURE__ */ Symbol("emitData");
144655
+ var Is = /* @__PURE__ */ Symbol("emitEnd");
144656
+ var Ti = /* @__PURE__ */ Symbol("emitEnd2");
144647
144657
  var Z2 = /* @__PURE__ */ Symbol("async");
144648
- var Ti = /* @__PURE__ */ Symbol("abort");
144649
- var Ie = /* @__PURE__ */ Symbol("aborted");
144658
+ var xi = /* @__PURE__ */ Symbol("abort");
144659
+ var Ce = /* @__PURE__ */ Symbol("aborted");
144650
144660
  var Jt = /* @__PURE__ */ Symbol("signal");
144651
144661
  var Rt = /* @__PURE__ */ Symbol("dataListeners");
144652
- var F2 = /* @__PURE__ */ Symbol("discarded");
144662
+ var C2 = /* @__PURE__ */ Symbol("discarded");
144653
144663
  var jt = (s3) => Promise.resolve().then(s3);
144654
- var Wr = (s3) => s3();
144655
- var Gr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
144656
- var Zr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
144657
- var Yr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
144664
+ var Yr = (s3) => s3();
144665
+ var Kr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
144666
+ var Vr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
144667
+ var $r = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
144658
144668
  var Fe = class {
144659
144669
  src;
144660
144670
  dest;
@@ -144672,7 +144682,7 @@ var Fe = class {
144672
144682
  this.unpipe(), this.opts.end && this.dest.end();
144673
144683
  }
144674
144684
  };
144675
- var xi = class extends Fe {
144685
+ var Li = class extends Fe {
144676
144686
  unpipe() {
144677
144687
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
144678
144688
  }
@@ -144680,36 +144690,36 @@ var xi = class extends Fe {
144680
144690
  super(t2, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t2.on("error", this.proxyErrors);
144681
144691
  }
144682
144692
  };
144683
- var Kr = (s3) => !!s3.objectMode;
144684
- var Vr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
144693
+ var Xr = (s3) => !!s3.objectMode;
144694
+ var qr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
144685
144695
  var A = class extends import_node_events3.EventEmitter {
144686
144696
  [g] = false;
144687
144697
  [Qt] = false;
144688
- [D2] = [];
144698
+ [N2] = [];
144689
144699
  [b] = [];
144690
144700
  [L2];
144691
144701
  [z2];
144692
144702
  [Z2];
144693
144703
  [Mt];
144694
- [q] = false;
144695
- [rt] = false;
144696
- [Le] = false;
144704
+ [Q2] = false;
144705
+ [nt] = false;
144706
+ [De] = false;
144697
144707
  [Ne] = false;
144698
144708
  [qt] = null;
144699
144709
  [_] = 0;
144700
144710
  [w] = false;
144701
144711
  [Jt];
144702
- [Ie] = false;
144712
+ [Ce] = false;
144703
144713
  [Rt] = 0;
144704
- [F2] = false;
144714
+ [C2] = false;
144705
144715
  writable = true;
144706
144716
  readable = true;
144707
144717
  constructor(...t2) {
144708
144718
  let e = t2[0] || {};
144709
144719
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
144710
- Kr(e) ? (this[L2] = true, this[z2] = null) : Vr(e) ? (this[z2] = e.encoding, this[L2] = false) : (this[L2] = false, this[z2] = null), this[Z2] = !!e.async, this[Mt] = this[z2] ? new import_node_string_decoder.StringDecoder(this[z2]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[D2] });
144720
+ Xr(e) ? (this[L2] = true, this[z2] = null) : qr(e) ? (this[z2] = e.encoding, this[L2] = false) : (this[L2] = false, this[z2] = null), this[Z2] = !!e.async, this[Mt] = this[z2] ? new import_node_string_decoder.StringDecoder(this[z2]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[N2] });
144711
144721
  let { signal: i } = e;
144712
- i && (this[Jt] = i, i.aborted ? this[Ti]() : i.addEventListener("abort", () => this[Ti]()));
144722
+ i && (this[Jt] = i, i.aborted ? this[xi]() : i.addEventListener("abort", () => this[xi]()));
144713
144723
  }
144714
144724
  get bufferLength() {
144715
144725
  return this[_];
@@ -144735,53 +144745,53 @@ var A = class extends import_node_events3.EventEmitter {
144735
144745
  set async(t2) {
144736
144746
  this[Z2] = this[Z2] || !!t2;
144737
144747
  }
144738
- [Ti]() {
144739
- this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
144748
+ [xi]() {
144749
+ this[Ce] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
144740
144750
  }
144741
144751
  get aborted() {
144742
- return this[Ie];
144752
+ return this[Ce];
144743
144753
  }
144744
144754
  set aborted(t2) {
144745
144755
  }
144746
144756
  write(t2, e, i) {
144747
- if (this[Ie]) return false;
144748
- if (this[q]) throw new Error("write after end");
144757
+ if (this[Ce]) return false;
144758
+ if (this[Q2]) throw new Error("write after end");
144749
144759
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
144750
144760
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
144751
- let r = this[Z2] ? jt : Wr;
144761
+ let r = this[Z2] ? jt : Yr;
144752
144762
  if (!this[L2] && !Buffer.isBuffer(t2)) {
144753
- if (Yr(t2)) t2 = Buffer.from(t2.buffer, t2.byteOffset, t2.byteLength);
144754
- else if (Zr(t2)) t2 = Buffer.from(t2);
144763
+ if ($r(t2)) t2 = Buffer.from(t2.buffer, t2.byteOffset, t2.byteLength);
144764
+ else if (Vr(t2)) t2 = Buffer.from(t2);
144755
144765
  else if (typeof t2 != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
144756
144766
  }
144757
- return this[L2] ? (this[g] && this[_] !== 0 && this[De](true), this[g] ? this.emit("data", t2) : this[gi](t2), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t2.length ? (typeof t2 == "string" && !(e === this[z2] && !this[Mt]?.lastNeed) && (t2 = Buffer.from(t2, e)), Buffer.isBuffer(t2) && this[z2] && (t2 = this[Mt].write(t2)), this[g] && this[_] !== 0 && this[De](true), this[g] ? this.emit("data", t2) : this[gi](t2), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
144767
+ return this[L2] ? (this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t2) : this[bi](t2), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t2.length ? (typeof t2 == "string" && !(e === this[z2] && !this[Mt]?.lastNeed) && (t2 = Buffer.from(t2, e)), Buffer.isBuffer(t2) && this[z2] && (t2 = this[Mt].write(t2)), this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t2) : this[bi](t2), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
144758
144768
  }
144759
144769
  read(t2) {
144760
144770
  if (this[w]) return null;
144761
- if (this[F2] = false, this[_] === 0 || t2 === 0 || t2 && t2 > this[_]) return this[Q2](), null;
144771
+ if (this[C2] = false, this[_] === 0 || t2 === 0 || t2 && t2 > this[_]) return this[J2](), null;
144762
144772
  this[L2] && (t2 = null), this[b].length > 1 && !this[L2] && (this[b] = [this[z2] ? this[b].join("") : Buffer.concat(this[b], this[_])]);
144763
- let e = this[Ls](t2 || null, this[b][0]);
144764
- return this[Q2](), e;
144773
+ let e = this[Ns](t2 || null, this[b][0]);
144774
+ return this[J2](), e;
144765
144775
  }
144766
- [Ls](t2, e) {
144767
- if (this[L2]) this[Ae]();
144776
+ [Ns](t2, e) {
144777
+ if (this[L2]) this[Ie]();
144768
144778
  else {
144769
144779
  let i = e;
144770
- t2 === i.length || t2 === null ? this[Ae]() : typeof i == "string" ? (this[b][0] = i.slice(t2), e = i.slice(0, t2), this[_] -= t2) : (this[b][0] = i.subarray(t2), e = i.subarray(0, t2), this[_] -= t2);
144780
+ t2 === i.length || t2 === null ? this[Ie]() : typeof i == "string" ? (this[b][0] = i.slice(t2), e = i.slice(0, t2), this[_] -= t2) : (this[b][0] = i.subarray(t2), e = i.subarray(0, t2), this[_] -= t2);
144771
144781
  }
144772
- return this.emit("data", e), !this[b].length && !this[q] && this.emit("drain"), e;
144782
+ return this.emit("data", e), !this[b].length && !this[Q2] && this.emit("drain"), e;
144773
144783
  }
144774
144784
  end(t2, e, i) {
144775
- return typeof t2 == "function" && (i = t2, t2 = void 0), typeof e == "function" && (i = e, e = "utf8"), t2 !== void 0 && this.write(t2, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[g] || !this[Qt]) && this[Q2](), this;
144785
+ return typeof t2 == "function" && (i = t2, t2 = void 0), typeof e == "function" && (i = e, e = "utf8"), t2 !== void 0 && this.write(t2, e), i && this.once("end", i), this[Q2] = true, this.writable = false, (this[g] || !this[Qt]) && this[J2](), this;
144776
144786
  }
144777
144787
  [Bt]() {
144778
- this[w] || (!this[Rt] && !this[D2].length && (this[F2] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[De]() : this[q] ? this[Q2]() : this.emit("drain"));
144788
+ this[w] || (!this[Rt] && !this[N2].length && (this[C2] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[Ae]() : this[Q2] ? this[J2]() : this.emit("drain"));
144779
144789
  }
144780
144790
  resume() {
144781
144791
  return this[Bt]();
144782
144792
  }
144783
144793
  pause() {
144784
- this[g] = false, this[Qt] = true, this[F2] = false;
144794
+ this[g] = false, this[Qt] = true, this[C2] = false;
144785
144795
  }
144786
144796
  get destroyed() {
144787
144797
  return this[w];
@@ -144792,39 +144802,39 @@ var A = class extends import_node_events3.EventEmitter {
144792
144802
  get paused() {
144793
144803
  return this[Qt];
144794
144804
  }
144795
- [gi](t2) {
144805
+ [bi](t2) {
144796
144806
  this[L2] ? this[_] += 1 : this[_] += t2.length, this[b].push(t2);
144797
144807
  }
144798
- [Ae]() {
144808
+ [Ie]() {
144799
144809
  return this[L2] ? this[_] -= 1 : this[_] -= this[b][0].length, this[b].shift();
144800
144810
  }
144801
- [De](t2 = false) {
144811
+ [Ae](t2 = false) {
144802
144812
  do
144803
144813
  ;
144804
- while (this[Ns](this[Ae]()) && this[b].length);
144805
- !t2 && !this[b].length && !this[q] && this.emit("drain");
144814
+ while (this[As](this[Ie]()) && this[b].length);
144815
+ !t2 && !this[b].length && !this[Q2] && this.emit("drain");
144806
144816
  }
144807
- [Ns](t2) {
144817
+ [As](t2) {
144808
144818
  return this.emit("data", t2), this[g];
144809
144819
  }
144810
144820
  pipe(t2, e) {
144811
144821
  if (this[w]) return t2;
144812
- this[F2] = false;
144813
- let i = this[rt];
144814
- return e = e || {}, t2 === xs.stdout || t2 === xs.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t2.end() : (this[D2].push(e.proxyErrors ? new xi(this, t2, e) : new Fe(this, t2, e)), this[Z2] ? jt(() => this[Bt]()) : this[Bt]()), t2;
144822
+ this[C2] = false;
144823
+ let i = this[nt];
144824
+ return e = e || {}, t2 === Ds.stdout || t2 === Ds.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t2.end() : (this[N2].push(e.proxyErrors ? new Li(this, t2, e) : new Fe(this, t2, e)), this[Z2] ? jt(() => this[Bt]()) : this[Bt]()), t2;
144815
144825
  }
144816
144826
  unpipe(t2) {
144817
- let e = this[D2].find((i) => i.dest === t2);
144818
- e && (this[D2].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[D2] = []) : this[D2].splice(this[D2].indexOf(e), 1), e.unpipe());
144827
+ let e = this[N2].find((i) => i.dest === t2);
144828
+ e && (this[N2].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[N2] = []) : this[N2].splice(this[N2].indexOf(e), 1), e.unpipe());
144819
144829
  }
144820
144830
  addListener(t2, e) {
144821
144831
  return this.on(t2, e);
144822
144832
  }
144823
144833
  on(t2, e) {
144824
144834
  let i = super.on(t2, e);
144825
- if (t2 === "data") this[F2] = false, this[Rt]++, !this[D2].length && !this[g] && this[Bt]();
144835
+ if (t2 === "data") this[C2] = false, this[Rt]++, !this[N2].length && !this[g] && this[Bt]();
144826
144836
  else if (t2 === "readable" && this[_] !== 0) super.emit("readable");
144827
- else if (Gr(t2) && this[rt]) super.emit(t2), this.removeAllListeners(t2);
144837
+ else if (Kr(t2) && this[nt]) super.emit(t2), this.removeAllListeners(t2);
144828
144838
  else if (t2 === "error" && this[qt]) {
144829
144839
  let r = e;
144830
144840
  this[Z2] ? jt(() => r.call(this, this[qt])) : r.call(this, this[qt]);
@@ -144836,58 +144846,58 @@ var A = class extends import_node_events3.EventEmitter {
144836
144846
  }
144837
144847
  off(t2, e) {
144838
144848
  let i = super.off(t2, e);
144839
- return t2 === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[F2] && !this[D2].length && (this[g] = false)), i;
144849
+ return t2 === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[C2] && !this[N2].length && (this[g] = false)), i;
144840
144850
  }
144841
144851
  removeAllListeners(t2) {
144842
144852
  let e = super.removeAllListeners(t2);
144843
- return (t2 === "data" || t2 === void 0) && (this[Rt] = 0, !this[F2] && !this[D2].length && (this[g] = false)), e;
144853
+ return (t2 === "data" || t2 === void 0) && (this[Rt] = 0, !this[C2] && !this[N2].length && (this[g] = false)), e;
144844
144854
  }
144845
144855
  get emittedEnd() {
144846
- return this[rt];
144856
+ return this[nt];
144847
144857
  }
144848
- [Q2]() {
144849
- !this[Le] && !this[rt] && !this[w] && this[b].length === 0 && this[q] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
144858
+ [J2]() {
144859
+ !this[De] && !this[nt] && !this[w] && this[b].length === 0 && this[Q2] && (this[De] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[De] = false);
144850
144860
  }
144851
144861
  emit(t2, ...e) {
144852
144862
  let i = e[0];
144853
144863
  if (t2 !== "error" && t2 !== "close" && t2 !== w && this[w]) return false;
144854
- if (t2 === "data") return !this[L2] && !i ? false : this[Z2] ? (jt(() => this[_i](i)), true) : this[_i](i);
144855
- if (t2 === "end") return this[Ds]();
144864
+ if (t2 === "data") return !this[L2] && !i ? false : this[Z2] ? (jt(() => this[Oi](i)), true) : this[Oi](i);
144865
+ if (t2 === "end") return this[Is]();
144856
144866
  if (t2 === "close") {
144857
- if (this[Ne] = true, !this[rt] && !this[w]) return false;
144867
+ if (this[Ne] = true, !this[nt] && !this[w]) return false;
144858
144868
  let n = super.emit("close");
144859
144869
  return this.removeAllListeners("close"), n;
144860
144870
  } else if (t2 === "error") {
144861
- this[qt] = i, super.emit(bi, i);
144871
+ this[qt] = i, super.emit(_i, i);
144862
144872
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
144863
- return this[Q2](), n;
144873
+ return this[J2](), n;
144864
144874
  } else if (t2 === "resume") {
144865
144875
  let n = super.emit("resume");
144866
- return this[Q2](), n;
144876
+ return this[J2](), n;
144867
144877
  } else if (t2 === "finish" || t2 === "prefinish") {
144868
144878
  let n = super.emit(t2);
144869
144879
  return this.removeAllListeners(t2), n;
144870
144880
  }
144871
144881
  let r = super.emit(t2, ...e);
144872
- return this[Q2](), r;
144882
+ return this[J2](), r;
144873
144883
  }
144874
- [_i](t2) {
144875
- for (let i of this[D2]) i.dest.write(t2) === false && this.pause();
144876
- let e = this[F2] ? false : super.emit("data", t2);
144877
- return this[Q2](), e;
144884
+ [Oi](t2) {
144885
+ for (let i of this[N2]) i.dest.write(t2) === false && this.pause();
144886
+ let e = this[C2] ? false : super.emit("data", t2);
144887
+ return this[J2](), e;
144878
144888
  }
144879
- [Ds]() {
144880
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z2] ? (jt(() => this[Oi]()), true) : this[Oi]());
144889
+ [Is]() {
144890
+ return this[nt] ? false : (this[nt] = true, this.readable = false, this[Z2] ? (jt(() => this[Ti]()), true) : this[Ti]());
144881
144891
  }
144882
- [Oi]() {
144892
+ [Ti]() {
144883
144893
  if (this[Mt]) {
144884
144894
  let e = this[Mt].end();
144885
144895
  if (e) {
144886
- for (let i of this[D2]) i.dest.write(e);
144887
- this[F2] || super.emit("data", e);
144896
+ for (let i of this[N2]) i.dest.write(e);
144897
+ this[C2] || super.emit("data", e);
144888
144898
  }
144889
144899
  }
144890
- for (let e of this[D2]) e.end();
144900
+ for (let e of this[N2]) e.end();
144891
144901
  let t2 = super.emit("end");
144892
144902
  return this.removeAllListeners("end"), t2;
144893
144903
  }
@@ -144910,22 +144920,22 @@ var A = class extends import_node_events3.EventEmitter {
144910
144920
  });
144911
144921
  }
144912
144922
  [Symbol.asyncIterator]() {
144913
- this[F2] = false;
144923
+ this[C2] = false;
144914
144924
  let t2 = false, e = async () => (this.pause(), t2 = true, { value: void 0, done: true });
144915
144925
  return { next: () => {
144916
144926
  if (t2) return e();
144917
144927
  let r = this.read();
144918
144928
  if (r !== null) return Promise.resolve({ done: false, value: r });
144919
- if (this[q]) return e();
144920
- let n, o, a = (d) => {
144921
- this.off("data", h), this.off("end", l), this.off(w, c), e(), o(d);
144922
- }, h = (d) => {
144923
- this.off("error", a), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[q] });
144929
+ if (this[Q2]) return e();
144930
+ let n, o, h = (d) => {
144931
+ this.off("data", a), this.off("end", l), this.off(w, c), e(), o(d);
144932
+ }, a = (d) => {
144933
+ this.off("error", h), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[Q2] });
144924
144934
  }, l = () => {
144925
- this.off("error", a), this.off("data", h), this.off(w, c), e(), n({ done: true, value: void 0 });
144926
- }, c = () => a(new Error("stream destroyed"));
144935
+ this.off("error", h), this.off("data", a), this.off(w, c), e(), n({ done: true, value: void 0 });
144936
+ }, c = () => h(new Error("stream destroyed"));
144927
144937
  return new Promise((d, S2) => {
144928
- o = S2, n = d, this.once(w, c), this.once("error", a), this.once("end", l), this.once("data", h);
144938
+ o = S2, n = d, this.once(w, c), this.once("error", h), this.once("end", l), this.once("data", a);
144929
144939
  });
144930
144940
  }, throw: e, return: e, [Symbol.asyncIterator]() {
144931
144941
  return this;
@@ -144933,71 +144943,71 @@ var A = class extends import_node_events3.EventEmitter {
144933
144943
  } };
144934
144944
  }
144935
144945
  [Symbol.iterator]() {
144936
- this[F2] = false;
144937
- let t2 = false, e = () => (this.pause(), this.off(bi, e), this.off(w, e), this.off("end", e), t2 = true, { done: true, value: void 0 }), i = () => {
144946
+ this[C2] = false;
144947
+ let t2 = false, e = () => (this.pause(), this.off(_i, e), this.off(w, e), this.off("end", e), t2 = true, { done: true, value: void 0 }), i = () => {
144938
144948
  if (t2) return e();
144939
144949
  let r = this.read();
144940
144950
  return r === null ? e() : { done: false, value: r };
144941
144951
  };
144942
- return this.once("end", e), this.once(bi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
144952
+ return this.once("end", e), this.once(_i, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
144943
144953
  return this;
144944
144954
  }, [Symbol.dispose]: () => {
144945
144955
  } };
144946
144956
  }
144947
144957
  destroy(t2) {
144948
144958
  if (this[w]) return t2 ? this.emit("error", t2) : this.emit(w), this;
144949
- this[w] = true, this[F2] = true, this[b].length = 0, this[_] = 0;
144959
+ this[w] = true, this[C2] = true, this[b].length = 0, this[_] = 0;
144950
144960
  let e = this;
144951
144961
  return typeof e.close == "function" && !this[Ne] && e.close(), t2 ? this.emit("error", t2) : this.emit(w), this;
144952
144962
  }
144953
144963
  static get isStream() {
144954
- return zr;
144964
+ return Wr;
144955
144965
  }
144956
144966
  };
144957
- var Xr = import_fs24.default.writev;
144958
- var ot = /* @__PURE__ */ Symbol("_autoClose");
144967
+ var Jr = import_fs24.default.writev;
144968
+ var ht = /* @__PURE__ */ Symbol("_autoClose");
144959
144969
  var H = /* @__PURE__ */ Symbol("_close");
144960
144970
  var te = /* @__PURE__ */ Symbol("_ended");
144961
- var m = /* @__PURE__ */ Symbol("_fd");
144971
+ var u2 = /* @__PURE__ */ Symbol("_fd");
144962
144972
  var Ni = /* @__PURE__ */ Symbol("_finished");
144963
- var j = /* @__PURE__ */ Symbol("_flags");
144964
- var Di = /* @__PURE__ */ Symbol("_flush");
144965
- var Ci = /* @__PURE__ */ Symbol("_handleChunk");
144966
- var ki = /* @__PURE__ */ Symbol("_makeBuf");
144973
+ var tt = /* @__PURE__ */ Symbol("_flags");
144974
+ var Ai = /* @__PURE__ */ Symbol("_flush");
144975
+ var ki = /* @__PURE__ */ Symbol("_handleChunk");
144976
+ var vi = /* @__PURE__ */ Symbol("_makeBuf");
144967
144977
  var ie = /* @__PURE__ */ Symbol("_mode");
144968
- var Ce = /* @__PURE__ */ Symbol("_needDrain");
144978
+ var ke = /* @__PURE__ */ Symbol("_needDrain");
144969
144979
  var Ut = /* @__PURE__ */ Symbol("_onerror");
144970
144980
  var Ht = /* @__PURE__ */ Symbol("_onopen");
144971
- var Ai = /* @__PURE__ */ Symbol("_onread");
144981
+ var Ii = /* @__PURE__ */ Symbol("_onread");
144972
144982
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
144973
- var ht = /* @__PURE__ */ Symbol("_open");
144983
+ var at = /* @__PURE__ */ Symbol("_open");
144974
144984
  var U2 = /* @__PURE__ */ Symbol("_path");
144975
- var nt = /* @__PURE__ */ Symbol("_pos");
144985
+ var ot = /* @__PURE__ */ Symbol("_pos");
144976
144986
  var Y2 = /* @__PURE__ */ Symbol("_queue");
144977
144987
  var zt = /* @__PURE__ */ Symbol("_read");
144978
- var Ii = /* @__PURE__ */ Symbol("_readSize");
144979
- var J2 = /* @__PURE__ */ Symbol("_reading");
144988
+ var Ci = /* @__PURE__ */ Symbol("_readSize");
144989
+ var j = /* @__PURE__ */ Symbol("_reading");
144980
144990
  var ee = /* @__PURE__ */ Symbol("_remain");
144981
144991
  var Fi = /* @__PURE__ */ Symbol("_size");
144982
- var ke = /* @__PURE__ */ Symbol("_write");
144992
+ var ve = /* @__PURE__ */ Symbol("_write");
144983
144993
  var gt = /* @__PURE__ */ Symbol("_writing");
144984
- var ve = /* @__PURE__ */ Symbol("_defaultFlag");
144994
+ var Me = /* @__PURE__ */ Symbol("_defaultFlag");
144985
144995
  var bt = /* @__PURE__ */ Symbol("_errored");
144986
144996
  var _t = class extends A {
144987
144997
  [bt] = false;
144988
- [m];
144998
+ [u2];
144989
144999
  [U2];
144990
- [Ii];
144991
- [J2] = false;
145000
+ [Ci];
145001
+ [j] = false;
144992
145002
  [Fi];
144993
145003
  [ee];
144994
- [ot];
145004
+ [ht];
144995
145005
  constructor(t2, e) {
144996
145006
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t2 != "string") throw new TypeError("path must be a string");
144997
- this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U2] = t2, this[Ii] = e.readSize || 16 * 1024 * 1024, this[J2] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
145007
+ this[bt] = false, this[u2] = typeof e.fd == "number" ? e.fd : void 0, this[U2] = t2, this[Ci] = e.readSize || 16 * 1024 * 1024, this[j] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[u2] == "number" ? this[zt]() : this[at]();
144998
145008
  }
144999
145009
  get fd() {
145000
- return this[m];
145010
+ return this[u2];
145001
145011
  }
145002
145012
  get path() {
145003
145013
  return this[U2];
@@ -145008,36 +145018,36 @@ var _t = class extends A {
145008
145018
  end() {
145009
145019
  throw new TypeError("this is a readable stream");
145010
145020
  }
145011
- [ht]() {
145021
+ [at]() {
145012
145022
  import_fs24.default.open(this[U2], "r", (t2, e) => this[Ht](t2, e));
145013
145023
  }
145014
145024
  [Ht](t2, e) {
145015
- t2 ? this[Ut](t2) : (this[m] = e, this.emit("open", e), this[zt]());
145025
+ t2 ? this[Ut](t2) : (this[u2] = e, this.emit("open", e), this[zt]());
145016
145026
  }
145017
- [ki]() {
145018
- return Buffer.allocUnsafe(Math.min(this[Ii], this[ee]));
145027
+ [vi]() {
145028
+ return Buffer.allocUnsafe(Math.min(this[Ci], this[ee]));
145019
145029
  }
145020
145030
  [zt]() {
145021
- if (!this[J2]) {
145022
- this[J2] = true;
145023
- let t2 = this[ki]();
145024
- if (t2.length === 0) return process.nextTick(() => this[Ai](null, 0, t2));
145025
- import_fs24.default.read(this[m], t2, 0, t2.length, null, (e, i, r) => this[Ai](e, i, r));
145031
+ if (!this[j]) {
145032
+ this[j] = true;
145033
+ let t2 = this[vi]();
145034
+ if (t2.length === 0) return process.nextTick(() => this[Ii](null, 0, t2));
145035
+ import_fs24.default.read(this[u2], t2, 0, t2.length, null, (e, i, r) => this[Ii](e, i, r));
145026
145036
  }
145027
145037
  }
145028
- [Ai](t2, e, i) {
145029
- this[J2] = false, t2 ? this[Ut](t2) : this[Ci](e, i) && this[zt]();
145038
+ [Ii](t2, e, i) {
145039
+ this[j] = false, t2 ? this[Ut](t2) : this[ki](e, i) && this[zt]();
145030
145040
  }
145031
145041
  [H]() {
145032
- if (this[ot] && typeof this[m] == "number") {
145033
- let t2 = this[m];
145034
- this[m] = void 0, import_fs24.default.close(t2, (e) => e ? this.emit("error", e) : this.emit("close"));
145042
+ if (this[ht] && typeof this[u2] == "number") {
145043
+ let t2 = this[u2];
145044
+ this[u2] = void 0, import_fs24.default.close(t2, (e) => e ? this.emit("error", e) : this.emit("close"));
145035
145045
  }
145036
145046
  }
145037
145047
  [Ut](t2) {
145038
- this[J2] = true, this[H](), this.emit("error", t2);
145048
+ this[j] = true, this[H](), this.emit("error", t2);
145039
145049
  }
145040
- [Ci](t2, e) {
145050
+ [ki](t2, e) {
145041
145051
  let i = false;
145042
145052
  return this[ee] -= t2, t2 > 0 && (i = super.write(t2 < e.length ? e.subarray(0, t2) : e)), (t2 === 0 || this[ee] <= 0) && (i = false, this[H](), super.end()), i;
145043
145053
  }
@@ -145047,7 +145057,7 @@ var _t = class extends A {
145047
145057
  case "finish":
145048
145058
  return false;
145049
145059
  case "drain":
145050
- return typeof this[m] == "number" && this[zt](), false;
145060
+ return typeof this[u2] == "number" && this[zt](), false;
145051
145061
  case "error":
145052
145062
  return this[bt] ? false : (this[bt] = true, super.emit(t2, ...e));
145053
145063
  default:
@@ -145055,8 +145065,8 @@ var _t = class extends A {
145055
145065
  }
145056
145066
  }
145057
145067
  };
145058
- var Me = class extends _t {
145059
- [ht]() {
145068
+ var Be = class extends _t {
145069
+ [at]() {
145060
145070
  let t2 = true;
145061
145071
  try {
145062
145072
  this[Ht](null, import_fs24.default.openSync(this[U2], "r")), t2 = false;
@@ -145067,13 +145077,13 @@ var Me = class extends _t {
145067
145077
  [zt]() {
145068
145078
  let t2 = true;
145069
145079
  try {
145070
- if (!this[J2]) {
145071
- this[J2] = true;
145080
+ if (!this[j]) {
145081
+ this[j] = true;
145072
145082
  do {
145073
- let e = this[ki](), i = e.length === 0 ? 0 : import_fs24.default.readSync(this[m], e, 0, e.length, null);
145074
- if (!this[Ci](i, e)) break;
145083
+ let e = this[vi](), i = e.length === 0 ? 0 : import_fs24.default.readSync(this[u2], e, 0, e.length, null);
145084
+ if (!this[ki](i, e)) break;
145075
145085
  } while (true);
145076
- this[J2] = false;
145086
+ this[j] = false;
145077
145087
  }
145078
145088
  t2 = false;
145079
145089
  } finally {
@@ -145081,32 +145091,32 @@ var Me = class extends _t {
145081
145091
  }
145082
145092
  }
145083
145093
  [H]() {
145084
- if (this[ot] && typeof this[m] == "number") {
145085
- let t2 = this[m];
145086
- this[m] = void 0, import_fs24.default.closeSync(t2), this.emit("close");
145094
+ if (this[ht] && typeof this[u2] == "number") {
145095
+ let t2 = this[u2];
145096
+ this[u2] = void 0, import_fs24.default.closeSync(t2), this.emit("close");
145087
145097
  }
145088
145098
  }
145089
145099
  };
145090
- var tt = class extends import_events4.default {
145100
+ var et = class extends import_events4.default {
145091
145101
  readable = false;
145092
145102
  writable = true;
145093
145103
  [bt] = false;
145094
145104
  [gt] = false;
145095
145105
  [te] = false;
145096
145106
  [Y2] = [];
145097
- [Ce] = false;
145107
+ [ke] = false;
145098
145108
  [U2];
145099
145109
  [ie];
145100
- [ot];
145101
- [m];
145102
- [ve];
145103
- [j];
145110
+ [ht];
145111
+ [u2];
145112
+ [Me];
145113
+ [tt];
145104
145114
  [Ni] = false;
145105
- [nt];
145115
+ [ot];
145106
145116
  constructor(t2, e) {
145107
- e = e || {}, super(e), this[U2] = t2, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = e.mode === void 0 ? 438 : e.mode, this[nt] = typeof e.start == "number" ? e.start : void 0, this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true;
145108
- let i = this[nt] !== void 0 ? "r+" : "w";
145109
- this[ve] = e.flags === void 0, this[j] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
145117
+ e = e || {}, super(e), this[U2] = t2, this[u2] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = e.mode === void 0 ? 438 : e.mode, this[ot] = typeof e.start == "number" ? e.start : void 0, this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true;
145118
+ let i = this[ot] !== void 0 ? "r+" : "w";
145119
+ this[Me] = e.flags === void 0, this[tt] = e.flags === void 0 ? i : e.flags, this[u2] === void 0 && this[at]();
145110
145120
  }
145111
145121
  emit(t2, ...e) {
145112
145122
  if (t2 === "error") {
@@ -145116,7 +145126,7 @@ var tt = class extends import_events4.default {
145116
145126
  return super.emit(t2, ...e);
145117
145127
  }
145118
145128
  get fd() {
145119
- return this[m];
145129
+ return this[u2];
145120
145130
  }
145121
145131
  get path() {
145122
145132
  return this[U2];
@@ -145124,61 +145134,61 @@ var tt = class extends import_events4.default {
145124
145134
  [Ut](t2) {
145125
145135
  this[H](), this[gt] = true, this.emit("error", t2);
145126
145136
  }
145127
- [ht]() {
145128
- import_fs24.default.open(this[U2], this[j], this[ie], (t2, e) => this[Ht](t2, e));
145137
+ [at]() {
145138
+ import_fs24.default.open(this[U2], this[tt], this[ie], (t2, e) => this[Ht](t2, e));
145129
145139
  }
145130
145140
  [Ht](t2, e) {
145131
- this[ve] && this[j] === "r+" && t2 && t2.code === "ENOENT" ? (this[j] = "w", this[ht]()) : t2 ? this[Ut](t2) : (this[m] = e, this.emit("open", e), this[gt] || this[Di]());
145141
+ this[Me] && this[tt] === "r+" && t2 && t2.code === "ENOENT" ? (this[tt] = "w", this[at]()) : t2 ? this[Ut](t2) : (this[u2] = e, this.emit("open", e), this[gt] || this[Ai]());
145132
145142
  }
145133
145143
  end(t2, e) {
145134
- return t2 && this.write(t2, e), this[te] = true, !this[gt] && !this[Y2].length && typeof this[m] == "number" && this[Pt](null, 0), this;
145144
+ return t2 && this.write(t2, e), this[te] = true, !this[gt] && !this[Y2].length && typeof this[u2] == "number" && this[Pt](null, 0), this;
145135
145145
  }
145136
145146
  write(t2, e) {
145137
- return typeof t2 == "string" && (t2 = Buffer.from(t2, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[gt] || this[Y2].length ? (this[Y2].push(t2), this[Ce] = true, false) : (this[gt] = true, this[ke](t2), true);
145147
+ return typeof t2 == "string" && (t2 = Buffer.from(t2, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[u2] === void 0 || this[gt] || this[Y2].length ? (this[Y2].push(t2), this[ke] = true, false) : (this[gt] = true, this[ve](t2), true);
145138
145148
  }
145139
- [ke](t2) {
145140
- import_fs24.default.write(this[m], t2, 0, t2.length, this[nt], (e, i) => this[Pt](e, i));
145149
+ [ve](t2) {
145150
+ import_fs24.default.write(this[u2], t2, 0, t2.length, this[ot], (e, i) => this[Pt](e, i));
145141
145151
  }
145142
145152
  [Pt](t2, e) {
145143
- t2 ? this[Ut](t2) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y2].length ? this[Di]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[Ce] && (this[Ce] = false, this.emit("drain"))));
145153
+ t2 ? this[Ut](t2) : (this[ot] !== void 0 && typeof e == "number" && (this[ot] += e), this[Y2].length ? this[Ai]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
145144
145154
  }
145145
- [Di]() {
145155
+ [Ai]() {
145146
145156
  if (this[Y2].length === 0) this[te] && this[Pt](null, 0);
145147
- else if (this[Y2].length === 1) this[ke](this[Y2].pop());
145157
+ else if (this[Y2].length === 1) this[ve](this[Y2].pop());
145148
145158
  else {
145149
145159
  let t2 = this[Y2];
145150
- this[Y2] = [], Xr(this[m], t2, this[nt], (e, i) => this[Pt](e, i));
145160
+ this[Y2] = [], Jr(this[u2], t2, this[ot], (e, i) => this[Pt](e, i));
145151
145161
  }
145152
145162
  }
145153
145163
  [H]() {
145154
- if (this[ot] && typeof this[m] == "number") {
145155
- let t2 = this[m];
145156
- this[m] = void 0, import_fs24.default.close(t2, (e) => e ? this.emit("error", e) : this.emit("close"));
145164
+ if (this[ht] && typeof this[u2] == "number") {
145165
+ let t2 = this[u2];
145166
+ this[u2] = void 0, import_fs24.default.close(t2, (e) => e ? this.emit("error", e) : this.emit("close"));
145157
145167
  }
145158
145168
  }
145159
145169
  };
145160
- var Wt = class extends tt {
145161
- [ht]() {
145170
+ var Wt = class extends et {
145171
+ [at]() {
145162
145172
  let t2;
145163
- if (this[ve] && this[j] === "r+") try {
145164
- t2 = import_fs24.default.openSync(this[U2], this[j], this[ie]);
145173
+ if (this[Me] && this[tt] === "r+") try {
145174
+ t2 = import_fs24.default.openSync(this[U2], this[tt], this[ie]);
145165
145175
  } catch (e) {
145166
- if (e?.code === "ENOENT") return this[j] = "w", this[ht]();
145176
+ if (e?.code === "ENOENT") return this[tt] = "w", this[at]();
145167
145177
  throw e;
145168
145178
  }
145169
- else t2 = import_fs24.default.openSync(this[U2], this[j], this[ie]);
145179
+ else t2 = import_fs24.default.openSync(this[U2], this[tt], this[ie]);
145170
145180
  this[Ht](null, t2);
145171
145181
  }
145172
145182
  [H]() {
145173
- if (this[ot] && typeof this[m] == "number") {
145174
- let t2 = this[m];
145175
- this[m] = void 0, import_fs24.default.closeSync(t2), this.emit("close");
145183
+ if (this[ht] && typeof this[u2] == "number") {
145184
+ let t2 = this[u2];
145185
+ this[u2] = void 0, import_fs24.default.closeSync(t2), this.emit("close");
145176
145186
  }
145177
145187
  }
145178
- [ke](t2) {
145188
+ [ve](t2) {
145179
145189
  let e = true;
145180
145190
  try {
145181
- this[Pt](null, import_fs24.default.writeSync(this[m], t2, 0, t2.length, this[nt])), e = false;
145191
+ this[Pt](null, import_fs24.default.writeSync(this[u2], t2, 0, t2.length, this[ot])), e = false;
145182
145192
  } finally {
145183
145193
  if (e) try {
145184
145194
  this[H]();
@@ -145187,50 +145197,50 @@ var Wt = class extends tt {
145187
145197
  }
145188
145198
  }
145189
145199
  };
145190
- var qr = /* @__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"]]);
145191
- var Is = (s3) => !!s3.sync && !!s3.file;
145192
- var Fs = (s3) => !s3.sync && !!s3.file;
145193
- var Cs = (s3) => !!s3.sync && !s3.file;
145194
- var ks = (s3) => !s3.sync && !s3.file;
145195
- var vs = (s3) => !!s3.file;
145196
- var Qr = (s3) => {
145197
- let t2 = qr.get(s3);
145200
+ 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"]]);
145201
+ var Fs = (s3) => !!s3.sync && !!s3.file;
145202
+ var ks = (s3) => !s3.sync && !!s3.file;
145203
+ var vs = (s3) => !!s3.sync && !s3.file;
145204
+ var Ms = (s3) => !s3.sync && !s3.file;
145205
+ var Bs = (s3) => !!s3.file;
145206
+ var tn = (s3) => {
145207
+ let t2 = jr.get(s3);
145198
145208
  return t2 || s3;
145199
145209
  };
145200
145210
  var se = (s3 = {}) => {
145201
145211
  if (!s3) return {};
145202
145212
  let t2 = {};
145203
145213
  for (let [e, i] of Object.entries(s3)) {
145204
- let r = Qr(e);
145214
+ let r = tn(e);
145205
145215
  t2[r] = i;
145206
145216
  }
145207
145217
  return t2.chmod === void 0 && t2.noChmod === false && (t2.chmod = true), delete t2.noChmod, t2;
145208
145218
  };
145209
- var K2 = (s3, t2, e, i, r) => Object.assign((n = [], o, a) => {
145210
- Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (a = o, o = void 0), o = o ? Array.from(o) : [];
145211
- let h = se(n);
145212
- if (r?.(h, o), Is(h)) {
145213
- if (typeof a == "function") throw new TypeError("callback not supported for sync tar functions");
145214
- return s3(h, o);
145215
- } else if (Fs(h)) {
145216
- let l = t2(h, o);
145217
- return a ? l.then(() => a(), a) : l;
145218
- } else if (Cs(h)) {
145219
- if (typeof a == "function") throw new TypeError("callback not supported for sync tar functions");
145220
- return e(h, o);
145221
- } else if (ks(h)) {
145222
- if (typeof a == "function") throw new TypeError("callback only supported with file option");
145223
- return i(h, o);
145219
+ var K2 = (s3, t2, e, i, r) => Object.assign((n = [], o, h) => {
145220
+ Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
145221
+ let a = se(n);
145222
+ if (r?.(a, o), Fs(a)) {
145223
+ if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
145224
+ return s3(a, o);
145225
+ } else if (ks(a)) {
145226
+ let l = t2(a, o);
145227
+ return h ? l.then(() => h(), h) : l;
145228
+ } else if (vs(a)) {
145229
+ if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
145230
+ return e(a, o);
145231
+ } else if (Ms(a)) {
145232
+ if (typeof h == "function") throw new TypeError("callback only supported with file option");
145233
+ return i(a, o);
145224
145234
  }
145225
145235
  throw new Error("impossible options??");
145226
145236
  }, { syncFile: s3, asyncFile: t2, syncNoFile: e, asyncNoFile: i, validate: r });
145227
- var jr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
145228
- 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));
145229
- var tn = import_buffer.Buffer.concat;
145230
- var Bs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
145231
- var en = (s3) => s3;
145232
- var Mi = Bs?.writable === true || Bs?.set !== void 0 ? (s3) => {
145233
- import_buffer.Buffer.concat = s3 ? en : tn;
145237
+ var sn = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
145238
+ 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));
145239
+ var rn = import_buffer.Buffer.concat;
145240
+ var zs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
145241
+ var nn = (s3) => s3;
145242
+ var Bi = zs?.writable === true || zs?.set !== void 0 ? (s3) => {
145243
+ import_buffer.Buffer.concat = s3 ? nn : rn;
145234
145244
  } : (s3) => {
145235
145245
  };
145236
145246
  var Tt = /* @__PURE__ */ Symbol("_superWrite");
@@ -145244,7 +145254,7 @@ var Gt = class extends Error {
145244
145254
  return "ZlibError";
145245
145255
  }
145246
145256
  };
145247
- var Bi = /* @__PURE__ */ Symbol("flushFlag");
145257
+ var Pi = /* @__PURE__ */ Symbol("flushFlag");
145248
145258
  var re = class extends A {
145249
145259
  #t = false;
145250
145260
  #i = false;
@@ -145264,9 +145274,9 @@ var re = class extends A {
145264
145274
  }
145265
145275
  constructor(t2, e) {
145266
145276
  if (!t2 || typeof t2 != "object") throw new TypeError("invalid options for ZlibBase constructor");
145267
- if (super(t2), this.#s = t2.flush ?? 0, this.#n = t2.finishFlush ?? 0, this.#r = t2.fullFlushFlag ?? 0, typeof Ms[e] != "function") throw new TypeError("Compression method not supported: " + e);
145277
+ if (super(t2), this.#s = t2.flush ?? 0, this.#n = t2.finishFlush ?? 0, this.#r = t2.fullFlushFlag ?? 0, typeof Ps[e] != "function") throw new TypeError("Compression method not supported: " + e);
145268
145278
  try {
145269
- this.#e = new Ms[e](t2);
145279
+ this.#e = new Ps[e](t2);
145270
145280
  } catch (i) {
145271
145281
  throw new Gt(i, this.constructor);
145272
145282
  }
@@ -145281,7 +145291,7 @@ var re = class extends A {
145281
145291
  if (!this.#t) return (0, import_assert.default)(this.#e, "zlib binding closed"), this.#e.reset?.();
145282
145292
  }
145283
145293
  flush(t2) {
145284
- this.ended || (typeof t2 != "number" && (t2 = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [Bi]: t2 })));
145294
+ this.ended || (typeof t2 != "number" && (t2 = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [Pi]: t2 })));
145285
145295
  }
145286
145296
  end(t2, e, i) {
145287
145297
  return typeof t2 == "function" && (i = t2, e = void 0, t2 = void 0), typeof e == "function" && (i = e, e = void 0), t2 && (e ? this.write(t2, e) : this.write(t2)), this.flush(this.#n), this.#i = true, super.end(i);
@@ -145300,27 +145310,27 @@ var re = class extends A {
145300
145310
  };
145301
145311
  let o = this.#e.close;
145302
145312
  this.#e.close = () => {
145303
- }, Mi(true);
145304
- let a;
145313
+ }, Bi(true);
145314
+ let h;
145305
145315
  try {
145306
- let l = typeof t2[Bi] == "number" ? t2[Bi] : this.#s;
145307
- a = this.#e._processChunk(t2, l), Mi(false);
145316
+ let l = typeof t2[Pi] == "number" ? t2[Pi] : this.#s;
145317
+ h = this.#e._processChunk(t2, l), Bi(false);
145308
145318
  } catch (l) {
145309
- Mi(false), this.#o(new Gt(l, this.write));
145319
+ Bi(false), this.#o(new Gt(l, this.write));
145310
145320
  } finally {
145311
145321
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
145312
145322
  }
145313
145323
  this.#e && this.#e.on("error", (l) => this.#o(new Gt(l, this.write)));
145314
- let h;
145315
- if (a) if (Array.isArray(a) && a.length > 0) {
145316
- let l = a[0];
145317
- h = this[Tt](import_buffer.Buffer.from(l));
145318
- for (let c = 1; c < a.length; c++) h = this[Tt](a[c]);
145319
- } else h = this[Tt](import_buffer.Buffer.from(a));
145320
- return i && i(), h;
145324
+ let a;
145325
+ if (h) if (Array.isArray(h) && h.length > 0) {
145326
+ let l = h[0];
145327
+ a = this[Tt](import_buffer.Buffer.from(l));
145328
+ for (let c = 1; c < h.length; c++) a = this[Tt](h[c]);
145329
+ } else a = this[Tt](import_buffer.Buffer.from(h));
145330
+ return i && i(), a;
145321
145331
  }
145322
145332
  };
145323
- var Be = class extends re {
145333
+ var Pe = class extends re {
145324
145334
  #t;
145325
145335
  #i;
145326
145336
  constructor(t2, e) {
@@ -145346,7 +145356,7 @@ var Be = class extends re {
145346
145356
  }
145347
145357
  }
145348
145358
  };
145349
- var Pe = class extends Be {
145359
+ var ze = class extends Pe {
145350
145360
  #t;
145351
145361
  constructor(t2) {
145352
145362
  super(t2, "Gzip"), this.#t = t2 && !!t2.portable;
@@ -145355,89 +145365,90 @@ var Pe = class extends Be {
145355
145365
  return this.#t ? (this.#t = false, t2[9] = 255, super[Tt](t2)) : super[Tt](t2);
145356
145366
  }
145357
145367
  };
145358
- var ze = class extends Be {
145368
+ var Ue = class extends Pe {
145359
145369
  constructor(t2) {
145360
145370
  super(t2, "Unzip");
145361
145371
  }
145362
145372
  };
145363
- var Ue = class extends re {
145373
+ var He = class extends re {
145364
145374
  constructor(t2, e) {
145365
145375
  t2 = t2 || {}, t2.flush = t2.flush || M2.BROTLI_OPERATION_PROCESS, t2.finishFlush = t2.finishFlush || M2.BROTLI_OPERATION_FINISH, t2.fullFlushFlag = M2.BROTLI_OPERATION_FLUSH, super(t2, e);
145366
145376
  }
145367
145377
  };
145368
- var He = class extends Ue {
145378
+ var We = class extends He {
145369
145379
  constructor(t2) {
145370
145380
  super(t2, "BrotliCompress");
145371
145381
  }
145372
145382
  };
145373
- var We = class extends Ue {
145383
+ var Ge = class extends He {
145374
145384
  constructor(t2) {
145375
145385
  super(t2, "BrotliDecompress");
145376
145386
  }
145377
145387
  };
145378
- var Ge = class extends re {
145388
+ var Ze = class extends re {
145379
145389
  constructor(t2, e) {
145380
145390
  t2 = t2 || {}, t2.flush = t2.flush || M2.ZSTD_e_continue, t2.finishFlush = t2.finishFlush || M2.ZSTD_e_end, t2.fullFlushFlag = M2.ZSTD_e_flush, super(t2, e);
145381
145391
  }
145382
145392
  };
145383
- var Ze = class extends Ge {
145393
+ var Ye = class extends Ze {
145384
145394
  constructor(t2) {
145385
145395
  super(t2, "ZstdCompress");
145386
145396
  }
145387
145397
  };
145388
- var Ye = class extends Ge {
145398
+ var Ke = class extends Ze {
145389
145399
  constructor(t2) {
145390
145400
  super(t2, "ZstdDecompress");
145391
145401
  }
145392
145402
  };
145393
- var Ps = (s3, t2) => {
145394
- if (Number.isSafeInteger(s3)) s3 < 0 ? nn(s3, t2) : rn(s3, t2);
145403
+ var Us = (s3, t2) => {
145404
+ if (Number.isSafeInteger(s3)) s3 < 0 ? an(s3, t2) : hn(s3, t2);
145395
145405
  else throw Error("cannot encode number outside of javascript safe integer range");
145396
145406
  return t2;
145397
145407
  };
145398
- var rn = (s3, t2) => {
145408
+ var hn = (s3, t2) => {
145399
145409
  t2[0] = 128;
145400
145410
  for (var e = t2.length; e > 1; e--) t2[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
145401
145411
  };
145402
- var nn = (s3, t2) => {
145412
+ var an = (s3, t2) => {
145403
145413
  t2[0] = 255;
145404
145414
  var e = false;
145405
145415
  s3 = s3 * -1;
145406
145416
  for (var i = t2.length; i > 1; i--) {
145407
145417
  var r = s3 & 255;
145408
- s3 = Math.floor(s3 / 256), e ? t2[i - 1] = Us(r) : r === 0 ? t2[i - 1] = 0 : (e = true, t2[i - 1] = Hs(r));
145418
+ s3 = Math.floor(s3 / 256), e ? t2[i - 1] = Ws(r) : r === 0 ? t2[i - 1] = 0 : (e = true, t2[i - 1] = Gs(r));
145409
145419
  }
145410
145420
  };
145411
- var zs = (s3) => {
145412
- let t2 = s3[0], e = t2 === 128 ? hn(s3.subarray(1, s3.length)) : t2 === 255 ? on(s3) : null;
145421
+ var Hs = (s3) => {
145422
+ let t2 = s3[0], e = t2 === 128 ? cn(s3.subarray(1, s3.length)) : t2 === 255 ? ln(s3) : null;
145413
145423
  if (e === null) throw Error("invalid base256 encoding");
145414
145424
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
145415
145425
  return e;
145416
145426
  };
145417
- var on = (s3) => {
145427
+ var ln = (s3) => {
145418
145428
  for (var t2 = s3.length, e = 0, i = false, r = t2 - 1; r > -1; r--) {
145419
145429
  var n = Number(s3[r]), o;
145420
- i ? o = Us(n) : n === 0 ? o = n : (i = true, o = Hs(n)), o !== 0 && (e -= o * Math.pow(256, t2 - r - 1));
145430
+ i ? o = Ws(n) : n === 0 ? o = n : (i = true, o = Gs(n)), o !== 0 && (e -= o * Math.pow(256, t2 - r - 1));
145421
145431
  }
145422
145432
  return e;
145423
145433
  };
145424
- var hn = (s3) => {
145434
+ var cn = (s3) => {
145425
145435
  for (var t2 = s3.length, e = 0, i = t2 - 1; i > -1; i--) {
145426
145436
  var r = Number(s3[i]);
145427
145437
  r !== 0 && (e += r * Math.pow(256, t2 - i - 1));
145428
145438
  }
145429
145439
  return e;
145430
145440
  };
145431
- var Us = (s3) => (255 ^ s3) & 255;
145432
- var Hs = (s3) => (255 ^ s3) + 1 & 255;
145433
- var Ui = {};
145434
- Br(Ui, { code: () => Ke, isCode: () => ne, isName: () => ln, name: () => oe, normalFsTypes: () => zi });
145441
+ var Ws = (s3) => (255 ^ s3) & 255;
145442
+ var Gs = (s3) => (255 ^ s3) + 1 & 255;
145443
+ var Hi = {};
145444
+ Ur(Hi, { code: () => Ve, isCode: () => ne, isName: () => dn, name: () => oe, normalFsTypes: () => Ui });
145435
145445
  var ne = (s3) => oe.has(s3);
145436
- var ln = (s3) => Ke.has(s3);
145437
- var zi = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
145446
+ var dn = (s3) => Ve.has(s3);
145447
+ var Ui = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
145438
145448
  var oe = /* @__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"]]);
145439
- var Ke = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
145440
- var C2 = class {
145449
+ var Ve = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
145450
+ var mn = (s3) => s3 === void 0 || s3 < 0 ? void 0 : s3;
145451
+ var F2 = class {
145441
145452
  cksumValid = false;
145442
145453
  needPax = false;
145443
145454
  nullBlock = false;
@@ -145464,13 +145475,13 @@ var C2 = class {
145464
145475
  }
145465
145476
  decode(t2, e, i, r) {
145466
145477
  if (e || (e = 0), !t2 || !(t2.length >= e + 512)) throw new Error("need 512 bytes for header");
145467
- let n = xt(t2, e + 156, 1), o = zi.has(n), a = o ? i : void 0, h = o ? r : void 0;
145468
- if (this.path = a?.path ?? xt(t2, e, 100), this.mode = a?.mode ?? h?.mode ?? at(t2, e + 100, 8), this.uid = a?.uid ?? h?.uid ?? at(t2, e + 108, 8), this.gid = a?.gid ?? h?.gid ?? at(t2, e + 116, 8), this.size = a?.size ?? h?.size ?? at(t2, e + 124, 12), this.mtime = a?.mtime ?? h?.mtime ?? Hi(t2, e + 136, 12), this.cksum = at(t2, e + 148, 12), h && this.#i(h, true), a && this.#i(a), ne(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t2, e + 157, 100), t2.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = a?.uname ?? h?.uname ?? xt(t2, e + 265, 32), this.gname = a?.gname ?? h?.gname ?? xt(t2, e + 297, 32), this.devmaj = a?.devmaj ?? h?.devmaj ?? at(t2, e + 329, 8) ?? 0, this.devmin = a?.devmin ?? h?.devmin ?? at(t2, e + 337, 8) ?? 0, t2[e + 475] !== 0) {
145478
+ let n = xt(t2, e + 156, 1), o = Ui.has(n), h = o ? i : void 0, a = o ? r : void 0;
145479
+ if (this.path = h?.path ?? xt(t2, e, 100), this.mode = h?.mode ?? a?.mode ?? lt(t2, e + 100, 8), this.uid = h?.uid ?? a?.uid ?? lt(t2, e + 108, 8), this.gid = h?.gid ?? a?.gid ?? lt(t2, e + 116, 8), this.size = mn(h?.size ?? a?.size ?? lt(t2, e + 124, 12)), this.mtime = h?.mtime ?? a?.mtime ?? Wi(t2, e + 136, 12), this.cksum = lt(t2, e + 148, 12), a && this.#i(a, true), h && this.#i(h), ne(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t2, e + 157, 100), t2.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = h?.uname ?? a?.uname ?? xt(t2, e + 265, 32), this.gname = h?.gname ?? a?.gname ?? xt(t2, e + 297, 32), this.devmaj = h?.devmaj ?? a?.devmaj ?? lt(t2, e + 329, 8) ?? 0, this.devmin = h?.devmin ?? a?.devmin ?? lt(t2, e + 337, 8) ?? 0, t2[e + 475] !== 0) {
145469
145480
  let c = xt(t2, e + 345, 155);
145470
145481
  this.path = c + "/" + this.path;
145471
145482
  } else {
145472
145483
  let c = xt(t2, e + 345, 130);
145473
- c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Hi(t2, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Hi(t2, e + 488, 12);
145484
+ c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Wi(t2, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Wi(t2, e + 488, 12);
145474
145485
  }
145475
145486
  let l = 256;
145476
145487
  for (let c = e; c < e + 148; c++) l += t2[c];
@@ -145478,16 +145489,16 @@ var C2 = class {
145478
145489
  this.cksumValid = l === this.cksum, this.cksum === void 0 && l === 256 && (this.nullBlock = true);
145479
145490
  }
145480
145491
  #i(t2, e = false) {
145481
- Object.assign(this, Object.fromEntries(Object.entries(t2).filter(([i, r]) => !(r == null || i === "path" && e || i === "linkpath" && e || i === "global"))));
145492
+ Object.assign(this, Object.fromEntries(Object.entries(t2).filter(([i, r]) => !(r == null || i === "size" && Number(r) < 0 || i === "path" && e || i === "linkpath" && e || i === "global"))));
145482
145493
  }
145483
145494
  encode(t2, e = 0) {
145484
145495
  if (t2 || (t2 = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t2.length >= e + 512)) throw new Error("need 512 bytes for header");
145485
- let i = this.ctime || this.atime ? 130 : 155, r = cn(this.path || "", i), n = r[0], o = r[1];
145486
- this.needPax = !!r[2], this.needPax = Lt(t2, e, 100, n) || this.needPax, this.needPax = lt(t2, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t2, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t2, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t2, e + 124, 12, this.size) || this.needPax, this.needPax = Wi(t2, e + 136, 12, this.mtime) || this.needPax, t2[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t2, e + 157, 100, this.linkpath) || this.needPax, t2.write("ustar\x0000", e + 257, 8), this.needPax = Lt(t2, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t2, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t2, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t2, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t2, e + 345, i, o) || this.needPax, t2[e + 475] !== 0 ? this.needPax = Lt(t2, e + 345, 155, o) || this.needPax : (this.needPax = Lt(t2, e + 345, 130, o) || this.needPax, this.needPax = Wi(t2, e + 476, 12, this.atime) || this.needPax, this.needPax = Wi(t2, e + 488, 12, this.ctime) || this.needPax);
145487
- let a = 256;
145488
- for (let h = e; h < e + 148; h++) a += t2[h];
145489
- for (let h = e + 156; h < e + 512; h++) a += t2[h];
145490
- return this.cksum = a, lt(t2, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
145496
+ let i = this.ctime || this.atime ? 130 : 155, r = un(this.path || "", i), n = r[0], o = r[1];
145497
+ this.needPax = !!r[2], this.needPax = Lt(t2, e, 100, n) || this.needPax, this.needPax = ct(t2, e + 100, 8, this.mode) || this.needPax, this.needPax = ct(t2, e + 108, 8, this.uid) || this.needPax, this.needPax = ct(t2, e + 116, 8, this.gid) || this.needPax, this.needPax = ct(t2, e + 124, 12, this.size) || this.needPax, this.needPax = Gi(t2, e + 136, 12, this.mtime) || this.needPax, t2[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t2, e + 157, 100, this.linkpath) || this.needPax, t2.write("ustar\x0000", e + 257, 8), this.needPax = Lt(t2, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t2, e + 297, 32, this.gname) || this.needPax, this.needPax = ct(t2, e + 329, 8, this.devmaj) || this.needPax, this.needPax = ct(t2, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t2, e + 345, i, o) || this.needPax, t2[e + 475] !== 0 ? this.needPax = Lt(t2, e + 345, 155, o) || this.needPax : (this.needPax = Lt(t2, e + 345, 130, o) || this.needPax, this.needPax = Gi(t2, e + 476, 12, this.atime) || this.needPax, this.needPax = Gi(t2, e + 488, 12, this.ctime) || this.needPax);
145498
+ let h = 256;
145499
+ for (let a = e; a < e + 148; a++) h += t2[a];
145500
+ for (let a = e + 156; a < e + 512; a++) h += t2[a];
145501
+ return this.cksum = h, ct(t2, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
145491
145502
  }
145492
145503
  get type() {
145493
145504
  return this.#t === "Unsupported" ? this.#t : oe.get(this.#t);
@@ -145496,13 +145507,13 @@ var C2 = class {
145496
145507
  return this.#t;
145497
145508
  }
145498
145509
  set type(t2) {
145499
- let e = String(Ke.get(t2));
145510
+ let e = String(Ve.get(t2));
145500
145511
  if (ne(e) || e === "Unsupported") this.#t = e;
145501
145512
  else if (ne(t2)) this.#t = t2;
145502
145513
  else throw new TypeError("invalid entry type: " + t2);
145503
145514
  }
145504
145515
  };
145505
- var cn = (s3, t2) => {
145516
+ var un = (s3, t2) => {
145506
145517
  let i = s3, r = "", n, o = import_node_path13.posix.parse(s3).root || ".";
145507
145518
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
145508
145519
  else {
@@ -145515,20 +145526,20 @@ var cn = (s3, t2) => {
145515
145526
  return n;
145516
145527
  };
145517
145528
  var xt = (s3, t2, e) => s3.subarray(t2, t2 + e).toString("utf8").replace(/\0.*/, "");
145518
- var Hi = (s3, t2, e) => fn(at(s3, t2, e));
145519
- var fn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
145520
- var at = (s3, t2, e) => Number(s3[t2]) & 128 ? zs(s3.subarray(t2, t2 + e)) : un(s3, t2, e);
145521
- var dn = (s3) => isNaN(s3) ? void 0 : s3;
145522
- var un = (s3, t2, e) => dn(parseInt(s3.subarray(t2, t2 + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
145523
- var mn = { 12: 8589934591, 8: 2097151 };
145524
- var lt = (s3, t2, e, i) => i === void 0 ? false : i > mn[e] || i < 0 ? (Ps(i, s3.subarray(t2, t2 + e)), true) : (pn(s3, t2, e, i), false);
145525
- var pn = (s3, t2, e, i) => s3.write(En(i, e), t2, e, "ascii");
145526
- var En = (s3, t2) => wn(Math.floor(s3).toString(8), t2);
145527
- var wn = (s3, t2) => (s3.length === t2 - 1 ? s3 : new Array(t2 - s3.length - 1).join("0") + s3 + " ") + "\0";
145528
- var Wi = (s3, t2, e, i) => i === void 0 ? false : lt(s3, t2, e, i.getTime() / 1e3);
145529
- var Sn = new Array(156).join("\0");
145530
- var Lt = (s3, t2, e, i) => i === void 0 ? false : (s3.write(i + Sn, t2, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
145531
- var ct = class s {
145529
+ var Wi = (s3, t2, e) => pn(lt(s3, t2, e));
145530
+ var pn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
145531
+ var lt = (s3, t2, e) => Number(s3[t2]) & 128 ? Hs(s3.subarray(t2, t2 + e)) : wn(s3, t2, e);
145532
+ var En = (s3) => isNaN(s3) ? void 0 : s3;
145533
+ var wn = (s3, t2, e) => En(parseInt(s3.subarray(t2, t2 + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
145534
+ var Sn = { 12: 8589934591, 8: 2097151 };
145535
+ var ct = (s3, t2, e, i) => i === void 0 ? false : i > Sn[e] || i < 0 ? (Us(i, s3.subarray(t2, t2 + e)), true) : (yn(s3, t2, e, i), false);
145536
+ var yn = (s3, t2, e, i) => s3.write(Rn(i, e), t2, e, "ascii");
145537
+ var Rn = (s3, t2) => gn(Math.floor(s3).toString(8), t2);
145538
+ var gn = (s3, t2) => (s3.length === t2 - 1 ? s3 : new Array(t2 - s3.length - 1).join("0") + s3 + " ") + "\0";
145539
+ var Gi = (s3, t2, e, i) => i === void 0 ? false : ct(s3, t2, e, i.getTime() / 1e3);
145540
+ var bn = new Array(156).join("\0");
145541
+ var Lt = (s3, t2, e, i) => i === void 0 ? false : (s3.write(i + bn, t2, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
145542
+ var ft = class s {
145532
145543
  atime;
145533
145544
  mtime;
145534
145545
  ctime;
@@ -145554,7 +145565,7 @@ var ct = class s {
145554
145565
  if (t2 === "") return Buffer.allocUnsafe(0);
145555
145566
  let e = Buffer.byteLength(t2), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
145556
145567
  for (let n = 0; n < 512; n++) r[n] = 0;
145557
- new C2({ path: ("PaxHeader/" + (0, import_node_path14.basename)(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t2, 512, e, "utf8");
145568
+ new F2({ path: ("PaxHeader/" + (0, import_node_path14.basename)(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t2, 512, e, "utf8");
145558
145569
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
145559
145570
  return r;
145560
145571
  }
@@ -145568,24 +145579,52 @@ var ct = class s {
145568
145579
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
145569
145580
  }
145570
145581
  static parse(t2, e, i = false) {
145571
- return new s(Rn(gn(t2), e), i);
145582
+ return new s(On(Tn(t2), e), i);
145572
145583
  }
145573
145584
  };
145574
- var Rn = (s3, t2) => t2 ? Object.assign({}, t2, s3) : s3;
145575
- var gn = (s3) => s3.replace(/\n$/, "").split(`
145576
- `).reduce(bn, /* @__PURE__ */ Object.create(null));
145577
- var bn = (s3, t2) => {
145585
+ var On = (s3, t2) => t2 ? Object.assign({}, t2, s3) : s3;
145586
+ var Tn = (s3) => s3.replace(/\n$/, "").split(`
145587
+ `).reduce(xn, /* @__PURE__ */ Object.create(null));
145588
+ var xn = (s3, t2) => {
145578
145589
  let e = parseInt(t2, 10);
145579
145590
  if (e !== Buffer.byteLength(t2) + 1) return s3;
145580
145591
  t2 = t2.slice((e + " ").length);
145581
145592
  let i = t2.split("="), r = i.shift();
145582
145593
  if (!r) return s3;
145583
- let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
145584
- return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
145594
+ let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=").replace(/\0.*/, "");
145595
+ switch (n) {
145596
+ case "path":
145597
+ case "linkpath":
145598
+ case "type":
145599
+ case "charset":
145600
+ case "comment":
145601
+ case "gname":
145602
+ case "uname":
145603
+ s3[n] = o;
145604
+ break;
145605
+ case "ctime":
145606
+ case "atime":
145607
+ case "mtime":
145608
+ s3[n] = new Date(Number(o) * 1e3);
145609
+ break;
145610
+ case "size":
145611
+ let h = +o;
145612
+ h >= 0 && (s3[n] = h);
145613
+ break;
145614
+ case "gid":
145615
+ case "uid":
145616
+ case "dev":
145617
+ case "ino":
145618
+ case "nlink":
145619
+ case "mode":
145620
+ s3[n] = +o;
145621
+ break;
145622
+ }
145623
+ return s3;
145585
145624
  };
145586
- var _n = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
145587
- var f = _n !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
145588
- var Ve = class extends A {
145625
+ var Ln = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
145626
+ var f = Ln !== "win32" ? (s3) => String(s3) : (s3) => String(s3).replaceAll(/\\/g, "/");
145627
+ var $e = class extends A {
145589
145628
  extended;
145590
145629
  globalExtended;
145591
145630
  header;
@@ -145649,163 +145688,170 @@ var Ve = class extends A {
145649
145688
  t2.path && (t2.path = f(t2.path)), t2.linkpath && (t2.linkpath = f(t2.linkpath)), Object.assign(this, Object.fromEntries(Object.entries(t2).filter(([i, r]) => !(r == null || i === "path" && e))));
145650
145689
  }
145651
145690
  };
145652
- var Nt = (s3, t2, e, i = {}) => {
145691
+ var Dt = (s3, t2, e, i = {}) => {
145653
145692
  s3.file && (i.file = s3.file), s3.cwd && (i.cwd = s3.cwd), i.code = e instanceof Error && e.code || t2, i.tarCode = t2, !s3.strict && i.recoverable !== false ? (e instanceof Error && (i = Object.assign(e, i), e = e.message), s3.emit("warn", t2, e, i)) : e instanceof Error ? s3.emit("error", Object.assign(e, i)) : s3.emit("error", Object.assign(new Error(`${t2}: ${e}`), i));
145654
145693
  };
145655
- var Tn = 1024 * 1024;
145656
- var Vi = Buffer.from([31, 139]);
145657
- var $i = Buffer.from([40, 181, 47, 253]);
145658
- var xn = Math.max(Vi.length, $i.length);
145694
+ var Nn = 1024 * 1024;
145695
+ var Xi = Buffer.from([31, 139]);
145696
+ var qi = Buffer.from([40, 181, 47, 253]);
145697
+ var An = Math.max(Xi.length, qi.length);
145659
145698
  var B = /* @__PURE__ */ Symbol("state");
145660
- var Dt = /* @__PURE__ */ Symbol("writeEntry");
145661
- var et = /* @__PURE__ */ Symbol("readEntry");
145662
- var Gi = /* @__PURE__ */ Symbol("nextEntry");
145663
- var Ws = /* @__PURE__ */ Symbol("processEntry");
145699
+ var Nt = /* @__PURE__ */ Symbol("writeEntry");
145700
+ var it = /* @__PURE__ */ Symbol("readEntry");
145701
+ var Zi = /* @__PURE__ */ Symbol("nextEntry");
145702
+ var Zs = /* @__PURE__ */ Symbol("processEntry");
145664
145703
  var V2 = /* @__PURE__ */ Symbol("extendedHeader");
145665
145704
  var he = /* @__PURE__ */ Symbol("globalExtendedHeader");
145666
- var ft = /* @__PURE__ */ Symbol("meta");
145667
- var Gs = /* @__PURE__ */ Symbol("emitMeta");
145705
+ var dt = /* @__PURE__ */ Symbol("meta");
145706
+ var Ys = /* @__PURE__ */ Symbol("emitMeta");
145668
145707
  var p = /* @__PURE__ */ Symbol("buffer");
145669
- var it = /* @__PURE__ */ Symbol("queue");
145670
- var dt = /* @__PURE__ */ Symbol("ended");
145671
- var Zi = /* @__PURE__ */ Symbol("emittedEnd");
145708
+ var st = /* @__PURE__ */ Symbol("queue");
145709
+ var mt = /* @__PURE__ */ Symbol("ended");
145710
+ var Yi = /* @__PURE__ */ Symbol("emittedEnd");
145672
145711
  var At = /* @__PURE__ */ Symbol("emit");
145673
145712
  var y = /* @__PURE__ */ Symbol("unzip");
145674
- var $e = /* @__PURE__ */ Symbol("consumeChunk");
145675
- var Xe = /* @__PURE__ */ Symbol("consumeChunkSub");
145676
- var Yi = /* @__PURE__ */ Symbol("consumeBody");
145677
- var Zs = /* @__PURE__ */ Symbol("consumeMeta");
145678
- var Ys = /* @__PURE__ */ Symbol("consumeHeader");
145713
+ var Xe = /* @__PURE__ */ Symbol("consumeChunk");
145714
+ var qe = /* @__PURE__ */ Symbol("consumeChunkSub");
145715
+ var Ki = /* @__PURE__ */ Symbol("consumeBody");
145716
+ var Ks = /* @__PURE__ */ Symbol("consumeMeta");
145717
+ var Vs = /* @__PURE__ */ Symbol("consumeHeader");
145679
145718
  var ae = /* @__PURE__ */ Symbol("consuming");
145680
- var Ki = /* @__PURE__ */ Symbol("bufferConcat");
145681
- var qe = /* @__PURE__ */ Symbol("maybeEnd");
145719
+ var Vi = /* @__PURE__ */ Symbol("bufferConcat");
145720
+ var Qe = /* @__PURE__ */ Symbol("maybeEnd");
145682
145721
  var Yt = /* @__PURE__ */ Symbol("writing");
145683
- var ut = /* @__PURE__ */ Symbol("aborted");
145684
- var Qe = /* @__PURE__ */ Symbol("onDone");
145722
+ var $ = /* @__PURE__ */ Symbol("aborted");
145723
+ var Je = /* @__PURE__ */ Symbol("onDone");
145685
145724
  var It = /* @__PURE__ */ Symbol("sawValidEntry");
145686
- var Je = /* @__PURE__ */ Symbol("sawNullBlock");
145687
- var je = /* @__PURE__ */ Symbol("sawEOF");
145688
- var Ks = /* @__PURE__ */ Symbol("closeStream");
145689
- var Ln = () => true;
145690
- var st = class extends import_events5.EventEmitter {
145725
+ var je = /* @__PURE__ */ Symbol("sawNullBlock");
145726
+ var ti = /* @__PURE__ */ Symbol("sawEOF");
145727
+ var $s = /* @__PURE__ */ Symbol("closeStream");
145728
+ var In = 1e3;
145729
+ var le = /* @__PURE__ */ Symbol("compressedBytesRead");
145730
+ var $i = /* @__PURE__ */ Symbol("decompressedBytesRead");
145731
+ var Xs = /* @__PURE__ */ Symbol("checkDecompressionRatio");
145732
+ var Cn = () => true;
145733
+ var rt = class extends import_events5.EventEmitter {
145691
145734
  file;
145692
145735
  strict;
145693
145736
  maxMetaEntrySize;
145694
145737
  filter;
145695
145738
  brotli;
145696
145739
  zstd;
145740
+ maxDecompressionRatio;
145697
145741
  writable = true;
145698
145742
  readable = false;
145699
- [it] = [];
145743
+ [st] = [];
145700
145744
  [p];
145701
- [et];
145702
- [Dt];
145745
+ [it];
145746
+ [Nt];
145703
145747
  [B] = "begin";
145704
- [ft] = "";
145748
+ [dt] = "";
145705
145749
  [V2];
145706
145750
  [he];
145707
- [dt] = false;
145751
+ [mt] = false;
145708
145752
  [y];
145709
- [ut] = false;
145753
+ [$] = false;
145710
145754
  [It];
145711
- [Je] = false;
145712
145755
  [je] = false;
145756
+ [ti] = false;
145713
145757
  [Yt] = false;
145714
145758
  [ae] = false;
145715
- [Zi] = false;
145759
+ [Yi] = false;
145760
+ [le] = 0;
145761
+ [$i] = 0;
145716
145762
  constructor(t2 = {}) {
145717
- super(), this.file = t2.file || "", this.on(Qe, () => {
145763
+ super(), this.file = t2.file || "", this.on(Je, () => {
145718
145764
  (this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
145719
- }), t2.ondone ? this.on(Qe, t2.ondone) : this.on(Qe, () => {
145765
+ }), t2.ondone ? this.on(Je, t2.ondone) : this.on(Je, () => {
145720
145766
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
145721
- }), this.strict = !!t2.strict, this.maxMetaEntrySize = t2.maxMetaEntrySize || Tn, this.filter = typeof t2.filter == "function" ? t2.filter : Ln;
145767
+ }), this.strict = !!t2.strict, this.maxDecompressionRatio = typeof t2.maxDecompressionRatio == "number" ? t2.maxDecompressionRatio : In, this.maxMetaEntrySize = t2.maxMetaEntrySize || Nn, this.filter = typeof t2.filter == "function" ? t2.filter : Cn;
145722
145768
  let e = t2.file && (t2.file.endsWith(".tar.br") || t2.file.endsWith(".tbr"));
145723
145769
  this.brotli = !(t2.gzip || t2.zstd) && t2.brotli !== void 0 ? t2.brotli : e ? void 0 : false;
145724
145770
  let i = t2.file && (t2.file.endsWith(".tar.zst") || t2.file.endsWith(".tzst"));
145725
- this.zstd = !(t2.gzip || t2.brotli) && t2.zstd !== void 0 ? t2.zstd : i ? true : void 0, this.on("end", () => this[Ks]()), typeof t2.onwarn == "function" && this.on("warn", t2.onwarn), typeof t2.onReadEntry == "function" && this.on("entry", t2.onReadEntry);
145771
+ this.zstd = !(t2.gzip || t2.brotli) && t2.zstd !== void 0 ? t2.zstd : i ? true : void 0, this.on("end", () => this[$s]()), typeof t2.onwarn == "function" && this.on("warn", t2.onwarn), typeof t2.onReadEntry == "function" && this.on("entry", t2.onReadEntry);
145726
145772
  }
145727
145773
  warn(t2, e, i = {}) {
145728
- Nt(this, t2, e, i);
145774
+ Dt(this, t2, e, i);
145729
145775
  }
145730
- [Ys](t2, e) {
145776
+ [Vs](t2, e) {
145731
145777
  this[It] === void 0 && (this[It] = false);
145732
145778
  let i;
145733
145779
  try {
145734
- i = new C2(t2, e, this[V2], this[he]);
145780
+ i = new F2(t2, e, this[V2], this[he]);
145735
145781
  } catch (r) {
145736
145782
  return this.warn("TAR_ENTRY_INVALID", r);
145737
145783
  }
145738
- if (i.nullBlock) this[Je] ? (this[je] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[Je] = true, this[At]("nullBlock"));
145739
- else if (this[Je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
145784
+ if (i.nullBlock) this[je] ? (this[ti] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
145785
+ else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
145740
145786
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
145741
145787
  else {
145742
145788
  let r = i.type;
145743
145789
  if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
145744
145790
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
145745
145791
  else {
145746
- let n = this[Dt] = new Ve(i, this[V2], this[he]);
145792
+ let n = this[Nt] = new $e(i, this[V2], this[he]);
145747
145793
  if (!this[It]) if (n.remain) {
145748
145794
  let o = () => {
145749
145795
  n.invalid || (this[It] = true);
145750
145796
  };
145751
145797
  n.on("end", o);
145752
145798
  } else this[It] = true;
145753
- n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V2] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Gi]())));
145799
+ n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[dt] = "", n.on("data", (o) => this[dt] += o), this[B] = "meta") : (this[V2] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[it] ? this[st].push(n) : (this[st].push(n), this[Zi]())));
145754
145800
  }
145755
145801
  }
145756
145802
  }
145757
- [Ks]() {
145803
+ [$s]() {
145758
145804
  queueMicrotask(() => this.emit("close"));
145759
145805
  }
145760
- [Ws](t2) {
145806
+ [Zs](t2) {
145761
145807
  let e = true;
145762
- if (!t2) this[et] = void 0, e = false;
145808
+ if (!t2) this[it] = void 0, e = false;
145763
145809
  else if (Array.isArray(t2)) {
145764
145810
  let [i, ...r] = t2;
145765
145811
  this.emit(i, ...r);
145766
- } else this[et] = t2, this.emit("entry", t2), t2.emittedEnd || (t2.on("end", () => this[Gi]()), e = false);
145812
+ } else this[it] = t2, this.emit("entry", t2), t2.emittedEnd || (t2.on("end", () => this[Zi]()), e = false);
145767
145813
  return e;
145768
145814
  }
145769
- [Gi]() {
145815
+ [Zi]() {
145770
145816
  do
145771
145817
  ;
145772
- while (this[Ws](this[it].shift()));
145773
- if (this[it].length === 0) {
145774
- let t2 = this[et];
145818
+ while (this[Zs](this[st].shift()));
145819
+ if (this[st].length === 0) {
145820
+ let t2 = this[it];
145775
145821
  !t2 || t2.flowing || t2.size === t2.remain ? this[Yt] || this.emit("drain") : t2.once("drain", () => this.emit("drain"));
145776
145822
  }
145777
145823
  }
145778
- [Yi](t2, e) {
145779
- let i = this[Dt];
145824
+ [Ki](t2, e) {
145825
+ let i = this[Nt];
145780
145826
  if (!i) throw new Error("attempt to consume body without entry??");
145781
145827
  let r = i.blockRemain ?? 0, n = r >= t2.length && e === 0 ? t2 : t2.subarray(e, e + r);
145782
- return i.write(n), i.blockRemain || (this[B] = "header", this[Dt] = void 0, i.end()), n.length;
145828
+ return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
145783
145829
  }
145784
- [Zs](t2, e) {
145785
- let i = this[Dt], r = this[Yi](t2, e);
145786
- return !this[Dt] && i && this[Gs](i), r;
145830
+ [Ks](t2, e) {
145831
+ let i = this[Nt], r = this[Ki](t2, e);
145832
+ return !this[Nt] && i && this[Ys](i), r;
145787
145833
  }
145788
145834
  [At](t2, e, i) {
145789
- this[it].length === 0 && !this[et] ? this.emit(t2, e, i) : this[it].push([t2, e, i]);
145835
+ this[st].length === 0 && !this[it] ? this.emit(t2, e, i) : this[st].push([t2, e, i]);
145790
145836
  }
145791
- [Gs](t2) {
145792
- switch (this[At]("meta", this[ft]), t2.type) {
145837
+ [Ys](t2) {
145838
+ switch (this[At]("meta", this[dt]), t2.type) {
145793
145839
  case "ExtendedHeader":
145794
145840
  case "OldExtendedHeader":
145795
- this[V2] = ct.parse(this[ft], this[V2], false);
145841
+ this[V2] = ft.parse(this[dt], this[V2], false);
145796
145842
  break;
145797
145843
  case "GlobalExtendedHeader":
145798
- this[he] = ct.parse(this[ft], this[he], true);
145844
+ this[he] = ft.parse(this[dt], this[he], true);
145799
145845
  break;
145800
145846
  case "NextFileHasLongPath":
145801
145847
  case "OldGnuLongPath": {
145802
145848
  let e = this[V2] ?? /* @__PURE__ */ Object.create(null);
145803
- this[V2] = e, e.path = this[ft].replace(/\0.*/, "");
145849
+ this[V2] = e, e.path = this[dt].replace(/\0.*/, "");
145804
145850
  break;
145805
145851
  }
145806
145852
  case "NextFileHasLongLinkpath": {
145807
145853
  let e = this[V2] || /* @__PURE__ */ Object.create(null);
145808
- this[V2] = e, e.linkpath = this[ft].replace(/\0.*/, "");
145854
+ this[V2] = e, e.linkpath = this[dt].replace(/\0.*/, "");
145809
145855
  break;
145810
145856
  }
145811
145857
  default:
@@ -145813,86 +145859,95 @@ var st = class extends import_events5.EventEmitter {
145813
145859
  }
145814
145860
  }
145815
145861
  abort(t2) {
145816
- this[ut] = true, this.emit("abort", t2), this.warn("TAR_ABORT", t2, { recoverable: false });
145862
+ this[$] || (this[$] = true, this.emit("abort", t2), this.warn("TAR_ABORT", t2, { recoverable: false }));
145863
+ }
145864
+ [Xs](t2) {
145865
+ this[$i] += t2.length;
145866
+ let e = this[$i] / this[le];
145867
+ return e > this.maxDecompressionRatio ? (this.abort(new Error(`max decompression ratio exceeded: ${e.toFixed(2)} > ${this.maxDecompressionRatio}`)), false) : true;
145817
145868
  }
145818
145869
  write(t2, e, i) {
145819
- if (typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, typeof e == "string" ? e : "utf8")), this[ut]) return i?.(), false;
145870
+ if (typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, typeof e == "string" ? e : "utf8")), this[$]) return i?.(), false;
145820
145871
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t2) {
145821
- if (this[p] && (t2 = Buffer.concat([this[p], t2]), this[p] = void 0), t2.length < xn) return this[p] = t2, i?.(), true;
145822
- for (let h = 0; this[y] === void 0 && h < Vi.length; h++) t2[h] !== Vi[h] && (this[y] = false);
145872
+ if (this[p] && (t2 = Buffer.concat([this[p], t2]), this[p] = void 0), t2.length < An) return this[p] = t2, i?.(), true;
145873
+ for (let a = 0; this[y] === void 0 && a < Xi.length; a++) t2[a] !== Xi[a] && (this[y] = false);
145823
145874
  let o = false;
145824
145875
  if (this[y] === false && this.zstd !== false) {
145825
145876
  o = true;
145826
- for (let h = 0; h < $i.length; h++) if (t2[h] !== $i[h]) {
145877
+ for (let a = 0; a < qi.length; a++) if (t2[a] !== qi[a]) {
145827
145878
  o = false;
145828
145879
  break;
145829
145880
  }
145830
145881
  }
145831
- let a = this.brotli === void 0 && !o;
145832
- if (this[y] === false && a) if (t2.length < 512) if (this[dt]) this.brotli = true;
145882
+ let h = this.brotli === void 0 && !o;
145883
+ if (this[y] === false && h) if (t2.length < 512) if (this[mt]) this.brotli = true;
145833
145884
  else return this[p] = t2, i?.(), true;
145834
145885
  else try {
145835
- new C2(t2.subarray(0, 512)), this.brotli = false;
145886
+ new F2(t2.subarray(0, 512)), this.brotli = false;
145836
145887
  } catch {
145837
145888
  this.brotli = true;
145838
145889
  }
145839
145890
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
145840
- let h = this[dt];
145841
- this[dt] = false, this[y] = this[y] === void 0 ? new ze({}) : o ? new Ye({}) : new We({}), this[y].on("data", (c) => this[$e](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
145842
- this[dt] = true, this[$e]();
145843
- }), this[Yt] = true;
145844
- let l = !!this[y][h ? "end" : "write"](t2);
145891
+ let a = this[mt];
145892
+ this[mt] = false, this[y] = this[y] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[y].on("data", (c) => {
145893
+ this[Xs](c) && this[Xe](c);
145894
+ }), this[y].on("error", (c) => {
145895
+ this[$] || this.abort(c);
145896
+ }), this[y].on("end", () => {
145897
+ this[mt] = true, this[Xe]();
145898
+ }), this[Yt] = true, this[le] += t2.length;
145899
+ let l = !!this[y][a ? "end" : "write"](t2);
145845
145900
  return this[Yt] = false, i?.(), l;
145846
145901
  }
145847
145902
  }
145848
- this[Yt] = true, this[y] ? this[y].write(t2) : this[$e](t2), this[Yt] = false;
145849
- let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
145850
- return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
145903
+ this[Yt] = true, this[y] ? (this[le] += t2.length, this[y].write(t2)) : this[Xe](t2), this[Yt] = false;
145904
+ let n = this[st].length > 0 ? false : this[it] ? this[it].flowing : true;
145905
+ return !n && this[st].length === 0 && this[it]?.once("drain", () => this.emit("drain")), i?.(), n;
145851
145906
  }
145852
- [Ki](t2) {
145853
- t2 && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t2]) : t2);
145907
+ [Vi](t2) {
145908
+ t2 && !this[$] && (this[p] = this[p] ? Buffer.concat([this[p], t2]) : t2);
145854
145909
  }
145855
- [qe]() {
145856
- if (this[dt] && !this[Zi] && !this[ut] && !this[ae]) {
145857
- this[Zi] = true;
145858
- let t2 = this[Dt];
145859
- if (t2 && t2.blockRemain) {
145910
+ [Qe]() {
145911
+ if (this[mt] && !this[Yi] && !this[$] && !this[ae]) {
145912
+ this[Yi] = true;
145913
+ let t2 = this[Nt];
145914
+ if (t2?.blockRemain) {
145860
145915
  let e = this[p] ? this[p].length : 0;
145861
145916
  this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t2.blockRemain} more bytes, only ${e} available)`, { entry: t2 }), this[p] && t2.write(this[p]), t2.end();
145862
145917
  }
145863
- this[At](Qe);
145918
+ this[At](Je);
145864
145919
  }
145865
145920
  }
145866
- [$e](t2) {
145867
- if (this[ae] && t2) this[Ki](t2);
145868
- else if (!t2 && !this[p]) this[qe]();
145921
+ [Xe](t2) {
145922
+ if (this[ae] && t2) this[Vi](t2);
145923
+ else if (!t2 && !this[p]) this[Qe]();
145869
145924
  else if (t2) {
145870
145925
  if (this[ae] = true, this[p]) {
145871
- this[Ki](t2);
145926
+ this[Vi](t2);
145872
145927
  let e = this[p];
145873
- this[p] = void 0, this[Xe](e);
145874
- } else this[Xe](t2);
145875
- for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[je]; ) {
145928
+ this[p] = void 0, this[qe](e);
145929
+ } else this[qe](t2);
145930
+ for (; this[p] && this[p]?.length >= 512 && !this[$] && !this[ti]; ) {
145876
145931
  let e = this[p];
145877
- this[p] = void 0, this[Xe](e);
145932
+ this[p] = void 0, this[qe](e);
145878
145933
  }
145879
145934
  this[ae] = false;
145880
145935
  }
145881
- (!this[p] || this[dt]) && this[qe]();
145936
+ (!this[p] || this[mt]) && this[Qe]();
145882
145937
  }
145883
- [Xe](t2) {
145938
+ [qe](t2) {
145884
145939
  let e = 0, i = t2.length;
145885
- for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
145940
+ for (; e + 512 <= i && !this[$] && !this[ti]; ) switch (this[B]) {
145886
145941
  case "begin":
145887
145942
  case "header":
145888
- this[Ys](t2, e), e += 512;
145943
+ this[Vs](t2, e), e += 512;
145889
145944
  break;
145890
145945
  case "ignore":
145891
145946
  case "body":
145892
- e += this[Yi](t2, e);
145947
+ e += this[Ki](t2, e);
145893
145948
  break;
145894
145949
  case "meta":
145895
- e += this[Zs](t2, e);
145950
+ e += this[Ks](t2, e);
145896
145951
  break;
145897
145952
  default:
145898
145953
  throw new Error("invalid state: " + this[B]);
@@ -145900,46 +145955,46 @@ var st = class extends import_events5.EventEmitter {
145900
145955
  e < i && (this[p] = this[p] ? Buffer.concat([t2.subarray(e), this[p]]) : t2.subarray(e));
145901
145956
  }
145902
145957
  end(t2, e, i) {
145903
- return typeof t2 == "function" && (i = t2, e = void 0, t2 = void 0), typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t2 && this[y].write(t2), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t2 = t2 || Buffer.alloc(0)), t2 && this.write(t2), this[qe]())), this;
145958
+ return typeof t2 == "function" && (i = t2, e = void 0, t2 = void 0), typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, e)), i && this.once("finish", i), this[$] || (this[y] ? (t2 && (this[le] += t2.length, this[y].write(t2)), this[y].end()) : (this[mt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t2 = t2 || Buffer.alloc(0)), t2 && this.write(t2), this[Qe]())), this;
145904
145959
  }
145905
145960
  };
145906
- var mt = (s3) => {
145961
+ var ut = (s3) => {
145907
145962
  let t2 = s3.length - 1, e = -1;
145908
145963
  for (; t2 > -1 && s3.charAt(t2) === "/"; ) e = t2, t2--;
145909
145964
  return e === -1 ? s3 : s3.slice(0, e);
145910
145965
  };
145911
- var An = (s3) => {
145966
+ var vn = (s3) => {
145912
145967
  let t2 = s3.onReadEntry;
145913
145968
  s3.onReadEntry = t2 ? (e) => {
145914
145969
  t2(e), e.resume();
145915
145970
  } : (e) => e.resume();
145916
145971
  };
145917
- var Xi = (s3, t2) => {
145918
- let e = new Map(t2.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
145919
- let a = o || (0, import_path20.parse)(n).root || ".", h;
145920
- if (n === a) h = false;
145972
+ var Qi = (s3, t2) => {
145973
+ let e = new Map(t2.map((n) => [ut(n), true])), i = s3.filter, r = (n, o = "") => {
145974
+ let h = o || (0, import_path20.parse)(n).root || ".", a;
145975
+ if (n === h) a = false;
145921
145976
  else {
145922
145977
  let l = e.get(n);
145923
- h = l !== void 0 ? l : r((0, import_path20.dirname)(n), a);
145978
+ a = l !== void 0 ? l : r((0, import_path20.dirname)(n), h);
145924
145979
  }
145925
- return e.set(n, h), h;
145980
+ return e.set(n, a), a;
145926
145981
  };
145927
- s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
145982
+ s3.filter = i ? (n, o) => i(n, o) && r(ut(n)) : (n) => r(ut(n));
145928
145983
  };
145929
- var In = (s3) => {
145930
- let t2 = new st(s3), e = s3.file, i;
145984
+ var Mn = (s3) => {
145985
+ let t2 = new rt(s3), e = s3.file, i;
145931
145986
  try {
145932
145987
  i = import_node_fs10.default.openSync(e, "r");
145933
145988
  let r = import_node_fs10.default.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
145934
145989
  if (r.size < n) {
145935
- let o = Buffer.allocUnsafe(r.size), a = import_node_fs10.default.readSync(i, o, 0, r.size, 0);
145936
- t2.end(a === o.byteLength ? o : o.subarray(0, a));
145990
+ let o = Buffer.allocUnsafe(r.size), h = import_node_fs10.default.readSync(i, o, 0, r.size, 0);
145991
+ t2.end(h === o.byteLength ? o : o.subarray(0, h));
145937
145992
  } else {
145938
- let o = 0, a = Buffer.allocUnsafe(n);
145993
+ let o = 0, h = Buffer.allocUnsafe(n);
145939
145994
  for (; o < r.size; ) {
145940
- let h = import_node_fs10.default.readSync(i, a, 0, n, o);
145941
- if (h === 0) break;
145942
- o += h, t2.write(a.subarray(0, h));
145995
+ let a = import_node_fs10.default.readSync(i, h, 0, n, o);
145996
+ if (a === 0) break;
145997
+ o += a, t2.write(h.subarray(0, a));
145943
145998
  }
145944
145999
  t2.end();
145945
146000
  }
@@ -145950,58 +146005,58 @@ var In = (s3) => {
145950
146005
  }
145951
146006
  }
145952
146007
  };
145953
- var Fn = (s3, t2) => {
145954
- let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
145955
- return new Promise((o, a) => {
145956
- e.on("error", a), e.on("end", o), import_node_fs10.default.stat(r, (h, l) => {
145957
- if (h) a(h);
146008
+ var Bn = (s3, t2) => {
146009
+ let e = new rt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
146010
+ return new Promise((o, h) => {
146011
+ e.on("error", h), e.on("end", o), import_node_fs10.default.stat(r, (a, l) => {
146012
+ if (a) h(a);
145958
146013
  else {
145959
146014
  let c = new _t(r, { readSize: i, size: l.size });
145960
- c.on("error", a), c.pipe(e);
146015
+ c.on("error", h), c.pipe(e);
145961
146016
  }
145962
146017
  });
145963
146018
  });
145964
146019
  };
145965
- var Ft = K2(In, Fn, (s3) => new st(s3), (s3) => new st(s3), (s3, t2) => {
145966
- t2?.length && Xi(s3, t2), s3.noResume || An(s3);
145967
- });
145968
- var qi = (s3, t2, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t2 && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
145969
- var { isAbsolute: kn, parse: Vs } = import_node_path15.win32;
145970
- var le = (s3) => {
145971
- let t2 = "", e = Vs(s3);
145972
- for (; kn(s3) || e.root; ) {
146020
+ var Ct = K2(Mn, Bn, (s3) => new rt(s3), (s3) => new rt(s3), (s3, t2) => {
146021
+ t2?.length && Qi(s3, t2), s3.noResume || vn(s3);
146022
+ });
146023
+ var Ji = (s3, t2, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t2 && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
146024
+ var { isAbsolute: zn, parse: qs } = import_node_path15.win32;
146025
+ var ce = (s3) => {
146026
+ let t2 = "", e = qs(s3);
146027
+ for (; zn(s3) || e.root; ) {
145973
146028
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
145974
- s3 = s3.slice(i.length), t2 += i, e = Vs(s3);
146029
+ s3 = s3.slice(i.length), t2 += i, e = qs(s3);
145975
146030
  }
145976
146031
  return [t2, s3];
145977
146032
  };
145978
- var ti = ["|", "<", ">", "?", ":"];
145979
- var Qi = ti.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
145980
- var vn = new Map(ti.map((s3, t2) => [s3, Qi[t2]]));
145981
- var Mn = new Map(Qi.map((s3, t2) => [s3, ti[t2]]));
145982
- var Ji = (s3) => ti.reduce((t2, e) => t2.split(e).join(vn.get(e)), s3);
145983
- var $s = (s3) => Qi.reduce((t2, e) => t2.split(e).join(Mn.get(e)), s3);
145984
- var er = (s3, t2) => t2 ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t2) + "/" + s3) : f(s3);
145985
- var Bn = 16 * 1024 * 1024;
145986
- var Qs = /* @__PURE__ */ Symbol("process");
145987
- var Js = /* @__PURE__ */ Symbol("file");
145988
- var js = /* @__PURE__ */ Symbol("directory");
145989
- var ts = /* @__PURE__ */ Symbol("symlink");
145990
- var tr = /* @__PURE__ */ Symbol("hardlink");
145991
- var ce = /* @__PURE__ */ Symbol("header");
145992
- var ei = /* @__PURE__ */ Symbol("read");
145993
- var es = /* @__PURE__ */ Symbol("lstat");
145994
- var ii = /* @__PURE__ */ Symbol("onlstat");
145995
- var is = /* @__PURE__ */ Symbol("onread");
145996
- var ss = /* @__PURE__ */ Symbol("onreadlink");
145997
- var rs = /* @__PURE__ */ Symbol("openfile");
145998
- var ns = /* @__PURE__ */ Symbol("onopenfile");
146033
+ var ei = ["|", "<", ">", "?", ":"];
146034
+ var ji = ei.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
146035
+ var Un = new Map(ei.map((s3, t2) => [s3, ji[t2]]));
146036
+ var Hn = new Map(ji.map((s3, t2) => [s3, ei[t2]]));
146037
+ var ts = (s3) => ei.reduce((t2, e) => t2.split(e).join(Un.get(e)), s3);
146038
+ var Qs = (s3) => ji.reduce((t2, e) => t2.split(e).join(Hn.get(e)), s3);
146039
+ var rr = (s3, t2) => t2 ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), ut(t2) + "/" + s3) : f(s3);
146040
+ var Wn = 16 * 1024 * 1024;
146041
+ var tr = /* @__PURE__ */ Symbol("process");
146042
+ var er = /* @__PURE__ */ Symbol("file");
146043
+ var ir = /* @__PURE__ */ Symbol("directory");
146044
+ var is = /* @__PURE__ */ Symbol("symlink");
146045
+ var sr = /* @__PURE__ */ Symbol("hardlink");
146046
+ var fe = /* @__PURE__ */ Symbol("header");
146047
+ var ii = /* @__PURE__ */ Symbol("read");
146048
+ var ss = /* @__PURE__ */ Symbol("lstat");
146049
+ var si = /* @__PURE__ */ Symbol("onlstat");
146050
+ var rs = /* @__PURE__ */ Symbol("onread");
146051
+ var ns = /* @__PURE__ */ Symbol("onreadlink");
146052
+ var os = /* @__PURE__ */ Symbol("openfile");
146053
+ var hs = /* @__PURE__ */ Symbol("onopenfile");
145999
146054
  var pt = /* @__PURE__ */ Symbol("close");
146000
- var si = /* @__PURE__ */ Symbol("mode");
146001
- var os = /* @__PURE__ */ Symbol("awaitDrain");
146002
- var ji = /* @__PURE__ */ Symbol("ondrain");
146003
- var X2 = /* @__PURE__ */ Symbol("prefix");
146004
- var fe = class extends A {
146055
+ var ri = /* @__PURE__ */ Symbol("mode");
146056
+ var as = /* @__PURE__ */ Symbol("awaitDrain");
146057
+ var es = /* @__PURE__ */ Symbol("ondrain");
146058
+ var q = /* @__PURE__ */ Symbol("prefix");
146059
+ var de = class extends A {
146005
146060
  path;
146006
146061
  portable;
146007
146062
  myuid = process.getuid && process.getuid() || 0;
@@ -146034,109 +146089,109 @@ var fe = class extends A {
146034
146089
  #t = false;
146035
146090
  constructor(t2, e = {}) {
146036
146091
  let i = se(e);
146037
- super(), this.path = f(t2), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Bn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
146092
+ super(), this.path = f(t2), 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 = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
146038
146093
  let r = false;
146039
146094
  if (!this.preservePaths) {
146040
- let [o, a] = le(this.path);
146041
- o && typeof a == "string" && (this.path = a, r = o);
146095
+ let [o, h] = ce(this.path);
146096
+ o && typeof h == "string" && (this.path = h, r = o);
146042
146097
  }
146043
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = $s(this.path.replaceAll(/\\/g, "/")), t2 = t2.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || import_path21.default.resolve(this.cwd, t2)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
146098
+ this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Qs(this.path.replaceAll(/\\/g, "/")), t2 = t2.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || import_path21.default.resolve(this.cwd, t2)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
146044
146099
  let n = this.statCache.get(this.absolute);
146045
- n ? this[ii](n) : this[es]();
146100
+ n ? this[si](n) : this[ss]();
146046
146101
  }
146047
146102
  warn(t2, e, i = {}) {
146048
- return Nt(this, t2, e, i);
146103
+ return Dt(this, t2, e, i);
146049
146104
  }
146050
146105
  emit(t2, ...e) {
146051
146106
  return t2 === "error" && (this.#t = true), super.emit(t2, ...e);
146052
146107
  }
146053
- [es]() {
146108
+ [ss]() {
146054
146109
  import_fs26.default.lstat(this.absolute, (t2, e) => {
146055
146110
  if (t2) return this.emit("error", t2);
146056
- this[ii](e);
146111
+ this[si](e);
146057
146112
  });
146058
146113
  }
146059
- [ii](t2) {
146060
- this.statCache.set(this.absolute, t2), this.stat = t2, t2.isFile() || (t2.size = 0), this.type = Pn(t2), this.emit("stat", t2), this[Qs]();
146114
+ [si](t2) {
146115
+ this.statCache.set(this.absolute, t2), this.stat = t2, t2.isFile() || (t2.size = 0), this.type = Gn(t2), this.emit("stat", t2), this[tr]();
146061
146116
  }
146062
- [Qs]() {
146117
+ [tr]() {
146063
146118
  switch (this.type) {
146064
146119
  case "File":
146065
- return this[Js]();
146120
+ return this[er]();
146066
146121
  case "Directory":
146067
- return this[js]();
146122
+ return this[ir]();
146068
146123
  case "SymbolicLink":
146069
- return this[ts]();
146124
+ return this[is]();
146070
146125
  default:
146071
146126
  return this.end();
146072
146127
  }
146073
146128
  }
146074
- [si](t2) {
146075
- return qi(t2, this.type === "Directory", this.portable);
146129
+ [ri](t2) {
146130
+ return Ji(t2, this.type === "Directory", this.portable);
146076
146131
  }
146077
- [X2](t2) {
146078
- return er(t2, this.prefix);
146132
+ [q](t2) {
146133
+ return rr(t2, this.prefix);
146079
146134
  }
146080
- [ce]() {
146135
+ [fe]() {
146081
146136
  if (!this.stat) throw new Error("cannot write header before stat");
146082
- this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new C2({ path: this[X2](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X2](this.linkpath) : this.linkpath, mode: this[si](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X2](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X2](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());
146137
+ this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F2({ path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](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[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](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());
146083
146138
  let t2 = this.header?.block;
146084
146139
  if (!t2) throw new Error("failed to encode header");
146085
146140
  super.write(t2);
146086
146141
  }
146087
- [js]() {
146142
+ [ir]() {
146088
146143
  if (!this.stat) throw new Error("cannot create directory entry without stat");
146089
- this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[ce](), this.end();
146144
+ this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
146090
146145
  }
146091
- [ts]() {
146146
+ [is]() {
146092
146147
  import_fs26.default.readlink(this.absolute, (t2, e) => {
146093
146148
  if (t2) return this.emit("error", t2);
146094
- this[ss](e);
146149
+ this[ns](e);
146095
146150
  });
146096
146151
  }
146097
- [ss](t2) {
146098
- this.linkpath = f(t2), this[ce](), this.end();
146152
+ [ns](t2) {
146153
+ this.linkpath = f(t2), this[fe](), this.end();
146099
146154
  }
146100
- [tr](t2) {
146155
+ [sr](t2) {
146101
146156
  if (!this.stat) throw new Error("cannot create link entry without stat");
146102
- this.type = "Link", this.linkpath = f(import_path21.default.relative(this.cwd, t2)), this.stat.size = 0, this[ce](), this.end();
146157
+ this.type = "Link", this.linkpath = f(import_path21.default.relative(this.cwd, t2)), this.stat.size = 0, this[fe](), this.end();
146103
146158
  }
146104
- [Js]() {
146159
+ [er]() {
146105
146160
  if (!this.stat) throw new Error("cannot create file entry without stat");
146106
146161
  if (this.stat.nlink > 1) {
146107
146162
  let t2 = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t2);
146108
- if (e?.indexOf(this.cwd) === 0) return this[tr](e);
146163
+ if (e?.indexOf(this.cwd) === 0) return this[sr](e);
146109
146164
  this.linkCache.set(t2, this.absolute);
146110
146165
  }
146111
- if (this[ce](), this.stat.size === 0) return this.end();
146112
- this[rs]();
146166
+ if (this[fe](), this.stat.size === 0) return this.end();
146167
+ this[os]();
146113
146168
  }
146114
- [rs]() {
146169
+ [os]() {
146115
146170
  import_fs26.default.open(this.absolute, "r", (t2, e) => {
146116
146171
  if (t2) return this.emit("error", t2);
146117
- this[ns](e);
146172
+ this[hs](e);
146118
146173
  });
146119
146174
  }
146120
- [ns](t2) {
146175
+ [hs](t2) {
146121
146176
  if (this.fd = t2, this.#t) return this[pt]();
146122
146177
  if (!this.stat) throw new Error("should stat before calling onopenfile");
146123
146178
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
146124
146179
  let e = Math.min(this.blockLen, this.maxReadSize);
146125
- this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ei]();
146180
+ this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ii]();
146126
146181
  }
146127
- [ei]() {
146182
+ [ii]() {
146128
146183
  let { fd: t2, buf: e, offset: i, length: r, pos: n } = this;
146129
146184
  if (t2 === void 0 || e === void 0) throw new Error("cannot read file without first opening");
146130
- import_fs26.default.read(t2, e, i, r, n, (o, a) => {
146185
+ import_fs26.default.read(t2, e, i, r, n, (o, h) => {
146131
146186
  if (o) return this[pt](() => this.emit("error", o));
146132
- this[is](a);
146187
+ this[rs](h);
146133
146188
  });
146134
146189
  }
146135
146190
  [pt](t2 = () => {
146136
146191
  }) {
146137
146192
  this.fd !== void 0 && import_fs26.default.close(this.fd, t2);
146138
146193
  }
146139
- [is](t2) {
146194
+ [rs](t2) {
146140
146195
  if (t2 <= 0 && this.remain > 0) {
146141
146196
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
146142
146197
  return this[pt](() => this.emit("error", r));
@@ -146148,9 +146203,9 @@ var fe = class extends A {
146148
146203
  if (!this.buf) throw new Error("should have created buffer prior to reading");
146149
146204
  if (t2 === this.remain) for (let r = t2; r < this.length && t2 < this.blockRemain; r++) this.buf[r + this.offset] = 0, t2++, this.remain++;
146150
146205
  let e = this.offset === 0 && t2 === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t2);
146151
- this.write(e) ? this[ji]() : this[os](() => this[ji]());
146206
+ this.write(e) ? this[es]() : this[as](() => this[es]());
146152
146207
  }
146153
- [os](t2) {
146208
+ [as](t2) {
146154
146209
  this.once("drain", t2);
146155
146210
  }
146156
146211
  write(t2, e, i) {
@@ -146160,30 +146215,30 @@ var fe = class extends A {
146160
146215
  }
146161
146216
  return this.remain -= t2.length, this.blockRemain -= t2.length, this.pos += t2.length, this.offset += t2.length, super.write(t2, null, i);
146162
146217
  }
146163
- [ji]() {
146218
+ [es]() {
146164
146219
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t2) => t2 ? this.emit("error", t2) : this.end());
146165
146220
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
146166
- this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ei]();
146221
+ 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]();
146167
146222
  }
146168
146223
  };
146169
- var ri = class extends fe {
146224
+ var ni = class extends de {
146170
146225
  sync = true;
146171
- [es]() {
146172
- this[ii](import_fs26.default.lstatSync(this.absolute));
146226
+ [ss]() {
146227
+ this[si](import_fs26.default.lstatSync(this.absolute));
146173
146228
  }
146174
- [ts]() {
146175
- this[ss](import_fs26.default.readlinkSync(this.absolute));
146229
+ [is]() {
146230
+ this[ns](import_fs26.default.readlinkSync(this.absolute));
146176
146231
  }
146177
- [rs]() {
146178
- this[ns](import_fs26.default.openSync(this.absolute, "r"));
146232
+ [os]() {
146233
+ this[hs](import_fs26.default.openSync(this.absolute, "r"));
146179
146234
  }
146180
- [ei]() {
146235
+ [ii]() {
146181
146236
  let t2 = true;
146182
146237
  try {
146183
146238
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
146184
146239
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
146185
- let a = import_fs26.default.readSync(e, i, r, n, o);
146186
- this[is](a), t2 = false;
146240
+ let h = import_fs26.default.readSync(e, i, r, n, o);
146241
+ this[rs](h), t2 = false;
146187
146242
  } finally {
146188
146243
  if (t2) try {
146189
146244
  this[pt](() => {
@@ -146192,7 +146247,7 @@ var ri = class extends fe {
146192
146247
  }
146193
146248
  }
146194
146249
  }
146195
- [os](t2) {
146250
+ [as](t2) {
146196
146251
  t2();
146197
146252
  }
146198
146253
  [pt](t2 = () => {
@@ -146200,7 +146255,7 @@ var ri = class extends fe {
146200
146255
  this.fd !== void 0 && import_fs26.default.closeSync(this.fd), t2();
146201
146256
  }
146202
146257
  };
146203
- var ni = class extends A {
146258
+ var oi = class extends A {
146204
146259
  blockLen = 0;
146205
146260
  blockRemain = 0;
146206
146261
  buf = 0;
@@ -146229,29 +146284,29 @@ var ni = class extends A {
146229
146284
  size;
146230
146285
  onWriteEntry;
146231
146286
  warn(t2, e, i = {}) {
146232
- return Nt(this, t2, e, i);
146287
+ return Dt(this, t2, e, i);
146233
146288
  }
146234
146289
  constructor(t2, e = {}) {
146235
146290
  let i = se(e);
146236
146291
  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 = t2;
146237
146292
  let { type: r } = t2;
146238
146293
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
146239
- this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t2.path), this.mode = t2.mode !== void 0 ? this[si](t2.mode) : void 0, this.uid = this.portable ? void 0 : t2.uid, this.gid = this.portable ? void 0 : t2.gid, this.uname = this.portable ? void 0 : t2.uname, this.gname = this.portable ? void 0 : t2.gname, this.size = t2.size, this.mtime = this.noMtime ? void 0 : i.mtime || t2.mtime, this.atime = this.portable ? void 0 : t2.atime, this.ctime = this.portable ? void 0 : t2.ctime, this.linkpath = t2.linkpath !== void 0 ? f(t2.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
146294
+ this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t2.path), this.mode = t2.mode !== void 0 ? this[ri](t2.mode) : void 0, this.uid = this.portable ? void 0 : t2.uid, this.gid = this.portable ? void 0 : t2.gid, this.uname = this.portable ? void 0 : t2.uname, this.gname = this.portable ? void 0 : t2.gname, this.size = t2.size, this.mtime = this.noMtime ? void 0 : i.mtime || t2.mtime, this.atime = this.portable ? void 0 : t2.atime, this.ctime = this.portable ? void 0 : t2.ctime, this.linkpath = t2.linkpath !== void 0 ? f(t2.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
146240
146295
  let n = false;
146241
146296
  if (!this.preservePaths) {
146242
- let [a, h] = le(this.path);
146243
- a && typeof h == "string" && (this.path = h, n = a);
146297
+ let [h, a] = ce(this.path);
146298
+ h && typeof a == "string" && (this.path = a, n = h);
146244
146299
  }
146245
- this.remain = t2.size, this.blockRemain = t2.startBlockSize, this.onWriteEntry?.(this), this.header = new C2({ path: this[X2](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X2](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[X2](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X2](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());
146300
+ this.remain = t2.size, this.blockRemain = t2.startBlockSize, this.onWriteEntry?.(this), this.header = new F2({ path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](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[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](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());
146246
146301
  let o = this.header?.block;
146247
146302
  if (!o) throw new Error("failed to encode header");
146248
146303
  super.write(o), t2.pipe(this);
146249
146304
  }
146250
- [X2](t2) {
146251
- return er(t2, this.prefix);
146305
+ [q](t2) {
146306
+ return rr(t2, this.prefix);
146252
146307
  }
146253
- [si](t2) {
146254
- return qi(t2, this.type === "Directory", this.portable);
146308
+ [ri](t2) {
146309
+ return Ji(t2, this.type === "Directory", this.portable);
146255
146310
  }
146256
146311
  write(t2, e, i) {
146257
146312
  typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, typeof e == "string" ? e : "utf8"));
@@ -146263,8 +146318,8 @@ var ni = class extends A {
146263
146318
  return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t2 == "function" && (i = t2, e = void 0, t2 = void 0), typeof e == "function" && (i = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, e ?? "utf8")), i && this.once("finish", i), t2 ? super.end(t2, i) : super.end(i), this;
146264
146319
  }
146265
146320
  };
146266
- var Pn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
146267
- var oi = class s2 {
146321
+ var Gn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
146322
+ var hi = class s2 {
146268
146323
  tail;
146269
146324
  head;
146270
146325
  length = 0;
@@ -146295,11 +146350,11 @@ var oi = class s2 {
146295
146350
  t2.list = this, t2.prev = e, e && (e.next = t2), this.tail = t2, this.head || (this.head = t2), this.length++;
146296
146351
  }
146297
146352
  push(...t2) {
146298
- for (let e = 0, i = t2.length; e < i; e++) Un(this, t2[e]);
146353
+ for (let e = 0, i = t2.length; e < i; e++) Yn(this, t2[e]);
146299
146354
  return this.length;
146300
146355
  }
146301
146356
  unshift(...t2) {
146302
- for (var e = 0, i = t2.length; e < i; e++) Hn(this, t2[e]);
146357
+ for (var e = 0, i = t2.length; e < i; e++) Kn(this, t2[e]);
146303
146358
  return this.length;
146304
146359
  }
146305
146360
  pop() {
@@ -146395,7 +146450,7 @@ var oi = class s2 {
146395
146450
  let n = [];
146396
146451
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
146397
146452
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
146398
- for (let o of i) r = zn(this, r, o);
146453
+ for (let o of i) r = Zn(this, r, o);
146399
146454
  return n;
146400
146455
  }
146401
146456
  reverse() {
@@ -146407,17 +146462,17 @@ var oi = class s2 {
146407
146462
  return this.head = e, this.tail = t2, this;
146408
146463
  }
146409
146464
  };
146410
- function zn(s3, t2, e) {
146411
- let i = t2, r = t2 ? t2.next : s3.head, n = new de(e, i, r, s3);
146465
+ function Zn(s3, t2, e) {
146466
+ let i = t2, r = t2 ? t2.next : s3.head, n = new me(e, i, r, s3);
146412
146467
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
146413
146468
  }
146414
- function Un(s3, t2) {
146415
- s3.tail = new de(t2, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
146469
+ function Yn(s3, t2) {
146470
+ s3.tail = new me(t2, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
146416
146471
  }
146417
- function Hn(s3, t2) {
146418
- s3.head = new de(t2, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
146472
+ function Kn(s3, t2) {
146473
+ s3.head = new me(t2, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
146419
146474
  }
146420
- var de = class {
146475
+ var me = class {
146421
146476
  list;
146422
146477
  next;
146423
146478
  prev;
@@ -146426,7 +146481,7 @@ var de = class {
146426
146481
  this.list = r, this.value = t2, e ? (e.next = this, this.prev = e) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
146427
146482
  }
146428
146483
  };
146429
- var mi = class {
146484
+ var pi = class {
146430
146485
  path;
146431
146486
  absolute;
146432
146487
  entry;
@@ -146440,28 +146495,28 @@ var mi = class {
146440
146495
  this.path = t2 || "./", this.absolute = e;
146441
146496
  }
146442
146497
  };
146443
- var ir = Buffer.alloc(1024);
146444
- var ai = /* @__PURE__ */ Symbol("onStat");
146498
+ var nr = Buffer.alloc(1024);
146499
+ var li = /* @__PURE__ */ Symbol("onStat");
146445
146500
  var ue = /* @__PURE__ */ Symbol("ended");
146446
146501
  var W = /* @__PURE__ */ Symbol("queue");
146447
- var me = /* @__PURE__ */ Symbol("pendingLinks");
146502
+ var pe = /* @__PURE__ */ Symbol("pendingLinks");
146448
146503
  var Et = /* @__PURE__ */ Symbol("current");
146449
- var Ct = /* @__PURE__ */ Symbol("process");
146450
- var pe = /* @__PURE__ */ Symbol("processing");
146451
- var hi = /* @__PURE__ */ Symbol("processJob");
146504
+ var Ft = /* @__PURE__ */ Symbol("process");
146505
+ var Ee = /* @__PURE__ */ Symbol("processing");
146506
+ var ai = /* @__PURE__ */ Symbol("processJob");
146452
146507
  var G2 = /* @__PURE__ */ Symbol("jobs");
146453
- var hs = /* @__PURE__ */ Symbol("jobDone");
146454
- var li = /* @__PURE__ */ Symbol("addFSEntry");
146455
- var sr = /* @__PURE__ */ Symbol("addTarEntry");
146456
- var cs = /* @__PURE__ */ Symbol("stat");
146457
- var fs2 = /* @__PURE__ */ Symbol("readdir");
146458
- var ci = /* @__PURE__ */ Symbol("onreaddir");
146459
- var fi = /* @__PURE__ */ Symbol("pipe");
146460
- var rr = /* @__PURE__ */ Symbol("entry");
146461
- var as = /* @__PURE__ */ Symbol("entryOpt");
146462
- var di = /* @__PURE__ */ Symbol("writeEntryClass");
146463
- var or = /* @__PURE__ */ Symbol("write");
146464
- var ls = /* @__PURE__ */ Symbol("ondrain");
146508
+ var ls = /* @__PURE__ */ Symbol("jobDone");
146509
+ var ci = /* @__PURE__ */ Symbol("addFSEntry");
146510
+ var or = /* @__PURE__ */ Symbol("addTarEntry");
146511
+ var ds = /* @__PURE__ */ Symbol("stat");
146512
+ var ms = /* @__PURE__ */ Symbol("readdir");
146513
+ var fi = /* @__PURE__ */ Symbol("onreaddir");
146514
+ var di = /* @__PURE__ */ Symbol("pipe");
146515
+ var hr = /* @__PURE__ */ Symbol("entry");
146516
+ var cs = /* @__PURE__ */ Symbol("entryOpt");
146517
+ var mi = /* @__PURE__ */ Symbol("writeEntryClass");
146518
+ var lr = /* @__PURE__ */ Symbol("write");
146519
+ var fs2 = /* @__PURE__ */ Symbol("ondrain");
146465
146520
  var wt = class extends A {
146466
146521
  sync = false;
146467
146522
  opt;
@@ -146483,139 +146538,139 @@ var wt = class extends A {
146483
146538
  mtime;
146484
146539
  filter;
146485
146540
  jobs;
146486
- [di];
146541
+ [mi];
146487
146542
  onWriteEntry;
146488
146543
  [W];
146489
- [me] = /* @__PURE__ */ new Map();
146544
+ [pe] = /* @__PURE__ */ new Map();
146490
146545
  [G2] = 0;
146491
- [pe] = false;
146546
+ [Ee] = false;
146492
146547
  [ue] = false;
146493
146548
  constructor(t2 = {}) {
146494
- if (super(), this.opt = t2, this.file = t2.file || "", this.cwd = t2.cwd || process.cwd(), this.maxReadSize = t2.maxReadSize, this.preservePaths = !!t2.preservePaths, this.strict = !!t2.strict, this.noPax = !!t2.noPax, this.prefix = f(t2.prefix || ""), this.linkCache = t2.linkCache || /* @__PURE__ */ new Map(), this.statCache = t2.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t2.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t2.onWriteEntry, this[di] = fe, typeof t2.onwarn == "function" && this.on("warn", t2.onwarn), this.portable = !!t2.portable, t2.gzip || t2.brotli || t2.zstd) {
146549
+ if (super(), this.opt = t2, this.file = t2.file || "", this.cwd = t2.cwd || process.cwd(), this.maxReadSize = t2.maxReadSize, this.preservePaths = !!t2.preservePaths, this.strict = !!t2.strict, this.noPax = !!t2.noPax, this.prefix = f(t2.prefix || ""), this.linkCache = t2.linkCache || /* @__PURE__ */ new Map(), this.statCache = t2.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t2.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t2.onWriteEntry, this[mi] = de, typeof t2.onwarn == "function" && this.on("warn", t2.onwarn), this.portable = !!t2.portable, t2.gzip || t2.brotli || t2.zstd) {
146495
146550
  if ((t2.gzip ? 1 : 0) + (t2.brotli ? 1 : 0) + (t2.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
146496
- if (t2.gzip && (typeof t2.gzip != "object" && (t2.gzip = {}), this.portable && (t2.gzip.portable = true), this.zip = new Pe(t2.gzip)), t2.brotli && (typeof t2.brotli != "object" && (t2.brotli = {}), this.zip = new He(t2.brotli)), t2.zstd && (typeof t2.zstd != "object" && (t2.zstd = {}), this.zip = new Ze(t2.zstd)), !this.zip) throw new Error("impossible");
146551
+ if (t2.gzip && (typeof t2.gzip != "object" && (t2.gzip = {}), this.portable && (t2.gzip.portable = true), this.zip = new ze(t2.gzip)), t2.brotli && (typeof t2.brotli != "object" && (t2.brotli = {}), this.zip = new We(t2.brotli)), t2.zstd && (typeof t2.zstd != "object" && (t2.zstd = {}), this.zip = new Ye(t2.zstd)), !this.zip) throw new Error("impossible");
146497
146552
  let e = this.zip;
146498
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[ls]()), this.on("resume", () => e.resume());
146499
- } else this.on("drain", this[ls]);
146500
- this.noDirRecurse = !!t2.noDirRecurse, this.follow = !!t2.follow, this.noMtime = !!t2.noMtime, t2.mtime && (this.mtime = t2.mtime), this.filter = typeof t2.filter == "function" ? t2.filter : () => true, this[W] = new oi(), this[G2] = 0, this.jobs = Number(t2.jobs) || 4, this[pe] = false, this[ue] = false;
146553
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs2]()), this.on("resume", () => e.resume());
146554
+ } else this.on("drain", this[fs2]);
146555
+ this.noDirRecurse = !!t2.noDirRecurse, this.follow = !!t2.follow, this.noMtime = !!t2.noMtime, t2.mtime && (this.mtime = t2.mtime), this.filter = typeof t2.filter == "function" ? t2.filter : () => true, this[W] = new hi(), this[G2] = 0, this.jobs = Number(t2.jobs) || 4, this[Ee] = false, this[ue] = false;
146501
146556
  }
146502
- [or](t2) {
146557
+ [lr](t2) {
146503
146558
  return super.write(t2);
146504
146559
  }
146505
146560
  add(t2) {
146506
146561
  return this.write(t2), this;
146507
146562
  }
146508
146563
  end(t2, e, i) {
146509
- return typeof t2 == "function" && (i = t2, t2 = void 0), typeof e == "function" && (i = e, e = void 0), t2 && this.add(t2), this[ue] = true, this[Ct](), i && i(), this;
146564
+ return typeof t2 == "function" && (i = t2, t2 = void 0), typeof e == "function" && (i = e, e = void 0), t2 && this.add(t2), this[ue] = true, this[Ft](), i && i(), this;
146510
146565
  }
146511
146566
  write(t2) {
146512
146567
  if (this[ue]) throw new Error("write after end");
146513
- return typeof t2 == "string" ? this[li](t2) : this[sr](t2), this.flowing;
146568
+ return typeof t2 == "string" ? this[ci](t2) : this[or](t2), this.flowing;
146514
146569
  }
146515
- [sr](t2) {
146570
+ [or](t2) {
146516
146571
  let e = f(import_path22.default.resolve(this.cwd, t2.path));
146517
146572
  if (!this.filter(t2.path, t2)) t2.resume();
146518
146573
  else {
146519
- let i = new mi(t2.path, e);
146520
- i.entry = new ni(t2, this[as](i)), i.entry.on("end", () => this[hs](i)), this[G2] += 1, this[W].push(i);
146574
+ let i = new pi(t2.path, e);
146575
+ i.entry = new oi(t2, this[cs](i)), i.entry.on("end", () => this[ls](i)), this[G2] += 1, this[W].push(i);
146521
146576
  }
146522
- this[Ct]();
146577
+ this[Ft]();
146523
146578
  }
146524
- [li](t2) {
146579
+ [ci](t2) {
146525
146580
  let e = f(import_path22.default.resolve(this.cwd, t2));
146526
- this[W].push(new mi(t2, e)), this[Ct]();
146581
+ this[W].push(new pi(t2, e)), this[Ft]();
146527
146582
  }
146528
- [cs](t2) {
146583
+ [ds](t2) {
146529
146584
  t2.pending = true, this[G2] += 1;
146530
146585
  let e = this.follow ? "stat" : "lstat";
146531
146586
  import_fs25.default[e](t2.absolute, (i, r) => {
146532
- t2.pending = false, this[G2] -= 1, i ? this.emit("error", i) : this[ai](t2, r);
146587
+ t2.pending = false, this[G2] -= 1, i ? this.emit("error", i) : this[li](t2, r);
146533
146588
  });
146534
146589
  }
146535
- [ai](t2, e) {
146590
+ [li](t2, e) {
146536
146591
  if (this.statCache.set(t2.absolute, e), t2.stat = e, !this.filter(t2.path, e)) t2.ignore = true;
146537
- else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t2 === this[Et]) this[hi](t2);
146592
+ else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t2 === this[Et]) this[ai](t2);
146538
146593
  else {
146539
- let i = `${e.dev}:${e.ino}`, r = this[me].get(i);
146540
- r ? r.push(t2) : this[me].set(i, [t2]), t2.pendingLink = true, t2.pending = true;
146594
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
146595
+ r ? r.push(t2) : this[pe].set(i, [t2]), t2.pendingLink = true, t2.pending = true;
146541
146596
  }
146542
- this[Ct]();
146597
+ this[Ft]();
146543
146598
  }
146544
- [fs2](t2) {
146599
+ [ms](t2) {
146545
146600
  t2.pending = true, this[G2] += 1, import_fs25.default.readdir(t2.absolute, (e, i) => {
146546
146601
  if (t2.pending = false, this[G2] -= 1, e) return this.emit("error", e);
146547
- this[ci](t2, i);
146602
+ this[fi](t2, i);
146548
146603
  });
146549
146604
  }
146550
- [ci](t2, e) {
146551
- this.readdirCache.set(t2.absolute, e), t2.readdir = e, this[Ct]();
146605
+ [fi](t2, e) {
146606
+ this.readdirCache.set(t2.absolute, e), t2.readdir = e, this[Ft]();
146552
146607
  }
146553
- [Ct]() {
146554
- if (!this[pe]) {
146555
- this[pe] = true;
146556
- for (let t2 = this[W].head; t2 && this[G2] < this.jobs; t2 = t2.next) if (this[hi](t2.value), t2.value.ignore) {
146608
+ [Ft]() {
146609
+ if (!this[Ee]) {
146610
+ this[Ee] = true;
146611
+ for (let t2 = this[W].head; t2 && this[G2] < this.jobs; t2 = t2.next) if (this[ai](t2.value), t2.value.ignore) {
146557
146612
  let e = t2.next;
146558
146613
  this[W].removeNode(t2), t2.next = e;
146559
146614
  }
146560
- this[pe] = false, this[ue] && this[W].length === 0 && this[G2] === 0 && (this.zip ? this.zip.end(ir) : (super.write(ir), super.end()));
146615
+ this[Ee] = false, this[ue] && this[W].length === 0 && this[G2] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
146561
146616
  }
146562
146617
  }
146563
146618
  get [Et]() {
146564
146619
  return this[W] && this[W].head && this[W].head.value;
146565
146620
  }
146566
- [hs](t2) {
146621
+ [ls](t2) {
146567
146622
  this[W].shift(), this[G2] -= 1;
146568
146623
  let { stat: e } = t2;
146569
146624
  if (e && e.isFile() && e.nlink > 1) {
146570
- let i = `${e.dev}:${e.ino}`, r = this[me].get(i);
146625
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
146571
146626
  if (r) {
146572
- this[me].delete(i);
146573
- for (let n of r) n.pending = false, this[hi](n);
146627
+ this[pe].delete(i);
146628
+ for (let n of r) n.pending = false, this[ai](n);
146574
146629
  }
146575
146630
  }
146576
- this[Ct]();
146631
+ this[Ft]();
146577
146632
  }
146578
- [hi](t2) {
146633
+ [ai](t2) {
146579
146634
  if (t2.pending && t2.pendingLink && t2 === this[Et] && (t2.pending = false, t2.pendingLink = false), !t2.pending) {
146580
146635
  if (t2.entry) {
146581
- t2 === this[Et] && !t2.piped && this[fi](t2);
146636
+ t2 === this[Et] && !t2.piped && this[di](t2);
146582
146637
  return;
146583
146638
  }
146584
146639
  if (!t2.stat) {
146585
146640
  let e = this.statCache.get(t2.absolute);
146586
- e ? this[ai](t2, e) : this[cs](t2);
146641
+ e ? this[li](t2, e) : this[ds](t2);
146587
146642
  }
146588
146643
  if (t2.stat && !t2.ignore) {
146589
146644
  if (!this.noDirRecurse && t2.stat.isDirectory() && !t2.readdir) {
146590
146645
  let e = this.readdirCache.get(t2.absolute);
146591
- if (e ? this[ci](t2, e) : this[fs2](t2), !t2.readdir) return;
146646
+ if (e ? this[fi](t2, e) : this[ms](t2), !t2.readdir) return;
146592
146647
  }
146593
- if (t2.entry = this[rr](t2), !t2.entry) {
146648
+ if (t2.entry = this[hr](t2), !t2.entry) {
146594
146649
  t2.ignore = true;
146595
146650
  return;
146596
146651
  }
146597
- t2 === this[Et] && !t2.piped && this[fi](t2);
146652
+ t2 === this[Et] && !t2.piped && this[di](t2);
146598
146653
  }
146599
146654
  }
146600
146655
  }
146601
- [as](t2) {
146656
+ [cs](t2) {
146602
146657
  return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t2.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 };
146603
146658
  }
146604
- [rr](t2) {
146659
+ [hr](t2) {
146605
146660
  this[G2] += 1;
146606
146661
  try {
146607
- return new this[di](t2.path, this[as](t2)).on("end", () => this[hs](t2)).on("error", (i) => this.emit("error", i));
146662
+ return new this[mi](t2.path, this[cs](t2)).on("end", () => this[ls](t2)).on("error", (i) => this.emit("error", i));
146608
146663
  } catch (e) {
146609
146664
  this.emit("error", e);
146610
146665
  }
146611
146666
  }
146612
- [ls]() {
146667
+ [fs2]() {
146613
146668
  this[Et] && this[Et].entry && this[Et].entry.resume();
146614
146669
  }
146615
- [fi](t2) {
146670
+ [di](t2) {
146616
146671
  t2.piped = true, t2.readdir && t2.readdir.forEach((r) => {
146617
146672
  let n = t2.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
146618
- this[li](o + r);
146673
+ this[ci](o + r);
146619
146674
  });
146620
146675
  let e = t2.entry, i = this.zip;
146621
146676
  if (!e) throw new Error("cannot pipe without source");
@@ -146629,137 +146684,137 @@ var wt = class extends A {
146629
146684
  return this.zip && this.zip.pause(), super.pause();
146630
146685
  }
146631
146686
  warn(t2, e, i = {}) {
146632
- Nt(this, t2, e, i);
146687
+ Dt(this, t2, e, i);
146633
146688
  }
146634
146689
  };
146635
146690
  var kt = class extends wt {
146636
146691
  sync = true;
146637
146692
  constructor(t2) {
146638
- super(t2), this[di] = ri;
146693
+ super(t2), this[mi] = ni;
146639
146694
  }
146640
146695
  pause() {
146641
146696
  }
146642
146697
  resume() {
146643
146698
  }
146644
- [cs](t2) {
146699
+ [ds](t2) {
146645
146700
  let e = this.follow ? "statSync" : "lstatSync";
146646
- this[ai](t2, import_fs25.default[e](t2.absolute));
146701
+ this[li](t2, import_fs25.default[e](t2.absolute));
146647
146702
  }
146648
- [fs2](t2) {
146649
- this[ci](t2, import_fs25.default.readdirSync(t2.absolute));
146703
+ [ms](t2) {
146704
+ this[fi](t2, import_fs25.default.readdirSync(t2.absolute));
146650
146705
  }
146651
- [fi](t2) {
146706
+ [di](t2) {
146652
146707
  let e = t2.entry, i = this.zip;
146653
146708
  if (t2.readdir && t2.readdir.forEach((r) => {
146654
146709
  let n = t2.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
146655
- this[li](o + r);
146710
+ this[ci](o + r);
146656
146711
  }), !e) throw new Error("Cannot pipe without source");
146657
146712
  i ? e.on("data", (r) => {
146658
146713
  i.write(r);
146659
146714
  }) : e.on("data", (r) => {
146660
- super[or](r);
146715
+ super[lr](r);
146661
146716
  });
146662
146717
  }
146663
146718
  };
146664
- var Wn = (s3, t2) => {
146719
+ var Vn = (s3, t2) => {
146665
146720
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
146666
- e.pipe(i), ar(e, t2);
146721
+ e.pipe(i), fr(e, t2);
146667
146722
  };
146668
- var Gn = (s3, t2) => {
146669
- let e = new wt(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
146723
+ var $n = (s3, t2) => {
146724
+ let e = new wt(s3), i = new et(s3.file, { mode: s3.mode || 438 });
146670
146725
  e.pipe(i);
146671
146726
  let r = new Promise((n, o) => {
146672
146727
  i.on("error", o), i.on("close", n), e.on("error", o);
146673
146728
  });
146674
- return lr(e, t2).catch((n) => e.emit("error", n)), r;
146729
+ return dr(e, t2).catch((n) => e.emit("error", n)), r;
146675
146730
  };
146676
- var ar = (s3, t2) => {
146731
+ var fr = (s3, t2) => {
146677
146732
  t2.forEach((e) => {
146678
- e.charAt(0) === "@" ? Ft({ file: import_node_path12.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
146733
+ e.charAt(0) === "@" ? Ct({ file: import_node_path12.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
146679
146734
  }), s3.end();
146680
146735
  };
146681
- var lr = async (s3, t2) => {
146682
- for (let e of t2) e.charAt(0) === "@" ? await Ft({ file: import_node_path12.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
146736
+ var dr = async (s3, t2) => {
146737
+ for (let e of t2) e.charAt(0) === "@" ? await Ct({ file: import_node_path12.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
146683
146738
  s3.add(i);
146684
146739
  } }) : s3.add(e);
146685
146740
  s3.end();
146686
146741
  };
146687
- var Zn = (s3, t2) => {
146742
+ var Xn = (s3, t2) => {
146688
146743
  let e = new kt(s3);
146689
- return ar(e, t2), e;
146744
+ return fr(e, t2), e;
146690
146745
  };
146691
- var Yn = (s3, t2) => {
146746
+ var qn = (s3, t2) => {
146692
146747
  let e = new wt(s3);
146693
- return lr(e, t2).catch((i) => e.emit("error", i)), e;
146748
+ return dr(e, t2).catch((i) => e.emit("error", i)), e;
146694
146749
  };
146695
- var Kn = K2(Wn, Gn, Zn, Yn, (s3, t2) => {
146750
+ var Qn = K2(Vn, $n, Xn, qn, (s3, t2) => {
146696
146751
  if (!t2?.length) throw new TypeError("no paths specified to add to archive");
146697
146752
  });
146698
- var Vn = process.env.__FAKE_PLATFORM__ || process.platform;
146699
- var ur = Vn === "win32";
146700
- var { O_CREAT: mr, O_NOFOLLOW: cr, O_TRUNC: pr, O_WRONLY: Er } = import_fs27.default.constants;
146701
- var wr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs27.default.constants.UV_FS_O_FILEMAP || 0;
146702
- var $n = ur && !!wr;
146703
- var Xn = 512 * 1024;
146704
- var qn = wr | pr | mr | Er;
146705
- var fr = !ur && typeof cr == "number" ? cr | pr | mr | Er : null;
146706
- var ds = fr !== null ? () => fr : $n ? (s3) => s3 < Xn ? qn : "w" : () => "w";
146707
- var us = (s3, t2, e) => {
146753
+ var Jn = process.env.__FAKE_PLATFORM__ || process.platform;
146754
+ var Er = Jn === "win32";
146755
+ var { O_CREAT: wr, O_NOFOLLOW: mr, O_TRUNC: Sr, O_WRONLY: yr } = import_fs27.default.constants;
146756
+ var Rr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs27.default.constants.UV_FS_O_FILEMAP || 0;
146757
+ var jn = Er && !!Rr;
146758
+ var to = 512 * 1024;
146759
+ var eo = Rr | Sr | wr | yr;
146760
+ var ur = !Er && typeof mr == "number" ? mr | Sr | wr | yr : null;
146761
+ var us = ur !== null ? () => ur : jn ? (s3) => s3 < to ? eo : "w" : () => "w";
146762
+ var ps = (s3, t2, e) => {
146708
146763
  try {
146709
146764
  return import_node_fs13.default.lchownSync(s3, t2, e);
146710
146765
  } catch (i) {
146711
146766
  if (i?.code !== "ENOENT") throw i;
146712
146767
  }
146713
146768
  };
146714
- var pi = (s3, t2, e, i) => {
146769
+ var Ei = (s3, t2, e, i) => {
146715
146770
  import_node_fs13.default.lchown(s3, t2, e, (r) => {
146716
146771
  i(r && r?.code !== "ENOENT" ? r : null);
146717
146772
  });
146718
146773
  };
146719
- var Qn = (s3, t2, e, i, r) => {
146720
- if (t2.isDirectory()) ms(import_node_path17.default.resolve(s3, t2.name), e, i, (n) => {
146774
+ var io = (s3, t2, e, i, r) => {
146775
+ if (t2.isDirectory()) Es(import_node_path17.default.resolve(s3, t2.name), e, i, (n) => {
146721
146776
  if (n) return r(n);
146722
146777
  let o = import_node_path17.default.resolve(s3, t2.name);
146723
- pi(o, e, i, r);
146778
+ Ei(o, e, i, r);
146724
146779
  });
146725
146780
  else {
146726
146781
  let n = import_node_path17.default.resolve(s3, t2.name);
146727
- pi(n, e, i, r);
146782
+ Ei(n, e, i, r);
146728
146783
  }
146729
146784
  };
146730
- var ms = (s3, t2, e, i) => {
146785
+ var Es = (s3, t2, e, i) => {
146731
146786
  import_node_fs13.default.readdir(s3, { withFileTypes: true }, (r, n) => {
146732
146787
  if (r) {
146733
146788
  if (r.code === "ENOENT") return i();
146734
146789
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
146735
146790
  }
146736
- if (r || !n.length) return pi(s3, t2, e, i);
146737
- let o = n.length, a = null, h = (l) => {
146738
- if (!a) {
146739
- if (l) return i(a = l);
146740
- if (--o === 0) return pi(s3, t2, e, i);
146791
+ if (r || !n.length) return Ei(s3, t2, e, i);
146792
+ let o = n.length, h = null, a = (l) => {
146793
+ if (!h) {
146794
+ if (l) return i(h = l);
146795
+ if (--o === 0) return Ei(s3, t2, e, i);
146741
146796
  }
146742
146797
  };
146743
- for (let l of n) Qn(s3, l, t2, e, h);
146798
+ for (let l of n) io(s3, l, t2, e, a);
146744
146799
  });
146745
146800
  };
146746
- var Jn = (s3, t2, e, i) => {
146747
- t2.isDirectory() && ps(import_node_path17.default.resolve(s3, t2.name), e, i), us(import_node_path17.default.resolve(s3, t2.name), e, i);
146801
+ var so = (s3, t2, e, i) => {
146802
+ t2.isDirectory() && ws(import_node_path17.default.resolve(s3, t2.name), e, i), ps(import_node_path17.default.resolve(s3, t2.name), e, i);
146748
146803
  };
146749
- var ps = (s3, t2, e) => {
146804
+ var ws = (s3, t2, e) => {
146750
146805
  let i;
146751
146806
  try {
146752
146807
  i = import_node_fs13.default.readdirSync(s3, { withFileTypes: true });
146753
146808
  } catch (r) {
146754
146809
  let n = r;
146755
146810
  if (n?.code === "ENOENT") return;
146756
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return us(s3, t2, e);
146811
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ps(s3, t2, e);
146757
146812
  throw n;
146758
146813
  }
146759
- for (let r of i) Jn(s3, r, t2, e);
146760
- return us(s3, t2, e);
146814
+ for (let r of i) so(s3, r, t2, e);
146815
+ return ps(s3, t2, e);
146761
146816
  };
146762
- var we = class extends Error {
146817
+ var Se = class extends Error {
146763
146818
  path;
146764
146819
  code;
146765
146820
  syscall = "chdir";
@@ -146782,97 +146837,97 @@ var St = class extends Error {
146782
146837
  return "SymlinkError";
146783
146838
  }
146784
146839
  };
146785
- var to = (s3, t2) => {
146840
+ var no = (s3, t2) => {
146786
146841
  import_node_fs14.default.stat(s3, (e, i) => {
146787
- (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t2(e);
146842
+ (e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t2(e);
146788
146843
  });
146789
146844
  };
146790
- var Sr = (s3, t2, e) => {
146845
+ var gr = (s3, t2, e) => {
146791
146846
  s3 = f(s3);
146792
- let i = t2.umask ?? 18, r = t2.mode | 448, n = (r & i) !== 0, o = t2.uid, a = t2.gid, h = typeof o == "number" && typeof a == "number" && (o !== t2.processUid || a !== t2.processGid), l = t2.preserve, c = t2.unlink, d = f(t2.cwd), S2 = (E2, x2) => {
146793
- E2 ? e(E2) : x2 && h ? ms(x2, o, a, (xe) => S2(xe)) : n ? import_node_fs14.default.chmod(s3, r, e) : e();
146847
+ let i = t2.umask ?? 18, r = t2.mode | 448, n = (r & i) !== 0, o = t2.uid, h = t2.gid, a = typeof o == "number" && typeof h == "number" && (o !== t2.processUid || h !== t2.processGid), l = t2.preserve, c = t2.unlink, d = f(t2.cwd), S2 = (E2, x2) => {
146848
+ E2 ? e(E2) : x2 && a ? Es(x2, o, h, (Le) => S2(Le)) : n ? import_node_fs14.default.chmod(s3, r, e) : e();
146794
146849
  };
146795
- if (s3 === d) return to(s3, S2);
146850
+ if (s3 === d) return no(s3, S2);
146796
146851
  if (l) return import_promises16.default.mkdir(s3, { mode: r, recursive: true }).then((E2) => S2(null, E2 ?? void 0), S2);
146797
- let N2 = f(import_node_path18.default.relative(d, s3)).split("/");
146798
- Es(d, N2, r, c, d, void 0, S2);
146852
+ let D2 = f(import_node_path18.default.relative(d, s3)).split("/");
146853
+ Ss(d, D2, r, c, d, void 0, S2);
146799
146854
  };
146800
- var Es = (s3, t2, e, i, r, n, o) => {
146855
+ var Ss = (s3, t2, e, i, r, n, o) => {
146801
146856
  if (t2.length === 0) return o(null, n);
146802
- let a = t2.shift(), h = f(import_node_path18.default.resolve(s3 + "/" + a));
146803
- import_node_fs14.default.mkdir(h, e, yr(h, t2, e, i, r, n, o));
146857
+ let h = t2.shift(), a = f(import_node_path18.default.resolve(s3 + "/" + h));
146858
+ import_node_fs14.default.mkdir(a, e, br(a, t2, e, i, r, n, o));
146804
146859
  };
146805
- var yr = (s3, t2, e, i, r, n, o) => (a) => {
146806
- a ? import_node_fs14.default.lstat(s3, (h, l) => {
146807
- if (h) h.path = h.path && f(h.path), o(h);
146808
- else if (l.isDirectory()) Es(s3, t2, e, i, r, n, o);
146860
+ var br = (s3, t2, e, i, r, n, o) => (h) => {
146861
+ h ? import_node_fs14.default.lstat(s3, (a, l) => {
146862
+ if (a) a.path = a.path && f(a.path), o(a);
146863
+ else if (l.isDirectory()) Ss(s3, t2, e, i, r, n, o);
146809
146864
  else if (i) import_node_fs14.default.unlink(s3, (c) => {
146810
146865
  if (c) return o(c);
146811
- import_node_fs14.default.mkdir(s3, e, yr(s3, t2, e, i, r, n, o));
146866
+ import_node_fs14.default.mkdir(s3, e, br(s3, t2, e, i, r, n, o));
146812
146867
  });
146813
146868
  else {
146814
146869
  if (l.isSymbolicLink()) return o(new St(s3, s3 + "/" + t2.join("/")));
146815
- o(a);
146870
+ o(h);
146816
146871
  }
146817
- }) : (n = n || s3, Es(s3, t2, e, i, r, n, o));
146872
+ }) : (n = n || s3, Ss(s3, t2, e, i, r, n, o));
146818
146873
  };
146819
- var eo = (s3) => {
146874
+ var oo = (s3) => {
146820
146875
  let t2 = false, e;
146821
146876
  try {
146822
146877
  t2 = import_node_fs14.default.statSync(s3).isDirectory();
146823
146878
  } catch (i) {
146824
146879
  e = i?.code;
146825
146880
  } finally {
146826
- if (!t2) throw new we(s3, e ?? "ENOTDIR");
146881
+ if (!t2) throw new Se(s3, e ?? "ENOTDIR");
146827
146882
  }
146828
146883
  };
146829
- var Rr = (s3, t2) => {
146884
+ var _r = (s3, t2) => {
146830
146885
  s3 = f(s3);
146831
- let e = t2.umask ?? 18, i = t2.mode | 448, r = (i & e) !== 0, n = t2.uid, o = t2.gid, a = typeof n == "number" && typeof o == "number" && (n !== t2.processUid || o !== t2.processGid), h = t2.preserve, l = t2.unlink, c = f(t2.cwd), d = (E2) => {
146832
- E2 && a && ps(E2, n, o), r && import_node_fs14.default.chmodSync(s3, i);
146886
+ let e = t2.umask ?? 18, i = t2.mode | 448, r = (i & e) !== 0, n = t2.uid, o = t2.gid, h = typeof n == "number" && typeof o == "number" && (n !== t2.processUid || o !== t2.processGid), a = t2.preserve, l = t2.unlink, c = f(t2.cwd), d = (E2) => {
146887
+ E2 && h && ws(E2, n, o), r && import_node_fs14.default.chmodSync(s3, i);
146833
146888
  };
146834
- if (s3 === c) return eo(c), d();
146835
- if (h) return d(import_node_fs14.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
146836
- let T2 = f(import_node_path18.default.relative(c, s3)).split("/"), N2;
146889
+ if (s3 === c) return oo(c), d();
146890
+ if (a) return d(import_node_fs14.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
146891
+ let T2 = f(import_node_path18.default.relative(c, s3)).split("/"), D2;
146837
146892
  for (let E2 = T2.shift(), x2 = c; E2 && (x2 += "/" + E2); E2 = T2.shift()) {
146838
146893
  x2 = f(import_node_path18.default.resolve(x2));
146839
146894
  try {
146840
- import_node_fs14.default.mkdirSync(x2, i), N2 = N2 || x2;
146895
+ import_node_fs14.default.mkdirSync(x2, i), D2 = D2 || x2;
146841
146896
  } catch {
146842
- let xe = import_node_fs14.default.lstatSync(x2);
146843
- if (xe.isDirectory()) continue;
146897
+ let Le = import_node_fs14.default.lstatSync(x2);
146898
+ if (Le.isDirectory()) continue;
146844
146899
  if (l) {
146845
- import_node_fs14.default.unlinkSync(x2), import_node_fs14.default.mkdirSync(x2, i), N2 = N2 || x2;
146900
+ import_node_fs14.default.unlinkSync(x2), import_node_fs14.default.mkdirSync(x2, i), D2 = D2 || x2;
146846
146901
  continue;
146847
- } else if (xe.isSymbolicLink()) return new St(x2, x2 + "/" + T2.join("/"));
146902
+ } else if (Le.isSymbolicLink()) return new St(x2, x2 + "/" + T2.join("/"));
146848
146903
  }
146849
146904
  }
146850
- return d(N2);
146905
+ return d(D2);
146851
146906
  };
146852
- var ws = /* @__PURE__ */ Object.create(null);
146853
- var gr = 1e4;
146907
+ var ys = /* @__PURE__ */ Object.create(null);
146908
+ var Or = 1e4;
146854
146909
  var Vt = /* @__PURE__ */ new Set();
146855
- var br = (s3) => {
146856
- Vt.has(s3) ? Vt.delete(s3) : ws[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
146857
- let t2 = ws[s3], e = Vt.size - gr;
146858
- if (e > gr / 10) {
146859
- for (let i of Vt) if (Vt.delete(i), delete ws[i], --e <= 0) break;
146910
+ var Tr = (s3) => {
146911
+ Vt.has(s3) ? Vt.delete(s3) : ys[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
146912
+ let t2 = ys[s3], e = Vt.size - Or;
146913
+ if (e > Or / 10) {
146914
+ for (let i of Vt) if (Vt.delete(i), delete ys[i], --e <= 0) break;
146860
146915
  }
146861
146916
  return t2;
146862
146917
  };
146863
- var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
146864
- var so = io === "win32";
146865
- var ro = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
146918
+ var ho = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
146919
+ var ao = ho === "win32";
146920
+ var lo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
146866
146921
  let r = e.at(-1);
146867
146922
  return r !== void 0 && (i = (0, import_node_path19.join)(r, i)), e.push(i || "/"), e;
146868
146923
  }, []);
146869
- var Si = class {
146924
+ var yi = class {
146870
146925
  #t = /* @__PURE__ */ new Map();
146871
146926
  #i = /* @__PURE__ */ new Map();
146872
146927
  #s = /* @__PURE__ */ new Set();
146873
146928
  reserve(t2, e) {
146874
- t2 = so ? ["win32 parallelization disabled"] : t2.map((r) => mt((0, import_node_path19.join)(br(r))));
146875
- let i = new Set(t2.map((r) => ro(r)).reduce((r, n) => r.concat(n)));
146929
+ t2 = ao ? ["win32 parallelization disabled"] : t2.map((r) => ut((0, import_node_path19.join)(Tr(r))));
146930
+ let i = new Set(t2.map((r) => lo(r)).reduce((r, n) => r.concat(n)));
146876
146931
  this.#i.set(e, { dirs: i, paths: t2 });
146877
146932
  for (let r of t2) {
146878
146933
  let n = this.#t.get(r);
@@ -146906,79 +146961,79 @@ var Si = class {
146906
146961
  if (!e) throw new Error("invalid reservation");
146907
146962
  let { paths: i, dirs: r } = e, n = /* @__PURE__ */ new Set();
146908
146963
  for (let o of i) {
146909
- let a = this.#t.get(o);
146910
- if (!a || a?.[0] !== t2) continue;
146911
- let h = a[1];
146912
- if (!h) {
146964
+ let h = this.#t.get(o);
146965
+ if (!h || h?.[0] !== t2) continue;
146966
+ let a = h[1];
146967
+ if (!a) {
146913
146968
  this.#t.delete(o);
146914
146969
  continue;
146915
146970
  }
146916
- if (a.shift(), typeof h == "function") n.add(h);
146917
- else for (let l of h) n.add(l);
146971
+ if (h.shift(), typeof a == "function") n.add(a);
146972
+ else for (let l of a) n.add(l);
146918
146973
  }
146919
146974
  for (let o of r) {
146920
- let a = this.#t.get(o), h = a?.[0];
146921
- if (!(!a || !(h instanceof Set))) if (h.size === 1 && a.length === 1) {
146975
+ let h = this.#t.get(o), a = h?.[0];
146976
+ if (!(!h || !(a instanceof Set))) if (a.size === 1 && h.length === 1) {
146922
146977
  this.#t.delete(o);
146923
146978
  continue;
146924
- } else if (h.size === 1) {
146925
- a.shift();
146926
- let l = a[0];
146979
+ } else if (a.size === 1) {
146980
+ h.shift();
146981
+ let l = h[0];
146927
146982
  typeof l == "function" && n.add(l);
146928
- } else h.delete(t2);
146983
+ } else a.delete(t2);
146929
146984
  }
146930
146985
  return this.#s.delete(t2), n.forEach((o) => this.#r(o)), true;
146931
146986
  }
146932
146987
  };
146933
- var Or = () => process.umask();
146934
- var Tr = /* @__PURE__ */ Symbol("onEntry");
146935
- var gs = /* @__PURE__ */ Symbol("checkFs");
146936
- var xr = /* @__PURE__ */ Symbol("checkFs2");
146937
- var bs = /* @__PURE__ */ Symbol("isReusable");
146988
+ var Lr = () => process.umask();
146989
+ var Dr = /* @__PURE__ */ Symbol("onEntry");
146990
+ var _s = /* @__PURE__ */ Symbol("checkFs");
146991
+ var Nr = /* @__PURE__ */ Symbol("checkFs2");
146992
+ var Os = /* @__PURE__ */ Symbol("isReusable");
146938
146993
  var P2 = /* @__PURE__ */ Symbol("makeFs");
146939
- var _s = /* @__PURE__ */ Symbol("file");
146940
- var Os = /* @__PURE__ */ Symbol("directory");
146941
- var Ri = /* @__PURE__ */ Symbol("link");
146942
- var Lr = /* @__PURE__ */ Symbol("symlink");
146943
- var Nr = /* @__PURE__ */ Symbol("hardlink");
146944
- var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
146945
- var Dr = /* @__PURE__ */ Symbol("unsupported");
146946
- var Ar = /* @__PURE__ */ Symbol("checkPath");
146947
- var Ss = /* @__PURE__ */ Symbol("stripAbsolutePath");
146994
+ var Ts = /* @__PURE__ */ Symbol("file");
146995
+ var xs = /* @__PURE__ */ Symbol("directory");
146996
+ var gi = /* @__PURE__ */ Symbol("link");
146997
+ var Ar = /* @__PURE__ */ Symbol("symlink");
146998
+ var Ir = /* @__PURE__ */ Symbol("hardlink");
146999
+ var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
147000
+ var Cr = /* @__PURE__ */ Symbol("unsupported");
147001
+ var Fr = /* @__PURE__ */ Symbol("checkPath");
147002
+ var Rs = /* @__PURE__ */ Symbol("stripAbsolutePath");
146948
147003
  var yt = /* @__PURE__ */ Symbol("mkdir");
146949
147004
  var O2 = /* @__PURE__ */ Symbol("onError");
146950
- var yi = /* @__PURE__ */ Symbol("pending");
146951
- var Ir = /* @__PURE__ */ Symbol("pend");
147005
+ var Ri = /* @__PURE__ */ Symbol("pending");
147006
+ var kr = /* @__PURE__ */ Symbol("pend");
146952
147007
  var $t = /* @__PURE__ */ Symbol("unpend");
146953
- var ys = /* @__PURE__ */ Symbol("ended");
146954
- var Rs = /* @__PURE__ */ Symbol("maybeClose");
146955
- var Ts = /* @__PURE__ */ Symbol("skip");
146956
- var Re = /* @__PURE__ */ Symbol("doChown");
146957
- var ge = /* @__PURE__ */ Symbol("uid");
146958
- var be = /* @__PURE__ */ Symbol("gid");
146959
- var _e = /* @__PURE__ */ Symbol("checkedCwd");
146960
- var oo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
146961
- var Oe = oo === "win32";
146962
- var ho = 1024;
146963
- var ao = (s3, t2) => {
146964
- if (!Oe) return import_node_fs12.default.unlink(s3, t2);
147008
+ var gs = /* @__PURE__ */ Symbol("ended");
147009
+ var bs = /* @__PURE__ */ Symbol("maybeClose");
147010
+ var Ls = /* @__PURE__ */ Symbol("skip");
147011
+ var ge = /* @__PURE__ */ Symbol("doChown");
147012
+ var be = /* @__PURE__ */ Symbol("uid");
147013
+ var _e = /* @__PURE__ */ Symbol("gid");
147014
+ var Oe = /* @__PURE__ */ Symbol("checkedCwd");
147015
+ var fo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
147016
+ var Te = fo === "win32";
147017
+ var mo = 1024;
147018
+ var uo = (s3, t2) => {
147019
+ if (!Te) return import_node_fs12.default.unlink(s3, t2);
146965
147020
  let e = s3 + ".DELETE." + (0, import_node_crypto5.randomBytes)(16).toString("hex");
146966
147021
  import_node_fs12.default.rename(s3, e, (i) => {
146967
147022
  if (i) return t2(i);
146968
147023
  import_node_fs12.default.unlink(e, t2);
146969
147024
  });
146970
147025
  };
146971
- var lo = (s3) => {
146972
- if (!Oe) return import_node_fs12.default.unlinkSync(s3);
147026
+ var po = (s3) => {
147027
+ if (!Te) return import_node_fs12.default.unlinkSync(s3);
146973
147028
  let t2 = s3 + ".DELETE." + (0, import_node_crypto5.randomBytes)(16).toString("hex");
146974
147029
  import_node_fs12.default.renameSync(s3, t2), import_node_fs12.default.unlinkSync(t2);
146975
147030
  };
146976
- var Fr = (s3, t2, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t2 !== void 0 && t2 === t2 >>> 0 ? t2 : e;
146977
- var Xt = class extends st {
146978
- [ys] = false;
146979
- [_e] = false;
146980
- [yi] = 0;
146981
- reservations = new Si();
147031
+ var vr = (s3, t2, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t2 !== void 0 && t2 === t2 >>> 0 ? t2 : e;
147032
+ var Xt = class extends rt {
147033
+ [gs] = false;
147034
+ [Oe] = false;
147035
+ [Ri] = 0;
147036
+ reservations = new yi();
146982
147037
  transform;
146983
147038
  writable = true;
146984
147039
  readable = false;
@@ -147005,32 +147060,32 @@ var Xt = class extends st {
147005
147060
  chmod;
147006
147061
  constructor(t2 = {}) {
147007
147062
  if (t2.ondone = () => {
147008
- this[ys] = true, this[Rs]();
147063
+ this[gs] = true, this[bs]();
147009
147064
  }, super(t2), this.transform = t2.transform, this.chmod = !!t2.chmod, typeof t2.uid == "number" || typeof t2.gid == "number") {
147010
147065
  if (typeof t2.uid != "number" || typeof t2.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
147011
147066
  if (t2.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
147012
147067
  this.uid = t2.uid, this.gid = t2.gid, this.setOwner = true;
147013
147068
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
147014
- this.preserveOwner = t2.preserveOwner === void 0 && typeof t2.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t2.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 t2.maxDepth == "number" ? t2.maxDepth : ho, this.forceChown = t2.forceChown === true, this.win32 = !!t2.win32 || Oe, this.newer = !!t2.newer, this.keep = !!t2.keep, this.noMtime = !!t2.noMtime, this.preservePaths = !!t2.preservePaths, this.unlink = !!t2.unlink, this.cwd = f(import_node_path16.default.resolve(t2.cwd || process.cwd())), this.strip = Number(t2.strip) || 0, this.processUmask = this.chmod ? typeof t2.processUmask == "number" ? t2.processUmask : Or() : 0, this.umask = typeof t2.umask == "number" ? t2.umask : this.processUmask, this.dmode = t2.dmode || 511 & ~this.umask, this.fmode = t2.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Tr](e));
147069
+ this.preserveOwner = t2.preserveOwner === void 0 && typeof t2.uid != "number" ? process.getuid?.() === 0 : !!t2.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 t2.maxDepth == "number" ? t2.maxDepth : mo, this.forceChown = t2.forceChown === true, this.win32 = !!t2.win32 || Te, this.newer = !!t2.newer, this.keep = !!t2.keep, this.noMtime = !!t2.noMtime, this.preservePaths = !!t2.preservePaths, this.unlink = !!t2.unlink, this.cwd = f(import_node_path16.default.resolve(t2.cwd || process.cwd())), this.strip = Number(t2.strip) || 0, this.processUmask = this.chmod ? typeof t2.processUmask == "number" ? t2.processUmask : Lr() : 0, this.umask = typeof t2.umask == "number" ? t2.umask : this.processUmask, this.dmode = t2.dmode || 511 & ~this.umask, this.fmode = t2.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Dr](e));
147015
147070
  }
147016
147071
  warn(t2, e, i = {}) {
147017
147072
  return (t2 === "TAR_BAD_ARCHIVE" || t2 === "TAR_ABORT") && (i.recoverable = false), super.warn(t2, e, i);
147018
147073
  }
147019
- [Rs]() {
147020
- this[ys] && this[yi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
147074
+ [bs]() {
147075
+ this[gs] && this[Ri] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
147021
147076
  }
147022
- [Ss](t2, e) {
147077
+ [Rs](t2, e) {
147023
147078
  let i = t2[e], { type: r } = t2;
147024
147079
  if (!i || this.preservePaths) return true;
147025
- let [n, o] = le(i), a = o.replaceAll(/\\/g, "/").split("/");
147026
- if (a.includes("..") || Oe && /^[a-z]:\.\.$/i.test(a[0] ?? "")) {
147080
+ let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
147081
+ if (h.includes("..") || Te && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
147027
147082
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t2, [e]: i }), false;
147028
- let h = import_node_path16.default.posix.dirname(t2.path), l = import_node_path16.default.posix.normalize(import_node_path16.default.posix.join(h, a.join("/")));
147083
+ let a = import_node_path16.default.posix.dirname(t2.path), l = import_node_path16.default.posix.normalize(import_node_path16.default.posix.join(a, h.join("/")));
147029
147084
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t2, [e]: i }), false;
147030
147085
  }
147031
147086
  return n && (t2[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t2, [e]: i })), true;
147032
147087
  }
147033
- [Ar](t2) {
147088
+ [Fr](t2) {
147034
147089
  let e = f(t2.path), i = e.split("/");
147035
147090
  if (this.strip) {
147036
147091
  if (i.length < this.strip) return false;
@@ -147042,19 +147097,19 @@ var Xt = class extends st {
147042
147097
  i.splice(0, this.strip), t2.path = i.join("/");
147043
147098
  }
147044
147099
  if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t2, path: e, depth: i.length, maxDepth: this.maxDepth }), false;
147045
- if (!this[Ss](t2, "path") || !this[Ss](t2, "linkpath")) return false;
147100
+ if (!this[Rs](t2, "path") || !this[Rs](t2, "linkpath")) return false;
147046
147101
  if (t2.absolute = import_node_path16.default.isAbsolute(t2.path) ? f(import_node_path16.default.resolve(t2.path)) : f(import_node_path16.default.resolve(this.cwd, t2.path)), !this.preservePaths && typeof t2.absolute == "string" && t2.absolute.indexOf(this.cwd + "/") !== 0 && t2.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t2, path: f(t2.path), resolvedPath: t2.absolute, cwd: this.cwd }), false;
147047
147102
  if (t2.absolute === this.cwd && t2.type !== "Directory" && t2.type !== "GNUDumpDir") return false;
147048
147103
  if (this.win32) {
147049
147104
  let { root: r } = import_node_path16.default.win32.parse(String(t2.absolute));
147050
- t2.absolute = r + Ji(String(t2.absolute).slice(r.length));
147105
+ t2.absolute = r + ts(String(t2.absolute).slice(r.length));
147051
147106
  let { root: n } = import_node_path16.default.win32.parse(t2.path);
147052
- t2.path = n + Ji(t2.path.slice(n.length));
147107
+ t2.path = n + ts(t2.path.slice(n.length));
147053
147108
  }
147054
147109
  return true;
147055
147110
  }
147056
- [Tr](t2) {
147057
- if (!this[Ar](t2)) return t2.resume();
147111
+ [Dr](t2) {
147112
+ if (!this[Fr](t2)) return t2.resume();
147058
147113
  switch (import_node_assert.default.equal(typeof t2.absolute, "string"), t2.type) {
147059
147114
  case "Directory":
147060
147115
  case "GNUDumpDir":
@@ -147064,36 +147119,36 @@ var Xt = class extends st {
147064
147119
  case "ContiguousFile":
147065
147120
  case "Link":
147066
147121
  case "SymbolicLink":
147067
- return this[gs](t2);
147122
+ return this[_s](t2);
147068
147123
  default:
147069
- return this[Dr](t2);
147124
+ return this[Cr](t2);
147070
147125
  }
147071
147126
  }
147072
147127
  [O2](t2, e) {
147073
147128
  t2.name === "CwdError" ? this.emit("error", t2) : (this.warn("TAR_ENTRY_ERROR", t2, { entry: e }), this[$t](), e.resume());
147074
147129
  }
147075
147130
  [yt](t2, e, i) {
147076
- Sr(f(t2), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
147077
- }
147078
- [Re](t2) {
147079
- return this.forceChown || this.preserveOwner && (typeof t2.uid == "number" && t2.uid !== this.processUid || typeof t2.gid == "number" && t2.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
147131
+ gr(f(t2), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
147080
147132
  }
147081
147133
  [ge](t2) {
147082
- return Fr(this.uid, t2.uid, this.processUid);
147134
+ return this.forceChown || this.preserveOwner && (typeof t2.uid == "number" && t2.uid !== this.processUid || typeof t2.gid == "number" && t2.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
147083
147135
  }
147084
147136
  [be](t2) {
147085
- return Fr(this.gid, t2.gid, this.processGid);
147137
+ return vr(this.uid, t2.uid, this.processUid);
147138
+ }
147139
+ [_e](t2) {
147140
+ return vr(this.gid, t2.gid, this.processGid);
147086
147141
  }
147087
- [_s](t2, e) {
147088
- let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.fmode, r = new tt(String(t2.absolute), { flags: ds(t2.size), mode: i, autoClose: false });
147089
- r.on("error", (h) => {
147142
+ [Ts](t2, e) {
147143
+ let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.fmode, r = new et(String(t2.absolute), { flags: us(t2.size), mode: i, autoClose: false });
147144
+ r.on("error", (a) => {
147090
147145
  r.fd && import_node_fs12.default.close(r.fd, () => {
147091
- }), r.write = () => true, this[O2](h, t2), e();
147146
+ }), r.write = () => true, this[O2](a, t2), e();
147092
147147
  });
147093
- let n = 1, o = (h) => {
147094
- if (h) {
147148
+ let n = 1, o = (a) => {
147149
+ if (a) {
147095
147150
  r.fd && import_node_fs12.default.close(r.fd, () => {
147096
- }), this[O2](h, t2), e();
147151
+ }), this[O2](a, t2), e();
147097
147152
  return;
147098
147153
  }
147099
147154
  --n === 0 && r.fd !== void 0 && import_node_fs12.default.close(r.fd, (l) => {
@@ -147101,25 +147156,25 @@ var Xt = class extends st {
147101
147156
  });
147102
147157
  };
147103
147158
  r.on("finish", () => {
147104
- let h = String(t2.absolute), l = r.fd;
147159
+ let a = String(t2.absolute), l = r.fd;
147105
147160
  if (typeof l == "number" && t2.mtime && !this.noMtime) {
147106
147161
  n++;
147107
147162
  let c = t2.atime || /* @__PURE__ */ new Date(), d = t2.mtime;
147108
- import_node_fs12.default.futimes(l, c, d, (S2) => S2 ? import_node_fs12.default.utimes(h, c, d, (T2) => o(T2 && S2)) : o());
147163
+ import_node_fs12.default.futimes(l, c, d, (S2) => S2 ? import_node_fs12.default.utimes(a, c, d, (T2) => o(T2 && S2)) : o());
147109
147164
  }
147110
- if (typeof l == "number" && this[Re](t2)) {
147165
+ if (typeof l == "number" && this[ge](t2)) {
147111
147166
  n++;
147112
- let c = this[ge](t2), d = this[be](t2);
147113
- typeof c == "number" && typeof d == "number" && import_node_fs12.default.fchown(l, c, d, (S2) => S2 ? import_node_fs12.default.chown(h, c, d, (T2) => o(T2 && S2)) : o());
147167
+ let c = this[be](t2), d = this[_e](t2);
147168
+ typeof c == "number" && typeof d == "number" && import_node_fs12.default.fchown(l, c, d, (S2) => S2 ? import_node_fs12.default.chown(a, c, d, (T2) => o(T2 && S2)) : o());
147114
147169
  }
147115
147170
  o();
147116
147171
  });
147117
- let a = this.transform && this.transform(t2) || t2;
147118
- a !== t2 && (a.on("error", (h) => {
147119
- this[O2](h, t2), e();
147120
- }), t2.pipe(a)), a.pipe(r);
147172
+ let h = this.transform && this.transform(t2) || t2;
147173
+ h !== t2 && (h.on("error", (a) => {
147174
+ this[O2](a, t2), e();
147175
+ }), t2.pipe(h)), h.pipe(r);
147121
147176
  }
147122
- [Os](t2, e) {
147177
+ [xs](t2, e) {
147123
147178
  let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.dmode;
147124
147179
  this[yt](String(t2.absolute), i, (r) => {
147125
147180
  if (r) {
@@ -147129,68 +147184,68 @@ var Xt = class extends st {
147129
147184
  let n = 1, o = () => {
147130
147185
  --n === 0 && (e(), this[$t](), t2.resume());
147131
147186
  };
147132
- t2.mtime && !this.noMtime && (n++, import_node_fs12.default.utimes(String(t2.absolute), t2.atime || /* @__PURE__ */ new Date(), t2.mtime, o)), this[Re](t2) && (n++, import_node_fs12.default.chown(String(t2.absolute), Number(this[ge](t2)), Number(this[be](t2)), o)), o();
147187
+ t2.mtime && !this.noMtime && (n++, import_node_fs12.default.utimes(String(t2.absolute), t2.atime || /* @__PURE__ */ new Date(), t2.mtime, o)), this[ge](t2) && (n++, import_node_fs12.default.chown(String(t2.absolute), Number(this[be](t2)), Number(this[_e](t2)), o)), o();
147133
147188
  });
147134
147189
  }
147135
- [Dr](t2) {
147190
+ [Cr](t2) {
147136
147191
  t2.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t2.type}`, { entry: t2 }), t2.resume();
147137
147192
  }
147138
- [Lr](t2, e) {
147193
+ [Ar](t2, e) {
147139
147194
  let i = f(import_node_path16.default.relative(this.cwd, import_node_path16.default.resolve(import_node_path16.default.dirname(String(t2.absolute)), String(t2.linkpath)))).split("/");
147140
- this[ye](t2, this.cwd, i, () => this[Ri](t2, String(t2.linkpath), "symlink", e), (r) => {
147195
+ this[Re](t2, this.cwd, i, () => this[gi](t2, String(t2.linkpath), "symlink", e), (r) => {
147141
147196
  this[O2](r, t2), e();
147142
147197
  });
147143
147198
  }
147144
- [Nr](t2, e) {
147199
+ [Ir](t2, e) {
147145
147200
  let i = f(import_node_path16.default.resolve(this.cwd, String(t2.linkpath))), r = f(String(t2.linkpath)).split("/");
147146
- this[ye](t2, this.cwd, r, () => this[Ri](t2, i, "link", e), (n) => {
147201
+ this[Re](t2, this.cwd, r, () => this[gi](t2, i, "link", e), (n) => {
147147
147202
  this[O2](n, t2), e();
147148
147203
  });
147149
147204
  }
147150
- [ye](t2, e, i, r, n) {
147205
+ [Re](t2, e, i, r, n) {
147151
147206
  let o = i.shift();
147152
147207
  if (this.preservePaths || o === void 0) return r();
147153
- let a = import_node_path16.default.resolve(e, o);
147154
- import_node_fs12.default.lstat(a, (h, l) => {
147155
- if (h) return r();
147156
- if (l?.isSymbolicLink()) return n(new St(a, import_node_path16.default.resolve(a, i.join("/"))));
147157
- this[ye](t2, a, i, r, n);
147208
+ let h = import_node_path16.default.resolve(e, o);
147209
+ import_node_fs12.default.lstat(h, (a, l) => {
147210
+ if (a) return r();
147211
+ if (l?.isSymbolicLink()) return n(new St(h, import_node_path16.default.resolve(h, i.join("/"))));
147212
+ this[Re](t2, h, i, r, n);
147158
147213
  });
147159
147214
  }
147160
- [Ir]() {
147161
- this[yi]++;
147215
+ [kr]() {
147216
+ this[Ri]++;
147162
147217
  }
147163
147218
  [$t]() {
147164
- this[yi]--, this[Rs]();
147219
+ this[Ri]--, this[bs]();
147165
147220
  }
147166
- [Ts](t2) {
147221
+ [Ls](t2) {
147167
147222
  this[$t](), t2.resume();
147168
147223
  }
147169
- [bs](t2, e) {
147170
- return t2.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
147224
+ [Os](t2, e) {
147225
+ return t2.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
147171
147226
  }
147172
- [gs](t2) {
147173
- this[Ir]();
147227
+ [_s](t2) {
147228
+ this[kr]();
147174
147229
  let e = [t2.path];
147175
- t2.linkpath && e.push(t2.linkpath), this.reservations.reserve(e, (i) => this[xr](t2, i));
147230
+ t2.linkpath && e.push(t2.linkpath), this.reservations.reserve(e, (i) => this[Nr](t2, i));
147176
147231
  }
147177
- [xr](t2, e) {
147178
- let i = (a) => {
147179
- e(a);
147232
+ [Nr](t2, e) {
147233
+ let i = (h) => {
147234
+ e(h);
147180
147235
  }, r = () => {
147181
- this[yt](this.cwd, this.dmode, (a) => {
147182
- if (a) {
147183
- this[O2](a, t2), i();
147236
+ this[yt](this.cwd, this.dmode, (h) => {
147237
+ if (h) {
147238
+ this[O2](h, t2), i();
147184
147239
  return;
147185
147240
  }
147186
- this[_e] = true, n();
147241
+ this[Oe] = true, n();
147187
147242
  });
147188
147243
  }, n = () => {
147189
147244
  if (t2.absolute !== this.cwd) {
147190
- let a = f(import_node_path16.default.dirname(String(t2.absolute)));
147191
- if (a !== this.cwd) return this[yt](a, this.dmode, (h) => {
147192
- if (h) {
147193
- this[O2](h, t2), i();
147245
+ let h = f(import_node_path16.default.dirname(String(t2.absolute)));
147246
+ if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
147247
+ if (a) {
147248
+ this[O2](a, t2), i();
147194
147249
  return;
147195
147250
  }
147196
147251
  o();
@@ -147198,24 +147253,24 @@ var Xt = class extends st {
147198
147253
  }
147199
147254
  o();
147200
147255
  }, o = () => {
147201
- import_node_fs12.default.lstat(String(t2.absolute), (a, h) => {
147202
- if (h && (this.keep || this.newer && h.mtime > (t2.mtime ?? h.mtime))) {
147203
- this[Ts](t2), i();
147256
+ import_node_fs12.default.lstat(String(t2.absolute), (h, a) => {
147257
+ if (a && (this.keep || this.newer && a.mtime > (t2.mtime ?? a.mtime))) {
147258
+ this[Ls](t2), i();
147204
147259
  return;
147205
147260
  }
147206
- if (a || this[bs](t2, h)) return this[P2](null, t2, i);
147207
- if (h.isDirectory()) {
147261
+ if (h || this[Os](t2, a)) return this[P2](null, t2, i);
147262
+ if (a.isDirectory()) {
147208
147263
  if (t2.type === "Directory") {
147209
- let l = this.chmod && t2.mode && (h.mode & 4095) !== t2.mode, c = (d) => this[P2](d ?? null, t2, i);
147264
+ let l = this.chmod && t2.mode && (a.mode & 4095) !== t2.mode, c = (d) => this[P2](d ?? null, t2, i);
147210
147265
  return l ? import_node_fs12.default.chmod(String(t2.absolute), Number(t2.mode), c) : c();
147211
147266
  }
147212
147267
  if (t2.absolute !== this.cwd) return import_node_fs12.default.rmdir(String(t2.absolute), (l) => this[P2](l ?? null, t2, i));
147213
147268
  }
147214
147269
  if (t2.absolute === this.cwd) return this[P2](null, t2, i);
147215
- ao(String(t2.absolute), (l) => this[P2](l ?? null, t2, i));
147270
+ uo(String(t2.absolute), (l) => this[P2](l ?? null, t2, i));
147216
147271
  });
147217
147272
  };
147218
- this[_e] ? n() : r();
147273
+ this[Oe] ? n() : r();
147219
147274
  }
147220
147275
  [P2](t2, e, i) {
147221
147276
  if (t2) {
@@ -147226,40 +147281,40 @@ var Xt = class extends st {
147226
147281
  case "File":
147227
147282
  case "OldFile":
147228
147283
  case "ContiguousFile":
147229
- return this[_s](e, i);
147284
+ return this[Ts](e, i);
147230
147285
  case "Link":
147231
- return this[Nr](e, i);
147286
+ return this[Ir](e, i);
147232
147287
  case "SymbolicLink":
147233
- return this[Lr](e, i);
147288
+ return this[Ar](e, i);
147234
147289
  case "Directory":
147235
147290
  case "GNUDumpDir":
147236
- return this[Os](e, i);
147291
+ return this[xs](e, i);
147237
147292
  }
147238
147293
  }
147239
- [Ri](t2, e, i, r) {
147294
+ [gi](t2, e, i, r) {
147240
147295
  import_node_fs12.default[i](e, String(t2.absolute), (n) => {
147241
147296
  n ? this[O2](n, t2) : (this[$t](), t2.resume()), r();
147242
147297
  });
147243
147298
  }
147244
147299
  };
147245
- var Se = (s3) => {
147300
+ var ye = (s3) => {
147246
147301
  try {
147247
147302
  return [null, s3()];
147248
147303
  } catch (t2) {
147249
147304
  return [t2, null];
147250
147305
  }
147251
147306
  };
147252
- var Te = class extends Xt {
147307
+ var xe = class extends Xt {
147253
147308
  sync = true;
147254
147309
  [P2](t2, e) {
147255
147310
  return super[P2](t2, e, () => {
147256
147311
  });
147257
147312
  }
147258
- [gs](t2) {
147259
- if (!this[_e]) {
147313
+ [_s](t2) {
147314
+ if (!this[Oe]) {
147260
147315
  let n = this[yt](this.cwd, this.dmode);
147261
147316
  if (n) return this[O2](n, t2);
147262
- this[_e] = true;
147317
+ this[Oe] = true;
147263
147318
  }
147264
147319
  if (t2.absolute !== this.cwd) {
147265
147320
  let n = f(import_node_path16.default.dirname(String(t2.absolute)));
@@ -147268,74 +147323,74 @@ var Te = class extends Xt {
147268
147323
  if (o) return this[O2](o, t2);
147269
147324
  }
147270
147325
  }
147271
- let [e, i] = Se(() => import_node_fs12.default.lstatSync(String(t2.absolute)));
147272
- if (i && (this.keep || this.newer && i.mtime > (t2.mtime ?? i.mtime))) return this[Ts](t2);
147273
- if (e || this[bs](t2, i)) return this[P2](null, t2);
147326
+ let [e, i] = ye(() => import_node_fs12.default.lstatSync(String(t2.absolute)));
147327
+ if (i && (this.keep || this.newer && i.mtime > (t2.mtime ?? i.mtime))) return this[Ls](t2);
147328
+ if (e || this[Os](t2, i)) return this[P2](null, t2);
147274
147329
  if (i.isDirectory()) {
147275
147330
  if (t2.type === "Directory") {
147276
- let o = this.chmod && t2.mode && (i.mode & 4095) !== t2.mode, [a] = o ? Se(() => {
147331
+ let o = this.chmod && t2.mode && (i.mode & 4095) !== t2.mode, [h] = o ? ye(() => {
147277
147332
  import_node_fs12.default.chmodSync(String(t2.absolute), Number(t2.mode));
147278
147333
  }) : [];
147279
- return this[P2](a, t2);
147334
+ return this[P2](h, t2);
147280
147335
  }
147281
- let [n] = Se(() => import_node_fs12.default.rmdirSync(String(t2.absolute)));
147336
+ let [n] = ye(() => import_node_fs12.default.rmdirSync(String(t2.absolute)));
147282
147337
  this[P2](n, t2);
147283
147338
  }
147284
- let [r] = t2.absolute === this.cwd ? [] : Se(() => lo(String(t2.absolute)));
147339
+ let [r] = t2.absolute === this.cwd ? [] : ye(() => po(String(t2.absolute)));
147285
147340
  this[P2](r, t2);
147286
147341
  }
147287
- [_s](t2, e) {
147288
- let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.fmode, r = (a) => {
147289
- let h;
147342
+ [Ts](t2, e) {
147343
+ let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.fmode, r = (h) => {
147344
+ let a;
147290
147345
  try {
147291
147346
  import_node_fs12.default.closeSync(n);
147292
147347
  } catch (l) {
147293
- h = l;
147348
+ a = l;
147294
147349
  }
147295
- (a || h) && this[O2](a || h, t2), e();
147350
+ (h || a) && this[O2](h || a, t2), e();
147296
147351
  }, n;
147297
147352
  try {
147298
- n = import_node_fs12.default.openSync(String(t2.absolute), ds(t2.size), i);
147299
- } catch (a) {
147300
- return r(a);
147353
+ n = import_node_fs12.default.openSync(String(t2.absolute), us(t2.size), i);
147354
+ } catch (h) {
147355
+ return r(h);
147301
147356
  }
147302
147357
  let o = this.transform && this.transform(t2) || t2;
147303
- o !== t2 && (o.on("error", (a) => this[O2](a, t2)), t2.pipe(o)), o.on("data", (a) => {
147358
+ o !== t2 && (o.on("error", (h) => this[O2](h, t2)), t2.pipe(o)), o.on("data", (h) => {
147304
147359
  try {
147305
- import_node_fs12.default.writeSync(n, a, 0, a.length);
147306
- } catch (h) {
147307
- r(h);
147360
+ import_node_fs12.default.writeSync(n, h, 0, h.length);
147361
+ } catch (a) {
147362
+ r(a);
147308
147363
  }
147309
147364
  }), o.on("end", () => {
147310
- let a = null;
147365
+ let h = null;
147311
147366
  if (t2.mtime && !this.noMtime) {
147312
- let h = t2.atime || /* @__PURE__ */ new Date(), l = t2.mtime;
147367
+ let a = t2.atime || /* @__PURE__ */ new Date(), l = t2.mtime;
147313
147368
  try {
147314
- import_node_fs12.default.futimesSync(n, h, l);
147369
+ import_node_fs12.default.futimesSync(n, a, l);
147315
147370
  } catch (c) {
147316
147371
  try {
147317
- import_node_fs12.default.utimesSync(String(t2.absolute), h, l);
147372
+ import_node_fs12.default.utimesSync(String(t2.absolute), a, l);
147318
147373
  } catch {
147319
- a = c;
147374
+ h = c;
147320
147375
  }
147321
147376
  }
147322
147377
  }
147323
- if (this[Re](t2)) {
147324
- let h = this[ge](t2), l = this[be](t2);
147378
+ if (this[ge](t2)) {
147379
+ let a = this[be](t2), l = this[_e](t2);
147325
147380
  try {
147326
- import_node_fs12.default.fchownSync(n, Number(h), Number(l));
147381
+ import_node_fs12.default.fchownSync(n, Number(a), Number(l));
147327
147382
  } catch (c) {
147328
147383
  try {
147329
- import_node_fs12.default.chownSync(String(t2.absolute), Number(h), Number(l));
147384
+ import_node_fs12.default.chownSync(String(t2.absolute), Number(a), Number(l));
147330
147385
  } catch {
147331
- a = a || c;
147386
+ h = h || c;
147332
147387
  }
147333
147388
  }
147334
147389
  }
147335
- r(a);
147390
+ r(h);
147336
147391
  });
147337
147392
  }
147338
- [Os](t2, e) {
147393
+ [xs](t2, e) {
147339
147394
  let i = typeof t2.mode == "number" ? t2.mode & 4095 : this.dmode, r = this[yt](String(t2.absolute), i);
147340
147395
  if (r) {
147341
147396
  this[O2](r, t2), e();
@@ -147345,31 +147400,31 @@ var Te = class extends Xt {
147345
147400
  import_node_fs12.default.utimesSync(String(t2.absolute), t2.atime || /* @__PURE__ */ new Date(), t2.mtime);
147346
147401
  } catch {
147347
147402
  }
147348
- if (this[Re](t2)) try {
147349
- import_node_fs12.default.chownSync(String(t2.absolute), Number(this[ge](t2)), Number(this[be](t2)));
147403
+ if (this[ge](t2)) try {
147404
+ import_node_fs12.default.chownSync(String(t2.absolute), Number(this[be](t2)), Number(this[_e](t2)));
147350
147405
  } catch {
147351
147406
  }
147352
147407
  e(), t2.resume();
147353
147408
  }
147354
147409
  [yt](t2, e) {
147355
147410
  try {
147356
- return Rr(f(t2), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
147411
+ return _r(f(t2), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
147357
147412
  } catch (i) {
147358
147413
  return i;
147359
147414
  }
147360
147415
  }
147361
- [ye](t2, e, i, r, n) {
147416
+ [Re](t2, e, i, r, n) {
147362
147417
  if (this.preservePaths || i.length === 0) return r();
147363
147418
  let o = e;
147364
- for (let a of i) {
147365
- o = import_node_path16.default.resolve(o, a);
147366
- let [h, l] = Se(() => import_node_fs12.default.lstatSync(o));
147367
- if (h) return r();
147419
+ for (let h of i) {
147420
+ o = import_node_path16.default.resolve(o, h);
147421
+ let [a, l] = ye(() => import_node_fs12.default.lstatSync(o));
147422
+ if (a) return r();
147368
147423
  if (l.isSymbolicLink()) return n(new St(o, import_node_path16.default.resolve(e, i.join("/"))));
147369
147424
  }
147370
147425
  r();
147371
147426
  }
147372
- [Ri](t2, e, i, r) {
147427
+ [gi](t2, e, i, r) {
147373
147428
  let n = `${i}Sync`;
147374
147429
  try {
147375
147430
  import_node_fs12.default[n](e, String(t2.absolute)), r(), t2.resume();
@@ -147378,47 +147433,47 @@ var Te = class extends Xt {
147378
147433
  }
147379
147434
  }
147380
147435
  };
147381
- var co = (s3) => {
147382
- let t2 = new Te(s3), e = s3.file, i = import_node_fs11.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
147383
- new Me(e, { readSize: r, size: i.size }).pipe(t2);
147436
+ var Eo = (s3) => {
147437
+ let t2 = new xe(s3), e = s3.file, i = import_node_fs11.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
147438
+ new Be(e, { readSize: r, size: i.size }).pipe(t2);
147384
147439
  };
147385
- var fo = (s3, t2) => {
147440
+ var wo = (s3, t2) => {
147386
147441
  let e = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
147387
- return new Promise((o, a) => {
147388
- e.on("error", a), e.on("close", o), import_node_fs11.default.stat(r, (h, l) => {
147389
- if (h) a(h);
147442
+ return new Promise((o, h) => {
147443
+ e.on("error", h), e.on("close", o), import_node_fs11.default.stat(r, (a, l) => {
147444
+ if (a) h(a);
147390
147445
  else {
147391
147446
  let c = new _t(r, { readSize: i, size: l.size });
147392
- c.on("error", a), c.pipe(e);
147447
+ c.on("error", h), c.pipe(e);
147393
147448
  }
147394
147449
  });
147395
147450
  });
147396
147451
  };
147397
- var uo = K2(co, fo, (s3) => new Te(s3), (s3) => new Xt(s3), (s3, t2) => {
147398
- t2?.length && Xi(s3, t2);
147452
+ var So = K2(Eo, wo, (s3) => new xe(s3), (s3) => new Xt(s3), (s3, t2) => {
147453
+ t2?.length && Qi(s3, t2);
147399
147454
  });
147400
- var mo = (s3, t2) => {
147455
+ var yo = (s3, t2) => {
147401
147456
  let e = new kt(s3), i = true, r, n;
147402
147457
  try {
147403
147458
  try {
147404
147459
  r = import_node_fs15.default.openSync(s3.file, "r+");
147405
- } catch (h) {
147406
- if (h?.code === "ENOENT") r = import_node_fs15.default.openSync(s3.file, "w+");
147407
- else throw h;
147460
+ } catch (a) {
147461
+ if (a?.code === "ENOENT") r = import_node_fs15.default.openSync(s3.file, "w+");
147462
+ else throw a;
147408
147463
  }
147409
- let o = import_node_fs15.default.fstatSync(r), a = Buffer.alloc(512);
147464
+ let o = import_node_fs15.default.fstatSync(r), h = Buffer.alloc(512);
147410
147465
  t: for (n = 0; n < o.size; n += 512) {
147411
147466
  for (let c = 0, d = 0; c < 512; c += d) {
147412
- if (d = import_node_fs15.default.readSync(r, a, c, a.length - c, n + c), n === 0 && a[0] === 31 && a[1] === 139) throw new Error("cannot append to compressed archives");
147467
+ if (d = import_node_fs15.default.readSync(r, h, c, h.length - c, n + c), n === 0 && h[0] === 31 && h[1] === 139) throw new Error("cannot append to compressed archives");
147413
147468
  if (!d) break t;
147414
147469
  }
147415
- let h = new C2(a);
147416
- if (!h.cksumValid) break;
147417
- let l = 512 * Math.ceil((h.size || 0) / 512);
147470
+ let a = new F2(h);
147471
+ if (!a.cksumValid) break;
147472
+ let l = 512 * Math.ceil((a.size || 0) / 512);
147418
147473
  if (n + l + 512 > o.size) break;
147419
- n += l, s3.mtimeCache && h.mtime && s3.mtimeCache.set(String(h.path), h.mtime);
147474
+ n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
147420
147475
  }
147421
- i = false, po(s3, e, n, r, t2);
147476
+ i = false, Ro(s3, e, n, r, t2);
147422
147477
  } finally {
147423
147478
  if (i) try {
147424
147479
  import_node_fs15.default.closeSync(r);
@@ -147426,69 +147481,69 @@ var mo = (s3, t2) => {
147426
147481
  }
147427
147482
  }
147428
147483
  };
147429
- var po = (s3, t2, e, i, r) => {
147484
+ var Ro = (s3, t2, e, i, r) => {
147430
147485
  let n = new Wt(s3.file, { fd: i, start: e });
147431
- t2.pipe(n), wo(t2, r);
147486
+ t2.pipe(n), bo(t2, r);
147432
147487
  };
147433
- var Eo = (s3, t2) => {
147488
+ var go = (s3, t2) => {
147434
147489
  t2 = Array.from(t2);
147435
- let e = new wt(s3), i = (n, o, a) => {
147436
- let h = (T2, N2) => {
147437
- T2 ? import_node_fs15.default.close(n, (E2) => a(T2)) : a(null, N2);
147490
+ let e = new wt(s3), i = (n, o, h) => {
147491
+ let a = (T2, D2) => {
147492
+ T2 ? import_node_fs15.default.close(n, (E2) => h(T2)) : h(null, D2);
147438
147493
  }, l = 0;
147439
- if (o === 0) return h(null, 0);
147440
- let c = 0, d = Buffer.alloc(512), S2 = (T2, N2) => {
147441
- if (T2 || N2 === void 0) return h(T2);
147442
- if (c += N2, c < 512 && N2) return import_node_fs15.default.read(n, d, c, d.length - c, l + c, S2);
147443
- if (l === 0 && d[0] === 31 && d[1] === 139) return h(new Error("cannot append to compressed archives"));
147444
- if (c < 512) return h(null, l);
147445
- let E2 = new C2(d);
147446
- if (!E2.cksumValid) return h(null, l);
147494
+ if (o === 0) return a(null, 0);
147495
+ let c = 0, d = Buffer.alloc(512), S2 = (T2, D2) => {
147496
+ if (T2 || D2 === void 0) return a(T2);
147497
+ if (c += D2, c < 512 && D2) return import_node_fs15.default.read(n, d, c, d.length - c, l + c, S2);
147498
+ if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
147499
+ if (c < 512) return a(null, l);
147500
+ let E2 = new F2(d);
147501
+ if (!E2.cksumValid) return a(null, l);
147447
147502
  let x2 = 512 * Math.ceil((E2.size ?? 0) / 512);
147448
- if (l + x2 + 512 > o || (l += x2 + 512, l >= o)) return h(null, l);
147503
+ if (l + x2 + 512 > o || (l += x2 + 512, l >= o)) return a(null, l);
147449
147504
  s3.mtimeCache && E2.mtime && s3.mtimeCache.set(String(E2.path), E2.mtime), c = 0, import_node_fs15.default.read(n, d, 0, 512, l, S2);
147450
147505
  };
147451
147506
  import_node_fs15.default.read(n, d, 0, 512, l, S2);
147452
147507
  };
147453
147508
  return new Promise((n, o) => {
147454
147509
  e.on("error", o);
147455
- let a = "r+", h = (l, c) => {
147456
- if (l && l.code === "ENOENT" && a === "r+") return a = "w+", import_node_fs15.default.open(s3.file, a, h);
147510
+ let h = "r+", a = (l, c) => {
147511
+ if (l && l.code === "ENOENT" && h === "r+") return h = "w+", import_node_fs15.default.open(s3.file, h, a);
147457
147512
  if (l || !c) return o(l);
147458
147513
  import_node_fs15.default.fstat(c, (d, S2) => {
147459
147514
  if (d) return import_node_fs15.default.close(c, () => o(d));
147460
- i(c, S2.size, (T2, N2) => {
147515
+ i(c, S2.size, (T2, D2) => {
147461
147516
  if (T2) return o(T2);
147462
- let E2 = new tt(s3.file, { fd: c, start: N2 });
147463
- e.pipe(E2), E2.on("error", o), E2.on("close", n), So(e, t2);
147517
+ let E2 = new et(s3.file, { fd: c, start: D2 });
147518
+ e.pipe(E2), E2.on("error", o), E2.on("close", n), _o(e, t2);
147464
147519
  });
147465
147520
  });
147466
147521
  };
147467
- import_node_fs15.default.open(s3.file, a, h);
147522
+ import_node_fs15.default.open(s3.file, h, a);
147468
147523
  });
147469
147524
  };
147470
- var wo = (s3, t2) => {
147525
+ var bo = (s3, t2) => {
147471
147526
  t2.forEach((e) => {
147472
- e.charAt(0) === "@" ? Ft({ file: import_node_path20.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
147527
+ e.charAt(0) === "@" ? Ct({ file: import_node_path20.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
147473
147528
  }), s3.end();
147474
147529
  };
147475
- var So = async (s3, t2) => {
147476
- for (let e of t2) e.charAt(0) === "@" ? await Ft({ file: import_node_path20.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
147530
+ var _o = async (s3, t2) => {
147531
+ for (let e of t2) e.charAt(0) === "@" ? await Ct({ file: import_node_path20.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
147477
147532
  s3.end();
147478
147533
  };
147479
- var vt = K2(mo, Eo, () => {
147534
+ var vt = K2(yo, go, () => {
147480
147535
  throw new TypeError("file is required");
147481
147536
  }, () => {
147482
147537
  throw new TypeError("file is required");
147483
147538
  }, (s3, t2) => {
147484
- if (!vs(s3)) throw new TypeError("file is required");
147539
+ if (!Bs(s3)) throw new TypeError("file is required");
147485
147540
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
147486
147541
  if (!t2?.length) throw new TypeError("no paths specified to add/replace");
147487
147542
  });
147488
- var yo = K2(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t2 = []) => {
147489
- vt.validate?.(s3, t2), Ro(s3);
147543
+ var Oo = K2(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t2 = []) => {
147544
+ vt.validate?.(s3, t2), To(s3);
147490
147545
  });
147491
- var Ro = (s3) => {
147546
+ var To = (s3) => {
147492
147547
  let t2 = s3.filter;
147493
147548
  s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t2 ? (e, i) => t2(e, i) && !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e, i) => !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0));
147494
147549
  };
@@ -147498,7 +147553,7 @@ async function unpackTarball(opts) {
147498
147553
  const { tarballPath, destDir } = opts;
147499
147554
  (0, import_node_fs16.rmSync)(destDir, { recursive: true, force: true });
147500
147555
  (0, import_node_fs16.mkdirSync)(destDir, { recursive: true });
147501
- await uo({ file: tarballPath, cwd: destDir });
147556
+ await So({ file: tarballPath, cwd: destDir });
147502
147557
  }
147503
147558
 
147504
147559
  // src/updater/install.ts
@@ -147794,7 +147849,7 @@ function registerProdCommands(program3) {
147794
147849
  var log7 = getLogger("cli");
147795
147850
  var program2 = new Command();
147796
147851
  program2.name("threadbase-streamer").description("PTY session management, WebSocket streaming, and REST API server for Claude Code").version(getVersion());
147797
- program2.command("serve").description("Start the streamer server").option("-p, --port <number>", "Port to listen on", "8766").option("--api-key <key>", "API key for authentication").option("--local-no-auth", "Skip auth for localhost requests", false).option("-v, --verbose", "Verbose output", false).option("--browse-root <path>", "Root directory for file browsing").option(
147852
+ program2.command("serve").description("Start the streamer server").option("-p, --port <number>", "Port to listen on", "8766").option("--api-key <key>", "API key for authentication").option("--local-no-auth", "Skip auth for localhost requests", false).option("-v, --verbose", "Verbose output", false).option("--log-menubar-requests", "Log /healthz requests from the menubar app", false).option("--browse-root <path>", "Root directory for file browsing").option(
147798
147853
  "--public-url <url>",
147799
147854
  "Public URL clients should use to reach this server (https:// required, except localhost). Falls back to THREADBASE_PUBLIC_URL env or public_url: in ~/.threadbase/server.yaml."
147800
147855
  ).option("--no-pair-qr", "Skip the pairing QR on startup", false).option("--replace-prod", "Stop the launchd-supervised prod streamer and bind its port", false).option("--forget", "Clear this repo's remembered dev-vs-prod choice and re-prompt", false).option("--forget-all", "Clear every repo's remembered dev-vs-prod choice", false).option(
@@ -147841,6 +147896,7 @@ program2.command("serve").description("Start the streamer server").option("-p, -
147841
147896
  apiKey,
147842
147897
  localNoAuth: opts.localNoAuth,
147843
147898
  verbose: opts.verbose,
147899
+ logMenubarRequests: opts.logMenubarRequests,
147844
147900
  browseRoot: opts.browseRoot,
147845
147901
  publicUrl: opts.publicUrl
147846
147902
  });