@ohif/app 3.12.0 → 3.13.0-beta.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/dist/{6376.bundle.272e755bdcbb5615a44e.js → 6376.bundle.9cb74d7bc08476e2f1a7.js} +1 -1
- package/dist/{7190.bundle.d731ae6cf6e933a2c408.js → 7190.bundle.e8f0193e0e06472f795c.js} +491 -357
- package/dist/{9195.bundle.606ca286a0fed8a43f58.js → 9195.bundle.83393d905543339ec1f1.js} +2 -2
- package/dist/{app.bundle.26b7eafdf05b5445414b.js → app.bundle.3e2ed5e1778a140eeab8.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.1938b79f9d6db363528a.js → interpolation.bundle.c70cb95d164dc494e6dc.js} +1 -1
- package/dist/sw.js +1 -1
- package/package.json +20 -20
- /package/dist/{1403.bundle.1c9ce804d1e88033e276.js → 1403.bundle.62a98c96636630ed28f3.js} +0 -0
- /package/dist/{1459.bundle.e8802999a4d7f7edf628.js → 1459.bundle.2803fc2614db570d961a.js} +0 -0
- /package/dist/{1730.bundle.66a5e554ab20dab97b11.js → 1730.bundle.2171f9af9b7acd748fff.js} +0 -0
- /package/dist/{1933.bundle.682f142e3217d4c7fbf7.js → 1933.bundle.a7678889451d60a82a07.js} +0 -0
- /package/dist/{2018.bundle.c06693143228cc034cb9.js → 2018.bundle.8b599c27f54098e1c1df.js} +0 -0
- /package/dist/{213.bundle.c2d4d7370c26b0823880.js → 213.bundle.fc35f21b5d89e71114eb.js} +0 -0
- /package/dist/{2424.bundle.c1e287e752f352b76543.js → 2424.bundle.f3068323d8e589055c5e.js} +0 -0
- /package/dist/{3081.bundle.41838985e0472851eadb.js → 3081.bundle.50b69741bf1434d300f2.js} +0 -0
- /package/dist/{3461.bundle.a8fcefd1c6e389d905fc.js → 3461.bundle.4b339b553887bfaeb5f5.js} +0 -0
- /package/dist/{4775.bundle.70bc407db26afaa4331a.js → 4775.bundle.47f0c78a2fee3f9bd9ee.js} +0 -0
- /package/dist/{4819.bundle.47e7aa44747ddab3a39a.js → 4819.bundle.53a472c6337556868474.js} +0 -0
- /package/dist/{5028.bundle.274945a9ae69c6b6ad51.js → 5028.bundle.5f94e61c9497f2c744e4.js} +0 -0
- /package/dist/{5457.bundle.f7de73bcfe1012a73b9f.js → 5457.bundle.8b62119a694923ea2615.js} +0 -0
- /package/dist/{5485.bundle.4e0ec03c61ec5cadd9bb.js → 5485.bundle.a7f35b2f18dfaf544f61.js} +0 -0
- /package/dist/{6027.bundle.2b12862684b0cb3af4b4.js → 6027.bundle.d4b22e25cdf15786ad1f.js} +0 -0
- /package/dist/{6163.bundle.ca93a4e6501880901f94.js → 6163.bundle.6a0b53bcc790bd6138b4.js} +0 -0
- /package/dist/{7639.bundle.32152cacb059089ed7d7.js → 7639.bundle.5504b3cbe814c7cf29bd.js} +0 -0
- /package/dist/{8305.bundle.2ede68ba3c075928c9f4.js → 8305.bundle.a60669c0f354619dd27f.js} +0 -0
- /package/dist/{85.bundle.05591d5a14d74a502dfe.js → 85.bundle.091ab9d579b1d54f85c5.js} +0 -0
- /package/dist/{8558.bundle.3e84c4ba2c7ec6fce52c.js → 8558.bundle.054d23882813d9c95a09.js} +0 -0
- /package/dist/{8583.bundle.2908eee785e7e4595d14.js → 8583.bundle.01ae8da221fd90cea8d9.js} +0 -0
- /package/dist/{9927.bundle.e798a347dfe1f241578f.js → 9927.bundle.e11bc961681793c5f105.js} +0 -0
|
@@ -2102,6 +2102,13 @@ __webpack_require__.d(common_utils_namespaceObject, {
|
|
|
2102
2102
|
;// ../../../node_modules/axios/lib/helpers/bind.js
|
|
2103
2103
|
|
|
2104
2104
|
|
|
2105
|
+
/**
|
|
2106
|
+
* Create a bound version of a function with a specified `this` context
|
|
2107
|
+
*
|
|
2108
|
+
* @param {Function} fn - The function to bind
|
|
2109
|
+
* @param {*} thisArg - The value to be passed as the `this` parameter
|
|
2110
|
+
* @returns {Function} A new function that will call the original function with the specified `this` context
|
|
2111
|
+
*/
|
|
2105
2112
|
function bind(fn, thisArg) {
|
|
2106
2113
|
return function wrap() {
|
|
2107
2114
|
return fn.apply(thisArg, arguments);
|
|
@@ -2115,30 +2122,30 @@ function bind(fn, thisArg) {
|
|
|
2115
2122
|
|
|
2116
2123
|
// utils is a library of generic helper functions non-specific to axios
|
|
2117
2124
|
|
|
2118
|
-
const {toString: utils_toString} = Object.prototype;
|
|
2119
|
-
const {getPrototypeOf} = Object;
|
|
2120
|
-
const {iterator, toStringTag} = Symbol;
|
|
2125
|
+
const { toString: utils_toString } = Object.prototype;
|
|
2126
|
+
const { getPrototypeOf } = Object;
|
|
2127
|
+
const { iterator, toStringTag } = Symbol;
|
|
2121
2128
|
|
|
2122
|
-
const kindOf = (cache => thing => {
|
|
2123
|
-
|
|
2124
|
-
|
|
2129
|
+
const kindOf = ((cache) => (thing) => {
|
|
2130
|
+
const str = utils_toString.call(thing);
|
|
2131
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
2125
2132
|
})(Object.create(null));
|
|
2126
2133
|
|
|
2127
2134
|
const kindOfTest = (type) => {
|
|
2128
2135
|
type = type.toLowerCase();
|
|
2129
|
-
return (thing) => kindOf(thing) === type
|
|
2130
|
-
}
|
|
2136
|
+
return (thing) => kindOf(thing) === type;
|
|
2137
|
+
};
|
|
2131
2138
|
|
|
2132
|
-
const typeOfTest = type => thing => typeof thing === type;
|
|
2139
|
+
const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
2133
2140
|
|
|
2134
2141
|
/**
|
|
2135
|
-
* Determine if a value is
|
|
2142
|
+
* Determine if a value is a non-null object
|
|
2136
2143
|
*
|
|
2137
2144
|
* @param {Object} val The value to test
|
|
2138
2145
|
*
|
|
2139
2146
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
2140
2147
|
*/
|
|
2141
|
-
const {isArray} = Array;
|
|
2148
|
+
const { isArray } = Array;
|
|
2142
2149
|
|
|
2143
2150
|
/**
|
|
2144
2151
|
* Determine if a value is undefined
|
|
@@ -2147,7 +2154,7 @@ const {isArray} = Array;
|
|
|
2147
2154
|
*
|
|
2148
2155
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
2149
2156
|
*/
|
|
2150
|
-
const isUndefined = typeOfTest(
|
|
2157
|
+
const isUndefined = typeOfTest("undefined");
|
|
2151
2158
|
|
|
2152
2159
|
/**
|
|
2153
2160
|
* Determine if a value is a Buffer
|
|
@@ -2157,8 +2164,14 @@ const isUndefined = typeOfTest('undefined');
|
|
|
2157
2164
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
2158
2165
|
*/
|
|
2159
2166
|
function isBuffer(val) {
|
|
2160
|
-
return
|
|
2161
|
-
|
|
2167
|
+
return (
|
|
2168
|
+
val !== null &&
|
|
2169
|
+
!isUndefined(val) &&
|
|
2170
|
+
val.constructor !== null &&
|
|
2171
|
+
!isUndefined(val.constructor) &&
|
|
2172
|
+
isFunction(val.constructor.isBuffer) &&
|
|
2173
|
+
val.constructor.isBuffer(val)
|
|
2174
|
+
);
|
|
2162
2175
|
}
|
|
2163
2176
|
|
|
2164
2177
|
/**
|
|
@@ -2168,8 +2181,7 @@ function isBuffer(val) {
|
|
|
2168
2181
|
*
|
|
2169
2182
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
2170
2183
|
*/
|
|
2171
|
-
const isArrayBuffer = kindOfTest(
|
|
2172
|
-
|
|
2184
|
+
const isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
2173
2185
|
|
|
2174
2186
|
/**
|
|
2175
2187
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -2180,10 +2192,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
|
2180
2192
|
*/
|
|
2181
2193
|
function isArrayBufferView(val) {
|
|
2182
2194
|
let result;
|
|
2183
|
-
if (
|
|
2195
|
+
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
2184
2196
|
result = ArrayBuffer.isView(val);
|
|
2185
2197
|
} else {
|
|
2186
|
-
result =
|
|
2198
|
+
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
2187
2199
|
}
|
|
2188
2200
|
return result;
|
|
2189
2201
|
}
|
|
@@ -2195,7 +2207,7 @@ function isArrayBufferView(val) {
|
|
|
2195
2207
|
*
|
|
2196
2208
|
* @returns {boolean} True if value is a String, otherwise false
|
|
2197
2209
|
*/
|
|
2198
|
-
const isString = typeOfTest(
|
|
2210
|
+
const isString = typeOfTest("string");
|
|
2199
2211
|
|
|
2200
2212
|
/**
|
|
2201
2213
|
* Determine if a value is a Function
|
|
@@ -2203,7 +2215,7 @@ const isString = typeOfTest('string');
|
|
|
2203
2215
|
* @param {*} val The value to test
|
|
2204
2216
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
2205
2217
|
*/
|
|
2206
|
-
const isFunction = typeOfTest(
|
|
2218
|
+
const isFunction = typeOfTest("function");
|
|
2207
2219
|
|
|
2208
2220
|
/**
|
|
2209
2221
|
* Determine if a value is a Number
|
|
@@ -2212,7 +2224,7 @@ const isFunction = typeOfTest('function');
|
|
|
2212
2224
|
*
|
|
2213
2225
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
2214
2226
|
*/
|
|
2215
|
-
const isNumber = typeOfTest(
|
|
2227
|
+
const isNumber = typeOfTest("number");
|
|
2216
2228
|
|
|
2217
2229
|
/**
|
|
2218
2230
|
* Determine if a value is an Object
|
|
@@ -2221,7 +2233,7 @@ const isNumber = typeOfTest('number');
|
|
|
2221
2233
|
*
|
|
2222
2234
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
2223
2235
|
*/
|
|
2224
|
-
const isObject = (thing) => thing !== null && typeof thing ===
|
|
2236
|
+
const isObject = (thing) => thing !== null && typeof thing === "object";
|
|
2225
2237
|
|
|
2226
2238
|
/**
|
|
2227
2239
|
* Determine if a value is a Boolean
|
|
@@ -2229,7 +2241,7 @@ const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
|
2229
2241
|
* @param {*} thing The value to test
|
|
2230
2242
|
* @returns {boolean} True if value is a Boolean, otherwise false
|
|
2231
2243
|
*/
|
|
2232
|
-
const isBoolean = thing => thing === true || thing === false;
|
|
2244
|
+
const isBoolean = (thing) => thing === true || thing === false;
|
|
2233
2245
|
|
|
2234
2246
|
/**
|
|
2235
2247
|
* Determine if a value is a plain Object
|
|
@@ -2239,13 +2251,19 @@ const isBoolean = thing => thing === true || thing === false;
|
|
|
2239
2251
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
2240
2252
|
*/
|
|
2241
2253
|
const isPlainObject = (val) => {
|
|
2242
|
-
if (kindOf(val) !==
|
|
2254
|
+
if (kindOf(val) !== "object") {
|
|
2243
2255
|
return false;
|
|
2244
2256
|
}
|
|
2245
2257
|
|
|
2246
2258
|
const prototype = getPrototypeOf(val);
|
|
2247
|
-
return (
|
|
2248
|
-
|
|
2259
|
+
return (
|
|
2260
|
+
(prototype === null ||
|
|
2261
|
+
prototype === Object.prototype ||
|
|
2262
|
+
Object.getPrototypeOf(prototype) === null) &&
|
|
2263
|
+
!(toStringTag in val) &&
|
|
2264
|
+
!(iterator in val)
|
|
2265
|
+
);
|
|
2266
|
+
};
|
|
2249
2267
|
|
|
2250
2268
|
/**
|
|
2251
2269
|
* Determine if a value is an empty object (safely handles Buffers)
|
|
@@ -2261,12 +2279,15 @@ const isEmptyObject = (val) => {
|
|
|
2261
2279
|
}
|
|
2262
2280
|
|
|
2263
2281
|
try {
|
|
2264
|
-
return
|
|
2282
|
+
return (
|
|
2283
|
+
Object.keys(val).length === 0 &&
|
|
2284
|
+
Object.getPrototypeOf(val) === Object.prototype
|
|
2285
|
+
);
|
|
2265
2286
|
} catch (e) {
|
|
2266
2287
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
2267
2288
|
return false;
|
|
2268
2289
|
}
|
|
2269
|
-
}
|
|
2290
|
+
};
|
|
2270
2291
|
|
|
2271
2292
|
/**
|
|
2272
2293
|
* Determine if a value is a Date
|
|
@@ -2275,7 +2296,7 @@ const isEmptyObject = (val) => {
|
|
|
2275
2296
|
*
|
|
2276
2297
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
2277
2298
|
*/
|
|
2278
|
-
const isDate = kindOfTest(
|
|
2299
|
+
const isDate = kindOfTest("Date");
|
|
2279
2300
|
|
|
2280
2301
|
/**
|
|
2281
2302
|
* Determine if a value is a File
|
|
@@ -2284,7 +2305,7 @@ const isDate = kindOfTest('Date');
|
|
|
2284
2305
|
*
|
|
2285
2306
|
* @returns {boolean} True if value is a File, otherwise false
|
|
2286
2307
|
*/
|
|
2287
|
-
const isFile = kindOfTest(
|
|
2308
|
+
const isFile = kindOfTest("File");
|
|
2288
2309
|
|
|
2289
2310
|
/**
|
|
2290
2311
|
* Determine if a value is a Blob
|
|
@@ -2293,7 +2314,7 @@ const isFile = kindOfTest('File');
|
|
|
2293
2314
|
*
|
|
2294
2315
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
2295
2316
|
*/
|
|
2296
|
-
const isBlob = kindOfTest(
|
|
2317
|
+
const isBlob = kindOfTest("Blob");
|
|
2297
2318
|
|
|
2298
2319
|
/**
|
|
2299
2320
|
* Determine if a value is a FileList
|
|
@@ -2302,7 +2323,7 @@ const isBlob = kindOfTest('Blob');
|
|
|
2302
2323
|
*
|
|
2303
2324
|
* @returns {boolean} True if value is a File, otherwise false
|
|
2304
2325
|
*/
|
|
2305
|
-
const isFileList = kindOfTest(
|
|
2326
|
+
const isFileList = kindOfTest("FileList");
|
|
2306
2327
|
|
|
2307
2328
|
/**
|
|
2308
2329
|
* Determine if a value is a Stream
|
|
@@ -2322,16 +2343,17 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
|
2322
2343
|
*/
|
|
2323
2344
|
const isFormData = (thing) => {
|
|
2324
2345
|
let kind;
|
|
2325
|
-
return
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2346
|
+
return (
|
|
2347
|
+
thing &&
|
|
2348
|
+
((typeof FormData === "function" && thing instanceof FormData) ||
|
|
2349
|
+
(isFunction(thing.append) &&
|
|
2350
|
+
((kind = kindOf(thing)) === "formdata" ||
|
|
2351
|
+
// detect form-data instance
|
|
2352
|
+
(kind === "object" &&
|
|
2353
|
+
isFunction(thing.toString) &&
|
|
2354
|
+
thing.toString() === "[object FormData]"))))
|
|
2355
|
+
);
|
|
2356
|
+
};
|
|
2335
2357
|
|
|
2336
2358
|
/**
|
|
2337
2359
|
* Determine if a value is a URLSearchParams object
|
|
@@ -2340,9 +2362,14 @@ const isFormData = (thing) => {
|
|
|
2340
2362
|
*
|
|
2341
2363
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
2342
2364
|
*/
|
|
2343
|
-
const isURLSearchParams = kindOfTest(
|
|
2365
|
+
const isURLSearchParams = kindOfTest("URLSearchParams");
|
|
2344
2366
|
|
|
2345
|
-
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
2367
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
2368
|
+
"ReadableStream",
|
|
2369
|
+
"Request",
|
|
2370
|
+
"Response",
|
|
2371
|
+
"Headers",
|
|
2372
|
+
].map(kindOfTest);
|
|
2346
2373
|
|
|
2347
2374
|
/**
|
|
2348
2375
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -2351,8 +2378,8 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
|
|
|
2351
2378
|
*
|
|
2352
2379
|
* @returns {String} The String freed of excess whitespace
|
|
2353
2380
|
*/
|
|
2354
|
-
const trim = (str) =>
|
|
2355
|
-
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
|
2381
|
+
const trim = (str) =>
|
|
2382
|
+
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
2356
2383
|
|
|
2357
2384
|
/**
|
|
2358
2385
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
@@ -2363,15 +2390,16 @@ const trim = (str) => str.trim ?
|
|
|
2363
2390
|
* If 'obj' is an Object callback will be called passing
|
|
2364
2391
|
* the value, key, and complete object for each property.
|
|
2365
2392
|
*
|
|
2366
|
-
* @param {Object|Array} obj The object to iterate
|
|
2393
|
+
* @param {Object|Array<unknown>} obj The object to iterate
|
|
2367
2394
|
* @param {Function} fn The callback to invoke for each item
|
|
2368
2395
|
*
|
|
2369
|
-
* @param {
|
|
2396
|
+
* @param {Object} [options]
|
|
2397
|
+
* @param {Boolean} [options.allOwnKeys = false]
|
|
2370
2398
|
* @returns {any}
|
|
2371
2399
|
*/
|
|
2372
|
-
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
2400
|
+
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
2373
2401
|
// Don't bother if no value provided
|
|
2374
|
-
if (obj === null || typeof obj ===
|
|
2402
|
+
if (obj === null || typeof obj === "undefined") {
|
|
2375
2403
|
return;
|
|
2376
2404
|
}
|
|
2377
2405
|
|
|
@@ -2379,7 +2407,7 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
2379
2407
|
let l;
|
|
2380
2408
|
|
|
2381
2409
|
// Force an array if not already something iterable
|
|
2382
|
-
if (typeof obj !==
|
|
2410
|
+
if (typeof obj !== "object") {
|
|
2383
2411
|
/*eslint no-param-reassign:0*/
|
|
2384
2412
|
obj = [obj];
|
|
2385
2413
|
}
|
|
@@ -2396,7 +2424,9 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
2396
2424
|
}
|
|
2397
2425
|
|
|
2398
2426
|
// Iterate over object keys
|
|
2399
|
-
const keys = allOwnKeys
|
|
2427
|
+
const keys = allOwnKeys
|
|
2428
|
+
? Object.getOwnPropertyNames(obj)
|
|
2429
|
+
: Object.keys(obj);
|
|
2400
2430
|
const len = keys.length;
|
|
2401
2431
|
let key;
|
|
2402
2432
|
|
|
@@ -2408,7 +2438,7 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
2408
2438
|
}
|
|
2409
2439
|
|
|
2410
2440
|
function findKey(obj, key) {
|
|
2411
|
-
if (isBuffer(obj)){
|
|
2441
|
+
if (isBuffer(obj)) {
|
|
2412
2442
|
return null;
|
|
2413
2443
|
}
|
|
2414
2444
|
|
|
@@ -2428,10 +2458,15 @@ function findKey(obj, key) {
|
|
|
2428
2458
|
const _global = (() => {
|
|
2429
2459
|
/*eslint no-undef:0*/
|
|
2430
2460
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
2431
|
-
return typeof self !== "undefined"
|
|
2461
|
+
return typeof self !== "undefined"
|
|
2462
|
+
? self
|
|
2463
|
+
: typeof window !== "undefined"
|
|
2464
|
+
? window
|
|
2465
|
+
: global;
|
|
2432
2466
|
})();
|
|
2433
2467
|
|
|
2434
|
-
const isContextDefined = (context) =>
|
|
2468
|
+
const isContextDefined = (context) =>
|
|
2469
|
+
!isUndefined(context) && context !== _global;
|
|
2435
2470
|
|
|
2436
2471
|
/**
|
|
2437
2472
|
* Accepts varargs expecting each argument to be an object, then
|
|
@@ -2443,7 +2478,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
2443
2478
|
* Example:
|
|
2444
2479
|
*
|
|
2445
2480
|
* ```js
|
|
2446
|
-
*
|
|
2481
|
+
* const result = merge({foo: 123}, {foo: 456});
|
|
2447
2482
|
* console.log(result.foo); // outputs 456
|
|
2448
2483
|
* ```
|
|
2449
2484
|
*
|
|
@@ -2452,22 +2487,25 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
2452
2487
|
* @returns {Object} Result of all merge properties
|
|
2453
2488
|
*/
|
|
2454
2489
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
2455
|
-
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
|
2490
|
+
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
|
|
2456
2491
|
const result = {};
|
|
2457
2492
|
const assignValue = (val, key) => {
|
|
2458
|
-
|
|
2493
|
+
// Skip dangerous property names to prevent prototype pollution
|
|
2494
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
2495
|
+
return;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
const targetKey = (caseless && findKey(result, key)) || key;
|
|
2459
2499
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
2460
2500
|
result[targetKey] = merge(result[targetKey], val);
|
|
2461
2501
|
} else if (isPlainObject(val)) {
|
|
2462
2502
|
result[targetKey] = merge({}, val);
|
|
2463
2503
|
} else if (isArray(val)) {
|
|
2464
2504
|
result[targetKey] = val.slice();
|
|
2465
|
-
} else {
|
|
2466
|
-
|
|
2467
|
-
result[targetKey] = val;
|
|
2468
|
-
}
|
|
2505
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
|
2506
|
+
result[targetKey] = val;
|
|
2469
2507
|
}
|
|
2470
|
-
}
|
|
2508
|
+
};
|
|
2471
2509
|
|
|
2472
2510
|
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
2473
2511
|
arguments[i] && forEach(arguments[i], assignValue);
|
|
@@ -2482,19 +2520,34 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
2482
2520
|
* @param {Object} b The object to copy properties from
|
|
2483
2521
|
* @param {Object} thisArg The object to bind function to
|
|
2484
2522
|
*
|
|
2485
|
-
* @param {
|
|
2523
|
+
* @param {Object} [options]
|
|
2524
|
+
* @param {Boolean} [options.allOwnKeys]
|
|
2486
2525
|
* @returns {Object} The resulting value of object a
|
|
2487
2526
|
*/
|
|
2488
|
-
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
2489
|
-
forEach(
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2527
|
+
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
2528
|
+
forEach(
|
|
2529
|
+
b,
|
|
2530
|
+
(val, key) => {
|
|
2531
|
+
if (thisArg && isFunction(val)) {
|
|
2532
|
+
Object.defineProperty(a, key, {
|
|
2533
|
+
value: bind(val, thisArg),
|
|
2534
|
+
writable: true,
|
|
2535
|
+
enumerable: true,
|
|
2536
|
+
configurable: true,
|
|
2537
|
+
});
|
|
2538
|
+
} else {
|
|
2539
|
+
Object.defineProperty(a, key, {
|
|
2540
|
+
value: val,
|
|
2541
|
+
writable: true,
|
|
2542
|
+
enumerable: true,
|
|
2543
|
+
configurable: true,
|
|
2544
|
+
});
|
|
2545
|
+
}
|
|
2546
|
+
},
|
|
2547
|
+
{ allOwnKeys },
|
|
2548
|
+
);
|
|
2496
2549
|
return a;
|
|
2497
|
-
}
|
|
2550
|
+
};
|
|
2498
2551
|
|
|
2499
2552
|
/**
|
|
2500
2553
|
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
|
@@ -2504,11 +2557,11 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
|
2504
2557
|
* @returns {string} content value without BOM
|
|
2505
2558
|
*/
|
|
2506
2559
|
const stripBOM = (content) => {
|
|
2507
|
-
if (content.charCodeAt(0) ===
|
|
2560
|
+
if (content.charCodeAt(0) === 0xfeff) {
|
|
2508
2561
|
content = content.slice(1);
|
|
2509
2562
|
}
|
|
2510
2563
|
return content;
|
|
2511
|
-
}
|
|
2564
|
+
};
|
|
2512
2565
|
|
|
2513
2566
|
/**
|
|
2514
2567
|
* Inherit the prototype methods from one constructor into another
|
|
@@ -2520,13 +2573,21 @@ const stripBOM = (content) => {
|
|
|
2520
2573
|
* @returns {void}
|
|
2521
2574
|
*/
|
|
2522
2575
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
2523
|
-
constructor.prototype = Object.create(
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2576
|
+
constructor.prototype = Object.create(
|
|
2577
|
+
superConstructor.prototype,
|
|
2578
|
+
descriptors,
|
|
2579
|
+
);
|
|
2580
|
+
Object.defineProperty(constructor.prototype, "constructor", {
|
|
2581
|
+
value: constructor,
|
|
2582
|
+
writable: true,
|
|
2583
|
+
enumerable: false,
|
|
2584
|
+
configurable: true,
|
|
2585
|
+
});
|
|
2586
|
+
Object.defineProperty(constructor, "super", {
|
|
2587
|
+
value: superConstructor.prototype,
|
|
2527
2588
|
});
|
|
2528
2589
|
props && Object.assign(constructor.prototype, props);
|
|
2529
|
-
}
|
|
2590
|
+
};
|
|
2530
2591
|
|
|
2531
2592
|
/**
|
|
2532
2593
|
* Resolve object with deep prototype chain to a flat object
|
|
@@ -2552,16 +2613,23 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
|
2552
2613
|
i = props.length;
|
|
2553
2614
|
while (i-- > 0) {
|
|
2554
2615
|
prop = props[i];
|
|
2555
|
-
if (
|
|
2616
|
+
if (
|
|
2617
|
+
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
|
|
2618
|
+
!merged[prop]
|
|
2619
|
+
) {
|
|
2556
2620
|
destObj[prop] = sourceObj[prop];
|
|
2557
2621
|
merged[prop] = true;
|
|
2558
2622
|
}
|
|
2559
2623
|
}
|
|
2560
2624
|
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
2561
|
-
} while (
|
|
2625
|
+
} while (
|
|
2626
|
+
sourceObj &&
|
|
2627
|
+
(!filter || filter(sourceObj, destObj)) &&
|
|
2628
|
+
sourceObj !== Object.prototype
|
|
2629
|
+
);
|
|
2562
2630
|
|
|
2563
2631
|
return destObj;
|
|
2564
|
-
}
|
|
2632
|
+
};
|
|
2565
2633
|
|
|
2566
2634
|
/**
|
|
2567
2635
|
* Determines whether a string ends with the characters of a specified string
|
|
@@ -2580,8 +2648,7 @@ const endsWith = (str, searchString, position) => {
|
|
|
2580
2648
|
position -= searchString.length;
|
|
2581
2649
|
const lastIndex = str.indexOf(searchString, position);
|
|
2582
2650
|
return lastIndex !== -1 && lastIndex === position;
|
|
2583
|
-
}
|
|
2584
|
-
|
|
2651
|
+
};
|
|
2585
2652
|
|
|
2586
2653
|
/**
|
|
2587
2654
|
* Returns new array from array like object or null if failed
|
|
@@ -2600,7 +2667,7 @@ const toArray = (thing) => {
|
|
|
2600
2667
|
arr[i] = thing[i];
|
|
2601
2668
|
}
|
|
2602
2669
|
return arr;
|
|
2603
|
-
}
|
|
2670
|
+
};
|
|
2604
2671
|
|
|
2605
2672
|
/**
|
|
2606
2673
|
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
|
|
@@ -2611,12 +2678,12 @@ const toArray = (thing) => {
|
|
|
2611
2678
|
* @returns {Array}
|
|
2612
2679
|
*/
|
|
2613
2680
|
// eslint-disable-next-line func-names
|
|
2614
|
-
const isTypedArray = (TypedArray => {
|
|
2681
|
+
const isTypedArray = ((TypedArray) => {
|
|
2615
2682
|
// eslint-disable-next-line func-names
|
|
2616
|
-
return thing => {
|
|
2683
|
+
return (thing) => {
|
|
2617
2684
|
return TypedArray && thing instanceof TypedArray;
|
|
2618
2685
|
};
|
|
2619
|
-
})(typeof Uint8Array !==
|
|
2686
|
+
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
2620
2687
|
|
|
2621
2688
|
/**
|
|
2622
2689
|
* For each entry in the object, call the function with the key and value.
|
|
@@ -2637,7 +2704,7 @@ const forEachEntry = (obj, fn) => {
|
|
|
2637
2704
|
const pair = result.value;
|
|
2638
2705
|
fn.call(obj, pair[0], pair[1]);
|
|
2639
2706
|
}
|
|
2640
|
-
}
|
|
2707
|
+
};
|
|
2641
2708
|
|
|
2642
2709
|
/**
|
|
2643
2710
|
* It takes a regular expression and a string, and returns an array of all the matches
|
|
@@ -2656,21 +2723,25 @@ const matchAll = (regExp, str) => {
|
|
|
2656
2723
|
}
|
|
2657
2724
|
|
|
2658
2725
|
return arr;
|
|
2659
|
-
}
|
|
2726
|
+
};
|
|
2660
2727
|
|
|
2661
2728
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
2662
|
-
const isHTMLForm = kindOfTest(
|
|
2729
|
+
const isHTMLForm = kindOfTest("HTMLFormElement");
|
|
2663
2730
|
|
|
2664
|
-
const toCamelCase = str => {
|
|
2665
|
-
return str
|
|
2666
|
-
|
|
2731
|
+
const toCamelCase = (str) => {
|
|
2732
|
+
return str
|
|
2733
|
+
.toLowerCase()
|
|
2734
|
+
.replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
2667
2735
|
return p1.toUpperCase() + p2;
|
|
2668
|
-
}
|
|
2669
|
-
);
|
|
2736
|
+
});
|
|
2670
2737
|
};
|
|
2671
2738
|
|
|
2672
2739
|
/* Creating a function that will check if an object has a property. */
|
|
2673
|
-
const utils_hasOwnProperty = (
|
|
2740
|
+
const utils_hasOwnProperty = (
|
|
2741
|
+
({ hasOwnProperty }) =>
|
|
2742
|
+
(obj, prop) =>
|
|
2743
|
+
hasOwnProperty.call(obj, prop)
|
|
2744
|
+
)(Object.prototype);
|
|
2674
2745
|
|
|
2675
2746
|
/**
|
|
2676
2747
|
* Determine if a value is a RegExp object
|
|
@@ -2679,7 +2750,7 @@ const utils_hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnPropert
|
|
|
2679
2750
|
*
|
|
2680
2751
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
2681
2752
|
*/
|
|
2682
|
-
const isRegExp = kindOfTest(
|
|
2753
|
+
const isRegExp = kindOfTest("RegExp");
|
|
2683
2754
|
|
|
2684
2755
|
const reduceDescriptors = (obj, reducer) => {
|
|
2685
2756
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -2693,7 +2764,7 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
2693
2764
|
});
|
|
2694
2765
|
|
|
2695
2766
|
Object.defineProperties(obj, reducedDescriptors);
|
|
2696
|
-
}
|
|
2767
|
+
};
|
|
2697
2768
|
|
|
2698
2769
|
/**
|
|
2699
2770
|
* Makes all methods read-only
|
|
@@ -2703,7 +2774,10 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
2703
2774
|
const freezeMethods = (obj) => {
|
|
2704
2775
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
2705
2776
|
// skip restricted props in strict mode
|
|
2706
|
-
if (
|
|
2777
|
+
if (
|
|
2778
|
+
isFunction(obj) &&
|
|
2779
|
+
["arguments", "caller", "callee"].indexOf(name) !== -1
|
|
2780
|
+
) {
|
|
2707
2781
|
return false;
|
|
2708
2782
|
}
|
|
2709
2783
|
|
|
@@ -2713,40 +2787,42 @@ const freezeMethods = (obj) => {
|
|
|
2713
2787
|
|
|
2714
2788
|
descriptor.enumerable = false;
|
|
2715
2789
|
|
|
2716
|
-
if (
|
|
2790
|
+
if ("writable" in descriptor) {
|
|
2717
2791
|
descriptor.writable = false;
|
|
2718
2792
|
return;
|
|
2719
2793
|
}
|
|
2720
2794
|
|
|
2721
2795
|
if (!descriptor.set) {
|
|
2722
2796
|
descriptor.set = () => {
|
|
2723
|
-
throw Error(
|
|
2797
|
+
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
2724
2798
|
};
|
|
2725
2799
|
}
|
|
2726
2800
|
});
|
|
2727
|
-
}
|
|
2801
|
+
};
|
|
2728
2802
|
|
|
2729
2803
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
2730
2804
|
const obj = {};
|
|
2731
2805
|
|
|
2732
2806
|
const define = (arr) => {
|
|
2733
|
-
arr.forEach(value => {
|
|
2807
|
+
arr.forEach((value) => {
|
|
2734
2808
|
obj[value] = true;
|
|
2735
2809
|
});
|
|
2736
|
-
}
|
|
2810
|
+
};
|
|
2737
2811
|
|
|
2738
|
-
isArray(arrayOrString)
|
|
2812
|
+
isArray(arrayOrString)
|
|
2813
|
+
? define(arrayOrString)
|
|
2814
|
+
: define(String(arrayOrString).split(delimiter));
|
|
2739
2815
|
|
|
2740
2816
|
return obj;
|
|
2741
|
-
}
|
|
2817
|
+
};
|
|
2742
2818
|
|
|
2743
|
-
const noop = () => {}
|
|
2819
|
+
const noop = () => {};
|
|
2744
2820
|
|
|
2745
2821
|
const toFiniteNumber = (value, defaultValue) => {
|
|
2746
|
-
return value != null && Number.isFinite(value = +value)
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2822
|
+
return value != null && Number.isFinite((value = +value))
|
|
2823
|
+
? value
|
|
2824
|
+
: defaultValue;
|
|
2825
|
+
};
|
|
2750
2826
|
|
|
2751
2827
|
/**
|
|
2752
2828
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
@@ -2756,14 +2832,18 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
2756
2832
|
* @returns {boolean}
|
|
2757
2833
|
*/
|
|
2758
2834
|
function isSpecCompliantForm(thing) {
|
|
2759
|
-
return !!(
|
|
2835
|
+
return !!(
|
|
2836
|
+
thing &&
|
|
2837
|
+
isFunction(thing.append) &&
|
|
2838
|
+
thing[toStringTag] === "FormData" &&
|
|
2839
|
+
thing[iterator]
|
|
2840
|
+
);
|
|
2760
2841
|
}
|
|
2761
2842
|
|
|
2762
2843
|
const toJSONObject = (obj) => {
|
|
2763
2844
|
const stack = new Array(10);
|
|
2764
2845
|
|
|
2765
2846
|
const visit = (source, i) => {
|
|
2766
|
-
|
|
2767
2847
|
if (isObject(source)) {
|
|
2768
2848
|
if (stack.indexOf(source) >= 0) {
|
|
2769
2849
|
return;
|
|
@@ -2774,7 +2854,7 @@ const toJSONObject = (obj) => {
|
|
|
2774
2854
|
return source;
|
|
2775
2855
|
}
|
|
2776
2856
|
|
|
2777
|
-
if(!(
|
|
2857
|
+
if (!("toJSON" in source)) {
|
|
2778
2858
|
stack[i] = source;
|
|
2779
2859
|
const target = isArray(source) ? [] : {};
|
|
2780
2860
|
|
|
@@ -2790,15 +2870,18 @@ const toJSONObject = (obj) => {
|
|
|
2790
2870
|
}
|
|
2791
2871
|
|
|
2792
2872
|
return source;
|
|
2793
|
-
}
|
|
2873
|
+
};
|
|
2794
2874
|
|
|
2795
2875
|
return visit(obj, 0);
|
|
2796
|
-
}
|
|
2876
|
+
};
|
|
2797
2877
|
|
|
2798
|
-
const isAsyncFn = kindOfTest(
|
|
2878
|
+
const isAsyncFn = kindOfTest("AsyncFunction");
|
|
2799
2879
|
|
|
2800
2880
|
const isThenable = (thing) =>
|
|
2801
|
-
thing &&
|
|
2881
|
+
thing &&
|
|
2882
|
+
(isObject(thing) || isFunction(thing)) &&
|
|
2883
|
+
isFunction(thing.then) &&
|
|
2884
|
+
isFunction(thing.catch);
|
|
2802
2885
|
|
|
2803
2886
|
// original code
|
|
2804
2887
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
@@ -2808,32 +2891,35 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
2808
2891
|
return setImmediate;
|
|
2809
2892
|
}
|
|
2810
2893
|
|
|
2811
|
-
return postMessageSupported
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2894
|
+
return postMessageSupported
|
|
2895
|
+
? ((token, callbacks) => {
|
|
2896
|
+
_global.addEventListener(
|
|
2897
|
+
"message",
|
|
2898
|
+
({ source, data }) => {
|
|
2899
|
+
if (source === _global && data === token) {
|
|
2900
|
+
callbacks.length && callbacks.shift()();
|
|
2901
|
+
}
|
|
2902
|
+
},
|
|
2903
|
+
false,
|
|
2904
|
+
);
|
|
2817
2905
|
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
isFunction(_global.postMessage)
|
|
2826
|
-
);
|
|
2906
|
+
return (cb) => {
|
|
2907
|
+
callbacks.push(cb);
|
|
2908
|
+
_global.postMessage(token, "*");
|
|
2909
|
+
};
|
|
2910
|
+
})(`axios@${Math.random()}`, [])
|
|
2911
|
+
: (cb) => setTimeout(cb);
|
|
2912
|
+
})(typeof setImmediate === "function", isFunction(_global.postMessage));
|
|
2827
2913
|
|
|
2828
|
-
const asap =
|
|
2829
|
-
|
|
2914
|
+
const asap =
|
|
2915
|
+
typeof queueMicrotask !== "undefined"
|
|
2916
|
+
? queueMicrotask.bind(_global)
|
|
2917
|
+
: (typeof process !== "undefined" && process.nextTick) || _setImmediate;
|
|
2830
2918
|
|
|
2831
2919
|
// *********************
|
|
2832
2920
|
|
|
2833
|
-
|
|
2834
2921
|
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
2835
2922
|
|
|
2836
|
-
|
|
2837
2923
|
/* harmony default export */ const utils = ({
|
|
2838
2924
|
isArray,
|
|
2839
2925
|
isArrayBuffer,
|
|
@@ -2891,7 +2977,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
2891
2977
|
isThenable,
|
|
2892
2978
|
setImmediate: _setImmediate,
|
|
2893
2979
|
asap,
|
|
2894
|
-
isIterable
|
|
2980
|
+
isIterable,
|
|
2895
2981
|
});
|
|
2896
2982
|
|
|
2897
2983
|
;// ../../../node_modules/axios/lib/core/AxiosError.js
|
|
@@ -2899,110 +2985,73 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
2899
2985
|
|
|
2900
2986
|
|
|
2901
2987
|
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
toJSON: function toJSON() {
|
|
2935
|
-
return {
|
|
2936
|
-
// Standard
|
|
2937
|
-
message: this.message,
|
|
2938
|
-
name: this.name,
|
|
2939
|
-
// Microsoft
|
|
2940
|
-
description: this.description,
|
|
2941
|
-
number: this.number,
|
|
2942
|
-
// Mozilla
|
|
2943
|
-
fileName: this.fileName,
|
|
2944
|
-
lineNumber: this.lineNumber,
|
|
2945
|
-
columnNumber: this.columnNumber,
|
|
2946
|
-
stack: this.stack,
|
|
2947
|
-
// Axios
|
|
2948
|
-
config: utils.toJSONObject(this.config),
|
|
2949
|
-
code: this.code,
|
|
2950
|
-
status: this.status
|
|
2951
|
-
};
|
|
2952
|
-
}
|
|
2953
|
-
});
|
|
2954
|
-
|
|
2955
|
-
const AxiosError_prototype = AxiosError.prototype;
|
|
2956
|
-
const descriptors = {};
|
|
2957
|
-
|
|
2958
|
-
[
|
|
2959
|
-
'ERR_BAD_OPTION_VALUE',
|
|
2960
|
-
'ERR_BAD_OPTION',
|
|
2961
|
-
'ECONNABORTED',
|
|
2962
|
-
'ETIMEDOUT',
|
|
2963
|
-
'ERR_NETWORK',
|
|
2964
|
-
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
2965
|
-
'ERR_DEPRECATED',
|
|
2966
|
-
'ERR_BAD_RESPONSE',
|
|
2967
|
-
'ERR_BAD_REQUEST',
|
|
2968
|
-
'ERR_CANCELED',
|
|
2969
|
-
'ERR_NOT_SUPPORT',
|
|
2970
|
-
'ERR_INVALID_URL'
|
|
2971
|
-
// eslint-disable-next-line func-names
|
|
2972
|
-
].forEach(code => {
|
|
2973
|
-
descriptors[code] = {value: code};
|
|
2974
|
-
});
|
|
2975
|
-
|
|
2976
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
2977
|
-
Object.defineProperty(AxiosError_prototype, 'isAxiosError', {value: true});
|
|
2978
|
-
|
|
2979
|
-
// eslint-disable-next-line func-names
|
|
2980
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
2981
|
-
const axiosError = Object.create(AxiosError_prototype);
|
|
2982
|
-
|
|
2983
|
-
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
2984
|
-
return obj !== Error.prototype;
|
|
2985
|
-
}, prop => {
|
|
2986
|
-
return prop !== 'isAxiosError';
|
|
2987
|
-
});
|
|
2988
|
-
|
|
2989
|
-
const msg = error && error.message ? error.message : 'Error';
|
|
2990
|
-
|
|
2991
|
-
// Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
|
|
2992
|
-
const errCode = code == null && error ? error.code : code;
|
|
2993
|
-
AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
2994
|
-
|
|
2995
|
-
// Chain the original error on the standard field; non-enumerable to avoid JSON noise
|
|
2996
|
-
if (error && axiosError.cause == null) {
|
|
2997
|
-
Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
|
|
2998
|
-
}
|
|
2999
|
-
|
|
3000
|
-
axiosError.name = (error && error.name) || 'Error';
|
|
2988
|
+
class AxiosError extends Error {
|
|
2989
|
+
static from(error, code, config, request, response, customProps) {
|
|
2990
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
2991
|
+
axiosError.cause = error;
|
|
2992
|
+
axiosError.name = error.name;
|
|
2993
|
+
customProps && Object.assign(axiosError, customProps);
|
|
2994
|
+
return axiosError;
|
|
2995
|
+
}
|
|
2996
|
+
|
|
2997
|
+
/**
|
|
2998
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
2999
|
+
*
|
|
3000
|
+
* @param {string} message The error message.
|
|
3001
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
3002
|
+
* @param {Object} [config] The config.
|
|
3003
|
+
* @param {Object} [request] The request.
|
|
3004
|
+
* @param {Object} [response] The response.
|
|
3005
|
+
*
|
|
3006
|
+
* @returns {Error} The created error.
|
|
3007
|
+
*/
|
|
3008
|
+
constructor(message, code, config, request, response) {
|
|
3009
|
+
super(message);
|
|
3010
|
+
this.name = 'AxiosError';
|
|
3011
|
+
this.isAxiosError = true;
|
|
3012
|
+
code && (this.code = code);
|
|
3013
|
+
config && (this.config = config);
|
|
3014
|
+
request && (this.request = request);
|
|
3015
|
+
if (response) {
|
|
3016
|
+
this.response = response;
|
|
3017
|
+
this.status = response.status;
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3001
3020
|
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3021
|
+
toJSON() {
|
|
3022
|
+
return {
|
|
3023
|
+
// Standard
|
|
3024
|
+
message: this.message,
|
|
3025
|
+
name: this.name,
|
|
3026
|
+
// Microsoft
|
|
3027
|
+
description: this.description,
|
|
3028
|
+
number: this.number,
|
|
3029
|
+
// Mozilla
|
|
3030
|
+
fileName: this.fileName,
|
|
3031
|
+
lineNumber: this.lineNumber,
|
|
3032
|
+
columnNumber: this.columnNumber,
|
|
3033
|
+
stack: this.stack,
|
|
3034
|
+
// Axios
|
|
3035
|
+
config: utils.toJSONObject(this.config),
|
|
3036
|
+
code: this.code,
|
|
3037
|
+
status: this.status,
|
|
3038
|
+
};
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
3043
|
+
AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
3044
|
+
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
3045
|
+
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
3046
|
+
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
3047
|
+
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
3048
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
3049
|
+
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
3050
|
+
AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
3051
|
+
AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
3052
|
+
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
3053
|
+
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
3054
|
+
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
3006
3055
|
|
|
3007
3056
|
/* harmony default export */ const core_AxiosError = (AxiosError);
|
|
3008
3057
|
|
|
@@ -3328,29 +3377,26 @@ function buildURL_encode(val) {
|
|
|
3328
3377
|
* @returns {string} The formatted url
|
|
3329
3378
|
*/
|
|
3330
3379
|
function buildURL(url, params, options) {
|
|
3331
|
-
/*eslint no-param-reassign:0*/
|
|
3332
3380
|
if (!params) {
|
|
3333
3381
|
return url;
|
|
3334
3382
|
}
|
|
3335
|
-
|
|
3383
|
+
|
|
3336
3384
|
const _encode = options && options.encode || buildURL_encode;
|
|
3337
3385
|
|
|
3338
|
-
|
|
3339
|
-
options
|
|
3340
|
-
|
|
3341
|
-
};
|
|
3342
|
-
}
|
|
3386
|
+
const _options = utils.isFunction(options) ? {
|
|
3387
|
+
serialize: options
|
|
3388
|
+
} : options;
|
|
3343
3389
|
|
|
3344
|
-
const serializeFn =
|
|
3390
|
+
const serializeFn = _options && _options.serialize;
|
|
3345
3391
|
|
|
3346
3392
|
let serializedParams;
|
|
3347
3393
|
|
|
3348
3394
|
if (serializeFn) {
|
|
3349
|
-
serializedParams = serializeFn(params,
|
|
3395
|
+
serializedParams = serializeFn(params, _options);
|
|
3350
3396
|
} else {
|
|
3351
3397
|
serializedParams = utils.isURLSearchParams(params) ?
|
|
3352
3398
|
params.toString() :
|
|
3353
|
-
new helpers_AxiosURLSearchParams(params,
|
|
3399
|
+
new helpers_AxiosURLSearchParams(params, _options).toString(_encode);
|
|
3354
3400
|
}
|
|
3355
3401
|
|
|
3356
3402
|
if (serializedParams) {
|
|
@@ -3380,6 +3426,7 @@ class InterceptorManager {
|
|
|
3380
3426
|
*
|
|
3381
3427
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
3382
3428
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
3429
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
3383
3430
|
*
|
|
3384
3431
|
* @return {Number} An ID used to remove interceptor later
|
|
3385
3432
|
*/
|
|
@@ -3398,7 +3445,7 @@ class InterceptorManager {
|
|
|
3398
3445
|
*
|
|
3399
3446
|
* @param {Number} id The ID that was returned by `use`
|
|
3400
3447
|
*
|
|
3401
|
-
* @returns {
|
|
3448
|
+
* @returns {void}
|
|
3402
3449
|
*/
|
|
3403
3450
|
eject(id) {
|
|
3404
3451
|
if (this.handlers[id]) {
|
|
@@ -3444,7 +3491,8 @@ class InterceptorManager {
|
|
|
3444
3491
|
/* harmony default export */ const defaults_transitional = ({
|
|
3445
3492
|
silentJSONParsing: true,
|
|
3446
3493
|
forcedJSONParsing: true,
|
|
3447
|
-
clarifyTimeoutError: false
|
|
3494
|
+
clarifyTimeoutError: false,
|
|
3495
|
+
legacyInterceptorReqResOrdering: true
|
|
3448
3496
|
});
|
|
3449
3497
|
|
|
3450
3498
|
;// ../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
|
|
@@ -4230,26 +4278,23 @@ function isCancel(value) {
|
|
|
4230
4278
|
|
|
4231
4279
|
|
|
4232
4280
|
|
|
4233
|
-
|
|
4234
|
-
/**
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4281
|
+
class CanceledError extends core_AxiosError {
|
|
4282
|
+
/**
|
|
4283
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
4284
|
+
*
|
|
4285
|
+
* @param {string=} message The message.
|
|
4286
|
+
* @param {Object=} config The config.
|
|
4287
|
+
* @param {Object=} request The request.
|
|
4288
|
+
*
|
|
4289
|
+
* @returns {CanceledError} The created error.
|
|
4290
|
+
*/
|
|
4291
|
+
constructor(message, config, request) {
|
|
4292
|
+
super(message == null ? 'canceled' : message, core_AxiosError.ERR_CANCELED, config, request);
|
|
4293
|
+
this.name = 'CanceledError';
|
|
4294
|
+
this.__CANCEL__ = true;
|
|
4295
|
+
}
|
|
4247
4296
|
}
|
|
4248
4297
|
|
|
4249
|
-
utils.inherits(CanceledError, core_AxiosError, {
|
|
4250
|
-
__CANCEL__: true
|
|
4251
|
-
});
|
|
4252
|
-
|
|
4253
4298
|
/* harmony default export */ const cancel_CanceledError = (CanceledError);
|
|
4254
4299
|
|
|
4255
4300
|
;// ../../../node_modules/axios/lib/core/settle.js
|
|
@@ -4462,27 +4507,38 @@ const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));
|
|
|
4462
4507
|
|
|
4463
4508
|
// Standard browser envs support document.cookie
|
|
4464
4509
|
{
|
|
4465
|
-
write(name, value, expires, path, domain, secure) {
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
4469
|
-
|
|
4470
|
-
utils.isString(path) && cookie.push('path=' + path);
|
|
4510
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
4511
|
+
if (typeof document === 'undefined') return;
|
|
4471
4512
|
|
|
4472
|
-
|
|
4513
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
4473
4514
|
|
|
4474
|
-
|
|
4515
|
+
if (utils.isNumber(expires)) {
|
|
4516
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
4517
|
+
}
|
|
4518
|
+
if (utils.isString(path)) {
|
|
4519
|
+
cookie.push(`path=${path}`);
|
|
4520
|
+
}
|
|
4521
|
+
if (utils.isString(domain)) {
|
|
4522
|
+
cookie.push(`domain=${domain}`);
|
|
4523
|
+
}
|
|
4524
|
+
if (secure === true) {
|
|
4525
|
+
cookie.push('secure');
|
|
4526
|
+
}
|
|
4527
|
+
if (utils.isString(sameSite)) {
|
|
4528
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
4529
|
+
}
|
|
4475
4530
|
|
|
4476
4531
|
document.cookie = cookie.join('; ');
|
|
4477
4532
|
},
|
|
4478
4533
|
|
|
4479
4534
|
read(name) {
|
|
4480
|
-
|
|
4481
|
-
|
|
4535
|
+
if (typeof document === 'undefined') return null;
|
|
4536
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
4537
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
4482
4538
|
},
|
|
4483
4539
|
|
|
4484
4540
|
remove(name) {
|
|
4485
|
-
this.write(name, '', Date.now() - 86400000);
|
|
4541
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
4486
4542
|
}
|
|
4487
4543
|
}
|
|
4488
4544
|
|
|
@@ -4512,9 +4568,14 @@ function isAbsoluteURL(url) {
|
|
|
4512
4568
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
4513
4569
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
4514
4570
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
4571
|
+
if (typeof url !== 'string') {
|
|
4572
|
+
return false;
|
|
4573
|
+
}
|
|
4574
|
+
|
|
4515
4575
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
4516
4576
|
}
|
|
4517
4577
|
|
|
4578
|
+
|
|
4518
4579
|
;// ../../../node_modules/axios/lib/helpers/combineURLs.js
|
|
4519
4580
|
|
|
4520
4581
|
|
|
@@ -4562,7 +4623,8 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
|
4562
4623
|
|
|
4563
4624
|
|
|
4564
4625
|
|
|
4565
|
-
const headersToObject = (thing) =>
|
|
4626
|
+
const headersToObject = (thing) =>
|
|
4627
|
+
thing instanceof core_AxiosHeaders ? { ...thing } : thing;
|
|
4566
4628
|
|
|
4567
4629
|
/**
|
|
4568
4630
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -4580,7 +4642,7 @@ function mergeConfig(config1, config2) {
|
|
|
4580
4642
|
|
|
4581
4643
|
function getMergedValue(target, source, prop, caseless) {
|
|
4582
4644
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
4583
|
-
return utils.merge.call({caseless}, target, source);
|
|
4645
|
+
return utils.merge.call({ caseless }, target, source);
|
|
4584
4646
|
} else if (utils.isPlainObject(source)) {
|
|
4585
4647
|
return utils.merge({}, source);
|
|
4586
4648
|
} else if (utils.isArray(source)) {
|
|
@@ -4589,12 +4651,11 @@ function mergeConfig(config1, config2) {
|
|
|
4589
4651
|
return source;
|
|
4590
4652
|
}
|
|
4591
4653
|
|
|
4592
|
-
|
|
4593
|
-
function mergeDeepProperties(a, b, prop , caseless) {
|
|
4654
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
4594
4655
|
if (!utils.isUndefined(b)) {
|
|
4595
|
-
return getMergedValue(a, b, prop
|
|
4656
|
+
return getMergedValue(a, b, prop, caseless);
|
|
4596
4657
|
} else if (!utils.isUndefined(a)) {
|
|
4597
|
-
return getMergedValue(undefined, a, prop
|
|
4658
|
+
return getMergedValue(undefined, a, prop, caseless);
|
|
4598
4659
|
}
|
|
4599
4660
|
}
|
|
4600
4661
|
|
|
@@ -4652,14 +4713,27 @@ function mergeConfig(config1, config2) {
|
|
|
4652
4713
|
socketPath: defaultToConfig2,
|
|
4653
4714
|
responseEncoding: defaultToConfig2,
|
|
4654
4715
|
validateStatus: mergeDirectKeys,
|
|
4655
|
-
headers: (a, b
|
|
4716
|
+
headers: (a, b, prop) =>
|
|
4717
|
+
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
4656
4718
|
};
|
|
4657
4719
|
|
|
4658
|
-
utils.forEach(
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4720
|
+
utils.forEach(
|
|
4721
|
+
Object.keys({ ...config1, ...config2 }),
|
|
4722
|
+
function computeConfigValue(prop) {
|
|
4723
|
+
if (
|
|
4724
|
+
prop === "__proto__" ||
|
|
4725
|
+
prop === "constructor" ||
|
|
4726
|
+
prop === "prototype"
|
|
4727
|
+
)
|
|
4728
|
+
return;
|
|
4729
|
+
const merge = utils.hasOwnProp(mergeMap, prop)
|
|
4730
|
+
? mergeMap[prop]
|
|
4731
|
+
: mergeDeepProperties;
|
|
4732
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
4733
|
+
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) ||
|
|
4734
|
+
(config[prop] = configValue);
|
|
4735
|
+
},
|
|
4736
|
+
);
|
|
4663
4737
|
|
|
4664
4738
|
return config;
|
|
4665
4739
|
}
|
|
@@ -4953,7 +5027,7 @@ const composeSignals = (signals, timeout) => {
|
|
|
4953
5027
|
|
|
4954
5028
|
let timer = timeout && setTimeout(() => {
|
|
4955
5029
|
timer = null;
|
|
4956
|
-
onabort(new core_AxiosError(`timeout ${timeout}
|
|
5030
|
+
onabort(new core_AxiosError(`timeout of ${timeout}ms exceeded`, core_AxiosError.ETIMEDOUT))
|
|
4957
5031
|
}, timeout)
|
|
4958
5032
|
|
|
4959
5033
|
const unsubscribe = () => {
|
|
@@ -5083,9 +5157,9 @@ const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
|
5083
5157
|
|
|
5084
5158
|
const {isFunction: fetch_isFunction} = utils;
|
|
5085
5159
|
|
|
5086
|
-
const globalFetchAPI = (({
|
|
5087
|
-
|
|
5088
|
-
|
|
5160
|
+
const globalFetchAPI = (({Request, Response}) => ({
|
|
5161
|
+
Request, Response
|
|
5162
|
+
}))(utils.global);
|
|
5089
5163
|
|
|
5090
5164
|
const {
|
|
5091
5165
|
ReadableStream: fetch_ReadableStream, TextEncoder
|
|
@@ -5101,8 +5175,12 @@ const test = (fn, ...args) => {
|
|
|
5101
5175
|
}
|
|
5102
5176
|
|
|
5103
5177
|
const factory = (env) => {
|
|
5104
|
-
|
|
5105
|
-
|
|
5178
|
+
env = utils.merge.call({
|
|
5179
|
+
skipUndefined: true
|
|
5180
|
+
}, globalFetchAPI, env);
|
|
5181
|
+
|
|
5182
|
+
const {fetch: envFetch, Request, Response} = env;
|
|
5183
|
+
const isFetchSupported = envFetch ? fetch_isFunction(envFetch) : typeof fetch === 'function';
|
|
5106
5184
|
const isRequestSupported = fetch_isFunction(Request);
|
|
5107
5185
|
const isResponseSupported = fetch_isFunction(Response);
|
|
5108
5186
|
|
|
@@ -5205,6 +5283,8 @@ const factory = (env) => {
|
|
|
5205
5283
|
fetchOptions
|
|
5206
5284
|
} = resolveConfig(config);
|
|
5207
5285
|
|
|
5286
|
+
let _fetch = envFetch || fetch;
|
|
5287
|
+
|
|
5208
5288
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
5209
5289
|
|
|
5210
5290
|
let composedSignal = helpers_composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
@@ -5264,7 +5344,7 @@ const factory = (env) => {
|
|
|
5264
5344
|
|
|
5265
5345
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
5266
5346
|
|
|
5267
|
-
let response = await (isRequestSupported ?
|
|
5347
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
|
5268
5348
|
|
|
5269
5349
|
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
5270
5350
|
|
|
@@ -5312,14 +5392,14 @@ const factory = (env) => {
|
|
|
5312
5392
|
|
|
5313
5393
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
5314
5394
|
throw Object.assign(
|
|
5315
|
-
new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request),
|
|
5395
|
+
new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request, err && err.response),
|
|
5316
5396
|
{
|
|
5317
5397
|
cause: err.cause || err
|
|
5318
5398
|
}
|
|
5319
5399
|
)
|
|
5320
5400
|
}
|
|
5321
5401
|
|
|
5322
|
-
throw core_AxiosError.from(err, err && err.code, config, request);
|
|
5402
|
+
throw core_AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
5323
5403
|
}
|
|
5324
5404
|
}
|
|
5325
5405
|
}
|
|
@@ -5327,12 +5407,8 @@ const factory = (env) => {
|
|
|
5327
5407
|
const seedCache = new Map();
|
|
5328
5408
|
|
|
5329
5409
|
const getFetch = (config) => {
|
|
5330
|
-
let env =
|
|
5331
|
-
skipUndefined: true
|
|
5332
|
-
}, globalFetchAPI, config ? config.env : null);
|
|
5333
|
-
|
|
5410
|
+
let env = (config && config.env) || {};
|
|
5334
5411
|
const {fetch, Request, Response} = env;
|
|
5335
|
-
|
|
5336
5412
|
const seeds = [
|
|
5337
5413
|
Request, Response, fetch
|
|
5338
5414
|
];
|
|
@@ -5354,7 +5430,7 @@ const getFetch = (config) => {
|
|
|
5354
5430
|
|
|
5355
5431
|
const adapter = getFetch();
|
|
5356
5432
|
|
|
5357
|
-
/* harmony default export */ const
|
|
5433
|
+
/* harmony default export */ const adapters_fetch = ((/* unused pure expression or super */ null && (adapter)));
|
|
5358
5434
|
|
|
5359
5435
|
;// ../../../node_modules/axios/lib/adapters/adapters.js
|
|
5360
5436
|
|
|
@@ -5363,79 +5439,124 @@ const adapter = getFetch();
|
|
|
5363
5439
|
|
|
5364
5440
|
|
|
5365
5441
|
|
|
5442
|
+
/**
|
|
5443
|
+
* Known adapters mapping.
|
|
5444
|
+
* Provides environment-specific adapters for Axios:
|
|
5445
|
+
* - `http` for Node.js
|
|
5446
|
+
* - `xhr` for browsers
|
|
5447
|
+
* - `fetch` for fetch API-based requests
|
|
5448
|
+
*
|
|
5449
|
+
* @type {Object<string, Function|Object>}
|
|
5450
|
+
*/
|
|
5366
5451
|
const knownAdapters = {
|
|
5367
5452
|
http: helpers_null,
|
|
5368
5453
|
xhr: xhr,
|
|
5369
5454
|
fetch: {
|
|
5370
5455
|
get: getFetch,
|
|
5371
5456
|
}
|
|
5372
|
-
}
|
|
5457
|
+
};
|
|
5373
5458
|
|
|
5459
|
+
// Assign adapter names for easier debugging and identification
|
|
5374
5460
|
utils.forEach(knownAdapters, (fn, value) => {
|
|
5375
5461
|
if (fn) {
|
|
5376
5462
|
try {
|
|
5377
|
-
Object.defineProperty(fn, 'name', {value});
|
|
5463
|
+
Object.defineProperty(fn, 'name', { value });
|
|
5378
5464
|
} catch (e) {
|
|
5379
5465
|
// eslint-disable-next-line no-empty
|
|
5380
5466
|
}
|
|
5381
|
-
Object.defineProperty(fn, 'adapterName', {value});
|
|
5467
|
+
Object.defineProperty(fn, 'adapterName', { value });
|
|
5382
5468
|
}
|
|
5383
5469
|
});
|
|
5384
5470
|
|
|
5471
|
+
/**
|
|
5472
|
+
* Render a rejection reason string for unknown or unsupported adapters
|
|
5473
|
+
*
|
|
5474
|
+
* @param {string} reason
|
|
5475
|
+
* @returns {string}
|
|
5476
|
+
*/
|
|
5385
5477
|
const renderReason = (reason) => `- ${reason}`;
|
|
5386
5478
|
|
|
5479
|
+
/**
|
|
5480
|
+
* Check if the adapter is resolved (function, null, or false)
|
|
5481
|
+
*
|
|
5482
|
+
* @param {Function|null|false} adapter
|
|
5483
|
+
* @returns {boolean}
|
|
5484
|
+
*/
|
|
5387
5485
|
const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
|
|
5388
5486
|
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5487
|
+
/**
|
|
5488
|
+
* Get the first suitable adapter from the provided list.
|
|
5489
|
+
* Tries each adapter in order until a supported one is found.
|
|
5490
|
+
* Throws an AxiosError if no adapter is suitable.
|
|
5491
|
+
*
|
|
5492
|
+
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
5493
|
+
* @param {Object} config - Axios request configuration
|
|
5494
|
+
* @throws {AxiosError} If no suitable adapter is available
|
|
5495
|
+
* @returns {Function} The resolved adapter function
|
|
5496
|
+
*/
|
|
5497
|
+
function getAdapter(adapters, config) {
|
|
5498
|
+
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
|
5392
5499
|
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5500
|
+
const { length } = adapters;
|
|
5501
|
+
let nameOrAdapter;
|
|
5502
|
+
let adapter;
|
|
5396
5503
|
|
|
5397
|
-
|
|
5504
|
+
const rejectedReasons = {};
|
|
5398
5505
|
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5506
|
+
for (let i = 0; i < length; i++) {
|
|
5507
|
+
nameOrAdapter = adapters[i];
|
|
5508
|
+
let id;
|
|
5402
5509
|
|
|
5403
|
-
|
|
5510
|
+
adapter = nameOrAdapter;
|
|
5404
5511
|
|
|
5405
|
-
|
|
5406
|
-
|
|
5512
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
5513
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
5407
5514
|
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
}
|
|
5411
|
-
}
|
|
5412
|
-
|
|
5413
|
-
if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
5414
|
-
break;
|
|
5515
|
+
if (adapter === undefined) {
|
|
5516
|
+
throw new core_AxiosError(`Unknown adapter '${id}'`);
|
|
5415
5517
|
}
|
|
5518
|
+
}
|
|
5416
5519
|
|
|
5417
|
-
|
|
5520
|
+
if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
5521
|
+
break;
|
|
5418
5522
|
}
|
|
5419
5523
|
|
|
5420
|
-
|
|
5524
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
5525
|
+
}
|
|
5421
5526
|
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
)
|
|
5527
|
+
if (!adapter) {
|
|
5528
|
+
const reasons = Object.entries(rejectedReasons)
|
|
5529
|
+
.map(([id, state]) => `adapter ${id} ` +
|
|
5530
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
5531
|
+
);
|
|
5426
5532
|
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5533
|
+
let s = length ?
|
|
5534
|
+
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
|
5535
|
+
'as no adapter specified';
|
|
5430
5536
|
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5537
|
+
throw new core_AxiosError(
|
|
5538
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
5539
|
+
'ERR_NOT_SUPPORT'
|
|
5540
|
+
);
|
|
5541
|
+
}
|
|
5436
5542
|
|
|
5437
|
-
|
|
5438
|
-
|
|
5543
|
+
return adapter;
|
|
5544
|
+
}
|
|
5545
|
+
|
|
5546
|
+
/**
|
|
5547
|
+
* Exports Axios adapters and utility to resolve an adapter
|
|
5548
|
+
*/
|
|
5549
|
+
/* harmony default export */ const adapters = ({
|
|
5550
|
+
/**
|
|
5551
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
5552
|
+
* @type {Function}
|
|
5553
|
+
*/
|
|
5554
|
+
getAdapter,
|
|
5555
|
+
|
|
5556
|
+
/**
|
|
5557
|
+
* Exposes all known adapters
|
|
5558
|
+
* @type {Object<string, Function|Object>}
|
|
5559
|
+
*/
|
|
5439
5560
|
adapters: knownAdapters
|
|
5440
5561
|
});
|
|
5441
5562
|
|
|
@@ -5523,7 +5644,7 @@ function dispatchRequest(config) {
|
|
|
5523
5644
|
}
|
|
5524
5645
|
|
|
5525
5646
|
;// ../../../node_modules/axios/lib/env/data.js
|
|
5526
|
-
const VERSION = "1.
|
|
5647
|
+
const VERSION = "1.13.5";
|
|
5527
5648
|
;// ../../../node_modules/axios/lib/helpers/validator.js
|
|
5528
5649
|
|
|
5529
5650
|
|
|
@@ -5637,6 +5758,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
5637
5758
|
|
|
5638
5759
|
|
|
5639
5760
|
|
|
5761
|
+
|
|
5640
5762
|
const Axios_validators = validator.validators;
|
|
5641
5763
|
|
|
5642
5764
|
/**
|
|
@@ -5708,7 +5830,8 @@ class Axios {
|
|
|
5708
5830
|
validator.assertOptions(transitional, {
|
|
5709
5831
|
silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
|
|
5710
5832
|
forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
|
|
5711
|
-
clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean)
|
|
5833
|
+
clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean),
|
|
5834
|
+
legacyInterceptorReqResOrdering: Axios_validators.transitional(Axios_validators.boolean)
|
|
5712
5835
|
}, false);
|
|
5713
5836
|
}
|
|
5714
5837
|
|
|
@@ -5767,7 +5890,14 @@ class Axios {
|
|
|
5767
5890
|
|
|
5768
5891
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
5769
5892
|
|
|
5770
|
-
|
|
5893
|
+
const transitional = config.transitional || defaults_transitional;
|
|
5894
|
+
const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
|
|
5895
|
+
|
|
5896
|
+
if (legacyInterceptorReqResOrdering) {
|
|
5897
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
5898
|
+
} else {
|
|
5899
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
5900
|
+
}
|
|
5771
5901
|
});
|
|
5772
5902
|
|
|
5773
5903
|
const responseInterceptorChain = [];
|
|
@@ -5798,8 +5928,6 @@ class Axios {
|
|
|
5798
5928
|
|
|
5799
5929
|
let newConfig = config;
|
|
5800
5930
|
|
|
5801
|
-
i = 0;
|
|
5802
|
-
|
|
5803
5931
|
while (i < len) {
|
|
5804
5932
|
const onFulfilled = requestInterceptorChain[i++];
|
|
5805
5933
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -6016,7 +6144,7 @@ class CancelToken {
|
|
|
6016
6144
|
*
|
|
6017
6145
|
* ```js
|
|
6018
6146
|
* function f(x, y, z) {}
|
|
6019
|
-
*
|
|
6147
|
+
* const args = [1, 2, 3];
|
|
6020
6148
|
* f.apply(null, args);
|
|
6021
6149
|
* ```
|
|
6022
6150
|
*
|
|
@@ -6117,6 +6245,12 @@ const HttpStatusCode = {
|
|
|
6117
6245
|
LoopDetected: 508,
|
|
6118
6246
|
NotExtended: 510,
|
|
6119
6247
|
NetworkAuthenticationRequired: 511,
|
|
6248
|
+
WebServerIsDown: 521,
|
|
6249
|
+
ConnectionTimedOut: 522,
|
|
6250
|
+
OriginIsUnreachable: 523,
|
|
6251
|
+
TimeoutOccurred: 524,
|
|
6252
|
+
SslHandshakeFailed: 525,
|
|
6253
|
+
InvalidSslCertificate: 526,
|
|
6120
6254
|
};
|
|
6121
6255
|
|
|
6122
6256
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
@@ -6237,7 +6371,7 @@ const {
|
|
|
6237
6371
|
AxiosHeaders: axios_AxiosHeaders,
|
|
6238
6372
|
HttpStatusCode: axios_HttpStatusCode,
|
|
6239
6373
|
formToJSON,
|
|
6240
|
-
getAdapter,
|
|
6374
|
+
getAdapter: axios_getAdapter,
|
|
6241
6375
|
mergeConfig: axios_mergeConfig
|
|
6242
6376
|
} = lib_axios;
|
|
6243
6377
|
|