aws-ec2-instance-running-scheduler 3.1.9 → 3.1.11

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.
@@ -6,7 +6,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ try {
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
+ } catch (e) {
12
+ throw mod = 0, e;
13
+ }
10
14
  };
11
15
  var __export = (target, all) => {
12
16
  for (var name in all)
@@ -10908,6 +10912,9 @@ var require_form_data = __commonJS({
10908
10912
  var setToStringTag = require_es_set_tostringtag();
10909
10913
  var hasOwn = require_hasown();
10910
10914
  var populate = require_populate();
10915
+ function escapeHeaderParam(str) {
10916
+ return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
10917
+ }
10911
10918
  function FormData2(options) {
10912
10919
  if (!(this instanceof FormData2)) {
10913
10920
  return new FormData2(options);
@@ -10997,7 +11004,7 @@ var require_form_data = __commonJS({
10997
11004
  var contents = "";
10998
11005
  var headers = {
10999
11006
  // add custom disposition as third element or keep it two elements if not
11000
- "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
11007
+ "Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
11001
11008
  // if no content type. allow it to be empty array
11002
11009
  "Content-Type": [].concat(contentType || [])
11003
11010
  };
@@ -11031,7 +11038,7 @@ var require_form_data = __commonJS({
11031
11038
  filename = path.basename(value.client._httpMessage.path || "");
11032
11039
  }
11033
11040
  if (filename) {
11034
- return 'filename="' + filename + '"';
11041
+ return 'filename="' + escapeHeaderParam(filename) + '"';
11035
11042
  }
11036
11043
  };
11037
11044
  FormData2.prototype._getContentType = function(value, options) {
@@ -12992,6 +12999,25 @@ var require_axios = __commonJS({
12992
12999
  iterator,
12993
13000
  toStringTag
12994
13001
  } = Symbol;
13002
+ var hasOwnProperty = (({
13003
+ hasOwnProperty: hasOwnProperty2
13004
+ }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
13005
+ var hasOwnInPrototypeChain = (thing, prop) => {
13006
+ let obj = thing;
13007
+ const seen = [];
13008
+ while (obj != null && obj !== Object.prototype) {
13009
+ if (seen.indexOf(obj) !== -1) {
13010
+ return false;
13011
+ }
13012
+ seen.push(obj);
13013
+ if (hasOwnProperty(obj, prop)) {
13014
+ return true;
13015
+ }
13016
+ obj = getPrototypeOf(obj);
13017
+ }
13018
+ return false;
13019
+ };
13020
+ var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
12995
13021
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
12996
13022
  const str = toString.call(thing);
12997
13023
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -13024,11 +13050,14 @@ var require_axios = __commonJS({
13024
13050
  var isObject = (thing) => thing !== null && typeof thing === "object";
13025
13051
  var isBoolean = (thing) => thing === true || thing === false;
13026
13052
  var isPlainObject = (val) => {
13027
- if (kindOf(val) !== "object") {
13053
+ if (!isObject(val)) {
13028
13054
  return false;
13029
13055
  }
13030
13056
  const prototype2 = getPrototypeOf(val);
13031
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
13057
+ return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
13058
+ // Symbol.iterator as evidence the value is a tagged/iterable type rather
13059
+ // than a plain object, while ignoring keys injected onto Object.prototype.
13060
+ !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
13032
13061
  };
13033
13062
  var isEmptyObject = (val) => {
13034
13063
  if (!isObject(val) || isBuffer(val)) {
@@ -13132,7 +13161,7 @@ var require_axios = __commonJS({
13132
13161
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
13133
13162
  return;
13134
13163
  }
13135
- const targetKey = caseless && findKey(result, key) || key;
13164
+ const targetKey = caseless && typeof key === "string" && findKey(result, key) || key;
13136
13165
  const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
13137
13166
  if (isPlainObject(existing) && isPlainObject(val)) {
13138
13167
  result[targetKey] = merge(existing, val);
@@ -13145,7 +13174,21 @@ var require_axios = __commonJS({
13145
13174
  }
13146
13175
  };
13147
13176
  for (let i = 0, l = objs.length; i < l; i++) {
13148
- objs[i] && forEach(objs[i], assignValue);
13177
+ const source = objs[i];
13178
+ if (!source || isBuffer(source)) {
13179
+ continue;
13180
+ }
13181
+ forEach(source, assignValue);
13182
+ if (typeof source !== "object" || isArray(source)) {
13183
+ continue;
13184
+ }
13185
+ const symbols = Object.getOwnPropertySymbols(source);
13186
+ for (let j = 0; j < symbols.length; j++) {
13187
+ const symbol = symbols[j];
13188
+ if (propertyIsEnumerable.call(source, symbol)) {
13189
+ assignValue(source[symbol], symbol);
13190
+ }
13191
+ }
13149
13192
  }
13150
13193
  return result;
13151
13194
  }
@@ -13267,9 +13310,9 @@ var require_axios = __commonJS({
13267
13310
  return p1.toUpperCase() + p2;
13268
13311
  });
13269
13312
  };
13270
- var hasOwnProperty = (({
13271
- hasOwnProperty: hasOwnProperty2
13272
- }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
13313
+ var {
13314
+ propertyIsEnumerable
13315
+ } = Object.prototype;
13273
13316
  var isRegExp = kindOfTest("RegExp");
13274
13317
  var reduceDescriptors = (obj, reducer) => {
13275
13318
  const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -13367,6 +13410,7 @@ var require_axios = __commonJS({
13367
13410
  })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
13368
13411
  var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
13369
13412
  var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
13413
+ var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
13370
13414
  var utils$1 = {
13371
13415
  isArray,
13372
13416
  isArrayBuffer,
@@ -13412,6 +13456,8 @@ var require_axios = __commonJS({
13412
13456
  hasOwnProperty,
13413
13457
  hasOwnProp: hasOwnProperty,
13414
13458
  // an alias to avoid ESLint no-prototype-builtins detection
13459
+ hasOwnInPrototypeChain,
13460
+ getSafeProp,
13415
13461
  reduceDescriptors,
13416
13462
  freezeMethods,
13417
13463
  toObjectSet,
@@ -13427,7 +13473,8 @@ var require_axios = __commonJS({
13427
13473
  isThenable,
13428
13474
  setImmediate: _setImmediate,
13429
13475
  asap,
13430
- isIterable
13476
+ isIterable,
13477
+ isSafeIterable
13431
13478
  };
13432
13479
  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"]);
13433
13480
  var parseHeaders = (rawHeaders) => {
@@ -13553,7 +13600,7 @@ var require_axios = __commonJS({
13553
13600
  function setHeader(_value, _header, _rewrite) {
13554
13601
  const lHeader = normalizeHeader(_header);
13555
13602
  if (!lHeader) {
13556
- throw new Error("header name must be a non-empty string");
13603
+ return;
13557
13604
  }
13558
13605
  const key = utils$1.findKey(self2, lHeader);
13559
13606
  if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
@@ -13565,13 +13612,19 @@ var require_axios = __commonJS({
13565
13612
  setHeaders(header, valueOrRewrite);
13566
13613
  } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
13567
13614
  setHeaders(parseHeaders(header), valueOrRewrite);
13568
- } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
13569
- let obj = {}, dest, key;
13615
+ } else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) {
13616
+ let obj = /* @__PURE__ */ Object.create(null), dest, key;
13570
13617
  for (const entry of header) {
13571
13618
  if (!utils$1.isArray(entry)) {
13572
- throw TypeError("Object iterator must return a key-value pair");
13619
+ throw new TypeError("Object iterator must return a key-value pair");
13620
+ }
13621
+ key = entry[0];
13622
+ if (utils$1.hasOwnProp(obj, key)) {
13623
+ dest = obj[key];
13624
+ obj[key] = utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
13625
+ } else {
13626
+ obj[key] = entry[1];
13573
13627
  }
13574
- obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
13575
13628
  }
13576
13629
  setHeaders(obj, valueOrRewrite);
13577
13630
  } else {
@@ -13853,6 +13906,7 @@ var require_axios = __commonJS({
13853
13906
  AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
13854
13907
  AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
13855
13908
  AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
13909
+ var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
13856
13910
  function isVisitable(thing) {
13857
13911
  return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
13858
13912
  }
@@ -13889,8 +13943,9 @@ var require_axios = __commonJS({
13889
13943
  const dots = options.dots;
13890
13944
  const indexes = options.indexes;
13891
13945
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
13892
- const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
13946
+ const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
13893
13947
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
13948
+ const stack = [];
13894
13949
  if (!utils$1.isFunction(visitor)) {
13895
13950
  throw new TypeError("visitor must be a function");
13896
13951
  }
@@ -13910,6 +13965,28 @@ var require_axios = __commonJS({
13910
13965
  }
13911
13966
  return value;
13912
13967
  }
13968
+ function throwIfMaxDepthExceeded(depth) {
13969
+ if (depth > maxDepth) {
13970
+ throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
13971
+ }
13972
+ }
13973
+ function stringifyWithDepthLimit(value, depth) {
13974
+ if (maxDepth === Infinity) {
13975
+ return JSON.stringify(value);
13976
+ }
13977
+ const ancestors = [];
13978
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
13979
+ if (!utils$1.isObject(currentValue)) {
13980
+ return currentValue;
13981
+ }
13982
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
13983
+ ancestors.pop();
13984
+ }
13985
+ ancestors.push(currentValue);
13986
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
13987
+ return currentValue;
13988
+ });
13989
+ }
13913
13990
  function defaultVisitor(value, key, path2) {
13914
13991
  let arr = value;
13915
13992
  if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
@@ -13919,7 +13996,7 @@ var require_axios = __commonJS({
13919
13996
  if (value && !path2 && typeof value === "object") {
13920
13997
  if (utils$1.endsWith(key, "{}")) {
13921
13998
  key = metaTokens ? key : key.slice(0, -2);
13922
- value = JSON.stringify(value);
13999
+ value = stringifyWithDepthLimit(value, 1);
13923
14000
  } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
13924
14001
  key = removeBrackets(key);
13925
14002
  arr.forEach(function each(el, index) {
@@ -13938,7 +14015,6 @@ var require_axios = __commonJS({
13938
14015
  formData.append(renderKey(path2, key, dots), convertValue(value));
13939
14016
  return false;
13940
14017
  }
13941
- const stack = [];
13942
14018
  const exposedHelpers = Object.assign(predicates, {
13943
14019
  defaultVisitor,
13944
14020
  convertValue,
@@ -13946,11 +14022,9 @@ var require_axios = __commonJS({
13946
14022
  });
13947
14023
  function build(value, path2, depth = 0) {
13948
14024
  if (utils$1.isUndefined(value)) return;
13949
- if (depth > maxDepth) {
13950
- throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
13951
- }
14025
+ throwIfMaxDepthExceeded(depth);
13952
14026
  if (stack.indexOf(value) !== -1) {
13953
- throw Error("Circular reference detected in " + path2.join("."));
14027
+ throw new Error("Circular reference detected in " + path2.join("."));
13954
14028
  }
13955
14029
  stack.push(value);
13956
14030
  utils$1.forEach(value, function each(el, key) {
@@ -14003,11 +14077,11 @@ var require_axios = __commonJS({
14003
14077
  if (!params) {
14004
14078
  return url2;
14005
14079
  }
14006
- const _encode = options && options.encode || encode;
14007
14080
  const _options = utils$1.isFunction(options) ? {
14008
14081
  serialize: options
14009
14082
  } : options;
14010
- const serializeFn = _options && _options.serialize;
14083
+ const _encode = utils$1.getSafeProp(_options, "encode") || encode;
14084
+ const serializeFn = utils$1.getSafeProp(_options, "serialize");
14011
14085
  let serializedParams;
14012
14086
  if (serializeFn) {
14013
14087
  serializedParams = serializeFn(params, _options);
@@ -14089,7 +14163,9 @@ var require_axios = __commonJS({
14089
14163
  silentJSONParsing: true,
14090
14164
  forcedJSONParsing: true,
14091
14165
  clarifyTimeoutError: false,
14092
- legacyInterceptorReqResOrdering: true
14166
+ legacyInterceptorReqResOrdering: true,
14167
+ advertiseZstdAcceptEncoding: false,
14168
+ validateStatusUndefinedResolves: true
14093
14169
  };
14094
14170
  var URLSearchParams = url.URLSearchParams;
14095
14171
  var ALPHA = "abcdefghijklmnopqrstuvwxyz";
@@ -14154,10 +14230,21 @@ var require_axios = __commonJS({
14154
14230
  ...options
14155
14231
  });
14156
14232
  }
14233
+ var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
14234
+ function throwIfDepthExceeded(index) {
14235
+ if (index > MAX_DEPTH) {
14236
+ throw new AxiosError("FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
14237
+ }
14238
+ }
14157
14239
  function parsePropPath(name) {
14158
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
14159
- return match[0] === "[]" ? "" : match[1] || match[0];
14160
- });
14240
+ const path2 = [];
14241
+ const pattern = /\w+|\[(\w*)]/g;
14242
+ let match;
14243
+ while ((match = pattern.exec(name)) !== null) {
14244
+ throwIfDepthExceeded(path2.length);
14245
+ path2.push(match[0] === "[]" ? "" : match[1] || match[0]);
14246
+ }
14247
+ return path2;
14161
14248
  }
14162
14249
  function arrayToObject(arr) {
14163
14250
  const obj = {};
@@ -14173,6 +14260,7 @@ var require_axios = __commonJS({
14173
14260
  }
14174
14261
  function formDataToJSON(formData) {
14175
14262
  function buildPath(path2, value, target, index) {
14263
+ throwIfDepthExceeded(index);
14176
14264
  let name = path2[index++];
14177
14265
  if (name === "__proto__") return true;
14178
14266
  const isNumericKey = Number.isFinite(+name);
@@ -14359,9 +14447,28 @@ var require_axios = __commonJS({
14359
14447
  function combineURLs(baseURL, relativeURL) {
14360
14448
  return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
14361
14449
  }
14362
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
14450
+ var malformedHttpProtocol = /^https?:(?!\/\/)/i;
14451
+ var httpProtocolControlCharacters = /[\t\n\r]/g;
14452
+ function stripLeadingC0ControlOrSpace(url2) {
14453
+ let i = 0;
14454
+ while (i < url2.length && url2.charCodeAt(i) <= 32) {
14455
+ i++;
14456
+ }
14457
+ return url2.slice(i);
14458
+ }
14459
+ function normalizeURLForProtocolCheck(url2) {
14460
+ return stripLeadingC0ControlOrSpace(url2).replace(httpProtocolControlCharacters, "");
14461
+ }
14462
+ function assertValidHttpProtocolURL(url2, config) {
14463
+ if (typeof url2 === "string" && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url2))) {
14464
+ throw new AxiosError('Invalid URL: missing "//" after protocol', AxiosError.ERR_INVALID_URL, config);
14465
+ }
14466
+ }
14467
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
14468
+ assertValidHttpProtocolURL(requestedURL, config);
14363
14469
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
14364
14470
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
14471
+ assertValidHttpProtocolURL(baseURL, config);
14365
14472
  return combineURLs(baseURL, requestedURL);
14366
14473
  }
14367
14474
  return requestedURL;
@@ -14431,7 +14538,7 @@ var require_axios = __commonJS({
14431
14538
  function getEnv(key) {
14432
14539
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
14433
14540
  }
14434
- var VERSION = "1.16.1";
14541
+ var VERSION = "1.18.0";
14435
14542
  function parseProtocol(url2) {
14436
14543
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
14437
14544
  return match && match[1] || "";
@@ -14648,10 +14755,10 @@ var require_axios = __commonJS({
14648
14755
  boundary = tag + "-" + platform.generateString(size, BOUNDARY_ALPHABET)
14649
14756
  } = options || {};
14650
14757
  if (!utils$1.isFormData(form)) {
14651
- throw TypeError("FormData instance required");
14758
+ throw new TypeError("FormData instance required");
14652
14759
  }
14653
14760
  if (boundary.length < 1 || boundary.length > 70) {
14654
- throw Error("boundary must be 1-70 characters long");
14761
+ throw new Error("boundary must be 1-70 characters long");
14655
14762
  }
14656
14763
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
14657
14764
  const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
@@ -14696,6 +14803,81 @@ var require_axios = __commonJS({
14696
14803
  this.__transform(chunk, encoding, callback);
14697
14804
  }
14698
14805
  };
14806
+ var Http2Sessions = class {
14807
+ constructor() {
14808
+ this.sessions = /* @__PURE__ */ Object.create(null);
14809
+ }
14810
+ getSession(authority, options) {
14811
+ options = Object.assign({
14812
+ sessionTimeout: 1e3
14813
+ }, options);
14814
+ let authoritySessions = this.sessions[authority];
14815
+ if (authoritySessions) {
14816
+ let len = authoritySessions.length;
14817
+ for (let i = 0; i < len; i++) {
14818
+ const [sessionHandle, sessionOptions] = authoritySessions[i];
14819
+ if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
14820
+ return sessionHandle;
14821
+ }
14822
+ }
14823
+ }
14824
+ const session = http2.connect(authority, options);
14825
+ let removed;
14826
+ let timer;
14827
+ const removeSession = () => {
14828
+ if (removed) {
14829
+ return;
14830
+ }
14831
+ removed = true;
14832
+ if (timer) {
14833
+ clearTimeout(timer);
14834
+ timer = null;
14835
+ }
14836
+ let entries = authoritySessions, len = entries.length, i = len;
14837
+ while (i--) {
14838
+ if (entries[i][0] === session) {
14839
+ if (len === 1) {
14840
+ delete this.sessions[authority];
14841
+ } else {
14842
+ entries.splice(i, 1);
14843
+ }
14844
+ if (!session.closed) {
14845
+ session.close();
14846
+ }
14847
+ return;
14848
+ }
14849
+ }
14850
+ };
14851
+ const originalRequestFn = session.request;
14852
+ const {
14853
+ sessionTimeout
14854
+ } = options;
14855
+ if (sessionTimeout != null) {
14856
+ let streamsCount = 0;
14857
+ session.request = function() {
14858
+ const stream2 = originalRequestFn.apply(this, arguments);
14859
+ streamsCount++;
14860
+ if (timer) {
14861
+ clearTimeout(timer);
14862
+ timer = null;
14863
+ }
14864
+ stream2.once("close", () => {
14865
+ if (!--streamsCount) {
14866
+ timer = setTimeout(() => {
14867
+ timer = null;
14868
+ removeSession();
14869
+ }, sessionTimeout);
14870
+ }
14871
+ });
14872
+ return stream2;
14873
+ };
14874
+ }
14875
+ session.once("close", removeSession);
14876
+ let entry = [session, options];
14877
+ authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
14878
+ return session;
14879
+ }
14880
+ };
14699
14881
  var callbackify = (fn, reducer) => {
14700
14882
  return utils$1.isAsyncFn(fn) ? function(...args) {
14701
14883
  const cb = args.pop();
@@ -14708,13 +14890,29 @@ var require_axios = __commonJS({
14708
14890
  }, cb);
14709
14891
  } : fn;
14710
14892
  };
14711
- var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
14893
+ var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
14712
14894
  var isIPv4Loopback = (host) => {
14713
14895
  const parts = host.split(".");
14714
14896
  if (parts.length !== 4) return false;
14715
14897
  if (parts[0] !== "127") return false;
14716
14898
  return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
14717
14899
  };
14900
+ var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
14901
+ var isIPv6Unspecified = (host) => {
14902
+ if (host === "::") return true;
14903
+ const compressionIndex = host.indexOf("::");
14904
+ if (compressionIndex !== -1) {
14905
+ if (compressionIndex !== host.lastIndexOf("::")) return false;
14906
+ const left = host.slice(0, compressionIndex);
14907
+ const right = host.slice(compressionIndex + 2);
14908
+ const leftGroups = left ? left.split(":") : [];
14909
+ const rightGroups = right ? right.split(":") : [];
14910
+ const explicitGroups = leftGroups.length + rightGroups.length;
14911
+ return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup);
14912
+ }
14913
+ const groups = host.split(":");
14914
+ return groups.length === 8 && groups.every(isIPv6ZeroGroup);
14915
+ };
14718
14916
  var isIPv6Loopback = (host) => {
14719
14917
  if (host === "::1") return true;
14720
14918
  const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
@@ -14737,6 +14935,7 @@ var require_axios = __commonJS({
14737
14935
  if (!host) return false;
14738
14936
  if (LOOPBACK_HOSTNAMES.has(host)) return true;
14739
14937
  if (isIPv4Loopback(host)) return true;
14938
+ if (isIPv6Unspecified(host)) return true;
14740
14939
  return isIPv6Loopback(host);
14741
14940
  };
14742
14941
  var DEFAULT_PORTS = {
@@ -14929,6 +15128,8 @@ var require_axios = __commonJS({
14929
15128
  }), throttled[1]];
14930
15129
  };
14931
15130
  var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
15131
+ var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
15132
+ var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
14932
15133
  function estimateDataURLDecodedBytes(url2) {
14933
15134
  if (!url2 || typeof url2 !== "string") return 0;
14934
15135
  if (!url2.startsWith("data:")) return 0;
@@ -14944,7 +15145,7 @@ var require_axios = __commonJS({
14944
15145
  if (body.charCodeAt(i) === 37 && i + 2 < len) {
14945
15146
  const a = body.charCodeAt(i + 1);
14946
15147
  const b = body.charCodeAt(i + 2);
14947
- const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
15148
+ const isHex = isHexDigit(a) && isHexDigit(b);
14948
15149
  if (isHex) {
14949
15150
  effectiveLen -= 2;
14950
15151
  i += 2;
@@ -14976,13 +15177,13 @@ var require_axios = __commonJS({
14976
15177
  const bytes2 = groups * 3 - (pad || 0);
14977
15178
  return bytes2 > 0 ? bytes2 : 0;
14978
15179
  }
14979
- if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
14980
- return Buffer.byteLength(body, "utf8");
14981
- }
14982
15180
  let bytes = 0;
14983
15181
  for (let i = 0, len = body.length; i < len; i++) {
14984
15182
  const c = body.charCodeAt(i);
14985
- if (c < 128) {
15183
+ if (c === 37 && isPercentEncodedByte(body, i, len)) {
15184
+ bytes += 1;
15185
+ i += 2;
15186
+ } else if (c < 128) {
14986
15187
  bytes += 1;
14987
15188
  } else if (c < 2048) {
14988
15189
  bytes += 2;
@@ -15008,7 +15209,14 @@ var require_axios = __commonJS({
15008
15209
  flush: zlib.constants.BROTLI_OPERATION_FLUSH,
15009
15210
  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
15010
15211
  };
15212
+ var zstdOptions = {
15213
+ flush: zlib.constants.ZSTD_e_flush,
15214
+ finishFlush: zlib.constants.ZSTD_e_flush
15215
+ };
15011
15216
  var isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
15217
+ var isZstdSupported = utils$1.isFunction(zlib.createZstdDecompress);
15218
+ var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
15219
+ var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
15012
15220
  var {
15013
15221
  http: httpFollow,
15014
15222
  https: httpsFollow
@@ -15041,6 +15249,18 @@ var require_axios = __commonJS({
15041
15249
  ...agentOptions
15042
15250
  } : agentOptions;
15043
15251
  agent = new HttpsProxyAgent(merged);
15252
+ if (userHttpsAgent && userHttpsAgent.options) {
15253
+ const originTLSOptions = {
15254
+ ...userHttpsAgent.options
15255
+ };
15256
+ const callback = agent.callback;
15257
+ agent.callback = function axiosTunnelingAgentCallback(req, opts) {
15258
+ return callback.call(this, req, {
15259
+ ...originTLSOptions,
15260
+ ...opts
15261
+ });
15262
+ };
15263
+ }
15044
15264
  agent[kAxiosInstalledTunnel] = true;
15045
15265
  cache.set(key, agent);
15046
15266
  return agent;
@@ -15048,7 +15268,7 @@ var require_axios = __commonJS({
15048
15268
  var supportedProtocols = platform.protocols.map((protocol) => {
15049
15269
  return protocol + ":";
15050
15270
  });
15051
- var decodeURIComponentSafe = (value) => {
15271
+ var decodeURIComponentSafe$1 = (value) => {
15052
15272
  if (!utils$1.isString(value)) {
15053
15273
  return value;
15054
15274
  }
@@ -15062,86 +15282,41 @@ var require_axios = __commonJS({
15062
15282
  stream2.on("end", flush).on("error", flush);
15063
15283
  return throttled;
15064
15284
  };
15065
- var Http2Sessions = class {
15066
- constructor() {
15067
- this.sessions = /* @__PURE__ */ Object.create(null);
15068
- }
15069
- getSession(authority, options) {
15070
- options = Object.assign({
15071
- sessionTimeout: 1e3
15072
- }, options);
15073
- let authoritySessions = this.sessions[authority];
15074
- if (authoritySessions) {
15075
- let len = authoritySessions.length;
15076
- for (let i = 0; i < len; i++) {
15077
- const [sessionHandle, sessionOptions] = authoritySessions[i];
15078
- if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
15079
- return sessionHandle;
15080
- }
15081
- }
15082
- }
15083
- const session = http2.connect(authority, options);
15084
- let removed;
15085
- const removeSession = () => {
15086
- if (removed) {
15087
- return;
15088
- }
15089
- removed = true;
15090
- let entries = authoritySessions, len = entries.length, i = len;
15091
- while (i--) {
15092
- if (entries[i][0] === session) {
15093
- if (len === 1) {
15094
- delete this.sessions[authority];
15095
- } else {
15096
- entries.splice(i, 1);
15097
- }
15098
- if (!session.closed) {
15099
- session.close();
15100
- }
15101
- return;
15102
- }
15103
- }
15104
- };
15105
- const originalRequestFn = session.request;
15106
- const {
15107
- sessionTimeout
15108
- } = options;
15109
- if (sessionTimeout != null) {
15110
- let timer;
15111
- let streamsCount = 0;
15112
- session.request = function() {
15113
- const stream2 = originalRequestFn.apply(this, arguments);
15114
- streamsCount++;
15115
- if (timer) {
15116
- clearTimeout(timer);
15117
- timer = null;
15118
- }
15119
- stream2.once("close", () => {
15120
- if (!--streamsCount) {
15121
- timer = setTimeout(() => {
15122
- timer = null;
15123
- removeSession();
15124
- }, sessionTimeout);
15125
- }
15126
- });
15127
- return stream2;
15128
- };
15129
- }
15130
- session.once("close", removeSession);
15131
- let entry = [session, options];
15132
- authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
15133
- return session;
15134
- }
15135
- };
15136
15285
  var http2Sessions = new Http2Sessions();
15137
15286
  function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
15138
15287
  if (options.beforeRedirects.proxy) {
15139
15288
  options.beforeRedirects.proxy(options);
15140
15289
  }
15290
+ if (options.beforeRedirects.auth) {
15291
+ options.beforeRedirects.auth(options);
15292
+ }
15293
+ if (options.beforeRedirects.sensitiveHeaders) {
15294
+ options.beforeRedirects.sensitiveHeaders(options, requestDetails);
15295
+ }
15141
15296
  if (options.beforeRedirects.config) {
15142
15297
  options.beforeRedirects.config(options, responseDetails, requestDetails);
15143
15298
  }
15144
15299
  }
15300
+ function stripMatchingHeaders(headers, sensitiveSet) {
15301
+ if (!headers) {
15302
+ return;
15303
+ }
15304
+ Object.keys(headers).forEach((header) => {
15305
+ if (sensitiveSet.has(header.toLowerCase())) {
15306
+ delete headers[header];
15307
+ }
15308
+ });
15309
+ }
15310
+ function isSameOriginRedirect(redirectOptions, requestDetails) {
15311
+ if (!requestDetails) {
15312
+ return false;
15313
+ }
15314
+ try {
15315
+ return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin;
15316
+ } catch (e) {
15317
+ return false;
15318
+ }
15319
+ }
15145
15320
  function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) {
15146
15321
  let proxy = configProxy;
15147
15322
  if (!proxy && proxy !== false) {
@@ -15312,7 +15487,8 @@ var require_axios = __commonJS({
15312
15487
  };
15313
15488
  var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
15314
15489
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
15315
- const own2 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
15490
+ const own2 = (key) => utils$1.getSafeProp(config, key);
15491
+ const transitional = own2("transitional") || transitionalDefaults;
15316
15492
  let data = own2("data");
15317
15493
  let lookup = own2("lookup");
15318
15494
  let family = own2("family");
@@ -15321,7 +15497,13 @@ var require_axios = __commonJS({
15321
15497
  let http2Options = own2("http2Options");
15322
15498
  const responseType = own2("responseType");
15323
15499
  const responseEncoding = own2("responseEncoding");
15324
- const method = config.method.toUpperCase();
15500
+ const httpAgent = own2("httpAgent");
15501
+ const httpsAgent = own2("httpsAgent");
15502
+ const method = own2("method").toUpperCase();
15503
+ const maxRedirects = own2("maxRedirects");
15504
+ const maxBodyLength = own2("maxBodyLength");
15505
+ const maxContentLength = own2("maxContentLength");
15506
+ const decompress = own2("decompress");
15325
15507
  let isDone;
15326
15508
  let rejected = false;
15327
15509
  let req;
@@ -15351,7 +15533,6 @@ var require_axios = __commonJS({
15351
15533
  try {
15352
15534
  abortEmitter.emit("abort", !reason || reason.type ? new CanceledError(null, config, req) : reason);
15353
15535
  } catch (err) {
15354
- console.warn("emit error", err);
15355
15536
  }
15356
15537
  }
15357
15538
  function clearConnectPhaseTimer() {
@@ -15361,10 +15542,11 @@ var require_axios = __commonJS({
15361
15542
  }
15362
15543
  }
15363
15544
  function createTimeoutError() {
15364
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
15365
- const transitional = config.transitional || transitionalDefaults;
15366
- if (config.timeoutErrorMessage) {
15367
- timeoutErrorMessage = config.timeoutErrorMessage;
15545
+ const configTimeout = own2("timeout");
15546
+ let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded";
15547
+ const configTimeoutErrorMessage = own2("timeoutErrorMessage");
15548
+ if (configTimeoutErrorMessage) {
15549
+ timeoutErrorMessage = configTimeoutErrorMessage;
15368
15550
  }
15369
15551
  return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
15370
15552
  }
@@ -15405,15 +15587,15 @@ var require_axios = __commonJS({
15405
15587
  onFinished();
15406
15588
  }
15407
15589
  });
15408
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
15590
+ const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
15409
15591
  const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : void 0);
15410
15592
  const protocol = parsed.protocol || supportedProtocols[0];
15411
15593
  if (protocol === "data:") {
15412
- if (config.maxContentLength > -1) {
15413
- const dataUrl = String(config.url || fullPath || "");
15594
+ if (maxContentLength > -1) {
15595
+ const dataUrl = String(own2("url") || fullPath || "");
15414
15596
  const estimated = estimateDataURLDecodedBytes(dataUrl);
15415
- if (estimated > config.maxContentLength) {
15416
- return reject(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config));
15597
+ if (estimated > maxContentLength) {
15598
+ return reject(new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config));
15417
15599
  }
15418
15600
  }
15419
15601
  let convertedData;
@@ -15426,7 +15608,7 @@ var require_axios = __commonJS({
15426
15608
  });
15427
15609
  }
15428
15610
  try {
15429
- convertedData = fromDataURI(config.url, responseType === "blob", {
15611
+ convertedData = fromDataURI(own2("url"), responseType === "blob", {
15430
15612
  Blob: config.env && config.env.Blob
15431
15613
  });
15432
15614
  } catch (err) {
@@ -15491,7 +15673,7 @@ var require_axios = __commonJS({
15491
15673
  return reject(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError.ERR_BAD_REQUEST, config));
15492
15674
  }
15493
15675
  headers.setContentLength(data.length, false);
15494
- if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
15676
+ if (maxBodyLength > -1 && data.length > maxBodyLength) {
15495
15677
  return reject(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config));
15496
15678
  }
15497
15679
  }
@@ -15516,34 +15698,34 @@ var require_axios = __commonJS({
15516
15698
  let auth = void 0;
15517
15699
  const configAuth = own2("auth");
15518
15700
  if (configAuth) {
15519
- const username = configAuth.username || "";
15520
- const password = configAuth.password || "";
15701
+ const username = utils$1.getSafeProp(configAuth, "username") || "";
15702
+ const password = utils$1.getSafeProp(configAuth, "password") || "";
15521
15703
  auth = username + ":" + password;
15522
15704
  }
15523
- if (!auth && parsed.username) {
15524
- const urlUsername = decodeURIComponentSafe(parsed.username);
15525
- const urlPassword = decodeURIComponentSafe(parsed.password);
15705
+ if (!auth && (parsed.username || parsed.password)) {
15706
+ const urlUsername = decodeURIComponentSafe$1(parsed.username);
15707
+ const urlPassword = decodeURIComponentSafe$1(parsed.password);
15526
15708
  auth = urlUsername + ":" + urlPassword;
15527
15709
  }
15528
15710
  auth && headers.delete("authorization");
15529
15711
  let path$1;
15530
15712
  try {
15531
- path$1 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
15713
+ path$1 = buildURL(parsed.pathname + parsed.search, own2("params"), own2("paramsSerializer")).replace(/^\?/, "");
15532
15714
  } catch (err) {
15533
15715
  const customErr = new Error(err.message);
15534
15716
  customErr.config = config;
15535
- customErr.url = config.url;
15717
+ customErr.url = own2("url");
15536
15718
  customErr.exists = true;
15537
15719
  return reject(customErr);
15538
15720
  }
15539
- headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
15721
+ headers.set("Accept-Encoding", utils$1.hasOwnProp(transitional, "advertiseZstdAcceptEncoding") && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
15540
15722
  const options = Object.assign(/* @__PURE__ */ Object.create(null), {
15541
15723
  path: path$1,
15542
15724
  method,
15543
15725
  headers: toByteStringHeaderObject(headers),
15544
15726
  agents: {
15545
- http: config.httpAgent,
15546
- https: config.httpsAgent
15727
+ http: httpAgent,
15728
+ https: httpsAgent
15547
15729
  },
15548
15730
  auth,
15549
15731
  protocol,
@@ -15553,29 +15735,32 @@ var require_axios = __commonJS({
15553
15735
  http2Options
15554
15736
  });
15555
15737
  !utils$1.isUndefined(lookup) && (options.lookup = lookup);
15556
- if (config.socketPath) {
15557
- if (typeof config.socketPath !== "string") {
15738
+ const socketPath = own2("socketPath");
15739
+ if (socketPath) {
15740
+ if (typeof socketPath !== "string") {
15558
15741
  return reject(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
15559
15742
  }
15560
- if (config.allowedSocketPaths != null) {
15561
- const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
15562
- const resolvedSocket = path.resolve(config.socketPath);
15743
+ const allowedSocketPaths = own2("allowedSocketPaths");
15744
+ if (allowedSocketPaths != null) {
15745
+ const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
15746
+ const resolvedSocket = path.resolve(socketPath);
15563
15747
  const isAllowed = allowed.some((entry) => typeof entry === "string" && path.resolve(entry) === resolvedSocket);
15564
15748
  if (!isAllowed) {
15565
- return reject(new AxiosError(`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
15749
+ return reject(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
15566
15750
  }
15567
15751
  }
15568
- options.socketPath = config.socketPath;
15752
+ options.socketPath = socketPath;
15569
15753
  } else {
15570
15754
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
15571
15755
  options.port = parsed.port;
15572
- setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, config.httpsAgent);
15756
+ setProxy(options, own2("proxy"), protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, httpsAgent);
15573
15757
  }
15574
15758
  let transport;
15575
15759
  let isNativeTransport = false;
15760
+ let transportEnforcesMaxBodyLength = false;
15576
15761
  const isHttpsRequest = isHttps.test(options.protocol);
15577
15762
  if (options.agent == null) {
15578
- options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
15763
+ options.agent = isHttpsRequest ? httpsAgent : httpAgent;
15579
15764
  }
15580
15765
  if (isHttp2) {
15581
15766
  transport = http2Transport;
@@ -15583,22 +15768,57 @@ var require_axios = __commonJS({
15583
15768
  const configTransport = own2("transport");
15584
15769
  if (configTransport) {
15585
15770
  transport = configTransport;
15586
- } else if (config.maxRedirects === 0) {
15771
+ } else if (maxRedirects === 0) {
15587
15772
  transport = isHttpsRequest ? https : http;
15588
15773
  isNativeTransport = true;
15589
15774
  } else {
15590
- if (config.maxRedirects) {
15591
- options.maxRedirects = config.maxRedirects;
15775
+ transportEnforcesMaxBodyLength = true;
15776
+ options.sensitiveHeaders = [];
15777
+ if (maxRedirects) {
15778
+ options.maxRedirects = maxRedirects;
15592
15779
  }
15593
15780
  const configBeforeRedirect = own2("beforeRedirect");
15594
15781
  if (configBeforeRedirect) {
15595
15782
  options.beforeRedirects.config = configBeforeRedirect;
15596
15783
  }
15784
+ if (auth) {
15785
+ const requestOrigin = parsed.origin;
15786
+ const authToRestore = auth;
15787
+ options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
15788
+ try {
15789
+ if (new URL(redirectOptions.href).origin === requestOrigin) {
15790
+ redirectOptions.auth = authToRestore;
15791
+ }
15792
+ } catch (e) {
15793
+ }
15794
+ };
15795
+ }
15796
+ const sensitiveHeaders = own2("sensitiveHeaders");
15797
+ if (sensitiveHeaders != null) {
15798
+ if (!utils$1.isArray(sensitiveHeaders)) {
15799
+ return reject(new AxiosError("sensitiveHeaders must be an array of strings", AxiosError.ERR_BAD_OPTION_VALUE, config));
15800
+ }
15801
+ const sensitiveSet = /* @__PURE__ */ new Set();
15802
+ for (const header of sensitiveHeaders) {
15803
+ if (!utils$1.isString(header)) {
15804
+ return reject(new AxiosError("sensitiveHeaders must be an array of strings", AxiosError.ERR_BAD_OPTION_VALUE, config));
15805
+ }
15806
+ sensitiveSet.add(header.toLowerCase());
15807
+ }
15808
+ if (sensitiveSet.size) {
15809
+ options.sensitiveHeaders = Array.from(sensitiveSet);
15810
+ options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) {
15811
+ if (!isSameOriginRedirect(redirectOptions, requestDetails)) {
15812
+ stripMatchingHeaders(redirectOptions.headers, sensitiveSet);
15813
+ }
15814
+ };
15815
+ }
15816
+ }
15597
15817
  transport = isHttpsRequest ? httpsFollow : httpFollow;
15598
15818
  }
15599
15819
  }
15600
- if (config.maxBodyLength > -1) {
15601
- options.maxBodyLength = config.maxBodyLength;
15820
+ if (maxBodyLength > -1) {
15821
+ options.maxBodyLength = maxBodyLength;
15602
15822
  } else {
15603
15823
  options.maxBodyLength = Infinity;
15604
15824
  }
@@ -15617,7 +15837,7 @@ var require_axios = __commonJS({
15617
15837
  }
15618
15838
  let responseStream = res;
15619
15839
  const lastRequest = res.req || req;
15620
- if (config.decompress !== false && res.headers["content-encoding"]) {
15840
+ if (decompress !== false && res.headers["content-encoding"]) {
15621
15841
  if (method === "HEAD" || res.statusCode === 204) {
15622
15842
  delete res.headers["content-encoding"];
15623
15843
  }
@@ -15640,6 +15860,13 @@ var require_axios = __commonJS({
15640
15860
  streams.push(zlib.createBrotliDecompress(brotliOptions));
15641
15861
  delete res.headers["content-encoding"];
15642
15862
  }
15863
+ break;
15864
+ case "zstd":
15865
+ if (isZstdSupported) {
15866
+ streams.push(zlib.createZstdDecompress(zstdOptions));
15867
+ delete res.headers["content-encoding"];
15868
+ }
15869
+ break;
15643
15870
  }
15644
15871
  }
15645
15872
  responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0];
@@ -15651,8 +15878,8 @@ var require_axios = __commonJS({
15651
15878
  request: lastRequest
15652
15879
  };
15653
15880
  if (responseType === "stream") {
15654
- if (config.maxContentLength > -1) {
15655
- const limit = config.maxContentLength;
15881
+ if (maxContentLength > -1) {
15882
+ const limit = maxContentLength;
15656
15883
  const source = responseStream;
15657
15884
  async function* enforceMaxContentLength() {
15658
15885
  let totalResponseBytes = 0;
@@ -15676,10 +15903,10 @@ var require_axios = __commonJS({
15676
15903
  responseStream.on("data", function handleStreamData(chunk) {
15677
15904
  responseBuffer.push(chunk);
15678
15905
  totalResponseBytes += chunk.length;
15679
- if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
15906
+ if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
15680
15907
  rejected = true;
15681
15908
  responseStream.destroy();
15682
- abort(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
15909
+ abort(new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
15683
15910
  }
15684
15911
  });
15685
15912
  responseStream.on("aborted", function handlerStreamAborted() {
@@ -15751,8 +15978,8 @@ var require_axios = __commonJS({
15751
15978
  }
15752
15979
  boundSockets.clear();
15753
15980
  });
15754
- if (config.timeout) {
15755
- const timeout = parseInt(config.timeout, 10);
15981
+ if (own2("timeout")) {
15982
+ const timeout = parseInt(own2("timeout"), 10);
15756
15983
  if (Number.isNaN(timeout)) {
15757
15984
  abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
15758
15985
  return;
@@ -15784,8 +16011,8 @@ var require_axios = __commonJS({
15784
16011
  }
15785
16012
  });
15786
16013
  let uploadStream = data;
15787
- if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
15788
- const limit = config.maxBodyLength;
16014
+ if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) {
16015
+ const limit = maxBodyLength;
15789
16016
  let bytesSent = 0;
15790
16017
  uploadStream = stream.pipeline([data, new stream.Transform({
15791
16018
  transform(chunk, _enc, cb) {
@@ -15908,6 +16135,23 @@ var require_axios = __commonJS({
15908
16135
  return getMergedValue(void 0, a);
15909
16136
  }
15910
16137
  }
16138
+ function getMergedTransitionalOption(prop) {
16139
+ const transitional2 = utils$1.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
16140
+ if (!utils$1.isUndefined(transitional2)) {
16141
+ if (utils$1.isPlainObject(transitional2)) {
16142
+ if (utils$1.hasOwnProp(transitional2, prop)) {
16143
+ return transitional2[prop];
16144
+ }
16145
+ } else {
16146
+ return void 0;
16147
+ }
16148
+ }
16149
+ const transitional1 = utils$1.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
16150
+ if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) {
16151
+ return transitional1[prop];
16152
+ }
16153
+ return void 0;
16154
+ }
15911
16155
  function mergeDirectKeys(a, b, prop) {
15912
16156
  if (utils$1.hasOwnProp(config2, prop)) {
15913
16157
  return getMergedValue(a, b);
@@ -15958,6 +16202,13 @@ var require_axios = __commonJS({
15958
16202
  const configValue = merge2(a, b, prop);
15959
16203
  utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
15960
16204
  });
16205
+ if (utils$1.hasOwnProp(config2, "validateStatus") && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
16206
+ if (utils$1.hasOwnProp(config1, "validateStatus")) {
16207
+ config.validateStatus = getMergedValue(void 0, config1.validateStatus);
16208
+ } else {
16209
+ delete config.validateStatus;
16210
+ }
16211
+ }
15961
16212
  return config;
15962
16213
  }
15963
16214
  var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
@@ -15972,8 +16223,8 @@ var require_axios = __commonJS({
15972
16223
  }
15973
16224
  });
15974
16225
  }
15975
- var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
15976
- var resolveConfig = (config) => {
16226
+ var encodeUTF8$1 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
16227
+ function resolveConfig(config) {
15977
16228
  const newConfig = mergeConfig({}, config);
15978
16229
  const own2 = (key) => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
15979
16230
  const data = own2("data");
@@ -15986,12 +16237,14 @@ var require_axios = __commonJS({
15986
16237
  const allowAbsoluteUrls = own2("allowAbsoluteUrls");
15987
16238
  const url2 = own2("url");
15988
16239
  newConfig.headers = headers = AxiosHeaders.from(headers);
15989
- newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls), config.params, config.paramsSerializer);
16240
+ newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls, newConfig), own2("params"), own2("paramsSerializer"));
15990
16241
  if (auth) {
15991
- headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : "")));
16242
+ const username = utils$1.getSafeProp(auth, "username") || "";
16243
+ const password = utils$1.getSafeProp(auth, "password") || "";
16244
+ headers.set("Authorization", "Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : "")));
15992
16245
  }
15993
16246
  if (utils$1.isFormData(data)) {
15994
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
16247
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
15995
16248
  headers.setContentType(void 0);
15996
16249
  } else if (utils$1.isFunction(data.getHeaders)) {
15997
16250
  setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
@@ -16010,7 +16263,7 @@ var require_axios = __commonJS({
16010
16263
  }
16011
16264
  }
16012
16265
  return newConfig;
16013
- };
16266
+ }
16014
16267
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
16015
16268
  var xhrAdapter = isXHRAdapterSupported && function(config) {
16016
16269
  return new Promise(function dispatchXhrRequest(resolve, reject) {
@@ -16262,6 +16515,17 @@ var require_axios = __commonJS({
16262
16515
  var {
16263
16516
  isFunction
16264
16517
  } = utils$1;
16518
+ var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
16519
+ var decodeURIComponentSafe = (value) => {
16520
+ if (!utils$1.isString(value)) {
16521
+ return value;
16522
+ }
16523
+ try {
16524
+ return decodeURIComponent(value);
16525
+ } catch (error) {
16526
+ return value;
16527
+ }
16528
+ };
16265
16529
  var test = (fn, ...args) => {
16266
16530
  try {
16267
16531
  return !!fn(...args);
@@ -16269,6 +16533,14 @@ var require_axios = __commonJS({
16269
16533
  return false;
16270
16534
  }
16271
16535
  };
16536
+ var maybeWithAuthCredentials = (url2) => {
16537
+ const protocolIndex = url2.indexOf("://");
16538
+ let urlToCheck = url2;
16539
+ if (protocolIndex !== -1) {
16540
+ urlToCheck = urlToCheck.slice(protocolIndex + 3);
16541
+ }
16542
+ return urlToCheck.includes("@") || urlToCheck.includes(":");
16543
+ };
16272
16544
  var factory = (env) => {
16273
16545
  const globalObject = utils$1.global !== void 0 && utils$1.global !== null ? utils$1.global : globalThis;
16274
16546
  const {
@@ -16372,6 +16644,7 @@ var require_axios = __commonJS({
16372
16644
  } = resolveConfig(config);
16373
16645
  const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
16374
16646
  const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
16647
+ const own2 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
16375
16648
  let _fetch = envFetch || fetch;
16376
16649
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
16377
16650
  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
@@ -16380,7 +16653,39 @@ var require_axios = __commonJS({
16380
16653
  composedSignal.unsubscribe();
16381
16654
  });
16382
16655
  let requestContentLength;
16656
+ let pendingBodyError = null;
16657
+ const maxBodyLengthError = () => new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
16383
16658
  try {
16659
+ let auth = void 0;
16660
+ const configAuth = own2("auth");
16661
+ if (configAuth) {
16662
+ const username = utils$1.getSafeProp(configAuth, "username") || "";
16663
+ const password = utils$1.getSafeProp(configAuth, "password") || "";
16664
+ auth = {
16665
+ username,
16666
+ password
16667
+ };
16668
+ }
16669
+ if (maybeWithAuthCredentials(url2)) {
16670
+ const parsedURL = new URL(url2, platform.origin);
16671
+ if (!auth && (parsedURL.username || parsedURL.password)) {
16672
+ const urlUsername = decodeURIComponentSafe(parsedURL.username);
16673
+ const urlPassword = decodeURIComponentSafe(parsedURL.password);
16674
+ auth = {
16675
+ username: urlUsername,
16676
+ password: urlPassword
16677
+ };
16678
+ }
16679
+ if (parsedURL.username || parsedURL.password) {
16680
+ parsedURL.username = "";
16681
+ parsedURL.password = "";
16682
+ url2 = parsedURL.href;
16683
+ }
16684
+ }
16685
+ if (auth) {
16686
+ headers.delete("authorization");
16687
+ headers.set("Authorization", "Basic " + btoa(encodeUTF8((auth.username || "") + ":" + (auth.password || ""))));
16688
+ }
16384
16689
  if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
16385
16690
  const estimated = estimateDataURLDecodedBytes(url2);
16386
16691
  if (estimated > maxContentLength) {
@@ -16388,25 +16693,42 @@ var require_axios = __commonJS({
16388
16693
  }
16389
16694
  }
16390
16695
  if (hasMaxBodyLength && method !== "get" && method !== "head") {
16391
- const outboundLength = await resolveBodyLength(headers, data);
16392
- if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
16393
- throw new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
16696
+ const outboundLength = await getBodyLength(data);
16697
+ if (typeof outboundLength === "number" && isFinite(outboundLength)) {
16698
+ requestContentLength = outboundLength;
16699
+ if (outboundLength > maxBodyLength) {
16700
+ throw maxBodyLengthError();
16701
+ }
16394
16702
  }
16395
16703
  }
16396
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
16397
- let _request = new Request(url2, {
16398
- method: "POST",
16399
- body: data,
16400
- duplex: "half"
16401
- });
16402
- let contentTypeHeader;
16403
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
16404
- headers.setContentType(contentTypeHeader);
16704
+ const mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data));
16705
+ const trackRequestStream = (stream2, onProgress, flush) => trackStream(stream2, DEFAULT_CHUNK_SIZE, (loadedBytes) => {
16706
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
16707
+ throw pendingBodyError = maxBodyLengthError();
16405
16708
  }
16406
- if (_request.body) {
16407
- const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
16408
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
16709
+ onProgress && onProgress(loadedBytes);
16710
+ }, flush);
16711
+ if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
16712
+ requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
16713
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
16714
+ let _request = new Request(url2, {
16715
+ method: "POST",
16716
+ body: data,
16717
+ duplex: "half"
16718
+ });
16719
+ let contentTypeHeader;
16720
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
16721
+ headers.setContentType(contentTypeHeader);
16722
+ }
16723
+ if (_request.body) {
16724
+ const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [];
16725
+ data = trackRequestStream(_request.body, onProgress, flush);
16726
+ }
16409
16727
  }
16728
+ } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
16729
+ data = trackRequestStream(data);
16730
+ } else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
16731
+ throw new AxiosError("Stream request bodies are not supported by the current fetch implementation", AxiosError.ERR_NOT_SUPPORT, config, request);
16410
16732
  }
16411
16733
  if (!utils$1.isString(withCredentials)) {
16412
16734
  withCredentials = withCredentials ? "include" : "omit";
@@ -16430,8 +16752,9 @@ var require_axios = __commonJS({
16430
16752
  };
16431
16753
  request = isRequestSupported && new Request(url2, resolvedOptions);
16432
16754
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
16755
+ const responseHeaders = AxiosHeaders.from(response.headers);
16433
16756
  if (hasMaxContentLength) {
16434
- const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
16757
+ const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
16435
16758
  if (declaredLength != null && declaredLength > maxContentLength) {
16436
16759
  throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
16437
16760
  }
@@ -16442,7 +16765,7 @@ var require_axios = __commonJS({
16442
16765
  ["status", "statusText", "headers"].forEach((prop) => {
16443
16766
  options[prop] = response[prop];
16444
16767
  });
16445
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
16768
+ const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
16446
16769
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
16447
16770
  let bytesRead = 0;
16448
16771
  const onChunkProgress = (loadedBytes) => {
@@ -16496,6 +16819,14 @@ var require_axios = __commonJS({
16496
16819
  err !== canceledError && (canceledError.cause = err);
16497
16820
  throw canceledError;
16498
16821
  }
16822
+ if (pendingBodyError) {
16823
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
16824
+ throw pendingBodyError;
16825
+ }
16826
+ if (err instanceof AxiosError) {
16827
+ request && !err.request && (err.request = request);
16828
+ throw err;
16829
+ }
16499
16830
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
16500
16831
  throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), {
16501
16832
  cause: err.cause || err
@@ -16752,7 +17083,9 @@ var require_axios = __commonJS({
16752
17083
  silentJSONParsing: validators.transitional(validators.boolean),
16753
17084
  forcedJSONParsing: validators.transitional(validators.boolean),
16754
17085
  clarifyTimeoutError: validators.transitional(validators.boolean),
16755
- legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
17086
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
17087
+ advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
17088
+ validateStatusUndefinedResolves: validators.transitional(validators.boolean)
16756
17089
  }, false);
16757
17090
  }
16758
17091
  if (paramsSerializer != null) {
@@ -16842,7 +17175,7 @@ var require_axios = __commonJS({
16842
17175
  }
16843
17176
  getUri(config) {
16844
17177
  config = mergeConfig(this.defaults, config);
16845
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
17178
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
16846
17179
  return buildURL(fullPath, config.params, config.paramsSerializer);
16847
17180
  }
16848
17181
  };
@@ -16851,7 +17184,7 @@ var require_axios = __commonJS({
16851
17184
  return this.request(mergeConfig(config || {}, {
16852
17185
  method,
16853
17186
  url: url2,
16854
- data: (config || {}).data
17187
+ data: config && utils$1.hasOwnProp(config, "data") ? config.data : void 0
16855
17188
  }));
16856
17189
  };
16857
17190
  });
@@ -17178,6 +17511,9 @@ var require_form_data2 = __commonJS({
17178
17511
  var setToStringTag = require_es_set_tostringtag();
17179
17512
  var populate = require_populate2();
17180
17513
  var Buffer2 = require_safe_buffer().Buffer;
17514
+ function escapeHeaderParam(str) {
17515
+ return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
17516
+ }
17181
17517
  function FormData2(options) {
17182
17518
  if (!(this instanceof FormData2)) {
17183
17519
  return new FormData2();
@@ -17268,7 +17604,7 @@ var require_form_data2 = __commonJS({
17268
17604
  var contents = "";
17269
17605
  var headers = {
17270
17606
  // add custom disposition as third element or keep it two elements if not
17271
- "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
17607
+ "Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
17272
17608
  // if no content type. allow it to be empty array
17273
17609
  "Content-Type": [].concat(contentType || [])
17274
17610
  };
@@ -17302,7 +17638,7 @@ var require_form_data2 = __commonJS({
17302
17638
  filename = path.basename(value.client._httpMessage.path || "");
17303
17639
  }
17304
17640
  if (filename) {
17305
- contentDisposition = 'filename="' + filename + '"';
17641
+ contentDisposition = 'filename="' + escapeHeaderParam(filename) + '"';
17306
17642
  }
17307
17643
  return contentDisposition;
17308
17644
  };
@@ -23911,7 +24247,7 @@ mime-types/index.js:
23911
24247
  *)
23912
24248
 
23913
24249
  axios/dist/node/axios.cjs:
23914
- (*! Axios v1.16.1 Copyright (c) 2026 Matt Zabriskie and contributors *)
24250
+ (*! Axios v1.18.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
23915
24251
 
23916
24252
  safe-buffer/index.js:
23917
24253
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)