publish-microfrontend 1.11.0-beta.efd8b71 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +868 -579
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -23791,7 +23791,7 @@ var _global = (() => {
23791
23791
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
23792
23792
  })();
23793
23793
  var isContextDefined = (context) => !isUndefined(context) && context !== _global;
23794
- function merge() {
23794
+ function merge(...objs) {
23795
23795
  const { caseless, skipUndefined } = isContextDefined(this) && this || {};
23796
23796
  const result = {};
23797
23797
  const assignValue = (val, key) => {
@@ -23799,8 +23799,9 @@ function merge() {
23799
23799
  return;
23800
23800
  }
23801
23801
  const targetKey = caseless && findKey(result, key) || key;
23802
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
23803
- result[targetKey] = merge(result[targetKey], val);
23802
+ const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
23803
+ if (isPlainObject(existing) && isPlainObject(val)) {
23804
+ result[targetKey] = merge(existing, val);
23804
23805
  } else if (isPlainObject(val)) {
23805
23806
  result[targetKey] = merge({}, val);
23806
23807
  } else if (isArray(val)) {
@@ -23809,8 +23810,8 @@ function merge() {
23809
23810
  result[targetKey] = val;
23810
23811
  }
23811
23812
  };
23812
- for (let i = 0, l = arguments.length; i < l; i++) {
23813
- arguments[i] && forEach(arguments[i], assignValue);
23813
+ for (let i = 0, l = objs.length; i < l; i++) {
23814
+ objs[i] && forEach(objs[i], assignValue);
23814
23815
  }
23815
23816
  return result;
23816
23817
  }
@@ -23820,6 +23821,9 @@ var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
23820
23821
  (val, key) => {
23821
23822
  if (thisArg && isFunction(val)) {
23822
23823
  Object.defineProperty(a, key, {
23824
+ // Null-proto descriptor so a polluted Object.prototype.get cannot
23825
+ // hijack defineProperty's accessor-vs-data resolution.
23826
+ __proto__: null,
23823
23827
  value: bind(val, thisArg),
23824
23828
  writable: true,
23825
23829
  enumerable: true,
@@ -23827,6 +23831,7 @@ var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
23827
23831
  });
23828
23832
  } else {
23829
23833
  Object.defineProperty(a, key, {
23834
+ __proto__: null,
23830
23835
  value: val,
23831
23836
  writable: true,
23832
23837
  enumerable: true,
@@ -23847,12 +23852,14 @@ var stripBOM = (content) => {
23847
23852
  var inherits = (constructor, superConstructor, props, descriptors) => {
23848
23853
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
23849
23854
  Object.defineProperty(constructor.prototype, "constructor", {
23855
+ __proto__: null,
23850
23856
  value: constructor,
23851
23857
  writable: true,
23852
23858
  enumerable: false,
23853
23859
  configurable: true
23854
23860
  });
23855
23861
  Object.defineProperty(constructor, "super", {
23862
+ __proto__: null,
23856
23863
  value: superConstructor.prototype
23857
23864
  });
23858
23865
  props && Object.assign(constructor.prototype, props);
@@ -23941,7 +23948,7 @@ var reduceDescriptors = (obj, reducer) => {
23941
23948
  };
23942
23949
  var freezeMethods = (obj) => {
23943
23950
  reduceDescriptors(obj, (descriptor, name) => {
23944
- if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
23951
+ if (isFunction(obj) && ["arguments", "caller", "callee"].includes(name)) {
23945
23952
  return false;
23946
23953
  }
23947
23954
  const value = obj[name];
@@ -24088,7 +24095,366 @@ var utils_default = {
24088
24095
  isIterable
24089
24096
  };
24090
24097
 
24098
+ // ../../../node_modules/axios/lib/helpers/parseHeaders.js
24099
+ var ignoreDuplicateOf = utils_default.toObjectSet([
24100
+ "age",
24101
+ "authorization",
24102
+ "content-length",
24103
+ "content-type",
24104
+ "etag",
24105
+ "expires",
24106
+ "from",
24107
+ "host",
24108
+ "if-modified-since",
24109
+ "if-unmodified-since",
24110
+ "last-modified",
24111
+ "location",
24112
+ "max-forwards",
24113
+ "proxy-authorization",
24114
+ "referer",
24115
+ "retry-after",
24116
+ "user-agent"
24117
+ ]);
24118
+ var parseHeaders_default = (rawHeaders) => {
24119
+ const parsed = {};
24120
+ let key;
24121
+ let val;
24122
+ let i;
24123
+ rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
24124
+ i = line.indexOf(":");
24125
+ key = line.substring(0, i).trim().toLowerCase();
24126
+ val = line.substring(i + 1).trim();
24127
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
24128
+ return;
24129
+ }
24130
+ if (key === "set-cookie") {
24131
+ if (parsed[key]) {
24132
+ parsed[key].push(val);
24133
+ } else {
24134
+ parsed[key] = [val];
24135
+ }
24136
+ } else {
24137
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
24138
+ }
24139
+ });
24140
+ return parsed;
24141
+ };
24142
+
24143
+ // ../../../node_modules/axios/lib/core/AxiosHeaders.js
24144
+ var $internals = /* @__PURE__ */ Symbol("internals");
24145
+ var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
24146
+ function trimSPorHTAB(str) {
24147
+ let start = 0;
24148
+ let end = str.length;
24149
+ while (start < end) {
24150
+ const code = str.charCodeAt(start);
24151
+ if (code !== 9 && code !== 32) {
24152
+ break;
24153
+ }
24154
+ start += 1;
24155
+ }
24156
+ while (end > start) {
24157
+ const code = str.charCodeAt(end - 1);
24158
+ if (code !== 9 && code !== 32) {
24159
+ break;
24160
+ }
24161
+ end -= 1;
24162
+ }
24163
+ return start === 0 && end === str.length ? str : str.slice(start, end);
24164
+ }
24165
+ function normalizeHeader(header) {
24166
+ return header && String(header).trim().toLowerCase();
24167
+ }
24168
+ function sanitizeHeaderValue(str) {
24169
+ return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
24170
+ }
24171
+ function normalizeValue(value) {
24172
+ if (value === false || value == null) {
24173
+ return value;
24174
+ }
24175
+ return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
24176
+ }
24177
+ function parseTokens(str) {
24178
+ const tokens = /* @__PURE__ */ Object.create(null);
24179
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
24180
+ let match;
24181
+ while (match = tokensRE.exec(str)) {
24182
+ tokens[match[1]] = match[2];
24183
+ }
24184
+ return tokens;
24185
+ }
24186
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
24187
+ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
24188
+ if (utils_default.isFunction(filter2)) {
24189
+ return filter2.call(this, value, header);
24190
+ }
24191
+ if (isHeaderNameFilter) {
24192
+ value = header;
24193
+ }
24194
+ if (!utils_default.isString(value)) return;
24195
+ if (utils_default.isString(filter2)) {
24196
+ return value.indexOf(filter2) !== -1;
24197
+ }
24198
+ if (utils_default.isRegExp(filter2)) {
24199
+ return filter2.test(value);
24200
+ }
24201
+ }
24202
+ function formatHeader(header) {
24203
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
24204
+ return char.toUpperCase() + str;
24205
+ });
24206
+ }
24207
+ function buildAccessors(obj, header) {
24208
+ const accessorName = utils_default.toCamelCase(" " + header);
24209
+ ["get", "set", "has"].forEach((methodName) => {
24210
+ Object.defineProperty(obj, methodName + accessorName, {
24211
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
24212
+ // this data descriptor into an accessor descriptor on the way in.
24213
+ __proto__: null,
24214
+ value: function(arg1, arg2, arg3) {
24215
+ return this[methodName].call(this, header, arg1, arg2, arg3);
24216
+ },
24217
+ configurable: true
24218
+ });
24219
+ });
24220
+ }
24221
+ var AxiosHeaders = class {
24222
+ constructor(headers) {
24223
+ headers && this.set(headers);
24224
+ }
24225
+ set(header, valueOrRewrite, rewrite) {
24226
+ const self2 = this;
24227
+ function setHeader(_value, _header, _rewrite) {
24228
+ const lHeader = normalizeHeader(_header);
24229
+ if (!lHeader) {
24230
+ throw new Error("header name must be a non-empty string");
24231
+ }
24232
+ const key = utils_default.findKey(self2, lHeader);
24233
+ if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
24234
+ self2[key || _header] = normalizeValue(_value);
24235
+ }
24236
+ }
24237
+ const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
24238
+ if (utils_default.isPlainObject(header) || header instanceof this.constructor) {
24239
+ setHeaders(header, valueOrRewrite);
24240
+ } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
24241
+ setHeaders(parseHeaders_default(header), valueOrRewrite);
24242
+ } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
24243
+ let obj = {}, dest, key;
24244
+ for (const entry of header) {
24245
+ if (!utils_default.isArray(entry)) {
24246
+ throw TypeError("Object iterator must return a key-value pair");
24247
+ }
24248
+ obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
24249
+ }
24250
+ setHeaders(obj, valueOrRewrite);
24251
+ } else {
24252
+ header != null && setHeader(valueOrRewrite, header, rewrite);
24253
+ }
24254
+ return this;
24255
+ }
24256
+ get(header, parser) {
24257
+ header = normalizeHeader(header);
24258
+ if (header) {
24259
+ const key = utils_default.findKey(this, header);
24260
+ if (key) {
24261
+ const value = this[key];
24262
+ if (!parser) {
24263
+ return value;
24264
+ }
24265
+ if (parser === true) {
24266
+ return parseTokens(value);
24267
+ }
24268
+ if (utils_default.isFunction(parser)) {
24269
+ return parser.call(this, value, key);
24270
+ }
24271
+ if (utils_default.isRegExp(parser)) {
24272
+ return parser.exec(value);
24273
+ }
24274
+ throw new TypeError("parser must be boolean|regexp|function");
24275
+ }
24276
+ }
24277
+ }
24278
+ has(header, matcher) {
24279
+ header = normalizeHeader(header);
24280
+ if (header) {
24281
+ const key = utils_default.findKey(this, header);
24282
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
24283
+ }
24284
+ return false;
24285
+ }
24286
+ delete(header, matcher) {
24287
+ const self2 = this;
24288
+ let deleted = false;
24289
+ function deleteHeader(_header) {
24290
+ _header = normalizeHeader(_header);
24291
+ if (_header) {
24292
+ const key = utils_default.findKey(self2, _header);
24293
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
24294
+ delete self2[key];
24295
+ deleted = true;
24296
+ }
24297
+ }
24298
+ }
24299
+ if (utils_default.isArray(header)) {
24300
+ header.forEach(deleteHeader);
24301
+ } else {
24302
+ deleteHeader(header);
24303
+ }
24304
+ return deleted;
24305
+ }
24306
+ clear(matcher) {
24307
+ const keys = Object.keys(this);
24308
+ let i = keys.length;
24309
+ let deleted = false;
24310
+ while (i--) {
24311
+ const key = keys[i];
24312
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
24313
+ delete this[key];
24314
+ deleted = true;
24315
+ }
24316
+ }
24317
+ return deleted;
24318
+ }
24319
+ normalize(format2) {
24320
+ const self2 = this;
24321
+ const headers = {};
24322
+ utils_default.forEach(this, (value, header) => {
24323
+ const key = utils_default.findKey(headers, header);
24324
+ if (key) {
24325
+ self2[key] = normalizeValue(value);
24326
+ delete self2[header];
24327
+ return;
24328
+ }
24329
+ const normalized = format2 ? formatHeader(header) : String(header).trim();
24330
+ if (normalized !== header) {
24331
+ delete self2[header];
24332
+ }
24333
+ self2[normalized] = normalizeValue(value);
24334
+ headers[normalized] = true;
24335
+ });
24336
+ return this;
24337
+ }
24338
+ concat(...targets) {
24339
+ return this.constructor.concat(this, ...targets);
24340
+ }
24341
+ toJSON(asStrings) {
24342
+ const obj = /* @__PURE__ */ Object.create(null);
24343
+ utils_default.forEach(this, (value, header) => {
24344
+ value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
24345
+ });
24346
+ return obj;
24347
+ }
24348
+ [Symbol.iterator]() {
24349
+ return Object.entries(this.toJSON())[Symbol.iterator]();
24350
+ }
24351
+ toString() {
24352
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
24353
+ }
24354
+ getSetCookie() {
24355
+ return this.get("set-cookie") || [];
24356
+ }
24357
+ get [Symbol.toStringTag]() {
24358
+ return "AxiosHeaders";
24359
+ }
24360
+ static from(thing) {
24361
+ return thing instanceof this ? thing : new this(thing);
24362
+ }
24363
+ static concat(first, ...targets) {
24364
+ const computed = new this(first);
24365
+ targets.forEach((target) => computed.set(target));
24366
+ return computed;
24367
+ }
24368
+ static accessor(header) {
24369
+ const internals = this[$internals] = this[$internals] = {
24370
+ accessors: {}
24371
+ };
24372
+ const accessors = internals.accessors;
24373
+ const prototype2 = this.prototype;
24374
+ function defineAccessor(_header) {
24375
+ const lHeader = normalizeHeader(_header);
24376
+ if (!accessors[lHeader]) {
24377
+ buildAccessors(prototype2, _header);
24378
+ accessors[lHeader] = true;
24379
+ }
24380
+ }
24381
+ utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
24382
+ return this;
24383
+ }
24384
+ };
24385
+ AxiosHeaders.accessor([
24386
+ "Content-Type",
24387
+ "Content-Length",
24388
+ "Accept",
24389
+ "Accept-Encoding",
24390
+ "User-Agent",
24391
+ "Authorization"
24392
+ ]);
24393
+ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
24394
+ let mapped = key[0].toUpperCase() + key.slice(1);
24395
+ return {
24396
+ get: () => value,
24397
+ set(headerValue) {
24398
+ this[mapped] = headerValue;
24399
+ }
24400
+ };
24401
+ });
24402
+ utils_default.freezeMethods(AxiosHeaders);
24403
+ var AxiosHeaders_default = AxiosHeaders;
24404
+
24091
24405
  // ../../../node_modules/axios/lib/core/AxiosError.js
