publish-microfrontend 1.12.4 → 1.12.5-beta.a26a9d6

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.
Files changed (2) hide show
  1. package/lib/index.js +985 -228
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -24386,22 +24386,82 @@ var { toString } = Object.prototype;
24386
24386
  var { getPrototypeOf } = Object;
24387
24387
  var { iterator, toStringTag } = Symbol;
24388
24388
  var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
24389
+ var isUnsafeObjectKey = (prop) => typeof prop === "string" && (prop === "__proto__" || prop === "constructor" || prop === "prototype");
24390
+ var isPrototypeBoundary = (obj, prototype2, source) => obj === Object.prototype || !source && prototype2 === null;
24391
+ var isSafeAndFullyMutable = (obj) => {
24392
+ if (!Object.isExtensible(obj)) {
24393
+ return false;
24394
+ }
24395
+ const props = Object.getOwnPropertyNames(obj);
24396
+ if (Object.getOwnPropertySymbols) {
24397
+ props.push(...Object.getOwnPropertySymbols(obj));
24398
+ }
24399
+ return props.every((prop) => {
24400
+ if (isUnsafeObjectKey(prop)) {
24401
+ return false;
24402
+ }
24403
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
24404
+ return !!descriptor && descriptor.configurable && descriptor.writable === true;
24405
+ });
24406
+ };
24389
24407
  var hasOwnInPrototypeChain = (thing, prop) => {
24390
24408
  let obj = thing;
24391
24409
  const seen = [];
24392
- while (obj != null && obj !== Object.prototype) {
24410
+ while (obj != null) {
24393
24411
  if (seen.indexOf(obj) !== -1) {
24394
24412
  return false;
24395
24413
  }
24396
24414
  seen.push(obj);
24415
+ const prototype2 = getPrototypeOf(obj);
24416
+ if (isPrototypeBoundary(obj, prototype2, obj === thing)) {
24417
+ return false;
24418
+ }
24397
24419
  if (hasOwnProperty(obj, prop)) {
24398
24420
  return true;
24399
24421
  }
24400
- obj = getPrototypeOf(obj);
24422
+ obj = prototype2;
24401
24423
  }
24402
24424
  return false;
24403
24425
  };
24404
24426
  var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
24427
+ var toSafeFlatObject = (thing) => {
24428
+ if (thing == null || typeof thing !== "object" && typeof thing !== "function") {
24429
+ return thing;
24430
+ }
24431
+ const sourcePrototype = getPrototypeOf(thing);
24432
+ if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
24433
+ return thing;
24434
+ }
24435
+ const result = /* @__PURE__ */ Object.create(null);
24436
+ const merged = /* @__PURE__ */ Object.create(null);
24437
+ const seen = [];
24438
+ let current2 = thing;
24439
+ while (current2 != null) {
24440
+ if (seen.indexOf(current2) !== -1) {
24441
+ break;
24442
+ }
24443
+ seen.push(current2);
24444
+ const prototype2 = current2 === thing ? sourcePrototype : getPrototypeOf(current2);
24445
+ if (isPrototypeBoundary(current2, prototype2, current2 === thing)) {
24446
+ break;
24447
+ }
24448
+ const props = Object.getOwnPropertyNames(current2);
24449
+ if (Object.getOwnPropertySymbols) {
24450
+ props.push(...Object.getOwnPropertySymbols(current2));
24451
+ }
24452
+ for (const prop of props) {
24453
+ if (isUnsafeObjectKey(prop)) {
24454
+ continue;
24455
+ }
24456
+ if (!hasOwnProperty(merged, prop)) {
24457
+ result[prop] = thing[prop];
24458
+ merged[prop] = true;
24459
+ }
24460
+ }
24461
+ current2 = prototype2;
24462
+ }
24463
+ return result;
24464
+ };
24405
24465
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
24406
24466
  const str = toString.call(thing);
24407
24467
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -24436,9 +24496,9 @@ var isPlainObject = (val) => {
24436
24496
  return false;
24437
24497
  }
24438
24498
  const prototype2 = getPrototypeOf(val);
24439
- return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
24440
- // Symbol.iterator as evidence the value is a tagged/iterable type rather
24441
- // than a plain object, while ignoring keys injected onto Object.prototype.
24499
+ return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
24500
+ // evidence the value is tagged/iterable, while ignoring members reachable
24501
+ // only through shared or terminal prototype boundaries.
24442
24502
  !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
24443
24503
  };
