@alpic-ai/sdk 0.0.0-dev.gda044d0 → 0.0.0-dev.gda34b6b

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.
@@ -45,7 +45,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
45
45
  var require_delayed_stream = __commonJS({
46
46
  "../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js"(exports, module) {
47
47
  var Stream = __require("stream").Stream;
48
- var util3 = __require("util");
48
+ var util4 = __require("util");
49
49
  module.exports = DelayedStream;
50
50
  function DelayedStream() {
51
51
  this.source = null;
@@ -56,7 +56,7 @@ var require_delayed_stream = __commonJS({
56
56
  this._released = false;
57
57
  this._bufferedEvents = [];
58
58
  }
59
- util3.inherits(DelayedStream, Stream);
59
+ util4.inherits(DelayedStream, Stream);
60
60
  DelayedStream.create = function(source, options) {
61
61
  var delayedStream = new this();
62
62
  options = options || {};
@@ -135,7 +135,7 @@ var require_delayed_stream = __commonJS({
135
135
  // ../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js
136
136
  var require_combined_stream = __commonJS({
137
137
  "../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js"(exports, module) {
138
- var util3 = __require("util");
138
+ var util4 = __require("util");
139
139
  var Stream = __require("stream").Stream;
140
140
  var DelayedStream = require_delayed_stream();
141
141
  module.exports = CombinedStream;
@@ -151,7 +151,7 @@ var require_combined_stream = __commonJS({
151
151
  this._insideLoop = false;
152
152
  this._pendingNext = false;
153
153
  }
154
- util3.inherits(CombinedStream, Stream);
154
+ util4.inherits(CombinedStream, Stream);
155
155
  CombinedStream.create = function(options) {
156
156
  var combinedStream = new this();
157
157
  options = options || {};
@@ -9996,7 +9996,7 @@ var require_form_data = __commonJS({
9996
9996
  "../../node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/form_data.js"(exports, module) {
9997
9997
  "use strict";
9998
9998
  var CombinedStream = require_combined_stream();
9999
- var util3 = __require("util");
9999
+ var util4 = __require("util");
10000
10000
  var path = __require("path");
10001
10001
  var http3 = __require("http");
10002
10002
  var https2 = __require("https");
@@ -10025,7 +10025,7 @@ var require_form_data = __commonJS({
10025
10025
  this[option] = options[option];
10026
10026
  }
10027
10027
  }
10028
- util3.inherits(FormData3, CombinedStream);
10028
+ util4.inherits(FormData3, CombinedStream);
10029
10029
  FormData3.LINE_BREAK = "\r\n";
10030
10030
  FormData3.DEFAULT_CONTENT_TYPE = "application/octet-stream";
10031
10031
  FormData3.prototype.append = function(field, value, options) {
@@ -10907,14 +10907,14 @@ var require_supports_color = __commonJS({
10907
10907
  var require_node = __commonJS({
10908
10908
  "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module) {
10909
10909
  var tty = __require("tty");
10910
- var util3 = __require("util");
10910
+ var util4 = __require("util");
10911
10911
  exports.init = init;
10912
10912
  exports.log = log3;
10913
10913
  exports.formatArgs = formatArgs;
10914
10914
  exports.save = save;
10915
10915
  exports.load = load;
10916
10916
  exports.useColors = useColors;
10917
- exports.destroy = util3.deprecate(
10917
+ exports.destroy = util4.deprecate(
10918
10918
  () => {
10919
10919
  },
10920
10920
  "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
@@ -11045,7 +11045,7 @@ var require_node = __commonJS({
11045
11045
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
11046
11046
  }
11047
11047
  function log3(...args) {
11048
- return process.stderr.write(util3.formatWithOptions(exports.inspectOpts, ...args) + "\n");
11048
+ return process.stderr.write(util4.formatWithOptions(exports.inspectOpts, ...args) + "\n");
11049
11049
  }
11050
11050
  function save(namespaces) {
11051
11051
  if (namespaces) {
@@ -11068,11 +11068,11 @@ var require_node = __commonJS({
11068
11068
  var { formatters } = module.exports;
11069
11069
  formatters.o = function(v) {
11070
11070
  this.inspectOpts.colors = this.useColors;
11071
- return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
11071
+ return util4.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
11072
11072
  };
11073
11073
  formatters.O = function(v) {
11074
11074
  this.inspectOpts.colors = this.useColors;
11075
- return util3.inspect(v, this.inspectOpts);
11075
+ return util4.inspect(v, this.inspectOpts);
11076
11076
  };
11077
11077
  }
11078
11078
  });
@@ -12069,17 +12069,94 @@ var require_follow_redirects = __commonJS({
12069
12069
  }
12070
12070
  });
12071
12071
 
12072
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/bind.js
12072
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/bind.js
12073
12073
  function bind(fn, thisArg) {
12074
12074
  return function wrap() {
12075
12075
  return fn.apply(thisArg, arguments);
12076
12076
  };
12077
12077
  }
12078
12078
 
12079
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/utils.js
12079
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/utils.js
12080
12080
  var { toString } = Object.prototype;
12081
12081
  var { getPrototypeOf } = Object;
12082
12082
  var { iterator, toStringTag } = Symbol;
12083
+ var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
12084
+ var isUnsafeObjectKey = (prop) => typeof prop === "string" && (prop === "__proto__" || prop === "constructor" || prop === "prototype");
12085
+ var isPrototypeBoundary = (obj, prototype2, source) => obj === Object.prototype || !source && prototype2 === null;
12086
+ var isSafeAndFullyMutable = (obj) => {
12087
+ if (!Object.isExtensible(obj)) {
12088
+ return false;
12089
+ }
12090
+ const props = Object.getOwnPropertyNames(obj);
12091
+ if (Object.getOwnPropertySymbols) {
12092
+ props.push(...Object.getOwnPropertySymbols(obj));
12093
+ }
12094
+ return props.every((prop) => {
12095
+ if (isUnsafeObjectKey(prop)) {
12096
+ return false;
12097
+ }
12098
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
12099
+ return !!descriptor && descriptor.configurable && descriptor.writable === true;
12100
+ });
12101
+ };
12102
+ var hasOwnInPrototypeChain = (thing, prop) => {
12103
+ let obj = thing;
12104
+ const seen = [];
12105
+ while (obj != null) {
12106
+ if (seen.indexOf(obj) !== -1) {
12107
+ return false;
12108
+ }
12109
+ seen.push(obj);
12110
+ const prototype2 = getPrototypeOf(obj);
12111
+ if (isPrototypeBoundary(obj, prototype2, obj === thing)) {
12112
+ return false;
12113
+ }
12114
+ if (hasOwnProperty(obj, prop)) {
12115
+ return true;
12116
+ }
12117
+ obj = prototype2;
12118
+ }
12119
+ return false;
12120
+ };
12121
+ var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
12122
+ var toSafeFlatObject = (thing) => {
12123
+ if (thing == null || typeof thing !== "object" && typeof thing !== "function") {
12124
+ return thing;
12125
+ }
12126
+ const sourcePrototype = getPrototypeOf(thing);
12127
+ if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
12128
+ return thing;
12129
+ }
12130
+ const result = /* @__PURE__ */ Object.create(null);
12131
+ const merged = /* @__PURE__ */ Object.create(null);
12132
+ const seen = [];
12133
+ let current = thing;
12134
+ while (current != null) {
12135
+ if (seen.indexOf(current) !== -1) {
12136
+ break;
12137
+ }
12138
+ seen.push(current);
12139
+ const prototype2 = current === thing ? sourcePrototype : getPrototypeOf(current);
12140
+ if (isPrototypeBoundary(current, prototype2, current === thing)) {
12141
+ break;
12142
+ }
12143
+ const props = Object.getOwnPropertyNames(current);
12144
+ if (Object.getOwnPropertySymbols) {
12145
+ props.push(...Object.getOwnPropertySymbols(current));
12146
+ }
12147
+ for (const prop of props) {
12148
+ if (isUnsafeObjectKey(prop)) {
12149
+ continue;
12150
+ }
12151
+ if (!hasOwnProperty(merged, prop)) {
12152
+ result[prop] = thing[prop];
12153
+ merged[prop] = true;
12154
+ }
12155
+ }
12156
+ current = prototype2;
12157
+ }
12158
+ return result;
12159
+ };
12083
12160
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
12084
12161
  const str = toString.call(thing);
12085
12162
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -12110,11 +12187,14 @@ var isNumber = typeOfTest("number");
12110
12187
  var isObject = (thing) => thing !== null && typeof thing === "object";
12111
12188
  var isBoolean = (thing) => thing === true || thing === false;
12112
12189
  var isPlainObject = (val) => {
12113
- if (kindOf(val) !== "object") {
12190
+ if (!isObject(val)) {
12114
12191
  return false;
12115
12192
  }
12116
12193
  const prototype2 = getPrototypeOf(val);
12117
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
12194
+ return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
12195
+ // evidence the value is tagged/iterable, while ignoring members reachable
12196
+ // only through shared or terminal prototype boundaries.
12197
+ !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
12118
12198
  };
12119
12199
  var isEmptyObject = (val) => {
12120
12200
  if (!isObject(val) || isBuffer(val)) {
@@ -12134,6 +12214,7 @@ var isReactNativeBlob = (value) => {
12134
12214
  var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
12135
12215
  var isBlob = kindOfTest("Blob");
12136
12216
  var isFileList = kindOfTest("FileList");
12217
+ var isSet = kindOfTest("Set");
12137
12218
  var isStream = (val) => isObject(val) && isFunction(val.pipe);
12138
12219
  function getGlobal() {
12139
12220
  if (typeof globalThis !== "undefined") return globalThis;
@@ -12218,7 +12299,7 @@ function merge(...objs) {
12218
12299
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
12219
12300
  return;
12220
12301
  }
12221
- const targetKey = caseless && findKey(result, key) || key;
12302
+ const targetKey = caseless && typeof key === "string" && findKey(result, key) || key;
12222
12303
  const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
12223
12304
  if (isPlainObject(existing) && isPlainObject(val)) {
12224
12305
  result[targetKey] = merge(existing, val);
@@ -12231,7 +12312,21 @@ function merge(...objs) {
12231
12312
  }
12232
12313
  };
12233
12314
  for (let i = 0, l = objs.length; i < l; i++) {
12234
- objs[i] && forEach(objs[i], assignValue);
12315
+ const source = objs[i];
12316
+ if (!source || isBuffer(source)) {
12317
+ continue;
12318
+ }
12319
+ forEach(source, assignValue);
12320
+ if (typeof source !== "object" || isArray(source)) {
12321
+ continue;
12322
+ }
12323
+ const symbols = Object.getOwnPropertySymbols(source);
12324
+ for (let j = 0; j < symbols.length; j++) {
12325
+ const symbol = symbols[j];
12326
+ if (propertyIsEnumerable.call(source, symbol)) {
12327
+ assignValue(source[symbol], symbol);
12328
+ }
12329
+ }
12235
12330
  }
12236
12331
  return result;
12237
12332
  }
@@ -12353,7 +12448,7 @@ var toCamelCase = (str) => {
12353
12448
  return p1.toUpperCase() + p2;
12354
12449
  });
12355
12450
  };
12356
- var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
12451
+ var { propertyIsEnumerable } = Object.prototype;
12357
12452
  var isRegExp = kindOfTest("RegExp");
12358
12453
  var reduceDescriptors = (obj, reducer) => {
12359
12454
  const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -12415,11 +12510,20 @@ var toJSONObject = (obj) => {
12415
12510
  }
12416
12511
  if (!("toJSON" in source)) {
12417
12512
  visited.add(source);
12418
- const target = isArray(source) ? [] : {};
12419
- forEach(source, (value, key) => {
12420
- const reducedValue = visit(value);
12421
- !isUndefined(reducedValue) && (target[key] = reducedValue);
12422
- });
12513
+ let target;
12514
+ if (isSet(source)) {
12515
+ target = [];
12516
+ for (const value of source) {
12517
+ const reducedValue = visit(value);
12518
+ !isUndefined(reducedValue) && target.push(reducedValue);
12519
+ }
12520
+ } else {
12521
+ target = isArray(source) ? [] : {};
12522
+ forEach(source, (value, key) => {
12523
+ const reducedValue = visit(value);
12524
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
12525
+ });
12526
+ }
12423
12527
  visited.delete(source);
12424
12528
  return target;
12425
12529
  }
@@ -12452,6 +12556,7 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
12452
12556
  })(typeof setImmediate === "function", isFunction(_global.postMessage));
12453
12557
  var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
12454
12558
  var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
12559
+ var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
12455
12560
  var utils_default = {
12456
12561
  isArray,
12457
12562
  isArrayBuffer,
@@ -12497,6 +12602,9 @@ var utils_default = {
12497
12602
  hasOwnProperty,
12498
12603
  hasOwnProp: hasOwnProperty,
12499
12604
  // an alias to avoid ESLint no-prototype-builtins detection
12605
+ hasOwnInPrototypeChain,
12606
+ getSafeProp,
12607
+ toSafeFlatObject,
12500
12608
  reduceDescriptors,
12501
12609
  freezeMethods,
12502
12610
  toObjectSet,
@@ -12512,10 +12620,11 @@ var utils_default = {
12512
12620
  isThenable,
12513
12621
  setImmediate: _setImmediate,
12514
12622
  asap,
12515
- isIterable
12623
+ isIterable,
12624
+ isSafeIterable
12516
12625
  };
12517
12626
 
12518
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/parseHeaders.js
12627
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/parseHeaders.js
12519
12628
  var ignoreDuplicateOf = utils_default.toObjectSet([
12520
12629
  "age",
12521
12630
  "authorization",
@@ -12544,23 +12653,24 @@ var parseHeaders_default = (rawHeaders) => {
12544
12653
  i = line.indexOf(":");
12545
12654
  key = line.substring(0, i).trim().toLowerCase();
12546
12655
  val = line.substring(i + 1).trim();
12547
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
12656
+ const hasKey = utils_default.hasOwnProp(parsed, key);
12657
+ if (!key || hasKey && utils_default.hasOwnProp(ignoreDuplicateOf, key)) {
12548
12658
  return;
12549
12659
  }
12550
12660
  if (key === "set-cookie") {
12551
- if (parsed[key]) {
12661
+ if (hasKey) {
12552
12662
  parsed[key].push(val);
12553
12663
  } else {
12554
12664
  parsed[key] = [val];
12555
12665
  }
12556
12666
  } else {
12557
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
12667
+ parsed[key] = hasKey ? parsed[key] + ", " + val : val;
12558
12668
  }
12559
12669
  });
12560
12670
  return parsed;
12561
12671
  };
12562
12672
 
12563
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/sanitizeHeaderValue.js
12673
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/sanitizeHeaderValue.js
12564
12674
  function trimSPorHTAB(str) {
12565
12675
  let start = 0;
12566
12676
  let end = str.length;
@@ -12598,7 +12708,7 @@ function toByteStringHeaderObject(headers) {
12598
12708
  return byteStringHeaders;
12599
12709
  }
12600
12710
 
12601
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/AxiosHeaders.js
12711
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/AxiosHeaders.js
12602
12712
  var $internals = /* @__PURE__ */ Symbol("internals");
12603
12713
  function normalizeHeader(header) {
12604
12714
  return header && String(header).trim().toLowerCase();
@@ -12618,6 +12728,90 @@ function parseTokens(str) {
12618
12728
  }
12619
12729
  return tokens;
12620
12730
  }
12731
+ var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
12732
+ function trimOWS(value) {
12733
+ let start = 0;
12734
+ let end = value.length;
12735
+ while (start < end) {
12736
+ const code = value.charCodeAt(start);
12737
+ if (code !== 9 && code !== 32) {
12738
+ break;
12739
+ }
12740
+ start += 1;
12741
+ }
12742
+ while (end > start) {
12743
+ const code = value.charCodeAt(end - 1);
12744
+ if (code !== 9 && code !== 32) {
12745
+ break;
12746
+ }
12747
+ end -= 1;
12748
+ }
12749
+ return start === 0 && end === value.length ? value : value.slice(start, end);
12750
+ }
12751
+ function decodeQuotedString(value) {
12752
+ const last = value.length - 1;
12753
+ if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) {
12754
+ return value;
12755
+ }
12756
+ let decoded = "";
12757
+ for (let i = 1; i < last; i++) {
12758
+ const code = value.charCodeAt(i);
12759
+ if (code === 34) {
12760
+ return value;
12761
+ }
12762
+ if (code === 92) {
12763
+ i += 1;
12764
+ if (i >= last) {
12765
+ return value;
12766
+ }
12767
+ }
12768
+ decoded += value[i];
12769
+ }
12770
+ return decoded;
12771
+ }
12772
+ function parseParameters(value) {
12773
+ const parameters = /* @__PURE__ */ Object.create(null);
12774
+ const str = String(value);
12775
+ let start = 0;
12776
+ let quoted = false;
12777
+ let escaped = false;
12778
+ function parseParameter(end) {
12779
+ const part = trimOWS(str.slice(start, end));
12780
+ const equals = part.indexOf("=");
12781
+ if (equals < 1) {
12782
+ return;
12783
+ }
12784
+ const name = trimOWS(part.slice(0, equals));
12785
+ if (!parameterNameRE.test(name)) {
12786
+ return;
12787
+ }
12788
+ const normalizedName = name.toLowerCase();
12789
+ if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") {
12790
+ return;
12791
+ }
12792
+ const parameterValue = trimOWS(part.slice(equals + 1));
12793
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
12794
+ }
12795
+ for (let i = 0; i < str.length; i++) {
12796
+ const code = str.charCodeAt(i);
12797
+ if (quoted) {
12798
+ if (escaped) {
12799
+ escaped = false;
12800
+ } else if (code === 92) {
12801
+ escaped = true;
12802
+ } else if (code === 34) {
12803
+ quoted = false;
12804
+ }
12805
+ } else if (code === 34) {
12806
+ quoted = true;
12807
+ } else if (code === 44 || code === 59) {
12808
+ parseParameter(i);
12809
+ start = i + 1;
12810
+ }
12811
+ }
12812
+ parseParameter(str.length);
12813
+ return parameters;
12814
+ }
12621
12815
  var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
12622
12816
  function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
12623
12817
  if (utils_default.isFunction(filter2)) {
@@ -12662,7 +12856,7 @@ var AxiosHeaders = class {
12662
12856
  function setHeader(_value, _header, _rewrite) {
12663
12857
  const lHeader = normalizeHeader(_header);
12664
12858
  if (!lHeader) {
12665
- throw new Error("header name must be a non-empty string");
12859
+ return;
12666
12860
  }
12667
12861
  const key = utils_default.findKey(self2, lHeader);
12668
12862
  if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
@@ -12674,13 +12868,19 @@ var AxiosHeaders = class {
12674
12868
  setHeaders(header, valueOrRewrite);
12675
12869
  } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
12676
12870
  setHeaders(parseHeaders_default(header), valueOrRewrite);
12677
- } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
12678
- let obj = {}, dest, key;
12871
+ } else if (utils_default.isObject(header) && utils_default.isSafeIterable(header)) {
12872
+ let obj = /* @__PURE__ */ Object.create(null), dest, key;
12679
12873
  for (const entry of header) {
12680
12874
  if (!utils_default.isArray(entry)) {
12681
- throw TypeError("Object iterator must return a key-value pair");
12875
+ throw new TypeError("Object iterator must return a key-value pair");
12876
+ }
12877
+ key = entry[0];
12878
+ if (utils_default.hasOwnProp(obj, key)) {
12879
+ dest = obj[key];
12880
+ obj[key] = utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
12881
+ } else {
12882
+ obj[key] = entry[1];
12682
12883
  }
12683
- obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
12684
12884
  }
12685
12885
  setHeaders(obj, valueOrRewrite);
12686
12886
  } else {
@@ -12787,7 +12987,8 @@ var AxiosHeaders = class {
12787
12987
  return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
12788
12988
  }
12789
12989
  getSetCookie() {
12790
- return this.get("set-cookie") || [];
12990
+ const value = this.get("set-cookie");
12991
+ return utils_default.isArray(value) ? value : value == null || value === false ? [] : [value];
12791
12992
  }
12792
12993
  get [Symbol.toStringTag]() {
12793
12994
  return "AxiosHeaders";
@@ -12795,6 +12996,9 @@ var AxiosHeaders = class {
12795
12996
  static from(thing) {
12796
12997
  return thing instanceof this ? thing : new this(thing);
12797
12998
  }
12999
+ static parseParameters(value) {
13000
+ return parseParameters(value);
13001
+ }
12798
13002
  static concat(first, ...targets) {
12799
13003
  const computed = new this(first);
12800
13004
  targets.forEach((target) => computed.set(target));
@@ -12837,7 +13041,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
12837
13041
  utils_default.freezeMethods(AxiosHeaders);
12838
13042
  var AxiosHeaders_default = AxiosHeaders;
12839
13043
 
12840
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/AxiosError.js
13044
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/AxiosError.js
12841
13045
  var REDACTED = "[REDACTED ****]";
12842
13046
  function hasOwnOrPrototypeToJSON(source) {
12843
13047
  if (utils_default.hasOwnProp(source, "toJSON")) {
@@ -12890,10 +13094,37 @@ function redactConfig(config, redactKeys) {
12890
13094
  };
12891
13095
  return visit(config);
12892
13096
  }
13097
+ function stringifySafely(value) {
13098
+ try {
13099
+ return String(value);
13100
+ } catch (err) {
13101
+ return "";
13102
+ }
13103
+ }
13104
+ function aggregateErrorMessage(error) {
13105
+ const message = error.errors.map((entry) => {
13106
+ try {
13107
+ return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
13108
+ } catch (err) {
13109
+ return "";
13110
+ }
13111
+ }).filter(Boolean).join("; ");
13112
+ return message || error.name || "AggregateError";
13113
+ }
12893
13114
  var AxiosError = class _AxiosError extends Error {
12894
13115
  static from(error, code, config, request, response, customProps) {
12895
- const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
12896
- axiosError.cause = error;
13116
+ let message = error.message;
13117
+ if (!message && utils_default.isArray(error.errors) && error.errors.length) {
13118
+ message = aggregateErrorMessage(error);
13119
+ }
13120
+ const axiosError = new _AxiosError(message, code || error.code, config, request, response);
13121
+ Object.defineProperty(axiosError, "cause", {
13122
+ __proto__: null,
13123
+ value: error,
13124
+ writable: true,
13125
+ enumerable: false,
13126
+ configurable: true
13127
+ });
12897
13128
  axiosError.name = error.name;
12898
13129
  if (error.status != null && axiosError.status == null) {
12899
13130
  axiosError.status = error.status;
@@ -12972,11 +13203,22 @@ AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
12972
13203
  AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
12973
13204
  var AxiosError_default = AxiosError;
12974
13205
 
12975
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/FormData.js
13206
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/FormData.js
12976
13207
  var import_form_data = __toESM(require_form_data(), 1);
12977
13208
  var FormData_default = import_form_data.default;
12978
13209
 
12979
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/toFormData.js
13210
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/Buffer.js
13211
+ var Buffer_default = {
13212
+ isBufferAvailable() {
13213
+ return typeof Buffer !== "undefined";
13214
+ },
13215
+ from(value) {
13216
+ return Buffer.from(value);
13217
+ }
13218
+ };
13219
+
13220
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/toFormData.js
13221
+ var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
12980
13222
  function isVisitable(thing) {
12981
13223
  return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
12982
13224
  }
@@ -13001,25 +13243,18 @@ function toFormData(obj, formData, options) {
13001
13243
  throw new TypeError("target must be an object");
13002
13244
  }
13003
13245
  formData = formData || new (FormData_default || FormData)();
13004
- options = utils_default.toFlatObject(
13005
- options,
13006
- {
13007
- metaTokens: true,
13008
- dots: false,
13009
- indexes: false
13010
- },
13011
- false,
13012
- function defined(option, source) {
13013
- return !utils_default.isUndefined(source[option]);
13014
- }
13015
- );
13016
- const metaTokens = options.metaTokens;
13017
- const visitor = options.visitor || defaultVisitor;
13018
- const dots = options.dots;
13019
- const indexes = options.indexes;
13020
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
13021
- const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
13246
+ const option = (name, fallback) => {
13247
+ const value = utils_default.getSafeProp(options, name);
13248
+ return utils_default.isUndefined(value) ? fallback : value;
13249
+ };
13250
+ const metaTokens = option("metaTokens", true);
13251
+ const visitor = option("visitor") || defaultVisitor;
13252
+ const dots = option("dots", false);
13253
+ const indexes = option("indexes", false);
13254
+ const _Blob = option("Blob") || typeof Blob !== "undefined" && Blob;
13255
+ const maxDepth = option("maxDepth", DEFAULT_FORM_DATA_MAX_DEPTH);
13022
13256
  const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
13257
+ const stack = [];
13023
13258
  if (!utils_default.isFunction(visitor)) {
13024
13259
  throw new TypeError("visitor must be a function");
13025
13260
  }
@@ -13035,10 +13270,44 @@ function toFormData(obj, formData, options) {
13035
13270
  throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
13036
13271
  }
13037
13272
  if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
13038
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
13273
+ if (useBlob && typeof _Blob === "function") {
13274
+ return new _Blob([value]);
13275
+ }
13276
+ if (Buffer_default && Buffer_default.isBufferAvailable()) {
13277
+ return Buffer_default.from(value);
13278
+ }
13279
+ throw new AxiosError_default(
13280
+ "Blob is not supported. Use a Buffer instead.",
13281
+ AxiosError_default.ERR_NOT_SUPPORT
13282
+ );
13039
13283
  }
13040
13284
  return value;
13041
13285
  }
13286
+ function throwIfMaxDepthExceeded(depth) {
13287
+ if (depth > maxDepth) {
13288
+ throw new AxiosError_default(
13289
+ "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
13290
+ AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
13291
+ );
13292
+ }
13293
+ }
13294
+ function stringifyWithDepthLimit(value, depth) {
13295
+ if (maxDepth === Infinity) {
13296
+ return JSON.stringify(value);
13297
+ }
13298
+ const ancestors = [];
13299
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
13300
+ if (!utils_default.isObject(currentValue)) {
13301
+ return currentValue;
13302
+ }
13303
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
13304
+ ancestors.pop();
13305
+ }
13306
+ ancestors.push(currentValue);
13307
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
13308
+ return currentValue;
13309
+ });
13310
+ }
13042
13311
  function defaultVisitor(value, key, path) {
13043
13312
  let arr = value;
13044
13313
  if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
@@ -13048,7 +13317,7 @@ function toFormData(obj, formData, options) {
13048
13317
  if (value && !path && typeof value === "object") {
13049
13318
  if (utils_default.endsWith(key, "{}")) {
13050
13319
  key = metaTokens ? key : key.slice(0, -2);
13051
- value = JSON.stringify(value);
13320
+ value = stringifyWithDepthLimit(value, 1);
13052
13321
  } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
13053
13322
  key = removeBrackets(key);
13054
13323
  arr.forEach(function each(el, index) {
@@ -13067,7 +13336,6 @@ function toFormData(obj, formData, options) {
13067
13336
  formData.append(renderKey(path, key, dots), convertValue(value));
13068
13337
  return false;
13069
13338
  }
13070
- const stack = [];
13071
13339
  const exposedHelpers = Object.assign(predicates, {
13072
13340
  defaultVisitor,
13073
13341
  convertValue,
@@ -13075,14 +13343,9 @@ function toFormData(obj, formData, options) {
13075
13343
  });
13076
13344
  function build(value, path, depth = 0) {
13077
13345
  if (utils_default.isUndefined(value)) return;
13078
- if (depth > maxDepth) {
13079
- throw new AxiosError_default(
13080
- "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
13081
- AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
13082
- );
13083
- }
13346
+ throwIfMaxDepthExceeded(depth);
13084
13347
  if (stack.indexOf(value) !== -1) {
13085
- throw Error("Circular reference detected in " + path.join("."));
13348
+ throw new Error("Circular reference detected in " + path.join("."));
13086
13349
  }
13087
13350
  stack.push(value);
13088
13351
  utils_default.forEach(value, function each(el, key) {
@@ -13101,7 +13364,7 @@ function toFormData(obj, formData, options) {
13101
13364
  }
13102
13365
  var toFormData_default = toFormData;
13103
13366
 
13104
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
13367
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
13105
13368
  function encode(str) {
13106
13369
  const charMap = {
13107
13370
  "!": "%21",
@@ -13124,16 +13387,14 @@ prototype.append = function append(name, value) {
13124
13387
  this._pairs.push([name, value]);
13125
13388
  };
13126
13389
  prototype.toString = function toString2(encoder) {
13127
- const _encode = encoder ? function(value) {
13128
- return encoder.call(this, value, encode);
13129
- } : encode;
13390
+ const _encode = encoder ? (value) => encoder.call(this, value, encode) : encode;
13130
13391
  return this._pairs.map(function each(pair) {
13131
13392
  return _encode(pair[0]) + "=" + _encode(pair[1]);
13132
13393
  }, "").join("&");
13133
13394
  };
13134
13395
  var AxiosURLSearchParams_default = AxiosURLSearchParams;
13135
13396
 
13136
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/buildURL.js
13397
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/buildURL.js
13137
13398
  function encode2(val) {
13138
13399
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
13139
13400
  }
@@ -13141,11 +13402,12 @@ function buildURL(url2, params, options) {
13141
13402
  if (!params) {
13142
13403
  return url2;
13143
13404
  }
13144
- const _encode = options && options.encode || encode2;
13405
+ url2 = url2 || "";
13145
13406
  const _options = utils_default.isFunction(options) ? {
13146
13407
  serialize: options
13147
13408
  } : options;
13148
- const serializeFn = _options && _options.serialize;
13409
+ const _encode = utils_default.getSafeProp(_options, "encode") || encode2;
13410
+ const serializeFn = utils_default.getSafeProp(_options, "serialize");
13149
13411
  let serializedParams;
13150
13412
  if (serializeFn) {
13151
13413
  serializedParams = serializeFn(params, _options);
@@ -13162,10 +13424,48 @@ function buildURL(url2, params, options) {
13162
13424
  return url2;
13163
13425
  }
13164
13426
 
13165
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/InterceptorManager.js
13427
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/InterceptorManager.js
13428
+ var $internals2 = /* @__PURE__ */ Symbol("internals");
13429
+ function countHandlers(handlers) {
13430
+ return handlers ? handlers.length : 0;
13431
+ }
13432
+ function trimHandlers(handlers) {
13433
+ if (!handlers) {
13434
+ return;
13435
+ }
13436
+ while (handlers.length && handlers[handlers.length - 1] === null) {
13437
+ handlers.pop();
13438
+ }
13439
+ }
13440
+ function syncHandlerEntries(manager, internals) {
13441
+ const handlers = manager.handlers;
13442
+ const length = countHandlers(handlers);
13443
+ if (handlers !== internals.handlersRef) {
13444
+ internals.handlersRef = handlers;
13445
+ internals.handlerEntries.clear();
13446
+ } else if (length !== internals.handlersLength) {
13447
+ if (!length) {
13448
+ internals.handlerEntries.clear();
13449
+ } else {
13450
+ internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
13451
+ if (handlers[entry.index] !== entry.handler) {
13452
+ internals.handlerEntries.delete(id);
13453
+ }
13454
+ });
13455
+ }
13456
+ }
13457
+ internals.handlersLength = length;
13458
+ }
13166
13459
  var InterceptorManager = class {
13167
13460
  constructor() {
13168
13461
  this.handlers = [];
13462
+ this[$internals2] = {
13463
+ handlersRef: this.handlers,
13464
+ handlersLength: this.handlers.length,
13465
+ handlerEntries: /* @__PURE__ */ new Map(),
13466
+ iterationDepth: 0,
13467
+ nextId: 0
13468
+ };
13169
13469
  }
13170
13470
  /**
13171
13471
  * Add a new interceptor to the stack
@@ -13177,13 +13477,25 @@ var InterceptorManager = class {
13177
13477
  * @return {Number} An ID used to remove interceptor later
13178
13478
  */
13179
13479
  use(fulfilled, rejected, options) {
13180
- this.handlers.push({
13480
+ const handler = {
13181
13481
  fulfilled,
13182
13482
  rejected,
13183
13483
  synchronous: options ? options.synchronous : false,
13184
13484
  runWhen: options ? options.runWhen : null
13485
+ };
13486
+ const internals = this[$internals2];
13487
+ if (this.handlers == null) {
13488
+ this.handlers = [];
13489
+ }
13490
+ syncHandlerEntries(this, internals);
13491
+ const id = internals.nextId++;
13492
+ this.handlers.push(handler);
13493
+ internals.handlerEntries.set(id, {
13494
+ handler,
13495
+ index: this.handlers.length - 1
13185
13496
  });
13186
- return this.handlers.length - 1;
13497
+ internals.handlersLength = this.handlers.length;
13498
+ return id;
13187
13499
  }
13188
13500
  /**
13189
13501
  * Remove an interceptor from the stack
@@ -13193,8 +13505,19 @@ var InterceptorManager = class {
13193
13505
  * @returns {void}
13194
13506
  */
13195
13507
  eject(id) {
13196
- if (this.handlers[id]) {
13197
- this.handlers[id] = null;
13508
+ const internals = this[$internals2];
13509
+ syncHandlerEntries(this, internals);
13510
+ const entry = internals.handlerEntries.get(id);
13511
+ if (entry) {
13512
+ internals.handlerEntries.delete(id);
13513
+ if (this.handlers[entry.index] !== entry.handler) {
13514
+ return;
13515
+ }
13516
+ this.handlers[entry.index] = null;
13517
+ if (!internals.iterationDepth) {
13518
+ trimHandlers(this.handlers);
13519
+ internals.handlersLength = this.handlers.length;
13520
+ }
13198
13521
  }
13199
13522
  }
13200
13523
  /**
@@ -13205,6 +13528,7 @@ var InterceptorManager = class {
13205
13528
  clear() {
13206
13529
  if (this.handlers) {
13207
13530
  this.handlers = [];
13531
+ syncHandlerEntries(this, this[$internals2]);
13208
13532
  }
13209
13533
  }
13210
13534
  /**
@@ -13218,31 +13542,44 @@ var InterceptorManager = class {
13218
13542
  * @returns {void}
13219
13543
  */
13220
13544
  forEach(fn) {
13221
- utils_default.forEach(this.handlers, function forEachHandler(h) {
13222
- if (h !== null) {
13223
- fn(h);
13545
+ const internals = this[$internals2];
13546
+ syncHandlerEntries(this, internals);
13547
+ internals.iterationDepth++;
13548
+ try {
13549
+ utils_default.forEach(this.handlers, function forEachHandler(h) {
13550
+ if (h !== null) {
13551
+ fn(h);
13552
+ }
13553
+ });
13554
+ } finally {
13555
+ if (!--internals.iterationDepth) {
13556
+ syncHandlerEntries(this, internals);
13557
+ trimHandlers(this.handlers);
13558
+ internals.handlersLength = countHandlers(this.handlers);
13224
13559
  }
13225
- });
13560
+ }
13226
13561
  }
13227
13562
  };
13228
13563
  var InterceptorManager_default = InterceptorManager;
13229
13564
 
13230
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/defaults/transitional.js
13565
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/defaults/transitional.js
13231
13566
  var transitional_default = {
13232
13567
  silentJSONParsing: true,
13233
13568
  forcedJSONParsing: true,
13234
13569
  clarifyTimeoutError: false,
13235
- legacyInterceptorReqResOrdering: true
13570
+ legacyInterceptorReqResOrdering: true,
13571
+ advertiseZstdAcceptEncoding: false,
13572
+ validateStatusUndefinedResolves: true
13236
13573
  };
13237
13574
 
13238
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/index.js
13575
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/index.js
13239
13576
  import crypto from "crypto";
13240
13577
 
13241
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
13578
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
13242
13579
  import url from "url";
13243
13580
  var URLSearchParams_default = url.URLSearchParams;
13244
13581
 
13245
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/index.js
13582
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/index.js
13246
13583
  var ALPHA = "abcdefghijklmnopqrstuvwxyz";
13247
13584
  var DIGIT = "0123456789";
13248
13585
  var ALPHABET = {
@@ -13272,7 +13609,7 @@ var node_default = {
13272
13609
  protocols: ["http", "https", "file", "data"]
13273
13610
  };
13274
13611
 
13275
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/common/utils.js
13612
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/common/utils.js
13276
13613
  var utils_exports = {};
13277
13614
  __export(utils_exports, {
13278
13615
  hasBrowserEnv: () => hasBrowserEnv,
@@ -13290,13 +13627,13 @@ var hasStandardBrowserWebWorkerEnv = (() => {
13290
13627
  })();
13291
13628
  var origin = hasBrowserEnv && window.location.href || "http://localhost";
13292
13629
 
13293
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/index.js
13630
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/index.js
13294
13631
  var platform_default = {
13295
13632
  ...utils_exports,
13296
13633
  ...node_default
13297
13634
  };
13298
13635
 
13299
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/toURLEncodedForm.js
13636
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/toURLEncodedForm.js
13300
13637
  function toURLEncodedForm(data, options) {
13301
13638
  return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
13302
13639
  visitor: function(value, key, path, helpers) {
@@ -13310,11 +13647,25 @@ function toURLEncodedForm(data, options) {
13310
13647
  });
13311
13648
  }
13312
13649
 
13313
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToJSON.js
13650
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToJSON.js
13651
+ var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
13652
+ function throwIfDepthExceeded(index) {
13653
+ if (index > MAX_DEPTH) {
13654
+ throw new AxiosError_default(
13655
+ "FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH,
13656
+ AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
13657
+ );
13658
+ }
13659
+ }
13314
13660
  function parsePropPath(name) {
13315
- return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
13316
- return match[0] === "[]" ? "" : match[1] || match[0];
13317
- });
13661
+ const path = [];
13662
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
13663
+ let match;
13664
+ while ((match = pattern.exec(name)) !== null) {
13665
+ throwIfDepthExceeded(path.length);
13666
+ path.push(match[0] === "[]" ? "" : match[1] || match[0]);
13667
+ }
13668
+ return path;
13318
13669
  }
13319
13670
  function arrayToObject(arr) {
13320
13671
  const obj = {};
@@ -13330,6 +13681,7 @@ function arrayToObject(arr) {
13330
13681
  }
13331
13682
  function formDataToJSON(formData) {
13332
13683
  function buildPath(path, value, target, index) {
13684
+ throwIfDepthExceeded(index);
13333
13685
  let name = path[index++];
13334
13686
  if (name === "__proto__") return true;
13335
13687
  const isNumericKey = Number.isFinite(+name);
@@ -13363,9 +13715,25 @@ function formDataToJSON(formData) {
13363
13715
  }
13364
13716
  var formDataToJSON_default = formDataToJSON;
13365
13717
 
13366
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/defaults/index.js
13718
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/methodList.js
13719
+ var methodList = Object.freeze([
13720
+ "get",
13721
+ "delete",
13722
+ "head",
13723
+ "options",
13724
+ "post",
13725
+ "put",
13726
+ "patch",
13727
+ "purge",
13728
+ "link",
13729
+ "unlink",
13730
+ "query"
13731
+ ]);
13732
+ var methodList_default = methodList;
13733
+
13734
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/defaults/index.js
13367
13735
  var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
13368
- function stringifySafely(rawValue, parser, encoder) {
13736
+ function stringifySafely2(rawValue, parser, encoder) {
13369
13737
  if (utils_default.isString(rawValue)) {
13370
13738
  try {
13371
13739
  (parser || JSON.parse)(rawValue);
@@ -13421,7 +13789,7 @@ var defaults = {
13421
13789
  }
13422
13790
  if (isObjectPayload || hasJSONContentType) {
13423
13791
  headers.setContentType("application/json", false);
13424
- return stringifySafely(data);
13792
+ return stringifySafely2(data);
13425
13793
  }
13426
13794
  return data;
13427
13795
  }
@@ -13475,12 +13843,12 @@ var defaults = {
13475
13843
  }
13476
13844
  }
13477
13845
  };
13478
- utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
13846
+ utils_default.forEach(methodList_default, (method) => {
13479
13847
  defaults.headers[method] = {};
13480
13848
  });
13481
13849
  var defaults_default = defaults;
13482
13850
 
13483
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/transformData.js
13851
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/transformData.js
13484
13852
  function transformData(fns, response) {
13485
13853
  const config = this || defaults_default;
13486
13854
  const context = response || config;
@@ -13493,12 +13861,12 @@ function transformData(fns, response) {
13493
13861
  return data;
13494
13862
  }
13495
13863
 
13496
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/isCancel.js
13864
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/isCancel.js
13497
13865
  function isCancel(value) {
13498
13866
  return !!(value && value.__CANCEL__);
13499
13867
  }
13500
13868
 
13501
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/CanceledError.js
13869
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/CanceledError.js
13502
13870
  var CanceledError = class extends AxiosError_default {
13503
13871
  /**
13504
13872
  * A `CanceledError` is an object that is thrown when an operation is canceled.
@@ -13517,7 +13885,7 @@ var CanceledError = class extends AxiosError_default {
13517
13885
  };
13518
13886
  var CanceledError_default = CanceledError;
13519
13887
 
13520
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/settle.js
13888
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/settle.js
13521
13889
  function settle(resolve, reject, response) {
13522
13890
  const validateStatus2 = response.config.validateStatus;
13523
13891
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
@@ -13533,7 +13901,7 @@ function settle(resolve, reject, response) {
13533
13901
  }
13534
13902
  }
13535
13903
 
13536
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isAbsoluteURL.js
13904
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isAbsoluteURL.js
13537
13905
  function isAbsoluteURL(url2) {
13538
13906
  if (typeof url2 !== "string") {
13539
13907
  return false;
@@ -13541,15 +13909,71 @@ function isAbsoluteURL(url2) {
13541
13909
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
13542
13910
  }
13543
13911
 
13544
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/combineURLs.js
13912
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/combineURLs.js
13545
13913
  function combineURLs(baseURL, relativeURL) {
13546
- return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
13914
+ if (!relativeURL) {
13915
+ return baseURL;
13916
+ }
13917
+ let end = baseURL.length;
13918
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
13919
+ end--;
13920
+ }
13921
+ return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
13922
+ }
13923
+
13924
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js
13925
+ var urlParserControlCharacters = /[\t\n\r]/g;
13926
+ function normalizeURLForProtocolCheck(url2) {
13927
+ if (typeof url2 !== "string") {
13928
+ return url2;
13929
+ }
13930
+ let start = 0;
13931
+ while (start < url2.length && url2.charCodeAt(start) <= 32) {
13932
+ start++;
13933
+ }
13934
+ return url2.slice(start).replace(urlParserControlCharacters, "");
13547
13935
  }
13548
13936
 
13549
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/buildFullPath.js
13550
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
13937
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/buildFullPath.js
13938
+ var malformedHttpProtocol = /^https?:(?!\/\/)/i;
13939
+ function redactFragment(fragment) {
13940
+ if (!fragment) {
13941
+ return fragment;
13942
+ }
13943
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = "") => {
13944
+ return `${separator}${parameterName}${REDACTED}`;
13945
+ });
13946
+ }
13947
+ function redactSensitiveURLParts(url2) {
13948
+ const redactedURL = url2.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
13949
+ const fragmentIndex = redactedURL.indexOf("#");
13950
+ const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
13951
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(
13952
+ /([?&][^=&#]*=)[^&#]*/g,
13953
+ `$1${REDACTED}`
13954
+ );
13955
+ if (fragmentIndex === -1) {
13956
+ return redactedURLWithoutFragment;
13957
+ }
13958
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
13959
+ }
13960
+ function assertValidHttpProtocolURL(url2, config) {
13961
+ if (typeof url2 === "string") {
13962
+ const normalizedURL = normalizeURLForProtocolCheck(url2);
13963
+ if (malformedHttpProtocol.test(normalizedURL)) {
13964
+ throw new AxiosError_default(
13965
+ `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
13966
+ AxiosError_default.ERR_INVALID_URL,
13967
+ config
13968
+ );
13969
+ }
13970
+ }
13971
+ }
13972
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
13973
+ assertValidHttpProtocolURL(requestedURL, config);
13551
13974
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
13552
13975
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
13976
+ assertValidHttpProtocolURL(baseURL, config);
13553
13977
  return combineURLs(baseURL, requestedURL);
13554
13978
  }
13555
13979
  return requestedURL;
@@ -13622,27 +14046,27 @@ function getEnv(key) {
13622
14046
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
13623
14047
  }
13624
14048
 
13625
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
14049
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
13626
14050
  var import_https_proxy_agent = __toESM(require_dist(), 1);
13627
14051
  var import_follow_redirects = __toESM(require_follow_redirects(), 1);
13628
14052
  import http from "http";
13629
14053
  import https from "https";
13630
- import http2 from "http2";
13631
- import util2 from "util";
14054
+ import http22 from "http2";
14055
+ import util3 from "util";
13632
14056
  import { resolve as resolvePath } from "path";
13633
14057
  import zlib from "zlib";
13634
14058
 
13635
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/env/data.js
13636
- var VERSION = "1.16.1";
14059
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/env/data.js
14060
+ var VERSION = "1.20.0";
13637
14061
 
13638
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/parseProtocol.js
14062
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/parseProtocol.js
13639
14063
  function parseProtocol(url2) {
13640
14064
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
13641
14065
  return match && match[1] || "";
13642
14066
  }
13643
14067
 
13644
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/fromDataURI.js
13645
- var DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
14068
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/fromDataURI.js
14069
+ var DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
13646
14070
  function fromDataURI(uri, asBlob, options) {
13647
14071
  const _Blob = options && options.Blob || platform_default.classes.Blob;
13648
14072
  const protocol = parseProtocol(uri);
@@ -13659,13 +14083,13 @@ function fromDataURI(uri, asBlob, options) {
13659
14083
  const params = match[2];
13660
14084
  const encoding = match[3] ? "base64" : "utf8";
13661
14085
  const body = match[4];
13662
- let mime;
14086
+ let mime = "";
13663
14087
  if (type) {
13664
14088
  mime = params ? type + params : type;
13665
14089
  } else if (params) {
13666
14090
  mime = "text/plain" + params;
13667
14091
  }
13668
- const buffer = Buffer.from(decodeURIComponent(body), encoding);
14092
+ const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
13669
14093
  if (asBlob) {
13670
14094
  if (!_Blob) {
13671
14095
  throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
@@ -13677,10 +14101,24 @@ function fromDataURI(uri, asBlob, options) {
13677
14101
  throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
13678
14102
  }
13679
14103
 
13680
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
14104
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
13681
14105
  import stream3 from "stream";
13682
14106
 
13683
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/AxiosTransformStream.js
14107
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/setFormDataHeaders.js
14108
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
14109
+ function setFormDataHeaders(headers, formHeaders, policy) {
14110
+ if (policy !== "content-only") {
14111
+ headers.set(formHeaders);
14112
+ return;
14113
+ }
14114
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
14115
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
14116
+ headers.set(key, val);
14117
+ }
14118
+ });
14119
+ }
14120
+
14121
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/AxiosTransformStream.js
13684
14122
  import stream from "stream";
13685
14123
  var kInternals = /* @__PURE__ */ Symbol("internals");
13686
14124
  var AxiosTransformStream = class extends stream.Transform {
@@ -13803,14 +14241,14 @@ var AxiosTransformStream = class extends stream.Transform {
13803
14241
  };
13804
14242
  var AxiosTransformStream_default = AxiosTransformStream;
13805
14243
 
13806
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
14244
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
13807
14245
  import { EventEmitter } from "events";
13808
14246
 
13809
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToStream.js
14247
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToStream.js
13810
14248
  import util from "util";
13811
14249
  import { Readable } from "stream";
13812
14250
 
13813
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/readBlob.js
14251
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/readBlob.js
13814
14252
  var { asyncIterator } = Symbol;
13815
14253
  var readBlob = async function* (blob) {
13816
14254
  if (blob.stream) {
@@ -13825,7 +14263,7 @@ var readBlob = async function* (blob) {
13825
14263
  };
13826
14264
  var readBlob_default = readBlob;
13827
14265
 
13828
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToStream.js
14266
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToStream.js
13829
14267
  var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
13830
14268
  var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
13831
14269
  var CRLF = "\r\n";
@@ -13876,10 +14314,10 @@ var formDataToStream = (form, headersHandler, options) => {
13876
14314
  boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET)
13877
14315
  } = options || {};
13878
14316
  if (!utils_default.isFormData(form)) {
13879
- throw TypeError("FormData instance required");
14317
+ throw new TypeError("FormData instance required");
13880
14318
  }
13881
14319
  if (boundary.length < 1 || boundary.length > 70) {
13882
- throw Error("boundary must be 1-70 characters long");
14320
+ throw new Error("boundary must be 1-70 characters long");
13883
14321
  }
13884
14322
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
13885
14323
  const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
@@ -13910,7 +14348,7 @@ var formDataToStream = (form, headersHandler, options) => {
13910
14348
  };
13911
14349
  var formDataToStream_default = formDataToStream;
13912
14350
 
13913
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
14351
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
13914
14352
  import stream2 from "stream";
13915
14353
  var ZlibHeaderTransformStream = class extends stream2.Transform {
13916
14354
  __transform(chunk, encoding, callback) {
@@ -13932,7 +14370,90 @@ var ZlibHeaderTransformStream = class extends stream2.Transform {
13932
14370
  };
13933
14371
  var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
13934
14372
 
13935
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/callbackify.js
14373
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/Http2Sessions.js
14374
+ import http2 from "http2";
14375
+ import util2 from "util";
14376
+ var Http2Sessions = class {
14377
+ constructor() {
14378
+ this.sessions = /* @__PURE__ */ Object.create(null);
14379
+ }
14380
+ getSession(authority, options) {
14381
+ options = Object.assign(
14382
+ /* @__PURE__ */ Object.create(null),
14383
+ {
14384
+ sessionTimeout: 1e3
14385
+ },
14386
+ options
14387
+ );
14388
+ let authoritySessions = this.sessions[authority];
14389
+ if (authoritySessions) {
14390
+ let len = authoritySessions.length;
14391
+ for (let i = 0; i < len; i++) {
14392
+ const [sessionHandle, sessionOptions] = authoritySessions[i];
14393
+ if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
14394
+ return sessionHandle;
14395
+ }
14396
+ }
14397
+ }
14398
+ const session = http2.connect(authority, options);
14399
+ let removed;
14400
+ let timer;
14401
+ const removeSession = () => {
14402
+ if (removed) {
14403
+ return;
14404
+ }
14405
+ removed = true;
14406
+ if (timer) {
14407
+ clearTimeout(timer);
14408
+ timer = null;
14409
+ }
14410
+ let entries = authoritySessions, len = entries.length, i = len;
14411
+ while (i--) {
14412
+ if (entries[i][0] === session) {
14413
+ if (len === 1) {
14414
+ delete this.sessions[authority];
14415
+ } else {
14416
+ entries.splice(i, 1);
14417
+ }
14418
+ if (!session.closed) {
14419
+ session.close();
14420
+ }
14421
+ return;
14422
+ }
14423
+ }
14424
+ };
14425
+ const originalRequestFn = session.request;
14426
+ const { sessionTimeout } = options;
14427
+ if (sessionTimeout != null) {
14428
+ let streamsCount = 0;
14429
+ session.request = function() {
14430
+ const stream4 = originalRequestFn.apply(this, arguments);
14431
+ streamsCount++;
14432
+ if (timer) {
14433
+ clearTimeout(timer);
14434
+ timer = null;
14435
+ }
14436
+ stream4.once("close", () => {
14437
+ if (!--streamsCount) {
14438
+ timer = setTimeout(() => {
14439
+ timer = null;
14440
+ removeSession();
14441
+ }, sessionTimeout);
14442
+ }
14443
+ });
14444
+ return stream4;
14445
+ };
14446
+ }
14447
+ session.once("close", removeSession);
14448
+ session.once("error", removeSession);
14449
+ let entry = [session, options];
14450
+ authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
14451
+ return session;
14452
+ }
14453
+ };
14454
+ var Http2Sessions_default = Http2Sessions;
14455
+
14456
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/callbackify.js
13936
14457
  var callbackify = (fn, reducer) => {
13937
14458
  return utils_default.isAsyncFn(fn) ? function(...args) {
13938
14459
  const cb = args.pop();
@@ -13947,14 +14468,91 @@ var callbackify = (fn, reducer) => {
13947
14468
  };
13948
14469
  var callbackify_default = callbackify;
13949
14470
 
13950
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/shouldBypassProxy.js
13951
- var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
14471
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/shouldBypassProxy.js
14472
+ var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
14473
+ var trimTrailingDots = (value) => {
14474
+ let end = value.length;
14475
+ while (end && value.charCodeAt(end - 1) === 46) {
14476
+ end--;
14477
+ }
14478
+ return end === value.length ? value : value.slice(0, end);
14479
+ };
13952
14480
  var isIPv4Loopback = (host) => {
13953
14481
  const parts = host.split(".");
13954
14482
  if (parts.length !== 4) return false;
13955
14483
  if (parts[0] !== "127") return false;
13956
14484
  return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
13957
14485
  };
14486
+ var parseIPv4Octet = (text) => {
14487
+ if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
14488
+ const n = parseInt(text.slice(2), 16);
14489
+ return Number.isFinite(n) ? n : null;
14490
+ }
14491
+ if (text.length > 1 && /^0[0-7]+$/.test(text)) {
14492
+ const n = parseInt(text, 8);
14493
+ return Number.isFinite(n) ? n : null;
14494
+ }
14495
+ if (text.length > 1 && /^0[0-9]+$/.test(text)) {
14496
+ return null;
14497
+ }
14498
+ if (/^[0-9]+$/.test(text)) {
14499
+ const n = parseInt(text, 10);
14500
+ return Number.isFinite(n) ? n : null;
14501
+ }
14502
+ return null;
14503
+ };
14504
+ var normalizeIPAddress = (host) => {
14505
+ if (typeof host !== "string" || !host || host.indexOf(":") !== -1) {
14506
+ return host;
14507
+ }
14508
+ let h = host;
14509
+ if (h.charAt(0) === "[" && h.charAt(h.length - 1) === "]") {
14510
+ h = h.slice(1, -1);
14511
+ }
14512
+ h = trimTrailingDots(h);
14513
+ if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
14514
+ const parts = h.split(".");
14515
+ if (parts.some((p) => p === "")) return host;
14516
+ if (parts.length === 4) {
14517
+ const octets = parts.map(parseIPv4Octet);
14518
+ if (octets.some((n) => n === null || n < 0 || n > 255)) return host;
14519
+ return octets.join(".");
14520
+ }
14521
+ if (parts.length > 4) {
14522
+ return host;
14523
+ }
14524
+ if (parts.length === 1) return host;
14525
+ const literalOctets = parts.slice(0, -1);
14526
+ const tail = parts[parts.length - 1];
14527
+ const tailSlots = 4 - literalOctets.length;
14528
+ const tailValue = parseIPv4Octet(tail);
14529
+ if (tailValue === null) return host;
14530
+ const maxTail = (1 << 8 * tailSlots) - 1;
14531
+ if (tailValue < 0 || tailValue > maxTail) return host;
14532
+ const tailOctets = new Array(tailSlots).fill(0);
14533
+ for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) {
14534
+ tailOctets[i] = v & 255;
14535
+ }
14536
+ const literal = literalOctets.map(parseIPv4Octet);
14537
+ if (literal.some((n) => n === null || n < 0 || n > 255)) return host;
14538
+ return [...literal, ...tailOctets].join(".");
14539
+ };
14540
+ var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
14541
+ var isIPv6Unspecified = (host) => {
14542
+ if (host === "::") return true;
14543
+ const compressionIndex = host.indexOf("::");
14544
+ if (compressionIndex !== -1) {
14545
+ if (compressionIndex !== host.lastIndexOf("::")) return false;
14546
+ const left = host.slice(0, compressionIndex);
14547
+ const right = host.slice(compressionIndex + 2);
14548
+ const leftGroups = left ? left.split(":") : [];
14549
+ const rightGroups = right ? right.split(":") : [];
14550
+ const explicitGroups = leftGroups.length + rightGroups.length;
14551
+ return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup);
14552
+ }
14553
+ const groups = host.split(":");
14554
+ return groups.length === 8 && groups.every(isIPv6ZeroGroup);
14555
+ };
13958
14556
  var isIPv6Loopback = (host) => {
13959
14557
  if (host === "::1") return true;
13960
14558
  const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
@@ -13977,6 +14575,7 @@ var isLoopback = (host) => {
13977
14575
  if (!host) return false;
13978
14576
  if (LOOPBACK_HOSTNAMES.has(host)) return true;
13979
14577
  if (isIPv4Loopback(host)) return true;
14578
+ if (isIPv6Unspecified(host)) return true;
13980
14579
  return isIPv6Loopback(host);
13981
14580
  };
13982
14581
  var DEFAULT_PORTS2 = {
@@ -14022,6 +14621,40 @@ var unmapIPv4MappedIPv6 = (host) => {
14022
14621
  }
14023
14622
  return host;
14024
14623
  };
14624
+ var IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/;
14625
+ var ipv4ToBytes = (host) => {
14626
+ const parts = host.split(".");
14627
+ return parts.length === 4 && parts.every((part) => IPV4_OCTET_RE.test(part) && Number(part) <= 255) ? parts.map(Number) : null;
14628
+ };
14629
+ var IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i;
14630
+ var ipv6ToBytes = (host) => {
14631
+ const halves = host.split("::");
14632
+ if (halves.length > 2) {
14633
+ return null;
14634
+ }
14635
+ const groups = halves[0] ? halves[0].split(":") : [];
14636
+ if (halves.length === 2) {
14637
+ const rear = halves[1] ? halves[1].split(":") : [];
14638
+ const missing = 8 - groups.length - rear.length;
14639
+ if (missing < 1) {
14640
+ return null;
14641
+ }
14642
+ groups.push(...new Array(missing).fill("0"), ...rear);
14643
+ }
14644
+ if (groups.length !== 8 || groups.some((group) => !IPV6_GROUP_RE.test(group))) {
14645
+ return null;
14646
+ }
14647
+ return groups.flatMap((group) => {
14648
+ const value = Number.parseInt(group, 16);
14649
+ return [value >> 8 & 255, value & 255];
14650
+ });
14651
+ };
14652
+ var ipToBytes = (host) => {
14653
+ if (typeof host !== "string" || !host) {
14654
+ return null;
14655
+ }
14656
+ return host.indexOf(":") !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host);
14657
+ };
14025
14658
  var normalizeNoProxyHost = (hostname) => {
14026
14659
  if (!hostname) {
14027
14660
  return hostname;
@@ -14029,7 +14662,89 @@ var normalizeNoProxyHost = (hostname) => {
14029
14662
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
14030
14663
  hostname = hostname.slice(1, -1);
14031
14664
  }
14032
- return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
14665
+ const trimmed = trimTrailingDots(hostname);
14666
+ const ipv4 = normalizeIPAddress(trimmed);
14667
+ if (ipv4 !== trimmed) {
14668
+ return ipv4;
14669
+ }
14670
+ return unmapIPv4MappedIPv6(trimmed);
14671
+ };
14672
+ var normalizeCidrBase = (input) => {
14673
+ let base = input;
14674
+ const startsBracket = base.charAt(0) === "[";
14675
+ const endsBracket = base.charAt(base.length - 1) === "]";
14676
+ const hasBracket = base.includes("[") || base.includes("]");
14677
+ if (startsBracket || endsBracket) {
14678
+ if (!startsBracket || !endsBracket) {
14679
+ return null;
14680
+ }
14681
+ base = base.slice(1, -1);
14682
+ if (base.indexOf(":") === -1 || base.includes("[") || base.includes("]")) {
14683
+ return null;
14684
+ }
14685
+ } else if (hasBracket) {
14686
+ return null;
14687
+ }
14688
+ if (!base || base.charAt(base.length - 1) === ".") {
14689
+ return null;
14690
+ }
14691
+ const wasIPv6 = base.indexOf(":") !== -1;
14692
+ if (wasIPv6) {
14693
+ try {
14694
+ base = new URL(`http://[${base}]/`).hostname.slice(1, -1);
14695
+ } catch (_err) {
14696
+ return null;
14697
+ }
14698
+ } else {
14699
+ base = normalizeIPAddress(base);
14700
+ if (!ipv4ToBytes(base)) {
14701
+ return null;
14702
+ }
14703
+ }
14704
+ return { normalized: unmapIPv4MappedIPv6(base), wasIPv6 };
14705
+ };
14706
+ var CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/;
14707
+ var parseCidrEntry = (entry) => {
14708
+ if (entry.indexOf("/") === -1) {
14709
+ return void 0;
14710
+ }
14711
+ const match = CIDR_ENTRY_RE.exec(entry);
14712
+ if (!match) {
14713
+ return null;
14714
+ }
14715
+ let prefix = Number(match[2]);
14716
+ const parsedBase = normalizeCidrBase(match[1]);
14717
+ if (!parsedBase) {
14718
+ return null;
14719
+ }
14720
+ const { normalized, wasIPv6 } = parsedBase;
14721
+ if (wasIPv6 && normalized.indexOf(":") === -1) {
14722
+ if (prefix < 96) {
14723
+ return null;
14724
+ }
14725
+ prefix -= 96;
14726
+ }
14727
+ const bytes = ipToBytes(normalized);
14728
+ if (!bytes || prefix > bytes.length * 8) {
14729
+ return null;
14730
+ }
14731
+ return { bytes, prefix };
14732
+ };
14733
+ var isInSubnet = (addressBytes, networkBytes, prefix) => {
14734
+ const fullBytes = prefix >> 3;
14735
+ for (let i = 0; i < fullBytes; i++) {
14736
+ if (addressBytes[i] !== networkBytes[i]) {
14737
+ return false;
14738
+ }
14739
+ }
14740
+ const remainingBits = prefix & 7;
14741
+ if (remainingBits) {
14742
+ const mask = 255 << 8 - remainingBits & 255;
14743
+ if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) {
14744
+ return false;
14745
+ }
14746
+ }
14747
+ return true;
14033
14748
  };
14034
14749
  function shouldBypassProxy(location) {
14035
14750
  let parsed;
@@ -14047,10 +14762,18 @@ function shouldBypassProxy(location) {
14047
14762
  }
14048
14763
  const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
14049
14764
  const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
14765
+ const hostnameBytes = ipToBytes(hostname);
14050
14766
  return noProxy.split(/[\s,]+/).some((entry) => {
14051
14767
  if (!entry) {
14052
14768
  return false;
14053
14769
  }
14770
+ if (entry === "*") {
14771
+ return true;
14772
+ }
14773
+ const cidr = parseCidrEntry(entry);
14774
+ if (cidr !== void 0) {
14775
+ return cidr !== null && !!hostnameBytes && hostnameBytes.length === cidr.bytes.length && isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix);
14776
+ }
14054
14777
  let [entryHost, entryPort] = parseNoProxyEntry(entry);
14055
14778
  entryHost = normalizeNoProxyHost(entryHost);
14056
14779
  if (!entryHost) {
@@ -14069,7 +14792,7 @@ function shouldBypassProxy(location) {
14069
14792
  });
14070
14793
  }
14071
14794
 
14072
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/speedometer.js
14795
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/speedometer.js
14073
14796
  function speedometer(samplesCount, min) {
14074
14797
  samplesCount = samplesCount || 10;
14075
14798
  const bytes = new Array(samplesCount);
@@ -14105,7 +14828,7 @@ function speedometer(samplesCount, min) {
14105
14828
  }
14106
14829
  var speedometer_default = speedometer;
14107
14830
 
14108
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/throttle.js
14831
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/throttle.js
14109
14832
  function throttle(fn, freq) {
14110
14833
  let timestamp = 0;
14111
14834
  let threshold = 1e3 / freq;
@@ -14136,21 +14859,22 @@ function throttle(fn, freq) {
14136
14859
  }
14137
14860
  };
14138
14861
  const flush = () => lastArgs && invoke(lastArgs);
14139
- return [throttled, flush];
14862
+ const flushWith = (...args) => invoke(args);
14863
+ return [throttled, flush, flushWith];
14140
14864
  }
14141
14865
  var throttle_default = throttle;
14142
14866
 
14143
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/progressEventReducer.js
14867
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/progressEventReducer.js
14144
14868
  var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
14145
14869
  let bytesNotified = 0;
14146
14870
  const _speedometer = speedometer_default(50, 250);
14147
14871
  return throttle_default((e) => {
14148
- if (!e || typeof e.loaded !== "number") {
14872
+ if (!e || !utils_default.isNumber(e.loaded)) {
14149
14873
  return;
14150
14874
  }
14151
14875
  const rawLoaded = e.loaded;
14152
14876
  const total = e.lengthComputable ? e.total : void 0;
14153
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
14877
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
14154
14878
  const progressBytes = Math.max(0, loaded - bytesNotified);
14155
14879
  const rate = _speedometer(progressBytes);
14156
14880
  bytesNotified = Math.max(bytesNotified, loaded);
@@ -14179,10 +14903,66 @@ var progressEventDecorator = (total, throttled) => {
14179
14903
  throttled[1]
14180
14904
  ];
14181
14905
  };
14182
- var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
14906
+ var asyncDecorator = (fn, scheduler = utils_default.asap) => (...args) => scheduler(() => fn(...args));
14183
14907
 
14184
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
14185
- function estimateDataURLDecodedBytes(url2) {
14908
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
14909
+ var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
14910
+ var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
14911
+ var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
14912
+ var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || // A-Z
14913
+ charCode >= 97 && charCode <= 122 || // a-z
14914
+ charCode >= 48 && charCode <= 57 || // 0-9
14915
+ charCode === 43 || // +
14916
+ charCode === 47 || // /
14917
+ charCode === 45 || // - (base64url)
14918
+ charCode === 95;
14919
+ var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
14920
+ var base64Bytes = (significant) => {
14921
+ const groups = Math.floor(significant / 4);
14922
+ const remainder = significant % 4;
14923
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
14924
+ };
14925
+ var estimateBase64BufferAllocation = (body) => {
14926
+ const len = body.length;
14927
+ let padding = 0;
14928
+ if (len > 0 && body.charCodeAt(len - 1) === 61) {
14929
+ padding++;
14930
+ if (len > 1 && body.charCodeAt(len - 2) === 61) {
14931
+ padding++;
14932
+ }
14933
+ }
14934
+ return Math.floor((len - padding) * 3 / 4);
14935
+ };
14936
+ var estimatePercentDecodedBase64Bytes = (body) => {
14937
+ const len = body.length;
14938
+ let significant = 0;
14939
+ let padding = 0;
14940
+ let invalid = false;
14941
+ for (let i = 0; i < len; i++) {
14942
+ let code = body.charCodeAt(i);
14943
+ if (code === 37 && isPercentEncodedByte(body, i, len)) {
14944
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
14945
+ i += 2;
14946
+ }
14947
+ if (isBase64Whitespace(code)) {
14948
+ continue;
14949
+ }
14950
+ if (code === 61) {
14951
+ padding++;
14952
+ continue;
14953
+ }
14954
+ if (!isBase64Char(code) || padding > 0) {
14955
+ invalid = true;
14956
+ continue;
14957
+ }
14958
+ significant++;
14959
+ }
14960
+ if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) {
14961
+ return estimateBase64BufferAllocation(body);
14962
+ }
14963
+ return base64Bytes(significant);
14964
+ };
14965
+ var estimateDataURLBytes = (url2, estimateBase64) => {
14186
14966
  if (!url2 || typeof url2 !== "string") return 0;
14187
14967
  if (!url2.startsWith("data:")) return 0;
14188
14968
  const comma = url2.indexOf(",");
@@ -14191,51 +14971,15 @@ function estimateDataURLDecodedBytes(url2) {
14191
14971
  const body = url2.slice(comma + 1);
14192
14972
  const isBase64 = /;base64/i.test(meta);
14193
14973
  if (isBase64) {
14194
- let effectiveLen = body.length;
14195
- const len = body.length;
14196
- for (let i = 0; i < len; i++) {
14197
- if (body.charCodeAt(i) === 37 && i + 2 < len) {
14198
- const a = body.charCodeAt(i + 1);
14199
- const b = body.charCodeAt(i + 2);
14200
- const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
14201
- if (isHex) {
14202
- effectiveLen -= 2;
14203
- i += 2;
14204
- }
14205
- }
14206
- }
14207
- let pad = 0;
14208
- let idx = len - 1;
14209
- const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%'
14210
- body.charCodeAt(j - 1) === 51 && // '3'
14211
- (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
14212
- if (idx >= 0) {
14213
- if (body.charCodeAt(idx) === 61) {
14214
- pad++;
14215
- idx--;
14216
- } else if (tailIsPct3D(idx)) {
14217
- pad++;
14218
- idx -= 3;
14219
- }
14220
- }
14221
- if (pad === 1 && idx >= 0) {
14222
- if (body.charCodeAt(idx) === 61) {
14223
- pad++;
14224
- } else if (tailIsPct3D(idx)) {
14225
- pad++;
14226
- }
14227
- }
14228
- const groups = Math.floor(effectiveLen / 4);
14229
- const bytes2 = groups * 3 - (pad || 0);
14230
- return bytes2 > 0 ? bytes2 : 0;
14231
- }
14232
- if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
14233
- return Buffer.byteLength(body, "utf8");
14974
+ return estimateBase64(body);
14234
14975
  }
14235
14976
  let bytes = 0;
14236
14977
  for (let i = 0, len = body.length; i < len; i++) {
14237
14978
  const c = body.charCodeAt(i);
14238
- if (c < 128) {
14979
+ if (c === 37 && isPercentEncodedByte(body, i, len)) {
14980
+ bytes += 1;
14981
+ i += 2;
14982
+ } else if (c < 128) {
14239
14983
  bytes += 1;
14240
14984
  } else if (c < 2048) {
14241
14985
  bytes += 2;
@@ -14252,9 +14996,19 @@ function estimateDataURLDecodedBytes(url2) {
14252
14996
  }
14253
14997
  }
14254
14998
  return bytes;
14999
+ };
15000
+ function estimateDataURLDecodedBytes(url2) {
15001
+ const fragmentIndex = typeof url2 === "string" ? url2.indexOf("#") : -1;
15002
+ return estimateDataURLBytes(
15003
+ fragmentIndex === -1 ? url2 : url2.slice(0, fragmentIndex),
15004
+ estimatePercentDecodedBase64Bytes
15005
+ );
15006
+ }
15007
+ function estimateDataURLBufferAllocation(url2) {
15008
+ return estimateDataURLBytes(url2, estimateBase64BufferAllocation);
14255
15009
  }
14256
15010
 
14257
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
15011
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
14258
15012
  var zlibOptions = {
14259
15013
  flush: zlib.constants.Z_SYNC_FLUSH,
14260
15014
  finishFlush: zlib.constants.Z_SYNC_FLUSH
@@ -14263,138 +15017,131 @@ var brotliOptions = {
14263
15017
  flush: zlib.constants.BROTLI_OPERATION_FLUSH,
14264
15018
  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
14265
15019
  };
15020
+ var zstdOptions = {
15021
+ flush: zlib.constants.ZSTD_e_flush,
15022
+ finishFlush: zlib.constants.ZSTD_e_flush
15023
+ };
14266
15024
  var isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress);
15025
+ var isZstdSupported = utils_default.isFunction(zlib.createZstdDecompress);
15026
+ var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
15027
+ var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
15028
+ var scheduleProgress = typeof process !== "undefined" && process.nextTick ? process.nextTick.bind(process) : utils_default.asap;
14267
15029
  var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
14268
15030
  var isHttps = /https:?/;
14269
- var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
14270
- function setFormDataHeaders(headers, formHeaders, policy) {
14271
- if (policy !== "content-only") {
14272
- headers.set(formHeaders);
14273
- return;
14274
- }
14275
- Object.entries(formHeaders).forEach(([key, val]) => {
14276
- if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
14277
- headers.set(key, val);
14278
- }
14279
- });
14280
- }
14281
15031
  var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
14282
15032
  var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
15033
+ function handleSocketError(err) {
15034
+ const current = this[kAxiosCurrentReq];
15035
+ if (current && !current.destroyed) {
15036
+ current.destroy(err);
15037
+ }
15038
+ }
14283
15039
  var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
14284
15040
  var tunnelingAgentCache = /* @__PURE__ */ new Map();
14285
15041
  var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
14286
- function getTunnelingAgent(agentOptions, userHttpsAgent) {
14287
- const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
14288
- const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
14289
- let agent = cache.get(key);
14290
- if (agent) return agent;
14291
- const merged = userHttpsAgent && userHttpsAgent.options ? { ...userHttpsAgent.options, ...agentOptions } : agentOptions;
14292
- agent = new import_https_proxy_agent.default(merged);
14293
- agent[kAxiosInstalledTunnel] = true;
14294
- cache.set(key, agent);
14295
- return agent;
14296
- }
14297
- var supportedProtocols = platform_default.protocols.map((protocol) => {
14298
- return protocol + ":";
14299
- });
14300
- var decodeURIComponentSafe = (value) => {
14301
- if (!utils_default.isString(value)) {
14302
- return value;
14303
- }
14304
- try {
14305
- return decodeURIComponent(value);
14306
- } catch (error) {
14307
- return value;
14308
- }
15042
+ var NODE_NATIVE_ENV_PROXY_SUPPORT = {
15043
+ 22: 21,
15044
+ 24: 5
14309
15045
  };
14310
- var flushOnFinish = (stream4, [throttled, flush]) => {
14311
- stream4.on("end", flush).on("error", flush);
14312
- return throttled;
14313
- };
14314
- var Http2Sessions = class {
14315
- constructor() {
14316
- this.sessions = /* @__PURE__ */ Object.create(null);
15046
+ function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
15047
+ if (!nodeVersion) {
15048
+ return false;
14317
15049
  }
14318
- getSession(authority, options) {
14319
- options = Object.assign(
14320
- {
14321
- sessionTimeout: 1e3
14322
- },
14323
- options
14324
- );
14325
- let authoritySessions = this.sessions[authority];
14326
- if (authoritySessions) {
14327
- let len = authoritySessions.length;
14328
- for (let i = 0; i < len; i++) {
14329
- const [sessionHandle, sessionOptions] = authoritySessions[i];
14330
- if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
14331
- return sessionHandle;
14332
- }
14333
- }
14334
- }
14335
- const session = http2.connect(authority, options);
14336
- let removed;
14337
- const removeSession = () => {
14338
- if (removed) {
14339
- return;
14340
- }
14341
- removed = true;
14342
- let entries = authoritySessions, len = entries.length, i = len;
14343
- while (i--) {
14344
- if (entries[i][0] === session) {
14345
- if (len === 1) {
14346
- delete this.sessions[authority];
14347
- } else {
14348
- entries.splice(i, 1);
14349
- }
14350
- if (!session.closed) {
14351
- session.close();
14352
- }
14353
- return;
14354
- }
14355
- }
14356
- };
14357
- const originalRequestFn = session.request;
14358
- const { sessionTimeout } = options;
14359
- if (sessionTimeout != null) {
14360
- let timer;
14361
- let streamsCount = 0;
14362
- session.request = function() {
14363
- const stream4 = originalRequestFn.apply(this, arguments);
14364
- streamsCount++;
14365
- if (timer) {
14366
- clearTimeout(timer);
14367
- timer = null;
14368
- }
14369
- stream4.once("close", () => {
14370
- if (!--streamsCount) {
14371
- timer = setTimeout(() => {
14372
- timer = null;
14373
- removeSession();
14374
- }, sessionTimeout);
14375
- }
14376
- });
14377
- return stream4;
14378
- };
14379
- }
14380
- session.once("close", removeSession);
14381
- let entry = [session, options];
14382
- authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
14383
- return session;
15050
+ const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
15051
+ if (!Number.isInteger(major) || !Number.isInteger(minor)) {
15052
+ return false;
14384
15053
  }
15054
+ if (major > 24) {
15055
+ return true;
15056
+ }
15057
+ return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
15058
+ }
15059
+ function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
15060
+ if (!isNodeNativeEnvProxySupported(nodeVersion)) {
15061
+ return false;
15062
+ }
15063
+ const agentOptions = agent && agent.options;
15064
+ return Boolean(
15065
+ agentOptions && utils_default.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null
15066
+ );
15067
+ }
15068
+ function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
15069
+ return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent;
15070
+ }
15071
+ function getTunnelingAgent(agentOptions, userHttpsAgent) {
15072
+ const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
15073
+ const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
15074
+ let agent = cache.get(key);
15075
+ if (agent) return agent;
15076
+ const merged = userHttpsAgent && userHttpsAgent.options ? { ...userHttpsAgent.options, ...agentOptions } : agentOptions;
15077
+ agent = new import_https_proxy_agent.default(merged);
15078
+ if (userHttpsAgent && userHttpsAgent.options) {
15079
+ const originTLSOptions = { ...userHttpsAgent.options };
15080
+ const callback = agent.callback;
15081
+ agent.callback = function axiosTunnelingAgentCallback(req, opts) {
15082
+ return callback.call(this, req, { ...originTLSOptions, ...opts });
15083
+ };
15084
+ }
15085
+ agent[kAxiosInstalledTunnel] = true;
15086
+ cache.set(key, agent);
15087
+ return agent;
15088
+ }
15089
+ var supportedProtocols = platform_default.protocols.map((protocol) => {
15090
+ return protocol + ":";
15091
+ });
15092
+ var decodeURIComponentSafe = (value) => {
15093
+ if (!utils_default.isString(value)) {
15094
+ return value;
15095
+ }
15096
+ try {
15097
+ return decodeURIComponent(value);
15098
+ } catch (error) {
15099
+ return value;
15100
+ }
15101
+ };
15102
+ var flushOnFinish = (stream4, [throttled, flush]) => {
15103
+ stream4.on("end", flush).on("error", flush);
15104
+ return throttled;
14385
15105
  };
14386
- var http2Sessions = new Http2Sessions();
15106
+ var http2Sessions = new Http2Sessions_default();
14387
15107
  function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
14388
15108
  if (options.beforeRedirects.proxy) {
14389
15109
  options.beforeRedirects.proxy(options);
14390
15110
  }
15111
+ if (options.beforeRedirects.auth) {
15112
+ options.beforeRedirects.auth(options);
15113
+ }
15114
+ if (options.beforeRedirects.sensitiveHeaders) {
15115
+ options.beforeRedirects.sensitiveHeaders(options, requestDetails);
15116
+ }
14391
15117
  if (options.beforeRedirects.config) {
14392
15118
  options.beforeRedirects.config(options, responseDetails, requestDetails);
14393
15119
  }
14394
15120
  }
14395
- function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) {
15121
+ function stripMatchingHeaders(headers, sensitiveSet) {
15122
+ if (!headers) {
15123
+ return;
15124
+ }
15125
+ Object.keys(headers).forEach((header) => {
15126
+ if (sensitiveSet.has(header.toLowerCase())) {
15127
+ delete headers[header];
15128
+ }
15129
+ });
15130
+ }
15131
+ function isSameOriginRedirect(redirectOptions, requestDetails) {
15132
+ if (!requestDetails) {
15133
+ return false;
15134
+ }
15135
+ try {
15136
+ return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin;
15137
+ } catch (e) {
15138
+ return false;
15139
+ }
15140
+ }
15141
+ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent, allowEnvProxy = true) {
14396
15142
  let proxy = configProxy;
14397
- if (!proxy && proxy !== false) {
15143
+ const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
15144
+ if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
14398
15145
  const proxyUrl = getProxyForUrl(location);
14399
15146
  if (proxyUrl) {
14400
15147
  if (!shouldBypassProxy(location)) {
@@ -14485,8 +15232,19 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent)
14485
15232
  }
14486
15233
  }
14487
15234
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
14488
- setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
15235
+ setProxy(
15236
+ redirectOptions,
15237
+ configProxy,
15238
+ redirectOptions.href,
15239
+ true,
15240
+ configHttpsAgent,
15241
+ configHttpAgent,
15242
+ allowEnvProxy
15243
+ );
14489
15244
  };
15245
+ return Boolean(
15246
+ proxy || configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent)
15247
+ );
14490
15248
  }
14491
15249
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
14492
15250
  var wrapAsync = (asyncExecutor) => {
@@ -14511,7 +15269,7 @@ var wrapAsync = (asyncExecutor) => {
14511
15269
  };
14512
15270
  var resolveFamily = ({ address, family }) => {
14513
15271
  if (!utils_default.isString(address)) {
14514
- throw TypeError("address must be a string");
15272
+ throw new AxiosError_default("address must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE);
14515
15273
  }
14516
15274
  return {
14517
15275
  address,
@@ -14519,12 +15277,36 @@ var resolveFamily = ({ address, family }) => {
14519
15277
  };
14520
15278
  };
14521
15279
  var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
15280
+ var normalizedLookupCache = /* @__PURE__ */ new WeakMap();
15281
+ var normalizeLookup = (lookup) => {
15282
+ let normalized = normalizedLookupCache.get(lookup);
15283
+ if (normalized) {
15284
+ return normalized;
15285
+ }
15286
+ const callbackLookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
15287
+ normalized = (hostname, opt, cb) => {
15288
+ callbackLookup(hostname, opt, (err, arg0, arg1) => {
15289
+ if (err) {
15290
+ return cb(err);
15291
+ }
15292
+ let addresses;
15293
+ try {
15294
+ addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
15295
+ } catch (error) {
15296
+ return cb(error);
15297
+ }
15298
+ opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
15299
+ });
15300
+ };
15301
+ normalizedLookupCache.set(lookup, normalized);
15302
+ return normalized;
15303
+ };
14522
15304
  var http2Transport = {
14523
15305
  request(options, cb) {
14524
15306
  const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
14525
15307
  const { http2Options, headers } = options;
14526
15308
  const session = http2Sessions.getSession(authority, http2Options);
14527
- const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2.constants;
15309
+ const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http22.constants;
14528
15310
  const http2Headers = {
14529
15311
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
14530
15312
  [HTTP2_HEADER_METHOD]: options.method,
@@ -14548,39 +15330,56 @@ var http2Transport = {
14548
15330
  };
14549
15331
  var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14550
15332
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
14551
- const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
15333
+ const own2 = (key) => utils_default.getSafeProp(config, key);
15334
+ const transitional2 = own2("transitional") || transitional_default;
14552
15335
  let data = own2("data");
14553
15336
  let lookup = own2("lookup");
14554
15337
  let family = own2("family");
14555
15338
  let httpVersion = own2("httpVersion");
14556
15339
  if (httpVersion === void 0) httpVersion = 1;
15340
+ const rawHttpVersion = httpVersion;
14557
15341
  let http2Options = own2("http2Options");
15342
+ const httpAgent = own2("httpAgent");
15343
+ const httpsAgent = own2("httpsAgent");
15344
+ const configProxy = own2("proxy");
14558
15345
  const responseType = own2("responseType");
14559
15346
  const responseEncoding = own2("responseEncoding");
14560
- const method = config.method.toUpperCase();
15347
+ const socketPath = own2("socketPath");
15348
+ const method = own2("method").toUpperCase();
15349
+ const maxRedirects = own2("maxRedirects");
15350
+ const maxBodyLength = own2("maxBodyLength");
15351
+ const maxContentLength = own2("maxContentLength");
15352
+ const decompress = own2("decompress");
14561
15353
  let isDone;
14562
15354
  let rejected = false;
14563
15355
  let req;
14564
15356
  let connectPhaseTimer;
14565
- httpVersion = +httpVersion;
15357
+ try {
15358
+ httpVersion = +httpVersion;
15359
+ } catch (err) {
15360
+ throw new AxiosError_default(
15361
+ "Invalid protocol version: value is not a number",
15362
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15363
+ config
15364
+ );
15365
+ }
14566
15366
  if (Number.isNaN(httpVersion)) {
14567
- throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
15367
+ throw new AxiosError_default(
15368
+ `Invalid protocol version: '${rawHttpVersion}' is not a number`,
15369
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15370
+ config
15371
+ );
14568
15372
  }
14569
15373
  if (httpVersion !== 1 && httpVersion !== 2) {
14570
- throw TypeError(`Unsupported protocol version '${httpVersion}'`);
15374
+ throw new AxiosError_default(
15375
+ `Unsupported protocol version '${httpVersion}'`,
15376
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15377
+ config
15378
+ );
14571
15379
  }
14572
15380
  const isHttp2 = httpVersion === 2;
14573
15381
  if (lookup) {
14574
- const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
14575
- lookup = (hostname, opt, cb) => {
14576
- _lookup(hostname, opt, (err, arg0, arg1) => {
14577
- if (err) {
14578
- return cb(err);
14579
- }
14580
- const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
14581
- opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
14582
- });
14583
- };
15382
+ lookup = normalizeLookup(lookup);
14584
15383
  }
14585
15384
  const abortEmitter = new EventEmitter();
14586
15385
  function abort(reason) {
@@ -14590,7 +15389,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14590
15389
  !reason || reason.type ? new CanceledError_default(null, config, req) : reason
14591
15390
  );
14592
15391
  } catch (err) {
14593
- console.warn("emit error", err);
14594
15392
  }
14595
15393
  }
14596
15394
  function clearConnectPhaseTimer() {
@@ -14600,10 +15398,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14600
15398
  }
14601
15399
  }
14602
15400
  function createTimeoutError() {
14603
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
14604
- const transitional2 = config.transitional || transitional_default;
14605
- if (config.timeoutErrorMessage) {
14606
- timeoutErrorMessage = config.timeoutErrorMessage;
15401
+ const configTimeout = own2("timeout");
15402
+ let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded";
15403
+ const configTimeoutErrorMessage = own2("timeoutErrorMessage");
15404
+ if (configTimeoutErrorMessage) {
15405
+ timeoutErrorMessage = configTimeoutErrorMessage;
14607
15406
  }
14608
15407
  return new AxiosError_default(
14609
15408
  timeoutErrorMessage,
@@ -14647,17 +15446,18 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14647
15446
  onFinished();
14648
15447
  }
14649
15448
  });
14650
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
14651
- const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
15449
+ const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
15450
+ const urlBase = socketPath ? "http://localhost" : platform_default.hasBrowserEnv ? platform_default.origin : void 0;
15451
+ const parsed = new URL(fullPath, urlBase);
14652
15452
  const protocol = parsed.protocol || supportedProtocols[0];
14653
15453
  if (protocol === "data:") {
14654
- if (config.maxContentLength > -1) {
14655
- const dataUrl = String(config.url || fullPath || "");
14656
- const estimated = estimateDataURLDecodedBytes(dataUrl);
14657
- if (estimated > config.maxContentLength) {
15454
+ if (maxContentLength > -1) {
15455
+ const dataUrl = String(own2("url") || fullPath || "");
15456
+ const estimated = estimateDataURLBufferAllocation(dataUrl);
15457
+ if (estimated > maxContentLength) {
14658
15458
  return reject(
14659
15459
  new AxiosError_default(
14660
- "maxContentLength size of " + config.maxContentLength + " exceeded",
15460
+ "maxContentLength size of " + maxContentLength + " exceeded",
14661
15461
  AxiosError_default.ERR_BAD_RESPONSE,
14662
15462
  config
14663
15463
  )
@@ -14674,7 +15474,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14674
15474
  });
14675
15475
  }
14676
15476
  try {
14677
- convertedData = fromDataURI(config.url, responseType === "blob", {
15477
+ convertedData = fromDataURI(own2("url"), responseType === "blob", {
14678
15478
  Blob: config.env && config.env.Blob
14679
15479
  });
14680
15480
  } catch (err) {
@@ -14723,7 +15523,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14723
15523
  setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
14724
15524
  if (!headers.hasContentLength()) {
14725
15525
  try {
14726
- const knownLength = await util2.promisify(data.getLength).call(data);
15526
+ const knownLength = await util3.promisify(data.getLength).call(data);
14727
15527
  Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
14728
15528
  } catch (e) {
14729
15529
  }
@@ -14748,7 +15548,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14748
15548
  );
14749
15549
  }
14750
15550
  headers.setContentLength(data.length, false);
14751
- if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
15551
+ if (maxBodyLength > -1 && data.length > maxBodyLength) {
14752
15552
  return reject(
14753
15553
  new AxiosError_default(
14754
15554
  "Request body larger than maxBodyLength limit",
@@ -14784,7 +15584,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14784
15584
  data,
14785
15585
  progressEventDecorator(
14786
15586
  contentLength,
14787
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
15587
+ progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3)
14788
15588
  )
14789
15589
  )
14790
15590
  );
@@ -14792,11 +15592,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14792
15592
  let auth = void 0;
14793
15593
  const configAuth = own2("auth");
14794
15594
  if (configAuth) {
14795
- const username = configAuth.username || "";
14796
- const password = configAuth.password || "";
15595
+ const username = utils_default.getSafeProp(configAuth, "username") || "";
15596
+ const password = utils_default.getSafeProp(configAuth, "password") || "";
14797
15597
  auth = username + ":" + password;
14798
15598
  }
14799
- if (!auth && parsed.username) {
15599
+ if (!auth && (parsed.username || parsed.password)) {
14800
15600
  const urlUsername = decodeURIComponentSafe(parsed.username);
14801
15601
  const urlPassword = decodeURIComponentSafe(parsed.password);
14802
15602
  auth = urlUsername + ":" + urlPassword;
@@ -14806,96 +15606,165 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14806
15606
  try {
14807
15607
  path = buildURL(
14808
15608
  parsed.pathname + parsed.search,
14809
- config.params,
14810
- config.paramsSerializer
15609
+ own2("params"),
15610
+ own2("paramsSerializer")
14811
15611
  ).replace(/^\?/, "");
14812
15612
  } catch (err) {
14813
- const customErr = new Error(err.message);
14814
- customErr.config = config;
14815
- customErr.url = config.url;
14816
- customErr.exists = true;
14817
- return reject(customErr);
15613
+ return reject(
15614
+ AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config, null, null, {
15615
+ url: own2("url"),
15616
+ exists: true
15617
+ })
15618
+ );
14818
15619
  }
14819
15620
  headers.set(
14820
15621
  "Accept-Encoding",
14821
- "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""),
15622
+ utils_default.hasOwnProp(transitional2, "advertiseZstdAcceptEncoding") && transitional2.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING,
14822
15623
  false
14823
15624
  );
15625
+ if (isHttp2 && lookup) {
15626
+ http2Options = Object.assign(/* @__PURE__ */ Object.create(null), http2Options, { lookup });
15627
+ }
14824
15628
  const options = Object.assign(/* @__PURE__ */ Object.create(null), {
14825
15629
  path,
14826
15630
  method,
14827
15631
  headers: toByteStringHeaderObject(headers),
14828
- agents: { http: config.httpAgent, https: config.httpsAgent },
15632
+ agents: { http: httpAgent, https: httpsAgent },
14829
15633
  auth,
14830
15634
  protocol,
14831
15635
  family,
14832
15636
  beforeRedirect: dispatchBeforeRedirect,
14833
15637
  beforeRedirects: /* @__PURE__ */ Object.create(null),
14834
- http2Options
15638
+ http2Options,
15639
+ createConnection: void 0
14835
15640
  });
14836
15641
  !utils_default.isUndefined(lookup) && (options.lookup = lookup);
14837
- if (config.socketPath) {
14838
- if (typeof config.socketPath !== "string") {
15642
+ let proxyApplied = false;
15643
+ if (socketPath) {
15644
+ if (typeof socketPath !== "string") {
14839
15645
  return reject(
14840
15646
  new AxiosError_default("socketPath must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE, config)
14841
15647
  );
14842
15648
  }
14843
- if (config.allowedSocketPaths != null) {
14844
- const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
14845
- const resolvedSocket = resolvePath(config.socketPath);
15649
+ const allowedSocketPaths = own2("allowedSocketPaths");
15650
+ if (allowedSocketPaths != null) {
15651
+ const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
15652
+ const resolvedSocket = resolvePath(socketPath);
14846
15653
  const isAllowed = allowed.some(
14847
15654
  (entry) => typeof entry === "string" && resolvePath(entry) === resolvedSocket
14848
15655
  );
14849
15656
  if (!isAllowed) {
14850
15657
  return reject(
14851
15658
  new AxiosError_default(
14852
- `socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
15659
+ `socketPath "${socketPath}" is not permitted by allowedSocketPaths`,
14853
15660
  AxiosError_default.ERR_BAD_OPTION_VALUE,
14854
15661
  config
14855
15662
  )
14856
15663
  );
14857
15664
  }
14858
15665
  }
14859
- options.socketPath = config.socketPath;
15666
+ options.socketPath = socketPath;
14860
15667
  } else {
14861
15668
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
14862
15669
  options.port = parsed.port;
14863
- setProxy(
15670
+ proxyApplied = setProxy(
14864
15671
  options,
14865
- config.proxy,
15672
+ configProxy,
14866
15673
  protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path,
14867
15674
  false,
14868
- config.httpsAgent
15675
+ httpsAgent,
15676
+ httpAgent,
15677
+ // The HTTP/2 transport connects independently of HTTP/1 agents, so it
15678
+ // cannot apply either axios-resolved or agent-local environment proxies.
15679
+ // Explicit proxy config is still processed and rejected below.
15680
+ !isHttp2
14869
15681
  );
14870
15682
  }
14871
15683
  let transport;
14872
15684
  let isNativeTransport = false;
15685
+ let transportEnforcesMaxBodyLength = false;
14873
15686
  const isHttpsRequest = isHttps.test(options.protocol);
14874
15687
  if (options.agent == null) {
14875
- options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
15688
+ options.agent = isHttpsRequest ? httpsAgent : httpAgent;
14876
15689
  }
14877
15690
  if (isHttp2) {
15691
+ if (proxyApplied) {
15692
+ return reject(
15693
+ new AxiosError_default(
15694
+ "HTTP/2 requests with a proxy are not supported",
15695
+ AxiosError_default.ERR_NOT_SUPPORT,
15696
+ config
15697
+ )
15698
+ );
15699
+ }
14878
15700
  transport = http2Transport;
14879
15701
  } else {
14880
15702
  const configTransport = own2("transport");
14881
15703
  if (configTransport) {
14882
15704
  transport = configTransport;
14883
- } else if (config.maxRedirects === 0) {
15705
+ } else if (maxRedirects === 0) {
14884
15706
  transport = isHttpsRequest ? https : http;
14885
15707
  isNativeTransport = true;
14886
15708
  } else {
14887
- if (config.maxRedirects) {
14888
- options.maxRedirects = config.maxRedirects;
15709
+ transportEnforcesMaxBodyLength = true;
15710
+ options.sensitiveHeaders = [];
15711
+ if (maxRedirects) {
15712
+ options.maxRedirects = maxRedirects;
14889
15713
  }
14890
15714
  const configBeforeRedirect = own2("beforeRedirect");
14891
15715
  if (configBeforeRedirect) {
14892
15716
  options.beforeRedirects.config = configBeforeRedirect;
14893
15717
  }
15718
+ if (auth) {
15719
+ const requestOrigin = parsed.origin;
15720
+ const authToRestore = auth;
15721
+ options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
15722
+ try {
15723
+ if (new URL(redirectOptions.href).origin === requestOrigin) {
15724
+ redirectOptions.auth = authToRestore;
15725
+ }
15726
+ } catch (e) {
15727
+ }
15728
+ };
15729
+ }
15730
+ const sensitiveHeaders = own2("sensitiveHeaders");
15731
+ if (sensitiveHeaders != null) {
15732
+ if (!utils_default.isArray(sensitiveHeaders)) {
15733
+ return reject(
15734
+ new AxiosError_default(
15735
+ "sensitiveHeaders must be an array of strings",
15736
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15737
+ config
15738
+ )
15739
+ );
15740
+ }
15741
+ const sensitiveSet = /* @__PURE__ */ new Set();
15742
+ for (const header of sensitiveHeaders) {
15743
+ if (!utils_default.isString(header)) {
15744
+ return reject(
15745
+ new AxiosError_default(
15746
+ "sensitiveHeaders must be an array of strings",
15747
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15748
+ config
15749
+ )
15750
+ );
15751
+ }
15752
+ sensitiveSet.add(header.toLowerCase());
15753
+ }
15754
+ if (sensitiveSet.size) {
15755
+ options.sensitiveHeaders = Array.from(sensitiveSet);
15756
+ options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) {
15757
+ if (!isSameOriginRedirect(redirectOptions, requestDetails)) {
15758
+ stripMatchingHeaders(redirectOptions.headers, sensitiveSet);
15759
+ }
15760
+ };
15761
+ }
15762
+ }
14894
15763
  transport = isHttpsRequest ? httpsFollow : httpFollow;
14895
15764
  }
14896
15765
  }
14897
- if (config.maxBodyLength > -1) {
14898
- options.maxBodyLength = config.maxBodyLength;
15766
+ if (maxBodyLength > -1) {
15767
+ options.maxBodyLength = maxBodyLength;
14899
15768
  } else {
14900
15769
  options.maxBodyLength = Infinity;
14901
15770
  }
@@ -14915,7 +15784,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14915
15784
  transformStream,
14916
15785
  progressEventDecorator(
14917
15786
  responseLength,
14918
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
15787
+ progressEventReducer(
15788
+ asyncDecorator(onDownloadProgress, scheduleProgress),
15789
+ true,
15790
+ 3
15791
+ )
14919
15792
  )
14920
15793
  )
14921
15794
  );
@@ -14923,7 +15796,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14923
15796
  }
14924
15797
  let responseStream = res;
14925
15798
  const lastRequest = res.req || req;
14926
- if (config.decompress !== false && res.headers["content-encoding"]) {
15799
+ if (decompress !== false && res.headers["content-encoding"]) {
14927
15800
  if (method === "HEAD" || res.statusCode === 204) {
14928
15801
  delete res.headers["content-encoding"];
14929
15802
  }
@@ -14946,6 +15819,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14946
15819
  streams.push(zlib.createBrotliDecompress(brotliOptions));
14947
15820
  delete res.headers["content-encoding"];
14948
15821
  }
15822
+ break;
15823
+ case "zstd":
15824
+ if (isZstdSupported) {
15825
+ streams.push(zlib.createZstdDecompress(zstdOptions));
15826
+ delete res.headers["content-encoding"];
15827
+ }
15828
+ break;
14949
15829
  }
14950
15830
  }
14951
15831
  responseStream = streams.length > 1 ? stream3.pipeline(streams, utils_default.noop) : streams[0];
@@ -14957,8 +15837,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14957
15837
  request: lastRequest
14958
15838
  };
14959
15839
  if (responseType === "stream") {
14960
- if (config.maxContentLength > -1) {
14961
- const limit = config.maxContentLength;
15840
+ if (maxContentLength > -1) {
15841
+ const limit = maxContentLength;
14962
15842
  const source = responseStream;
14963
15843
  async function* enforceMaxContentLength() {
14964
15844
  let totalResponseBytes = 0;
@@ -14987,12 +15867,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14987
15867
  responseStream.on("data", function handleStreamData(chunk) {
14988
15868
  responseBuffer.push(chunk);
14989
15869
  totalResponseBytes += chunk.length;
14990
- if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
15870
+ if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
14991
15871
  rejected = true;
14992
15872
  responseStream.destroy();
14993
15873
  abort(
14994
15874
  new AxiosError_default(
14995
- "maxContentLength size of " + config.maxContentLength + " exceeded",
15875
+ "maxContentLength size of " + maxContentLength + " exceeded",
14996
15876
  AxiosError_default.ERR_BAD_RESPONSE,
14997
15877
  config,
14998
15878
  lastRequest
@@ -15053,14 +15933,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15053
15933
  });
15054
15934
  const boundSockets = /* @__PURE__ */ new Set();
15055
15935
  req.on("socket", function handleRequestSocket(socket) {
15056
- socket.setKeepAlive(true, 1e3 * 60);
15936
+ if (typeof socket.setKeepAlive === "function") {
15937
+ socket.setKeepAlive(true, 1e3 * 60);
15938
+ }
15057
15939
  if (!socket[kAxiosSocketListener]) {
15058
- socket.on("error", function handleSocketError(err) {
15059
- const current = socket[kAxiosCurrentReq];
15060
- if (current && !current.destroyed) {
15061
- current.destroy(err);
15062
- }
15063
- });
15940
+ socket.on("error", handleSocketError);
15064
15941
  socket[kAxiosSocketListener] = true;
15065
15942
  }
15066
15943
  socket[kAxiosCurrentReq] = req;
@@ -15075,8 +15952,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15075
15952
  }
15076
15953
  boundSockets.clear();
15077
15954
  });
15078
- if (config.timeout) {
15079
- const timeout = parseInt(config.timeout, 10);
15955
+ if (own2("timeout")) {
15956
+ const timeout = parseInt(own2("timeout"), 10);
15080
15957
  if (Number.isNaN(timeout)) {
15081
15958
  abort(
15082
15959
  new AxiosError_default(
@@ -15115,8 +15992,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15115
15992
  }
15116
15993
  });
15117
15994
  let uploadStream = data;
15118
- if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
15119
- const limit = config.maxBodyLength;
15995
+ if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) {
15996
+ const limit = maxBodyLength;
15120
15997
  let bytesSent = 0;
15121
15998
  uploadStream = stream3.pipeline(
15122
15999
  [
@@ -15152,7 +16029,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15152
16029
  });
15153
16030
  };
15154
16031
 
15155
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isURLSameOrigin.js
16032
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isURLSameOrigin.js
15156
16033
  var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => {
15157
16034
  url2 = new URL(url2, platform_default.origin);
15158
16035
  return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
@@ -15161,7 +16038,7 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PUR
15161
16038
  platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)
15162
16039
  ) : () => true;
15163
16040
 
15164
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/cookies.js
16041
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/cookies.js
15165
16042
  var cookies_default = platform_default.hasStandardBrowserEnv ? (
15166
16043
  // Standard browser envs support document.cookie
15167
16044
  {
@@ -15192,7 +16069,11 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
15192
16069
  const cookie = cookies[i].replace(/^\s+/, "");
15193
16070
  const eq = cookie.indexOf("=");
15194
16071
  if (eq !== -1 && cookie.slice(0, eq) === name) {
15195
- return decodeURIComponent(cookie.slice(eq + 1));
16072
+ try {
16073
+ return decodeURIComponent(cookie.slice(eq + 1));
16074
+ } catch (e) {
16075
+ return cookie.slice(eq + 1);
16076
+ }
15196
16077
  }
15197
16078
  }
15198
16079
  return null;
@@ -15214,9 +16095,20 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
15214
16095
  }
15215
16096
  );
15216
16097
 
15217
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/mergeConfig.js
16098
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/mergeConfig.js
15218
16099
  var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
16100
+ var ownEnumerableKeys = (thing) => {
16101
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
16102
+ return Object.keys(thing).concat(
16103
+ Object.getOwnPropertySymbols(thing).filter(
16104
+ (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
16105
+ )
16106
+ );
16107
+ }
16108
+ return Object.keys(thing);
16109
+ };
15219
16110
  function mergeConfig(config1, config2) {
16111
+ config1 = config1 || {};
15220
16112
  config2 = config2 || {};
15221
16113
  const config = /* @__PURE__ */ Object.create(null);
15222
16114
  Object.defineProperty(config, "hasOwnProperty", {
@@ -15257,6 +16149,23 @@ function mergeConfig(config1, config2) {
15257
16149
  return getMergedValue(void 0, a);
15258
16150
  }
15259
16151
  }
16152
+ function getMergedTransitionalOption(prop) {
16153
+ const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
16154
+ if (!utils_default.isUndefined(transitional2)) {
16155
+ if (utils_default.isPlainObject(transitional2)) {
16156
+ if (utils_default.hasOwnProp(transitional2, prop)) {
16157
+ return transitional2[prop];
16158
+ }
16159
+ } else {
16160
+ return void 0;
16161
+ }
16162
+ }
16163
+ const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
16164
+ if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) {
16165
+ return transitional1[prop];
16166
+ }
16167
+ return void 0;
16168
+ }
15260
16169
  function mergeDirectKeys(a, b, prop) {
15261
16170
  if (utils_default.hasOwnProp(config2, prop)) {
15262
16171
  return getMergedValue(a, b);
@@ -15273,7 +16182,7 @@ function mergeConfig(config1, config2) {
15273
16182
  transformResponse: defaultToConfig2,
15274
16183
  paramsSerializer: defaultToConfig2,
15275
16184
  timeout: defaultToConfig2,
15276
- timeoutMessage: defaultToConfig2,
16185
+ timeoutErrorMessage: defaultToConfig2,
15277
16186
  withCredentials: defaultToConfig2,
15278
16187
  withXSRFToken: defaultToConfig2,
15279
16188
  adapter: defaultToConfig2,
@@ -15296,7 +16205,7 @@ function mergeConfig(config1, config2) {
15296
16205
  validateStatus: mergeDirectKeys,
15297
16206
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
15298
16207
  };
15299
- utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
16208
+ utils_default.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
15300
16209
  if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
15301
16210
  const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
15302
16211
  const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
@@ -15304,27 +16213,22 @@ function mergeConfig(config1, config2) {
15304
16213
  const configValue = merge2(a, b, prop);
15305
16214
  utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
15306
16215
  });
16216
+ if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
16217
+ if (utils_default.hasOwnProp(config1, "validateStatus")) {
16218
+ config.validateStatus = getMergedValue(void 0, config1.validateStatus);
16219
+ } else {
16220
+ delete config.validateStatus;
16221
+ }
16222
+ }
15307
16223
  return config;
15308
16224
  }
15309
16225
 
15310
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/resolveConfig.js
15311
- var FORM_DATA_CONTENT_HEADERS2 = ["content-type", "content-length"];
15312
- function setFormDataHeaders2(headers, formHeaders, policy) {
15313
- if (policy !== "content-only") {
15314
- headers.set(formHeaders);
15315
- return;
15316
- }
15317
- Object.entries(formHeaders).forEach(([key, val]) => {
15318
- if (FORM_DATA_CONTENT_HEADERS2.includes(key.toLowerCase())) {
15319
- headers.set(key, val);
15320
- }
15321
- });
15322
- }
16226
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/resolveConfig.js
15323
16227
  var encodeUTF8 = (str) => encodeURIComponent(str).replace(
15324
16228
  /%([0-9A-F]{2})/gi,
15325
16229
  (_, hex) => String.fromCharCode(parseInt(hex, 16))
15326
16230
  );
15327
- var resolveConfig_default = (config) => {
16231
+ function resolveConfig(config) {
15328
16232
  const newConfig = mergeConfig({}, config);
15329
16233
  const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
15330
16234
  const data = own2("data");
@@ -15338,21 +16242,28 @@ var resolveConfig_default = (config) => {
15338
16242
  const url2 = own2("url");
15339
16243
  newConfig.headers = headers = AxiosHeaders_default.from(headers);
15340
16244
  newConfig.url = buildURL(
15341
- buildFullPath(baseURL, url2, allowAbsoluteUrls),
15342
- config.params,
15343
- config.paramsSerializer
16245
+ buildFullPath(baseURL, url2, allowAbsoluteUrls, newConfig),
16246
+ own2("params"),
16247
+ own2("paramsSerializer")
15344
16248
  );
15345
16249
  if (auth) {
15346
- headers.set(
15347
- "Authorization",
15348
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : ""))
15349
- );
16250
+ const username = utils_default.getSafeProp(auth, "username") || "";
16251
+ const password = utils_default.getSafeProp(auth, "password") || "";
16252
+ try {
16253
+ headers.set(
16254
+ "Authorization",
16255
+ "Basic " + btoa(username + ":" + (password ? encodeUTF8(password) : ""))
16256
+ );
16257
+ } catch (e) {
16258
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_OPTION_VALUE, config);
16259
+ }
15350
16260
  }
15351
16261
  if (utils_default.isFormData(data)) {
15352
- if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
16262
+ const getHeaders = utils_default.getSafeProp(data, "getHeaders");
16263
+ if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) {
15353
16264
  headers.setContentType(void 0);
15354
- } else if (utils_default.isFunction(data.getHeaders)) {
15355
- setFormDataHeaders2(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
16265
+ } else if (utils_default.isFunction(getHeaders)) {
16266
+ setFormDataHeaders(headers, getHeaders.call(data), own2("formDataHeaderPolicy"));
15356
16267
  }
15357
16268
  }
15358
16269
  if (platform_default.hasStandardBrowserEnv) {
@@ -15368,9 +16279,10 @@ var resolveConfig_default = (config) => {
15368
16279
  }
15369
16280
  }
15370
16281
  return newConfig;
15371
- };
16282
+ }
16283
+ var resolveConfig_default = resolveConfig;
15372
16284
 
15373
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/xhr.js
16285
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/xhr.js
15374
16286
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
15375
16287
  var xhr_default = isXHRAdapterSupported && function(config) {
15376
16288
  return new Promise(function dispatchXhrRequest(resolve, reject) {
@@ -15380,7 +16292,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
15380
16292
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
15381
16293
  let onCanceled;
15382
16294
  let uploadThrottled, downloadThrottled;
15383
- let flushUpload, flushDownload;
16295
+ let flushUpload, flushDownload, flushDownloadWithEvent;
15384
16296
  function done() {
15385
16297
  flushUpload && flushUpload();
15386
16298
  flushDownload && flushDownload();
@@ -15390,7 +16302,27 @@ var xhr_default = isXHRAdapterSupported && function(config) {
15390
16302
  let request = new XMLHttpRequest();
15391
16303
  request.open(_config.method.toUpperCase(), _config.url, true);
15392
16304
  request.timeout = _config.timeout;
15393
- function onloadend() {
16305
+ function onloadend(event) {
16306
+ if (!request) {
16307
+ return;
16308
+ }
16309
+ if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform_default.origin)) !== "file" && !(request.responseURL && request.responseURL.startsWith("file:"))) {
16310
+ reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
16311
+ done();
16312
+ request = null;
16313
+ return;
16314
+ }
16315
+ try {
16316
+ if (event) {
16317
+ flushDownloadWithEvent && flushDownloadWithEvent(event);
16318
+ } else {
16319
+ flushDownload && flushDownload();
16320
+ }
16321
+ } catch (err) {
16322
+ setTimeout(() => {
16323
+ throw err;
16324
+ });
16325
+ }
15394
16326
  if (!request) {
15395
16327
  return;
15396
16328
  }
@@ -15478,7 +16410,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
15478
16410
  request.responseType = _config.responseType;
15479
16411
  }
15480
16412
  if (onDownloadProgress) {
15481
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
16413
+ [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(
16414
+ onDownloadProgress,
16415
+ true
16416
+ );
15482
16417
  request.addEventListener("progress", downloadThrottled);
15483
16418
  }
15484
16419
  if (onUploadProgress && request.upload) {
@@ -15510,13 +16445,14 @@ var xhr_default = isXHRAdapterSupported && function(config) {
15510
16445
  config
15511
16446
  )
15512
16447
  );
16448
+ done();
15513
16449
  return;
15514
16450
  }
15515
16451
  request.send(requestData || null);
15516
16452
  });
15517
16453
  };
15518
16454
 
15519
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/composeSignals.js
16455
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/composeSignals.js
15520
16456
  var composeSignals = (signals, timeout) => {
15521
16457
  signals = signals ? signals.filter(Boolean) : [];
15522
16458
  if (!timeout && !signals.length) {
@@ -15549,14 +16485,23 @@ var composeSignals = (signals, timeout) => {
15549
16485
  });
15550
16486
  signals = null;
15551
16487
  };
15552
- signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
16488
+ signals.forEach((signal2) => {
16489
+ if (aborted) {
16490
+ return;
16491
+ }
16492
+ if (signal2.aborted) {
16493
+ onabort.call(signal2);
16494
+ return;
16495
+ }
16496
+ signal2.addEventListener("abort", onabort, { once: true });
16497
+ });
15553
16498
  const { signal } = controller;
15554
16499
  signal.unsubscribe = () => utils_default.asap(unsubscribe);
15555
16500
  return signal;
15556
16501
  };
15557
16502
  var composeSignals_default = composeSignals;
15558
16503
 
15559
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/trackStream.js
16504
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/trackStream.js
15560
16505
  var streamChunk = function* (chunk, chunkSize) {
15561
16506
  let len = chunk.byteLength;
15562
16507
  if (!chunkSize || len < chunkSize) {
@@ -15636,9 +16581,34 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
15636
16581
  );
15637
16582
  };
15638
16583
 
15639
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/fetch.js
16584
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/fetch.js
15640
16585
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
16586
+ var DEFAULT_REQUEST_OPTIONS = {
16587
+ cache: "default",
16588
+ redirect: "follow",
16589
+ referrer: "about:client",
16590
+ referrerPolicy: "",
16591
+ mode: "cors",
16592
+ integrity: "",
16593
+ keepalive: false,
16594
+ priority: "auto",
16595
+ window: null
16596
+ };
15641
16597
  var { isFunction: isFunction2 } = utils_default;
16598
+ var encodeUTF82 = (str) => encodeURIComponent(str).replace(
16599
+ /%([0-9A-F]{2})/gi,
16600
+ (_, hex) => String.fromCharCode(parseInt(hex, 16))
16601
+ );
16602
+ var decodeURIComponentSafe2 = (value) => {
16603
+ if (!utils_default.isString(value)) {
16604
+ return value;
16605
+ }
16606
+ try {
16607
+ return decodeURIComponent(value);
16608
+ } catch (error) {
16609
+ return value;
16610
+ }
16611
+ };
15642
16612
  var test = (fn, ...args) => {
15643
16613
  try {
15644
16614
  return !!fn(...args);
@@ -15646,6 +16616,14 @@ var test = (fn, ...args) => {
15646
16616
  return false;
15647
16617
  }
15648
16618
  };
16619
+ var maybeWithAuthCredentials = (url2) => {
16620
+ const protocolIndex = url2.indexOf("://");
16621
+ let urlToCheck = url2;
16622
+ if (protocolIndex !== -1) {
16623
+ urlToCheck = urlToCheck.slice(protocolIndex + 3);
16624
+ }
16625
+ return urlToCheck.includes("@") || urlToCheck.includes(":");
16626
+ };
15649
16627
  var factory = (env) => {
15650
16628
  const globalObject = utils_default.global !== void 0 && utils_default.global !== null ? utils_default.global : globalThis;
15651
16629
  const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
@@ -15746,10 +16724,12 @@ var factory = (env) => {
15746
16724
  withCredentials = "same-origin",
15747
16725
  fetchOptions,
15748
16726
  maxContentLength,
15749
- maxBodyLength
16727
+ maxBodyLength,
16728
+ maxRedirects
15750
16729
  } = resolveConfig_default(config);
15751
16730
  const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
15752
16731
  const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
16732
+ const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
15753
16733
  let _fetch = envFetch || fetch;
15754
16734
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
15755
16735
  let composedSignal = composeSignals_default(
@@ -15761,7 +16741,47 @@ var factory = (env) => {
15761
16741
  composedSignal.unsubscribe();
15762
16742
  });
15763
16743
  let requestContentLength;
16744
+ let pendingBodyError = null;
16745
+ const maxBodyLengthError = () => new AxiosError_default(
16746
+ "Request body larger than maxBodyLength limit",
16747
+ AxiosError_default.ERR_BAD_REQUEST,
16748
+ config,
16749
+ request
16750
+ );
15764
16751
  try {
16752
+ let auth = void 0;
16753
+ const configAuth = own2("auth");
16754
+ if (configAuth) {
16755
+ const username = utils_default.getSafeProp(configAuth, "username") || "";
16756
+ const password = utils_default.getSafeProp(configAuth, "password") || "";
16757
+ auth = {
16758
+ username,
16759
+ password
16760
+ };
16761
+ }
16762
+ if (maybeWithAuthCredentials(url2)) {
16763
+ const parsedURL = new URL(url2, platform_default.origin);
16764
+ if (!auth && (parsedURL.username || parsedURL.password)) {
16765
+ const urlUsername = decodeURIComponentSafe2(parsedURL.username);
16766
+ const urlPassword = decodeURIComponentSafe2(parsedURL.password);
16767
+ auth = {
16768
+ username: urlUsername,
16769
+ password: urlPassword
16770
+ };
16771
+ }
16772
+ if (parsedURL.username || parsedURL.password) {
16773
+ parsedURL.username = "";
16774
+ parsedURL.password = "";
16775
+ url2 = parsedURL.href;
16776
+ }
16777
+ }
16778
+ if (auth) {
16779
+ headers.delete("authorization");
16780
+ headers.set(
16781
+ "Authorization",
16782
+ "Basic " + btoa(encodeUTF82((auth.username || "") + ":" + (auth.password || "")))
16783
+ );
16784
+ }
15765
16785
  if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
15766
16786
  const estimated = estimateDataURLDecodedBytes(url2);
15767
16787
  if (estimated > maxContentLength) {
@@ -15774,33 +16794,55 @@ var factory = (env) => {
15774
16794
  }
15775
16795
  }
15776
16796
  if (hasMaxBodyLength && method !== "get" && method !== "head") {
15777
- const outboundLength = await resolveBodyLength(headers, data);
15778
- if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
15779
- throw new AxiosError_default(
15780
- "Request body larger than maxBodyLength limit",
15781
- AxiosError_default.ERR_BAD_REQUEST,
15782
- config,
15783
- request
15784
- );
16797
+ const outboundLength = await getBodyLength(data);
16798
+ if (typeof outboundLength === "number" && isFinite(outboundLength)) {
16799
+ requestContentLength = outboundLength;
16800
+ if (outboundLength > maxBodyLength) {
16801
+ throw maxBodyLengthError();
16802
+ }
15785
16803
  }
15786
16804
  }
15787
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
15788
- let _request = new Request(url2, {
15789
- method: "POST",
15790
- body: data,
15791
- duplex: "half"
15792
- });
15793
- let contentTypeHeader;
15794
- if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
15795
- headers.setContentType(contentTypeHeader);
15796
- }
15797
- if (_request.body) {
15798
- const [onProgress, flush] = progressEventDecorator(
15799
- requestContentLength,
15800
- progressEventReducer(asyncDecorator(onUploadProgress))
15801
- );
15802
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
16805
+ const mustEnforceStreamBody = hasMaxBodyLength && (utils_default.isReadableStream(data) || utils_default.isStream(data));
16806
+ const trackRequestStream = (stream4, onProgress, flush) => trackStream(
16807
+ stream4,
16808
+ DEFAULT_CHUNK_SIZE,
16809
+ (loadedBytes) => {
16810
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
16811
+ throw pendingBodyError = maxBodyLengthError();
16812
+ }
16813
+ onProgress && onProgress(loadedBytes);
16814
+ },
16815
+ flush
16816
+ );
16817
+ if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
16818
+ requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
16819
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
16820
+ let _request = new Request(url2, {
16821
+ method: "POST",
16822
+ body: data,
16823
+ duplex: "half"
16824
+ });
16825
+ let contentTypeHeader;
16826
+ if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
16827
+ headers.setContentType(contentTypeHeader);
16828
+ }
16829
+ if (_request.body) {
16830
+ const [onProgress, flush] = onUploadProgress && progressEventDecorator(
16831
+ requestContentLength,
16832
+ progressEventReducer(asyncDecorator(onUploadProgress))
16833
+ ) || [];
16834
+ data = trackRequestStream(_request.body, onProgress, flush);
16835
+ }
15803
16836
  }
16837
+ } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
16838
+ data = trackRequestStream(data);
16839
+ } else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
16840
+ throw new AxiosError_default(
16841
+ "Stream request bodies are not supported by the current fetch implementation",
16842
+ AxiosError_default.ERR_NOT_SUPPORT,
16843
+ config,
16844
+ request
16845
+ );
15804
16846
  }
15805
16847
  if (!utils_default.isString(withCredentials)) {
15806
16848
  withCredentials = withCredentials ? "include" : "omit";
@@ -15813,19 +16855,47 @@ var factory = (env) => {
15813
16855
  }
15814
16856
  }
15815
16857
  headers.set("User-Agent", "axios/" + VERSION, false);
15816
- const resolvedOptions = {
15817
- ...fetchOptions,
16858
+ const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(/* @__PURE__ */ Object.create(null), fetchOptions);
16859
+ if (safeFetchOptions) {
16860
+ delete safeFetchOptions.body;
16861
+ delete safeFetchOptions.headers;
16862
+ delete safeFetchOptions.method;
16863
+ delete safeFetchOptions.signal;
16864
+ delete safeFetchOptions.duplex;
16865
+ delete safeFetchOptions.credentials;
16866
+ }
16867
+ const resolvedOptions = Object.assign(/* @__PURE__ */ Object.create(null), safeFetchOptions, {
15818
16868
  signal: composedSignal,
15819
16869
  method: method.toUpperCase(),
15820
16870
  headers: toByteStringHeaderObject(headers.normalize()),
15821
16871
  body: data,
15822
16872
  duplex: "half",
15823
16873
  credentials: isCredentialsSupported ? withCredentials : void 0
15824
- };
16874
+ });
16875
+ if (isRequestSupported) {
16876
+ utils_default.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
16877
+ if (resolvedOptions[key] === void 0) {
16878
+ resolvedOptions[key] = value;
16879
+ }
16880
+ });
16881
+ if (resolvedOptions.signal === void 0) {
16882
+ resolvedOptions.signal = null;
16883
+ }
16884
+ if (resolvedOptions.body === void 0) {
16885
+ resolvedOptions.body = null;
16886
+ }
16887
+ }
16888
+ if (maxRedirects === 0) {
16889
+ resolvedOptions.redirect = "manual";
16890
+ if (safeFetchOptions) {
16891
+ safeFetchOptions.redirect = "manual";
16892
+ }
16893
+ }
15825
16894
  request = isRequestSupported && new Request(url2, resolvedOptions);
15826
- let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
16895
+ let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url2, resolvedOptions));
16896
+ const responseHeaders = AxiosHeaders_default.from(response.headers);
15827
16897
  if (hasMaxContentLength) {
15828
- const declaredLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
16898
+ const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
15829
16899
  if (declaredLength != null && declaredLength > maxContentLength) {
15830
16900
  throw new AxiosError_default(
15831
16901
  "maxContentLength size of " + maxContentLength + " exceeded",
@@ -15841,7 +16911,7 @@ var factory = (env) => {
15841
16911
  ["status", "statusText", "headers"].forEach((prop) => {
15842
16912
  options[prop] = response[prop];
15843
16913
  });
15844
- const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
16914
+ const responseContentLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
15845
16915
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
15846
16916
  responseContentLength,
15847
16917
  progressEventReducer(asyncDecorator(onDownloadProgress), true)
@@ -15911,22 +16981,41 @@ var factory = (env) => {
15911
16981
  const canceledError = composedSignal.reason;
15912
16982
  canceledError.config = config;
15913
16983
  request && (canceledError.request = request);
15914
- err !== canceledError && (canceledError.cause = err);
16984
+ if (err !== canceledError) {
16985
+ Object.defineProperty(canceledError, "cause", {
16986
+ __proto__: null,
16987
+ value: err,
16988
+ writable: true,
16989
+ enumerable: false,
16990
+ configurable: true
16991
+ });
16992
+ }
15915
16993
  throw canceledError;
15916
16994
  }
16995
+ if (pendingBodyError) {
16996
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
16997
+ throw pendingBodyError;
16998
+ }
16999
+ if (err instanceof AxiosError_default) {
17000
+ request && !err.request && (err.request = request);
17001
+ throw err;
17002
+ }
15917
17003
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
15918
- throw Object.assign(
15919
- new AxiosError_default(
15920
- "Network Error",
15921
- AxiosError_default.ERR_NETWORK,
15922
- config,
15923
- request,
15924
- err && err.response
15925
- ),
15926
- {
15927
- cause: err.cause || err
15928
- }
17004
+ const networkError = new AxiosError_default(
17005
+ "Network Error",
17006
+ AxiosError_default.ERR_NETWORK,
17007
+ config,
17008
+ request,
17009
+ err && err.response
15929
17010
  );
17011
+ Object.defineProperty(networkError, "cause", {
17012
+ __proto__: null,
17013
+ value: err.cause || err,
17014
+ writable: true,
17015
+ enumerable: false,
17016
+ configurable: true
17017
+ });
17018
+ throw networkError;
15930
17019
  }
15931
17020
  throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
15932
17021
  }
@@ -15948,7 +17037,7 @@ var getFetch = (config) => {
15948
17037
  };
15949
17038
  var adapter = getFetch();
15950
17039
 
15951
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/adapters.js
17040
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/adapters.js
15952
17041
  var knownAdapters = {
15953
17042
  http: http_default,
15954
17043
  xhr: xhr_default,
@@ -15995,7 +17084,7 @@ function getAdapter(adapters, config) {
15995
17084
  let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
15996
17085
  throw new AxiosError_default(
15997
17086
  `There is no suitable adapter to dispatch the request ` + s,
15998
- "ERR_NOT_SUPPORT"
17087
+ AxiosError_default.ERR_NOT_SUPPORT
15999
17088
  );
16000
17089
  }
16001
17090
  return adapter2;
@@ -16013,7 +17102,7 @@ var adapters_default = {
16013
17102
  adapters: knownAdapters
16014
17103
  };
16015
17104
 
16016
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/dispatchRequest.js
17105
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/dispatchRequest.js
16017
17106
  function throwIfCancellationRequested(config) {
16018
17107
  if (config.cancelToken) {
16019
17108
  config.cancelToken.throwIfRequested();
@@ -16022,9 +17111,10 @@ function throwIfCancellationRequested(config) {
16022
17111
  throw new CanceledError_default(null, config);
16023
17112
  }
16024
17113
  }
16025
- function dispatchRequest(config) {
17114
+ function dispatchRequest(_config) {
17115
+ const config = utils_default.toSafeFlatObject(_config);
16026
17116
  throwIfCancellationRequested(config);
16027
- config.headers = AxiosHeaders_default.from(config.headers);
17117
+ config.headers = AxiosHeaders_default.from(utils_default.getSafeProp(config, "headers"));
16028
17118
  config.data = transformData.call(config, config.transformRequest);
16029
17119
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
16030
17120
  config.headers.setContentType("application/x-www-form-urlencoded", false);
@@ -16064,7 +17154,7 @@ function dispatchRequest(config) {
16064
17154
  );
16065
17155
  }
16066
17156
 
16067
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/validator.js
17157
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/validator.js
16068
17158
  var validators = {};
16069
17159
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
16070
17160
  validators[type] = function validator(thing) {
@@ -16102,7 +17192,7 @@ validators.spelling = function spelling(correctSpelling) {
16102
17192
  };
16103
17193
  };
16104
17194
  function assertOptions(options, schema, allowUnknown) {
16105
- if (typeof options !== "object") {
17195
+ if (typeof options !== "object" || options === null) {
16106
17196
  throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
16107
17197
  }
16108
17198
  const keys = Object.keys(options);
@@ -16131,7 +17221,7 @@ var validator_default = {
16131
17221
  validators
16132
17222
  };
16133
17223
 
16134
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/Axios.js
17224
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/Axios.js
16135
17225
  var validators2 = validator_default.validators;
16136
17226
  var Axios = class {
16137
17227
  constructor(instanceConfig) {
@@ -16154,16 +17244,15 @@ var Axios = class {
16154
17244
  return await this._request(configOrUrl, config);
16155
17245
  } catch (err) {
16156
17246
  if (err instanceof Error) {
16157
- let dummy = {};
16158
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
16159
- const stack = (() => {
16160
- if (!dummy.stack) {
16161
- return "";
16162
- }
16163
- const firstNewlineIndex = dummy.stack.indexOf("\n");
16164
- return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
16165
- })();
16166
17247
  try {
17248
+ let dummy = {};
17249
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
17250
+ const dummyStack = dummy.stack;
17251
+ let stack = "";
17252
+ if (typeof dummyStack === "string") {
17253
+ const firstNewlineIndex = dummyStack.indexOf("\n");
17254
+ stack = firstNewlineIndex === -1 ? "" : dummyStack.slice(firstNewlineIndex + 1);
17255
+ }
16167
17256
  if (!err.stack) {
16168
17257
  err.stack = stack;
16169
17258
  } else if (stack) {
@@ -16196,7 +17285,9 @@ var Axios = class {
16196
17285
  silentJSONParsing: validators2.transitional(validators2.boolean),
16197
17286
  forcedJSONParsing: validators2.transitional(validators2.boolean),
16198
17287
  clarifyTimeoutError: validators2.transitional(validators2.boolean),
16199
- legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
17288
+ legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean),
17289
+ advertiseZstdAcceptEncoding: validators2.transitional(validators2.boolean),
17290
+ validateStatusUndefinedResolves: validators2.transitional(validators2.boolean)
16200
17291
  },
16201
17292
  false
16202
17293
  );
@@ -16231,9 +17322,9 @@ var Axios = class {
16231
17322
  },
16232
17323
  true
16233
17324
  );
16234
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
17325
+ config.method = (utils_default.getSafeProp(config, "method") || utils_default.getSafeProp(this.defaults, "method") || "get").toLowerCase();
16235
17326
  let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
16236
- headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
17327
+ headers && utils_default.forEach(methodList_default.concat("common"), (method) => {
16237
17328
  delete headers[method];
16238
17329
  });
16239
17330
  config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
@@ -16276,16 +17367,31 @@ var Axios = class {
16276
17367
  const onFulfilled = requestInterceptorChain[i++];
16277
17368
  const onRejected = requestInterceptorChain[i++];
16278
17369
  try {
16279
- newConfig = onFulfilled(newConfig);
17370
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
16280
17371
  } catch (error) {
16281
- onRejected.call(this, error);
17372
+ if (!onRejected) {
17373
+ promise = Promise.reject(error);
17374
+ break;
17375
+ }
17376
+ try {
17377
+ const rejectedResult = onRejected.call(this, error);
17378
+ if (utils_default.isThenable(rejectedResult)) {
17379
+ promise = Promise.resolve(rejectedResult).then(
17380
+ () => dispatchRequest.call(this, newConfig)
17381
+ );
17382
+ }
17383
+ } catch (rejectedError) {
17384
+ promise = Promise.reject(rejectedError);
17385
+ }
16282
17386
  break;
16283
17387
  }
16284
17388
  }
16285
- try {
16286
- promise = dispatchRequest.call(this, newConfig);
16287
- } catch (error) {
16288
- return Promise.reject(error);
17389
+ if (!promise) {
17390
+ try {
17391
+ promise = dispatchRequest.call(this, newConfig);
17392
+ } catch (error) {
17393
+ promise = Promise.reject(error);
17394
+ }
16289
17395
  }
16290
17396
  i = 0;
16291
17397
  len = responseInterceptorChain.length;
@@ -16296,7 +17402,7 @@ var Axios = class {
16296
17402
  }
16297
17403
  getUri(config) {
16298
17404
  config = mergeConfig(this.defaults, config);
16299
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
17405
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
16300
17406
  return buildURL(fullPath, config.params, config.paramsSerializer);
16301
17407
  }
16302
17408
  };
@@ -16306,7 +17412,7 @@ utils_default.forEach(["delete", "get", "head", "options"], function forEachMeth
16306
17412
  mergeConfig(config || {}, {
16307
17413
  method,
16308
17414
  url: url2,
16309
- data: (config || {}).data
17415
+ data: config && utils_default.hasOwnProp(config, "data") ? config.data : void 0
16310
17416
  })
16311
17417
  );
16312
17418
  };
@@ -16333,7 +17439,7 @@ utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodW
16333
17439
  });
16334
17440
  var Axios_default = Axios;
16335
17441
 
16336
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/CancelToken.js
17442
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/CancelToken.js
16337
17443
  var CancelToken = class _CancelToken {
16338
17444
  constructor(executor) {
16339
17445
  if (typeof executor !== "function") {
@@ -16431,19 +17537,19 @@ var CancelToken = class _CancelToken {
16431
17537
  };
16432
17538
  var CancelToken_default = CancelToken;
16433
17539
 
16434
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/spread.js
17540
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/spread.js
16435
17541
  function spread(callback) {
16436
17542
  return function wrap(arr) {
16437
17543
  return callback.apply(null, arr);
16438
17544
  };
16439
17545
  }
16440
17546
 
16441
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isAxiosError.js
17547
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isAxiosError.js
16442
17548
  function isAxiosError(payload) {
16443
17549
  return utils_default.isObject(payload) && payload.isAxiosError === true;
16444
17550
  }
16445
17551
 
16446
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/HttpStatusCode.js
17552
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/HttpStatusCode.js
16447
17553
  var HttpStatusCode = {
16448
17554
  Continue: 100,
16449
17555
  SwitchingProtocols: 101,
@@ -16481,14 +17587,22 @@ var HttpStatusCode = {
16481
17587
  Gone: 410,
16482
17588
  LengthRequired: 411,
16483
17589
  PreconditionFailed: 412,
17590
+ /**
17591
+ * @deprecated Use `ContentTooLarge` instead.
17592
+ */
16484
17593
  PayloadTooLarge: 413,
17594
+ ContentTooLarge: 413,
16485
17595
  UriTooLong: 414,
16486
17596
  UnsupportedMediaType: 415,
16487
17597
  RangeNotSatisfiable: 416,
16488
17598
  ExpectationFailed: 417,
16489
17599
  ImATeapot: 418,
16490
17600
  MisdirectedRequest: 421,
17601
+ /**
17602
+ * @deprecated Use `UnprocessableContent` instead.
17603
+ */
16491
17604
  UnprocessableEntity: 422,
17605
+ UnprocessableContent: 422,
16492
17606
  Locked: 423,
16493
17607
  FailedDependency: 424,
16494
17608
  TooEarly: 425,
@@ -16508,6 +17622,7 @@ var HttpStatusCode = {
16508
17622
  LoopDetected: 508,
16509
17623
  NotExtended: 510,
16510
17624
  NetworkAuthenticationRequired: 511,
17625
+ WebServerReturnsAnUnknownError: 520,
16511
17626
  WebServerIsDown: 521,
16512
17627
  ConnectionTimedOut: 522,
16513
17628
  OriginIsUnreachable: 523,
@@ -16516,11 +17631,13 @@ var HttpStatusCode = {
16516
17631
  InvalidSslCertificate: 526
16517
17632
  };
16518
17633
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
16519
- HttpStatusCode[value] = key;
17634
+ if (HttpStatusCode[value] === void 0) {
17635
+ HttpStatusCode[value] = key;
17636
+ }
16520
17637
  });
16521
17638
  var HttpStatusCode_default = HttpStatusCode;
16522
17639
 
16523
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/axios.js
17640
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/axios.js
16524
17641
  function createInstance(defaultConfig) {
16525
17642
  const context = new Axios_default(defaultConfig);
16526
17643
  const instance = bind(Axios_default.prototype.request, context);
@@ -16553,7 +17670,7 @@ axios.HttpStatusCode = HttpStatusCode_default;
16553
17670
  axios.default = axios;
16554
17671
  var axios_default = axios;
16555
17672
 
16556
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/index.js
17673
+ // ../../node_modules/.pnpm/axios@1.20.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/index.js
16557
17674
  var {
16558
17675
  Axios: Axios2,
16559
17676
  AxiosError: AxiosError2,
@@ -16574,18 +17691,18 @@ var {
16574
17691
  create
16575
17692
  } = axios_default;
16576
17693
 
16577
- // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/Tunnel.js
17694
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/Tunnel.js
16578
17695
  var import_debug2 = __toESM(require_src(), 1);
16579
17696
  import { EventEmitter as EventEmitter3 } from "events";
16580
17697
 
16581
- // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/TunnelCluster.js
17698
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/TunnelCluster.js
16582
17699
  var import_debug = __toESM(require_src(), 1);
16583
17700
  import { EventEmitter as EventEmitter2 } from "events";
16584
17701
  import fs from "fs";
16585
17702
  import net from "net";
16586
17703
  import tls from "tls";
16587
17704
 
16588
- // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/HeaderHostTransformer.js
17705
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/HeaderHostTransformer.js
16589
17706
  import { Transform } from "stream";
16590
17707
  var HeaderHostTransformer = class extends Transform {
16591
17708
  host;
@@ -16603,7 +17720,7 @@ var HeaderHostTransformer = class extends Transform {
16603
17720
  }
16604
17721
  };
16605
17722
 
16606
- // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/TunnelCluster.js
17723
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/TunnelCluster.js
16607
17724
  var log = (0, import_debug.default)("pipenet:client");
16608
17725
  var TunnelCluster = class extends EventEmitter2 {
16609
17726
  opts;
@@ -16703,7 +17820,7 @@ var TunnelCluster = class extends EventEmitter2 {
16703
17820
  }
16704
17821
  };
16705
17822
 
16706
- // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/Tunnel.js
17823
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/Tunnel.js
16707
17824
  var log2 = (0, import_debug2.default)("pipenet:client");
16708
17825
  var Tunnel = class extends EventEmitter3 {
16709
17826
  cachedUrl;
@@ -16851,7 +17968,7 @@ var Tunnel = class extends EventEmitter3 {
16851
17968
  }
16852
17969
  };
16853
17970
 
16854
- // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/pipenet.js
17971
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/pipenet.js
16855
17972
  function pipenet(arg1, arg2, arg3) {
16856
17973
  const options = typeof arg1 === "object" ? arg1 : { ...arg2, port: arg1 };
16857
17974
  const callback = typeof arg1 === "object" ? arg2 : arg3;