24406
+ var REDACTED = "[REDACTED ****]";
24407
+ function hasOwnOrPrototypeToJSON(source) {
24408
+ if (utils_default.hasOwnProp(source, "toJSON")) {
24409
+ return true;
24410
+ }
24411
+ let prototype2 = Object.getPrototypeOf(source);
24412
+ while (prototype2 && prototype2 !== Object.prototype) {
24413
+ if (utils_default.hasOwnProp(prototype2, "toJSON")) {
24414
+ return true;
24415
+ }
24416
+ prototype2 = Object.getPrototypeOf(prototype2);
24417
+ }
24418
+ return false;
24419
+ }
24420
+ function redactConfig(config, redactKeys) {
24421
+ const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
24422
+ const seen = [];
24423
+ const visit = (source) => {
24424
+ if (source === null || typeof source !== "object") return source;
24425
+ if (utils_default.isBuffer(source)) return source;
24426
+ if (seen.indexOf(source) !== -1) return void 0;
24427
+ if (source instanceof AxiosHeaders_default) {
24428
+ source = source.toJSON();
24429
+ }
24430
+ seen.push(source);
24431
+ let result;
24432
+ if (utils_default.isArray(source)) {
24433
+ result = [];
24434
+ source.forEach((v, i) => {
24435
+ const reducedValue = visit(v);
24436
+ if (!utils_default.isUndefined(reducedValue)) {
24437
+ result[i] = reducedValue;
24438
+ }
24439
+ });
24440
+ } else {
24441
+ if (!utils_default.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
24442
+ seen.pop();
24443
+ return source;
24444
+ }
24445
+ result = /* @__PURE__ */ Object.create(null);
24446
+ for (const [key, value] of Object.entries(source)) {
24447
+ const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
24448
+ if (!utils_default.isUndefined(reducedValue)) {
24449
+ result[key] = reducedValue;
24450
+ }
24451
+ }
24452
+ }
24453
+ seen.pop();
24454
+ return result;
24455
+ };
24456
+ return visit(config);
24457
+ }
24092
24458
  var AxiosError = class _AxiosError extends Error {
24093
24459
  static from(error, code, config, request, response, customProps) {
24094
24460
  const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
@@ -24114,6 +24480,9 @@ var AxiosError = class _AxiosError extends Error {
24114
24480
  constructor(message, code, config, request, response) {
24115
24481
  super(message);
24116
24482
  Object.defineProperty(this, "message", {
24483
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
24484
+ // this data descriptor into an accessor descriptor on the way in.
24485
+ __proto__: null,
24117
24486
  value: message,
24118
24487
  enumerable: true,
24119
24488
  writable: true,
@@ -24130,6 +24499,9 @@ var AxiosError = class _AxiosError extends Error {
24130
24499
  }
24131
24500
  }
24132
24501
  toJSON() {
24502
+ const config = this.config;
24503
+ const redactKeys = config && utils_default.hasOwnProp(config, "redact") ? config.redact : void 0;
24504
+ const serializedConfig = utils_default.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils_default.toJSONObject(config);
24133
24505
  return {
24134
24506
  // Standard
24135
24507
  message: this.message,
@@ -24143,7 +24515,7 @@ var AxiosError = class _AxiosError extends Error {
24143
24515
  columnNumber: this.columnNumber,
24144
24516
  stack: this.stack,
24145
24517
  // Axios
24146
- config: utils_default.toJSONObject(this.config),
24518
+ config: serializedConfig,
24147
24519
  code: this.code,
24148
24520
  status: this.status
24149
24521
  };
@@ -24153,6 +24525,7 @@ AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
24153
24525
  AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
24154
24526
  AxiosError.ECONNABORTED = "ECONNABORTED";
24155
24527
  AxiosError.ETIMEDOUT = "ETIMEDOUT";
24528
+ AxiosError.ECONNREFUSED = "ECONNREFUSED";
24156
24529
  AxiosError.ERR_NETWORK = "ERR_NETWORK";
24157
24530
  AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
24158
24531
  AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
@@ -24481,500 +24854,196 @@ var hasStandardBrowserWebWorkerEnv = (() => {
24481
24854
  self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
24482
24855
  })();
24483
24856
  var origin = hasBrowserEnv && window.location.href || "http://localhost";
24484
-
24485
- // ../../../node_modules/axios/lib/platform/index.js
24486
- var platform_default = {
24487
- ...utils_exports,
24488
- ...node_default
24489
- };
24490
-
24491
- // ../../../node_modules/axios/lib/helpers/toURLEncodedForm.js
24492
- function toURLEncodedForm(data, options) {
24493
- return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
24494
- visitor: function(value, key, path, helpers) {
24495
- if (platform_default.isNode && utils_default.isBuffer(value)) {
24496
- this.append(key, value.toString("base64"));
24497
- return false;
24498
- }
24499
- return helpers.defaultVisitor.apply(this, arguments);
24500
- },
24501
- ...options
24502
- });
24503
- }
24504
-
24505
- // ../../../node_modules/axios/lib/helpers/formDataToJSON.js
24506
- function parsePropPath(name) {
24507
- return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
24508
- return match[0] === "[]" ? "" : match[1] || match[0];
24509
- });
24510
- }
24511
- function arrayToObject(arr) {
24512
- const obj = {};
24513
- const keys = Object.keys(arr);
24514
- let i;
24515
- const len = keys.length;
24516
- let key;
24517
- for (i = 0; i < len; i++) {
24518
- key = keys[i];
24519
- obj[key] = arr[key];
24520
- }
24521
- return obj;
24522
- }
24523
- function formDataToJSON(formData) {
24524
- function buildPath(path, value, target, index) {
24525
- let name = path[index++];
24526
- if (name === "__proto__") return true;
24527
- const isNumericKey = Number.isFinite(+name);
24528
- const isLast = index >= path.length;
24529
- name = !name && utils_default.isArray(target) ? target.length : name;
24530
- if (isLast) {
24531
- if (utils_default.hasOwnProp(target, name)) {
24532
- target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
24533
- } else {
24534
- target[name] = value;
24535
- }
24536
- return !isNumericKey;
24537
- }
24538
- if (!target[name] || !utils_default.isObject(target[name])) {
24539
- target[name] = [];
24540
- }
24541
- const result = buildPath(path, value, target[name], index);
24542
- if (result && utils_default.isArray(target[name])) {
24543
- target[name] = arrayToObject(target[name]);
24544
- }
24545
- return !isNumericKey;
24546
- }
24547
- if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {
24548
- const obj = {};
24549
- utils_default.forEachEntry(formData, (name, value) => {
24550
- buildPath(parsePropPath(name), value, obj, 0);
24551
- });
24552
- return obj;
24553
- }
24554
- return null;
24555
- }
24556
- var formDataToJSON_default = formDataToJSON;
24557
-
24558
- // ../../../node_modules/axios/lib/defaults/index.js
24559
- var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
24560
- function stringifySafely(rawValue, parser, encoder) {
24561
- if (utils_default.isString(rawValue)) {
24562
- try {
24563
- (parser || JSON.parse)(rawValue);
24564
- return utils_default.trim(rawValue);
24565
- } catch (e) {
24566
- if (e.name !== "SyntaxError") {
24567
- throw e;
24568
- }
24569
- }
24570
- }
24571
- return (encoder || JSON.stringify)(rawValue);
24572
- }
24573
- var defaults = {
24574
- transitional: transitional_default,
24575
- adapter: ["xhr", "http", "fetch"],
24576
- transformRequest: [
24577
- function transformRequest(data, headers) {
24578
- const contentType = headers.getContentType() || "";
24579
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
24580
- const isObjectPayload = utils_default.isObject(data);
24581
- if (isObjectPayload && utils_default.isHTMLForm(data)) {
24582
- data = new FormData(data);
24583
- }
24584
- const isFormData2 = utils_default.isFormData(data);
24585
- if (isFormData2) {
24586
- return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
24587
- }
24588
- if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
24589
- return data;
24590
- }
24591
- if (utils_default.isArrayBufferView(data)) {
24592
- return data.buffer;
24593
- }
24594
- if (utils_default.isURLSearchParams(data)) {
24595
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
24596
- return data.toString();
24597
- }
24598
- let isFileList2;
24599
- if (isObjectPayload) {
24600
- const formSerializer = own(this, "formSerializer");
24601
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
24602
- return toURLEncodedForm(data, formSerializer).toString();
24603
- }
24604
- if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
24605
- const env3 = own(this, "env");
24606
- const _FormData = env3 && env3.FormData;
24607
- return toFormData_default(
24608
- isFileList2 ? { "files[]": data } : data,
24609
- _FormData && new _FormData(),
24610
- formSerializer
24611
- );
24612
- }
24613
- }
24614
- if (isObjectPayload || hasJSONContentType) {
24615
- headers.setContentType("application/json", false);
24616
- return stringifySafely(data);
24617
- }
24618
- return data;
24619
- }
24620
- ],
24621
- transformResponse: [
24622
- function transformResponse(data) {
24623
- const transitional2 = own(this, "transitional") || defaults.transitional;
24624
- const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
24625
- const responseType = own(this, "responseType");
24626
- const JSONRequested = responseType === "json";
24627
- if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
24628
- return data;
24629
- }
24630
- if (data && utils_default.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
24631
- const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
24632
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
24633
- try {
24634
- return JSON.parse(data, own(this, "parseReviver"));
24635
- } catch (e) {
24636
- if (strictJSONParsing) {
24637
- if (e.name === "SyntaxError") {
24638
- throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, own(this, "response"));
24639
- }
24640
- throw e;
24641
- }
24642
- }
24643
- }
24644
- return data;
24645
- }
24646
- ],
24647
- /**
24648
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
24649
- * timeout is not created.
24650
- */
24651
- timeout: 0,
24652
- xsrfCookieName: "XSRF-TOKEN",
24653
- xsrfHeaderName: "X-XSRF-TOKEN",
24654
- maxContentLength: -1,
24655
- maxBodyLength: -1,
24656
- env: {
24657
- FormData: platform_default.classes.FormData,
24658
- Blob: platform_default.classes.Blob
24659
- },
24660
- validateStatus: function validateStatus(status) {
24661
- return status >= 200 && status < 300;
24662
- },
24663
- headers: {
24664
- common: {
24665
- Accept: "application/json, text/plain, */*",
24666
- "Content-Type": void 0
24667
- }
24668
- }
24669
- };
24670
- utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
24671
- defaults.headers[method] = {};
24672
- });
24673
- var defaults_default = defaults;
24674
-
24675
- // ../../../node_modules/axios/lib/helpers/parseHeaders.js
24676
- var ignoreDuplicateOf = utils_default.toObjectSet([
24677
- "age",
24678
- "authorization",
24679
- "content-length",
24680
- "content-type",
24681
- "etag",
24682
- "expires",
24683
- "from",
24684
- "host",
24685
- "if-modified-since",
24686
- "if-unmodified-since",
24687
- "last-modified",
24688
- "location",
24689
- "max-forwards",
24690
- "proxy-authorization",
24691
- "referer",
24692
- "retry-after",
24693
- "user-agent"
24694
- ]);
24695
- var parseHeaders_default = (rawHeaders) => {
24696
- const parsed = {};
24697
- let key;
24698
- let val;
24699
- let i;
24700
- rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
24701
- i = line.indexOf(":");
24702
- key = line.substring(0, i).trim().toLowerCase();
24703
- val = line.substring(i + 1).trim();
24704
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
24705
- return;
24706
- }
24707
- if (key === "set-cookie") {
24708
- if (parsed[key]) {
24709
- parsed[key].push(val);
24710
- } else {
24711
- parsed[key] = [val];
24712
- }
24713
- } else {
24714
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
24715
- }
24716
- });
24717
- return parsed;
24857
+
24858
+ // ../../../node_modules/axios/lib/platform/index.js
24859
+ var platform_default = {
24860
+ ...utils_exports,
24861
+ ...node_default
24718
24862
  };