24444
24504
  var isEmptyObject = (val) => {
@@ -24459,6 +24519,7 @@ var isReactNativeBlob = (value) => {
24459
24519
  var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
24460
24520
  var isBlob = kindOfTest("Blob");
24461
24521
  var isFileList = kindOfTest("FileList");
24522
+ var isSet = kindOfTest("Set");
24462
24523
  var isStream = (val) => isObject(val) && isFunction(val.pipe);
24463
24524
  function getGlobal() {
24464
24525
  if (typeof globalThis !== "undefined") return globalThis;
@@ -24754,11 +24815,20 @@ var toJSONObject = (obj) => {
24754
24815
  }
24755
24816
  if (!("toJSON" in source)) {
24756
24817
  visited.add(source);
24757
- const target = isArray(source) ? [] : {};
24758
- forEach(source, (value, key) => {
24759
- const reducedValue = visit(value);
24760
- !isUndefined(reducedValue) && (target[key] = reducedValue);
24761
- });
24818
+ let target;
24819
+ if (isSet(source)) {
24820
+ target = [];
24821
+ for (const value of source) {
24822
+ const reducedValue = visit(value);
24823
+ !isUndefined(reducedValue) && target.push(reducedValue);
24824
+ }
24825
+ } else {
24826
+ target = isArray(source) ? [] : {};
24827
+ forEach(source, (value, key) => {
24828
+ const reducedValue = visit(value);
24829
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
24830
+ });
24831
+ }
24762
24832
  visited.delete(source);
24763
24833
  return target;
24764
24834
  }
@@ -24839,6 +24909,7 @@ var utils_default = {
24839
24909
  // an alias to avoid ESLint no-prototype-builtins detection
24840
24910
  hasOwnInPrototypeChain,
24841
24911
  getSafeProp,
24912
+ toSafeFlatObject,
24842
24913
  reduceDescriptors,
24843
24914
  freezeMethods,
24844
24915
  toObjectSet,
@@ -24887,17 +24958,18 @@ var parseHeaders_default = (rawHeaders) => {
24887
24958
  i = line.indexOf(":");
24888
24959
  key = line.substring(0, i).trim().toLowerCase();
24889
24960
  val = line.substring(i + 1).trim();
24890
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
24961
+ const hasKey = utils_default.hasOwnProp(parsed, key);
24962
+ if (!key || hasKey && utils_default.hasOwnProp(ignoreDuplicateOf, key)) {
24891
24963
  return;
24892
24964
  }
24893
24965
  if (key === "set-cookie") {
24894
- if (parsed[key]) {
24966
+ if (hasKey) {
24895
24967
  parsed[key].push(val);
24896
24968
  } else {
24897
24969
  parsed[key] = [val];
24898
24970
  }
24899
24971
  } else {
24900
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
24972
+ parsed[key] = hasKey ? parsed[key] + ", " + val : val;
24901
24973
  }
24902
24974
  });
24903
24975
  return parsed;
@@ -24961,6 +25033,90 @@ function parseTokens(str) {
24961
25033
  }
24962
25034
  return tokens;
24963
25035
  }
25036
+ var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
25037
+ function trimOWS(value) {
25038
+ let start = 0;
25039
+ let end = value.length;
25040
+ while (start < end) {
25041
+ const code = value.charCodeAt(start);
25042
+ if (code !== 9 && code !== 32) {
25043
+ break;
25044
+ }
25045
+ start += 1;
25046
+ }
25047
+ while (end > start) {
25048
+ const code = value.charCodeAt(end - 1);
25049
+ if (code !== 9 && code !== 32) {
25050
+ break;
25051
+ }
25052
+ end -= 1;
25053
+ }
25054
+ return start === 0 && end === value.length ? value : value.slice(start, end);
25055
+ }
25056
+ function decodeQuotedString(value) {
25057
+ const last = value.length - 1;
25058
+ if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) {
25059
+ return value;
25060
+ }
25061
+ let decoded = "";
25062
+ for (let i = 1; i < last; i++) {
25063
+ const code = value.charCodeAt(i);
25064
+ if (code === 34) {
25065
+ return value;
25066
+ }
25067
+ if (code === 92) {
25068
+ i += 1;
25069
+ if (i >= last) {
25070
+ return value;
25071
+ }
25072
+ }
25073
+ decoded += value[i];
25074
+ }
25075
+ return decoded;
25076
+ }
25077
+ function parseParameters(value) {
25078
+ const parameters = /* @__PURE__ */ Object.create(null);
25079
+ const str = String(value);
25080
+ let start = 0;
25081
+ let quoted = false;
25082
+ let escaped = false;
25083
+ function parseParameter(end) {
25084
+ const part = trimOWS(str.slice(start, end));
25085
+ const equals = part.indexOf("=");
25086
+ if (equals < 1) {
25087
+ return;
25088
+ }
25089
+ const name = trimOWS(part.slice(0, equals));
25090
+ if (!parameterNameRE.test(name)) {
25091
+ return;
25092
+ }
25093
+ const normalizedName = name.toLowerCase();
25094
+ if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") {
25095
+ return;
25096
+ }
25097
+ const parameterValue = trimOWS(part.slice(equals + 1));
25098
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
25099
+ }
25100
+ for (let i = 0; i < str.length; i++) {
25101
+ const code = str.charCodeAt(i);
25102
+ if (quoted) {
25103
+ if (escaped) {
25104
+ escaped = false;
25105
+ } else if (code === 92) {
25106
+ escaped = true;
25107
+ } else if (code === 34) {
25108
+ quoted = false;
25109
+ }
25110
+ } else if (code === 34) {
25111
+ quoted = true;
25112
+ } else if (code === 44 || code === 59) {
25113
+ parseParameter(i);
25114
+ start = i + 1;
25115
+ }
25116
+ }
25117
+ parseParameter(str.length);
25118
+ return parameters;
25119
+ }
24964
25120
  var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
24965
25121
  function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
24966
25122
  if (utils_default.isFunction(filter2)) {
@@ -25136,7 +25292,8 @@ var AxiosHeaders = class {
25136
25292
  return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
25137
25293
  }
25138
25294
  getSetCookie() {
25139
- return this.get("set-cookie") || [];
25295
+ const value = this.get("set-cookie");
25296
+ return utils_default.isArray(value) ? value : value == null || value === false ? [] : [value];
25140
25297
  }
25141
25298
  get [Symbol.toStringTag]() {
25142
25299
  return "AxiosHeaders";
@@ -25144,6 +25301,9 @@ var AxiosHeaders = class {
25144
25301
  static from(thing) {
25145
25302
  return thing instanceof this ? thing : new this(thing);
25146
25303
  }
25304
+ static parseParameters(value) {
25305
+ return parseParameters(value);
25306
+ }
25147
25307
  static concat(first, ...targets) {
25148
25308
  const computed = new this(first);
25149
25309
  targets.forEach((target) => computed.set(target));
@@ -25239,10 +25399,37 @@ function redactConfig(config, redactKeys) {
25239
25399
  };
25240
25400
  return visit(config);
25241
25401
  }
25402
+ function stringifySafely(value) {
25403
+ try {
25404
+ return String(value);
25405
+ } catch (err) {
25406
+ return "";
25407
+ }
25408
+ }
25409
+ function aggregateErrorMessage(error) {
25410
+ const message = error.errors.map((entry) => {
25411
+ try {
25412
+ return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
25413
+ } catch (err) {
25414
+ return "";
25415
+ }
25416
+ }).filter(Boolean).join("; ");
25417
+ return message || error.name || "AggregateError";
25418
+ }
25242
25419
  var AxiosError = class _AxiosError extends Error {
25243
25420
  static from(error, code, config, request, response, customProps) {
25244
- const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
25245
- axiosError.cause = error;
25421
+ let message = error.message;
25422
+ if (!message && utils_default.isArray(error.errors) && error.errors.length) {
25423
+ message = aggregateErrorMessage(error);
25424
+ }
25425
+ const axiosError = new _AxiosError(message, code || error.code, config, request, response);
25426
+ Object.defineProperty(axiosError, "cause", {
25427
+ __proto__: null,
25428
+ value: error,
25429
+ writable: true,
25430
+ enumerable: false,
25431
+ configurable: true
25432
+ });
25246
25433
  axiosError.name = error.name;
25247
25434
  if (error.status != null && axiosError.status == null) {
25248
25435
  axiosError.status = error.status;
@@ -25325,6 +25512,16 @@ var AxiosError_default = AxiosError;
25325
25512
  var import_form_data = __toESM(require_form_data(), 1);
25326
25513
  var FormData_default = import_form_data.default;
25327
25514
 
25515
+ // ../../../node_modules/axios/lib/platform/node/classes/Buffer.js
25516
+ var Buffer_default = {
25517
+ isBufferAvailable() {
25518
+ return typeof Buffer !== "undefined";
25519
+ },
25520
+ from(value) {
25521
+ return Buffer.from(value);
25522
+ }
25523
+ };
25524
+
25328
25525
  // ../../../node_modules/axios/lib/helpers/toFormData.js
25329
25526
  var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
25330
25527
  function isVisitable(thing) {
@@ -25351,24 +25548,16 @@ function toFormData(obj, formData, options) {
25351
25548
  throw new TypeError("target must be an object");
25352
25549
  }
25353
25550
  formData = formData || new (FormData_default || FormData)();
25354
- options = utils_default.toFlatObject(
25355
- options,
25356
- {
25357
- metaTokens: true,
25358
- dots: false,
25359
- indexes: false
25360
- },
25361
- false,
25362
- function defined(option, source) {
25363
- return !utils_default.isUndefined(source[option]);
25364
- }
25365
- );
25366
- const metaTokens = options.metaTokens;
25367
- const visitor = options.visitor || defaultVisitor;
25368
- const dots = options.dots;
25369
- const indexes = options.indexes;
25370
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
25371
- const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
25551
+ const option = (name, fallback2) => {
25552
+ const value = utils_default.getSafeProp(options, name);
25553
+ return utils_default.isUndefined(value) ? fallback2 : value;
25554
+ };
25555
+ const metaTokens = option("metaTokens", true);
25556
+ const visitor = option("visitor") || defaultVisitor;
25557
+ const dots = option("dots", false);
25558
+ const indexes = option("indexes", false);
25559
+ const _Blob = option("Blob") || typeof Blob !== "undefined" && Blob;
25560
+ const maxDepth = option("maxDepth", DEFAULT_FORM_DATA_MAX_DEPTH);
25372
25561
  const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
25373
25562
  const stack = [];
25374
25563
  if (!utils_default.isFunction(visitor)) {
@@ -25386,7 +25575,16 @@ function toFormData(obj, formData, options) {
25386
25575
  throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
25387
25576
  }
25388
25577
  if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
25389
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
25578
+ if (useBlob && typeof _Blob === "function") {
25579
+ return new _Blob([value]);
25580
+ }
25581
+ if (Buffer_default && Buffer_default.isBufferAvailable()) {
25582
+ return Buffer_default.from(value);
25583
+ }
25584
+ throw new AxiosError_default(
25585
+ "Blob is not supported. Use a Buffer instead.",
25586
+ AxiosError_default.ERR_NOT_SUPPORT
25587
+ );
25390
25588
  }
25391
25589
  return value;
25392
25590
  }
@@ -25494,9 +25692,7 @@ prototype.append = function append(name, value) {
25494
25692
  this._pairs.push([name, value]);
25495
25693
  };
25496
25694
  prototype.toString = function toString2(encoder) {
25497
- const _encode = encoder ? function(value) {
25498
- return encoder.call(this, value, encode);
25499
- } : encode;
25695
+ const _encode = encoder ? (value) => encoder.call(this, value, encode) : encode;
25500
25696
  return this._pairs.map(function each(pair) {
25501
25697
  return _encode(pair[0]) + "=" + _encode(pair[1]);
25502
25698
  }, "").join("&");
@@ -25511,6 +25707,7 @@ function buildURL(url2, params, options) {
25511
25707
  if (!params) {
25512
25708
  return url2;
25513
25709
  }
25710
+ url2 = url2 || "";
25514
25711
  const _options = utils_default.isFunction(options) ? {
25515
25712
  serialize: options
25516
25713
  } : options;
@@ -25533,9 +25730,47 @@ function buildURL(url2, params, options) {
25533
25730
  }
25534
25731
 
25535
25732
  // ../../../node_modules/axios/lib/core/InterceptorManager.js
25733
+ var $internals2 = /* @__PURE__ */ Symbol("internals");
25734
+ function countHandlers(handlers) {
25735
+ return handlers ? handlers.length : 0;
25736
+ }
25737
+ function trimHandlers(handlers) {
25738
+ if (!handlers) {
25739
+ return;
25740
+ }
25741
+ while (handlers.length && handlers[handlers.length - 1] === null) {
25742
+ handlers.pop();
25743
+ }
25744
+ }
25745
+ function syncHandlerEntries(manager, internals) {
25746
+ const handlers = manager.handlers;
25747
+ const length = countHandlers(handlers);
25748
+ if (handlers !== internals.handlersRef) {
25749
+ internals.handlersRef = handlers;
25750
+ internals.handlerEntries.clear();
25751
+ } else if (length !== internals.handlersLength) {
25752
+ if (!length) {
25753
+ internals.handlerEntries.clear();
25754
+ } else {
25755
+ internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
25756
+ if (handlers[entry.index] !== entry.handler) {
25757
+ internals.handlerEntries.delete(id);
25758
+ }
25759
+ });
25760
+ }
25761
+ }
25762
+ internals.handlersLength = length;
25763
+ }
25536
25764
  var InterceptorManager = class {
25537
25765
  constructor() {
25538
25766
  this.handlers = [];
25767
+ this[$internals2] = {
25768
+ handlersRef: this.handlers,
25769
+ handlersLength: this.handlers.length,
25770
+ handlerEntries: /* @__PURE__ */ new Map(),
25771
+ iterationDepth: 0,
25772
+ nextId: 0
25773
+ };
25539
25774
  }
25540
25775
  /**
25541
25776
  * Add a new interceptor to the stack
@@ -25547,13 +25782,25 @@ var InterceptorManager = class {
25547
25782
  * @return {Number} An ID used to remove interceptor later
25548
25783
  */
25549
25784
  use(fulfilled, rejected, options) {
25550
- this.handlers.push({
25785
+ const handler = {
25551
25786
  fulfilled,
25552
25787
  rejected,
25553
25788
  synchronous: options ? options.synchronous : false,
25554
25789
  runWhen: options ? options.runWhen : null
25790
+ };
25791
+ const internals = this[$internals2];
25792
+ if (this.handlers == null) {
25793
+ this.handlers = [];
25794
+ }
25795
+ syncHandlerEntries(this, internals);
25796
+ const id = internals.nextId++;
25797
+ this.handlers.push(handler);
25798
+ internals.handlerEntries.set(id, {
25799
+ handler,
25800
+ index: this.handlers.length - 1
25555
25801
  });
25556
- return this.handlers.length - 1;
25802
+ internals.handlersLength = this.handlers.length;
25803
+ return id;
25557
25804
  }
25558
25805
  /**
25559
25806
  * Remove an interceptor from the stack
@@ -25563,8 +25810,19 @@ var InterceptorManager = class {
25563
25810
  * @returns {void}
25564
25811
  */
25565
25812
  eject(id) {
25566
- if (this.handlers[id]) {
25567
- this.handlers[id] = null;
25813
+ const internals = this[$internals2];
25814
+ syncHandlerEntries(this, internals);
25815
+ const entry = internals.handlerEntries.get(id);
25816
+ if (entry) {
25817
+ internals.handlerEntries.delete(id);
25818
+ if (this.handlers[entry.index] !== entry.handler) {
25819
+ return;
25820
+ }
25821
+ this.handlers[entry.index] = null;
25822
+ if (!internals.iterationDepth) {
25823
+ trimHandlers(this.handlers);
25824
+ internals.handlersLength = this.handlers.length;
25825
+ }
25568
25826
  }
25569
25827
  }
25570
25828
  /**
@@ -25575,6 +25833,7 @@ var InterceptorManager = class {
25575
25833
  clear() {
25576
25834
  if (this.handlers) {
25577
25835
  this.handlers = [];
25836
+ syncHandlerEntries(this, this[$internals2]);
25578
25837
  }
25579
25838
  }
25580
25839
  /**
@@ -25588,11 +25847,22 @@ var InterceptorManager = class {
25588
25847
  * @returns {void}
25589
25848
  */
25590
25849
  forEach(fn) {
25591
- utils_default.forEach(this.handlers, function forEachHandler(h) {
25592
- if (h !== null) {
25593
- fn(h);
25850
+ const internals = this[$internals2];
25851
+ syncHandlerEntries(this, internals);
25852
+ internals.iterationDepth++;
25853
+ try {
25854
+ utils_default.forEach(this.handlers, function forEachHandler(h) {
25855
+ if (h !== null) {
25856
+ fn(h);
25857
+ }
25858
+ });
25859
+ } finally {
25860
+ if (!--internals.iterationDepth) {
25861
+ syncHandlerEntries(this, internals);
25862
+ trimHandlers(this.handlers);
25863
+ internals.handlersLength = countHandlers(this.handlers);
25594
25864
  }
25595
- });
25865
+ }
25596
25866
  }
25597
25867
  };
25598
25868
  var InterceptorManager_default = InterceptorManager;
@@ -25694,7 +25964,7 @@ function throwIfDepthExceeded(index) {
25694
25964
  }
25695
25965
  function parsePropPath(name) {
25696
25966
  const path = [];
25697
- const pattern = /\w+|\[(\w*)]/g;
25967
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
25698
25968
  let match;
25699
25969
  while ((match = pattern.exec(name)) !== null) {
25700
25970
  throwIfDepthExceeded(path.length);
@@ -25750,9 +26020,25 @@ function formDataToJSON(formData) {
25750
26020
  }
25751
26021
  var formDataToJSON_default = formDataToJSON;
25752
26022
 
26023
+ // ../../../node_modules/axios/lib/core/methodList.js
26024
+ var methodList = Object.freeze([
26025
+ "get",
26026
+ "delete",
26027
+ "head",
26028
+ "options",
26029
+ "post",
26030
+ "put",
26031
+ "patch",
26032
+ "purge",
26033
+ "link",
26034
+ "unlink",
26035
+ "query"
26036
+ ]);
26037
+ var methodList_default = methodList;
26038
+
25753
26039
  // ../../../node_modules/axios/lib/defaults/index.js
25754
26040
  var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
25755
- function stringifySafely(rawValue, parser, encoder) {
26041
+ function stringifySafely2(rawValue, parser, encoder) {
25756
26042
  if (utils_default.isString(rawValue)) {
25757
26043
  try {
25758
26044
  (parser || JSON.parse)(rawValue);
@@ -25808,7 +26094,7 @@ var defaults = {
25808
26094
  }
25809
26095
  if (isObjectPayload || hasJSONContentType) {
25810
26096
  headers.setContentType("application/json", false);
25811
- return stringifySafely(data);
26097
+ return stringifySafely2(data);
25812
26098
  }
25813
26099
  return data;
25814
26100
  }
@@ -25862,7 +26148,7 @@ var defaults = {
25862
26148
  }
25863
26149
  }
25864
26150
  };
25865
- utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
26151
+ utils_default.forEach(methodList_default, (method) => {
25866
26152
  defaults.headers[method] = {};
25867
26153
  });
25868
26154
  var defaults_default = defaults;
@@ -25930,29 +26216,62 @@ function isAbsoluteURL(url2) {
25930
26216
 
25931
26217
  // ../../../node_modules/axios/lib/helpers/combineURLs.js
25932
26218
  function combineURLs(baseURL, relativeURL) {
25933
- return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
26219
+ if (!relativeURL) {
26220
+ return baseURL;
26221
+ }
26222
+ let end = baseURL.length;
26223
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
26224
+ end--;
26225
+ }
26226
+ return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
26227
+ }
26228
+
26229
+ // ../../../node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js
26230
+ var urlParserControlCharacters = /[\t\n\r]/g;
26231
+ function normalizeURLForProtocolCheck(url2) {
26232
+ if (typeof url2 !== "string") {
26233
+ return url2;
26234
+ }
26235
+ let start = 0;
26236
+ while (start < url2.length && url2.charCodeAt(start) <= 32) {
26237
+ start++;
26238
+ }
26239
+ return url2.slice(start).replace(urlParserControlCharacters, "");
25934
26240
  }
25935
26241
 
25936
26242
  // ../../../node_modules/axios/lib/core/buildFullPath.js
25937
26243
  var malformedHttpProtocol = /^https?:(?!\/\/)/i;
25938
- var httpProtocolControlCharacters = /[\t\n\r]/g;
25939
- function stripLeadingC0ControlOrSpace(url2) {
25940
- let i = 0;
25941
- while (i < url2.length && url2.charCodeAt(i) <= 32) {
25942
- i++;
26244
+ function redactFragment(fragment) {
26245
+ if (!fragment) {
26246
+ return fragment;
25943
26247
  }
25944
- return url2.slice(i);
26248
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = "") => {
26249
+ return `${separator}${parameterName}${REDACTED}`;
26250
+ });
25945
26251
  }
25946
- function normalizeURLForProtocolCheck(url2) {
25947
- return stripLeadingC0ControlOrSpace(url2).replace(httpProtocolControlCharacters, "");
26252
+ function redactSensitiveURLParts(url2) {
26253
+ const redactedURL = url2.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
26254
+ const fragmentIndex = redactedURL.indexOf("#");
26255
+ const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
26256
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(
26257
+ /([?&][^=&#]*=)[^&#]*/g,
26258
+ `$1${REDACTED}`
26259
+ );
26260
+ if (fragmentIndex === -1) {
26261
+ return redactedURLWithoutFragment;
26262
+ }
26263
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
25948
26264
  }
25949
26265
  function assertValidHttpProtocolURL(url2, config) {
25950
- if (typeof url2 === "string" && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url2))) {
25951
- throw new AxiosError_default(
25952
- 'Invalid URL: missing "//" after protocol',
25953
- AxiosError_default.ERR_INVALID_URL,
25954
- config
25955
- );
26266
+ if (typeof url2 === "string") {
26267
+ const normalizedURL = normalizeURLForProtocolCheck(url2);
26268
+ if (malformedHttpProtocol.test(normalizedURL)) {
26269
+ throw new AxiosError_default(
26270
+ `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
26271
+ AxiosError_default.ERR_INVALID_URL,
26272
+ config
26273
+ );
26274
+ }
25956
26275
  }
25957
26276
  }
25958
26277
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
@@ -26043,7 +26362,7 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1);
26043
26362
  var import_zlib = __toESM(require("zlib"), 1);
26044
26363
 
26045
26364
  // ../../../node_modules/axios/lib/env/data.js
26046
- var VERSION = "1.18.0";
26365
+ var VERSION = "1.20.0";
26047
26366
 
26048
26367
  // ../../../node_modules/axios/lib/helpers/parseProtocol.js
26049
26368
  function parseProtocol(url2) {
@@ -26052,7 +26371,7 @@ function parseProtocol(url2) {
26052
26371
  }
26053
26372
 
26054
26373
  // ../../../node_modules/axios/lib/helpers/fromDataURI.js
26055
- var DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
26374
+ var DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
26056
26375
  function fromDataURI(uri, asBlob, options) {
26057
26376
  const _Blob = options && options.Blob || platform_default.classes.Blob;
26058
26377
  const protocol = parseProtocol(uri);
@@ -26069,13 +26388,13 @@ function fromDataURI(uri, asBlob, options) {
26069
26388
  const params = match[2];
26070
26389
  const encoding = match[3] ? "base64" : "utf8";
26071
26390
  const body = match[4];
26072
- let mime;
26391
+ let mime = "";
26073
26392
  if (type) {
26074
26393
  mime = params ? type + params : type;
26075
26394
  } else if (params) {
26076
26395
  mime = "text/plain" + params;
26077
26396
  }
26078
- const buffer = Buffer.from(decodeURIComponent(body), encoding);
26397
+ const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
26079
26398
  if (asBlob) {
26080
26399
  if (!_Blob) {
26081
26400
  throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
@@ -26090,6 +26409,20 @@ function fromDataURI(uri, asBlob, options) {
26090
26409
  // ../../../node_modules/axios/lib/adapters/http.js
26091
26410
  var import_stream5 = __toESM(require("stream"), 1);
26092
26411
 
26412
+ // ../../../node_modules/axios/lib/core/setFormDataHeaders.js
26413
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
26414
+ function setFormDataHeaders(headers, formHeaders, policy) {
26415
+ if (policy !== "content-only") {
26416
+ headers.set(formHeaders);
26417
+ return;
26418
+ }
26419
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
26420
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
26421
+ headers.set(key, val);
26422
+ }
26423
+ });
26424
+ }
26425
+
26093
26426
  // ../../../node_modules/axios/lib/helpers/AxiosTransformStream.js
26094
26427
  var import_stream2 = __toESM(require("stream"), 1);
26095
26428
  var kInternals = /* @__PURE__ */ Symbol("internals");
@@ -26351,6 +26684,7 @@ var Http2Sessions = class {
26351
26684
  }
26352
26685
  getSession(authority, options) {
26353
26686
  options = Object.assign(
26687
+ /* @__PURE__ */ Object.create(null),
26354
26688
  {
26355
26689
  sessionTimeout: 1e3
26356
26690
  },
@@ -26416,6 +26750,7 @@ var Http2Sessions = class {
26416
26750
  };
26417
26751
  }
26418
26752
  session.once("close", removeSession);
26753
+ session.once("error", removeSession);
26419
26754
  let entry = [session, options];
26420
26755
  authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
26421
26756
  return session;
@@ -26440,12 +26775,73 @@ var callbackify_default = callbackify;
26440
26775
 
26441
26776
  // ../../../node_modules/axios/lib/helpers/shouldBypassProxy.js
26442
26777
  var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
26778
+ var trimTrailingDots = (value) => {
26779
+ let end = value.length;
26780
+ while (end && value.charCodeAt(end - 1) === 46) {
26781
+ end--;
26782
+ }
26783
+ return end === value.length ? value : value.slice(0, end);
26784
+ };
26443
26785
  var isIPv4Loopback = (host) => {
26444
26786
  const parts = host.split(".");
26445
26787
  if (parts.length !== 4) return false;
26446
26788
  if (parts[0] !== "127") return false;
26447
26789
  return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
26448
26790
  };
26791
+ var parseIPv4Octet = (text) => {
26792
+ if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
26793
+ const n = parseInt(text.slice(2), 16);
26794
+ return Number.isFinite(n) ? n : null;
26795
+ }
26796
+ if (text.length > 1 && /^0[0-7]+$/.test(text)) {
26797
+ const n = parseInt(text, 8);
26798
+ return Number.isFinite(n) ? n : null;
26799
+ }
26800
+ if (text.length > 1 && /^0[0-9]+$/.test(text)) {
26801
+ return null;
26802
+ }
26803
+ if (/^[0-9]+$/.test(text)) {
26804
+ const n = parseInt(text, 10);
26805
+ return Number.isFinite(n) ? n : null;
26806
+ }
26807
+ return null;
26808
+ };
26809
+ var normalizeIPAddress = (host) => {
26810
+ if (typeof host !== "string" || !host || host.indexOf(":") !== -1) {
26811
+ return host;
26812
+ }
26813
+ let h = host;
26814
+ if (h.charAt(0) === "[" && h.charAt(h.length - 1) === "]") {
26815
+ h = h.slice(1, -1);
26816
+ }
26817
+ h = trimTrailingDots(h);
26818
+ if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
26819
+ const parts = h.split(".");
26820
+ if (parts.some((p) => p === "")) return host;
26821
+ if (parts.length === 4) {
26822
+ const octets = parts.map(parseIPv4Octet);
26823
+ if (octets.some((n) => n === null || n < 0 || n > 255)) return host;
26824
+ return octets.join(".");
26825
+ }
26826
+ if (parts.length > 4) {
26827
+ return host;
26828
+ }
26829
+ if (parts.length === 1) return host;
26830
+ const literalOctets = parts.slice(0, -1);
26831
+ const tail = parts[parts.length - 1];
26832
+ const tailSlots = 4 - literalOctets.length;
26833
+ const tailValue = parseIPv4Octet(tail);
26834
+ if (tailValue === null) return host;
26835
+ const maxTail = (1 << 8 * tailSlots) - 1;
26836
+ if (tailValue < 0 || tailValue > maxTail) return host;
26837
+ const tailOctets = new Array(tailSlots).fill(0);
26838
+ for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) {
26839
+ tailOctets[i] = v & 255;
26840
+ }
26841
+ const literal = literalOctets.map(parseIPv4Octet);
26842
+ if (literal.some((n) => n === null || n < 0 || n > 255)) return host;
26843
+ return [...literal, ...tailOctets].join(".");
26844
+ };
26449
26845
  var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
26450
26846
  var isIPv6Unspecified = (host) => {
26451
26847
  if (host === "::") return true;
@@ -26530,6 +26926,40 @@ var unmapIPv4MappedIPv6 = (host) => {
26530
26926
  }
26531
26927
  return host;
26532
26928
  };
26929
+ var IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/;
26930
+ var ipv4ToBytes = (host) => {
26931
+ const parts = host.split(".");
26932
+ return parts.length === 4 && parts.every((part) => IPV4_OCTET_RE.test(part) && Number(part) <= 255) ? parts.map(Number) : null;
26933
+ };
26934
+ var IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i;
26935
+ var ipv6ToBytes = (host) => {
26936
+ const halves = host.split("::");
26937
+ if (halves.length > 2) {
26938
+ return null;
26939
+ }
26940
+ const groups = halves[0] ? halves[0].split(":") : [];
26941
+ if (halves.length === 2) {
26942
+ const rear = halves[1] ? halves[1].split(":") : [];
26943
+ const missing = 8 - groups.length - rear.length;
26944
+ if (missing < 1) {
26945
+ return null;
26946
+ }
26947
+ groups.push(...new Array(missing).fill("0"), ...rear);
26948
+ }
26949
+ if (groups.length !== 8 || groups.some((group) => !IPV6_GROUP_RE.test(group))) {
26950
+ return null;
26951
+ }
26952
+ return groups.flatMap((group) => {
26953
+ const value = Number.parseInt(group, 16);
26954
+ return [value >> 8 & 255, value & 255];
26955
+ });
26956
+ };
26957
+ var ipToBytes = (host) => {
26958
+ if (typeof host !== "string" || !host) {
26959
+ return null;
26960
+ }
26961
+ return host.indexOf(":") !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host);
26962
+ };
26533
26963
  var normalizeNoProxyHost = (hostname) => {
26534
26964
  if (!hostname) {
26535
26965
  return hostname;
@@ -26537,7 +26967,89 @@ var normalizeNoProxyHost = (hostname) => {
26537
26967
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
26538
26968
  hostname = hostname.slice(1, -1);
26539
26969
  }
26540
- return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
26970
+ const trimmed = trimTrailingDots(hostname);
26971
+ const ipv4 = normalizeIPAddress(trimmed);
26972
+ if (ipv4 !== trimmed) {
26973
+ return ipv4;
26974
+ }
26975
+ return unmapIPv4MappedIPv6(trimmed);
26976
+ };
26977
+ var normalizeCidrBase = (input) => {
26978
+ let base = input;
26979
+ const startsBracket = base.charAt(0) === "[";
26980
+ const endsBracket = base.charAt(base.length - 1) === "]";
26981
+ const hasBracket = base.includes("[") || base.includes("]");
26982
+ if (startsBracket || endsBracket) {
26983
+ if (!startsBracket || !endsBracket) {
26984
+ return null;
26985
+ }
26986
+ base = base.slice(1, -1);
26987
+ if (base.indexOf(":") === -1 || base.includes("[") || base.includes("]")) {
26988
+ return null;
26989
+ }
26990
+ } else if (hasBracket) {
26991
+ return null;
26992
+ }
26993
+ if (!base || base.charAt(base.length - 1) === ".") {
26994
+ return null;
26995
+ }
26996
+ const wasIPv6 = base.indexOf(":") !== -1;
26997
+ if (wasIPv6) {
26998
+ try {
26999
+ base = new URL(`http://[${base}]/`).hostname.slice(1, -1);
27000
+ } catch (_err) {
27001
+ return null;
27002
+ }
27003
+ } else {
27004
+ base = normalizeIPAddress(base);
27005
+ if (!ipv4ToBytes(base)) {
27006
+ return null;
27007
+ }
27008
+ }
27009
+ return { normalized: unmapIPv4MappedIPv6(base), wasIPv6 };
27010
+ };
27011
+ var CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/;
27012
+ var parseCidrEntry = (entry) => {
27013
+ if (entry.indexOf("/") === -1) {
27014
+ return void 0;
27015
+ }
27016
+ const match = CIDR_ENTRY_RE.exec(entry);
27017
+ if (!match) {
27018
+ return null;
27019
+ }
27020
+ let prefix = Number(match[2]);
27021
+ const parsedBase = normalizeCidrBase(match[1]);
27022
+ if (!parsedBase) {
27023
+ return null;
27024
+ }
27025
+ const { normalized, wasIPv6 } = parsedBase;
27026
+ if (wasIPv6 && normalized.indexOf(":") === -1) {
27027
+ if (prefix < 96) {
27028
+ return null;
27029
+ }
27030
+ prefix -= 96;
27031
+ }
27032
+ const bytes = ipToBytes(normalized);
27033
+ if (!bytes || prefix > bytes.length * 8) {
27034
+ return null;
27035
+ }
27036
+ return { bytes, prefix };
27037
+ };
27038
+ var isInSubnet = (addressBytes, networkBytes, prefix) => {
27039
+ const fullBytes = prefix >> 3;
27040
+ for (let i = 0; i < fullBytes; i++) {
27041
+ if (addressBytes[i] !== networkBytes[i]) {
27042
+ return false;
27043
+ }
27044
+ }
27045
+ const remainingBits = prefix & 7;
27046
+ if (remainingBits) {
27047
+ const mask = 255 << 8 - remainingBits & 255;
27048
+ if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) {
27049
+ return false;
27050
+ }
27051
+ }
27052
+ return true;
26541
27053
  };
26542
27054
  function shouldBypassProxy(location) {
26543
27055
  let parsed;
@@ -26555,10 +27067,18 @@ function shouldBypassProxy(location) {
26555
27067
  }
26556
27068
  const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
26557
27069
  const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
27070
+ const hostnameBytes = ipToBytes(hostname);
26558
27071
  return noProxy.split(/[\s,]+/).some((entry) => {
26559
27072
  if (!entry) {
26560
27073
  return false;
26561
27074
  }
27075
+ if (entry === "*") {
27076
+ return true;
27077
+ }
27078
+ const cidr = parseCidrEntry(entry);
27079
+ if (cidr !== void 0) {
27080
+ return cidr !== null && !!hostnameBytes && hostnameBytes.length === cidr.bytes.length && isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix);
27081
+ }
26562
27082
  let [entryHost, entryPort] = parseNoProxyEntry(entry);
26563
27083
  entryHost = normalizeNoProxyHost(entryHost);
26564
27084
  if (!entryHost) {
@@ -26644,7 +27164,8 @@ function throttle(fn, freq) {
26644
27164
  }
26645
27165
  };
26646
27166
  const flush = () => lastArgs && invoke(lastArgs);
26647
- return [throttled, flush];
27167
+ const flushWith = (...args2) => invoke(args2);
27168
+ return [throttled, flush, flushWith];
26648
27169
  }
26649
27170
  var throttle_default = throttle;
26650
27171
 
@@ -26653,12 +27174,12 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
26653
27174
  let bytesNotified = 0;
26654
27175
  const _speedometer = speedometer_default(50, 250);
26655
27176
  return throttle_default((e) => {
26656
- if (!e || typeof e.loaded !== "number") {
27177
+ if (!e || !utils_default.isNumber(e.loaded)) {
26657
27178
  return;
26658
27179
  }
26659
27180
  const rawLoaded = e.loaded;
26660
27181
  const total = e.lengthComputable ? e.total : void 0;
26661
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
27182
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
26662
27183
  const progressBytes = Math.max(0, loaded - bytesNotified);
26663
27184
  const rate = _speedometer(progressBytes);
26664
27185
  bytesNotified = Math.max(bytesNotified, loaded);
@@ -26687,12 +27208,66 @@ var progressEventDecorator = (total, throttled) => {
26687
27208
  throttled[1]
26688
27209
  ];
26689
27210
  };
26690
- var asyncDecorator = (fn) => (...args2) => utils_default.asap(() => fn(...args2));
27211
+ var asyncDecorator = (fn, scheduler = utils_default.asap) => (...args2) => scheduler(() => fn(...args2));
26691
27212
 
26692
27213
  // ../../../node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
26693
27214
  var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
26694
27215
  var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
26695
- function estimateDataURLDecodedBytes(url2) {
27216
+ var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
27217
+ var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || // A-Z
27218
+ charCode >= 97 && charCode <= 122 || // a-z
27219
+ charCode >= 48 && charCode <= 57 || // 0-9
27220
+ charCode === 43 || // +
27221
+ charCode === 47 || // /
27222
+ charCode === 45 || // - (base64url)
27223
+ charCode === 95;
27224
+ var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
27225
+ var base64Bytes = (significant) => {
27226
+ const groups = Math.floor(significant / 4);
27227
+ const remainder = significant % 4;
27228
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
27229
+ };
27230
+ var estimateBase64BufferAllocation = (body) => {
27231
+ const len = body.length;
27232
+ let padding = 0;
27233
+ if (len > 0 && body.charCodeAt(len - 1) === 61) {
27234
+ padding++;
27235
+ if (len > 1 && body.charCodeAt(len - 2) === 61) {
27236
+ padding++;
27237
+ }
27238
+ }
27239
+ return Math.floor((len - padding) * 3 / 4);
27240
+ };
27241
+ var estimatePercentDecodedBase64Bytes = (body) => {
27242
+ const len = body.length;
27243
+ let significant = 0;
27244
+ let padding = 0;
27245
+ let invalid = false;
27246
+ for (let i = 0; i < len; i++) {
27247
+ let code = body.charCodeAt(i);
27248
+ if (code === 37 && isPercentEncodedByte(body, i, len)) {
27249
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
27250
+ i += 2;
27251
+ }
27252
+ if (isBase64Whitespace(code)) {
27253
+ continue;
27254
+ }
27255
+ if (code === 61) {
27256
+ padding++;
27257
+ continue;
27258
+ }
27259
+ if (!isBase64Char(code) || padding > 0) {
27260
+ invalid = true;
27261
+ continue;
27262
+ }
27263
+ significant++;
27264
+ }
27265
+ if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) {
27266
+ return estimateBase64BufferAllocation(body);
27267
+ }
27268
+ return base64Bytes(significant);
27269
+ };
27270
+ var estimateDataURLBytes = (url2, estimateBase64) => {
26696
27271
  if (!url2 || typeof url2 !== "string") return 0;
26697
27272
  if (!url2.startsWith("data:")) return 0;
26698
27273
  const comma = url2.indexOf(",");
@@ -26701,43 +27276,7 @@ function estimateDataURLDecodedBytes(url2) {
26701
27276
  const body = url2.slice(comma + 1);
26702
27277
  const isBase64 = /;base64/i.test(meta);
26703
27278
  if (isBase64) {
26704
- let effectiveLen = body.length;
26705
- const len = body.length;
26706
- for (let i = 0; i < len; i++) {
26707
- if (body.charCodeAt(i) === 37 && i + 2 < len) {
26708
- const a = body.charCodeAt(i + 1);
26709
- const b = body.charCodeAt(i + 2);
26710
- const isHex = isHexDigit(a) && isHexDigit(b);
26711
- if (isHex) {
26712
- effectiveLen -= 2;
26713
- i += 2;
26714
- }
26715
- }
26716
- }
26717
- let pad = 0;
26718
- let idx = len - 1;
26719
- const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%'
26720
- body.charCodeAt(j - 1) === 51 && // '3'
26721
- (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
26722
- if (idx >= 0) {
26723
- if (body.charCodeAt(idx) === 61) {
26724
- pad++;
26725
- idx--;
26726
- } else if (tailIsPct3D(idx)) {
26727
- pad++;
26728
- idx -= 3;
26729
- }
26730
- }
26731
- if (pad === 1 && idx >= 0) {
26732
- if (body.charCodeAt(idx) === 61) {
26733
- pad++;
26734
- } else if (tailIsPct3D(idx)) {
26735
- pad++;
26736
- }
26737
- }
26738
- const groups = Math.floor(effectiveLen / 4);
26739
- const bytes2 = groups * 3 - (pad || 0);
26740
- return bytes2 > 0 ? bytes2 : 0;
27279
+ return estimateBase64(body);
26741
27280
  }
26742
27281
  let bytes = 0;
26743
27282
  for (let i = 0, len = body.length; i < len; i++) {
@@ -26762,6 +27301,16 @@ function estimateDataURLDecodedBytes(url2) {
26762
27301
  }
26763
27302
  }
26764
27303
  return bytes;
27304
+ };
27305
+ function estimateDataURLDecodedBytes(url2) {
27306
+ const fragmentIndex = typeof url2 === "string" ? url2.indexOf("#") : -1;
27307
+ return estimateDataURLBytes(
27308
+ fragmentIndex === -1 ? url2 : url2.slice(0, fragmentIndex),
27309
+ estimatePercentDecodedBase64Bytes
27310
+ );
27311
+ }
27312
+ function estimateDataURLBufferAllocation(url2) {
27313
+ return estimateDataURLBytes(url2, estimateBase64BufferAllocation);
26765
27314
  }
26766
27315
 
26767
27316
  // ../../../node_modules/axios/lib/adapters/http.js
@@ -26781,25 +27330,49 @@ var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotl
26781
27330
  var isZstdSupported = utils_default.isFunction(import_zlib.default.createZstdDecompress);
26782
27331
  var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
26783
27332
  var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
27333
+ var scheduleProgress = typeof process !== "undefined" && process.nextTick ? process.nextTick.bind(process) : utils_default.asap;
26784
27334
  var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
26785
27335
  var isHttps = /https:?/;
26786
- var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
26787
- function setFormDataHeaders(headers, formHeaders, policy) {
26788
- if (policy !== "content-only") {
26789
- headers.set(formHeaders);
26790
- return;
26791
- }
26792
- Object.entries(formHeaders).forEach(([key, val]) => {
26793
- if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
26794
- headers.set(key, val);
26795
- }
26796
- });
26797
- }
26798
27336
  var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
26799
27337
  var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
27338
+ function handleSocketError(err) {
27339
+ const current2 = this[kAxiosCurrentReq];
27340
+ if (current2 && !current2.destroyed) {
27341
+ current2.destroy(err);
27342
+ }
27343
+ }
26800
27344
  var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
26801
27345
  var tunnelingAgentCache = /* @__PURE__ */ new Map();
26802
27346
  var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
27347
+ var NODE_NATIVE_ENV_PROXY_SUPPORT = {
27348
+ 22: 21,
27349
+ 24: 5
27350
+ };
27351
+ function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
27352
+ if (!nodeVersion) {
27353
+ return false;
27354
+ }
27355
+ const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
27356
+ if (!Number.isInteger(major) || !Number.isInteger(minor)) {
27357
+ return false;
27358
+ }
27359
+ if (major > 24) {
27360
+ return true;
27361
+ }
27362
+ return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
27363
+ }
27364
+ function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
27365
+ if (!isNodeNativeEnvProxySupported(nodeVersion)) {
27366
+ return false;
27367
+ }
27368
+ const agentOptions = agent && agent.options;
27369
+ return Boolean(
27370
+ agentOptions && utils_default.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null
27371
+ );
27372
+ }
27373
+ function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
27374
+ return isHttps.test(options.protocol) ? configHttpsAgent || import_https.default.globalAgent : configHttpAgent || import_http.default.globalAgent;
27375
+ }
26803
27376
  function getTunnelingAgent(agentOptions, userHttpsAgent) {
26804
27377
  const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
26805
27378
  const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
@@ -26870,9 +27443,10 @@ function isSameOriginRedirect(redirectOptions, requestDetails) {
26870
27443
  return false;
26871
27444
  }
26872
27445
  }
26873
- function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) {
27446
+ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent, allowEnvProxy = true) {
26874
27447
  let proxy = configProxy;
26875
- if (!proxy && proxy !== false) {
27448
+ const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
27449
+ if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
26876
27450
  const proxyUrl = getProxyForUrl(location);
26877
27451
  if (proxyUrl) {
26878
27452
  if (!shouldBypassProxy(location)) {
@@ -26963,8 +27537,19 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent)
26963
27537
  }
26964
27538
  }
26965
27539
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
26966
- setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
27540
+ setProxy(
27541
+ redirectOptions,
27542
+ configProxy,
27543
+ redirectOptions.href,
27544
+ true,
27545
+ configHttpsAgent,
27546
+ configHttpAgent,
27547
+ allowEnvProxy
27548
+ );
26967
27549
  };
27550
+ return Boolean(
27551
+ proxy || configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent)
27552
+ );
26968
27553
  }
26969
27554
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
26970
27555
  var wrapAsync = (asyncExecutor) => {
@@ -26989,7 +27574,7 @@ var wrapAsync = (asyncExecutor) => {
26989
27574
  };
26990
27575
  var resolveFamily = ({ address, family }) => {
26991
27576
  if (!utils_default.isString(address)) {
26992
- throw TypeError("address must be a string");
27577
+ throw new AxiosError_default("address must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE);
26993
27578
  }
26994
27579
  return {
26995
27580
  address,
@@ -26997,6 +27582,30 @@ var resolveFamily = ({ address, family }) => {
26997
27582
  };
26998
27583
  };
26999
27584
  var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
27585
+ var normalizedLookupCache = /* @__PURE__ */ new WeakMap();
27586
+ var normalizeLookup = (lookup) => {
27587
+ let normalized = normalizedLookupCache.get(lookup);
27588
+ if (normalized) {
27589
+ return normalized;
27590
+ }
27591
+ const callbackLookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
27592
+ normalized = (hostname, opt, cb) => {
27593
+ callbackLookup(hostname, opt, (err, arg0, arg1) => {
27594
+ if (err) {
27595
+ return cb(err);
27596
+ }
27597
+ let addresses;
27598
+ try {
27599
+ addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
27600
+ } catch (error) {
27601
+ return cb(error);
27602
+ }
27603
+ opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
27604
+ });
27605
+ };
27606
+ normalizedLookupCache.set(lookup, normalized);
27607
+ return normalized;
27608
+ };
27000
27609
  var http2Transport = {
27001
27610
  request(options, cb) {
27002
27611
  const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
@@ -27033,11 +27642,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
27033
27642
  let family = own2("family");
27034
27643
  let httpVersion = own2("httpVersion");
27035
27644
  if (httpVersion === void 0) httpVersion = 1;
27645
+ const rawHttpVersion = httpVersion;
27036
27646
  let http2Options = own2("http2Options");
27037
- const responseType = own2("responseType");
27038
- const responseEncoding = own2("responseEncoding");
27039
27647
  const httpAgent = own2("httpAgent");
27040
27648
  const httpsAgent = own2("httpsAgent");
27649
+ const configProxy = own2("proxy");
27650
+ const responseType = own2("responseType");
27651
+ const responseEncoding = own2("responseEncoding");
27652
+ const socketPath = own2("socketPath");
27041
27653
  const method = own2("method").toUpperCase();
27042
27654
  const maxRedirects = own2("maxRedirects");
27043
27655
  const maxBodyLength = own2("maxBodyLength");
@@ -27047,25 +27659,32 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
27047
27659
  let rejected = false;
27048
27660
  let req;
27049
27661
  let connectPhaseTimer;
27050
- httpVersion = +httpVersion;
27662
+ try {
27663
+ httpVersion = +httpVersion;
27664
+ } catch (err) {
27665
+ throw new AxiosError_default(
27666
+ "Invalid protocol version: value is not a number",
27667
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
27668
+ config
27669
+ );
27670
+ }
27051
27671
  if (Number.isNaN(httpVersion)) {
27052
- throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
27672
+ throw new AxiosError_default(
27673
+ `Invalid protocol version: '${rawHttpVersion}' is not a number`,
27674
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
27675
+ config
27676
+ );
27053
27677
  }
27054
27678
  if (httpVersion !== 1 && httpVersion !== 2) {
27055
- throw TypeError(`Unsupported protocol version '${httpVersion}'`);
27679
+ throw new AxiosError_default(
27680
+ `Unsupported protocol version '${httpVersion}'`,
27681
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
27682
+ config
27683
+ );
27056
27684
  }
27057
27685
  const isHttp2 = httpVersion === 2;
27058
27686
  if (lookup) {
27059
- const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
27060
- lookup = (hostname, opt, cb) => {
27061
- _lookup(hostname, opt, (err, arg0, arg1) => {
27062
- if (err) {
27063
- return cb(err);
27064
- }
27065
- const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
27066
- opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
27067
- });
27068
- };
27687
+ lookup = normalizeLookup(lookup);
27069
27688
  }
27070
27689
  const abortEmitter = new import_events.EventEmitter();
27071
27690
  function abort(reason) {
@@ -27133,12 +27752,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
27133
27752
  }
27134
27753
  });
27135
27754
  const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
27136
- const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
27755
+ const urlBase = socketPath ? "http://localhost" : platform_default.hasBrowserEnv ? platform_default.origin : void 0;
27756
+ const parsed = new URL(fullPath, urlBase);
27137
27757
  const protocol = parsed.protocol || supportedProtocols[0];
27138
27758
  if (protocol === "data:") {
27139
27759
  if (maxContentLength > -1) {
27140
27760
  const dataUrl = String(own2("url") || fullPath || "");
27141
- const estimated = estimateDataURLDecodedBytes(dataUrl);
27761
+ const estimated = estimateDataURLBufferAllocation(dataUrl);
27142
27762
  if (estimated > maxContentLength) {
27143
27763
  return reject(
27144
27764
  new AxiosError_default(
@@ -27269,7 +27889,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
27269
27889
  data,
27270
27890
  progressEventDecorator(
27271
27891
  contentLength,
27272
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
27892
+ progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3)
27273
27893
  )
27274
27894
  )
27275
27895
  );
@@ -27295,17 +27915,21 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
27295
27915
  own2("paramsSerializer")
27296
27916
  ).replace(/^\?/, "");
27297
27917
  } catch (err) {
27298
- const customErr = new Error(err.message);
27299
- customErr.config = config;
27300
- customErr.url = own2("url");
27301
- customErr.exists = true;
27302
- return reject(customErr);
27918
+ return reject(
27919
+ AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config, null, null, {
27920
+ url: own2("url"),
27921
+ exists: true
27922
+ })
27923
+ );
27303
27924
  }
27304
27925
  headers.set(
27305
27926
  "Accept-Encoding",
27306
27927
  utils_default.hasOwnProp(transitional2, "advertiseZstdAcceptEncoding") && transitional2.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING,
27307
27928
  false
27308
27929
  );
27930
+ if (isHttp2 && lookup) {
27931
+ http2Options = Object.assign(/* @__PURE__ */ Object.create(null), http2Options, { lookup });
27932
+ }
27309
27933
  const options = Object.assign(/* @__PURE__ */ Object.create(null), {
27310
27934
  path,
27311
27935
  method,
@@ -27316,10 +27940,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
27316
27940
  family,
27317
27941
  beforeRedirect: dispatchBeforeRedirect,
27318
27942
  beforeRedirects: /* @__PURE__ */ Object.create(null),
27319
- http2Options
27943
+ http2Options,
27944
+ createConnection: void 0
27320
27945
  });
27321
27946
  !utils_default.isUndefined(lookup) && (options.lookup = lookup);
27322
- const socketPath = own2("socketPath");
27947
+ let proxyApplied = false;
27323
27948
  if (socketPath) {
27324
27949
  if (typeof socketPath !== "string") {
27325
27950
  return reject(
@@ -27347,12 +27972,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
27347
27972
  } else {
27348
27973
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
27349
27974
  options.port = parsed.port;
27350
- setProxy(
27975
+ proxyApplied = setProxy(
27351
27976
  options,
27352
- own2("proxy"),
27977
+ configProxy,
27353
27978
  protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path,
27354
27979
  false,
27355
- httpsAgent
27980
+ httpsAgent,
27981
+ httpAgent,
27982
+ // The HTTP/2 transport connects independently of HTTP/1 agents, so it
27983
+ // cannot apply either axios-resolved or agent-local environment proxies.
27984
+ // Explicit proxy config is still processed and rejected below.
27985
+ !isHttp2
27356
27986
  );
27357
27987
  }
27358
27988
  let transport;
@@ -27363,6 +27993,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
27363
27993
  options.agent = isHttpsRequest ? httpsAgent : httpAgent;
27364
27994
  }
27365
27995
  if (isHttp2) {
27996
+ if (proxyApplied) {
27997
+ return reject(
27998
+ new AxiosError_default(
27999
+ "HTTP/2 requests with a proxy are not supported",
28000
+ AxiosError_default.ERR_NOT_SUPPORT,
28001
+ config
28002
+ )
28003
+ );
28004
+ }
27366
28005
  transport = http2Transport;
27367
28006
  } else {
27368
28007
  const configTransport = own2("transport");
@@ -27450,7 +28089,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
27450
28089
  transformStream,
27451
28090
  progressEventDecorator(
27452
28091
  responseLength,
27453
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
28092
+ progressEventReducer(
28093
+ asyncDecorator(onDownloadProgress, scheduleProgress),
28094
+ true,
28095
+ 3
28096
+ )
27454
28097
  )
27455
28098
  )
27456
28099
  );
@@ -27595,14 +28238,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
27595
28238
  });
27596
28239
  const boundSockets = /* @__PURE__ */ new Set();
27597
28240
  req.on("socket", function handleRequestSocket(socket) {
27598
- socket.setKeepAlive(true, 1e3 * 60);
28241
+ if (typeof socket.setKeepAlive === "function") {
28242
+ socket.setKeepAlive(true, 1e3 * 60);
28243
+ }
27599
28244
  if (!socket[kAxiosSocketListener]) {
27600
- socket.on("error", function handleSocketError(err) {
27601
- const current2 = socket[kAxiosCurrentReq];
27602
- if (current2 && !current2.destroyed) {
27603
- current2.destroy(err);
27604
- }
27605
- });
28245
+ socket.on("error", handleSocketError);
27606
28246
  socket[kAxiosSocketListener] = true;
27607
28247
  }
27608
28248
  socket[kAxiosCurrentReq] = req;
@@ -27734,7 +28374,11 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
27734
28374
  const cookie = cookies[i].replace(/^\s+/, "");
27735
28375
  const eq = cookie.indexOf("=");
27736
28376
  if (eq !== -1 && cookie.slice(0, eq) === name) {
27737
- return decodeURIComponent(cookie.slice(eq + 1));
28377
+ try {
28378
+ return decodeURIComponent(cookie.slice(eq + 1));
28379
+ } catch (e) {
28380
+ return cookie.slice(eq + 1);
28381
+ }
27738
28382
  }
27739
28383
  }
27740
28384
  return null;
@@ -27758,7 +28402,18 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
27758
28402
 
27759
28403
  // ../../../node_modules/axios/lib/core/mergeConfig.js
27760
28404
  var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
28405
+ var ownEnumerableKeys = (thing) => {
28406
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
28407
+ return Object.keys(thing).concat(
28408
+ Object.getOwnPropertySymbols(thing).filter(
28409
+ (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
28410
+ )
28411
+ );
28412
+ }
28413
+ return Object.keys(thing);
28414
+ };
27761
28415
  function mergeConfig(config1, config2) {
28416
+ config1 = config1 || {};
27762
28417
  config2 = config2 || {};
27763
28418
  const config = /* @__PURE__ */ Object.create(null);
27764
28419
  Object.defineProperty(config, "hasOwnProperty", {
@@ -27832,7 +28487,7 @@ function mergeConfig(config1, config2) {
27832
28487
  transformResponse: defaultToConfig2,
27833
28488
  paramsSerializer: defaultToConfig2,
27834
28489
  timeout: defaultToConfig2,
27835
- timeoutMessage: defaultToConfig2,
28490
+ timeoutErrorMessage: defaultToConfig2,
27836
28491
  withCredentials: defaultToConfig2,
27837
28492
  withXSRFToken: defaultToConfig2,
27838
28493
  adapter: defaultToConfig2,
@@ -27855,7 +28510,7 @@ function mergeConfig(config1, config2) {
27855
28510
  validateStatus: mergeDirectKeys,
27856
28511
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
27857
28512
  };
27858
- utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
28513
+ utils_default.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
27859
28514
  if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
27860
28515
  const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
27861
28516
  const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
@@ -27874,18 +28529,6 @@ function mergeConfig(config1, config2) {
27874
28529
  }
27875
28530
 
27876
28531
  // ../../../node_modules/axios/lib/helpers/resolveConfig.js
27877
- var FORM_DATA_CONTENT_HEADERS2 = ["content-type", "content-length"];
27878
- function setFormDataHeaders2(headers, formHeaders, policy) {
27879
- if (policy !== "content-only") {
27880
- headers.set(formHeaders);
27881
- return;
27882
- }
27883
- Object.entries(formHeaders).forEach(([key, val]) => {
27884
- if (FORM_DATA_CONTENT_HEADERS2.includes(key.toLowerCase())) {
27885
- headers.set(key, val);
27886
- }
27887
- });
27888
- }
27889
28532
  var encodeUTF8 = (str) => encodeURIComponent(str).replace(
27890
28533
  /%([0-9A-F]{2})/gi,
27891
28534
  (_, hex) => String.fromCharCode(parseInt(hex, 16))
@@ -27911,16 +28554,21 @@ function resolveConfig(config) {
27911
28554
  if (auth) {
27912
28555
  const username = utils_default.getSafeProp(auth, "username") || "";
27913
28556
  const password = utils_default.getSafeProp(auth, "password") || "";
27914
- headers.set(
27915
- "Authorization",
27916
- "Basic " + btoa(username + ":" + (password ? encodeUTF8(password) : ""))
27917
- );
28557
+ try {
28558
+ headers.set(
28559
+ "Authorization",
28560
+ "Basic " + btoa(username + ":" + (password ? encodeUTF8(password) : ""))
28561
+ );
28562
+ } catch (e) {
28563
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_OPTION_VALUE, config);
28564
+ }
27918
28565
  }
27919
28566
  if (utils_default.isFormData(data)) {
28567
+ const getHeaders = utils_default.getSafeProp(data, "getHeaders");
27920
28568
  if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) {
27921
28569
  headers.setContentType(void 0);
27922
- } else if (utils_default.isFunction(data.getHeaders)) {
27923
- setFormDataHeaders2(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
28570
+ } else if (utils_default.isFunction(getHeaders)) {
28571
+ setFormDataHeaders(headers, getHeaders.call(data), own2("formDataHeaderPolicy"));
27924
28572
  }
27925
28573
  }
27926
28574
  if (platform_default.hasStandardBrowserEnv) {
@@ -27949,7 +28597,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
27949
28597
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
27950
28598
  let onCanceled;
27951
28599
  let uploadThrottled, downloadThrottled;
27952
- let flushUpload, flushDownload;
28600
+ let flushUpload, flushDownload, flushDownloadWithEvent;
27953
28601
  function done() {
27954
28602
  flushUpload && flushUpload();
27955
28603
  flushDownload && flushDownload();
@@ -27959,7 +28607,27 @@ var xhr_default = isXHRAdapterSupported && function(config) {
27959
28607
  let request = new XMLHttpRequest();
27960
28608
  request.open(_config.method.toUpperCase(), _config.url, true);
27961
28609
  request.timeout = _config.timeout;
27962
- function onloadend() {
28610
+ function onloadend(event) {
28611
+ if (!request) {
28612
+ return;
28613
+ }
28614
+ if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform_default.origin)) !== "file" && !(request.responseURL && request.responseURL.startsWith("file:"))) {
28615
+ reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
28616
+ done();
28617
+ request = null;
28618
+ return;
28619
+ }
28620
+ try {
28621
+ if (event) {
28622
+ flushDownloadWithEvent && flushDownloadWithEvent(event);
28623
+ } else {
28624
+ flushDownload && flushDownload();
28625
+ }
28626
+ } catch (err) {
28627
+ setTimeout(() => {
28628
+ throw err;
28629
+ });
28630
+ }
27963
28631
  if (!request) {
27964
28632
  return;
27965
28633
  }
@@ -28047,7 +28715,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
28047
28715
  request.responseType = _config.responseType;
28048
28716
  }
28049
28717
  if (onDownloadProgress) {
28050
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
28718
+ [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(
28719
+ onDownloadProgress,
28720
+ true
28721
+ );
28051
28722
  request.addEventListener("progress", downloadThrottled);
28052
28723
  }
28053
28724
  if (onUploadProgress && request.upload) {
@@ -28079,6 +28750,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
28079
28750
  config
28080
28751
  )
28081
28752
  );
28753
+ done();
28082
28754
  return;
28083
28755
  }
28084
28756
  request.send(requestData || null);
@@ -28118,7 +28790,16 @@ var composeSignals = (signals2, timeout) => {
28118
28790
  });
28119
28791
  signals2 = null;
28120
28792
  };
28121
- signals2.forEach((signal2) => signal2.addEventListener("abort", onabort));
28793
+ signals2.forEach((signal2) => {
28794
+ if (aborted) {
28795
+ return;
28796
+ }
28797
+ if (signal2.aborted) {
28798
+ onabort.call(signal2);
28799
+ return;
28800
+ }
28801
+ signal2.addEventListener("abort", onabort, { once: true });
28802
+ });
28122
28803
  const { signal } = controller;
28123
28804
  signal.unsubscribe = () => utils_default.asap(unsubscribe);
28124
28805
  return signal;
@@ -28207,6 +28888,17 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
28207
28888
 
28208
28889
  // ../../../node_modules/axios/lib/adapters/fetch.js
28209
28890
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
28891
+ var DEFAULT_REQUEST_OPTIONS = {
28892
+ cache: "default",
28893
+ redirect: "follow",
28894
+ referrer: "about:client",
28895
+ referrerPolicy: "",
28896
+ mode: "cors",
28897
+ integrity: "",
28898
+ keepalive: false,
28899
+ priority: "auto",
28900
+ window: null
28901
+ };
28210
28902
  var { isFunction: isFunction2 } = utils_default;
28211
28903
  var encodeUTF82 = (str) => encodeURIComponent(str).replace(
28212
28904
  /%([0-9A-F]{2})/gi,
@@ -28337,7 +29029,8 @@ var factory = (env2) => {
28337
29029
  withCredentials = "same-origin",
28338
29030
  fetchOptions,
28339
29031
  maxContentLength,
28340
- maxBodyLength
29032
+ maxBodyLength,
29033
+ maxRedirects
28341
29034
  } = resolveConfig_default(config);
28342
29035
  const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
28343
29036
  const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
@@ -28467,17 +29160,44 @@ var factory = (env2) => {
28467
29160
  }
28468
29161
  }
28469
29162
  headers.set("User-Agent", "axios/" + VERSION, false);
28470
- const resolvedOptions = {
28471
- ...fetchOptions,
29163
+ const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(/* @__PURE__ */ Object.create(null), fetchOptions);
29164
+ if (safeFetchOptions) {
29165
+ delete safeFetchOptions.body;
29166
+ delete safeFetchOptions.headers;
29167
+ delete safeFetchOptions.method;
29168
+ delete safeFetchOptions.signal;
29169
+ delete safeFetchOptions.duplex;
29170
+ delete safeFetchOptions.credentials;
29171
+ }
29172
+ const resolvedOptions = Object.assign(/* @__PURE__ */ Object.create(null), safeFetchOptions, {
28472
29173
  signal: composedSignal,
28473
29174
  method: method.toUpperCase(),
28474
29175
  headers: toByteStringHeaderObject(headers.normalize()),
28475
29176
  body: data,
28476
29177
  duplex: "half",
28477
29178
  credentials: isCredentialsSupported ? withCredentials : void 0
28478
- };
29179
+ });
29180
+ if (isRequestSupported) {
29181
+ utils_default.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
29182
+ if (resolvedOptions[key] === void 0) {
29183
+ resolvedOptions[key] = value;
29184
+ }
29185
+ });
29186
+ if (resolvedOptions.signal === void 0) {
29187
+ resolvedOptions.signal = null;
29188
+ }
29189
+ if (resolvedOptions.body === void 0) {
29190
+ resolvedOptions.body = null;
29191
+ }
29192
+ }
29193
+ if (maxRedirects === 0) {
29194
+ resolvedOptions.redirect = "manual";
29195
+ if (safeFetchOptions) {
29196
+ safeFetchOptions.redirect = "manual";
29197
+ }
29198
+ }
28479
29199
  request = isRequestSupported && new Request(url2, resolvedOptions);
28480
- let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
29200
+ let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url2, resolvedOptions));
28481
29201
  const responseHeaders = AxiosHeaders_default.from(response.headers);
28482
29202
  if (hasMaxContentLength) {
28483
29203
  const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
@@ -28566,7 +29286,15 @@ var factory = (env2) => {
28566
29286
  const canceledError = composedSignal.reason;
28567
29287
  canceledError.config = config;
28568
29288
  request && (canceledError.request = request);
28569
- err !== canceledError && (canceledError.cause = err);
29289
+ if (err !== canceledError) {
29290
+ Object.defineProperty(canceledError, "cause", {
29291
+ __proto__: null,
29292
+ value: err,
29293
+ writable: true,
29294
+ enumerable: false,
29295
+ configurable: true
29296
+ });
29297
+ }
28570
29298
  throw canceledError;
28571
29299
  }
28572
29300
  if (pendingBodyError) {
@@ -28578,18 +29306,21 @@ var factory = (env2) => {
28578
29306
  throw err;
28579
29307
  }
28580
29308
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
28581
- throw Object.assign(
28582
- new AxiosError_default(
28583
- "Network Error",
28584
- AxiosError_default.ERR_NETWORK,
28585
- config,
28586
- request,
28587
- err && err.response
28588
- ),
28589
- {
28590
- cause: err.cause || err
28591
- }
29309
+ const networkError = new AxiosError_default(
29310
+ "Network Error",
29311
+ AxiosError_default.ERR_NETWORK,
29312
+ config,
29313
+ request,
29314
+ err && err.response
28592
29315
  );
29316
+ Object.defineProperty(networkError, "cause", {
29317
+ __proto__: null,
29318
+ value: err.cause || err,
29319
+ writable: true,
29320
+ enumerable: false,
29321
+ configurable: true
29322
+ });
29323
+ throw networkError;
28593
29324
  }
28594
29325
  throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
28595
29326
  }
@@ -28658,7 +29389,7 @@ function getAdapter(adapters, config) {
28658
29389
  let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
28659
29390
  throw new AxiosError_default(
28660
29391
  `There is no suitable adapter to dispatch the request ` + s,
28661
- "ERR_NOT_SUPPORT"
29392
+ AxiosError_default.ERR_NOT_SUPPORT
28662
29393
  );
28663
29394
  }
28664
29395
  return adapter2;
@@ -28685,9 +29416,10 @@ function throwIfCancellationRequested(config) {
28685
29416
  throw new CanceledError_default(null, config);
28686
29417
  }
28687
29418
  }
28688
- function dispatchRequest(config) {
29419
+ function dispatchRequest(_config) {
29420
+ const config = utils_default.toSafeFlatObject(_config);
28689
29421
  throwIfCancellationRequested(config);
28690
- config.headers = AxiosHeaders_default.from(config.headers);
29422
+ config.headers = AxiosHeaders_default.from(utils_default.getSafeProp(config, "headers"));
28691
29423
  config.data = transformData.call(config, config.transformRequest);
28692
29424
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
28693
29425
  config.headers.setContentType("application/x-www-form-urlencoded", false);
@@ -28765,7 +29497,7 @@ validators.spelling = function spelling(correctSpelling) {
28765
29497
  };
28766
29498
  };
28767
29499
  function assertOptions(options, schema, allowUnknown) {
28768
- if (typeof options !== "object") {
29500
+ if (typeof options !== "object" || options === null) {
28769
29501
  throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
28770
29502
  }
28771
29503
  const keys = Object.keys(options);
@@ -28817,16 +29549,15 @@ var Axios = class {
28817
29549
  return await this._request(configOrUrl, config);
28818
29550
  } catch (err) {
28819
29551
  if (err instanceof Error) {
28820
- let dummy = {};
28821
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
28822
- const stack = (() => {
28823
- if (!dummy.stack) {
28824
- return "";
28825
- }
28826
- const firstNewlineIndex = dummy.stack.indexOf("\n");
28827
- return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
28828
- })();
28829
29552
  try {
29553
+ let dummy = {};
29554
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
29555
+ const dummyStack = dummy.stack;
29556
+ let stack = "";
29557
+ if (typeof dummyStack === "string") {
29558
+ const firstNewlineIndex = dummyStack.indexOf("\n");
29559
+ stack = firstNewlineIndex === -1 ? "" : dummyStack.slice(firstNewlineIndex + 1);
29560
+ }
28830
29561
  if (!err.stack) {
28831
29562
  err.stack = stack;
28832
29563
  } else if (stack) {
@@ -28896,9 +29627,9 @@ var Axios = class {
28896
29627
  },
28897
29628
  true
28898
29629
  );
28899
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
29630
+ config.method = (utils_default.getSafeProp(config, "method") || utils_default.getSafeProp(this.defaults, "method") || "get").toLowerCase();
28900
29631
  let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
28901
- headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
29632
+ headers && utils_default.forEach(methodList_default.concat("common"), (method) => {
28902
29633
  delete headers[method];
28903
29634
  });
28904
29635
  config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
@@ -28941,16 +29672,31 @@ var Axios = class {
28941
29672
  const onFulfilled = requestInterceptorChain[i++];
28942
29673
  const onRejected = requestInterceptorChain[i++];
28943
29674
  try {
28944
- newConfig = onFulfilled(newConfig);
29675
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
28945
29676
  } catch (error) {
28946
- onRejected.call(this, error);
29677
+ if (!onRejected) {
29678
+ promise = Promise.reject(error);
29679
+ break;
29680
+ }
29681
+ try {
29682
+ const rejectedResult = onRejected.call(this, error);
29683
+ if (utils_default.isThenable(rejectedResult)) {
29684
+ promise = Promise.resolve(rejectedResult).then(
29685
+ () => dispatchRequest.call(this, newConfig)
29686
+ );
29687
+ }
29688
+ } catch (rejectedError) {
29689
+ promise = Promise.reject(rejectedError);
29690
+ }
28947
29691
  break;
28948
29692
  }
28949
29693
  }
28950
- try {
28951
- promise = dispatchRequest.call(this, newConfig);
28952
- } catch (error) {
28953
- return Promise.reject(error);
29694
+ if (!promise) {
29695
+ try {
29696
+ promise = dispatchRequest.call(this, newConfig);
29697
+ } catch (error) {
29698
+ promise = Promise.reject(error);
29699
+ }
28954
29700
  }
28955
29701
  i = 0;
28956
29702
  len = responseInterceptorChain.length;
@@ -29146,14 +29892,22 @@ var HttpStatusCode = {
29146
29892
  Gone: 410,
29147
29893
  LengthRequired: 411,
29148
29894
  PreconditionFailed: 412,
29895
+ /**
29896
+ * @deprecated Use `ContentTooLarge` instead.
29897
+ */
29149
29898
  PayloadTooLarge: 413,
29899
+ ContentTooLarge: 413,
29150
29900
  UriTooLong: 414,
29151
29901
  UnsupportedMediaType: 415,
29152
29902
  RangeNotSatisfiable: 416,
29153
29903
  ExpectationFailed: 417,
29154
29904
  ImATeapot: 418,
29155
29905
  MisdirectedRequest: 421,
29906
+ /**
29907
+ * @deprecated Use `UnprocessableContent` instead.
29908
+ */
29156
29909
  UnprocessableEntity: 422,
29910
+ UnprocessableContent: 422,
29157
29911
  Locked: 423,
29158
29912
  FailedDependency: 424,
29159
29913
  TooEarly: 425,
@@ -29173,6 +29927,7 @@ var HttpStatusCode = {
29173
29927
  LoopDetected: 508,
29174
29928
  NotExtended: 510,
29175
29929
  NetworkAuthenticationRequired: 511,
29930
+ WebServerReturnsAnUnknownError: 520,
29176
29931
  WebServerIsDown: 521,
29177
29932
  ConnectionTimedOut: 522,
29178
29933
  OriginIsUnreachable: 523,
@@ -29181,7 +29936,9 @@ var HttpStatusCode = {
29181
29936
  InvalidSslCertificate: 526
29182
29937
  };
29183
29938
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
29184
- HttpStatusCode[value] = key;
29939
+ if (HttpStatusCode[value] === void 0) {
29940
+ HttpStatusCode[value] = key;
29941
+ }
29185
29942
  });
29186
29943
  var HttpStatusCode_default = HttpStatusCode;
29187
29944