piral-cli 1.12.3 → 1.12.4-beta.4f77727

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/external/index.js +985 -228
  2. package/package.json +1 -1
@@ -54818,22 +54818,82 @@ var { toString } = Object.prototype;
54818
54818
  var { getPrototypeOf } = Object;
54819
54819
  var { iterator, toStringTag } = Symbol;
54820
54820
  var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
54821
+ var isUnsafeObjectKey = (prop) => typeof prop === "string" && (prop === "__proto__" || prop === "constructor" || prop === "prototype");
54822
+ var isPrototypeBoundary = (obj, prototype2, source) => obj === Object.prototype || !source && prototype2 === null;
54823
+ var isSafeAndFullyMutable = (obj) => {
54824
+ if (!Object.isExtensible(obj)) {
54825
+ return false;
54826
+ }
54827
+ const props = Object.getOwnPropertyNames(obj);
54828
+ if (Object.getOwnPropertySymbols) {
54829
+ props.push(...Object.getOwnPropertySymbols(obj));
54830
+ }
54831
+ return props.every((prop) => {
54832
+ if (isUnsafeObjectKey(prop)) {
54833
+ return false;
54834
+ }
54835
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
54836
+ return !!descriptor && descriptor.configurable && descriptor.writable === true;
54837
+ });
54838
+ };
54821
54839
  var hasOwnInPrototypeChain = (thing, prop) => {
54822
54840
  let obj = thing;
54823
54841
  const seen = [];
54824
- while (obj != null && obj !== Object.prototype) {
54842
+ while (obj != null) {
54825
54843
  if (seen.indexOf(obj) !== -1) {
54826
54844
  return false;
54827
54845
  }
54828
54846
  seen.push(obj);
54847
+ const prototype2 = getPrototypeOf(obj);
54848
+ if (isPrototypeBoundary(obj, prototype2, obj === thing)) {
54849
+ return false;
54850
+ }
54829
54851
  if (hasOwnProperty(obj, prop)) {
54830
54852
  return true;
54831
54853
  }
54832
- obj = getPrototypeOf(obj);
54854
+ obj = prototype2;
54833
54855
  }
54834
54856
  return false;
54835
54857
  };
54836
54858
  var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
54859
+ var toSafeFlatObject = (thing) => {
54860
+ if (thing == null || typeof thing !== "object" && typeof thing !== "function") {
54861
+ return thing;
54862
+ }
54863
+ const sourcePrototype = getPrototypeOf(thing);
54864
+ if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
54865
+ return thing;
54866
+ }
54867
+ const result = /* @__PURE__ */ Object.create(null);
54868
+ const merged = /* @__PURE__ */ Object.create(null);
54869
+ const seen = [];
54870
+ let current = thing;
54871
+ while (current != null) {
54872
+ if (seen.indexOf(current) !== -1) {
54873
+ break;
54874
+ }
54875
+ seen.push(current);
54876
+ const prototype2 = current === thing ? sourcePrototype : getPrototypeOf(current);
54877
+ if (isPrototypeBoundary(current, prototype2, current === thing)) {
54878
+ break;
54879
+ }
54880
+ const props = Object.getOwnPropertyNames(current);
54881
+ if (Object.getOwnPropertySymbols) {
54882
+ props.push(...Object.getOwnPropertySymbols(current));
54883
+ }
54884
+ for (const prop of props) {
54885
+ if (isUnsafeObjectKey(prop)) {
54886
+ continue;
54887
+ }
54888
+ if (!hasOwnProperty(merged, prop)) {
54889
+ result[prop] = thing[prop];
54890
+ merged[prop] = true;
54891
+ }
54892
+ }
54893
+ current = prototype2;
54894
+ }
54895
+ return result;
54896
+ };
54837
54897
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
54838
54898
  const str = toString.call(thing);
54839
54899
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -54868,9 +54928,9 @@ var isPlainObject = (val) => {
54868
54928
  return false;
54869
54929
  }
54870
54930
  const prototype2 = getPrototypeOf(val);
54871
- return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
54872
- // Symbol.iterator as evidence the value is a tagged/iterable type rather
54873
- // than a plain object, while ignoring keys injected onto Object.prototype.
54931
+ return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
54932
+ // evidence the value is tagged/iterable, while ignoring members reachable
54933
+ // only through shared or terminal prototype boundaries.
54874
54934
  !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
54875
54935
  };