24719
24863
 
24720
- // ../../../node_modules/axios/lib/core/AxiosHeaders.js
24721
- var $internals = /* @__PURE__ */ Symbol("internals");
24722
- var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
24723
- function trimSPorHTAB(str) {
24724
- let start = 0;
24725
- let end = str.length;
24726
- while (start < end) {
24727
- const code = str.charCodeAt(start);
24728
- if (code !== 9 && code !== 32) {
24729
- break;
24730
- }
24731
- start += 1;
24732
- }
24733
- while (end > start) {
24734
- const code = str.charCodeAt(end - 1);
24735
- if (code !== 9 && code !== 32) {
24736
- break;
24737
- }
24738
- end -= 1;
24739
- }
24740
- return start === 0 && end === str.length ? str : str.slice(start, end);
24741
- }
24742
- function normalizeHeader(header) {
24743
- return header && String(header).trim().toLowerCase();
24744
- }
24745
- function sanitizeHeaderValue(str) {
24746
- return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
24747
- }
24748
- function normalizeValue(value) {
24749
- if (value === false || value == null) {
24750
- return value;
24751
- }
24752
- return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
24753
- }
24754
- function parseTokens(str) {
24755
- const tokens = /* @__PURE__ */ Object.create(null);
24756
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
24757
- let match;
24758
- while (match = tokensRE.exec(str)) {
24759
- tokens[match[1]] = match[2];
24760
- }
24761
- return tokens;
24762
- }
24763
- var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
24764
- function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
24765
- if (utils_default.isFunction(filter2)) {
24766
- return filter2.call(this, value, header);
24767
- }
24768
- if (isHeaderNameFilter) {
24769
- value = header;
24770
- }
24771
- if (!utils_default.isString(value)) return;
24772
- if (utils_default.isString(filter2)) {
24773
- return value.indexOf(filter2) !== -1;
24774
- }
24775
- if (utils_default.isRegExp(filter2)) {
24776
- return filter2.test(value);
24777
- }
24778
- }
24779
- function formatHeader(header) {
24780
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
24781
- return char.toUpperCase() + str;
24864
+ // ../../../node_modules/axios/lib/helpers/toURLEncodedForm.js
24865
+ function toURLEncodedForm(data, options) {
24866
+ return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
24867
+ visitor: function(value, key, path, helpers) {
24868
+ if (platform_default.isNode && utils_default.isBuffer(value)) {
24869
+ this.append(key, value.toString("base64"));
24870
+ return false;
24871
+ }
24872
+ return helpers.defaultVisitor.apply(this, arguments);
24873
+ },
24874
+ ...options
24782
24875
  });
