piral-cli 1.10.3 → 1.11.0-beta.1bddd86

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.
@@ -19416,7 +19416,7 @@ var require_form_data = __commonJS({
19416
19416
  var path3 = require("path");
19417
19417
  var http3 = require("http");
19418
19418
  var https2 = require("https");
19419
- var parseUrl = require("url").parse;
19419
+ var parseUrl2 = require("url").parse;
19420
19420
  var fs3 = require("fs");
19421
19421
  var Stream2 = require("stream").Stream;
19422
19422
  var crypto2 = require("crypto");
@@ -19669,7 +19669,7 @@ var require_form_data = __commonJS({
19669
19669
  var options;
19670
19670
  var defaults3 = { method: "post" };
19671
19671
  if (typeof params === "string") {
19672
- params = parseUrl(params);
19672
+ params = parseUrl2(params);
19673
19673
  options = populate({
19674
19674
  port: params.port,
19675
19675
  path: params.pathname,
@@ -19721,81 +19721,11 @@ var require_form_data = __commonJS({
19721
19721
  FormData4.prototype.toString = function() {
19722
19722
  return "[object FormData]";
19723
19723
  };
19724
- setToStringTag(FormData4, "FormData");
19724
+ setToStringTag(FormData4.prototype, "FormData");
19725
19725
  module2.exports = FormData4;
19726
19726
  }
19727
19727
  });
19728
19728
 
19729
- // ../../../node_modules/proxy-from-env/index.js
19730
- var require_proxy_from_env = __commonJS({
19731
- "../../../node_modules/proxy-from-env/index.js"(exports2) {
19732
- "use strict";
19733
- var parseUrl = require("url").parse;
19734
- var DEFAULT_PORTS = {
19735
- ftp: 21,
19736
- gopher: 70,
19737
- http: 80,
19738
- https: 443,
19739
- ws: 80,
19740
- wss: 443
19741
- };
19742
- var stringEndsWith = String.prototype.endsWith || function(s3) {
19743
- return s3.length <= this.length && this.indexOf(s3, this.length - s3.length) !== -1;
19744
- };
19745
- function getProxyForUrl(url2) {
19746
- var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
19747
- var proto4 = parsedUrl.protocol;
19748
- var hostname = parsedUrl.host;
19749
- var port = parsedUrl.port;
19750
- if (typeof hostname !== "string" || !hostname || typeof proto4 !== "string") {
19751
- return "";
19752
- }
19753
- proto4 = proto4.split(":", 1)[0];
19754
- hostname = hostname.replace(/:\d*$/, "");
19755
- port = parseInt(port) || DEFAULT_PORTS[proto4] || 0;
19756
- if (!shouldProxy(hostname, port)) {
19757
- return "";
19758
- }
19759
- var proxy = getEnv("npm_config_" + proto4 + "_proxy") || getEnv(proto4 + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
19760
- if (proxy && proxy.indexOf("://") === -1) {
19761
- proxy = proto4 + "://" + proxy;
19762
- }
19763
- return proxy;
19764
- }
19765
- function shouldProxy(hostname, port) {
19766
- var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
19767
- if (!NO_PROXY) {
19768
- return true;
19769
- }
19770
- if (NO_PROXY === "*") {
19771
- return false;
19772
- }
19773
- return NO_PROXY.split(/[,\s]/).every(function(proxy) {
19774
- if (!proxy) {
19775
- return true;
19776
- }
19777
- var parsedProxy = proxy.match(/^(.+):(\d+)$/);
19778
- var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
19779
- var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
19780
- if (parsedProxyPort && parsedProxyPort !== port) {
19781
- return true;
19782
- }
19783
- if (!/^[.*]/.test(parsedProxyHostname)) {
19784
- return hostname !== parsedProxyHostname;
19785
- }
19786
- if (parsedProxyHostname.charAt(0) === "*") {
19787
- parsedProxyHostname = parsedProxyHostname.slice(1);
19788
- }
19789
- return !stringEndsWith.call(hostname, parsedProxyHostname);
19790
- });
19791
- }
19792
- function getEnv(key) {
19793
- return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
19794
- }
19795
- exports2.getProxyForUrl = getProxyForUrl;
19796
- }
19797
- });
19798
-
19799
19729
  // ../../../node_modules/debug/node_modules/ms/index.js
19800
19730
  var require_ms = __commonJS({
19801
19731
  "../../../node_modules/debug/node_modules/ms/index.js"(exports2, module2) {
@@ -20264,6 +20194,11 @@ var require_follow_redirects = __commonJS({
20264
20194
  } catch (error) {
20265
20195
  useNativeURL = error.code === "ERR_INVALID_URL";
20266
20196
  }
20197
+ var sensitiveHeaders = [
20198
+ "Authorization",
20199
+ "Proxy-Authorization",
20200
+ "Cookie"
20201
+ ];
20267
20202
  var preservedUrlFields = [
20268
20203
  "auth",
20269
20204
  "host",
@@ -20328,6 +20263,7 @@ var require_follow_redirects = __commonJS({
20328
20263
  self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
20329
20264
  }
20330
20265
  };
20266
+ this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + ")$", "i");
20331
20267
  this._performRequest();
20332
20268
  }
20333
20269
  RedirectableRequest.prototype = Object.create(Writable.prototype);
@@ -20465,6 +20401,9 @@ var require_follow_redirects = __commonJS({
20465
20401
  if (!options.headers) {
20466
20402
  options.headers = {};
20467
20403
  }
20404
+ if (!isArray2(options.sensitiveHeaders)) {
20405
+ options.sensitiveHeaders = [];
20406
+ }
20468
20407
  if (options.host) {
20469
20408
  if (!options.hostname) {
20470
20409
  options.hostname = options.host;
@@ -20562,7 +20501,7 @@ var require_follow_redirects = __commonJS({
20562
20501
  removeMatchingHeaders(/^content-/i, this._options.headers);
20563
20502
  }
20564
20503
  var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
20565
- var currentUrlParts = parseUrl(this._currentUrl);
20504
+ var currentUrlParts = parseUrl2(this._currentUrl);
20566
20505
  var currentHost = currentHostHeader || currentUrlParts.host;
20567
20506
  var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
20568
20507
  var redirectUrl = resolveUrl(location, currentUrl);
@@ -20570,7 +20509,7 @@ var require_follow_redirects = __commonJS({
20570
20509
  this._isRedirect = true;
20571
20510
  spreadUrlObject(redirectUrl, this._options);
20572
20511
  if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
20573
- removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
20512
+ removeMatchingHeaders(this._headerFilter, this._options.headers);
20574
20513
  }
20575
20514
  if (isFunction3(beforeRedirect)) {
20576
20515
  var responseDetails = {
@@ -20601,7 +20540,7 @@ var require_follow_redirects = __commonJS({
20601
20540
  if (isURL(input)) {
20602
20541
  input = spreadUrlObject(input);
20603
20542
  } else if (isString2(input)) {
20604
- input = spreadUrlObject(parseUrl(input));
20543
+ input = spreadUrlObject(parseUrl2(input));
20605
20544
  } else {
20606
20545
  callback = options;
20607
20546
  options = validateUrl(input);
@@ -20637,7 +20576,7 @@ var require_follow_redirects = __commonJS({
20637
20576
  }
20638
20577
  function noop2() {
20639
20578
  }
20640
- function parseUrl(input) {
20579
+ function parseUrl2(input) {
20641
20580
  var parsed;
20642
20581
  if (useNativeURL) {
20643
20582
  parsed = new URL2(input);
@@ -20650,7 +20589,7 @@ var require_follow_redirects = __commonJS({
20650
20589
  return parsed;
20651
20590
  }
20652
20591
  function resolveUrl(relative, base) {
20653
- return useNativeURL ? new URL2(relative, base) : parseUrl(url2.resolve(base, relative));
20592
+ return useNativeURL ? new URL2(relative, base) : parseUrl2(url2.resolve(base, relative));
20654
20593
  }
20655
20594
  function validateUrl(input) {
20656
20595
  if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
@@ -20719,6 +20658,9 @@ var require_follow_redirects = __commonJS({
20719
20658
  var dot = subdomain.length - domain.length - 1;
20720
20659
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
20721
20660
  }
20661
+ function isArray2(value) {
20662
+ return value instanceof Array;
20663
+ }
20722
20664
  function isString2(value) {
20723
20665
  return typeof value === "string" || value instanceof String;
20724
20666
  }
@@ -20731,6 +20673,9 @@ var require_follow_redirects = __commonJS({
20731
20673
  function isURL(value) {
20732
20674
  return URL2 && value instanceof URL2;
20733
20675
  }
20676
+ function escapeRegex(regex2) {
20677
+ return regex2.replace(/[\]\\/()*+?.$]/g, "\\$&");
20678
+ }
20734
20679
  module2.exports = wrap2({ http: http3, https: https2 });
20735
20680
  module2.exports.wrap = wrap2;
20736
20681
  }
@@ -48562,12 +48507,12 @@ var require_lib5 = __commonJS({
48562
48507
  );
48563
48508
  }
48564
48509
  );
48565
- function create(options) {
48510
+ function create2(options) {
48566
48511
  const resolver = getResolverFactory().createResolver({
48567
48512
  fileSystem: getNodeFileSystem(),
48568
48513
  ...options
48569
48514
  });
48570
- return function create2(context, path3, request, resolveContext, callback) {
48515
+ return function create3(context, path3, request, resolveContext, callback) {
48571
48516
  if (typeof context === "string") {
48572
48517
  callback = /** @type {ResolveCallback} */
48573
48518
  resolveContext;
@@ -48613,8 +48558,8 @@ var require_lib5 = __commonJS({
48613
48558
  };
48614
48559
  }
48615
48560
  var mergeExports = (obj, exports3) => {
48616
- const descriptors2 = Object.getOwnPropertyDescriptors(exports3);
48617
- Object.defineProperties(obj, descriptors2);
48561
+ const descriptors = Object.getOwnPropertyDescriptors(exports3);
48562
+ Object.defineProperties(obj, descriptors);
48618
48563
  return (
48619
48564
  /** @type {A & B} */
48620
48565
  Object.freeze(obj)
@@ -48624,7 +48569,7 @@ var require_lib5 = __commonJS({
48624
48569
  get sync() {
48625
48570
  return resolveSync;
48626
48571
  },
48627
- create: mergeExports(create, {
48572
+ create: mergeExports(create2, {
48628
48573
  get sync() {
48629
48574
  return createSync;
48630
48575
  }
@@ -53495,8 +53440,8 @@ var isPlainObject = (val) => {
53495
53440
  if (kindOf(val) !== "object") {
53496
53441
  return false;
53497
53442
  }
53498
- const prototype3 = getPrototypeOf(val);
53499
- return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(toStringTag in val) && !(iterator in val);
53443
+ const prototype2 = getPrototypeOf(val);
53444
+ return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
53500
53445
  };
53501
53446
  var isEmptyObject = (val) => {
53502
53447
  if (!isObject(val) || isBuffer(val)) {
@@ -53510,17 +53455,42 @@ var isEmptyObject = (val) => {
53510
53455
  };
53511
53456
  var isDate = kindOfTest("Date");
53512
53457
  var isFile = kindOfTest("File");
53458
+ var isReactNativeBlob = (value) => {
53459
+ return !!(value && typeof value.uri !== "undefined");
53460
+ };
53461
+ var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
53513
53462
  var isBlob = kindOfTest("Blob");
53514
53463
  var isFileList = kindOfTest("FileList");
53515
53464
  var isStream = (val) => isObject(val) && isFunction(val.pipe);
53465
+ function getGlobal() {
53466
+ if (typeof globalThis !== "undefined") return globalThis;
53467
+ if (typeof self !== "undefined") return self;
53468
+ if (typeof window !== "undefined") return window;
53469
+ if (typeof global !== "undefined") return global;
53470
+ return {};
53471
+ }
53472
+ var G2 = getGlobal();
53473
+ var FormDataCtor = typeof G2.FormData !== "undefined" ? G2.FormData : void 0;
53516
53474
  var isFormData = (thing) => {
53517
- let kind;
53518
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
53519
- kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
53475
+ if (!thing) return false;
53476
+ if (FormDataCtor && thing instanceof FormDataCtor) return true;
53477
+ const proto4 = getPrototypeOf(thing);
53478
+ if (!proto4 || proto4 === Object.prototype) return false;
53479
+ if (!isFunction(thing.append)) return false;
53480
+ const kind = kindOf(thing);
53481
+ return kind === "formdata" || // detect form-data instance
53482
+ kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]";
53520
53483
  };
53521
53484
  var isURLSearchParams = kindOfTest("URLSearchParams");
53522
- var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
53523
- var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
53485
+ var [isReadableStream, isRequest, isResponse, isHeaders] = [
53486
+ "ReadableStream",
53487
+ "Request",
53488
+ "Response",
53489
+ "Headers"
53490
+ ].map(kindOfTest);
53491
+ var trim = (str) => {
53492
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
53493
+ };
53524
53494
  function forEach(obj, fn2, { allOwnKeys = false } = {}) {
53525
53495
  if (obj === null || typeof obj === "undefined") {
53526
53496
  return;
@@ -53568,13 +53538,17 @@ var _global = (() => {
53568
53538
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
53569
53539
  })();
53570
53540
  var isContextDefined = (context) => !isUndefined(context) && context !== _global;
53571
- function merge() {
53541
+ function merge(...objs) {
53572
53542
  const { caseless, skipUndefined } = isContextDefined(this) && this || {};
53573
53543
  const result = {};
53574
53544
  const assignValue = (val, key) => {
53545
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
53546
+ return;
53547
+ }
53575
53548
  const targetKey = caseless && findKey(result, key) || key;
53576
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
53577
- result[targetKey] = merge(result[targetKey], val);
53549
+ const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
53550
+ if (isPlainObject(existing) && isPlainObject(val)) {
53551
+ result[targetKey] = merge(existing, val);
53578
53552
  } else if (isPlainObject(val)) {
53579
53553
  result[targetKey] = merge({}, val);
53580
53554
  } else if (isArray(val)) {
@@ -53583,19 +53557,37 @@ function merge() {
53583
53557
  result[targetKey] = val;
53584
53558
  }
53585
53559
  };
53586
- for (let i = 0, l = arguments.length; i < l; i++) {
53587
- arguments[i] && forEach(arguments[i], assignValue);
53560
+ for (let i = 0, l = objs.length; i < l; i++) {
53561
+ objs[i] && forEach(objs[i], assignValue);
53588
53562
  }
53589
53563
  return result;
53590
53564
  }
53591
53565
  var extend = (a, b2, thisArg, { allOwnKeys } = {}) => {
53592
- forEach(b2, (val, key) => {
53593
- if (thisArg && isFunction(val)) {
53594
- a[key] = bind(val, thisArg);
53595
- } else {
53596
- a[key] = val;
53597
- }
53598
- }, { allOwnKeys });
53566
+ forEach(
53567
+ b2,
53568
+ (val, key) => {
53569
+ if (thisArg && isFunction(val)) {
53570
+ Object.defineProperty(a, key, {
53571
+ // Null-proto descriptor so a polluted Object.prototype.get cannot
53572
+ // hijack defineProperty's accessor-vs-data resolution.
53573
+ __proto__: null,
53574
+ value: bind(val, thisArg),
53575
+ writable: true,
53576
+ enumerable: true,
53577
+ configurable: true
53578
+ });
53579
+ } else {
53580
+ Object.defineProperty(a, key, {
53581
+ __proto__: null,
53582
+ value: val,
53583
+ writable: true,
53584
+ enumerable: true,
53585
+ configurable: true
53586
+ });
53587
+ }
53588
+ },
53589
+ { allOwnKeys }
53590
+ );
53599
53591
  return a;
53600
53592
  };
53601
53593
  var stripBOM = (content) => {
@@ -53604,10 +53596,17 @@ var stripBOM = (content) => {
53604
53596
  }
53605
53597
  return content;
53606
53598
  };
53607
- var inherits = (constructor, superConstructor, props, descriptors2) => {
53608
- constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
53609
- constructor.prototype.constructor = constructor;
53599
+ var inherits = (constructor, superConstructor, props, descriptors) => {
53600
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
53601
+ Object.defineProperty(constructor.prototype, "constructor", {
53602
+ __proto__: null,
53603
+ value: constructor,
53604
+ writable: true,
53605
+ enumerable: false,
53606
+ configurable: true
53607
+ });
53610
53608
  Object.defineProperty(constructor, "super", {
53609
+ __proto__: null,
53611
53610
  value: superConstructor.prototype
53612
53611
  });
53613
53612
  props && Object.assign(constructor.prototype, props);
@@ -53677,19 +53676,16 @@ var matchAll = (regExp, str) => {
53677
53676
  };
53678
53677
  var isHTMLForm = kindOfTest("HTMLFormElement");
53679
53678
  var toCamelCase = (str) => {
53680
- return str.toLowerCase().replace(
53681
- /[-_\s]([a-z\d])(\w*)/g,
53682
- function replacer(m2, p1, p2) {
53683
- return p1.toUpperCase() + p2;
53684
- }
53685
- );
53679
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m2, p1, p2) {
53680
+ return p1.toUpperCase() + p2;
53681
+ });
53686
53682
  };
53687
53683
  var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
53688
53684
  var isRegExp = kindOfTest("RegExp");
53689
53685
  var reduceDescriptors = (obj, reducer) => {
53690
- const descriptors2 = Object.getOwnPropertyDescriptors(obj);
53686
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
53691
53687
  const reducedDescriptors = {};
53692
- forEach(descriptors2, (descriptor, name) => {
53688
+ forEach(descriptors, (descriptor, name) => {
53693
53689
  let ret;
53694
53690
  if ((ret = reducer(descriptor, name, obj)) !== false) {
53695
53691
  reducedDescriptors[name] = ret || descriptor;
@@ -53699,7 +53695,7 @@ var reduceDescriptors = (obj, reducer) => {
53699
53695
  };
53700
53696
  var freezeMethods = (obj) => {
53701
53697
  reduceDescriptors(obj, (descriptor, name) => {
53702
- if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
53698
+ if (isFunction(obj) && ["arguments", "caller", "callee"].includes(name)) {
53703
53699
  return false;
53704
53700
  }
53705
53701
  const value = obj[name];
@@ -53766,20 +53762,21 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
53766
53762
  return setImmediate;
53767
53763
  }
53768
53764
  return postMessageSupported ? ((token, callbacks) => {
53769
- _global.addEventListener("message", ({ source, data }) => {
53770
- if (source === _global && data === token) {
53771
- callbacks.length && callbacks.shift()();
53772
- }
53773
- }, false);
53765
+ _global.addEventListener(
53766
+ "message",
53767
+ ({ source, data }) => {
53768
+ if (source === _global && data === token) {
53769
+ callbacks.length && callbacks.shift()();
53770
+ }
53771
+ },
53772
+ false
53773
+ );
53774
53774
  return (cb) => {
53775
53775
  callbacks.push(cb);
53776
53776
  _global.postMessage(token, "*");
53777
53777
  };
53778
53778
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
53779
- })(
53780
- typeof setImmediate === "function",
53781
- isFunction(_global.postMessage)
53782
- );
53779
+ })(typeof setImmediate === "function", isFunction(_global.postMessage));
53783
53780
  var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
53784
53781
  var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
53785
53782
  var utils_default = {
@@ -53801,6 +53798,8 @@ var utils_default = {
53801
53798
  isUndefined,
53802
53799
  isDate,
53803
53800
  isFile,
53801
+ isReactNativeBlob,
53802
+ isReactNative,
53804
53803
  isBlob,
53805
53804
  isRegExp,
53806
53805
  isFunction,
@@ -53843,26 +53842,413 @@ var utils_default = {
53843
53842
  isIterable
53844
53843
  };
53845
53844
 
53845
+ // ../../../node_modules/axios/lib/helpers/parseHeaders.js
53846
+ var ignoreDuplicateOf = utils_default.toObjectSet([
53847
+ "age",
53848
+ "authorization",
53849
+ "content-length",
53850
+ "content-type",
53851
+ "etag",
53852
+ "expires",
53853
+ "from",
53854
+ "host",
53855
+ "if-modified-since",
53856
+ "if-unmodified-since",
53857
+ "last-modified",
53858
+ "location",
53859
+ "max-forwards",
53860
+ "proxy-authorization",
53861
+ "referer",
53862
+ "retry-after",
53863
+ "user-agent"
53864
+ ]);
53865
+ var parseHeaders_default = (rawHeaders) => {
53866
+ const parsed = {};
53867
+ let key;
53868
+ let val;
53869
+ let i;
53870
+ rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
53871
+ i = line.indexOf(":");
53872
+ key = line.substring(0, i).trim().toLowerCase();
53873
+ val = line.substring(i + 1).trim();
53874
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
53875
+ return;
53876
+ }
53877
+ if (key === "set-cookie") {
53878
+ if (parsed[key]) {
53879
+ parsed[key].push(val);
53880
+ } else {
53881
+ parsed[key] = [val];
53882
+ }
53883
+ } else {
53884
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
53885
+ }
53886
+ });
53887
+ return parsed;
53888
+ };
53889
+
53890
+ // ../../../node_modules/axios/lib/core/AxiosHeaders.js
53891
+ var $internals = /* @__PURE__ */ Symbol("internals");
53892
+ var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
53893
+ function trimSPorHTAB(str) {
53894
+ let start = 0;
53895
+ let end = str.length;
53896
+ while (start < end) {
53897
+ const code = str.charCodeAt(start);
53898
+ if (code !== 9 && code !== 32) {
53899
+ break;
53900
+ }
53901
+ start += 1;
53902
+ }
53903
+ while (end > start) {
53904
+ const code = str.charCodeAt(end - 1);
53905
+ if (code !== 9 && code !== 32) {
53906
+ break;
53907
+ }
53908
+ end -= 1;
53909
+ }
53910
+ return start === 0 && end === str.length ? str : str.slice(start, end);
53911
+ }
53912
+ function normalizeHeader(header) {
53913
+ return header && String(header).trim().toLowerCase();
53914
+ }
53915
+ function sanitizeHeaderValue(str) {
53916
+ return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
53917
+ }
53918
+ function normalizeValue(value) {
53919
+ if (value === false || value == null) {
53920
+ return value;
53921
+ }
53922
+ return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
53923
+ }
53924
+ function parseTokens(str) {
53925
+ const tokens = /* @__PURE__ */ Object.create(null);
53926
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
53927
+ let match2;
53928
+ while (match2 = tokensRE.exec(str)) {
53929
+ tokens[match2[1]] = match2[2];
53930
+ }
53931
+ return tokens;
53932
+ }
53933
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
53934
+ function matchHeaderValue(context, value, header, filter4, isHeaderNameFilter) {
53935
+ if (utils_default.isFunction(filter4)) {
53936
+ return filter4.call(this, value, header);
53937
+ }
53938
+ if (isHeaderNameFilter) {
53939
+ value = header;
53940
+ }
53941
+ if (!utils_default.isString(value)) return;
53942
+ if (utils_default.isString(filter4)) {
53943
+ return value.indexOf(filter4) !== -1;
53944
+ }
53945
+ if (utils_default.isRegExp(filter4)) {
53946
+ return filter4.test(value);
53947
+ }
53948
+ }
53949
+ function formatHeader(header) {
53950
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w2, char, str) => {
53951
+ return char.toUpperCase() + str;
53952
+ });
53953
+ }
53954
+ function buildAccessors(obj, header) {
53955
+ const accessorName = utils_default.toCamelCase(" " + header);
53956
+ ["get", "set", "has"].forEach((methodName) => {
53957
+ Object.defineProperty(obj, methodName + accessorName, {
53958
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
53959
+ // this data descriptor into an accessor descriptor on the way in.
53960
+ __proto__: null,
53961
+ value: function(arg1, arg2, arg3) {
53962
+ return this[methodName].call(this, header, arg1, arg2, arg3);
53963
+ },
53964
+ configurable: true
53965
+ });
53966
+ });
53967
+ }
53968
+ var AxiosHeaders = class {
53969
+ constructor(headers) {
53970
+ headers && this.set(headers);
53971
+ }
53972
+ set(header, valueOrRewrite, rewrite) {
53973
+ const self2 = this;
53974
+ function setHeader(_value, _header, _rewrite) {
53975
+ const lHeader = normalizeHeader(_header);
53976
+ if (!lHeader) {
53977
+ throw new Error("header name must be a non-empty string");
53978
+ }
53979
+ const key = utils_default.findKey(self2, lHeader);
53980
+ if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
53981
+ self2[key || _header] = normalizeValue(_value);
53982
+ }
53983
+ }
53984
+ const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
53985
+ if (utils_default.isPlainObject(header) || header instanceof this.constructor) {
53986
+ setHeaders(header, valueOrRewrite);
53987
+ } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
53988
+ setHeaders(parseHeaders_default(header), valueOrRewrite);
53989
+ } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
53990
+ let obj = {}, dest, key;
53991
+ for (const entry of header) {
53992
+ if (!utils_default.isArray(entry)) {
53993
+ throw TypeError("Object iterator must return a key-value pair");
53994
+ }
53995
+ obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
53996
+ }
53997
+ setHeaders(obj, valueOrRewrite);
53998
+ } else {
53999
+ header != null && setHeader(valueOrRewrite, header, rewrite);
54000
+ }
54001
+ return this;
54002
+ }
54003
+ get(header, parser) {
54004
+ header = normalizeHeader(header);
54005
+ if (header) {
54006
+ const key = utils_default.findKey(this, header);
54007
+ if (key) {
54008
+ const value = this[key];
54009
+ if (!parser) {
54010
+ return value;
54011
+ }
54012
+ if (parser === true) {
54013
+ return parseTokens(value);
54014
+ }
54015
+ if (utils_default.isFunction(parser)) {
54016
+ return parser.call(this, value, key);
54017
+ }
54018
+ if (utils_default.isRegExp(parser)) {
54019
+ return parser.exec(value);
54020
+ }
54021
+ throw new TypeError("parser must be boolean|regexp|function");
54022
+ }
54023
+ }
54024
+ }
54025
+ has(header, matcher) {
54026
+ header = normalizeHeader(header);
54027
+ if (header) {
54028
+ const key = utils_default.findKey(this, header);
54029
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
54030
+ }
54031
+ return false;
54032
+ }
54033
+ delete(header, matcher) {
54034
+ const self2 = this;
54035
+ let deleted = false;
54036
+ function deleteHeader(_header) {
54037
+ _header = normalizeHeader(_header);
54038
+ if (_header) {
54039
+ const key = utils_default.findKey(self2, _header);
54040
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
54041
+ delete self2[key];
54042
+ deleted = true;
54043
+ }
54044
+ }
54045
+ }
54046
+ if (utils_default.isArray(header)) {
54047
+ header.forEach(deleteHeader);
54048
+ } else {
54049
+ deleteHeader(header);
54050
+ }
54051
+ return deleted;
54052
+ }
54053
+ clear(matcher) {
54054
+ const keys = Object.keys(this);
54055
+ let i = keys.length;
54056
+ let deleted = false;
54057
+ while (i--) {
54058
+ const key = keys[i];
54059
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
54060
+ delete this[key];
54061
+ deleted = true;
54062
+ }
54063
+ }
54064
+ return deleted;
54065
+ }
54066
+ normalize(format) {
54067
+ const self2 = this;
54068
+ const headers = {};
54069
+ utils_default.forEach(this, (value, header) => {
54070
+ const key = utils_default.findKey(headers, header);
54071
+ if (key) {
54072
+ self2[key] = normalizeValue(value);
54073
+ delete self2[header];
54074
+ return;
54075
+ }
54076
+ const normalized = format ? formatHeader(header) : String(header).trim();
54077
+ if (normalized !== header) {
54078
+ delete self2[header];
54079
+ }
54080
+ self2[normalized] = normalizeValue(value);
54081
+ headers[normalized] = true;
54082
+ });
54083
+ return this;
54084
+ }
54085
+ concat(...targets) {
54086
+ return this.constructor.concat(this, ...targets);
54087
+ }
54088
+ toJSON(asStrings) {
54089
+ const obj = /* @__PURE__ */ Object.create(null);
54090
+ utils_default.forEach(this, (value, header) => {
54091
+ value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
54092
+ });
54093
+ return obj;
54094
+ }
54095
+ [Symbol.iterator]() {
54096
+ return Object.entries(this.toJSON())[Symbol.iterator]();
54097
+ }
54098
+ toString() {
54099
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
54100
+ }
54101
+ getSetCookie() {
54102
+ return this.get("set-cookie") || [];
54103
+ }
54104
+ get [Symbol.toStringTag]() {
54105
+ return "AxiosHeaders";
54106
+ }
54107
+ static from(thing) {
54108
+ return thing instanceof this ? thing : new this(thing);
54109
+ }
54110
+ static concat(first, ...targets) {
54111
+ const computed = new this(first);
54112
+ targets.forEach((target) => computed.set(target));
54113
+ return computed;
54114
+ }
54115
+ static accessor(header) {
54116
+ const internals = this[$internals] = this[$internals] = {
54117
+ accessors: {}
54118
+ };
54119
+ const accessors = internals.accessors;
54120
+ const prototype2 = this.prototype;
54121
+ function defineAccessor(_header) {
54122
+ const lHeader = normalizeHeader(_header);
54123
+ if (!accessors[lHeader]) {
54124
+ buildAccessors(prototype2, _header);
54125
+ accessors[lHeader] = true;
54126
+ }
54127
+ }
54128
+ utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
54129
+ return this;
54130
+ }
54131
+ };
54132
+ AxiosHeaders.accessor([
54133
+ "Content-Type",
54134
+ "Content-Length",
54135
+ "Accept",
54136
+ "Accept-Encoding",
54137
+ "User-Agent",
54138
+ "Authorization"
54139
+ ]);
54140
+ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
54141
+ let mapped = key[0].toUpperCase() + key.slice(1);
54142
+ return {
54143
+ get: () => value,
54144
+ set(headerValue) {
54145
+ this[mapped] = headerValue;
54146
+ }
54147
+ };
54148
+ });
54149
+ utils_default.freezeMethods(AxiosHeaders);
54150
+ var AxiosHeaders_default = AxiosHeaders;
54151
+
53846
54152
  // ../../../node_modules/axios/lib/core/AxiosError.js
53847
- function AxiosError(message, code, config, request, response) {
53848
- Error.call(this);
53849
- if (Error.captureStackTrace) {
53850
- Error.captureStackTrace(this, this.constructor);
53851
- } else {
53852
- this.stack = new Error().stack;
54153
+ var REDACTED = "[REDACTED ****]";
54154
+ function hasOwnOrPrototypeToJSON(source) {
54155
+ if (utils_default.hasOwnProp(source, "toJSON")) {
54156
+ return true;
53853
54157
  }
53854
- this.message = message;
53855
- this.name = "AxiosError";
53856
- code && (this.code = code);
53857
- config && (this.config = config);
53858
- request && (this.request = request);
53859
- if (response) {
53860
- this.response = response;
53861
- this.status = response.status ? response.status : null;
54158
+ let prototype2 = Object.getPrototypeOf(source);
54159
+ while (prototype2 && prototype2 !== Object.prototype) {
54160
+ if (utils_default.hasOwnProp(prototype2, "toJSON")) {
54161
+ return true;
54162
+ }
54163
+ prototype2 = Object.getPrototypeOf(prototype2);
53862
54164
  }
54165
+ return false;
53863
54166
  }
53864
- utils_default.inherits(AxiosError, Error, {
53865
- toJSON: function toJSON() {
54167
+ function redactConfig(config, redactKeys) {
54168
+ const lowerKeys = new Set(redactKeys.map((k2) => String(k2).toLowerCase()));
54169
+ const seen = [];
54170
+ const visit = (source) => {
54171
+ if (source === null || typeof source !== "object") return source;
54172
+ if (utils_default.isBuffer(source)) return source;
54173
+ if (seen.indexOf(source) !== -1) return void 0;
54174
+ if (source instanceof AxiosHeaders_default) {
54175
+ source = source.toJSON();
54176
+ }
54177
+ seen.push(source);
54178
+ let result;
54179
+ if (utils_default.isArray(source)) {
54180
+ result = [];
54181
+ source.forEach((v2, i) => {
54182
+ const reducedValue = visit(v2);
54183
+ if (!utils_default.isUndefined(reducedValue)) {
54184
+ result[i] = reducedValue;
54185
+ }
54186
+ });
54187
+ } else {
54188
+ if (!utils_default.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
54189
+ seen.pop();
54190
+ return source;
54191
+ }
54192
+ result = /* @__PURE__ */ Object.create(null);
54193
+ for (const [key, value] of Object.entries(source)) {
54194
+ const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
54195
+ if (!utils_default.isUndefined(reducedValue)) {
54196
+ result[key] = reducedValue;
54197
+ }
54198
+ }
54199
+ }
54200
+ seen.pop();
54201
+ return result;
54202
+ };
54203
+ return visit(config);
54204
+ }
54205
+ var AxiosError = class _AxiosError extends Error {
54206
+ static from(error, code, config, request, response, customProps) {
54207
+ const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
54208
+ axiosError.cause = error;
54209
+ axiosError.name = error.name;
54210
+ if (error.status != null && axiosError.status == null) {
54211
+ axiosError.status = error.status;
54212
+ }
54213
+ customProps && Object.assign(axiosError, customProps);
54214
+ return axiosError;
54215
+ }
54216
+ /**
54217
+ * Create an Error with the specified message, config, error code, request and response.
54218
+ *
54219
+ * @param {string} message The error message.
54220
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
54221
+ * @param {Object} [config] The config.
54222
+ * @param {Object} [request] The request.
54223
+ * @param {Object} [response] The response.
54224
+ *
54225
+ * @returns {Error} The created error.
54226
+ */
54227
+ constructor(message, code, config, request, response) {
54228
+ super(message);
54229
+ Object.defineProperty(this, "message", {
54230
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
54231
+ // this data descriptor into an accessor descriptor on the way in.
54232
+ __proto__: null,
54233
+ value: message,
54234
+ enumerable: true,
54235
+ writable: true,
54236
+ configurable: true
54237
+ });
54238
+ this.name = "AxiosError";
54239
+ this.isAxiosError = true;
54240
+ code && (this.code = code);
54241
+ config && (this.config = config);
54242
+ request && (this.request = request);
54243
+ if (response) {
54244
+ this.response = response;
54245
+ this.status = response.status;
54246
+ }
54247
+ }
54248
+ toJSON() {
54249
+ const config = this.config;
54250
+ const redactKeys = config && utils_default.hasOwnProp(config, "redact") ? config.redact : void 0;
54251
+ const serializedConfig = utils_default.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils_default.toJSONObject(config);
53866
54252
  return {
53867
54253
  // Standard
53868
54254
  message: this.message,
@@ -53876,50 +54262,26 @@ utils_default.inherits(AxiosError, Error, {
53876
54262
  columnNumber: this.columnNumber,
53877
54263
  stack: this.stack,
53878
54264
  // Axios
53879
- config: utils_default.toJSONObject(this.config),
54265
+ config: serializedConfig,
53880
54266
  code: this.code,
53881
54267
  status: this.status
53882
54268
  };
53883
54269
  }
53884
- });
53885
- var prototype = AxiosError.prototype;
53886
- var descriptors = {};
53887
- [
53888
- "ERR_BAD_OPTION_VALUE",
53889
- "ERR_BAD_OPTION",
53890
- "ECONNABORTED",
53891
- "ETIMEDOUT",
53892
- "ERR_NETWORK",
53893
- "ERR_FR_TOO_MANY_REDIRECTS",
53894
- "ERR_DEPRECATED",
53895
- "ERR_BAD_RESPONSE",
53896
- "ERR_BAD_REQUEST",
53897
- "ERR_CANCELED",
53898
- "ERR_NOT_SUPPORT",
53899
- "ERR_INVALID_URL"
53900
- // eslint-disable-next-line func-names
53901
- ].forEach((code) => {
53902
- descriptors[code] = { value: code };
53903
- });
53904
- Object.defineProperties(AxiosError, descriptors);
53905
- Object.defineProperty(prototype, "isAxiosError", { value: true });
53906
- AxiosError.from = (error, code, config, request, response, customProps) => {
53907
- const axiosError = Object.create(prototype);
53908
- utils_default.toFlatObject(error, axiosError, function filter4(obj) {
53909
- return obj !== Error.prototype;
53910
- }, (prop) => {
53911
- return prop !== "isAxiosError";
53912
- });
53913
- const msg = error && error.message ? error.message : "Error";
53914
- const errCode = code == null && error ? error.code : code;
53915
- AxiosError.call(axiosError, msg, errCode, config, request, response);
53916
- if (error && axiosError.cause == null) {
53917
- Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
53918
- }
53919
- axiosError.name = error && error.name || "Error";
53920
- customProps && Object.assign(axiosError, customProps);
53921
- return axiosError;
53922
54270
  };
54271
+ AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
54272
+ AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
54273
+ AxiosError.ECONNABORTED = "ECONNABORTED";
54274
+ AxiosError.ETIMEDOUT = "ETIMEDOUT";
54275
+ AxiosError.ECONNREFUSED = "ECONNREFUSED";
54276
+ AxiosError.ERR_NETWORK = "ERR_NETWORK";
54277
+ AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
54278
+ AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
54279
+ AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
54280
+ AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
54281
+ AxiosError.ERR_CANCELED = "ERR_CANCELED";
54282
+ AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
54283
+ AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
54284
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
53923
54285
  var AxiosError_default = AxiosError;
53924
54286
 
53925
54287
  // ../../../node_modules/axios/lib/platform/node/classes/FormData.js
@@ -53951,18 +54313,24 @@ function toFormData(obj, formData, options) {
53951
54313
  throw new TypeError("target must be an object");
53952
54314
  }
53953
54315
  formData = formData || new (FormData_default || FormData)();
53954
- options = utils_default.toFlatObject(options, {
53955
- metaTokens: true,
53956
- dots: false,
53957
- indexes: false
53958
- }, false, function defined(option, source) {
53959
- return !utils_default.isUndefined(source[option]);
53960
- });
54316
+ options = utils_default.toFlatObject(
54317
+ options,
54318
+ {
54319
+ metaTokens: true,
54320
+ dots: false,
54321
+ indexes: false
54322
+ },
54323
+ false,
54324
+ function defined(option, source) {
54325
+ return !utils_default.isUndefined(source[option]);
54326
+ }
54327
+ );
53961
54328
  const metaTokens = options.metaTokens;
53962
54329
  const visitor = options.visitor || defaultVisitor;
53963
54330
  const dots = options.dots;
53964
54331
  const indexes = options.indexes;
53965
54332
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
54333
+ const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
53966
54334
  const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
53967
54335
  if (!utils_default.isFunction(visitor)) {
53968
54336
  throw new TypeError("visitor must be a function");
@@ -53985,6 +54353,10 @@ function toFormData(obj, formData, options) {
53985
54353
  }
53986
54354
  function defaultVisitor(value, key, path3) {
53987
54355
  let arr = value;
54356
+ if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
54357
+ formData.append(renderKey(path3, key, dots), convertValue(value));
54358
+ return false;
54359
+ }
53988
54360
  if (value && !path3 && typeof value === "object") {
53989
54361
  if (utils_default.endsWith(key, "{}")) {
53990
54362
  key = metaTokens ? key : key.slice(0, -2);
@@ -54013,22 +54385,22 @@ function toFormData(obj, formData, options) {
54013
54385
  convertValue,
54014
54386
  isVisitable
54015
54387
  });
54016
- function build(value, path3) {
54388
+ function build(value, path3, depth = 0) {
54017
54389
  if (utils_default.isUndefined(value)) return;
54390
+ if (depth > maxDepth) {
54391
+ throw new AxiosError_default(
54392
+ "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
54393
+ AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
54394
+ );
54395
+ }
54018
54396
  if (stack.indexOf(value) !== -1) {
54019
54397
  throw Error("Circular reference detected in " + path3.join("."));
54020
54398
  }
54021
54399
  stack.push(value);
54022
54400
  utils_default.forEach(value, function each(el, key) {
54023
- const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
54024
- formData,
54025
- el,
54026
- utils_default.isString(key) ? key.trim() : key,
54027
- path3,
54028
- exposedHelpers
54029
- );
54401
+ const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path3, exposedHelpers);
54030
54402
  if (result === true) {
54031
- build(el, path3 ? path3.concat(key) : [key]);
54403
+ build(el, path3 ? path3.concat(key) : [key], depth + 1);
54032
54404
  }
54033
54405
  });
54034
54406
  stack.pop();
@@ -54049,10 +54421,9 @@ function encode(str) {
54049
54421
  "(": "%28",
54050
54422
  ")": "%29",
54051
54423
  "~": "%7E",
54052
- "%20": "+",
54053
- "%00": "\0"
54424
+ "%20": "+"
54054
54425
  };
54055
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match2) {
54426
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match2) {
54056
54427
  return charMap[match2];
54057
54428
  });
54058
54429
  }
@@ -54060,11 +54431,11 @@ function AxiosURLSearchParams(params, options) {
54060
54431
  this._pairs = [];
54061
54432
  params && toFormData_default(params, this, options);
54062
54433
  }
54063
- var prototype2 = AxiosURLSearchParams.prototype;
54064
- prototype2.append = function append(name, value) {
54434
+ var prototype = AxiosURLSearchParams.prototype;
54435
+ prototype.append = function append(name, value) {
54065
54436
  this._pairs.push([name, value]);
54066
54437
  };
54067
- prototype2.toString = function toString2(encoder) {
54438
+ prototype.toString = function toString2(encoder) {
54068
54439
  const _encode = encoder ? function(value) {
54069
54440
  return encoder.call(this, value, encode);
54070
54441
  } : encode;
@@ -54083,17 +54454,15 @@ function buildURL(url2, params, options) {
54083
54454
  return url2;
54084
54455
  }
54085
54456
  const _encode = options && options.encode || encode2;
54086
- if (utils_default.isFunction(options)) {
54087
- options = {
54088
- serialize: options
54089
- };
54090
- }
54091
- const serializeFn = options && options.serialize;
54457
+ const _options = utils_default.isFunction(options) ? {
54458
+ serialize: options
54459
+ } : options;
54460
+ const serializeFn = _options && _options.serialize;
54092
54461
  let serializedParams;
54093
54462
  if (serializeFn) {
54094
- serializedParams = serializeFn(params, options);
54463
+ serializedParams = serializeFn(params, _options);
54095
54464
  } else {
54096
- serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode);
54465
+ serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode);
54097
54466
  }
54098
54467
  if (serializedParams) {
54099
54468
  const hashmarkIndex = url2.indexOf("#");
@@ -54115,6 +54484,7 @@ var InterceptorManager = class {
54115
54484
  *
54116
54485
  * @param {Function} fulfilled The function to handle `then` for a `Promise`
54117
54486
  * @param {Function} rejected The function to handle `reject` for a `Promise`
54487
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
54118
54488
  *
54119
54489
  * @return {Number} An ID used to remove interceptor later
54120
54490
  */
@@ -54173,7 +54543,8 @@ var InterceptorManager_default = InterceptorManager;
54173
54543
  var transitional_default = {
54174
54544
  silentJSONParsing: true,
54175
54545
  forcedJSONParsing: true,
54176
- clarifyTimeoutError: false
54546
+ clarifyTimeoutError: false,
54547
+ legacyInterceptorReqResOrdering: true
54177
54548
  };
54178
54549
 
54179
54550
  // ../../../node_modules/axios/lib/platform/node/index.js
@@ -54278,7 +54649,7 @@ function formDataToJSON(formData) {
54278
54649
  name = !name && utils_default.isArray(target) ? target.length : name;
54279
54650
  if (isLast) {
54280
54651
  if (utils_default.hasOwnProp(target, name)) {
54281
- target[name] = [target[name], value];
54652
+ target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
54282
54653
  } else {
54283
54654
  target[name] = value;
54284
54655
  }
@@ -54305,6 +54676,7 @@ function formDataToJSON(formData) {
54305
54676
  var formDataToJSON_default = formDataToJSON;
54306
54677
 
54307
54678
  // ../../../node_modules/axios/lib/defaults/index.js
54679
+ var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
54308
54680
  function stringifySafely(rawValue, parser, encoder) {
54309
54681
  if (utils_default.isString(rawValue)) {
54310
54682
  try {
@@ -54321,70 +54693,77 @@ function stringifySafely(rawValue, parser, encoder) {
54321
54693
  var defaults = {
54322
54694
  transitional: transitional_default,
54323
54695
  adapter: ["xhr", "http", "fetch"],
54324
- transformRequest: [function transformRequest(data, headers) {
54325
- const contentType = headers.getContentType() || "";
54326
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
54327
- const isObjectPayload = utils_default.isObject(data);
54328
- if (isObjectPayload && utils_default.isHTMLForm(data)) {
54329
- data = new FormData(data);
54330
- }
54331
- const isFormData2 = utils_default.isFormData(data);
54332
- if (isFormData2) {
54333
- return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
54334
- }
54335
- if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
54336
- return data;
54337
- }
54338
- if (utils_default.isArrayBufferView(data)) {
54339
- return data.buffer;
54340
- }
54341
- if (utils_default.isURLSearchParams(data)) {
54342
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
54343
- return data.toString();
54344
- }
54345
- let isFileList2;
54346
- if (isObjectPayload) {
54347
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
54348
- return toURLEncodedForm(data, this.formSerializer).toString();
54696
+ transformRequest: [
54697
+ function transformRequest(data, headers) {
54698
+ const contentType = headers.getContentType() || "";
54699
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
54700
+ const isObjectPayload = utils_default.isObject(data);
54701
+ if (isObjectPayload && utils_default.isHTMLForm(data)) {
54702
+ data = new FormData(data);
54703
+ }
54704
+ const isFormData2 = utils_default.isFormData(data);
54705
+ if (isFormData2) {
54706
+ return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
54707
+ }
54708
+ if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
54709
+ return data;
54710
+ }
54711
+ if (utils_default.isArrayBufferView(data)) {
54712
+ return data.buffer;
54713
+ }
54714
+ if (utils_default.isURLSearchParams(data)) {
54715
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
54716
+ return data.toString();
54717
+ }
54718
+ let isFileList2;
54719
+ if (isObjectPayload) {
54720
+ const formSerializer = own(this, "formSerializer");
54721
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
54722
+ return toURLEncodedForm(data, formSerializer).toString();
54723
+ }
54724
+ if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
54725
+ const env4 = own(this, "env");
54726
+ const _FormData = env4 && env4.FormData;
54727
+ return toFormData_default(
54728
+ isFileList2 ? { "files[]": data } : data,
54729
+ _FormData && new _FormData(),
54730
+ formSerializer
54731
+ );
54732
+ }
54349
54733
  }
54350
- if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
54351
- const _FormData = this.env && this.env.FormData;
54352
- return toFormData_default(
54353
- isFileList2 ? { "files[]": data } : data,
54354
- _FormData && new _FormData(),
54355
- this.formSerializer
54356
- );
54734
+ if (isObjectPayload || hasJSONContentType) {
54735
+ headers.setContentType("application/json", false);
54736
+ return stringifySafely(data);
54357
54737
  }
54358
- }
54359
- if (isObjectPayload || hasJSONContentType) {
54360
- headers.setContentType("application/json", false);
54361
- return stringifySafely(data);
54362
- }
54363
- return data;
54364
- }],
54365
- transformResponse: [function transformResponse(data) {
54366
- const transitional2 = this.transitional || defaults.transitional;
54367
- const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
54368
- const JSONRequested = this.responseType === "json";
54369
- if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
54370
54738
  return data;
54371
54739
  }
54372
- if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
54373
- const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
54374
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
54375
- try {
54376
- return JSON.parse(data, this.parseReviver);
54377
- } catch (e) {
54378
- if (strictJSONParsing) {
54379
- if (e.name === "SyntaxError") {
54380
- throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
54740
+ ],
54741
+ transformResponse: [
54742
+ function transformResponse(data) {
54743
+ const transitional2 = own(this, "transitional") || defaults.transitional;
54744
+ const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
54745
+ const responseType = own(this, "responseType");
54746
+ const JSONRequested = responseType === "json";
54747
+ if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
54748
+ return data;
54749
+ }
54750
+ if (data && utils_default.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
54751
+ const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
54752
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
54753
+ try {
54754
+ return JSON.parse(data, own(this, "parseReviver"));
54755
+ } catch (e) {
54756
+ if (strictJSONParsing) {
54757
+ if (e.name === "SyntaxError") {
54758
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, own(this, "response"));
54759
+ }
54760
+ throw e;
54381
54761
  }
54382
- throw e;
54383
54762
  }
54384
54763
  }
54764
+ return data;
54385
54765
  }
54386
- return data;
54387
- }],
54766
+ ],
54388
54767
  /**
54389
54768
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
54390
54769
  * timeout is not created.
@@ -54403,290 +54782,16 @@ var defaults = {
54403
54782
  },
54404
54783
  headers: {
54405
54784
  common: {
54406
- "Accept": "application/json, text/plain, */*",
54785
+ Accept: "application/json, text/plain, */*",
54407
54786
  "Content-Type": void 0
54408
54787
  }
54409
54788
  }
54410
54789
  };
54411
- utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
54790
+ utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
54412
54791
  defaults.headers[method] = {};
54413
54792
  });
54414
54793
  var defaults_default = defaults;
54415
54794
 
54416
- // ../../../node_modules/axios/lib/helpers/parseHeaders.js
54417
- var ignoreDuplicateOf = utils_default.toObjectSet([
54418
- "age",
54419
- "authorization",
54420
- "content-length",
54421
- "content-type",
54422
- "etag",
54423
- "expires",
54424
- "from",
54425
- "host",
54426
- "if-modified-since",
54427
- "if-unmodified-since",
54428
- "last-modified",
54429
- "location",
54430
- "max-forwards",
54431
- "proxy-authorization",
54432
- "referer",
54433
- "retry-after",
54434
- "user-agent"
54435
- ]);
54436
- var parseHeaders_default = (rawHeaders) => {
54437
- const parsed = {};
54438
- let key;
54439
- let val;
54440
- let i;
54441
- rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
54442
- i = line.indexOf(":");
54443
- key = line.substring(0, i).trim().toLowerCase();
54444
- val = line.substring(i + 1).trim();
54445
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
54446
- return;
54447
- }
54448
- if (key === "set-cookie") {
54449
- if (parsed[key]) {
54450
- parsed[key].push(val);
54451
- } else {
54452
- parsed[key] = [val];
54453
- }
54454
- } else {
54455
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
54456
- }
54457
- });
54458
- return parsed;
54459
- };
54460
-
54461
- // ../../../node_modules/axios/lib/core/AxiosHeaders.js
54462
- var $internals = /* @__PURE__ */ Symbol("internals");
54463
- function normalizeHeader(header) {
54464
- return header && String(header).trim().toLowerCase();
54465
- }
54466
- function normalizeValue(value) {
54467
- if (value === false || value == null) {
54468
- return value;
54469
- }
54470
- return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
54471
- }
54472
- function parseTokens(str) {
54473
- const tokens = /* @__PURE__ */ Object.create(null);
54474
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
54475
- let match2;
54476
- while (match2 = tokensRE.exec(str)) {
54477
- tokens[match2[1]] = match2[2];
54478
- }
54479
- return tokens;
54480
- }
54481
- var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
54482
- function matchHeaderValue(context, value, header, filter4, isHeaderNameFilter) {
54483
- if (utils_default.isFunction(filter4)) {
54484
- return filter4.call(this, value, header);
54485
- }
54486
- if (isHeaderNameFilter) {
54487
- value = header;
54488
- }
54489
- if (!utils_default.isString(value)) return;
54490
- if (utils_default.isString(filter4)) {
54491
- return value.indexOf(filter4) !== -1;
54492
- }
54493
- if (utils_default.isRegExp(filter4)) {
54494
- return filter4.test(value);
54495
- }
54496
- }
54497
- function formatHeader(header) {
54498
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w2, char, str) => {
54499
- return char.toUpperCase() + str;
54500
- });
54501
- }
54502
- function buildAccessors(obj, header) {
54503
- const accessorName = utils_default.toCamelCase(" " + header);
54504
- ["get", "set", "has"].forEach((methodName) => {
54505
- Object.defineProperty(obj, methodName + accessorName, {
54506
- value: function(arg1, arg2, arg3) {
54507
- return this[methodName].call(this, header, arg1, arg2, arg3);
54508
- },
54509
- configurable: true
54510
- });
54511
- });
54512
- }
54513
- var AxiosHeaders = class {
54514
- constructor(headers) {
54515
- headers && this.set(headers);
54516
- }
54517
- set(header, valueOrRewrite, rewrite) {
54518
- const self2 = this;
54519
- function setHeader(_value, _header, _rewrite) {
54520
- const lHeader = normalizeHeader(_header);
54521
- if (!lHeader) {
54522
- throw new Error("header name must be a non-empty string");
54523
- }
54524
- const key = utils_default.findKey(self2, lHeader);
54525
- if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
54526
- self2[key || _header] = normalizeValue(_value);
54527
- }
54528
- }
54529
- const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
54530
- if (utils_default.isPlainObject(header) || header instanceof this.constructor) {
54531
- setHeaders(header, valueOrRewrite);
54532
- } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
54533
- setHeaders(parseHeaders_default(header), valueOrRewrite);
54534
- } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
54535
- let obj = {}, dest, key;
54536
- for (const entry of header) {
54537
- if (!utils_default.isArray(entry)) {
54538
- throw TypeError("Object iterator must return a key-value pair");
54539
- }
54540
- obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
54541
- }
54542
- setHeaders(obj, valueOrRewrite);
54543
- } else {
54544
- header != null && setHeader(valueOrRewrite, header, rewrite);
54545
- }
54546
- return this;
54547
- }
54548
- get(header, parser) {
54549
- header = normalizeHeader(header);
54550
- if (header) {
54551
- const key = utils_default.findKey(this, header);
54552
- if (key) {
54553
- const value = this[key];
54554
- if (!parser) {
54555
- return value;
54556
- }
54557
- if (parser === true) {
54558
- return parseTokens(value);
54559
- }
54560
- if (utils_default.isFunction(parser)) {
54561
- return parser.call(this, value, key);
54562
- }
54563
- if (utils_default.isRegExp(parser)) {
54564
- return parser.exec(value);
54565
- }
54566
- throw new TypeError("parser must be boolean|regexp|function");
54567
- }
54568
- }
54569
- }
54570
- has(header, matcher) {
54571
- header = normalizeHeader(header);
54572
- if (header) {
54573
- const key = utils_default.findKey(this, header);
54574
- return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
54575
- }
54576
- return false;
54577
- }
54578
- delete(header, matcher) {
54579
- const self2 = this;
54580
- let deleted = false;
54581
- function deleteHeader(_header) {
54582
- _header = normalizeHeader(_header);
54583
- if (_header) {
54584
- const key = utils_default.findKey(self2, _header);
54585
- if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
54586
- delete self2[key];
54587
- deleted = true;
54588
- }
54589
- }
54590
- }
54591
- if (utils_default.isArray(header)) {
54592
- header.forEach(deleteHeader);
54593
- } else {
54594
- deleteHeader(header);
54595
- }
54596
- return deleted;
54597
- }
54598
- clear(matcher) {
54599
- const keys = Object.keys(this);
54600
- let i = keys.length;
54601
- let deleted = false;
54602
- while (i--) {
54603
- const key = keys[i];
54604
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
54605
- delete this[key];
54606
- deleted = true;
54607
- }
54608
- }
54609
- return deleted;
54610
- }
54611
- normalize(format) {
54612
- const self2 = this;
54613
- const headers = {};
54614
- utils_default.forEach(this, (value, header) => {
54615
- const key = utils_default.findKey(headers, header);
54616
- if (key) {
54617
- self2[key] = normalizeValue(value);
54618
- delete self2[header];
54619
- return;
54620
- }
54621
- const normalized = format ? formatHeader(header) : String(header).trim();
54622
- if (normalized !== header) {
54623
- delete self2[header];
54624
- }
54625
- self2[normalized] = normalizeValue(value);
54626
- headers[normalized] = true;
54627
- });
54628
- return this;
54629
- }
54630
- concat(...targets) {
54631
- return this.constructor.concat(this, ...targets);
54632
- }
54633
- toJSON(asStrings) {
54634
- const obj = /* @__PURE__ */ Object.create(null);
54635
- utils_default.forEach(this, (value, header) => {
54636
- value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
54637
- });
54638
- return obj;
54639
- }
54640
- [Symbol.iterator]() {
54641
- return Object.entries(this.toJSON())[Symbol.iterator]();
54642
- }
54643
- toString() {
54644
- return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
54645
- }
54646
- getSetCookie() {
54647
- return this.get("set-cookie") || [];
54648
- }
54649
- get [Symbol.toStringTag]() {
54650
- return "AxiosHeaders";
54651
- }
54652
- static from(thing) {
54653
- return thing instanceof this ? thing : new this(thing);
54654
- }
54655
- static concat(first, ...targets) {
54656
- const computed = new this(first);
54657
- targets.forEach((target) => computed.set(target));
54658
- return computed;
54659
- }
54660
- static accessor(header) {
54661
- const internals = this[$internals] = this[$internals] = {
54662
- accessors: {}
54663
- };
54664
- const accessors = internals.accessors;
54665
- const prototype3 = this.prototype;
54666
- function defineAccessor(_header) {
54667
- const lHeader = normalizeHeader(_header);
54668
- if (!accessors[lHeader]) {
54669
- buildAccessors(prototype3, _header);
54670
- accessors[lHeader] = true;
54671
- }
54672
- }
54673
- utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
54674
- return this;
54675
- }
54676
- };
54677
- AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
54678
- utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
54679
- let mapped = key[0].toUpperCase() + key.slice(1);
54680
- return {
54681
- get: () => value,
54682
- set(headerValue) {
54683
- this[mapped] = headerValue;
54684
- }
54685
- };
54686
- });
54687
- utils_default.freezeMethods(AxiosHeaders);
54688
- var AxiosHeaders_default = AxiosHeaders;
54689
-
54690
54795
  // ../../../node_modules/axios/lib/core/transformData.js
54691
54796
  function transformData(fns, response) {
54692
54797
  const config = this || defaults_default;
@@ -54706,13 +54811,22 @@ function isCancel(value) {
54706
54811
  }
54707
54812
 
54708
54813
  // ../../../node_modules/axios/lib/cancel/CanceledError.js
54709
- function CanceledError(message, config, request) {
54710
- AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
54711
- this.name = "CanceledError";
54712
- }
54713
- utils_default.inherits(CanceledError, AxiosError_default, {
54714
- __CANCEL__: true
54715
- });
54814
+ var CanceledError = class extends AxiosError_default {
54815
+ /**
54816
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
54817
+ *
54818
+ * @param {string=} message The message.
54819
+ * @param {Object=} config The config.
54820
+ * @param {Object=} request The request.
54821
+ *
54822
+ * @returns {CanceledError} The created error.
54823
+ */
54824
+ constructor(message, config, request) {
54825
+ super(message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
54826
+ this.name = "CanceledError";
54827
+ this.__CANCEL__ = true;
54828
+ }
54829
+ };
54716
54830
  var CanceledError_default = CanceledError;
54717
54831
 
54718
54832
  // ../../../node_modules/axios/lib/core/settle.js
@@ -54723,7 +54837,7 @@ function settle(resolve6, reject, response) {
54723
54837
  } else {
54724
54838
  reject(new AxiosError_default(
54725
54839
  "Request failed with status code " + response.status,
54726
- [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
54840
+ response.status >= 400 && response.status < 500 ? AxiosError_default.ERR_BAD_REQUEST : AxiosError_default.ERR_BAD_RESPONSE,
54727
54841
  response.config,
54728
54842
  response.request,
54729
54843
  response
@@ -54733,6 +54847,9 @@ function settle(resolve6, reject, response) {
54733
54847
 
54734
54848
  // ../../../node_modules/axios/lib/helpers/isAbsoluteURL.js
54735
54849
  function isAbsoluteURL(url2) {
54850
+ if (typeof url2 !== "string") {
54851
+ return false;
54852
+ }
54736
54853
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
54737
54854
  }
54738
54855
 
@@ -54744,27 +54861,94 @@ function combineURLs(baseURL, relativeURL) {
54744
54861
  // ../../../node_modules/axios/lib/core/buildFullPath.js
54745
54862
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
54746
54863
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
54747
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
54864
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
54748
54865
  return combineURLs(baseURL, requestedURL);
54749
54866
  }
54750
54867
  return requestedURL;
54751
54868
  }
54752
54869
 
54870
+ // ../../../node_modules/proxy-from-env/index.js
54871
+ var DEFAULT_PORTS = {
54872
+ ftp: 21,
54873
+ gopher: 70,
54874
+ http: 80,
54875
+ https: 443,
54876
+ ws: 80,
54877
+ wss: 443
54878
+ };
54879
+ function parseUrl(urlString) {
54880
+ try {
54881
+ return new URL(urlString);
54882
+ } catch {
54883
+ return null;
54884
+ }
54885
+ }
54886
+ function getProxyForUrl(url2) {
54887
+ var parsedUrl = (typeof url2 === "string" ? parseUrl(url2) : url2) || {};
54888
+ var proto4 = parsedUrl.protocol;
54889
+ var hostname = parsedUrl.host;
54890
+ var port = parsedUrl.port;
54891
+ if (typeof hostname !== "string" || !hostname || typeof proto4 !== "string") {
54892
+ return "";
54893
+ }
54894
+ proto4 = proto4.split(":", 1)[0];
54895
+ hostname = hostname.replace(/:\d*$/, "");
54896
+ port = parseInt(port) || DEFAULT_PORTS[proto4] || 0;
54897
+ if (!shouldProxy(hostname, port)) {
54898
+ return "";
54899
+ }
54900
+ var proxy = getEnv(proto4 + "_proxy") || getEnv("all_proxy");
54901
+ if (proxy && proxy.indexOf("://") === -1) {
54902
+ proxy = proto4 + "://" + proxy;
54903
+ }
54904
+ return proxy;
54905
+ }
54906
+ function shouldProxy(hostname, port) {
54907
+ var NO_PROXY = getEnv("no_proxy").toLowerCase();
54908
+ if (!NO_PROXY) {
54909
+ return true;
54910
+ }
54911
+ if (NO_PROXY === "*") {
54912
+ return false;
54913
+ }
54914
+ return NO_PROXY.split(/[,\s]/).every(function(proxy) {
54915
+ if (!proxy) {
54916
+ return true;
54917
+ }
54918
+ var parsedProxy = proxy.match(/^(.+):(\d+)$/);
54919
+ var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
54920
+ var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
54921
+ if (parsedProxyPort && parsedProxyPort !== port) {
54922
+ return true;
54923
+ }
54924
+ if (!/^[.*]/.test(parsedProxyHostname)) {
54925
+ return hostname !== parsedProxyHostname;
54926
+ }
54927
+ if (parsedProxyHostname.charAt(0) === "*") {
54928
+ parsedProxyHostname = parsedProxyHostname.slice(1);
54929
+ }
54930
+ return !hostname.endsWith(parsedProxyHostname);
54931
+ });
54932
+ }
54933
+ function getEnv(key) {
54934
+ return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
54935
+ }
54936
+
54753
54937
  // ../../../node_modules/axios/lib/adapters/http.js
54754
- var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
54755
54938
  var import_http = __toESM(require("http"), 1);
54756
54939
  var import_https = __toESM(require("https"), 1);
54757
54940
  var import_http2 = __toESM(require("http2"), 1);
54758
54941
  var import_util2 = __toESM(require("util"), 1);
54942
+ var import_path4 = require("path");
54759
54943
  var import_follow_redirects = __toESM(require_follow_redirects(), 1);
54760
54944
  var import_zlib2 = __toESM(require("zlib"), 1);
54761
54945
 
54762
54946
  // ../../../node_modules/axios/lib/env/data.js
54763
- var VERSION = "1.13.2";
54947
+ var VERSION = "1.16.0";
54764
54948
 
54765
54949
  // ../../../node_modules/axios/lib/helpers/parseProtocol.js
54766
54950
  function parseProtocol(url2) {
54767
- const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
54951
+ const match2 = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
54768
54952
  return match2 && match2[1] || "";
54769
54953
  }
54770
54954
 
@@ -54805,16 +54989,21 @@ var import_stream = __toESM(require("stream"), 1);
54805
54989
  var kInternals = /* @__PURE__ */ Symbol("internals");
54806
54990
  var AxiosTransformStream = class extends import_stream.default.Transform {
54807
54991
  constructor(options) {
54808
- options = utils_default.toFlatObject(options, {
54809
- maxRate: 0,
54810
- chunkSize: 64 * 1024,
54811
- minChunkSize: 100,
54812
- timeWindow: 500,
54813
- ticksRate: 2,
54814
- samplesCount: 15
54815
- }, null, (prop, source) => {
54816
- return !utils_default.isUndefined(source[prop]);
54817
- });
54992
+ options = utils_default.toFlatObject(
54993
+ options,
54994
+ {
54995
+ maxRate: 0,
54996
+ chunkSize: 64 * 1024,
54997
+ minChunkSize: 100,
54998
+ timeWindow: 500,
54999
+ ticksRate: 2,
55000
+ samplesCount: 15
55001
+ },
55002
+ null,
55003
+ (prop, source) => {
55004
+ return !utils_default.isUndefined(source[prop]);
55005
+ }
55006
+ );
54818
55007
  super({
54819
55008
  readableHighWaterMark: options.chunkSize
54820
55009
  });
@@ -54897,9 +55086,12 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
54897
55086
  chunkRemainder = _chunk.subarray(maxChunkSize);
54898
55087
  _chunk = _chunk.subarray(0, maxChunkSize);
54899
55088
  }
54900
- pushChunk(_chunk, chunkRemainder ? () => {
54901
- process.nextTick(_callback, null, chunkRemainder);
54902
- } : _callback);
55089
+ pushChunk(
55090
+ _chunk,
55091
+ chunkRemainder ? () => {
55092
+ process.nextTick(_callback, null, chunkRemainder);
55093
+ } : _callback
55094
+ );
54903
55095
  };
54904
55096
  transformChunk(chunk, function transformNextChunk(err, _chunk) {
54905
55097
  if (err) {
@@ -54951,7 +55143,8 @@ var FormDataPart = class {
54951
55143
  if (isStringValue) {
54952
55144
  value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
54953
55145
  } else {
54954
- headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
55146
+ const safeType = String(value.type || "application/octet-stream").replace(/[\r\n]/g, "");
55147
+ headers += `Content-Type: ${safeType}${CRLF}`;
54955
55148
  }
54956
55149
  this.headers = textEncoder.encode(headers + CRLF);
54957
55150
  this.contentLength = isStringValue ? value.byteLength : value.size;
@@ -54970,11 +55163,14 @@ var FormDataPart = class {
54970
55163
  yield CRLF_BYTES;
54971
55164
  }
54972
55165
  static escapeName(name) {
54973
- return String(name).replace(/[\r\n"]/g, (match2) => ({
54974
- "\r": "%0D",
54975
- "\n": "%0A",
54976
- '"': "%22"
54977
- })[match2]);
55166
+ return String(name).replace(
55167
+ /[\r\n"]/g,
55168
+ (match2) => ({
55169
+ "\r": "%0D",
55170
+ "\n": "%0A",
55171
+ '"': "%22"
55172
+ })[match2]
55173
+ );
54978
55174
  }
54979
55175
  };
54980
55176
  var formDataToStream = (form, headersHandler, options) => {
@@ -54987,7 +55183,7 @@ var formDataToStream = (form, headersHandler, options) => {
54987
55183
  throw TypeError("FormData instance required");
54988
55184
  }
54989
55185
  if (boundary.length < 1 || boundary.length > 70) {
54990
- throw Error("boundary must be 10-70 characters long");
55186
+ throw Error("boundary must be 1-70 characters long");
54991
55187
  }
54992
55188
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
54993
55189
  const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
@@ -55006,13 +55202,15 @@ var formDataToStream = (form, headersHandler, options) => {
55006
55202
  computedHeaders["Content-Length"] = contentLength;
55007
55203
  }
55008
55204
  headersHandler && headersHandler(computedHeaders);
55009
- return import_stream2.Readable.from((async function* () {
55010
- for (const part of parts) {
55011
- yield boundaryBytes;
55012
- yield* part.encode();
55013
- }
55014
- yield footerBytes;
55015
- })());
55205
+ return import_stream2.Readable.from(
55206
+ (async function* () {
55207
+ for (const part of parts) {
55208
+ yield boundaryBytes;
55209
+ yield* part.encode();
55210
+ }
55211
+ yield footerBytes;
55212
+ })()
55213
+ );
55016
55214
  };
55017
55215
  var formDataToStream_default = formDataToStream;
55018
55216
 
@@ -55053,6 +55251,128 @@ var callbackify = (fn2, reducer) => {
55053
55251
  };
55054
55252
  var callbackify_default = callbackify;
55055
55253
 
55254
+ // ../../../node_modules/axios/lib/helpers/shouldBypassProxy.js
55255
+ var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
55256
+ var isIPv4Loopback = (host) => {
55257
+ const parts = host.split(".");
55258
+ if (parts.length !== 4) return false;
55259
+ if (parts[0] !== "127") return false;
55260
+ return parts.every((p2) => /^\d+$/.test(p2) && Number(p2) >= 0 && Number(p2) <= 255);
55261
+ };
55262
+ var isIPv6Loopback = (host) => {
55263
+ if (host === "::1") return true;
55264
+ const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
55265
+ if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]);
55266
+ const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);
55267
+ if (v4MappedHex) {
55268
+ const high = parseInt(v4MappedHex[1], 16);
55269
+ return high >= 32512 && high <= 32767;
55270
+ }
55271
+ const groups = host.split(":");
55272
+ if (groups.length === 8) {
55273
+ for (let i = 0; i < 7; i++) {
55274
+ if (!/^0+$/.test(groups[i])) return false;
55275
+ }
55276
+ return /^0*1$/.test(groups[7]);
55277
+ }
55278
+ return false;
55279
+ };
55280
+ var isLoopback = (host) => {
55281
+ if (!host) return false;
55282
+ if (LOOPBACK_HOSTNAMES.has(host)) return true;
55283
+ if (isIPv4Loopback(host)) return true;
55284
+ return isIPv6Loopback(host);
55285
+ };
55286
+ var DEFAULT_PORTS2 = {
55287
+ http: 80,
55288
+ https: 443,
55289
+ ws: 80,
55290
+ wss: 443,
55291
+ ftp: 21
55292
+ };
55293
+ var parseNoProxyEntry = (entry) => {
55294
+ let entryHost = entry;
55295
+ let entryPort = 0;
55296
+ if (entryHost.charAt(0) === "[") {
55297
+ const bracketIndex = entryHost.indexOf("]");
55298
+ if (bracketIndex !== -1) {
55299
+ const host = entryHost.slice(1, bracketIndex);
55300
+ const rest = entryHost.slice(bracketIndex + 1);
55301
+ if (rest.charAt(0) === ":" && /^\d+$/.test(rest.slice(1))) {
55302
+ entryPort = Number.parseInt(rest.slice(1), 10);
55303
+ }
55304
+ return [host, entryPort];
55305
+ }
55306
+ }
55307
+ const firstColon = entryHost.indexOf(":");
55308
+ const lastColon = entryHost.lastIndexOf(":");
55309
+ if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) {
55310
+ entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10);
55311
+ entryHost = entryHost.slice(0, lastColon);
55312
+ }
55313
+ return [entryHost, entryPort];
55314
+ };
55315
+ var IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
55316
+ var IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
55317
+ var unmapIPv4MappedIPv6 = (host) => {
55318
+ if (typeof host !== "string" || host.indexOf(":") === -1) return host;
55319
+ const dotted = host.match(IPV4_MAPPED_DOTTED_RE);
55320
+ if (dotted) return dotted[1];
55321
+ const hex = host.match(IPV4_MAPPED_HEX_RE);
55322
+ if (hex) {
55323
+ const high = parseInt(hex[1], 16);
55324
+ const low = parseInt(hex[2], 16);
55325
+ return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
55326
+ }
55327
+ return host;
55328
+ };
55329
+ var normalizeNoProxyHost = (hostname) => {
55330
+ if (!hostname) {
55331
+ return hostname;
55332
+ }
55333
+ if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
55334
+ hostname = hostname.slice(1, -1);
55335
+ }
55336
+ return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
55337
+ };
55338
+ function shouldBypassProxy(location) {
55339
+ let parsed;
55340
+ try {
55341
+ parsed = new URL(location);
55342
+ } catch (_err) {
55343
+ return false;
55344
+ }
55345
+ const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").toLowerCase();
55346
+ if (!noProxy) {
55347
+ return false;
55348
+ }
55349
+ if (noProxy === "*") {
55350
+ return true;
55351
+ }
55352
+ const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
55353
+ const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
55354
+ return noProxy.split(/[\s,]+/).some((entry) => {
55355
+ if (!entry) {
55356
+ return false;
55357
+ }
55358
+ let [entryHost, entryPort] = parseNoProxyEntry(entry);
55359
+ entryHost = normalizeNoProxyHost(entryHost);
55360
+ if (!entryHost) {
55361
+ return false;
55362
+ }
55363
+ if (entryPort && entryPort !== port) {
55364
+ return false;
55365
+ }
55366
+ if (entryHost.charAt(0) === "*") {
55367
+ entryHost = entryHost.slice(1);
55368
+ }
55369
+ if (entryHost.charAt(0) === ".") {
55370
+ return hostname.endsWith(entryHost);
55371
+ }
55372
+ return hostname === entryHost || isLoopback(hostname) && isLoopback(entryHost);
55373
+ });
55374
+ }
55375
+
55056
55376
  // ../../../node_modules/axios/lib/helpers/speedometer.js
55057
55377
  function speedometer(samplesCount, min) {
55058
55378
  samplesCount = samplesCount || 10;
@@ -55129,19 +55449,19 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
55129
55449
  let bytesNotified = 0;
55130
55450
  const _speedometer = speedometer_default(50, 250);
55131
55451
  return throttle_default((e) => {
55132
- const loaded = e.loaded;
55452
+ const rawLoaded = e.loaded;
55133
55453
  const total = e.lengthComputable ? e.total : void 0;
55134
- const progressBytes = loaded - bytesNotified;
55454
+ const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
55455
+ const progressBytes = Math.max(0, loaded - bytesNotified);
55135
55456
  const rate = _speedometer(progressBytes);
55136
- const inRange = loaded <= total;
55137
- bytesNotified = loaded;
55457
+ bytesNotified = Math.max(bytesNotified, loaded);
55138
55458
  const data = {
55139
55459
  loaded,
55140
55460
  total,
55141
55461
  progress: total ? loaded / total : void 0,
55142
55462
  bytes: progressBytes,
55143
55463
  rate: rate ? rate : void 0,
55144
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
55464
+ estimated: rate && total ? (total - loaded) / rate : void 0,
55145
55465
  event: e,
55146
55466
  lengthComputable: total != null,
55147
55467
  [isDownloadStream ? "download" : "upload"]: true
@@ -55151,11 +55471,14 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
55151
55471
  };
55152
55472
  var progressEventDecorator = (total, throttled) => {
55153
55473
  const lengthComputable = total != null;
55154
- return [(loaded) => throttled[0]({
55155
- lengthComputable,
55156
- total,
55157
- loaded
55158
- }), throttled[1]];
55474
+ return [
55475
+ (loaded) => throttled[0]({
55476
+ lengthComputable,
55477
+ total,
55478
+ loaded
55479
+ }),
55480
+ throttled[1]
55481
+ ];
55159
55482
  };
55160
55483
  var asyncDecorator = (fn2) => (...args) => utils_default.asap(() => fn2(...args));
55161
55484
 
@@ -55204,10 +55527,32 @@ function estimateDataURLDecodedBytes(url2) {
55204
55527
  }
55205
55528
  }
55206
55529
  const groups = Math.floor(effectiveLen / 4);
55207
- const bytes = groups * 3 - (pad || 0);
55208
- return bytes > 0 ? bytes : 0;
55530
+ const bytes2 = groups * 3 - (pad || 0);
55531
+ return bytes2 > 0 ? bytes2 : 0;
55532
+ }
55533
+ if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
55534
+ return Buffer.byteLength(body, "utf8");
55209
55535
  }
55210
- return Buffer.byteLength(body, "utf8");
55536
+ let bytes = 0;
55537
+ for (let i = 0, len = body.length; i < len; i++) {
55538
+ const c = body.charCodeAt(i);
55539
+ if (c < 128) {
55540
+ bytes += 1;
55541
+ } else if (c < 2048) {
55542
+ bytes += 2;
55543
+ } else if (c >= 55296 && c <= 56319 && i + 1 < len) {
55544
+ const next = body.charCodeAt(i + 1);
55545
+ if (next >= 56320 && next <= 57343) {
55546
+ bytes += 4;
55547
+ i++;
55548
+ } else {
55549
+ bytes += 3;
55550
+ }
55551
+ } else {
55552
+ bytes += 3;
55553
+ }
55554
+ }
55555
+ return bytes;
55211
55556
  }
55212
55557
 
55213
55558
  // ../../../node_modules/axios/lib/adapters/http.js
@@ -55222,9 +55567,33 @@ var brotliOptions = {
55222
55567
  var isBrotliSupported = utils_default.isFunction(import_zlib2.default.createBrotliDecompress);
55223
55568
  var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
55224
55569
  var isHttps = /https:?/;
55570
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
55571
+ function setFormDataHeaders(headers, formHeaders, policy) {
55572
+ if (policy !== "content-only") {
55573
+ headers.set(formHeaders);
55574
+ return;
55575
+ }
55576
+ Object.entries(formHeaders).forEach(([key, val]) => {
55577
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
55578
+ headers.set(key, val);
55579
+ }
55580
+ });
55581
+ }
55582
+ var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
55583
+ var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
55225
55584
  var supportedProtocols = platform_default.protocols.map((protocol) => {
55226
55585
  return protocol + ":";
55227
55586
  });
55587
+ var decodeURIComponentSafe = (value) => {
55588
+ if (!utils_default.isString(value)) {
55589
+ return value;
55590
+ }
55591
+ try {
55592
+ return decodeURIComponent(value);
55593
+ } catch (error) {
55594
+ return value;
55595
+ }
55596
+ };
55228
55597
  var flushOnFinish = (stream5, [throttled, flush]) => {
55229
55598
  stream5.on("end", flush).on("error", flush);
55230
55599
  return throttled;
@@ -55234,9 +55603,12 @@ var Http2Sessions = class {
55234
55603
  this.sessions = /* @__PURE__ */ Object.create(null);
55235
55604
  }
55236
55605
  getSession(authority, options) {
55237
- options = Object.assign({
55238
- sessionTimeout: 1e3
55239
- }, options);
55606
+ options = Object.assign(
55607
+ {
55608
+ sessionTimeout: 1e3
55609
+ },
55610
+ options
55611
+ );
55240
55612
  let authoritySessions = this.sessions[authority];
55241
55613
  if (authoritySessions) {
55242
55614
  let len = authoritySessions.length;
@@ -55262,6 +55634,9 @@ var Http2Sessions = class {
55262
55634
  } else {
55263
55635
  entries.splice(i, 1);
55264
55636
  }
55637
+ if (!session.closed) {
55638
+ session.close();
55639
+ }
55265
55640
  return;
55266
55641
  }
55267
55642
  }
@@ -55290,54 +55665,81 @@ var Http2Sessions = class {
55290
55665
  };
55291
55666
  }
55292
55667
  session.once("close", removeSession);
55293
- let entry = [
55294
- session,
55295
- options
55296
- ];
55668
+ let entry = [session, options];
55297
55669
  authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
55298
55670
  return session;
55299
55671
  }
55300
55672
  };
55301
55673
  var http2Sessions = new Http2Sessions();
55302
- function dispatchBeforeRedirect(options, responseDetails) {
55674
+ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
55303
55675
  if (options.beforeRedirects.proxy) {
55304
55676
  options.beforeRedirects.proxy(options);
55305
55677
  }
55306
55678
  if (options.beforeRedirects.config) {
55307
- options.beforeRedirects.config(options, responseDetails);
55679
+ options.beforeRedirects.config(options, responseDetails, requestDetails);
55308
55680
  }
55309
55681
  }
55310
- function setProxy(options, configProxy, location) {
55682
+ function setProxy(options, configProxy, location, isRedirect) {
55311
55683
  let proxy = configProxy;
55312
55684
  if (!proxy && proxy !== false) {
55313
- const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location);
55685
+ const proxyUrl = getProxyForUrl(location);
55314
55686
  if (proxyUrl) {
55315
- proxy = new URL(proxyUrl);
55687
+ if (!shouldBypassProxy(location)) {
55688
+ proxy = new URL(proxyUrl);
55689
+ }
55690
+ }
55691
+ }
55692
+ if (isRedirect && options.headers) {
55693
+ for (const name of Object.keys(options.headers)) {
55694
+ if (name.toLowerCase() === "proxy-authorization") {
55695
+ delete options.headers[name];
55696
+ }
55316
55697
  }
55317
55698
  }
55318
55699
  if (proxy) {
55319
- if (proxy.username) {
55320
- proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
55700
+ const isProxyURL = proxy instanceof URL;
55701
+ const readProxyField = (key) => isProxyURL || utils_default.hasOwnProp(proxy, key) ? proxy[key] : void 0;
55702
+ const proxyUsername = readProxyField("username");
55703
+ const proxyPassword = readProxyField("password");
55704
+ let proxyAuth = utils_default.hasOwnProp(proxy, "auth") ? proxy.auth : void 0;
55705
+ if (proxyUsername) {
55706
+ proxyAuth = (proxyUsername || "") + ":" + (proxyPassword || "");
55707
+ }
55708
+ if (proxyAuth) {
55709
+ const authIsObject = typeof proxyAuth === "object";
55710
+ const authUsername = authIsObject && utils_default.hasOwnProp(proxyAuth, "username") ? proxyAuth.username : void 0;
55711
+ const authPassword = authIsObject && utils_default.hasOwnProp(proxyAuth, "password") ? proxyAuth.password : void 0;
55712
+ const validProxyAuth = Boolean(authUsername || authPassword);
55713
+ if (validProxyAuth) {
55714
+ proxyAuth = (authUsername || "") + ":" + (authPassword || "");
55715
+ } else if (authIsObject) {
55716
+ throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy });
55717
+ }
55718
+ const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
55719
+ options.headers["Proxy-Authorization"] = "Basic " + base64;
55321
55720
  }
55322
- if (proxy.auth) {
55323
- if (proxy.auth.username || proxy.auth.password) {
55324
- proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
55721
+ let hasUserHostHeader = false;
55722
+ for (const name of Object.keys(options.headers)) {
55723
+ if (name.toLowerCase() === "host") {
55724
+ hasUserHostHeader = true;
55725
+ break;
55325
55726
  }
55326
- const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
55327
- options.headers["Proxy-Authorization"] = "Basic " + base64;
55328
55727
  }
55329
- options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
55330
- const proxyHost = proxy.hostname || proxy.host;
55728
+ if (!hasUserHostHeader) {
55729
+ options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
55730
+ }
55731
+ const proxyHost = readProxyField("hostname") || readProxyField("host");
55331
55732
  options.hostname = proxyHost;
55332
55733
  options.host = proxyHost;
55333
- options.port = proxy.port;
55734
+ options.port = readProxyField("port");
55334
55735
  options.path = location;
55335
- if (proxy.protocol) {
55336
- options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
55736
+ const proxyProtocol = readProxyField("protocol");
55737
+ if (proxyProtocol) {
55738
+ options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
55337
55739
  }
55338
55740
  }
55339
55741
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
55340
- setProxy(redirectOptions, configProxy, redirectOptions.href);
55742
+ setProxy(redirectOptions, configProxy, redirectOptions.href, true);
55341
55743
  };
55342
55744
  }
55343
55745
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
@@ -55373,15 +55775,10 @@ var resolveFamily = ({ address, family }) => {
55373
55775
  var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
55374
55776
  var http2Transport = {
55375
55777
  request(options, cb) {
55376
- const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
55778
+ const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
55377
55779
  const { http2Options, headers } = options;
55378
55780
  const session = http2Sessions.getSession(authority, http2Options);
55379
- const {
55380
- HTTP2_HEADER_SCHEME,
55381
- HTTP2_HEADER_METHOD,
55382
- HTTP2_HEADER_PATH,
55383
- HTTP2_HEADER_STATUS
55384
- } = import_http2.default.constants;
55781
+ const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = import_http2.default.constants;
55385
55782
  const http2Headers = {
55386
55783
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
55387
55784
  [HTTP2_HEADER_METHOD]: options.method,
@@ -55405,12 +55802,20 @@ var http2Transport = {
55405
55802
  };
55406
55803
  var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55407
55804
  return wrapAsync(async function dispatchHttpRequest(resolve6, reject, onDone) {
55408
- let { data, lookup, family, httpVersion = 1, http2Options } = config;
55409
- const { responseType, responseEncoding } = config;
55805
+ const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
55806
+ let data = own2("data");
55807
+ let lookup = own2("lookup");
55808
+ let family = own2("family");
55809
+ let httpVersion = own2("httpVersion");
55810
+ if (httpVersion === void 0) httpVersion = 1;
55811
+ let http2Options = own2("http2Options");
55812
+ const responseType = own2("responseType");
55813
+ const responseEncoding = own2("responseEncoding");
55410
55814
  const method = config.method.toUpperCase();
55411
55815
  let isDone;
55412
55816
  let rejected = false;
55413
55817
  let req;
55818
+ let connectPhaseTimer;
55414
55819
  httpVersion = +httpVersion;
55415
55820
  if (Number.isNaN(httpVersion)) {
55416
55821
  throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
@@ -55434,13 +55839,36 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55434
55839
  const abortEmitter = new import_events3.EventEmitter();
55435
55840
  function abort(reason) {
55436
55841
  try {
55437
- abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
55842
+ abortEmitter.emit(
55843
+ "abort",
55844
+ !reason || reason.type ? new CanceledError_default(null, config, req) : reason
55845
+ );
55438
55846
  } catch (err) {
55439
55847
  console.warn("emit error", err);
55440
55848
  }
55441
55849
  }
55850
+ function clearConnectPhaseTimer() {
55851
+ if (connectPhaseTimer) {
55852
+ clearTimeout(connectPhaseTimer);
55853
+ connectPhaseTimer = null;
55854
+ }
55855
+ }
55856
+ function createTimeoutError() {
55857
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
55858
+ const transitional2 = config.transitional || transitional_default;
55859
+ if (config.timeoutErrorMessage) {
55860
+ timeoutErrorMessage = config.timeoutErrorMessage;
55861
+ }
55862
+ return new AxiosError_default(
55863
+ timeoutErrorMessage,
55864
+ transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
55865
+ config,
55866
+ req
55867
+ );
55868
+ }
55442
55869
  abortEmitter.once("abort", reject);
55443
55870
  const onFinished = () => {
55871
+ clearConnectPhaseTimer();
55444
55872
  if (config.cancelToken) {
55445
55873
  config.cancelToken.unsubscribe(abort);
55446
55874
  }
@@ -55457,6 +55885,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55457
55885
  }
55458
55886
  onDone((response, isRejected) => {
55459
55887
  isDone = true;
55888
+ clearConnectPhaseTimer();
55460
55889
  if (isRejected) {
55461
55890
  rejected = true;
55462
55891
  onFinished();
@@ -55480,11 +55909,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55480
55909
  const dataUrl = String(config.url || fullPath || "");
55481
55910
  const estimated = estimateDataURLDecodedBytes(dataUrl);
55482
55911
  if (estimated > config.maxContentLength) {
55483
- return reject(new AxiosError_default(
55484
- "maxContentLength size of " + config.maxContentLength + " exceeded",
55485
- AxiosError_default.ERR_BAD_RESPONSE,
55486
- config
55487
- ));
55912
+ return reject(
55913
+ new AxiosError_default(
55914
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
55915
+ AxiosError_default.ERR_BAD_RESPONSE,
55916
+ config
55917
+ )
55918
+ );
55488
55919
  }
55489
55920
  }
55490
55921
  let convertedData;
@@ -55520,11 +55951,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55520
55951
  });
55521
55952
  }
55522
55953
  if (supportedProtocols.indexOf(protocol) === -1) {
55523
- return reject(new AxiosError_default(
55524
- "Unsupported protocol " + protocol,
55525
- AxiosError_default.ERR_BAD_REQUEST,
55526
- config
55527
- ));
55954
+ return reject(
55955
+ new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config)
55956
+ );
55528
55957
  }
55529
55958
  const headers = AxiosHeaders_default.from(config.headers).normalize();
55530
55959
  headers.set("User-Agent", "axios/" + VERSION, false);
@@ -55534,14 +55963,18 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55534
55963
  let maxDownloadRate = void 0;
55535
55964
  if (utils_default.isSpecCompliantForm(data)) {
55536
55965
  const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
55537
- data = formDataToStream_default(data, (formHeaders) => {
55538
- headers.set(formHeaders);
55539
- }, {
55540
- tag: `axios-${VERSION}-boundary`,
55541
- boundary: userBoundary && userBoundary[1] || void 0
55542
- });
55543
- } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
55544
- headers.set(data.getHeaders());
55966
+ data = formDataToStream_default(
55967
+ data,
55968
+ (formHeaders) => {
55969
+ headers.set(formHeaders);
55970
+ },
55971
+ {
55972
+ tag: `axios-${VERSION}-boundary`,
55973
+ boundary: userBoundary && userBoundary[1] || void 0
55974
+ }
55975
+ );
55976
+ } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
55977
+ setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
55545
55978
  if (!headers.hasContentLength()) {
55546
55979
  try {
55547
55980
  const knownLength = await import_util2.default.promisify(data.getLength).call(data);
@@ -55560,19 +55993,23 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55560
55993
  } else if (utils_default.isString(data)) {
55561
55994
  data = Buffer.from(data, "utf-8");
55562
55995
  } else {
55563
- return reject(new AxiosError_default(
55564
- "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
55565
- AxiosError_default.ERR_BAD_REQUEST,
55566
- config
55567
- ));
55996
+ return reject(
55997
+ new AxiosError_default(
55998
+ "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
55999
+ AxiosError_default.ERR_BAD_REQUEST,
56000
+ config
56001
+ )
56002
+ );
55568
56003
  }
55569
56004
  headers.setContentLength(data.length, false);
55570
56005
  if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
55571
- return reject(new AxiosError_default(
55572
- "Request body larger than maxBodyLength limit",
55573
- AxiosError_default.ERR_BAD_REQUEST,
55574
- config
55575
- ));
56006
+ return reject(
56007
+ new AxiosError_default(
56008
+ "Request body larger than maxBodyLength limit",
56009
+ AxiosError_default.ERR_BAD_REQUEST,
56010
+ config
56011
+ )
56012
+ );
55576
56013
  }
55577
56014
  }
55578
56015
  const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
@@ -55586,26 +56023,36 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55586
56023
  if (!utils_default.isStream(data)) {
55587
56024
  data = import_stream4.default.Readable.from(data, { objectMode: false });
55588
56025
  }
55589
- data = import_stream4.default.pipeline([data, new AxiosTransformStream_default({
55590
- maxRate: utils_default.toFiniteNumber(maxUploadRate)
55591
- })], utils_default.noop);
55592
- onUploadProgress && data.on("progress", flushOnFinish(
55593
- data,
55594
- progressEventDecorator(
55595
- contentLength,
55596
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
56026
+ data = import_stream4.default.pipeline(
56027
+ [
56028
+ data,
56029
+ new AxiosTransformStream_default({
56030
+ maxRate: utils_default.toFiniteNumber(maxUploadRate)
56031
+ })
56032
+ ],
56033
+ utils_default.noop
56034
+ );
56035
+ onUploadProgress && data.on(
56036
+ "progress",
56037
+ flushOnFinish(
56038
+ data,
56039
+ progressEventDecorator(
56040
+ contentLength,
56041
+ progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
56042
+ )
55597
56043
  )
55598
- ));
56044
+ );
55599
56045
  }
55600
56046
  let auth = void 0;
55601
- if (config.auth) {
55602
- const username = config.auth.username || "";
55603
- const password = config.auth.password || "";
56047
+ const configAuth = own2("auth");
56048
+ if (configAuth) {
56049
+ const username = configAuth.username || "";
56050
+ const password = configAuth.password || "";
55604
56051
  auth = username + ":" + password;
55605
56052
  }
55606
56053
  if (!auth && parsed.username) {
55607
- const urlUsername = parsed.username;
55608
- const urlPassword = parsed.password;
56054
+ const urlUsername = decodeURIComponentSafe(parsed.username);
56055
+ const urlPassword = decodeURIComponentSafe(parsed.password);
55609
56056
  auth = urlUsername + ":" + urlPassword;
55610
56057
  }
55611
56058
  auth && headers.delete("authorization");
@@ -55628,7 +56075,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55628
56075
  "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""),
55629
56076
  false
55630
56077
  );
55631
- const options = {
56078
+ const options = Object.assign(/* @__PURE__ */ Object.create(null), {
55632
56079
  path: path3,
55633
56080
  method,
55634
56081
  headers: headers.toJSON(),
@@ -55637,33 +56084,62 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55637
56084
  protocol,
55638
56085
  family,
55639
56086
  beforeRedirect: dispatchBeforeRedirect,
55640
- beforeRedirects: {},
56087
+ beforeRedirects: /* @__PURE__ */ Object.create(null),
55641
56088
  http2Options
55642
- };
56089
+ });
55643
56090
  !utils_default.isUndefined(lookup) && (options.lookup = lookup);
55644
56091
  if (config.socketPath) {
56092
+ if (typeof config.socketPath !== "string") {
56093
+ return reject(
56094
+ new AxiosError_default("socketPath must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE, config)
56095
+ );
56096
+ }
56097
+ if (config.allowedSocketPaths != null) {
56098
+ const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
56099
+ const resolvedSocket = (0, import_path4.resolve)(config.socketPath);
56100
+ const isAllowed = allowed.some(
56101
+ (entry) => typeof entry === "string" && (0, import_path4.resolve)(entry) === resolvedSocket
56102
+ );
56103
+ if (!isAllowed) {
56104
+ return reject(
56105
+ new AxiosError_default(
56106
+ `socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
56107
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
56108
+ config
56109
+ )
56110
+ );
56111
+ }
56112
+ }
55645
56113
  options.socketPath = config.socketPath;
55646
56114
  } else {
55647
56115
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
55648
56116
  options.port = parsed.port;
55649
- setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
56117
+ setProxy(
56118
+ options,
56119
+ config.proxy,
56120
+ protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path
56121
+ );
55650
56122
  }
55651
56123
  let transport;
56124
+ let isNativeTransport = false;
55652
56125
  const isHttpsRequest = isHttps.test(options.protocol);
55653
56126
  options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
55654
56127
  if (isHttp2) {
55655
56128
  transport = http2Transport;
55656
56129
  } else {
55657
- if (config.transport) {
55658
- transport = config.transport;
56130
+ const configTransport = own2("transport");
56131
+ if (configTransport) {
56132
+ transport = configTransport;
55659
56133
  } else if (config.maxRedirects === 0) {
55660
56134
  transport = isHttpsRequest ? import_https.default : import_http.default;
56135
+ isNativeTransport = true;
55661
56136
  } else {
55662
56137
  if (config.maxRedirects) {
55663
56138
  options.maxRedirects = config.maxRedirects;
55664
56139
  }
55665
- if (config.beforeRedirect) {
55666
- options.beforeRedirects.config = config.beforeRedirect;
56140
+ const configBeforeRedirect = own2("beforeRedirect");
56141
+ if (configBeforeRedirect) {
56142
+ options.beforeRedirects.config = configBeforeRedirect;
55667
56143
  }
55668
56144
  transport = isHttpsRequest ? httpsFollow : httpFollow;
55669
56145
  }
@@ -55673,10 +56149,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55673
56149
  } else {
55674
56150
  options.maxBodyLength = Infinity;
55675
56151
  }
55676
- if (config.insecureHTTPParser) {
55677
- options.insecureHTTPParser = config.insecureHTTPParser;
55678
- }
56152
+ options.insecureHTTPParser = Boolean(own2("insecureHTTPParser"));
55679
56153
  req = transport.request(options, function handleResponse(res) {
56154
+ clearConnectPhaseTimer();
55680
56155
  if (req.destroyed) return;
55681
56156
  const streams = [res];
55682
56157
  const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]);
@@ -55684,13 +56159,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55684
56159
  const transformStream = new AxiosTransformStream_default({
55685
56160
  maxRate: utils_default.toFiniteNumber(maxDownloadRate)
55686
56161
  });
55687
- onDownloadProgress && transformStream.on("progress", flushOnFinish(
55688
- transformStream,
55689
- progressEventDecorator(
55690
- responseLength,
55691
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
56162
+ onDownloadProgress && transformStream.on(
56163
+ "progress",
56164
+ flushOnFinish(
56165
+ transformStream,
56166
+ progressEventDecorator(
56167
+ responseLength,
56168
+ progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
56169
+ )
55692
56170
  )
55693
- ));
56171
+ );
55694
56172
  streams.push(transformStream);
55695
56173
  }
55696
56174
  let responseStream = res;
@@ -55729,6 +56207,28 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55729
56207
  request: lastRequest
55730
56208
  };
55731
56209
  if (responseType === "stream") {
56210
+ if (config.maxContentLength > -1) {
56211
+ const limit = config.maxContentLength;
56212
+ const source = responseStream;
56213
+ async function* enforceMaxContentLength() {
56214
+ let totalResponseBytes = 0;
56215
+ for await (const chunk of source) {
56216
+ totalResponseBytes += chunk.length;
56217
+ if (totalResponseBytes > limit) {
56218
+ throw new AxiosError_default(
56219
+ "maxContentLength size of " + limit + " exceeded",
56220
+ AxiosError_default.ERR_BAD_RESPONSE,
56221
+ config,
56222
+ lastRequest
56223
+ );
56224
+ }
56225
+ yield chunk;
56226
+ }
56227
+ }
56228
+ responseStream = import_stream4.default.Readable.from(enforceMaxContentLength(), {
56229
+ objectMode: false
56230
+ });
56231
+ }
55732
56232
  response.data = responseStream;
55733
56233
  settle(resolve6, reject, response);
55734
56234
  } else {
@@ -55740,12 +56240,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55740
56240
  if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
55741
56241
  rejected = true;
55742
56242
  responseStream.destroy();
55743
- abort(new AxiosError_default(
55744
- "maxContentLength size of " + config.maxContentLength + " exceeded",
55745
- AxiosError_default.ERR_BAD_RESPONSE,
55746
- config,
55747
- lastRequest
55748
- ));
56243
+ abort(
56244
+ new AxiosError_default(
56245
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
56246
+ AxiosError_default.ERR_BAD_RESPONSE,
56247
+ config,
56248
+ lastRequest
56249
+ )
56250
+ );
55749
56251
  }
55750
56252
  });
55751
56253
  responseStream.on("aborted", function handlerStreamAborted() {
@@ -55756,14 +56258,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55756
56258
  "stream has been aborted",
55757
56259
  AxiosError_default.ERR_BAD_RESPONSE,
55758
56260
  config,
55759
- lastRequest
56261
+ lastRequest,
56262
+ response
55760
56263
  );
55761
56264
  responseStream.destroy(err);
55762
56265
  reject(err);
55763
56266
  });
55764
56267
  responseStream.on("error", function handleStreamError(err) {
55765
- if (req.destroyed) return;
55766
- reject(AxiosError_default.from(err, null, config, lastRequest));
56268
+ if (rejected) return;
56269
+ reject(AxiosError_default.from(err, null, config, lastRequest, response));
55767
56270
  });
55768
56271
  responseStream.on("end", function handleStreamEnd() {
55769
56272
  try {
@@ -55798,34 +56301,51 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55798
56301
  req.on("error", function handleRequestError(err) {
55799
56302
  reject(AxiosError_default.from(err, null, config, req));
55800
56303
  });
56304
+ const boundSockets = /* @__PURE__ */ new Set();
55801
56305
  req.on("socket", function handleRequestSocket(socket) {
55802
56306
  socket.setKeepAlive(true, 1e3 * 60);
56307
+ if (!socket[kAxiosSocketListener]) {
56308
+ socket.on("error", function handleSocketError(err) {
56309
+ const current = socket[kAxiosCurrentReq];
56310
+ if (current && !current.destroyed) {
56311
+ current.destroy(err);
56312
+ }
56313
+ });
56314
+ socket[kAxiosSocketListener] = true;
56315
+ }
56316
+ socket[kAxiosCurrentReq] = req;
56317
+ boundSockets.add(socket);
56318
+ });
56319
+ req.once("close", function clearCurrentReq() {
56320
+ clearConnectPhaseTimer();
56321
+ for (const socket of boundSockets) {
56322
+ if (socket[kAxiosCurrentReq] === req) {
56323
+ socket[kAxiosCurrentReq] = null;
56324
+ }
56325
+ }
56326
+ boundSockets.clear();
55803
56327
  });
55804
56328
  if (config.timeout) {
55805
56329
  const timeout2 = parseInt(config.timeout, 10);
55806
56330
  if (Number.isNaN(timeout2)) {
55807
- abort(new AxiosError_default(
55808
- "error trying to parse `config.timeout` to int",
55809
- AxiosError_default.ERR_BAD_OPTION_VALUE,
55810
- config,
55811
- req
55812
- ));
56331
+ abort(
56332
+ new AxiosError_default(
56333
+ "error trying to parse `config.timeout` to int",
56334
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
56335
+ config,
56336
+ req
56337
+ )
56338
+ );
55813
56339
  return;
55814
56340
  }
55815
- req.setTimeout(timeout2, function handleRequestTimeout() {
56341
+ const handleTimeout = function handleTimeout2() {
55816
56342
  if (isDone) return;
55817
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
55818
- const transitional2 = config.transitional || transitional_default;
55819
- if (config.timeoutErrorMessage) {
55820
- timeoutErrorMessage = config.timeoutErrorMessage;
55821
- }
55822
- abort(new AxiosError_default(
55823
- timeoutErrorMessage,
55824
- transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
55825
- config,
55826
- req
55827
- ));
55828
- });
56343
+ abort(createTimeoutError());
56344
+ };
56345
+ if (isNativeTransport && timeout2 > 0) {
56346
+ connectPhaseTimer = setTimeout(handleTimeout, timeout2);
56347
+ }
56348
+ req.setTimeout(timeout2, handleTimeout);
55829
56349
  } else {
55830
56350
  req.setTimeout(0);
55831
56351
  }
@@ -55844,7 +56364,37 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
55844
56364
  abort(new CanceledError_default("Request stream has been aborted", config, req));
55845
56365
  }
55846
56366
  });
55847
- data.pipe(req);
56367
+ let uploadStream = data;
56368
+ if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
56369
+ const limit = config.maxBodyLength;
56370
+ let bytesSent = 0;
56371
+ uploadStream = import_stream4.default.pipeline(
56372
+ [
56373
+ data,
56374
+ new import_stream4.default.Transform({
56375
+ transform(chunk, _enc, cb) {
56376
+ bytesSent += chunk.length;
56377
+ if (bytesSent > limit) {
56378
+ return cb(
56379
+ new AxiosError_default(
56380
+ "Request body larger than maxBodyLength limit",
56381
+ AxiosError_default.ERR_BAD_REQUEST,
56382
+ config,
56383
+ req
56384
+ )
56385
+ );
56386
+ }
56387
+ cb(null, chunk);
56388
+ }
56389
+ })
56390
+ ],
56391
+ utils_default.noop
56392
+ );
56393
+ uploadStream.on("error", (err) => {
56394
+ if (!req.destroyed) req.destroy(err);
56395
+ });
56396
+ }
56397
+ uploadStream.pipe(req);
55848
56398
  } else {
55849
56399
  data && req.write(data);
55850
56400
  req.end();
@@ -55887,8 +56437,15 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
55887
56437
  },
55888
56438
  read(name) {
55889
56439
  if (typeof document === "undefined") return null;
55890
- const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
55891
- return match2 ? decodeURIComponent(match2[1]) : null;
56440
+ const cookies = document.cookie.split(";");
56441
+ for (let i = 0; i < cookies.length; i++) {
56442
+ const cookie = cookies[i].replace(/^\s+/, "");
56443
+ const eq = cookie.indexOf("=");
56444
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
56445
+ return decodeURIComponent(cookie.slice(eq + 1));
56446
+ }
56447
+ }
56448
+ return null;
55892
56449
  },
55893
56450
  remove(name) {
55894
56451
  this.write(name, "", Date.now() - 864e5, "/");
@@ -55911,7 +56468,16 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
55911
56468
  var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
55912
56469
  function mergeConfig(config1, config2) {
55913
56470
  config2 = config2 || {};
55914
- const config = {};
56471
+ const config = /* @__PURE__ */ Object.create(null);
56472
+ Object.defineProperty(config, "hasOwnProperty", {
56473
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
56474
+ // this data descriptor into an accessor descriptor on the way in.
56475
+ __proto__: null,
56476
+ value: Object.prototype.hasOwnProperty,
56477
+ enumerable: false,
56478
+ writable: true,
56479
+ configurable: true
56480
+ });
55915
56481
  function getMergedValue(target, source, prop, caseless) {
55916
56482
  if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
55917
56483
  return utils_default.merge.call({ caseless }, target, source);
@@ -55942,9 +56508,9 @@ function mergeConfig(config1, config2) {
55942
56508
  }
55943
56509
  }
55944
56510
  function mergeDirectKeys(a, b2, prop) {
55945
- if (prop in config2) {
56511
+ if (utils_default.hasOwnProp(config2, prop)) {
55946
56512
  return getMergedValue(a, b2);
55947
- } else if (prop in config1) {
56513
+ } else if (utils_default.hasOwnProp(config1, prop)) {
55948
56514
  return getMergedValue(void 0, a);
55949
56515
  }
55950
56516
  }
@@ -55975,46 +56541,76 @@ function mergeConfig(config1, config2) {
55975
56541
  httpsAgent: defaultToConfig2,
55976
56542
  cancelToken: defaultToConfig2,
55977
56543
  socketPath: defaultToConfig2,
56544
+ allowedSocketPaths: defaultToConfig2,
55978
56545
  responseEncoding: defaultToConfig2,
55979
56546
  validateStatus: mergeDirectKeys,
55980
56547
  headers: (a, b2, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b2), prop, true)
55981
56548
  };
55982
56549
  utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
55983
- const merge2 = mergeMap[prop] || mergeDeepProperties;
55984
- const configValue = merge2(config1[prop], config2[prop], prop);
56550
+ if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
56551
+ const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
56552
+ const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
56553
+ const b2 = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0;
56554
+ const configValue = merge2(a, b2, prop);
55985
56555
  utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
55986
56556
  });
55987
56557
  return config;
55988
56558
  }
55989
56559
 
55990
56560
  // ../../../node_modules/axios/lib/helpers/resolveConfig.js
56561
+ var FORM_DATA_CONTENT_HEADERS2 = ["content-type", "content-length"];
56562
+ function setFormDataHeaders2(headers, formHeaders, policy) {
56563
+ if (policy !== "content-only") {
56564
+ headers.set(formHeaders);
56565
+ return;
56566
+ }
56567
+ Object.entries(formHeaders).forEach(([key, val]) => {
56568
+ if (FORM_DATA_CONTENT_HEADERS2.includes(key.toLowerCase())) {
56569
+ headers.set(key, val);
56570
+ }
56571
+ });
56572
+ }
56573
+ var encodeUTF8 = (str) => encodeURIComponent(str).replace(
56574
+ /%([0-9A-F]{2})/gi,
56575
+ (_3, hex) => String.fromCharCode(parseInt(hex, 16))
56576
+ );
55991
56577
  var resolveConfig_default = (config) => {
55992
56578
  const newConfig = mergeConfig({}, config);
55993
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
56579
+ const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
56580
+ const data = own2("data");
56581
+ let withXSRFToken = own2("withXSRFToken");
56582
+ const xsrfHeaderName = own2("xsrfHeaderName");
56583
+ const xsrfCookieName = own2("xsrfCookieName");
56584
+ let headers = own2("headers");
56585
+ const auth = own2("auth");
56586
+ const baseURL = own2("baseURL");
56587
+ const allowAbsoluteUrls = own2("allowAbsoluteUrls");
56588
+ const url2 = own2("url");
55994
56589
  newConfig.headers = headers = AxiosHeaders_default.from(headers);
55995
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
56590
+ newConfig.url = buildURL(
56591
+ buildFullPath(baseURL, url2, allowAbsoluteUrls),
56592
+ config.params,
56593
+ config.paramsSerializer
56594
+ );
55996
56595
  if (auth) {
55997
56596
  headers.set(
55998
56597
  "Authorization",
55999
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
56598
+ "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : ""))
56000
56599
  );
56001
56600
  }
56002
56601
  if (utils_default.isFormData(data)) {
56003
56602
  if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
56004
56603
  headers.setContentType(void 0);
56005
56604
  } else if (utils_default.isFunction(data.getHeaders)) {
56006
- const formHeaders = data.getHeaders();
56007
- const allowedHeaders = ["content-type", "content-length"];
56008
- Object.entries(formHeaders).forEach(([key, val]) => {
56009
- if (allowedHeaders.includes(key.toLowerCase())) {
56010
- headers.set(key, val);
56011
- }
56012
- });
56605
+ setFormDataHeaders2(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
56013
56606
  }
56014
56607
  }
56015
56608
  if (platform_default.hasStandardBrowserEnv) {
56016
- withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
56017
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
56609
+ if (utils_default.isFunction(withXSRFToken)) {
56610
+ withXSRFToken = withXSRFToken(newConfig);
56611
+ }
56612
+ const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin_default(newConfig.url);
56613
+ if (shouldSendXSRF) {
56018
56614
  const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
56019
56615
  if (xsrfValue) {
56020
56616
  headers.set(xsrfHeaderName, xsrfValue);
@@ -56060,13 +56656,17 @@ var xhr_default = isXHRAdapterSupported && function(config) {
56060
56656
  config,
56061
56657
  request
56062
56658
  };
56063
- settle(function _resolve(value) {
56064
- resolve6(value);
56065
- done();
56066
- }, function _reject(err) {
56067
- reject(err);
56068
- done();
56069
- }, response);
56659
+ settle(
56660
+ function _resolve(value) {
56661
+ resolve6(value);
56662
+ done();
56663
+ },
56664
+ function _reject(err) {
56665
+ reject(err);
56666
+ done();
56667
+ },
56668
+ response
56669
+ );
56070
56670
  request = null;
56071
56671
  }
56072
56672
  if ("onloadend" in request) {
@@ -56076,7 +56676,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
56076
56676
  if (!request || request.readyState !== 4) {
56077
56677
  return;
56078
56678
  }
56079
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
56679
+ if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
56080
56680
  return;
56081
56681
  }
56082
56682
  setTimeout(onloadend);
@@ -56087,6 +56687,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
56087
56687
  return;
56088
56688
  }
56089
56689
  reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
56690
+ done();
56090
56691
  request = null;
56091
56692
  };
56092
56693
  request.onerror = function handleError(event) {
@@ -56094,6 +56695,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
56094
56695
  const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config, request);
56095
56696
  err.event = event || null;
56096
56697
  reject(err);
56698
+ done();
56097
56699
  request = null;
56098
56700
  };
56099
56701
  request.ontimeout = function handleTimeout() {
@@ -56102,12 +56704,15 @@ var xhr_default = isXHRAdapterSupported && function(config) {
56102
56704
  if (_config.timeoutErrorMessage) {
56103
56705
  timeoutErrorMessage = _config.timeoutErrorMessage;
56104
56706
  }
56105
- reject(new AxiosError_default(
56106
- timeoutErrorMessage,
56107
- transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
56108
- config,
56109
- request
56110
- ));
56707
+ reject(
56708
+ new AxiosError_default(
56709
+ timeoutErrorMessage,
56710
+ transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
56711
+ config,
56712
+ request
56713
+ )
56714
+ );
56715
+ done();
56111
56716
  request = null;
56112
56717
  };
56113
56718
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -56138,6 +56743,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
56138
56743
  }
56139
56744
  reject(!cancel || cancel.type ? new CanceledError_default(null, config, request) : cancel);
56140
56745
  request.abort();
56746
+ done();
56141
56747
  request = null;
56142
56748
  };
56143
56749
  _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
@@ -56146,8 +56752,14 @@ var xhr_default = isXHRAdapterSupported && function(config) {
56146
56752
  }
56147
56753
  }
56148
56754
  const protocol = parseProtocol(_config.url);
56149
- if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
56150
- reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
56755
+ if (protocol && !platform_default.protocols.includes(protocol)) {
56756
+ reject(
56757
+ new AxiosError_default(
56758
+ "Unsupported protocol " + protocol + ":",
56759
+ AxiosError_default.ERR_BAD_REQUEST,
56760
+ config
56761
+ )
56762
+ );
56151
56763
  return;
56152
56764
  }
56153
56765
  request.send(requestData || null);
@@ -56165,12 +56777,14 @@ var composeSignals = (signals3, timeout2) => {
56165
56777
  aborted = true;
56166
56778
  unsubscribe();
56167
56779
  const err = reason instanceof Error ? reason : this.reason;
56168
- controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
56780
+ controller.abort(
56781
+ err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)
56782
+ );
56169
56783
  }
56170
56784
  };
56171
56785
  let timer = timeout2 && setTimeout(() => {
56172
56786
  timer = null;
56173
- onabort(new AxiosError_default(`timeout ${timeout2} of ms exceeded`, AxiosError_default.ETIMEDOUT));
56787
+ onabort(new AxiosError_default(`timeout of ${timeout2}ms exceeded`, AxiosError_default.ETIMEDOUT));
56174
56788
  }, timeout2);
56175
56789
  const unsubscribe = () => {
56176
56790
  if (signals3) {
@@ -56238,46 +56852,41 @@ var trackStream = (stream5, chunkSize, onProgress, onFinish) => {
56238
56852
  onFinish && onFinish(e);
56239
56853
  }
56240
56854
  };
56241
- return new ReadableStream({
56242
- async pull(controller) {
56243
- try {
56244
- const { done: done2, value } = await iterator2.next();
56245
- if (done2) {
56246
- _onFinish();
56247
- controller.close();
56248
- return;
56249
- }
56250
- let len = value.byteLength;
56251
- if (onProgress) {
56252
- let loadedBytes = bytes += len;
56253
- onProgress(loadedBytes);
56855
+ return new ReadableStream(
56856
+ {
56857
+ async pull(controller) {
56858
+ try {
56859
+ const { done: done2, value } = await iterator2.next();
56860
+ if (done2) {
56861
+ _onFinish();
56862
+ controller.close();
56863
+ return;
56864
+ }
56865
+ let len = value.byteLength;
56866
+ if (onProgress) {
56867
+ let loadedBytes = bytes += len;
56868
+ onProgress(loadedBytes);
56869
+ }
56870
+ controller.enqueue(new Uint8Array(value));
56871
+ } catch (err) {
56872
+ _onFinish(err);
56873
+ throw err;
56254
56874
  }
56255
- controller.enqueue(new Uint8Array(value));
56256
- } catch (err) {
56257
- _onFinish(err);
56258
- throw err;
56875
+ },
56876
+ cancel(reason) {
56877
+ _onFinish(reason);
56878
+ return iterator2.return();
56259
56879
  }
56260
56880
  },
56261
- cancel(reason) {
56262
- _onFinish(reason);
56263
- return iterator2.return();
56881
+ {
56882
+ highWaterMark: 2
56264
56883
  }
56265
- }, {
56266
- highWaterMark: 2
56267
- });
56884
+ );
56268
56885
  };
56269
56886
 
56270
56887
  // ../../../node_modules/axios/lib/adapters/fetch.js
56271
56888
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
56272
56889
  var { isFunction: isFunction2 } = utils_default;
56273
- var globalFetchAPI = (({ Request, Response }) => ({
56274
- Request,
56275
- Response
56276
- }))(utils_default.global);
56277
- var {
56278
- ReadableStream: ReadableStream2,
56279
- TextEncoder: TextEncoder2
56280
- } = utils_default.global;
56281
56890
  var test = (fn2, ...args) => {
56282
56891
  try {
56283
56892
  return !!fn2(...args);
@@ -56286,9 +56895,18 @@ var test = (fn2, ...args) => {
56286
56895
  }
56287
56896
  };
56288
56897
  var factory = (env4) => {
56289
- env4 = utils_default.merge.call({
56290
- skipUndefined: true
56291
- }, globalFetchAPI, env4);
56898
+ const globalObject = utils_default.global ?? globalThis;
56899
+ const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
56900
+ env4 = utils_default.merge.call(
56901
+ {
56902
+ skipUndefined: true
56903
+ },
56904
+ {
56905
+ Request: globalObject.Request,
56906
+ Response: globalObject.Response
56907
+ },
56908
+ env4
56909
+ );
56292
56910
  const { fetch: envFetch, Request, Response } = env4;
56293
56911
  const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
56294
56912
  const isRequestSupported = isFunction2(Request);
@@ -56300,14 +56918,18 @@ var factory = (env4) => {
56300
56918
  const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
56301
56919
  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
56302
56920
  let duplexAccessed = false;
56303
- const hasContentType = new Request(platform_default.origin, {
56921
+ const request = new Request(platform_default.origin, {
56304
56922
  body: new ReadableStream2(),
56305
56923
  method: "POST",
56306
56924
  get duplex() {
56307
56925
  duplexAccessed = true;
56308
56926
  return "half";
56309
56927
  }
56310
- }).headers.has("Content-Type");
56928
+ });
56929
+ const hasContentType = request.headers.has("Content-Type");
56930
+ if (request.body != null) {
56931
+ request.body.cancel();
56932
+ }
56311
56933
  return duplexAccessed && !hasContentType;
56312
56934
  });
56313
56935
  const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
@@ -56321,7 +56943,11 @@ var factory = (env4) => {
56321
56943
  if (method) {
56322
56944
  return method.call(res);
56323
56945
  }
56324
- throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
56946
+ throw new AxiosError_default(
56947
+ `Response type '${type}' is not supported`,
56948
+ AxiosError_default.ERR_NOT_SUPPORT,
56949
+ config
56950
+ );
56325
56951
  });
56326
56952
  });
56327
56953
  })();
@@ -56366,17 +56992,46 @@ var factory = (env4) => {
56366
56992
  responseType,
56367
56993
  headers,
56368
56994
  withCredentials = "same-origin",
56369
- fetchOptions
56995
+ fetchOptions,
56996
+ maxContentLength,
56997
+ maxBodyLength
56370
56998
  } = resolveConfig_default(config);
56999
+ const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
57000
+ const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
56371
57001
  let _fetch = envFetch || fetch;
56372
57002
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
56373
- let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout2);
57003
+ let composedSignal = composeSignals_default(
57004
+ [signal, cancelToken && cancelToken.toAbortSignal()],
57005
+ timeout2
57006
+ );
56374
57007
  let request = null;
56375
57008
  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
56376
57009
  composedSignal.unsubscribe();
56377
57010
  });
56378
57011
  let requestContentLength;
56379
57012
  try {
57013
+ if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
57014
+ const estimated = estimateDataURLDecodedBytes(url2);
57015
+ if (estimated > maxContentLength) {
57016
+ throw new AxiosError_default(
57017
+ "maxContentLength size of " + maxContentLength + " exceeded",
57018
+ AxiosError_default.ERR_BAD_RESPONSE,
57019
+ config,
57020
+ request
57021
+ );
57022
+ }
57023
+ }
57024
+ if (hasMaxBodyLength && method !== "get" && method !== "head") {
57025
+ const outboundLength = await resolveBodyLength(headers, data);
57026
+ if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
57027
+ throw new AxiosError_default(
57028
+ "Request body larger than maxBodyLength limit",
57029
+ AxiosError_default.ERR_BAD_REQUEST,
57030
+ config,
57031
+ request
57032
+ );
57033
+ }
57034
+ }
56380
57035
  if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
56381
57036
  let _request = new Request(url2, {
56382
57037
  method: "POST",
@@ -56399,6 +57054,13 @@ var factory = (env4) => {
56399
57054
  withCredentials = withCredentials ? "include" : "omit";
56400
57055
  }
56401
57056
  const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
57057
+ if (utils_default.isFormData(data)) {
57058
+ const contentType = headers.getContentType();
57059
+ if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
57060
+ headers.delete("content-type");
57061
+ }
57062
+ }
57063
+ headers.set("User-Agent", "axios/" + VERSION, false);
56402
57064
  const resolvedOptions = {
56403
57065
  ...fetchOptions,
56404
57066
  signal: composedSignal,
@@ -56410,8 +57072,19 @@ var factory = (env4) => {
56410
57072
  };
56411
57073
  request = isRequestSupported && new Request(url2, resolvedOptions);
56412
57074
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
57075
+ if (hasMaxContentLength) {
57076
+ const declaredLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
57077
+ if (declaredLength != null && declaredLength > maxContentLength) {
57078
+ throw new AxiosError_default(
57079
+ "maxContentLength size of " + maxContentLength + " exceeded",
57080
+ AxiosError_default.ERR_BAD_RESPONSE,
57081
+ config,
57082
+ request
57083
+ );
57084
+ }
57085
+ }
56413
57086
  const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
56414
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
57087
+ if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
56415
57088
  const options = {};
56416
57089
  ["status", "statusText", "headers"].forEach((prop) => {
56417
57090
  options[prop] = response[prop];
@@ -56421,8 +57094,23 @@ var factory = (env4) => {
56421
57094
  responseContentLength,
56422
57095
  progressEventReducer(asyncDecorator(onDownloadProgress), true)
56423
57096
  ) || [];
57097
+ let bytesRead = 0;
57098
+ const onChunkProgress = (loadedBytes) => {
57099
+ if (hasMaxContentLength) {
57100
+ bytesRead = loadedBytes;
57101
+ if (bytesRead > maxContentLength) {
57102
+ throw new AxiosError_default(
57103
+ "maxContentLength size of " + maxContentLength + " exceeded",
57104
+ AxiosError_default.ERR_BAD_RESPONSE,
57105
+ config,
57106
+ request
57107
+ );
57108
+ }
57109
+ }
57110
+ onProgress && onProgress(loadedBytes);
57111
+ };
56424
57112
  response = new Response(
56425
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
57113
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
56426
57114
  flush && flush();
56427
57115
  unsubscribe && unsubscribe();
56428
57116
  }),
@@ -56430,7 +57118,30 @@ var factory = (env4) => {
56430
57118
  );
56431
57119
  }
56432
57120
  responseType = responseType || "text";
56433
- let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
57121
+ let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](
57122
+ response,
57123
+ config
57124
+ );
57125
+ if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
57126
+ let materializedSize;
57127
+ if (responseData != null) {
57128
+ if (typeof responseData.byteLength === "number") {
57129
+ materializedSize = responseData.byteLength;
57130
+ } else if (typeof responseData.size === "number") {
57131
+ materializedSize = responseData.size;
57132
+ } else if (typeof responseData === "string") {
57133
+ materializedSize = typeof TextEncoder2 === "function" ? new TextEncoder2().encode(responseData).byteLength : responseData.length;
57134
+ }
57135
+ }
57136
+ if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
57137
+ throw new AxiosError_default(
57138
+ "maxContentLength size of " + maxContentLength + " exceeded",
57139
+ AxiosError_default.ERR_BAD_RESPONSE,
57140
+ config,
57141
+ request
57142
+ );
57143
+ }
57144
+ }
56434
57145
  !isStreamResponse && unsubscribe && unsubscribe();
56435
57146
  return await new Promise((resolve6, reject) => {
56436
57147
  settle(resolve6, reject, {
@@ -56444,15 +57155,28 @@ var factory = (env4) => {
56444
57155
  });
56445
57156
  } catch (err) {
56446
57157
  unsubscribe && unsubscribe();
57158
+ if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError_default) {
57159
+ const canceledError = composedSignal.reason;
57160
+ canceledError.config = config;
57161
+ request && (canceledError.request = request);
57162
+ err !== canceledError && (canceledError.cause = err);
57163
+ throw canceledError;
57164
+ }
56447
57165
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
56448
57166
  throw Object.assign(
56449
- new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
57167
+ new AxiosError_default(
57168
+ "Network Error",
57169
+ AxiosError_default.ERR_NETWORK,
57170
+ config,
57171
+ request,
57172
+ err && err.response
57173
+ ),
56450
57174
  {
56451
57175
  cause: err.cause || err
56452
57176
  }
56453
57177
  );
56454
57178
  }
56455
- throw AxiosError_default.from(err, err && err.code, config, request);
57179
+ throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
56456
57180
  }
56457
57181
  };
56458
57182
  };
@@ -56460,11 +57184,7 @@ var seedCache = /* @__PURE__ */ new Map();
56460
57184
  var getFetch = (config) => {
56461
57185
  let env4 = config && config.env || {};
56462
57186
  const { fetch: fetch2, Request, Response } = env4;
56463
- const seeds = [
56464
- Request,
56465
- Response,
56466
- fetch2
56467
- ];
57187
+ const seeds = [Request, Response, fetch2];
56468
57188
  let len = seeds.length, i = len, seed, target, map = seedCache;
56469
57189
  while (i--) {
56470
57190
  seed = seeds[i];
@@ -56487,10 +57207,10 @@ var knownAdapters = {
56487
57207
  utils_default.forEach(knownAdapters, (fn2, value) => {
56488
57208
  if (fn2) {
56489
57209
  try {
56490
- Object.defineProperty(fn2, "name", { value });
57210
+ Object.defineProperty(fn2, "name", { __proto__: null, value });
56491
57211
  } catch (e) {
56492
57212
  }
56493
- Object.defineProperty(fn2, "adapterName", { value });
57213
+ Object.defineProperty(fn2, "adapterName", { __proto__: null, value });
56494
57214
  }
56495
57215
  });
56496
57216
  var renderReason = (reason) => `- ${reason}`;
@@ -56553,37 +57273,43 @@ function throwIfCancellationRequested(config) {
56553
57273
  function dispatchRequest(config) {
56554
57274
  throwIfCancellationRequested(config);
56555
57275
  config.headers = AxiosHeaders_default.from(config.headers);
56556
- config.data = transformData.call(
56557
- config,
56558
- config.transformRequest
56559
- );
57276
+ config.data = transformData.call(config, config.transformRequest);
56560
57277
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
56561
57278
  config.headers.setContentType("application/x-www-form-urlencoded", false);
56562
57279
  }
56563
57280
  const adapter2 = adapters_default.getAdapter(config.adapter || defaults_default.adapter, config);
56564
- return adapter2(config).then(function onAdapterResolution(response) {
56565
- throwIfCancellationRequested(config);
56566
- response.data = transformData.call(
56567
- config,
56568
- config.transformResponse,
56569
- response
56570
- );
56571
- response.headers = AxiosHeaders_default.from(response.headers);
56572
- return response;
56573
- }, function onAdapterRejection(reason) {
56574
- if (!isCancel(reason)) {
57281
+ return adapter2(config).then(
57282
+ function onAdapterResolution(response) {
56575
57283
  throwIfCancellationRequested(config);
56576
- if (reason && reason.response) {
56577
- reason.response.data = transformData.call(
56578
- config,
56579
- config.transformResponse,
56580
- reason.response
56581
- );
56582
- reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
57284
+ config.response = response;
57285
+ try {
57286
+ response.data = transformData.call(config, config.transformResponse, response);
57287
+ } finally {
57288
+ delete config.response;
56583
57289
  }
57290
+ response.headers = AxiosHeaders_default.from(response.headers);
57291
+ return response;
57292
+ },
57293
+ function onAdapterRejection(reason) {
57294
+ if (!isCancel(reason)) {
57295
+ throwIfCancellationRequested(config);
57296
+ if (reason && reason.response) {
57297
+ config.response = reason.response;
57298
+ try {
57299
+ reason.response.data = transformData.call(
57300
+ config,
57301
+ config.transformResponse,
57302
+ reason.response
57303
+ );
57304
+ } finally {
57305
+ delete config.response;
57306
+ }
57307
+ reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
57308
+ }
57309
+ }
57310
+ return Promise.reject(reason);
56584
57311
  }
56585
- return Promise.reject(reason);
56586
- });
57312
+ );
56587
57313
  }
56588
57314
 
56589
57315
  // ../../../node_modules/axios/lib/helpers/validator.js
@@ -56631,12 +57357,15 @@ function assertOptions(options, schema, allowUnknown) {
56631
57357
  let i = keys.length;
56632
57358
  while (i-- > 0) {
56633
57359
  const opt = keys[i];
56634
- const validator = schema[opt];
57360
+ const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0;
56635
57361
  if (validator) {
56636
57362
  const value = options[opt];
56637
57363
  const result = value === void 0 || validator(value, opt, options);
56638
57364
  if (result !== true) {
56639
- throw new AxiosError_default("option " + opt + " must be " + result, AxiosError_default.ERR_BAD_OPTION_VALUE);
57365
+ throw new AxiosError_default(
57366
+ "option " + opt + " must be " + result,
57367
+ AxiosError_default.ERR_BAD_OPTION_VALUE
57368
+ );
56640
57369
  }
56641
57370
  continue;
56642
57371
  }
@@ -56675,12 +57404,23 @@ var Axios = class {
56675
57404
  if (err instanceof Error) {
56676
57405
  let dummy = {};
56677
57406
  Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
56678
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
57407
+ const stack = (() => {
57408
+ if (!dummy.stack) {
57409
+ return "";
57410
+ }
57411
+ const firstNewlineIndex = dummy.stack.indexOf("\n");
57412
+ return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
57413
+ })();
56679
57414
  try {
56680
57415
  if (!err.stack) {
56681
57416
  err.stack = stack;
56682
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
56683
- err.stack += "\n" + stack;
57417
+ } else if (stack) {
57418
+ const firstNewlineIndex = stack.indexOf("\n");
57419
+ const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
57420
+ const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
57421
+ if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
57422
+ err.stack += "\n" + stack;
57423
+ }
56684
57424
  }
56685
57425
  } catch (e) {
56686
57426
  }
@@ -56698,11 +57438,16 @@ var Axios = class {
56698
57438
  config = mergeConfig(this.defaults, config);
56699
57439
  const { transitional: transitional2, paramsSerializer, headers } = config;
56700
57440
  if (transitional2 !== void 0) {
56701
- validator_default.assertOptions(transitional2, {
56702
- silentJSONParsing: validators2.transitional(validators2.boolean),
56703
- forcedJSONParsing: validators2.transitional(validators2.boolean),
56704
- clarifyTimeoutError: validators2.transitional(validators2.boolean)
56705
- }, false);
57441
+ validator_default.assertOptions(
57442
+ transitional2,
57443
+ {
57444
+ silentJSONParsing: validators2.transitional(validators2.boolean),
57445
+ forcedJSONParsing: validators2.transitional(validators2.boolean),
57446
+ clarifyTimeoutError: validators2.transitional(validators2.boolean),
57447
+ legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
57448
+ },
57449
+ false
57450
+ );
56706
57451
  }
56707
57452
  if (paramsSerializer != null) {
56708
57453
  if (utils_default.isFunction(paramsSerializer)) {
@@ -56710,10 +57455,14 @@ var Axios = class {
56710
57455
  serialize: paramsSerializer
56711
57456
  };
56712
57457
  } else {
56713
- validator_default.assertOptions(paramsSerializer, {
56714
- encode: validators2.function,
56715
- serialize: validators2.function
56716
- }, true);
57458
+ validator_default.assertOptions(
57459
+ paramsSerializer,
57460
+ {
57461
+ encode: validators2.function,
57462
+ serialize: validators2.function
57463
+ },
57464
+ true
57465
+ );
56717
57466
  }
56718
57467
  }
56719
57468
  if (config.allowAbsoluteUrls !== void 0) {
@@ -56722,21 +57471,19 @@ var Axios = class {
56722
57471
  } else {
56723
57472
  config.allowAbsoluteUrls = true;
56724
57473
  }
56725
- validator_default.assertOptions(config, {
56726
- baseUrl: validators2.spelling("baseURL"),
56727
- withXsrfToken: validators2.spelling("withXSRFToken")
56728
- }, true);
56729
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
56730
- let contextHeaders = headers && utils_default.merge(
56731
- headers.common,
56732
- headers[config.method]
56733
- );
56734
- headers && utils_default.forEach(
56735
- ["delete", "get", "head", "post", "put", "patch", "common"],
56736
- (method) => {
56737
- delete headers[method];
56738
- }
57474
+ validator_default.assertOptions(
57475
+ config,
57476
+ {
57477
+ baseUrl: validators2.spelling("baseURL"),
57478
+ withXsrfToken: validators2.spelling("withXSRFToken")
57479
+ },
57480
+ true
56739
57481
  );
57482
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
57483
+ let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
57484
+ headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
57485
+ delete headers[method];
57486
+ });
56740
57487
  config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
56741
57488
  const requestInterceptorChain = [];
56742
57489
  let synchronousRequestInterceptors = true;
@@ -56745,7 +57492,13 @@ var Axios = class {
56745
57492
  return;
56746
57493
  }
56747
57494
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
56748
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
57495
+ const transitional3 = config.transitional || transitional_default;
57496
+ const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
57497
+ if (legacyInterceptorReqResOrdering) {
57498
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
57499
+ } else {
57500
+ requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
57501
+ }
56749
57502
  });
56750
57503
  const responseInterceptorChain = [];
56751
57504
  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
@@ -56797,28 +57550,34 @@ var Axios = class {
56797
57550
  };
56798
57551
  utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
56799
57552
  Axios.prototype[method] = function(url2, config) {
56800
- return this.request(mergeConfig(config || {}, {
56801
- method,
56802
- url: url2,
56803
- data: (config || {}).data
56804
- }));
57553
+ return this.request(
57554
+ mergeConfig(config || {}, {
57555
+ method,
57556
+ url: url2,
57557
+ data: (config || {}).data
57558
+ })
57559
+ );
56805
57560
  };
56806
57561
  });
56807
- utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
57562
+ utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
56808
57563
  function generateHTTPMethod(isForm) {
56809
57564
  return function httpMethod(url2, data, config) {
56810
- return this.request(mergeConfig(config || {}, {
56811
- method,
56812
- headers: isForm ? {
56813
- "Content-Type": "multipart/form-data"
56814
- } : {},
56815
- url: url2,
56816
- data
56817
- }));
57565
+ return this.request(
57566
+ mergeConfig(config || {}, {
57567
+ method,
57568
+ headers: isForm ? {
57569
+ "Content-Type": "multipart/form-data"
57570
+ } : {},
57571
+ url: url2,
57572
+ data
57573
+ })
57574
+ );
56818
57575
  };
56819
57576
  }
56820
57577
  Axios.prototype[method] = generateHTTPMethod();
56821
- Axios.prototype[method + "Form"] = generateHTTPMethod(true);
57578
+ if (method !== "query") {
57579
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
57580
+ }
56822
57581
  });
56823
57582
  var Axios_default = Axios;
56824
57583
 
@@ -57015,7 +57774,7 @@ function createInstance(defaultConfig) {
57015
57774
  const instance = bind(Axios_default.prototype.request, context);
57016
57775
  utils_default.extend(instance, Axios_default.prototype, context, { allOwnKeys: true });
57017
57776
  utils_default.extend(instance, context, null, { allOwnKeys: true });
57018
- instance.create = function create(instanceConfig) {
57777
+ instance.create = function create2(instanceConfig) {
57019
57778
  return createInstance(mergeConfig(defaultConfig, instanceConfig));
57020
57779
  };
57021
57780
  return instance;
@@ -57059,7 +57818,8 @@ var {
57059
57818
  HttpStatusCode: HttpStatusCode2,
57060
57819
  formToJSON,
57061
57820
  getAdapter: getAdapter2,
57062
- mergeConfig: mergeConfig2
57821
+ mergeConfig: mergeConfig2,
57822
+ create
57063
57823
  } = axios_default;
57064
57824
 
57065
57825
  // ../../../node_modules/@inquirer/core/dist/esm/lib/key.js
@@ -62513,7 +63273,7 @@ var parseClass = (glob3, position) => {
62513
63273
  };
62514
63274
 
62515
63275
  // ../../../node_modules/rimraf/node_modules/minimatch/dist/esm/unescape.js
62516
- var unescape2 = (s3, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
63276
+ var unescape = (s3, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
62517
63277
  if (magicalBraces) {
62518
63278
  return windowsPathsNoEscape ? s3.replace(/\[([^\/\\])\]/g, "$1") : s3.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
62519
63279
  }
@@ -62902,7 +63662,7 @@ var AST = class _AST {
62902
63662
  const final2 = start2 + src + end;
62903
63663
  return [
62904
63664
  final2,
62905
- unescape2(src),
63665
+ unescape(src),
62906
63666
  this.#hasMagic = !!this.#hasMagic,
62907
63667
  this.#uflag
62908
63668
  ];
@@ -62915,7 +63675,7 @@ var AST = class _AST {
62915
63675
  this.#parts = [s3];
62916
63676
  this.type = null;
62917
63677
  this.#hasMagic = void 0;
62918
- return [s3, unescape2(this.toString()), false, false];
63678
+ return [s3, unescape(this.toString()), false, false];
62919
63679
  }
62920
63680
  let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true);
62921
63681
  if (bodyDotAllowed === body) {
@@ -62936,7 +63696,7 @@ var AST = class _AST {
62936
63696
  }
62937
63697
  return [
62938
63698
  final,
62939
- unescape2(body),
63699
+ unescape(body),
62940
63700
  this.#hasMagic = !!this.#hasMagic,
62941
63701
  this.#uflag
62942
63702
  ];
@@ -62992,7 +63752,7 @@ var AST = class _AST {
62992
63752
  }
62993
63753
  re2 += regExpEscape(c);
62994
63754
  }
62995
- return [re2, unescape2(glob3), !!hasMagic2, uflag];
63755
+ return [re2, unescape(glob3), !!hasMagic2, uflag];
62996
63756
  }
62997
63757
  };
62998
63758
 
@@ -63731,7 +64491,7 @@ var Minimatch = class {
63731
64491
  minimatch.AST = AST;
63732
64492
  minimatch.Minimatch = Minimatch;
63733
64493
  minimatch.escape = escape;
63734
- minimatch.unescape = unescape2;
64494
+ minimatch.unescape = unescape;
63735
64495
 
63736
64496
  // ../../../node_modules/rimraf/node_modules/glob/dist/esm/glob.js
63737
64497
  var import_node_url2 = require("node:url");
@@ -68805,7 +69565,7 @@ var glob = Object.assign(glob_, {
68805
69565
  Glob,
68806
69566
  hasMagic,
68807
69567
  escape,
68808
- unescape: unescape2
69568
+ unescape
68809
69569
  });
68810
69570
  glob.glob = glob;
68811
69571
 
@@ -68842,7 +69602,7 @@ var optArg = (opt = {}) => optArgT(opt);
68842
69602
  var optArgSync = (opt = {}) => optArgT(opt);
68843
69603
 
68844
69604
  // ../../../node_modules/rimraf/dist/esm/path-arg.js
68845
- var import_path4 = require("path");
69605
+ var import_path5 = require("path");
68846
69606
  var import_util3 = require("util");
68847
69607
  var pathArg = (path3, opt = {}) => {
68848
69608
  const type = typeof path3;
@@ -68862,8 +69622,8 @@ var pathArg = (path3, opt = {}) => {
68862
69622
  code: "ERR_INVALID_ARG_VALUE"
68863
69623
  });
68864
69624
  }
68865
- path3 = (0, import_path4.resolve)(path3);
68866
- const { root } = (0, import_path4.parse)(path3);
69625
+ path3 = (0, import_path5.resolve)(path3);
69626
+ const { root } = (0, import_path5.parse)(path3);
68867
69627
  if (path3 === root && opt.preserveRoot !== false) {
68868
69628
  const msg = "refusing to remove root directory without preserveRoot:false";
68869
69629
  throw Object.assign(new Error(msg), {
@@ -68873,7 +69633,7 @@ var pathArg = (path3, opt = {}) => {
68873
69633
  }
68874
69634
  if (process.platform === "win32") {
68875
69635
  const badWinChars = /[*|"<>?:]/;
68876
- const { root: root2 } = (0, import_path4.parse)(path3);
69636
+ const { root: root2 } = (0, import_path5.parse)(path3);
68877
69637
  if (badWinChars.test(path3.substring(root2.length))) {
68878
69638
  throw Object.assign(new Error("Illegal characters in path."), {
68879
69639
  path: path3,
@@ -68903,7 +69663,7 @@ var promises = {
68903
69663
  };
68904
69664
 
68905
69665
  // ../../../node_modules/rimraf/dist/esm/rimraf-posix.js
68906
- var import_path5 = require("path");
69666
+ var import_path6 = require("path");
68907
69667
 
68908
69668
  // ../../../node_modules/rimraf/dist/esm/readdir-or-error.js
68909
69669
  var { readdir: readdir2 } = promises;
@@ -68968,11 +69728,11 @@ var rimrafPosixDir = async (path3, opt, ent) => {
68968
69728
  await ignoreENOENT(unlink(path3));
68969
69729
  return true;
68970
69730
  }
68971
- const removedAll = (await Promise.all(entries.map((ent2) => rimrafPosixDir((0, import_path5.resolve)(path3, ent2.name), opt, ent2)))).every((v2) => v2 === true);
69731
+ const removedAll = (await Promise.all(entries.map((ent2) => rimrafPosixDir((0, import_path6.resolve)(path3, ent2.name), opt, ent2)))).every((v2) => v2 === true);
68972
69732
  if (!removedAll) {
68973
69733
  return false;
68974
69734
  }
68975
- if (opt.preserveRoot === false && path3 === (0, import_path5.parse)(path3).root) {
69735
+ if (opt.preserveRoot === false && path3 === (0, import_path6.parse)(path3).root) {
68976
69736
  return false;
68977
69737
  }
68978
69738
  if (opt.filter && !await opt.filter(path3, ent)) {
@@ -69001,10 +69761,10 @@ var rimrafPosixDirSync = (path3, opt, ent) => {
69001
69761
  }
69002
69762
  let removedAll = true;
69003
69763
  for (const ent2 of entries) {
69004
- const p2 = (0, import_path5.resolve)(path3, ent2.name);
69764
+ const p2 = (0, import_path6.resolve)(path3, ent2.name);
69005
69765
  removedAll = rimrafPosixDirSync(p2, opt, ent2) && removedAll;
69006
69766
  }
69007
- if (opt.preserveRoot === false && path3 === (0, import_path5.parse)(path3).root) {
69767
+ if (opt.preserveRoot === false && path3 === (0, import_path6.parse)(path3).root) {
69008
69768
  return false;
69009
69769
  }
69010
69770
  if (!removedAll) {
@@ -69018,7 +69778,7 @@ var rimrafPosixDirSync = (path3, opt, ent) => {
69018
69778
  };
69019
69779
 
69020
69780
  // ../../../node_modules/rimraf/dist/esm/rimraf-windows.js
69021
- var import_path8 = require("path");
69781
+ var import_path9 = require("path");
69022
69782
 
69023
69783
  // ../../../node_modules/rimraf/dist/esm/fix-eperm.js
69024
69784
  var { chmod } = promises;
@@ -69103,11 +69863,11 @@ var retryBusySync = (fn2) => {
69103
69863
  };
69104
69864
 
69105
69865
  // ../../../node_modules/rimraf/dist/esm/rimraf-move-remove.js
69106
- var import_path7 = require("path");
69866
+ var import_path8 = require("path");
69107
69867
 
69108
69868
  // ../../../node_modules/rimraf/dist/esm/default-tmp.js
69109
69869
  var import_os = require("os");
69110
- var import_path6 = require("path");
69870
+ var import_path7 = require("path");
69111
69871
  var { stat } = promises;
69112
69872
  var isDirSync = (path3) => {
69113
69873
  try {
@@ -69118,26 +69878,26 @@ var isDirSync = (path3) => {
69118
69878
  };
69119
69879
  var isDir = (path3) => stat(path3).then((st2) => st2.isDirectory(), () => false);
69120
69880
  var win32DefaultTmp = async (path3) => {
69121
- const { root } = (0, import_path6.parse)(path3);
69881
+ const { root } = (0, import_path7.parse)(path3);
69122
69882
  const tmp = (0, import_os.tmpdir)();
69123
- const { root: tmpRoot } = (0, import_path6.parse)(tmp);
69883
+ const { root: tmpRoot } = (0, import_path7.parse)(tmp);
69124
69884
  if (root.toLowerCase() === tmpRoot.toLowerCase()) {
69125
69885
  return tmp;
69126
69886
  }
69127
- const driveTmp = (0, import_path6.resolve)(root, "/temp");
69887
+ const driveTmp = (0, import_path7.resolve)(root, "/temp");
69128
69888
  if (await isDir(driveTmp)) {
69129
69889
  return driveTmp;
69130
69890
  }
69131
69891
  return root;
69132
69892
  };
69133
69893
  var win32DefaultTmpSync = (path3) => {
69134
- const { root } = (0, import_path6.parse)(path3);
69894
+ const { root } = (0, import_path7.parse)(path3);
69135
69895
  const tmp = (0, import_os.tmpdir)();
69136
- const { root: tmpRoot } = (0, import_path6.parse)(tmp);
69896
+ const { root: tmpRoot } = (0, import_path7.parse)(tmp);
69137
69897
  if (root.toLowerCase() === tmpRoot.toLowerCase()) {
69138
69898
  return tmp;
69139
69899
  }
69140
- const driveTmp = (0, import_path6.resolve)(root, "/temp");
69900
+ const driveTmp = (0, import_path7.resolve)(root, "/temp");
69141
69901
  if (isDirSync(driveTmp)) {
69142
69902
  return driveTmp;
69143
69903
  }
@@ -69150,7 +69910,7 @@ var defaultTmpSync = process.platform === "win32" ? win32DefaultTmpSync : posixD
69150
69910
 
69151
69911
  // ../../../node_modules/rimraf/dist/esm/rimraf-move-remove.js
69152
69912
  var { lstat: lstat3, rename, unlink: unlink2, rmdir: rmdir2 } = promises;
69153
- var uniqueFilename = (path3) => `.${(0, import_path7.basename)(path3)}.${Math.random()}`;
69913
+ var uniqueFilename = (path3) => `.${(0, import_path8.basename)(path3)}.${Math.random()}`;
69154
69914
  var unlinkFixEPERM = fixEPERM(unlink2);
69155
69915
  var unlinkFixEPERMSync = fixEPERMSync(import_fs8.unlinkSync);
69156
69916
  var rimrafMoveRemove = async (path3, opt) => {
@@ -69162,7 +69922,7 @@ var rimrafMoveRemoveDir = async (path3, opt, ent) => {
69162
69922
  if (!opt.tmp) {
69163
69923
  return rimrafMoveRemoveDir(path3, { ...opt, tmp: await defaultTmp(path3) }, ent);
69164
69924
  }
69165
- if (path3 === opt.tmp && (0, import_path7.parse)(path3).root !== path3) {
69925
+ if (path3 === opt.tmp && (0, import_path8.parse)(path3).root !== path3) {
69166
69926
  throw new Error("cannot delete temp directory used for deletion");
69167
69927
  }
69168
69928
  const entries = ent.isDirectory() ? await readdirOrError(path3) : null;
@@ -69181,11 +69941,11 @@ var rimrafMoveRemoveDir = async (path3, opt, ent) => {
69181
69941
  await ignoreENOENT(tmpUnlink(path3, opt.tmp, unlinkFixEPERM));
69182
69942
  return true;
69183
69943
  }
69184
- const removedAll = (await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir((0, import_path7.resolve)(path3, ent2.name), opt, ent2)))).every((v2) => v2 === true);
69944
+ const removedAll = (await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir((0, import_path8.resolve)(path3, ent2.name), opt, ent2)))).every((v2) => v2 === true);
69185
69945
  if (!removedAll) {
69186
69946
  return false;
69187
69947
  }
69188
- if (opt.preserveRoot === false && path3 === (0, import_path7.parse)(path3).root) {
69948
+ if (opt.preserveRoot === false && path3 === (0, import_path8.parse)(path3).root) {
69189
69949
  return false;
69190
69950
  }
69191
69951
  if (opt.filter && !await opt.filter(path3, ent)) {
@@ -69195,7 +69955,7 @@ var rimrafMoveRemoveDir = async (path3, opt, ent) => {
69195
69955
  return true;
69196
69956
  };
69197
69957
  var tmpUnlink = async (path3, tmp, rm2) => {
69198
- const tmpFile = (0, import_path7.resolve)(tmp, uniqueFilename(path3));
69958
+ const tmpFile = (0, import_path8.resolve)(tmp, uniqueFilename(path3));
69199
69959
  await rename(path3, tmpFile);
69200
69960
  return await rm2(tmpFile);
69201
69961
  };
@@ -69209,7 +69969,7 @@ var rimrafMoveRemoveDirSync = (path3, opt, ent) => {
69209
69969
  return rimrafMoveRemoveDirSync(path3, { ...opt, tmp: defaultTmpSync(path3) }, ent);
69210
69970
  }
69211
69971
  const tmp = opt.tmp;
69212
- if (path3 === opt.tmp && (0, import_path7.parse)(path3).root !== path3) {
69972
+ if (path3 === opt.tmp && (0, import_path8.parse)(path3).root !== path3) {
69213
69973
  throw new Error("cannot delete temp directory used for deletion");
69214
69974
  }
69215
69975
  const entries = ent.isDirectory() ? readdirOrErrorSync(path3) : null;
@@ -69230,13 +69990,13 @@ var rimrafMoveRemoveDirSync = (path3, opt, ent) => {
69230
69990
  }
69231
69991
  let removedAll = true;
69232
69992
  for (const ent2 of entries) {
69233
- const p2 = (0, import_path7.resolve)(path3, ent2.name);
69993
+ const p2 = (0, import_path8.resolve)(path3, ent2.name);
69234
69994
  removedAll = rimrafMoveRemoveDirSync(p2, opt, ent2) && removedAll;
69235
69995
  }
69236
69996
  if (!removedAll) {
69237
69997
  return false;
69238
69998
  }
69239
- if (opt.preserveRoot === false && path3 === (0, import_path7.parse)(path3).root) {
69999
+ if (opt.preserveRoot === false && path3 === (0, import_path8.parse)(path3).root) {
69240
70000
  return false;
69241
70001
  }
69242
70002
  if (opt.filter && !opt.filter(path3, ent)) {
@@ -69246,7 +70006,7 @@ var rimrafMoveRemoveDirSync = (path3, opt, ent) => {
69246
70006
  return true;
69247
70007
  };
69248
70008
  var tmpUnlinkSync = (path3, tmp, rmSync2) => {
69249
- const tmpFile = (0, import_path7.resolve)(tmp, uniqueFilename(path3));
70009
+ const tmpFile = (0, import_path8.resolve)(tmp, uniqueFilename(path3));
69250
70010
  (0, import_fs8.renameSync)(path3, tmpFile);
69251
70011
  return rmSync2(tmpFile);
69252
70012
  };
@@ -69311,11 +70071,11 @@ var rimrafWindowsDir = async (path3, opt, ent, state = START) => {
69311
70071
  return true;
69312
70072
  }
69313
70073
  const s3 = state === START ? CHILD : state;
69314
- const removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir((0, import_path8.resolve)(path3, ent2.name), opt, ent2, s3)))).every((v2) => v2 === true);
70074
+ const removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir((0, import_path9.resolve)(path3, ent2.name), opt, ent2, s3)))).every((v2) => v2 === true);
69315
70075
  if (state === START) {
69316
70076
  return rimrafWindowsDir(path3, opt, ent, FINISH);
69317
70077
  } else if (state === FINISH) {
69318
- if (opt.preserveRoot === false && path3 === (0, import_path8.parse)(path3).root) {
70078
+ if (opt.preserveRoot === false && path3 === (0, import_path9.parse)(path3).root) {
69319
70079
  return false;
69320
70080
  }
69321
70081
  if (!removedAll) {
@@ -69348,13 +70108,13 @@ var rimrafWindowsDirSync = (path3, opt, ent, state = START) => {
69348
70108
  let removedAll = true;
69349
70109
  for (const ent2 of entries) {
69350
70110
  const s3 = state === START ? CHILD : state;
69351
- const p2 = (0, import_path8.resolve)(path3, ent2.name);
70111
+ const p2 = (0, import_path9.resolve)(path3, ent2.name);
69352
70112
  removedAll = rimrafWindowsDirSync(p2, opt, ent2, s3) && removedAll;
69353
70113
  }
69354
70114
  if (state === START) {
69355
70115
  return rimrafWindowsDirSync(path3, opt, ent, FINISH);
69356
70116
  } else if (state === FINISH) {
69357
- if (opt.preserveRoot === false && path3 === (0, import_path8.parse)(path3).root) {
70117
+ if (opt.preserveRoot === false && path3 === (0, import_path9.parse)(path3).root) {
69358
70118
  return false;
69359
70119
  }
69360
70120
  if (!removedAll) {