@blockchyp/blockchyp-ts 2.28.0 → 2.28.1
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/_bundles/blockchyp.js
CHANGED
|
@@ -41009,9 +41009,16 @@ exports.CoreResponse = CoreResponse;
|
|
|
41009
41009
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41010
41010
|
|
|
41011
41011
|
"use strict";
|
|
41012
|
-
/*! Axios v1.
|
|
41012
|
+
/*! Axios v1.13.4 Copyright (c) 2026 Matt Zabriskie and contributors */
|
|
41013
41013
|
|
|
41014
41014
|
|
|
41015
|
+
/**
|
|
41016
|
+
* Create a bound version of a function with a specified `this` context
|
|
41017
|
+
*
|
|
41018
|
+
* @param {Function} fn - The function to bind
|
|
41019
|
+
* @param {*} thisArg - The value to be passed as the `this` parameter
|
|
41020
|
+
* @returns {Function} A new function that will call the original function with the specified `this` context
|
|
41021
|
+
*/
|
|
41015
41022
|
function bind(fn, thisArg) {
|
|
41016
41023
|
return function wrap() {
|
|
41017
41024
|
return fn.apply(thisArg, arguments);
|
|
@@ -41063,7 +41070,7 @@ const isUndefined = typeOfTest('undefined');
|
|
|
41063
41070
|
*/
|
|
41064
41071
|
function isBuffer(val) {
|
|
41065
41072
|
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
41066
|
-
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
41073
|
+
&& isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
41067
41074
|
}
|
|
41068
41075
|
|
|
41069
41076
|
/**
|
|
@@ -41108,7 +41115,7 @@ const isString = typeOfTest('string');
|
|
|
41108
41115
|
* @param {*} val The value to test
|
|
41109
41116
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
41110
41117
|
*/
|
|
41111
|
-
const isFunction = typeOfTest('function');
|
|
41118
|
+
const isFunction$1 = typeOfTest('function');
|
|
41112
41119
|
|
|
41113
41120
|
/**
|
|
41114
41121
|
* Determine if a value is a Number
|
|
@@ -41152,6 +41159,27 @@ const isPlainObject = (val) => {
|
|
|
41152
41159
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
|
41153
41160
|
};
|
|
41154
41161
|
|
|
41162
|
+
/**
|
|
41163
|
+
* Determine if a value is an empty object (safely handles Buffers)
|
|
41164
|
+
*
|
|
41165
|
+
* @param {*} val The value to test
|
|
41166
|
+
*
|
|
41167
|
+
* @returns {boolean} True if value is an empty object, otherwise false
|
|
41168
|
+
*/
|
|
41169
|
+
const isEmptyObject = (val) => {
|
|
41170
|
+
// Early return for non-objects or Buffers to prevent RangeError
|
|
41171
|
+
if (!isObject(val) || isBuffer(val)) {
|
|
41172
|
+
return false;
|
|
41173
|
+
}
|
|
41174
|
+
|
|
41175
|
+
try {
|
|
41176
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
41177
|
+
} catch (e) {
|
|
41178
|
+
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
41179
|
+
return false;
|
|
41180
|
+
}
|
|
41181
|
+
};
|
|
41182
|
+
|
|
41155
41183
|
/**
|
|
41156
41184
|
* Determine if a value is a Date
|
|
41157
41185
|
*
|
|
@@ -41195,7 +41223,7 @@ const isFileList = kindOfTest('FileList');
|
|
|
41195
41223
|
*
|
|
41196
41224
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
41197
41225
|
*/
|
|
41198
|
-
const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
41226
|
+
const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
|
|
41199
41227
|
|
|
41200
41228
|
/**
|
|
41201
41229
|
* Determine if a value is a FormData
|
|
@@ -41208,10 +41236,10 @@ const isFormData = (thing) => {
|
|
|
41208
41236
|
let kind;
|
|
41209
41237
|
return thing && (
|
|
41210
41238
|
(typeof FormData === 'function' && thing instanceof FormData) || (
|
|
41211
|
-
isFunction(thing.append) && (
|
|
41239
|
+
isFunction$1(thing.append) && (
|
|
41212
41240
|
(kind = kindOf(thing)) === 'formdata' ||
|
|
41213
41241
|
// detect form-data instance
|
|
41214
|
-
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
41242
|
+
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
|
|
41215
41243
|
)
|
|
41216
41244
|
)
|
|
41217
41245
|
)
|
|
@@ -41247,10 +41275,11 @@ const trim = (str) => str.trim ?
|
|
|
41247
41275
|
* If 'obj' is an Object callback will be called passing
|
|
41248
41276
|
* the value, key, and complete object for each property.
|
|
41249
41277
|
*
|
|
41250
|
-
* @param {Object|Array} obj The object to iterate
|
|
41278
|
+
* @param {Object|Array<unknown>} obj The object to iterate
|
|
41251
41279
|
* @param {Function} fn The callback to invoke for each item
|
|
41252
41280
|
*
|
|
41253
|
-
* @param {
|
|
41281
|
+
* @param {Object} [options]
|
|
41282
|
+
* @param {Boolean} [options.allOwnKeys = false]
|
|
41254
41283
|
* @returns {any}
|
|
41255
41284
|
*/
|
|
41256
41285
|
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
@@ -41274,6 +41303,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
41274
41303
|
fn.call(null, obj[i], i, obj);
|
|
41275
41304
|
}
|
|
41276
41305
|
} else {
|
|
41306
|
+
// Buffer check
|
|
41307
|
+
if (isBuffer(obj)) {
|
|
41308
|
+
return;
|
|
41309
|
+
}
|
|
41310
|
+
|
|
41277
41311
|
// Iterate over object keys
|
|
41278
41312
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
41279
41313
|
const len = keys.length;
|
|
@@ -41287,6 +41321,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
41287
41321
|
}
|
|
41288
41322
|
|
|
41289
41323
|
function findKey(obj, key) {
|
|
41324
|
+
if (isBuffer(obj)){
|
|
41325
|
+
return null;
|
|
41326
|
+
}
|
|
41327
|
+
|
|
41290
41328
|
key = key.toLowerCase();
|
|
41291
41329
|
const keys = Object.keys(obj);
|
|
41292
41330
|
let i = keys.length;
|
|
@@ -41318,7 +41356,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
41318
41356
|
* Example:
|
|
41319
41357
|
*
|
|
41320
41358
|
* ```js
|
|
41321
|
-
*
|
|
41359
|
+
* const result = merge({foo: 123}, {foo: 456});
|
|
41322
41360
|
* console.log(result.foo); // outputs 456
|
|
41323
41361
|
* ```
|
|
41324
41362
|
*
|
|
@@ -41327,7 +41365,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
41327
41365
|
* @returns {Object} Result of all merge properties
|
|
41328
41366
|
*/
|
|
41329
41367
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
41330
|
-
const {caseless} = isContextDefined(this) && this || {};
|
|
41368
|
+
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
|
41331
41369
|
const result = {};
|
|
41332
41370
|
const assignValue = (val, key) => {
|
|
41333
41371
|
const targetKey = caseless && findKey(result, key) || key;
|
|
@@ -41337,7 +41375,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
41337
41375
|
result[targetKey] = merge({}, val);
|
|
41338
41376
|
} else if (isArray(val)) {
|
|
41339
41377
|
result[targetKey] = val.slice();
|
|
41340
|
-
} else {
|
|
41378
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
|
41341
41379
|
result[targetKey] = val;
|
|
41342
41380
|
}
|
|
41343
41381
|
};
|
|
@@ -41355,15 +41393,26 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
41355
41393
|
* @param {Object} b The object to copy properties from
|
|
41356
41394
|
* @param {Object} thisArg The object to bind function to
|
|
41357
41395
|
*
|
|
41358
|
-
* @param {
|
|
41396
|
+
* @param {Object} [options]
|
|
41397
|
+
* @param {Boolean} [options.allOwnKeys]
|
|
41359
41398
|
* @returns {Object} The resulting value of object a
|
|
41360
41399
|
*/
|
|
41361
41400
|
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
41362
41401
|
forEach(b, (val, key) => {
|
|
41363
|
-
if (thisArg && isFunction(val)) {
|
|
41364
|
-
a
|
|
41402
|
+
if (thisArg && isFunction$1(val)) {
|
|
41403
|
+
Object.defineProperty(a, key, {
|
|
41404
|
+
value: bind(val, thisArg),
|
|
41405
|
+
writable: true,
|
|
41406
|
+
enumerable: true,
|
|
41407
|
+
configurable: true
|
|
41408
|
+
});
|
|
41365
41409
|
} else {
|
|
41366
|
-
a
|
|
41410
|
+
Object.defineProperty(a, key, {
|
|
41411
|
+
value: val,
|
|
41412
|
+
writable: true,
|
|
41413
|
+
enumerable: true,
|
|
41414
|
+
configurable: true
|
|
41415
|
+
});
|
|
41367
41416
|
}
|
|
41368
41417
|
}, {allOwnKeys});
|
|
41369
41418
|
return a;
|
|
@@ -41394,7 +41443,12 @@ const stripBOM = (content) => {
|
|
|
41394
41443
|
*/
|
|
41395
41444
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
41396
41445
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
41397
|
-
constructor.prototype
|
|
41446
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
41447
|
+
value: constructor,
|
|
41448
|
+
writable: true,
|
|
41449
|
+
enumerable: false,
|
|
41450
|
+
configurable: true
|
|
41451
|
+
});
|
|
41398
41452
|
Object.defineProperty(constructor, 'super', {
|
|
41399
41453
|
value: superConstructor.prototype
|
|
41400
41454
|
});
|
|
@@ -41576,13 +41630,13 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
41576
41630
|
const freezeMethods = (obj) => {
|
|
41577
41631
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
41578
41632
|
// skip restricted props in strict mode
|
|
41579
|
-
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
41633
|
+
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
41580
41634
|
return false;
|
|
41581
41635
|
}
|
|
41582
41636
|
|
|
41583
41637
|
const value = obj[name];
|
|
41584
41638
|
|
|
41585
|
-
if (!isFunction(value)) return;
|
|
41639
|
+
if (!isFunction$1(value)) return;
|
|
41586
41640
|
|
|
41587
41641
|
descriptor.enumerable = false;
|
|
41588
41642
|
|
|
@@ -41619,6 +41673,8 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
41619
41673
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
41620
41674
|
};
|
|
41621
41675
|
|
|
41676
|
+
|
|
41677
|
+
|
|
41622
41678
|
/**
|
|
41623
41679
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
41624
41680
|
*
|
|
@@ -41627,7 +41683,7 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
41627
41683
|
* @returns {boolean}
|
|
41628
41684
|
*/
|
|
41629
41685
|
function isSpecCompliantForm(thing) {
|
|
41630
|
-
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
|
41686
|
+
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
|
41631
41687
|
}
|
|
41632
41688
|
|
|
41633
41689
|
const toJSONObject = (obj) => {
|
|
@@ -41640,6 +41696,11 @@ const toJSONObject = (obj) => {
|
|
|
41640
41696
|
return;
|
|
41641
41697
|
}
|
|
41642
41698
|
|
|
41699
|
+
//Buffer check
|
|
41700
|
+
if (isBuffer(source)) {
|
|
41701
|
+
return source;
|
|
41702
|
+
}
|
|
41703
|
+
|
|
41643
41704
|
if(!('toJSON' in source)) {
|
|
41644
41705
|
stack[i] = source;
|
|
41645
41706
|
const target = isArray(source) ? [] : {};
|
|
@@ -41664,7 +41725,7 @@ const toJSONObject = (obj) => {
|
|
|
41664
41725
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
41665
41726
|
|
|
41666
41727
|
const isThenable = (thing) =>
|
|
41667
|
-
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
41728
|
+
thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
41668
41729
|
|
|
41669
41730
|
// original code
|
|
41670
41731
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
@@ -41688,7 +41749,7 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
41688
41749
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
41689
41750
|
})(
|
|
41690
41751
|
typeof setImmediate === 'function',
|
|
41691
|
-
isFunction(_global.postMessage)
|
|
41752
|
+
isFunction$1(_global.postMessage)
|
|
41692
41753
|
);
|
|
41693
41754
|
|
|
41694
41755
|
const asap = typeof queueMicrotask !== 'undefined' ?
|
|
@@ -41697,7 +41758,7 @@ const asap = typeof queueMicrotask !== 'undefined' ?
|
|
|
41697
41758
|
// *********************
|
|
41698
41759
|
|
|
41699
41760
|
|
|
41700
|
-
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
41761
|
+
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
41701
41762
|
|
|
41702
41763
|
|
|
41703
41764
|
var utils$1 = {
|
|
@@ -41711,6 +41772,7 @@ var utils$1 = {
|
|
|
41711
41772
|
isBoolean,
|
|
41712
41773
|
isObject,
|
|
41713
41774
|
isPlainObject,
|
|
41775
|
+
isEmptyObject,
|
|
41714
41776
|
isReadableStream,
|
|
41715
41777
|
isRequest,
|
|
41716
41778
|
isResponse,
|
|
@@ -41720,7 +41782,7 @@ var utils$1 = {
|
|
|
41720
41782
|
isFile,
|
|
41721
41783
|
isBlob,
|
|
41722
41784
|
isRegExp,
|
|
41723
|
-
isFunction,
|
|
41785
|
+
isFunction: isFunction$1,
|
|
41724
41786
|
isStream,
|
|
41725
41787
|
isURLSearchParams,
|
|
41726
41788
|
isTypedArray,
|
|
@@ -41759,103 +41821,75 @@ var utils$1 = {
|
|
|
41759
41821
|
isIterable
|
|
41760
41822
|
};
|
|
41761
41823
|
|
|
41762
|
-
|
|
41763
|
-
|
|
41764
|
-
|
|
41765
|
-
|
|
41766
|
-
|
|
41767
|
-
|
|
41768
|
-
|
|
41769
|
-
|
|
41770
|
-
*
|
|
41771
|
-
* @returns {Error} The created error.
|
|
41772
|
-
*/
|
|
41773
|
-
function AxiosError(message, code, config, request, response) {
|
|
41774
|
-
Error.call(this);
|
|
41824
|
+
class AxiosError extends Error {
|
|
41825
|
+
static from(error, code, config, request, response, customProps) {
|
|
41826
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
41827
|
+
axiosError.cause = error;
|
|
41828
|
+
axiosError.name = error.name;
|
|
41829
|
+
customProps && Object.assign(axiosError, customProps);
|
|
41830
|
+
return axiosError;
|
|
41831
|
+
}
|
|
41775
41832
|
|
|
41776
|
-
|
|
41777
|
-
|
|
41778
|
-
|
|
41779
|
-
|
|
41780
|
-
|
|
41833
|
+
/**
|
|
41834
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
41835
|
+
*
|
|
41836
|
+
* @param {string} message The error message.
|
|
41837
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
41838
|
+
* @param {Object} [config] The config.
|
|
41839
|
+
* @param {Object} [request] The request.
|
|
41840
|
+
* @param {Object} [response] The response.
|
|
41841
|
+
*
|
|
41842
|
+
* @returns {Error} The created error.
|
|
41843
|
+
*/
|
|
41844
|
+
constructor(message, code, config, request, response) {
|
|
41845
|
+
super(message);
|
|
41846
|
+
this.name = 'AxiosError';
|
|
41847
|
+
this.isAxiosError = true;
|
|
41848
|
+
code && (this.code = code);
|
|
41849
|
+
config && (this.config = config);
|
|
41850
|
+
request && (this.request = request);
|
|
41851
|
+
if (response) {
|
|
41852
|
+
this.response = response;
|
|
41853
|
+
this.status = response.status;
|
|
41854
|
+
}
|
|
41855
|
+
}
|
|
41781
41856
|
|
|
41782
|
-
|
|
41783
|
-
|
|
41784
|
-
|
|
41785
|
-
|
|
41786
|
-
|
|
41787
|
-
|
|
41788
|
-
|
|
41789
|
-
|
|
41790
|
-
|
|
41857
|
+
toJSON() {
|
|
41858
|
+
return {
|
|
41859
|
+
// Standard
|
|
41860
|
+
message: this.message,
|
|
41861
|
+
name: this.name,
|
|
41862
|
+
// Microsoft
|
|
41863
|
+
description: this.description,
|
|
41864
|
+
number: this.number,
|
|
41865
|
+
// Mozilla
|
|
41866
|
+
fileName: this.fileName,
|
|
41867
|
+
lineNumber: this.lineNumber,
|
|
41868
|
+
columnNumber: this.columnNumber,
|
|
41869
|
+
stack: this.stack,
|
|
41870
|
+
// Axios
|
|
41871
|
+
config: utils$1.toJSONObject(this.config),
|
|
41872
|
+
code: this.code,
|
|
41873
|
+
status: this.status,
|
|
41874
|
+
};
|
|
41875
|
+
}
|
|
41791
41876
|
}
|
|
41792
41877
|
|
|
41793
|
-
|
|
41794
|
-
|
|
41795
|
-
|
|
41796
|
-
|
|
41797
|
-
|
|
41798
|
-
|
|
41799
|
-
|
|
41800
|
-
|
|
41801
|
-
|
|
41802
|
-
|
|
41803
|
-
|
|
41804
|
-
|
|
41805
|
-
|
|
41806
|
-
stack: this.stack,
|
|
41807
|
-
// Axios
|
|
41808
|
-
config: utils$1.toJSONObject(this.config),
|
|
41809
|
-
code: this.code,
|
|
41810
|
-
status: this.status
|
|
41811
|
-
};
|
|
41812
|
-
}
|
|
41813
|
-
});
|
|
41814
|
-
|
|
41815
|
-
const prototype$1 = AxiosError.prototype;
|
|
41816
|
-
const descriptors = {};
|
|
41817
|
-
|
|
41818
|
-
[
|
|
41819
|
-
'ERR_BAD_OPTION_VALUE',
|
|
41820
|
-
'ERR_BAD_OPTION',
|
|
41821
|
-
'ECONNABORTED',
|
|
41822
|
-
'ETIMEDOUT',
|
|
41823
|
-
'ERR_NETWORK',
|
|
41824
|
-
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
41825
|
-
'ERR_DEPRECATED',
|
|
41826
|
-
'ERR_BAD_RESPONSE',
|
|
41827
|
-
'ERR_BAD_REQUEST',
|
|
41828
|
-
'ERR_CANCELED',
|
|
41829
|
-
'ERR_NOT_SUPPORT',
|
|
41830
|
-
'ERR_INVALID_URL'
|
|
41831
|
-
// eslint-disable-next-line func-names
|
|
41832
|
-
].forEach(code => {
|
|
41833
|
-
descriptors[code] = {value: code};
|
|
41834
|
-
});
|
|
41835
|
-
|
|
41836
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
41837
|
-
Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
41878
|
+
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
41879
|
+
AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
41880
|
+
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
41881
|
+
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
41882
|
+
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
41883
|
+
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
41884
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
41885
|
+
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
41886
|
+
AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
41887
|
+
AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
41888
|
+
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
41889
|
+
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
41890
|
+
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
41838
41891
|
|
|
41839
|
-
|
|
41840
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
41841
|
-
const axiosError = Object.create(prototype$1);
|
|
41842
|
-
|
|
41843
|
-
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
|
41844
|
-
return obj !== Error.prototype;
|
|
41845
|
-
}, prop => {
|
|
41846
|
-
return prop !== 'isAxiosError';
|
|
41847
|
-
});
|
|
41848
|
-
|
|
41849
|
-
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
41850
|
-
|
|
41851
|
-
axiosError.cause = error;
|
|
41852
|
-
|
|
41853
|
-
axiosError.name = error.name;
|
|
41854
|
-
|
|
41855
|
-
customProps && Object.assign(axiosError, customProps);
|
|
41856
|
-
|
|
41857
|
-
return axiosError;
|
|
41858
|
-
};
|
|
41892
|
+
var AxiosError$1 = AxiosError;
|
|
41859
41893
|
|
|
41860
41894
|
// eslint-disable-next-line strict
|
|
41861
41895
|
var httpAdapter = null;
|
|
@@ -41975,8 +42009,12 @@ function toFormData(obj, formData, options) {
|
|
|
41975
42009
|
return value.toISOString();
|
|
41976
42010
|
}
|
|
41977
42011
|
|
|
42012
|
+
if (utils$1.isBoolean(value)) {
|
|
42013
|
+
return value.toString();
|
|
42014
|
+
}
|
|
42015
|
+
|
|
41978
42016
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
41979
|
-
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
42017
|
+
throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
|
|
41980
42018
|
}
|
|
41981
42019
|
|
|
41982
42020
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
@@ -42137,9 +42175,7 @@ function encode(val) {
|
|
|
42137
42175
|
replace(/%3A/gi, ':').
|
|
42138
42176
|
replace(/%24/g, '$').
|
|
42139
42177
|
replace(/%2C/gi, ',').
|
|
42140
|
-
replace(/%20/g, '+')
|
|
42141
|
-
replace(/%5B/gi, '[').
|
|
42142
|
-
replace(/%5D/gi, ']');
|
|
42178
|
+
replace(/%20/g, '+');
|
|
42143
42179
|
}
|
|
42144
42180
|
|
|
42145
42181
|
/**
|
|
@@ -42152,29 +42188,26 @@ function encode(val) {
|
|
|
42152
42188
|
* @returns {string} The formatted url
|
|
42153
42189
|
*/
|
|
42154
42190
|
function buildURL(url, params, options) {
|
|
42155
|
-
/*eslint no-param-reassign:0*/
|
|
42156
42191
|
if (!params) {
|
|
42157
42192
|
return url;
|
|
42158
42193
|
}
|
|
42159
|
-
|
|
42194
|
+
|
|
42160
42195
|
const _encode = options && options.encode || encode;
|
|
42161
42196
|
|
|
42162
|
-
|
|
42163
|
-
options
|
|
42164
|
-
|
|
42165
|
-
};
|
|
42166
|
-
}
|
|
42197
|
+
const _options = utils$1.isFunction(options) ? {
|
|
42198
|
+
serialize: options
|
|
42199
|
+
} : options;
|
|
42167
42200
|
|
|
42168
|
-
const serializeFn =
|
|
42201
|
+
const serializeFn = _options && _options.serialize;
|
|
42169
42202
|
|
|
42170
42203
|
let serializedParams;
|
|
42171
42204
|
|
|
42172
42205
|
if (serializeFn) {
|
|
42173
|
-
serializedParams = serializeFn(params,
|
|
42206
|
+
serializedParams = serializeFn(params, _options);
|
|
42174
42207
|
} else {
|
|
42175
42208
|
serializedParams = utils$1.isURLSearchParams(params) ?
|
|
42176
42209
|
params.toString() :
|
|
42177
|
-
new AxiosURLSearchParams(params,
|
|
42210
|
+
new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
42178
42211
|
}
|
|
42179
42212
|
|
|
42180
42213
|
if (serializedParams) {
|
|
@@ -42199,6 +42232,7 @@ class InterceptorManager {
|
|
|
42199
42232
|
*
|
|
42200
42233
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
42201
42234
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
42235
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
42202
42236
|
*
|
|
42203
42237
|
* @return {Number} An ID used to remove interceptor later
|
|
42204
42238
|
*/
|
|
@@ -42217,7 +42251,7 @@ class InterceptorManager {
|
|
|
42217
42251
|
*
|
|
42218
42252
|
* @param {Number} id The ID that was returned by `use`
|
|
42219
42253
|
*
|
|
42220
|
-
* @returns {
|
|
42254
|
+
* @returns {void}
|
|
42221
42255
|
*/
|
|
42222
42256
|
eject(id) {
|
|
42223
42257
|
if (this.handlers[id]) {
|
|
@@ -42338,7 +42372,7 @@ var platform = {
|
|
|
42338
42372
|
};
|
|
42339
42373
|
|
|
42340
42374
|
function toURLEncodedForm(data, options) {
|
|
42341
|
-
return toFormData(data, new platform.classes.URLSearchParams(),
|
|
42375
|
+
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
42342
42376
|
visitor: function(value, key, path, helpers) {
|
|
42343
42377
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
42344
42378
|
this.append(key, value.toString('base64'));
|
|
@@ -42346,8 +42380,9 @@ function toURLEncodedForm(data, options) {
|
|
|
42346
42380
|
}
|
|
42347
42381
|
|
|
42348
42382
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
42349
|
-
}
|
|
42350
|
-
|
|
42383
|
+
},
|
|
42384
|
+
...options
|
|
42385
|
+
});
|
|
42351
42386
|
}
|
|
42352
42387
|
|
|
42353
42388
|
/**
|
|
@@ -42543,11 +42578,11 @@ const defaults = {
|
|
|
42543
42578
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
42544
42579
|
|
|
42545
42580
|
try {
|
|
42546
|
-
return JSON.parse(data);
|
|
42581
|
+
return JSON.parse(data, this.parseReviver);
|
|
42547
42582
|
} catch (e) {
|
|
42548
42583
|
if (strictJSONParsing) {
|
|
42549
42584
|
if (e.name === 'SyntaxError') {
|
|
42550
|
-
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
42585
|
+
throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
|
|
42551
42586
|
}
|
|
42552
42587
|
throw e;
|
|
42553
42588
|
}
|
|
@@ -42981,24 +43016,24 @@ function isCancel(value) {
|
|
|
42981
43016
|
return !!(value && value.__CANCEL__);
|
|
42982
43017
|
}
|
|
42983
43018
|
|
|
42984
|
-
|
|
42985
|
-
|
|
42986
|
-
|
|
42987
|
-
|
|
42988
|
-
|
|
42989
|
-
|
|
42990
|
-
|
|
42991
|
-
|
|
42992
|
-
|
|
42993
|
-
|
|
42994
|
-
|
|
42995
|
-
|
|
42996
|
-
|
|
43019
|
+
class CanceledError extends AxiosError$1 {
|
|
43020
|
+
/**
|
|
43021
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
43022
|
+
*
|
|
43023
|
+
* @param {string=} message The message.
|
|
43024
|
+
* @param {Object=} config The config.
|
|
43025
|
+
* @param {Object=} request The request.
|
|
43026
|
+
*
|
|
43027
|
+
* @returns {CanceledError} The created error.
|
|
43028
|
+
*/
|
|
43029
|
+
constructor(message, config, request) {
|
|
43030
|
+
super(message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request);
|
|
43031
|
+
this.name = 'CanceledError';
|
|
43032
|
+
this.__CANCEL__ = true;
|
|
43033
|
+
}
|
|
42997
43034
|
}
|
|
42998
43035
|
|
|
42999
|
-
|
|
43000
|
-
__CANCEL__: true
|
|
43001
|
-
});
|
|
43036
|
+
var CanceledError$1 = CanceledError;
|
|
43002
43037
|
|
|
43003
43038
|
/**
|
|
43004
43039
|
* Resolve or reject a Promise based on response status.
|
|
@@ -43014,9 +43049,9 @@ function settle(resolve, reject, response) {
|
|
|
43014
43049
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
43015
43050
|
resolve(response);
|
|
43016
43051
|
} else {
|
|
43017
|
-
reject(new AxiosError(
|
|
43052
|
+
reject(new AxiosError$1(
|
|
43018
43053
|
'Request failed with status code ' + response.status,
|
|
43019
|
-
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
43054
|
+
[AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
43020
43055
|
response.config,
|
|
43021
43056
|
response.request,
|
|
43022
43057
|
response
|
|
@@ -43100,7 +43135,7 @@ function throttle(fn, freq) {
|
|
|
43100
43135
|
clearTimeout(timer);
|
|
43101
43136
|
timer = null;
|
|
43102
43137
|
}
|
|
43103
|
-
fn
|
|
43138
|
+
fn(...args);
|
|
43104
43139
|
};
|
|
43105
43140
|
|
|
43106
43141
|
const throttled = (...args) => {
|
|
@@ -43182,27 +43217,38 @@ var cookies = platform.hasStandardBrowserEnv ?
|
|
|
43182
43217
|
|
|
43183
43218
|
// Standard browser envs support document.cookie
|
|
43184
43219
|
{
|
|
43185
|
-
write(name, value, expires, path, domain, secure) {
|
|
43186
|
-
|
|
43220
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
43221
|
+
if (typeof document === 'undefined') return;
|
|
43187
43222
|
|
|
43188
|
-
|
|
43223
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
43189
43224
|
|
|
43190
|
-
utils$1.
|
|
43191
|
-
|
|
43192
|
-
|
|
43193
|
-
|
|
43194
|
-
|
|
43225
|
+
if (utils$1.isNumber(expires)) {
|
|
43226
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
43227
|
+
}
|
|
43228
|
+
if (utils$1.isString(path)) {
|
|
43229
|
+
cookie.push(`path=${path}`);
|
|
43230
|
+
}
|
|
43231
|
+
if (utils$1.isString(domain)) {
|
|
43232
|
+
cookie.push(`domain=${domain}`);
|
|
43233
|
+
}
|
|
43234
|
+
if (secure === true) {
|
|
43235
|
+
cookie.push('secure');
|
|
43236
|
+
}
|
|
43237
|
+
if (utils$1.isString(sameSite)) {
|
|
43238
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
43239
|
+
}
|
|
43195
43240
|
|
|
43196
43241
|
document.cookie = cookie.join('; ');
|
|
43197
43242
|
},
|
|
43198
43243
|
|
|
43199
43244
|
read(name) {
|
|
43200
|
-
|
|
43201
|
-
|
|
43245
|
+
if (typeof document === 'undefined') return null;
|
|
43246
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
43247
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
43202
43248
|
},
|
|
43203
43249
|
|
|
43204
43250
|
remove(name) {
|
|
43205
|
-
this.write(name, '', Date.now() - 86400000);
|
|
43251
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
43206
43252
|
}
|
|
43207
43253
|
}
|
|
43208
43254
|
|
|
@@ -43281,7 +43327,7 @@ function mergeConfig(config1, config2) {
|
|
|
43281
43327
|
|
|
43282
43328
|
function getMergedValue(target, source, prop, caseless) {
|
|
43283
43329
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
43284
|
-
return utils$1.merge.call({caseless}, target, source);
|
|
43330
|
+
return utils$1.merge.call({ caseless }, target, source);
|
|
43285
43331
|
} else if (utils$1.isPlainObject(source)) {
|
|
43286
43332
|
return utils$1.merge({}, source);
|
|
43287
43333
|
} else if (utils$1.isArray(source)) {
|
|
@@ -43290,12 +43336,11 @@ function mergeConfig(config1, config2) {
|
|
|
43290
43336
|
return source;
|
|
43291
43337
|
}
|
|
43292
43338
|
|
|
43293
|
-
|
|
43294
|
-
function mergeDeepProperties(a, b, prop , caseless) {
|
|
43339
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
43295
43340
|
if (!utils$1.isUndefined(b)) {
|
|
43296
|
-
return getMergedValue(a, b, prop
|
|
43341
|
+
return getMergedValue(a, b, prop, caseless);
|
|
43297
43342
|
} else if (!utils$1.isUndefined(a)) {
|
|
43298
|
-
return getMergedValue(undefined, a, prop
|
|
43343
|
+
return getMergedValue(undefined, a, prop, caseless);
|
|
43299
43344
|
}
|
|
43300
43345
|
}
|
|
43301
43346
|
|
|
@@ -43353,10 +43398,10 @@ function mergeConfig(config1, config2) {
|
|
|
43353
43398
|
socketPath: defaultToConfig2,
|
|
43354
43399
|
responseEncoding: defaultToConfig2,
|
|
43355
43400
|
validateStatus: mergeDirectKeys,
|
|
43356
|
-
headers: (a, b
|
|
43401
|
+
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
43357
43402
|
};
|
|
43358
43403
|
|
|
43359
|
-
utils$1.forEach(Object.keys(
|
|
43404
|
+
utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
43360
43405
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
43361
43406
|
const configValue = merge(config1[prop], config2[prop], prop);
|
|
43362
43407
|
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
@@ -43368,7 +43413,7 @@ function mergeConfig(config1, config2) {
|
|
|
43368
43413
|
var resolveConfig = (config) => {
|
|
43369
43414
|
const newConfig = mergeConfig({}, config);
|
|
43370
43415
|
|
|
43371
|
-
let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
|
|
43416
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
43372
43417
|
|
|
43373
43418
|
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
|
43374
43419
|
|
|
@@ -43381,17 +43426,21 @@ var resolveConfig = (config) => {
|
|
|
43381
43426
|
);
|
|
43382
43427
|
}
|
|
43383
43428
|
|
|
43384
|
-
let contentType;
|
|
43385
|
-
|
|
43386
43429
|
if (utils$1.isFormData(data)) {
|
|
43387
43430
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
43388
|
-
headers.setContentType(undefined); //
|
|
43389
|
-
} else if ((
|
|
43390
|
-
//
|
|
43391
|
-
const
|
|
43392
|
-
headers
|
|
43431
|
+
headers.setContentType(undefined); // browser handles it
|
|
43432
|
+
} else if (utils$1.isFunction(data.getHeaders)) {
|
|
43433
|
+
// Node.js FormData (like form-data package)
|
|
43434
|
+
const formHeaders = data.getHeaders();
|
|
43435
|
+
// Only set safe headers to avoid overwriting security headers
|
|
43436
|
+
const allowedHeaders = ['content-type', 'content-length'];
|
|
43437
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
43438
|
+
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
43439
|
+
headers.set(key, val);
|
|
43440
|
+
}
|
|
43441
|
+
});
|
|
43393
43442
|
}
|
|
43394
|
-
}
|
|
43443
|
+
}
|
|
43395
43444
|
|
|
43396
43445
|
// Add xsrf header
|
|
43397
43446
|
// This is only done if running in a standard browser environment.
|
|
@@ -43501,22 +43550,25 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
43501
43550
|
return;
|
|
43502
43551
|
}
|
|
43503
43552
|
|
|
43504
|
-
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
43553
|
+
reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
|
|
43505
43554
|
|
|
43506
43555
|
// Clean up request
|
|
43507
43556
|
request = null;
|
|
43508
43557
|
};
|
|
43509
43558
|
|
|
43510
43559
|
// Handle low level network errors
|
|
43511
|
-
|
|
43512
|
-
|
|
43513
|
-
|
|
43514
|
-
|
|
43515
|
-
|
|
43516
|
-
|
|
43517
|
-
|
|
43560
|
+
request.onerror = function handleError(event) {
|
|
43561
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
43562
|
+
// (message may be empty; when present, surface it)
|
|
43563
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
43564
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
43565
|
+
const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
|
43566
|
+
// attach the underlying event for consumers who want details
|
|
43567
|
+
err.event = event || null;
|
|
43568
|
+
reject(err);
|
|
43569
|
+
request = null;
|
|
43518
43570
|
};
|
|
43519
|
-
|
|
43571
|
+
|
|
43520
43572
|
// Handle timeout
|
|
43521
43573
|
request.ontimeout = function handleTimeout() {
|
|
43522
43574
|
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
@@ -43524,9 +43576,9 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
43524
43576
|
if (_config.timeoutErrorMessage) {
|
|
43525
43577
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
43526
43578
|
}
|
|
43527
|
-
reject(new AxiosError(
|
|
43579
|
+
reject(new AxiosError$1(
|
|
43528
43580
|
timeoutErrorMessage,
|
|
43529
|
-
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
43581
|
+
transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
43530
43582
|
config,
|
|
43531
43583
|
request));
|
|
43532
43584
|
|
|
@@ -43576,7 +43628,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
43576
43628
|
if (!request) {
|
|
43577
43629
|
return;
|
|
43578
43630
|
}
|
|
43579
|
-
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
43631
|
+
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
|
43580
43632
|
request.abort();
|
|
43581
43633
|
request = null;
|
|
43582
43634
|
};
|
|
@@ -43590,7 +43642,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
43590
43642
|
const protocol = parseProtocol(_config.url);
|
|
43591
43643
|
|
|
43592
43644
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
43593
|
-
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
|
43645
|
+
reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
|
|
43594
43646
|
return;
|
|
43595
43647
|
}
|
|
43596
43648
|
|
|
@@ -43613,13 +43665,13 @@ const composeSignals = (signals, timeout) => {
|
|
|
43613
43665
|
aborted = true;
|
|
43614
43666
|
unsubscribe();
|
|
43615
43667
|
const err = reason instanceof Error ? reason : this.reason;
|
|
43616
|
-
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
43668
|
+
controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
|
|
43617
43669
|
}
|
|
43618
43670
|
};
|
|
43619
43671
|
|
|
43620
43672
|
let timer = timeout && setTimeout(() => {
|
|
43621
43673
|
timer = null;
|
|
43622
|
-
onabort(new AxiosError(`timeout ${timeout}
|
|
43674
|
+
onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
|
|
43623
43675
|
}, timeout);
|
|
43624
43676
|
|
|
43625
43677
|
const unsubscribe = () => {
|
|
@@ -43732,14 +43784,18 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
43732
43784
|
})
|
|
43733
43785
|
};
|
|
43734
43786
|
|
|
43735
|
-
const
|
|
43736
|
-
|
|
43787
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
43788
|
+
|
|
43789
|
+
const {isFunction} = utils$1;
|
|
43790
|
+
|
|
43791
|
+
const globalFetchAPI = (({Request, Response}) => ({
|
|
43792
|
+
Request, Response
|
|
43793
|
+
}))(utils$1.global);
|
|
43794
|
+
|
|
43795
|
+
const {
|
|
43796
|
+
ReadableStream: ReadableStream$1, TextEncoder
|
|
43797
|
+
} = utils$1.global;
|
|
43737
43798
|
|
|
43738
|
-
// used only inside the fetch adapter
|
|
43739
|
-
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
43740
|
-
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
43741
|
-
async (str) => new Uint8Array(await new Response(str).arrayBuffer())
|
|
43742
|
-
);
|
|
43743
43799
|
|
|
43744
43800
|
const test = (fn, ...args) => {
|
|
43745
43801
|
try {
|
|
@@ -43749,278 +43805,380 @@ const test = (fn, ...args) => {
|
|
|
43749
43805
|
}
|
|
43750
43806
|
};
|
|
43751
43807
|
|
|
43752
|
-
const
|
|
43753
|
-
|
|
43808
|
+
const factory = (env) => {
|
|
43809
|
+
env = utils$1.merge.call({
|
|
43810
|
+
skipUndefined: true
|
|
43811
|
+
}, globalFetchAPI, env);
|
|
43754
43812
|
|
|
43755
|
-
const
|
|
43756
|
-
|
|
43757
|
-
|
|
43758
|
-
|
|
43759
|
-
duplexAccessed = true;
|
|
43760
|
-
return 'half';
|
|
43761
|
-
},
|
|
43762
|
-
}).headers.has('Content-Type');
|
|
43813
|
+
const {fetch: envFetch, Request, Response} = env;
|
|
43814
|
+
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
43815
|
+
const isRequestSupported = isFunction(Request);
|
|
43816
|
+
const isResponseSupported = isFunction(Response);
|
|
43763
43817
|
|
|
43764
|
-
|
|
43765
|
-
|
|
43818
|
+
if (!isFetchSupported) {
|
|
43819
|
+
return false;
|
|
43820
|
+
}
|
|
43766
43821
|
|
|
43767
|
-
const
|
|
43822
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
|
|
43768
43823
|
|
|
43769
|
-
const
|
|
43770
|
-
|
|
43824
|
+
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
43825
|
+
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
43826
|
+
async (str) => new Uint8Array(await new Request(str).arrayBuffer())
|
|
43827
|
+
);
|
|
43771
43828
|
|
|
43829
|
+
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
43830
|
+
let duplexAccessed = false;
|
|
43772
43831
|
|
|
43773
|
-
const
|
|
43774
|
-
|
|
43775
|
-
|
|
43832
|
+
const hasContentType = new Request(platform.origin, {
|
|
43833
|
+
body: new ReadableStream$1(),
|
|
43834
|
+
method: 'POST',
|
|
43835
|
+
get duplex() {
|
|
43836
|
+
duplexAccessed = true;
|
|
43837
|
+
return 'half';
|
|
43838
|
+
},
|
|
43839
|
+
}).headers.has('Content-Type');
|
|
43776
43840
|
|
|
43777
|
-
|
|
43778
|
-
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
43779
|
-
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
|
|
43780
|
-
(_, config) => {
|
|
43781
|
-
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
43782
|
-
});
|
|
43841
|
+
return duplexAccessed && !hasContentType;
|
|
43783
43842
|
});
|
|
43784
|
-
})(new Response));
|
|
43785
43843
|
|
|
43786
|
-
const
|
|
43787
|
-
|
|
43788
|
-
return 0;
|
|
43789
|
-
}
|
|
43844
|
+
const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
|
|
43845
|
+
test(() => utils$1.isReadableStream(new Response('').body));
|
|
43790
43846
|
|
|
43791
|
-
|
|
43792
|
-
|
|
43793
|
-
}
|
|
43847
|
+
const resolvers = {
|
|
43848
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
43849
|
+
};
|
|
43794
43850
|
|
|
43795
|
-
|
|
43796
|
-
|
|
43797
|
-
|
|
43798
|
-
|
|
43851
|
+
isFetchSupported && ((() => {
|
|
43852
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
43853
|
+
!resolvers[type] && (resolvers[type] = (res, config) => {
|
|
43854
|
+
let method = res && res[type];
|
|
43855
|
+
|
|
43856
|
+
if (method) {
|
|
43857
|
+
return method.call(res);
|
|
43858
|
+
}
|
|
43859
|
+
|
|
43860
|
+
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
|
43861
|
+
});
|
|
43799
43862
|
});
|
|
43800
|
-
|
|
43801
|
-
}
|
|
43863
|
+
})());
|
|
43802
43864
|
|
|
43803
|
-
|
|
43804
|
-
|
|
43805
|
-
|
|
43865
|
+
const getBodyLength = async (body) => {
|
|
43866
|
+
if (body == null) {
|
|
43867
|
+
return 0;
|
|
43868
|
+
}
|
|
43806
43869
|
|
|
43807
|
-
|
|
43808
|
-
|
|
43809
|
-
|
|
43870
|
+
if (utils$1.isBlob(body)) {
|
|
43871
|
+
return body.size;
|
|
43872
|
+
}
|
|
43810
43873
|
|
|
43811
|
-
|
|
43812
|
-
|
|
43813
|
-
|
|
43814
|
-
|
|
43874
|
+
if (utils$1.isSpecCompliantForm(body)) {
|
|
43875
|
+
const _request = new Request(platform.origin, {
|
|
43876
|
+
method: 'POST',
|
|
43877
|
+
body,
|
|
43878
|
+
});
|
|
43879
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
43880
|
+
}
|
|
43815
43881
|
|
|
43816
|
-
|
|
43817
|
-
|
|
43882
|
+
if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
|
43883
|
+
return body.byteLength;
|
|
43884
|
+
}
|
|
43818
43885
|
|
|
43819
|
-
|
|
43820
|
-
|
|
43886
|
+
if (utils$1.isURLSearchParams(body)) {
|
|
43887
|
+
body = body + '';
|
|
43888
|
+
}
|
|
43889
|
+
|
|
43890
|
+
if (utils$1.isString(body)) {
|
|
43891
|
+
return (await encodeText(body)).byteLength;
|
|
43892
|
+
}
|
|
43893
|
+
};
|
|
43894
|
+
|
|
43895
|
+
const resolveBodyLength = async (headers, body) => {
|
|
43896
|
+
const length = utils$1.toFiniteNumber(headers.getContentLength());
|
|
43897
|
+
|
|
43898
|
+
return length == null ? getBodyLength(body) : length;
|
|
43899
|
+
};
|
|
43900
|
+
|
|
43901
|
+
return async (config) => {
|
|
43902
|
+
let {
|
|
43903
|
+
url,
|
|
43904
|
+
method,
|
|
43905
|
+
data,
|
|
43906
|
+
signal,
|
|
43907
|
+
cancelToken,
|
|
43908
|
+
timeout,
|
|
43909
|
+
onDownloadProgress,
|
|
43910
|
+
onUploadProgress,
|
|
43911
|
+
responseType,
|
|
43912
|
+
headers,
|
|
43913
|
+
withCredentials = 'same-origin',
|
|
43914
|
+
fetchOptions
|
|
43915
|
+
} = resolveConfig(config);
|
|
43916
|
+
|
|
43917
|
+
let _fetch = envFetch || fetch;
|
|
43918
|
+
|
|
43919
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
43920
|
+
|
|
43921
|
+
let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
43821
43922
|
|
|
43822
|
-
|
|
43823
|
-
|
|
43824
|
-
|
|
43825
|
-
method,
|
|
43826
|
-
data,
|
|
43827
|
-
signal,
|
|
43828
|
-
cancelToken,
|
|
43829
|
-
timeout,
|
|
43830
|
-
onDownloadProgress,
|
|
43831
|
-
onUploadProgress,
|
|
43832
|
-
responseType,
|
|
43833
|
-
headers,
|
|
43834
|
-
withCredentials = 'same-origin',
|
|
43835
|
-
fetchOptions
|
|
43836
|
-
} = resolveConfig(config);
|
|
43837
|
-
|
|
43838
|
-
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
43839
|
-
|
|
43840
|
-
let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
43841
|
-
|
|
43842
|
-
let request;
|
|
43843
|
-
|
|
43844
|
-
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
43923
|
+
let request = null;
|
|
43924
|
+
|
|
43925
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
43845
43926
|
composedSignal.unsubscribe();
|
|
43846
|
-
|
|
43927
|
+
});
|
|
43847
43928
|
|
|
43848
|
-
|
|
43929
|
+
let requestContentLength;
|
|
43849
43930
|
|
|
43850
|
-
|
|
43851
|
-
|
|
43852
|
-
|
|
43853
|
-
|
|
43854
|
-
|
|
43855
|
-
|
|
43856
|
-
|
|
43857
|
-
|
|
43858
|
-
|
|
43859
|
-
|
|
43931
|
+
try {
|
|
43932
|
+
if (
|
|
43933
|
+
onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
|
|
43934
|
+
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
43935
|
+
) {
|
|
43936
|
+
let _request = new Request(url, {
|
|
43937
|
+
method: 'POST',
|
|
43938
|
+
body: data,
|
|
43939
|
+
duplex: "half"
|
|
43940
|
+
});
|
|
43860
43941
|
|
|
43861
|
-
|
|
43942
|
+
let contentTypeHeader;
|
|
43862
43943
|
|
|
43863
|
-
|
|
43864
|
-
|
|
43865
|
-
|
|
43944
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
43945
|
+
headers.setContentType(contentTypeHeader);
|
|
43946
|
+
}
|
|
43866
43947
|
|
|
43867
|
-
|
|
43868
|
-
|
|
43869
|
-
|
|
43870
|
-
|
|
43871
|
-
|
|
43948
|
+
if (_request.body) {
|
|
43949
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
43950
|
+
requestContentLength,
|
|
43951
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
43952
|
+
);
|
|
43872
43953
|
|
|
43873
|
-
|
|
43954
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
43955
|
+
}
|
|
43874
43956
|
}
|
|
43875
|
-
}
|
|
43876
43957
|
|
|
43877
|
-
|
|
43878
|
-
|
|
43879
|
-
|
|
43958
|
+
if (!utils$1.isString(withCredentials)) {
|
|
43959
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
43960
|
+
}
|
|
43880
43961
|
|
|
43881
|
-
|
|
43882
|
-
|
|
43883
|
-
|
|
43884
|
-
request = new Request(url, {
|
|
43885
|
-
...fetchOptions,
|
|
43886
|
-
signal: composedSignal,
|
|
43887
|
-
method: method.toUpperCase(),
|
|
43888
|
-
headers: headers.normalize().toJSON(),
|
|
43889
|
-
body: data,
|
|
43890
|
-
duplex: "half",
|
|
43891
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
43892
|
-
});
|
|
43962
|
+
// Cloudflare Workers throws when credentials are defined
|
|
43963
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
43964
|
+
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
43893
43965
|
|
|
43894
|
-
|
|
43966
|
+
const resolvedOptions = {
|
|
43967
|
+
...fetchOptions,
|
|
43968
|
+
signal: composedSignal,
|
|
43969
|
+
method: method.toUpperCase(),
|
|
43970
|
+
headers: headers.normalize().toJSON(),
|
|
43971
|
+
body: data,
|
|
43972
|
+
duplex: "half",
|
|
43973
|
+
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
43974
|
+
};
|
|
43895
43975
|
|
|
43896
|
-
|
|
43976
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
43897
43977
|
|
|
43898
|
-
|
|
43899
|
-
const options = {};
|
|
43978
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
|
43900
43979
|
|
|
43901
|
-
|
|
43902
|
-
options[prop] = response[prop];
|
|
43903
|
-
});
|
|
43980
|
+
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
43904
43981
|
|
|
43905
|
-
|
|
43982
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
43983
|
+
const options = {};
|
|
43906
43984
|
|
|
43907
|
-
|
|
43908
|
-
|
|
43909
|
-
|
|
43910
|
-
) || [];
|
|
43985
|
+
['status', 'statusText', 'headers'].forEach(prop => {
|
|
43986
|
+
options[prop] = response[prop];
|
|
43987
|
+
});
|
|
43911
43988
|
|
|
43912
|
-
|
|
43913
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
43914
|
-
flush && flush();
|
|
43915
|
-
unsubscribe && unsubscribe();
|
|
43916
|
-
}),
|
|
43917
|
-
options
|
|
43918
|
-
);
|
|
43919
|
-
}
|
|
43989
|
+
const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
|
43920
43990
|
|
|
43921
|
-
|
|
43991
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
43992
|
+
responseContentLength,
|
|
43993
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
43994
|
+
) || [];
|
|
43922
43995
|
|
|
43923
|
-
|
|
43996
|
+
response = new Response(
|
|
43997
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
43998
|
+
flush && flush();
|
|
43999
|
+
unsubscribe && unsubscribe();
|
|
44000
|
+
}),
|
|
44001
|
+
options
|
|
44002
|
+
);
|
|
44003
|
+
}
|
|
43924
44004
|
|
|
43925
|
-
|
|
44005
|
+
responseType = responseType || 'text';
|
|
43926
44006
|
|
|
43927
|
-
|
|
43928
|
-
settle(resolve, reject, {
|
|
43929
|
-
data: responseData,
|
|
43930
|
-
headers: AxiosHeaders$1.from(response.headers),
|
|
43931
|
-
status: response.status,
|
|
43932
|
-
statusText: response.statusText,
|
|
43933
|
-
config,
|
|
43934
|
-
request
|
|
43935
|
-
});
|
|
43936
|
-
})
|
|
43937
|
-
} catch (err) {
|
|
43938
|
-
unsubscribe && unsubscribe();
|
|
44007
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
|
43939
44008
|
|
|
43940
|
-
|
|
43941
|
-
|
|
43942
|
-
|
|
43943
|
-
{
|
|
43944
|
-
|
|
43945
|
-
|
|
43946
|
-
|
|
44009
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
44010
|
+
|
|
44011
|
+
return await new Promise((resolve, reject) => {
|
|
44012
|
+
settle(resolve, reject, {
|
|
44013
|
+
data: responseData,
|
|
44014
|
+
headers: AxiosHeaders$1.from(response.headers),
|
|
44015
|
+
status: response.status,
|
|
44016
|
+
statusText: response.statusText,
|
|
44017
|
+
config,
|
|
44018
|
+
request
|
|
44019
|
+
});
|
|
44020
|
+
})
|
|
44021
|
+
} catch (err) {
|
|
44022
|
+
unsubscribe && unsubscribe();
|
|
44023
|
+
|
|
44024
|
+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
44025
|
+
throw Object.assign(
|
|
44026
|
+
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
|
|
44027
|
+
{
|
|
44028
|
+
cause: err.cause || err
|
|
44029
|
+
}
|
|
44030
|
+
)
|
|
44031
|
+
}
|
|
44032
|
+
|
|
44033
|
+
throw AxiosError$1.from(err, err && err.code, config, request);
|
|
43947
44034
|
}
|
|
44035
|
+
}
|
|
44036
|
+
};
|
|
43948
44037
|
|
|
43949
|
-
|
|
44038
|
+
const seedCache = new Map();
|
|
44039
|
+
|
|
44040
|
+
const getFetch = (config) => {
|
|
44041
|
+
let env = (config && config.env) || {};
|
|
44042
|
+
const {fetch, Request, Response} = env;
|
|
44043
|
+
const seeds = [
|
|
44044
|
+
Request, Response, fetch
|
|
44045
|
+
];
|
|
44046
|
+
|
|
44047
|
+
let len = seeds.length, i = len,
|
|
44048
|
+
seed, target, map = seedCache;
|
|
44049
|
+
|
|
44050
|
+
while (i--) {
|
|
44051
|
+
seed = seeds[i];
|
|
44052
|
+
target = map.get(seed);
|
|
44053
|
+
|
|
44054
|
+
target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
|
|
44055
|
+
|
|
44056
|
+
map = target;
|
|
43950
44057
|
}
|
|
43951
|
-
});
|
|
43952
44058
|
|
|
44059
|
+
return target;
|
|
44060
|
+
};
|
|
44061
|
+
|
|
44062
|
+
getFetch();
|
|
44063
|
+
|
|
44064
|
+
/**
|
|
44065
|
+
* Known adapters mapping.
|
|
44066
|
+
* Provides environment-specific adapters for Axios:
|
|
44067
|
+
* - `http` for Node.js
|
|
44068
|
+
* - `xhr` for browsers
|
|
44069
|
+
* - `fetch` for fetch API-based requests
|
|
44070
|
+
*
|
|
44071
|
+
* @type {Object<string, Function|Object>}
|
|
44072
|
+
*/
|
|
43953
44073
|
const knownAdapters = {
|
|
43954
44074
|
http: httpAdapter,
|
|
43955
44075
|
xhr: xhrAdapter,
|
|
43956
|
-
fetch:
|
|
44076
|
+
fetch: {
|
|
44077
|
+
get: getFetch,
|
|
44078
|
+
}
|
|
43957
44079
|
};
|
|
43958
44080
|
|
|
44081
|
+
// Assign adapter names for easier debugging and identification
|
|
43959
44082
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
43960
44083
|
if (fn) {
|
|
43961
44084
|
try {
|
|
43962
|
-
Object.defineProperty(fn, 'name', {value});
|
|
44085
|
+
Object.defineProperty(fn, 'name', { value });
|
|
43963
44086
|
} catch (e) {
|
|
43964
44087
|
// eslint-disable-next-line no-empty
|
|
43965
44088
|
}
|
|
43966
|
-
Object.defineProperty(fn, 'adapterName', {value});
|
|
44089
|
+
Object.defineProperty(fn, 'adapterName', { value });
|
|
43967
44090
|
}
|
|
43968
44091
|
});
|
|
43969
44092
|
|
|
44093
|
+
/**
|
|
44094
|
+
* Render a rejection reason string for unknown or unsupported adapters
|
|
44095
|
+
*
|
|
44096
|
+
* @param {string} reason
|
|
44097
|
+
* @returns {string}
|
|
44098
|
+
*/
|
|
43970
44099
|
const renderReason = (reason) => `- ${reason}`;
|
|
43971
44100
|
|
|
44101
|
+
/**
|
|
44102
|
+
* Check if the adapter is resolved (function, null, or false)
|
|
44103
|
+
*
|
|
44104
|
+
* @param {Function|null|false} adapter
|
|
44105
|
+
* @returns {boolean}
|
|
44106
|
+
*/
|
|
43972
44107
|
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
43973
44108
|
|
|
43974
|
-
|
|
43975
|
-
|
|
43976
|
-
|
|
44109
|
+
/**
|
|
44110
|
+
* Get the first suitable adapter from the provided list.
|
|
44111
|
+
* Tries each adapter in order until a supported one is found.
|
|
44112
|
+
* Throws an AxiosError if no adapter is suitable.
|
|
44113
|
+
*
|
|
44114
|
+
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
44115
|
+
* @param {Object} config - Axios request configuration
|
|
44116
|
+
* @throws {AxiosError} If no suitable adapter is available
|
|
44117
|
+
* @returns {Function} The resolved adapter function
|
|
44118
|
+
*/
|
|
44119
|
+
function getAdapter(adapters, config) {
|
|
44120
|
+
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
|
43977
44121
|
|
|
43978
|
-
|
|
43979
|
-
|
|
43980
|
-
|
|
44122
|
+
const { length } = adapters;
|
|
44123
|
+
let nameOrAdapter;
|
|
44124
|
+
let adapter;
|
|
43981
44125
|
|
|
43982
|
-
|
|
44126
|
+
const rejectedReasons = {};
|
|
43983
44127
|
|
|
43984
|
-
|
|
43985
|
-
|
|
43986
|
-
|
|
44128
|
+
for (let i = 0; i < length; i++) {
|
|
44129
|
+
nameOrAdapter = adapters[i];
|
|
44130
|
+
let id;
|
|
43987
44131
|
|
|
43988
|
-
|
|
44132
|
+
adapter = nameOrAdapter;
|
|
43989
44133
|
|
|
43990
|
-
|
|
43991
|
-
|
|
44134
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
44135
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
43992
44136
|
|
|
43993
|
-
|
|
43994
|
-
|
|
43995
|
-
}
|
|
43996
|
-
}
|
|
43997
|
-
|
|
43998
|
-
if (adapter) {
|
|
43999
|
-
break;
|
|
44137
|
+
if (adapter === undefined) {
|
|
44138
|
+
throw new AxiosError$1(`Unknown adapter '${id}'`);
|
|
44000
44139
|
}
|
|
44140
|
+
}
|
|
44001
44141
|
|
|
44002
|
-
|
|
44142
|
+
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
44143
|
+
break;
|
|
44003
44144
|
}
|
|
44004
44145
|
|
|
44005
|
-
|
|
44146
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
44147
|
+
}
|
|
44006
44148
|
|
|
44007
|
-
|
|
44008
|
-
|
|
44009
|
-
|
|
44010
|
-
)
|
|
44149
|
+
if (!adapter) {
|
|
44150
|
+
const reasons = Object.entries(rejectedReasons)
|
|
44151
|
+
.map(([id, state]) => `adapter ${id} ` +
|
|
44152
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
44153
|
+
);
|
|
44011
44154
|
|
|
44012
|
-
|
|
44013
|
-
|
|
44014
|
-
|
|
44155
|
+
let s = length ?
|
|
44156
|
+
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
|
44157
|
+
'as no adapter specified';
|
|
44015
44158
|
|
|
44016
|
-
|
|
44017
|
-
|
|
44018
|
-
|
|
44019
|
-
|
|
44020
|
-
|
|
44159
|
+
throw new AxiosError$1(
|
|
44160
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
44161
|
+
'ERR_NOT_SUPPORT'
|
|
44162
|
+
);
|
|
44163
|
+
}
|
|
44021
44164
|
|
|
44022
|
-
|
|
44023
|
-
|
|
44165
|
+
return adapter;
|
|
44166
|
+
}
|
|
44167
|
+
|
|
44168
|
+
/**
|
|
44169
|
+
* Exports Axios adapters and utility to resolve an adapter
|
|
44170
|
+
*/
|
|
44171
|
+
var adapters = {
|
|
44172
|
+
/**
|
|
44173
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
44174
|
+
* @type {Function}
|
|
44175
|
+
*/
|
|
44176
|
+
getAdapter,
|
|
44177
|
+
|
|
44178
|
+
/**
|
|
44179
|
+
* Exposes all known adapters
|
|
44180
|
+
* @type {Object<string, Function|Object>}
|
|
44181
|
+
*/
|
|
44024
44182
|
adapters: knownAdapters
|
|
44025
44183
|
};
|
|
44026
44184
|
|
|
@@ -44037,7 +44195,7 @@ function throwIfCancellationRequested(config) {
|
|
|
44037
44195
|
}
|
|
44038
44196
|
|
|
44039
44197
|
if (config.signal && config.signal.aborted) {
|
|
44040
|
-
throw new CanceledError(null, config);
|
|
44198
|
+
throw new CanceledError$1(null, config);
|
|
44041
44199
|
}
|
|
44042
44200
|
}
|
|
44043
44201
|
|
|
@@ -44063,7 +44221,7 @@ function dispatchRequest(config) {
|
|
|
44063
44221
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
44064
44222
|
}
|
|
44065
44223
|
|
|
44066
|
-
const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
|
|
44224
|
+
const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
|
|
44067
44225
|
|
|
44068
44226
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
44069
44227
|
throwIfCancellationRequested(config);
|
|
@@ -44097,7 +44255,7 @@ function dispatchRequest(config) {
|
|
|
44097
44255
|
});
|
|
44098
44256
|
}
|
|
44099
44257
|
|
|
44100
|
-
const VERSION = "1.
|
|
44258
|
+
const VERSION = "1.13.4";
|
|
44101
44259
|
|
|
44102
44260
|
const validators$1 = {};
|
|
44103
44261
|
|
|
@@ -44127,9 +44285,9 @@ validators$1.transitional = function transitional(validator, version, message) {
|
|
|
44127
44285
|
// eslint-disable-next-line func-names
|
|
44128
44286
|
return (value, opt, opts) => {
|
|
44129
44287
|
if (validator === false) {
|
|
44130
|
-
throw new AxiosError(
|
|
44288
|
+
throw new AxiosError$1(
|
|
44131
44289
|
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
44132
|
-
AxiosError.ERR_DEPRECATED
|
|
44290
|
+
AxiosError$1.ERR_DEPRECATED
|
|
44133
44291
|
);
|
|
44134
44292
|
}
|
|
44135
44293
|
|
|
@@ -44168,7 +44326,7 @@ validators$1.spelling = function spelling(correctSpelling) {
|
|
|
44168
44326
|
|
|
44169
44327
|
function assertOptions(options, schema, allowUnknown) {
|
|
44170
44328
|
if (typeof options !== 'object') {
|
|
44171
|
-
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
|
44329
|
+
throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
44172
44330
|
}
|
|
44173
44331
|
const keys = Object.keys(options);
|
|
44174
44332
|
let i = keys.length;
|
|
@@ -44179,12 +44337,12 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
44179
44337
|
const value = options[opt];
|
|
44180
44338
|
const result = value === undefined || validator(value, opt, options);
|
|
44181
44339
|
if (result !== true) {
|
|
44182
|
-
throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
|
44340
|
+
throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
44183
44341
|
}
|
|
44184
44342
|
continue;
|
|
44185
44343
|
}
|
|
44186
44344
|
if (allowUnknown !== true) {
|
|
44187
|
-
throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
|
44345
|
+
throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
|
|
44188
44346
|
}
|
|
44189
44347
|
}
|
|
44190
44348
|
}
|
|
@@ -44336,8 +44494,8 @@ class Axios {
|
|
|
44336
44494
|
|
|
44337
44495
|
if (!synchronousRequestInterceptors) {
|
|
44338
44496
|
const chain = [dispatchRequest.bind(this), undefined];
|
|
44339
|
-
chain.unshift
|
|
44340
|
-
chain.push
|
|
44497
|
+
chain.unshift(...requestInterceptorChain);
|
|
44498
|
+
chain.push(...responseInterceptorChain);
|
|
44341
44499
|
len = chain.length;
|
|
44342
44500
|
|
|
44343
44501
|
promise = Promise.resolve(config);
|
|
@@ -44353,8 +44511,6 @@ class Axios {
|
|
|
44353
44511
|
|
|
44354
44512
|
let newConfig = config;
|
|
44355
44513
|
|
|
44356
|
-
i = 0;
|
|
44357
|
-
|
|
44358
44514
|
while (i < len) {
|
|
44359
44515
|
const onFulfilled = requestInterceptorChain[i++];
|
|
44360
44516
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -44479,7 +44635,7 @@ class CancelToken {
|
|
|
44479
44635
|
return;
|
|
44480
44636
|
}
|
|
44481
44637
|
|
|
44482
|
-
token.reason = new CanceledError(message, config, request);
|
|
44638
|
+
token.reason = new CanceledError$1(message, config, request);
|
|
44483
44639
|
resolvePromise(token.reason);
|
|
44484
44640
|
});
|
|
44485
44641
|
}
|
|
@@ -44563,7 +44719,7 @@ var CancelToken$1 = CancelToken;
|
|
|
44563
44719
|
*
|
|
44564
44720
|
* ```js
|
|
44565
44721
|
* function f(x, y, z) {}
|
|
44566
|
-
*
|
|
44722
|
+
* const args = [1, 2, 3];
|
|
44567
44723
|
* f.apply(null, args);
|
|
44568
44724
|
* ```
|
|
44569
44725
|
*
|
|
@@ -44658,6 +44814,12 @@ const HttpStatusCode = {
|
|
|
44658
44814
|
LoopDetected: 508,
|
|
44659
44815
|
NotExtended: 510,
|
|
44660
44816
|
NetworkAuthenticationRequired: 511,
|
|
44817
|
+
WebServerIsDown: 521,
|
|
44818
|
+
ConnectionTimedOut: 522,
|
|
44819
|
+
OriginIsUnreachable: 523,
|
|
44820
|
+
TimeoutOccurred: 524,
|
|
44821
|
+
SslHandshakeFailed: 525,
|
|
44822
|
+
InvalidSslCertificate: 526,
|
|
44661
44823
|
};
|
|
44662
44824
|
|
|
44663
44825
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
@@ -44698,14 +44860,14 @@ const axios = createInstance(defaults$1);
|
|
|
44698
44860
|
axios.Axios = Axios$1;
|
|
44699
44861
|
|
|
44700
44862
|
// Expose Cancel & CancelToken
|
|
44701
|
-
axios.CanceledError = CanceledError;
|
|
44863
|
+
axios.CanceledError = CanceledError$1;
|
|
44702
44864
|
axios.CancelToken = CancelToken$1;
|
|
44703
44865
|
axios.isCancel = isCancel;
|
|
44704
44866
|
axios.VERSION = VERSION;
|
|
44705
44867
|
axios.toFormData = toFormData;
|
|
44706
44868
|
|
|
44707
44869
|
// Expose AxiosError class
|
|
44708
|
-
axios.AxiosError = AxiosError;
|
|
44870
|
+
axios.AxiosError = AxiosError$1;
|
|
44709
44871
|
|
|
44710
44872
|
// alias for CanceledError for backward compatibility
|
|
44711
44873
|
axios.Cancel = axios.CanceledError;
|