24783
24876
  }
24784
- function buildAccessors(obj, header) {
24785
- const accessorName = utils_default.toCamelCase(" " + header);
24786
- ["get", "set", "has"].forEach((methodName) => {
24787
- Object.defineProperty(obj, methodName + accessorName, {
24788
- value: function(arg1, arg2, arg3) {
24789
- return this[methodName].call(this, header, arg1, arg2, arg3);
24790
- },
24791
- configurable: true
24792
- });
24877
+
24878
+ // ../../../node_modules/axios/lib/helpers/formDataToJSON.js
24879
+ function parsePropPath(name) {
24880
+ return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
24881
+ return match[0] === "[]" ? "" : match[1] || match[0];
24793
24882
  });
24794
24883
  }
24795
- var AxiosHeaders = class {
24796
- constructor(headers) {
24797
- headers && this.set(headers);
24884
+ function arrayToObject(arr) {
24885
+ const obj = {};
24886
+ const keys = Object.keys(arr);
24887
+ let i;
24888
+ const len = keys.length;
24889
+ let key;
24890
+ for (i = 0; i < len; i++) {
24891
+ key = keys[i];
24892
+ obj[key] = arr[key];
24798
24893
  }
24799
- set(header, valueOrRewrite, rewrite) {
24800
- const self2 = this;
24801
- function setHeader(_value, _header, _rewrite) {
24802
- const lHeader = normalizeHeader(_header);
24803
- if (!lHeader) {
24804
- throw new Error("header name must be a non-empty string");
24805
- }
24806
- const key = utils_default.findKey(self2, lHeader);
24807
- if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
24808
- self2[key || _header] = normalizeValue(_value);
24894
+ return obj;
24895
+ }
24896
+ function formDataToJSON(formData) {
24897
+ function buildPath(path, value, target, index) {
24898
+ let name = path[index++];
24899
+ if (name === "__proto__") return true;
24900
+ const isNumericKey = Number.isFinite(+name);
24901
+ const isLast = index >= path.length;
24902
+ name = !name && utils_default.isArray(target) ? target.length : name;
24903
+ if (isLast) {
24904
+ if (utils_default.hasOwnProp(target, name)) {
24905
+ target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
24906
+ } else {
24907
+ target[name] = value;
24809
24908
  }
24909
+ return !isNumericKey;
24810
24910
  }
24811
- const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
24812
- if (utils_default.isPlainObject(header) || header instanceof this.constructor) {
24813
- setHeaders(header, valueOrRewrite);
24814
- } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
24815
- setHeaders(parseHeaders_default(header), valueOrRewrite);
24816
- } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
24817
- let obj = {}, dest, key;
24818
- for (const entry of header) {
24819
- if (!utils_default.isArray(entry)) {
24820
- throw TypeError("Object iterator must return a key-value pair");
24821
- }
24822
- obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
24823
- }
24824
- setHeaders(obj, valueOrRewrite);
24825
- } else {
24826
- header != null && setHeader(valueOrRewrite, header, rewrite);
24911
+ if (!target[name] || !utils_default.isObject(target[name])) {
24912
+ target[name] = [];
24827
24913
  }
24828
- return this;
24829
- }
24830
- get(header, parser) {
24831
- header = normalizeHeader(header);
24832
- if (header) {
24833
- const key = utils_default.findKey(this, header);
24834
- if (key) {
24835
- const value = this[key];
24836
- if (!parser) {
24837
- return value;
24838
- }
24839
- if (parser === true) {
24840
- return parseTokens(value);
24841
- }
24842
- if (utils_default.isFunction(parser)) {
24843
- return parser.call(this, value, key);
24844
- }
24845
- if (utils_default.isRegExp(parser)) {
24846
- return parser.exec(value);
24847
- }
24848
- throw new TypeError("parser must be boolean|regexp|function");
24849
- }
24914
+ const result = buildPath(path, value, target[name], index);
24915
+ if (result && utils_default.isArray(target[name])) {
24916
+ target[name] = arrayToObject(target[name]);
24850
24917
  }
24918
+ return !isNumericKey;
24851
24919
  }
24852
- has(header, matcher) {
24853
- header = normalizeHeader(header);
24854
- if (header) {
24855
- const key = utils_default.findKey(this, header);
24856
- return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
24857
- }
24858
- return false;
24920
+ if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {
24921
+ const obj = {};
24922
+ utils_default.forEachEntry(formData, (name, value) => {
24923
+ buildPath(parsePropPath(name), value, obj, 0);
24924
+ });
24925
+ return obj;
24859
24926
  }
24860
- delete(header, matcher) {
24861
- const self2 = this;
24862
- let deleted = false;
24863
- function deleteHeader(_header) {
24864
- _header = normalizeHeader(_header);
24865
- if (_header) {
24866
- const key = utils_default.findKey(self2, _header);
24867
- if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
24868
- delete self2[key];
24869
- deleted = true;
24870
- }
24927
+ return null;
24928
+ }
24929
+ var formDataToJSON_default = formDataToJSON;
24930
+
24931
+ // ../../../node_modules/axios/lib/defaults/index.js
24932
+ var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
24933
+ function stringifySafely(rawValue, parser, encoder) {
24934
+ if (utils_default.isString(rawValue)) {
24935
+ try {
24936
+ (parser || JSON.parse)(rawValue);
24937
+ return utils_default.trim(rawValue);
24938
+ } catch (e) {
24939
+ if (e.name !== "SyntaxError") {
24940
+ throw e;
24871
24941
  }
24872
24942
  }
24873
- if (utils_default.isArray(header)) {
24874
- header.forEach(deleteHeader);
24875
- } else {
24876
- deleteHeader(header);
24877
- }
24878
- return deleted;
24879
24943
  }
24880
- clear(matcher) {
24881
- const keys = Object.keys(this);
24882
- let i = keys.length;
24883
- let deleted = false;
24884
- while (i--) {
24885
- const key = keys[i];
24886
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
24887
- delete this[key];
24888
- deleted = true;
24944
+ return (encoder || JSON.stringify)(rawValue);
24945
+ }
24946
+ var defaults = {
24947
+ transitional: transitional_default,
24948
+ adapter: ["xhr", "http", "fetch"],
24949
+ transformRequest: [
24950
+ function transformRequest(data, headers) {
24951
+ const contentType = headers.getContentType() || "";
24952
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
24953
+ const isObjectPayload = utils_default.isObject(data);
24954
+ if (isObjectPayload && utils_default.isHTMLForm(data)) {
24955
+ data = new FormData(data);
24956
+ }
24957
+ const isFormData2 = utils_default.isFormData(data);
24958
+ if (isFormData2) {
24959
+ return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
24960
+ }
24961
+ if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
24962
+ return data;
24963
+ }
24964
+ if (utils_default.isArrayBufferView(data)) {
24965
+ return data.buffer;
24966
+ }
24967
+ if (utils_default.isURLSearchParams(data)) {
24968
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
24969
+ return data.toString();
24970
+ }
24971
+ let isFileList2;
24972
+ if (isObjectPayload) {
24973
+ const formSerializer = own(this, "formSerializer");
24974
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
24975
+ return toURLEncodedForm(data, formSerializer).toString();
24976
+ }
24977
+ if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
24978
+ const env3 = own(this, "env");
24979
+ const _FormData = env3 && env3.FormData;
24980
+ return toFormData_default(
24981
+ isFileList2 ? { "files[]": data } : data,
24982
+ _FormData && new _FormData(),
24983
+ formSerializer
24984
+ );
24985
+ }
24889
24986
  }
24890
- }
24891
- return deleted;
24892
- }
24893
- normalize(format2) {
24894
- const self2 = this;
24895
- const headers = {};
24896
- utils_default.forEach(this, (value, header) => {
24897
- const key = utils_default.findKey(headers, header);
24898
- if (key) {
24899
- self2[key] = normalizeValue(value);
24900
- delete self2[header];
24901
- return;
24987
+ if (isObjectPayload || hasJSONContentType) {
24988
+ headers.setContentType("application/json", false);
24989
+ return stringifySafely(data);
24902
24990
  }
24903
- const normalized = format2 ? formatHeader(header) : String(header).trim();
24904
- if (normalized !== header) {
24905
- delete self2[header];
24991
+ return data;
24992
+ }
24993
+ ],
24994
+ transformResponse: [
24995
+ function transformResponse(data) {
24996
+ const transitional2 = own(this, "transitional") || defaults.transitional;
24997
+ const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
24998
+ const responseType = own(this, "responseType");
24999
+ const JSONRequested = responseType === "json";
25000
+ if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
25001
+ return data;
24906
25002
  }
24907
- self2[normalized] = normalizeValue(value);
24908
- headers[normalized] = true;
24909
- });
24910
- return this;
24911
- }
24912
- concat(...targets) {
24913
- return this.constructor.concat(this, ...targets);
24914
- }
24915
- toJSON(asStrings) {
24916
- const obj = /* @__PURE__ */ Object.create(null);
24917
- utils_default.forEach(this, (value, header) => {
24918
- value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
24919
- });
24920
- return obj;
24921
- }
24922
- [Symbol.iterator]() {
24923
- return Object.entries(this.toJSON())[Symbol.iterator]();
24924
- }
24925
- toString() {
24926
- return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
24927
- }
24928
- getSetCookie() {
24929
- return this.get("set-cookie") || [];
24930
- }
24931
- get [Symbol.toStringTag]() {
24932
- return "AxiosHeaders";
24933
- }
24934
- static from(thing) {
24935
- return thing instanceof this ? thing : new this(thing);
24936
- }
24937
- static concat(first, ...targets) {
24938
- const computed = new this(first);
24939
- targets.forEach((target) => computed.set(target));
24940
- return computed;
24941
- }
24942
- static accessor(header) {
24943
- const internals = this[$internals] = this[$internals] = {
24944
- accessors: {}
24945
- };
24946
- const accessors = internals.accessors;
24947
- const prototype2 = this.prototype;
24948
- function defineAccessor(_header) {
24949
- const lHeader = normalizeHeader(_header);
24950
- if (!accessors[lHeader]) {
24951
- buildAccessors(prototype2, _header);
24952
- accessors[lHeader] = true;
25003
+ if (data && utils_default.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
25004
+ const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
25005
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
25006
+ try {
25007
+ return JSON.parse(data, own(this, "parseReviver"));
25008
+ } catch (e) {
25009
+ if (strictJSONParsing) {
25010
+ if (e.name === "SyntaxError") {
25011
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, own(this, "response"));
25012
+ }
25013
+ throw e;
25014
+ }
25015
+ }
24953
25016
  }
25017
+ return data;
25018
+ }
25019
+ ],
25020
+ /**
25021
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
25022
+ * timeout is not created.
25023
+ */
25024
+ timeout: 0,
25025
+ xsrfCookieName: "XSRF-TOKEN",
25026
+ xsrfHeaderName: "X-XSRF-TOKEN",
25027
+ maxContentLength: -1,
25028
+ maxBodyLength: -1,
25029
+ env: {
25030
+ FormData: platform_default.classes.FormData,
25031
+ Blob: platform_default.classes.Blob
25032
+ },
25033
+ validateStatus: function validateStatus(status) {
25034
+ return status >= 200 && status < 300;
25035
+ },
25036
+ headers: {
25037
+ common: {
25038
+ Accept: "application/json, text/plain, */*",
25039
+ "Content-Type": void 0
24954
25040
  }
24955
- utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
24956
- return this;
24957
25041
  }
24958
25042
  };
24959
- AxiosHeaders.accessor([
24960
- "Content-Type",
24961
- "Content-Length",
24962
- "Accept",
24963
- "Accept-Encoding",
24964
- "User-Agent",
24965
- "Authorization"
24966
- ]);
24967
- utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
24968
- let mapped = key[0].toUpperCase() + key.slice(1);
24969
- return {
24970
- get: () => value,
24971
- set(headerValue) {
24972
- this[mapped] = headerValue;
24973
- }
24974
- };
25043
+ utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
25044
+ defaults.headers[method] = {};
24975
25045
  });
24976
- utils_default.freezeMethods(AxiosHeaders);
24977
- var AxiosHeaders_default = AxiosHeaders;
25046
+ var defaults_default = defaults;
24978
25047
 
24979
25048
  // ../../../node_modules/axios/lib/core/transformData.js
24980
25049
  function transformData(fns, response) {
@@ -25019,15 +25088,13 @@ function settle(resolve3, reject, response) {
25019
25088
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
25020
25089
  resolve3(response);
25021
25090
  } else {
25022
- reject(
25023
- new AxiosError_default(
25024
- "Request failed with status code " + response.status,
25025
- [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
25026
- response.config,
25027
- response.request,
25028
- response
25029
- )
25030
- );
25091
+ reject(new AxiosError_default(
25092
+ "Request failed with status code " + response.status,
25093
+ response.status >= 400 && response.status < 500 ? AxiosError_default.ERR_BAD_REQUEST : AxiosError_default.ERR_BAD_RESPONSE,
25094
+ response.config,
25095
+ response.request,
25096
+ response
25097
+ ));
25031
25098
  }
25032
25099
  }
25033
25100
 
@@ -25130,11 +25197,11 @@ var import_follow_redirects = __toESM(require_follow_redirects(), 1);
25130
25197
  var import_zlib = __toESM(require("zlib"), 1);
25131
25198
 
25132
25199
  // ../../../node_modules/axios/lib/env/data.js
25133
- var VERSION = "1.15.2";
25200
+ var VERSION = "1.16.0";
25134
25201
 
25135
25202
  // ../../../node_modules/axios/lib/helpers/parseProtocol.js
25136
25203
  function parseProtocol(url2) {
25137
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
25204
+ const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
25138
25205
  return match && match[1] || "";
25139
25206
  }
25140
25207
 
@@ -25369,7 +25436,7 @@ var formDataToStream = (form, headersHandler, options) => {
25369
25436
  throw TypeError("FormData instance required");
25370
25437
  }
25371
25438
  if (boundary.length < 1 || boundary.length > 70) {
25372
- throw Error("boundary must be 10-70 characters long");
25439
+ throw Error("boundary must be 1-70 characters long");
25373
25440
  }
25374
25441
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
25375
25442
  const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
@@ -25498,6 +25565,20 @@ var parseNoProxyEntry = (entry) => {
25498
25565
  }
25499
25566
  return [entryHost, entryPort];
25500
25567
  };
25568
+ var IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
25569
+ var IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
25570
+ var unmapIPv4MappedIPv6 = (host) => {
25571
+ if (typeof host !== "string" || host.indexOf(":") === -1) return host;
25572
+ const dotted = host.match(IPV4_MAPPED_DOTTED_RE);
25573
+ if (dotted) return dotted[1];
25574
+ const hex = host.match(IPV4_MAPPED_HEX_RE);
25575
+ if (hex) {
25576
+ const high = parseInt(hex[1], 16);
25577
+ const low = parseInt(hex[2], 16);
25578
+ return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
25579
+ }
25580
+ return host;
25581
+ };
25501
25582
  var normalizeNoProxyHost = (hostname) => {
25502
25583
  if (!hostname) {
25503
25584
  return hostname;
@@ -25505,7 +25586,7 @@ var normalizeNoProxyHost = (hostname) => {
25505
25586
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
25506
25587
  hostname = hostname.slice(1, -1);
25507
25588
  }
25508
- return hostname.replace(/\.+$/, "");
25589
+ return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
25509
25590
  };
25510
25591
  function shouldBypassProxy(location) {
25511
25592
  let parsed;
@@ -25699,10 +25780,32 @@ function estimateDataURLDecodedBytes(url2) {
25699
25780
  }
25700
25781
  }
25701
25782
  const groups = Math.floor(effectiveLen / 4);
25702
- const bytes = groups * 3 - (pad || 0);
25703
- return bytes > 0 ? bytes : 0;
25783
+ const bytes2 = groups * 3 - (pad || 0);
25784
+ return bytes2 > 0 ? bytes2 : 0;
25785
+ }
25786
+ if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
25787
+ return Buffer.byteLength(body, "utf8");
25788
+ }
25789
+ let bytes = 0;
25790
+ for (let i = 0, len = body.length; i < len; i++) {
25791
+ const c = body.charCodeAt(i);
25792
+ if (c < 128) {
25793
+ bytes += 1;
25794
+ } else if (c < 2048) {
25795
+ bytes += 2;
25796
+ } else if (c >= 55296 && c <= 56319 && i + 1 < len) {
25797
+ const next = body.charCodeAt(i + 1);
25798
+ if (next >= 56320 && next <= 57343) {
25799
+ bytes += 4;
25800
+ i++;
25801
+ } else {
25802
+ bytes += 3;
25803
+ }
25804
+ } else {
25805
+ bytes += 3;
25806
+ }
25704
25807
  }
25705
- return Buffer.byteLength(body, "utf8");
25808
+ return bytes;
25706
25809
  }
25707
25810
 
25708
25811
  // ../../../node_modules/axios/lib/adapters/http.js
@@ -25717,11 +25820,33 @@ var brotliOptions = {
25717
25820
  var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
25718
25821
  var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
25719
25822
  var isHttps = /https:?/;
25823
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
25824
+ function setFormDataHeaders(headers, formHeaders, policy) {
25825
+ if (policy !== "content-only") {
25826
+ headers.set(formHeaders);
25827
+ return;
25828
+ }
25829
+ Object.entries(formHeaders).forEach(([key, val]) => {
25830
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
25831
+ headers.set(key, val);
25832
+ }
25833
+ });
25834
+ }
25720
25835
  var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
25721
25836
  var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
25722
25837
  var supportedProtocols = platform_default.protocols.map((protocol) => {
25723
25838
  return protocol + ":";
25724
25839
  });
25840
+ var decodeURIComponentSafe = (value) => {
25841
+ if (!utils_default.isString(value)) {
25842
+ return value;
25843
+ }
25844
+ try {
25845
+ return decodeURIComponent(value);
25846
+ } catch (error) {
25847
+ return value;
25848
+ }
25849
+ };
25725
25850
  var flushOnFinish = (stream4, [throttled, flush]) => {
25726
25851
  stream4.on("end", flush).on("error", flush);
25727
25852
  return throttled;
@@ -25799,15 +25924,15 @@ var Http2Sessions = class {
25799
25924
  }
25800
25925
  };
25801
25926
  var http2Sessions = new Http2Sessions();
25802
- function dispatchBeforeRedirect(options, responseDetails) {
25927
+ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
25803
25928
  if (options.beforeRedirects.proxy) {
25804
25929
  options.beforeRedirects.proxy(options);
25805
25930
  }
25806
25931
  if (options.beforeRedirects.config) {
25807
- options.beforeRedirects.config(options, responseDetails);
25932
+ options.beforeRedirects.config(options, responseDetails, requestDetails);
25808
25933
  }
25809
25934
  }
25810
- function setProxy(options, configProxy, location) {
25935
+ function setProxy(options, configProxy, location, isRedirect) {
25811
25936
  let proxy = configProxy;
25812
25937
  if (!proxy && proxy !== false) {
25813
25938
  const proxyUrl = getProxyForUrl(location);
@@ -25817,32 +25942,57 @@ function setProxy(options, configProxy, location) {
25817
25942
  }
25818
25943
  }
25819
25944
  }
25820
- if (proxy) {
25821
- if (proxy.username) {
25822
- proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
25945
+ if (isRedirect && options.headers) {
25946
+ for (const name of Object.keys(options.headers)) {
25947
+ if (name.toLowerCase() === "proxy-authorization") {
25948
+ delete options.headers[name];
25949
+ }
25823
25950
  }
25824
- if (proxy.auth) {
25825
- const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password);
25951
+ }
25952
+ if (proxy) {
25953
+ const isProxyURL = proxy instanceof URL;
25954
+ const readProxyField = (key) => isProxyURL || utils_default.hasOwnProp(proxy, key) ? proxy[key] : void 0;
25955
+ const proxyUsername = readProxyField("username");
25956
+ const proxyPassword = readProxyField("password");
25957
+ let proxyAuth = utils_default.hasOwnProp(proxy, "auth") ? proxy.auth : void 0;
25958
+ if (proxyUsername) {
25959
+ proxyAuth = (proxyUsername || "") + ":" + (proxyPassword || "");
25960
+ }
25961
+ if (proxyAuth) {
25962
+ const authIsObject = typeof proxyAuth === "object";
25963
+ const authUsername = authIsObject && utils_default.hasOwnProp(proxyAuth, "username") ? proxyAuth.username : void 0;
25964
+ const authPassword = authIsObject && utils_default.hasOwnProp(proxyAuth, "password") ? proxyAuth.password : void 0;
25965
+ const validProxyAuth = Boolean(authUsername || authPassword);
25826
25966
  if (validProxyAuth) {
25827
- proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
25828
- } else if (typeof proxy.auth === "object") {
25967
+ proxyAuth = (authUsername || "") + ":" + (authPassword || "");
25968
+ } else if (authIsObject) {
25829
25969
  throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy });
25830
25970
  }
25831
- const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
25971
+ const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
25832
25972
  options.headers["Proxy-Authorization"] = "Basic " + base64;
25833
25973
  }
25834
- options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
25835
- const proxyHost = proxy.hostname || proxy.host;
25974
+ let hasUserHostHeader = false;
25975
+ for (const name of Object.keys(options.headers)) {
25976
+ if (name.toLowerCase() === "host") {
25977
+ hasUserHostHeader = true;
25978
+ break;
25979
+ }
25980
+ }
25981
+ if (!hasUserHostHeader) {
25982
+ options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
25983
+ }
25984
+ const proxyHost = readProxyField("hostname") || readProxyField("host");
25836
25985
  options.hostname = proxyHost;
25837
25986
  options.host = proxyHost;
25838
- options.port = proxy.port;
25987
+ options.port = readProxyField("port");
25839
25988
  options.path = location;
25840
- if (proxy.protocol) {
25841
- options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
25989
+ const proxyProtocol = readProxyField("protocol");
25990
+ if (proxyProtocol) {
25991
+ options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
25842
25992
  }
25843
25993
  }
25844
25994
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
25845
- setProxy(redirectOptions, configProxy, redirectOptions.href);
25995
+ setProxy(redirectOptions, configProxy, redirectOptions.href, true);
25846
25996
  };
25847
25997
  }
25848
25998
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
@@ -25918,6 +26068,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25918
26068
  let isDone;
25919
26069
  let rejected = false;
25920
26070
  let req;
26071
+ let connectPhaseTimer;
25921
26072
  httpVersion = +httpVersion;
25922
26073
  if (Number.isNaN(httpVersion)) {
25923
26074
  throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
@@ -25949,8 +26100,28 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25949
26100
  console.warn("emit error", err);
25950
26101
  }
25951
26102
  }
26103
+ function clearConnectPhaseTimer() {
26104
+ if (connectPhaseTimer) {
26105
+ clearTimeout(connectPhaseTimer);
26106
+ connectPhaseTimer = null;
26107
+ }
26108
+ }
26109
+ function createTimeoutError() {
26110
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
26111
+ const transitional2 = config.transitional || transitional_default;
26112
+ if (config.timeoutErrorMessage) {
26113
+ timeoutErrorMessage = config.timeoutErrorMessage;
26114
+ }
26115
+ return new AxiosError_default(
26116
+ timeoutErrorMessage,
26117
+ transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
26118
+ config,
26119
+ req
26120
+ );
26121
+ }
25952
26122
  abortEmitter.once("abort", reject);
25953
26123
  const onFinished = () => {
26124
+ clearConnectPhaseTimer();
25954
26125
  if (config.cancelToken) {
25955
26126
  config.cancelToken.unsubscribe(abort);
25956
26127
  }
@@ -25967,6 +26138,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25967
26138
  }
25968
26139
  onDone((response, isRejected) => {
25969
26140
  isDone = true;
26141
+ clearConnectPhaseTimer();
25970
26142
  if (isRejected) {
25971
26143
  rejected = true;
25972
26144
  onFinished();
@@ -26055,7 +26227,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26055
26227
  }
26056
26228
  );
26057
26229
  } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
26058
- headers.set(data.getHeaders());
26230
+ setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
26059
26231
  if (!headers.hasContentLength()) {
26060
26232
  try {
26061
26233
  const knownLength = await import_util3.default.promisify(data.getLength).call(data);
@@ -26132,8 +26304,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26132
26304
  auth = username + ":" + password;
26133
26305
  }
26134
26306
  if (!auth && parsed.username) {
26135
- const urlUsername = parsed.username;
26136
- const urlPassword = parsed.password;
26307
+ const urlUsername = decodeURIComponentSafe(parsed.username);
26308
+ const urlPassword = decodeURIComponentSafe(parsed.password);
26137
26309
  auth = urlUsername + ":" + urlPassword;
26138
26310
  }
26139
26311
  auth && headers.delete("authorization");
@@ -26171,11 +26343,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26171
26343
  !utils_default.isUndefined(lookup) && (options.lookup = lookup);
26172
26344
  if (config.socketPath) {
26173
26345
  if (typeof config.socketPath !== "string") {
26174
- return reject(new AxiosError_default(
26175
- "socketPath must be a string",
26176
- AxiosError_default.ERR_BAD_OPTION_VALUE,
26177
- config
26178
- ));
26346
+ return reject(
26347
+ new AxiosError_default("socketPath must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE, config)
26348
+ );
26179
26349
  }
26180
26350
  if (config.allowedSocketPaths != null) {
26181
26351
  const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
@@ -26184,11 +26354,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26184
26354
  (entry) => typeof entry === "string" && (0, import_path.resolve)(entry) === resolvedSocket
26185
26355
  );
26186
26356
  if (!isAllowed) {
26187
- return reject(new AxiosError_default(
26188
- `socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
26189
- AxiosError_default.ERR_BAD_OPTION_VALUE,
26190
- config
26191
- ));
26357
+ return reject(
26358
+ new AxiosError_default(
26359
+ `socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
26360
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
26361
+ config
26362
+ )
26363
+ );
26192
26364
  }
26193
26365
  }
26194
26366
  options.socketPath = config.socketPath;
@@ -26202,6 +26374,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26202
26374
  );
26203
26375
  }
26204
26376
  let transport;
26377
+ let isNativeTransport = false;
26205
26378
  const isHttpsRequest = isHttps.test(options.protocol);
26206
26379
  options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
26207
26380
  if (isHttp2) {
@@ -26212,6 +26385,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26212
26385
  transport = configTransport;
26213
26386
  } else if (config.maxRedirects === 0) {
26214
26387
  transport = isHttpsRequest ? import_https.default : import_http.default;
26388
+ isNativeTransport = true;
26215
26389
  } else {
26216
26390
  if (config.maxRedirects) {
26217
26391
  options.maxRedirects = config.maxRedirects;
@@ -26230,6 +26404,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26230
26404
  }
26231
26405
  options.insecureHTTPParser = Boolean(own2("insecureHTTPParser"));
26232
26406
  req = transport.request(options, function handleResponse(res) {
26407
+ clearConnectPhaseTimer();
26233
26408
  if (req.destroyed) return;
26234
26409
  const streams = [res];
26235
26410
  const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]);
@@ -26336,14 +26511,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26336
26511
  "stream has been aborted",
26337
26512
  AxiosError_default.ERR_BAD_RESPONSE,
26338
26513
  config,
26339
- lastRequest
26514
+ lastRequest,
26515
+ response
26340
26516
  );
26341
26517
  responseStream.destroy(err);
26342
26518
  reject(err);
26343
26519
  });
26344
26520
  responseStream.on("error", function handleStreamError(err) {
26345
- if (req.destroyed) return;
26346
- reject(AxiosError_default.from(err, null, config, lastRequest));
26521
+ if (rejected) return;
26522
+ reject(AxiosError_default.from(err, null, config, lastRequest, response));
26347
26523
  });
26348
26524
  responseStream.on("end", function handleStreamEnd() {
26349
26525
  try {
@@ -26378,6 +26554,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26378
26554
  req.on("error", function handleRequestError(err) {
26379
26555
  reject(AxiosError_default.from(err, null, config, req));
26380
26556
  });
26557
+ const boundSockets = /* @__PURE__ */ new Set();
26381
26558
  req.on("socket", function handleRequestSocket(socket) {
26382
26559
  socket.setKeepAlive(true, 1e3 * 60);
26383
26560
  if (!socket[kAxiosSocketListener]) {
@@ -26390,11 +26567,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26390
26567
  socket[kAxiosSocketListener] = true;
26391
26568
  }
26392
26569
  socket[kAxiosCurrentReq] = req;
26393
- req.once("close", function clearCurrentReq() {
26570
+ boundSockets.add(socket);
26571
+ });
26572
+ req.once("close", function clearCurrentReq() {
26573
+ clearConnectPhaseTimer();
26574
+ for (const socket of boundSockets) {
26394
26575
  if (socket[kAxiosCurrentReq] === req) {
26395
26576
  socket[kAxiosCurrentReq] = null;
26396
26577
  }
26397
- });
26578
+ }
26579
+ boundSockets.clear();
26398
26580
  });
26399
26581
  if (config.timeout) {
26400
26582
  const timeout = parseInt(config.timeout, 10);
@@ -26409,22 +26591,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26409
26591
  );
26410
26592
  return;
26411
26593
  }
26412
- req.setTimeout(timeout, function handleRequestTimeout() {
26594
+ const handleTimeout = function handleTimeout2() {
26413
26595
  if (isDone) return;
26414
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
26415
- const transitional2 = config.transitional || transitional_default;
26416
- if (config.timeoutErrorMessage) {
26417
- timeoutErrorMessage = config.timeoutErrorMessage;
26418
- }
26419
- abort(
26420
- new AxiosError_default(
26421
- timeoutErrorMessage,
26422
- transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
26423
- config,
26424
- req
26425
- )
26426
- );
26427
- });
26596
+ abort(createTimeoutError());
26597
+ };
26598
+ if (isNativeTransport && timeout > 0) {
26599
+ connectPhaseTimer = setTimeout(handleTimeout, timeout);
26600
+ }
26601
+ req.setTimeout(timeout, handleTimeout);
26428
26602
  } else {
26429
26603
  req.setTimeout(0);
26430
26604
  }
@@ -26516,8 +26690,15 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
26516
26690
  },
26517
26691
  read(name) {
26518
26692
  if (typeof document === "undefined") return null;
26519
- const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
26520
- return match ? decodeURIComponent(match[1]) : null;
26693
+ const cookies = document.cookie.split(";");
26694
+ for (let i = 0; i < cookies.length; i++) {
26695
+ const cookie = cookies[i].replace(/^\s+/, "");
26696
+ const eq = cookie.indexOf("=");
26697
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
26698
+ return decodeURIComponent(cookie.slice(eq + 1));
26699
+ }
26700
+ }
26701
+ return null;
26521
26702
  },
