@ohif/app 3.12.0 → 3.12.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/{1403.bundle.1c9ce804d1e88033e276.js → 1403.bundle.761239eb886a88301851.js} +33 -35
- package/dist/{1459.bundle.e8802999a4d7f7edf628.js → 1459.bundle.fcdd0dec6286845179bf.js} +5 -6
- package/dist/{147.bundle.37d627289453cb6c3937.js → 147.bundle.47af018b91121924a12c.js} +4 -3
- package/dist/{1608.bundle.0687c661f1c9edfb3b8a.js → 1608.bundle.b9abbf4ed6cc2e491dc3.js} +6 -6
- package/dist/{1730.bundle.66a5e554ab20dab97b11.js → 1730.bundle.51e69967a025226592cd.js} +34 -35
- package/dist/{1927.bundle.3050588e95f43cf57cdd.js → 1927.bundle.be67b3aafe238ca9f191.js} +27 -38
- package/dist/{1933.bundle.682f142e3217d4c7fbf7.js → 1933.bundle.e3ba7d4dcbbd75701d8e.js} +12 -14
- package/dist/{2018.bundle.c06693143228cc034cb9.js → 2018.bundle.45c44470b4b098aa343f.js} +18 -19
- package/dist/{2108.bundle.e84aa8d858d8c4f2413e.js → 2108.bundle.aea8d3b39486dd5ab39e.js} +569 -558
- package/dist/{213.bundle.c2d4d7370c26b0823880.js → 213.bundle.863ab5d320fc06043a4e.js} +3 -5
- package/dist/{3584.bundle.8cc0750425513433e9cc.js → 2199.bundle.974037f21bfd12c4e8af.js} +241 -2219
- package/dist/{2424.bundle.c1e287e752f352b76543.js → 2424.bundle.b070e83baf101dad2121.js} +3 -5
- package/dist/{2516.bundle.1ea0988d309a757bb6da.js → 2516.bundle.f62228e9a800de8d4b31.js} +6 -6
- package/dist/{2701.bundle.12bd01a80a9f8ea4cd94.js → 2701.bundle.58a6a580073edbb4cc04.js} +5 -5
- package/dist/{2842.bundle.860b9f10fcdd9656947a.js → 2816.bundle.838fa4d72921c026083c.js} +827 -2240
- package/dist/{9195.bundle.606ca286a0fed8a43f58.js → 2851.bundle.70227d013c1937e846be.js} +174 -79
- package/dist/{3081.bundle.41838985e0472851eadb.js → 3081.bundle.930757b1a5aa8549e112.js} +109 -145
- package/dist/{3343.bundle.d7578ce8f75d158c0bab.js → 3343.bundle.a4424b8418b8c0c1a9e4.js} +25 -25
- package/dist/{3461.bundle.a8fcefd1c6e389d905fc.js → 3461.bundle.ab31c31a5ddc4baa72f7.js} +19 -23
- package/dist/{4202.bundle.5a0f8e4004c5d8a68548.js → 4202.bundle.4f76d3a50d6cf819fba0.js} +4 -4
- package/dist/{4019.bundle.83a604779f7da0101ced.js → 4287.bundle.87e14e648f2bce5e4176.js} +177 -202
- package/dist/{4775.bundle.70bc407db26afaa4331a.js → 4775.bundle.768f00df706f506f3789.js} +33 -35
- package/dist/{4819.bundle.47e7aa44747ddab3a39a.js → 4819.bundle.6377aba4cf194120e7d4.js} +27 -28
- package/dist/{5028.bundle.274945a9ae69c6b6ad51.js → 5028.bundle.3a086ff61ec8dc1da4b1.js} +7 -9
- package/dist/{5261.bundle.6e1a017f8f1027557f5b.js → 5261.bundle.2655560097e9250eac44.js} +412 -345
- package/dist/{5457.bundle.f7de73bcfe1012a73b9f.js → 5457.bundle.0063531ed24c06fba48b.js} +16 -23
- package/dist/{5462.bundle.21beddaca145b7465c72.js → 5462.bundle.d5bb9b3ddc510fea141f.js} +1106 -1030
- package/dist/{5485.bundle.4e0ec03c61ec5cadd9bb.js → 5485.bundle.b523d7015979fc641f7e.js} +14 -29
- package/dist/{5491.bundle.2e01dd7ad29e4cc01bc1.js → 5491.bundle.4866d2ecb20dd089e071.js} +54 -51
- package/dist/5724.bundle.62ea5c07c7809ab4cd74.js +297 -0
- package/dist/5724.css +2 -0
- package/dist/{5802.bundle.3bf5e6b3ab330a594a47.js → 5802.bundle.ae4d88742c353de462c2.js} +7 -6
- package/dist/{5830.bundle.b073c265c4fcea1afff3.js → 5830.bundle.791019deddd536980a11.js} +3 -3
- package/dist/{5858.bundle.ff6b340cf7457db76a1a.js → 5858.bundle.466e58128de344ab53f3.js} +90 -86
- package/dist/{6027.bundle.2b12862684b0cb3af4b4.js → 6027.bundle.3cf6c827b4ce9066b426.js} +3 -5
- package/dist/{6163.bundle.ca93a4e6501880901f94.js → 6163.bundle.ac77880c970e788c9a07.js} +29 -31
- package/dist/{997.bundle.822b33e561263084e18c.js → 6280.bundle.f22f9955eb906e1d7da8.js} +1535 -931
- package/dist/{6347.bundle.784c48912700f281de1d.js → 6347.bundle.f8393c20d5159ed41b64.js} +36 -36
- package/dist/{6354.bundle.c387737dc09c9cab4ff2.js → 6354.bundle.d8a592b03e9a5b7a66c2.js} +102 -96
- package/dist/{6376.bundle.272e755bdcbb5615a44e.js → 6376.bundle.527820a5cb1eece2a8d2.js} +6 -6
- package/dist/{6409.bundle.b36048896cb11c8571fb.js → 6409.bundle.24edbaa283b7c521b8f7.js} +73 -73
- package/dist/6939.bundle.41fbdef87597b5172ec6.js +3 -3
- package/dist/7159.bundle.a5991a5d4f0dd8f1c95f.js +3 -3
- package/dist/{7190.bundle.d731ae6cf6e933a2c408.js → 7190.bundle.479332d662ffe08d1f92.js} +1462 -955
- package/dist/{732.bundle.6978ac30a1e36abf06db.js → 732.bundle.ea6f9d8504e37e01a208.js} +5 -13
- package/dist/{7431.bundle.b01791d10e6cf9f503b0.js → 7431.bundle.b31ebb4a2625e89d864e.js} +28 -28
- package/dist/{7639.bundle.32152cacb059089ed7d7.js → 7639.bundle.0147cdd1c23858221b62.js} +3 -5
- package/dist/7758.bundle.c8d106364298e7d288f0.js +3 -3
- package/dist/{8094.bundle.5c44190a325ac23e3e5c.js → 8094.bundle.148a66619607e37cbf19.js} +3 -4
- package/dist/{8305.bundle.2ede68ba3c075928c9f4.js → 8305.bundle.565339762503b9ae4f59.js} +10 -12
- package/dist/{85.bundle.05591d5a14d74a502dfe.js → 85.bundle.b2365b2e4c3c6935f453.js} +3 -5
- package/dist/{8558.bundle.3e84c4ba2c7ec6fce52c.js → 8558.bundle.9af6d13a22ddb44ea766.js} +28 -30
- package/dist/{8583.bundle.2908eee785e7e4595d14.js → 8583.bundle.f51188077125da303398.js} +14 -16
- package/dist/{4410.bundle.c5224cd7d6238a7d4660.js → 8665.bundle.dc56c125411422f9f686.js} +3459 -1386
- package/dist/{7412.bundle.fab1742191b7fe937330.js → 9205.bundle.2a2f38a4ee23647f5fa4.js} +3162 -1074
- package/dist/{9845.bundle.255e7c7f7a88193b4e47.js → 9845.bundle.31f3e7e2d28fa6033ee5.js} +6 -6
- package/dist/{9862.bundle.3a8958a82c572015d25d.js → 9862.bundle.73ea2a7703bf1bb96275.js} +6 -4
- package/dist/{9927.bundle.e798a347dfe1f241578f.js → 9927.bundle.af31e6ce5cac195607fd.js} +3 -5
- package/dist/app-config.js +12 -0
- package/dist/{app.bundle.26b7eafdf05b5445414b.js → app.bundle.b2817894afde20b59bdb.js} +91406 -90538
- package/dist/app.bundle.css +1 -1
- package/dist/{polySeg.bundle.a5aa9130b4191253c410.js → compute.bundle.73440405025831e0e072.js} +8 -20
- package/dist/{histogram-worker.bundle.d4e40a8018d2698b072e.js → histogram-worker.bundle.5b679ce4142c803c80a4.js} +11 -23
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.1938b79f9d6db363528a.js → interpolation.bundle.7554483d97f6119414f9.js} +14 -26
- package/dist/{compute.bundle.64280c7af19ff567465f.js → polySeg.bundle.6373e24bd578ae0d41eb.js} +10 -22
- package/dist/sw.js +1 -1
- package/package.json +20 -20
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[7190],{
|
|
2
2
|
|
|
3
|
-
/***/ 54028
|
|
4
|
-
|
|
3
|
+
/***/ 54028
|
|
4
|
+
(__unused_webpack_module, exports) {
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
@@ -156,10 +156,10 @@ function fromByteArray (uint8) {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
|
|
159
|
-
/***/ }
|
|
159
|
+
/***/ },
|
|
160
160
|
|
|
161
|
-
/***/ 81429
|
|
162
|
-
|
|
161
|
+
/***/ 81429
|
|
162
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
163
163
|
|
|
164
164
|
"use strict";
|
|
165
165
|
var __webpack_unused_export__;
|
|
@@ -1982,10 +1982,10 @@ var hexSliceLookupTable = (function () {
|
|
|
1982
1982
|
})()
|
|
1983
1983
|
|
|
1984
1984
|
|
|
1985
|
-
/***/ }
|
|
1985
|
+
/***/ },
|
|
1986
1986
|
|
|
1987
|
-
/***/ 55801
|
|
1988
|
-
|
|
1987
|
+
/***/ 55801
|
|
1988
|
+
(__unused_webpack_module, exports) {
|
|
1989
1989
|
|
|
1990
1990
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1991
1991
|
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
|
@@ -2074,10 +2074,10 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
2074
2074
|
}
|
|
2075
2075
|
|
|
2076
2076
|
|
|
2077
|
-
/***/ }
|
|
2077
|
+
/***/ },
|
|
2078
2078
|
|
|
2079
|
-
/***/ 17739
|
|
2080
|
-
|
|
2079
|
+
/***/ 17739
|
|
2080
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
2081
2081
|
|
|
2082
2082
|
"use strict";
|
|
2083
2083
|
|
|
@@ -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
|
|
@@ -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
|
/**
|
|
@@ -2170,7 +2183,6 @@ function isBuffer(val) {
|
|
|
2170
2183
|
*/
|
|
2171
2184
|
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
2172
2185
|
|
|
2173
|
-
|
|
2174
2186
|
/**
|
|
2175
2187
|
* Determine if a value is a view on an ArrayBuffer
|
|
2176
2188
|
*
|
|
@@ -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
|
}
|
|
@@ -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
|
|
@@ -2244,8 +2256,14 @@ const isPlainObject = (val) => {
|
|
|
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)
|
|
@@ -2266,7 +2284,7 @@ const isEmptyObject = (val) => {
|
|
|
2266
2284
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
2267
2285
|
return false;
|
|
2268
2286
|
}
|
|
2269
|
-
}
|
|
2287
|
+
};
|
|
2270
2288
|
|
|
2271
2289
|
/**
|
|
2272
2290
|
* Determine if a value is a Date
|
|
@@ -2286,6 +2304,31 @@ const isDate = kindOfTest('Date');
|
|
|
2286
2304
|
*/
|
|
2287
2305
|
const isFile = kindOfTest('File');
|
|
2288
2306
|
|
|
2307
|
+
/**
|
|
2308
|
+
* Determine if a value is a React Native Blob
|
|
2309
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
2310
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
2311
|
+
*
|
|
2312
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
2313
|
+
*
|
|
2314
|
+
* @param {*} value The value to test
|
|
2315
|
+
*
|
|
2316
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
2317
|
+
*/
|
|
2318
|
+
const isReactNativeBlob = (value) => {
|
|
2319
|
+
return !!(value && typeof value.uri !== 'undefined');
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
/**
|
|
2323
|
+
* Determine if environment is React Native
|
|
2324
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
2325
|
+
*
|
|
2326
|
+
* @param {*} formData The formData to test
|
|
2327
|
+
*
|
|
2328
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
2329
|
+
*/
|
|
2330
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
2331
|
+
|
|
2289
2332
|
/**
|
|
2290
2333
|
* Determine if a value is a Blob
|
|
2291
2334
|
*
|
|
@@ -2320,19 +2363,30 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
|
2320
2363
|
*
|
|
2321
2364
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
2322
2365
|
*/
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
// detect form-data instance
|
|
2330
|
-
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
2331
|
-
)
|
|
2332
|
-
)
|
|
2333
|
-
)
|
|
2366
|
+
function getGlobal() {
|
|
2367
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
2368
|
+
if (typeof self !== 'undefined') return self;
|
|
2369
|
+
if (typeof window !== 'undefined') return window;
|
|
2370
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
2371
|
+
return {};
|
|
2334
2372
|
}
|
|
2335
2373
|
|
|
2374
|
+
const G = getGlobal();
|
|
2375
|
+
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
2376
|
+
|
|
2377
|
+
const isFormData = (thing) => {
|
|
2378
|
+
if (!thing) return false;
|
|
2379
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
2380
|
+
// Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData (GHSA-6chq-wfr3-2hj9).
|
|
2381
|
+
const proto = getPrototypeOf(thing);
|
|
2382
|
+
if (!proto || proto === Object.prototype) return false;
|
|
2383
|
+
if (!isFunction(thing.append)) return false;
|
|
2384
|
+
const kind = kindOf(thing);
|
|
2385
|
+
return kind === 'formdata' ||
|
|
2386
|
+
// detect form-data instance
|
|
2387
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]');
|
|
2388
|
+
};
|
|
2389
|
+
|
|
2336
2390
|
/**
|
|
2337
2391
|
* Determine if a value is a URLSearchParams object
|
|
2338
2392
|
*
|
|
@@ -2342,7 +2396,12 @@ const isFormData = (thing) => {
|
|
|
2342
2396
|
*/
|
|
2343
2397
|
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
2344
2398
|
|
|
2345
|
-
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
2399
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
2400
|
+
'ReadableStream',
|
|
2401
|
+
'Request',
|
|
2402
|
+
'Response',
|
|
2403
|
+
'Headers',
|
|
2404
|
+
].map(kindOfTest);
|
|
2346
2405
|
|
|
2347
2406
|
/**
|
|
2348
2407
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -2351,9 +2410,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
|
|
|
2351
2410
|
*
|
|
2352
2411
|
* @returns {String} The String freed of excess whitespace
|
|
2353
2412
|
*/
|
|
2354
|
-
const trim = (str) =>
|
|
2355
|
-
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
2356
|
-
|
|
2413
|
+
const trim = (str) => {
|
|
2414
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
2415
|
+
};
|
|
2357
2416
|
/**
|
|
2358
2417
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
2359
2418
|
*
|
|
@@ -2363,13 +2422,14 @@ const trim = (str) => str.trim ?
|
|
|
2363
2422
|
* If 'obj' is an Object callback will be called passing
|
|
2364
2423
|
* the value, key, and complete object for each property.
|
|
2365
2424
|
*
|
|
2366
|
-
* @param {Object|Array} obj The object to iterate
|
|
2425
|
+
* @param {Object|Array<unknown>} obj The object to iterate
|
|
2367
2426
|
* @param {Function} fn The callback to invoke for each item
|
|
2368
2427
|
*
|
|
2369
|
-
* @param {
|
|
2428
|
+
* @param {Object} [options]
|
|
2429
|
+
* @param {Boolean} [options.allOwnKeys = false]
|
|
2370
2430
|
* @returns {any}
|
|
2371
2431
|
*/
|
|
2372
|
-
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
2432
|
+
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
2373
2433
|
// Don't bother if no value provided
|
|
2374
2434
|
if (obj === null || typeof obj === 'undefined') {
|
|
2375
2435
|
return;
|
|
@@ -2407,8 +2467,16 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
2407
2467
|
}
|
|
2408
2468
|
}
|
|
2409
2469
|
|
|
2470
|
+
/**
|
|
2471
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
2472
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
2473
|
+
*
|
|
2474
|
+
* @param {Object} obj - The object to search.
|
|
2475
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
2476
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
2477
|
+
*/
|
|
2410
2478
|
function findKey(obj, key) {
|
|
2411
|
-
if (isBuffer(obj)){
|
|
2479
|
+
if (isBuffer(obj)) {
|
|
2412
2480
|
return null;
|
|
2413
2481
|
}
|
|
2414
2482
|
|
|
@@ -2427,8 +2495,8 @@ function findKey(obj, key) {
|
|
|
2427
2495
|
|
|
2428
2496
|
const _global = (() => {
|
|
2429
2497
|
/*eslint no-undef:0*/
|
|
2430
|
-
if (typeof globalThis !==
|
|
2431
|
-
return typeof self !==
|
|
2498
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
2499
|
+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : globalThis;
|
|
2432
2500
|
})();
|
|
2433
2501
|
|
|
2434
2502
|
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
@@ -2443,7 +2511,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
2443
2511
|
* Example:
|
|
2444
2512
|
*
|
|
2445
2513
|
* ```js
|
|
2446
|
-
*
|
|
2514
|
+
* const result = merge({foo: 123}, {foo: 456});
|
|
2447
2515
|
* console.log(result.foo); // outputs 456
|
|
2448
2516
|
* ```
|
|
2449
2517
|
*
|
|
@@ -2452,22 +2520,25 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
2452
2520
|
* @returns {Object} Result of all merge properties
|
|
2453
2521
|
*/
|
|
2454
2522
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
2455
|
-
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
|
2523
|
+
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
|
|
2456
2524
|
const result = {};
|
|
2457
2525
|
const assignValue = (val, key) => {
|
|
2458
|
-
|
|
2526
|
+
// Skip dangerous property names to prevent prototype pollution
|
|
2527
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
2528
|
+
return;
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
const targetKey = (caseless && findKey(result, key)) || key;
|
|
2459
2532
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
2460
2533
|
result[targetKey] = merge(result[targetKey], val);
|
|
2461
2534
|
} else if (isPlainObject(val)) {
|
|
2462
2535
|
result[targetKey] = merge({}, val);
|
|
2463
2536
|
} else if (isArray(val)) {
|
|
2464
2537
|
result[targetKey] = val.slice();
|
|
2465
|
-
} else {
|
|
2466
|
-
|
|
2467
|
-
result[targetKey] = val;
|
|
2468
|
-
}
|
|
2538
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
|
2539
|
+
result[targetKey] = val;
|
|
2469
2540
|
}
|
|
2470
|
-
}
|
|
2541
|
+
};
|
|
2471
2542
|
|
|
2472
2543
|
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
2473
2544
|
arguments[i] && forEach(arguments[i], assignValue);
|
|
@@ -2482,19 +2553,34 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
2482
2553
|
* @param {Object} b The object to copy properties from
|
|
2483
2554
|
* @param {Object} thisArg The object to bind function to
|
|
2484
2555
|
*
|
|
2485
|
-
* @param {
|
|
2556
|
+
* @param {Object} [options]
|
|
2557
|
+
* @param {Boolean} [options.allOwnKeys]
|
|
2486
2558
|
* @returns {Object} The resulting value of object a
|
|
2487
2559
|
*/
|
|
2488
|
-
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
2489
|
-
forEach(
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2560
|
+
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
2561
|
+
forEach(
|
|
2562
|
+
b,
|
|
2563
|
+
(val, key) => {
|
|
2564
|
+
if (thisArg && isFunction(val)) {
|
|
2565
|
+
Object.defineProperty(a, key, {
|
|
2566
|
+
value: bind(val, thisArg),
|
|
2567
|
+
writable: true,
|
|
2568
|
+
enumerable: true,
|
|
2569
|
+
configurable: true,
|
|
2570
|
+
});
|
|
2571
|
+
} else {
|
|
2572
|
+
Object.defineProperty(a, key, {
|
|
2573
|
+
value: val,
|
|
2574
|
+
writable: true,
|
|
2575
|
+
enumerable: true,
|
|
2576
|
+
configurable: true,
|
|
2577
|
+
});
|
|
2578
|
+
}
|
|
2579
|
+
},
|
|
2580
|
+
{ allOwnKeys }
|
|
2581
|
+
);
|
|
2496
2582
|
return a;
|
|
2497
|
-
}
|
|
2583
|
+
};
|
|
2498
2584
|
|
|
2499
2585
|
/**
|
|
2500
2586
|
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
|
@@ -2504,11 +2590,11 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
|
2504
2590
|
* @returns {string} content value without BOM
|
|
2505
2591
|
*/
|
|
2506
2592
|
const stripBOM = (content) => {
|
|
2507
|
-
if (content.charCodeAt(0) ===
|
|
2593
|
+
if (content.charCodeAt(0) === 0xfeff) {
|
|
2508
2594
|
content = content.slice(1);
|
|
2509
2595
|
}
|
|
2510
2596
|
return content;
|
|
2511
|
-
}
|
|
2597
|
+
};
|
|
2512
2598
|
|
|
2513
2599
|
/**
|
|
2514
2600
|
* Inherit the prototype methods from one constructor into another
|
|
@@ -2521,12 +2607,17 @@ const stripBOM = (content) => {
|
|
|
2521
2607
|
*/
|
|
2522
2608
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
2523
2609
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
2524
|
-
constructor.prototype
|
|
2610
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
2611
|
+
value: constructor,
|
|
2612
|
+
writable: true,
|
|
2613
|
+
enumerable: false,
|
|
2614
|
+
configurable: true,
|
|
2615
|
+
});
|
|
2525
2616
|
Object.defineProperty(constructor, 'super', {
|
|
2526
|
-
value: superConstructor.prototype
|
|
2617
|
+
value: superConstructor.prototype,
|
|
2527
2618
|
});
|
|
2528
2619
|
props && Object.assign(constructor.prototype, props);
|
|
2529
|
-
}
|
|
2620
|
+
};
|
|
2530
2621
|
|
|
2531
2622
|
/**
|
|
2532
2623
|
* Resolve object with deep prototype chain to a flat object
|
|
@@ -2561,7 +2652,7 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
|
2561
2652
|
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
2562
2653
|
|
|
2563
2654
|
return destObj;
|
|
2564
|
-
}
|
|
2655
|
+
};
|
|
2565
2656
|
|
|
2566
2657
|
/**
|
|
2567
2658
|
* Determines whether a string ends with the characters of a specified string
|
|
@@ -2580,8 +2671,7 @@ const endsWith = (str, searchString, position) => {
|
|
|
2580
2671
|
position -= searchString.length;
|
|
2581
2672
|
const lastIndex = str.indexOf(searchString, position);
|
|
2582
2673
|
return lastIndex !== -1 && lastIndex === position;
|
|
2583
|
-
}
|
|
2584
|
-
|
|
2674
|
+
};
|
|
2585
2675
|
|
|
2586
2676
|
/**
|
|
2587
2677
|
* Returns new array from array like object or null if failed
|
|
@@ -2600,7 +2690,7 @@ const toArray = (thing) => {
|
|
|
2600
2690
|
arr[i] = thing[i];
|
|
2601
2691
|
}
|
|
2602
2692
|
return arr;
|
|
2603
|
-
}
|
|
2693
|
+
};
|
|
2604
2694
|
|
|
2605
2695
|
/**
|
|
2606
2696
|
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
|
|
@@ -2611,9 +2701,9 @@ const toArray = (thing) => {
|
|
|
2611
2701
|
* @returns {Array}
|
|
2612
2702
|
*/
|
|
2613
2703
|
// eslint-disable-next-line func-names
|
|
2614
|
-
const isTypedArray = (TypedArray => {
|
|
2704
|
+
const isTypedArray = ((TypedArray) => {
|
|
2615
2705
|
// eslint-disable-next-line func-names
|
|
2616
|
-
return thing => {
|
|
2706
|
+
return (thing) => {
|
|
2617
2707
|
return TypedArray && thing instanceof TypedArray;
|
|
2618
2708
|
};
|
|
2619
2709
|
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
@@ -2637,7 +2727,7 @@ const forEachEntry = (obj, fn) => {
|
|
|
2637
2727
|
const pair = result.value;
|
|
2638
2728
|
fn.call(obj, pair[0], pair[1]);
|
|
2639
2729
|
}
|
|
2640
|
-
}
|
|
2730
|
+
};
|
|
2641
2731
|
|
|
2642
2732
|
/**
|
|
2643
2733
|
* It takes a regular expression and a string, and returns an array of all the matches
|
|
@@ -2656,21 +2746,23 @@ const matchAll = (regExp, str) => {
|
|
|
2656
2746
|
}
|
|
2657
2747
|
|
|
2658
2748
|
return arr;
|
|
2659
|
-
}
|
|
2749
|
+
};
|
|
2660
2750
|
|
|
2661
2751
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
2662
2752
|
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
2663
2753
|
|
|
2664
|
-
const toCamelCase = str => {
|
|
2665
|
-
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
}
|
|
2669
|
-
);
|
|
2754
|
+
const toCamelCase = (str) => {
|
|
2755
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
2756
|
+
return p1.toUpperCase() + p2;
|
|
2757
|
+
});
|
|
2670
2758
|
};
|
|
2671
2759
|
|
|
2672
2760
|
/* Creating a function that will check if an object has a property. */
|
|
2673
|
-
const utils_hasOwnProperty = (
|
|
2761
|
+
const utils_hasOwnProperty = (
|
|
2762
|
+
({ hasOwnProperty }) =>
|
|
2763
|
+
(obj, prop) =>
|
|
2764
|
+
hasOwnProperty.call(obj, prop)
|
|
2765
|
+
)(Object.prototype);
|
|
2674
2766
|
|
|
2675
2767
|
/**
|
|
2676
2768
|
* Determine if a value is a RegExp object
|
|
@@ -2693,7 +2785,7 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
2693
2785
|
});
|
|
2694
2786
|
|
|
2695
2787
|
Object.defineProperties(obj, reducedDescriptors);
|
|
2696
|
-
}
|
|
2788
|
+
};
|
|
2697
2789
|
|
|
2698
2790
|
/**
|
|
2699
2791
|
* Makes all methods read-only
|
|
@@ -2720,33 +2812,39 @@ const freezeMethods = (obj) => {
|
|
|
2720
2812
|
|
|
2721
2813
|
if (!descriptor.set) {
|
|
2722
2814
|
descriptor.set = () => {
|
|
2723
|
-
throw Error(
|
|
2815
|
+
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
2724
2816
|
};
|
|
2725
2817
|
}
|
|
2726
2818
|
});
|
|
2727
|
-
}
|
|
2819
|
+
};
|
|
2728
2820
|
|
|
2821
|
+
/**
|
|
2822
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
2823
|
+
* Useful for fast membership checks.
|
|
2824
|
+
*
|
|
2825
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
2826
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
2827
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
2828
|
+
*/
|
|
2729
2829
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
2730
2830
|
const obj = {};
|
|
2731
2831
|
|
|
2732
2832
|
const define = (arr) => {
|
|
2733
|
-
arr.forEach(value => {
|
|
2833
|
+
arr.forEach((value) => {
|
|
2734
2834
|
obj[value] = true;
|
|
2735
2835
|
});
|
|
2736
|
-
}
|
|
2836
|
+
};
|
|
2737
2837
|
|
|
2738
2838
|
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
2739
2839
|
|
|
2740
2840
|
return obj;
|
|
2741
|
-
}
|
|
2841
|
+
};
|
|
2742
2842
|
|
|
2743
|
-
const noop = () => {}
|
|
2843
|
+
const noop = () => {};
|
|
2744
2844
|
|
|
2745
2845
|
const toFiniteNumber = (value, defaultValue) => {
|
|
2746
|
-
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
2747
|
-
}
|
|
2748
|
-
|
|
2749
|
-
|
|
2846
|
+
return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
|
|
2847
|
+
};
|
|
2750
2848
|
|
|
2751
2849
|
/**
|
|
2752
2850
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
@@ -2756,14 +2854,24 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
2756
2854
|
* @returns {boolean}
|
|
2757
2855
|
*/
|
|
2758
2856
|
function isSpecCompliantForm(thing) {
|
|
2759
|
-
return !!(
|
|
2857
|
+
return !!(
|
|
2858
|
+
thing &&
|
|
2859
|
+
isFunction(thing.append) &&
|
|
2860
|
+
thing[toStringTag] === 'FormData' &&
|
|
2861
|
+
thing[iterator]
|
|
2862
|
+
);
|
|
2760
2863
|
}
|
|
2761
2864
|
|
|
2865
|
+
/**
|
|
2866
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
2867
|
+
*
|
|
2868
|
+
* @param {Object} obj - The object to convert.
|
|
2869
|
+
* @returns {Object} The JSON-compatible object.
|
|
2870
|
+
*/
|
|
2762
2871
|
const toJSONObject = (obj) => {
|
|
2763
2872
|
const stack = new Array(10);
|
|
2764
2873
|
|
|
2765
2874
|
const visit = (source, i) => {
|
|
2766
|
-
|
|
2767
2875
|
if (isObject(source)) {
|
|
2768
2876
|
if (stack.indexOf(source) >= 0) {
|
|
2769
2877
|
return;
|
|
@@ -2774,7 +2882,7 @@ const toJSONObject = (obj) => {
|
|
|
2774
2882
|
return source;
|
|
2775
2883
|
}
|
|
2776
2884
|
|
|
2777
|
-
if(!('toJSON' in source)) {
|
|
2885
|
+
if (!('toJSON' in source)) {
|
|
2778
2886
|
stack[i] = source;
|
|
2779
2887
|
const target = isArray(source) ? [] : {};
|
|
2780
2888
|
|
|
@@ -2790,50 +2898,82 @@ const toJSONObject = (obj) => {
|
|
|
2790
2898
|
}
|
|
2791
2899
|
|
|
2792
2900
|
return source;
|
|
2793
|
-
}
|
|
2901
|
+
};
|
|
2794
2902
|
|
|
2795
2903
|
return visit(obj, 0);
|
|
2796
|
-
}
|
|
2904
|
+
};
|
|
2797
2905
|
|
|
2906
|
+
/**
|
|
2907
|
+
* Determines if a value is an async function.
|
|
2908
|
+
*
|
|
2909
|
+
* @param {*} thing - The value to test.
|
|
2910
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
2911
|
+
*/
|
|
2798
2912
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
2799
2913
|
|
|
2914
|
+
/**
|
|
2915
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
2916
|
+
*
|
|
2917
|
+
* @param {*} thing - The value to test.
|
|
2918
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
2919
|
+
*/
|
|
2800
2920
|
const isThenable = (thing) =>
|
|
2801
|
-
thing &&
|
|
2921
|
+
thing &&
|
|
2922
|
+
(isObject(thing) || isFunction(thing)) &&
|
|
2923
|
+
isFunction(thing.then) &&
|
|
2924
|
+
isFunction(thing.catch);
|
|
2802
2925
|
|
|
2803
2926
|
// original code
|
|
2804
2927
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
2805
2928
|
|
|
2929
|
+
/**
|
|
2930
|
+
* Provides a cross-platform setImmediate implementation.
|
|
2931
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
2932
|
+
*
|
|
2933
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
2934
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
2935
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
2936
|
+
*/
|
|
2806
2937
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
2807
2938
|
if (setImmediateSupported) {
|
|
2808
2939
|
return setImmediate;
|
|
2809
2940
|
}
|
|
2810
2941
|
|
|
2811
|
-
return postMessageSupported
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2942
|
+
return postMessageSupported
|
|
2943
|
+
? ((token, callbacks) => {
|
|
2944
|
+
_global.addEventListener(
|
|
2945
|
+
'message',
|
|
2946
|
+
({ source, data }) => {
|
|
2947
|
+
if (source === _global && data === token) {
|
|
2948
|
+
callbacks.length && callbacks.shift()();
|
|
2949
|
+
}
|
|
2950
|
+
},
|
|
2951
|
+
false
|
|
2952
|
+
);
|
|
2817
2953
|
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
isFunction(_global.postMessage)
|
|
2826
|
-
);
|
|
2954
|
+
return (cb) => {
|
|
2955
|
+
callbacks.push(cb);
|
|
2956
|
+
_global.postMessage(token, '*');
|
|
2957
|
+
};
|
|
2958
|
+
})(`axios@${Math.random()}`, [])
|
|
2959
|
+
: (cb) => setTimeout(cb);
|
|
2960
|
+
})(typeof setImmediate === 'function', isFunction(_global.postMessage));
|
|
2827
2961
|
|
|
2828
|
-
|
|
2829
|
-
|
|
2962
|
+
/**
|
|
2963
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
2964
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
2965
|
+
*
|
|
2966
|
+
* @type {Function}
|
|
2967
|
+
*/
|
|
2968
|
+
const asap =
|
|
2969
|
+
typeof queueMicrotask !== 'undefined'
|
|
2970
|
+
? queueMicrotask.bind(_global)
|
|
2971
|
+
: (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
|
|
2830
2972
|
|
|
2831
2973
|
// *********************
|
|
2832
2974
|
|
|
2833
|
-
|
|
2834
2975
|
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
2835
2976
|
|
|
2836
|
-
|
|
2837
2977
|
/* harmony default export */ const utils = ({
|
|
2838
2978
|
isArray,
|
|
2839
2979
|
isArrayBuffer,
|
|
@@ -2853,6 +2993,8 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
2853
2993
|
isUndefined,
|
|
2854
2994
|
isDate,
|
|
2855
2995
|
isFile,
|
|
2996
|
+
isReactNativeBlob,
|
|
2997
|
+
isReactNative,
|
|
2856
2998
|
isBlob,
|
|
2857
2999
|
isRegExp,
|
|
2858
3000
|
isFunction,
|
|
@@ -2891,7 +3033,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
2891
3033
|
isThenable,
|
|
2892
3034
|
setImmediate: _setImmediate,
|
|
2893
3035
|
asap,
|
|
2894
|
-
isIterable
|
|
3036
|
+
isIterable,
|
|
2895
3037
|
});
|
|
2896
3038
|
|
|
2897
3039
|
;// ../../../node_modules/axios/lib/core/AxiosError.js
|
|
@@ -2899,39 +3041,57 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
2899
3041
|
|
|
2900
3042
|
|
|
2901
3043
|
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
* @param {Object} [config] The config.
|
|
2908
|
-
* @param {Object} [request] The request.
|
|
2909
|
-
* @param {Object} [response] The response.
|
|
2910
|
-
*
|
|
2911
|
-
* @returns {Error} The created error.
|
|
2912
|
-
*/
|
|
2913
|
-
function AxiosError(message, code, config, request, response) {
|
|
2914
|
-
Error.call(this);
|
|
3044
|
+
class AxiosError extends Error {
|
|
3045
|
+
static from(error, code, config, request, response, customProps) {
|
|
3046
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
3047
|
+
axiosError.cause = error;
|
|
3048
|
+
axiosError.name = error.name;
|
|
2915
3049
|
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
3050
|
+
// Preserve status from the original error if not already set from response
|
|
3051
|
+
if (error.status != null && axiosError.status == null) {
|
|
3052
|
+
axiosError.status = error.status;
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3055
|
+
customProps && Object.assign(axiosError, customProps);
|
|
3056
|
+
return axiosError;
|
|
2920
3057
|
}
|
|
2921
3058
|
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
3059
|
+
/**
|
|
3060
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
3061
|
+
*
|
|
3062
|
+
* @param {string} message The error message.
|
|
3063
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
3064
|
+
* @param {Object} [config] The config.
|
|
3065
|
+
* @param {Object} [request] The request.
|
|
3066
|
+
* @param {Object} [response] The response.
|
|
3067
|
+
*
|
|
3068
|
+
* @returns {Error} The created error.
|
|
3069
|
+
*/
|
|
3070
|
+
constructor(message, code, config, request, response) {
|
|
3071
|
+
super(message);
|
|
3072
|
+
|
|
3073
|
+
// Make message enumerable to maintain backward compatibility
|
|
3074
|
+
// The native Error constructor sets message as non-enumerable,
|
|
3075
|
+
// but axios < v1.13.3 had it as enumerable
|
|
3076
|
+
Object.defineProperty(this, 'message', {
|
|
3077
|
+
value: message,
|
|
3078
|
+
enumerable: true,
|
|
3079
|
+
writable: true,
|
|
3080
|
+
configurable: true,
|
|
3081
|
+
});
|
|
3082
|
+
|
|
3083
|
+
this.name = 'AxiosError';
|
|
3084
|
+
this.isAxiosError = true;
|
|
3085
|
+
code && (this.code = code);
|
|
3086
|
+
config && (this.config = config);
|
|
3087
|
+
request && (this.request = request);
|
|
3088
|
+
if (response) {
|
|
3089
|
+
this.response = response;
|
|
3090
|
+
this.status = response.status;
|
|
3091
|
+
}
|
|
2930
3092
|
}
|
|
2931
|
-
}
|
|
2932
3093
|
|
|
2933
|
-
|
|
2934
|
-
toJSON: function toJSON() {
|
|
3094
|
+
toJSON() {
|
|
2935
3095
|
return {
|
|
2936
3096
|
// Standard
|
|
2937
3097
|
message: this.message,
|
|
@@ -2947,62 +3107,25 @@ utils.inherits(AxiosError, Error, {
|
|
|
2947
3107
|
// Axios
|
|
2948
3108
|
config: utils.toJSONObject(this.config),
|
|
2949
3109
|
code: this.code,
|
|
2950
|
-
status: this.status
|
|
3110
|
+
status: this.status,
|
|
2951
3111
|
};
|
|
2952
3112
|
}
|
|
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';
|
|
3001
|
-
|
|
3002
|
-
customProps && Object.assign(axiosError, customProps);
|
|
3113
|
+
}
|
|
3003
3114
|
|
|
3004
|
-
|
|
3005
|
-
|
|
3115
|
+
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
3116
|
+
AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
3117
|
+
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
3118
|
+
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
3119
|
+
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
3120
|
+
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
3121
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
3122
|
+
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
3123
|
+
AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
3124
|
+
AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
3125
|
+
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
3126
|
+
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
3127
|
+
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
3128
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
3006
3129
|
|
|
3007
3130
|
/* harmony default export */ const core_AxiosError = (AxiosError);
|
|
3008
3131
|
|
|
@@ -3052,11 +3175,14 @@ function removeBrackets(key) {
|
|
|
3052
3175
|
*/
|
|
3053
3176
|
function renderKey(path, key, dots) {
|
|
3054
3177
|
if (!path) return key;
|
|
3055
|
-
return path
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3178
|
+
return path
|
|
3179
|
+
.concat(key)
|
|
3180
|
+
.map(function each(token, i) {
|
|
3181
|
+
// eslint-disable-next-line no-param-reassign
|
|
3182
|
+
token = removeBrackets(token);
|
|
3183
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
3184
|
+
})
|
|
3185
|
+
.join(dots ? '.' : '');
|
|
3060
3186
|
}
|
|
3061
3187
|
|
|
3062
3188
|
/**
|
|
@@ -3106,21 +3232,27 @@ function toFormData(obj, formData, options) {
|
|
|
3106
3232
|
formData = formData || new (helpers_null || FormData)();
|
|
3107
3233
|
|
|
3108
3234
|
// eslint-disable-next-line no-param-reassign
|
|
3109
|
-
options = utils.toFlatObject(
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3235
|
+
options = utils.toFlatObject(
|
|
3236
|
+
options,
|
|
3237
|
+
{
|
|
3238
|
+
metaTokens: true,
|
|
3239
|
+
dots: false,
|
|
3240
|
+
indexes: false,
|
|
3241
|
+
},
|
|
3242
|
+
false,
|
|
3243
|
+
function defined(option, source) {
|
|
3244
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
3245
|
+
return !utils.isUndefined(source[option]);
|
|
3246
|
+
}
|
|
3247
|
+
);
|
|
3117
3248
|
|
|
3118
3249
|
const metaTokens = options.metaTokens;
|
|
3119
3250
|
// eslint-disable-next-line no-use-before-define
|
|
3120
3251
|
const visitor = options.visitor || defaultVisitor;
|
|
3121
3252
|
const dots = options.dots;
|
|
3122
3253
|
const indexes = options.indexes;
|
|
3123
|
-
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
3254
|
+
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
3255
|
+
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
3124
3256
|
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
3125
3257
|
|
|
3126
3258
|
if (!utils.isFunction(visitor)) {
|
|
@@ -3162,6 +3294,11 @@ function toFormData(obj, formData, options) {
|
|
|
3162
3294
|
function defaultVisitor(value, key, path) {
|
|
3163
3295
|
let arr = value;
|
|
3164
3296
|
|
|
3297
|
+
if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {
|
|
3298
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
3299
|
+
return false;
|
|
3300
|
+
}
|
|
3301
|
+
|
|
3165
3302
|
if (value && !path && typeof value === 'object') {
|
|
3166
3303
|
if (utils.endsWith(key, '{}')) {
|
|
3167
3304
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -3170,17 +3307,22 @@ function toFormData(obj, formData, options) {
|
|
|
3170
3307
|
value = JSON.stringify(value);
|
|
3171
3308
|
} else if (
|
|
3172
3309
|
(utils.isArray(value) && isFlatArray(value)) ||
|
|
3173
|
-
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
|
3174
|
-
|
|
3310
|
+
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))
|
|
3311
|
+
) {
|
|
3175
3312
|
// eslint-disable-next-line no-param-reassign
|
|
3176
3313
|
key = removeBrackets(key);
|
|
3177
3314
|
|
|
3178
3315
|
arr.forEach(function each(el, index) {
|
|
3179
|
-
!(utils.isUndefined(el) || el === null) &&
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3316
|
+
!(utils.isUndefined(el) || el === null) &&
|
|
3317
|
+
formData.append(
|
|
3318
|
+
// eslint-disable-next-line no-nested-ternary
|
|
3319
|
+
indexes === true
|
|
3320
|
+
? renderKey([key], index, dots)
|
|
3321
|
+
: indexes === null
|
|
3322
|
+
? key
|
|
3323
|
+
: key + '[]',
|
|
3324
|
+
convertValue(el)
|
|
3325
|
+
);
|
|
3184
3326
|
});
|
|
3185
3327
|
return false;
|
|
3186
3328
|
}
|
|
@@ -3200,12 +3342,19 @@ function toFormData(obj, formData, options) {
|
|
|
3200
3342
|
const exposedHelpers = Object.assign(predicates, {
|
|
3201
3343
|
defaultVisitor,
|
|
3202
3344
|
convertValue,
|
|
3203
|
-
isVisitable
|
|
3345
|
+
isVisitable,
|
|
3204
3346
|
});
|
|
3205
3347
|
|
|
3206
|
-
function build(value, path) {
|
|
3348
|
+
function build(value, path, depth = 0) {
|
|
3207
3349
|
if (utils.isUndefined(value)) return;
|
|
3208
3350
|
|
|
3351
|
+
if (depth > maxDepth) {
|
|
3352
|
+
throw new core_AxiosError(
|
|
3353
|
+
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
3354
|
+
core_AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
3355
|
+
);
|
|
3356
|
+
}
|
|
3357
|
+
|
|
3209
3358
|
if (stack.indexOf(value) !== -1) {
|
|
3210
3359
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
3211
3360
|
}
|
|
@@ -3213,12 +3362,12 @@ function toFormData(obj, formData, options) {
|
|
|
3213
3362
|
stack.push(value);
|
|
3214
3363
|
|
|
3215
3364
|
utils.forEach(value, function each(el, key) {
|
|
3216
|
-
const result =
|
|
3217
|
-
|
|
3218
|
-
|
|
3365
|
+
const result =
|
|
3366
|
+
!(utils.isUndefined(el) || el === null) &&
|
|
3367
|
+
visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
3219
3368
|
|
|
3220
3369
|
if (result === true) {
|
|
3221
|
-
build(el, path ? path.concat(key) : [key]);
|
|
3370
|
+
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
3222
3371
|
}
|
|
3223
3372
|
});
|
|
3224
3373
|
|
|
@@ -3257,9 +3406,8 @@ function encode(str) {
|
|
|
3257
3406
|
')': '%29',
|
|
3258
3407
|
'~': '%7E',
|
|
3259
3408
|
'%20': '+',
|
|
3260
|
-
'%00': '\x00'
|
|
3261
3409
|
};
|
|
3262
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20
|
|
3410
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
3263
3411
|
return charMap[match];
|
|
3264
3412
|
});
|
|
3265
3413
|
}
|
|
@@ -3285,13 +3433,17 @@ AxiosURLSearchParams_prototype.append = function append(name, value) {
|
|
|
3285
3433
|
};
|
|
3286
3434
|
|
|
3287
3435
|
AxiosURLSearchParams_prototype.toString = function toString(encoder) {
|
|
3288
|
-
const _encode = encoder
|
|
3289
|
-
|
|
3290
|
-
|
|
3436
|
+
const _encode = encoder
|
|
3437
|
+
? function (value) {
|
|
3438
|
+
return encoder.call(this, value, encode);
|
|
3439
|
+
}
|
|
3440
|
+
: encode;
|
|
3291
3441
|
|
|
3292
|
-
return this._pairs
|
|
3293
|
-
|
|
3294
|
-
|
|
3442
|
+
return this._pairs
|
|
3443
|
+
.map(function each(pair) {
|
|
3444
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
3445
|
+
}, '')
|
|
3446
|
+
.join('&');
|
|
3295
3447
|
};
|
|
3296
3448
|
|
|
3297
3449
|
/* harmony default export */ const helpers_AxiosURLSearchParams = (AxiosURLSearchParams);
|
|
@@ -3303,19 +3455,19 @@ AxiosURLSearchParams_prototype.toString = function toString(encoder) {
|
|
|
3303
3455
|
|
|
3304
3456
|
|
|
3305
3457
|
/**
|
|
3306
|
-
* It replaces
|
|
3307
|
-
*
|
|
3458
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
3459
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
3308
3460
|
*
|
|
3309
3461
|
* @param {string} val The value to be encoded.
|
|
3310
3462
|
*
|
|
3311
3463
|
* @returns {string} The encoded value.
|
|
3312
3464
|
*/
|
|
3313
3465
|
function buildURL_encode(val) {
|
|
3314
|
-
return encodeURIComponent(val)
|
|
3315
|
-
replace(/%3A/gi, ':')
|
|
3316
|
-
replace(/%24/g, '$')
|
|
3317
|
-
replace(/%2C/gi, ',')
|
|
3318
|
-
replace(/%20/g, '+');
|
|
3466
|
+
return encodeURIComponent(val)
|
|
3467
|
+
.replace(/%3A/gi, ':')
|
|
3468
|
+
.replace(/%24/g, '$')
|
|
3469
|
+
.replace(/%2C/gi, ',')
|
|
3470
|
+
.replace(/%20/g, '+');
|
|
3319
3471
|
}
|
|
3320
3472
|
|
|
3321
3473
|
/**
|
|
@@ -3328,33 +3480,32 @@ function buildURL_encode(val) {
|
|
|
3328
3480
|
* @returns {string} The formatted url
|
|
3329
3481
|
*/
|
|
3330
3482
|
function buildURL(url, params, options) {
|
|
3331
|
-
/*eslint no-param-reassign:0*/
|
|
3332
3483
|
if (!params) {
|
|
3333
3484
|
return url;
|
|
3334
3485
|
}
|
|
3335
|
-
|
|
3336
|
-
const _encode = options && options.encode || buildURL_encode;
|
|
3337
3486
|
|
|
3338
|
-
|
|
3339
|
-
options = {
|
|
3340
|
-
serialize: options
|
|
3341
|
-
};
|
|
3342
|
-
}
|
|
3487
|
+
const _encode = (options && options.encode) || buildURL_encode;
|
|
3343
3488
|
|
|
3344
|
-
const
|
|
3489
|
+
const _options = utils.isFunction(options)
|
|
3490
|
+
? {
|
|
3491
|
+
serialize: options,
|
|
3492
|
+
}
|
|
3493
|
+
: options;
|
|
3494
|
+
|
|
3495
|
+
const serializeFn = _options && _options.serialize;
|
|
3345
3496
|
|
|
3346
3497
|
let serializedParams;
|
|
3347
3498
|
|
|
3348
3499
|
if (serializeFn) {
|
|
3349
|
-
serializedParams = serializeFn(params,
|
|
3500
|
+
serializedParams = serializeFn(params, _options);
|
|
3350
3501
|
} else {
|
|
3351
|
-
serializedParams = utils.isURLSearchParams(params)
|
|
3352
|
-
params.toString()
|
|
3353
|
-
new helpers_AxiosURLSearchParams(params,
|
|
3502
|
+
serializedParams = utils.isURLSearchParams(params)
|
|
3503
|
+
? params.toString()
|
|
3504
|
+
: new helpers_AxiosURLSearchParams(params, _options).toString(_encode);
|
|
3354
3505
|
}
|
|
3355
3506
|
|
|
3356
3507
|
if (serializedParams) {
|
|
3357
|
-
const hashmarkIndex = url.indexOf(
|
|
3508
|
+
const hashmarkIndex = url.indexOf('#');
|
|
3358
3509
|
|
|
3359
3510
|
if (hashmarkIndex !== -1) {
|
|
3360
3511
|
url = url.slice(0, hashmarkIndex);
|
|
@@ -3380,6 +3531,7 @@ class InterceptorManager {
|
|
|
3380
3531
|
*
|
|
3381
3532
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
3382
3533
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
3534
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
3383
3535
|
*
|
|
3384
3536
|
* @return {Number} An ID used to remove interceptor later
|
|
3385
3537
|
*/
|
|
@@ -3388,7 +3540,7 @@ class InterceptorManager {
|
|
|
3388
3540
|
fulfilled,
|
|
3389
3541
|
rejected,
|
|
3390
3542
|
synchronous: options ? options.synchronous : false,
|
|
3391
|
-
runWhen: options ? options.runWhen : null
|
|
3543
|
+
runWhen: options ? options.runWhen : null,
|
|
3392
3544
|
});
|
|
3393
3545
|
return this.handlers.length - 1;
|
|
3394
3546
|
}
|
|
@@ -3398,7 +3550,7 @@ class InterceptorManager {
|
|
|
3398
3550
|
*
|
|
3399
3551
|
* @param {Number} id The ID that was returned by `use`
|
|
3400
3552
|
*
|
|
3401
|
-
* @returns {
|
|
3553
|
+
* @returns {void}
|
|
3402
3554
|
*/
|
|
3403
3555
|
eject(id) {
|
|
3404
3556
|
if (this.handlers[id]) {
|
|
@@ -3444,7 +3596,8 @@ class InterceptorManager {
|
|
|
3444
3596
|
/* harmony default export */ const defaults_transitional = ({
|
|
3445
3597
|
silentJSONParsing: true,
|
|
3446
3598
|
forcedJSONParsing: true,
|
|
3447
|
-
clarifyTimeoutError: false
|
|
3599
|
+
clarifyTimeoutError: false,
|
|
3600
|
+
legacyInterceptorReqResOrdering: true,
|
|
3448
3601
|
});
|
|
3449
3602
|
|
|
3450
3603
|
;// ../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
|
|
@@ -3473,15 +3626,15 @@ class InterceptorManager {
|
|
|
3473
3626
|
classes: {
|
|
3474
3627
|
URLSearchParams: classes_URLSearchParams,
|
|
3475
3628
|
FormData: classes_FormData,
|
|
3476
|
-
Blob: classes_Blob
|
|
3629
|
+
Blob: classes_Blob,
|
|
3477
3630
|
},
|
|
3478
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
3631
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
3479
3632
|
});
|
|
3480
3633
|
|
|
3481
3634
|
;// ../../../node_modules/axios/lib/platform/common/utils.js
|
|
3482
3635
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
3483
3636
|
|
|
3484
|
-
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
3637
|
+
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
3485
3638
|
|
|
3486
3639
|
/**
|
|
3487
3640
|
* Determine if we're running in a standard browser environment
|
|
@@ -3500,7 +3653,8 @@ const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
|
3500
3653
|
*
|
|
3501
3654
|
* @returns {boolean}
|
|
3502
3655
|
*/
|
|
3503
|
-
const hasStandardBrowserEnv =
|
|
3656
|
+
const hasStandardBrowserEnv =
|
|
3657
|
+
hasBrowserEnv &&
|
|
3504
3658
|
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
3505
3659
|
|
|
3506
3660
|
/**
|
|
@@ -3521,7 +3675,7 @@ const hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
3521
3675
|
);
|
|
3522
3676
|
})();
|
|
3523
3677
|
|
|
3524
|
-
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
3678
|
+
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
3525
3679
|
|
|
3526
3680
|
|
|
3527
3681
|
|
|
@@ -3531,7 +3685,7 @@ const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
|
3531
3685
|
|
|
3532
3686
|
/* harmony default export */ const platform = ({
|
|
3533
3687
|
...common_utils_namespaceObject,
|
|
3534
|
-
...browser
|
|
3688
|
+
...browser,
|
|
3535
3689
|
});
|
|
3536
3690
|
|
|
3537
3691
|
;// ../../../node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
@@ -3543,7 +3697,7 @@ const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
|
3543
3697
|
|
|
3544
3698
|
function toURLEncodedForm(data, options) {
|
|
3545
3699
|
return helpers_toFormData(data, new platform.classes.URLSearchParams(), {
|
|
3546
|
-
visitor: function(value, key, path, helpers) {
|
|
3700
|
+
visitor: function (value, key, path, helpers) {
|
|
3547
3701
|
if (platform.isNode && utils.isBuffer(value)) {
|
|
3548
3702
|
this.append(key, value.toString('base64'));
|
|
3549
3703
|
return false;
|
|
@@ -3551,7 +3705,7 @@ function toURLEncodedForm(data, options) {
|
|
|
3551
3705
|
|
|
3552
3706
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
3553
3707
|
},
|
|
3554
|
-
...options
|
|
3708
|
+
...options,
|
|
3555
3709
|
});
|
|
3556
3710
|
}
|
|
3557
3711
|
|
|
@@ -3572,7 +3726,7 @@ function parsePropPath(name) {
|
|
|
3572
3726
|
// foo.x.y.z
|
|
3573
3727
|
// foo-x-y-z
|
|
3574
3728
|
// foo x y z
|
|
3575
|
-
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
3729
|
+
return utils.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
3576
3730
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
3577
3731
|
});
|
|
3578
3732
|
}
|
|
@@ -3616,7 +3770,9 @@ function formDataToJSON(formData) {
|
|
|
3616
3770
|
|
|
3617
3771
|
if (isLast) {
|
|
3618
3772
|
if (utils.hasOwnProp(target, name)) {
|
|
3619
|
-
target[name] =
|
|
3773
|
+
target[name] = utils.isArray(target[name])
|
|
3774
|
+
? target[name].concat(value)
|
|
3775
|
+
: [target[name], value];
|
|
3620
3776
|
} else {
|
|
3621
3777
|
target[name] = value;
|
|
3622
3778
|
}
|
|
@@ -3663,6 +3819,8 @@ function formDataToJSON(formData) {
|
|
|
3663
3819
|
|
|
3664
3820
|
|
|
3665
3821
|
|
|
3822
|
+
const own = (obj, key) => (obj != null && utils.hasOwnProp(obj, key) ? obj[key] : undefined);
|
|
3823
|
+
|
|
3666
3824
|
/**
|
|
3667
3825
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
3668
3826
|
* of the input
|
|
@@ -3689,96 +3847,110 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
3689
3847
|
}
|
|
3690
3848
|
|
|
3691
3849
|
const defaults = {
|
|
3692
|
-
|
|
3693
3850
|
transitional: defaults_transitional,
|
|
3694
3851
|
|
|
3695
3852
|
adapter: ['xhr', 'http', 'fetch'],
|
|
3696
3853
|
|
|
3697
|
-
transformRequest: [
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
3703
|
-
data = new FormData(data);
|
|
3704
|
-
}
|
|
3705
|
-
|
|
3706
|
-
const isFormData = utils.isFormData(data);
|
|
3854
|
+
transformRequest: [
|
|
3855
|
+
function transformRequest(data, headers) {
|
|
3856
|
+
const contentType = headers.getContentType() || '';
|
|
3857
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
3858
|
+
const isObjectPayload = utils.isObject(data);
|
|
3707
3859
|
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3860
|
+
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
3861
|
+
data = new FormData(data);
|
|
3862
|
+
}
|
|
3711
3863
|
|
|
3712
|
-
|
|
3713
|
-
utils.isBuffer(data) ||
|
|
3714
|
-
utils.isStream(data) ||
|
|
3715
|
-
utils.isFile(data) ||
|
|
3716
|
-
utils.isBlob(data) ||
|
|
3717
|
-
utils.isReadableStream(data)
|
|
3718
|
-
) {
|
|
3719
|
-
return data;
|
|
3720
|
-
}
|
|
3721
|
-
if (utils.isArrayBufferView(data)) {
|
|
3722
|
-
return data.buffer;
|
|
3723
|
-
}
|
|
3724
|
-
if (utils.isURLSearchParams(data)) {
|
|
3725
|
-
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
3726
|
-
return data.toString();
|
|
3727
|
-
}
|
|
3864
|
+
const isFormData = utils.isFormData(data);
|
|
3728
3865
|
|
|
3729
|
-
|
|
3866
|
+
if (isFormData) {
|
|
3867
|
+
return hasJSONContentType ? JSON.stringify(helpers_formDataToJSON(data)) : data;
|
|
3868
|
+
}
|
|
3730
3869
|
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3870
|
+
if (
|
|
3871
|
+
utils.isArrayBuffer(data) ||
|
|
3872
|
+
utils.isBuffer(data) ||
|
|
3873
|
+
utils.isStream(data) ||
|
|
3874
|
+
utils.isFile(data) ||
|
|
3875
|
+
utils.isBlob(data) ||
|
|
3876
|
+
utils.isReadableStream(data)
|
|
3877
|
+
) {
|
|
3878
|
+
return data;
|
|
3879
|
+
}
|
|
3880
|
+
if (utils.isArrayBufferView(data)) {
|
|
3881
|
+
return data.buffer;
|
|
3882
|
+
}
|
|
3883
|
+
if (utils.isURLSearchParams(data)) {
|
|
3884
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
3885
|
+
return data.toString();
|
|
3734
3886
|
}
|
|
3735
3887
|
|
|
3736
|
-
|
|
3737
|
-
const _FormData = this.env && this.env.FormData;
|
|
3888
|
+
let isFileList;
|
|
3738
3889
|
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3890
|
+
if (isObjectPayload) {
|
|
3891
|
+
const formSerializer = own(this, 'formSerializer');
|
|
3892
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
3893
|
+
return toURLEncodedForm(data, formSerializer).toString();
|
|
3894
|
+
}
|
|
3895
|
+
|
|
3896
|
+
if (
|
|
3897
|
+
(isFileList = utils.isFileList(data)) ||
|
|
3898
|
+
contentType.indexOf('multipart/form-data') > -1
|
|
3899
|
+
) {
|
|
3900
|
+
const env = own(this, 'env');
|
|
3901
|
+
const _FormData = env && env.FormData;
|
|
3902
|
+
|
|
3903
|
+
return helpers_toFormData(
|
|
3904
|
+
isFileList ? { 'files[]': data } : data,
|
|
3905
|
+
_FormData && new _FormData(),
|
|
3906
|
+
formSerializer
|
|
3907
|
+
);
|
|
3908
|
+
}
|
|
3744
3909
|
}
|
|
3745
|
-
}
|
|
3746
3910
|
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3911
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
3912
|
+
headers.setContentType('application/json', false);
|
|
3913
|
+
return stringifySafely(data);
|
|
3914
|
+
}
|
|
3751
3915
|
|
|
3752
|
-
|
|
3753
|
-
|
|
3916
|
+
return data;
|
|
3917
|
+
},
|
|
3918
|
+
],
|
|
3754
3919
|
|
|
3755
|
-
transformResponse: [
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3920
|
+
transformResponse: [
|
|
3921
|
+
function transformResponse(data) {
|
|
3922
|
+
const transitional = own(this, 'transitional') || defaults.transitional;
|
|
3923
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
3924
|
+
const responseType = own(this, 'responseType');
|
|
3925
|
+
const JSONRequested = responseType === 'json';
|
|
3759
3926
|
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3927
|
+
if (utils.isResponse(data) || utils.isReadableStream(data)) {
|
|
3928
|
+
return data;
|
|
3929
|
+
}
|
|
3763
3930
|
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3931
|
+
if (
|
|
3932
|
+
data &&
|
|
3933
|
+
utils.isString(data) &&
|
|
3934
|
+
((forcedJSONParsing && !responseType) || JSONRequested)
|
|
3935
|
+
) {
|
|
3936
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
3937
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
3767
3938
|
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3939
|
+
try {
|
|
3940
|
+
return JSON.parse(data, own(this, 'parseReviver'));
|
|
3941
|
+
} catch (e) {
|
|
3942
|
+
if (strictJSONParsing) {
|
|
3943
|
+
if (e.name === 'SyntaxError') {
|
|
3944
|
+
throw core_AxiosError.from(e, core_AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));
|
|
3945
|
+
}
|
|
3946
|
+
throw e;
|
|
3774
3947
|
}
|
|
3775
|
-
throw e;
|
|
3776
3948
|
}
|
|
3777
3949
|
}
|
|
3778
|
-
}
|
|
3779
3950
|
|
|
3780
|
-
|
|
3781
|
-
|
|
3951
|
+
return data;
|
|
3952
|
+
},
|
|
3953
|
+
],
|
|
3782
3954
|
|
|
3783
3955
|
/**
|
|
3784
3956
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -3794,7 +3966,7 @@ const defaults = {
|
|
|
3794
3966
|
|
|
3795
3967
|
env: {
|
|
3796
3968
|
FormData: platform.classes.FormData,
|
|
3797
|
-
Blob: platform.classes.Blob
|
|
3969
|
+
Blob: platform.classes.Blob,
|
|
3798
3970
|
},
|
|
3799
3971
|
|
|
3800
3972
|
validateStatus: function validateStatus(status) {
|
|
@@ -3803,10 +3975,10 @@ const defaults = {
|
|
|
3803
3975
|
|
|
3804
3976
|
headers: {
|
|
3805
3977
|
common: {
|
|
3806
|
-
|
|
3807
|
-
'Content-Type': undefined
|
|
3808
|
-
}
|
|
3809
|
-
}
|
|
3978
|
+
Accept: 'application/json, text/plain, */*',
|
|
3979
|
+
'Content-Type': undefined,
|
|
3980
|
+
},
|
|
3981
|
+
},
|
|
3810
3982
|
};
|
|
3811
3983
|
|
|
3812
3984
|
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
@@ -3823,10 +3995,23 @@ utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
|
3823
3995
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
3824
3996
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
3825
3997
|
const ignoreDuplicateOf = utils.toObjectSet([
|
|
3826
|
-
'age',
|
|
3827
|
-
'
|
|
3828
|
-
'
|
|
3829
|
-
'
|
|
3998
|
+
'age',
|
|
3999
|
+
'authorization',
|
|
4000
|
+
'content-length',
|
|
4001
|
+
'content-type',
|
|
4002
|
+
'etag',
|
|
4003
|
+
'expires',
|
|
4004
|
+
'from',
|
|
4005
|
+
'host',
|
|
4006
|
+
'if-modified-since',
|
|
4007
|
+
'if-unmodified-since',
|
|
4008
|
+
'last-modified',
|
|
4009
|
+
'location',
|
|
4010
|
+
'max-forwards',
|
|
4011
|
+
'proxy-authorization',
|
|
4012
|
+
'referer',
|
|
4013
|
+
'retry-after',
|
|
4014
|
+
'user-agent',
|
|
3830
4015
|
]);
|
|
3831
4016
|
|
|
3832
4017
|
/**
|
|
@@ -3843,31 +4028,32 @@ const ignoreDuplicateOf = utils.toObjectSet([
|
|
|
3843
4028
|
*
|
|
3844
4029
|
* @returns {Object} Headers parsed into an object
|
|
3845
4030
|
*/
|
|
3846
|
-
/* harmony default export */ const parseHeaders = (rawHeaders => {
|
|
4031
|
+
/* harmony default export */ const parseHeaders = ((rawHeaders) => {
|
|
3847
4032
|
const parsed = {};
|
|
3848
4033
|
let key;
|
|
3849
4034
|
let val;
|
|
3850
4035
|
let i;
|
|
3851
4036
|
|
|
3852
|
-
rawHeaders &&
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
4037
|
+
rawHeaders &&
|
|
4038
|
+
rawHeaders.split('\n').forEach(function parser(line) {
|
|
4039
|
+
i = line.indexOf(':');
|
|
4040
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
4041
|
+
val = line.substring(i + 1).trim();
|
|
3856
4042
|
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
4043
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
4044
|
+
return;
|
|
4045
|
+
}
|
|
3860
4046
|
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
4047
|
+
if (key === 'set-cookie') {
|
|
4048
|
+
if (parsed[key]) {
|
|
4049
|
+
parsed[key].push(val);
|
|
4050
|
+
} else {
|
|
4051
|
+
parsed[key] = [val];
|
|
4052
|
+
}
|
|
3864
4053
|
} else {
|
|
3865
|
-
parsed[key] = [val
|
|
4054
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
3866
4055
|
}
|
|
3867
|
-
}
|
|
3868
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
3869
|
-
}
|
|
3870
|
-
});
|
|
4056
|
+
});
|
|
3871
4057
|
|
|
3872
4058
|
return parsed;
|
|
3873
4059
|
});
|
|
@@ -3880,16 +4066,49 @@ const ignoreDuplicateOf = utils.toObjectSet([
|
|
|
3880
4066
|
|
|
3881
4067
|
const $internals = Symbol('internals');
|
|
3882
4068
|
|
|
4069
|
+
const INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
4070
|
+
|
|
4071
|
+
function trimSPorHTAB(str) {
|
|
4072
|
+
let start = 0;
|
|
4073
|
+
let end = str.length;
|
|
4074
|
+
|
|
4075
|
+
while (start < end) {
|
|
4076
|
+
const code = str.charCodeAt(start);
|
|
4077
|
+
|
|
4078
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
4079
|
+
break;
|
|
4080
|
+
}
|
|
4081
|
+
|
|
4082
|
+
start += 1;
|
|
4083
|
+
}
|
|
4084
|
+
|
|
4085
|
+
while (end > start) {
|
|
4086
|
+
const code = str.charCodeAt(end - 1);
|
|
4087
|
+
|
|
4088
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
4089
|
+
break;
|
|
4090
|
+
}
|
|
4091
|
+
|
|
4092
|
+
end -= 1;
|
|
4093
|
+
}
|
|
4094
|
+
|
|
4095
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
4096
|
+
}
|
|
4097
|
+
|
|
3883
4098
|
function normalizeHeader(header) {
|
|
3884
4099
|
return header && String(header).trim().toLowerCase();
|
|
3885
4100
|
}
|
|
3886
4101
|
|
|
4102
|
+
function sanitizeHeaderValue(str) {
|
|
4103
|
+
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
|
|
4104
|
+
}
|
|
4105
|
+
|
|
3887
4106
|
function normalizeValue(value) {
|
|
3888
4107
|
if (value === false || value == null) {
|
|
3889
4108
|
return value;
|
|
3890
4109
|
}
|
|
3891
4110
|
|
|
3892
|
-
return utils.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
4111
|
+
return utils.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
3893
4112
|
}
|
|
3894
4113
|
|
|
3895
4114
|
function parseTokens(str) {
|
|
@@ -3927,8 +4146,10 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
|
3927
4146
|
}
|
|
3928
4147
|
|
|
3929
4148
|
function formatHeader(header) {
|
|
3930
|
-
return header
|
|
3931
|
-
.
|
|
4149
|
+
return header
|
|
4150
|
+
.trim()
|
|
4151
|
+
.toLowerCase()
|
|
4152
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
3932
4153
|
return char.toUpperCase() + str;
|
|
3933
4154
|
});
|
|
3934
4155
|
}
|
|
@@ -3936,12 +4157,12 @@ function formatHeader(header) {
|
|
|
3936
4157
|
function buildAccessors(obj, header) {
|
|
3937
4158
|
const accessorName = utils.toCamelCase(' ' + header);
|
|
3938
4159
|
|
|
3939
|
-
['get', 'set', 'has'].forEach(methodName => {
|
|
4160
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
3940
4161
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
3941
|
-
value: function(arg1, arg2, arg3) {
|
|
4162
|
+
value: function (arg1, arg2, arg3) {
|
|
3942
4163
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
3943
4164
|
},
|
|
3944
|
-
configurable: true
|
|
4165
|
+
configurable: true,
|
|
3945
4166
|
});
|
|
3946
4167
|
});
|
|
3947
4168
|
}
|
|
@@ -3963,7 +4184,12 @@ class AxiosHeaders {
|
|
|
3963
4184
|
|
|
3964
4185
|
const key = utils.findKey(self, lHeader);
|
|
3965
4186
|
|
|
3966
|
-
if
|
|
4187
|
+
if (
|
|
4188
|
+
!key ||
|
|
4189
|
+
self[key] === undefined ||
|
|
4190
|
+
_rewrite === true ||
|
|
4191
|
+
(_rewrite === undefined && self[key] !== false)
|
|
4192
|
+
) {
|
|
3967
4193
|
self[key || _header] = normalizeValue(_value);
|
|
3968
4194
|
}
|
|
3969
4195
|
}
|
|
@@ -3972,21 +4198,26 @@ class AxiosHeaders {
|
|
|
3972
4198
|
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
3973
4199
|
|
|
3974
4200
|
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
|
3975
|
-
setHeaders(header, valueOrRewrite)
|
|
3976
|
-
} else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
4201
|
+
setHeaders(header, valueOrRewrite);
|
|
4202
|
+
} else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
3977
4203
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
3978
4204
|
} else if (utils.isObject(header) && utils.isIterable(header)) {
|
|
3979
|
-
let obj = {},
|
|
4205
|
+
let obj = {},
|
|
4206
|
+
dest,
|
|
4207
|
+
key;
|
|
3980
4208
|
for (const entry of header) {
|
|
3981
4209
|
if (!utils.isArray(entry)) {
|
|
3982
4210
|
throw TypeError('Object iterator must return a key-value pair');
|
|
3983
4211
|
}
|
|
3984
4212
|
|
|
3985
|
-
obj[key = entry[0]] = (dest = obj[key])
|
|
3986
|
-
|
|
4213
|
+
obj[(key = entry[0])] = (dest = obj[key])
|
|
4214
|
+
? utils.isArray(dest)
|
|
4215
|
+
? [...dest, entry[1]]
|
|
4216
|
+
: [dest, entry[1]]
|
|
4217
|
+
: entry[1];
|
|
3987
4218
|
}
|
|
3988
4219
|
|
|
3989
|
-
setHeaders(obj, valueOrRewrite)
|
|
4220
|
+
setHeaders(obj, valueOrRewrite);
|
|
3990
4221
|
} else {
|
|
3991
4222
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
3992
4223
|
}
|
|
@@ -4030,7 +4261,11 @@ class AxiosHeaders {
|
|
|
4030
4261
|
if (header) {
|
|
4031
4262
|
const key = utils.findKey(this, header);
|
|
4032
4263
|
|
|
4033
|
-
return !!(
|
|
4264
|
+
return !!(
|
|
4265
|
+
key &&
|
|
4266
|
+
this[key] !== undefined &&
|
|
4267
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
4268
|
+
);
|
|
4034
4269
|
}
|
|
4035
4270
|
|
|
4036
4271
|
return false;
|
|
@@ -4070,7 +4305,7 @@ class AxiosHeaders {
|
|
|
4070
4305
|
|
|
4071
4306
|
while (i--) {
|
|
4072
4307
|
const key = keys[i];
|
|
4073
|
-
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
4308
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
4074
4309
|
delete this[key];
|
|
4075
4310
|
deleted = true;
|
|
4076
4311
|
}
|
|
@@ -4114,7 +4349,9 @@ class AxiosHeaders {
|
|
|
4114
4349
|
const obj = Object.create(null);
|
|
4115
4350
|
|
|
4116
4351
|
utils.forEach(this, (value, header) => {
|
|
4117
|
-
value != null &&
|
|
4352
|
+
value != null &&
|
|
4353
|
+
value !== false &&
|
|
4354
|
+
(obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
4118
4355
|
});
|
|
4119
4356
|
|
|
4120
4357
|
return obj;
|
|
@@ -4125,11 +4362,13 @@ class AxiosHeaders {
|
|
|
4125
4362
|
}
|
|
4126
4363
|
|
|
4127
4364
|
toString() {
|
|
4128
|
-
return Object.entries(this.toJSON())
|
|
4365
|
+
return Object.entries(this.toJSON())
|
|
4366
|
+
.map(([header, value]) => header + ': ' + value)
|
|
4367
|
+
.join('\n');
|
|
4129
4368
|
}
|
|
4130
4369
|
|
|
4131
4370
|
getSetCookie() {
|
|
4132
|
-
return this.get(
|
|
4371
|
+
return this.get('set-cookie') || [];
|
|
4133
4372
|
}
|
|
4134
4373
|
|
|
4135
4374
|
get [Symbol.toStringTag]() {
|
|
@@ -4149,9 +4388,12 @@ class AxiosHeaders {
|
|
|
4149
4388
|
}
|
|
4150
4389
|
|
|
4151
4390
|
static accessor(header) {
|
|
4152
|
-
const internals =
|
|
4153
|
-
|
|
4154
|
-
|
|
4391
|
+
const internals =
|
|
4392
|
+
(this[$internals] =
|
|
4393
|
+
this[$internals] =
|
|
4394
|
+
{
|
|
4395
|
+
accessors: {},
|
|
4396
|
+
});
|
|
4155
4397
|
|
|
4156
4398
|
const accessors = internals.accessors;
|
|
4157
4399
|
const prototype = this.prototype;
|
|
@@ -4171,17 +4413,24 @@ class AxiosHeaders {
|
|
|
4171
4413
|
}
|
|
4172
4414
|
}
|
|
4173
4415
|
|
|
4174
|
-
AxiosHeaders.accessor([
|
|
4416
|
+
AxiosHeaders.accessor([
|
|
4417
|
+
'Content-Type',
|
|
4418
|
+
'Content-Length',
|
|
4419
|
+
'Accept',
|
|
4420
|
+
'Accept-Encoding',
|
|
4421
|
+
'User-Agent',
|
|
4422
|
+
'Authorization',
|
|
4423
|
+
]);
|
|
4175
4424
|
|
|
4176
4425
|
// reserved names hotfix
|
|
4177
|
-
utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
4426
|
+
utils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
4178
4427
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
4179
4428
|
return {
|
|
4180
4429
|
get: () => value,
|
|
4181
4430
|
set(headerValue) {
|
|
4182
4431
|
this[mapped] = headerValue;
|
|
4183
|
-
}
|
|
4184
|
-
}
|
|
4432
|
+
},
|
|
4433
|
+
};
|
|
4185
4434
|
});
|
|
4186
4435
|
|
|
4187
4436
|
utils.freezeMethods(AxiosHeaders);
|
|
@@ -4230,26 +4479,23 @@ function isCancel(value) {
|
|
|
4230
4479
|
|
|
4231
4480
|
|
|
4232
4481
|
|
|
4233
|
-
|
|
4234
|
-
/**
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4482
|
+
class CanceledError extends core_AxiosError {
|
|
4483
|
+
/**
|
|
4484
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
4485
|
+
*
|
|
4486
|
+
* @param {string=} message The message.
|
|
4487
|
+
* @param {Object=} config The config.
|
|
4488
|
+
* @param {Object=} request The request.
|
|
4489
|
+
*
|
|
4490
|
+
* @returns {CanceledError} The created error.
|
|
4491
|
+
*/
|
|
4492
|
+
constructor(message, config, request) {
|
|
4493
|
+
super(message == null ? 'canceled' : message, core_AxiosError.ERR_CANCELED, config, request);
|
|
4494
|
+
this.name = 'CanceledError';
|
|
4495
|
+
this.__CANCEL__ = true;
|
|
4496
|
+
}
|
|
4247
4497
|
}
|
|
4248
4498
|
|
|
4249
|
-
utils.inherits(CanceledError, core_AxiosError, {
|
|
4250
|
-
__CANCEL__: true
|
|
4251
|
-
});
|
|
4252
|
-
|
|
4253
4499
|
/* harmony default export */ const cancel_CanceledError = (CanceledError);
|
|
4254
4500
|
|
|
4255
4501
|
;// ../../../node_modules/axios/lib/core/settle.js
|
|
@@ -4271,14 +4517,18 @@ function settle(resolve, reject, response) {
|
|
|
4271
4517
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
4272
4518
|
resolve(response);
|
|
4273
4519
|
} else {
|
|
4274
|
-
reject(
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4520
|
+
reject(
|
|
4521
|
+
new core_AxiosError(
|
|
4522
|
+
'Request failed with status code ' + response.status,
|
|
4523
|
+
[core_AxiosError.ERR_BAD_REQUEST, core_AxiosError.ERR_BAD_RESPONSE][
|
|
4524
|
+
Math.floor(response.status / 100) - 4
|
|
4525
|
+
],
|
|
4526
|
+
response.config,
|
|
4527
|
+
response.request,
|
|
4528
|
+
response
|
|
4529
|
+
)
|
|
4530
|
+
);
|
|
4531
|
+
}
|
|
4282
4532
|
}
|
|
4283
4533
|
|
|
4284
4534
|
;// ../../../node_modules/axios/lib/helpers/parseProtocol.js
|
|
@@ -4286,7 +4536,7 @@ function settle(resolve, reject, response) {
|
|
|
4286
4536
|
|
|
4287
4537
|
function parseProtocol(url) {
|
|
4288
4538
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
4289
|
-
return match && match[1] || '';
|
|
4539
|
+
return (match && match[1]) || '';
|
|
4290
4540
|
}
|
|
4291
4541
|
|
|
4292
4542
|
;// ../../../node_modules/axios/lib/helpers/speedometer.js
|
|
@@ -4340,7 +4590,7 @@ function speedometer(samplesCount, min) {
|
|
|
4340
4590
|
|
|
4341
4591
|
const passed = startedAt && now - startedAt;
|
|
4342
4592
|
|
|
4343
|
-
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
4593
|
+
return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
|
|
4344
4594
|
};
|
|
4345
4595
|
}
|
|
4346
4596
|
|
|
@@ -4367,23 +4617,23 @@ function throttle(fn, freq) {
|
|
|
4367
4617
|
timer = null;
|
|
4368
4618
|
}
|
|
4369
4619
|
fn(...args);
|
|
4370
|
-
}
|
|
4620
|
+
};
|
|
4371
4621
|
|
|
4372
4622
|
const throttled = (...args) => {
|
|
4373
4623
|
const now = Date.now();
|
|
4374
4624
|
const passed = now - timestamp;
|
|
4375
|
-
if (
|
|
4625
|
+
if (passed >= threshold) {
|
|
4376
4626
|
invoke(args, now);
|
|
4377
4627
|
} else {
|
|
4378
4628
|
lastArgs = args;
|
|
4379
4629
|
if (!timer) {
|
|
4380
4630
|
timer = setTimeout(() => {
|
|
4381
4631
|
timer = null;
|
|
4382
|
-
invoke(lastArgs)
|
|
4632
|
+
invoke(lastArgs);
|
|
4383
4633
|
}, threshold - passed);
|
|
4384
4634
|
}
|
|
4385
4635
|
}
|
|
4386
|
-
}
|
|
4636
|
+
};
|
|
4387
4637
|
|
|
4388
4638
|
const flush = () => lastArgs && invoke(lastArgs);
|
|
4389
4639
|
|
|
@@ -4401,102 +4651,117 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
4401
4651
|
let bytesNotified = 0;
|
|
4402
4652
|
const _speedometer = helpers_speedometer(50, 250);
|
|
4403
4653
|
|
|
4404
|
-
return helpers_throttle(e => {
|
|
4405
|
-
const
|
|
4654
|
+
return helpers_throttle((e) => {
|
|
4655
|
+
const rawLoaded = e.loaded;
|
|
4406
4656
|
const total = e.lengthComputable ? e.total : undefined;
|
|
4407
|
-
const
|
|
4657
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
4658
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
4408
4659
|
const rate = _speedometer(progressBytes);
|
|
4409
|
-
const inRange = loaded <= total;
|
|
4410
4660
|
|
|
4411
|
-
bytesNotified = loaded;
|
|
4661
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
4412
4662
|
|
|
4413
4663
|
const data = {
|
|
4414
4664
|
loaded,
|
|
4415
4665
|
total,
|
|
4416
|
-
progress: total ?
|
|
4666
|
+
progress: total ? loaded / total : undefined,
|
|
4417
4667
|
bytes: progressBytes,
|
|
4418
4668
|
rate: rate ? rate : undefined,
|
|
4419
|
-
estimated: rate && total
|
|
4669
|
+
estimated: rate && total ? (total - loaded) / rate : undefined,
|
|
4420
4670
|
event: e,
|
|
4421
4671
|
lengthComputable: total != null,
|
|
4422
|
-
[isDownloadStream ? 'download' : 'upload']: true
|
|
4672
|
+
[isDownloadStream ? 'download' : 'upload']: true,
|
|
4423
4673
|
};
|
|
4424
4674
|
|
|
4425
4675
|
listener(data);
|
|
4426
4676
|
}, freq);
|
|
4427
|
-
}
|
|
4677
|
+
};
|
|
4428
4678
|
|
|
4429
4679
|
const progressEventDecorator = (total, throttled) => {
|
|
4430
4680
|
const lengthComputable = total != null;
|
|
4431
4681
|
|
|
4432
|
-
return [
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4682
|
+
return [
|
|
4683
|
+
(loaded) =>
|
|
4684
|
+
throttled[0]({
|
|
4685
|
+
lengthComputable,
|
|
4686
|
+
total,
|
|
4687
|
+
loaded,
|
|
4688
|
+
}),
|
|
4689
|
+
throttled[1],
|
|
4690
|
+
];
|
|
4691
|
+
};
|
|
4438
4692
|
|
|
4439
|
-
const asyncDecorator =
|
|
4693
|
+
const asyncDecorator =
|
|
4694
|
+
(fn) =>
|
|
4695
|
+
(...args) =>
|
|
4696
|
+
utils.asap(() => fn(...args));
|
|
4440
4697
|
|
|
4441
4698
|
;// ../../../node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
4442
4699
|
|
|
4443
4700
|
|
|
4444
|
-
/* harmony default export */ const isURLSameOrigin = (platform.hasStandardBrowserEnv
|
|
4445
|
-
|
|
4701
|
+
/* harmony default export */ const isURLSameOrigin = (platform.hasStandardBrowserEnv
|
|
4702
|
+
? ((origin, isMSIE) => (url) => {
|
|
4703
|
+
url = new URL(url, platform.origin);
|
|
4446
4704
|
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
})(
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
)
|
|
4705
|
+
return (
|
|
4706
|
+
origin.protocol === url.protocol &&
|
|
4707
|
+
origin.host === url.host &&
|
|
4708
|
+
(isMSIE || origin.port === url.port)
|
|
4709
|
+
);
|
|
4710
|
+
})(
|
|
4711
|
+
new URL(platform.origin),
|
|
4712
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
4713
|
+
)
|
|
4714
|
+
: () => true);
|
|
4456
4715
|
|
|
4457
4716
|
;// ../../../node_modules/axios/lib/helpers/cookies.js
|
|
4458
4717
|
|
|
4459
4718
|
|
|
4460
4719
|
|
|
4461
|
-
/* harmony default export */ const cookies = (platform.hasStandardBrowserEnv
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
4467
|
-
|
|
4468
|
-
utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
4469
|
-
|
|
4470
|
-
utils.isString(path) && cookie.push('path=' + path);
|
|
4720
|
+
/* harmony default export */ const cookies = (platform.hasStandardBrowserEnv
|
|
4721
|
+
? // Standard browser envs support document.cookie
|
|
4722
|
+
{
|
|
4723
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
4724
|
+
if (typeof document === 'undefined') return;
|
|
4471
4725
|
|
|
4472
|
-
|
|
4726
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
4473
4727
|
|
|
4474
|
-
|
|
4728
|
+
if (utils.isNumber(expires)) {
|
|
4729
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
4730
|
+
}
|
|
4731
|
+
if (utils.isString(path)) {
|
|
4732
|
+
cookie.push(`path=${path}`);
|
|
4733
|
+
}
|
|
4734
|
+
if (utils.isString(domain)) {
|
|
4735
|
+
cookie.push(`domain=${domain}`);
|
|
4736
|
+
}
|
|
4737
|
+
if (secure === true) {
|
|
4738
|
+
cookie.push('secure');
|
|
4739
|
+
}
|
|
4740
|
+
if (utils.isString(sameSite)) {
|
|
4741
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
4742
|
+
}
|
|
4475
4743
|
|
|
4476
|
-
|
|
4477
|
-
|
|
4744
|
+
document.cookie = cookie.join('; ');
|
|
4745
|
+
},
|
|
4478
4746
|
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4747
|
+
read(name) {
|
|
4748
|
+
if (typeof document === 'undefined') return null;
|
|
4749
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
4750
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
4751
|
+
},
|
|
4483
4752
|
|
|
4484
|
-
|
|
4485
|
-
|
|
4753
|
+
remove(name) {
|
|
4754
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
4755
|
+
},
|
|
4486
4756
|
}
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
return null;
|
|
4496
|
-
},
|
|
4497
|
-
remove() {}
|
|
4498
|
-
});
|
|
4499
|
-
|
|
4757
|
+
: // Non-standard browser env (web workers, react-native) lack needed support.
|
|
4758
|
+
{
|
|
4759
|
+
write() {},
|
|
4760
|
+
read() {
|
|
4761
|
+
return null;
|
|
4762
|
+
},
|
|
4763
|
+
remove() {},
|
|
4764
|
+
});
|
|
4500
4765
|
|
|
4501
4766
|
;// ../../../node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
4502
4767
|
|
|
@@ -4512,6 +4777,10 @@ function isAbsoluteURL(url) {
|
|
|
4512
4777
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
4513
4778
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
4514
4779
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
4780
|
+
if (typeof url !== 'string') {
|
|
4781
|
+
return false;
|
|
4782
|
+
}
|
|
4783
|
+
|
|
4515
4784
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
4516
4785
|
}
|
|
4517
4786
|
|
|
@@ -4550,7 +4819,7 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
4550
4819
|
*/
|
|
4551
4820
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
4552
4821
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
4553
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
4822
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
4554
4823
|
return combineURLs(baseURL, requestedURL);
|
|
4555
4824
|
}
|
|
4556
4825
|
return requestedURL;
|
|
@@ -4562,7 +4831,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
|
4562
4831
|
|
|
4563
4832
|
|
|
4564
4833
|
|
|
4565
|
-
const headersToObject = (thing) => thing instanceof core_AxiosHeaders ? { ...thing } : thing;
|
|
4834
|
+
const headersToObject = (thing) => (thing instanceof core_AxiosHeaders ? { ...thing } : thing);
|
|
4566
4835
|
|
|
4567
4836
|
/**
|
|
4568
4837
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -4576,11 +4845,22 @@ const headersToObject = (thing) => thing instanceof core_AxiosHeaders ? { ...thi
|
|
|
4576
4845
|
function mergeConfig(config1, config2) {
|
|
4577
4846
|
// eslint-disable-next-line no-param-reassign
|
|
4578
4847
|
config2 = config2 || {};
|
|
4579
|
-
|
|
4848
|
+
|
|
4849
|
+
// Use a null-prototype object so that downstream reads such as `config.auth`
|
|
4850
|
+
// or `config.baseURL` cannot inherit polluted values from Object.prototype
|
|
4851
|
+
// (see GHSA-q8qp-cvcw-x6jj). `hasOwnProperty` is restored as a non-enumerable
|
|
4852
|
+
// own slot to preserve ergonomics for user code that relies on it.
|
|
4853
|
+
const config = Object.create(null);
|
|
4854
|
+
Object.defineProperty(config, 'hasOwnProperty', {
|
|
4855
|
+
value: Object.prototype.hasOwnProperty,
|
|
4856
|
+
enumerable: false,
|
|
4857
|
+
writable: true,
|
|
4858
|
+
configurable: true,
|
|
4859
|
+
});
|
|
4580
4860
|
|
|
4581
4861
|
function getMergedValue(target, source, prop, caseless) {
|
|
4582
4862
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
4583
|
-
return utils.merge.call({caseless}, target, source);
|
|
4863
|
+
return utils.merge.call({ caseless }, target, source);
|
|
4584
4864
|
} else if (utils.isPlainObject(source)) {
|
|
4585
4865
|
return utils.merge({}, source);
|
|
4586
4866
|
} else if (utils.isArray(source)) {
|
|
@@ -4589,12 +4869,11 @@ function mergeConfig(config1, config2) {
|
|
|
4589
4869
|
return source;
|
|
4590
4870
|
}
|
|
4591
4871
|
|
|
4592
|
-
|
|
4593
|
-
function mergeDeepProperties(a, b, prop , caseless) {
|
|
4872
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
4594
4873
|
if (!utils.isUndefined(b)) {
|
|
4595
|
-
return getMergedValue(a, b, prop
|
|
4874
|
+
return getMergedValue(a, b, prop, caseless);
|
|
4596
4875
|
} else if (!utils.isUndefined(a)) {
|
|
4597
|
-
return getMergedValue(undefined, a, prop
|
|
4876
|
+
return getMergedValue(undefined, a, prop, caseless);
|
|
4598
4877
|
}
|
|
4599
4878
|
}
|
|
4600
4879
|
|
|
@@ -4616,9 +4895,9 @@ function mergeConfig(config1, config2) {
|
|
|
4616
4895
|
|
|
4617
4896
|
// eslint-disable-next-line consistent-return
|
|
4618
4897
|
function mergeDirectKeys(a, b, prop) {
|
|
4619
|
-
if (prop
|
|
4898
|
+
if (utils.hasOwnProp(config2, prop)) {
|
|
4620
4899
|
return getMergedValue(a, b);
|
|
4621
|
-
} else if (prop
|
|
4900
|
+
} else if (utils.hasOwnProp(config1, prop)) {
|
|
4622
4901
|
return getMergedValue(undefined, a);
|
|
4623
4902
|
}
|
|
4624
4903
|
}
|
|
@@ -4650,14 +4929,19 @@ function mergeConfig(config1, config2) {
|
|
|
4650
4929
|
httpsAgent: defaultToConfig2,
|
|
4651
4930
|
cancelToken: defaultToConfig2,
|
|
4652
4931
|
socketPath: defaultToConfig2,
|
|
4932
|
+
allowedSocketPaths: defaultToConfig2,
|
|
4653
4933
|
responseEncoding: defaultToConfig2,
|
|
4654
4934
|
validateStatus: mergeDirectKeys,
|
|
4655
|
-
headers: (a, b
|
|
4935
|
+
headers: (a, b, prop) =>
|
|
4936
|
+
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
4656
4937
|
};
|
|
4657
4938
|
|
|
4658
|
-
utils.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
|
4659
|
-
|
|
4660
|
-
const
|
|
4939
|
+
utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
4940
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
4941
|
+
const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
4942
|
+
const a = utils.hasOwnProp(config1, prop) ? config1[prop] : undefined;
|
|
4943
|
+
const b = utils.hasOwnProp(config2, prop) ? config2[prop] : undefined;
|
|
4944
|
+
const configValue = merge(a, b, prop);
|
|
4661
4945
|
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
4662
4946
|
});
|
|
4663
4947
|
|
|
@@ -4677,16 +4961,38 @@ function mergeConfig(config1, config2) {
|
|
|
4677
4961
|
/* harmony default export */ const resolveConfig = ((config) => {
|
|
4678
4962
|
const newConfig = mergeConfig({}, config);
|
|
4679
4963
|
|
|
4680
|
-
|
|
4964
|
+
// Read only own properties to prevent prototype pollution gadgets
|
|
4965
|
+
// (e.g. Object.prototype.baseURL = 'https://evil.com'). See GHSA-q8qp-cvcw-x6jj.
|
|
4966
|
+
const own = (key) => (utils.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
|
|
4967
|
+
|
|
4968
|
+
const data = own('data');
|
|
4969
|
+
let withXSRFToken = own('withXSRFToken');
|
|
4970
|
+
const xsrfHeaderName = own('xsrfHeaderName');
|
|
4971
|
+
const xsrfCookieName = own('xsrfCookieName');
|
|
4972
|
+
let headers = own('headers');
|
|
4973
|
+
const auth = own('auth');
|
|
4974
|
+
const baseURL = own('baseURL');
|
|
4975
|
+
const allowAbsoluteUrls = own('allowAbsoluteUrls');
|
|
4976
|
+
const url = own('url');
|
|
4681
4977
|
|
|
4682
4978
|
newConfig.headers = headers = core_AxiosHeaders.from(headers);
|
|
4683
4979
|
|
|
4684
|
-
newConfig.url = buildURL(
|
|
4980
|
+
newConfig.url = buildURL(
|
|
4981
|
+
buildFullPath(baseURL, url, allowAbsoluteUrls),
|
|
4982
|
+
config.params,
|
|
4983
|
+
config.paramsSerializer
|
|
4984
|
+
);
|
|
4685
4985
|
|
|
4686
4986
|
// HTTP basic authentication
|
|
4687
4987
|
if (auth) {
|
|
4688
|
-
headers.set(
|
|
4689
|
-
|
|
4988
|
+
headers.set(
|
|
4989
|
+
'Authorization',
|
|
4990
|
+
'Basic ' +
|
|
4991
|
+
btoa(
|
|
4992
|
+
(auth.username || '') +
|
|
4993
|
+
':' +
|
|
4994
|
+
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
4995
|
+
)
|
|
4690
4996
|
);
|
|
4691
4997
|
}
|
|
4692
4998
|
|
|
@@ -4704,17 +5010,25 @@ function mergeConfig(config1, config2) {
|
|
|
4704
5010
|
}
|
|
4705
5011
|
});
|
|
4706
5012
|
}
|
|
4707
|
-
}
|
|
5013
|
+
}
|
|
4708
5014
|
|
|
4709
5015
|
// Add xsrf header
|
|
4710
5016
|
// This is only done if running in a standard browser environment.
|
|
4711
5017
|
// Specifically not if we're in a web worker, or react-native.
|
|
4712
5018
|
|
|
4713
5019
|
if (platform.hasStandardBrowserEnv) {
|
|
4714
|
-
|
|
5020
|
+
if (utils.isFunction(withXSRFToken)) {
|
|
5021
|
+
withXSRFToken = withXSRFToken(newConfig);
|
|
5022
|
+
}
|
|
4715
5023
|
|
|
4716
|
-
|
|
4717
|
-
|
|
5024
|
+
// Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
|
|
5025
|
+
// and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
|
|
5026
|
+
// the XSRF token cross-origin. See GHSA-xx6v-rp6x-q39c.
|
|
5027
|
+
const shouldSendXSRF =
|
|
5028
|
+
withXSRFToken === true ||
|
|
5029
|
+
(withXSRFToken == null && isURLSameOrigin(newConfig.url));
|
|
5030
|
+
|
|
5031
|
+
if (shouldSendXSRF) {
|
|
4718
5032
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
4719
5033
|
|
|
4720
5034
|
if (xsrfValue) {
|
|
@@ -4726,7 +5040,6 @@ function mergeConfig(config1, config2) {
|
|
|
4726
5040
|
return newConfig;
|
|
4727
5041
|
});
|
|
4728
5042
|
|
|
4729
|
-
|
|
4730
5043
|
;// ../../../node_modules/axios/lib/adapters/xhr.js
|
|
4731
5044
|
|
|
4732
5045
|
|
|
@@ -4741,193 +5054,215 @@ function mergeConfig(config1, config2) {
|
|
|
4741
5054
|
|
|
4742
5055
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
4743
5056
|
|
|
4744
|
-
/* harmony default export */ const xhr = (isXHRAdapterSupported &&
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
5057
|
+
/* harmony default export */ const xhr = (isXHRAdapterSupported &&
|
|
5058
|
+
function (config) {
|
|
5059
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
5060
|
+
const _config = resolveConfig(config);
|
|
5061
|
+
let requestData = _config.data;
|
|
5062
|
+
const requestHeaders = core_AxiosHeaders.from(_config.headers).normalize();
|
|
5063
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
5064
|
+
let onCanceled;
|
|
5065
|
+
let uploadThrottled, downloadThrottled;
|
|
5066
|
+
let flushUpload, flushDownload;
|
|
4753
5067
|
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
5068
|
+
function done() {
|
|
5069
|
+
flushUpload && flushUpload(); // flush events
|
|
5070
|
+
flushDownload && flushDownload(); // flush events
|
|
4757
5071
|
|
|
4758
|
-
|
|
5072
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
4759
5073
|
|
|
4760
|
-
|
|
4761
|
-
|
|
5074
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
5075
|
+
}
|
|
4762
5076
|
|
|
4763
|
-
|
|
5077
|
+
let request = new XMLHttpRequest();
|
|
4764
5078
|
|
|
4765
|
-
|
|
5079
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
4766
5080
|
|
|
4767
|
-
|
|
4768
|
-
|
|
5081
|
+
// Set the request timeout in MS
|
|
5082
|
+
request.timeout = _config.timeout;
|
|
4769
5083
|
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
5084
|
+
function onloadend() {
|
|
5085
|
+
if (!request) {
|
|
5086
|
+
return;
|
|
5087
|
+
}
|
|
5088
|
+
// Prepare the response
|
|
5089
|
+
const responseHeaders = core_AxiosHeaders.from(
|
|
5090
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
5091
|
+
);
|
|
5092
|
+
const responseData =
|
|
5093
|
+
!responseType || responseType === 'text' || responseType === 'json'
|
|
5094
|
+
? request.responseText
|
|
5095
|
+
: request.response;
|
|
5096
|
+
const response = {
|
|
5097
|
+
data: responseData,
|
|
5098
|
+
status: request.status,
|
|
5099
|
+
statusText: request.statusText,
|
|
5100
|
+
headers: responseHeaders,
|
|
5101
|
+
config,
|
|
5102
|
+
request,
|
|
5103
|
+
};
|
|
5104
|
+
|
|
5105
|
+
settle(
|
|
5106
|
+
function _resolve(value) {
|
|
5107
|
+
resolve(value);
|
|
5108
|
+
done();
|
|
5109
|
+
},
|
|
5110
|
+
function _reject(err) {
|
|
5111
|
+
reject(err);
|
|
5112
|
+
done();
|
|
5113
|
+
},
|
|
5114
|
+
response
|
|
5115
|
+
);
|
|
5116
|
+
|
|
5117
|
+
// Clean up request
|
|
5118
|
+
request = null;
|
|
4773
5119
|
}
|
|
4774
|
-
// Prepare the response
|
|
4775
|
-
const responseHeaders = core_AxiosHeaders.from(
|
|
4776
|
-
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
4777
|
-
);
|
|
4778
|
-
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
4779
|
-
request.responseText : request.response;
|
|
4780
|
-
const response = {
|
|
4781
|
-
data: responseData,
|
|
4782
|
-
status: request.status,
|
|
4783
|
-
statusText: request.statusText,
|
|
4784
|
-
headers: responseHeaders,
|
|
4785
|
-
config,
|
|
4786
|
-
request
|
|
4787
|
-
};
|
|
4788
5120
|
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
}
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
5121
|
+
if ('onloadend' in request) {
|
|
5122
|
+
// Use onloadend if available
|
|
5123
|
+
request.onloadend = onloadend;
|
|
5124
|
+
} else {
|
|
5125
|
+
// Listen for ready state to emulate onloadend
|
|
5126
|
+
request.onreadystatechange = function handleLoad() {
|
|
5127
|
+
if (!request || request.readyState !== 4) {
|
|
5128
|
+
return;
|
|
5129
|
+
}
|
|
4796
5130
|
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
5131
|
+
// The request errored out and we didn't get a response, this will be
|
|
5132
|
+
// handled by onerror instead
|
|
5133
|
+
// With one exception: request that using file: protocol, most browsers
|
|
5134
|
+
// will return status as 0 even though it's a successful request
|
|
5135
|
+
if (
|
|
5136
|
+
request.status === 0 &&
|
|
5137
|
+
!(request.responseURL && request.responseURL.indexOf('file:') === 0)
|
|
5138
|
+
) {
|
|
5139
|
+
return;
|
|
5140
|
+
}
|
|
5141
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
5142
|
+
// so we should call onloadend on the next 'tick'
|
|
5143
|
+
setTimeout(onloadend);
|
|
5144
|
+
};
|
|
5145
|
+
}
|
|
4800
5146
|
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
} else {
|
|
4805
|
-
// Listen for ready state to emulate onloadend
|
|
4806
|
-
request.onreadystatechange = function handleLoad() {
|
|
4807
|
-
if (!request || request.readyState !== 4) {
|
|
5147
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
5148
|
+
request.onabort = function handleAbort() {
|
|
5149
|
+
if (!request) {
|
|
4808
5150
|
return;
|
|
4809
5151
|
}
|
|
4810
5152
|
|
|
4811
|
-
|
|
4812
|
-
// handled by onerror instead
|
|
4813
|
-
// With one exception: request that using file: protocol, most browsers
|
|
4814
|
-
// will return status as 0 even though it's a successful request
|
|
4815
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
4816
|
-
return;
|
|
4817
|
-
}
|
|
4818
|
-
// readystate handler is calling before onerror or ontimeout handlers,
|
|
4819
|
-
// so we should call onloadend on the next 'tick'
|
|
4820
|
-
setTimeout(onloadend);
|
|
4821
|
-
};
|
|
4822
|
-
}
|
|
5153
|
+
reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, config, request));
|
|
4823
5154
|
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
return;
|
|
4828
|
-
}
|
|
5155
|
+
// Clean up request
|
|
5156
|
+
request = null;
|
|
5157
|
+
};
|
|
4829
5158
|
|
|
4830
|
-
|
|
5159
|
+
// Handle low level network errors
|
|
5160
|
+
request.onerror = function handleError(event) {
|
|
5161
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
5162
|
+
// (message may be empty; when present, surface it)
|
|
5163
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
5164
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
5165
|
+
const err = new core_AxiosError(msg, core_AxiosError.ERR_NETWORK, config, request);
|
|
5166
|
+
// attach the underlying event for consumers who want details
|
|
5167
|
+
err.event = event || null;
|
|
5168
|
+
reject(err);
|
|
5169
|
+
request = null;
|
|
5170
|
+
};
|
|
4831
5171
|
|
|
4832
|
-
//
|
|
4833
|
-
request =
|
|
4834
|
-
|
|
5172
|
+
// Handle timeout
|
|
5173
|
+
request.ontimeout = function handleTimeout() {
|
|
5174
|
+
let timeoutErrorMessage = _config.timeout
|
|
5175
|
+
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
5176
|
+
: 'timeout exceeded';
|
|
5177
|
+
const transitional = _config.transitional || defaults_transitional;
|
|
5178
|
+
if (_config.timeoutErrorMessage) {
|
|
5179
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
5180
|
+
}
|
|
5181
|
+
reject(
|
|
5182
|
+
new core_AxiosError(
|
|
5183
|
+
timeoutErrorMessage,
|
|
5184
|
+
transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED,
|
|
5185
|
+
config,
|
|
5186
|
+
request
|
|
5187
|
+
)
|
|
5188
|
+
);
|
|
4835
5189
|
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
// (message may be empty; when present, surface it)
|
|
4840
|
-
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
4841
|
-
const msg = event && event.message ? event.message : 'Network Error';
|
|
4842
|
-
const err = new core_AxiosError(msg, core_AxiosError.ERR_NETWORK, config, request);
|
|
4843
|
-
// attach the underlying event for consumers who want details
|
|
4844
|
-
err.event = event || null;
|
|
4845
|
-
reject(err);
|
|
4846
|
-
request = null;
|
|
4847
|
-
};
|
|
4848
|
-
|
|
4849
|
-
// Handle timeout
|
|
4850
|
-
request.ontimeout = function handleTimeout() {
|
|
4851
|
-
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
4852
|
-
const transitional = _config.transitional || defaults_transitional;
|
|
4853
|
-
if (_config.timeoutErrorMessage) {
|
|
4854
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
4855
|
-
}
|
|
4856
|
-
reject(new core_AxiosError(
|
|
4857
|
-
timeoutErrorMessage,
|
|
4858
|
-
transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED,
|
|
4859
|
-
config,
|
|
4860
|
-
request));
|
|
4861
|
-
|
|
4862
|
-
// Clean up request
|
|
4863
|
-
request = null;
|
|
4864
|
-
};
|
|
5190
|
+
// Clean up request
|
|
5191
|
+
request = null;
|
|
5192
|
+
};
|
|
4865
5193
|
|
|
4866
|
-
|
|
4867
|
-
|
|
5194
|
+
// Remove Content-Type if data is undefined
|
|
5195
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
4868
5196
|
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
5197
|
+
// Add headers to the request
|
|
5198
|
+
if ('setRequestHeader' in request) {
|
|
5199
|
+
utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
5200
|
+
request.setRequestHeader(key, val);
|
|
5201
|
+
});
|
|
5202
|
+
}
|
|
4875
5203
|
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
5204
|
+
// Add withCredentials to request if needed
|
|
5205
|
+
if (!utils.isUndefined(_config.withCredentials)) {
|
|
5206
|
+
request.withCredentials = !!_config.withCredentials;
|
|
5207
|
+
}
|
|
4880
5208
|
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
5209
|
+
// Add responseType to request if needed
|
|
5210
|
+
if (responseType && responseType !== 'json') {
|
|
5211
|
+
request.responseType = _config.responseType;
|
|
5212
|
+
}
|
|
4885
5213
|
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
5214
|
+
// Handle progress if needed
|
|
5215
|
+
if (onDownloadProgress) {
|
|
5216
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
5217
|
+
request.addEventListener('progress', downloadThrottled);
|
|
5218
|
+
}
|
|
4891
5219
|
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
5220
|
+
// Not all browsers support upload events
|
|
5221
|
+
if (onUploadProgress && request.upload) {
|
|
5222
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
4895
5223
|
|
|
4896
|
-
|
|
5224
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
4897
5225
|
|
|
4898
|
-
|
|
4899
|
-
|
|
5226
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
5227
|
+
}
|
|
4900
5228
|
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
5229
|
+
if (_config.cancelToken || _config.signal) {
|
|
5230
|
+
// Handle cancellation
|
|
5231
|
+
// eslint-disable-next-line func-names
|
|
5232
|
+
onCanceled = (cancel) => {
|
|
5233
|
+
if (!request) {
|
|
5234
|
+
return;
|
|
5235
|
+
}
|
|
5236
|
+
reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel);
|
|
5237
|
+
request.abort();
|
|
5238
|
+
request = null;
|
|
5239
|
+
};
|
|
5240
|
+
|
|
5241
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
5242
|
+
if (_config.signal) {
|
|
5243
|
+
_config.signal.aborted
|
|
5244
|
+
? onCanceled()
|
|
5245
|
+
: _config.signal.addEventListener('abort', onCanceled);
|
|
4907
5246
|
}
|
|
4908
|
-
reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel);
|
|
4909
|
-
request.abort();
|
|
4910
|
-
request = null;
|
|
4911
|
-
};
|
|
4912
|
-
|
|
4913
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
4914
|
-
if (_config.signal) {
|
|
4915
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
4916
5247
|
}
|
|
4917
|
-
}
|
|
4918
|
-
|
|
4919
|
-
const protocol = parseProtocol(_config.url);
|
|
4920
5248
|
|
|
4921
|
-
|
|
4922
|
-
reject(new core_AxiosError('Unsupported protocol ' + protocol + ':', core_AxiosError.ERR_BAD_REQUEST, config));
|
|
4923
|
-
return;
|
|
4924
|
-
}
|
|
5249
|
+
const protocol = parseProtocol(_config.url);
|
|
4925
5250
|
|
|
5251
|
+
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
5252
|
+
reject(
|
|
5253
|
+
new core_AxiosError(
|
|
5254
|
+
'Unsupported protocol ' + protocol + ':',
|
|
5255
|
+
core_AxiosError.ERR_BAD_REQUEST,
|
|
5256
|
+
config
|
|
5257
|
+
)
|
|
5258
|
+
);
|
|
5259
|
+
return;
|
|
5260
|
+
}
|
|
4926
5261
|
|
|
4927
|
-
|
|
4928
|
-
|
|
5262
|
+
// Send the request
|
|
5263
|
+
request.send(requestData || null);
|
|
5264
|
+
});
|
|
4929
5265
|
});
|
|
4930
|
-
});
|
|
4931
5266
|
|
|
4932
5267
|
;// ../../../node_modules/axios/lib/helpers/composeSignals.js
|
|
4933
5268
|
|
|
@@ -4935,7 +5270,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
4935
5270
|
|
|
4936
5271
|
|
|
4937
5272
|
const composeSignals = (signals, timeout) => {
|
|
4938
|
-
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
5273
|
+
const { length } = (signals = signals ? signals.filter(Boolean) : []);
|
|
4939
5274
|
|
|
4940
5275
|
if (timeout || length) {
|
|
4941
5276
|
let controller = new AbortController();
|
|
@@ -4947,40 +5282,47 @@ const composeSignals = (signals, timeout) => {
|
|
|
4947
5282
|
aborted = true;
|
|
4948
5283
|
unsubscribe();
|
|
4949
5284
|
const err = reason instanceof Error ? reason : this.reason;
|
|
4950
|
-
controller.abort(
|
|
5285
|
+
controller.abort(
|
|
5286
|
+
err instanceof core_AxiosError
|
|
5287
|
+
? err
|
|
5288
|
+
: new cancel_CanceledError(err instanceof Error ? err.message : err)
|
|
5289
|
+
);
|
|
4951
5290
|
}
|
|
4952
|
-
}
|
|
5291
|
+
};
|
|
4953
5292
|
|
|
4954
|
-
let timer =
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
5293
|
+
let timer =
|
|
5294
|
+
timeout &&
|
|
5295
|
+
setTimeout(() => {
|
|
5296
|
+
timer = null;
|
|
5297
|
+
onabort(new core_AxiosError(`timeout of ${timeout}ms exceeded`, core_AxiosError.ETIMEDOUT));
|
|
5298
|
+
}, timeout);
|
|
4958
5299
|
|
|
4959
5300
|
const unsubscribe = () => {
|
|
4960
5301
|
if (signals) {
|
|
4961
5302
|
timer && clearTimeout(timer);
|
|
4962
5303
|
timer = null;
|
|
4963
|
-
signals.forEach(signal => {
|
|
4964
|
-
signal.unsubscribe
|
|
5304
|
+
signals.forEach((signal) => {
|
|
5305
|
+
signal.unsubscribe
|
|
5306
|
+
? signal.unsubscribe(onabort)
|
|
5307
|
+
: signal.removeEventListener('abort', onabort);
|
|
4965
5308
|
});
|
|
4966
5309
|
signals = null;
|
|
4967
5310
|
}
|
|
4968
|
-
}
|
|
5311
|
+
};
|
|
4969
5312
|
|
|
4970
5313
|
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
4971
5314
|
|
|
4972
|
-
const {signal} = controller;
|
|
5315
|
+
const { signal } = controller;
|
|
4973
5316
|
|
|
4974
5317
|
signal.unsubscribe = () => utils.asap(unsubscribe);
|
|
4975
5318
|
|
|
4976
5319
|
return signal;
|
|
4977
5320
|
}
|
|
4978
|
-
}
|
|
5321
|
+
};
|
|
4979
5322
|
|
|
4980
5323
|
/* harmony default export */ const helpers_composeSignals = (composeSignals);
|
|
4981
5324
|
|
|
4982
5325
|
;// ../../../node_modules/axios/lib/helpers/trackStream.js
|
|
4983
|
-
|
|
4984
5326
|
const streamChunk = function* (chunk, chunkSize) {
|
|
4985
5327
|
let len = chunk.byteLength;
|
|
4986
5328
|
|
|
@@ -4997,13 +5339,13 @@ const streamChunk = function* (chunk, chunkSize) {
|
|
|
4997
5339
|
yield chunk.slice(pos, end);
|
|
4998
5340
|
pos = end;
|
|
4999
5341
|
}
|
|
5000
|
-
}
|
|
5342
|
+
};
|
|
5001
5343
|
|
|
5002
5344
|
const readBytes = async function* (iterable, chunkSize) {
|
|
5003
5345
|
for await (const chunk of readStream(iterable)) {
|
|
5004
5346
|
yield* streamChunk(chunk, chunkSize);
|
|
5005
5347
|
}
|
|
5006
|
-
}
|
|
5348
|
+
};
|
|
5007
5349
|
|
|
5008
5350
|
const readStream = async function* (stream) {
|
|
5009
5351
|
if (stream[Symbol.asyncIterator]) {
|
|
@@ -5014,7 +5356,7 @@ const readStream = async function* (stream) {
|
|
|
5014
5356
|
const reader = stream.getReader();
|
|
5015
5357
|
try {
|
|
5016
5358
|
for (;;) {
|
|
5017
|
-
const {done, value} = await reader.read();
|
|
5359
|
+
const { done, value } = await reader.read();
|
|
5018
5360
|
if (done) {
|
|
5019
5361
|
break;
|
|
5020
5362
|
}
|
|
@@ -5023,7 +5365,7 @@ const readStream = async function* (stream) {
|
|
|
5023
5365
|
} finally {
|
|
5024
5366
|
await reader.cancel();
|
|
5025
5367
|
}
|
|
5026
|
-
}
|
|
5368
|
+
};
|
|
5027
5369
|
|
|
5028
5370
|
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
5029
5371
|
const iterator = readBytes(stream, chunkSize);
|
|
@@ -5035,38 +5377,41 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
5035
5377
|
done = true;
|
|
5036
5378
|
onFinish && onFinish(e);
|
|
5037
5379
|
}
|
|
5038
|
-
}
|
|
5380
|
+
};
|
|
5039
5381
|
|
|
5040
|
-
return new ReadableStream(
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5382
|
+
return new ReadableStream(
|
|
5383
|
+
{
|
|
5384
|
+
async pull(controller) {
|
|
5385
|
+
try {
|
|
5386
|
+
const { done, value } = await iterator.next();
|
|
5044
5387
|
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5388
|
+
if (done) {
|
|
5389
|
+
_onFinish();
|
|
5390
|
+
controller.close();
|
|
5391
|
+
return;
|
|
5392
|
+
}
|
|
5050
5393
|
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5394
|
+
let len = value.byteLength;
|
|
5395
|
+
if (onProgress) {
|
|
5396
|
+
let loadedBytes = (bytes += len);
|
|
5397
|
+
onProgress(loadedBytes);
|
|
5398
|
+
}
|
|
5399
|
+
controller.enqueue(new Uint8Array(value));
|
|
5400
|
+
} catch (err) {
|
|
5401
|
+
_onFinish(err);
|
|
5402
|
+
throw err;
|
|
5055
5403
|
}
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
_onFinish(
|
|
5059
|
-
|
|
5060
|
-
}
|
|
5404
|
+
},
|
|
5405
|
+
cancel(reason) {
|
|
5406
|
+
_onFinish(reason);
|
|
5407
|
+
return iterator.return();
|
|
5408
|
+
},
|
|
5061
5409
|
},
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
return iterator.return();
|
|
5410
|
+
{
|
|
5411
|
+
highWaterMark: 2,
|
|
5065
5412
|
}
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
})
|
|
5069
|
-
}
|
|
5413
|
+
);
|
|
5414
|
+
};
|
|
5070
5415
|
|
|
5071
5416
|
;// ../../../node_modules/axios/lib/adapters/fetch.js
|
|
5072
5417
|
|
|
@@ -5081,28 +5426,34 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
5081
5426
|
|
|
5082
5427
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
5083
5428
|
|
|
5084
|
-
const {isFunction: fetch_isFunction} = utils;
|
|
5085
|
-
|
|
5086
|
-
const globalFetchAPI = (({fetch, Request, Response}) => ({
|
|
5087
|
-
fetch, Request, Response
|
|
5088
|
-
}))(utils.global);
|
|
5429
|
+
const { isFunction: fetch_isFunction } = utils;
|
|
5089
5430
|
|
|
5090
|
-
const {
|
|
5091
|
-
|
|
5092
|
-
|
|
5431
|
+
const globalFetchAPI = (({ Request, Response }) => ({
|
|
5432
|
+
Request,
|
|
5433
|
+
Response,
|
|
5434
|
+
}))(utils.global);
|
|
5093
5435
|
|
|
5436
|
+
const { ReadableStream: fetch_ReadableStream, TextEncoder } = utils.global;
|
|
5094
5437
|
|
|
5095
5438
|
const test = (fn, ...args) => {
|
|
5096
5439
|
try {
|
|
5097
5440
|
return !!fn(...args);
|
|
5098
5441
|
} catch (e) {
|
|
5099
|
-
return false
|
|
5442
|
+
return false;
|
|
5100
5443
|
}
|
|
5101
|
-
}
|
|
5444
|
+
};
|
|
5102
5445
|
|
|
5103
5446
|
const factory = (env) => {
|
|
5104
|
-
|
|
5105
|
-
|
|
5447
|
+
env = utils.merge.call(
|
|
5448
|
+
{
|
|
5449
|
+
skipUndefined: true,
|
|
5450
|
+
},
|
|
5451
|
+
globalFetchAPI,
|
|
5452
|
+
env
|
|
5453
|
+
);
|
|
5454
|
+
|
|
5455
|
+
const { fetch: envFetch, Request, Response } = env;
|
|
5456
|
+
const isFetchSupported = envFetch ? fetch_isFunction(envFetch) : typeof fetch === 'function';
|
|
5106
5457
|
const isRequestSupported = fetch_isFunction(Request);
|
|
5107
5458
|
const isResponseSupported = fetch_isFunction(Response);
|
|
5108
5459
|
|
|
@@ -5112,46 +5463,67 @@ const factory = (env) => {
|
|
|
5112
5463
|
|
|
5113
5464
|
const isReadableStreamSupported = isFetchSupported && fetch_isFunction(fetch_ReadableStream);
|
|
5114
5465
|
|
|
5115
|
-
const encodeText =
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5466
|
+
const encodeText =
|
|
5467
|
+
isFetchSupported &&
|
|
5468
|
+
(typeof TextEncoder === 'function'
|
|
5469
|
+
? (
|
|
5470
|
+
(encoder) => (str) =>
|
|
5471
|
+
encoder.encode(str)
|
|
5472
|
+
)(new TextEncoder())
|
|
5473
|
+
: async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
5474
|
+
|
|
5475
|
+
const supportsRequestStream =
|
|
5476
|
+
isRequestSupported &&
|
|
5477
|
+
isReadableStreamSupported &&
|
|
5478
|
+
test(() => {
|
|
5479
|
+
let duplexAccessed = false;
|
|
5480
|
+
|
|
5481
|
+
const request = new Request(platform.origin, {
|
|
5482
|
+
body: new fetch_ReadableStream(),
|
|
5483
|
+
method: 'POST',
|
|
5484
|
+
get duplex() {
|
|
5485
|
+
duplexAccessed = true;
|
|
5486
|
+
return 'half';
|
|
5487
|
+
},
|
|
5488
|
+
});
|
|
5119
5489
|
|
|
5120
|
-
|
|
5121
|
-
let duplexAccessed = false;
|
|
5490
|
+
const hasContentType = request.headers.has('Content-Type');
|
|
5122
5491
|
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
get duplex() {
|
|
5127
|
-
duplexAccessed = true;
|
|
5128
|
-
return 'half';
|
|
5129
|
-
},
|
|
5130
|
-
}).headers.has('Content-Type');
|
|
5492
|
+
if (request.body != null) {
|
|
5493
|
+
request.body.cancel();
|
|
5494
|
+
}
|
|
5131
5495
|
|
|
5132
|
-
|
|
5133
|
-
|
|
5496
|
+
return duplexAccessed && !hasContentType;
|
|
5497
|
+
});
|
|
5134
5498
|
|
|
5135
|
-
const supportsResponseStream =
|
|
5499
|
+
const supportsResponseStream =
|
|
5500
|
+
isResponseSupported &&
|
|
5501
|
+
isReadableStreamSupported &&
|
|
5136
5502
|
test(() => utils.isReadableStream(new Response('').body));
|
|
5137
5503
|
|
|
5138
5504
|
const resolvers = {
|
|
5139
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
5505
|
+
stream: supportsResponseStream && ((res) => res.body),
|
|
5140
5506
|
};
|
|
5141
5507
|
|
|
5142
|
-
isFetchSupported &&
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5508
|
+
isFetchSupported &&
|
|
5509
|
+
(() => {
|
|
5510
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
|
|
5511
|
+
!resolvers[type] &&
|
|
5512
|
+
(resolvers[type] = (res, config) => {
|
|
5513
|
+
let method = res && res[type];
|
|
5146
5514
|
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5515
|
+
if (method) {
|
|
5516
|
+
return method.call(res);
|
|
5517
|
+
}
|
|
5150
5518
|
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5519
|
+
throw new core_AxiosError(
|
|
5520
|
+
`Response type '${type}' is not supported`,
|
|
5521
|
+
core_AxiosError.ERR_NOT_SUPPORT,
|
|
5522
|
+
config
|
|
5523
|
+
);
|
|
5524
|
+
});
|
|
5525
|
+
});
|
|
5526
|
+
})();
|
|
5155
5527
|
|
|
5156
5528
|
const getBodyLength = async (body) => {
|
|
5157
5529
|
if (body == null) {
|
|
@@ -5181,13 +5553,13 @@ const factory = (env) => {
|
|
|
5181
5553
|
if (utils.isString(body)) {
|
|
5182
5554
|
return (await encodeText(body)).byteLength;
|
|
5183
5555
|
}
|
|
5184
|
-
}
|
|
5556
|
+
};
|
|
5185
5557
|
|
|
5186
5558
|
const resolveBodyLength = async (headers, body) => {
|
|
5187
5559
|
const length = utils.toFiniteNumber(headers.getContentLength());
|
|
5188
5560
|
|
|
5189
5561
|
return length == null ? getBodyLength(body) : length;
|
|
5190
|
-
}
|
|
5562
|
+
};
|
|
5191
5563
|
|
|
5192
5564
|
return async (config) => {
|
|
5193
5565
|
let {
|
|
@@ -5202,36 +5574,47 @@ const factory = (env) => {
|
|
|
5202
5574
|
responseType,
|
|
5203
5575
|
headers,
|
|
5204
5576
|
withCredentials = 'same-origin',
|
|
5205
|
-
fetchOptions
|
|
5577
|
+
fetchOptions,
|
|
5206
5578
|
} = resolveConfig(config);
|
|
5207
5579
|
|
|
5580
|
+
let _fetch = envFetch || fetch;
|
|
5581
|
+
|
|
5208
5582
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
5209
5583
|
|
|
5210
|
-
let composedSignal = helpers_composeSignals(
|
|
5584
|
+
let composedSignal = helpers_composeSignals(
|
|
5585
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
5586
|
+
timeout
|
|
5587
|
+
);
|
|
5211
5588
|
|
|
5212
5589
|
let request = null;
|
|
5213
5590
|
|
|
5214
|
-
const unsubscribe =
|
|
5215
|
-
composedSignal
|
|
5216
|
-
|
|
5591
|
+
const unsubscribe =
|
|
5592
|
+
composedSignal &&
|
|
5593
|
+
composedSignal.unsubscribe &&
|
|
5594
|
+
(() => {
|
|
5595
|
+
composedSignal.unsubscribe();
|
|
5596
|
+
});
|
|
5217
5597
|
|
|
5218
5598
|
let requestContentLength;
|
|
5219
5599
|
|
|
5220
5600
|
try {
|
|
5221
5601
|
if (
|
|
5222
|
-
onUploadProgress &&
|
|
5602
|
+
onUploadProgress &&
|
|
5603
|
+
supportsRequestStream &&
|
|
5604
|
+
method !== 'get' &&
|
|
5605
|
+
method !== 'head' &&
|
|
5223
5606
|
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
5224
5607
|
) {
|
|
5225
5608
|
let _request = new Request(url, {
|
|
5226
5609
|
method: 'POST',
|
|
5227
5610
|
body: data,
|
|
5228
|
-
duplex:
|
|
5611
|
+
duplex: 'half',
|
|
5229
5612
|
});
|
|
5230
5613
|
|
|
5231
5614
|
let contentTypeHeader;
|
|
5232
5615
|
|
|
5233
5616
|
if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
5234
|
-
headers.setContentType(contentTypeHeader)
|
|
5617
|
+
headers.setContentType(contentTypeHeader);
|
|
5235
5618
|
}
|
|
5236
5619
|
|
|
5237
5620
|
if (_request.body) {
|
|
@@ -5250,7 +5633,20 @@ const factory = (env) => {
|
|
|
5250
5633
|
|
|
5251
5634
|
// Cloudflare Workers throws when credentials are defined
|
|
5252
5635
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
5253
|
-
const isCredentialsSupported = isRequestSupported &&
|
|
5636
|
+
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
5637
|
+
|
|
5638
|
+
// If data is FormData and Content-Type is multipart/form-data without boundary,
|
|
5639
|
+
// delete it so fetch can set it correctly with the boundary
|
|
5640
|
+
if (utils.isFormData(data)) {
|
|
5641
|
+
const contentType = headers.getContentType();
|
|
5642
|
+
if (
|
|
5643
|
+
contentType &&
|
|
5644
|
+
/^multipart\/form-data/i.test(contentType) &&
|
|
5645
|
+
!/boundary=/i.test(contentType)
|
|
5646
|
+
) {
|
|
5647
|
+
headers.delete('content-type');
|
|
5648
|
+
}
|
|
5649
|
+
}
|
|
5254
5650
|
|
|
5255
5651
|
const resolvedOptions = {
|
|
5256
5652
|
...fetchOptions,
|
|
@@ -5258,29 +5654,35 @@ const factory = (env) => {
|
|
|
5258
5654
|
method: method.toUpperCase(),
|
|
5259
5655
|
headers: headers.normalize().toJSON(),
|
|
5260
5656
|
body: data,
|
|
5261
|
-
duplex:
|
|
5262
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
5657
|
+
duplex: 'half',
|
|
5658
|
+
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
5263
5659
|
};
|
|
5264
5660
|
|
|
5265
5661
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
5266
5662
|
|
|
5267
|
-
let response = await (isRequestSupported
|
|
5663
|
+
let response = await (isRequestSupported
|
|
5664
|
+
? _fetch(request, fetchOptions)
|
|
5665
|
+
: _fetch(url, resolvedOptions));
|
|
5268
5666
|
|
|
5269
|
-
const isStreamResponse =
|
|
5667
|
+
const isStreamResponse =
|
|
5668
|
+
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
5270
5669
|
|
|
5271
5670
|
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
5272
5671
|
const options = {};
|
|
5273
5672
|
|
|
5274
|
-
['status', 'statusText', 'headers'].forEach(prop => {
|
|
5673
|
+
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
5275
5674
|
options[prop] = response[prop];
|
|
5276
5675
|
});
|
|
5277
5676
|
|
|
5278
5677
|
const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));
|
|
5279
5678
|
|
|
5280
|
-
const [onProgress, flush] =
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5679
|
+
const [onProgress, flush] =
|
|
5680
|
+
(onDownloadProgress &&
|
|
5681
|
+
progressEventDecorator(
|
|
5682
|
+
responseContentLength,
|
|
5683
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
5684
|
+
)) ||
|
|
5685
|
+
[];
|
|
5284
5686
|
|
|
5285
5687
|
response = new Response(
|
|
5286
5688
|
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
@@ -5293,7 +5695,10 @@ const factory = (env) => {
|
|
|
5293
5695
|
|
|
5294
5696
|
responseType = responseType || 'text';
|
|
5295
5697
|
|
|
5296
|
-
let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](
|
|
5698
|
+
let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](
|
|
5699
|
+
response,
|
|
5700
|
+
config
|
|
5701
|
+
);
|
|
5297
5702
|
|
|
5298
5703
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
5299
5704
|
|
|
@@ -5304,47 +5709,50 @@ const factory = (env) => {
|
|
|
5304
5709
|
status: response.status,
|
|
5305
5710
|
statusText: response.statusText,
|
|
5306
5711
|
config,
|
|
5307
|
-
request
|
|
5308
|
-
})
|
|
5309
|
-
})
|
|
5712
|
+
request,
|
|
5713
|
+
});
|
|
5714
|
+
});
|
|
5310
5715
|
} catch (err) {
|
|
5311
5716
|
unsubscribe && unsubscribe();
|
|
5312
5717
|
|
|
5313
5718
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
5314
5719
|
throw Object.assign(
|
|
5315
|
-
new core_AxiosError(
|
|
5720
|
+
new core_AxiosError(
|
|
5721
|
+
'Network Error',
|
|
5722
|
+
core_AxiosError.ERR_NETWORK,
|
|
5723
|
+
config,
|
|
5724
|
+
request,
|
|
5725
|
+
err && err.response
|
|
5726
|
+
),
|
|
5316
5727
|
{
|
|
5317
|
-
cause: err.cause || err
|
|
5728
|
+
cause: err.cause || err,
|
|
5318
5729
|
}
|
|
5319
|
-
)
|
|
5730
|
+
);
|
|
5320
5731
|
}
|
|
5321
5732
|
|
|
5322
|
-
throw core_AxiosError.from(err, err && err.code, config, request);
|
|
5733
|
+
throw core_AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
5323
5734
|
}
|
|
5324
|
-
}
|
|
5325
|
-
}
|
|
5735
|
+
};
|
|
5736
|
+
};
|
|
5326
5737
|
|
|
5327
5738
|
const seedCache = new Map();
|
|
5328
5739
|
|
|
5329
5740
|
const getFetch = (config) => {
|
|
5330
|
-
let env =
|
|
5331
|
-
|
|
5332
|
-
|
|
5741
|
+
let env = (config && config.env) || {};
|
|
5742
|
+
const { fetch, Request, Response } = env;
|
|
5743
|
+
const seeds = [Request, Response, fetch];
|
|
5333
5744
|
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
let len = seeds.length, i = len,
|
|
5341
|
-
seed, target, map = seedCache;
|
|
5745
|
+
let len = seeds.length,
|
|
5746
|
+
i = len,
|
|
5747
|
+
seed,
|
|
5748
|
+
target,
|
|
5749
|
+
map = seedCache;
|
|
5342
5750
|
|
|
5343
5751
|
while (i--) {
|
|
5344
5752
|
seed = seeds[i];
|
|
5345
5753
|
target = map.get(seed);
|
|
5346
5754
|
|
|
5347
|
-
target === undefined && map.set(seed, target =
|
|
5755
|
+
target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
|
|
5348
5756
|
|
|
5349
5757
|
map = target;
|
|
5350
5758
|
}
|
|
@@ -5354,7 +5762,7 @@ const getFetch = (config) => {
|
|
|
5354
5762
|
|
|
5355
5763
|
const adapter = getFetch();
|
|
5356
5764
|
|
|
5357
|
-
/* harmony default export */ const
|
|
5765
|
+
/* harmony default export */ const adapters_fetch = ((/* unused pure expression or super */ null && (adapter)));
|
|
5358
5766
|
|
|
5359
5767
|
;// ../../../node_modules/axios/lib/adapters/adapters.js
|
|
5360
5768
|
|
|
@@ -5363,80 +5771,129 @@ const adapter = getFetch();
|
|
|
5363
5771
|
|
|
5364
5772
|
|
|
5365
5773
|
|
|
5774
|
+
/**
|
|
5775
|
+
* Known adapters mapping.
|
|
5776
|
+
* Provides environment-specific adapters for Axios:
|
|
5777
|
+
* - `http` for Node.js
|
|
5778
|
+
* - `xhr` for browsers
|
|
5779
|
+
* - `fetch` for fetch API-based requests
|
|
5780
|
+
*
|
|
5781
|
+
* @type {Object<string, Function|Object>}
|
|
5782
|
+
*/
|
|
5366
5783
|
const knownAdapters = {
|
|
5367
5784
|
http: helpers_null,
|
|
5368
5785
|
xhr: xhr,
|
|
5369
5786
|
fetch: {
|
|
5370
5787
|
get: getFetch,
|
|
5371
|
-
}
|
|
5372
|
-
}
|
|
5788
|
+
},
|
|
5789
|
+
};
|
|
5373
5790
|
|
|
5791
|
+
// Assign adapter names for easier debugging and identification
|
|
5374
5792
|
utils.forEach(knownAdapters, (fn, value) => {
|
|
5375
5793
|
if (fn) {
|
|
5376
5794
|
try {
|
|
5377
|
-
Object.defineProperty(fn, 'name', {value});
|
|
5795
|
+
Object.defineProperty(fn, 'name', { value });
|
|
5378
5796
|
} catch (e) {
|
|
5379
5797
|
// eslint-disable-next-line no-empty
|
|
5380
5798
|
}
|
|
5381
|
-
Object.defineProperty(fn, 'adapterName', {value});
|
|
5799
|
+
Object.defineProperty(fn, 'adapterName', { value });
|
|
5382
5800
|
}
|
|
5383
5801
|
});
|
|
5384
5802
|
|
|
5803
|
+
/**
|
|
5804
|
+
* Render a rejection reason string for unknown or unsupported adapters
|
|
5805
|
+
*
|
|
5806
|
+
* @param {string} reason
|
|
5807
|
+
* @returns {string}
|
|
5808
|
+
*/
|
|
5385
5809
|
const renderReason = (reason) => `- ${reason}`;
|
|
5386
5810
|
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5811
|
+
/**
|
|
5812
|
+
* Check if the adapter is resolved (function, null, or false)
|
|
5813
|
+
*
|
|
5814
|
+
* @param {Function|null|false} adapter
|
|
5815
|
+
* @returns {boolean}
|
|
5816
|
+
*/
|
|
5817
|
+
const isResolvedHandle = (adapter) =>
|
|
5818
|
+
utils.isFunction(adapter) || adapter === null || adapter === false;
|
|
5392
5819
|
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5820
|
+
/**
|
|
5821
|
+
* Get the first suitable adapter from the provided list.
|
|
5822
|
+
* Tries each adapter in order until a supported one is found.
|
|
5823
|
+
* Throws an AxiosError if no adapter is suitable.
|
|
5824
|
+
*
|
|
5825
|
+
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
5826
|
+
* @param {Object} config - Axios request configuration
|
|
5827
|
+
* @throws {AxiosError} If no suitable adapter is available
|
|
5828
|
+
* @returns {Function} The resolved adapter function
|
|
5829
|
+
*/
|
|
5830
|
+
function getAdapter(adapters, config) {
|
|
5831
|
+
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
|
5396
5832
|
|
|
5397
|
-
|
|
5833
|
+
const { length } = adapters;
|
|
5834
|
+
let nameOrAdapter;
|
|
5835
|
+
let adapter;
|
|
5398
5836
|
|
|
5399
|
-
|
|
5400
|
-
nameOrAdapter = adapters[i];
|
|
5401
|
-
let id;
|
|
5837
|
+
const rejectedReasons = {};
|
|
5402
5838
|
|
|
5403
|
-
|
|
5839
|
+
for (let i = 0; i < length; i++) {
|
|
5840
|
+
nameOrAdapter = adapters[i];
|
|
5841
|
+
let id;
|
|
5404
5842
|
|
|
5405
|
-
|
|
5406
|
-
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
5843
|
+
adapter = nameOrAdapter;
|
|
5407
5844
|
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
}
|
|
5411
|
-
}
|
|
5845
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
5846
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
5412
5847
|
|
|
5413
|
-
if (adapter
|
|
5414
|
-
|
|
5848
|
+
if (adapter === undefined) {
|
|
5849
|
+
throw new core_AxiosError(`Unknown adapter '${id}'`);
|
|
5415
5850
|
}
|
|
5851
|
+
}
|
|
5416
5852
|
|
|
5417
|
-
|
|
5853
|
+
if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
5854
|
+
break;
|
|
5418
5855
|
}
|
|
5419
5856
|
|
|
5420
|
-
|
|
5857
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
5858
|
+
}
|
|
5421
5859
|
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5860
|
+
if (!adapter) {
|
|
5861
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
5862
|
+
([id, state]) =>
|
|
5863
|
+
`adapter ${id} ` +
|
|
5864
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
5865
|
+
);
|
|
5426
5866
|
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
'
|
|
5867
|
+
let s = length
|
|
5868
|
+
? reasons.length > 1
|
|
5869
|
+
? 'since :\n' + reasons.map(renderReason).join('\n')
|
|
5870
|
+
: ' ' + renderReason(reasons[0])
|
|
5871
|
+
: 'as no adapter specified';
|
|
5430
5872
|
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5873
|
+
throw new core_AxiosError(
|
|
5874
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
5875
|
+
'ERR_NOT_SUPPORT'
|
|
5876
|
+
);
|
|
5877
|
+
}
|
|
5436
5878
|
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5879
|
+
return adapter;
|
|
5880
|
+
}
|
|
5881
|
+
|
|
5882
|
+
/**
|
|
5883
|
+
* Exports Axios adapters and utility to resolve an adapter
|
|
5884
|
+
*/
|
|
5885
|
+
/* harmony default export */ const adapters = ({
|
|
5886
|
+
/**
|
|
5887
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
5888
|
+
* @type {Function}
|
|
5889
|
+
*/
|
|
5890
|
+
getAdapter,
|
|
5891
|
+
|
|
5892
|
+
/**
|
|
5893
|
+
* Exposes all known adapters
|
|
5894
|
+
* @type {Object<string, Function|Object>}
|
|
5895
|
+
*/
|
|
5896
|
+
adapters: knownAdapters,
|
|
5440
5897
|
});
|
|
5441
5898
|
|
|
5442
5899
|
;// ../../../node_modules/axios/lib/core/dispatchRequest.js
|
|
@@ -5479,10 +5936,7 @@ function dispatchRequest(config) {
|
|
|
5479
5936
|
config.headers = core_AxiosHeaders.from(config.headers);
|
|
5480
5937
|
|
|
5481
5938
|
// Transform request data
|
|
5482
|
-
config.data = transformData.call(
|
|
5483
|
-
config,
|
|
5484
|
-
config.transformRequest
|
|
5485
|
-
);
|
|
5939
|
+
config.data = transformData.call(config, config.transformRequest);
|
|
5486
5940
|
|
|
5487
5941
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
5488
5942
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
@@ -5490,40 +5944,39 @@ function dispatchRequest(config) {
|
|
|
5490
5944
|
|
|
5491
5945
|
const adapter = adapters.getAdapter(config.adapter || lib_defaults.adapter, config);
|
|
5492
5946
|
|
|
5493
|
-
return adapter(config).then(
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
// Transform response data
|
|
5497
|
-
response.data = transformData.call(
|
|
5498
|
-
config,
|
|
5499
|
-
config.transformResponse,
|
|
5500
|
-
response
|
|
5501
|
-
);
|
|
5502
|
-
|
|
5503
|
-
response.headers = core_AxiosHeaders.from(response.headers);
|
|
5504
|
-
|
|
5505
|
-
return response;
|
|
5506
|
-
}, function onAdapterRejection(reason) {
|
|
5507
|
-
if (!isCancel(reason)) {
|
|
5947
|
+
return adapter(config).then(
|
|
5948
|
+
function onAdapterResolution(response) {
|
|
5508
5949
|
throwIfCancellationRequested(config);
|
|
5509
5950
|
|
|
5510
5951
|
// Transform response data
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5952
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
5953
|
+
|
|
5954
|
+
response.headers = core_AxiosHeaders.from(response.headers);
|
|
5955
|
+
|
|
5956
|
+
return response;
|
|
5957
|
+
},
|
|
5958
|
+
function onAdapterRejection(reason) {
|
|
5959
|
+
if (!isCancel(reason)) {
|
|
5960
|
+
throwIfCancellationRequested(config);
|
|
5961
|
+
|
|
5962
|
+
// Transform response data
|
|
5963
|
+
if (reason && reason.response) {
|
|
5964
|
+
reason.response.data = transformData.call(
|
|
5965
|
+
config,
|
|
5966
|
+
config.transformResponse,
|
|
5967
|
+
reason.response
|
|
5968
|
+
);
|
|
5969
|
+
reason.response.headers = core_AxiosHeaders.from(reason.response.headers);
|
|
5970
|
+
}
|
|
5518
5971
|
}
|
|
5519
|
-
}
|
|
5520
5972
|
|
|
5521
|
-
|
|
5522
|
-
|
|
5973
|
+
return Promise.reject(reason);
|
|
5974
|
+
}
|
|
5975
|
+
);
|
|
5523
5976
|
}
|
|
5524
5977
|
|
|
5525
5978
|
;// ../../../node_modules/axios/lib/env/data.js
|
|
5526
|
-
const VERSION = "1.
|
|
5979
|
+
const VERSION = "1.15.2";
|
|
5527
5980
|
;// ../../../node_modules/axios/lib/helpers/validator.js
|
|
5528
5981
|
|
|
5529
5982
|
|
|
@@ -5552,7 +6005,15 @@ const deprecatedWarnings = {};
|
|
|
5552
6005
|
*/
|
|
5553
6006
|
validators.transitional = function transitional(validator, version, message) {
|
|
5554
6007
|
function formatMessage(opt, desc) {
|
|
5555
|
-
return
|
|
6008
|
+
return (
|
|
6009
|
+
'[Axios v' +
|
|
6010
|
+
VERSION +
|
|
6011
|
+
"] Transitional option '" +
|
|
6012
|
+
opt +
|
|
6013
|
+
"'" +
|
|
6014
|
+
desc +
|
|
6015
|
+
(message ? '. ' + message : '')
|
|
6016
|
+
);
|
|
5556
6017
|
}
|
|
5557
6018
|
|
|
5558
6019
|
// eslint-disable-next-line func-names
|
|
@@ -5584,7 +6045,7 @@ validators.spelling = function spelling(correctSpelling) {
|
|
|
5584
6045
|
// eslint-disable-next-line no-console
|
|
5585
6046
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
5586
6047
|
return true;
|
|
5587
|
-
}
|
|
6048
|
+
};
|
|
5588
6049
|
};
|
|
5589
6050
|
|
|
5590
6051
|
/**
|
|
@@ -5605,12 +6066,17 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
5605
6066
|
let i = keys.length;
|
|
5606
6067
|
while (i-- > 0) {
|
|
5607
6068
|
const opt = keys[i];
|
|
5608
|
-
|
|
6069
|
+
// Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
|
|
6070
|
+
// a non-function validator and cause a TypeError. See GHSA-q8qp-cvcw-x6jj.
|
|
6071
|
+
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
|
|
5609
6072
|
if (validator) {
|
|
5610
6073
|
const value = options[opt];
|
|
5611
6074
|
const result = value === undefined || validator(value, opt, options);
|
|
5612
6075
|
if (result !== true) {
|
|
5613
|
-
throw new core_AxiosError(
|
|
6076
|
+
throw new core_AxiosError(
|
|
6077
|
+
'option ' + opt + ' must be ' + result,
|
|
6078
|
+
core_AxiosError.ERR_BAD_OPTION_VALUE
|
|
6079
|
+
);
|
|
5614
6080
|
}
|
|
5615
6081
|
continue;
|
|
5616
6082
|
}
|
|
@@ -5622,7 +6088,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
5622
6088
|
|
|
5623
6089
|
/* harmony default export */ const validator = ({
|
|
5624
6090
|
assertOptions,
|
|
5625
|
-
validators
|
|
6091
|
+
validators,
|
|
5626
6092
|
});
|
|
5627
6093
|
|
|
5628
6094
|
;// ../../../node_modules/axios/lib/core/Axios.js
|
|
@@ -5637,6 +6103,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
5637
6103
|
|
|
5638
6104
|
|
|
5639
6105
|
|
|
6106
|
+
|
|
5640
6107
|
const Axios_validators = validator.validators;
|
|
5641
6108
|
|
|
5642
6109
|
/**
|
|
@@ -5651,7 +6118,7 @@ class Axios {
|
|
|
5651
6118
|
this.defaults = instanceConfig || {};
|
|
5652
6119
|
this.interceptors = {
|
|
5653
6120
|
request: new core_InterceptorManager(),
|
|
5654
|
-
response: new core_InterceptorManager()
|
|
6121
|
+
response: new core_InterceptorManager(),
|
|
5655
6122
|
};
|
|
5656
6123
|
}
|
|
5657
6124
|
|
|
@@ -5673,13 +6140,29 @@ class Axios {
|
|
|
5673
6140
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
5674
6141
|
|
|
5675
6142
|
// slice off the Error: ... line
|
|
5676
|
-
const stack =
|
|
6143
|
+
const stack = (() => {
|
|
6144
|
+
if (!dummy.stack) {
|
|
6145
|
+
return '';
|
|
6146
|
+
}
|
|
6147
|
+
|
|
6148
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
6149
|
+
|
|
6150
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
6151
|
+
})();
|
|
5677
6152
|
try {
|
|
5678
6153
|
if (!err.stack) {
|
|
5679
6154
|
err.stack = stack;
|
|
5680
6155
|
// match without the 2 top stack lines
|
|
5681
|
-
} else if (stack
|
|
5682
|
-
|
|
6156
|
+
} else if (stack) {
|
|
6157
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
6158
|
+
const secondNewlineIndex =
|
|
6159
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
6160
|
+
const stackWithoutTwoTopLines =
|
|
6161
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
6162
|
+
|
|
6163
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
6164
|
+
err.stack += '\n' + stack;
|
|
6165
|
+
}
|
|
5683
6166
|
}
|
|
5684
6167
|
} catch (e) {
|
|
5685
6168
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -5702,26 +6185,35 @@ class Axios {
|
|
|
5702
6185
|
|
|
5703
6186
|
config = mergeConfig(this.defaults, config);
|
|
5704
6187
|
|
|
5705
|
-
const {transitional, paramsSerializer, headers} = config;
|
|
6188
|
+
const { transitional, paramsSerializer, headers } = config;
|
|
5706
6189
|
|
|
5707
6190
|
if (transitional !== undefined) {
|
|
5708
|
-
validator.assertOptions(
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
6191
|
+
validator.assertOptions(
|
|
6192
|
+
transitional,
|
|
6193
|
+
{
|
|
6194
|
+
silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
|
|
6195
|
+
forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
|
|
6196
|
+
clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean),
|
|
6197
|
+
legacyInterceptorReqResOrdering: Axios_validators.transitional(Axios_validators.boolean),
|
|
6198
|
+
},
|
|
6199
|
+
false
|
|
6200
|
+
);
|
|
5713
6201
|
}
|
|
5714
6202
|
|
|
5715
6203
|
if (paramsSerializer != null) {
|
|
5716
6204
|
if (utils.isFunction(paramsSerializer)) {
|
|
5717
6205
|
config.paramsSerializer = {
|
|
5718
|
-
serialize: paramsSerializer
|
|
5719
|
-
}
|
|
6206
|
+
serialize: paramsSerializer,
|
|
6207
|
+
};
|
|
5720
6208
|
} else {
|
|
5721
|
-
validator.assertOptions(
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
6209
|
+
validator.assertOptions(
|
|
6210
|
+
paramsSerializer,
|
|
6211
|
+
{
|
|
6212
|
+
encode: Axios_validators.function,
|
|
6213
|
+
serialize: Axios_validators.function,
|
|
6214
|
+
},
|
|
6215
|
+
true
|
|
6216
|
+
);
|
|
5725
6217
|
}
|
|
5726
6218
|
}
|
|
5727
6219
|
|
|
@@ -5734,26 +6226,25 @@ class Axios {
|
|
|
5734
6226
|
config.allowAbsoluteUrls = true;
|
|
5735
6227
|
}
|
|
5736
6228
|
|
|
5737
|
-
validator.assertOptions(
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
6229
|
+
validator.assertOptions(
|
|
6230
|
+
config,
|
|
6231
|
+
{
|
|
6232
|
+
baseUrl: Axios_validators.spelling('baseURL'),
|
|
6233
|
+
withXsrfToken: Axios_validators.spelling('withXSRFToken'),
|
|
6234
|
+
},
|
|
6235
|
+
true
|
|
6236
|
+
);
|
|
5741
6237
|
|
|
5742
6238
|
// Set config.method
|
|
5743
6239
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
5744
6240
|
|
|
5745
6241
|
// Flatten headers
|
|
5746
|
-
let contextHeaders = headers && utils.merge(
|
|
5747
|
-
headers.common,
|
|
5748
|
-
headers[config.method]
|
|
5749
|
-
);
|
|
6242
|
+
let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
|
|
5750
6243
|
|
|
5751
|
-
headers &&
|
|
5752
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
5753
|
-
(method) => {
|
|
6244
|
+
headers &&
|
|
6245
|
+
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
5754
6246
|
delete headers[method];
|
|
5755
|
-
}
|
|
5756
|
-
);
|
|
6247
|
+
});
|
|
5757
6248
|
|
|
5758
6249
|
config.headers = core_AxiosHeaders.concat(contextHeaders, headers);
|
|
5759
6250
|
|
|
@@ -5767,7 +6258,15 @@ class Axios {
|
|
|
5767
6258
|
|
|
5768
6259
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
5769
6260
|
|
|
5770
|
-
|
|
6261
|
+
const transitional = config.transitional || defaults_transitional;
|
|
6262
|
+
const legacyInterceptorReqResOrdering =
|
|
6263
|
+
transitional && transitional.legacyInterceptorReqResOrdering;
|
|
6264
|
+
|
|
6265
|
+
if (legacyInterceptorReqResOrdering) {
|
|
6266
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
6267
|
+
} else {
|
|
6268
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
6269
|
+
}
|
|
5771
6270
|
});
|
|
5772
6271
|
|
|
5773
6272
|
const responseInterceptorChain = [];
|
|
@@ -5798,8 +6297,6 @@ class Axios {
|
|
|
5798
6297
|
|
|
5799
6298
|
let newConfig = config;
|
|
5800
6299
|
|
|
5801
|
-
i = 0;
|
|
5802
|
-
|
|
5803
6300
|
while (i < len) {
|
|
5804
6301
|
const onFulfilled = requestInterceptorChain[i++];
|
|
5805
6302
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -5837,28 +6334,32 @@ class Axios {
|
|
|
5837
6334
|
// Provide aliases for supported request methods
|
|
5838
6335
|
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
5839
6336
|
/*eslint func-names:0*/
|
|
5840
|
-
Axios.prototype[method] = function(url, config) {
|
|
5841
|
-
return this.request(
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
6337
|
+
Axios.prototype[method] = function (url, config) {
|
|
6338
|
+
return this.request(
|
|
6339
|
+
mergeConfig(config || {}, {
|
|
6340
|
+
method,
|
|
6341
|
+
url,
|
|
6342
|
+
data: (config || {}).data,
|
|
6343
|
+
})
|
|
6344
|
+
);
|
|
5846
6345
|
};
|
|
5847
6346
|
});
|
|
5848
6347
|
|
|
5849
6348
|
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
5850
|
-
/*eslint func-names:0*/
|
|
5851
|
-
|
|
5852
6349
|
function generateHTTPMethod(isForm) {
|
|
5853
6350
|
return function httpMethod(url, data, config) {
|
|
5854
|
-
return this.request(
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
6351
|
+
return this.request(
|
|
6352
|
+
mergeConfig(config || {}, {
|
|
6353
|
+
method,
|
|
6354
|
+
headers: isForm
|
|
6355
|
+
? {
|
|
6356
|
+
'Content-Type': 'multipart/form-data',
|
|
6357
|
+
}
|
|
6358
|
+
: {},
|
|
6359
|
+
url,
|
|
6360
|
+
data,
|
|
6361
|
+
})
|
|
6362
|
+
);
|
|
5862
6363
|
};
|
|
5863
6364
|
}
|
|
5864
6365
|
|
|
@@ -5896,7 +6397,7 @@ class CancelToken {
|
|
|
5896
6397
|
const token = this;
|
|
5897
6398
|
|
|
5898
6399
|
// eslint-disable-next-line func-names
|
|
5899
|
-
this.promise.then(cancel => {
|
|
6400
|
+
this.promise.then((cancel) => {
|
|
5900
6401
|
if (!token._listeners) return;
|
|
5901
6402
|
|
|
5902
6403
|
let i = token._listeners.length;
|
|
@@ -5908,10 +6409,10 @@ class CancelToken {
|
|
|
5908
6409
|
});
|
|
5909
6410
|
|
|
5910
6411
|
// eslint-disable-next-line func-names
|
|
5911
|
-
this.promise.then = onfulfilled => {
|
|
6412
|
+
this.promise.then = (onfulfilled) => {
|
|
5912
6413
|
let _resolve;
|
|
5913
6414
|
// eslint-disable-next-line func-names
|
|
5914
|
-
const promise = new Promise(resolve => {
|
|
6415
|
+
const promise = new Promise((resolve) => {
|
|
5915
6416
|
token.subscribe(resolve);
|
|
5916
6417
|
_resolve = resolve;
|
|
5917
6418
|
}).then(onfulfilled);
|
|
@@ -5999,7 +6500,7 @@ class CancelToken {
|
|
|
5999
6500
|
});
|
|
6000
6501
|
return {
|
|
6001
6502
|
token,
|
|
6002
|
-
cancel
|
|
6503
|
+
cancel,
|
|
6003
6504
|
};
|
|
6004
6505
|
}
|
|
6005
6506
|
}
|
|
@@ -6016,7 +6517,7 @@ class CancelToken {
|
|
|
6016
6517
|
*
|
|
6017
6518
|
* ```js
|
|
6018
6519
|
* function f(x, y, z) {}
|
|
6019
|
-
*
|
|
6520
|
+
* const args = [1, 2, 3];
|
|
6020
6521
|
* f.apply(null, args);
|
|
6021
6522
|
* ```
|
|
6022
6523
|
*
|
|
@@ -6049,7 +6550,7 @@ function spread(callback) {
|
|
|
6049
6550
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
6050
6551
|
*/
|
|
6051
6552
|
function isAxiosError(payload) {
|
|
6052
|
-
return utils.isObject(payload) &&
|
|
6553
|
+
return utils.isObject(payload) && payload.isAxiosError === true;
|
|
6053
6554
|
}
|
|
6054
6555
|
|
|
6055
6556
|
;// ../../../node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
@@ -6117,6 +6618,12 @@ const HttpStatusCode = {
|
|
|
6117
6618
|
LoopDetected: 508,
|
|
6118
6619
|
NotExtended: 510,
|
|
6119
6620
|
NetworkAuthenticationRequired: 511,
|
|
6621
|
+
WebServerIsDown: 521,
|
|
6622
|
+
ConnectionTimedOut: 522,
|
|
6623
|
+
OriginIsUnreachable: 523,
|
|
6624
|
+
TimeoutOccurred: 524,
|
|
6625
|
+
SslHandshakeFailed: 525,
|
|
6626
|
+
InvalidSslCertificate: 526,
|
|
6120
6627
|
};
|
|
6121
6628
|
|
|
6122
6629
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
@@ -6158,10 +6665,10 @@ function createInstance(defaultConfig) {
|
|
|
6158
6665
|
const instance = bind(core_Axios.prototype.request, context);
|
|
6159
6666
|
|
|
6160
6667
|
// Copy axios.prototype to instance
|
|
6161
|
-
utils.extend(instance, core_Axios.prototype, context, {allOwnKeys: true});
|
|
6668
|
+
utils.extend(instance, core_Axios.prototype, context, { allOwnKeys: true });
|
|
6162
6669
|
|
|
6163
6670
|
// Copy context to instance
|
|
6164
|
-
utils.extend(instance, context, null, {allOwnKeys: true});
|
|
6671
|
+
utils.extend(instance, context, null, { allOwnKeys: true });
|
|
6165
6672
|
|
|
6166
6673
|
// Factory for creating new instances
|
|
6167
6674
|
instance.create = function create(instanceConfig) {
|
|
@@ -6205,7 +6712,7 @@ axios.mergeConfig = mergeConfig;
|
|
|
6205
6712
|
|
|
6206
6713
|
axios.AxiosHeaders = core_AxiosHeaders;
|
|
6207
6714
|
|
|
6208
|
-
axios.formToJSON = thing => helpers_formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
6715
|
+
axios.formToJSON = (thing) => helpers_formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
6209
6716
|
|
|
6210
6717
|
axios.getAdapter = adapters.getAdapter;
|
|
6211
6718
|
|
|
@@ -6237,17 +6744,17 @@ const {
|
|
|
6237
6744
|
AxiosHeaders: axios_AxiosHeaders,
|
|
6238
6745
|
HttpStatusCode: axios_HttpStatusCode,
|
|
6239
6746
|
formToJSON,
|
|
6240
|
-
getAdapter,
|
|
6241
|
-
mergeConfig: axios_mergeConfig
|
|
6747
|
+
getAdapter: axios_getAdapter,
|
|
6748
|
+
mergeConfig: axios_mergeConfig,
|
|
6242
6749
|
} = lib_axios;
|
|
6243
6750
|
|
|
6244
6751
|
|
|
6245
6752
|
|
|
6246
6753
|
|
|
6247
|
-
/***/ }
|
|
6754
|
+
/***/ },
|
|
6248
6755
|
|
|
6249
|
-
/***/ 47911
|
|
6250
|
-
|
|
6756
|
+
/***/ 47911
|
|
6757
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6251
6758
|
|
|
6252
6759
|
"use strict";
|
|
6253
6760
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -6330,10 +6837,10 @@ function bufferToTypedArray(wasmType, buffer) {
|
|
|
6330
6837
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (bufferToTypedArray);
|
|
6331
6838
|
//# sourceMappingURL=buffer-to-typed-array.js.map
|
|
6332
6839
|
|
|
6333
|
-
/***/ }
|
|
6840
|
+
/***/ },
|
|
6334
6841
|
|
|
6335
|
-
/***/ 46619
|
|
6336
|
-
|
|
6842
|
+
/***/ 46619
|
|
6843
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6337
6844
|
|
|
6338
6845
|
"use strict";
|
|
6339
6846
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -6376,10 +6883,10 @@ function getTransferable(data, noCopy) {
|
|
|
6376
6883
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getTransferables);
|
|
6377
6884
|
//# sourceMappingURL=get-transferables.js.map
|
|
6378
6885
|
|
|
6379
|
-
/***/ }
|
|
6886
|
+
/***/ },
|
|
6380
6887
|
|
|
6381
|
-
/***/ 74112
|
|
6382
|
-
|
|
6888
|
+
/***/ 74112
|
|
6889
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6383
6890
|
|
|
6384
6891
|
"use strict";
|
|
6385
6892
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -6393,10 +6900,10 @@ const FloatTypes = {
|
|
|
6393
6900
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FloatTypes);
|
|
6394
6901
|
//# sourceMappingURL=float-types.js.map
|
|
6395
6902
|
|
|
6396
|
-
/***/ }
|
|
6903
|
+
/***/ },
|
|
6397
6904
|
|
|
6398
|
-
/***/ 44835
|
|
6399
|
-
|
|
6905
|
+
/***/ 44835
|
|
6906
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6400
6907
|
|
|
6401
6908
|
"use strict";
|
|
6402
6909
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -6419,10 +6926,10 @@ const IntTypes = {
|
|
|
6419
6926
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IntTypes);
|
|
6420
6927
|
//# sourceMappingURL=int-types.js.map
|
|
6421
6928
|
|
|
6422
|
-
/***/ }
|
|
6929
|
+
/***/ },
|
|
6423
6930
|
|
|
6424
|
-
/***/ 16881
|
|
6425
|
-
|
|
6931
|
+
/***/ 16881
|
|
6932
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6426
6933
|
|
|
6427
6934
|
"use strict";
|
|
6428
6935
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -6441,10 +6948,10 @@ const InterfaceTypes = {
|
|
|
6441
6948
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterfaceTypes);
|
|
6442
6949
|
//# sourceMappingURL=interface-types.js.map
|
|
6443
6950
|
|
|
6444
|
-
/***/ }
|
|
6951
|
+
/***/ },
|
|
6445
6952
|
|
|
6446
|
-
/***/ 27295
|
|
6447
|
-
|
|
6953
|
+
/***/ 27295
|
|
6954
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6448
6955
|
|
|
6449
6956
|
"use strict";
|
|
6450
6957
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -6459,10 +6966,10 @@ function imageTransferables(image) {
|
|
|
6459
6966
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (imageTransferables);
|
|
6460
6967
|
//# sourceMappingURL=image-transferables.js.map
|
|
6461
6968
|
|
|
6462
|
-
/***/ }
|
|
6969
|
+
/***/ },
|
|
6463
6970
|
|
|
6464
|
-
/***/ 50295
|
|
6465
|
-
|
|
6971
|
+
/***/ 50295
|
|
6972
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6466
6973
|
|
|
6467
6974
|
"use strict";
|
|
6468
6975
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -6479,10 +6986,10 @@ function meshTransferables(mesh) {
|
|
|
6479
6986
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (meshTransferables);
|
|
6480
6987
|
//# sourceMappingURL=mesh-transferables.js.map
|
|
6481
6988
|
|
|
6482
|
-
/***/ }
|
|
6989
|
+
/***/ },
|
|
6483
6990
|
|
|
6484
|
-
/***/ 3099
|
|
6485
|
-
|
|
6991
|
+
/***/ 3099
|
|
6992
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6486
6993
|
|
|
6487
6994
|
"use strict";
|
|
6488
6995
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -6502,10 +7009,10 @@ function polyDataTransferables(polyData) {
|
|
|
6502
7009
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (polyDataTransferables);
|
|
6503
7010
|
//# sourceMappingURL=poly-data-transferables.js.map
|
|
6504
7011
|
|
|
6505
|
-
/***/ }
|
|
7012
|
+
/***/ },
|
|
6506
7013
|
|
|
6507
|
-
/***/ 8792
|
|
6508
|
-
|
|
7014
|
+
/***/ 8792
|
|
7015
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6509
7016
|
|
|
6510
7017
|
"use strict";
|
|
6511
7018
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -6862,6 +7369,6 @@ function runPipelineEmscripten(pipelineModule, args, outputs, inputs) {
|
|
|
6862
7369
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (runPipelineEmscripten);
|
|
6863
7370
|
//# sourceMappingURL=run-pipeline-emscripten.js.map
|
|
6864
7371
|
|
|
6865
|
-
/***/ }
|
|
7372
|
+
/***/ }
|
|
6866
7373
|
|
|
6867
7374
|
}]);
|