@vonage/client-sdk 1.4.0-alpha.2 → 1.4.0-alpha.4

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.
@@ -19587,6 +19587,9 @@ function requireClientsdkClientcore () {
19587
19587
  setMetadataFor(Companion_121, 'Companion', objectMeta);
19588
19588
  setMetadataFor($serializer_143, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
19589
19589
  setMetadataFor(SessionTerminatedEvent, 'SessionTerminatedEvent', classMeta, VOID, [SocketEvent], VOID, {0: $serializer_getInstance_143});
19590
+ function onConversationEvent(event) {
19591
+ }
19592
+ setMetadataFor(ConversationEventListener, 'ConversationEventListener', interfaceMeta);
19590
19593
  function onRTCHangup(conversationId, legId, hangup) {
19591
19594
  }
19592
19595
  function onRTCTransfer(conversationId, legId) {
@@ -19603,10 +19606,7 @@ function requireClientsdkClientcore () {
19603
19606
  function onAudioDTMFUpdate(conversationId, legId, digits) {
19604
19607
  }
19605
19608
  setMetadataFor(AudioEventListener, 'AudioEventListener', interfaceMeta);
19606
- function onConversationEvent(event) {
19607
- }
19608
- setMetadataFor(ConversationEventListener, 'ConversationEventListener', interfaceMeta);
19609
- setMetadataFor(ChatAPIImpl$1, VOID, classMeta, VOID, [RTCEventListener, AudioEventListener, ConversationEventListener]);
19609
+ setMetadataFor(ChatAPIImpl$1, VOID, classMeta, VOID, [ConversationEventListener, RTCEventListener, AudioEventListener]);
19610
19610
  setMetadataFor(ChatAPIImpl, 'ChatAPIImpl', classMeta, VOID, [ChatAPI]);
19611
19611
  setMetadataFor(LoggingLevel, 'LoggingLevel', classMeta, Enum);
19612
19612
  setMetadataFor(ClientConfigRegion, 'ClientConfigRegion', classMeta, Enum);
@@ -19715,7 +19715,7 @@ function requireClientsdkClientcore () {
19715
19715
  setMetadataFor(HangupReason, 'HangupReason', classMeta, Enum);
19716
19716
  setMetadataFor(LegStatus, 'LegStatus', classMeta, Enum);
19717
19717
  setMetadataFor(CallDisconnectReason, 'CallDisconnectReason', classMeta, Enum);
19718
- setMetadataFor(VoiceAPIImpl$1, VOID, classMeta, VOID, [RTCEventListener, AudioEventListener, ConversationEventListener]);
19718
+ setMetadataFor(VoiceAPIImpl$1, VOID, classMeta, VOID, [ConversationEventListener, RTCEventListener, AudioEventListener]);
19719
19719
  setMetadataFor(VoiceAPIImpl, 'VoiceAPIImpl', classMeta);
19720
19720
  setMetadataFor(CallEvent, 'CallEvent', interfaceMeta);
19721
19721
  setMetadataFor(SetupOutboundCall, 'SetupOutboundCall', classMeta, VOID, [CallEvent]);
@@ -19930,7 +19930,7 @@ function requireClientsdkClientcore () {
19930
19930
  //endregion
19931
19931
  function BuildKonfig() {
19932
19932
  BuildKonfig_instance = this;
19933
- this.t17_1 = '1.4.0-alpha.2';
19933
+ this.t17_1 = '1.4.0-alpha.4';
19934
19934
  }
19935
19935
  var BuildKonfig_instance;
19936
19936
  function BuildKonfig_getInstance() {
@@ -65550,12 +65550,16 @@ const isStream = (val) => isObject$2(val) && isFunction(val.pipe);
65550
65550
  * @returns {boolean} True if value is an FormData, otherwise false
65551
65551
  */
65552
65552
  const isFormData = (thing) => {
65553
- const pattern = '[object FormData]';
65553
+ let kind;
65554
65554
  return thing && (
65555
- (typeof FormData === 'function' && thing instanceof FormData) ||
65556
- toString$1.call(thing) === pattern ||
65557
- (isFunction(thing.toString) && thing.toString() === pattern)
65558
- );
65555
+ (typeof FormData === 'function' && thing instanceof FormData) || (
65556
+ isFunction(thing.append) && (
65557
+ (kind = kindOf(thing)) === 'formdata' ||
65558
+ // detect form-data instance
65559
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
65560
+ )
65561
+ )
65562
+ )
65559
65563
  };
65560
65564
 
65561
65565
  /**
@@ -65874,7 +65878,7 @@ const matchAll = (regExp, str) => {
65874
65878
  const isHTMLForm = kindOfTest('HTMLFormElement');
65875
65879
 
65876
65880
  const toCamelCase = str => {
65877
- return str.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,
65881
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
65878
65882
  function replacer(m, p1, p2) {
65879
65883
  return p1.toUpperCase() + p2;
65880
65884
  }
@@ -65898,8 +65902,9 @@ const reduceDescriptors = (obj, reducer) => {
65898
65902
  const reducedDescriptors = {};
65899
65903
 
65900
65904
  forEach(descriptors, (descriptor, name) => {
65901
- if (reducer(descriptor, name, obj) !== false) {
65902
- reducedDescriptors[name] = descriptor;
65905
+ let ret;
65906
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
65907
+ reducedDescriptors[name] = ret || descriptor;
65903
65908
  }
65904
65909
  });
65905
65910
 
@@ -65958,6 +65963,37 @@ const toFiniteNumber = (value, defaultValue) => {
65958
65963
  return Number.isFinite(value) ? value : defaultValue;
65959
65964
  };
65960
65965
 
65966
+ const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
65967
+
65968
+ const DIGIT = '0123456789';
65969
+
65970
+ const ALPHABET = {
65971
+ DIGIT,
65972
+ ALPHA,
65973
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
65974
+ };
65975
+
65976
+ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
65977
+ let str = '';
65978
+ const {length} = alphabet;
65979
+ while (size--) {
65980
+ str += alphabet[Math.random() * length|0];
65981
+ }
65982
+
65983
+ return str;
65984
+ };
65985
+
65986
+ /**
65987
+ * If the thing is a FormData object, return true, otherwise return false.
65988
+ *
65989
+ * @param {unknown} thing - The thing to check.
65990
+ *
65991
+ * @returns {boolean}
65992
+ */
65993
+ function isSpecCompliantForm(thing) {
65994
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
65995
+ }
65996
+
65961
65997
  const toJSONObject = (obj) => {
65962
65998
  const stack = new Array(10);
65963
65999
 
@@ -65989,7 +66025,12 @@ const toJSONObject = (obj) => {
65989
66025
  return visit(obj, 0);
65990
66026
  };
65991
66027
 
65992
- var utils$1 = {
66028
+ const isAsyncFn = kindOfTest('AsyncFunction');
66029
+
66030
+ const isThenable = (thing) =>
66031
+ thing && (isObject$2(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
66032
+
66033
+ var utils$2 = {
65993
66034
  isArray,
65994
66035
  isArrayBuffer,
65995
66036
  isBuffer,
@@ -66035,7 +66076,12 @@ var utils$1 = {
66035
66076
  findKey,
66036
66077
  global: _global,
66037
66078
  isContextDefined,
66038
- toJSONObject
66079
+ ALPHABET,
66080
+ generateString,
66081
+ isSpecCompliantForm,
66082
+ toJSONObject,
66083
+ isAsyncFn,
66084
+ isThenable
66039
66085
  };
66040
66086
 
66041
66087
  /**
@@ -66066,7 +66112,7 @@ function AxiosError(message, code, config, request, response) {
66066
66112
  response && (this.response = response);
66067
66113
  }
66068
66114
 
66069
- utils$1.inherits(AxiosError, Error, {
66115
+ utils$2.inherits(AxiosError, Error, {
66070
66116
  toJSON: function toJSON() {
66071
66117
  return {
66072
66118
  // Standard
@@ -66081,7 +66127,7 @@ utils$1.inherits(AxiosError, Error, {
66081
66127
  columnNumber: this.columnNumber,
66082
66128
  stack: this.stack,
66083
66129
  // Axios
66084
- config: utils$1.toJSONObject(this.config),
66130
+ config: utils$2.toJSONObject(this.config),
66085
66131
  code: this.code,
66086
66132
  status: this.response && this.response.status ? this.response.status : null
66087
66133
  };
@@ -66116,7 +66162,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
66116
66162
  AxiosError.from = (error, code, config, request, response, customProps) => {
66117
66163
  const axiosError = Object.create(prototype$1);
66118
66164
 
66119
- utils$1.toFlatObject(error, axiosError, function filter(obj) {
66165
+ utils$2.toFlatObject(error, axiosError, function filter(obj) {
66120
66166
  return obj !== Error.prototype;
66121
66167
  }, prop => {
66122
66168
  return prop !== 'isAxiosError';
@@ -66133,11 +66179,8 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
66133
66179
  return axiosError;
66134
66180
  };
66135
66181
 
66136
- /* eslint-env browser */
66137
-
66138
- var browser = typeof self == 'object' ? self.FormData : window.FormData;
66139
-
66140
- var FormData$2 = browser;
66182
+ // eslint-disable-next-line strict
66183
+ var httpAdapter = null;
66141
66184
 
66142
66185
  /**
66143
66186
  * Determines if the given thing is a array or js object.
@@ -66147,7 +66190,7 @@ var FormData$2 = browser;
66147
66190
  * @returns {boolean}
66148
66191
  */
66149
66192
  function isVisitable(thing) {
66150
- return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
66193
+ return utils$2.isPlainObject(thing) || utils$2.isArray(thing);
66151
66194
  }
66152
66195
 
66153
66196
  /**
@@ -66158,7 +66201,7 @@ function isVisitable(thing) {
66158
66201
  * @returns {string} the key without the brackets.
66159
66202
  */
66160
66203
  function removeBrackets(key) {
66161
- return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
66204
+ return utils$2.endsWith(key, '[]') ? key.slice(0, -2) : key;
66162
66205
  }
66163
66206
 
66164
66207
  /**
@@ -66187,24 +66230,13 @@ function renderKey(path, key, dots) {
66187
66230
  * @returns {boolean}
66188
66231
  */
66189
66232
  function isFlatArray(arr) {
66190
- return utils$1.isArray(arr) && !arr.some(isVisitable);
66233
+ return utils$2.isArray(arr) && !arr.some(isVisitable);
66191
66234
  }
66192
66235
 
66193
- const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
66236
+ const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter(prop) {
66194
66237
  return /^is[A-Z]/.test(prop);
66195
66238
  });
66196
66239
 
66197
- /**
66198
- * If the thing is a FormData object, return true, otherwise return false.
66199
- *
66200
- * @param {unknown} thing - The thing to check.
66201
- *
66202
- * @returns {boolean}
66203
- */
66204
- function isSpecCompliant(thing) {
66205
- return thing && utils$1.isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator];
66206
- }
66207
-
66208
66240
  /**
66209
66241
  * Convert a data object to FormData
66210
66242
  *
@@ -66229,21 +66261,21 @@ function isSpecCompliant(thing) {
66229
66261
  * @returns
66230
66262
  */
66231
66263
  function toFormData(obj, formData, options) {
66232
- if (!utils$1.isObject(obj)) {
66264
+ if (!utils$2.isObject(obj)) {
66233
66265
  throw new TypeError('target must be an object');
66234
66266
  }
66235
66267
 
66236
66268
  // eslint-disable-next-line no-param-reassign
66237
- formData = formData || new (FormData$2 || FormData)();
66269
+ formData = formData || new (FormData)();
66238
66270
 
66239
66271
  // eslint-disable-next-line no-param-reassign
66240
- options = utils$1.toFlatObject(options, {
66272
+ options = utils$2.toFlatObject(options, {
66241
66273
  metaTokens: true,
66242
66274
  dots: false,
66243
66275
  indexes: false
66244
66276
  }, false, function defined(option, source) {
66245
66277
  // eslint-disable-next-line no-eq-null,eqeqeq
66246
- return !utils$1.isUndefined(source[option]);
66278
+ return !utils$2.isUndefined(source[option]);
66247
66279
  });
66248
66280
 
66249
66281
  const metaTokens = options.metaTokens;
@@ -66252,24 +66284,24 @@ function toFormData(obj, formData, options) {
66252
66284
  const dots = options.dots;
66253
66285
  const indexes = options.indexes;
66254
66286
  const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
66255
- const useBlob = _Blob && isSpecCompliant(formData);
66287
+ const useBlob = _Blob && utils$2.isSpecCompliantForm(formData);
66256
66288
 
66257
- if (!utils$1.isFunction(visitor)) {
66289
+ if (!utils$2.isFunction(visitor)) {
66258
66290
  throw new TypeError('visitor must be a function');
66259
66291
  }
66260
66292
 
66261
66293
  function convertValue(value) {
66262
66294
  if (value === null) return '';
66263
66295
 
66264
- if (utils$1.isDate(value)) {
66296
+ if (utils$2.isDate(value)) {
66265
66297
  return value.toISOString();
66266
66298
  }
66267
66299
 
66268
- if (!useBlob && utils$1.isBlob(value)) {
66300
+ if (!useBlob && utils$2.isBlob(value)) {
66269
66301
  throw new AxiosError('Blob is not supported. Use a Buffer instead.');
66270
66302
  }
66271
66303
 
66272
- if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
66304
+ if (utils$2.isArrayBuffer(value) || utils$2.isTypedArray(value)) {
66273
66305
  return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
66274
66306
  }
66275
66307
 
@@ -66290,20 +66322,20 @@ function toFormData(obj, formData, options) {
66290
66322
  let arr = value;
66291
66323
 
66292
66324
  if (value && !path && typeof value === 'object') {
66293
- if (utils$1.endsWith(key, '{}')) {
66325
+ if (utils$2.endsWith(key, '{}')) {
66294
66326
  // eslint-disable-next-line no-param-reassign
66295
66327
  key = metaTokens ? key : key.slice(0, -2);
66296
66328
  // eslint-disable-next-line no-param-reassign
66297
66329
  value = JSON.stringify(value);
66298
66330
  } else if (
66299
- (utils$1.isArray(value) && isFlatArray(value)) ||
66300
- (utils$1.isFileList(value) || utils$1.endsWith(key, '[]') && (arr = utils$1.toArray(value))
66331
+ (utils$2.isArray(value) && isFlatArray(value)) ||
66332
+ ((utils$2.isFileList(value) || utils$2.endsWith(key, '[]')) && (arr = utils$2.toArray(value))
66301
66333
  )) {
66302
66334
  // eslint-disable-next-line no-param-reassign
66303
66335
  key = removeBrackets(key);
66304
66336
 
66305
66337
  arr.forEach(function each(el, index) {
66306
- !(utils$1.isUndefined(el) || el === null) && formData.append(
66338
+ !(utils$2.isUndefined(el) || el === null) && formData.append(
66307
66339
  // eslint-disable-next-line no-nested-ternary
66308
66340
  indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
66309
66341
  convertValue(el)
@@ -66331,7 +66363,7 @@ function toFormData(obj, formData, options) {
66331
66363
  });
66332
66364
 
66333
66365
  function build(value, path) {
66334
- if (utils$1.isUndefined(value)) return;
66366
+ if (utils$2.isUndefined(value)) return;
66335
66367
 
66336
66368
  if (stack.indexOf(value) !== -1) {
66337
66369
  throw Error('Circular reference detected in ' + path.join('.'));
@@ -66339,9 +66371,9 @@ function toFormData(obj, formData, options) {
66339
66371
 
66340
66372
  stack.push(value);
66341
66373
 
66342
- utils$1.forEach(value, function each(el, key) {
66343
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
66344
- formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
66374
+ utils$2.forEach(value, function each(el, key) {
66375
+ const result = !(utils$2.isUndefined(el) || el === null) && visitor.call(
66376
+ formData, el, utils$2.isString(key) ? key.trim() : key, path, exposedHelpers
66345
66377
  );
66346
66378
 
66347
66379
  if (result === true) {
@@ -66352,7 +66384,7 @@ function toFormData(obj, formData, options) {
66352
66384
  stack.pop();
66353
66385
  }
66354
66386
 
66355
- if (!utils$1.isObject(obj)) {
66387
+ if (!utils$2.isObject(obj)) {
66356
66388
  throw new TypeError('data must be an object');
66357
66389
  }
66358
66390
 
@@ -66456,7 +66488,7 @@ function buildURL(url, params, options) {
66456
66488
  if (serializeFn) {
66457
66489
  serializedParams = serializeFn(params, options);
66458
66490
  } else {
66459
- serializedParams = utils$1.isURLSearchParams(params) ?
66491
+ serializedParams = utils$2.isURLSearchParams(params) ?
66460
66492
  params.toString() :
66461
66493
  new AxiosURLSearchParams(params, options).toString(_encode);
66462
66494
  }
@@ -66531,7 +66563,7 @@ class InterceptorManager {
66531
66563
  * @returns {void}
66532
66564
  */
66533
66565
  forEach(fn) {
66534
- utils$1.forEach(this.handlers, function forEachHandler(h) {
66566
+ utils$2.forEach(this.handlers, function forEachHandler(h) {
66535
66567
  if (h !== null) {
66536
66568
  fn(h);
66537
66569
  }
@@ -66549,7 +66581,21 @@ var transitionalDefaults = {
66549
66581
 
66550
66582
  var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
66551
66583
 
66552
- var FormData$1 = FormData;
66584
+ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
66585
+
66586
+ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
66587
+
66588
+ var platform$1 = {
66589
+ isBrowser: true,
66590
+ classes: {
66591
+ URLSearchParams: URLSearchParams$1,
66592
+ FormData: FormData$1,
66593
+ Blob: Blob$1
66594
+ },
66595
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
66596
+ };
66597
+
66598
+ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
66553
66599
 
66554
66600
  /**
66555
66601
  * Determine if we're running in a standard browser environment
@@ -66568,18 +66614,10 @@ var FormData$1 = FormData;
66568
66614
  *
66569
66615
  * @returns {boolean}
66570
66616
  */
66571
- const isStandardBrowserEnv = (() => {
66572
- let product;
66573
- if (typeof navigator !== 'undefined' && (
66574
- (product = navigator.product) === 'ReactNative' ||
66575
- product === 'NativeScript' ||
66576
- product === 'NS')
66577
- ) {
66578
- return false;
66579
- }
66580
-
66581
- return typeof window !== 'undefined' && typeof document !== 'undefined';
66582
- })();
66617
+ const hasStandardBrowserEnv = (
66618
+ (product) => {
66619
+ return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
66620
+ })(typeof navigator !== 'undefined' && navigator.product);
66583
66621
 
66584
66622
  /**
66585
66623
  * Determine if we're running in a standard browser webWorker environment
@@ -66590,7 +66628,7 @@ const isStandardBrowserEnv = (() => {
66590
66628
  * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
66591
66629
  * This leads to a problem when axios post `FormData` in webWorker
66592
66630
  */
66593
- const isStandardBrowserWebWorkerEnv = (() => {
66631
+ const hasStandardBrowserWebWorkerEnv = (() => {
66594
66632
  return (
66595
66633
  typeof WorkerGlobalScope !== 'undefined' &&
66596
66634
  // eslint-disable-next-line no-undef
@@ -66599,23 +66637,22 @@ const isStandardBrowserEnv = (() => {
66599
66637
  );
66600
66638
  })();
66601
66639
 
66640
+ var utils$1 = /*#__PURE__*/Object.freeze({
66641
+ __proto__: null,
66642
+ hasBrowserEnv: hasBrowserEnv,
66643
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
66644
+ hasStandardBrowserEnv: hasStandardBrowserEnv
66645
+ });
66602
66646
 
66603
66647
  var platform = {
66604
- isBrowser: true,
66605
- classes: {
66606
- URLSearchParams: URLSearchParams$1,
66607
- FormData: FormData$1,
66608
- Blob
66609
- },
66610
- isStandardBrowserEnv,
66611
- isStandardBrowserWebWorkerEnv,
66612
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
66648
+ ...utils$1,
66649
+ ...platform$1
66613
66650
  };
66614
66651
 
66615
66652
  function toURLEncodedForm(data, options) {
66616
66653
  return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
66617
66654
  visitor: function(value, key, path, helpers) {
66618
- if (platform.isNode && utils$1.isBuffer(value)) {
66655
+ if (platform.isNode && utils$2.isBuffer(value)) {
66619
66656
  this.append(key, value.toString('base64'));
66620
66657
  return false;
66621
66658
  }
@@ -66637,7 +66674,7 @@ function parsePropPath(name) {
66637
66674
  // foo.x.y.z
66638
66675
  // foo-x-y-z
66639
66676
  // foo x y z
66640
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
66677
+ return utils$2.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
66641
66678
  return match[0] === '[]' ? '' : match[1] || match[0];
66642
66679
  });
66643
66680
  }
@@ -66674,10 +66711,10 @@ function formDataToJSON(formData) {
66674
66711
  let name = path[index++];
66675
66712
  const isNumericKey = Number.isFinite(+name);
66676
66713
  const isLast = index >= path.length;
66677
- name = !name && utils$1.isArray(target) ? target.length : name;
66714
+ name = !name && utils$2.isArray(target) ? target.length : name;
66678
66715
 
66679
66716
  if (isLast) {
66680
- if (utils$1.hasOwnProp(target, name)) {
66717
+ if (utils$2.hasOwnProp(target, name)) {
66681
66718
  target[name] = [target[name], value];
66682
66719
  } else {
66683
66720
  target[name] = value;
@@ -66686,23 +66723,23 @@ function formDataToJSON(formData) {
66686
66723
  return !isNumericKey;
66687
66724
  }
66688
66725
 
66689
- if (!target[name] || !utils$1.isObject(target[name])) {
66726
+ if (!target[name] || !utils$2.isObject(target[name])) {
66690
66727
  target[name] = [];
66691
66728
  }
66692
66729
 
66693
66730
  const result = buildPath(path, value, target[name], index);
66694
66731
 
66695
- if (result && utils$1.isArray(target[name])) {
66732
+ if (result && utils$2.isArray(target[name])) {
66696
66733
  target[name] = arrayToObject(target[name]);
66697
66734
  }
66698
66735
 
66699
66736
  return !isNumericKey;
66700
66737
  }
66701
66738
 
66702
- if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
66739
+ if (utils$2.isFormData(formData) && utils$2.isFunction(formData.entries)) {
66703
66740
  const obj = {};
66704
66741
 
66705
- utils$1.forEachEntry(formData, (name, value) => {
66742
+ utils$2.forEachEntry(formData, (name, value) => {
66706
66743
  buildPath(parsePropPath(name), value, obj, 0);
66707
66744
  });
66708
66745
 
@@ -66712,10 +66749,6 @@ function formDataToJSON(formData) {
66712
66749
  return null;
66713
66750
  }
66714
66751
 
66715
- const DEFAULT_CONTENT_TYPE = {
66716
- 'Content-Type': undefined
66717
- };
66718
-
66719
66752
  /**
66720
66753
  * It takes a string, tries to parse it, and if it fails, it returns the stringified version
66721
66754
  * of the input
@@ -66727,10 +66760,10 @@ const DEFAULT_CONTENT_TYPE = {
66727
66760
  * @returns {string} A stringified version of the rawValue.
66728
66761
  */
66729
66762
  function stringifySafely(rawValue, parser, encoder) {
66730
- if (utils$1.isString(rawValue)) {
66763
+ if (utils$2.isString(rawValue)) {
66731
66764
  try {
66732
66765
  (parser || JSON.parse)(rawValue);
66733
- return utils$1.trim(rawValue);
66766
+ return utils$2.trim(rawValue);
66734
66767
  } catch (e) {
66735
66768
  if (e.name !== 'SyntaxError') {
66736
66769
  throw e;
@@ -66750,13 +66783,13 @@ const defaults = {
66750
66783
  transformRequest: [function transformRequest(data, headers) {
66751
66784
  const contentType = headers.getContentType() || '';
66752
66785
  const hasJSONContentType = contentType.indexOf('application/json') > -1;
66753
- const isObjectPayload = utils$1.isObject(data);
66786
+ const isObjectPayload = utils$2.isObject(data);
66754
66787
 
66755
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
66788
+ if (isObjectPayload && utils$2.isHTMLForm(data)) {
66756
66789
  data = new FormData(data);
66757
66790
  }
66758
66791
 
66759
- const isFormData = utils$1.isFormData(data);
66792
+ const isFormData = utils$2.isFormData(data);
66760
66793
 
66761
66794
  if (isFormData) {
66762
66795
  if (!hasJSONContentType) {
@@ -66765,18 +66798,18 @@ const defaults = {
66765
66798
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
66766
66799
  }
66767
66800
 
66768
- if (utils$1.isArrayBuffer(data) ||
66769
- utils$1.isBuffer(data) ||
66770
- utils$1.isStream(data) ||
66771
- utils$1.isFile(data) ||
66772
- utils$1.isBlob(data)
66801
+ if (utils$2.isArrayBuffer(data) ||
66802
+ utils$2.isBuffer(data) ||
66803
+ utils$2.isStream(data) ||
66804
+ utils$2.isFile(data) ||
66805
+ utils$2.isBlob(data)
66773
66806
  ) {
66774
66807
  return data;
66775
66808
  }
66776
- if (utils$1.isArrayBufferView(data)) {
66809
+ if (utils$2.isArrayBufferView(data)) {
66777
66810
  return data.buffer;
66778
66811
  }
66779
- if (utils$1.isURLSearchParams(data)) {
66812
+ if (utils$2.isURLSearchParams(data)) {
66780
66813
  headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
66781
66814
  return data.toString();
66782
66815
  }
@@ -66788,7 +66821,7 @@ const defaults = {
66788
66821
  return toURLEncodedForm(data, this.formSerializer).toString();
66789
66822
  }
66790
66823
 
66791
- if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
66824
+ if ((isFileList = utils$2.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
66792
66825
  const _FormData = this.env && this.env.FormData;
66793
66826
 
66794
66827
  return toFormData(
@@ -66812,7 +66845,7 @@ const defaults = {
66812
66845
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
66813
66846
  const JSONRequested = this.responseType === 'json';
66814
66847
 
66815
- if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
66848
+ if (data && utils$2.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
66816
66849
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
66817
66850
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
66818
66851
 
@@ -66854,24 +66887,21 @@ const defaults = {
66854
66887
 
66855
66888
  headers: {
66856
66889
  common: {
66857
- 'Accept': 'application/json, text/plain, */*'
66890
+ 'Accept': 'application/json, text/plain, */*',
66891
+ 'Content-Type': undefined
66858
66892
  }
66859
66893
  }
66860
66894
  };
66861
66895
 
66862
- utils$1.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
66896
+ utils$2.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
66863
66897
  defaults.headers[method] = {};
66864
66898
  });
66865
66899
 
66866
- utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
66867
- defaults.headers[method] = utils$1.merge(DEFAULT_CONTENT_TYPE);
66868
- });
66869
-
66870
66900
  var defaults$1 = defaults;
66871
66901
 
66872
66902
  // RawAxiosHeaders whose duplicates are ignored by node
66873
66903
  // c.f. https://nodejs.org/api/http.html#http_message_headers
66874
- const ignoreDuplicateOf = utils$1.toObjectSet([
66904
+ const ignoreDuplicateOf = utils$2.toObjectSet([
66875
66905
  'age', 'authorization', 'content-length', 'content-type', 'etag',
66876
66906
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
66877
66907
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
@@ -66932,7 +66962,7 @@ function normalizeValue(value) {
66932
66962
  return value;
66933
66963
  }
66934
66964
 
66935
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
66965
+ return utils$2.isArray(value) ? value.map(normalizeValue) : String(value);
66936
66966
  }
66937
66967
 
66938
66968
  function parseTokens(str) {
@@ -66947,22 +66977,24 @@ function parseTokens(str) {
66947
66977
  return tokens;
66948
66978
  }
66949
66979
 
66950
- function isValidHeaderName(str) {
66951
- return /^[-_a-zA-Z]+$/.test(str.trim());
66952
- }
66980
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
66953
66981
 
66954
- function matchHeaderValue(context, value, header, filter) {
66955
- if (utils$1.isFunction(filter)) {
66982
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
66983
+ if (utils$2.isFunction(filter)) {
66956
66984
  return filter.call(this, value, header);
66957
66985
  }
66958
66986
 
66959
- if (!utils$1.isString(value)) return;
66987
+ if (isHeaderNameFilter) {
66988
+ value = header;
66989
+ }
66990
+
66991
+ if (!utils$2.isString(value)) return;
66960
66992
 
66961
- if (utils$1.isString(filter)) {
66993
+ if (utils$2.isString(filter)) {
66962
66994
  return value.indexOf(filter) !== -1;
66963
66995
  }
66964
66996
 
66965
- if (utils$1.isRegExp(filter)) {
66997
+ if (utils$2.isRegExp(filter)) {
66966
66998
  return filter.test(value);
66967
66999
  }
66968
67000
  }
@@ -66975,7 +67007,7 @@ function formatHeader(header) {
66975
67007
  }
66976
67008
 
66977
67009
  function buildAccessors(obj, header) {
66978
- const accessorName = utils$1.toCamelCase(' ' + header);
67010
+ const accessorName = utils$2.toCamelCase(' ' + header);
66979
67011
 
66980
67012
  ['get', 'set', 'has'].forEach(methodName => {
66981
67013
  Object.defineProperty(obj, methodName + accessorName, {
@@ -67002,7 +67034,7 @@ class AxiosHeaders {
67002
67034
  throw new Error('header name must be a non-empty string');
67003
67035
  }
67004
67036
 
67005
- const key = utils$1.findKey(self, lHeader);
67037
+ const key = utils$2.findKey(self, lHeader);
67006
67038
 
67007
67039
  if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
67008
67040
  self[key || _header] = normalizeValue(_value);
@@ -67010,11 +67042,11 @@ class AxiosHeaders {
67010
67042
  }
67011
67043
 
67012
67044
  const setHeaders = (headers, _rewrite) =>
67013
- utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
67045
+ utils$2.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
67014
67046
 
67015
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
67047
+ if (utils$2.isPlainObject(header) || header instanceof this.constructor) {
67016
67048
  setHeaders(header, valueOrRewrite);
67017
- } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
67049
+ } else if(utils$2.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
67018
67050
  setHeaders(parseHeaders(header), valueOrRewrite);
67019
67051
  } else {
67020
67052
  header != null && setHeader(valueOrRewrite, header, rewrite);
@@ -67027,7 +67059,7 @@ class AxiosHeaders {
67027
67059
  header = normalizeHeader(header);
67028
67060
 
67029
67061
  if (header) {
67030
- const key = utils$1.findKey(this, header);
67062
+ const key = utils$2.findKey(this, header);
67031
67063
 
67032
67064
  if (key) {
67033
67065
  const value = this[key];
@@ -67040,11 +67072,11 @@ class AxiosHeaders {
67040
67072
  return parseTokens(value);
67041
67073
  }
67042
67074
 
67043
- if (utils$1.isFunction(parser)) {
67075
+ if (utils$2.isFunction(parser)) {
67044
67076
  return parser.call(this, value, key);
67045
67077
  }
67046
67078
 
67047
- if (utils$1.isRegExp(parser)) {
67079
+ if (utils$2.isRegExp(parser)) {
67048
67080
  return parser.exec(value);
67049
67081
  }
67050
67082
 
@@ -67057,9 +67089,9 @@ class AxiosHeaders {
67057
67089
  header = normalizeHeader(header);
67058
67090
 
67059
67091
  if (header) {
67060
- const key = utils$1.findKey(this, header);
67092
+ const key = utils$2.findKey(this, header);
67061
67093
 
67062
- return !!(key && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
67094
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
67063
67095
  }
67064
67096
 
67065
67097
  return false;
@@ -67073,7 +67105,7 @@ class AxiosHeaders {
67073
67105
  _header = normalizeHeader(_header);
67074
67106
 
67075
67107
  if (_header) {
67076
- const key = utils$1.findKey(self, _header);
67108
+ const key = utils$2.findKey(self, _header);
67077
67109
 
67078
67110
  if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
67079
67111
  delete self[key];
@@ -67083,7 +67115,7 @@ class AxiosHeaders {
67083
67115
  }
67084
67116
  }
67085
67117
 
67086
- if (utils$1.isArray(header)) {
67118
+ if (utils$2.isArray(header)) {
67087
67119
  header.forEach(deleteHeader);
67088
67120
  } else {
67089
67121
  deleteHeader(header);
@@ -67092,16 +67124,28 @@ class AxiosHeaders {
67092
67124
  return deleted;
67093
67125
  }
67094
67126
 
67095
- clear() {
67096
- return Object.keys(this).forEach(this.delete.bind(this));
67127
+ clear(matcher) {
67128
+ const keys = Object.keys(this);
67129
+ let i = keys.length;
67130
+ let deleted = false;
67131
+
67132
+ while (i--) {
67133
+ const key = keys[i];
67134
+ if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
67135
+ delete this[key];
67136
+ deleted = true;
67137
+ }
67138
+ }
67139
+
67140
+ return deleted;
67097
67141
  }
67098
67142
 
67099
67143
  normalize(format) {
67100
67144
  const self = this;
67101
67145
  const headers = {};
67102
67146
 
67103
- utils$1.forEach(this, (value, header) => {
67104
- const key = utils$1.findKey(headers, header);
67147
+ utils$2.forEach(this, (value, header) => {
67148
+ const key = utils$2.findKey(headers, header);
67105
67149
 
67106
67150
  if (key) {
67107
67151
  self[key] = normalizeValue(value);
@@ -67130,8 +67174,8 @@ class AxiosHeaders {
67130
67174
  toJSON(asStrings) {
67131
67175
  const obj = Object.create(null);
67132
67176
 
67133
- utils$1.forEach(this, (value, header) => {
67134
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
67177
+ utils$2.forEach(this, (value, header) => {
67178
+ value != null && value !== false && (obj[header] = asStrings && utils$2.isArray(value) ? value.join(', ') : value);
67135
67179
  });
67136
67180
 
67137
67181
  return obj;
@@ -67178,16 +67222,26 @@ class AxiosHeaders {
67178
67222
  }
67179
67223
  }
67180
67224
 
67181
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
67225
+ utils$2.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
67182
67226
 
67183
67227
  return this;
67184
67228
  }
67185
67229
  }
67186
67230
 
67187
- AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent']);
67231
+ AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
67232
+
67233
+ // reserved names hotfix
67234
+ utils$2.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
67235
+ let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
67236
+ return {
67237
+ get: () => value,
67238
+ set(headerValue) {
67239
+ this[mapped] = headerValue;
67240
+ }
67241
+ }
67242
+ });
67188
67243
 
67189
- utils$1.freezeMethods(AxiosHeaders.prototype);
67190
- utils$1.freezeMethods(AxiosHeaders);
67244
+ utils$2.freezeMethods(AxiosHeaders);
67191
67245
 
67192
67246
  var AxiosHeaders$1 = AxiosHeaders;
67193
67247
 
@@ -67205,7 +67259,7 @@ function transformData(fns, response) {
67205
67259
  const headers = AxiosHeaders$1.from(context.headers);
67206
67260
  let data = context.data;
67207
67261
 
67208
- utils$1.forEach(fns, function transform(fn) {
67262
+ utils$2.forEach(fns, function transform(fn) {
67209
67263
  data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
67210
67264
  });
67211
67265
 
@@ -67233,13 +67287,10 @@ function CanceledError(message, config, request) {
67233
67287
  this.name = 'CanceledError';
67234
67288
  }
67235
67289
 
67236
- utils$1.inherits(CanceledError, AxiosError, {
67290
+ utils$2.inherits(CanceledError, AxiosError, {
67237
67291
  __CANCEL__: true
67238
67292
  });
67239
67293
 
67240
- // eslint-disable-next-line strict
67241
- var httpAdapter = null;
67242
-
67243
67294
  /**
67244
67295
  * Resolve or reject a Promise based on response status.
67245
67296
  *
@@ -67264,53 +67315,44 @@ function settle(resolve, reject, response) {
67264
67315
  }
67265
67316
  }
67266
67317
 
67267
- var cookies = platform.isStandardBrowserEnv ?
67318
+ var cookies = platform.hasStandardBrowserEnv ?
67268
67319
 
67269
- // Standard browser envs support document.cookie
67270
- (function standardBrowserEnv() {
67271
- return {
67272
- write: function write(name, value, expires, path, domain, secure) {
67273
- const cookie = [];
67274
- cookie.push(name + '=' + encodeURIComponent(value));
67320
+ // Standard browser envs support document.cookie
67321
+ {
67322
+ write(name, value, expires, path, domain, secure) {
67323
+ const cookie = [name + '=' + encodeURIComponent(value)];
67275
67324
 
67276
- if (utils$1.isNumber(expires)) {
67277
- cookie.push('expires=' + new Date(expires).toGMTString());
67278
- }
67325
+ utils$2.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
67279
67326
 
67280
- if (utils$1.isString(path)) {
67281
- cookie.push('path=' + path);
67282
- }
67327
+ utils$2.isString(path) && cookie.push('path=' + path);
67283
67328
 
67284
- if (utils$1.isString(domain)) {
67285
- cookie.push('domain=' + domain);
67286
- }
67329
+ utils$2.isString(domain) && cookie.push('domain=' + domain);
67287
67330
 
67288
- if (secure === true) {
67289
- cookie.push('secure');
67290
- }
67331
+ secure === true && cookie.push('secure');
67291
67332
 
67292
- document.cookie = cookie.join('; ');
67293
- },
67333
+ document.cookie = cookie.join('; ');
67334
+ },
67294
67335
 
67295
- read: function read(name) {
67296
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
67297
- return (match ? decodeURIComponent(match[3]) : null);
67298
- },
67336
+ read(name) {
67337
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
67338
+ return (match ? decodeURIComponent(match[3]) : null);
67339
+ },
67299
67340
 
67300
- remove: function remove(name) {
67301
- this.write(name, '', Date.now() - 86400000);
67302
- }
67303
- };
67304
- })() :
67341
+ remove(name) {
67342
+ this.write(name, '', Date.now() - 86400000);
67343
+ }
67344
+ }
67305
67345
 
67306
- // Non standard browser env (web workers, react-native) lack needed support.
67307
- (function nonStandardBrowserEnv() {
67308
- return {
67309
- write: function write() {},
67310
- read: function read() { return null; },
67311
- remove: function remove() {}
67312
- };
67313
- })();
67346
+ :
67347
+
67348
+ // Non-standard browser env (web workers, react-native) lack needed support.
67349
+ {
67350
+ write() {},
67351
+ read() {
67352
+ return null;
67353
+ },
67354
+ remove() {}
67355
+ };
67314
67356
 
67315
67357
  /**
67316
67358
  * Determines whether the specified URL is absolute
@@ -67357,7 +67399,7 @@ function buildFullPath(baseURL, requestedURL) {
67357
67399
  return requestedURL;
67358
67400
  }
67359
67401
 
67360
- var isURLSameOrigin = platform.isStandardBrowserEnv ?
67402
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ?
67361
67403
 
67362
67404
  // Standard browser envs have full support of the APIs needed to test
67363
67405
  // whether the request URL is of the same origin as current location.
@@ -67367,7 +67409,7 @@ var isURLSameOrigin = platform.isStandardBrowserEnv ?
67367
67409
  let originURL;
67368
67410
 
67369
67411
  /**
67370
- * Parse a URL to discover it's components
67412
+ * Parse a URL to discover its components
67371
67413
  *
67372
67414
  * @param {String} url The URL to be parsed
67373
67415
  * @returns {Object}
@@ -67407,7 +67449,7 @@ var isURLSameOrigin = platform.isStandardBrowserEnv ?
67407
67449
  * @returns {boolean} True if URL shares the same origin, otherwise false
67408
67450
  */
67409
67451
  return function isURLSameOrigin(requestURL) {
67410
- const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
67452
+ const parsed = (utils$2.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
67411
67453
  return (parsed.protocol === originURL.protocol &&
67412
67454
  parsed.host === originURL.host);
67413
67455
  };
@@ -67512,7 +67554,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
67512
67554
  return new Promise(function dispatchXhrRequest(resolve, reject) {
67513
67555
  let requestData = config.data;
67514
67556
  const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
67515
- const responseType = config.responseType;
67557
+ let {responseType, withXSRFToken} = config;
67516
67558
  let onCanceled;
67517
67559
  function done() {
67518
67560
  if (config.cancelToken) {
@@ -67524,8 +67566,16 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
67524
67566
  }
67525
67567
  }
67526
67568
 
67527
- if (utils$1.isFormData(requestData) && (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv)) {
67528
- requestHeaders.setContentType(false); // Let the browser set it
67569
+ let contentType;
67570
+
67571
+ if (utils$2.isFormData(requestData)) {
67572
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
67573
+ requestHeaders.setContentType(false); // Let the browser set it
67574
+ } else if ((contentType = requestHeaders.getContentType()) !== false) {
67575
+ // fix semicolon duplication issue for ReactNative FormData implementation
67576
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
67577
+ requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
67578
+ }
67529
67579
  }
67530
67580
 
67531
67581
  let request = new XMLHttpRequest();
@@ -67640,13 +67690,16 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
67640
67690
  // Add xsrf header
67641
67691
  // This is only done if running in a standard browser environment.
67642
67692
  // Specifically not if we're in a web worker, or react-native.
67643
- if (platform.isStandardBrowserEnv) {
67644
- // Add xsrf header
67645
- const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
67646
- && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
67693
+ if(platform.hasStandardBrowserEnv) {
67694
+ withXSRFToken && utils$2.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
67695
+
67696
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
67697
+ // Add xsrf header
67698
+ const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
67647
67699
 
67648
- if (xsrfValue) {
67649
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
67700
+ if (xsrfValue) {
67701
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
67702
+ }
67650
67703
  }
67651
67704
  }
67652
67705
 
@@ -67655,13 +67708,13 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
67655
67708
 
67656
67709
  // Add headers to the request
67657
67710
  if ('setRequestHeader' in request) {
67658
- utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
67711
+ utils$2.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
67659
67712
  request.setRequestHeader(key, val);
67660
67713
  });
67661
67714
  }
67662
67715
 
67663
67716
  // Add withCredentials to request if needed
67664
- if (!utils$1.isUndefined(config.withCredentials)) {
67717
+ if (!utils$2.isUndefined(config.withCredentials)) {
67665
67718
  request.withCredentials = !!config.withCredentials;
67666
67719
  }
67667
67720
 
@@ -67716,8 +67769,8 @@ const knownAdapters = {
67716
67769
  xhr: xhrAdapter
67717
67770
  };
67718
67771
 
67719
- utils$1.forEach(knownAdapters, (fn, value) => {
67720
- if(fn) {
67772
+ utils$2.forEach(knownAdapters, (fn, value) => {
67773
+ if (fn) {
67721
67774
  try {
67722
67775
  Object.defineProperty(fn, 'name', {value});
67723
67776
  } catch (e) {
@@ -67727,38 +67780,56 @@ utils$1.forEach(knownAdapters, (fn, value) => {
67727
67780
  }
67728
67781
  });
67729
67782
 
67783
+ const renderReason = (reason) => `- ${reason}`;
67784
+
67785
+ const isResolvedHandle = (adapter) => utils$2.isFunction(adapter) || adapter === null || adapter === false;
67786
+
67730
67787
  var adapters = {
67731
67788
  getAdapter: (adapters) => {
67732
- adapters = utils$1.isArray(adapters) ? adapters : [adapters];
67789
+ adapters = utils$2.isArray(adapters) ? adapters : [adapters];
67733
67790
 
67734
67791
  const {length} = adapters;
67735
67792
  let nameOrAdapter;
67736
67793
  let adapter;
67737
67794
 
67795
+ const rejectedReasons = {};
67796
+
67738
67797
  for (let i = 0; i < length; i++) {
67739
67798
  nameOrAdapter = adapters[i];
67740
- if((adapter = utils$1.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {
67799
+ let id;
67800
+
67801
+ adapter = nameOrAdapter;
67802
+
67803
+ if (!isResolvedHandle(nameOrAdapter)) {
67804
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
67805
+
67806
+ if (adapter === undefined) {
67807
+ throw new AxiosError(`Unknown adapter '${id}'`);
67808
+ }
67809
+ }
67810
+
67811
+ if (adapter) {
67741
67812
  break;
67742
67813
  }
67814
+
67815
+ rejectedReasons[id || '#' + i] = adapter;
67743
67816
  }
67744
67817
 
67745
67818
  if (!adapter) {
67746
- if (adapter === false) {
67747
- throw new AxiosError(
67748
- `Adapter ${nameOrAdapter} is not supported by the environment`,
67749
- 'ERR_NOT_SUPPORT'
67819
+
67820
+ const reasons = Object.entries(rejectedReasons)
67821
+ .map(([id, state]) => `adapter ${id} ` +
67822
+ (state === false ? 'is not supported by the environment' : 'is not available in the build')
67750
67823
  );
67751
- }
67752
67824
 
67753
- throw new Error(
67754
- utils$1.hasOwnProp(knownAdapters, nameOrAdapter) ?
67755
- `Adapter '${nameOrAdapter}' is not available in the build` :
67756
- `Unknown adapter '${nameOrAdapter}'`
67757
- );
67758
- }
67825
+ let s = length ?
67826
+ (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
67827
+ 'as no adapter specified';
67759
67828
 
67760
- if (!utils$1.isFunction(adapter)) {
67761
- throw new TypeError('adapter is not a function');
67829
+ throw new AxiosError(
67830
+ `There is no suitable adapter to dispatch the request ` + s,
67831
+ 'ERR_NOT_SUPPORT'
67832
+ );
67762
67833
  }
67763
67834
 
67764
67835
  return adapter;
@@ -67856,11 +67927,11 @@ function mergeConfig(config1, config2) {
67856
67927
  const config = {};
67857
67928
 
67858
67929
  function getMergedValue(target, source, caseless) {
67859
- if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
67860
- return utils$1.merge.call({caseless}, target, source);
67861
- } else if (utils$1.isPlainObject(source)) {
67862
- return utils$1.merge({}, source);
67863
- } else if (utils$1.isArray(source)) {
67930
+ if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
67931
+ return utils$2.merge.call({caseless}, target, source);
67932
+ } else if (utils$2.isPlainObject(source)) {
67933
+ return utils$2.merge({}, source);
67934
+ } else if (utils$2.isArray(source)) {
67864
67935
  return source.slice();
67865
67936
  }
67866
67937
  return source;
@@ -67868,25 +67939,25 @@ function mergeConfig(config1, config2) {
67868
67939
 
67869
67940
  // eslint-disable-next-line consistent-return
67870
67941
  function mergeDeepProperties(a, b, caseless) {
67871
- if (!utils$1.isUndefined(b)) {
67942
+ if (!utils$2.isUndefined(b)) {
67872
67943
  return getMergedValue(a, b, caseless);
67873
- } else if (!utils$1.isUndefined(a)) {
67944
+ } else if (!utils$2.isUndefined(a)) {
67874
67945
  return getMergedValue(undefined, a, caseless);
67875
67946
  }
67876
67947
  }
67877
67948
 
67878
67949
  // eslint-disable-next-line consistent-return
67879
67950
  function valueFromConfig2(a, b) {
67880
- if (!utils$1.isUndefined(b)) {
67951
+ if (!utils$2.isUndefined(b)) {
67881
67952
  return getMergedValue(undefined, b);
67882
67953
  }
67883
67954
  }
67884
67955
 
67885
67956
  // eslint-disable-next-line consistent-return
67886
67957
  function defaultToConfig2(a, b) {
67887
- if (!utils$1.isUndefined(b)) {
67958
+ if (!utils$2.isUndefined(b)) {
67888
67959
  return getMergedValue(undefined, b);
67889
- } else if (!utils$1.isUndefined(a)) {
67960
+ } else if (!utils$2.isUndefined(a)) {
67890
67961
  return getMergedValue(undefined, a);
67891
67962
  }
67892
67963
  }
@@ -67911,6 +67982,7 @@ function mergeConfig(config1, config2) {
67911
67982
  timeout: defaultToConfig2,
67912
67983
  timeoutMessage: defaultToConfig2,
67913
67984
  withCredentials: defaultToConfig2,
67985
+ withXSRFToken: defaultToConfig2,
67914
67986
  adapter: defaultToConfig2,
67915
67987
  responseType: defaultToConfig2,
67916
67988
  xsrfCookieName: defaultToConfig2,
@@ -67931,16 +68003,16 @@ function mergeConfig(config1, config2) {
67931
68003
  headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
67932
68004
  };
67933
68005
 
67934
- utils$1.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
68006
+ utils$2.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
67935
68007
  const merge = mergeMap[prop] || mergeDeepProperties;
67936
68008
  const configValue = merge(config1[prop], config2[prop], prop);
67937
- (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
68009
+ (utils$2.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
67938
68010
  });
67939
68011
 
67940
68012
  return config;
67941
68013
  }
67942
68014
 
67943
- const VERSION = "1.2.2";
68015
+ const VERSION = "1.6.2";
67944
68016
 
67945
68017
  const validators$1 = {};
67946
68018
 
@@ -68077,25 +68149,29 @@ class Axios {
68077
68149
  }, false);
68078
68150
  }
68079
68151
 
68080
- if (paramsSerializer !== undefined) {
68081
- validator.assertOptions(paramsSerializer, {
68082
- encode: validators.function,
68083
- serialize: validators.function
68084
- }, true);
68152
+ if (paramsSerializer != null) {
68153
+ if (utils$2.isFunction(paramsSerializer)) {
68154
+ config.paramsSerializer = {
68155
+ serialize: paramsSerializer
68156
+ };
68157
+ } else {
68158
+ validator.assertOptions(paramsSerializer, {
68159
+ encode: validators.function,
68160
+ serialize: validators.function
68161
+ }, true);
68162
+ }
68085
68163
  }
68086
68164
 
68087
68165
  // Set config.method
68088
68166
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
68089
68167
 
68090
- let contextHeaders;
68091
-
68092
68168
  // Flatten headers
68093
- contextHeaders = headers && utils$1.merge(
68169
+ let contextHeaders = headers && utils$2.merge(
68094
68170
  headers.common,
68095
68171
  headers[config.method]
68096
68172
  );
68097
68173
 
68098
- contextHeaders && utils$1.forEach(
68174
+ headers && utils$2.forEach(
68099
68175
  ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
68100
68176
  (method) => {
68101
68177
  delete headers[method];
@@ -68182,7 +68258,7 @@ class Axios {
68182
68258
  }
68183
68259
 
68184
68260
  // Provide aliases for supported request methods
68185
- utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
68261
+ utils$2.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
68186
68262
  /*eslint func-names:0*/
68187
68263
  Axios.prototype[method] = function(url, config) {
68188
68264
  return this.request(mergeConfig(config || {}, {
@@ -68193,7 +68269,7 @@ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoDa
68193
68269
  };
68194
68270
  });
68195
68271
 
68196
- utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
68272
+ utils$2.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
68197
68273
  /*eslint func-names:0*/
68198
68274
 
68199
68275
  function generateHTTPMethod(isForm) {
@@ -68369,7 +68445,7 @@ function spread(callback) {
68369
68445
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
68370
68446
  */
68371
68447
  function isAxiosError(payload) {
68372
- return utils$1.isObject(payload) && (payload.isAxiosError === true);
68448
+ return utils$2.isObject(payload) && (payload.isAxiosError === true);
68373
68449
  }
68374
68450
 
68375
68451
  const HttpStatusCode = {
@@ -68456,10 +68532,10 @@ function createInstance(defaultConfig) {
68456
68532
  const instance = bind(Axios$1.prototype.request, context);
68457
68533
 
68458
68534
  // Copy axios.prototype to instance
68459
- utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
68535
+ utils$2.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
68460
68536
 
68461
68537
  // Copy context to instance
68462
- utils$1.extend(instance, context, null, {allOwnKeys: true});
68538
+ utils$2.extend(instance, context, null, {allOwnKeys: true});
68463
68539
 
68464
68540
  // Factory for creating new instances
68465
68541
  instance.create = function create(instanceConfig) {
@@ -68503,7 +68579,9 @@ axios.mergeConfig = mergeConfig;
68503
68579
 
68504
68580
  axios.AxiosHeaders = AxiosHeaders$1;
68505
68581
 
68506
- axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
68582
+ axios.formToJSON = thing => formDataToJSON(utils$2.isHTMLForm(thing) ? new FormData(thing) : thing);
68583
+
68584
+ axios.getAdapter = adapters.getAdapter;
68507
68585
 
68508
68586
  axios.HttpStatusCode = HttpStatusCode$1;
68509
68587