26522
26703
  remove(name) {
26523
26704
  this.write(name, "", Date.now() - 864e5, "/");
@@ -26542,6 +26723,9 @@ function mergeConfig(config1, config2) {
26542
26723
  config2 = config2 || {};
26543
26724
  const config = /* @__PURE__ */ Object.create(null);
26544
26725
  Object.defineProperty(config, "hasOwnProperty", {
26726
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
26727
+ // this data descriptor into an accessor descriptor on the way in.
26728
+ __proto__: null,
26545
26729
  value: Object.prototype.hasOwnProperty,
26546
26730
  enumerable: false,
26547
26731
  writable: true,
@@ -26627,6 +26811,22 @@ function mergeConfig(config1, config2) {
26627
26811
  }
26628
26812
 
26629
26813
  // ../../../node_modules/axios/lib/helpers/resolveConfig.js
26814
+ var FORM_DATA_CONTENT_HEADERS2 = ["content-type", "content-length"];
26815
+ function setFormDataHeaders2(headers, formHeaders, policy) {
26816
+ if (policy !== "content-only") {
26817
+ headers.set(formHeaders);
26818
+ return;
26819
+ }
26820
+ Object.entries(formHeaders).forEach(([key, val]) => {
26821
+ if (FORM_DATA_CONTENT_HEADERS2.includes(key.toLowerCase())) {
26822
+ headers.set(key, val);
26823
+ }
26824
+ });
26825
+ }
26826
+ var encodeUTF8 = (str) => encodeURIComponent(str).replace(
26827
+ /%([0-9A-F]{2})/gi,
26828
+ (_, hex) => String.fromCharCode(parseInt(hex, 16))
26829
+ );
26630
26830
  var resolveConfig_default = (config) => {
26631
26831
  const newConfig = mergeConfig({}, config);
26632
26832
  const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
@@ -26648,22 +26848,14 @@ var resolveConfig_default = (config) => {
26648
26848
  if (auth) {
26649
26849
  headers.set(
26650
26850
  "Authorization",
26651
- "Basic " + btoa(
26652
- (auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")
26653
- )
26851
+ "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : ""))
26654
26852
  );
26655
26853
  }
26656
26854
  if (utils_default.isFormData(data)) {
26657
26855
  if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
26658
26856
  headers.setContentType(void 0);
26659
26857
  } else if (utils_default.isFunction(data.getHeaders)) {
26660
- const formHeaders = data.getHeaders();
26661
- const allowedHeaders = ["content-type", "content-length"];
26662
- Object.entries(formHeaders).forEach(([key, val]) => {
26663
- if (allowedHeaders.includes(key.toLowerCase())) {
26664
- headers.set(key, val);
26665
- }
26666
- });
26858
+ setFormDataHeaders2(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
26667
26859
  }
26668
26860
  }
26669
26861
  if (platform_default.hasStandardBrowserEnv) {
@@ -26737,7 +26929,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
26737
26929
  if (!request || request.readyState !== 4) {
26738
26930
  return;
26739
26931
  }
26740
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
26932
+ if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
26741
26933
  return;
26742
26934
  }
26743
26935
  setTimeout(onloadend);
@@ -26748,6 +26940,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
26748
26940
  return;
26749
26941
  }
26750
26942
  reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
26943
+ done();
26751
26944
  request = null;
26752
26945
  };
26753
26946
  request.onerror = function handleError(event) {
@@ -26755,6 +26948,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
26755
26948
  const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config, request);
26756
26949
  err.event = event || null;
26757
26950
  reject(err);
26951
+ done();
26758
26952
  request = null;
26759
26953
  };
26760
26954
  request.ontimeout = function handleTimeout() {
@@ -26771,6 +26965,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
26771
26965
  request
26772
26966
  )
26773
26967
  );
26968
+ done();
26774
26969
  request = null;
26775
26970
  };
26776
26971
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -26801,6 +26996,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
26801
26996
  }
26802
26997
  reject(!cancel || cancel.type ? new CanceledError_default(null, config, request) : cancel);
26803
26998
  request.abort();
26999
+ done();
26804
27000
  request = null;
26805
27001
  };
