@bitrix24/b24jssdk 0.1.3 → 0.1.5

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.
package/dist/umd/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @version @bitrix24/b24jssdk v0.1.3
2
+ * @version @bitrix24/b24jssdk v0.1.5
3
3
  * @copyright (c) 2024 Bitrix24
4
4
  * @licence MIT
5
5
  * @links https://github.com/bitrix24/b24jssdk - GitHub
@@ -9333,7 +9333,7 @@
9333
9333
  *
9334
9334
  * @returns {boolean} True if value is an Array, otherwise false
9335
9335
  */
9336
- const {isArray} = Array;
9336
+ const {isArray: isArray$3} = Array;
9337
9337
 
9338
9338
  /**
9339
9339
  * Determine if a value is undefined
@@ -9351,7 +9351,7 @@
9351
9351
  *
9352
9352
  * @returns {boolean} True if value is a Buffer, otherwise false
9353
9353
  */
9354
- function isBuffer(val) {
9354
+ function isBuffer$1(val) {
9355
9355
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
9356
9356
  && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
9357
9357
  }
@@ -9558,7 +9558,7 @@
9558
9558
  obj = [obj];
9559
9559
  }
9560
9560
 
9561
- if (isArray(obj)) {
9561
+ if (isArray$3(obj)) {
9562
9562
  // Iterate over array values
9563
9563
  for (i = 0, l = obj.length; i < l; i++) {
9564
9564
  fn.call(null, obj[i], i, obj);
@@ -9616,16 +9616,16 @@
9616
9616
  *
9617
9617
  * @returns {Object} Result of all merge properties
9618
9618
  */
9619
- function merge(/* obj1, obj2, obj3, ... */) {
9619
+ function merge$1(/* obj1, obj2, obj3, ... */) {
9620
9620
  const {caseless} = isContextDefined(this) && this || {};
9621
9621
  const result = {};
9622
9622
  const assignValue = (val, key) => {
9623
9623
  const targetKey = caseless && findKey(result, key) || key;
9624
9624
  if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
9625
- result[targetKey] = merge(result[targetKey], val);
9625
+ result[targetKey] = merge$1(result[targetKey], val);
9626
9626
  } else if (isPlainObject(val)) {
9627
- result[targetKey] = merge({}, val);
9628
- } else if (isArray(val)) {
9627
+ result[targetKey] = merge$1({}, val);
9628
+ } else if (isArray$3(val)) {
9629
9629
  result[targetKey] = val.slice();
9630
9630
  } else {
9631
9631
  result[targetKey] = val;
@@ -9755,7 +9755,7 @@
9755
9755
  */
9756
9756
  const toArray = (thing) => {
9757
9757
  if (!thing) return null;
9758
- if (isArray(thing)) return thing;
9758
+ if (isArray$3(thing)) return thing;
9759
9759
  let i = thing.length;
9760
9760
  if (!isNumber(i)) return null;
9761
9761
  const arr = new Array(i);
@@ -9842,7 +9842,7 @@
9842
9842
  *
9843
9843
  * @returns {boolean} True if value is a RegExp object, otherwise false
9844
9844
  */
9845
- const isRegExp = kindOfTest('RegExp');
9845
+ const isRegExp$1 = kindOfTest('RegExp');
9846
9846
 
9847
9847
  const reduceDescriptors = (obj, reducer) => {
9848
9848
  const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -9898,7 +9898,7 @@
9898
9898
  });
9899
9899
  };
9900
9900
 
9901
- isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
9901
+ isArray$3(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
9902
9902
 
9903
9903
  return obj;
9904
9904
  };
@@ -9952,7 +9952,7 @@
9952
9952
 
9953
9953
  if(!('toJSON' in source)) {
9954
9954
  stack[i] = source;
9955
- const target = isArray(source) ? [] : {};
9955
+ const target = isArray$3(source) ? [] : {};
9956
9956
 
9957
9957
  forEach(source, (value, key) => {
9958
9958
  const reducedValue = visit(value, i + 1);
@@ -10006,10 +10006,10 @@
10006
10006
 
10007
10007
  // *********************
10008
10008
 
10009
- const utils$2 = {
10010
- isArray,
10009
+ const utils$1 = {
10010
+ isArray: isArray$3,
10011
10011
  isArrayBuffer,
10012
- isBuffer,
10012
+ isBuffer: isBuffer$1,
10013
10013
  isFormData,
10014
10014
  isArrayBufferView,
10015
10015
  isString,
@@ -10025,14 +10025,14 @@
10025
10025
  isDate,
10026
10026
  isFile,
10027
10027
  isBlob,
10028
- isRegExp,
10028
+ isRegExp: isRegExp$1,
10029
10029
  isFunction,
10030
10030
  isStream,
10031
10031
  isURLSearchParams,
10032
10032
  isTypedArray,
10033
10033
  isFileList,
10034
10034
  forEach,
10035
- merge,
10035
+ merge: merge$1,
10036
10036
  extend,
10037
10037
  trim,
10038
10038
  stripBOM,
@@ -10097,7 +10097,7 @@
10097
10097
  }
10098
10098
  }
10099
10099
 
10100
- utils$2.inherits(AxiosError$1, Error, {
10100
+ utils$1.inherits(AxiosError$1, Error, {
10101
10101
  toJSON: function toJSON() {
10102
10102
  return {
10103
10103
  // Standard
@@ -10112,7 +10112,7 @@
10112
10112
  columnNumber: this.columnNumber,
10113
10113
  stack: this.stack,
10114
10114
  // Axios
10115
- config: utils$2.toJSONObject(this.config),
10115
+ config: utils$1.toJSONObject(this.config),
10116
10116
  code: this.code,
10117
10117
  status: this.status
10118
10118
  };
@@ -10147,7 +10147,7 @@
10147
10147
  AxiosError$1.from = (error, code, config, request, response, customProps) => {
10148
10148
  const axiosError = Object.create(prototype$1);
10149
10149
 
10150
- utils$2.toFlatObject(error, axiosError, function filter(obj) {
10150
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
10151
10151
  return obj !== Error.prototype;
10152
10152
  }, prop => {
10153
10153
  return prop !== 'isAxiosError';
@@ -10175,7 +10175,7 @@
10175
10175
  * @returns {boolean}
10176
10176
  */
10177
10177
  function isVisitable(thing) {
10178
- return utils$2.isPlainObject(thing) || utils$2.isArray(thing);
10178
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
10179
10179
  }
10180
10180
 
10181
10181
  /**
@@ -10186,7 +10186,7 @@
10186
10186
  * @returns {string} the key without the brackets.
10187
10187
  */
10188
10188
  function removeBrackets(key) {
10189
- return utils$2.endsWith(key, '[]') ? key.slice(0, -2) : key;
10189
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
10190
10190
  }
10191
10191
 
10192
10192
  /**
@@ -10215,10 +10215,10 @@
10215
10215
  * @returns {boolean}
10216
10216
  */
10217
10217
  function isFlatArray(arr) {
10218
- return utils$2.isArray(arr) && !arr.some(isVisitable);
10218
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
10219
10219
  }
10220
10220
 
10221
- const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter(prop) {
10221
+ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
10222
10222
  return /^is[A-Z]/.test(prop);
10223
10223
  });
10224
10224
 
@@ -10246,7 +10246,7 @@
10246
10246
  * @returns
10247
10247
  */
10248
10248
  function toFormData$1(obj, formData, options) {
10249
- if (!utils$2.isObject(obj)) {
10249
+ if (!utils$1.isObject(obj)) {
10250
10250
  throw new TypeError('target must be an object');
10251
10251
  }
10252
10252
 
@@ -10254,13 +10254,13 @@
10254
10254
  formData = formData || new (FormData)();
10255
10255
 
10256
10256
  // eslint-disable-next-line no-param-reassign
10257
- options = utils$2.toFlatObject(options, {
10257
+ options = utils$1.toFlatObject(options, {
10258
10258
  metaTokens: true,
10259
10259
  dots: false,
10260
10260
  indexes: false
10261
10261
  }, false, function defined(option, source) {
10262
10262
  // eslint-disable-next-line no-eq-null,eqeqeq
10263
- return !utils$2.isUndefined(source[option]);
10263
+ return !utils$1.isUndefined(source[option]);
10264
10264
  });
10265
10265
 
10266
10266
  const metaTokens = options.metaTokens;
@@ -10269,24 +10269,24 @@
10269
10269
  const dots = options.dots;
10270
10270
  const indexes = options.indexes;
10271
10271
  const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
10272
- const useBlob = _Blob && utils$2.isSpecCompliantForm(formData);
10272
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
10273
10273
 
10274
- if (!utils$2.isFunction(visitor)) {
10274
+ if (!utils$1.isFunction(visitor)) {
10275
10275
  throw new TypeError('visitor must be a function');
10276
10276
  }
10277
10277
 
10278
10278
  function convertValue(value) {
10279
10279
  if (value === null) return '';
10280
10280
 
10281
- if (utils$2.isDate(value)) {
10281
+ if (utils$1.isDate(value)) {
10282
10282
  return value.toISOString();
10283
10283
  }
10284
10284
 
10285
- if (!useBlob && utils$2.isBlob(value)) {
10285
+ if (!useBlob && utils$1.isBlob(value)) {
10286
10286
  throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
10287
10287
  }
10288
10288
 
10289
- if (utils$2.isArrayBuffer(value) || utils$2.isTypedArray(value)) {
10289
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
10290
10290
  return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
10291
10291
  }
10292
10292
 
@@ -10307,20 +10307,20 @@
10307
10307
  let arr = value;
10308
10308
 
10309
10309
  if (value && !path && typeof value === 'object') {
10310
- if (utils$2.endsWith(key, '{}')) {
10310
+ if (utils$1.endsWith(key, '{}')) {
10311
10311
  // eslint-disable-next-line no-param-reassign
10312
10312
  key = metaTokens ? key : key.slice(0, -2);
10313
10313
  // eslint-disable-next-line no-param-reassign
10314
10314
  value = JSON.stringify(value);
10315
10315
  } else if (
10316
- (utils$2.isArray(value) && isFlatArray(value)) ||
10317
- ((utils$2.isFileList(value) || utils$2.endsWith(key, '[]')) && (arr = utils$2.toArray(value))
10316
+ (utils$1.isArray(value) && isFlatArray(value)) ||
10317
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
10318
10318
  )) {
10319
10319
  // eslint-disable-next-line no-param-reassign
10320
10320
  key = removeBrackets(key);
10321
10321
 
10322
10322
  arr.forEach(function each(el, index) {
10323
- !(utils$2.isUndefined(el) || el === null) && formData.append(
10323
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
10324
10324
  // eslint-disable-next-line no-nested-ternary
10325
10325
  indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
10326
10326
  convertValue(el)
@@ -10348,7 +10348,7 @@
10348
10348
  });
10349
10349
 
10350
10350
  function build(value, path) {
10351
- if (utils$2.isUndefined(value)) return;
10351
+ if (utils$1.isUndefined(value)) return;
10352
10352
 
10353
10353
  if (stack.indexOf(value) !== -1) {
10354
10354
  throw Error('Circular reference detected in ' + path.join('.'));
@@ -10356,9 +10356,9 @@
10356
10356
 
10357
10357
  stack.push(value);
10358
10358
 
10359
- utils$2.forEach(value, function each(el, key) {
10360
- const result = !(utils$2.isUndefined(el) || el === null) && visitor.call(
10361
- formData, el, utils$2.isString(key) ? key.trim() : key, path, exposedHelpers
10359
+ utils$1.forEach(value, function each(el, key) {
10360
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
10361
+ formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
10362
10362
  );
10363
10363
 
10364
10364
  if (result === true) {
@@ -10369,7 +10369,7 @@
10369
10369
  stack.pop();
10370
10370
  }
10371
10371
 
10372
- if (!utils$2.isObject(obj)) {
10372
+ if (!utils$1.isObject(obj)) {
10373
10373
  throw new TypeError('data must be an object');
10374
10374
  }
10375
10375
 
@@ -10386,7 +10386,7 @@
10386
10386
  *
10387
10387
  * @returns {string} The encoded string.
10388
10388
  */
10389
- function encode$1(str) {
10389
+ function encode$2(str) {
10390
10390
  const charMap = {
10391
10391
  '!': '%21',
10392
10392
  "'": '%27',
@@ -10423,8 +10423,8 @@
10423
10423
 
10424
10424
  prototype.toString = function toString(encoder) {
10425
10425
  const _encode = encoder ? function(value) {
10426
- return encoder.call(this, value, encode$1);
10427
- } : encode$1;
10426
+ return encoder.call(this, value, encode$2);
10427
+ } : encode$2;
10428
10428
 
10429
10429
  return this._pairs.map(function each(pair) {
10430
10430
  return _encode(pair[0]) + '=' + _encode(pair[1]);
@@ -10439,7 +10439,7 @@
10439
10439
  *
10440
10440
  * @returns {string} The encoded value.
10441
10441
  */
10442
- function encode(val) {
10442
+ function encode$1(val) {
10443
10443
  return encodeURIComponent(val).
10444
10444
  replace(/%3A/gi, ':').
10445
10445
  replace(/%24/g, '$').
@@ -10464,7 +10464,7 @@
10464
10464
  return url;
10465
10465
  }
10466
10466
 
10467
- const _encode = options && options.encode || encode;
10467
+ const _encode = options && options.encode || encode$1;
10468
10468
 
10469
10469
  const serializeFn = options && options.serialize;
10470
10470
 
@@ -10473,7 +10473,7 @@
10473
10473
  if (serializeFn) {
10474
10474
  serializedParams = serializeFn(params, options);
10475
10475
  } else {
10476
- serializedParams = utils$2.isURLSearchParams(params) ?
10476
+ serializedParams = utils$1.isURLSearchParams(params) ?
10477
10477
  params.toString() :
10478
10478
  new AxiosURLSearchParams(params, options).toString(_encode);
10479
10479
  }
@@ -10548,7 +10548,7 @@
10548
10548
  * @returns {void}
10549
10549
  */
10550
10550
  forEach(fn) {
10551
- utils$2.forEach(this.handlers, function forEachHandler(h) {
10551
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
10552
10552
  if (h !== null) {
10553
10553
  fn(h);
10554
10554
  }
@@ -10622,7 +10622,7 @@
10622
10622
 
10623
10623
  const origin = hasBrowserEnv && window.location.href || 'http://localhost';
10624
10624
 
10625
- const utils$1 = {
10625
+ const utils = {
10626
10626
  __proto__: null,
10627
10627
  hasBrowserEnv: hasBrowserEnv,
10628
10628
  hasStandardBrowserEnv: hasStandardBrowserEnv,
@@ -10632,14 +10632,14 @@
10632
10632
  };
10633
10633
 
10634
10634
  const platform = {
10635
- ...utils$1,
10635
+ ...utils,
10636
10636
  ...platform$1
10637
10637
  };
10638
10638
 
10639
10639
  function toURLEncodedForm(data, options) {
10640
10640
  return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
10641
10641
  visitor: function(value, key, path, helpers) {
10642
- if (platform.isNode && utils$2.isBuffer(value)) {
10642
+ if (platform.isNode && utils$1.isBuffer(value)) {
10643
10643
  this.append(key, value.toString('base64'));
10644
10644
  return false;
10645
10645
  }
@@ -10661,7 +10661,7 @@
10661
10661
  // foo.x.y.z
10662
10662
  // foo-x-y-z
10663
10663
  // foo x y z
10664
- return utils$2.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
10664
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
10665
10665
  return match[0] === '[]' ? '' : match[1] || match[0];
10666
10666
  });
10667
10667
  }
@@ -10673,7 +10673,7 @@
10673
10673
  *
10674
10674
  * @returns An object with the same keys and values as the array.
10675
10675
  */
10676
- function arrayToObject(arr) {
10676
+ function arrayToObject$1(arr) {
10677
10677
  const obj = {};
10678
10678
  const keys = Object.keys(arr);
10679
10679
  let i;
@@ -10701,10 +10701,10 @@
10701
10701
 
10702
10702
  const isNumericKey = Number.isFinite(+name);
10703
10703
  const isLast = index >= path.length;
10704
- name = !name && utils$2.isArray(target) ? target.length : name;
10704
+ name = !name && utils$1.isArray(target) ? target.length : name;
10705
10705
 
10706
10706
  if (isLast) {
10707
- if (utils$2.hasOwnProp(target, name)) {
10707
+ if (utils$1.hasOwnProp(target, name)) {
10708
10708
  target[name] = [target[name], value];
10709
10709
  } else {
10710
10710
  target[name] = value;
@@ -10713,23 +10713,23 @@
10713
10713
  return !isNumericKey;
10714
10714
  }
10715
10715
 
10716
- if (!target[name] || !utils$2.isObject(target[name])) {
10716
+ if (!target[name] || !utils$1.isObject(target[name])) {
10717
10717
  target[name] = [];
10718
10718
  }
10719
10719
 
10720
10720
  const result = buildPath(path, value, target[name], index);
10721
10721
 
10722
- if (result && utils$2.isArray(target[name])) {
10723
- target[name] = arrayToObject(target[name]);
10722
+ if (result && utils$1.isArray(target[name])) {
10723
+ target[name] = arrayToObject$1(target[name]);
10724
10724
  }
10725
10725
 
10726
10726
  return !isNumericKey;
10727
10727
  }
10728
10728
 
10729
- if (utils$2.isFormData(formData) && utils$2.isFunction(formData.entries)) {
10729
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
10730
10730
  const obj = {};
10731
10731
 
10732
- utils$2.forEachEntry(formData, (name, value) => {
10732
+ utils$1.forEachEntry(formData, (name, value) => {
10733
10733
  buildPath(parsePropPath(name), value, obj, 0);
10734
10734
  });
10735
10735
 
@@ -10750,10 +10750,10 @@
10750
10750
  * @returns {string} A stringified version of the rawValue.
10751
10751
  */
10752
10752
  function stringifySafely(rawValue, parser, encoder) {
10753
- if (utils$2.isString(rawValue)) {
10753
+ if (utils$1.isString(rawValue)) {
10754
10754
  try {
10755
10755
  (parser || JSON.parse)(rawValue);
10756
- return utils$2.trim(rawValue);
10756
+ return utils$1.trim(rawValue);
10757
10757
  } catch (e) {
10758
10758
  if (e.name !== 'SyntaxError') {
10759
10759
  throw e;
@@ -10764,7 +10764,7 @@
10764
10764
  return (0, JSON.stringify)(rawValue);
10765
10765
  }
10766
10766
 
10767
- const defaults = {
10767
+ const defaults$2 = {
10768
10768
 
10769
10769
  transitional: transitionalDefaults,
10770
10770
 
@@ -10773,31 +10773,31 @@
10773
10773
  transformRequest: [function transformRequest(data, headers) {
10774
10774
  const contentType = headers.getContentType() || '';
10775
10775
  const hasJSONContentType = contentType.indexOf('application/json') > -1;
10776
- const isObjectPayload = utils$2.isObject(data);
10776
+ const isObjectPayload = utils$1.isObject(data);
10777
10777
 
10778
- if (isObjectPayload && utils$2.isHTMLForm(data)) {
10778
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
10779
10779
  data = new FormData(data);
10780
10780
  }
10781
10781
 
10782
- const isFormData = utils$2.isFormData(data);
10782
+ const isFormData = utils$1.isFormData(data);
10783
10783
 
10784
10784
  if (isFormData) {
10785
10785
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
10786
10786
  }
10787
10787
 
10788
- if (utils$2.isArrayBuffer(data) ||
10789
- utils$2.isBuffer(data) ||
10790
- utils$2.isStream(data) ||
10791
- utils$2.isFile(data) ||
10792
- utils$2.isBlob(data) ||
10793
- utils$2.isReadableStream(data)
10788
+ if (utils$1.isArrayBuffer(data) ||
10789
+ utils$1.isBuffer(data) ||
10790
+ utils$1.isStream(data) ||
10791
+ utils$1.isFile(data) ||
10792
+ utils$1.isBlob(data) ||
10793
+ utils$1.isReadableStream(data)
10794
10794
  ) {
10795
10795
  return data;
10796
10796
  }
10797
- if (utils$2.isArrayBufferView(data)) {
10797
+ if (utils$1.isArrayBufferView(data)) {
10798
10798
  return data.buffer;
10799
10799
  }
10800
- if (utils$2.isURLSearchParams(data)) {
10800
+ if (utils$1.isURLSearchParams(data)) {
10801
10801
  headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
10802
10802
  return data.toString();
10803
10803
  }
@@ -10809,7 +10809,7 @@
10809
10809
  return toURLEncodedForm(data, this.formSerializer).toString();
10810
10810
  }
10811
10811
 
10812
- if ((isFileList = utils$2.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
10812
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
10813
10813
  const _FormData = this.env && this.env.FormData;
10814
10814
 
10815
10815
  return toFormData$1(
@@ -10829,15 +10829,15 @@
10829
10829
  }],
10830
10830
 
10831
10831
  transformResponse: [function transformResponse(data) {
10832
- const transitional = this.transitional || defaults.transitional;
10832
+ const transitional = this.transitional || defaults$2.transitional;
10833
10833
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
10834
10834
  const JSONRequested = this.responseType === 'json';
10835
10835
 
10836
- if (utils$2.isResponse(data) || utils$2.isReadableStream(data)) {
10836
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
10837
10837
  return data;
10838
10838
  }
10839
10839
 
10840
- if (data && utils$2.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
10840
+ if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
10841
10841
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
10842
10842
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
10843
10843
 
@@ -10885,13 +10885,13 @@
10885
10885
  }
10886
10886
  };
10887
10887
 
10888
- utils$2.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
10889
- defaults.headers[method] = {};
10888
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
10889
+ defaults$2.headers[method] = {};
10890
10890
  });
10891
10891
 
10892
10892
  // RawAxiosHeaders whose duplicates are ignored by node
10893
10893
  // c.f. https://nodejs.org/api/http.html#http_message_headers
10894
- const ignoreDuplicateOf = utils$2.toObjectSet([
10894
+ const ignoreDuplicateOf = utils$1.toObjectSet([
10895
10895
  'age', 'authorization', 'content-length', 'content-type', 'etag',
10896
10896
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
10897
10897
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
@@ -10952,7 +10952,7 @@
10952
10952
  return value;
10953
10953
  }
10954
10954
 
10955
- return utils$2.isArray(value) ? value.map(normalizeValue) : String(value);
10955
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
10956
10956
  }
10957
10957
 
10958
10958
  function parseTokens(str) {
@@ -10970,7 +10970,7 @@
10970
10970
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
10971
10971
 
10972
10972
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
10973
- if (utils$2.isFunction(filter)) {
10973
+ if (utils$1.isFunction(filter)) {
10974
10974
  return filter.call(this, value, header);
10975
10975
  }
10976
10976
 
@@ -10978,13 +10978,13 @@
10978
10978
  value = header;
10979
10979
  }
10980
10980
 
10981
- if (!utils$2.isString(value)) return;
10981
+ if (!utils$1.isString(value)) return;
10982
10982
 
10983
- if (utils$2.isString(filter)) {
10983
+ if (utils$1.isString(filter)) {
10984
10984
  return value.indexOf(filter) !== -1;
10985
10985
  }
10986
10986
 
10987
- if (utils$2.isRegExp(filter)) {
10987
+ if (utils$1.isRegExp(filter)) {
10988
10988
  return filter.test(value);
10989
10989
  }
10990
10990
  }
@@ -10997,7 +10997,7 @@
10997
10997
  }
10998
10998
 
10999
10999
  function buildAccessors(obj, header) {
11000
- const accessorName = utils$2.toCamelCase(' ' + header);
11000
+ const accessorName = utils$1.toCamelCase(' ' + header);
11001
11001
 
11002
11002
  ['get', 'set', 'has'].forEach(methodName => {
11003
11003
  Object.defineProperty(obj, methodName + accessorName, {
@@ -11024,7 +11024,7 @@
11024
11024
  throw new Error('header name must be a non-empty string');
11025
11025
  }
11026
11026
 
11027
- const key = utils$2.findKey(self, lHeader);
11027
+ const key = utils$1.findKey(self, lHeader);
11028
11028
 
11029
11029
  if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
11030
11030
  self[key || _header] = normalizeValue(_value);
@@ -11032,13 +11032,13 @@
11032
11032
  }
11033
11033
 
11034
11034
  const setHeaders = (headers, _rewrite) =>
11035
- utils$2.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
11035
+ utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
11036
11036
 
11037
- if (utils$2.isPlainObject(header) || header instanceof this.constructor) {
11037
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
11038
11038
  setHeaders(header, valueOrRewrite);
11039
- } else if(utils$2.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
11039
+ } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
11040
11040
  setHeaders(parseHeaders(header), valueOrRewrite);
11041
- } else if (utils$2.isHeaders(header)) {
11041
+ } else if (utils$1.isHeaders(header)) {
11042
11042
  for (const [key, value] of header.entries()) {
11043
11043
  setHeader(value, key, rewrite);
11044
11044
  }
@@ -11053,7 +11053,7 @@
11053
11053
  header = normalizeHeader(header);
11054
11054
 
11055
11055
  if (header) {
11056
- const key = utils$2.findKey(this, header);
11056
+ const key = utils$1.findKey(this, header);
11057
11057
 
11058
11058
  if (key) {
11059
11059
  const value = this[key];
@@ -11066,11 +11066,11 @@
11066
11066
  return parseTokens(value);
11067
11067
  }
11068
11068
 
11069
- if (utils$2.isFunction(parser)) {
11069
+ if (utils$1.isFunction(parser)) {
11070
11070
  return parser.call(this, value, key);
11071
11071
  }
11072
11072
 
11073
- if (utils$2.isRegExp(parser)) {
11073
+ if (utils$1.isRegExp(parser)) {
11074
11074
  return parser.exec(value);
11075
11075
  }
11076
11076
 
@@ -11083,7 +11083,7 @@
11083
11083
  header = normalizeHeader(header);
11084
11084
 
11085
11085
  if (header) {
11086
- const key = utils$2.findKey(this, header);
11086
+ const key = utils$1.findKey(this, header);
11087
11087
 
11088
11088
  return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
11089
11089
  }
@@ -11099,7 +11099,7 @@
11099
11099
  _header = normalizeHeader(_header);
11100
11100
 
11101
11101
  if (_header) {
11102
- const key = utils$2.findKey(self, _header);
11102
+ const key = utils$1.findKey(self, _header);
11103
11103
 
11104
11104
  if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
11105
11105
  delete self[key];
@@ -11109,7 +11109,7 @@
11109
11109
  }
11110
11110
  }
11111
11111
 
11112
- if (utils$2.isArray(header)) {
11112
+ if (utils$1.isArray(header)) {
11113
11113
  header.forEach(deleteHeader);
11114
11114
  } else {
11115
11115
  deleteHeader(header);
@@ -11138,8 +11138,8 @@
11138
11138
  const self = this;
11139
11139
  const headers = {};
11140
11140
 
11141
- utils$2.forEach(this, (value, header) => {
11142
- const key = utils$2.findKey(headers, header);
11141
+ utils$1.forEach(this, (value, header) => {
11142
+ const key = utils$1.findKey(headers, header);
11143
11143
 
11144
11144
  if (key) {
11145
11145
  self[key] = normalizeValue(value);
@@ -11168,8 +11168,8 @@
11168
11168
  toJSON(asStrings) {
11169
11169
  const obj = Object.create(null);
11170
11170
 
11171
- utils$2.forEach(this, (value, header) => {
11172
- value != null && value !== false && (obj[header] = asStrings && utils$2.isArray(value) ? value.join(', ') : value);
11171
+ utils$1.forEach(this, (value, header) => {
11172
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
11173
11173
  });
11174
11174
 
11175
11175
  return obj;
@@ -11216,7 +11216,7 @@
11216
11216
  }
11217
11217
  }
11218
11218
 
11219
- utils$2.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
11219
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
11220
11220
 
11221
11221
  return this;
11222
11222
  }
@@ -11225,7 +11225,7 @@
11225
11225
  AxiosHeaders$1.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
11226
11226
 
11227
11227
  // reserved names hotfix
11228
- utils$2.reduceDescriptors(AxiosHeaders$1.prototype, ({value}, key) => {
11228
+ utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({value}, key) => {
11229
11229
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
11230
11230
  return {
11231
11231
  get: () => value,
@@ -11235,7 +11235,7 @@
11235
11235
  }
11236
11236
  });
11237
11237
 
11238
- utils$2.freezeMethods(AxiosHeaders$1);
11238
+ utils$1.freezeMethods(AxiosHeaders$1);
11239
11239
 
11240
11240
  /**
11241
11241
  * Transform the data for a request or a response
@@ -11246,12 +11246,12 @@
11246
11246
  * @returns {*} The resulting transformed data
11247
11247
  */
11248
11248
  function transformData(fns, response) {
11249
- const config = this || defaults;
11249
+ const config = this || defaults$2;
11250
11250
  const context = response || config;
11251
11251
  const headers = AxiosHeaders$1.from(context.headers);
11252
11252
  let data = context.data;
11253
11253
 
11254
- utils$2.forEach(fns, function transform(fn) {
11254
+ utils$1.forEach(fns, function transform(fn) {
11255
11255
  data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
11256
11256
  });
11257
11257
 
@@ -11279,7 +11279,7 @@
11279
11279
  this.name = 'CanceledError';
11280
11280
  }
11281
11281
 
11282
- utils$2.inherits(CanceledError$1, AxiosError$1, {
11282
+ utils$1.inherits(CanceledError$1, AxiosError$1, {
11283
11283
  __CANCEL__: true
11284
11284
  });
11285
11285
 
@@ -11446,7 +11446,7 @@
11446
11446
  }), throttled[1]];
11447
11447
  };
11448
11448
 
11449
- const asyncDecorator = (fn) => (...args) => utils$2.asap(() => fn(...args));
11449
+ const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
11450
11450
 
11451
11451
  const isURLSameOrigin = platform.hasStandardBrowserEnv ?
11452
11452
 
@@ -11498,7 +11498,7 @@
11498
11498
  * @returns {boolean} True if URL shares the same origin, otherwise false
11499
11499
  */
11500
11500
  return function isURLSameOrigin(requestURL) {
11501
- const parsed = (utils$2.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
11501
+ const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
11502
11502
  return (parsed.protocol === originURL.protocol &&
11503
11503
  parsed.host === originURL.host);
11504
11504
  };
@@ -11518,11 +11518,11 @@
11518
11518
  write(name, value, expires, path, domain, secure) {
11519
11519
  const cookie = [name + '=' + encodeURIComponent(value)];
11520
11520
 
11521
- utils$2.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
11521
+ utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
11522
11522
 
11523
- utils$2.isString(path) && cookie.push('path=' + path);
11523
+ utils$1.isString(path) && cookie.push('path=' + path);
11524
11524
 
11525
- utils$2.isString(domain) && cookie.push('domain=' + domain);
11525
+ utils$1.isString(domain) && cookie.push('domain=' + domain);
11526
11526
 
11527
11527
  secure === true && cookie.push('secure');
11528
11528
 
@@ -11612,11 +11612,11 @@
11612
11612
  const config = {};
11613
11613
 
11614
11614
  function getMergedValue(target, source, caseless) {
11615
- if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
11616
- return utils$2.merge.call({caseless}, target, source);
11617
- } else if (utils$2.isPlainObject(source)) {
11618
- return utils$2.merge({}, source);
11619
- } else if (utils$2.isArray(source)) {
11615
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
11616
+ return utils$1.merge.call({caseless}, target, source);
11617
+ } else if (utils$1.isPlainObject(source)) {
11618
+ return utils$1.merge({}, source);
11619
+ } else if (utils$1.isArray(source)) {
11620
11620
  return source.slice();
11621
11621
  }
11622
11622
  return source;
@@ -11624,25 +11624,25 @@
11624
11624
 
11625
11625
  // eslint-disable-next-line consistent-return
11626
11626
  function mergeDeepProperties(a, b, caseless) {
11627
- if (!utils$2.isUndefined(b)) {
11627
+ if (!utils$1.isUndefined(b)) {
11628
11628
  return getMergedValue(a, b, caseless);
11629
- } else if (!utils$2.isUndefined(a)) {
11629
+ } else if (!utils$1.isUndefined(a)) {
11630
11630
  return getMergedValue(undefined, a, caseless);
11631
11631
  }
11632
11632
  }
11633
11633
 
11634
11634
  // eslint-disable-next-line consistent-return
11635
11635
  function valueFromConfig2(a, b) {
11636
- if (!utils$2.isUndefined(b)) {
11636
+ if (!utils$1.isUndefined(b)) {
11637
11637
  return getMergedValue(undefined, b);
11638
11638
  }
11639
11639
  }
11640
11640
 
11641
11641
  // eslint-disable-next-line consistent-return
11642
11642
  function defaultToConfig2(a, b) {
11643
- if (!utils$2.isUndefined(b)) {
11643
+ if (!utils$1.isUndefined(b)) {
11644
11644
  return getMergedValue(undefined, b);
11645
- } else if (!utils$2.isUndefined(a)) {
11645
+ } else if (!utils$1.isUndefined(a)) {
11646
11646
  return getMergedValue(undefined, a);
11647
11647
  }
11648
11648
  }
@@ -11688,10 +11688,10 @@
11688
11688
  headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
11689
11689
  };
11690
11690
 
11691
- utils$2.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
11691
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
11692
11692
  const merge = mergeMap[prop] || mergeDeepProperties;
11693
11693
  const configValue = merge(config1[prop], config2[prop], prop);
11694
- (utils$2.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
11694
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
11695
11695
  });
11696
11696
 
11697
11697
  return config;
@@ -11715,7 +11715,7 @@
11715
11715
 
11716
11716
  let contentType;
11717
11717
 
11718
- if (utils$2.isFormData(data)) {
11718
+ if (utils$1.isFormData(data)) {
11719
11719
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
11720
11720
  headers.setContentType(undefined); // Let the browser set it
11721
11721
  } else if ((contentType = headers.getContentType()) !== false) {
@@ -11730,7 +11730,7 @@
11730
11730
  // Specifically not if we're in a web worker, or react-native.
11731
11731
 
11732
11732
  if (platform.hasStandardBrowserEnv) {
11733
- withXSRFToken && utils$2.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
11733
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
11734
11734
 
11735
11735
  if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
11736
11736
  // Add xsrf header
@@ -11871,13 +11871,13 @@
11871
11871
 
11872
11872
  // Add headers to the request
11873
11873
  if ('setRequestHeader' in request) {
11874
- utils$2.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
11874
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
11875
11875
  request.setRequestHeader(key, val);
11876
11876
  });
11877
11877
  }
11878
11878
 
11879
11879
  // Add withCredentials to request if needed
11880
- if (!utils$2.isUndefined(_config.withCredentials)) {
11880
+ if (!utils$1.isUndefined(_config.withCredentials)) {
11881
11881
  request.withCredentials = !!_config.withCredentials;
11882
11882
  }
11883
11883
 
@@ -11969,7 +11969,7 @@
11969
11969
 
11970
11970
  const {signal} = controller;
11971
11971
 
11972
- signal.unsubscribe = () => utils$2.asap(unsubscribe);
11972
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
11973
11973
 
11974
11974
  return signal;
11975
11975
  }
@@ -12097,7 +12097,7 @@
12097
12097
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
12098
12098
 
12099
12099
  const supportsResponseStream = isReadableStreamSupported &&
12100
- test(() => utils$2.isReadableStream(new Response('').body));
12100
+ test(() => utils$1.isReadableStream(new Response('').body));
12101
12101
 
12102
12102
 
12103
12103
  const resolvers = {
@@ -12106,7 +12106,7 @@
12106
12106
 
12107
12107
  isFetchSupported && (((res) => {
12108
12108
  ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
12109
- !resolvers[type] && (resolvers[type] = utils$2.isFunction(res[type]) ? (res) => res[type]() :
12109
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
12110
12110
  (_, config) => {
12111
12111
  throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
12112
12112
  });
@@ -12118,11 +12118,11 @@
12118
12118
  return 0;
12119
12119
  }
12120
12120
 
12121
- if(utils$2.isBlob(body)) {
12121
+ if(utils$1.isBlob(body)) {
12122
12122
  return body.size;
12123
12123
  }
12124
12124
 
12125
- if(utils$2.isSpecCompliantForm(body)) {
12125
+ if(utils$1.isSpecCompliantForm(body)) {
12126
12126
  const _request = new Request(platform.origin, {
12127
12127
  method: 'POST',
12128
12128
  body,
@@ -12130,21 +12130,21 @@
12130
12130
  return (await _request.arrayBuffer()).byteLength;
12131
12131
  }
12132
12132
 
12133
- if(utils$2.isArrayBufferView(body) || utils$2.isArrayBuffer(body)) {
12133
+ if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
12134
12134
  return body.byteLength;
12135
12135
  }
12136
12136
 
12137
- if(utils$2.isURLSearchParams(body)) {
12137
+ if(utils$1.isURLSearchParams(body)) {
12138
12138
  body = body + '';
12139
12139
  }
12140
12140
 
12141
- if(utils$2.isString(body)) {
12141
+ if(utils$1.isString(body)) {
12142
12142
  return (await encodeText(body)).byteLength;
12143
12143
  }
12144
12144
  };
12145
12145
 
12146
12146
  const resolveBodyLength = async (headers, body) => {
12147
- const length = utils$2.toFiniteNumber(headers.getContentLength());
12147
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
12148
12148
 
12149
12149
  return length == null ? getBodyLength(body) : length;
12150
12150
  };
@@ -12190,7 +12190,7 @@
12190
12190
 
12191
12191
  let contentTypeHeader;
12192
12192
 
12193
- if (utils$2.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
12193
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
12194
12194
  headers.setContentType(contentTypeHeader);
12195
12195
  }
12196
12196
 
@@ -12204,7 +12204,7 @@
12204
12204
  }
12205
12205
  }
12206
12206
 
12207
- if (!utils$2.isString(withCredentials)) {
12207
+ if (!utils$1.isString(withCredentials)) {
12208
12208
  withCredentials = withCredentials ? 'include' : 'omit';
12209
12209
  }
12210
12210
 
@@ -12232,7 +12232,7 @@
12232
12232
  options[prop] = response[prop];
12233
12233
  });
12234
12234
 
12235
- const responseContentLength = utils$2.toFiniteNumber(response.headers.get('content-length'));
12235
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
12236
12236
 
12237
12237
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
12238
12238
  responseContentLength,
@@ -12250,7 +12250,7 @@
12250
12250
 
12251
12251
  responseType = responseType || 'text';
12252
12252
 
12253
- let responseData = await resolvers[utils$2.findKey(resolvers, responseType) || 'text'](response, config);
12253
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
12254
12254
 
12255
12255
  !isStreamResponse && unsubscribe && unsubscribe();
12256
12256
 
@@ -12286,7 +12286,7 @@
12286
12286
  fetch: fetchAdapter
12287
12287
  };
12288
12288
 
12289
- utils$2.forEach(knownAdapters, (fn, value) => {
12289
+ utils$1.forEach(knownAdapters, (fn, value) => {
12290
12290
  if (fn) {
12291
12291
  try {
12292
12292
  Object.defineProperty(fn, 'name', {value});
@@ -12299,11 +12299,11 @@
12299
12299
 
12300
12300
  const renderReason = (reason) => `- ${reason}`;
12301
12301
 
12302
- const isResolvedHandle = (adapter) => utils$2.isFunction(adapter) || adapter === null || adapter === false;
12302
+ const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
12303
12303
 
12304
12304
  const adapters = {
12305
12305
  getAdapter: (adapters) => {
12306
- adapters = utils$2.isArray(adapters) ? adapters : [adapters];
12306
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
12307
12307
 
12308
12308
  const {length} = adapters;
12309
12309
  let nameOrAdapter;
@@ -12393,7 +12393,7 @@
12393
12393
  config.headers.setContentType('application/x-www-form-urlencoded', false);
12394
12394
  }
12395
12395
 
12396
- const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
12396
+ const adapter = adapters.getAdapter(config.adapter || defaults$2.adapter);
12397
12397
 
12398
12398
  return adapter(config).then(function onAdapterResolution(response) {
12399
12399
  throwIfCancellationRequested(config);
@@ -12592,7 +12592,7 @@
12592
12592
  }
12593
12593
 
12594
12594
  if (paramsSerializer != null) {
12595
- if (utils$2.isFunction(paramsSerializer)) {
12595
+ if (utils$1.isFunction(paramsSerializer)) {
12596
12596
  config.paramsSerializer = {
12597
12597
  serialize: paramsSerializer
12598
12598
  };
@@ -12608,12 +12608,12 @@
12608
12608
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
12609
12609
 
12610
12610
  // Flatten headers
12611
- let contextHeaders = headers && utils$2.merge(
12611
+ let contextHeaders = headers && utils$1.merge(
12612
12612
  headers.common,
12613
12613
  headers[config.method]
12614
12614
  );
12615
12615
 
12616
- headers && utils$2.forEach(
12616
+ headers && utils$1.forEach(
12617
12617
  ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
12618
12618
  (method) => {
12619
12619
  delete headers[method];
@@ -12700,7 +12700,7 @@
12700
12700
  };
12701
12701
 
12702
12702
  // Provide aliases for supported request methods
12703
- utils$2.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
12703
+ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
12704
12704
  /*eslint func-names:0*/
12705
12705
  Axios$1.prototype[method] = function(url, config) {
12706
12706
  return this.request(mergeConfig$1(config || {}, {
@@ -12711,7 +12711,7 @@
12711
12711
  };
12712
12712
  });
12713
12713
 
12714
- utils$2.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
12714
+ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
12715
12715
  /*eslint func-names:0*/
12716
12716
 
12717
12717
  function generateHTTPMethod(isForm) {
@@ -12897,7 +12897,7 @@
12897
12897
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
12898
12898
  */
12899
12899
  function isAxiosError$1(payload) {
12900
- return utils$2.isObject(payload) && (payload.isAxiosError === true);
12900
+ return utils$1.isObject(payload) && (payload.isAxiosError === true);
12901
12901
  }
12902
12902
 
12903
12903
  const HttpStatusCode$1 = {
@@ -12982,10 +12982,10 @@
12982
12982
  const instance = bind(Axios$1.prototype.request, context);
12983
12983
 
12984
12984
  // Copy axios.prototype to instance
12985
- utils$2.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
12985
+ utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
12986
12986
 
12987
12987
  // Copy context to instance
12988
- utils$2.extend(instance, context, null, {allOwnKeys: true});
12988
+ utils$1.extend(instance, context, null, {allOwnKeys: true});
12989
12989
 
12990
12990
  // Factory for creating new instances
12991
12991
  instance.create = function create(instanceConfig) {
@@ -12996,7 +12996,7 @@
12996
12996
  }
12997
12997
 
12998
12998
  // Create the default instance to be exported
12999
- const axios = createInstance(defaults);
12999
+ const axios = createInstance(defaults$2);
13000
13000
 
13001
13001
  // Expose Axios class to allow class inheritance
13002
13002
  axios.Axios = Axios$1;
@@ -13029,7 +13029,7 @@
13029
13029
 
13030
13030
  axios.AxiosHeaders = AxiosHeaders$1;
13031
13031
 
13032
- axios.formToJSON = thing => formDataToJSON(utils$2.isHTMLForm(thing) ? new FormData(thing) : thing);
13032
+ axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
13033
13033
 
13034
13034
  axios.getAdapter = adapters.getAdapter;
13035
13035
 
@@ -13059,2648 +13059,975 @@
13059
13059
  mergeConfig
13060
13060
  } = axios;
13061
13061
 
13062
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
13062
+ const replace = String.prototype.replace;
13063
+ const percentTwenties = /%20/g;
13063
13064
 
13064
- function getDefaultExportFromCjs (x) {
13065
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
13066
- }
13065
+ const Format = {
13066
+ RFC1738: 'RFC1738',
13067
+ RFC3986: 'RFC3986',
13068
+ };
13067
13069
 
13068
- function getAugmentedNamespace(n) {
13069
- if (n.__esModule) return n;
13070
- var f = n.default;
13071
- if (typeof f == "function") {
13072
- var a = function a () {
13073
- if (this instanceof a) {
13074
- return Reflect.construct(f, arguments, this.constructor);
13075
- }
13076
- return f.apply(this, arguments);
13077
- };
13078
- a.prototype = f.prototype;
13079
- } else a = {};
13080
- Object.defineProperty(a, '__esModule', {value: true});
13081
- Object.keys(n).forEach(function (k) {
13082
- var d = Object.getOwnPropertyDescriptor(n, k);
13083
- Object.defineProperty(a, k, d.get ? d : {
13084
- enumerable: true,
13085
- get: function () {
13086
- return n[k];
13087
- }
13088
- });
13089
- });
13090
- return a;
13091
- }
13070
+ const formatters = {
13071
+ RFC1738: function (value) {
13072
+ return replace.call(value, percentTwenties, '+')
13073
+ },
13074
+ RFC3986: function (value) {
13075
+ return String(value)
13076
+ },
13077
+ };
13078
+ const RFC1738 = Format.RFC1738;
13092
13079
 
13093
- var esErrors;
13094
- var hasRequiredEsErrors;
13080
+ const formats = Format.RFC3986;
13095
13081
 
13096
- function requireEsErrors () {
13097
- if (hasRequiredEsErrors) return esErrors;
13098
- hasRequiredEsErrors = 1;
13082
+ const has$2 = Object.prototype.hasOwnProperty;
13083
+ const isArray$2 = Array.isArray;
13099
13084
 
13100
- /** @type {import('.')} */
13101
- esErrors = Error;
13102
- return esErrors;
13103
- }
13085
+ const hexTable = (function () {
13086
+ const array = [];
13087
+ for (let i = 0; i < 256; ++i) {
13088
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
13089
+ }
13104
13090
 
13105
- var _eval;
13106
- var hasRequired_eval;
13091
+ return array
13092
+ })();
13107
13093
 
13108
- function require_eval () {
13109
- if (hasRequired_eval) return _eval;
13110
- hasRequired_eval = 1;
13094
+ const compactQueue = function compactQueue(queue) {
13095
+ while (queue.length > 1) {
13096
+ const item = queue.pop();
13097
+ const obj = item.obj[item.prop];
13111
13098
 
13112
- /** @type {import('./eval')} */
13113
- _eval = EvalError;
13114
- return _eval;
13115
- }
13099
+ if (isArray$2(obj)) {
13100
+ const compacted = [];
13116
13101
 
13117
- var range;
13118
- var hasRequiredRange;
13102
+ for (let j = 0; j < obj.length; ++j) {
13103
+ if (typeof obj[j] !== 'undefined') {
13104
+ compacted.push(obj[j]);
13105
+ }
13106
+ }
13119
13107
 
13120
- function requireRange () {
13121
- if (hasRequiredRange) return range;
13122
- hasRequiredRange = 1;
13108
+ item.obj[item.prop] = compacted;
13109
+ }
13110
+ }
13111
+ };
13123
13112
 
13124
- /** @type {import('./range')} */
13125
- range = RangeError;
13126
- return range;
13127
- }
13113
+ const arrayToObject = function arrayToObject(source, options) {
13114
+ const obj = options && options.plainObjects ? Object.create(null) : {};
13115
+ for (let i = 0; i < source.length; ++i) {
13116
+ if (typeof source[i] !== 'undefined') {
13117
+ obj[i] = source[i];
13118
+ }
13119
+ }
13128
13120
 
13129
- var ref;
13130
- var hasRequiredRef;
13121
+ return obj
13122
+ };
13131
13123
 
13132
- function requireRef () {
13133
- if (hasRequiredRef) return ref;
13134
- hasRequiredRef = 1;
13124
+ const merge = function merge(target, source, options) {
13125
+ /* eslint no-param-reassign: 0 */
13126
+ if (!source) {
13127
+ return target
13128
+ }
13129
+
13130
+ if (typeof source !== 'object') {
13131
+ if (isArray$2(target)) {
13132
+ target.push(source);
13133
+ } else if (target && typeof target === 'object') {
13134
+ if (
13135
+ (options && (options.plainObjects || options.allowPrototypes)) ||
13136
+ !has$2.call(Object.prototype, source)
13137
+ ) {
13138
+ target[source] = true;
13139
+ }
13140
+ } else {
13141
+ return [target, source]
13142
+ }
13135
13143
 
13136
- /** @type {import('./ref')} */
13137
- ref = ReferenceError;
13138
- return ref;
13139
- }
13144
+ return target
13145
+ }
13140
13146
 
13141
- var syntax;
13142
- var hasRequiredSyntax;
13147
+ if (!target || typeof target !== 'object') {
13148
+ return [target].concat(source)
13149
+ }
13143
13150
 
13144
- function requireSyntax () {
13145
- if (hasRequiredSyntax) return syntax;
13146
- hasRequiredSyntax = 1;
13151
+ let mergeTarget = target;
13152
+ if (isArray$2(target) && !isArray$2(source)) {
13153
+ mergeTarget = arrayToObject(target, options);
13154
+ }
13147
13155
 
13148
- /** @type {import('./syntax')} */
13149
- syntax = SyntaxError;
13150
- return syntax;
13151
- }
13156
+ if (isArray$2(target) && isArray$2(source)) {
13157
+ source.forEach(function (item, i) {
13158
+ if (has$2.call(target, i)) {
13159
+ const targetItem = target[i];
13160
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
13161
+ target[i] = merge(targetItem, item, options);
13162
+ } else {
13163
+ target.push(item);
13164
+ }
13165
+ } else {
13166
+ target[i] = item;
13167
+ }
13168
+ });
13169
+ return target
13170
+ }
13152
13171
 
13153
- var type;
13154
- var hasRequiredType;
13172
+ return Object.keys(source).reduce(function (acc, key) {
13173
+ const value = source[key];
13155
13174
 
13156
- function requireType () {
13157
- if (hasRequiredType) return type;
13158
- hasRequiredType = 1;
13175
+ if (has$2.call(acc, key)) {
13176
+ acc[key] = merge(acc[key], value, options);
13177
+ } else {
13178
+ acc[key] = value;
13179
+ }
13180
+ return acc
13181
+ }, mergeTarget)
13182
+ };
13159
13183
 
13160
- /** @type {import('./type')} */
13161
- type = TypeError;
13162
- return type;
13163
- }
13184
+ const decode = function (str, decoder, charset) {
13185
+ const strWithoutPlus = str.replace(/\+/g, ' ');
13186
+ if (charset === 'iso-8859-1') {
13187
+ // unescape never throws, no try...catch needed:
13188
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape)
13189
+ }
13190
+ // utf-8
13191
+ try {
13192
+ return decodeURIComponent(strWithoutPlus)
13193
+ } catch (e) {
13194
+ return strWithoutPlus
13195
+ }
13196
+ };
13164
13197
 
13165
- var uri;
13166
- var hasRequiredUri;
13198
+ const limit = 1024;
13167
13199
 
13168
- function requireUri () {
13169
- if (hasRequiredUri) return uri;
13170
- hasRequiredUri = 1;
13200
+ const encode = function encode(str, defaultEncoder, charset, kind, format) {
13201
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
13202
+ // It has been adapted here for stricter adherence to RFC 3986
13203
+ if (str.length === 0) {
13204
+ return str
13205
+ }
13171
13206
 
13172
- /** @type {import('./uri')} */
13173
- uri = URIError;
13174
- return uri;
13175
- }
13207
+ let string = str;
13208
+ if (typeof str === 'symbol') {
13209
+ string = Symbol.prototype.toString.call(str);
13210
+ } else if (typeof str !== 'string') {
13211
+ string = String(str);
13212
+ }
13176
13213
 
13177
- var shams;
13178
- var hasRequiredShams;
13214
+ if (charset === 'iso-8859-1') {
13215
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
13216
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B'
13217
+ })
13218
+ }
13179
13219
 
13180
- function requireShams () {
13181
- if (hasRequiredShams) return shams;
13182
- hasRequiredShams = 1;
13220
+ let out = '';
13221
+ for (let j = 0; j < string.length; j += limit) {
13222
+ const segment = string.length >= limit ? string.slice(j, j + limit) : string;
13223
+ const arr = [];
13224
+
13225
+ for (let i = 0; i < segment.length; ++i) {
13226
+ let c = segment.charCodeAt(i);
13227
+ if (
13228
+ c === 0x2d || // -
13229
+ c === 0x2e || // .
13230
+ c === 0x5f || // _
13231
+ c === 0x7e || // ~
13232
+ (c >= 0x30 && c <= 0x39) || // 0-9
13233
+ (c >= 0x41 && c <= 0x5a) || // a-z
13234
+ (c >= 0x61 && c <= 0x7a) || // A-Z
13235
+ (format === RFC1738 && (c === 0x28 || c === 0x29)) // ( )
13236
+ ) {
13237
+ arr[arr.length] = segment.charAt(i);
13238
+ continue
13239
+ }
13183
13240
 
13184
- /* eslint complexity: [2, 18], max-statements: [2, 33] */
13185
- shams = function hasSymbols() {
13186
- if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
13187
- if (typeof Symbol.iterator === 'symbol') { return true; }
13241
+ if (c < 0x80) {
13242
+ arr[arr.length] = hexTable[c];
13243
+ continue
13244
+ }
13188
13245
 
13189
- var obj = {};
13190
- var sym = Symbol('test');
13191
- var symObj = Object(sym);
13192
- if (typeof sym === 'string') { return false; }
13246
+ if (c < 0x800) {
13247
+ arr[arr.length] = hexTable[0xc0 | (c >> 6)] + hexTable[0x80 | (c & 0x3f)];
13248
+ continue
13249
+ }
13193
13250
 
13194
- if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
13195
- if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
13251
+ if (c < 0xd800 || c >= 0xe000) {
13252
+ arr[arr.length] =
13253
+ hexTable[0xe0 | (c >> 12)] +
13254
+ hexTable[0x80 | ((c >> 6) & 0x3f)] +
13255
+ hexTable[0x80 | (c & 0x3f)];
13256
+ continue
13257
+ }
13196
13258
 
13197
- // temp disabled per https://github.com/ljharb/object.assign/issues/17
13198
- // if (sym instanceof Symbol) { return false; }
13199
- // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
13200
- // if (!(symObj instanceof Symbol)) { return false; }
13259
+ i += 1;
13260
+ c = 0x10000 + (((c & 0x3ff) << 10) | (segment.charCodeAt(i) & 0x3ff));
13201
13261
 
13202
- // if (typeof Symbol.prototype.toString !== 'function') { return false; }
13203
- // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
13262
+ arr[arr.length] =
13263
+ hexTable[0xf0 | (c >> 18)] +
13264
+ hexTable[0x80 | ((c >> 12) & 0x3f)] +
13265
+ hexTable[0x80 | ((c >> 6) & 0x3f)] +
13266
+ hexTable[0x80 | (c & 0x3f)];
13267
+ }
13204
13268
 
13205
- var symVal = 42;
13206
- obj[sym] = symVal;
13207
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
13208
- if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
13269
+ out += arr.join('');
13270
+ }
13209
13271
 
13210
- if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
13272
+ return out
13273
+ };
13211
13274
 
13212
- var syms = Object.getOwnPropertySymbols(obj);
13213
- if (syms.length !== 1 || syms[0] !== sym) { return false; }
13275
+ const compact = function compact(value) {
13276
+ const queue = [{ obj: { o: value }, prop: 'o' }];
13277
+ const refs = [];
13278
+
13279
+ for (let i = 0; i < queue.length; ++i) {
13280
+ const item = queue[i];
13281
+ const obj = item.obj[item.prop];
13282
+
13283
+ const keys = Object.keys(obj);
13284
+ for (let j = 0; j < keys.length; ++j) {
13285
+ const key = keys[j];
13286
+ const val = obj[key];
13287
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
13288
+ queue.push({ obj: obj, prop: key });
13289
+ refs.push(val);
13290
+ }
13291
+ }
13292
+ }
13214
13293
 
13215
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
13294
+ compactQueue(queue);
13216
13295
 
13217
- if (typeof Object.getOwnPropertyDescriptor === 'function') {
13218
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
13219
- if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
13220
- }
13296
+ return value
13297
+ };
13221
13298
 
13222
- return true;
13223
- };
13224
- return shams;
13225
- }
13299
+ const isRegExp = function isRegExp(obj) {
13300
+ return Object.prototype.toString.call(obj) === '[object RegExp]'
13301
+ };
13226
13302
 
13227
- var hasSymbols;
13228
- var hasRequiredHasSymbols;
13303
+ const isBuffer = function isBuffer(obj) {
13304
+ if (!obj || typeof obj !== 'object') {
13305
+ return false
13306
+ }
13229
13307
 
13230
- function requireHasSymbols () {
13231
- if (hasRequiredHasSymbols) return hasSymbols;
13232
- hasRequiredHasSymbols = 1;
13308
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj))
13309
+ };
13233
13310
 
13234
- var origSymbol = typeof Symbol !== 'undefined' && Symbol;
13235
- var hasSymbolSham = requireShams();
13311
+ const combine = function combine(a, b) {
13312
+ return [].concat(a, b)
13313
+ };
13236
13314
 
13237
- hasSymbols = function hasNativeSymbols() {
13238
- if (typeof origSymbol !== 'function') { return false; }
13239
- if (typeof Symbol !== 'function') { return false; }
13240
- if (typeof origSymbol('foo') !== 'symbol') { return false; }
13241
- if (typeof Symbol('bar') !== 'symbol') { return false; }
13315
+ const maybeMap = function maybeMap(val, fn) {
13316
+ if (isArray$2(val)) {
13317
+ const mapped = [];
13318
+ for (let i = 0; i < val.length; i += 1) {
13319
+ mapped.push(fn(val[i]));
13320
+ }
13321
+ return mapped
13322
+ }
13323
+ return fn(val)
13324
+ };
13242
13325
 
13243
- return hasSymbolSham();
13244
- };
13245
- return hasSymbols;
13246
- }
13247
-
13248
- var hasProto;
13249
- var hasRequiredHasProto;
13326
+ const has$1 = Object.prototype.hasOwnProperty;
13250
13327
 
13251
- function requireHasProto () {
13252
- if (hasRequiredHasProto) return hasProto;
13253
- hasRequiredHasProto = 1;
13254
-
13255
- var test = {
13256
- __proto__: null,
13257
- foo: {}
13258
- };
13259
-
13260
- var $Object = Object;
13261
-
13262
- /** @type {import('.')} */
13263
- hasProto = function hasProto() {
13264
- // @ts-expect-error: TS errors on an inherited property for some reason
13265
- return { __proto__: test }.foo === test.foo
13266
- && !(test instanceof $Object);
13267
- };
13268
- return hasProto;
13269
- }
13270
-
13271
- var implementation;
13272
- var hasRequiredImplementation;
13273
-
13274
- function requireImplementation () {
13275
- if (hasRequiredImplementation) return implementation;
13276
- hasRequiredImplementation = 1;
13277
-
13278
- /* eslint no-invalid-this: 1 */
13279
-
13280
- var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
13281
- var toStr = Object.prototype.toString;
13282
- var max = Math.max;
13283
- var funcType = '[object Function]';
13284
-
13285
- var concatty = function concatty(a, b) {
13286
- var arr = [];
13287
-
13288
- for (var i = 0; i < a.length; i += 1) {
13289
- arr[i] = a[i];
13290
- }
13291
- for (var j = 0; j < b.length; j += 1) {
13292
- arr[j + a.length] = b[j];
13293
- }
13328
+ const arrayPrefixGenerators = {
13329
+ brackets: function brackets(prefix) {
13330
+ return prefix + '[]'
13331
+ },
13332
+ comma: 'comma',
13333
+ indices: function indices(prefix, key) {
13334
+ return prefix + '[' + key + ']'
13335
+ },
13336
+ repeat: function repeat(prefix) {
13337
+ return prefix
13338
+ },
13339
+ };
13294
13340
 
13295
- return arr;
13296
- };
13297
-
13298
- var slicy = function slicy(arrLike, offset) {
13299
- var arr = [];
13300
- for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
13301
- arr[j] = arrLike[i];
13302
- }
13303
- return arr;
13304
- };
13305
-
13306
- var joiny = function (arr, joiner) {
13307
- var str = '';
13308
- for (var i = 0; i < arr.length; i += 1) {
13309
- str += arr[i];
13310
- if (i + 1 < arr.length) {
13311
- str += joiner;
13312
- }
13313
- }
13314
- return str;
13315
- };
13316
-
13317
- implementation = function bind(that) {
13318
- var target = this;
13319
- if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
13320
- throw new TypeError(ERROR_MESSAGE + target);
13321
- }
13322
- var args = slicy(arguments, 1);
13323
-
13324
- var bound;
13325
- var binder = function () {
13326
- if (this instanceof bound) {
13327
- var result = target.apply(
13328
- this,
13329
- concatty(args, arguments)
13330
- );
13331
- if (Object(result) === result) {
13332
- return result;
13333
- }
13334
- return this;
13335
- }
13336
- return target.apply(
13337
- that,
13338
- concatty(args, arguments)
13339
- );
13340
-
13341
- };
13342
-
13343
- var boundLength = max(0, target.length - args.length);
13344
- var boundArgs = [];
13345
- for (var i = 0; i < boundLength; i++) {
13346
- boundArgs[i] = '$' + i;
13347
- }
13348
-
13349
- bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
13350
-
13351
- if (target.prototype) {
13352
- var Empty = function Empty() {};
13353
- Empty.prototype = target.prototype;
13354
- bound.prototype = new Empty();
13355
- Empty.prototype = null;
13356
- }
13357
-
13358
- return bound;
13359
- };
13360
- return implementation;
13361
- }
13362
-
13363
- var functionBind;
13364
- var hasRequiredFunctionBind;
13365
-
13366
- function requireFunctionBind () {
13367
- if (hasRequiredFunctionBind) return functionBind;
13368
- hasRequiredFunctionBind = 1;
13369
-
13370
- var implementation = requireImplementation();
13371
-
13372
- functionBind = Function.prototype.bind || implementation;
13373
- return functionBind;
13374
- }
13375
-
13376
- var hasown;
13377
- var hasRequiredHasown;
13378
-
13379
- function requireHasown () {
13380
- if (hasRequiredHasown) return hasown;
13381
- hasRequiredHasown = 1;
13382
-
13383
- var call = Function.prototype.call;
13384
- var $hasOwn = Object.prototype.hasOwnProperty;
13385
- var bind = requireFunctionBind();
13386
-
13387
- /** @type {import('.')} */
13388
- hasown = bind.call(call, $hasOwn);
13389
- return hasown;
13390
- }
13391
-
13392
- var getIntrinsic;
13393
- var hasRequiredGetIntrinsic;
13394
-
13395
- function requireGetIntrinsic () {
13396
- if (hasRequiredGetIntrinsic) return getIntrinsic;
13397
- hasRequiredGetIntrinsic = 1;
13398
-
13399
- var undefined$1;
13400
-
13401
- var $Error = /*@__PURE__*/ requireEsErrors();
13402
- var $EvalError = /*@__PURE__*/ require_eval();
13403
- var $RangeError = /*@__PURE__*/ requireRange();
13404
- var $ReferenceError = /*@__PURE__*/ requireRef();
13405
- var $SyntaxError = /*@__PURE__*/ requireSyntax();
13406
- var $TypeError = /*@__PURE__*/ requireType();
13407
- var $URIError = /*@__PURE__*/ requireUri();
13408
-
13409
- var $Function = Function;
13410
-
13411
- // eslint-disable-next-line consistent-return
13412
- var getEvalledConstructor = function (expressionSyntax) {
13413
- try {
13414
- return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
13415
- } catch (e) {}
13416
- };
13417
-
13418
- var $gOPD = Object.getOwnPropertyDescriptor;
13419
- if ($gOPD) {
13420
- try {
13421
- $gOPD({}, '');
13422
- } catch (e) {
13423
- $gOPD = null; // this is IE 8, which has a broken gOPD
13424
- }
13425
- }
13426
-
13427
- var throwTypeError = function () {
13428
- throw new $TypeError();
13429
- };
13430
- var ThrowTypeError = $gOPD
13431
- ? (function () {
13432
- try {
13433
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
13434
- arguments.callee; // IE 8 does not throw here
13435
- return throwTypeError;
13436
- } catch (calleeThrows) {
13437
- try {
13438
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
13439
- return $gOPD(arguments, 'callee').get;
13440
- } catch (gOPDthrows) {
13441
- return throwTypeError;
13442
- }
13443
- }
13444
- }())
13445
- : throwTypeError;
13446
-
13447
- var hasSymbols = requireHasSymbols()();
13448
- var hasProto = /*@__PURE__*/ requireHasProto()();
13449
-
13450
- var getProto = Object.getPrototypeOf || (
13451
- hasProto
13452
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
13453
- : null
13454
- );
13455
-
13456
- var needsEval = {};
13457
-
13458
- var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
13459
-
13460
- var INTRINSICS = {
13461
- __proto__: null,
13462
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
13463
- '%Array%': Array,
13464
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
13465
- '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
13466
- '%AsyncFromSyncIteratorPrototype%': undefined$1,
13467
- '%AsyncFunction%': needsEval,
13468
- '%AsyncGenerator%': needsEval,
13469
- '%AsyncGeneratorFunction%': needsEval,
13470
- '%AsyncIteratorPrototype%': needsEval,
13471
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
13472
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
13473
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
13474
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
13475
- '%Boolean%': Boolean,
13476
- '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
13477
- '%Date%': Date,
13478
- '%decodeURI%': decodeURI,
13479
- '%decodeURIComponent%': decodeURIComponent,
13480
- '%encodeURI%': encodeURI,
13481
- '%encodeURIComponent%': encodeURIComponent,
13482
- '%Error%': $Error,
13483
- '%eval%': eval, // eslint-disable-line no-eval
13484
- '%EvalError%': $EvalError,
13485
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
13486
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
13487
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
13488
- '%Function%': $Function,
13489
- '%GeneratorFunction%': needsEval,
13490
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
13491
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
13492
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
13493
- '%isFinite%': isFinite,
13494
- '%isNaN%': isNaN,
13495
- '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
13496
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
13497
- '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
13498
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
13499
- '%Math%': Math,
13500
- '%Number%': Number,
13501
- '%Object%': Object,
13502
- '%parseFloat%': parseFloat,
13503
- '%parseInt%': parseInt,
13504
- '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
13505
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
13506
- '%RangeError%': $RangeError,
13507
- '%ReferenceError%': $ReferenceError,
13508
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
13509
- '%RegExp%': RegExp,
13510
- '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
13511
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
13512
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
13513
- '%String%': String,
13514
- '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
13515
- '%Symbol%': hasSymbols ? Symbol : undefined$1,
13516
- '%SyntaxError%': $SyntaxError,
13517
- '%ThrowTypeError%': ThrowTypeError,
13518
- '%TypedArray%': TypedArray,
13519
- '%TypeError%': $TypeError,
13520
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
13521
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
13522
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
13523
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
13524
- '%URIError%': $URIError,
13525
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
13526
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
13527
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
13528
- };
13529
-
13530
- if (getProto) {
13531
- try {
13532
- null.error; // eslint-disable-line no-unused-expressions
13533
- } catch (e) {
13534
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
13535
- var errorProto = getProto(getProto(e));
13536
- INTRINSICS['%Error.prototype%'] = errorProto;
13537
- }
13538
- }
13539
-
13540
- var doEval = function doEval(name) {
13541
- var value;
13542
- if (name === '%AsyncFunction%') {
13543
- value = getEvalledConstructor('async function () {}');
13544
- } else if (name === '%GeneratorFunction%') {
13545
- value = getEvalledConstructor('function* () {}');
13546
- } else if (name === '%AsyncGeneratorFunction%') {
13547
- value = getEvalledConstructor('async function* () {}');
13548
- } else if (name === '%AsyncGenerator%') {
13549
- var fn = doEval('%AsyncGeneratorFunction%');
13550
- if (fn) {
13551
- value = fn.prototype;
13552
- }
13553
- } else if (name === '%AsyncIteratorPrototype%') {
13554
- var gen = doEval('%AsyncGenerator%');
13555
- if (gen && getProto) {
13556
- value = getProto(gen.prototype);
13557
- }
13558
- }
13559
-
13560
- INTRINSICS[name] = value;
13561
-
13562
- return value;
13563
- };
13564
-
13565
- var LEGACY_ALIASES = {
13566
- __proto__: null,
13567
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
13568
- '%ArrayPrototype%': ['Array', 'prototype'],
13569
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
13570
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
13571
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
13572
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
13573
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
13574
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
13575
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
13576
- '%BooleanPrototype%': ['Boolean', 'prototype'],
13577
- '%DataViewPrototype%': ['DataView', 'prototype'],
13578
- '%DatePrototype%': ['Date', 'prototype'],
13579
- '%ErrorPrototype%': ['Error', 'prototype'],
13580
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
13581
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
13582
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
13583
- '%FunctionPrototype%': ['Function', 'prototype'],
13584
- '%Generator%': ['GeneratorFunction', 'prototype'],
13585
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
13586
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
13587
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
13588
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
13589
- '%JSONParse%': ['JSON', 'parse'],
13590
- '%JSONStringify%': ['JSON', 'stringify'],
13591
- '%MapPrototype%': ['Map', 'prototype'],
13592
- '%NumberPrototype%': ['Number', 'prototype'],
13593
- '%ObjectPrototype%': ['Object', 'prototype'],
13594
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
13595
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
13596
- '%PromisePrototype%': ['Promise', 'prototype'],
13597
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
13598
- '%Promise_all%': ['Promise', 'all'],
13599
- '%Promise_reject%': ['Promise', 'reject'],
13600
- '%Promise_resolve%': ['Promise', 'resolve'],
13601
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
13602
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
13603
- '%RegExpPrototype%': ['RegExp', 'prototype'],
13604
- '%SetPrototype%': ['Set', 'prototype'],
13605
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
13606
- '%StringPrototype%': ['String', 'prototype'],
13607
- '%SymbolPrototype%': ['Symbol', 'prototype'],
13608
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
13609
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
13610
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
13611
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
13612
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
13613
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
13614
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
13615
- '%URIErrorPrototype%': ['URIError', 'prototype'],
13616
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
13617
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
13618
- };
13619
-
13620
- var bind = requireFunctionBind();
13621
- var hasOwn = /*@__PURE__*/ requireHasown();
13622
- var $concat = bind.call(Function.call, Array.prototype.concat);
13623
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
13624
- var $replace = bind.call(Function.call, String.prototype.replace);
13625
- var $strSlice = bind.call(Function.call, String.prototype.slice);
13626
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
13627
-
13628
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
13629
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
13630
- var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
13631
- var stringToPath = function stringToPath(string) {
13632
- var first = $strSlice(string, 0, 1);
13633
- var last = $strSlice(string, -1);
13634
- if (first === '%' && last !== '%') {
13635
- throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
13636
- } else if (last === '%' && first !== '%') {
13637
- throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
13638
- }
13639
- var result = [];
13640
- $replace(string, rePropName, function (match, number, quote, subString) {
13641
- result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
13642
- });
13643
- return result;
13644
- };
13645
- /* end adaptation */
13646
-
13647
- var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
13648
- var intrinsicName = name;
13649
- var alias;
13650
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
13651
- alias = LEGACY_ALIASES[intrinsicName];
13652
- intrinsicName = '%' + alias[0] + '%';
13653
- }
13654
-
13655
- if (hasOwn(INTRINSICS, intrinsicName)) {
13656
- var value = INTRINSICS[intrinsicName];
13657
- if (value === needsEval) {
13658
- value = doEval(intrinsicName);
13659
- }
13660
- if (typeof value === 'undefined' && !allowMissing) {
13661
- throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
13662
- }
13663
-
13664
- return {
13665
- alias: alias,
13666
- name: intrinsicName,
13667
- value: value
13668
- };
13669
- }
13670
-
13671
- throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
13672
- };
13673
-
13674
- getIntrinsic = function GetIntrinsic(name, allowMissing) {
13675
- if (typeof name !== 'string' || name.length === 0) {
13676
- throw new $TypeError('intrinsic name must be a non-empty string');
13677
- }
13678
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
13679
- throw new $TypeError('"allowMissing" argument must be a boolean');
13680
- }
13681
-
13682
- if ($exec(/^%?[^%]*%?$/, name) === null) {
13683
- throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
13684
- }
13685
- var parts = stringToPath(name);
13686
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
13687
-
13688
- var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
13689
- var intrinsicRealName = intrinsic.name;
13690
- var value = intrinsic.value;
13691
- var skipFurtherCaching = false;
13692
-
13693
- var alias = intrinsic.alias;
13694
- if (alias) {
13695
- intrinsicBaseName = alias[0];
13696
- $spliceApply(parts, $concat([0, 1], alias));
13697
- }
13698
-
13699
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
13700
- var part = parts[i];
13701
- var first = $strSlice(part, 0, 1);
13702
- var last = $strSlice(part, -1);
13703
- if (
13704
- (
13705
- (first === '"' || first === "'" || first === '`')
13706
- || (last === '"' || last === "'" || last === '`')
13707
- )
13708
- && first !== last
13709
- ) {
13710
- throw new $SyntaxError('property names with quotes must have matching quotes');
13711
- }
13712
- if (part === 'constructor' || !isOwn) {
13713
- skipFurtherCaching = true;
13714
- }
13715
-
13716
- intrinsicBaseName += '.' + part;
13717
- intrinsicRealName = '%' + intrinsicBaseName + '%';
13718
-
13719
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
13720
- value = INTRINSICS[intrinsicRealName];
13721
- } else if (value != null) {
13722
- if (!(part in value)) {
13723
- if (!allowMissing) {
13724
- throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
13725
- }
13726
- return void undefined$1;
13727
- }
13728
- if ($gOPD && (i + 1) >= parts.length) {
13729
- var desc = $gOPD(value, part);
13730
- isOwn = !!desc;
13731
-
13732
- // By convention, when a data property is converted to an accessor
13733
- // property to emulate a data property that does not suffer from
13734
- // the override mistake, that accessor's getter is marked with
13735
- // an `originalValue` property. Here, when we detect this, we
13736
- // uphold the illusion by pretending to see that original data
13737
- // property, i.e., returning the value rather than the getter
13738
- // itself.
13739
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
13740
- value = desc.get;
13741
- } else {
13742
- value = value[part];
13743
- }
13744
- } else {
13745
- isOwn = hasOwn(value, part);
13746
- value = value[part];
13747
- }
13748
-
13749
- if (isOwn && !skipFurtherCaching) {
13750
- INTRINSICS[intrinsicRealName] = value;
13751
- }
13752
- }
13753
- }
13754
- return value;
13755
- };
13756
- return getIntrinsic;
13757
- }
13758
-
13759
- var callBind = {exports: {}};
13760
-
13761
- var esDefineProperty;
13762
- var hasRequiredEsDefineProperty;
13763
-
13764
- function requireEsDefineProperty () {
13765
- if (hasRequiredEsDefineProperty) return esDefineProperty;
13766
- hasRequiredEsDefineProperty = 1;
13767
-
13768
- var GetIntrinsic = /*@__PURE__*/ requireGetIntrinsic();
13769
-
13770
- /** @type {import('.')} */
13771
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
13772
- if ($defineProperty) {
13773
- try {
13774
- $defineProperty({}, 'a', { value: 1 });
13775
- } catch (e) {
13776
- // IE 8 has a broken defineProperty
13777
- $defineProperty = false;
13778
- }
13779
- }
13780
-
13781
- esDefineProperty = $defineProperty;
13782
- return esDefineProperty;
13783
- }
13784
-
13785
- var gopd;
13786
- var hasRequiredGopd;
13787
-
13788
- function requireGopd () {
13789
- if (hasRequiredGopd) return gopd;
13790
- hasRequiredGopd = 1;
13791
-
13792
- var GetIntrinsic = /*@__PURE__*/ requireGetIntrinsic();
13793
-
13794
- var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
13795
-
13796
- if ($gOPD) {
13797
- try {
13798
- $gOPD([], 'length');
13799
- } catch (e) {
13800
- // IE 8 has a broken gOPD
13801
- $gOPD = null;
13802
- }
13803
- }
13804
-
13805
- gopd = $gOPD;
13806
- return gopd;
13807
- }
13808
-
13809
- var defineDataProperty;
13810
- var hasRequiredDefineDataProperty;
13811
-
13812
- function requireDefineDataProperty () {
13813
- if (hasRequiredDefineDataProperty) return defineDataProperty;
13814
- hasRequiredDefineDataProperty = 1;
13815
-
13816
- var $defineProperty = /*@__PURE__*/ requireEsDefineProperty();
13817
-
13818
- var $SyntaxError = /*@__PURE__*/ requireSyntax();
13819
- var $TypeError = /*@__PURE__*/ requireType();
13820
-
13821
- var gopd = /*@__PURE__*/ requireGopd();
13822
-
13823
- /** @type {import('.')} */
13824
- defineDataProperty = function defineDataProperty(
13825
- obj,
13826
- property,
13827
- value
13828
- ) {
13829
- if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
13830
- throw new $TypeError('`obj` must be an object or a function`');
13831
- }
13832
- if (typeof property !== 'string' && typeof property !== 'symbol') {
13833
- throw new $TypeError('`property` must be a string or a symbol`');
13834
- }
13835
- if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
13836
- throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
13837
- }
13838
- if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
13839
- throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
13840
- }
13841
- if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
13842
- throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
13843
- }
13844
- if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
13845
- throw new $TypeError('`loose`, if provided, must be a boolean');
13846
- }
13847
-
13848
- var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
13849
- var nonWritable = arguments.length > 4 ? arguments[4] : null;
13850
- var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
13851
- var loose = arguments.length > 6 ? arguments[6] : false;
13852
-
13853
- /* @type {false | TypedPropertyDescriptor<unknown>} */
13854
- var desc = !!gopd && gopd(obj, property);
13855
-
13856
- if ($defineProperty) {
13857
- $defineProperty(obj, property, {
13858
- configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
13859
- enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
13860
- value: value,
13861
- writable: nonWritable === null && desc ? desc.writable : !nonWritable
13862
- });
13863
- } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
13864
- // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
13865
- obj[property] = value; // eslint-disable-line no-param-reassign
13866
- } else {
13867
- throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
13868
- }
13869
- };
13870
- return defineDataProperty;
13871
- }
13872
-
13873
- var hasPropertyDescriptors_1;
13874
- var hasRequiredHasPropertyDescriptors;
13875
-
13876
- function requireHasPropertyDescriptors () {
13877
- if (hasRequiredHasPropertyDescriptors) return hasPropertyDescriptors_1;
13878
- hasRequiredHasPropertyDescriptors = 1;
13879
-
13880
- var $defineProperty = /*@__PURE__*/ requireEsDefineProperty();
13881
-
13882
- var hasPropertyDescriptors = function hasPropertyDescriptors() {
13883
- return !!$defineProperty;
13884
- };
13885
-
13886
- hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
13887
- // node v0.6 has a bug where array lengths can be Set but not Defined
13888
- if (!$defineProperty) {
13889
- return null;
13890
- }
13891
- try {
13892
- return $defineProperty([], 'length', { value: 1 }).length !== 1;
13893
- } catch (e) {
13894
- // In Firefox 4-22, defining length on an array throws an exception.
13895
- return true;
13896
- }
13897
- };
13898
-
13899
- hasPropertyDescriptors_1 = hasPropertyDescriptors;
13900
- return hasPropertyDescriptors_1;
13901
- }
13902
-
13903
- var setFunctionLength;
13904
- var hasRequiredSetFunctionLength;
13905
-
13906
- function requireSetFunctionLength () {
13907
- if (hasRequiredSetFunctionLength) return setFunctionLength;
13908
- hasRequiredSetFunctionLength = 1;
13909
-
13910
- var GetIntrinsic = /*@__PURE__*/ requireGetIntrinsic();
13911
- var define = /*@__PURE__*/ requireDefineDataProperty();
13912
- var hasDescriptors = /*@__PURE__*/ requireHasPropertyDescriptors()();
13913
- var gOPD = /*@__PURE__*/ requireGopd();
13914
-
13915
- var $TypeError = /*@__PURE__*/ requireType();
13916
- var $floor = GetIntrinsic('%Math.floor%');
13917
-
13918
- /** @type {import('.')} */
13919
- setFunctionLength = function setFunctionLength(fn, length) {
13920
- if (typeof fn !== 'function') {
13921
- throw new $TypeError('`fn` is not a function');
13922
- }
13923
- if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {
13924
- throw new $TypeError('`length` must be a positive 32-bit integer');
13925
- }
13926
-
13927
- var loose = arguments.length > 2 && !!arguments[2];
13928
-
13929
- var functionLengthIsConfigurable = true;
13930
- var functionLengthIsWritable = true;
13931
- if ('length' in fn && gOPD) {
13932
- var desc = gOPD(fn, 'length');
13933
- if (desc && !desc.configurable) {
13934
- functionLengthIsConfigurable = false;
13935
- }
13936
- if (desc && !desc.writable) {
13937
- functionLengthIsWritable = false;
13938
- }
13939
- }
13940
-
13941
- if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
13942
- if (hasDescriptors) {
13943
- define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
13944
- } else {
13945
- define(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
13946
- }
13947
- }
13948
- return fn;
13949
- };
13950
- return setFunctionLength;
13951
- }
13952
-
13953
- var hasRequiredCallBind;
13954
-
13955
- function requireCallBind () {
13956
- if (hasRequiredCallBind) return callBind.exports;
13957
- hasRequiredCallBind = 1;
13958
- (function (module) {
13341
+ const isArray$1 = Array.isArray;
13342
+ const push = Array.prototype.push;
13343
+ const pushToArray = function (arr, valueOrArray) {
13344
+ push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
13345
+ };
13346
+
13347
+ const toISO = Date.prototype.toISOString;
13348
+
13349
+ const defaultFormat = formats;
13350
+ const defaults$1 = {
13351
+ addQueryPrefix: false,
13352
+ allowDots: false,
13353
+ allowEmptyArrays: false,
13354
+ arrayFormat: 'indices',
13355
+ charset: 'utf-8',
13356
+ charsetSentinel: false,
13357
+ delimiter: '&',
13358
+ encode: true,
13359
+ encodeDotInKeys: false,
13360
+ encoder: encode,
13361
+ encodeValuesOnly: false,
13362
+ format: defaultFormat,
13363
+ formatter: formatters[defaultFormat],
13364
+ // deprecated
13365
+ indices: false,
13366
+ serializeDate: function serializeDate(date) {
13367
+ return toISO.call(date)
13368
+ },
13369
+ skipNulls: false,
13370
+ strictNullHandling: false,
13371
+ };
13372
+
13373
+ const isNonNullishPrimitive = function isNonNullishPrimitive(v) {
13374
+ return (
13375
+ typeof v === 'string' ||
13376
+ typeof v === 'number' ||
13377
+ typeof v === 'boolean' ||
13378
+ typeof v === 'symbol' ||
13379
+ typeof v === 'bigint'
13380
+ )
13381
+ };
13382
+
13383
+ const sentinel = {};
13384
+
13385
+ const _stringify = function stringify(
13386
+ object,
13387
+ prefix,
13388
+ generateArrayPrefix,
13389
+ commaRoundTrip,
13390
+ allowEmptyArrays,
13391
+ strictNullHandling,
13392
+ skipNulls,
13393
+ encodeDotInKeys,
13394
+ encoder,
13395
+ filter,
13396
+ sort,
13397
+ allowDots,
13398
+ serializeDate,
13399
+ format,
13400
+ formatter,
13401
+ encodeValuesOnly,
13402
+ charset,
13403
+ sideChannel,
13404
+ ) {
13405
+ let obj = object;
13406
+
13407
+ let tmpSc = sideChannel;
13408
+ let step = 0;
13409
+ let findFlag = false;
13410
+ while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
13411
+ // Where object last appeared in the ref tree
13412
+ const pos = tmpSc.get(object);
13413
+ step += 1;
13414
+ if (typeof pos !== 'undefined') {
13415
+ if (pos === step) {
13416
+ throw new RangeError('Cyclic object value')
13417
+ } else {
13418
+ findFlag = true; // Break while
13419
+ }
13420
+ }
13421
+ if (typeof tmpSc.get(sentinel) === 'undefined') {
13422
+ step = 0;
13423
+ }
13424
+ }
13425
+
13426
+ if (typeof filter === 'function') {
13427
+ obj = filter(prefix, obj);
13428
+ } else if (obj instanceof Date) {
13429
+ obj = serializeDate(obj);
13430
+ } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
13431
+ obj = maybeMap(obj, function (value) {
13432
+ if (value instanceof Date) {
13433
+ return serializeDate(value)
13434
+ }
13435
+ return value
13436
+ });
13437
+ }
13959
13438
 
13960
- var bind = requireFunctionBind();
13961
- var GetIntrinsic = /*@__PURE__*/ requireGetIntrinsic();
13962
- var setFunctionLength = /*@__PURE__*/ requireSetFunctionLength();
13439
+ if (obj === null) {
13440
+ if (strictNullHandling) {
13441
+ return encoder && !encodeValuesOnly
13442
+ ? encoder(prefix, defaults$1.encoder, charset, 'key', format)
13443
+ : prefix
13444
+ }
13963
13445
 
13964
- var $TypeError = /*@__PURE__*/ requireType();
13965
- var $apply = GetIntrinsic('%Function.prototype.apply%');
13966
- var $call = GetIntrinsic('%Function.prototype.call%');
13967
- var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
13446
+ obj = '';
13447
+ }
13968
13448
 
13969
- var $defineProperty = /*@__PURE__*/ requireEsDefineProperty();
13970
- var $max = GetIntrinsic('%Math.max%');
13449
+ if (isNonNullishPrimitive(obj) || isBuffer(obj)) {
13450
+ if (encoder) {
13451
+ const keyValue = encodeValuesOnly
13452
+ ? prefix
13453
+ : encoder(prefix, defaults$1.encoder, charset, 'key', format);
13454
+ return [
13455
+ formatter(keyValue) +
13456
+ '=' +
13457
+ formatter(encoder(obj, defaults$1.encoder, charset, 'value', format)),
13458
+ ]
13459
+ }
13460
+ return [formatter(prefix) + '=' + formatter(String(obj))]
13461
+ }
13971
13462
 
13972
- module.exports = function callBind(originalFunction) {
13973
- if (typeof originalFunction !== 'function') {
13974
- throw new $TypeError('a function is required');
13975
- }
13976
- var func = $reflectApply(bind, $call, arguments);
13977
- return setFunctionLength(
13978
- func,
13979
- 1 + $max(0, originalFunction.length - (arguments.length - 1)),
13980
- true
13981
- );
13982
- };
13463
+ const values = [];
13983
13464
 
13984
- var applyBind = function applyBind() {
13985
- return $reflectApply(bind, $apply, arguments);
13986
- };
13465
+ if (typeof obj === 'undefined') {
13466
+ return values
13467
+ }
13987
13468
 
13988
- if ($defineProperty) {
13989
- $defineProperty(module.exports, 'apply', { value: applyBind });
13990
- } else {
13991
- module.exports.apply = applyBind;
13992
- }
13993
- } (callBind));
13994
- return callBind.exports;
13995
- }
13469
+ let objKeys;
13470
+ if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
13471
+ // we need to join elements in
13472
+ if (encodeValuesOnly && encoder) {
13473
+ obj = maybeMap(obj, encoder);
13474
+ }
13475
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
13476
+ } else if (isArray$1(filter)) {
13477
+ objKeys = filter;
13478
+ } else {
13479
+ const keys = Object.keys(obj);
13480
+ objKeys = sort ? keys.sort(sort) : keys;
13481
+ }
13996
13482
 
13997
- var callBound;
13998
- var hasRequiredCallBound;
13483
+ const encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix;
13999
13484
 
14000
- function requireCallBound () {
14001
- if (hasRequiredCallBound) return callBound;
14002
- hasRequiredCallBound = 1;
13485
+ const adjustedPrefix =
13486
+ commaRoundTrip && isArray$1(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
14003
13487
 
14004
- var GetIntrinsic = /*@__PURE__*/ requireGetIntrinsic();
13488
+ if (allowEmptyArrays && isArray$1(obj) && obj.length === 0) {
13489
+ return adjustedPrefix + '[]'
13490
+ }
14005
13491
 
14006
- var callBind = requireCallBind();
13492
+ for (let j = 0; j < objKeys.length; ++j) {
13493
+ const key = objKeys[j];
13494
+ const value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
14007
13495
 
14008
- var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
13496
+ if (skipNulls && value === null) {
13497
+ continue
13498
+ }
14009
13499
 
14010
- callBound = function callBoundIntrinsic(name, allowMissing) {
14011
- var intrinsic = GetIntrinsic(name, !!allowMissing);
14012
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
14013
- return callBind(intrinsic);
14014
- }
14015
- return intrinsic;
14016
- };
14017
- return callBound;
13500
+ const encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
13501
+ const keyPrefix = isArray$1(obj)
13502
+ ? typeof generateArrayPrefix === 'function'
13503
+ ? generateArrayPrefix(adjustedPrefix, encodedKey)
13504
+ : adjustedPrefix
13505
+ : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
13506
+
13507
+ sideChannel.set(object, step);
13508
+ const valueSideChannel = new WeakMap();
13509
+ valueSideChannel.set(sentinel, sideChannel);
13510
+ pushToArray(
13511
+ values,
13512
+ _stringify(
13513
+ value,
13514
+ keyPrefix,
13515
+ generateArrayPrefix,
13516
+ commaRoundTrip,
13517
+ allowEmptyArrays,
13518
+ strictNullHandling,
13519
+ skipNulls,
13520
+ encodeDotInKeys,
13521
+ generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
13522
+ filter,
13523
+ sort,
13524
+ allowDots,
13525
+ serializeDate,
13526
+ format,
13527
+ formatter,
13528
+ encodeValuesOnly,
13529
+ charset,
13530
+ valueSideChannel,
13531
+ ),
13532
+ );
13533
+ }
13534
+
13535
+ return values
13536
+ };
13537
+
13538
+ const normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
13539
+ if (!opts) {
13540
+ return defaults$1
13541
+ }
13542
+
13543
+ if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
13544
+ throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided')
13545
+ }
13546
+
13547
+ if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {
13548
+ throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided')
13549
+ }
13550
+
13551
+ if (
13552
+ opts.encoder !== null &&
13553
+ typeof opts.encoder !== 'undefined' &&
13554
+ typeof opts.encoder !== 'function'
13555
+ ) {
13556
+ throw new TypeError('Encoder has to be a function.')
13557
+ }
13558
+
13559
+ const charset = opts.charset || defaults$1.charset;
13560
+ if (
13561
+ typeof opts.charset !== 'undefined' &&
13562
+ opts.charset !== 'utf-8' &&
13563
+ opts.charset !== 'iso-8859-1'
13564
+ ) {
13565
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')
13566
+ }
13567
+
13568
+ let format = formats;
13569
+ if (typeof opts.format !== 'undefined') {
13570
+ if (!has$1.call(formatters, opts.format)) {
13571
+ throw new TypeError('Unknown format option provided.')
13572
+ }
13573
+ format = opts.format;
13574
+ }
13575
+ const formatter = formatters[format];
13576
+
13577
+ let filter = defaults$1.filter;
13578
+ if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
13579
+ filter = opts.filter;
13580
+ }
13581
+
13582
+ let arrayFormat;
13583
+ if (opts.arrayFormat in arrayPrefixGenerators) {
13584
+ arrayFormat = opts.arrayFormat;
13585
+ } else if ('indices' in opts) {
13586
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
13587
+ } else {
13588
+ arrayFormat = defaults$1.arrayFormat;
13589
+ }
13590
+
13591
+ if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
13592
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent')
13593
+ }
13594
+
13595
+ const allowDots =
13596
+ typeof opts.allowDots === 'undefined'
13597
+ ? opts.encodeDotInKeys === true
13598
+ ? true
13599
+ : defaults$1.allowDots
13600
+ : !!opts.allowDots;
13601
+
13602
+ return {
13603
+ addQueryPrefix:
13604
+ typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
13605
+ allowDots: allowDots,
13606
+ allowEmptyArrays:
13607
+ typeof opts.allowEmptyArrays === 'boolean'
13608
+ ? !!opts.allowEmptyArrays
13609
+ : defaults$1.allowEmptyArrays,
13610
+ arrayFormat: arrayFormat,
13611
+ charset: charset,
13612
+ charsetSentinel:
13613
+ typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
13614
+ commaRoundTrip: opts.commaRoundTrip,
13615
+ delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
13616
+ encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
13617
+ encodeDotInKeys:
13618
+ typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults$1.encodeDotInKeys,
13619
+ encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
13620
+ encodeValuesOnly:
13621
+ typeof opts.encodeValuesOnly === 'boolean'
13622
+ ? opts.encodeValuesOnly
13623
+ : defaults$1.encodeValuesOnly,
13624
+ filter: filter,
13625
+ format: format,
13626
+ formatter: formatter,
13627
+ serializeDate:
13628
+ typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
13629
+ skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
13630
+ sort: typeof opts.sort === 'function' ? opts.sort : null,
13631
+ strictNullHandling:
13632
+ typeof opts.strictNullHandling === 'boolean'
13633
+ ? opts.strictNullHandling
13634
+ : defaults$1.strictNullHandling,
13635
+ }
13636
+ };
13637
+
13638
+ function stringify(object, opts) {
13639
+ let obj = object;
13640
+ const options = normalizeStringifyOptions(opts);
13641
+
13642
+ let objKeys;
13643
+ let filter;
13644
+
13645
+ if (typeof options.filter === 'function') {
13646
+ filter = options.filter;
13647
+ obj = filter('', obj);
13648
+ } else if (isArray$1(options.filter)) {
13649
+ filter = options.filter;
13650
+ objKeys = filter;
13651
+ }
13652
+
13653
+ const keys = [];
13654
+
13655
+ if (typeof obj !== 'object' || obj === null) {
13656
+ return ''
13657
+ }
13658
+
13659
+ const generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
13660
+ const commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;
13661
+
13662
+ if (!objKeys) {
13663
+ objKeys = Object.keys(obj);
13664
+ }
13665
+
13666
+ if (options.sort) {
13667
+ objKeys.sort(options.sort);
13668
+ }
13669
+
13670
+ const sideChannel = new WeakMap();
13671
+ for (let i = 0; i < objKeys.length; ++i) {
13672
+ const key = objKeys[i];
13673
+
13674
+ if (options.skipNulls && obj[key] === null) {
13675
+ continue
13676
+ }
13677
+ pushToArray(
13678
+ keys,
13679
+ _stringify(
13680
+ obj[key],
13681
+ key,
13682
+ generateArrayPrefix,
13683
+ commaRoundTrip,
13684
+ options.allowEmptyArrays,
13685
+ options.strictNullHandling,
13686
+ options.skipNulls,
13687
+ options.encodeDotInKeys,
13688
+ options.encode ? options.encoder : null,
13689
+ options.filter,
13690
+ options.sort,
13691
+ options.allowDots,
13692
+ options.serializeDate,
13693
+ options.format,
13694
+ options.formatter,
13695
+ options.encodeValuesOnly,
13696
+ options.charset,
13697
+ sideChannel,
13698
+ ),
13699
+ );
13700
+ }
13701
+
13702
+ const joined = keys.join(options.delimiter);
13703
+ let prefix = options.addQueryPrefix === true ? '?' : '';
13704
+
13705
+ if (options.charsetSentinel) {
13706
+ if (options.charset === 'iso-8859-1') {
13707
+ // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
13708
+ prefix += 'utf8=%26%2310003%3B&';
13709
+ } else {
13710
+ // encodeURIComponent('✓')
13711
+ prefix += 'utf8=%E2%9C%93&';
13712
+ }
13713
+ }
13714
+
13715
+ return joined.length > 0 ? prefix + joined : ''
14018
13716
  }
14019
13717
 
14020
- const _nodeResolve_empty = {};
13718
+ const has = Object.prototype.hasOwnProperty;
13719
+ const isArray = Array.isArray;
14021
13720
 
14022
- const _nodeResolve_empty$1 = {
14023
- __proto__: null,
14024
- default: _nodeResolve_empty
13721
+ const defaults = {
13722
+ allowDots: false,
13723
+ allowEmptyArrays: false,
13724
+ allowPrototypes: false,
13725
+ allowSparse: false,
13726
+ arrayLimit: 20,
13727
+ charset: 'utf-8',
13728
+ charsetSentinel: false,
13729
+ comma: false,
13730
+ decodeDotInKeys: false,
13731
+ decoder: decode,
13732
+ delimiter: '&',
13733
+ depth: 5,
13734
+ duplicates: 'combine',
13735
+ ignoreQueryPrefix: false,
13736
+ interpretNumericEntities: false,
13737
+ parameterLimit: 1000,
13738
+ parseArrays: true,
13739
+ plainObjects: false,
13740
+ strictNullHandling: false,
13741
+ };
13742
+
13743
+ const interpretNumericEntities = function (str) {
13744
+ return str.replace(/&#(\d+);/g, function ($0, numberStr) {
13745
+ return String.fromCharCode(parseInt(numberStr, 10))
13746
+ })
13747
+ };
13748
+
13749
+ const parseArrayValue = function (val, options) {
13750
+ if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
13751
+ return val.split(',')
13752
+ }
13753
+
13754
+ return val
13755
+ };
13756
+
13757
+ // This is what browsers will submit when the ✓ character occurs in an
13758
+ // application/x-www-form-urlencoded body and the encoding of the page containing
13759
+ // the form is iso-8859-1, or when the submitted form has an accept-charset
13760
+ // attribute of iso-8859-1. Presumably also with other charsets that do not contain
13761
+ // the ✓ character, such as us-ascii.
13762
+ const isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
13763
+
13764
+ // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
13765
+ const charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
13766
+
13767
+ const parseValues = function parseQueryStringValues(str, options) {
13768
+ const obj = { __proto__: null };
13769
+
13770
+ const cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
13771
+ const limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
13772
+ const parts = cleanStr.split(options.delimiter, limit);
13773
+ let skipIndex = -1; // Keep track of where the utf8 sentinel was found
13774
+ let i;
13775
+
13776
+ let charset = options.charset;
13777
+ if (options.charsetSentinel) {
13778
+ for (i = 0; i < parts.length; ++i) {
13779
+ if (parts[i].indexOf('utf8=') === 0) {
13780
+ if (parts[i] === charsetSentinel) {
13781
+ charset = 'utf-8';
13782
+ } else if (parts[i] === isoSentinel) {
13783
+ charset = 'iso-8859-1';
13784
+ }
13785
+ skipIndex = i;
13786
+ i = parts.length; // The eslint settings do not allow break;
13787
+ }
13788
+ }
13789
+ }
13790
+
13791
+ for (i = 0; i < parts.length; ++i) {
13792
+ if (i === skipIndex) {
13793
+ continue
13794
+ }
13795
+ const part = parts[i];
13796
+
13797
+ const bracketEqualsPos = part.indexOf(']=');
13798
+ const pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
13799
+
13800
+ let key, val;
13801
+ if (pos === -1) {
13802
+ key = options.decoder(part, defaults.decoder, charset, 'key');
13803
+ val = options.strictNullHandling ? null : '';
13804
+ } else {
13805
+ key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
13806
+ val = maybeMap(parseArrayValue(part.slice(pos + 1), options), function (encodedVal) {
13807
+ return options.decoder(encodedVal, defaults.decoder, charset, 'value')
13808
+ });
13809
+ }
13810
+
13811
+ if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
13812
+ val = interpretNumericEntities(val);
13813
+ }
13814
+
13815
+ if (part.indexOf('[]=') > -1) {
13816
+ val = isArray(val) ? [val] : val;
13817
+ }
13818
+
13819
+ const existing = has.call(obj, key);
13820
+ if (existing && options.duplicates === 'combine') {
13821
+ obj[key] = combine(obj[key], val);
13822
+ } else if (!existing || options.duplicates === 'last') {
13823
+ obj[key] = val;
13824
+ }
13825
+ }
13826
+
13827
+ return obj
13828
+ };
13829
+
13830
+ const parseObject = function (chain, val, options, valuesParsed) {
13831
+ let leaf = valuesParsed ? val : parseArrayValue(val, options);
13832
+
13833
+ for (let i = chain.length - 1; i >= 0; --i) {
13834
+ let obj;
13835
+ const root = chain[i];
13836
+
13837
+ if (root === '[]' && options.parseArrays) {
13838
+ obj = options.allowEmptyArrays && leaf === '' ? [] : [].concat(leaf);
13839
+ } else {
13840
+ obj = options.plainObjects ? Object.create(null) : {};
13841
+ const cleanRoot =
13842
+ root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
13843
+ const decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
13844
+ const index = parseInt(decodedRoot, 10);
13845
+ if (!options.parseArrays && decodedRoot === '') {
13846
+ obj = { 0: leaf };
13847
+ } else if (
13848
+ !isNaN(index) &&
13849
+ root !== decodedRoot &&
13850
+ String(index) === decodedRoot &&
13851
+ index >= 0 &&
13852
+ options.parseArrays &&
13853
+ index <= options.arrayLimit
13854
+ ) {
13855
+ obj = [];
13856
+ obj[index] = leaf;
13857
+ } else if (decodedRoot !== '__proto__') {
13858
+ obj[decodedRoot] = leaf;
13859
+ }
13860
+ }
13861
+
13862
+ leaf = obj;
13863
+ }
13864
+
13865
+ return leaf
13866
+ };
13867
+
13868
+ const parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
13869
+ if (!givenKey) {
13870
+ return
13871
+ }
13872
+
13873
+ // Transform dot notation to bracket notation
13874
+ const key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
13875
+
13876
+ // The regex chunks
13877
+
13878
+ const brackets = /(\[[^[\]]*])/;
13879
+ const child = /(\[[^[\]]*])/g;
13880
+
13881
+ // Get the parent
13882
+
13883
+ let segment = options.depth > 0 && brackets.exec(key);
13884
+ const parent = segment ? key.slice(0, segment.index) : key;
13885
+
13886
+ // Stash the parent if it exists
13887
+
13888
+ const keys = [];
13889
+ if (parent) {
13890
+ // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
13891
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
13892
+ if (!options.allowPrototypes) {
13893
+ return
13894
+ }
13895
+ }
13896
+
13897
+ keys.push(parent);
13898
+ }
13899
+
13900
+ // Loop through children appending to the array until we hit depth
13901
+
13902
+ let i = 0;
13903
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
13904
+ i += 1;
13905
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
13906
+ if (!options.allowPrototypes) {
13907
+ return
13908
+ }
13909
+ }
13910
+ keys.push(segment[1]);
13911
+ }
13912
+
13913
+ // If there's a remainder, just add whatever is left
13914
+
13915
+ if (segment) {
13916
+ keys.push('[' + key.slice(segment.index) + ']');
13917
+ }
13918
+
13919
+ return parseObject(keys, val, options, valuesParsed)
13920
+ };
13921
+
13922
+ const normalizeParseOptions = function normalizeParseOptions(opts) {
13923
+ if (!opts) {
13924
+ return defaults
13925
+ }
13926
+
13927
+ if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
13928
+ throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided')
13929
+ }
13930
+
13931
+ if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {
13932
+ throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided')
13933
+ }
13934
+
13935
+ if (
13936
+ opts.decoder !== null &&
13937
+ typeof opts.decoder !== 'undefined' &&
13938
+ typeof opts.decoder !== 'function'
13939
+ ) {
13940
+ throw new TypeError('Decoder has to be a function.')
13941
+ }
13942
+
13943
+ if (
13944
+ typeof opts.charset !== 'undefined' &&
13945
+ opts.charset !== 'utf-8' &&
13946
+ opts.charset !== 'iso-8859-1'
13947
+ ) {
13948
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')
13949
+ }
13950
+ const charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
13951
+
13952
+ const duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;
13953
+
13954
+ if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {
13955
+ throw new TypeError('The duplicates option must be either combine, first, or last')
13956
+ }
13957
+
13958
+ const allowDots =
13959
+ typeof opts.allowDots === 'undefined'
13960
+ ? opts.decodeDotInKeys === true
13961
+ ? true
13962
+ : defaults.allowDots
13963
+ : !!opts.allowDots;
13964
+
13965
+ return {
13966
+ allowDots: allowDots,
13967
+ allowEmptyArrays:
13968
+ typeof opts.allowEmptyArrays === 'boolean'
13969
+ ? !!opts.allowEmptyArrays
13970
+ : defaults.allowEmptyArrays,
13971
+ allowPrototypes:
13972
+ typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
13973
+ allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
13974
+ arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
13975
+ charset: charset,
13976
+ charsetSentinel:
13977
+ typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
13978
+ comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
13979
+ decodeDotInKeys:
13980
+ typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
13981
+ decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
13982
+ delimiter:
13983
+ typeof opts.delimiter === 'string' || isRegExp(opts.delimiter)
13984
+ ? opts.delimiter
13985
+ : defaults.delimiter,
13986
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
13987
+ depth: typeof opts.depth === 'number' || opts.depth === false ? +opts.depth : defaults.depth,
13988
+ duplicates: duplicates,
13989
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
13990
+ interpretNumericEntities:
13991
+ typeof opts.interpretNumericEntities === 'boolean'
13992
+ ? opts.interpretNumericEntities
13993
+ : defaults.interpretNumericEntities,
13994
+ parameterLimit:
13995
+ typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
13996
+ parseArrays: opts.parseArrays !== false,
13997
+ plainObjects:
13998
+ typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
13999
+ strictNullHandling:
14000
+ typeof opts.strictNullHandling === 'boolean'
14001
+ ? opts.strictNullHandling
14002
+ : defaults.strictNullHandling,
14003
+ }
14025
14004
  };
14026
14005
 
14027
- const require$$0 = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty$1);
14028
-
14029
- var objectInspect;
14030
- var hasRequiredObjectInspect;
14031
-
14032
- function requireObjectInspect () {
14033
- if (hasRequiredObjectInspect) return objectInspect;
14034
- hasRequiredObjectInspect = 1;
14035
- var hasMap = typeof Map === 'function' && Map.prototype;
14036
- var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
14037
- var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
14038
- var mapForEach = hasMap && Map.prototype.forEach;
14039
- var hasSet = typeof Set === 'function' && Set.prototype;
14040
- var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
14041
- var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
14042
- var setForEach = hasSet && Set.prototype.forEach;
14043
- var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
14044
- var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
14045
- var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
14046
- var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
14047
- var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
14048
- var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
14049
- var booleanValueOf = Boolean.prototype.valueOf;
14050
- var objectToString = Object.prototype.toString;
14051
- var functionToString = Function.prototype.toString;
14052
- var $match = String.prototype.match;
14053
- var $slice = String.prototype.slice;
14054
- var $replace = String.prototype.replace;
14055
- var $toUpperCase = String.prototype.toUpperCase;
14056
- var $toLowerCase = String.prototype.toLowerCase;
14057
- var $test = RegExp.prototype.test;
14058
- var $concat = Array.prototype.concat;
14059
- var $join = Array.prototype.join;
14060
- var $arrSlice = Array.prototype.slice;
14061
- var $floor = Math.floor;
14062
- var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
14063
- var gOPS = Object.getOwnPropertySymbols;
14064
- var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
14065
- var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
14066
- // ie, `has-tostringtag/shams
14067
- var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
14068
- ? Symbol.toStringTag
14069
- : null;
14070
- var isEnumerable = Object.prototype.propertyIsEnumerable;
14071
-
14072
- var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
14073
- [].__proto__ === Array.prototype // eslint-disable-line no-proto
14074
- ? function (O) {
14075
- return O.__proto__; // eslint-disable-line no-proto
14076
- }
14077
- : null
14078
- );
14079
-
14080
- function addNumericSeparator(num, str) {
14081
- if (
14082
- num === Infinity
14083
- || num === -Infinity
14084
- || num !== num
14085
- || (num && num > -1000 && num < 1000)
14086
- || $test.call(/e/, str)
14087
- ) {
14088
- return str;
14089
- }
14090
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
14091
- if (typeof num === 'number') {
14092
- var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
14093
- if (int !== num) {
14094
- var intStr = String(int);
14095
- var dec = $slice.call(str, intStr.length + 1);
14096
- return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
14097
- }
14098
- }
14099
- return $replace.call(str, sepRegex, '$&_');
14100
- }
14101
-
14102
- var utilInspect = require$$0;
14103
- var inspectCustom = utilInspect.custom;
14104
- var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
14105
-
14106
- var quotes = {
14107
- __proto__: null,
14108
- 'double': '"',
14109
- single: "'"
14110
- };
14111
- var quoteREs = {
14112
- __proto__: null,
14113
- 'double': /(["\\])/g,
14114
- single: /(['\\])/g
14115
- };
14116
-
14117
- objectInspect = function inspect_(obj, options, depth, seen) {
14118
- var opts = options || {};
14119
-
14120
- if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) {
14121
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
14122
- }
14123
- if (
14124
- has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
14125
- ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
14126
- : opts.maxStringLength !== null
14127
- )
14128
- ) {
14129
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
14130
- }
14131
- var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
14132
- if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
14133
- throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
14134
- }
14135
-
14136
- if (
14137
- has(opts, 'indent')
14138
- && opts.indent !== null
14139
- && opts.indent !== '\t'
14140
- && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
14141
- ) {
14142
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
14143
- }
14144
- if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
14145
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
14146
- }
14147
- var numericSeparator = opts.numericSeparator;
14148
-
14149
- if (typeof obj === 'undefined') {
14150
- return 'undefined';
14151
- }
14152
- if (obj === null) {
14153
- return 'null';
14154
- }
14155
- if (typeof obj === 'boolean') {
14156
- return obj ? 'true' : 'false';
14157
- }
14158
-
14159
- if (typeof obj === 'string') {
14160
- return inspectString(obj, opts);
14161
- }
14162
- if (typeof obj === 'number') {
14163
- if (obj === 0) {
14164
- return Infinity / obj > 0 ? '0' : '-0';
14165
- }
14166
- var str = String(obj);
14167
- return numericSeparator ? addNumericSeparator(obj, str) : str;
14168
- }
14169
- if (typeof obj === 'bigint') {
14170
- var bigIntStr = String(obj) + 'n';
14171
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
14172
- }
14173
-
14174
- var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
14175
- if (typeof depth === 'undefined') { depth = 0; }
14176
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
14177
- return isArray(obj) ? '[Array]' : '[Object]';
14178
- }
14179
-
14180
- var indent = getIndent(opts, depth);
14181
-
14182
- if (typeof seen === 'undefined') {
14183
- seen = [];
14184
- } else if (indexOf(seen, obj) >= 0) {
14185
- return '[Circular]';
14186
- }
14187
-
14188
- function inspect(value, from, noIndent) {
14189
- if (from) {
14190
- seen = $arrSlice.call(seen);
14191
- seen.push(from);
14192
- }
14193
- if (noIndent) {
14194
- var newOpts = {
14195
- depth: opts.depth
14196
- };
14197
- if (has(opts, 'quoteStyle')) {
14198
- newOpts.quoteStyle = opts.quoteStyle;
14199
- }
14200
- return inspect_(value, newOpts, depth + 1, seen);
14201
- }
14202
- return inspect_(value, opts, depth + 1, seen);
14203
- }
14204
-
14205
- if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
14206
- var name = nameOf(obj);
14207
- var keys = arrObjKeys(obj, inspect);
14208
- return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
14209
- }
14210
- if (isSymbol(obj)) {
14211
- var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
14212
- return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
14213
- }
14214
- if (isElement(obj)) {
14215
- var s = '<' + $toLowerCase.call(String(obj.nodeName));
14216
- var attrs = obj.attributes || [];
14217
- for (var i = 0; i < attrs.length; i++) {
14218
- s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
14219
- }
14220
- s += '>';
14221
- if (obj.childNodes && obj.childNodes.length) { s += '...'; }
14222
- s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
14223
- return s;
14224
- }
14225
- if (isArray(obj)) {
14226
- if (obj.length === 0) { return '[]'; }
14227
- var xs = arrObjKeys(obj, inspect);
14228
- if (indent && !singleLineValues(xs)) {
14229
- return '[' + indentedJoin(xs, indent) + ']';
14230
- }
14231
- return '[ ' + $join.call(xs, ', ') + ' ]';
14232
- }
14233
- if (isError(obj)) {
14234
- var parts = arrObjKeys(obj, inspect);
14235
- if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
14236
- return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
14237
- }
14238
- if (parts.length === 0) { return '[' + String(obj) + ']'; }
14239
- return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
14240
- }
14241
- if (typeof obj === 'object' && customInspect) {
14242
- if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
14243
- return utilInspect(obj, { depth: maxDepth - depth });
14244
- } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
14245
- return obj.inspect();
14246
- }
14247
- }
14248
- if (isMap(obj)) {
14249
- var mapParts = [];
14250
- if (mapForEach) {
14251
- mapForEach.call(obj, function (value, key) {
14252
- mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
14253
- });
14254
- }
14255
- return collectionOf('Map', mapSize.call(obj), mapParts, indent);
14256
- }
14257
- if (isSet(obj)) {
14258
- var setParts = [];
14259
- if (setForEach) {
14260
- setForEach.call(obj, function (value) {
14261
- setParts.push(inspect(value, obj));
14262
- });
14263
- }
14264
- return collectionOf('Set', setSize.call(obj), setParts, indent);
14265
- }
14266
- if (isWeakMap(obj)) {
14267
- return weakCollectionOf('WeakMap');
14268
- }
14269
- if (isWeakSet(obj)) {
14270
- return weakCollectionOf('WeakSet');
14271
- }
14272
- if (isWeakRef(obj)) {
14273
- return weakCollectionOf('WeakRef');
14274
- }
14275
- if (isNumber(obj)) {
14276
- return markBoxed(inspect(Number(obj)));
14277
- }
14278
- if (isBigInt(obj)) {
14279
- return markBoxed(inspect(bigIntValueOf.call(obj)));
14280
- }
14281
- if (isBoolean(obj)) {
14282
- return markBoxed(booleanValueOf.call(obj));
14283
- }
14284
- if (isString(obj)) {
14285
- return markBoxed(inspect(String(obj)));
14286
- }
14287
- // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
14288
- /* eslint-env browser */
14289
- if (typeof window !== 'undefined' && obj === window) {
14290
- return '{ [object Window] }';
14291
- }
14292
- if (
14293
- (typeof globalThis !== 'undefined' && obj === globalThis)
14294
- || (typeof commonjsGlobal !== 'undefined' && obj === commonjsGlobal)
14295
- ) {
14296
- return '{ [object globalThis] }';
14297
- }
14298
- if (!isDate(obj) && !isRegExp(obj)) {
14299
- var ys = arrObjKeys(obj, inspect);
14300
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
14301
- var protoTag = obj instanceof Object ? '' : 'null prototype';
14302
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
14303
- var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
14304
- var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
14305
- if (ys.length === 0) { return tag + '{}'; }
14306
- if (indent) {
14307
- return tag + '{' + indentedJoin(ys, indent) + '}';
14308
- }
14309
- return tag + '{ ' + $join.call(ys, ', ') + ' }';
14310
- }
14311
- return String(obj);
14312
- };
14313
-
14314
- function wrapQuotes(s, defaultStyle, opts) {
14315
- var style = opts.quoteStyle || defaultStyle;
14316
- var quoteChar = quotes[style];
14317
- return quoteChar + s + quoteChar;
14318
- }
14319
-
14320
- function quote(s) {
14321
- return $replace.call(String(s), /"/g, '&quot;');
14322
- }
14323
-
14324
- function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
14325
- function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
14326
- function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
14327
- function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
14328
- function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
14329
- function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
14330
- function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
14331
-
14332
- // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
14333
- function isSymbol(obj) {
14334
- if (hasShammedSymbols) {
14335
- return obj && typeof obj === 'object' && obj instanceof Symbol;
14336
- }
14337
- if (typeof obj === 'symbol') {
14338
- return true;
14339
- }
14340
- if (!obj || typeof obj !== 'object' || !symToString) {
14341
- return false;
14342
- }
14343
- try {
14344
- symToString.call(obj);
14345
- return true;
14346
- } catch (e) {}
14347
- return false;
14348
- }
14349
-
14350
- function isBigInt(obj) {
14351
- if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
14352
- return false;
14353
- }
14354
- try {
14355
- bigIntValueOf.call(obj);
14356
- return true;
14357
- } catch (e) {}
14358
- return false;
14359
- }
14360
-
14361
- var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
14362
- function has(obj, key) {
14363
- return hasOwn.call(obj, key);
14364
- }
14365
-
14366
- function toStr(obj) {
14367
- return objectToString.call(obj);
14368
- }
14369
-
14370
- function nameOf(f) {
14371
- if (f.name) { return f.name; }
14372
- var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
14373
- if (m) { return m[1]; }
14374
- return null;
14375
- }
14376
-
14377
- function indexOf(xs, x) {
14378
- if (xs.indexOf) { return xs.indexOf(x); }
14379
- for (var i = 0, l = xs.length; i < l; i++) {
14380
- if (xs[i] === x) { return i; }
14381
- }
14382
- return -1;
14383
- }
14384
-
14385
- function isMap(x) {
14386
- if (!mapSize || !x || typeof x !== 'object') {
14387
- return false;
14388
- }
14389
- try {
14390
- mapSize.call(x);
14391
- try {
14392
- setSize.call(x);
14393
- } catch (s) {
14394
- return true;
14395
- }
14396
- return x instanceof Map; // core-js workaround, pre-v2.5.0
14397
- } catch (e) {}
14398
- return false;
14399
- }
14400
-
14401
- function isWeakMap(x) {
14402
- if (!weakMapHas || !x || typeof x !== 'object') {
14403
- return false;
14404
- }
14405
- try {
14406
- weakMapHas.call(x, weakMapHas);
14407
- try {
14408
- weakSetHas.call(x, weakSetHas);
14409
- } catch (s) {
14410
- return true;
14411
- }
14412
- return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
14413
- } catch (e) {}
14414
- return false;
14415
- }
14416
-
14417
- function isWeakRef(x) {
14418
- if (!weakRefDeref || !x || typeof x !== 'object') {
14419
- return false;
14420
- }
14421
- try {
14422
- weakRefDeref.call(x);
14423
- return true;
14424
- } catch (e) {}
14425
- return false;
14426
- }
14427
-
14428
- function isSet(x) {
14429
- if (!setSize || !x || typeof x !== 'object') {
14430
- return false;
14431
- }
14432
- try {
14433
- setSize.call(x);
14434
- try {
14435
- mapSize.call(x);
14436
- } catch (m) {
14437
- return true;
14438
- }
14439
- return x instanceof Set; // core-js workaround, pre-v2.5.0
14440
- } catch (e) {}
14441
- return false;
14442
- }
14443
-
14444
- function isWeakSet(x) {
14445
- if (!weakSetHas || !x || typeof x !== 'object') {
14446
- return false;
14447
- }
14448
- try {
14449
- weakSetHas.call(x, weakSetHas);
14450
- try {
14451
- weakMapHas.call(x, weakMapHas);
14452
- } catch (s) {
14453
- return true;
14454
- }
14455
- return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
14456
- } catch (e) {}
14457
- return false;
14458
- }
14459
-
14460
- function isElement(x) {
14461
- if (!x || typeof x !== 'object') { return false; }
14462
- if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
14463
- return true;
14464
- }
14465
- return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
14466
- }
14467
-
14468
- function inspectString(str, opts) {
14469
- if (str.length > opts.maxStringLength) {
14470
- var remaining = str.length - opts.maxStringLength;
14471
- var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
14472
- return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
14473
- }
14474
- var quoteRE = quoteREs[opts.quoteStyle || 'single'];
14475
- quoteRE.lastIndex = 0;
14476
- // eslint-disable-next-line no-control-regex
14477
- var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
14478
- return wrapQuotes(s, 'single', opts);
14479
- }
14480
-
14481
- function lowbyte(c) {
14482
- var n = c.charCodeAt(0);
14483
- var x = {
14484
- 8: 'b',
14485
- 9: 't',
14486
- 10: 'n',
14487
- 12: 'f',
14488
- 13: 'r'
14489
- }[n];
14490
- if (x) { return '\\' + x; }
14491
- return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
14492
- }
14493
-
14494
- function markBoxed(str) {
14495
- return 'Object(' + str + ')';
14496
- }
14497
-
14498
- function weakCollectionOf(type) {
14499
- return type + ' { ? }';
14500
- }
14501
-
14502
- function collectionOf(type, size, entries, indent) {
14503
- var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
14504
- return type + ' (' + size + ') {' + joinedEntries + '}';
14505
- }
14506
-
14507
- function singleLineValues(xs) {
14508
- for (var i = 0; i < xs.length; i++) {
14509
- if (indexOf(xs[i], '\n') >= 0) {
14510
- return false;
14511
- }
14512
- }
14513
- return true;
14514
- }
14515
-
14516
- function getIndent(opts, depth) {
14517
- var baseIndent;
14518
- if (opts.indent === '\t') {
14519
- baseIndent = '\t';
14520
- } else if (typeof opts.indent === 'number' && opts.indent > 0) {
14521
- baseIndent = $join.call(Array(opts.indent + 1), ' ');
14522
- } else {
14523
- return null;
14524
- }
14525
- return {
14526
- base: baseIndent,
14527
- prev: $join.call(Array(depth + 1), baseIndent)
14528
- };
14529
- }
14530
-
14531
- function indentedJoin(xs, indent) {
14532
- if (xs.length === 0) { return ''; }
14533
- var lineJoiner = '\n' + indent.prev + indent.base;
14534
- return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
14535
- }
14536
-
14537
- function arrObjKeys(obj, inspect) {
14538
- var isArr = isArray(obj);
14539
- var xs = [];
14540
- if (isArr) {
14541
- xs.length = obj.length;
14542
- for (var i = 0; i < obj.length; i++) {
14543
- xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
14544
- }
14545
- }
14546
- var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
14547
- var symMap;
14548
- if (hasShammedSymbols) {
14549
- symMap = {};
14550
- for (var k = 0; k < syms.length; k++) {
14551
- symMap['$' + syms[k]] = syms[k];
14552
- }
14553
- }
14554
-
14555
- for (var key in obj) { // eslint-disable-line no-restricted-syntax
14556
- if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
14557
- if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
14558
- if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
14559
- // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
14560
- continue; // eslint-disable-line no-restricted-syntax, no-continue
14561
- } else if ($test.call(/[^\w$]/, key)) {
14562
- xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
14563
- } else {
14564
- xs.push(key + ': ' + inspect(obj[key], obj));
14565
- }
14566
- }
14567
- if (typeof gOPS === 'function') {
14568
- for (var j = 0; j < syms.length; j++) {
14569
- if (isEnumerable.call(obj, syms[j])) {
14570
- xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
14571
- }
14572
- }
14573
- }
14574
- return xs;
14575
- }
14576
- return objectInspect;
14577
- }
14578
-
14579
- var sideChannel;
14580
- var hasRequiredSideChannel;
14581
-
14582
- function requireSideChannel () {
14583
- if (hasRequiredSideChannel) return sideChannel;
14584
- hasRequiredSideChannel = 1;
14585
-
14586
- var GetIntrinsic = /*@__PURE__*/ requireGetIntrinsic();
14587
- var callBound = requireCallBound();
14588
- var inspect = /*@__PURE__*/ requireObjectInspect();
14589
-
14590
- var $TypeError = /*@__PURE__*/ requireType();
14591
- var $WeakMap = GetIntrinsic('%WeakMap%', true);
14592
- var $Map = GetIntrinsic('%Map%', true);
14593
-
14594
- var $weakMapGet = callBound('WeakMap.prototype.get', true);
14595
- var $weakMapSet = callBound('WeakMap.prototype.set', true);
14596
- var $weakMapHas = callBound('WeakMap.prototype.has', true);
14597
- var $mapGet = callBound('Map.prototype.get', true);
14598
- var $mapSet = callBound('Map.prototype.set', true);
14599
- var $mapHas = callBound('Map.prototype.has', true);
14600
-
14601
- /*
14602
- * This function traverses the list returning the node corresponding to the given key.
14603
- *
14604
- * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
14605
- */
14606
- /** @type {import('.').listGetNode} */
14607
- var listGetNode = function (list, key) { // eslint-disable-line consistent-return
14608
- /** @type {typeof list | NonNullable<(typeof list)['next']>} */
14609
- var prev = list;
14610
- /** @type {(typeof list)['next']} */
14611
- var curr;
14612
- for (; (curr = prev.next) !== null; prev = curr) {
14613
- if (curr.key === key) {
14614
- prev.next = curr.next;
14615
- // eslint-disable-next-line no-extra-parens
14616
- curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
14617
- list.next = curr; // eslint-disable-line no-param-reassign
14618
- return curr;
14619
- }
14620
- }
14621
- };
14622
-
14623
- /** @type {import('.').listGet} */
14624
- var listGet = function (objects, key) {
14625
- var node = listGetNode(objects, key);
14626
- return node && node.value;
14627
- };
14628
- /** @type {import('.').listSet} */
14629
- var listSet = function (objects, key, value) {
14630
- var node = listGetNode(objects, key);
14631
- if (node) {
14632
- node.value = value;
14633
- } else {
14634
- // Prepend the new node to the beginning of the list
14635
- objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
14636
- key: key,
14637
- next: objects.next,
14638
- value: value
14639
- });
14640
- }
14641
- };
14642
- /** @type {import('.').listHas} */
14643
- var listHas = function (objects, key) {
14644
- return !!listGetNode(objects, key);
14645
- };
14646
-
14647
- /** @type {import('.')} */
14648
- sideChannel = function getSideChannel() {
14649
- /** @type {WeakMap<object, unknown>} */ var $wm;
14650
- /** @type {Map<object, unknown>} */ var $m;
14651
- /** @type {import('.').RootNode<unknown>} */ var $o;
14652
-
14653
- /** @type {import('.').Channel} */
14654
- var channel = {
14655
- assert: function (key) {
14656
- if (!channel.has(key)) {
14657
- throw new $TypeError('Side channel does not contain ' + inspect(key));
14658
- }
14659
- },
14660
- get: function (key) { // eslint-disable-line consistent-return
14661
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
14662
- if ($wm) {
14663
- return $weakMapGet($wm, key);
14664
- }
14665
- } else if ($Map) {
14666
- if ($m) {
14667
- return $mapGet($m, key);
14668
- }
14669
- } else {
14670
- if ($o) { // eslint-disable-line no-lonely-if
14671
- return listGet($o, key);
14672
- }
14673
- }
14674
- },
14675
- has: function (key) {
14676
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
14677
- if ($wm) {
14678
- return $weakMapHas($wm, key);
14679
- }
14680
- } else if ($Map) {
14681
- if ($m) {
14682
- return $mapHas($m, key);
14683
- }
14684
- } else {
14685
- if ($o) { // eslint-disable-line no-lonely-if
14686
- return listHas($o, key);
14687
- }
14688
- }
14689
- return false;
14690
- },
14691
- set: function (key, value) {
14692
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
14693
- if (!$wm) {
14694
- $wm = new $WeakMap();
14695
- }
14696
- $weakMapSet($wm, key, value);
14697
- } else if ($Map) {
14698
- if (!$m) {
14699
- $m = new $Map();
14700
- }
14701
- $mapSet($m, key, value);
14702
- } else {
14703
- if (!$o) {
14704
- // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
14705
- $o = { key: {}, next: null };
14706
- }
14707
- listSet($o, key, value);
14708
- }
14709
- }
14710
- };
14711
- return channel;
14712
- };
14713
- return sideChannel;
14714
- }
14715
-
14716
- var formats;
14717
- var hasRequiredFormats;
14718
-
14719
- function requireFormats () {
14720
- if (hasRequiredFormats) return formats;
14721
- hasRequiredFormats = 1;
14722
-
14723
- var replace = String.prototype.replace;
14724
- var percentTwenties = /%20/g;
14725
-
14726
- var Format = {
14727
- RFC1738: 'RFC1738',
14728
- RFC3986: 'RFC3986'
14729
- };
14730
-
14731
- formats = {
14732
- 'default': Format.RFC3986,
14733
- formatters: {
14734
- RFC1738: function (value) {
14735
- return replace.call(value, percentTwenties, '+');
14736
- },
14737
- RFC3986: function (value) {
14738
- return String(value);
14739
- }
14740
- },
14741
- RFC1738: Format.RFC1738,
14742
- RFC3986: Format.RFC3986
14743
- };
14744
- return formats;
14745
- }
14746
-
14747
- var utils;
14748
- var hasRequiredUtils;
14749
-
14750
- function requireUtils () {
14751
- if (hasRequiredUtils) return utils;
14752
- hasRequiredUtils = 1;
14753
-
14754
- var formats = /*@__PURE__*/ requireFormats();
14755
-
14756
- var has = Object.prototype.hasOwnProperty;
14757
- var isArray = Array.isArray;
14758
-
14759
- var hexTable = (function () {
14760
- var array = [];
14761
- for (var i = 0; i < 256; ++i) {
14762
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
14763
- }
14764
-
14765
- return array;
14766
- }());
14767
-
14768
- var compactQueue = function compactQueue(queue) {
14769
- while (queue.length > 1) {
14770
- var item = queue.pop();
14771
- var obj = item.obj[item.prop];
14772
-
14773
- if (isArray(obj)) {
14774
- var compacted = [];
14775
-
14776
- for (var j = 0; j < obj.length; ++j) {
14777
- if (typeof obj[j] !== 'undefined') {
14778
- compacted.push(obj[j]);
14779
- }
14780
- }
14781
-
14782
- item.obj[item.prop] = compacted;
14783
- }
14784
- }
14785
- };
14786
-
14787
- var arrayToObject = function arrayToObject(source, options) {
14788
- var obj = options && options.plainObjects ? Object.create(null) : {};
14789
- for (var i = 0; i < source.length; ++i) {
14790
- if (typeof source[i] !== 'undefined') {
14791
- obj[i] = source[i];
14792
- }
14793
- }
14794
-
14795
- return obj;
14796
- };
14797
-
14798
- var merge = function merge(target, source, options) {
14799
- /* eslint no-param-reassign: 0 */
14800
- if (!source) {
14801
- return target;
14802
- }
14803
-
14804
- if (typeof source !== 'object') {
14805
- if (isArray(target)) {
14806
- target.push(source);
14807
- } else if (target && typeof target === 'object') {
14808
- if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
14809
- target[source] = true;
14810
- }
14811
- } else {
14812
- return [target, source];
14813
- }
14814
-
14815
- return target;
14816
- }
14817
-
14818
- if (!target || typeof target !== 'object') {
14819
- return [target].concat(source);
14820
- }
14821
-
14822
- var mergeTarget = target;
14823
- if (isArray(target) && !isArray(source)) {
14824
- mergeTarget = arrayToObject(target, options);
14825
- }
14826
-
14827
- if (isArray(target) && isArray(source)) {
14828
- source.forEach(function (item, i) {
14829
- if (has.call(target, i)) {
14830
- var targetItem = target[i];
14831
- if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
14832
- target[i] = merge(targetItem, item, options);
14833
- } else {
14834
- target.push(item);
14835
- }
14836
- } else {
14837
- target[i] = item;
14838
- }
14839
- });
14840
- return target;
14841
- }
14842
-
14843
- return Object.keys(source).reduce(function (acc, key) {
14844
- var value = source[key];
14845
-
14846
- if (has.call(acc, key)) {
14847
- acc[key] = merge(acc[key], value, options);
14848
- } else {
14849
- acc[key] = value;
14850
- }
14851
- return acc;
14852
- }, mergeTarget);
14853
- };
14854
-
14855
- var assign = function assignSingleSource(target, source) {
14856
- return Object.keys(source).reduce(function (acc, key) {
14857
- acc[key] = source[key];
14858
- return acc;
14859
- }, target);
14860
- };
14861
-
14862
- var decode = function (str, decoder, charset) {
14863
- var strWithoutPlus = str.replace(/\+/g, ' ');
14864
- if (charset === 'iso-8859-1') {
14865
- // unescape never throws, no try...catch needed:
14866
- return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
14867
- }
14868
- // utf-8
14869
- try {
14870
- return decodeURIComponent(strWithoutPlus);
14871
- } catch (e) {
14872
- return strWithoutPlus;
14873
- }
14874
- };
14875
-
14876
- var limit = 1024;
14877
-
14878
- /* eslint operator-linebreak: [2, "before"] */
14879
-
14880
- var encode = function encode(str, defaultEncoder, charset, kind, format) {
14881
- // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
14882
- // It has been adapted here for stricter adherence to RFC 3986
14883
- if (str.length === 0) {
14884
- return str;
14885
- }
14886
-
14887
- var string = str;
14888
- if (typeof str === 'symbol') {
14889
- string = Symbol.prototype.toString.call(str);
14890
- } else if (typeof str !== 'string') {
14891
- string = String(str);
14892
- }
14893
-
14894
- if (charset === 'iso-8859-1') {
14895
- return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
14896
- return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
14897
- });
14898
- }
14899
-
14900
- var out = '';
14901
- for (var j = 0; j < string.length; j += limit) {
14902
- var segment = string.length >= limit ? string.slice(j, j + limit) : string;
14903
- var arr = [];
14904
-
14905
- for (var i = 0; i < segment.length; ++i) {
14906
- var c = segment.charCodeAt(i);
14907
- if (
14908
- c === 0x2D // -
14909
- || c === 0x2E // .
14910
- || c === 0x5F // _
14911
- || c === 0x7E // ~
14912
- || (c >= 0x30 && c <= 0x39) // 0-9
14913
- || (c >= 0x41 && c <= 0x5A) // a-z
14914
- || (c >= 0x61 && c <= 0x7A) // A-Z
14915
- || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
14916
- ) {
14917
- arr[arr.length] = segment.charAt(i);
14918
- continue;
14919
- }
14920
-
14921
- if (c < 0x80) {
14922
- arr[arr.length] = hexTable[c];
14923
- continue;
14924
- }
14925
-
14926
- if (c < 0x800) {
14927
- arr[arr.length] = hexTable[0xC0 | (c >> 6)]
14928
- + hexTable[0x80 | (c & 0x3F)];
14929
- continue;
14930
- }
14931
-
14932
- if (c < 0xD800 || c >= 0xE000) {
14933
- arr[arr.length] = hexTable[0xE0 | (c >> 12)]
14934
- + hexTable[0x80 | ((c >> 6) & 0x3F)]
14935
- + hexTable[0x80 | (c & 0x3F)];
14936
- continue;
14937
- }
14938
-
14939
- i += 1;
14940
- c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));
14941
-
14942
- arr[arr.length] = hexTable[0xF0 | (c >> 18)]
14943
- + hexTable[0x80 | ((c >> 12) & 0x3F)]
14944
- + hexTable[0x80 | ((c >> 6) & 0x3F)]
14945
- + hexTable[0x80 | (c & 0x3F)];
14946
- }
14947
-
14948
- out += arr.join('');
14949
- }
14950
-
14951
- return out;
14952
- };
14953
-
14954
- var compact = function compact(value) {
14955
- var queue = [{ obj: { o: value }, prop: 'o' }];
14956
- var refs = [];
14957
-
14958
- for (var i = 0; i < queue.length; ++i) {
14959
- var item = queue[i];
14960
- var obj = item.obj[item.prop];
14961
-
14962
- var keys = Object.keys(obj);
14963
- for (var j = 0; j < keys.length; ++j) {
14964
- var key = keys[j];
14965
- var val = obj[key];
14966
- if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
14967
- queue.push({ obj: obj, prop: key });
14968
- refs.push(val);
14969
- }
14970
- }
14971
- }
14972
-
14973
- compactQueue(queue);
14974
-
14975
- return value;
14976
- };
14977
-
14978
- var isRegExp = function isRegExp(obj) {
14979
- return Object.prototype.toString.call(obj) === '[object RegExp]';
14980
- };
14981
-
14982
- var isBuffer = function isBuffer(obj) {
14983
- if (!obj || typeof obj !== 'object') {
14984
- return false;
14985
- }
14986
-
14987
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
14988
- };
14989
-
14990
- var combine = function combine(a, b) {
14991
- return [].concat(a, b);
14992
- };
14993
-
14994
- var maybeMap = function maybeMap(val, fn) {
14995
- if (isArray(val)) {
14996
- var mapped = [];
14997
- for (var i = 0; i < val.length; i += 1) {
14998
- mapped.push(fn(val[i]));
14999
- }
15000
- return mapped;
15001
- }
15002
- return fn(val);
15003
- };
15004
-
15005
- utils = {
15006
- arrayToObject: arrayToObject,
15007
- assign: assign,
15008
- combine: combine,
15009
- compact: compact,
15010
- decode: decode,
15011
- encode: encode,
15012
- isBuffer: isBuffer,
15013
- isRegExp: isRegExp,
15014
- maybeMap: maybeMap,
15015
- merge: merge
15016
- };
15017
- return utils;
15018
- }
15019
-
15020
- var stringify_1;
15021
- var hasRequiredStringify;
15022
-
15023
- function requireStringify () {
15024
- if (hasRequiredStringify) return stringify_1;
15025
- hasRequiredStringify = 1;
15026
-
15027
- var getSideChannel = requireSideChannel();
15028
- var utils = /*@__PURE__*/ requireUtils();
15029
- var formats = /*@__PURE__*/ requireFormats();
15030
- var has = Object.prototype.hasOwnProperty;
15031
-
15032
- var arrayPrefixGenerators = {
15033
- brackets: function brackets(prefix) {
15034
- return prefix + '[]';
15035
- },
15036
- comma: 'comma',
15037
- indices: function indices(prefix, key) {
15038
- return prefix + '[' + key + ']';
15039
- },
15040
- repeat: function repeat(prefix) {
15041
- return prefix;
15042
- }
15043
- };
15044
-
15045
- var isArray = Array.isArray;
15046
- var push = Array.prototype.push;
15047
- var pushToArray = function (arr, valueOrArray) {
15048
- push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
15049
- };
15050
-
15051
- var toISO = Date.prototype.toISOString;
15052
-
15053
- var defaultFormat = formats['default'];
15054
- var defaults = {
15055
- addQueryPrefix: false,
15056
- allowDots: false,
15057
- allowEmptyArrays: false,
15058
- arrayFormat: 'indices',
15059
- charset: 'utf-8',
15060
- charsetSentinel: false,
15061
- delimiter: '&',
15062
- encode: true,
15063
- encodeDotInKeys: false,
15064
- encoder: utils.encode,
15065
- encodeValuesOnly: false,
15066
- format: defaultFormat,
15067
- formatter: formats.formatters[defaultFormat],
15068
- // deprecated
15069
- indices: false,
15070
- serializeDate: function serializeDate(date) {
15071
- return toISO.call(date);
15072
- },
15073
- skipNulls: false,
15074
- strictNullHandling: false
15075
- };
15076
-
15077
- var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
15078
- return typeof v === 'string'
15079
- || typeof v === 'number'
15080
- || typeof v === 'boolean'
15081
- || typeof v === 'symbol'
15082
- || typeof v === 'bigint';
15083
- };
15084
-
15085
- var sentinel = {};
15086
-
15087
- var stringify = function stringify(
15088
- object,
15089
- prefix,
15090
- generateArrayPrefix,
15091
- commaRoundTrip,
15092
- allowEmptyArrays,
15093
- strictNullHandling,
15094
- skipNulls,
15095
- encodeDotInKeys,
15096
- encoder,
15097
- filter,
15098
- sort,
15099
- allowDots,
15100
- serializeDate,
15101
- format,
15102
- formatter,
15103
- encodeValuesOnly,
15104
- charset,
15105
- sideChannel
15106
- ) {
15107
- var obj = object;
15108
-
15109
- var tmpSc = sideChannel;
15110
- var step = 0;
15111
- var findFlag = false;
15112
- while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
15113
- // Where object last appeared in the ref tree
15114
- var pos = tmpSc.get(object);
15115
- step += 1;
15116
- if (typeof pos !== 'undefined') {
15117
- if (pos === step) {
15118
- throw new RangeError('Cyclic object value');
15119
- } else {
15120
- findFlag = true; // Break while
15121
- }
15122
- }
15123
- if (typeof tmpSc.get(sentinel) === 'undefined') {
15124
- step = 0;
15125
- }
15126
- }
15127
-
15128
- if (typeof filter === 'function') {
15129
- obj = filter(prefix, obj);
15130
- } else if (obj instanceof Date) {
15131
- obj = serializeDate(obj);
15132
- } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
15133
- obj = utils.maybeMap(obj, function (value) {
15134
- if (value instanceof Date) {
15135
- return serializeDate(value);
15136
- }
15137
- return value;
15138
- });
15139
- }
15140
-
15141
- if (obj === null) {
15142
- if (strictNullHandling) {
15143
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
15144
- }
15145
-
15146
- obj = '';
15147
- }
15148
-
15149
- if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
15150
- if (encoder) {
15151
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
15152
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
15153
- }
15154
- return [formatter(prefix) + '=' + formatter(String(obj))];
15155
- }
15156
-
15157
- var values = [];
15158
-
15159
- if (typeof obj === 'undefined') {
15160
- return values;
15161
- }
15162
-
15163
- var objKeys;
15164
- if (generateArrayPrefix === 'comma' && isArray(obj)) {
15165
- // we need to join elements in
15166
- if (encodeValuesOnly && encoder) {
15167
- obj = utils.maybeMap(obj, encoder);
15168
- }
15169
- objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
15170
- } else if (isArray(filter)) {
15171
- objKeys = filter;
15172
- } else {
15173
- var keys = Object.keys(obj);
15174
- objKeys = sort ? keys.sort(sort) : keys;
15175
- }
15176
-
15177
- var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix;
15178
-
15179
- var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
15180
-
15181
- if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
15182
- return adjustedPrefix + '[]';
15183
- }
15184
-
15185
- for (var j = 0; j < objKeys.length; ++j) {
15186
- var key = objKeys[j];
15187
- var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
15188
-
15189
- if (skipNulls && value === null) {
15190
- continue;
15191
- }
15192
-
15193
- var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
15194
- var keyPrefix = isArray(obj)
15195
- ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix
15196
- : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
15197
-
15198
- sideChannel.set(object, step);
15199
- var valueSideChannel = getSideChannel();
15200
- valueSideChannel.set(sentinel, sideChannel);
15201
- pushToArray(values, stringify(
15202
- value,
15203
- keyPrefix,
15204
- generateArrayPrefix,
15205
- commaRoundTrip,
15206
- allowEmptyArrays,
15207
- strictNullHandling,
15208
- skipNulls,
15209
- encodeDotInKeys,
15210
- generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,
15211
- filter,
15212
- sort,
15213
- allowDots,
15214
- serializeDate,
15215
- format,
15216
- formatter,
15217
- encodeValuesOnly,
15218
- charset,
15219
- valueSideChannel
15220
- ));
15221
- }
15222
-
15223
- return values;
15224
- };
15225
-
15226
- var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
15227
- if (!opts) {
15228
- return defaults;
15229
- }
15230
-
15231
- if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
15232
- throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
15233
- }
15234
-
15235
- if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {
15236
- throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');
15237
- }
15238
-
15239
- if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
15240
- throw new TypeError('Encoder has to be a function.');
15241
- }
15242
-
15243
- var charset = opts.charset || defaults.charset;
15244
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
15245
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
15246
- }
15247
-
15248
- var format = formats['default'];
15249
- if (typeof opts.format !== 'undefined') {
15250
- if (!has.call(formats.formatters, opts.format)) {
15251
- throw new TypeError('Unknown format option provided.');
15252
- }
15253
- format = opts.format;
15254
- }
15255
- var formatter = formats.formatters[format];
15256
-
15257
- var filter = defaults.filter;
15258
- if (typeof opts.filter === 'function' || isArray(opts.filter)) {
15259
- filter = opts.filter;
15260
- }
15261
-
15262
- var arrayFormat;
15263
- if (opts.arrayFormat in arrayPrefixGenerators) {
15264
- arrayFormat = opts.arrayFormat;
15265
- } else if ('indices' in opts) {
15266
- arrayFormat = opts.indices ? 'indices' : 'repeat';
15267
- } else {
15268
- arrayFormat = defaults.arrayFormat;
15269
- }
15270
-
15271
- if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
15272
- throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
15273
- }
15274
-
15275
- var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
15276
-
15277
- return {
15278
- addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
15279
- allowDots: allowDots,
15280
- allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
15281
- arrayFormat: arrayFormat,
15282
- charset: charset,
15283
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
15284
- commaRoundTrip: opts.commaRoundTrip,
15285
- delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
15286
- encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
15287
- encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
15288
- encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
15289
- encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
15290
- filter: filter,
15291
- format: format,
15292
- formatter: formatter,
15293
- serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
15294
- skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
15295
- sort: typeof opts.sort === 'function' ? opts.sort : null,
15296
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
15297
- };
15298
- };
15299
-
15300
- stringify_1 = function (object, opts) {
15301
- var obj = object;
15302
- var options = normalizeStringifyOptions(opts);
15303
-
15304
- var objKeys;
15305
- var filter;
15306
-
15307
- if (typeof options.filter === 'function') {
15308
- filter = options.filter;
15309
- obj = filter('', obj);
15310
- } else if (isArray(options.filter)) {
15311
- filter = options.filter;
15312
- objKeys = filter;
15313
- }
15314
-
15315
- var keys = [];
15316
-
15317
- if (typeof obj !== 'object' || obj === null) {
15318
- return '';
15319
- }
15320
-
15321
- var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
15322
- var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;
15323
-
15324
- if (!objKeys) {
15325
- objKeys = Object.keys(obj);
15326
- }
15327
-
15328
- if (options.sort) {
15329
- objKeys.sort(options.sort);
15330
- }
15331
-
15332
- var sideChannel = getSideChannel();
15333
- for (var i = 0; i < objKeys.length; ++i) {
15334
- var key = objKeys[i];
15335
-
15336
- if (options.skipNulls && obj[key] === null) {
15337
- continue;
15338
- }
15339
- pushToArray(keys, stringify(
15340
- obj[key],
15341
- key,
15342
- generateArrayPrefix,
15343
- commaRoundTrip,
15344
- options.allowEmptyArrays,
15345
- options.strictNullHandling,
15346
- options.skipNulls,
15347
- options.encodeDotInKeys,
15348
- options.encode ? options.encoder : null,
15349
- options.filter,
15350
- options.sort,
15351
- options.allowDots,
15352
- options.serializeDate,
15353
- options.format,
15354
- options.formatter,
15355
- options.encodeValuesOnly,
15356
- options.charset,
15357
- sideChannel
15358
- ));
15359
- }
15360
-
15361
- var joined = keys.join(options.delimiter);
15362
- var prefix = options.addQueryPrefix === true ? '?' : '';
15363
-
15364
- if (options.charsetSentinel) {
15365
- if (options.charset === 'iso-8859-1') {
15366
- // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
15367
- prefix += 'utf8=%26%2310003%3B&';
15368
- } else {
15369
- // encodeURIComponent('✓')
15370
- prefix += 'utf8=%E2%9C%93&';
15371
- }
15372
- }
15373
-
15374
- return joined.length > 0 ? prefix + joined : '';
15375
- };
15376
- return stringify_1;
15377
- }
15378
-
15379
- var parse;
15380
- var hasRequiredParse;
15381
-
15382
- function requireParse () {
15383
- if (hasRequiredParse) return parse;
15384
- hasRequiredParse = 1;
15385
-
15386
- var utils = /*@__PURE__*/ requireUtils();
15387
-
15388
- var has = Object.prototype.hasOwnProperty;
15389
- var isArray = Array.isArray;
15390
-
15391
- var defaults = {
15392
- allowDots: false,
15393
- allowEmptyArrays: false,
15394
- allowPrototypes: false,
15395
- allowSparse: false,
15396
- arrayLimit: 20,
15397
- charset: 'utf-8',
15398
- charsetSentinel: false,
15399
- comma: false,
15400
- decodeDotInKeys: false,
15401
- decoder: utils.decode,
15402
- delimiter: '&',
15403
- depth: 5,
15404
- duplicates: 'combine',
15405
- ignoreQueryPrefix: false,
15406
- interpretNumericEntities: false,
15407
- parameterLimit: 1000,
15408
- parseArrays: true,
15409
- plainObjects: false,
15410
- strictDepth: false,
15411
- strictNullHandling: false
15412
- };
15413
-
15414
- var interpretNumericEntities = function (str) {
15415
- return str.replace(/&#(\d+);/g, function ($0, numberStr) {
15416
- return String.fromCharCode(parseInt(numberStr, 10));
15417
- });
15418
- };
15419
-
15420
- var parseArrayValue = function (val, options) {
15421
- if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
15422
- return val.split(',');
15423
- }
15424
-
15425
- return val;
15426
- };
15427
-
15428
- // This is what browsers will submit when the ✓ character occurs in an
15429
- // application/x-www-form-urlencoded body and the encoding of the page containing
15430
- // the form is iso-8859-1, or when the submitted form has an accept-charset
15431
- // attribute of iso-8859-1. Presumably also with other charsets that do not contain
15432
- // the ✓ character, such as us-ascii.
15433
- var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
15434
-
15435
- // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
15436
- var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
15437
-
15438
- var parseValues = function parseQueryStringValues(str, options) {
15439
- var obj = { __proto__: null };
15440
-
15441
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
15442
- cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');
15443
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
15444
- var parts = cleanStr.split(options.delimiter, limit);
15445
- var skipIndex = -1; // Keep track of where the utf8 sentinel was found
15446
- var i;
15447
-
15448
- var charset = options.charset;
15449
- if (options.charsetSentinel) {
15450
- for (i = 0; i < parts.length; ++i) {
15451
- if (parts[i].indexOf('utf8=') === 0) {
15452
- if (parts[i] === charsetSentinel) {
15453
- charset = 'utf-8';
15454
- } else if (parts[i] === isoSentinel) {
15455
- charset = 'iso-8859-1';
15456
- }
15457
- skipIndex = i;
15458
- i = parts.length; // The eslint settings do not allow break;
15459
- }
15460
- }
15461
- }
15462
-
15463
- for (i = 0; i < parts.length; ++i) {
15464
- if (i === skipIndex) {
15465
- continue;
15466
- }
15467
- var part = parts[i];
15468
-
15469
- var bracketEqualsPos = part.indexOf(']=');
15470
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
15471
-
15472
- var key, val;
15473
- if (pos === -1) {
15474
- key = options.decoder(part, defaults.decoder, charset, 'key');
15475
- val = options.strictNullHandling ? null : '';
15476
- } else {
15477
- key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
15478
- val = utils.maybeMap(
15479
- parseArrayValue(part.slice(pos + 1), options),
15480
- function (encodedVal) {
15481
- return options.decoder(encodedVal, defaults.decoder, charset, 'value');
15482
- }
15483
- );
15484
- }
15485
-
15486
- if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
15487
- val = interpretNumericEntities(val);
15488
- }
15489
-
15490
- if (part.indexOf('[]=') > -1) {
15491
- val = isArray(val) ? [val] : val;
15492
- }
15493
-
15494
- var existing = has.call(obj, key);
15495
- if (existing && options.duplicates === 'combine') {
15496
- obj[key] = utils.combine(obj[key], val);
15497
- } else if (!existing || options.duplicates === 'last') {
15498
- obj[key] = val;
15499
- }
15500
- }
15501
-
15502
- return obj;
15503
- };
15504
-
15505
- var parseObject = function (chain, val, options, valuesParsed) {
15506
- var leaf = valuesParsed ? val : parseArrayValue(val, options);
15507
-
15508
- for (var i = chain.length - 1; i >= 0; --i) {
15509
- var obj;
15510
- var root = chain[i];
15511
-
15512
- if (root === '[]' && options.parseArrays) {
15513
- obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null))
15514
- ? []
15515
- : [].concat(leaf);
15516
- } else {
15517
- obj = options.plainObjects ? Object.create(null) : {};
15518
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
15519
- var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
15520
- var index = parseInt(decodedRoot, 10);
15521
- if (!options.parseArrays && decodedRoot === '') {
15522
- obj = { 0: leaf };
15523
- } else if (
15524
- !isNaN(index)
15525
- && root !== decodedRoot
15526
- && String(index) === decodedRoot
15527
- && index >= 0
15528
- && (options.parseArrays && index <= options.arrayLimit)
15529
- ) {
15530
- obj = [];
15531
- obj[index] = leaf;
15532
- } else if (decodedRoot !== '__proto__') {
15533
- obj[decodedRoot] = leaf;
15534
- }
15535
- }
15536
-
15537
- leaf = obj;
15538
- }
15539
-
15540
- return leaf;
15541
- };
15542
-
15543
- var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
15544
- if (!givenKey) {
15545
- return;
15546
- }
15547
-
15548
- // Transform dot notation to bracket notation
15549
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
15550
-
15551
- // The regex chunks
15552
-
15553
- var brackets = /(\[[^[\]]*])/;
15554
- var child = /(\[[^[\]]*])/g;
15555
-
15556
- // Get the parent
15557
-
15558
- var segment = options.depth > 0 && brackets.exec(key);
15559
- var parent = segment ? key.slice(0, segment.index) : key;
15560
-
15561
- // Stash the parent if it exists
15562
-
15563
- var keys = [];
15564
- if (parent) {
15565
- // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
15566
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
15567
- if (!options.allowPrototypes) {
15568
- return;
15569
- }
15570
- }
15571
-
15572
- keys.push(parent);
15573
- }
15574
-
15575
- // Loop through children appending to the array until we hit depth
15576
-
15577
- var i = 0;
15578
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
15579
- i += 1;
15580
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
15581
- if (!options.allowPrototypes) {
15582
- return;
15583
- }
15584
- }
15585
- keys.push(segment[1]);
15586
- }
15587
-
15588
- // If there's a remainder, check strictDepth option for throw, else just add whatever is left
15589
-
15590
- if (segment) {
15591
- if (options.strictDepth === true) {
15592
- throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
15593
- }
15594
- keys.push('[' + key.slice(segment.index) + ']');
15595
- }
15596
-
15597
- return parseObject(keys, val, options, valuesParsed);
15598
- };
15599
-
15600
- var normalizeParseOptions = function normalizeParseOptions(opts) {
15601
- if (!opts) {
15602
- return defaults;
15603
- }
15604
-
15605
- if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
15606
- throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
15607
- }
15608
-
15609
- if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {
15610
- throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');
15611
- }
15612
-
15613
- if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {
15614
- throw new TypeError('Decoder has to be a function.');
15615
- }
15616
-
15617
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
15618
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
15619
- }
15620
- var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
15621
-
15622
- var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;
15623
-
15624
- if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {
15625
- throw new TypeError('The duplicates option must be either combine, first, or last');
15626
- }
15627
-
15628
- var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
15629
-
15630
- return {
15631
- allowDots: allowDots,
15632
- allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
15633
- allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
15634
- allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
15635
- arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
15636
- charset: charset,
15637
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
15638
- comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
15639
- decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
15640
- decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
15641
- delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
15642
- // eslint-disable-next-line no-implicit-coercion, no-extra-parens
15643
- depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
15644
- duplicates: duplicates,
15645
- ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
15646
- interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
15647
- parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
15648
- parseArrays: opts.parseArrays !== false,
15649
- plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
15650
- strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,
15651
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
15652
- };
15653
- };
15654
-
15655
- parse = function (str, opts) {
15656
- var options = normalizeParseOptions(opts);
15657
-
15658
- if (str === '' || str === null || typeof str === 'undefined') {
15659
- return options.plainObjects ? Object.create(null) : {};
15660
- }
15661
-
15662
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
15663
- var obj = options.plainObjects ? Object.create(null) : {};
15664
-
15665
- // Iterate over the keys and setup the new object
15666
-
15667
- var keys = Object.keys(tempObj);
15668
- for (var i = 0; i < keys.length; ++i) {
15669
- var key = keys[i];
15670
- var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
15671
- obj = utils.merge(obj, newObj, options);
15672
- }
15673
-
15674
- if (options.allowSparse === true) {
15675
- return obj;
15676
- }
15677
-
15678
- return utils.compact(obj);
15679
- };
15680
- return parse;
15681
- }
15682
-
15683
- var lib;
15684
- var hasRequiredLib;
15685
-
15686
- function requireLib () {
15687
- if (hasRequiredLib) return lib;
15688
- hasRequiredLib = 1;
15689
-
15690
- var stringify = /*@__PURE__*/ requireStringify();
15691
- var parse = /*@__PURE__*/ requireParse();
15692
- var formats = /*@__PURE__*/ requireFormats();
15693
-
15694
- lib = {
15695
- formats: formats,
15696
- parse: parse,
15697
- stringify: stringify
15698
- };
15699
- return lib;
15700
- }
15701
-
15702
- var libExports = /*@__PURE__*/ requireLib();
15703
- const qs = /*@__PURE__*/getDefaultExportFromCjs(libExports);
14006
+ function parse(str, opts) {
14007
+ const options = normalizeParseOptions(opts);
14008
+
14009
+ if (str === '' || str === null || typeof str === 'undefined') {
14010
+ return options.plainObjects ? Object.create(null) : {}
14011
+ }
14012
+
14013
+ const tempObj = typeof str === 'string' ? parseValues(str, options) : str;
14014
+ let obj = options.plainObjects ? Object.create(null) : {};
14015
+
14016
+ // Iterate over the keys and setup the new object
14017
+
14018
+ const keys = Object.keys(tempObj);
14019
+ for (let i = 0; i < keys.length; ++i) {
14020
+ const key = keys[i];
14021
+ const newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
14022
+ obj = merge(obj, newObj, options);
14023
+ }
14024
+
14025
+ if (options.allowSparse === true) {
14026
+ return obj
14027
+ }
14028
+
14029
+ return compact(obj)
14030
+ }
15704
14031
 
15705
14032
  class Http {
15706
14033
  #clientAxios;
@@ -15708,7 +14035,10 @@
15708
14035
  #restrictionManager;
15709
14036
  #requestIdGenerator;
15710
14037
  _logger = null;
14038
+ _loggerSystem = null;
15711
14039
  #logTag = "";
14040
+ #isClientSideWarning = false;
14041
+ #clientSideWarningMessage = "";
15712
14042
  constructor(baseURL, authActions, options) {
15713
14043
  this.#clientAxios = axios.create({
15714
14044
  baseURL,
@@ -15718,6 +14048,7 @@
15718
14048
  this.#restrictionManager = new RestrictionManager();
15719
14049
  this.#requestIdGenerator = new DefaultRequestIdGenerator();
15720
14050
  }
14051
+ // region Logger ////
15721
14052
  setLogger(logger) {
15722
14053
  this._logger = logger;
15723
14054
  this.#restrictionManager.setLogger(this.getLogger());
@@ -15736,18 +14067,38 @@
15736
14067
  }
15737
14068
  return this._logger;
15738
14069
  }
14070
+ getSystemLogger() {
14071
+ if (null === this._loggerSystem) {
14072
+ this._loggerSystem = LoggerBrowser.build(`SystemLogger`);
14073
+ this._loggerSystem.setConfig({
14074
+ [LoggerType.desktop]: false,
14075
+ [LoggerType.log]: false,
14076
+ [LoggerType.info]: true,
14077
+ [LoggerType.warn]: true,
14078
+ [LoggerType.error]: true,
14079
+ [LoggerType.trace]: false
14080
+ });
14081
+ }
14082
+ return this._loggerSystem;
14083
+ }
14084
+ // endregion ////
14085
+ // region RestrictionManager ////
15739
14086
  setRestrictionManagerParams(params) {
15740
14087
  this.#restrictionManager.params = params;
15741
14088
  }
15742
14089
  getRestrictionManagerParams() {
15743
14090
  return this.#restrictionManager.params;
15744
14091
  }
14092
+ // endregion ////
14093
+ // region LogTag ////
15745
14094
  setLogTag(logTag) {
15746
14095
  this.#logTag = logTag;
15747
14096
  }
15748
14097
  clearLogTag() {
15749
14098
  this.#logTag = "";
15750
14099
  }
14100
+ // endregion ////
14101
+ // region Actions Call ////
15751
14102
  async batch(calls, isHaltOnError = true) {
15752
14103
  const isArrayMode = Array.isArray(calls);
15753
14104
  const cmd = isArrayMode ? [] : {};
@@ -15764,7 +14115,7 @@
15764
14115
  }
15765
14116
  if (method) {
15766
14117
  cnt++;
15767
- const data = method + "?" + qs.stringify(params);
14118
+ const data = method + "?" + stringify(params);
15768
14119
  if (isArrayMode || Array.isArray(cmd)) {
15769
14120
  cmd.push(data);
15770
14121
  } else {
@@ -15812,7 +14163,7 @@
15812
14163
  },
15813
14164
  {
15814
14165
  method: q[0] || "",
15815
- params: qs.parse(q[1] || ""),
14166
+ params: parse(q[1] || ""),
15816
14167
  start: 0
15817
14168
  },
15818
14169
  response.getStatus()
@@ -15836,7 +14187,7 @@
15836
14187
  status: 0,
15837
14188
  answerError: {
15838
14189
  error: result2.getErrorMessages().join("; "),
15839
- errorDescription: `batch ${result2.getQuery().method}: ${qs.stringify(result2.getQuery().params, { encode: false })}`
14190
+ errorDescription: `batch ${result2.getQuery().method}: ${stringify(result2.getQuery().params, { encode: false })}`
15840
14191
  },
15841
14192
  cause: result2.getErrors().next().value
15842
14193
  });
@@ -15889,6 +14240,9 @@
15889
14240
  authData = await this.#authActions.refreshAuth();
15890
14241
  }
15891
14242
  await this.#restrictionManager.check();
14243
+ if (this.#isClientSideWarning && !this.isServerSide() && Type.isStringFilled(this.#clientSideWarningMessage)) {
14244
+ this.getSystemLogger().warn(this.#clientSideWarningMessage);
14245
+ }
15892
14246
  return this.#clientAxios.post(
15893
14247
  this.#prepareMethod(method),
15894
14248
  this.#prepareParams(authData, params, start)
@@ -15972,6 +14326,8 @@
15972
14326
  return Promise.resolve(result);
15973
14327
  });
15974
14328
  }
14329
+ // endregion ////
14330
+ // region Prepare ////
15975
14331
  /**
15976
14332
  * Processes function parameters and adds authorization
15977
14333
  *
@@ -15987,7 +14343,7 @@
15987
14343
  result.logTag = this.#logTag;
15988
14344
  }
15989
14345
  result[this.#requestIdGenerator.getQueryStringParameterName()] = this.#requestIdGenerator.getRequestId();
15990
- result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.3";
14346
+ result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.5";
15991
14347
  if (!!result.data && !!result.data.start) {
15992
14348
  delete result.data.start;
15993
14349
  }
@@ -16006,6 +14362,24 @@
16006
14362
  #prepareMethod(method) {
16007
14363
  return `${encodeURIComponent(method)}.json`;
16008
14364
  }
14365
+ /**
14366
+ * @inheritDoc
14367
+ */
14368
+ setClientSideWarning(value, message) {
14369
+ this.#isClientSideWarning = value;
14370
+ this.#clientSideWarningMessage = message;
14371
+ }
14372
+ // endregion ////
14373
+ // region Tools ////
14374
+ /**
14375
+ * Tests whether the code is executed on the client side
14376
+ * @return {boolean}
14377
+ * @protected
14378
+ */
14379
+ isServerSide() {
14380
+ return Type.isUndefined(window);
14381
+ }
14382
+ // endregion ////
16009
14383
  }
16010
14384
 
16011
14385
  class AbstractB24 {
@@ -17060,6 +15434,10 @@
17060
15434
  this.#authHookManager,
17061
15435
  this._getHttpOptions()
17062
15436
  );
15437
+ this._http.setClientSideWarning(
15438
+ true,
15439
+ "It is not safe to use hook requests on the client side"
15440
+ );
17063
15441
  this._isInit = true;
17064
15442
  }
17065
15443
  setLogger(logger) {
@@ -17070,6 +15448,12 @@
17070
15448
  return this.#authHookManager;
17071
15449
  }
17072
15450
  // region Core ////
15451
+ /**
15452
+ * Disables warning about client-side query execution
15453
+ */
15454
+ offClientSideWarning() {
15455
+ this.getHttpClient().setClientSideWarning(false, "");
15456
+ }
17073
15457
  // endregion ////
17074
15458
  // region Get ////
17075
15459
  /**
@@ -19071,6 +17455,12 @@
19071
17455
  }
19072
17456
  }
19073
17457
 
17458
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
17459
+
17460
+ function getDefaultExportFromCjs (x) {
17461
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
17462
+ }
17463
+
19074
17464
  var protobuf = {exports: {}};
19075
17465
 
19076
17466
  /*!