54876
54936
  var isEmptyObject = (val) => {
@@ -54891,6 +54951,7 @@ var isReactNativeBlob = (value) => {
54891
54951
  var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
54892
54952
  var isBlob = kindOfTest("Blob");
54893
54953
  var isFileList = kindOfTest("FileList");
54954
+ var isSet = kindOfTest("Set");
54894
54955
  var isStream = (val) => isObject(val) && isFunction(val.pipe);
54895
54956
  function getGlobal() {
54896
54957
  if (typeof globalThis !== "undefined") return globalThis;
@@ -55186,11 +55247,20 @@ var toJSONObject = (obj) => {
55186
55247
  }
55187
55248
  if (!("toJSON" in source)) {
55188
55249
  visited.add(source);
55189
- const target = isArray(source) ? [] : {};
55190
- forEach(source, (value, key) => {
55191
- const reducedValue = visit(value);
55192
- !isUndefined(reducedValue) && (target[key] = reducedValue);
55193
- });
55250
+ let target;
55251
+ if (isSet(source)) {
55252
+ target = [];
55253
+ for (const value of source) {
55254
+ const reducedValue = visit(value);
55255
+ !isUndefined(reducedValue) && target.push(reducedValue);
55256
+ }
55257
+ } else {
55258
+ target = isArray(source) ? [] : {};
55259
+ forEach(source, (value, key) => {
55260
+ const reducedValue = visit(value);
55261
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
55262
+ });
55263
+ }
55194
55264
  visited.delete(source);
55195
55265
  return target;
55196
55266
  }
@@ -55271,6 +55341,7 @@ var utils_default = {
55271
55341
  // an alias to avoid ESLint no-prototype-builtins detection
55272
55342
  hasOwnInPrototypeChain,
55273
55343
  getSafeProp,
55344
+ toSafeFlatObject,
55274
55345
  reduceDescriptors,
55275
55346
  freezeMethods,
55276
55347
  toObjectSet,
@@ -55319,17 +55390,18 @@ var parseHeaders_default = (rawHeaders) => {
55319
55390
  i = line.indexOf(":");
55320
55391
  key = line.substring(0, i).trim().toLowerCase();
55321
55392
  val = line.substring(i + 1).trim();
55322
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
55393
+ const hasKey = utils_default.hasOwnProp(parsed, key);
55394
+ if (!key || hasKey && utils_default.hasOwnProp(ignoreDuplicateOf, key)) {
55323
55395
  return;
55324
55396
  }
55325
55397
  if (key === "set-cookie") {
55326
- if (parsed[key]) {
55398
+ if (hasKey) {
55327
55399
  parsed[key].push(val);
55328
55400
  } else {
55329
55401
  parsed[key] = [val];
55330
55402
  }
55331
55403
  } else {
55332
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
55404
+ parsed[key] = hasKey ? parsed[key] + ", " + val : val;
55333
55405
  }
55334
55406
  });
55335
55407
  return parsed;
@@ -55393,6 +55465,90 @@ function parseTokens(str) {
55393
55465
  }
55394
55466
  return tokens;
55395
55467
  }
55468
+ var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
55469
+ function trimOWS(value) {
55470
+ let start = 0;
55471
+ let end = value.length;
55472
+ while (start < end) {
55473
+ const code = value.charCodeAt(start);
55474
+ if (code !== 9 && code !== 32) {
55475
+ break;
55476
+ }
55477
+ start += 1;
55478
+ }
55479
+ while (end > start) {
55480
+ const code = value.charCodeAt(end - 1);
55481
+ if (code !== 9 && code !== 32) {
55482
+ break;
55483
+ }
55484
+ end -= 1;
55485
+ }
55486
+ return start === 0 && end === value.length ? value : value.slice(start, end);
55487
+ }
55488
+ function decodeQuotedString(value) {
55489
+ const last = value.length - 1;
55490
+ if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) {
55491
+ return value;
55492
+ }
55493
+ let decoded = "";
55494
+ for (let i = 1; i < last; i++) {
55495
+ const code = value.charCodeAt(i);
55496
+ if (code === 34) {
55497
+ return value;
55498
+ }
55499
+ if (code === 92) {
55500
+ i += 1;
55501
+ if (i >= last) {
55502
+ return value;
55503
+ }
55504
+ }
55505
+ decoded += value[i];
55506
+ }
55507
+ return decoded;
55508
+ }
55509
+ function parseParameters(value) {
55510
+ const parameters = /* @__PURE__ */ Object.create(null);
55511
+ const str = String(value);
55512
+ let start = 0;
55513
+ let quoted = false;
55514
+ let escaped = false;
55515
+ function parseParameter(end) {
55516
+ const part = trimOWS(str.slice(start, end));
55517
+ const equals = part.indexOf("=");
55518
+ if (equals < 1) {
55519
+ return;
55520
+ }
55521
+ const name = trimOWS(part.slice(0, equals));
55522
+ if (!parameterNameRE.test(name)) {
55523
+ return;
55524
+ }
55525
+ const normalizedName = name.toLowerCase();
55526
+ if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") {
55527
+ return;
55528
+ }
55529
+ const parameterValue = trimOWS(part.slice(equals + 1));
55530
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
55531
+ }
55532
+ for (let i = 0; i < str.length; i++) {
55533
+ const code = str.charCodeAt(i);
55534
+ if (quoted) {
55535
+ if (escaped) {
55536
+ escaped = false;
55537
+ } else if (code === 92) {
55538
+ escaped = true;
55539
+ } else if (code === 34) {
55540
+ quoted = false;
55541
+ }
55542
+ } else if (code === 34) {
55543
+ quoted = true;
55544
+ } else if (code === 44 || code === 59) {
55545
+ parseParameter(i);
55546
+ start = i + 1;
55547
+ }
55548
+ }
55549
+ parseParameter(str.length);
55550
+ return parameters;
55551
+ }
55396
55552
  var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
55397
55553
  function matchHeaderValue(context, value, header, filter4, isHeaderNameFilter) {
55398
55554
  if (utils_default.isFunction(filter4)) {
@@ -55568,7 +55724,8 @@ var AxiosHeaders = class {
55568
55724
  return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
55569
55725
  }
55570
55726
  getSetCookie() {
55571
- return this.get("set-cookie") || [];
55727
+ const value = this.get("set-cookie");
55728
+ return utils_default.isArray(value) ? value : value == null || value === false ? [] : [value];
55572
55729
  }
55573
55730
  get [Symbol.toStringTag]() {
55574
55731
  return "AxiosHeaders";
@@ -55576,6 +55733,9 @@ var AxiosHeaders = class {
55576
55733
  static from(thing) {
55577
55734
  return thing instanceof this ? thing : new this(thing);
55578
55735
  }
55736
+ static parseParameters(value) {
55737
+ return parseParameters(value);
55738
+ }
55579
55739
  static concat(first, ...targets) {
55580
55740
  const computed = new this(first);
55581
55741
  targets.forEach((target) => computed.set(target));
@@ -55671,10 +55831,37 @@ function redactConfig(config, redactKeys) {
55671
55831
  };
55672
55832
  return visit(config);
55673
55833
  }
55834
+ function stringifySafely(value) {
55835
+ try {
55836
+ return String(value);
55837
+ } catch (err) {
55838
+ return "";
55839
+ }
55840
+ }
55841
+ function aggregateErrorMessage(error) {
55842
+ const message = error.errors.map((entry) => {
55843
+ try {
55844
+ return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
55845
+ } catch (err) {
55846
+ return "";
55847
+ }
55848
+ }).filter(Boolean).join("; ");
55849
+ return message || error.name || "AggregateError";
55850
+ }
55674
55851
  var AxiosError = class _AxiosError extends Error {
55675
55852
  static from(error, code, config, request, response, customProps) {
55676
- const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
55677
- axiosError.cause = error;
55853
+ let message = error.message;
55854
+ if (!message && utils_default.isArray(error.errors) && error.errors.length) {
55855
+ message = aggregateErrorMessage(error);
55856
+ }
55857
+ const axiosError = new _AxiosError(message, code || error.code, config, request, response);
55858
+ Object.defineProperty(axiosError, "cause", {
55859
+ __proto__: null,
55860
+ value: error,
55861
+ writable: true,
55862
+ enumerable: false,
55863
+ configurable: true
55864
+ });
55678
55865
  axiosError.name = error.name;
55679
55866
  if (error.status != null && axiosError.status == null) {
55680
55867
  axiosError.status = error.status;
@@ -55757,6 +55944,16 @@ var AxiosError_default = AxiosError;
55757
55944
  var import_form_data = __toESM(require_form_data(), 1);
55758
55945
  var FormData_default = import_form_data.default;
55759
55946
 
55947
+ // ../../../node_modules/axios/lib/platform/node/classes/Buffer.js
55948
+ var Buffer_default = {
55949
+ isBufferAvailable() {
55950
+ return typeof Buffer !== "undefined";
55951
+ },
55952
+ from(value) {
55953
+ return Buffer.from(value);
55954
+ }
55955
+ };
55956
+
55760
55957
  // ../../../node_modules/axios/lib/helpers/toFormData.js
55761
55958
  var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
55762
55959
  function isVisitable(thing) {
@@ -55783,24 +55980,16 @@ function toFormData(obj, formData, options) {
55783
55980
  throw new TypeError("target must be an object");
55784
55981
  }
55785
55982
  formData = formData || new (FormData_default || FormData)();
55786
- options = utils_default.toFlatObject(
55787
- options,
55788
- {
55789
- metaTokens: true,
55790
- dots: false,
55791
- indexes: false
55792
- },
55793
- false,
55794
- function defined(option, source) {
55795
- return !utils_default.isUndefined(source[option]);
55796
- }
55797
- );
55798
- const metaTokens = options.metaTokens;
55799
- const visitor = options.visitor || defaultVisitor;
55800
- const dots = options.dots;
55801
- const indexes = options.indexes;
55802
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
55803
- const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
55983
+ const option = (name, fallback2) => {
55984
+ const value = utils_default.getSafeProp(options, name);
55985
+ return utils_default.isUndefined(value) ? fallback2 : value;
55986
+ };
55987
+ const metaTokens = option("metaTokens", true);
55988
+ const visitor = option("visitor") || defaultVisitor;
55989
+ const dots = option("dots", false);
55990
+ const indexes = option("indexes", false);
55991
+ const _Blob = option("Blob") || typeof Blob !== "undefined" && Blob;
55992
+ const maxDepth = option("maxDepth", DEFAULT_FORM_DATA_MAX_DEPTH);
55804
55993
  const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
55805
55994
  const stack = [];
55806
55995
  if (!utils_default.isFunction(visitor)) {
@@ -55818,7 +56007,16 @@ function toFormData(obj, formData, options) {
55818
56007
  throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
55819
56008
  }
55820
56009
  if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
55821
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
56010
+ if (useBlob && typeof _Blob === "function") {
56011
+ return new _Blob([value]);
56012
+ }
56013
+ if (Buffer_default && Buffer_default.isBufferAvailable()) {
56014
+ return Buffer_default.from(value);
56015
+ }
56016
+ throw new AxiosError_default(
56017
+ "Blob is not supported. Use a Buffer instead.",
56018
+ AxiosError_default.ERR_NOT_SUPPORT
56019
+ );
55822
56020
  }
55823
56021
  return value;
55824
56022
  }
@@ -55926,9 +56124,7 @@ prototype.append = function append(name, value) {
55926
56124
  this._pairs.push([name, value]);
55927
56125
  };
55928
56126
  prototype.toString = function toString2(encoder) {
55929
- const _encode = encoder ? function(value) {
55930
- return encoder.call(this, value, encode);
55931
- } : encode;
56127
+ const _encode = encoder ? (value) => encoder.call(this, value, encode) : encode;
55932
56128
  return this._pairs.map(function each(pair) {
55933
56129
  return _encode(pair[0]) + "=" + _encode(pair[1]);
55934
56130
  }, "").join("&");
@@ -55943,6 +56139,7 @@ function buildURL(url2, params, options) {
55943
56139
  if (!params) {
55944
56140
  return url2;
55945
56141
  }
56142
+ url2 = url2 || "";
55946
56143
  const _options = utils_default.isFunction(options) ? {
55947
56144
  serialize: options
55948
56145
  } : options;
@@ -55965,9 +56162,47 @@ function buildURL(url2, params, options) {
55965
56162
  }
55966
56163
 
55967
56164
  // ../../../node_modules/axios/lib/core/InterceptorManager.js
56165
+ var $internals2 = /* @__PURE__ */ Symbol("internals");
56166
+ function countHandlers(handlers) {
56167
+ return handlers ? handlers.length : 0;
56168
+ }
56169
+ function trimHandlers(handlers) {
56170
+ if (!handlers) {
56171
+ return;
56172
+ }
56173
+ while (handlers.length && handlers[handlers.length - 1] === null) {
56174
+ handlers.pop();
56175
+ }
56176
+ }
56177
+ function syncHandlerEntries(manager, internals) {
56178
+ const handlers = manager.handlers;
56179
+ const length = countHandlers(handlers);
56180
+ if (handlers !== internals.handlersRef) {
56181
+ internals.handlersRef = handlers;
56182
+ internals.handlerEntries.clear();
56183
+ } else if (length !== internals.handlersLength) {
56184
+ if (!length) {
56185
+ internals.handlerEntries.clear();
56186
+ } else {
56187
+ internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
56188
+ if (handlers[entry.index] !== entry.handler) {
56189
+ internals.handlerEntries.delete(id);
56190
+ }
56191
+ });
56192
+ }
56193
+ }
56194
+ internals.handlersLength = length;
56195
+ }
55968
56196
  var InterceptorManager = class {
55969
56197
  constructor() {
55970
56198
  this.handlers = [];
56199
+ this[$internals2] = {
56200
+ handlersRef: this.handlers,
56201
+ handlersLength: this.handlers.length,
56202
+ handlerEntries: /* @__PURE__ */ new Map(),
56203
+ iterationDepth: 0,
56204
+ nextId: 0
56205
+ };
55971
56206
  }
55972
56207
  /**
55973
56208
  * Add a new interceptor to the stack
@@ -55979,13 +56214,25 @@ var InterceptorManager = class {
55979
56214
  * @return {Number} An ID used to remove interceptor later
55980
56215
  */
55981
56216
  use(fulfilled, rejected, options) {
55982
- this.handlers.push({
56217
+ const handler = {
55983
56218
  fulfilled,
55984
56219
  rejected,
55985
56220
  synchronous: options ? options.synchronous : false,
55986
56221
  runWhen: options ? options.runWhen : null
56222
+ };
56223
+ const internals = this[$internals2];
56224
+ if (this.handlers == null) {
56225
+ this.handlers = [];
56226
+ }
56227
+ syncHandlerEntries(this, internals);
56228
+ const id = internals.nextId++;
56229
+ this.handlers.push(handler);
56230
+ internals.handlerEntries.set(id, {
56231
+ handler,
56232
+ index: this.handlers.length - 1
55987
56233
  });
55988
- return this.handlers.length - 1;
56234
+ internals.handlersLength = this.handlers.length;
56235
+ return id;
55989
56236
  }
55990
56237
  /**
55991
56238
  * Remove an interceptor from the stack
@@ -55995,8 +56242,19 @@ var InterceptorManager = class {
55995
56242
  * @returns {void}
55996
56243
  */
55997
56244
  eject(id) {
55998
- if (this.handlers[id]) {
55999
- this.handlers[id] = null;
56245
+ const internals = this[$internals2];
56246
+ syncHandlerEntries(this, internals);
56247
+ const entry = internals.handlerEntries.get(id);
56248
+ if (entry) {
56249
+ internals.handlerEntries.delete(id);
56250
+ if (this.handlers[entry.index] !== entry.handler) {
56251
+ return;
56252
+ }
56253
+ this.handlers[entry.index] = null;
56254
+ if (!internals.iterationDepth) {
56255
+ trimHandlers(this.handlers);
56256
+ internals.handlersLength = this.handlers.length;
56257
+ }
56000
56258
  }
56001
56259
  }
56002
56260
  /**
@@ -56007,6 +56265,7 @@ var InterceptorManager = class {
56007
56265
  clear() {
56008
56266
  if (this.handlers) {
56009
56267
  this.handlers = [];
56268
+ syncHandlerEntries(this, this[$internals2]);
56010
56269
  }
56011
56270
  }
56012
56271
  /**
@@ -56020,11 +56279,22 @@ var InterceptorManager = class {
56020
56279
  * @returns {void}
56021
56280
  */
56022
56281
  forEach(fn) {
56023
- utils_default.forEach(this.handlers, function forEachHandler(h) {
56024
- if (h !== null) {
56025
- fn(h);
56282
+ const internals = this[$internals2];
56283
+ syncHandlerEntries(this, internals);
56284
+ internals.iterationDepth++;
56285
+ try {
56286
+ utils_default.forEach(this.handlers, function forEachHandler(h) {
56287
+ if (h !== null) {
56288
+ fn(h);
56289
+ }
56290
+ });
56291
+ } finally {
56292
+ if (!--internals.iterationDepth) {
56293
+ syncHandlerEntries(this, internals);
56294
+ trimHandlers(this.handlers);
56295
+ internals.handlersLength = countHandlers(this.handlers);
56026
56296
  }
56027
- });
56297
+ }
56028
56298
  }
56029
56299
  };
56030
56300
  var InterceptorManager_default = InterceptorManager;
@@ -56126,7 +56396,7 @@ function throwIfDepthExceeded(index) {
56126
56396
  }
56127
56397
  function parsePropPath(name) {
56128
56398
  const path3 = [];
56129
- const pattern = /\w+|\[(\w*)]/g;
56399
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
56130
56400
  let match2;
56131
56401
  while ((match2 = pattern.exec(name)) !== null) {
56132
56402
  throwIfDepthExceeded(path3.length);
@@ -56182,9 +56452,25 @@ function formDataToJSON(formData) {
56182
56452
  }
56183
56453
  var formDataToJSON_default = formDataToJSON;
56184
56454
 
56455
+ // ../../../node_modules/axios/lib/core/methodList.js
56456
+ var methodList = Object.freeze([
56457
+ "get",
56458
+ "delete",
56459
+ "head",
56460
+ "options",
56461
+ "post",
56462
+ "put",
56463
+ "patch",
56464
+ "purge",
56465
+ "link",
56466
+ "unlink",
56467
+ "query"
56468
+ ]);
56469
+ var methodList_default = methodList;
56470
+
56185
56471
  // ../../../node_modules/axios/lib/defaults/index.js
56186
56472
  var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
56187
- function stringifySafely(rawValue, parser, encoder) {
56473
+ function stringifySafely2(rawValue, parser, encoder) {
56188
56474
  if (utils_default.isString(rawValue)) {
56189
56475
  try {
56190
56476
  (parser || JSON.parse)(rawValue);
@@ -56240,7 +56526,7 @@ var defaults = {
56240
56526
  }
56241
56527
  if (isObjectPayload || hasJSONContentType) {
56242
56528
  headers.setContentType("application/json", false);
56243
- return stringifySafely(data);
56529
+ return stringifySafely2(data);
56244
56530
  }
56245
56531
  return data;
56246
56532
  }
@@ -56294,7 +56580,7 @@ var defaults = {
56294
56580
  }
56295
56581
  }
56296
56582
  };
56297
- utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
56583
+ utils_default.forEach(methodList_default, (method) => {
56298
56584
  defaults.headers[method] = {};
56299
56585
  });
56300
56586
  var defaults_default = defaults;
@@ -56362,29 +56648,62 @@ function isAbsoluteURL(url2) {
56362
56648
 
56363
56649
  // ../../../node_modules/axios/lib/helpers/combineURLs.js
56364
56650
  function combineURLs(baseURL, relativeURL) {
56365
- return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
56651
+ if (!relativeURL) {
56652
+ return baseURL;
56653
+ }
56654
+ let end = baseURL.length;
56655
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
56656
+ end--;
56657
+ }
56658
+ return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
56659
+ }
56660
+
56661
+ // ../../../node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js
56662
+ var urlParserControlCharacters = /[\t\n\r]/g;
56663
+ function normalizeURLForProtocolCheck(url2) {
56664
+ if (typeof url2 !== "string") {
56665
+ return url2;
56666
+ }
56667
+ let start = 0;
56668
+ while (start < url2.length && url2.charCodeAt(start) <= 32) {
56669
+ start++;
56670
+ }
56671
+ return url2.slice(start).replace(urlParserControlCharacters, "");
56366
56672
  }
56367
56673
 
56368
56674
  // ../../../node_modules/axios/lib/core/buildFullPath.js
56369
56675
  var malformedHttpProtocol = /^https?:(?!\/\/)/i;
56370
- var httpProtocolControlCharacters = /[\t\n\r]/g;
56371
- function stripLeadingC0ControlOrSpace(url2) {
56372
- let i = 0;
56373
- while (i < url2.length && url2.charCodeAt(i) <= 32) {
56374
- i++;
56676
+ function redactFragment(fragment) {
56677
+ if (!fragment) {
56678
+ return fragment;
56375
56679
  }
56376
- return url2.slice(i);
56680
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match2, separator, parameterName = "") => {
56681
+ return `${separator}${parameterName}${REDACTED}`;
56682
+ });
56377
56683
  }
56378
- function normalizeURLForProtocolCheck(url2) {
56379
- return stripLeadingC0ControlOrSpace(url2).replace(httpProtocolControlCharacters, "");
56684
+ function redactSensitiveURLParts(url2) {
56685
+ const redactedURL = url2.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
56686
+ const fragmentIndex = redactedURL.indexOf("#");
56687
+ const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
56688
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(
56689
+ /([?&][^=&#]*=)[^&#]*/g,
56690
+ `$1${REDACTED}`
56691
+ );
56692
+ if (fragmentIndex === -1) {
56693
+ return redactedURLWithoutFragment;
56694
+ }
56695
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
56380
56696
  }
56381
56697
  function assertValidHttpProtocolURL(url2, config) {
56382
- if (typeof url2 === "string" && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url2))) {
56383
- throw new AxiosError_default(
56384
- 'Invalid URL: missing "//" after protocol',
56385
- AxiosError_default.ERR_INVALID_URL,
56386
- config
56387
- );
56698
+ if (typeof url2 === "string") {
56699
+ const normalizedURL = normalizeURLForProtocolCheck(url2);
56700
+ if (malformedHttpProtocol.test(normalizedURL)) {
56701
+ throw new AxiosError_default(
56702
+ `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
56703
+ AxiosError_default.ERR_INVALID_URL,
56704
+ config
56705
+ );
56706
+ }
56388
56707
  }
56389
56708
  }
56390
56709
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
@@ -56475,7 +56794,7 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1);
56475
56794
  var import_zlib2 = __toESM(require("zlib"), 1);
56476
56795
 
56477
56796
  // ../../../node_modules/axios/lib/env/data.js
56478
- var VERSION = "1.18.0";
56797
+ var VERSION = "1.20.0";
56479
56798
 
56480
56799
  // ../../../node_modules/axios/lib/helpers/parseProtocol.js
56481
56800
  function parseProtocol(url2) {
@@ -56484,7 +56803,7 @@ function parseProtocol(url2) {
56484
56803
  }
56485
56804
 
56486
56805
  // ../../../node_modules/axios/lib/helpers/fromDataURI.js
56487
- var DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
56806
+ var DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
56488
56807
  function fromDataURI(uri, asBlob, options) {
56489
56808
  const _Blob = options && options.Blob || platform_default.classes.Blob;
56490
56809
  const protocol = parseProtocol(uri);
@@ -56501,13 +56820,13 @@ function fromDataURI(uri, asBlob, options) {
56501
56820
  const params = match2[2];
56502
56821
  const encoding = match2[3] ? "base64" : "utf8";
56503
56822
  const body = match2[4];
56504
- let mime;
56823
+ let mime = "";
56505
56824
  if (type) {
56506
56825
  mime = params ? type + params : type;
56507
56826
  } else if (params) {
56508
56827
  mime = "text/plain" + params;
56509
56828
  }
56510
- const buffer = Buffer.from(decodeURIComponent(body), encoding);
56829
+ const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
56511
56830
  if (asBlob) {
56512
56831
  if (!_Blob) {
56513
56832
  throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
@@ -56522,6 +56841,20 @@ function fromDataURI(uri, asBlob, options) {
56522
56841
  // ../../../node_modules/axios/lib/adapters/http.js
56523
56842
  var import_stream4 = __toESM(require("stream"), 1);
56524
56843
 
56844
+ // ../../../node_modules/axios/lib/core/setFormDataHeaders.js
56845
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
56846
+ function setFormDataHeaders(headers, formHeaders, policy) {
56847
+ if (policy !== "content-only") {
56848
+ headers.set(formHeaders);
56849
+ return;
56850
+ }
56851
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
56852
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
56853
+ headers.set(key, val);
56854
+ }
56855
+ });
56856
+ }
56857
+
56525
56858
  // ../../../node_modules/axios/lib/helpers/AxiosTransformStream.js
56526
56859
  var import_stream = __toESM(require("stream"), 1);
56527
56860
  var kInternals = /* @__PURE__ */ Symbol("internals");
@@ -56783,6 +57116,7 @@ var Http2Sessions = class {
56783
57116
  }
56784
57117
  getSession(authority, options) {
56785
57118
  options = Object.assign(
57119
+ /* @__PURE__ */ Object.create(null),
56786
57120
  {
56787
57121
  sessionTimeout: 1e3
56788
57122
  },
@@ -56848,6 +57182,7 @@ var Http2Sessions = class {
56848
57182
  };
56849
57183
  }
56850
57184
  session.once("close", removeSession);
57185
+ session.once("error", removeSession);
56851
57186
  let entry = [session, options];
56852
57187
  authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
56853
57188
  return session;
@@ -56872,12 +57207,73 @@ var callbackify_default = callbackify;
56872
57207
 
56873
57208
  // ../../../node_modules/axios/lib/helpers/shouldBypassProxy.js
56874
57209
  var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
57210
+ var trimTrailingDots = (value) => {
57211
+ let end = value.length;
57212
+ while (end && value.charCodeAt(end - 1) === 46) {
57213
+ end--;
57214
+ }
57215
+ return end === value.length ? value : value.slice(0, end);
57216
+ };
56875
57217
  var isIPv4Loopback = (host) => {
56876
57218
  const parts = host.split(".");
56877
57219
  if (parts.length !== 4) return false;
56878
57220
  if (parts[0] !== "127") return false;
56879
57221
  return parts.every((p2) => /^\d+$/.test(p2) && Number(p2) >= 0 && Number(p2) <= 255);
56880
57222
  };
57223
+ var parseIPv4Octet = (text) => {
57224
+ if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
57225
+ const n = parseInt(text.slice(2), 16);
57226
+ return Number.isFinite(n) ? n : null;
57227
+ }
57228
+ if (text.length > 1 && /^0[0-7]+$/.test(text)) {
57229
+ const n = parseInt(text, 8);
57230
+ return Number.isFinite(n) ? n : null;
57231
+ }
57232
+ if (text.length > 1 && /^0[0-9]+$/.test(text)) {
57233
+ return null;
57234
+ }
57235
+ if (/^[0-9]+$/.test(text)) {
57236
+ const n = parseInt(text, 10);
57237
+ return Number.isFinite(n) ? n : null;
57238
+ }
57239
+ return null;
57240
+ };
57241
+ var normalizeIPAddress = (host) => {
57242
+ if (typeof host !== "string" || !host || host.indexOf(":") !== -1) {
57243
+ return host;
57244
+ }
57245
+ let h = host;
57246
+ if (h.charAt(0) === "[" && h.charAt(h.length - 1) === "]") {
57247
+ h = h.slice(1, -1);
57248
+ }
57249
+ h = trimTrailingDots(h);
57250
+ if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
57251
+ const parts = h.split(".");
57252
+ if (parts.some((p2) => p2 === "")) return host;
57253
+ if (parts.length === 4) {
57254
+ const octets = parts.map(parseIPv4Octet);
57255
+ if (octets.some((n) => n === null || n < 0 || n > 255)) return host;
57256
+ return octets.join(".");
57257
+ }
57258
+ if (parts.length > 4) {
57259
+ return host;
57260
+ }
57261
+ if (parts.length === 1) return host;
57262
+ const literalOctets = parts.slice(0, -1);
57263
+ const tail = parts[parts.length - 1];
57264
+ const tailSlots = 4 - literalOctets.length;
57265
+ const tailValue = parseIPv4Octet(tail);
57266
+ if (tailValue === null) return host;
57267
+ const maxTail = (1 << 8 * tailSlots) - 1;
57268
+ if (tailValue < 0 || tailValue > maxTail) return host;
57269
+ const tailOctets = new Array(tailSlots).fill(0);
57270
+ for (let i = tailSlots - 1, v2 = tailValue; i >= 0; i--, v2 >>= 8) {
57271
+ tailOctets[i] = v2 & 255;
57272
+ }
57273
+ const literal = literalOctets.map(parseIPv4Octet);
57274
+ if (literal.some((n) => n === null || n < 0 || n > 255)) return host;
57275
+ return [...literal, ...tailOctets].join(".");
57276
+ };
56881
57277
  var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
56882
57278
  var isIPv6Unspecified = (host) => {
56883
57279
  if (host === "::") return true;
@@ -56962,6 +57358,40 @@ var unmapIPv4MappedIPv6 = (host) => {
56962
57358
  }
56963
57359
  return host;
56964
57360
  };
57361
+ var IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/;
57362
+ var ipv4ToBytes = (host) => {
57363
+ const parts = host.split(".");
57364
+ return parts.length === 4 && parts.every((part) => IPV4_OCTET_RE.test(part) && Number(part) <= 255) ? parts.map(Number) : null;
57365
+ };
57366
+ var IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i;
57367
+ var ipv6ToBytes = (host) => {
57368
+ const halves = host.split("::");
57369
+ if (halves.length > 2) {
57370
+ return null;
57371
+ }
57372
+ const groups = halves[0] ? halves[0].split(":") : [];
57373
+ if (halves.length === 2) {
57374
+ const rear = halves[1] ? halves[1].split(":") : [];
57375
+ const missing = 8 - groups.length - rear.length;
57376
+ if (missing < 1) {
57377
+ return null;
57378
+ }
57379
+ groups.push(...new Array(missing).fill("0"), ...rear);
57380
+ }
57381
+ if (groups.length !== 8 || groups.some((group) => !IPV6_GROUP_RE.test(group))) {
57382
+ return null;
57383
+ }
57384
+ return groups.flatMap((group) => {
57385
+ const value = Number.parseInt(group, 16);
57386
+ return [value >> 8 & 255, value & 255];
57387
+ });
57388
+ };
57389
+ var ipToBytes = (host) => {
57390
+ if (typeof host !== "string" || !host) {
57391
+ return null;
57392
+ }
57393
+ return host.indexOf(":") !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host);
57394
+ };
56965
57395
  var normalizeNoProxyHost = (hostname) => {
56966
57396
  if (!hostname) {
56967
57397
  return hostname;
@@ -56969,7 +57399,89 @@ var normalizeNoProxyHost = (hostname) => {
56969
57399
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
56970
57400
  hostname = hostname.slice(1, -1);
56971
57401
  }
56972
- return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
57402
+ const trimmed = trimTrailingDots(hostname);
57403
+ const ipv4 = normalizeIPAddress(trimmed);
57404
+ if (ipv4 !== trimmed) {
57405
+ return ipv4;
57406
+ }
57407
+ return unmapIPv4MappedIPv6(trimmed);
57408
+ };
57409
+ var normalizeCidrBase = (input) => {
57410
+ let base = input;
57411
+ const startsBracket = base.charAt(0) === "[";
57412
+ const endsBracket = base.charAt(base.length - 1) === "]";
57413
+ const hasBracket = base.includes("[") || base.includes("]");
57414
+ if (startsBracket || endsBracket) {
57415
+ if (!startsBracket || !endsBracket) {
57416
+ return null;
57417
+ }
57418
+ base = base.slice(1, -1);
57419
+ if (base.indexOf(":") === -1 || base.includes("[") || base.includes("]")) {
57420
+ return null;
57421
+ }
57422
+ } else if (hasBracket) {
57423
+ return null;
57424
+ }
57425
+ if (!base || base.charAt(base.length - 1) === ".") {
57426
+ return null;
57427
+ }
57428
+ const wasIPv6 = base.indexOf(":") !== -1;
57429
+ if (wasIPv6) {
57430
+ try {
57431
+ base = new URL(`http://[${base}]/`).hostname.slice(1, -1);
57432
+ } catch (_err) {
57433
+ return null;
57434
+ }
57435
+ } else {
57436
+ base = normalizeIPAddress(base);
57437
+ if (!ipv4ToBytes(base)) {
57438
+ return null;
57439
+ }
57440
+ }
57441
+ return { normalized: unmapIPv4MappedIPv6(base), wasIPv6 };
57442
+ };
57443
+ var CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/;
57444
+ var parseCidrEntry = (entry) => {
57445
+ if (entry.indexOf("/") === -1) {
57446
+ return void 0;
57447
+ }
57448
+ const match2 = CIDR_ENTRY_RE.exec(entry);
57449
+ if (!match2) {
57450
+ return null;
57451
+ }
57452
+ let prefix = Number(match2[2]);
57453
+ const parsedBase = normalizeCidrBase(match2[1]);
57454
+ if (!parsedBase) {
57455
+ return null;
57456
+ }
57457
+ const { normalized, wasIPv6 } = parsedBase;
57458
+ if (wasIPv6 && normalized.indexOf(":") === -1) {
57459
+ if (prefix < 96) {
57460
+ return null;
57461
+ }
57462
+ prefix -= 96;
57463
+ }
57464
+ const bytes = ipToBytes(normalized);
57465
+ if (!bytes || prefix > bytes.length * 8) {
57466
+ return null;
57467
+ }
57468
+ return { bytes, prefix };
57469
+ };
57470
+ var isInSubnet = (addressBytes, networkBytes, prefix) => {
57471
+ const fullBytes = prefix >> 3;
57472
+ for (let i = 0; i < fullBytes; i++) {
57473
+ if (addressBytes[i] !== networkBytes[i]) {
57474
+ return false;
57475
+ }
57476
+ }
57477
+ const remainingBits = prefix & 7;
57478
+ if (remainingBits) {
57479
+ const mask = 255 << 8 - remainingBits & 255;
57480
+ if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) {
57481
+ return false;
57482
+ }
57483
+ }
57484
+ return true;
56973
57485
  };
56974
57486
  function shouldBypassProxy(location) {
56975
57487
  let parsed;
@@ -56987,10 +57499,18 @@ function shouldBypassProxy(location) {
56987
57499
  }
56988
57500
  const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
56989
57501
  const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
57502
+ const hostnameBytes = ipToBytes(hostname);
56990
57503
  return noProxy.split(/[\s,]+/).some((entry) => {
56991
57504
  if (!entry) {
56992
57505
  return false;
56993
57506
  }
57507
+ if (entry === "*") {
57508
+ return true;
57509
+ }
57510
+ const cidr = parseCidrEntry(entry);
57511
+ if (cidr !== void 0) {
57512
+ return cidr !== null && !!hostnameBytes && hostnameBytes.length === cidr.bytes.length && isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix);
57513
+ }
56994
57514
  let [entryHost, entryPort] = parseNoProxyEntry(entry);
56995
57515
  entryHost = normalizeNoProxyHost(entryHost);
56996
57516
  if (!entryHost) {
@@ -57076,7 +57596,8 @@ function throttle(fn, freq) {
57076
57596
  }
57077
57597
  };
57078
57598
  const flush = () => lastArgs && invoke(lastArgs);
57079
- return [throttled, flush];
57599
+ const flushWith = (...args) => invoke(args);
57600
+ return [throttled, flush, flushWith];
57080
57601
  }
57081
57602
  var throttle_default = throttle;
57082
57603
 
@@ -57085,12 +57606,12 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
57085
57606
  let bytesNotified = 0;
57086
57607
  const _speedometer = speedometer_default(50, 250);
57087
57608
  return throttle_default((e) => {
57088
- if (!e || typeof e.loaded !== "number") {
57609
+ if (!e || !utils_default.isNumber(e.loaded)) {
57089
57610
  return;
57090
57611
  }
57091
57612
  const rawLoaded = e.loaded;
57092
57613
  const total = e.lengthComputable ? e.total : void 0;
57093
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
57614
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
57094
57615
  const progressBytes = Math.max(0, loaded - bytesNotified);
57095
57616
  const rate = _speedometer(progressBytes);
57096
57617
  bytesNotified = Math.max(bytesNotified, loaded);
@@ -57119,12 +57640,66 @@ var progressEventDecorator = (total, throttled) => {
57119
57640
  throttled[1]
57120
57641
  ];
57121
57642
  };
57122
- var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
57643
+ var asyncDecorator = (fn, scheduler = utils_default.asap) => (...args) => scheduler(() => fn(...args));
57123
57644
 
57124
57645
  // ../../../node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
57125
57646
  var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
57126
57647
  var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
57127
- function estimateDataURLDecodedBytes(url2) {
57648
+ var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
57649
+ var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || // A-Z
57650
+ charCode >= 97 && charCode <= 122 || // a-z
57651
+ charCode >= 48 && charCode <= 57 || // 0-9
57652
+ charCode === 43 || // +
57653
+ charCode === 47 || // /
57654
+ charCode === 45 || // - (base64url)
57655
+ charCode === 95;
57656
+ var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
57657
+ var base64Bytes = (significant) => {
57658
+ const groups = Math.floor(significant / 4);
57659
+ const remainder = significant % 4;
57660
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
57661
+ };
57662
+ var estimateBase64BufferAllocation = (body) => {
57663
+ const len = body.length;
57664
+ let padding = 0;
57665
+ if (len > 0 && body.charCodeAt(len - 1) === 61) {
57666
+ padding++;
57667
+ if (len > 1 && body.charCodeAt(len - 2) === 61) {
57668
+ padding++;
57669
+ }
57670
+ }
57671
+ return Math.floor((len - padding) * 3 / 4);
57672
+ };
57673
+ var estimatePercentDecodedBase64Bytes = (body) => {
57674
+ const len = body.length;
57675
+ let significant = 0;
57676
+ let padding = 0;
57677
+ let invalid = false;
57678
+ for (let i = 0; i < len; i++) {
57679
+ let code = body.charCodeAt(i);
57680
+ if (code === 37 && isPercentEncodedByte(body, i, len)) {
57681
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
57682
+ i += 2;
57683
+ }
57684
+ if (isBase64Whitespace(code)) {
57685
+ continue;
57686
+ }
57687
+ if (code === 61) {
57688
+ padding++;
57689
+ continue;
57690
+ }
57691
+ if (!isBase64Char(code) || padding > 0) {
57692
+ invalid = true;
57693
+ continue;
57694
+ }
57695
+ significant++;
57696
+ }
57697
+ if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) {
57698
+ return estimateBase64BufferAllocation(body);
57699
+ }
57700
+ return base64Bytes(significant);
57701
+ };
57702
+ var estimateDataURLBytes = (url2, estimateBase64) => {
57128
57703
  if (!url2 || typeof url2 !== "string") return 0;
57129
57704
  if (!url2.startsWith("data:")) return 0;
57130
57705
  const comma = url2.indexOf(",");
@@ -57133,43 +57708,7 @@ function estimateDataURLDecodedBytes(url2) {
57133
57708
  const body = url2.slice(comma + 1);
57134
57709
  const isBase64 = /;base64/i.test(meta);
57135
57710
  if (isBase64) {
57136
- let effectiveLen = body.length;
57137
- const len = body.length;
57138
- for (let i = 0; i < len; i++) {
57139
- if (body.charCodeAt(i) === 37 && i + 2 < len) {
57140
- const a = body.charCodeAt(i + 1);
57141
- const b2 = body.charCodeAt(i + 2);
57142
- const isHex = isHexDigit(a) && isHexDigit(b2);
57143
- if (isHex) {
57144
- effectiveLen -= 2;
57145
- i += 2;
57146
- }
57147
- }
57148
- }
57149
- let pad = 0;
57150
- let idx = len - 1;
57151
- const tailIsPct3D = (j2) => j2 >= 2 && body.charCodeAt(j2 - 2) === 37 && // '%'
57152
- body.charCodeAt(j2 - 1) === 51 && // '3'
57153
- (body.charCodeAt(j2) === 68 || body.charCodeAt(j2) === 100);
57154
- if (idx >= 0) {
57155
- if (body.charCodeAt(idx) === 61) {
57156
- pad++;
57157
- idx--;
57158
- } else if (tailIsPct3D(idx)) {
57159
- pad++;
57160
- idx -= 3;
57161
- }
57162
- }
57163
- if (pad === 1 && idx >= 0) {
57164
- if (body.charCodeAt(idx) === 61) {
57165
- pad++;
57166
- } else if (tailIsPct3D(idx)) {
57167
- pad++;
57168
- }
57169
- }
57170
- const groups = Math.floor(effectiveLen / 4);
57171
- const bytes2 = groups * 3 - (pad || 0);
57172
- return bytes2 > 0 ? bytes2 : 0;
57711
+ return estimateBase64(body);
57173
57712
  }
57174
57713
  let bytes = 0;
57175
57714
  for (let i = 0, len = body.length; i < len; i++) {
@@ -57194,6 +57733,16 @@ function estimateDataURLDecodedBytes(url2) {
57194
57733
  }
57195
57734
  }
57196
57735
  return bytes;
57736
+ };
57737
+ function estimateDataURLDecodedBytes(url2) {
57738
+ const fragmentIndex = typeof url2 === "string" ? url2.indexOf("#") : -1;
57739
+ return estimateDataURLBytes(
57740
+ fragmentIndex === -1 ? url2 : url2.slice(0, fragmentIndex),
57741
+ estimatePercentDecodedBase64Bytes
57742
+ );
57743
+ }
57744
+ function estimateDataURLBufferAllocation(url2) {
57745
+ return estimateDataURLBytes(url2, estimateBase64BufferAllocation);
57197
57746
  }
57198
57747
 
57199
57748
  // ../../../node_modules/axios/lib/adapters/http.js
@@ -57213,25 +57762,49 @@ var isBrotliSupported = utils_default.isFunction(import_zlib2.default.createBrot
57213
57762
  var isZstdSupported = utils_default.isFunction(import_zlib2.default.createZstdDecompress);
57214
57763
  var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
57215
57764
  var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
57765
+ var scheduleProgress = typeof process !== "undefined" && process.nextTick ? process.nextTick.bind(process) : utils_default.asap;
57216
57766
  var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
57217
57767
  var isHttps = /https:?/;
57218
- var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
57219
- function setFormDataHeaders(headers, formHeaders, policy) {
57220
- if (policy !== "content-only") {
57221
- headers.set(formHeaders);
57222
- return;
57223
- }
57224
- Object.entries(formHeaders).forEach(([key, val]) => {
57225
- if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
57226
- headers.set(key, val);
57227
- }
57228
- });
57229
- }
57230
57768
  var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
57231
57769
  var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
57770
+ function handleSocketError(err) {
57771
+ const current = this[kAxiosCurrentReq];
57772
+ if (current && !current.destroyed) {
57773
+ current.destroy(err);
57774
+ }
57775
+ }
57232
57776
  var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
57233
57777
  var tunnelingAgentCache = /* @__PURE__ */ new Map();
57234
57778
  var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
57779
+ var NODE_NATIVE_ENV_PROXY_SUPPORT = {
57780
+ 22: 21,
57781
+ 24: 5
57782
+ };
57783
+ function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
57784
+ if (!nodeVersion) {
57785
+ return false;
57786
+ }
57787
+ const [major2, minor2] = nodeVersion.split(".").map((part) => Number(part));
57788
+ if (!Number.isInteger(major2) || !Number.isInteger(minor2)) {
57789
+ return false;
57790
+ }
57791
+ if (major2 > 24) {
57792
+ return true;
57793
+ }
57794
+ return NODE_NATIVE_ENV_PROXY_SUPPORT[major2] != null && minor2 >= NODE_NATIVE_ENV_PROXY_SUPPORT[major2];
57795
+ }
57796
+ function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
57797
+ if (!isNodeNativeEnvProxySupported(nodeVersion)) {
57798
+ return false;
57799
+ }
57800
+ const agentOptions = agent && agent.options;
57801
+ return Boolean(
57802
+ agentOptions && utils_default.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null
57803
+ );
57804
+ }
57805
+ function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
57806
+ return isHttps.test(options.protocol) ? configHttpsAgent || import_https.default.globalAgent : configHttpAgent || import_http.default.globalAgent;
57807
+ }
57235
57808
  function getTunnelingAgent(agentOptions, userHttpsAgent) {
57236
57809
  const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
57237
57810
  const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
@@ -57302,9 +57875,10 @@ function isSameOriginRedirect(redirectOptions, requestDetails) {
57302
57875
  return false;
57303
57876
  }
57304
57877
  }
57305
- function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) {
57878
+ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent, allowEnvProxy = true) {
57306
57879
  let proxy = configProxy;
57307
- if (!proxy && proxy !== false) {
57880
+ const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
57881
+ if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
57308
57882
  const proxyUrl = getProxyForUrl(location);
57309
57883
  if (proxyUrl) {
57310
57884
  if (!shouldBypassProxy(location)) {
@@ -57395,8 +57969,19 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent)
57395
57969
  }
57396
57970
  }
57397
57971
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
57398
- setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
57972
+ setProxy(
57973
+ redirectOptions,
57974
+ configProxy,
57975
+ redirectOptions.href,
57976
+ true,
57977
+ configHttpsAgent,
57978
+ configHttpAgent,
57979
+ allowEnvProxy
57980
+ );
57399
57981
  };
57982
+ return Boolean(
57983
+ proxy || configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent)
57984
+ );
57400
57985
  }
57401
57986
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
57402
57987
  var wrapAsync = (asyncExecutor) => {
@@ -57421,7 +58006,7 @@ var wrapAsync = (asyncExecutor) => {
57421
58006
  };
57422
58007
  var resolveFamily = ({ address, family }) => {
57423
58008
  if (!utils_default.isString(address)) {
57424
- throw TypeError("address must be a string");
58009
+ throw new AxiosError_default("address must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE);
57425
58010
  }
57426
58011
  return {
57427
58012
  address,
@@ -57429,6 +58014,30 @@ var resolveFamily = ({ address, family }) => {
57429
58014
  };
57430
58015
  };
57431
58016
  var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
58017
+ var normalizedLookupCache = /* @__PURE__ */ new WeakMap();
58018
+ var normalizeLookup = (lookup) => {
58019
+ let normalized = normalizedLookupCache.get(lookup);
58020
+ if (normalized) {
58021
+ return normalized;
58022
+ }
58023
+ const callbackLookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
58024
+ normalized = (hostname, opt, cb) => {
58025
+ callbackLookup(hostname, opt, (err, arg0, arg1) => {
58026
+ if (err) {
58027
+ return cb(err);
58028
+ }
58029
+ let addresses;
58030
+ try {
58031
+ addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
58032
+ } catch (error) {
58033
+ return cb(error);
58034
+ }
58035
+ opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
58036
+ });
58037
+ };
58038
+ normalizedLookupCache.set(lookup, normalized);
58039
+ return normalized;
58040
+ };
57432
58041
  var http2Transport = {
57433
58042
  request(options, cb) {
57434
58043
  const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
@@ -57465,11 +58074,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
57465
58074
  let family = own2("family");
57466
58075
  let httpVersion = own2("httpVersion");
57467
58076
  if (httpVersion === void 0) httpVersion = 1;
58077
+ const rawHttpVersion = httpVersion;
57468
58078
  let http2Options = own2("http2Options");
57469
- const responseType = own2("responseType");
57470
- const responseEncoding = own2("responseEncoding");
57471
58079
  const httpAgent = own2("httpAgent");
57472
58080
  const httpsAgent = own2("httpsAgent");
58081
+ const configProxy = own2("proxy");
58082
+ const responseType = own2("responseType");
58083
+ const responseEncoding = own2("responseEncoding");
58084
+ const socketPath = own2("socketPath");
57473
58085
  const method = own2("method").toUpperCase();
57474
58086
  const maxRedirects = own2("maxRedirects");
57475
58087
  const maxBodyLength = own2("maxBodyLength");
@@ -57479,25 +58091,32 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
57479
58091
  let rejected = false;
57480
58092
  let req;
57481
58093
  let connectPhaseTimer;
57482
- httpVersion = +httpVersion;
58094
+ try {
58095
+ httpVersion = +httpVersion;
58096
+ } catch (err) {
58097
+ throw new AxiosError_default(
58098
+ "Invalid protocol version: value is not a number",
58099
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
58100
+ config
58101
+ );
58102
+ }
57483
58103
  if (Number.isNaN(httpVersion)) {
57484
- throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
58104
+ throw new AxiosError_default(
58105
+ `Invalid protocol version: '${rawHttpVersion}' is not a number`,
58106
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
58107
+ config
58108
+ );
57485
58109
  }
57486
58110
  if (httpVersion !== 1 && httpVersion !== 2) {
57487
- throw TypeError(`Unsupported protocol version '${httpVersion}'`);
58111
+ throw new AxiosError_default(
58112
+ `Unsupported protocol version '${httpVersion}'`,
58113
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
58114
+ config
58115
+ );
57488
58116
  }
57489
58117
  const isHttp2 = httpVersion === 2;
57490
58118
  if (lookup) {
57491
- const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
57492
- lookup = (hostname, opt, cb) => {
57493
- _lookup(hostname, opt, (err, arg0, arg1) => {
57494
- if (err) {
57495
- return cb(err);
57496
- }
57497
- const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
57498
- opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
57499
- });
57500
- };
58119
+ lookup = normalizeLookup(lookup);
57501
58120
  }
57502
58121
  const abortEmitter = new import_events3.EventEmitter();
57503
58122
  function abort(reason) {
@@ -57565,12 +58184,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
57565
58184
  }
57566
58185
  });
57567
58186
  const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
57568
- const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
58187
+ const urlBase = socketPath ? "http://localhost" : platform_default.hasBrowserEnv ? platform_default.origin : void 0;
58188
+ const parsed = new URL(fullPath, urlBase);
57569
58189
  const protocol = parsed.protocol || supportedProtocols[0];
57570
58190
  if (protocol === "data:") {
57571
58191
  if (maxContentLength > -1) {
57572
58192
  const dataUrl = String(own2("url") || fullPath || "");
57573
- const estimated = estimateDataURLDecodedBytes(dataUrl);
58193
+ const estimated = estimateDataURLBufferAllocation(dataUrl);
57574
58194
  if (estimated > maxContentLength) {
57575
58195
  return reject(
57576
58196
  new AxiosError_default(
@@ -57701,7 +58321,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
57701
58321
  data,
57702
58322
  progressEventDecorator(
57703
58323
  contentLength,
57704
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
58324
+ progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3)
57705
58325
  )
57706
58326
  )
57707
58327
  );
@@ -57727,17 +58347,21 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
57727
58347
  own2("paramsSerializer")
57728
58348
  ).replace(/^\?/, "");
57729
58349
  } catch (err) {
57730
- const customErr = new Error(err.message);
57731
- customErr.config = config;
57732
- customErr.url = own2("url");
57733
- customErr.exists = true;
57734
- return reject(customErr);
58350
+ return reject(
58351
+ AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config, null, null, {
58352
+ url: own2("url"),
58353
+ exists: true
58354
+ })
58355
+ );
57735
58356
  }
57736
58357
  headers.set(
57737
58358
  "Accept-Encoding",
57738
58359
  utils_default.hasOwnProp(transitional2, "advertiseZstdAcceptEncoding") && transitional2.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING,
57739
58360
  false
57740
58361
  );
58362
+ if (isHttp2 && lookup) {
58363
+ http2Options = Object.assign(/* @__PURE__ */ Object.create(null), http2Options, { lookup });
58364
+ }
57741
58365
  const options = Object.assign(/* @__PURE__ */ Object.create(null), {
57742
58366
  path: path3,
57743
58367
  method,
@@ -57748,10 +58372,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
57748
58372
  family,
57749
58373
  beforeRedirect: dispatchBeforeRedirect,
57750
58374
  beforeRedirects: /* @__PURE__ */ Object.create(null),
57751
- http2Options
58375
+ http2Options,
58376
+ createConnection: void 0
57752
58377
  });
57753
58378
  !utils_default.isUndefined(lookup) && (options.lookup = lookup);
57754
- const socketPath = own2("socketPath");
58379
+ let proxyApplied = false;
57755
58380
  if (socketPath) {
57756
58381
  if (typeof socketPath !== "string") {
57757
58382
  return reject(
@@ -57779,12 +58404,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
57779
58404
  } else {
57780
58405
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
57781
58406
  options.port = parsed.port;
57782
- setProxy(
58407
+ proxyApplied = setProxy(
57783
58408
  options,
57784
- own2("proxy"),
58409
+ configProxy,
57785
58410
  protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path,
57786
58411
  false,
57787
- httpsAgent
58412
+ httpsAgent,
58413
+ httpAgent,
58414
+ // The HTTP/2 transport connects independently of HTTP/1 agents, so it
58415
+ // cannot apply either axios-resolved or agent-local environment proxies.
58416
+ // Explicit proxy config is still processed and rejected below.
58417
+ !isHttp2
57788
58418
  );
57789
58419
  }
57790
58420
  let transport;
@@ -57795,6 +58425,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
57795
58425
  options.agent = isHttpsRequest ? httpsAgent : httpAgent;
57796
58426
  }
57797
58427
  if (isHttp2) {
58428
+ if (proxyApplied) {
58429
+ return reject(
58430
+ new AxiosError_default(
58431
+ "HTTP/2 requests with a proxy are not supported",
58432
+ AxiosError_default.ERR_NOT_SUPPORT,
58433
+ config
58434
+ )
58435
+ );
58436
+ }
57798
58437
  transport = http2Transport;
57799
58438
  } else {
57800
58439
  const configTransport = own2("transport");
@@ -57882,7 +58521,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
57882
58521
  transformStream,
57883
58522
  progressEventDecorator(
57884
58523
  responseLength,
57885
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
58524
+ progressEventReducer(
58525
+ asyncDecorator(onDownloadProgress, scheduleProgress),
58526
+ true,
58527
+ 3
58528
+ )
57886
58529
  )
57887
58530
  )
57888
58531
  );
@@ -58027,14 +58670,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
58027
58670
  });
58028
58671
  const boundSockets = /* @__PURE__ */ new Set();
58029
58672
  req.on("socket", function handleRequestSocket(socket) {
58030
- socket.setKeepAlive(true, 1e3 * 60);
58673
+ if (typeof socket.setKeepAlive === "function") {
58674
+ socket.setKeepAlive(true, 1e3 * 60);
58675
+ }
58031
58676
  if (!socket[kAxiosSocketListener]) {
58032
- socket.on("error", function handleSocketError(err) {
58033
- const current = socket[kAxiosCurrentReq];
58034
- if (current && !current.destroyed) {
58035
- current.destroy(err);
58036
- }
58037
- });
58677
+ socket.on("error", handleSocketError);
58038
58678
  socket[kAxiosSocketListener] = true;
58039
58679
  }
58040
58680
  socket[kAxiosCurrentReq] = req;
@@ -58166,7 +58806,11 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
58166
58806
  const cookie = cookies[i].replace(/^\s+/, "");
58167
58807
  const eq = cookie.indexOf("=");
58168
58808
  if (eq !== -1 && cookie.slice(0, eq) === name) {
58169
- return decodeURIComponent(cookie.slice(eq + 1));
58809
+ try {
58810
+ return decodeURIComponent(cookie.slice(eq + 1));
58811
+ } catch (e) {
58812
+ return cookie.slice(eq + 1);
58813
+ }
58170
58814
  }
58171
58815
  }
58172
58816
  return null;
@@ -58190,7 +58834,18 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
58190
58834
 
58191
58835
  // ../../../node_modules/axios/lib/core/mergeConfig.js
58192
58836
  var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
58837
+ var ownEnumerableKeys = (thing) => {
58838
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
58839
+ return Object.keys(thing).concat(
58840
+ Object.getOwnPropertySymbols(thing).filter(
58841
+ (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
58842
+ )
58843
+ );
58844
+ }
58845
+ return Object.keys(thing);
58846
+ };
58193
58847
  function mergeConfig(config1, config2) {
58848
+ config1 = config1 || {};
58194
58849
  config2 = config2 || {};
58195
58850
  const config = /* @__PURE__ */ Object.create(null);
58196
58851
  Object.defineProperty(config, "hasOwnProperty", {
@@ -58264,7 +58919,7 @@ function mergeConfig(config1, config2) {
58264
58919
  transformResponse: defaultToConfig2,
58265
58920
  paramsSerializer: defaultToConfig2,
58266
58921
  timeout: defaultToConfig2,
58267
- timeoutMessage: defaultToConfig2,
58922
+ timeoutErrorMessage: defaultToConfig2,
58268
58923
  withCredentials: defaultToConfig2,
58269
58924
  withXSRFToken: defaultToConfig2,
58270
58925
  adapter: defaultToConfig2,
@@ -58287,7 +58942,7 @@ function mergeConfig(config1, config2) {
58287
58942
  validateStatus: mergeDirectKeys,
58288
58943
  headers: (a, b2, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b2), prop, true)
58289
58944
  };
58290
- utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
58945
+ utils_default.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
58291
58946
  if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
58292
58947
  const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
58293
58948
  const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
@@ -58306,18 +58961,6 @@ function mergeConfig(config1, config2) {
58306
58961
  }
58307
58962
 
58308
58963
  // ../../../node_modules/axios/lib/helpers/resolveConfig.js
58309
- var FORM_DATA_CONTENT_HEADERS2 = ["content-type", "content-length"];
58310
- function setFormDataHeaders2(headers, formHeaders, policy) {
58311
- if (policy !== "content-only") {
58312
- headers.set(formHeaders);
58313
- return;
58314
- }
58315
- Object.entries(formHeaders).forEach(([key, val]) => {
58316
- if (FORM_DATA_CONTENT_HEADERS2.includes(key.toLowerCase())) {
58317
- headers.set(key, val);
58318
- }
58319
- });
58320
- }
58321
58964
  var encodeUTF8 = (str) => encodeURIComponent(str).replace(
58322
58965
  /%([0-9A-F]{2})/gi,
58323
58966
  (_3, hex) => String.fromCharCode(parseInt(hex, 16))
@@ -58343,16 +58986,21 @@ function resolveConfig(config) {
58343
58986
  if (auth) {
58344
58987
  const username = utils_default.getSafeProp(auth, "username") || "";
58345
58988
  const password = utils_default.getSafeProp(auth, "password") || "";
58346
- headers.set(
58347
- "Authorization",
58348
- "Basic " + btoa(username + ":" + (password ? encodeUTF8(password) : ""))
58349
- );
58989
+ try {
58990
+ headers.set(
58991
+ "Authorization",
58992
+ "Basic " + btoa(username + ":" + (password ? encodeUTF8(password) : ""))
58993
+ );
58994
+ } catch (e) {
58995
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_OPTION_VALUE, config);
58996
+ }
58350
58997
  }
58351
58998
  if (utils_default.isFormData(data)) {
58999
+ const getHeaders = utils_default.getSafeProp(data, "getHeaders");
58352
59000
  if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) {
58353
59001
  headers.setContentType(void 0);
58354
- } else if (utils_default.isFunction(data.getHeaders)) {
58355
- setFormDataHeaders2(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
59002
+ } else if (utils_default.isFunction(getHeaders)) {
59003
+ setFormDataHeaders(headers, getHeaders.call(data), own2("formDataHeaderPolicy"));
58356
59004
  }
58357
59005
  }
58358
59006
  if (platform_default.hasStandardBrowserEnv) {
@@ -58381,7 +59029,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
58381
59029
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
58382
59030
  let onCanceled;
58383
59031
  let uploadThrottled, downloadThrottled;
58384
- let flushUpload, flushDownload;
59032
+ let flushUpload, flushDownload, flushDownloadWithEvent;
58385
59033
  function done() {
58386
59034
  flushUpload && flushUpload();
58387
59035
  flushDownload && flushDownload();
@@ -58391,7 +59039,27 @@ var xhr_default = isXHRAdapterSupported && function(config) {
58391
59039
  let request = new XMLHttpRequest();
58392
59040
  request.open(_config.method.toUpperCase(), _config.url, true);
58393
59041
  request.timeout = _config.timeout;
58394
- function onloadend() {
59042
+ function onloadend(event) {
59043
+ if (!request) {
59044
+ return;
59045
+ }
59046
+ if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform_default.origin)) !== "file" && !(request.responseURL && request.responseURL.startsWith("file:"))) {
59047
+ reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
59048
+ done();
59049
+ request = null;
59050
+ return;
59051
+ }
59052
+ try {
59053
+ if (event) {
59054
+ flushDownloadWithEvent && flushDownloadWithEvent(event);
59055
+ } else {
59056
+ flushDownload && flushDownload();
59057
+ }
59058
+ } catch (err) {
59059
+ setTimeout(() => {
59060
+ throw err;
59061
+ });
59062
+ }
58395
59063
  if (!request) {
58396
59064
  return;
58397
59065
  }
@@ -58479,7 +59147,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
58479
59147
  request.responseType = _config.responseType;
58480
59148
  }
58481
59149
  if (onDownloadProgress) {
58482
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
59150
+ [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(
59151
+ onDownloadProgress,
59152
+ true
59153
+ );
58483
59154
  request.addEventListener("progress", downloadThrottled);
58484
59155
  }
58485
59156
  if (onUploadProgress && request.upload) {
@@ -58511,6 +59182,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
58511
59182
  config
58512
59183
  )
58513
59184
  );
59185
+ done();
58514
59186
  return;
58515
59187
  }
58516
59188
  request.send(requestData || null);
@@ -58550,7 +59222,16 @@ var composeSignals = (signals3, timeout2) => {
58550
59222
  });
58551
59223
  signals3 = null;
58552
59224
  };
58553
- signals3.forEach((signal2) => signal2.addEventListener("abort", onabort));
59225
+ signals3.forEach((signal2) => {
59226
+ if (aborted) {
59227
+ return;
59228
+ }
59229
+ if (signal2.aborted) {
59230
+ onabort.call(signal2);
59231
+ return;
59232
+ }
59233
+ signal2.addEventListener("abort", onabort, { once: true });
59234
+ });
58554
59235
  const { signal } = controller;
58555
59236
  signal.unsubscribe = () => utils_default.asap(unsubscribe);
58556
59237
  return signal;
@@ -58639,6 +59320,17 @@ var trackStream = (stream5, chunkSize, onProgress, onFinish) => {
58639
59320
 
58640
59321
  // ../../../node_modules/axios/lib/adapters/fetch.js
58641
59322
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
59323
+ var DEFAULT_REQUEST_OPTIONS = {
59324
+ cache: "default",
59325
+ redirect: "follow",
59326
+ referrer: "about:client",
59327
+ referrerPolicy: "",
59328
+ mode: "cors",
59329
+ integrity: "",
59330
+ keepalive: false,
59331
+ priority: "auto",
59332
+ window: null
59333
+ };
58642
59334
  var { isFunction: isFunction2 } = utils_default;
58643
59335
  var encodeUTF82 = (str) => encodeURIComponent(str).replace(
58644
59336
  /%([0-9A-F]{2})/gi,
@@ -58769,7 +59461,8 @@ var factory = (env3) => {
58769
59461
  withCredentials = "same-origin",
58770
59462
  fetchOptions,
58771
59463
  maxContentLength,
58772
- maxBodyLength
59464
+ maxBodyLength,
59465
+ maxRedirects
58773
59466
  } = resolveConfig_default(config);
58774
59467
  const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
58775
59468
  const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
@@ -58899,17 +59592,44 @@ var factory = (env3) => {
58899
59592
  }
58900
59593
  }
58901
59594
  headers.set("User-Agent", "axios/" + VERSION, false);
58902
- const resolvedOptions = {
58903
- ...fetchOptions,
59595
+ const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(/* @__PURE__ */ Object.create(null), fetchOptions);
59596
+ if (safeFetchOptions) {
59597
+ delete safeFetchOptions.body;
59598
+ delete safeFetchOptions.headers;
59599
+ delete safeFetchOptions.method;
59600
+ delete safeFetchOptions.signal;
59601
+ delete safeFetchOptions.duplex;
59602
+ delete safeFetchOptions.credentials;
59603
+ }
59604
+ const resolvedOptions = Object.assign(/* @__PURE__ */ Object.create(null), safeFetchOptions, {
58904
59605
  signal: composedSignal,
58905
59606
  method: method.toUpperCase(),
58906
59607
  headers: toByteStringHeaderObject(headers.normalize()),
58907
59608
  body: data,
58908
59609
  duplex: "half",
58909
59610
  credentials: isCredentialsSupported ? withCredentials : void 0
58910
- };
59611
+ });
59612
+ if (isRequestSupported) {
59613
+ utils_default.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
59614
+ if (resolvedOptions[key] === void 0) {
59615
+ resolvedOptions[key] = value;
59616
+ }
59617
+ });
59618
+ if (resolvedOptions.signal === void 0) {
59619
+ resolvedOptions.signal = null;
59620
+ }
59621
+ if (resolvedOptions.body === void 0) {
59622
+ resolvedOptions.body = null;
59623
+ }
59624
+ }
59625
+ if (maxRedirects === 0) {
59626
+ resolvedOptions.redirect = "manual";
59627
+ if (safeFetchOptions) {
59628
+ safeFetchOptions.redirect = "manual";
59629
+ }
59630
+ }
58911
59631
  request = isRequestSupported && new Request(url2, resolvedOptions);
58912
- let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
59632
+ let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url2, resolvedOptions));
58913
59633
  const responseHeaders = AxiosHeaders_default.from(response.headers);
58914
59634
  if (hasMaxContentLength) {
58915
59635
  const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
@@ -58998,7 +59718,15 @@ var factory = (env3) => {
58998
59718
  const canceledError = composedSignal.reason;
58999
59719
  canceledError.config = config;
59000
59720
  request && (canceledError.request = request);
59001
- err !== canceledError && (canceledError.cause = err);
59721
+ if (err !== canceledError) {
59722
+ Object.defineProperty(canceledError, "cause", {
59723
+ __proto__: null,
59724
+ value: err,
59725
+ writable: true,
59726
+ enumerable: false,
59727
+ configurable: true
59728
+ });
59729
+ }
59002
59730
  throw canceledError;
59003
59731
  }
59004
59732
  if (pendingBodyError) {
@@ -59010,18 +59738,21 @@ var factory = (env3) => {
59010
59738
  throw err;
59011
59739
  }
59012
59740
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
59013
- throw Object.assign(
59014
- new AxiosError_default(
59015
- "Network Error",
59016
- AxiosError_default.ERR_NETWORK,
59017
- config,
59018
- request,
59019
- err && err.response
59020
- ),
59021
- {
59022
- cause: err.cause || err
59023
- }
59741
+ const networkError = new AxiosError_default(
59742
+ "Network Error",
59743
+ AxiosError_default.ERR_NETWORK,
59744
+ config,
59745
+ request,
59746
+ err && err.response
59024
59747
  );
59748
+ Object.defineProperty(networkError, "cause", {
59749
+ __proto__: null,
59750
+ value: err.cause || err,
59751
+ writable: true,
59752
+ enumerable: false,
59753
+ configurable: true
59754
+ });
59755
+ throw networkError;
59025
59756
  }
59026
59757
  throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
59027
59758
  }
@@ -59090,7 +59821,7 @@ function getAdapter(adapters, config) {
59090
59821
  let s3 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
59091
59822
  throw new AxiosError_default(
59092
59823
  `There is no suitable adapter to dispatch the request ` + s3,
59093
- "ERR_NOT_SUPPORT"
59824
+ AxiosError_default.ERR_NOT_SUPPORT
59094
59825
  );
59095
59826
  }
59096
59827
  return adapter2;
@@ -59117,9 +59848,10 @@ function throwIfCancellationRequested(config) {
59117
59848
  throw new CanceledError_default(null, config);
59118
59849
  }
59119
59850
  }
59120
- function dispatchRequest(config) {
59851
+ function dispatchRequest(_config) {
59852
+ const config = utils_default.toSafeFlatObject(_config);
59121
59853
  throwIfCancellationRequested(config);
59122
- config.headers = AxiosHeaders_default.from(config.headers);
59854
+ config.headers = AxiosHeaders_default.from(utils_default.getSafeProp(config, "headers"));
59123
59855
  config.data = transformData.call(config, config.transformRequest);
59124
59856
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
59125
59857
  config.headers.setContentType("application/x-www-form-urlencoded", false);
@@ -59197,7 +59929,7 @@ validators.spelling = function spelling(correctSpelling) {
59197
59929
  };
59198
59930
  };
59199
59931
  function assertOptions(options, schema, allowUnknown) {
59200
- if (typeof options !== "object") {
59932
+ if (typeof options !== "object" || options === null) {
59201
59933
  throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
59202
59934
  }
59203
59935
  const keys = Object.keys(options);
@@ -59249,16 +59981,15 @@ var Axios = class {
59249
59981
  return await this._request(configOrUrl, config);
59250
59982
  } catch (err) {
59251
59983
  if (err instanceof Error) {
59252
- let dummy = {};
59253
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
59254
- const stack = (() => {
59255
- if (!dummy.stack) {
59256
- return "";
59257
- }
59258
- const firstNewlineIndex = dummy.stack.indexOf("\n");
59259
- return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
59260
- })();
59261
59984
  try {
59985
+ let dummy = {};
59986
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
59987
+ const dummyStack = dummy.stack;
59988
+ let stack = "";
59989
+ if (typeof dummyStack === "string") {
59990
+ const firstNewlineIndex = dummyStack.indexOf("\n");
59991
+ stack = firstNewlineIndex === -1 ? "" : dummyStack.slice(firstNewlineIndex + 1);
59992
+ }
59262
59993
  if (!err.stack) {
59263
59994
  err.stack = stack;
59264
59995
  } else if (stack) {
@@ -59328,9 +60059,9 @@ var Axios = class {
59328
60059
  },
59329
60060
  true
59330
60061
  );
59331
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
60062
+ config.method = (utils_default.getSafeProp(config, "method") || utils_default.getSafeProp(this.defaults, "method") || "get").toLowerCase();
59332
60063
  let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
59333
- headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
60064
+ headers && utils_default.forEach(methodList_default.concat("common"), (method) => {
59334
60065
  delete headers[method];
59335
60066
  });
59336
60067
  config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
@@ -59373,16 +60104,31 @@ var Axios = class {
59373
60104
  const onFulfilled = requestInterceptorChain[i++];
59374
60105
  const onRejected = requestInterceptorChain[i++];
59375
60106
  try {
59376
- newConfig = onFulfilled(newConfig);
60107
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
59377
60108
  } catch (error) {
59378
- onRejected.call(this, error);
60109
+ if (!onRejected) {
60110
+ promise = Promise.reject(error);
60111
+ break;
60112
+ }
60113
+ try {
60114
+ const rejectedResult = onRejected.call(this, error);
60115
+ if (utils_default.isThenable(rejectedResult)) {
60116
+ promise = Promise.resolve(rejectedResult).then(
60117
+ () => dispatchRequest.call(this, newConfig)
60118
+ );
60119
+ }
60120
+ } catch (rejectedError) {
60121
+ promise = Promise.reject(rejectedError);
60122
+ }
59379
60123
  break;
59380
60124
  }
59381
60125
  }
59382
- try {
59383
- promise = dispatchRequest.call(this, newConfig);
59384
- } catch (error) {
59385
- return Promise.reject(error);
60126
+ if (!promise) {
60127
+ try {
60128
+ promise = dispatchRequest.call(this, newConfig);
60129
+ } catch (error) {
60130
+ promise = Promise.reject(error);
60131
+ }
59386
60132
  }
59387
60133
  i = 0;
59388
60134
  len = responseInterceptorChain.length;
@@ -59578,14 +60324,22 @@ var HttpStatusCode = {
59578
60324
  Gone: 410,
59579
60325
  LengthRequired: 411,
59580
60326
  PreconditionFailed: 412,
60327
+ /**
60328
+ * @deprecated Use `ContentTooLarge` instead.
60329
+ */
59581
60330
  PayloadTooLarge: 413,
60331
+ ContentTooLarge: 413,
59582
60332
  UriTooLong: 414,
59583
60333
  UnsupportedMediaType: 415,
59584
60334
  RangeNotSatisfiable: 416,
59585
60335
  ExpectationFailed: 417,
59586
60336
  ImATeapot: 418,
59587
60337
  MisdirectedRequest: 421,
60338
+ /**
60339
+ * @deprecated Use `UnprocessableContent` instead.
60340
+ */
59588
60341
  UnprocessableEntity: 422,
60342
+ UnprocessableContent: 422,
59589
60343
  Locked: 423,
59590
60344
  FailedDependency: 424,
59591
60345
  TooEarly: 425,
@@ -59605,6 +60359,7 @@ var HttpStatusCode = {
59605
60359
  LoopDetected: 508,
59606
60360
  NotExtended: 510,
59607
60361
  NetworkAuthenticationRequired: 511,
60362
+ WebServerReturnsAnUnknownError: 520,
59608
60363
  WebServerIsDown: 521,
59609
60364
  ConnectionTimedOut: 522,
59610
60365
  OriginIsUnreachable: 523,
@@ -59613,7 +60368,9 @@ var HttpStatusCode = {
59613
60368
  InvalidSslCertificate: 526
59614
60369
  };
59615
60370
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
59616
- HttpStatusCode[value] = key;
60371
+ if (HttpStatusCode[value] === void 0) {
60372
+ HttpStatusCode[value] = key;
60373
+ }
59617
60374
  });
59618
60375
  var HttpStatusCode_default = HttpStatusCode;
59619
60376