26806
27002
  _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
@@ -26809,7 +27005,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
26809
27005
  }
26810
27006
  }
26811
27007
  const protocol = parseProtocol(_config.url);
26812
- if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
27008
+ if (protocol && !platform_default.protocols.includes(protocol)) {
26813
27009
  reject(
26814
27010
  new AxiosError_default(
26815
27011
  "Unsupported protocol " + protocol + ":",
@@ -26944,11 +27140,6 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
26944
27140
  // ../../../node_modules/axios/lib/adapters/fetch.js
26945
27141
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
26946
27142
  var { isFunction: isFunction2 } = utils_default;
26947
- var globalFetchAPI = (({ Request, Response }) => ({
26948
- Request,
26949
- Response
26950
- }))(utils_default.global);
26951
- var { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global;
26952
27143
  var test = (fn, ...args2) => {
26953
27144
  try {
26954
27145
  return !!fn(...args2);
@@ -26957,11 +27148,16 @@ var test = (fn, ...args2) => {
26957
27148
  }
26958
27149
  };
26959
27150
  var factory = (env3) => {
27151
+ const globalObject = utils_default.global ?? globalThis;
27152
+ const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
26960
27153
  env3 = utils_default.merge.call(
26961
27154
  {
26962
27155
  skipUndefined: true
26963
27156
  },
26964
- globalFetchAPI,
27157
+ {
27158
+ Request: globalObject.Request,
27159
+ Response: globalObject.Response
27160
+ },
26965
27161
  env3
26966
27162
  );
26967
27163
  const { fetch: envFetch, Request, Response } = env3;
@@ -27049,8 +27245,12 @@ var factory = (env3) => {
27049
27245
  responseType,
27050
27246
  headers,
27051
27247
  withCredentials = "same-origin",
27052
- fetchOptions
27248
+ fetchOptions,
27249
+ maxContentLength,
27250
+ maxBodyLength
27053
27251
  } = resolveConfig_default(config);
27252
+ const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
27253
+ const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
27054
27254
  let _fetch = envFetch || fetch;
27055
27255
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
27056
27256
  let composedSignal = composeSignals_default(
@@ -27063,6 +27263,28 @@ var factory = (env3) => {
27063
27263
  });
27064
27264
  let requestContentLength;
27065
27265
  try {
27266
+ if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
27267
+ const estimated = estimateDataURLDecodedBytes(url2);
27268
+ if (estimated > maxContentLength) {
27269
+ throw new AxiosError_default(
27270
+ "maxContentLength size of " + maxContentLength + " exceeded",
27271
+ AxiosError_default.ERR_BAD_RESPONSE,
27272
+ config,
27273
+ request
27274
+ );
27275
+ }
27276
+ }
27277
+ if (hasMaxBodyLength && method !== "get" && method !== "head") {
27278
+ const outboundLength = await resolveBodyLength(headers, data);
27279
+ if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
27280
+ throw new AxiosError_default(
27281
+ "Request body larger than maxBodyLength limit",
27282
+ AxiosError_default.ERR_BAD_REQUEST,
27283
+ config,
27284
+ request
27285
+ );
27286
+ }
27287
+ }
27066
27288
  if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
27067
27289
  let _request = new Request(url2, {
27068
27290
  method: "POST",
@@ -27091,6 +27313,7 @@ var factory = (env3) => {
27091
27313
  headers.delete("content-type");
27092
27314
  }
27093
27315
  }
27316
+ headers.set("User-Agent", "axios/" + VERSION, false);
27094
27317
  const resolvedOptions = {
27095
27318
  ...fetchOptions,
27096
27319
  signal: composedSignal,
@@ -27102,8 +27325,19 @@ var factory = (env3) => {
27102
27325
  };
27103
27326
  request = isRequestSupported && new Request(url2, resolvedOptions);
27104
27327
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
27328
+ if (hasMaxContentLength) {
27329
+ const declaredLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
27330
+ if (declaredLength != null && declaredLength > maxContentLength) {
27331
+ throw new AxiosError_default(
27332
+ "maxContentLength size of " + maxContentLength + " exceeded",
27333
+ AxiosError_default.ERR_BAD_RESPONSE,
27334
+ config,
27335
+ request
27336
+ );
27337
+ }
27338
+ }
27105
27339
  const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
27106
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
27340
+ if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
27107
27341
  const options = {};
27108
27342
  ["status", "statusText", "headers"].forEach((prop) => {
27109
27343
  options[prop] = response[prop];
@@ -27113,8 +27347,23 @@ var factory = (env3) => {
27113
27347
  responseContentLength,
27114
27348
  progressEventReducer(asyncDecorator(onDownloadProgress), true)
27115
27349
  ) || [];
27350
+ let bytesRead = 0;
27351
+ const onChunkProgress = (loadedBytes) => {
27352
+ if (hasMaxContentLength) {
27353
+ bytesRead = loadedBytes;
27354
+ if (bytesRead > maxContentLength) {
27355
+ throw new AxiosError_default(
27356
+ "maxContentLength size of " + maxContentLength + " exceeded",
27357
+ AxiosError_default.ERR_BAD_RESPONSE,
27358
+ config,
27359
+ request
27360
+ );
27361
+ }
27362
+ }
27363
+ onProgress && onProgress(loadedBytes);
27364
+ };
27116
27365
  response = new Response(
27117
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
27366
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
27118
27367
  flush && flush();
27119
27368
  unsubscribe && unsubscribe();
27120
27369
  }),
@@ -27126,6 +27375,26 @@ var factory = (env3) => {
27126
27375
  response,
27127
27376
  config
27128
27377
  );
27378
+ if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
27379
+ let materializedSize;
27380
+ if (responseData != null) {
27381
+ if (typeof responseData.byteLength === "number") {
27382
+ materializedSize = responseData.byteLength;
27383
+ } else if (typeof responseData.size === "number") {
27384
+ materializedSize = responseData.size;
27385
+ } else if (typeof responseData === "string") {
27386
+ materializedSize = typeof TextEncoder2 === "function" ? new TextEncoder2().encode(responseData).byteLength : responseData.length;
27387
+ }
27388
+ }
27389
+ if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
27390
+ throw new AxiosError_default(
27391
+ "maxContentLength size of " + maxContentLength + " exceeded",
27392
+ AxiosError_default.ERR_BAD_RESPONSE,
27393
+ config,
27394
+ request
27395
+ );
27396
+ }
27397
+ }
27129
27398
  !isStreamResponse && unsubscribe && unsubscribe();
27130
27399
  return await new Promise((resolve3, reject) => {
27131
27400
  settle(resolve3, reject, {
@@ -27139,6 +27408,13 @@ var factory = (env3) => {
27139
27408
  });
27140
27409
  } catch (err) {
27141
27410
  unsubscribe && unsubscribe();
27411
+ if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError_default) {
27412
+ const canceledError = composedSignal.reason;
27413
+ canceledError.config = config;
27414
+ request && (canceledError.request = request);
27415
+ err !== canceledError && (canceledError.cause = err);
27416
+ throw canceledError;
27417
+ }
27142
27418
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
27143
27419
  throw Object.assign(
27144
27420
  new AxiosError_default(
@@ -27184,10 +27460,10 @@ var knownAdapters = {
27184
27460
  utils_default.forEach(knownAdapters, (fn, value) => {
27185
27461
  if (fn) {
27186
27462
  try {
27187
- Object.defineProperty(fn, "name", { value });
27463
+ Object.defineProperty(fn, "name", { __proto__: null, value });
27188
27464
  } catch (e) {
27189
27465
  }
27190
- Object.defineProperty(fn, "adapterName", { value });
27466
+ Object.defineProperty(fn, "adapterName", { __proto__: null, value });
27191
27467
  }
27192
27468
  });
27193
27469
  var renderReason = (reason) => `- ${reason}`;
@@ -27258,7 +27534,12 @@ function dispatchRequest(config) {
27258
27534
  return adapter2(config).then(
27259
27535
  function onAdapterResolution(response) {
27260
27536
  throwIfCancellationRequested(config);
27261
- response.data = transformData.call(config, config.transformResponse, response);
27537
+ config.response = response;
27538
+ try {
27539
+ response.data = transformData.call(config, config.transformResponse, response);
27540
+ } finally {
27541
+ delete config.response;
27542
+ }
27262
27543
  response.headers = AxiosHeaders_default.from(response.headers);
27263
27544
  return response;
27264
27545
  },
@@ -27266,11 +27547,16 @@ function dispatchRequest(config) {
27266
27547
  if (!isCancel(reason)) {
27267
27548
  throwIfCancellationRequested(config);
27268
27549
  if (reason && reason.response) {
27269
- reason.response.data = transformData.call(
27270
- config,
27271
- config.transformResponse,
27272
- reason.response
27273
- );
27550
+ config.response = reason.response;
27551
+ try {
27552
+ reason.response.data = transformData.call(
27553
+ config,
27554
+ config.transformResponse,
27555
+ reason.response
27556
+ );
27557
+ } finally {
27558
+ delete config.response;
27559
+ }
27274
27560
  reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
27275
27561
  }
27276
27562
  }
@@ -27448,7 +27734,7 @@ var Axios = class {
27448
27734
  );
27449
27735
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
27450
27736
  let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
27451
- headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
27737
+ headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
27452
27738
  delete headers[method];
27453
27739
  });
27454
27740
  config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
@@ -27526,7 +27812,7 @@ utils_default.forEach(["delete", "get", "head", "options"], function forEachMeth
27526
27812
  );
27527
27813
  };
27528
27814
  });
27529
- utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
27815
+ utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
27530
27816
  function generateHTTPMethod(isForm) {
27531
27817
  return function httpMethod(url2, data, config) {
27532
27818
  return this.request(
@@ -27542,7 +27828,9 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
27542
27828
  };
27543
27829
  }
27544
27830
  Axios.prototype[method] = generateHTTPMethod();
27545
- Axios.prototype[method + "Form"] = generateHTTPMethod(true);
27831
+ if (method !== "query") {
27832
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
27833
+ }
27546
27834
  });
27547
27835
  var Axios_default = Axios;
27548
27836
 
@@ -27739,7 +28027,7 @@ function createInstance(defaultConfig) {
27739
28027
  const instance2 = bind(Axios_default.prototype.request, context);
27740
28028
  utils_default.extend(instance2, Axios_default.prototype, context, { allOwnKeys: true });
27741
28029
  utils_default.extend(instance2, context, null, { allOwnKeys: true });
27742
- instance2.create = function create(instanceConfig) {
28030
+ instance2.create = function create2(instanceConfig) {
27743
28031
  return createInstance(mergeConfig(defaultConfig, instanceConfig));
27744
28032
  };
27745
28033
  return instance2;
@@ -27783,7 +28071,8 @@ var {
27783
28071
  HttpStatusCode: HttpStatusCode2,
27784
28072
  formToJSON,
27785
28073
  getAdapter: getAdapter2,
27786
- mergeConfig: mergeConfig2
28074
+ mergeConfig: mergeConfig2,
28075
+ create
27787
28076
  } = axios_default;
27788
28077
 
27789
28078
  // src/http.ts