@sap/ux-ui5-tooling 1.23.0 → 1.24.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.
@@ -24830,7 +24830,7 @@ var require_templates = __commonJS({
24830
24830
  ["e", "\x1B"],
24831
24831
  ["a", "\x07"]
24832
24832
  ]);
24833
- function unescape2(c) {
24833
+ function unescape(c) {
24834
24834
  const u = c[0] === "u";
24835
24835
  const bracket = c[1] === "{";
24836
24836
  if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
@@ -24850,7 +24850,7 @@ var require_templates = __commonJS({
24850
24850
  if (!Number.isNaN(number)) {
24851
24851
  results.push(number);
24852
24852
  } else if (matches = chunk.match(STRING_REGEX)) {
24853
- results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, character) => escape2 ? unescape2(escape2) : character));
24853
+ results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, character) => escape2 ? unescape(escape2) : character));
24854
24854
  } else {
24855
24855
  throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
24856
24856
  }
@@ -24897,7 +24897,7 @@ var require_templates = __commonJS({
24897
24897
  let chunk = [];
24898
24898
  temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
24899
24899
  if (escapeCharacter) {
24900
- chunk.push(unescape2(escapeCharacter));
24900
+ chunk.push(unescape(escapeCharacter));
24901
24901
  } else if (style) {
24902
24902
  const string = chunk.join("");
24903
24903
  chunk = [];
@@ -30852,7 +30852,7 @@ var require_lodash = __commonJS({
30852
30852
  }
30853
30853
  return result2 + omission;
30854
30854
  }
30855
- function unescape2(string) {
30855
+ function unescape(string) {
30856
30856
  string = toString(string);
30857
30857
  return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
30858
30858
  }
@@ -31366,7 +31366,7 @@ var require_lodash = __commonJS({
31366
31366
  lodash.trimEnd = trimEnd;
31367
31367
  lodash.trimStart = trimStart;
31368
31368
  lodash.truncate = truncate;
31369
- lodash.unescape = unescape2;
31369
+ lodash.unescape = unescape;
31370
31370
  lodash.uniqueId = uniqueId;
31371
31371
  lodash.upperCase = upperCase;
31372
31372
  lodash.upperFirst = upperFirst;
@@ -32003,9 +32003,9 @@ var require_combined_stream = __commonJS({
32003
32003
  }
32004
32004
  });
32005
32005
 
32006
- // ../../node_modules/form-data/node_modules/mime-db/db.json
32006
+ // ../../node_modules/mime-db/db.json
32007
32007
  var require_db = __commonJS({
32008
- "../../node_modules/form-data/node_modules/mime-db/db.json"(exports, module) {
32008
+ "../../node_modules/mime-db/db.json"(exports, module) {
32009
32009
  module.exports = {
32010
32010
  "application/1d-interleaved-parityfec": {
32011
32011
  source: "iana"
@@ -40528,16 +40528,16 @@ var require_db = __commonJS({
40528
40528
  }
40529
40529
  });
40530
40530
 
40531
- // ../../node_modules/form-data/node_modules/mime-db/index.js
40531
+ // ../../node_modules/mime-db/index.js
40532
40532
  var require_mime_db = __commonJS({
40533
- "../../node_modules/form-data/node_modules/mime-db/index.js"(exports, module) {
40533
+ "../../node_modules/mime-db/index.js"(exports, module) {
40534
40534
  module.exports = require_db();
40535
40535
  }
40536
40536
  });
40537
40537
 
40538
- // ../../node_modules/form-data/node_modules/mime-types/index.js
40538
+ // ../../node_modules/mime-types/index.js
40539
40539
  var require_mime_types = __commonJS({
40540
- "../../node_modules/form-data/node_modules/mime-types/index.js"(exports) {
40540
+ "../../node_modules/mime-types/index.js"(exports) {
40541
40541
  "use strict";
40542
40542
  var db = require_mime_db();
40543
40543
  var extname = __require("path").extname;
@@ -42554,6 +42554,7 @@ var require_axios = __commonJS({
42554
42554
  var https = __require("https");
42555
42555
  var http2 = __require("http2");
42556
42556
  var util = __require("util");
42557
+ var path = __require("path");
42557
42558
  var followRedirects = require_follow_redirects();
42558
42559
  var zlib = __require("zlib");
42559
42560
  var stream = __require("stream");
@@ -42640,9 +42641,14 @@ var require_axios = __commonJS({
42640
42641
  var G = getGlobal();
42641
42642
  var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0;
42642
42643
  var isFormData = (thing) => {
42643
- let kind;
42644
- return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
42645
- kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
42644
+ if (!thing) return false;
42645
+ if (FormDataCtor && thing instanceof FormDataCtor) return true;
42646
+ const proto = getPrototypeOf(thing);
42647
+ if (!proto || proto === Object.prototype) return false;
42648
+ if (!isFunction$1(thing.append)) return false;
42649
+ const kind = kindOf(thing);
42650
+ return kind === "formdata" || // detect form-data instance
42651
+ kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]";
42646
42652
  };
42647
42653
  var isURLSearchParams = kindOfTest("URLSearchParams");
42648
42654
  var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
@@ -42698,7 +42704,7 @@ var require_axios = __commonJS({
42698
42704
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
42699
42705
  })();
42700
42706
  var isContextDefined = (context) => !isUndefined(context) && context !== _global;
42701
- function merge() {
42707
+ function merge(...objs) {
42702
42708
  const {
42703
42709
  caseless,
42704
42710
  skipUndefined
@@ -42709,8 +42715,9 @@ var require_axios = __commonJS({
42709
42715
  return;
42710
42716
  }
42711
42717
  const targetKey = caseless && findKey(result, key) || key;
42712
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
42713
- result[targetKey] = merge(result[targetKey], val);
42718
+ const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
42719
+ if (isPlainObject(existing) && isPlainObject(val)) {
42720
+ result[targetKey] = merge(existing, val);
42714
42721
  } else if (isPlainObject(val)) {
42715
42722
  result[targetKey] = merge({}, val);
42716
42723
  } else if (isArray(val)) {
@@ -42719,8 +42726,8 @@ var require_axios = __commonJS({
42719
42726
  result[targetKey] = val;
42720
42727
  }
42721
42728
  };
42722
- for (let i = 0, l = arguments.length; i < l; i++) {
42723
- arguments[i] && forEach(arguments[i], assignValue);
42729
+ for (let i = 0, l = objs.length; i < l; i++) {
42730
+ objs[i] && forEach(objs[i], assignValue);
42724
42731
  }
42725
42732
  return result;
42726
42733
  }
@@ -42730,6 +42737,9 @@ var require_axios = __commonJS({
42730
42737
  forEach(b, (val, key) => {
42731
42738
  if (thisArg && isFunction$1(val)) {
42732
42739
  Object.defineProperty(a, key, {
42740
+ // Null-proto descriptor so a polluted Object.prototype.get cannot
42741
+ // hijack defineProperty's accessor-vs-data resolution.
42742
+ __proto__: null,
42733
42743
  value: bind(val, thisArg),
42734
42744
  writable: true,
42735
42745
  enumerable: true,
@@ -42737,6 +42747,7 @@ var require_axios = __commonJS({
42737
42747
  });
42738
42748
  } else {
42739
42749
  Object.defineProperty(a, key, {
42750
+ __proto__: null,
42740
42751
  value: val,
42741
42752
  writable: true,
42742
42753
  enumerable: true,
@@ -42757,12 +42768,14 @@ var require_axios = __commonJS({
42757
42768
  var inherits = (constructor, superConstructor, props, descriptors) => {
42758
42769
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
42759
42770
  Object.defineProperty(constructor.prototype, "constructor", {
42771
+ __proto__: null,
42760
42772
  value: constructor,
42761
42773
  writable: true,
42762
42774
  enumerable: false,
42763
42775
  configurable: true
42764
42776
  });
42765
42777
  Object.defineProperty(constructor, "super", {
42778
+ __proto__: null,
42766
42779
  value: superConstructor.prototype
42767
42780
  });
42768
42781
  props && Object.assign(constructor.prototype, props);
@@ -42853,7 +42866,7 @@ var require_axios = __commonJS({
42853
42866
  };
42854
42867
  var freezeMethods = (obj) => {
42855
42868
  reduceDescriptors(obj, (descriptor, name) => {
42856
- if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
42869
+ if (isFunction$1(obj) && ["arguments", "caller", "callee"].includes(name)) {
42857
42870
  return false;
42858
42871
  }
42859
42872
  const value = obj[name];
@@ -42998,6 +43011,337 @@ var require_axios = __commonJS({
42998
43011
  asap,
42999
43012
  isIterable
43000
43013
  };
43014
+ var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
43015
+ var parseHeaders = (rawHeaders) => {
43016
+ const parsed = {};
43017
+ let key;
43018
+ let val;
43019
+ let i;
43020
+ rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
43021
+ i = line.indexOf(":");
43022
+ key = line.substring(0, i).trim().toLowerCase();
43023
+ val = line.substring(i + 1).trim();
43024
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
43025
+ return;
43026
+ }
43027
+ if (key === "set-cookie") {
43028
+ if (parsed[key]) {
43029
+ parsed[key].push(val);
43030
+ } else {
43031
+ parsed[key] = [val];
43032
+ }
43033
+ } else {
43034
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
43035
+ }
43036
+ });
43037
+ return parsed;
43038
+ };
43039
+ var $internals = Symbol("internals");
43040
+ var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
43041
+ function trimSPorHTAB(str) {
43042
+ let start = 0;
43043
+ let end = str.length;
43044
+ while (start < end) {
43045
+ const code = str.charCodeAt(start);
43046
+ if (code !== 9 && code !== 32) {
43047
+ break;
43048
+ }
43049
+ start += 1;
43050
+ }
43051
+ while (end > start) {
43052
+ const code = str.charCodeAt(end - 1);
43053
+ if (code !== 9 && code !== 32) {
43054
+ break;
43055
+ }
43056
+ end -= 1;
43057
+ }
43058
+ return start === 0 && end === str.length ? str : str.slice(start, end);
43059
+ }
43060
+ function normalizeHeader(header) {
43061
+ return header && String(header).trim().toLowerCase();
43062
+ }
43063
+ function sanitizeHeaderValue(str) {
43064
+ return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
43065
+ }
43066
+ function normalizeValue(value) {
43067
+ if (value === false || value == null) {
43068
+ return value;
43069
+ }
43070
+ return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
43071
+ }
43072
+ function parseTokens(str) {
43073
+ const tokens = /* @__PURE__ */ Object.create(null);
43074
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
43075
+ let match;
43076
+ while (match = tokensRE.exec(str)) {
43077
+ tokens[match[1]] = match[2];
43078
+ }
43079
+ return tokens;
43080
+ }
43081
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
43082
+ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
43083
+ if (utils$1.isFunction(filter2)) {
43084
+ return filter2.call(this, value, header);
43085
+ }
43086
+ if (isHeaderNameFilter) {
43087
+ value = header;
43088
+ }
43089
+ if (!utils$1.isString(value)) return;
43090
+ if (utils$1.isString(filter2)) {
43091
+ return value.indexOf(filter2) !== -1;
43092
+ }
43093
+ if (utils$1.isRegExp(filter2)) {
43094
+ return filter2.test(value);
43095
+ }
43096
+ }
43097
+ function formatHeader(header) {
43098
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
43099
+ return char.toUpperCase() + str;
43100
+ });
43101
+ }
43102
+ function buildAccessors(obj, header) {
43103
+ const accessorName = utils$1.toCamelCase(" " + header);
43104
+ ["get", "set", "has"].forEach((methodName) => {
43105
+ Object.defineProperty(obj, methodName + accessorName, {
43106
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
43107
+ // this data descriptor into an accessor descriptor on the way in.
43108
+ __proto__: null,
43109
+ value: function(arg1, arg2, arg3) {
43110
+ return this[methodName].call(this, header, arg1, arg2, arg3);
43111
+ },
43112
+ configurable: true
43113
+ });
43114
+ });
43115
+ }
43116
+ var AxiosHeaders = class {
43117
+ constructor(headers) {
43118
+ headers && this.set(headers);
43119
+ }
43120
+ set(header, valueOrRewrite, rewrite) {
43121
+ const self2 = this;
43122
+ function setHeader(_value, _header, _rewrite) {
43123
+ const lHeader = normalizeHeader(_header);
43124
+ if (!lHeader) {
43125
+ throw new Error("header name must be a non-empty string");
43126
+ }
43127
+ const key = utils$1.findKey(self2, lHeader);
43128
+ if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
43129
+ self2[key || _header] = normalizeValue(_value);
43130
+ }
43131
+ }
43132
+ const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
43133
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
43134
+ setHeaders(header, valueOrRewrite);
43135
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
43136
+ setHeaders(parseHeaders(header), valueOrRewrite);
43137
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
43138
+ let obj = {}, dest, key;
43139
+ for (const entry of header) {
43140
+ if (!utils$1.isArray(entry)) {
43141
+ throw TypeError("Object iterator must return a key-value pair");
43142
+ }
43143
+ obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
43144
+ }
43145
+ setHeaders(obj, valueOrRewrite);
43146
+ } else {
43147
+ header != null && setHeader(valueOrRewrite, header, rewrite);
43148
+ }
43149
+ return this;
43150
+ }
43151
+ get(header, parser) {
43152
+ header = normalizeHeader(header);
43153
+ if (header) {
43154
+ const key = utils$1.findKey(this, header);
43155
+ if (key) {
43156
+ const value = this[key];
43157
+ if (!parser) {
43158
+ return value;
43159
+ }
43160
+ if (parser === true) {
43161
+ return parseTokens(value);
43162
+ }
43163
+ if (utils$1.isFunction(parser)) {
43164
+ return parser.call(this, value, key);
43165
+ }
43166
+ if (utils$1.isRegExp(parser)) {
43167
+ return parser.exec(value);
43168
+ }
43169
+ throw new TypeError("parser must be boolean|regexp|function");
43170
+ }
43171
+ }
43172
+ }
43173
+ has(header, matcher) {
43174
+ header = normalizeHeader(header);
43175
+ if (header) {
43176
+ const key = utils$1.findKey(this, header);
43177
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
43178
+ }
43179
+ return false;
43180
+ }
43181
+ delete(header, matcher) {
43182
+ const self2 = this;
43183
+ let deleted = false;
43184
+ function deleteHeader(_header) {
43185
+ _header = normalizeHeader(_header);
43186
+ if (_header) {
43187
+ const key = utils$1.findKey(self2, _header);
43188
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
43189
+ delete self2[key];
43190
+ deleted = true;
43191
+ }
43192
+ }
43193
+ }
43194
+ if (utils$1.isArray(header)) {
43195
+ header.forEach(deleteHeader);
43196
+ } else {
43197
+ deleteHeader(header);
43198
+ }
43199
+ return deleted;
43200
+ }
43201
+ clear(matcher) {
43202
+ const keys = Object.keys(this);
43203
+ let i = keys.length;
43204
+ let deleted = false;
43205
+ while (i--) {
43206
+ const key = keys[i];
43207
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
43208
+ delete this[key];
43209
+ deleted = true;
43210
+ }
43211
+ }
43212
+ return deleted;
43213
+ }
43214
+ normalize(format2) {
43215
+ const self2 = this;
43216
+ const headers = {};
43217
+ utils$1.forEach(this, (value, header) => {
43218
+ const key = utils$1.findKey(headers, header);
43219
+ if (key) {
43220
+ self2[key] = normalizeValue(value);
43221
+ delete self2[header];
43222
+ return;
43223
+ }
43224
+ const normalized = format2 ? formatHeader(header) : String(header).trim();
43225
+ if (normalized !== header) {
43226
+ delete self2[header];
43227
+ }
43228
+ self2[normalized] = normalizeValue(value);
43229
+ headers[normalized] = true;
43230
+ });
43231
+ return this;
43232
+ }
43233
+ concat(...targets) {
43234
+ return this.constructor.concat(this, ...targets);
43235
+ }
43236
+ toJSON(asStrings) {
43237
+ const obj = /* @__PURE__ */ Object.create(null);
43238
+ utils$1.forEach(this, (value, header) => {
43239
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
43240
+ });
43241
+ return obj;
43242
+ }
43243
+ [Symbol.iterator]() {
43244
+ return Object.entries(this.toJSON())[Symbol.iterator]();
43245
+ }
43246
+ toString() {
43247
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
43248
+ }
43249
+ getSetCookie() {
43250
+ return this.get("set-cookie") || [];
43251
+ }
43252
+ get [Symbol.toStringTag]() {
43253
+ return "AxiosHeaders";
43254
+ }
43255
+ static from(thing) {
43256
+ return thing instanceof this ? thing : new this(thing);
43257
+ }
43258
+ static concat(first, ...targets) {
43259
+ const computed = new this(first);
43260
+ targets.forEach((target) => computed.set(target));
43261
+ return computed;
43262
+ }
43263
+ static accessor(header) {
43264
+ const internals = this[$internals] = this[$internals] = {
43265
+ accessors: {}
43266
+ };
43267
+ const accessors = internals.accessors;
43268
+ const prototype2 = this.prototype;
43269
+ function defineAccessor(_header) {
43270
+ const lHeader = normalizeHeader(_header);
43271
+ if (!accessors[lHeader]) {
43272
+ buildAccessors(prototype2, _header);
43273
+ accessors[lHeader] = true;
43274
+ }
43275
+ }
43276
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
43277
+ return this;
43278
+ }
43279
+ };
43280
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
43281
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
43282
+ value
43283
+ }, key) => {
43284
+ let mapped = key[0].toUpperCase() + key.slice(1);
43285
+ return {
43286
+ get: () => value,
43287
+ set(headerValue) {
43288
+ this[mapped] = headerValue;
43289
+ }
43290
+ };
43291
+ });
43292
+ utils$1.freezeMethods(AxiosHeaders);
43293
+ var REDACTED = "[REDACTED ****]";
43294
+ function hasOwnOrPrototypeToJSON(source) {
43295
+ if (utils$1.hasOwnProp(source, "toJSON")) {
43296
+ return true;
43297
+ }
43298
+ let prototype2 = Object.getPrototypeOf(source);
43299
+ while (prototype2 && prototype2 !== Object.prototype) {
43300
+ if (utils$1.hasOwnProp(prototype2, "toJSON")) {
43301
+ return true;
43302
+ }
43303
+ prototype2 = Object.getPrototypeOf(prototype2);
43304
+ }
43305
+ return false;
43306
+ }
43307
+ function redactConfig(config, redactKeys) {
43308
+ const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
43309
+ const seen = [];
43310
+ const visit = (source) => {
43311
+ if (source === null || typeof source !== "object") return source;
43312
+ if (utils$1.isBuffer(source)) return source;
43313
+ if (seen.indexOf(source) !== -1) return void 0;
43314
+ if (source instanceof AxiosHeaders) {
43315
+ source = source.toJSON();
43316
+ }
43317
+ seen.push(source);
43318
+ let result;
43319
+ if (utils$1.isArray(source)) {
43320
+ result = [];
43321
+ source.forEach((v, i) => {
43322
+ const reducedValue = visit(v);
43323
+ if (!utils$1.isUndefined(reducedValue)) {
43324
+ result[i] = reducedValue;
43325
+ }
43326
+ });
43327
+ } else {
43328
+ if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
43329
+ seen.pop();
43330
+ return source;
43331
+ }
43332
+ result = /* @__PURE__ */ Object.create(null);
43333
+ for (const [key, value] of Object.entries(source)) {
43334
+ const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
43335
+ if (!utils$1.isUndefined(reducedValue)) {
43336
+ result[key] = reducedValue;
43337
+ }
43338
+ }
43339
+ }
43340
+ seen.pop();
43341
+ return result;
43342
+ };
43343
+ return visit(config);
43344
+ }
43001
43345
  var AxiosError = class _AxiosError extends Error {
43002
43346
  static from(error, code, config, request, response, customProps) {
43003
43347
  const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
@@ -43023,6 +43367,9 @@ var require_axios = __commonJS({
43023
43367
  constructor(message, code, config, request, response) {
43024
43368
  super(message);
43025
43369
  Object.defineProperty(this, "message", {
43370
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
43371
+ // this data descriptor into an accessor descriptor on the way in.
43372
+ __proto__: null,
43026
43373
  value: message,
43027
43374
  enumerable: true,
43028
43375
  writable: true,
@@ -43039,6 +43386,9 @@ var require_axios = __commonJS({
43039
43386
  }
43040
43387
  }
43041
43388
  toJSON() {
43389
+ const config = this.config;
43390
+ const redactKeys = config && utils$1.hasOwnProp(config, "redact") ? config.redact : void 0;
43391
+ const serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config);
43042
43392
  return {
43043
43393
  // Standard
43044
43394
  message: this.message,
@@ -43052,7 +43402,7 @@ var require_axios = __commonJS({
43052
43402
  columnNumber: this.columnNumber,
43053
43403
  stack: this.stack,
43054
43404
  // Axios
43055
- config: utils$1.toJSONObject(this.config),
43405
+ config: serializedConfig,
43056
43406
  code: this.code,
43057
43407
  status: this.status
43058
43408
  };
@@ -43062,6 +43412,7 @@ var require_axios = __commonJS({
43062
43412
  AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
43063
43413
  AxiosError.ECONNABORTED = "ECONNABORTED";
43064
43414
  AxiosError.ETIMEDOUT = "ETIMEDOUT";
43415
+ AxiosError.ECONNREFUSED = "ECONNREFUSED";
43065
43416
  AxiosError.ERR_NETWORK = "ERR_NETWORK";
43066
43417
  AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
43067
43418
  AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
@@ -43070,15 +43421,16 @@ var require_axios = __commonJS({
43070
43421
  AxiosError.ERR_CANCELED = "ERR_CANCELED";
43071
43422
  AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
43072
43423
  AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
43424
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
43073
43425
  function isVisitable(thing) {
43074
43426
  return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
43075
43427
  }
43076
43428
  function removeBrackets(key) {
43077
43429
  return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
43078
43430
  }
43079
- function renderKey(path, key, dots) {
43080
- if (!path) return key;
43081
- return path.concat(key).map(function each2(token2, i) {
43431
+ function renderKey(path2, key, dots) {
43432
+ if (!path2) return key;
43433
+ return path2.concat(key).map(function each2(token2, i) {
43082
43434
  token2 = removeBrackets(token2);
43083
43435
  return !dots && i ? "[" + token2 + "]" : token2;
43084
43436
  }).join(dots ? "." : "");
@@ -43106,6 +43458,7 @@ var require_axios = __commonJS({
43106
43458
  const dots = options.dots;
43107
43459
  const indexes = options.indexes;
43108
43460
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
43461
+ const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
43109
43462
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
43110
43463
  if (!utils$1.isFunction(visitor)) {
43111
43464
  throw new TypeError("visitor must be a function");
@@ -43126,13 +43479,13 @@ var require_axios = __commonJS({
43126
43479
  }
43127
43480
  return value;
43128
43481
  }
43129
- function defaultVisitor(value, key, path) {
43482
+ function defaultVisitor(value, key, path2) {
43130
43483
  let arr = value;
43131
43484
  if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
43132
- formData.append(renderKey(path, key, dots), convertValue(value));
43485
+ formData.append(renderKey(path2, key, dots), convertValue(value));
43133
43486
  return false;
43134
43487
  }
43135
- if (value && !path && typeof value === "object") {
43488
+ if (value && !path2 && typeof value === "object") {
43136
43489
  if (utils$1.endsWith(key, "{}")) {
43137
43490
  key = metaTokens ? key : key.slice(0, -2);
43138
43491
  value = JSON.stringify(value);
@@ -43151,7 +43504,7 @@ var require_axios = __commonJS({
43151
43504
  if (isVisitable(value)) {
43152
43505
  return true;
43153
43506
  }
43154
- formData.append(renderKey(path, key, dots), convertValue(value));
43507
+ formData.append(renderKey(path2, key, dots), convertValue(value));
43155
43508
  return false;
43156
43509
  }
43157
43510
  const stack = [];
@@ -43160,16 +43513,19 @@ var require_axios = __commonJS({
43160
43513
  convertValue,
43161
43514
  isVisitable
43162
43515
  });
43163
- function build(value, path) {
43516
+ function build(value, path2, depth = 0) {
43164
43517
  if (utils$1.isUndefined(value)) return;
43518
+ if (depth > maxDepth) {
43519
+ throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
43520
+ }
43165
43521
  if (stack.indexOf(value) !== -1) {
43166
- throw Error("Circular reference detected in " + path.join("."));
43522
+ throw Error("Circular reference detected in " + path2.join("."));
43167
43523
  }
43168
43524
  stack.push(value);
43169
43525
  utils$1.forEach(value, function each2(el, key) {
43170
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
43526
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path2, exposedHelpers);
43171
43527
  if (result === true) {
43172
- build(el, path ? path.concat(key) : [key]);
43528
+ build(el, path2 ? path2.concat(key) : [key], depth + 1);
43173
43529
  }
43174
43530
  });
43175
43531
  stack.pop();
@@ -43187,10 +43543,9 @@ var require_axios = __commonJS({
43187
43543
  "(": "%28",
43188
43544
  ")": "%29",
43189
43545
  "~": "%7E",
43190
- "%20": "+",
43191
- "%00": "\0"
43546
+ "%20": "+"
43192
43547
  };
43193
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
43548
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
43194
43549
  return charMap[match];
43195
43550
  });
43196
43551
  }
@@ -43358,7 +43713,7 @@ var require_axios = __commonJS({
43358
43713
  };
43359
43714
  function toURLEncodedForm(data, options) {
43360
43715
  return toFormData(data, new platform.classes.URLSearchParams(), {
43361
- visitor: function(value, key, path, helpers) {
43716
+ visitor: function(value, key, path2, helpers) {
43362
43717
  if (platform.isNode && utils$1.isBuffer(value)) {
43363
43718
  this.append(key, value.toString("base64"));
43364
43719
  return false;
@@ -43386,15 +43741,15 @@ var require_axios = __commonJS({
43386
43741
  return obj;
43387
43742
  }
43388
43743
  function formDataToJSON(formData) {
43389
- function buildPath(path, value, target, index2) {
43390
- let name = path[index2++];
43744
+ function buildPath(path2, value, target, index2) {
43745
+ let name = path2[index2++];
43391
43746
  if (name === "__proto__") return true;
43392
43747
  const isNumericKey = Number.isFinite(+name);
43393
- const isLast = index2 >= path.length;
43748
+ const isLast = index2 >= path2.length;
43394
43749
  name = !name && utils$1.isArray(target) ? target.length : name;
43395
43750
  if (isLast) {
43396
43751
  if (utils$1.hasOwnProp(target, name)) {
43397
- target[name] = [target[name], value];
43752
+ target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
43398
43753
  } else {
43399
43754
  target[name] = value;
43400
43755
  }
@@ -43403,7 +43758,7 @@ var require_axios = __commonJS({
43403
43758
  if (!target[name] || !utils$1.isObject(target[name])) {
43404
43759
  target[name] = [];
43405
43760
  }
43406
- const result = buildPath(path, value, target[name], index2);
43761
+ const result = buildPath(path2, value, target[name], index2);
43407
43762
  if (result && utils$1.isArray(target[name])) {
43408
43763
  target[name] = arrayToObject(target[name]);
43409
43764
  }
@@ -43418,6 +43773,7 @@ var require_axios = __commonJS({
43418
43773
  }
43419
43774
  return null;
43420
43775
  }
43776
+ var own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : void 0;
43421
43777
  function stringifySafely(rawValue, parser, encoder) {
43422
43778
  if (utils$1.isString(rawValue)) {
43423
43779
  try {
@@ -43457,14 +43813,16 @@ var require_axios = __commonJS({
43457
43813
  }
43458
43814
  let isFileList2;
43459
43815
  if (isObjectPayload) {
43816
+ const formSerializer = own(this, "formSerializer");
43460
43817
  if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
43461
- return toURLEncodedForm(data, this.formSerializer).toString();
43818
+ return toURLEncodedForm(data, formSerializer).toString();
43462
43819
  }
43463
43820
  if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
43464
- const _FormData = this.env && this.env.FormData;
43821
+ const env = own(this, "env");
43822
+ const _FormData = env && env.FormData;
43465
43823
  return toFormData(isFileList2 ? {
43466
43824
  "files[]": data
43467
- } : data, _FormData && new _FormData(), this.formSerializer);
43825
+ } : data, _FormData && new _FormData(), formSerializer);
43468
43826
  }
43469
43827
  }
43470
43828
  if (isObjectPayload || hasJSONContentType) {
@@ -43474,21 +43832,22 @@ var require_axios = __commonJS({
43474
43832
  return data;
43475
43833
  }],
43476
43834
  transformResponse: [function transformResponse(data) {
43477
- const transitional = this.transitional || defaults.transitional;
43835
+ const transitional = own(this, "transitional") || defaults.transitional;
43478
43836
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
43479
- const JSONRequested = this.responseType === "json";
43837
+ const responseType = own(this, "responseType");
43838
+ const JSONRequested = responseType === "json";
43480
43839
  if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
43481
43840
  return data;
43482
43841
  }
43483
- if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
43842
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
43484
43843
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
43485
43844
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
43486
43845
  try {
43487
- return JSON.parse(data, this.parseReviver);
43846
+ return JSON.parse(data, own(this, "parseReviver"));
43488
43847
  } catch (e) {
43489
43848
  if (strictJSONParsing) {
43490
43849
  if (e.name === "SyntaxError") {
43491
- throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
43850
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, "response"));
43492
43851
  }
43493
43852
  throw e;
43494
43853
  }
@@ -43519,287 +43878,9 @@ var require_axios = __commonJS({
43519
43878
  }
43520
43879
  }
43521
43880
  };
43522
- utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
43881
+ utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
43523
43882
  defaults.headers[method] = {};
43524
43883
  });
43525
- var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
43526
- var parseHeaders = (rawHeaders) => {
43527
- const parsed = {};
43528
- let key;
43529
- let val;
43530
- let i;
43531
- rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
43532
- i = line.indexOf(":");
43533
- key = line.substring(0, i).trim().toLowerCase();
43534
- val = line.substring(i + 1).trim();
43535
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
43536
- return;
43537
- }
43538
- if (key === "set-cookie") {
43539
- if (parsed[key]) {
43540
- parsed[key].push(val);
43541
- } else {
43542
- parsed[key] = [val];
43543
- }
43544
- } else {
43545
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
43546
- }
43547
- });
43548
- return parsed;
43549
- };
43550
- var $internals = Symbol("internals");
43551
- var isValidHeaderValue = (value) => !/[\r\n]/.test(value);
43552
- function assertValidHeaderValue(value, header) {
43553
- if (value === false || value == null) {
43554
- return;
43555
- }
43556
- if (utils$1.isArray(value)) {
43557
- value.forEach((v) => assertValidHeaderValue(v, header));
43558
- return;
43559
- }
43560
- if (!isValidHeaderValue(String(value))) {
43561
- throw new Error(`Invalid character in header content ["${header}"]`);
43562
- }
43563
- }
43564
- function normalizeHeader(header) {
43565
- return header && String(header).trim().toLowerCase();
43566
- }
43567
- function stripTrailingCRLF(str) {
43568
- let end = str.length;
43569
- while (end > 0) {
43570
- const charCode = str.charCodeAt(end - 1);
43571
- if (charCode !== 10 && charCode !== 13) {
43572
- break;
43573
- }
43574
- end -= 1;
43575
- }
43576
- return end === str.length ? str : str.slice(0, end);
43577
- }
43578
- function normalizeValue(value) {
43579
- if (value === false || value == null) {
43580
- return value;
43581
- }
43582
- return utils$1.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
43583
- }
43584
- function parseTokens(str) {
43585
- const tokens = /* @__PURE__ */ Object.create(null);
43586
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
43587
- let match;
43588
- while (match = tokensRE.exec(str)) {
43589
- tokens[match[1]] = match[2];
43590
- }
43591
- return tokens;
43592
- }
43593
- var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
43594
- function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
43595
- if (utils$1.isFunction(filter2)) {
43596
- return filter2.call(this, value, header);
43597
- }
43598
- if (isHeaderNameFilter) {
43599
- value = header;
43600
- }
43601
- if (!utils$1.isString(value)) return;
43602
- if (utils$1.isString(filter2)) {
43603
- return value.indexOf(filter2) !== -1;
43604
- }
43605
- if (utils$1.isRegExp(filter2)) {
43606
- return filter2.test(value);
43607
- }
43608
- }
43609
- function formatHeader(header) {
43610
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
43611
- return char.toUpperCase() + str;
43612
- });
43613
- }
43614
- function buildAccessors(obj, header) {
43615
- const accessorName = utils$1.toCamelCase(" " + header);
43616
- ["get", "set", "has"].forEach((methodName) => {
43617
- Object.defineProperty(obj, methodName + accessorName, {
43618
- value: function(arg1, arg2, arg3) {
43619
- return this[methodName].call(this, header, arg1, arg2, arg3);
43620
- },
43621
- configurable: true
43622
- });
43623
- });
43624
- }
43625
- var AxiosHeaders = class {
43626
- constructor(headers) {
43627
- headers && this.set(headers);
43628
- }
43629
- set(header, valueOrRewrite, rewrite) {
43630
- const self2 = this;
43631
- function setHeader(_value, _header, _rewrite) {
43632
- const lHeader = normalizeHeader(_header);
43633
- if (!lHeader) {
43634
- throw new Error("header name must be a non-empty string");
43635
- }
43636
- const key = utils$1.findKey(self2, lHeader);
43637
- if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
43638
- assertValidHeaderValue(_value, _header);
43639
- self2[key || _header] = normalizeValue(_value);
43640
- }
43641
- }
43642
- const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
43643
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
43644
- setHeaders(header, valueOrRewrite);
43645
- } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
43646
- setHeaders(parseHeaders(header), valueOrRewrite);
43647
- } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
43648
- let obj = {}, dest, key;
43649
- for (const entry of header) {
43650
- if (!utils$1.isArray(entry)) {
43651
- throw TypeError("Object iterator must return a key-value pair");
43652
- }
43653
- obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
43654
- }
43655
- setHeaders(obj, valueOrRewrite);
43656
- } else {
43657
- header != null && setHeader(valueOrRewrite, header, rewrite);
43658
- }
43659
- return this;
43660
- }
43661
- get(header, parser) {
43662
- header = normalizeHeader(header);
43663
- if (header) {
43664
- const key = utils$1.findKey(this, header);
43665
- if (key) {
43666
- const value = this[key];
43667
- if (!parser) {
43668
- return value;
43669
- }
43670
- if (parser === true) {
43671
- return parseTokens(value);
43672
- }
43673
- if (utils$1.isFunction(parser)) {
43674
- return parser.call(this, value, key);
43675
- }
43676
- if (utils$1.isRegExp(parser)) {
43677
- return parser.exec(value);
43678
- }
43679
- throw new TypeError("parser must be boolean|regexp|function");
43680
- }
43681
- }
43682
- }
43683
- has(header, matcher) {
43684
- header = normalizeHeader(header);
43685
- if (header) {
43686
- const key = utils$1.findKey(this, header);
43687
- return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
43688
- }
43689
- return false;
43690
- }
43691
- delete(header, matcher) {
43692
- const self2 = this;
43693
- let deleted = false;
43694
- function deleteHeader(_header) {
43695
- _header = normalizeHeader(_header);
43696
- if (_header) {
43697
- const key = utils$1.findKey(self2, _header);
43698
- if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
43699
- delete self2[key];
43700
- deleted = true;
43701
- }
43702
- }
43703
- }
43704
- if (utils$1.isArray(header)) {
43705
- header.forEach(deleteHeader);
43706
- } else {
43707
- deleteHeader(header);
43708
- }
43709
- return deleted;
43710
- }
43711
- clear(matcher) {
43712
- const keys = Object.keys(this);
43713
- let i = keys.length;
43714
- let deleted = false;
43715
- while (i--) {
43716
- const key = keys[i];
43717
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
43718
- delete this[key];
43719
- deleted = true;
43720
- }
43721
- }
43722
- return deleted;
43723
- }
43724
- normalize(format2) {
43725
- const self2 = this;
43726
- const headers = {};
43727
- utils$1.forEach(this, (value, header) => {
43728
- const key = utils$1.findKey(headers, header);
43729
- if (key) {
43730
- self2[key] = normalizeValue(value);
43731
- delete self2[header];
43732
- return;
43733
- }
43734
- const normalized = format2 ? formatHeader(header) : String(header).trim();
43735
- if (normalized !== header) {
43736
- delete self2[header];
43737
- }
43738
- self2[normalized] = normalizeValue(value);
43739
- headers[normalized] = true;
43740
- });
43741
- return this;
43742
- }
43743
- concat(...targets) {
43744
- return this.constructor.concat(this, ...targets);
43745
- }
43746
- toJSON(asStrings) {
43747
- const obj = /* @__PURE__ */ Object.create(null);
43748
- utils$1.forEach(this, (value, header) => {
43749
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
43750
- });
43751
- return obj;
43752
- }
43753
- [Symbol.iterator]() {
43754
- return Object.entries(this.toJSON())[Symbol.iterator]();
43755
- }
43756
- toString() {
43757
- return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
43758
- }
43759
- getSetCookie() {
43760
- return this.get("set-cookie") || [];
43761
- }
43762
- get [Symbol.toStringTag]() {
43763
- return "AxiosHeaders";
43764
- }
43765
- static from(thing) {
43766
- return thing instanceof this ? thing : new this(thing);
43767
- }
43768
- static concat(first, ...targets) {
43769
- const computed = new this(first);
43770
- targets.forEach((target) => computed.set(target));
43771
- return computed;
43772
- }
43773
- static accessor(header) {
43774
- const internals = this[$internals] = this[$internals] = {
43775
- accessors: {}
43776
- };
43777
- const accessors = internals.accessors;
43778
- const prototype2 = this.prototype;
43779
- function defineAccessor(_header) {
43780
- const lHeader = normalizeHeader(_header);
43781
- if (!accessors[lHeader]) {
43782
- buildAccessors(prototype2, _header);
43783
- accessors[lHeader] = true;
43784
- }
43785
- }
43786
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
43787
- return this;
43788
- }
43789
- };
43790
- AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
43791
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
43792
- value
43793
- }, key) => {
43794
- let mapped = key[0].toUpperCase() + key.slice(1);
43795
- return {
43796
- get: () => value,
43797
- set(headerValue) {
43798
- this[mapped] = headerValue;
43799
- }
43800
- };
43801
- });
43802
- utils$1.freezeMethods(AxiosHeaders);
43803
43884
  function transformData(fns, response) {
43804
43885
  const config = this || defaults;
43805
43886
  const context = response || config;
@@ -43835,7 +43916,7 @@ var require_axios = __commonJS({
43835
43916
  if (!response.status || !validateStatus || validateStatus(response.status)) {
43836
43917
  resolve2(response);
43837
43918
  } else {
43838
- reject2(new AxiosError("Request failed with status code " + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
43919
+ reject2(new AxiosError("Request failed with status code " + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response));
43839
43920
  }
43840
43921
  }
43841
43922
  function isAbsoluteURL(url2) {
@@ -43849,7 +43930,7 @@ var require_axios = __commonJS({
43849
43930
  }
43850
43931
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
43851
43932
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
43852
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
43933
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
43853
43934
  return combineURLs(baseURL, requestedURL);
43854
43935
  }
43855
43936
  return requestedURL;
@@ -43919,9 +44000,9 @@ var require_axios = __commonJS({
43919
44000
  function getEnv(key) {
43920
44001
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
43921
44002
  }
43922
- var VERSION = "1.15.0";
44003
+ var VERSION = "1.16.0";
43923
44004
  function parseProtocol(url2) {
43924
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
44005
+ const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
43925
44006
  return match && match[1] || "";
43926
44007
  }
43927
44008
  var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
@@ -44093,7 +44174,8 @@ var require_axios = __commonJS({
44093
44174
  if (isStringValue) {
44094
44175
  value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
44095
44176
  } else {
44096
- headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
44177
+ const safeType = String(value.type || "application/octet-stream").replace(/[\r\n]/g, "");
44178
+ headers += `Content-Type: ${safeType}${CRLF}`;
44097
44179
  }
44098
44180
  this.headers = textEncoder.encode(headers + CRLF);
44099
44181
  this.contentLength = isStringValue ? value.byteLength : value.size;
@@ -44131,7 +44213,7 @@ var require_axios = __commonJS({
44131
44213
  throw TypeError("FormData instance required");
44132
44214
  }
44133
44215
  if (boundary.length < 1 || boundary.length > 70) {
44134
- throw Error("boundary must be 10-70 characters long");
44216
+ throw Error("boundary must be 1-70 characters long");
44135
44217
  }
44136
44218
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
44137
44219
  const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
@@ -44188,6 +44270,37 @@ var require_axios = __commonJS({
44188
44270
  }, cb);
44189
44271
  } : fn;
44190
44272
  };
44273
+ var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
44274
+ var isIPv4Loopback = (host) => {
44275
+ const parts = host.split(".");
44276
+ if (parts.length !== 4) return false;
44277
+ if (parts[0] !== "127") return false;
44278
+ return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
44279
+ };
44280
+ var isIPv6Loopback = (host) => {
44281
+ if (host === "::1") return true;
44282
+ const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
44283
+ if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]);
44284
+ const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);
44285
+ if (v4MappedHex) {
44286
+ const high = parseInt(v4MappedHex[1], 16);
44287
+ return high >= 32512 && high <= 32767;
44288
+ }
44289
+ const groups = host.split(":");
44290
+ if (groups.length === 8) {
44291
+ for (let i = 0; i < 7; i++) {
44292
+ if (!/^0+$/.test(groups[i])) return false;
44293
+ }
44294
+ return /^0*1$/.test(groups[7]);
44295
+ }
44296
+ return false;
44297
+ };
44298
+ var isLoopback = (host) => {
44299
+ if (!host) return false;
44300
+ if (LOOPBACK_HOSTNAMES.has(host)) return true;
44301
+ if (isIPv4Loopback(host)) return true;
44302
+ return isIPv6Loopback(host);
44303
+ };
44191
44304
  var DEFAULT_PORTS = {
44192
44305
  http: 80,
44193
44306
  https: 443,
@@ -44217,6 +44330,20 @@ var require_axios = __commonJS({
44217
44330
  }
44218
44331
  return [entryHost, entryPort];
44219
44332
  };
44333
+ var IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
44334
+ 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;
44335
+ var unmapIPv4MappedIPv6 = (host) => {
44336
+ if (typeof host !== "string" || host.indexOf(":") === -1) return host;
44337
+ const dotted = host.match(IPV4_MAPPED_DOTTED_RE);
44338
+ if (dotted) return dotted[1];
44339
+ const hex = host.match(IPV4_MAPPED_HEX_RE);
44340
+ if (hex) {
44341
+ const high = parseInt(hex[1], 16);
44342
+ const low = parseInt(hex[2], 16);
44343
+ return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
44344
+ }
44345
+ return host;
44346
+ };
44220
44347
  var normalizeNoProxyHost = (hostname) => {
44221
44348
  if (!hostname) {
44222
44349
  return hostname;
@@ -44224,7 +44351,7 @@ var require_axios = __commonJS({
44224
44351
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
44225
44352
  hostname = hostname.slice(1, -1);
44226
44353
  }
44227
- return hostname.replace(/\.+$/, "");
44354
+ return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
44228
44355
  };
44229
44356
  function shouldBypassProxy(location) {
44230
44357
  let parsed;
@@ -44260,7 +44387,7 @@ var require_axios = __commonJS({
44260
44387
  if (entryHost.charAt(0) === ".") {
44261
44388
  return hostname.endsWith(entryHost);
44262
44389
  }
44263
- return hostname === entryHost;
44390
+ return hostname === entryHost || isLoopback(hostname) && isLoopback(entryHost);
44264
44391
  });
44265
44392
  }
44266
44393
  function speedometer(samplesCount, min) {
@@ -44332,19 +44459,19 @@ var require_axios = __commonJS({
44332
44459
  let bytesNotified = 0;
44333
44460
  const _speedometer = speedometer(50, 250);
44334
44461
  return throttle((e) => {
44335
- const loaded = e.loaded;
44462
+ const rawLoaded = e.loaded;
44336
44463
  const total = e.lengthComputable ? e.total : void 0;
44337
- const progressBytes = loaded - bytesNotified;
44464
+ const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
44465
+ const progressBytes = Math.max(0, loaded - bytesNotified);
44338
44466
  const rate = _speedometer(progressBytes);
44339
- const inRange = loaded <= total;
44340
- bytesNotified = loaded;
44467
+ bytesNotified = Math.max(bytesNotified, loaded);
44341
44468
  const data = {
44342
44469
  loaded,
44343
44470
  total,
44344
44471
  progress: total ? loaded / total : void 0,
44345
44472
  bytes: progressBytes,
44346
44473
  rate: rate ? rate : void 0,
44347
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
44474
+ estimated: rate && total ? (total - loaded) / rate : void 0,
44348
44475
  event: e,
44349
44476
  lengthComputable: total != null,
44350
44477
  [isDownloadStream ? "download" : "upload"]: true
@@ -44405,10 +44532,32 @@ var require_axios = __commonJS({
44405
44532
  }
44406
44533
  }
44407
44534
  const groups = Math.floor(effectiveLen / 4);
44408
- const bytes = groups * 3 - (pad2 || 0);
44409
- return bytes > 0 ? bytes : 0;
44535
+ const bytes2 = groups * 3 - (pad2 || 0);
44536
+ return bytes2 > 0 ? bytes2 : 0;
44537
+ }
44538
+ if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
44539
+ return Buffer.byteLength(body, "utf8");
44540
+ }
44541
+ let bytes = 0;
44542
+ for (let i = 0, len = body.length; i < len; i++) {
44543
+ const c = body.charCodeAt(i);
44544
+ if (c < 128) {
44545
+ bytes += 1;
44546
+ } else if (c < 2048) {
44547
+ bytes += 2;
44548
+ } else if (c >= 55296 && c <= 56319 && i + 1 < len) {
44549
+ const next = body.charCodeAt(i + 1);
44550
+ if (next >= 56320 && next <= 57343) {
44551
+ bytes += 4;
44552
+ i++;
44553
+ } else {
44554
+ bytes += 3;
44555
+ }
44556
+ } else {
44557
+ bytes += 3;
44558
+ }
44410
44559
  }
44411
- return Buffer.byteLength(body, "utf8");
44560
+ return bytes;
44412
44561
  }
44413
44562
  var zlibOptions = {
44414
44563
  flush: zlib.constants.Z_SYNC_FLUSH,
@@ -44424,9 +44573,33 @@ var require_axios = __commonJS({
44424
44573
  https: httpsFollow
44425
44574
  } = followRedirects;
44426
44575
  var isHttps = /https:?/;
44576
+ var FORM_DATA_CONTENT_HEADERS$1 = ["content-type", "content-length"];
44577
+ function setFormDataHeaders$1(headers, formHeaders, policy) {
44578
+ if (policy !== "content-only") {
44579
+ headers.set(formHeaders);
44580
+ return;
44581
+ }
44582
+ Object.entries(formHeaders).forEach(([key, val]) => {
44583
+ if (FORM_DATA_CONTENT_HEADERS$1.includes(key.toLowerCase())) {
44584
+ headers.set(key, val);
44585
+ }
44586
+ });
44587
+ }
44588
+ var kAxiosSocketListener = Symbol("axios.http.socketListener");
44589
+ var kAxiosCurrentReq = Symbol("axios.http.currentReq");
44427
44590
  var supportedProtocols = platform.protocols.map((protocol) => {
44428
44591
  return protocol + ":";
44429
44592
  });
44593
+ var decodeURIComponentSafe = (value) => {
44594
+ if (!utils$1.isString(value)) {
44595
+ return value;
44596
+ }
44597
+ try {
44598
+ return decodeURIComponent(value);
44599
+ } catch (error) {
44600
+ return value;
44601
+ }
44602
+ };
44430
44603
  var flushOnFinish = (stream2, [throttled, flush]) => {
44431
44604
  stream2.on("end", flush).on("error", flush);
44432
44605
  return throttled;
@@ -44503,15 +44676,15 @@ var require_axios = __commonJS({
44503
44676
  }
44504
44677
  };
44505
44678
  var http2Sessions = new Http2Sessions();
44506
- function dispatchBeforeRedirect(options, responseDetails) {
44679
+ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
44507
44680
  if (options.beforeRedirects.proxy) {
44508
44681
  options.beforeRedirects.proxy(options);
44509
44682
  }
44510
44683
  if (options.beforeRedirects.config) {
44511
- options.beforeRedirects.config(options, responseDetails);
44684
+ options.beforeRedirects.config(options, responseDetails, requestDetails);
44512
44685
  }
44513
44686
  }
44514
- function setProxy(options, configProxy, location) {
44687
+ function setProxy(options, configProxy, location, isRedirect) {
44515
44688
  let proxy = configProxy;
44516
44689
  if (!proxy && proxy !== false) {
44517
44690
  const proxyUrl = getProxyForUrl(location);
@@ -44521,34 +44694,59 @@ var require_axios = __commonJS({
44521
44694
  }
44522
44695
  }
44523
44696
  }
44524
- if (proxy) {
44525
- if (proxy.username) {
44526
- proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
44697
+ if (isRedirect && options.headers) {
44698
+ for (const name of Object.keys(options.headers)) {
44699
+ if (name.toLowerCase() === "proxy-authorization") {
44700
+ delete options.headers[name];
44701
+ }
44527
44702
  }
44528
- if (proxy.auth) {
44529
- const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password);
44703
+ }
44704
+ if (proxy) {
44705
+ const isProxyURL = proxy instanceof URL;
44706
+ const readProxyField = (key) => isProxyURL || utils$1.hasOwnProp(proxy, key) ? proxy[key] : void 0;
44707
+ const proxyUsername = readProxyField("username");
44708
+ const proxyPassword = readProxyField("password");
44709
+ let proxyAuth = utils$1.hasOwnProp(proxy, "auth") ? proxy.auth : void 0;
44710
+ if (proxyUsername) {
44711
+ proxyAuth = (proxyUsername || "") + ":" + (proxyPassword || "");
44712
+ }
44713
+ if (proxyAuth) {
44714
+ const authIsObject = typeof proxyAuth === "object";
44715
+ const authUsername = authIsObject && utils$1.hasOwnProp(proxyAuth, "username") ? proxyAuth.username : void 0;
44716
+ const authPassword = authIsObject && utils$1.hasOwnProp(proxyAuth, "password") ? proxyAuth.password : void 0;
44717
+ const validProxyAuth = Boolean(authUsername || authPassword);
44530
44718
  if (validProxyAuth) {
44531
- proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
44532
- } else if (typeof proxy.auth === "object") {
44719
+ proxyAuth = (authUsername || "") + ":" + (authPassword || "");
44720
+ } else if (authIsObject) {
44533
44721
  throw new AxiosError("Invalid proxy authorization", AxiosError.ERR_BAD_OPTION, {
44534
44722
  proxy
44535
44723
  });
44536
44724
  }
44537
- const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
44725
+ const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
44538
44726
  options.headers["Proxy-Authorization"] = "Basic " + base64;
44539
44727
  }
44540
- options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
44541
- const proxyHost = proxy.hostname || proxy.host;
44728
+ let hasUserHostHeader = false;
44729
+ for (const name of Object.keys(options.headers)) {
44730
+ if (name.toLowerCase() === "host") {
44731
+ hasUserHostHeader = true;
44732
+ break;
44733
+ }
44734
+ }
44735
+ if (!hasUserHostHeader) {
44736
+ options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
44737
+ }
44738
+ const proxyHost = readProxyField("hostname") || readProxyField("host");
44542
44739
  options.hostname = proxyHost;
44543
44740
  options.host = proxyHost;
44544
- options.port = proxy.port;
44741
+ options.port = readProxyField("port");
44545
44742
  options.path = location;
44546
- if (proxy.protocol) {
44547
- options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
44743
+ const proxyProtocol = readProxyField("protocol");
44744
+ if (proxyProtocol) {
44745
+ options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
44548
44746
  }
44549
44747
  }
44550
44748
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
44551
- setProxy(redirectOptions, configProxy, redirectOptions.href);
44749
+ setProxy(redirectOptions, configProxy, redirectOptions.href, true);
44552
44750
  };
44553
44751
  }
44554
44752
  var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
@@ -44625,21 +44823,20 @@ var require_axios = __commonJS({
44625
44823
  };
44626
44824
  var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
44627
44825
  return wrapAsync2(async function dispatchHttpRequest(resolve2, reject2, onDone) {
44628
- let {
44629
- data,
44630
- lookup,
44631
- family,
44632
- httpVersion = 1,
44633
- http2Options
44634
- } = config;
44635
- const {
44636
- responseType,
44637
- responseEncoding
44638
- } = config;
44826
+ const own2 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
44827
+ let data = own2("data");
44828
+ let lookup = own2("lookup");
44829
+ let family = own2("family");
44830
+ let httpVersion = own2("httpVersion");
44831
+ if (httpVersion === void 0) httpVersion = 1;
44832
+ let http2Options = own2("http2Options");
44833
+ const responseType = own2("responseType");
44834
+ const responseEncoding = own2("responseEncoding");
44639
44835
  const method = config.method.toUpperCase();
44640
44836
  let isDone;
44641
44837
  let rejected = false;
44642
44838
  let req;
44839
+ let connectPhaseTimer;
44643
44840
  httpVersion = +httpVersion;
44644
44841
  if (Number.isNaN(httpVersion)) {
44645
44842
  throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
@@ -44668,8 +44865,23 @@ var require_axios = __commonJS({
44668
44865
  console.warn("emit error", err);
44669
44866
  }
44670
44867
  }
44868
+ function clearConnectPhaseTimer() {
44869
+ if (connectPhaseTimer) {
44870
+ clearTimeout(connectPhaseTimer);
44871
+ connectPhaseTimer = null;
44872
+ }
44873
+ }
44874
+ function createTimeoutError() {
44875
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
44876
+ const transitional = config.transitional || transitionalDefaults;
44877
+ if (config.timeoutErrorMessage) {
44878
+ timeoutErrorMessage = config.timeoutErrorMessage;
44879
+ }
44880
+ return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
44881
+ }
44671
44882
  abortEmitter.once("abort", reject2);
44672
44883
  const onFinished = () => {
44884
+ clearConnectPhaseTimer();
44673
44885
  if (config.cancelToken) {
44674
44886
  config.cancelToken.unsubscribe(abort);
44675
44887
  }
@@ -44686,6 +44898,7 @@ var require_axios = __commonJS({
44686
44898
  }
44687
44899
  onDone((response, isRejected) => {
44688
44900
  isDone = true;
44901
+ clearConnectPhaseTimer();
44689
44902
  if (isRejected) {
44690
44903
  rejected = true;
44691
44904
  onFinished();
@@ -44766,8 +44979,8 @@ var require_axios = __commonJS({
44766
44979
  tag: `axios-${VERSION}-boundary`,
44767
44980
  boundary: userBoundary && userBoundary[1] || void 0
44768
44981
  });
44769
- } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
44770
- headers.set(data.getHeaders());
44982
+ } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
44983
+ setFormDataHeaders$1(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
44771
44984
  if (!headers.hasContentLength()) {
44772
44985
  try {
44773
44986
  const knownLength = await util.promisify(data.getLength).call(data);
@@ -44812,20 +45025,21 @@ var require_axios = __commonJS({
44812
45025
  onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
44813
45026
  }
44814
45027
  let auth = void 0;
44815
- if (config.auth) {
44816
- const username = config.auth.username || "";
44817
- const password = config.auth.password || "";
45028
+ const configAuth = own2("auth");
45029
+ if (configAuth) {
45030
+ const username = configAuth.username || "";
45031
+ const password = configAuth.password || "";
44818
45032
  auth = username + ":" + password;
44819
45033
  }
44820
45034
  if (!auth && parsed.username) {
44821
- const urlUsername = parsed.username;
44822
- const urlPassword = parsed.password;
45035
+ const urlUsername = decodeURIComponentSafe(parsed.username);
45036
+ const urlPassword = decodeURIComponentSafe(parsed.password);
44823
45037
  auth = urlUsername + ":" + urlPassword;
44824
45038
  }
44825
45039
  auth && headers.delete("authorization");
44826
- let path;
45040
+ let path$1;
44827
45041
  try {
44828
- path = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
45042
+ path$1 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
44829
45043
  } catch (err) {
44830
45044
  const customErr = new Error(err.message);
44831
45045
  customErr.config = config;
@@ -44834,8 +45048,8 @@ var require_axios = __commonJS({
44834
45048
  return reject2(customErr);
44835
45049
  }
44836
45050
  headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
44837
- const options = {
44838
- path,
45051
+ const options = Object.assign(/* @__PURE__ */ Object.create(null), {
45052
+ path: path$1,
44839
45053
  method,
44840
45054
  headers: headers.toJSON(),
44841
45055
  agents: {
@@ -44846,11 +45060,22 @@ var require_axios = __commonJS({
44846
45060
  protocol,
44847
45061
  family,
44848
45062
  beforeRedirect: dispatchBeforeRedirect,
44849
- beforeRedirects: {},
45063
+ beforeRedirects: /* @__PURE__ */ Object.create(null),
44850
45064
  http2Options
44851
- };
45065
+ });
44852
45066
  !utils$1.isUndefined(lookup) && (options.lookup = lookup);
44853
45067
  if (config.socketPath) {
45068
+ if (typeof config.socketPath !== "string") {
45069
+ return reject2(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
45070
+ }
45071
+ if (config.allowedSocketPaths != null) {
45072
+ const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
45073
+ const resolvedSocket = path.resolve(config.socketPath);
45074
+ const isAllowed = allowed.some((entry) => typeof entry === "string" && path.resolve(entry) === resolvedSocket);
45075
+ if (!isAllowed) {
45076
+ return reject2(new AxiosError(`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
45077
+ }
45078
+ }
44854
45079
  options.socketPath = config.socketPath;
44855
45080
  } else {
44856
45081
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
@@ -44858,21 +45083,25 @@ var require_axios = __commonJS({
44858
45083
  setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
44859
45084
  }
44860
45085
  let transport;
45086
+ let isNativeTransport = false;
44861
45087
  const isHttpsRequest = isHttps.test(options.protocol);
44862
45088
  options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
44863
45089
  if (isHttp2) {
44864
45090
  transport = http2Transport;
44865
45091
  } else {
44866
- if (config.transport) {
44867
- transport = config.transport;
45092
+ const configTransport = own2("transport");
45093
+ if (configTransport) {
45094
+ transport = configTransport;
44868
45095
  } else if (config.maxRedirects === 0) {
44869
45096
  transport = isHttpsRequest ? https : http;
45097
+ isNativeTransport = true;
44870
45098
  } else {
44871
45099
  if (config.maxRedirects) {
44872
45100
  options.maxRedirects = config.maxRedirects;
44873
45101
  }
44874
- if (config.beforeRedirect) {
44875
- options.beforeRedirects.config = config.beforeRedirect;
45102
+ const configBeforeRedirect = own2("beforeRedirect");
45103
+ if (configBeforeRedirect) {
45104
+ options.beforeRedirects.config = configBeforeRedirect;
44876
45105
  }
44877
45106
  transport = isHttpsRequest ? httpsFollow : httpFollow;
44878
45107
  }
@@ -44882,10 +45111,9 @@ var require_axios = __commonJS({
44882
45111
  } else {
44883
45112
  options.maxBodyLength = Infinity;
44884
45113
  }
44885
- if (config.insecureHTTPParser) {
44886
- options.insecureHTTPParser = config.insecureHTTPParser;
44887
- }
45114
+ options.insecureHTTPParser = Boolean(own2("insecureHTTPParser"));
44888
45115
  req = transport.request(options, function handleResponse(res) {
45116
+ clearConnectPhaseTimer();
44889
45117
  if (req.destroyed) return;
44890
45118
  const streams = [res];
44891
45119
  const responseLength = utils$1.toFiniteNumber(res.headers["content-length"]);
@@ -44932,6 +45160,23 @@ var require_axios = __commonJS({
44932
45160
  request: lastRequest
44933
45161
  };
44934
45162
  if (responseType === "stream") {
45163
+ if (config.maxContentLength > -1) {
45164
+ const limit = config.maxContentLength;
45165
+ const source = responseStream;
45166
+ async function* enforceMaxContentLength() {
45167
+ let totalResponseBytes = 0;
45168
+ for await (const chunk of source) {
45169
+ totalResponseBytes += chunk.length;
45170
+ if (totalResponseBytes > limit) {
45171
+ throw new AxiosError("maxContentLength size of " + limit + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
45172
+ }
45173
+ yield chunk;
45174
+ }
45175
+ }
45176
+ responseStream = stream.Readable.from(enforceMaxContentLength(), {
45177
+ objectMode: false
45178
+ });
45179
+ }
44935
45180
  response.data = responseStream;
44936
45181
  settle(resolve2, reject2, response);
44937
45182
  } else {
@@ -44950,13 +45195,13 @@ var require_axios = __commonJS({
44950
45195
  if (rejected) {
44951
45196
  return;
44952
45197
  }
44953
- const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
45198
+ const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest, response);
44954
45199
  responseStream.destroy(err);
44955
45200
  reject2(err);
44956
45201
  });
44957
45202
  responseStream.on("error", function handleStreamError(err) {
44958
- if (req.destroyed) return;
44959
- reject2(AxiosError.from(err, null, config, lastRequest));
45203
+ if (rejected) return;
45204
+ reject2(AxiosError.from(err, null, config, lastRequest, response));
44960
45205
  });
44961
45206
  responseStream.on("end", function handleStreamEnd() {
44962
45207
  try {
@@ -44991,8 +45236,29 @@ var require_axios = __commonJS({
44991
45236
  req.on("error", function handleRequestError(err) {
44992
45237
  reject2(AxiosError.from(err, null, config, req));
44993
45238
  });
45239
+ const boundSockets = /* @__PURE__ */ new Set();
44994
45240
  req.on("socket", function handleRequestSocket(socket) {
44995
45241
  socket.setKeepAlive(true, 1e3 * 60);
45242
+ if (!socket[kAxiosSocketListener]) {
45243
+ socket.on("error", function handleSocketError(err) {
45244
+ const current = socket[kAxiosCurrentReq];
45245
+ if (current && !current.destroyed) {
45246
+ current.destroy(err);
45247
+ }
45248
+ });
45249
+ socket[kAxiosSocketListener] = true;
45250
+ }
45251
+ socket[kAxiosCurrentReq] = req;
45252
+ boundSockets.add(socket);
45253
+ });
45254
+ req.once("close", function clearCurrentReq() {
45255
+ clearConnectPhaseTimer();
45256
+ for (const socket of boundSockets) {
45257
+ if (socket[kAxiosCurrentReq] === req) {
45258
+ socket[kAxiosCurrentReq] = null;
45259
+ }
45260
+ }
45261
+ boundSockets.clear();
44996
45262
  });
44997
45263
  if (config.timeout) {
44998
45264
  const timeout2 = parseInt(config.timeout, 10);
@@ -45000,15 +45266,14 @@ var require_axios = __commonJS({
45000
45266
  abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
45001
45267
  return;
45002
45268
  }
45003
- req.setTimeout(timeout2, function handleRequestTimeout() {
45269
+ const handleTimeout = function handleTimeout2() {
45004
45270
  if (isDone) return;
45005
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
45006
- const transitional = config.transitional || transitionalDefaults;
45007
- if (config.timeoutErrorMessage) {
45008
- timeoutErrorMessage = config.timeoutErrorMessage;
45009
- }
45010
- abort(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req));
45011
- });
45271
+ abort(createTimeoutError());
45272
+ };
45273
+ if (isNativeTransport && timeout2 > 0) {
45274
+ connectPhaseTimer = setTimeout(handleTimeout, timeout2);
45275
+ }
45276
+ req.setTimeout(timeout2, handleTimeout);
45012
45277
  } else {
45013
45278
  req.setTimeout(0);
45014
45279
  }
@@ -45027,7 +45292,24 @@ var require_axios = __commonJS({
45027
45292
  abort(new CanceledError("Request stream has been aborted", config, req));
45028
45293
  }
45029
45294
  });
45030
- data.pipe(req);
45295
+ let uploadStream = data;
45296
+ if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
45297
+ const limit = config.maxBodyLength;
45298
+ let bytesSent = 0;
45299
+ uploadStream = stream.pipeline([data, new stream.Transform({
45300
+ transform(chunk, _enc, cb) {
45301
+ bytesSent += chunk.length;
45302
+ if (bytesSent > limit) {
45303
+ return cb(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, req));
45304
+ }
45305
+ cb(null, chunk);
45306
+ }
45307
+ })], utils$1.noop);
45308
+ uploadStream.on("error", (err) => {
45309
+ if (!req.destroyed) req.destroy(err);
45310
+ });
45311
+ }
45312
+ uploadStream.pipe(req);
45031
45313
  } else {
45032
45314
  data && req.write(data);
45033
45315
  req.end();
@@ -45041,14 +45323,14 @@ var require_axios = __commonJS({
45041
45323
  var cookies = platform.hasStandardBrowserEnv ? (
45042
45324
  // Standard browser envs support document.cookie
45043
45325
  {
45044
- write(name, value, expires, path, domain, secure, sameSite) {
45326
+ write(name, value, expires, path2, domain, secure, sameSite) {
45045
45327
  if (typeof document === "undefined") return;
45046
45328
  const cookie = [`${name}=${encodeURIComponent(value)}`];
45047
45329
  if (utils$1.isNumber(expires)) {
45048
45330
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
45049
45331
  }
45050
- if (utils$1.isString(path)) {
45051
- cookie.push(`path=${path}`);
45332
+ if (utils$1.isString(path2)) {
45333
+ cookie.push(`path=${path2}`);
45052
45334
  }
45053
45335
  if (utils$1.isString(domain)) {
45054
45336
  cookie.push(`domain=${domain}`);
@@ -45063,8 +45345,15 @@ var require_axios = __commonJS({
45063
45345
  },
45064
45346
  read(name) {
45065
45347
  if (typeof document === "undefined") return null;
45066
- const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
45067
- return match ? decodeURIComponent(match[1]) : null;
45348
+ const cookies2 = document.cookie.split(";");
45349
+ for (let i = 0; i < cookies2.length; i++) {
45350
+ const cookie = cookies2[i].replace(/^\s+/, "");
45351
+ const eq = cookie.indexOf("=");
45352
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
45353
+ return decodeURIComponent(cookie.slice(eq + 1));
45354
+ }
45355
+ }
45356
+ return null;
45068
45357
  },
45069
45358
  remove(name) {
45070
45359
  this.write(name, "", Date.now() - 864e5, "/");
@@ -45087,7 +45376,16 @@ var require_axios = __commonJS({
45087
45376
  } : thing;
45088
45377
  function mergeConfig(config1, config2) {
45089
45378
  config2 = config2 || {};
45090
- const config = {};
45379
+ const config = /* @__PURE__ */ Object.create(null);
45380
+ Object.defineProperty(config, "hasOwnProperty", {
45381
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
45382
+ // this data descriptor into an accessor descriptor on the way in.
45383
+ __proto__: null,
45384
+ value: Object.prototype.hasOwnProperty,
45385
+ enumerable: false,
45386
+ writable: true,
45387
+ configurable: true
45388
+ });
45091
45389
  function getMergedValue(target, source, prop, caseless) {
45092
45390
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
45093
45391
  return utils$1.merge.call({
@@ -45120,9 +45418,9 @@ var require_axios = __commonJS({
45120
45418
  }
45121
45419
  }
45122
45420
  function mergeDirectKeys(a, b, prop) {
45123
- if (prop in config2) {
45421
+ if (utils$1.hasOwnProp(config2, prop)) {
45124
45422
  return getMergedValue(a, b);
45125
- } else if (prop in config1) {
45423
+ } else if (utils$1.hasOwnProp(config1, prop)) {
45126
45424
  return getMergedValue(void 0, a);
45127
45425
  }
45128
45426
  }
@@ -45153,6 +45451,7 @@ var require_axios = __commonJS({
45153
45451
  httpsAgent: defaultToConfig2,
45154
45452
  cancelToken: defaultToConfig2,
45155
45453
  socketPath: defaultToConfig2,
45454
+ allowedSocketPaths: defaultToConfig2,
45156
45455
  responseEncoding: defaultToConfig2,
45157
45456
  validateStatus: mergeDirectKeys,
45158
45457
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
@@ -45163,42 +45462,56 @@ var require_axios = __commonJS({
45163
45462
  }), function computeConfigValue(prop) {
45164
45463
  if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
45165
45464
  const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
45166
- const configValue = merge2(config1[prop], config2[prop], prop);
45465
+ const a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : void 0;
45466
+ const b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : void 0;
45467
+ const configValue = merge2(a, b, prop);
45167
45468
  utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
45168
45469
  });
45169
45470
  return config;
45170
45471
  }
45472
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
45473
+ function setFormDataHeaders(headers, formHeaders, policy) {
45474
+ if (policy !== "content-only") {
45475
+ headers.set(formHeaders);
45476
+ return;
45477
+ }
45478
+ Object.entries(formHeaders).forEach(([key, val]) => {
45479
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
45480
+ headers.set(key, val);
45481
+ }
45482
+ });
45483
+ }
45484
+ var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
45171
45485
  var resolveConfig = (config) => {
45172
45486
  const newConfig = mergeConfig({}, config);
45173
- let {
45174
- data,
45175
- withXSRFToken,
45176
- xsrfHeaderName,
45177
- xsrfCookieName,
45178
- headers,
45179
- auth
45180
- } = newConfig;
45487
+ const own2 = (key) => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
45488
+ const data = own2("data");
45489
+ let withXSRFToken = own2("withXSRFToken");
45490
+ const xsrfHeaderName = own2("xsrfHeaderName");
45491
+ const xsrfCookieName = own2("xsrfCookieName");
45492
+ let headers = own2("headers");
45493
+ const auth = own2("auth");
45494
+ const baseURL = own2("baseURL");
45495
+ const allowAbsoluteUrls = own2("allowAbsoluteUrls");
45496
+ const url2 = own2("url");
45181
45497
  newConfig.headers = headers = AxiosHeaders.from(headers);
45182
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
45498
+ newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls), config.params, config.paramsSerializer);
45183
45499
  if (auth) {
45184
- headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
45500
+ headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : "")));
45185
45501
  }
45186
45502
  if (utils$1.isFormData(data)) {
45187
45503
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
45188
45504
  headers.setContentType(void 0);
45189
45505
  } else if (utils$1.isFunction(data.getHeaders)) {
45190
- const formHeaders = data.getHeaders();
45191
- const allowedHeaders = ["content-type", "content-length"];
45192
- Object.entries(formHeaders).forEach(([key, val]) => {
45193
- if (allowedHeaders.includes(key.toLowerCase())) {
45194
- headers.set(key, val);
45195
- }
45196
- });
45506
+ setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
45197
45507
  }
45198
45508
  }
45199
45509
  if (platform.hasStandardBrowserEnv) {
45200
- withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
45201
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
45510
+ if (utils$1.isFunction(withXSRFToken)) {
45511
+ withXSRFToken = withXSRFToken(newConfig);
45512
+ }
45513
+ const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin(newConfig.url);
45514
+ if (shouldSendXSRF) {
45202
45515
  const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
45203
45516
  if (xsrfValue) {
45204
45517
  headers.set(xsrfHeaderName, xsrfValue);
@@ -45260,7 +45573,7 @@ var require_axios = __commonJS({
45260
45573
  if (!request || request.readyState !== 4) {
45261
45574
  return;
45262
45575
  }
45263
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
45576
+ if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
45264
45577
  return;
45265
45578
  }
45266
45579
  setTimeout(onloadend);
@@ -45271,6 +45584,7 @@ var require_axios = __commonJS({
45271
45584
  return;
45272
45585
  }
45273
45586
  reject2(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
45587
+ done();
45274
45588
  request = null;
45275
45589
  };
45276
45590
  request.onerror = function handleError(event) {
@@ -45278,6 +45592,7 @@ var require_axios = __commonJS({
45278
45592
  const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
45279
45593
  err.event = event || null;
45280
45594
  reject2(err);
45595
+ done();
45281
45596
  request = null;
45282
45597
  };
45283
45598
  request.ontimeout = function handleTimeout() {
@@ -45287,6 +45602,7 @@ var require_axios = __commonJS({
45287
45602
  timeoutErrorMessage = _config.timeoutErrorMessage;
45288
45603
  }
45289
45604
  reject2(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
45605
+ done();
45290
45606
  request = null;
45291
45607
  };
45292
45608
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -45317,6 +45633,7 @@ var require_axios = __commonJS({
45317
45633
  }
45318
45634
  reject2(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
45319
45635
  request.abort();
45636
+ done();
45320
45637
  request = null;
45321
45638
  };
45322
45639
  _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
@@ -45325,7 +45642,7 @@ var require_axios = __commonJS({
45325
45642
  }
45326
45643
  }
45327
45644
  const protocol = parseProtocol(_config.url);
45328
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
45645
+ if (protocol && !platform.protocols.includes(protocol)) {
45329
45646
  reject2(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
45330
45647
  return;
45331
45648
  }
@@ -45454,17 +45771,6 @@ var require_axios = __commonJS({
45454
45771
  var {
45455
45772
  isFunction
45456
45773
  } = utils$1;
45457
- var globalFetchAPI = (({
45458
- Request,
45459
- Response
45460
- }) => ({
45461
- Request,
45462
- Response
45463
- }))(utils$1.global);
45464
- var {
45465
- ReadableStream: ReadableStream$1,
45466
- TextEncoder: TextEncoder$1
45467
- } = utils$1.global;
45468
45774
  var test = (fn, ...args) => {
45469
45775
  try {
45470
45776
  return !!fn(...args);
@@ -45473,9 +45779,18 @@ var require_axios = __commonJS({
45473
45779
  }
45474
45780
  };
45475
45781
  var factory = (env) => {
45782
+ var _utils$global;
45783
+ const globalObject = (_utils$global = utils$1.global) !== null && _utils$global !== void 0 ? _utils$global : globalThis;
45784
+ const {
45785
+ ReadableStream: ReadableStream2,
45786
+ TextEncoder: TextEncoder2
45787
+ } = globalObject;
45476
45788
  env = utils$1.merge.call({
45477
45789
  skipUndefined: true
45478
- }, globalFetchAPI, env);
45790
+ }, {
45791
+ Request: globalObject.Request,
45792
+ Response: globalObject.Response
45793
+ }, env);
45479
45794
  const {
45480
45795
  fetch: envFetch,
45481
45796
  Request,
@@ -45487,20 +45802,22 @@ var require_axios = __commonJS({
45487
45802
  if (!isFetchSupported) {
45488
45803
  return false;
45489
45804
  }
45490
- const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
45491
- const encodeText = isFetchSupported && (typeof TextEncoder$1 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
45805
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream2);
45806
+ const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
45492
45807
  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
45493
45808
  let duplexAccessed = false;
45494
- const body = new ReadableStream$1();
45495
- const hasContentType = new Request(platform.origin, {
45496
- body,
45809
+ const request = new Request(platform.origin, {
45810
+ body: new ReadableStream2(),
45497
45811
  method: "POST",
45498
45812
  get duplex() {
45499
45813
  duplexAccessed = true;
45500
45814
  return "half";
45501
45815
  }
45502
- }).headers.has("Content-Type");
45503
- body.cancel();
45816
+ });
45817
+ const hasContentType = request.headers.has("Content-Type");
45818
+ if (request.body != null) {
45819
+ request.body.cancel();
45820
+ }
45504
45821
  return duplexAccessed && !hasContentType;
45505
45822
  });
45506
45823
  const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
@@ -45559,8 +45876,12 @@ var require_axios = __commonJS({
45559
45876
  responseType,
45560
45877
  headers,
45561
45878
  withCredentials = "same-origin",
45562
- fetchOptions
45879
+ fetchOptions,
45880
+ maxContentLength,
45881
+ maxBodyLength
45563
45882
  } = resolveConfig(config);
45883
+ const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
45884
+ const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
45564
45885
  let _fetch = envFetch || fetch;
45565
45886
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
45566
45887
  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout2);
@@ -45570,6 +45891,18 @@ var require_axios = __commonJS({
45570
45891
  });
45571
45892
  let requestContentLength;
45572
45893
  try {
45894
+ if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
45895
+ const estimated = estimateDataURLDecodedBytes(url2);
45896
+ if (estimated > maxContentLength) {
45897
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
45898
+ }
45899
+ }
45900
+ if (hasMaxBodyLength && method !== "get" && method !== "head") {
45901
+ const outboundLength = await resolveBodyLength(headers, data);
45902
+ if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
45903
+ throw new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
45904
+ }
45905
+ }
45573
45906
  if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
45574
45907
  let _request = new Request(url2, {
45575
45908
  method: "POST",
@@ -45589,6 +45922,13 @@ var require_axios = __commonJS({
45589
45922
  withCredentials = withCredentials ? "include" : "omit";
45590
45923
  }
45591
45924
  const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
45925
+ if (utils$1.isFormData(data)) {
45926
+ const contentType = headers.getContentType();
45927
+ if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
45928
+ headers.delete("content-type");
45929
+ }
45930
+ }
45931
+ headers.set("User-Agent", "axios/" + VERSION, false);
45592
45932
  const resolvedOptions = {
45593
45933
  ...fetchOptions,
45594
45934
  signal: composedSignal,
@@ -45600,21 +45940,52 @@ var require_axios = __commonJS({
45600
45940
  };
45601
45941
  request = isRequestSupported && new Request(url2, resolvedOptions);
45602
45942
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
45943
+ if (hasMaxContentLength) {
45944
+ const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
45945
+ if (declaredLength != null && declaredLength > maxContentLength) {
45946
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
45947
+ }
45948
+ }
45603
45949
  const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
45604
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
45950
+ if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
45605
45951
  const options = {};
45606
45952
  ["status", "statusText", "headers"].forEach((prop) => {
45607
45953
  options[prop] = response[prop];
45608
45954
  });
45609
45955
  const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
45610
45956
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
45611
- response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
45957
+ let bytesRead = 0;
45958
+ const onChunkProgress = (loadedBytes) => {
45959
+ if (hasMaxContentLength) {
45960
+ bytesRead = loadedBytes;
45961
+ if (bytesRead > maxContentLength) {
45962
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
45963
+ }
45964
+ }
45965
+ onProgress && onProgress(loadedBytes);
45966
+ };
45967
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
45612
45968
  flush && flush();
45613
45969
  unsubscribe && unsubscribe();
45614
45970
  }), options);
45615
45971
  }
45616
45972
  responseType = responseType || "text";
45617
45973
  let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
45974
+ if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
45975
+ let materializedSize;
45976
+ if (responseData != null) {
45977
+ if (typeof responseData.byteLength === "number") {
45978
+ materializedSize = responseData.byteLength;
45979
+ } else if (typeof responseData.size === "number") {
45980
+ materializedSize = responseData.size;
45981
+ } else if (typeof responseData === "string") {
45982
+ materializedSize = typeof TextEncoder2 === "function" ? new TextEncoder2().encode(responseData).byteLength : responseData.length;
45983
+ }
45984
+ }
45985
+ if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
45986
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
45987
+ }
45988
+ }
45618
45989
  !isStreamResponse && unsubscribe && unsubscribe();
45619
45990
  return await new Promise((resolve2, reject2) => {
45620
45991
  settle(resolve2, reject2, {
@@ -45628,6 +45999,13 @@ var require_axios = __commonJS({
45628
45999
  });
45629
46000
  } catch (err) {
45630
46001
  unsubscribe && unsubscribe();
46002
+ if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {
46003
+ const canceledError = composedSignal.reason;
46004
+ canceledError.config = config;
46005
+ request && (canceledError.request = request);
46006
+ err !== canceledError && (canceledError.cause = err);
46007
+ throw canceledError;
46008
+ }
45631
46009
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
45632
46010
  throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), {
45633
46011
  cause: err.cause || err
@@ -45667,11 +46045,13 @@ var require_axios = __commonJS({
45667
46045
  if (fn) {
45668
46046
  try {
45669
46047
  Object.defineProperty(fn, "name", {
46048
+ __proto__: null,
45670
46049
  value
45671
46050
  });
45672
46051
  } catch (e) {
45673
46052
  }
45674
46053
  Object.defineProperty(fn, "adapterName", {
46054
+ __proto__: null,
45675
46055
  value
45676
46056
  });
45677
46057
  }
@@ -45738,14 +46118,24 @@ var require_axios = __commonJS({
45738
46118
  const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
45739
46119
  return adapter(config).then(function onAdapterResolution(response) {
45740
46120
  throwIfCancellationRequested(config);
45741
- response.data = transformData.call(config, config.transformResponse, response);
46121
+ config.response = response;
46122
+ try {
46123
+ response.data = transformData.call(config, config.transformResponse, response);
46124
+ } finally {
46125
+ delete config.response;
46126
+ }
45742
46127
  response.headers = AxiosHeaders.from(response.headers);
45743
46128
  return response;
45744
46129
  }, function onAdapterRejection(reason) {
45745
46130
  if (!isCancel(reason)) {
45746
46131
  throwIfCancellationRequested(config);
45747
46132
  if (reason && reason.response) {
45748
- reason.response.data = transformData.call(config, config.transformResponse, reason.response);
46133
+ config.response = reason.response;
46134
+ try {
46135
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
46136
+ } finally {
46137
+ delete config.response;
46138
+ }
45749
46139
  reason.response.headers = AxiosHeaders.from(reason.response.headers);
45750
46140
  }
45751
46141
  }
@@ -45788,7 +46178,7 @@ var require_axios = __commonJS({
45788
46178
  let i = keys.length;
45789
46179
  while (i-- > 0) {
45790
46180
  const opt = keys[i];
45791
- const validator2 = schema[opt];
46181
+ const validator2 = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0;
45792
46182
  if (validator2) {
45793
46183
  const value = options[opt];
45794
46184
  const result = value === void 0 || validator2(value, opt, options);
@@ -45899,7 +46289,7 @@ var require_axios = __commonJS({
45899
46289
  }, true);
45900
46290
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
45901
46291
  let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
45902
- headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
46292
+ headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
45903
46293
  delete headers[method];
45904
46294
  });
45905
46295
  config.headers = AxiosHeaders.concat(contextHeaders, headers);
@@ -45975,7 +46365,7 @@ var require_axios = __commonJS({
45975
46365
  }));
45976
46366
  };
45977
46367
  });
45978
- utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
46368
+ utils$1.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
45979
46369
  function generateHTTPMethod(isForm) {
45980
46370
  return function httpMethod(url2, data, config) {
45981
46371
  return this.request(mergeConfig(config || {}, {
@@ -45989,7 +46379,9 @@ var require_axios = __commonJS({
45989
46379
  };
45990
46380
  }
45991
46381
  Axios.prototype[method] = generateHTTPMethod();
45992
- Axios.prototype[method + "Form"] = generateHTTPMethod(true);
46382
+ if (method !== "query") {
46383
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
46384
+ }
45993
46385
  });
45994
46386
  var CancelToken = class _CancelToken {
45995
46387
  constructor(executor) {
@@ -61652,7 +62044,7 @@ mime-types/index.js:
61652
62044
  *)
61653
62045
 
61654
62046
  axios/dist/node/axios.cjs:
61655
- (*! Axios v1.15.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
62047
+ (*! Axios v1.16.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
61656
62048
 
61657
62049
  repeat-string/index.js:
61658
62050
  (*!