@myinterview/widget-react 1.1.53-development-2e405f2 → 1.1.54-development-66eb8ed
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/cjs/index.js +1014 -523
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1014 -523
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -11634,7 +11634,7 @@ const Explanation = ({ isVideoQuestion, isAssessment, timeLimit, answerType, dur
|
|
|
11634
11634
|
!!timeLimit && (t(`recorder.explanation.question.${isAssessment ? 'questionDuration' : 'questionThinkingTime'}`, { time })))));
|
|
11635
11635
|
};
|
|
11636
11636
|
|
|
11637
|
-
var platform$
|
|
11637
|
+
var platform$3 = {exports: {}};
|
|
11638
11638
|
|
|
11639
11639
|
/*!
|
|
11640
11640
|
* Platform.js v1.3.6
|
|
@@ -12876,9 +12876,9 @@ var platform$2 = {exports: {}};
|
|
|
12876
12876
|
root.platform = platform;
|
|
12877
12877
|
}
|
|
12878
12878
|
}.call(commonjsGlobal));
|
|
12879
|
-
} (platform$
|
|
12879
|
+
} (platform$3, platform$3.exports));
|
|
12880
12880
|
|
|
12881
|
-
var platform$
|
|
12881
|
+
var platform$2 = platform$3.exports;
|
|
12882
12882
|
|
|
12883
12883
|
// Generated ESM version of ua-parser-js
|
|
12884
12884
|
// DO NOT EDIT THIS FILE!
|
|
@@ -14111,21 +14111,21 @@ const getUAParserData = (userAgent) => {
|
|
|
14111
14111
|
}
|
|
14112
14112
|
return undefined;
|
|
14113
14113
|
};
|
|
14114
|
-
const isMobile = ['Android', 'iOS'].some((os) => { var _a, _b; return (_b = (_a = platform$
|
|
14115
|
-
|| ((_a = platform$
|
|
14114
|
+
const isMobile = ['Android', 'iOS'].some((os) => { var _a, _b; return (_b = (_a = platform$2.os) === null || _a === void 0 ? void 0 : _a.family) === null || _b === void 0 ? void 0 : _b.includes(os); })
|
|
14115
|
+
|| ((_a = platform$2.name) === null || _a === void 0 ? void 0 : _a.includes('Mobile'))
|
|
14116
14116
|
|| (navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform)); // For iPads
|
|
14117
|
-
const validNumericVersion = Number(((_c = (_b = platform$
|
|
14118
|
-
const isAndroid = ((_d = platform$
|
|
14119
|
-
const isIphone = ((_e = platform$
|
|
14117
|
+
const validNumericVersion = Number(((_c = (_b = platform$2.os) === null || _b === void 0 ? void 0 : _b.version) !== null && _c !== void 0 ? _c : '').split('.').slice(0, 2).join('.'));
|
|
14118
|
+
const isAndroid = ((_d = platform$2.os) === null || _d === void 0 ? void 0 : _d.family) === 'Android';
|
|
14119
|
+
const isIphone = ((_e = platform$2.os) === null || _e === void 0 ? void 0 : _e.family) === 'iOS';
|
|
14120
14120
|
const isFireFox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
14121
|
-
const isSupportedIosDevice = (((_f = platform$
|
|
14121
|
+
const isSupportedIosDevice = (((_f = platform$2.os) === null || _f === void 0 ? void 0 : _f.family) !== 'iOS' || (validNumericVersion || 14.4) >= 14.4);
|
|
14122
14122
|
const isSupportedDevice = 'MediaRecorder' in window && isSupportedIosDevice;
|
|
14123
|
-
const hasRotatedCameraIssue = (((_g = platform$
|
|
14123
|
+
const hasRotatedCameraIssue = (((_g = platform$2.os) === null || _g === void 0 ? void 0 : _g.family) === 'iOS' && validNumericVersion >= 18.4 && validNumericVersion < 18.6);
|
|
14124
14124
|
const PLATFORMS_OPTIONS = ['ANDROID', 'IOS', 'MACBOOK', 'WINDOWS'];
|
|
14125
14125
|
const BROWSERS_OPTIONS = ['CHROME', 'SAFARI', 'FIREFOX', 'SAMSUNG'];
|
|
14126
14126
|
const DEVICE = {
|
|
14127
|
-
PLATFORM: PLATFORMS_OPTIONS.find((p) => { var _a, _b; return (_b = (_a = platform$
|
|
14128
|
-
BROWSER: BROWSERS_OPTIONS.find((b) => { var _a; return (_a = platform$
|
|
14127
|
+
PLATFORM: PLATFORMS_OPTIONS.find((p) => { var _a, _b; return (_b = (_a = platform$2.os) === null || _a === void 0 ? void 0 : _a.family) === null || _b === void 0 ? void 0 : _b.toUpperCase().includes(p === 'MACBOOK' ? 'OS X' : p); }) || 'WINDOWS',
|
|
14128
|
+
BROWSER: BROWSERS_OPTIONS.find((b) => { var _a; return (_a = platform$2.name) === null || _a === void 0 ? void 0 : _a.toUpperCase().includes(b); }) || 'CHROME',
|
|
14129
14129
|
};
|
|
14130
14130
|
const isPortrait = () => {
|
|
14131
14131
|
if (typeof window.matchMedia !== 'undefined') {
|
|
@@ -32793,7 +32793,7 @@ const SKIPPED = '__SKIPPED';
|
|
|
32793
32793
|
* or else the return value of the original function.
|
|
32794
32794
|
*/
|
|
32795
32795
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32796
|
-
function throttle(
|
|
32796
|
+
function throttle$2(
|
|
32797
32797
|
fn,
|
|
32798
32798
|
maxCount,
|
|
32799
32799
|
durationSeconds,
|
|
@@ -32922,7 +32922,7 @@ class ReplayContainer {
|
|
|
32922
32922
|
maxWait: this._options.flushMaxDelay,
|
|
32923
32923
|
});
|
|
32924
32924
|
|
|
32925
|
-
this._throttledAddEvent = throttle(
|
|
32925
|
+
this._throttledAddEvent = throttle$2(
|
|
32926
32926
|
(event, isCheckout) => addEvent(this, event, isCheckout),
|
|
32927
32927
|
// Max 300 events...
|
|
32928
32928
|
300,
|
|
@@ -35475,7 +35475,7 @@ const configGenerator = () => {
|
|
|
35475
35475
|
let release;
|
|
35476
35476
|
try {
|
|
35477
35477
|
environment !== null && environment !== void 0 ? environment : (environment = "staging");
|
|
35478
|
-
release !== null && release !== void 0 ? release : (release = "1.1.
|
|
35478
|
+
release !== null && release !== void 0 ? release : (release = "1.1.54");
|
|
35479
35479
|
}
|
|
35480
35480
|
catch (_a) {
|
|
35481
35481
|
console.error('sentry configGenerator error');
|
|
@@ -36128,7 +36128,7 @@ var lib = {};
|
|
|
36128
36128
|
|
|
36129
36129
|
var players = {};
|
|
36130
36130
|
|
|
36131
|
-
var utils$
|
|
36131
|
+
var utils$4 = {};
|
|
36132
36132
|
|
|
36133
36133
|
var loadScript = function load (src, opts, cb) {
|
|
36134
36134
|
var head = document.head || document.getElementsByTagName('head')[0];
|
|
@@ -36327,20 +36327,20 @@ var deepmerge_1 = deepmerge;
|
|
|
36327
36327
|
|
|
36328
36328
|
var cjs = deepmerge_1;
|
|
36329
36329
|
|
|
36330
|
-
Object.defineProperty(utils$
|
|
36330
|
+
Object.defineProperty(utils$4, "__esModule", {
|
|
36331
36331
|
value: true
|
|
36332
36332
|
});
|
|
36333
|
-
utils$
|
|
36334
|
-
utils$
|
|
36335
|
-
utils$
|
|
36336
|
-
utils$
|
|
36337
|
-
utils$
|
|
36338
|
-
utils$
|
|
36339
|
-
utils$
|
|
36340
|
-
utils$
|
|
36341
|
-
utils$
|
|
36342
|
-
utils$
|
|
36343
|
-
utils$
|
|
36333
|
+
utils$4.parseStartTime = parseStartTime;
|
|
36334
|
+
utils$4.parseEndTime = parseEndTime;
|
|
36335
|
+
utils$4.randomString = randomString;
|
|
36336
|
+
utils$4.queryString = queryString;
|
|
36337
|
+
utils$4.getSDK = getSDK;
|
|
36338
|
+
utils$4.getConfig = getConfig;
|
|
36339
|
+
utils$4.omit = omit;
|
|
36340
|
+
utils$4.callPlayer = callPlayer;
|
|
36341
|
+
utils$4.isMediaStream = isMediaStream;
|
|
36342
|
+
utils$4.isBlobUrl = isBlobUrl;
|
|
36343
|
+
utils$4.supportsWebKitPresentationMode = supportsWebKitPresentationMode;
|
|
36344
36344
|
|
|
36345
36345
|
var _loadScript = _interopRequireDefault$2(loadScript);
|
|
36346
36346
|
|
|
@@ -36580,7 +36580,7 @@ Object.defineProperty(patterns, "__esModule", {
|
|
|
36580
36580
|
});
|
|
36581
36581
|
patterns.canPlay = patterns.FLV_EXTENSIONS = patterns.DASH_EXTENSIONS = patterns.HLS_EXTENSIONS = patterns.VIDEO_EXTENSIONS = patterns.AUDIO_EXTENSIONS = patterns.MATCH_URL_KALTURA = patterns.MATCH_URL_VIDYARD = patterns.MATCH_URL_MIXCLOUD = patterns.MATCH_URL_DAILYMOTION = patterns.MATCH_URL_TWITCH_CHANNEL = patterns.MATCH_URL_TWITCH_VIDEO = patterns.MATCH_URL_WISTIA = patterns.MATCH_URL_STREAMABLE = patterns.MATCH_URL_FACEBOOK_WATCH = patterns.MATCH_URL_FACEBOOK = patterns.MATCH_URL_VIMEO = patterns.MATCH_URL_SOUNDCLOUD = patterns.MATCH_URL_YOUTUBE = void 0;
|
|
36582
36582
|
|
|
36583
|
-
var _utils$1 = utils$
|
|
36583
|
+
var _utils$1 = utils$4;
|
|
36584
36584
|
|
|
36585
36585
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
36586
36586
|
|
|
@@ -36720,7 +36720,7 @@ function requireYouTube () {
|
|
|
36720
36720
|
|
|
36721
36721
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
36722
36722
|
|
|
36723
|
-
var _utils = utils$
|
|
36723
|
+
var _utils = utils$4;
|
|
36724
36724
|
|
|
36725
36725
|
var _patterns = patterns;
|
|
36726
36726
|
|
|
@@ -37076,7 +37076,7 @@ function requireSoundCloud () {
|
|
|
37076
37076
|
|
|
37077
37077
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
37078
37078
|
|
|
37079
|
-
var _utils = utils$
|
|
37079
|
+
var _utils = utils$4;
|
|
37080
37080
|
|
|
37081
37081
|
var _patterns = patterns;
|
|
37082
37082
|
|
|
@@ -37304,7 +37304,7 @@ function requireVimeo () {
|
|
|
37304
37304
|
|
|
37305
37305
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
37306
37306
|
|
|
37307
|
-
var _utils = utils$
|
|
37307
|
+
var _utils = utils$4;
|
|
37308
37308
|
|
|
37309
37309
|
var _patterns = patterns;
|
|
37310
37310
|
|
|
@@ -37575,7 +37575,7 @@ function requireFacebook () {
|
|
|
37575
37575
|
|
|
37576
37576
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
37577
37577
|
|
|
37578
|
-
var _utils = utils$
|
|
37578
|
+
var _utils = utils$4;
|
|
37579
37579
|
|
|
37580
37580
|
var _patterns = patterns;
|
|
37581
37581
|
|
|
@@ -37793,7 +37793,7 @@ function requireStreamable () {
|
|
|
37793
37793
|
|
|
37794
37794
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
37795
37795
|
|
|
37796
|
-
var _utils = utils$
|
|
37796
|
+
var _utils = utils$4;
|
|
37797
37797
|
|
|
37798
37798
|
var _patterns = patterns;
|
|
37799
37799
|
|
|
@@ -38006,7 +38006,7 @@ function requireWistia () {
|
|
|
38006
38006
|
|
|
38007
38007
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
38008
38008
|
|
|
38009
|
-
var _utils = utils$
|
|
38009
|
+
var _utils = utils$4;
|
|
38010
38010
|
|
|
38011
38011
|
var _patterns = patterns;
|
|
38012
38012
|
|
|
@@ -38273,7 +38273,7 @@ function requireTwitch () {
|
|
|
38273
38273
|
|
|
38274
38274
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
38275
38275
|
|
|
38276
|
-
var _utils = utils$
|
|
38276
|
+
var _utils = utils$4;
|
|
38277
38277
|
|
|
38278
38278
|
var _patterns = patterns;
|
|
38279
38279
|
|
|
@@ -38496,7 +38496,7 @@ function requireDailyMotion () {
|
|
|
38496
38496
|
|
|
38497
38497
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
38498
38498
|
|
|
38499
|
-
var _utils = utils$
|
|
38499
|
+
var _utils = utils$4;
|
|
38500
38500
|
|
|
38501
38501
|
var _patterns = patterns;
|
|
38502
38502
|
|
|
@@ -38734,7 +38734,7 @@ function requireMixcloud () {
|
|
|
38734
38734
|
|
|
38735
38735
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
38736
38736
|
|
|
38737
|
-
var _utils = utils$
|
|
38737
|
+
var _utils = utils$4;
|
|
38738
38738
|
|
|
38739
38739
|
var _patterns = patterns;
|
|
38740
38740
|
|
|
@@ -38936,7 +38936,7 @@ function requireVidyard () {
|
|
|
38936
38936
|
|
|
38937
38937
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
38938
38938
|
|
|
38939
|
-
var _utils = utils$
|
|
38939
|
+
var _utils = utils$4;
|
|
38940
38940
|
|
|
38941
38941
|
var _patterns = patterns;
|
|
38942
38942
|
|
|
@@ -39152,7 +39152,7 @@ function requireKaltura () {
|
|
|
39152
39152
|
|
|
39153
39153
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
39154
39154
|
|
|
39155
|
-
var _utils = utils$
|
|
39155
|
+
var _utils = utils$4;
|
|
39156
39156
|
|
|
39157
39157
|
var _patterns = patterns;
|
|
39158
39158
|
|
|
@@ -39366,7 +39366,7 @@ function requireFilePlayer () {
|
|
|
39366
39366
|
|
|
39367
39367
|
var _react = _interopRequireWildcard(React__default["default"]);
|
|
39368
39368
|
|
|
39369
|
-
var _utils = utils$
|
|
39369
|
+
var _utils = utils$4;
|
|
39370
39370
|
|
|
39371
39371
|
var _patterns = patterns;
|
|
39372
39372
|
|
|
@@ -39939,7 +39939,7 @@ function requireFilePlayer () {
|
|
|
39939
39939
|
|
|
39940
39940
|
var _react = React__default["default"];
|
|
39941
39941
|
|
|
39942
|
-
var _utils = utils$
|
|
39942
|
+
var _utils = utils$4;
|
|
39943
39943
|
|
|
39944
39944
|
var _patterns = patterns;
|
|
39945
39945
|
|
|
@@ -40506,7 +40506,7 @@ var Player = {};
|
|
|
40506
40506
|
|
|
40507
40507
|
var _props = props;
|
|
40508
40508
|
|
|
40509
|
-
var _utils = utils$
|
|
40509
|
+
var _utils = utils$4;
|
|
40510
40510
|
|
|
40511
40511
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
40512
40512
|
|
|
@@ -41149,7 +41149,7 @@ var _reactFastCompare = _interopRequireDefault(reactFastCompare);
|
|
|
41149
41149
|
|
|
41150
41150
|
var _props = props;
|
|
41151
41151
|
|
|
41152
|
-
var _utils = utils$
|
|
41152
|
+
var _utils = utils$4;
|
|
41153
41153
|
|
|
41154
41154
|
var _Player3 = _interopRequireDefault(Player);
|
|
41155
41155
|
|
|
@@ -41797,6 +41797,7 @@ function bind$1(fn, thisArg) {
|
|
|
41797
41797
|
|
|
41798
41798
|
const {toString} = Object.prototype;
|
|
41799
41799
|
const {getPrototypeOf} = Object;
|
|
41800
|
+
const {iterator, toStringTag} = Symbol;
|
|
41800
41801
|
|
|
41801
41802
|
const kindOf = (cache => thing => {
|
|
41802
41803
|
const str = toString.call(thing);
|
|
@@ -41923,7 +41924,7 @@ const isPlainObject = (val) => {
|
|
|
41923
41924
|
}
|
|
41924
41925
|
|
|
41925
41926
|
const prototype = getPrototypeOf(val);
|
|
41926
|
-
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(
|
|
41927
|
+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
|
41927
41928
|
};
|
|
41928
41929
|
|
|
41929
41930
|
/**
|
|
@@ -42000,6 +42001,8 @@ const isFormData = (thing) => {
|
|
|
42000
42001
|
*/
|
|
42001
42002
|
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
42002
42003
|
|
|
42004
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
|
|
42005
|
+
|
|
42003
42006
|
/**
|
|
42004
42007
|
* Trim excess whitespace off the beginning and end of a string
|
|
42005
42008
|
*
|
|
@@ -42272,13 +42275,13 @@ const isTypedArray = (TypedArray => {
|
|
|
42272
42275
|
* @returns {void}
|
|
42273
42276
|
*/
|
|
42274
42277
|
const forEachEntry = (obj, fn) => {
|
|
42275
|
-
const generator = obj && obj[
|
|
42278
|
+
const generator = obj && obj[iterator];
|
|
42276
42279
|
|
|
42277
|
-
const
|
|
42280
|
+
const _iterator = generator.call(obj);
|
|
42278
42281
|
|
|
42279
42282
|
let result;
|
|
42280
42283
|
|
|
42281
|
-
while ((result =
|
|
42284
|
+
while ((result = _iterator.next()) && !result.done) {
|
|
42282
42285
|
const pair = result.value;
|
|
42283
42286
|
fn.call(obj, pair[0], pair[1]);
|
|
42284
42287
|
}
|
|
@@ -42388,28 +42391,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
42388
42391
|
const noop$1 = () => {};
|
|
42389
42392
|
|
|
42390
42393
|
const toFiniteNumber = (value, defaultValue) => {
|
|
42391
|
-
value = +value;
|
|
42392
|
-
return Number.isFinite(value) ? value : defaultValue;
|
|
42393
|
-
};
|
|
42394
|
-
|
|
42395
|
-
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
42396
|
-
|
|
42397
|
-
const DIGIT = '0123456789';
|
|
42398
|
-
|
|
42399
|
-
const ALPHABET = {
|
|
42400
|
-
DIGIT,
|
|
42401
|
-
ALPHA,
|
|
42402
|
-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
42403
|
-
};
|
|
42404
|
-
|
|
42405
|
-
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
42406
|
-
let str = '';
|
|
42407
|
-
const {length} = alphabet;
|
|
42408
|
-
while (size--) {
|
|
42409
|
-
str += alphabet[Math.random() * length|0];
|
|
42410
|
-
}
|
|
42411
|
-
|
|
42412
|
-
return str;
|
|
42394
|
+
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
42413
42395
|
};
|
|
42414
42396
|
|
|
42415
42397
|
/**
|
|
@@ -42420,7 +42402,7 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
|
42420
42402
|
* @returns {boolean}
|
|
42421
42403
|
*/
|
|
42422
42404
|
function isSpecCompliantForm(thing) {
|
|
42423
|
-
return !!(thing && isFunction$1(thing.append) && thing[
|
|
42405
|
+
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
|
42424
42406
|
}
|
|
42425
42407
|
|
|
42426
42408
|
const toJSONObject = (obj) => {
|
|
@@ -42459,7 +42441,41 @@ const isAsyncFn = kindOfTest('AsyncFunction');
|
|
|
42459
42441
|
const isThenable = (thing) =>
|
|
42460
42442
|
thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
42461
42443
|
|
|
42462
|
-
|
|
42444
|
+
// original code
|
|
42445
|
+
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
42446
|
+
|
|
42447
|
+
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
42448
|
+
if (setImmediateSupported) {
|
|
42449
|
+
return setImmediate;
|
|
42450
|
+
}
|
|
42451
|
+
|
|
42452
|
+
return postMessageSupported ? ((token, callbacks) => {
|
|
42453
|
+
_global.addEventListener("message", ({source, data}) => {
|
|
42454
|
+
if (source === _global && data === token) {
|
|
42455
|
+
callbacks.length && callbacks.shift()();
|
|
42456
|
+
}
|
|
42457
|
+
}, false);
|
|
42458
|
+
|
|
42459
|
+
return (cb) => {
|
|
42460
|
+
callbacks.push(cb);
|
|
42461
|
+
_global.postMessage(token, "*");
|
|
42462
|
+
}
|
|
42463
|
+
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
42464
|
+
})(
|
|
42465
|
+
typeof setImmediate === 'function',
|
|
42466
|
+
isFunction$1(_global.postMessage)
|
|
42467
|
+
);
|
|
42468
|
+
|
|
42469
|
+
const asap = typeof queueMicrotask !== 'undefined' ?
|
|
42470
|
+
queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
|
|
42471
|
+
|
|
42472
|
+
// *********************
|
|
42473
|
+
|
|
42474
|
+
|
|
42475
|
+
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
42476
|
+
|
|
42477
|
+
|
|
42478
|
+
var utils$3 = {
|
|
42463
42479
|
isArray,
|
|
42464
42480
|
isArrayBuffer,
|
|
42465
42481
|
isBuffer,
|
|
@@ -42470,6 +42486,10 @@ var utils$2 = {
|
|
|
42470
42486
|
isBoolean,
|
|
42471
42487
|
isObject,
|
|
42472
42488
|
isPlainObject,
|
|
42489
|
+
isReadableStream,
|
|
42490
|
+
isRequest,
|
|
42491
|
+
isResponse,
|
|
42492
|
+
isHeaders,
|
|
42473
42493
|
isUndefined,
|
|
42474
42494
|
isDate,
|
|
42475
42495
|
isFile,
|
|
@@ -42505,12 +42525,13 @@ var utils$2 = {
|
|
|
42505
42525
|
findKey,
|
|
42506
42526
|
global: _global,
|
|
42507
42527
|
isContextDefined,
|
|
42508
|
-
ALPHABET,
|
|
42509
|
-
generateString,
|
|
42510
42528
|
isSpecCompliantForm,
|
|
42511
42529
|
toJSONObject,
|
|
42512
42530
|
isAsyncFn,
|
|
42513
|
-
isThenable
|
|
42531
|
+
isThenable,
|
|
42532
|
+
setImmediate: _setImmediate,
|
|
42533
|
+
asap,
|
|
42534
|
+
isIterable
|
|
42514
42535
|
};
|
|
42515
42536
|
|
|
42516
42537
|
/**
|
|
@@ -42538,10 +42559,13 @@ function AxiosError(message, code, config, request, response) {
|
|
|
42538
42559
|
code && (this.code = code);
|
|
42539
42560
|
config && (this.config = config);
|
|
42540
42561
|
request && (this.request = request);
|
|
42541
|
-
|
|
42562
|
+
if (response) {
|
|
42563
|
+
this.response = response;
|
|
42564
|
+
this.status = response.status ? response.status : null;
|
|
42565
|
+
}
|
|
42542
42566
|
}
|
|
42543
42567
|
|
|
42544
|
-
utils$
|
|
42568
|
+
utils$3.inherits(AxiosError, Error, {
|
|
42545
42569
|
toJSON: function toJSON() {
|
|
42546
42570
|
return {
|
|
42547
42571
|
// Standard
|
|
@@ -42556,9 +42580,9 @@ utils$2.inherits(AxiosError, Error, {
|
|
|
42556
42580
|
columnNumber: this.columnNumber,
|
|
42557
42581
|
stack: this.stack,
|
|
42558
42582
|
// Axios
|
|
42559
|
-
config: utils$
|
|
42583
|
+
config: utils$3.toJSONObject(this.config),
|
|
42560
42584
|
code: this.code,
|
|
42561
|
-
status: this.
|
|
42585
|
+
status: this.status
|
|
42562
42586
|
};
|
|
42563
42587
|
}
|
|
42564
42588
|
});
|
|
@@ -42591,7 +42615,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
|
42591
42615
|
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
42592
42616
|
const axiosError = Object.create(prototype$1);
|
|
42593
42617
|
|
|
42594
|
-
utils$
|
|
42618
|
+
utils$3.toFlatObject(error, axiosError, function filter(obj) {
|
|
42595
42619
|
return obj !== Error.prototype;
|
|
42596
42620
|
}, prop => {
|
|
42597
42621
|
return prop !== 'isAxiosError';
|
|
@@ -42619,7 +42643,7 @@ var httpAdapter = null;
|
|
|
42619
42643
|
* @returns {boolean}
|
|
42620
42644
|
*/
|
|
42621
42645
|
function isVisitable(thing) {
|
|
42622
|
-
return utils$
|
|
42646
|
+
return utils$3.isPlainObject(thing) || utils$3.isArray(thing);
|
|
42623
42647
|
}
|
|
42624
42648
|
|
|
42625
42649
|
/**
|
|
@@ -42630,7 +42654,7 @@ function isVisitable(thing) {
|
|
|
42630
42654
|
* @returns {string} the key without the brackets.
|
|
42631
42655
|
*/
|
|
42632
42656
|
function removeBrackets(key) {
|
|
42633
|
-
return utils$
|
|
42657
|
+
return utils$3.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
42634
42658
|
}
|
|
42635
42659
|
|
|
42636
42660
|
/**
|
|
@@ -42659,10 +42683,10 @@ function renderKey(path, key, dots) {
|
|
|
42659
42683
|
* @returns {boolean}
|
|
42660
42684
|
*/
|
|
42661
42685
|
function isFlatArray(arr) {
|
|
42662
|
-
return utils$
|
|
42686
|
+
return utils$3.isArray(arr) && !arr.some(isVisitable);
|
|
42663
42687
|
}
|
|
42664
42688
|
|
|
42665
|
-
const predicates = utils$
|
|
42689
|
+
const predicates = utils$3.toFlatObject(utils$3, {}, null, function filter(prop) {
|
|
42666
42690
|
return /^is[A-Z]/.test(prop);
|
|
42667
42691
|
});
|
|
42668
42692
|
|
|
@@ -42690,7 +42714,7 @@ const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter(prop)
|
|
|
42690
42714
|
* @returns
|
|
42691
42715
|
*/
|
|
42692
42716
|
function toFormData(obj, formData, options) {
|
|
42693
|
-
if (!utils$
|
|
42717
|
+
if (!utils$3.isObject(obj)) {
|
|
42694
42718
|
throw new TypeError('target must be an object');
|
|
42695
42719
|
}
|
|
42696
42720
|
|
|
@@ -42698,13 +42722,13 @@ function toFormData(obj, formData, options) {
|
|
|
42698
42722
|
formData = formData || new (FormData)();
|
|
42699
42723
|
|
|
42700
42724
|
// eslint-disable-next-line no-param-reassign
|
|
42701
|
-
options = utils$
|
|
42725
|
+
options = utils$3.toFlatObject(options, {
|
|
42702
42726
|
metaTokens: true,
|
|
42703
42727
|
dots: false,
|
|
42704
42728
|
indexes: false
|
|
42705
42729
|
}, false, function defined(option, source) {
|
|
42706
42730
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
42707
|
-
return !utils$
|
|
42731
|
+
return !utils$3.isUndefined(source[option]);
|
|
42708
42732
|
});
|
|
42709
42733
|
|
|
42710
42734
|
const metaTokens = options.metaTokens;
|
|
@@ -42713,24 +42737,28 @@ function toFormData(obj, formData, options) {
|
|
|
42713
42737
|
const dots = options.dots;
|
|
42714
42738
|
const indexes = options.indexes;
|
|
42715
42739
|
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
42716
|
-
const useBlob = _Blob && utils$
|
|
42740
|
+
const useBlob = _Blob && utils$3.isSpecCompliantForm(formData);
|
|
42717
42741
|
|
|
42718
|
-
if (!utils$
|
|
42742
|
+
if (!utils$3.isFunction(visitor)) {
|
|
42719
42743
|
throw new TypeError('visitor must be a function');
|
|
42720
42744
|
}
|
|
42721
42745
|
|
|
42722
42746
|
function convertValue(value) {
|
|
42723
42747
|
if (value === null) return '';
|
|
42724
42748
|
|
|
42725
|
-
if (utils$
|
|
42749
|
+
if (utils$3.isDate(value)) {
|
|
42726
42750
|
return value.toISOString();
|
|
42727
42751
|
}
|
|
42728
42752
|
|
|
42729
|
-
if (
|
|
42753
|
+
if (utils$3.isBoolean(value)) {
|
|
42754
|
+
return value.toString();
|
|
42755
|
+
}
|
|
42756
|
+
|
|
42757
|
+
if (!useBlob && utils$3.isBlob(value)) {
|
|
42730
42758
|
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
42731
42759
|
}
|
|
42732
42760
|
|
|
42733
|
-
if (utils$
|
|
42761
|
+
if (utils$3.isArrayBuffer(value) || utils$3.isTypedArray(value)) {
|
|
42734
42762
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
42735
42763
|
}
|
|
42736
42764
|
|
|
@@ -42751,20 +42779,20 @@ function toFormData(obj, formData, options) {
|
|
|
42751
42779
|
let arr = value;
|
|
42752
42780
|
|
|
42753
42781
|
if (value && !path && typeof value === 'object') {
|
|
42754
|
-
if (utils$
|
|
42782
|
+
if (utils$3.endsWith(key, '{}')) {
|
|
42755
42783
|
// eslint-disable-next-line no-param-reassign
|
|
42756
42784
|
key = metaTokens ? key : key.slice(0, -2);
|
|
42757
42785
|
// eslint-disable-next-line no-param-reassign
|
|
42758
42786
|
value = JSON.stringify(value);
|
|
42759
42787
|
} else if (
|
|
42760
|
-
(utils$
|
|
42761
|
-
((utils$
|
|
42788
|
+
(utils$3.isArray(value) && isFlatArray(value)) ||
|
|
42789
|
+
((utils$3.isFileList(value) || utils$3.endsWith(key, '[]')) && (arr = utils$3.toArray(value))
|
|
42762
42790
|
)) {
|
|
42763
42791
|
// eslint-disable-next-line no-param-reassign
|
|
42764
42792
|
key = removeBrackets(key);
|
|
42765
42793
|
|
|
42766
42794
|
arr.forEach(function each(el, index) {
|
|
42767
|
-
!(utils$
|
|
42795
|
+
!(utils$3.isUndefined(el) || el === null) && formData.append(
|
|
42768
42796
|
// eslint-disable-next-line no-nested-ternary
|
|
42769
42797
|
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
|
42770
42798
|
convertValue(el)
|
|
@@ -42792,7 +42820,7 @@ function toFormData(obj, formData, options) {
|
|
|
42792
42820
|
});
|
|
42793
42821
|
|
|
42794
42822
|
function build(value, path) {
|
|
42795
|
-
if (utils$
|
|
42823
|
+
if (utils$3.isUndefined(value)) return;
|
|
42796
42824
|
|
|
42797
42825
|
if (stack.indexOf(value) !== -1) {
|
|
42798
42826
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
@@ -42800,9 +42828,9 @@ function toFormData(obj, formData, options) {
|
|
|
42800
42828
|
|
|
42801
42829
|
stack.push(value);
|
|
42802
42830
|
|
|
42803
|
-
utils$
|
|
42804
|
-
const result = !(utils$
|
|
42805
|
-
formData, el, utils$
|
|
42831
|
+
utils$3.forEach(value, function each(el, key) {
|
|
42832
|
+
const result = !(utils$3.isUndefined(el) || el === null) && visitor.call(
|
|
42833
|
+
formData, el, utils$3.isString(key) ? key.trim() : key, path, exposedHelpers
|
|
42806
42834
|
);
|
|
42807
42835
|
|
|
42808
42836
|
if (result === true) {
|
|
@@ -42813,7 +42841,7 @@ function toFormData(obj, formData, options) {
|
|
|
42813
42841
|
stack.pop();
|
|
42814
42842
|
}
|
|
42815
42843
|
|
|
42816
|
-
if (!utils$
|
|
42844
|
+
if (!utils$3.isObject(obj)) {
|
|
42817
42845
|
throw new TypeError('data must be an object');
|
|
42818
42846
|
}
|
|
42819
42847
|
|
|
@@ -42898,7 +42926,7 @@ function encode(val) {
|
|
|
42898
42926
|
*
|
|
42899
42927
|
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
42900
42928
|
* @param {object} [params] The params to be appended
|
|
42901
|
-
* @param {?object} options
|
|
42929
|
+
* @param {?(object|Function)} options
|
|
42902
42930
|
*
|
|
42903
42931
|
* @returns {string} The formatted url
|
|
42904
42932
|
*/
|
|
@@ -42910,6 +42938,12 @@ function buildURL(url, params, options) {
|
|
|
42910
42938
|
|
|
42911
42939
|
const _encode = options && options.encode || encode;
|
|
42912
42940
|
|
|
42941
|
+
if (utils$3.isFunction(options)) {
|
|
42942
|
+
options = {
|
|
42943
|
+
serialize: options
|
|
42944
|
+
};
|
|
42945
|
+
}
|
|
42946
|
+
|
|
42913
42947
|
const serializeFn = options && options.serialize;
|
|
42914
42948
|
|
|
42915
42949
|
let serializedParams;
|
|
@@ -42917,7 +42951,7 @@ function buildURL(url, params, options) {
|
|
|
42917
42951
|
if (serializeFn) {
|
|
42918
42952
|
serializedParams = serializeFn(params, options);
|
|
42919
42953
|
} else {
|
|
42920
|
-
serializedParams = utils$
|
|
42954
|
+
serializedParams = utils$3.isURLSearchParams(params) ?
|
|
42921
42955
|
params.toString() :
|
|
42922
42956
|
new AxiosURLSearchParams(params, options).toString(_encode);
|
|
42923
42957
|
}
|
|
@@ -42992,7 +43026,7 @@ class InterceptorManager {
|
|
|
42992
43026
|
* @returns {void}
|
|
42993
43027
|
*/
|
|
42994
43028
|
forEach(fn) {
|
|
42995
|
-
utils$
|
|
43029
|
+
utils$3.forEach(this.handlers, function forEachHandler(h) {
|
|
42996
43030
|
if (h !== null) {
|
|
42997
43031
|
fn(h);
|
|
42998
43032
|
}
|
|
@@ -43012,6 +43046,20 @@ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
|
|
|
43012
43046
|
|
|
43013
43047
|
var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
|
43014
43048
|
|
|
43049
|
+
var platform$1 = {
|
|
43050
|
+
isBrowser: true,
|
|
43051
|
+
classes: {
|
|
43052
|
+
URLSearchParams: URLSearchParams$1,
|
|
43053
|
+
FormData: FormData$1,
|
|
43054
|
+
Blob: Blob$1
|
|
43055
|
+
},
|
|
43056
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
43057
|
+
};
|
|
43058
|
+
|
|
43059
|
+
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
43060
|
+
|
|
43061
|
+
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
43062
|
+
|
|
43015
43063
|
/**
|
|
43016
43064
|
* Determine if we're running in a standard browser environment
|
|
43017
43065
|
*
|
|
@@ -43029,18 +43077,8 @@ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
|
|
43029
43077
|
*
|
|
43030
43078
|
* @returns {boolean}
|
|
43031
43079
|
*/
|
|
43032
|
-
const
|
|
43033
|
-
|
|
43034
|
-
if (typeof navigator !== 'undefined' && (
|
|
43035
|
-
(product = navigator.product) === 'ReactNative' ||
|
|
43036
|
-
product === 'NativeScript' ||
|
|
43037
|
-
product === 'NS')
|
|
43038
|
-
) {
|
|
43039
|
-
return false;
|
|
43040
|
-
}
|
|
43041
|
-
|
|
43042
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
43043
|
-
})();
|
|
43080
|
+
const hasStandardBrowserEnv = hasBrowserEnv &&
|
|
43081
|
+
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
43044
43082
|
|
|
43045
43083
|
/**
|
|
43046
43084
|
* Determine if we're running in a standard browser webWorker environment
|
|
@@ -43051,7 +43089,7 @@ const isStandardBrowserEnv = (() => {
|
|
|
43051
43089
|
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
43052
43090
|
* This leads to a problem when axios post `FormData` in webWorker
|
|
43053
43091
|
*/
|
|
43054
|
-
|
|
43092
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
43055
43093
|
return (
|
|
43056
43094
|
typeof WorkerGlobalScope !== 'undefined' &&
|
|
43057
43095
|
// eslint-disable-next-line no-undef
|
|
@@ -43060,23 +43098,26 @@ const isStandardBrowserEnv = (() => {
|
|
|
43060
43098
|
);
|
|
43061
43099
|
})();
|
|
43062
43100
|
|
|
43101
|
+
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
43102
|
+
|
|
43103
|
+
var utils$2 = /*#__PURE__*/Object.freeze({
|
|
43104
|
+
__proto__: null,
|
|
43105
|
+
hasBrowserEnv: hasBrowserEnv,
|
|
43106
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
43107
|
+
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
43108
|
+
navigator: _navigator,
|
|
43109
|
+
origin: origin
|
|
43110
|
+
});
|
|
43063
43111
|
|
|
43064
43112
|
var platform = {
|
|
43065
|
-
|
|
43066
|
-
|
|
43067
|
-
URLSearchParams: URLSearchParams$1,
|
|
43068
|
-
FormData: FormData$1,
|
|
43069
|
-
Blob: Blob$1
|
|
43070
|
-
},
|
|
43071
|
-
isStandardBrowserEnv,
|
|
43072
|
-
isStandardBrowserWebWorkerEnv,
|
|
43073
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
43113
|
+
...utils$2,
|
|
43114
|
+
...platform$1
|
|
43074
43115
|
};
|
|
43075
43116
|
|
|
43076
43117
|
function toURLEncodedForm(data, options) {
|
|
43077
43118
|
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
|
43078
43119
|
visitor: function(value, key, path, helpers) {
|
|
43079
|
-
if (platform.isNode && utils$
|
|
43120
|
+
if (platform.isNode && utils$3.isBuffer(value)) {
|
|
43080
43121
|
this.append(key, value.toString('base64'));
|
|
43081
43122
|
return false;
|
|
43082
43123
|
}
|
|
@@ -43098,7 +43139,7 @@ function parsePropPath(name) {
|
|
|
43098
43139
|
// foo.x.y.z
|
|
43099
43140
|
// foo-x-y-z
|
|
43100
43141
|
// foo x y z
|
|
43101
|
-
return utils$
|
|
43142
|
+
return utils$3.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
43102
43143
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
43103
43144
|
});
|
|
43104
43145
|
}
|
|
@@ -43133,12 +43174,15 @@ function arrayToObject(arr) {
|
|
|
43133
43174
|
function formDataToJSON(formData) {
|
|
43134
43175
|
function buildPath(path, value, target, index) {
|
|
43135
43176
|
let name = path[index++];
|
|
43177
|
+
|
|
43178
|
+
if (name === '__proto__') return true;
|
|
43179
|
+
|
|
43136
43180
|
const isNumericKey = Number.isFinite(+name);
|
|
43137
43181
|
const isLast = index >= path.length;
|
|
43138
|
-
name = !name && utils$
|
|
43182
|
+
name = !name && utils$3.isArray(target) ? target.length : name;
|
|
43139
43183
|
|
|
43140
43184
|
if (isLast) {
|
|
43141
|
-
if (utils$
|
|
43185
|
+
if (utils$3.hasOwnProp(target, name)) {
|
|
43142
43186
|
target[name] = [target[name], value];
|
|
43143
43187
|
} else {
|
|
43144
43188
|
target[name] = value;
|
|
@@ -43147,23 +43191,23 @@ function formDataToJSON(formData) {
|
|
|
43147
43191
|
return !isNumericKey;
|
|
43148
43192
|
}
|
|
43149
43193
|
|
|
43150
|
-
if (!target[name] || !utils$
|
|
43194
|
+
if (!target[name] || !utils$3.isObject(target[name])) {
|
|
43151
43195
|
target[name] = [];
|
|
43152
43196
|
}
|
|
43153
43197
|
|
|
43154
43198
|
const result = buildPath(path, value, target[name], index);
|
|
43155
43199
|
|
|
43156
|
-
if (result && utils$
|
|
43200
|
+
if (result && utils$3.isArray(target[name])) {
|
|
43157
43201
|
target[name] = arrayToObject(target[name]);
|
|
43158
43202
|
}
|
|
43159
43203
|
|
|
43160
43204
|
return !isNumericKey;
|
|
43161
43205
|
}
|
|
43162
43206
|
|
|
43163
|
-
if (utils$
|
|
43207
|
+
if (utils$3.isFormData(formData) && utils$3.isFunction(formData.entries)) {
|
|
43164
43208
|
const obj = {};
|
|
43165
43209
|
|
|
43166
|
-
utils$
|
|
43210
|
+
utils$3.forEachEntry(formData, (name, value) => {
|
|
43167
43211
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
43168
43212
|
});
|
|
43169
43213
|
|
|
@@ -43184,10 +43228,10 @@ function formDataToJSON(formData) {
|
|
|
43184
43228
|
* @returns {string} A stringified version of the rawValue.
|
|
43185
43229
|
*/
|
|
43186
43230
|
function stringifySafely(rawValue, parser, encoder) {
|
|
43187
|
-
if (utils$
|
|
43231
|
+
if (utils$3.isString(rawValue)) {
|
|
43188
43232
|
try {
|
|
43189
43233
|
(parser || JSON.parse)(rawValue);
|
|
43190
|
-
return utils$
|
|
43234
|
+
return utils$3.trim(rawValue);
|
|
43191
43235
|
} catch (e) {
|
|
43192
43236
|
if (e.name !== 'SyntaxError') {
|
|
43193
43237
|
throw e;
|
|
@@ -43202,38 +43246,36 @@ const defaults = {
|
|
|
43202
43246
|
|
|
43203
43247
|
transitional: transitionalDefaults,
|
|
43204
43248
|
|
|
43205
|
-
adapter: ['xhr', 'http'],
|
|
43249
|
+
adapter: ['xhr', 'http', 'fetch'],
|
|
43206
43250
|
|
|
43207
43251
|
transformRequest: [function transformRequest(data, headers) {
|
|
43208
43252
|
const contentType = headers.getContentType() || '';
|
|
43209
43253
|
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
43210
|
-
const isObjectPayload = utils$
|
|
43254
|
+
const isObjectPayload = utils$3.isObject(data);
|
|
43211
43255
|
|
|
43212
|
-
if (isObjectPayload && utils$
|
|
43256
|
+
if (isObjectPayload && utils$3.isHTMLForm(data)) {
|
|
43213
43257
|
data = new FormData(data);
|
|
43214
43258
|
}
|
|
43215
43259
|
|
|
43216
|
-
const isFormData = utils$
|
|
43260
|
+
const isFormData = utils$3.isFormData(data);
|
|
43217
43261
|
|
|
43218
43262
|
if (isFormData) {
|
|
43219
|
-
if (!hasJSONContentType) {
|
|
43220
|
-
return data;
|
|
43221
|
-
}
|
|
43222
43263
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
43223
43264
|
}
|
|
43224
43265
|
|
|
43225
|
-
if (utils$
|
|
43226
|
-
utils$
|
|
43227
|
-
utils$
|
|
43228
|
-
utils$
|
|
43229
|
-
utils$
|
|
43266
|
+
if (utils$3.isArrayBuffer(data) ||
|
|
43267
|
+
utils$3.isBuffer(data) ||
|
|
43268
|
+
utils$3.isStream(data) ||
|
|
43269
|
+
utils$3.isFile(data) ||
|
|
43270
|
+
utils$3.isBlob(data) ||
|
|
43271
|
+
utils$3.isReadableStream(data)
|
|
43230
43272
|
) {
|
|
43231
43273
|
return data;
|
|
43232
43274
|
}
|
|
43233
|
-
if (utils$
|
|
43275
|
+
if (utils$3.isArrayBufferView(data)) {
|
|
43234
43276
|
return data.buffer;
|
|
43235
43277
|
}
|
|
43236
|
-
if (utils$
|
|
43278
|
+
if (utils$3.isURLSearchParams(data)) {
|
|
43237
43279
|
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
43238
43280
|
return data.toString();
|
|
43239
43281
|
}
|
|
@@ -43245,7 +43287,7 @@ const defaults = {
|
|
|
43245
43287
|
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
43246
43288
|
}
|
|
43247
43289
|
|
|
43248
|
-
if ((isFileList = utils$
|
|
43290
|
+
if ((isFileList = utils$3.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
43249
43291
|
const _FormData = this.env && this.env.FormData;
|
|
43250
43292
|
|
|
43251
43293
|
return toFormData(
|
|
@@ -43269,7 +43311,11 @@ const defaults = {
|
|
|
43269
43311
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
43270
43312
|
const JSONRequested = this.responseType === 'json';
|
|
43271
43313
|
|
|
43272
|
-
if (
|
|
43314
|
+
if (utils$3.isResponse(data) || utils$3.isReadableStream(data)) {
|
|
43315
|
+
return data;
|
|
43316
|
+
}
|
|
43317
|
+
|
|
43318
|
+
if (data && utils$3.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
43273
43319
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
43274
43320
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
43275
43321
|
|
|
@@ -43317,13 +43363,13 @@ const defaults = {
|
|
|
43317
43363
|
}
|
|
43318
43364
|
};
|
|
43319
43365
|
|
|
43320
|
-
utils$
|
|
43366
|
+
utils$3.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
43321
43367
|
defaults.headers[method] = {};
|
|
43322
43368
|
});
|
|
43323
43369
|
|
|
43324
43370
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
43325
43371
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
43326
|
-
const ignoreDuplicateOf = utils$
|
|
43372
|
+
const ignoreDuplicateOf = utils$3.toObjectSet([
|
|
43327
43373
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
43328
43374
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
43329
43375
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
@@ -43384,7 +43430,7 @@ function normalizeValue(value) {
|
|
|
43384
43430
|
return value;
|
|
43385
43431
|
}
|
|
43386
43432
|
|
|
43387
|
-
return utils$
|
|
43433
|
+
return utils$3.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
43388
43434
|
}
|
|
43389
43435
|
|
|
43390
43436
|
function parseTokens(str) {
|
|
@@ -43402,7 +43448,7 @@ function parseTokens(str) {
|
|
|
43402
43448
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
43403
43449
|
|
|
43404
43450
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
43405
|
-
if (utils$
|
|
43451
|
+
if (utils$3.isFunction(filter)) {
|
|
43406
43452
|
return filter.call(this, value, header);
|
|
43407
43453
|
}
|
|
43408
43454
|
|
|
@@ -43410,13 +43456,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
|
43410
43456
|
value = header;
|
|
43411
43457
|
}
|
|
43412
43458
|
|
|
43413
|
-
if (!utils$
|
|
43459
|
+
if (!utils$3.isString(value)) return;
|
|
43414
43460
|
|
|
43415
|
-
if (utils$
|
|
43461
|
+
if (utils$3.isString(filter)) {
|
|
43416
43462
|
return value.indexOf(filter) !== -1;
|
|
43417
43463
|
}
|
|
43418
43464
|
|
|
43419
|
-
if (utils$
|
|
43465
|
+
if (utils$3.isRegExp(filter)) {
|
|
43420
43466
|
return filter.test(value);
|
|
43421
43467
|
}
|
|
43422
43468
|
}
|
|
@@ -43429,7 +43475,7 @@ function formatHeader(header) {
|
|
|
43429
43475
|
}
|
|
43430
43476
|
|
|
43431
43477
|
function buildAccessors(obj, header) {
|
|
43432
|
-
const accessorName = utils$
|
|
43478
|
+
const accessorName = utils$3.toCamelCase(' ' + header);
|
|
43433
43479
|
|
|
43434
43480
|
['get', 'set', 'has'].forEach(methodName => {
|
|
43435
43481
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
@@ -43456,7 +43502,7 @@ class AxiosHeaders {
|
|
|
43456
43502
|
throw new Error('header name must be a non-empty string');
|
|
43457
43503
|
}
|
|
43458
43504
|
|
|
43459
|
-
const key = utils$
|
|
43505
|
+
const key = utils$3.findKey(self, lHeader);
|
|
43460
43506
|
|
|
43461
43507
|
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
|
|
43462
43508
|
self[key || _header] = normalizeValue(_value);
|
|
@@ -43464,12 +43510,24 @@ class AxiosHeaders {
|
|
|
43464
43510
|
}
|
|
43465
43511
|
|
|
43466
43512
|
const setHeaders = (headers, _rewrite) =>
|
|
43467
|
-
utils$
|
|
43513
|
+
utils$3.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
43468
43514
|
|
|
43469
|
-
if (utils$
|
|
43515
|
+
if (utils$3.isPlainObject(header) || header instanceof this.constructor) {
|
|
43470
43516
|
setHeaders(header, valueOrRewrite);
|
|
43471
|
-
} else if(utils$
|
|
43517
|
+
} else if(utils$3.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
43472
43518
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
43519
|
+
} else if (utils$3.isObject(header) && utils$3.isIterable(header)) {
|
|
43520
|
+
let obj = {}, dest, key;
|
|
43521
|
+
for (const entry of header) {
|
|
43522
|
+
if (!utils$3.isArray(entry)) {
|
|
43523
|
+
throw TypeError('Object iterator must return a key-value pair');
|
|
43524
|
+
}
|
|
43525
|
+
|
|
43526
|
+
obj[key = entry[0]] = (dest = obj[key]) ?
|
|
43527
|
+
(utils$3.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
|
|
43528
|
+
}
|
|
43529
|
+
|
|
43530
|
+
setHeaders(obj, valueOrRewrite);
|
|
43473
43531
|
} else {
|
|
43474
43532
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
43475
43533
|
}
|
|
@@ -43481,7 +43539,7 @@ class AxiosHeaders {
|
|
|
43481
43539
|
header = normalizeHeader(header);
|
|
43482
43540
|
|
|
43483
43541
|
if (header) {
|
|
43484
|
-
const key = utils$
|
|
43542
|
+
const key = utils$3.findKey(this, header);
|
|
43485
43543
|
|
|
43486
43544
|
if (key) {
|
|
43487
43545
|
const value = this[key];
|
|
@@ -43494,11 +43552,11 @@ class AxiosHeaders {
|
|
|
43494
43552
|
return parseTokens(value);
|
|
43495
43553
|
}
|
|
43496
43554
|
|
|
43497
|
-
if (utils$
|
|
43555
|
+
if (utils$3.isFunction(parser)) {
|
|
43498
43556
|
return parser.call(this, value, key);
|
|
43499
43557
|
}
|
|
43500
43558
|
|
|
43501
|
-
if (utils$
|
|
43559
|
+
if (utils$3.isRegExp(parser)) {
|
|
43502
43560
|
return parser.exec(value);
|
|
43503
43561
|
}
|
|
43504
43562
|
|
|
@@ -43511,7 +43569,7 @@ class AxiosHeaders {
|
|
|
43511
43569
|
header = normalizeHeader(header);
|
|
43512
43570
|
|
|
43513
43571
|
if (header) {
|
|
43514
|
-
const key = utils$
|
|
43572
|
+
const key = utils$3.findKey(this, header);
|
|
43515
43573
|
|
|
43516
43574
|
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
43517
43575
|
}
|
|
@@ -43527,7 +43585,7 @@ class AxiosHeaders {
|
|
|
43527
43585
|
_header = normalizeHeader(_header);
|
|
43528
43586
|
|
|
43529
43587
|
if (_header) {
|
|
43530
|
-
const key = utils$
|
|
43588
|
+
const key = utils$3.findKey(self, _header);
|
|
43531
43589
|
|
|
43532
43590
|
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
43533
43591
|
delete self[key];
|
|
@@ -43537,7 +43595,7 @@ class AxiosHeaders {
|
|
|
43537
43595
|
}
|
|
43538
43596
|
}
|
|
43539
43597
|
|
|
43540
|
-
if (utils$
|
|
43598
|
+
if (utils$3.isArray(header)) {
|
|
43541
43599
|
header.forEach(deleteHeader);
|
|
43542
43600
|
} else {
|
|
43543
43601
|
deleteHeader(header);
|
|
@@ -43566,8 +43624,8 @@ class AxiosHeaders {
|
|
|
43566
43624
|
const self = this;
|
|
43567
43625
|
const headers = {};
|
|
43568
43626
|
|
|
43569
|
-
utils$
|
|
43570
|
-
const key = utils$
|
|
43627
|
+
utils$3.forEach(this, (value, header) => {
|
|
43628
|
+
const key = utils$3.findKey(headers, header);
|
|
43571
43629
|
|
|
43572
43630
|
if (key) {
|
|
43573
43631
|
self[key] = normalizeValue(value);
|
|
@@ -43596,8 +43654,8 @@ class AxiosHeaders {
|
|
|
43596
43654
|
toJSON(asStrings) {
|
|
43597
43655
|
const obj = Object.create(null);
|
|
43598
43656
|
|
|
43599
|
-
utils$
|
|
43600
|
-
value != null && value !== false && (obj[header] = asStrings && utils$
|
|
43657
|
+
utils$3.forEach(this, (value, header) => {
|
|
43658
|
+
value != null && value !== false && (obj[header] = asStrings && utils$3.isArray(value) ? value.join(', ') : value);
|
|
43601
43659
|
});
|
|
43602
43660
|
|
|
43603
43661
|
return obj;
|
|
@@ -43611,6 +43669,10 @@ class AxiosHeaders {
|
|
|
43611
43669
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
|
43612
43670
|
}
|
|
43613
43671
|
|
|
43672
|
+
getSetCookie() {
|
|
43673
|
+
return this.get("set-cookie") || [];
|
|
43674
|
+
}
|
|
43675
|
+
|
|
43614
43676
|
get [Symbol.toStringTag]() {
|
|
43615
43677
|
return 'AxiosHeaders';
|
|
43616
43678
|
}
|
|
@@ -43644,7 +43706,7 @@ class AxiosHeaders {
|
|
|
43644
43706
|
}
|
|
43645
43707
|
}
|
|
43646
43708
|
|
|
43647
|
-
utils$
|
|
43709
|
+
utils$3.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
43648
43710
|
|
|
43649
43711
|
return this;
|
|
43650
43712
|
}
|
|
@@ -43653,7 +43715,7 @@ class AxiosHeaders {
|
|
|
43653
43715
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
43654
43716
|
|
|
43655
43717
|
// reserved names hotfix
|
|
43656
|
-
utils$
|
|
43718
|
+
utils$3.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
43657
43719
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
43658
43720
|
return {
|
|
43659
43721
|
get: () => value,
|
|
@@ -43663,7 +43725,7 @@ utils$2.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
|
43663
43725
|
}
|
|
43664
43726
|
});
|
|
43665
43727
|
|
|
43666
|
-
utils$
|
|
43728
|
+
utils$3.freezeMethods(AxiosHeaders);
|
|
43667
43729
|
|
|
43668
43730
|
/**
|
|
43669
43731
|
* Transform the data for a request or a response
|
|
@@ -43679,7 +43741,7 @@ function transformData(fns, response) {
|
|
|
43679
43741
|
const headers = AxiosHeaders.from(context.headers);
|
|
43680
43742
|
let data = context.data;
|
|
43681
43743
|
|
|
43682
|
-
utils$
|
|
43744
|
+
utils$3.forEach(fns, function transform(fn) {
|
|
43683
43745
|
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
43684
43746
|
});
|
|
43685
43747
|
|
|
@@ -43707,7 +43769,7 @@ function CanceledError(message, config, request) {
|
|
|
43707
43769
|
this.name = 'CanceledError';
|
|
43708
43770
|
}
|
|
43709
43771
|
|
|
43710
|
-
utils$
|
|
43772
|
+
utils$3.inherits(CanceledError, AxiosError, {
|
|
43711
43773
|
__CANCEL__: true
|
|
43712
43774
|
});
|
|
43713
43775
|
|
|
@@ -43735,162 +43797,6 @@ function settle(resolve, reject, response) {
|
|
|
43735
43797
|
}
|
|
43736
43798
|
}
|
|
43737
43799
|
|
|
43738
|
-
var cookies = platform.isStandardBrowserEnv ?
|
|
43739
|
-
|
|
43740
|
-
// Standard browser envs support document.cookie
|
|
43741
|
-
(function standardBrowserEnv() {
|
|
43742
|
-
return {
|
|
43743
|
-
write: function write(name, value, expires, path, domain, secure) {
|
|
43744
|
-
const cookie = [];
|
|
43745
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
|
43746
|
-
|
|
43747
|
-
if (utils$2.isNumber(expires)) {
|
|
43748
|
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
|
43749
|
-
}
|
|
43750
|
-
|
|
43751
|
-
if (utils$2.isString(path)) {
|
|
43752
|
-
cookie.push('path=' + path);
|
|
43753
|
-
}
|
|
43754
|
-
|
|
43755
|
-
if (utils$2.isString(domain)) {
|
|
43756
|
-
cookie.push('domain=' + domain);
|
|
43757
|
-
}
|
|
43758
|
-
|
|
43759
|
-
if (secure === true) {
|
|
43760
|
-
cookie.push('secure');
|
|
43761
|
-
}
|
|
43762
|
-
|
|
43763
|
-
document.cookie = cookie.join('; ');
|
|
43764
|
-
},
|
|
43765
|
-
|
|
43766
|
-
read: function read(name) {
|
|
43767
|
-
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
43768
|
-
return (match ? decodeURIComponent(match[3]) : null);
|
|
43769
|
-
},
|
|
43770
|
-
|
|
43771
|
-
remove: function remove(name) {
|
|
43772
|
-
this.write(name, '', Date.now() - 86400000);
|
|
43773
|
-
}
|
|
43774
|
-
};
|
|
43775
|
-
})() :
|
|
43776
|
-
|
|
43777
|
-
// Non standard browser env (web workers, react-native) lack needed support.
|
|
43778
|
-
(function nonStandardBrowserEnv() {
|
|
43779
|
-
return {
|
|
43780
|
-
write: function write() {},
|
|
43781
|
-
read: function read() { return null; },
|
|
43782
|
-
remove: function remove() {}
|
|
43783
|
-
};
|
|
43784
|
-
})();
|
|
43785
|
-
|
|
43786
|
-
/**
|
|
43787
|
-
* Determines whether the specified URL is absolute
|
|
43788
|
-
*
|
|
43789
|
-
* @param {string} url The URL to test
|
|
43790
|
-
*
|
|
43791
|
-
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
43792
|
-
*/
|
|
43793
|
-
function isAbsoluteURL(url) {
|
|
43794
|
-
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
43795
|
-
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
43796
|
-
// by any combination of letters, digits, plus, period, or hyphen.
|
|
43797
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
43798
|
-
}
|
|
43799
|
-
|
|
43800
|
-
/**
|
|
43801
|
-
* Creates a new URL by combining the specified URLs
|
|
43802
|
-
*
|
|
43803
|
-
* @param {string} baseURL The base URL
|
|
43804
|
-
* @param {string} relativeURL The relative URL
|
|
43805
|
-
*
|
|
43806
|
-
* @returns {string} The combined URL
|
|
43807
|
-
*/
|
|
43808
|
-
function combineURLs(baseURL, relativeURL) {
|
|
43809
|
-
return relativeURL
|
|
43810
|
-
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
43811
|
-
: baseURL;
|
|
43812
|
-
}
|
|
43813
|
-
|
|
43814
|
-
/**
|
|
43815
|
-
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
43816
|
-
* only when the requestedURL is not already an absolute URL.
|
|
43817
|
-
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
|
43818
|
-
*
|
|
43819
|
-
* @param {string} baseURL The base URL
|
|
43820
|
-
* @param {string} requestedURL Absolute or relative URL to combine
|
|
43821
|
-
*
|
|
43822
|
-
* @returns {string} The combined full path
|
|
43823
|
-
*/
|
|
43824
|
-
function buildFullPath(baseURL, requestedURL) {
|
|
43825
|
-
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
43826
|
-
return combineURLs(baseURL, requestedURL);
|
|
43827
|
-
}
|
|
43828
|
-
return requestedURL;
|
|
43829
|
-
}
|
|
43830
|
-
|
|
43831
|
-
var isURLSameOrigin = platform.isStandardBrowserEnv ?
|
|
43832
|
-
|
|
43833
|
-
// Standard browser envs have full support of the APIs needed to test
|
|
43834
|
-
// whether the request URL is of the same origin as current location.
|
|
43835
|
-
(function standardBrowserEnv() {
|
|
43836
|
-
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
43837
|
-
const urlParsingNode = document.createElement('a');
|
|
43838
|
-
let originURL;
|
|
43839
|
-
|
|
43840
|
-
/**
|
|
43841
|
-
* Parse a URL to discover it's components
|
|
43842
|
-
*
|
|
43843
|
-
* @param {String} url The URL to be parsed
|
|
43844
|
-
* @returns {Object}
|
|
43845
|
-
*/
|
|
43846
|
-
function resolveURL(url) {
|
|
43847
|
-
let href = url;
|
|
43848
|
-
|
|
43849
|
-
if (msie) {
|
|
43850
|
-
// IE needs attribute set twice to normalize properties
|
|
43851
|
-
urlParsingNode.setAttribute('href', href);
|
|
43852
|
-
href = urlParsingNode.href;
|
|
43853
|
-
}
|
|
43854
|
-
|
|
43855
|
-
urlParsingNode.setAttribute('href', href);
|
|
43856
|
-
|
|
43857
|
-
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
43858
|
-
return {
|
|
43859
|
-
href: urlParsingNode.href,
|
|
43860
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
43861
|
-
host: urlParsingNode.host,
|
|
43862
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
43863
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
43864
|
-
hostname: urlParsingNode.hostname,
|
|
43865
|
-
port: urlParsingNode.port,
|
|
43866
|
-
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
43867
|
-
urlParsingNode.pathname :
|
|
43868
|
-
'/' + urlParsingNode.pathname
|
|
43869
|
-
};
|
|
43870
|
-
}
|
|
43871
|
-
|
|
43872
|
-
originURL = resolveURL(window.location.href);
|
|
43873
|
-
|
|
43874
|
-
/**
|
|
43875
|
-
* Determine if a URL shares the same origin as the current location
|
|
43876
|
-
*
|
|
43877
|
-
* @param {String} requestURL The URL to test
|
|
43878
|
-
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
43879
|
-
*/
|
|
43880
|
-
return function isURLSameOrigin(requestURL) {
|
|
43881
|
-
const parsed = (utils$2.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
43882
|
-
return (parsed.protocol === originURL.protocol &&
|
|
43883
|
-
parsed.host === originURL.host);
|
|
43884
|
-
};
|
|
43885
|
-
})() :
|
|
43886
|
-
|
|
43887
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
43888
|
-
(function nonStandardBrowserEnv() {
|
|
43889
|
-
return function isURLSameOrigin() {
|
|
43890
|
-
return true;
|
|
43891
|
-
};
|
|
43892
|
-
})();
|
|
43893
|
-
|
|
43894
43800
|
function parseProtocol(url) {
|
|
43895
43801
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
43896
43802
|
return match && match[1] || '';
|
|
@@ -43948,11 +43854,54 @@ function speedometer(samplesCount, min) {
|
|
|
43948
43854
|
};
|
|
43949
43855
|
}
|
|
43950
43856
|
|
|
43951
|
-
|
|
43857
|
+
/**
|
|
43858
|
+
* Throttle decorator
|
|
43859
|
+
* @param {Function} fn
|
|
43860
|
+
* @param {Number} freq
|
|
43861
|
+
* @return {Function}
|
|
43862
|
+
*/
|
|
43863
|
+
function throttle(fn, freq) {
|
|
43864
|
+
let timestamp = 0;
|
|
43865
|
+
let threshold = 1000 / freq;
|
|
43866
|
+
let lastArgs;
|
|
43867
|
+
let timer;
|
|
43868
|
+
|
|
43869
|
+
const invoke = (args, now = Date.now()) => {
|
|
43870
|
+
timestamp = now;
|
|
43871
|
+
lastArgs = null;
|
|
43872
|
+
if (timer) {
|
|
43873
|
+
clearTimeout(timer);
|
|
43874
|
+
timer = null;
|
|
43875
|
+
}
|
|
43876
|
+
fn.apply(null, args);
|
|
43877
|
+
};
|
|
43878
|
+
|
|
43879
|
+
const throttled = (...args) => {
|
|
43880
|
+
const now = Date.now();
|
|
43881
|
+
const passed = now - timestamp;
|
|
43882
|
+
if ( passed >= threshold) {
|
|
43883
|
+
invoke(args, now);
|
|
43884
|
+
} else {
|
|
43885
|
+
lastArgs = args;
|
|
43886
|
+
if (!timer) {
|
|
43887
|
+
timer = setTimeout(() => {
|
|
43888
|
+
timer = null;
|
|
43889
|
+
invoke(lastArgs);
|
|
43890
|
+
}, threshold - passed);
|
|
43891
|
+
}
|
|
43892
|
+
}
|
|
43893
|
+
};
|
|
43894
|
+
|
|
43895
|
+
const flush = () => lastArgs && invoke(lastArgs);
|
|
43896
|
+
|
|
43897
|
+
return [throttled, flush];
|
|
43898
|
+
}
|
|
43899
|
+
|
|
43900
|
+
const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
43952
43901
|
let bytesNotified = 0;
|
|
43953
43902
|
const _speedometer = speedometer(50, 250);
|
|
43954
43903
|
|
|
43955
|
-
return e => {
|
|
43904
|
+
return throttle(e => {
|
|
43956
43905
|
const loaded = e.loaded;
|
|
43957
43906
|
const total = e.lengthComputable ? e.total : undefined;
|
|
43958
43907
|
const progressBytes = loaded - bytesNotified;
|
|
@@ -43968,61 +43917,302 @@ function progressEventReducer(listener, isDownloadStream) {
|
|
|
43968
43917
|
bytes: progressBytes,
|
|
43969
43918
|
rate: rate ? rate : undefined,
|
|
43970
43919
|
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
43971
|
-
event: e
|
|
43920
|
+
event: e,
|
|
43921
|
+
lengthComputable: total != null,
|
|
43922
|
+
[isDownloadStream ? 'download' : 'upload']: true
|
|
43972
43923
|
};
|
|
43973
43924
|
|
|
43974
|
-
data[isDownloadStream ? 'download' : 'upload'] = true;
|
|
43975
|
-
|
|
43976
43925
|
listener(data);
|
|
43926
|
+
}, freq);
|
|
43927
|
+
};
|
|
43928
|
+
|
|
43929
|
+
const progressEventDecorator = (total, throttled) => {
|
|
43930
|
+
const lengthComputable = total != null;
|
|
43931
|
+
|
|
43932
|
+
return [(loaded) => throttled[0]({
|
|
43933
|
+
lengthComputable,
|
|
43934
|
+
total,
|
|
43935
|
+
loaded
|
|
43936
|
+
}), throttled[1]];
|
|
43937
|
+
};
|
|
43938
|
+
|
|
43939
|
+
const asyncDecorator = (fn) => (...args) => utils$3.asap(() => fn(...args));
|
|
43940
|
+
|
|
43941
|
+
var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
|
|
43942
|
+
url = new URL(url, platform.origin);
|
|
43943
|
+
|
|
43944
|
+
return (
|
|
43945
|
+
origin.protocol === url.protocol &&
|
|
43946
|
+
origin.host === url.host &&
|
|
43947
|
+
(isMSIE || origin.port === url.port)
|
|
43948
|
+
);
|
|
43949
|
+
})(
|
|
43950
|
+
new URL(platform.origin),
|
|
43951
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
43952
|
+
) : () => true;
|
|
43953
|
+
|
|
43954
|
+
var cookies = platform.hasStandardBrowserEnv ?
|
|
43955
|
+
|
|
43956
|
+
// Standard browser envs support document.cookie
|
|
43957
|
+
{
|
|
43958
|
+
write(name, value, expires, path, domain, secure) {
|
|
43959
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
43960
|
+
|
|
43961
|
+
utils$3.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
43962
|
+
|
|
43963
|
+
utils$3.isString(path) && cookie.push('path=' + path);
|
|
43964
|
+
|
|
43965
|
+
utils$3.isString(domain) && cookie.push('domain=' + domain);
|
|
43966
|
+
|
|
43967
|
+
secure === true && cookie.push('secure');
|
|
43968
|
+
|
|
43969
|
+
document.cookie = cookie.join('; ');
|
|
43970
|
+
},
|
|
43971
|
+
|
|
43972
|
+
read(name) {
|
|
43973
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
43974
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
|
43975
|
+
},
|
|
43976
|
+
|
|
43977
|
+
remove(name) {
|
|
43978
|
+
this.write(name, '', Date.now() - 86400000);
|
|
43979
|
+
}
|
|
43980
|
+
}
|
|
43981
|
+
|
|
43982
|
+
:
|
|
43983
|
+
|
|
43984
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
43985
|
+
{
|
|
43986
|
+
write() {},
|
|
43987
|
+
read() {
|
|
43988
|
+
return null;
|
|
43989
|
+
},
|
|
43990
|
+
remove() {}
|
|
43977
43991
|
};
|
|
43992
|
+
|
|
43993
|
+
/**
|
|
43994
|
+
* Determines whether the specified URL is absolute
|
|
43995
|
+
*
|
|
43996
|
+
* @param {string} url The URL to test
|
|
43997
|
+
*
|
|
43998
|
+
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
43999
|
+
*/
|
|
44000
|
+
function isAbsoluteURL(url) {
|
|
44001
|
+
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
44002
|
+
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
44003
|
+
// by any combination of letters, digits, plus, period, or hyphen.
|
|
44004
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
43978
44005
|
}
|
|
43979
44006
|
|
|
43980
|
-
|
|
44007
|
+
/**
|
|
44008
|
+
* Creates a new URL by combining the specified URLs
|
|
44009
|
+
*
|
|
44010
|
+
* @param {string} baseURL The base URL
|
|
44011
|
+
* @param {string} relativeURL The relative URL
|
|
44012
|
+
*
|
|
44013
|
+
* @returns {string} The combined URL
|
|
44014
|
+
*/
|
|
44015
|
+
function combineURLs(baseURL, relativeURL) {
|
|
44016
|
+
return relativeURL
|
|
44017
|
+
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
44018
|
+
: baseURL;
|
|
44019
|
+
}
|
|
43981
44020
|
|
|
43982
|
-
|
|
43983
|
-
|
|
43984
|
-
|
|
43985
|
-
|
|
43986
|
-
|
|
43987
|
-
|
|
43988
|
-
|
|
43989
|
-
|
|
43990
|
-
|
|
43991
|
-
|
|
44021
|
+
/**
|
|
44022
|
+
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
44023
|
+
* only when the requestedURL is not already an absolute URL.
|
|
44024
|
+
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
|
44025
|
+
*
|
|
44026
|
+
* @param {string} baseURL The base URL
|
|
44027
|
+
* @param {string} requestedURL Absolute or relative URL to combine
|
|
44028
|
+
*
|
|
44029
|
+
* @returns {string} The combined full path
|
|
44030
|
+
*/
|
|
44031
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
44032
|
+
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
44033
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
|
|
44034
|
+
return combineURLs(baseURL, requestedURL);
|
|
44035
|
+
}
|
|
44036
|
+
return requestedURL;
|
|
44037
|
+
}
|
|
43992
44038
|
|
|
43993
|
-
|
|
43994
|
-
|
|
43995
|
-
|
|
44039
|
+
const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
|
|
44040
|
+
|
|
44041
|
+
/**
|
|
44042
|
+
* Config-specific merge-function which creates a new config-object
|
|
44043
|
+
* by merging two configuration objects together.
|
|
44044
|
+
*
|
|
44045
|
+
* @param {Object} config1
|
|
44046
|
+
* @param {Object} config2
|
|
44047
|
+
*
|
|
44048
|
+
* @returns {Object} New object resulting from merging config2 to config1
|
|
44049
|
+
*/
|
|
44050
|
+
function mergeConfig(config1, config2) {
|
|
44051
|
+
// eslint-disable-next-line no-param-reassign
|
|
44052
|
+
config2 = config2 || {};
|
|
44053
|
+
const config = {};
|
|
44054
|
+
|
|
44055
|
+
function getMergedValue(target, source, prop, caseless) {
|
|
44056
|
+
if (utils$3.isPlainObject(target) && utils$3.isPlainObject(source)) {
|
|
44057
|
+
return utils$3.merge.call({caseless}, target, source);
|
|
44058
|
+
} else if (utils$3.isPlainObject(source)) {
|
|
44059
|
+
return utils$3.merge({}, source);
|
|
44060
|
+
} else if (utils$3.isArray(source)) {
|
|
44061
|
+
return source.slice();
|
|
44062
|
+
}
|
|
44063
|
+
return source;
|
|
44064
|
+
}
|
|
44065
|
+
|
|
44066
|
+
// eslint-disable-next-line consistent-return
|
|
44067
|
+
function mergeDeepProperties(a, b, prop , caseless) {
|
|
44068
|
+
if (!utils$3.isUndefined(b)) {
|
|
44069
|
+
return getMergedValue(a, b, prop , caseless);
|
|
44070
|
+
} else if (!utils$3.isUndefined(a)) {
|
|
44071
|
+
return getMergedValue(undefined, a, prop , caseless);
|
|
43996
44072
|
}
|
|
44073
|
+
}
|
|
43997
44074
|
|
|
43998
|
-
|
|
44075
|
+
// eslint-disable-next-line consistent-return
|
|
44076
|
+
function valueFromConfig2(a, b) {
|
|
44077
|
+
if (!utils$3.isUndefined(b)) {
|
|
44078
|
+
return getMergedValue(undefined, b);
|
|
44079
|
+
}
|
|
44080
|
+
}
|
|
43999
44081
|
|
|
44000
|
-
|
|
44001
|
-
|
|
44002
|
-
|
|
44003
|
-
|
|
44004
|
-
|
|
44005
|
-
|
|
44006
|
-
|
|
44007
|
-
|
|
44082
|
+
// eslint-disable-next-line consistent-return
|
|
44083
|
+
function defaultToConfig2(a, b) {
|
|
44084
|
+
if (!utils$3.isUndefined(b)) {
|
|
44085
|
+
return getMergedValue(undefined, b);
|
|
44086
|
+
} else if (!utils$3.isUndefined(a)) {
|
|
44087
|
+
return getMergedValue(undefined, a);
|
|
44088
|
+
}
|
|
44089
|
+
}
|
|
44090
|
+
|
|
44091
|
+
// eslint-disable-next-line consistent-return
|
|
44092
|
+
function mergeDirectKeys(a, b, prop) {
|
|
44093
|
+
if (prop in config2) {
|
|
44094
|
+
return getMergedValue(a, b);
|
|
44095
|
+
} else if (prop in config1) {
|
|
44096
|
+
return getMergedValue(undefined, a);
|
|
44097
|
+
}
|
|
44098
|
+
}
|
|
44099
|
+
|
|
44100
|
+
const mergeMap = {
|
|
44101
|
+
url: valueFromConfig2,
|
|
44102
|
+
method: valueFromConfig2,
|
|
44103
|
+
data: valueFromConfig2,
|
|
44104
|
+
baseURL: defaultToConfig2,
|
|
44105
|
+
transformRequest: defaultToConfig2,
|
|
44106
|
+
transformResponse: defaultToConfig2,
|
|
44107
|
+
paramsSerializer: defaultToConfig2,
|
|
44108
|
+
timeout: defaultToConfig2,
|
|
44109
|
+
timeoutMessage: defaultToConfig2,
|
|
44110
|
+
withCredentials: defaultToConfig2,
|
|
44111
|
+
withXSRFToken: defaultToConfig2,
|
|
44112
|
+
adapter: defaultToConfig2,
|
|
44113
|
+
responseType: defaultToConfig2,
|
|
44114
|
+
xsrfCookieName: defaultToConfig2,
|
|
44115
|
+
xsrfHeaderName: defaultToConfig2,
|
|
44116
|
+
onUploadProgress: defaultToConfig2,
|
|
44117
|
+
onDownloadProgress: defaultToConfig2,
|
|
44118
|
+
decompress: defaultToConfig2,
|
|
44119
|
+
maxContentLength: defaultToConfig2,
|
|
44120
|
+
maxBodyLength: defaultToConfig2,
|
|
44121
|
+
beforeRedirect: defaultToConfig2,
|
|
44122
|
+
transport: defaultToConfig2,
|
|
44123
|
+
httpAgent: defaultToConfig2,
|
|
44124
|
+
httpsAgent: defaultToConfig2,
|
|
44125
|
+
cancelToken: defaultToConfig2,
|
|
44126
|
+
socketPath: defaultToConfig2,
|
|
44127
|
+
responseEncoding: defaultToConfig2,
|
|
44128
|
+
validateStatus: mergeDirectKeys,
|
|
44129
|
+
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
|
44130
|
+
};
|
|
44131
|
+
|
|
44132
|
+
utils$3.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
44133
|
+
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
44134
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
44135
|
+
(utils$3.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
44136
|
+
});
|
|
44137
|
+
|
|
44138
|
+
return config;
|
|
44139
|
+
}
|
|
44140
|
+
|
|
44141
|
+
var resolveConfig = (config) => {
|
|
44142
|
+
const newConfig = mergeConfig({}, config);
|
|
44143
|
+
|
|
44144
|
+
let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
|
|
44145
|
+
|
|
44146
|
+
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
44147
|
+
|
|
44148
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
44149
|
+
|
|
44150
|
+
// HTTP basic authentication
|
|
44151
|
+
if (auth) {
|
|
44152
|
+
headers.set('Authorization', 'Basic ' +
|
|
44153
|
+
btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
|
|
44154
|
+
);
|
|
44155
|
+
}
|
|
44156
|
+
|
|
44157
|
+
let contentType;
|
|
44158
|
+
|
|
44159
|
+
if (utils$3.isFormData(data)) {
|
|
44160
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
44161
|
+
headers.setContentType(undefined); // Let the browser set it
|
|
44162
|
+
} else if ((contentType = headers.getContentType()) !== false) {
|
|
44163
|
+
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
44164
|
+
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
|
44165
|
+
headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
|
44166
|
+
}
|
|
44167
|
+
}
|
|
44168
|
+
|
|
44169
|
+
// Add xsrf header
|
|
44170
|
+
// This is only done if running in a standard browser environment.
|
|
44171
|
+
// Specifically not if we're in a web worker, or react-native.
|
|
44172
|
+
|
|
44173
|
+
if (platform.hasStandardBrowserEnv) {
|
|
44174
|
+
withXSRFToken && utils$3.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
44175
|
+
|
|
44176
|
+
if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
|
|
44177
|
+
// Add xsrf header
|
|
44178
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
44179
|
+
|
|
44180
|
+
if (xsrfValue) {
|
|
44181
|
+
headers.set(xsrfHeaderName, xsrfValue);
|
|
44008
44182
|
}
|
|
44009
44183
|
}
|
|
44184
|
+
}
|
|
44010
44185
|
|
|
44011
|
-
|
|
44186
|
+
return newConfig;
|
|
44187
|
+
};
|
|
44188
|
+
|
|
44189
|
+
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
44190
|
+
|
|
44191
|
+
var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
44192
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
44193
|
+
const _config = resolveConfig(config);
|
|
44194
|
+
let requestData = _config.data;
|
|
44195
|
+
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
44196
|
+
let {responseType, onUploadProgress, onDownloadProgress} = _config;
|
|
44197
|
+
let onCanceled;
|
|
44198
|
+
let uploadThrottled, downloadThrottled;
|
|
44199
|
+
let flushUpload, flushDownload;
|
|
44200
|
+
|
|
44201
|
+
function done() {
|
|
44202
|
+
flushUpload && flushUpload(); // flush events
|
|
44203
|
+
flushDownload && flushDownload(); // flush events
|
|
44204
|
+
|
|
44205
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
44012
44206
|
|
|
44013
|
-
|
|
44014
|
-
if (config.auth) {
|
|
44015
|
-
const username = config.auth.username || '';
|
|
44016
|
-
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
|
44017
|
-
requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
|
|
44207
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
44018
44208
|
}
|
|
44019
44209
|
|
|
44020
|
-
|
|
44210
|
+
let request = new XMLHttpRequest();
|
|
44021
44211
|
|
|
44022
|
-
request.open(
|
|
44212
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
44023
44213
|
|
|
44024
44214
|
// Set the request timeout in MS
|
|
44025
|
-
request.timeout =
|
|
44215
|
+
request.timeout = _config.timeout;
|
|
44026
44216
|
|
|
44027
44217
|
function onloadend() {
|
|
44028
44218
|
if (!request) {
|
|
@@ -44102,10 +44292,10 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
44102
44292
|
|
|
44103
44293
|
// Handle timeout
|
|
44104
44294
|
request.ontimeout = function handleTimeout() {
|
|
44105
|
-
let timeoutErrorMessage =
|
|
44106
|
-
const transitional =
|
|
44107
|
-
if (
|
|
44108
|
-
timeoutErrorMessage =
|
|
44295
|
+
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
44296
|
+
const transitional = _config.transitional || transitionalDefaults;
|
|
44297
|
+
if (_config.timeoutErrorMessage) {
|
|
44298
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
44109
44299
|
}
|
|
44110
44300
|
reject(new AxiosError(
|
|
44111
44301
|
timeoutErrorMessage,
|
|
@@ -44117,50 +44307,42 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
44117
44307
|
request = null;
|
|
44118
44308
|
};
|
|
44119
44309
|
|
|
44120
|
-
// Add xsrf header
|
|
44121
|
-
// This is only done if running in a standard browser environment.
|
|
44122
|
-
// Specifically not if we're in a web worker, or react-native.
|
|
44123
|
-
if (platform.isStandardBrowserEnv) {
|
|
44124
|
-
// Add xsrf header
|
|
44125
|
-
// regarding CVE-2023-45857 config.withCredentials condition was removed temporarily
|
|
44126
|
-
const xsrfValue = isURLSameOrigin(fullPath) && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
44127
|
-
|
|
44128
|
-
if (xsrfValue) {
|
|
44129
|
-
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
44130
|
-
}
|
|
44131
|
-
}
|
|
44132
|
-
|
|
44133
44310
|
// Remove Content-Type if data is undefined
|
|
44134
44311
|
requestData === undefined && requestHeaders.setContentType(null);
|
|
44135
44312
|
|
|
44136
44313
|
// Add headers to the request
|
|
44137
44314
|
if ('setRequestHeader' in request) {
|
|
44138
|
-
utils$
|
|
44315
|
+
utils$3.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
44139
44316
|
request.setRequestHeader(key, val);
|
|
44140
44317
|
});
|
|
44141
44318
|
}
|
|
44142
44319
|
|
|
44143
44320
|
// Add withCredentials to request if needed
|
|
44144
|
-
if (!utils$
|
|
44145
|
-
request.withCredentials = !!
|
|
44321
|
+
if (!utils$3.isUndefined(_config.withCredentials)) {
|
|
44322
|
+
request.withCredentials = !!_config.withCredentials;
|
|
44146
44323
|
}
|
|
44147
44324
|
|
|
44148
44325
|
// Add responseType to request if needed
|
|
44149
44326
|
if (responseType && responseType !== 'json') {
|
|
44150
|
-
request.responseType =
|
|
44327
|
+
request.responseType = _config.responseType;
|
|
44151
44328
|
}
|
|
44152
44329
|
|
|
44153
44330
|
// Handle progress if needed
|
|
44154
|
-
if (
|
|
44155
|
-
|
|
44331
|
+
if (onDownloadProgress) {
|
|
44332
|
+
([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
|
|
44333
|
+
request.addEventListener('progress', downloadThrottled);
|
|
44156
44334
|
}
|
|
44157
44335
|
|
|
44158
44336
|
// Not all browsers support upload events
|
|
44159
|
-
if (
|
|
44160
|
-
|
|
44337
|
+
if (onUploadProgress && request.upload) {
|
|
44338
|
+
([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
|
|
44339
|
+
|
|
44340
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
44341
|
+
|
|
44342
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
44161
44343
|
}
|
|
44162
44344
|
|
|
44163
|
-
if (
|
|
44345
|
+
if (_config.cancelToken || _config.signal) {
|
|
44164
44346
|
// Handle cancellation
|
|
44165
44347
|
// eslint-disable-next-line func-names
|
|
44166
44348
|
onCanceled = cancel => {
|
|
@@ -44172,13 +44354,13 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
44172
44354
|
request = null;
|
|
44173
44355
|
};
|
|
44174
44356
|
|
|
44175
|
-
|
|
44176
|
-
if (
|
|
44177
|
-
|
|
44357
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
44358
|
+
if (_config.signal) {
|
|
44359
|
+
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
44178
44360
|
}
|
|
44179
44361
|
}
|
|
44180
44362
|
|
|
44181
|
-
const protocol = parseProtocol(
|
|
44363
|
+
const protocol = parseProtocol(_config.url);
|
|
44182
44364
|
|
|
44183
44365
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
44184
44366
|
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
|
@@ -44191,12 +44373,361 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
44191
44373
|
});
|
|
44192
44374
|
};
|
|
44193
44375
|
|
|
44376
|
+
const composeSignals = (signals, timeout) => {
|
|
44377
|
+
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
44378
|
+
|
|
44379
|
+
if (timeout || length) {
|
|
44380
|
+
let controller = new AbortController();
|
|
44381
|
+
|
|
44382
|
+
let aborted;
|
|
44383
|
+
|
|
44384
|
+
const onabort = function (reason) {
|
|
44385
|
+
if (!aborted) {
|
|
44386
|
+
aborted = true;
|
|
44387
|
+
unsubscribe();
|
|
44388
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
44389
|
+
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
44390
|
+
}
|
|
44391
|
+
};
|
|
44392
|
+
|
|
44393
|
+
let timer = timeout && setTimeout(() => {
|
|
44394
|
+
timer = null;
|
|
44395
|
+
onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
|
|
44396
|
+
}, timeout);
|
|
44397
|
+
|
|
44398
|
+
const unsubscribe = () => {
|
|
44399
|
+
if (signals) {
|
|
44400
|
+
timer && clearTimeout(timer);
|
|
44401
|
+
timer = null;
|
|
44402
|
+
signals.forEach(signal => {
|
|
44403
|
+
signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
|
|
44404
|
+
});
|
|
44405
|
+
signals = null;
|
|
44406
|
+
}
|
|
44407
|
+
};
|
|
44408
|
+
|
|
44409
|
+
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
44410
|
+
|
|
44411
|
+
const {signal} = controller;
|
|
44412
|
+
|
|
44413
|
+
signal.unsubscribe = () => utils$3.asap(unsubscribe);
|
|
44414
|
+
|
|
44415
|
+
return signal;
|
|
44416
|
+
}
|
|
44417
|
+
};
|
|
44418
|
+
|
|
44419
|
+
const streamChunk = function* (chunk, chunkSize) {
|
|
44420
|
+
let len = chunk.byteLength;
|
|
44421
|
+
|
|
44422
|
+
if (!chunkSize || len < chunkSize) {
|
|
44423
|
+
yield chunk;
|
|
44424
|
+
return;
|
|
44425
|
+
}
|
|
44426
|
+
|
|
44427
|
+
let pos = 0;
|
|
44428
|
+
let end;
|
|
44429
|
+
|
|
44430
|
+
while (pos < len) {
|
|
44431
|
+
end = pos + chunkSize;
|
|
44432
|
+
yield chunk.slice(pos, end);
|
|
44433
|
+
pos = end;
|
|
44434
|
+
}
|
|
44435
|
+
};
|
|
44436
|
+
|
|
44437
|
+
const readBytes = async function* (iterable, chunkSize) {
|
|
44438
|
+
for await (const chunk of readStream(iterable)) {
|
|
44439
|
+
yield* streamChunk(chunk, chunkSize);
|
|
44440
|
+
}
|
|
44441
|
+
};
|
|
44442
|
+
|
|
44443
|
+
const readStream = async function* (stream) {
|
|
44444
|
+
if (stream[Symbol.asyncIterator]) {
|
|
44445
|
+
yield* stream;
|
|
44446
|
+
return;
|
|
44447
|
+
}
|
|
44448
|
+
|
|
44449
|
+
const reader = stream.getReader();
|
|
44450
|
+
try {
|
|
44451
|
+
for (;;) {
|
|
44452
|
+
const {done, value} = await reader.read();
|
|
44453
|
+
if (done) {
|
|
44454
|
+
break;
|
|
44455
|
+
}
|
|
44456
|
+
yield value;
|
|
44457
|
+
}
|
|
44458
|
+
} finally {
|
|
44459
|
+
await reader.cancel();
|
|
44460
|
+
}
|
|
44461
|
+
};
|
|
44462
|
+
|
|
44463
|
+
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
44464
|
+
const iterator = readBytes(stream, chunkSize);
|
|
44465
|
+
|
|
44466
|
+
let bytes = 0;
|
|
44467
|
+
let done;
|
|
44468
|
+
let _onFinish = (e) => {
|
|
44469
|
+
if (!done) {
|
|
44470
|
+
done = true;
|
|
44471
|
+
onFinish && onFinish(e);
|
|
44472
|
+
}
|
|
44473
|
+
};
|
|
44474
|
+
|
|
44475
|
+
return new ReadableStream({
|
|
44476
|
+
async pull(controller) {
|
|
44477
|
+
try {
|
|
44478
|
+
const {done, value} = await iterator.next();
|
|
44479
|
+
|
|
44480
|
+
if (done) {
|
|
44481
|
+
_onFinish();
|
|
44482
|
+
controller.close();
|
|
44483
|
+
return;
|
|
44484
|
+
}
|
|
44485
|
+
|
|
44486
|
+
let len = value.byteLength;
|
|
44487
|
+
if (onProgress) {
|
|
44488
|
+
let loadedBytes = bytes += len;
|
|
44489
|
+
onProgress(loadedBytes);
|
|
44490
|
+
}
|
|
44491
|
+
controller.enqueue(new Uint8Array(value));
|
|
44492
|
+
} catch (err) {
|
|
44493
|
+
_onFinish(err);
|
|
44494
|
+
throw err;
|
|
44495
|
+
}
|
|
44496
|
+
},
|
|
44497
|
+
cancel(reason) {
|
|
44498
|
+
_onFinish(reason);
|
|
44499
|
+
return iterator.return();
|
|
44500
|
+
}
|
|
44501
|
+
}, {
|
|
44502
|
+
highWaterMark: 2
|
|
44503
|
+
})
|
|
44504
|
+
};
|
|
44505
|
+
|
|
44506
|
+
const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
|
|
44507
|
+
const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
|
|
44508
|
+
|
|
44509
|
+
// used only inside the fetch adapter
|
|
44510
|
+
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
44511
|
+
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
44512
|
+
async (str) => new Uint8Array(await new Response(str).arrayBuffer())
|
|
44513
|
+
);
|
|
44514
|
+
|
|
44515
|
+
const test = (fn, ...args) => {
|
|
44516
|
+
try {
|
|
44517
|
+
return !!fn(...args);
|
|
44518
|
+
} catch (e) {
|
|
44519
|
+
return false
|
|
44520
|
+
}
|
|
44521
|
+
};
|
|
44522
|
+
|
|
44523
|
+
const supportsRequestStream = isReadableStreamSupported && test(() => {
|
|
44524
|
+
let duplexAccessed = false;
|
|
44525
|
+
|
|
44526
|
+
const hasContentType = new Request(platform.origin, {
|
|
44527
|
+
body: new ReadableStream(),
|
|
44528
|
+
method: 'POST',
|
|
44529
|
+
get duplex() {
|
|
44530
|
+
duplexAccessed = true;
|
|
44531
|
+
return 'half';
|
|
44532
|
+
},
|
|
44533
|
+
}).headers.has('Content-Type');
|
|
44534
|
+
|
|
44535
|
+
return duplexAccessed && !hasContentType;
|
|
44536
|
+
});
|
|
44537
|
+
|
|
44538
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
44539
|
+
|
|
44540
|
+
const supportsResponseStream = isReadableStreamSupported &&
|
|
44541
|
+
test(() => utils$3.isReadableStream(new Response('').body));
|
|
44542
|
+
|
|
44543
|
+
|
|
44544
|
+
const resolvers = {
|
|
44545
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
44546
|
+
};
|
|
44547
|
+
|
|
44548
|
+
isFetchSupported && (((res) => {
|
|
44549
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
44550
|
+
!resolvers[type] && (resolvers[type] = utils$3.isFunction(res[type]) ? (res) => res[type]() :
|
|
44551
|
+
(_, config) => {
|
|
44552
|
+
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
44553
|
+
});
|
|
44554
|
+
});
|
|
44555
|
+
})(new Response));
|
|
44556
|
+
|
|
44557
|
+
const getBodyLength = async (body) => {
|
|
44558
|
+
if (body == null) {
|
|
44559
|
+
return 0;
|
|
44560
|
+
}
|
|
44561
|
+
|
|
44562
|
+
if(utils$3.isBlob(body)) {
|
|
44563
|
+
return body.size;
|
|
44564
|
+
}
|
|
44565
|
+
|
|
44566
|
+
if(utils$3.isSpecCompliantForm(body)) {
|
|
44567
|
+
const _request = new Request(platform.origin, {
|
|
44568
|
+
method: 'POST',
|
|
44569
|
+
body,
|
|
44570
|
+
});
|
|
44571
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
44572
|
+
}
|
|
44573
|
+
|
|
44574
|
+
if(utils$3.isArrayBufferView(body) || utils$3.isArrayBuffer(body)) {
|
|
44575
|
+
return body.byteLength;
|
|
44576
|
+
}
|
|
44577
|
+
|
|
44578
|
+
if(utils$3.isURLSearchParams(body)) {
|
|
44579
|
+
body = body + '';
|
|
44580
|
+
}
|
|
44581
|
+
|
|
44582
|
+
if(utils$3.isString(body)) {
|
|
44583
|
+
return (await encodeText(body)).byteLength;
|
|
44584
|
+
}
|
|
44585
|
+
};
|
|
44586
|
+
|
|
44587
|
+
const resolveBodyLength = async (headers, body) => {
|
|
44588
|
+
const length = utils$3.toFiniteNumber(headers.getContentLength());
|
|
44589
|
+
|
|
44590
|
+
return length == null ? getBodyLength(body) : length;
|
|
44591
|
+
};
|
|
44592
|
+
|
|
44593
|
+
var fetchAdapter = isFetchSupported && (async (config) => {
|
|
44594
|
+
let {
|
|
44595
|
+
url,
|
|
44596
|
+
method,
|
|
44597
|
+
data,
|
|
44598
|
+
signal,
|
|
44599
|
+
cancelToken,
|
|
44600
|
+
timeout,
|
|
44601
|
+
onDownloadProgress,
|
|
44602
|
+
onUploadProgress,
|
|
44603
|
+
responseType,
|
|
44604
|
+
headers,
|
|
44605
|
+
withCredentials = 'same-origin',
|
|
44606
|
+
fetchOptions
|
|
44607
|
+
} = resolveConfig(config);
|
|
44608
|
+
|
|
44609
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
44610
|
+
|
|
44611
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
44612
|
+
|
|
44613
|
+
let request;
|
|
44614
|
+
|
|
44615
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
44616
|
+
composedSignal.unsubscribe();
|
|
44617
|
+
});
|
|
44618
|
+
|
|
44619
|
+
let requestContentLength;
|
|
44620
|
+
|
|
44621
|
+
try {
|
|
44622
|
+
if (
|
|
44623
|
+
onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
|
|
44624
|
+
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
44625
|
+
) {
|
|
44626
|
+
let _request = new Request(url, {
|
|
44627
|
+
method: 'POST',
|
|
44628
|
+
body: data,
|
|
44629
|
+
duplex: "half"
|
|
44630
|
+
});
|
|
44631
|
+
|
|
44632
|
+
let contentTypeHeader;
|
|
44633
|
+
|
|
44634
|
+
if (utils$3.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
44635
|
+
headers.setContentType(contentTypeHeader);
|
|
44636
|
+
}
|
|
44637
|
+
|
|
44638
|
+
if (_request.body) {
|
|
44639
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
44640
|
+
requestContentLength,
|
|
44641
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
44642
|
+
);
|
|
44643
|
+
|
|
44644
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
44645
|
+
}
|
|
44646
|
+
}
|
|
44647
|
+
|
|
44648
|
+
if (!utils$3.isString(withCredentials)) {
|
|
44649
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
44650
|
+
}
|
|
44651
|
+
|
|
44652
|
+
// Cloudflare Workers throws when credentials are defined
|
|
44653
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
44654
|
+
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
44655
|
+
request = new Request(url, {
|
|
44656
|
+
...fetchOptions,
|
|
44657
|
+
signal: composedSignal,
|
|
44658
|
+
method: method.toUpperCase(),
|
|
44659
|
+
headers: headers.normalize().toJSON(),
|
|
44660
|
+
body: data,
|
|
44661
|
+
duplex: "half",
|
|
44662
|
+
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
44663
|
+
});
|
|
44664
|
+
|
|
44665
|
+
let response = await fetch(request, fetchOptions);
|
|
44666
|
+
|
|
44667
|
+
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
44668
|
+
|
|
44669
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
44670
|
+
const options = {};
|
|
44671
|
+
|
|
44672
|
+
['status', 'statusText', 'headers'].forEach(prop => {
|
|
44673
|
+
options[prop] = response[prop];
|
|
44674
|
+
});
|
|
44675
|
+
|
|
44676
|
+
const responseContentLength = utils$3.toFiniteNumber(response.headers.get('content-length'));
|
|
44677
|
+
|
|
44678
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
44679
|
+
responseContentLength,
|
|
44680
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
44681
|
+
) || [];
|
|
44682
|
+
|
|
44683
|
+
response = new Response(
|
|
44684
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
44685
|
+
flush && flush();
|
|
44686
|
+
unsubscribe && unsubscribe();
|
|
44687
|
+
}),
|
|
44688
|
+
options
|
|
44689
|
+
);
|
|
44690
|
+
}
|
|
44691
|
+
|
|
44692
|
+
responseType = responseType || 'text';
|
|
44693
|
+
|
|
44694
|
+
let responseData = await resolvers[utils$3.findKey(resolvers, responseType) || 'text'](response, config);
|
|
44695
|
+
|
|
44696
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
44697
|
+
|
|
44698
|
+
return await new Promise((resolve, reject) => {
|
|
44699
|
+
settle(resolve, reject, {
|
|
44700
|
+
data: responseData,
|
|
44701
|
+
headers: AxiosHeaders.from(response.headers),
|
|
44702
|
+
status: response.status,
|
|
44703
|
+
statusText: response.statusText,
|
|
44704
|
+
config,
|
|
44705
|
+
request
|
|
44706
|
+
});
|
|
44707
|
+
})
|
|
44708
|
+
} catch (err) {
|
|
44709
|
+
unsubscribe && unsubscribe();
|
|
44710
|
+
|
|
44711
|
+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
44712
|
+
throw Object.assign(
|
|
44713
|
+
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
|
44714
|
+
{
|
|
44715
|
+
cause: err.cause || err
|
|
44716
|
+
}
|
|
44717
|
+
)
|
|
44718
|
+
}
|
|
44719
|
+
|
|
44720
|
+
throw AxiosError.from(err, err && err.code, config, request);
|
|
44721
|
+
}
|
|
44722
|
+
});
|
|
44723
|
+
|
|
44194
44724
|
const knownAdapters = {
|
|
44195
44725
|
http: httpAdapter,
|
|
44196
|
-
xhr: xhrAdapter
|
|
44726
|
+
xhr: xhrAdapter,
|
|
44727
|
+
fetch: fetchAdapter
|
|
44197
44728
|
};
|
|
44198
44729
|
|
|
44199
|
-
utils$
|
|
44730
|
+
utils$3.forEach(knownAdapters, (fn, value) => {
|
|
44200
44731
|
if (fn) {
|
|
44201
44732
|
try {
|
|
44202
44733
|
Object.defineProperty(fn, 'name', {value});
|
|
@@ -44209,11 +44740,11 @@ utils$2.forEach(knownAdapters, (fn, value) => {
|
|
|
44209
44740
|
|
|
44210
44741
|
const renderReason = (reason) => `- ${reason}`;
|
|
44211
44742
|
|
|
44212
|
-
const isResolvedHandle = (adapter) => utils$
|
|
44743
|
+
const isResolvedHandle = (adapter) => utils$3.isFunction(adapter) || adapter === null || adapter === false;
|
|
44213
44744
|
|
|
44214
44745
|
var adapters = {
|
|
44215
44746
|
getAdapter: (adapters) => {
|
|
44216
|
-
adapters = utils$
|
|
44747
|
+
adapters = utils$3.isArray(adapters) ? adapters : [adapters];
|
|
44217
44748
|
|
|
44218
44749
|
const {length} = adapters;
|
|
44219
44750
|
let nameOrAdapter;
|
|
@@ -44337,108 +44868,7 @@ function dispatchRequest(config) {
|
|
|
44337
44868
|
});
|
|
44338
44869
|
}
|
|
44339
44870
|
|
|
44340
|
-
const
|
|
44341
|
-
|
|
44342
|
-
/**
|
|
44343
|
-
* Config-specific merge-function which creates a new config-object
|
|
44344
|
-
* by merging two configuration objects together.
|
|
44345
|
-
*
|
|
44346
|
-
* @param {Object} config1
|
|
44347
|
-
* @param {Object} config2
|
|
44348
|
-
*
|
|
44349
|
-
* @returns {Object} New object resulting from merging config2 to config1
|
|
44350
|
-
*/
|
|
44351
|
-
function mergeConfig(config1, config2) {
|
|
44352
|
-
// eslint-disable-next-line no-param-reassign
|
|
44353
|
-
config2 = config2 || {};
|
|
44354
|
-
const config = {};
|
|
44355
|
-
|
|
44356
|
-
function getMergedValue(target, source, caseless) {
|
|
44357
|
-
if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
|
|
44358
|
-
return utils$2.merge.call({caseless}, target, source);
|
|
44359
|
-
} else if (utils$2.isPlainObject(source)) {
|
|
44360
|
-
return utils$2.merge({}, source);
|
|
44361
|
-
} else if (utils$2.isArray(source)) {
|
|
44362
|
-
return source.slice();
|
|
44363
|
-
}
|
|
44364
|
-
return source;
|
|
44365
|
-
}
|
|
44366
|
-
|
|
44367
|
-
// eslint-disable-next-line consistent-return
|
|
44368
|
-
function mergeDeepProperties(a, b, caseless) {
|
|
44369
|
-
if (!utils$2.isUndefined(b)) {
|
|
44370
|
-
return getMergedValue(a, b, caseless);
|
|
44371
|
-
} else if (!utils$2.isUndefined(a)) {
|
|
44372
|
-
return getMergedValue(undefined, a, caseless);
|
|
44373
|
-
}
|
|
44374
|
-
}
|
|
44375
|
-
|
|
44376
|
-
// eslint-disable-next-line consistent-return
|
|
44377
|
-
function valueFromConfig2(a, b) {
|
|
44378
|
-
if (!utils$2.isUndefined(b)) {
|
|
44379
|
-
return getMergedValue(undefined, b);
|
|
44380
|
-
}
|
|
44381
|
-
}
|
|
44382
|
-
|
|
44383
|
-
// eslint-disable-next-line consistent-return
|
|
44384
|
-
function defaultToConfig2(a, b) {
|
|
44385
|
-
if (!utils$2.isUndefined(b)) {
|
|
44386
|
-
return getMergedValue(undefined, b);
|
|
44387
|
-
} else if (!utils$2.isUndefined(a)) {
|
|
44388
|
-
return getMergedValue(undefined, a);
|
|
44389
|
-
}
|
|
44390
|
-
}
|
|
44391
|
-
|
|
44392
|
-
// eslint-disable-next-line consistent-return
|
|
44393
|
-
function mergeDirectKeys(a, b, prop) {
|
|
44394
|
-
if (prop in config2) {
|
|
44395
|
-
return getMergedValue(a, b);
|
|
44396
|
-
} else if (prop in config1) {
|
|
44397
|
-
return getMergedValue(undefined, a);
|
|
44398
|
-
}
|
|
44399
|
-
}
|
|
44400
|
-
|
|
44401
|
-
const mergeMap = {
|
|
44402
|
-
url: valueFromConfig2,
|
|
44403
|
-
method: valueFromConfig2,
|
|
44404
|
-
data: valueFromConfig2,
|
|
44405
|
-
baseURL: defaultToConfig2,
|
|
44406
|
-
transformRequest: defaultToConfig2,
|
|
44407
|
-
transformResponse: defaultToConfig2,
|
|
44408
|
-
paramsSerializer: defaultToConfig2,
|
|
44409
|
-
timeout: defaultToConfig2,
|
|
44410
|
-
timeoutMessage: defaultToConfig2,
|
|
44411
|
-
withCredentials: defaultToConfig2,
|
|
44412
|
-
adapter: defaultToConfig2,
|
|
44413
|
-
responseType: defaultToConfig2,
|
|
44414
|
-
xsrfCookieName: defaultToConfig2,
|
|
44415
|
-
xsrfHeaderName: defaultToConfig2,
|
|
44416
|
-
onUploadProgress: defaultToConfig2,
|
|
44417
|
-
onDownloadProgress: defaultToConfig2,
|
|
44418
|
-
decompress: defaultToConfig2,
|
|
44419
|
-
maxContentLength: defaultToConfig2,
|
|
44420
|
-
maxBodyLength: defaultToConfig2,
|
|
44421
|
-
beforeRedirect: defaultToConfig2,
|
|
44422
|
-
transport: defaultToConfig2,
|
|
44423
|
-
httpAgent: defaultToConfig2,
|
|
44424
|
-
httpsAgent: defaultToConfig2,
|
|
44425
|
-
cancelToken: defaultToConfig2,
|
|
44426
|
-
socketPath: defaultToConfig2,
|
|
44427
|
-
responseEncoding: defaultToConfig2,
|
|
44428
|
-
validateStatus: mergeDirectKeys,
|
|
44429
|
-
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
44430
|
-
};
|
|
44431
|
-
|
|
44432
|
-
utils$2.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
44433
|
-
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
44434
|
-
const configValue = merge(config1[prop], config2[prop], prop);
|
|
44435
|
-
(utils$2.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
44436
|
-
});
|
|
44437
|
-
|
|
44438
|
-
return config;
|
|
44439
|
-
}
|
|
44440
|
-
|
|
44441
|
-
const VERSION = "1.6.0";
|
|
44871
|
+
const VERSION = "1.10.0";
|
|
44442
44872
|
|
|
44443
44873
|
const validators$1 = {};
|
|
44444
44874
|
|
|
@@ -44489,6 +44919,14 @@ validators$1.transitional = function transitional(validator, version, message) {
|
|
|
44489
44919
|
};
|
|
44490
44920
|
};
|
|
44491
44921
|
|
|
44922
|
+
validators$1.spelling = function spelling(correctSpelling) {
|
|
44923
|
+
return (value, opt) => {
|
|
44924
|
+
// eslint-disable-next-line no-console
|
|
44925
|
+
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
44926
|
+
return true;
|
|
44927
|
+
}
|
|
44928
|
+
};
|
|
44929
|
+
|
|
44492
44930
|
/**
|
|
44493
44931
|
* Assert object's properties type
|
|
44494
44932
|
*
|
|
@@ -44538,7 +44976,7 @@ const validators = validator.validators;
|
|
|
44538
44976
|
*/
|
|
44539
44977
|
class Axios {
|
|
44540
44978
|
constructor(instanceConfig) {
|
|
44541
|
-
this.defaults = instanceConfig;
|
|
44979
|
+
this.defaults = instanceConfig || {};
|
|
44542
44980
|
this.interceptors = {
|
|
44543
44981
|
request: new InterceptorManager(),
|
|
44544
44982
|
response: new InterceptorManager()
|
|
@@ -44553,7 +44991,34 @@ class Axios {
|
|
|
44553
44991
|
*
|
|
44554
44992
|
* @returns {Promise} The Promise to be fulfilled
|
|
44555
44993
|
*/
|
|
44556
|
-
request(configOrUrl, config) {
|
|
44994
|
+
async request(configOrUrl, config) {
|
|
44995
|
+
try {
|
|
44996
|
+
return await this._request(configOrUrl, config);
|
|
44997
|
+
} catch (err) {
|
|
44998
|
+
if (err instanceof Error) {
|
|
44999
|
+
let dummy = {};
|
|
45000
|
+
|
|
45001
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
45002
|
+
|
|
45003
|
+
// slice off the Error: ... line
|
|
45004
|
+
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
|
45005
|
+
try {
|
|
45006
|
+
if (!err.stack) {
|
|
45007
|
+
err.stack = stack;
|
|
45008
|
+
// match without the 2 top stack lines
|
|
45009
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
|
|
45010
|
+
err.stack += '\n' + stack;
|
|
45011
|
+
}
|
|
45012
|
+
} catch (e) {
|
|
45013
|
+
// ignore the case where "stack" is an un-writable property
|
|
45014
|
+
}
|
|
45015
|
+
}
|
|
45016
|
+
|
|
45017
|
+
throw err;
|
|
45018
|
+
}
|
|
45019
|
+
}
|
|
45020
|
+
|
|
45021
|
+
_request(configOrUrl, config) {
|
|
44557
45022
|
/*eslint no-param-reassign:0*/
|
|
44558
45023
|
// Allow for axios('example/url'[, config]) a la fetch API
|
|
44559
45024
|
if (typeof configOrUrl === 'string') {
|
|
@@ -44576,7 +45041,7 @@ class Axios {
|
|
|
44576
45041
|
}
|
|
44577
45042
|
|
|
44578
45043
|
if (paramsSerializer != null) {
|
|
44579
|
-
if (utils$
|
|
45044
|
+
if (utils$3.isFunction(paramsSerializer)) {
|
|
44580
45045
|
config.paramsSerializer = {
|
|
44581
45046
|
serialize: paramsSerializer
|
|
44582
45047
|
};
|
|
@@ -44588,16 +45053,28 @@ class Axios {
|
|
|
44588
45053
|
}
|
|
44589
45054
|
}
|
|
44590
45055
|
|
|
45056
|
+
// Set config.allowAbsoluteUrls
|
|
45057
|
+
if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
|
|
45058
|
+
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
45059
|
+
} else {
|
|
45060
|
+
config.allowAbsoluteUrls = true;
|
|
45061
|
+
}
|
|
45062
|
+
|
|
45063
|
+
validator.assertOptions(config, {
|
|
45064
|
+
baseUrl: validators.spelling('baseURL'),
|
|
45065
|
+
withXsrfToken: validators.spelling('withXSRFToken')
|
|
45066
|
+
}, true);
|
|
45067
|
+
|
|
44591
45068
|
// Set config.method
|
|
44592
45069
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
44593
45070
|
|
|
44594
45071
|
// Flatten headers
|
|
44595
|
-
let contextHeaders = headers && utils$
|
|
45072
|
+
let contextHeaders = headers && utils$3.merge(
|
|
44596
45073
|
headers.common,
|
|
44597
45074
|
headers[config.method]
|
|
44598
45075
|
);
|
|
44599
45076
|
|
|
44600
|
-
headers && utils$
|
|
45077
|
+
headers && utils$3.forEach(
|
|
44601
45078
|
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
44602
45079
|
(method) => {
|
|
44603
45080
|
delete headers[method];
|
|
@@ -44678,13 +45155,13 @@ class Axios {
|
|
|
44678
45155
|
|
|
44679
45156
|
getUri(config) {
|
|
44680
45157
|
config = mergeConfig(this.defaults, config);
|
|
44681
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
45158
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
44682
45159
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
44683
45160
|
}
|
|
44684
45161
|
}
|
|
44685
45162
|
|
|
44686
45163
|
// Provide aliases for supported request methods
|
|
44687
|
-
utils$
|
|
45164
|
+
utils$3.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
44688
45165
|
/*eslint func-names:0*/
|
|
44689
45166
|
Axios.prototype[method] = function(url, config) {
|
|
44690
45167
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -44695,7 +45172,7 @@ utils$2.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoDa
|
|
|
44695
45172
|
};
|
|
44696
45173
|
});
|
|
44697
45174
|
|
|
44698
|
-
utils$
|
|
45175
|
+
utils$3.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
44699
45176
|
/*eslint func-names:0*/
|
|
44700
45177
|
|
|
44701
45178
|
function generateHTTPMethod(isForm) {
|
|
@@ -44816,6 +45293,20 @@ class CancelToken {
|
|
|
44816
45293
|
}
|
|
44817
45294
|
}
|
|
44818
45295
|
|
|
45296
|
+
toAbortSignal() {
|
|
45297
|
+
const controller = new AbortController();
|
|
45298
|
+
|
|
45299
|
+
const abort = (err) => {
|
|
45300
|
+
controller.abort(err);
|
|
45301
|
+
};
|
|
45302
|
+
|
|
45303
|
+
this.subscribe(abort);
|
|
45304
|
+
|
|
45305
|
+
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
45306
|
+
|
|
45307
|
+
return controller.signal;
|
|
45308
|
+
}
|
|
45309
|
+
|
|
44819
45310
|
/**
|
|
44820
45311
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
44821
45312
|
* cancels the `CancelToken`.
|
|
@@ -44867,7 +45358,7 @@ function spread(callback) {
|
|
|
44867
45358
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
44868
45359
|
*/
|
|
44869
45360
|
function isAxiosError(payload) {
|
|
44870
|
-
return utils$
|
|
45361
|
+
return utils$3.isObject(payload) && (payload.isAxiosError === true);
|
|
44871
45362
|
}
|
|
44872
45363
|
|
|
44873
45364
|
const HttpStatusCode = {
|
|
@@ -44952,10 +45443,10 @@ function createInstance(defaultConfig) {
|
|
|
44952
45443
|
const instance = bind$1(Axios.prototype.request, context);
|
|
44953
45444
|
|
|
44954
45445
|
// Copy axios.prototype to instance
|
|
44955
|
-
utils$
|
|
45446
|
+
utils$3.extend(instance, Axios.prototype, context, {allOwnKeys: true});
|
|
44956
45447
|
|
|
44957
45448
|
// Copy context to instance
|
|
44958
|
-
utils$
|
|
45449
|
+
utils$3.extend(instance, context, null, {allOwnKeys: true});
|
|
44959
45450
|
|
|
44960
45451
|
// Factory for creating new instances
|
|
44961
45452
|
instance.create = function create(instanceConfig) {
|
|
@@ -44999,7 +45490,7 @@ axios.mergeConfig = mergeConfig;
|
|
|
44999
45490
|
|
|
45000
45491
|
axios.AxiosHeaders = AxiosHeaders;
|
|
45001
45492
|
|
|
45002
|
-
axios.formToJSON = thing => formDataToJSON(utils$
|
|
45493
|
+
axios.formToJSON = thing => formDataToJSON(utils$3.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
45003
45494
|
|
|
45004
45495
|
axios.getAdapter = adapters.getAdapter;
|
|
45005
45496
|
|
|
@@ -49506,7 +49997,7 @@ var Immediate = {
|
|
|
49506
49997
|
},
|
|
49507
49998
|
};
|
|
49508
49999
|
|
|
49509
|
-
var setImmediate = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate;
|
|
50000
|
+
var setImmediate$1 = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate;
|
|
49510
50001
|
var immediateProvider = {
|
|
49511
50002
|
setImmediate: function () {
|
|
49512
50003
|
var args = [];
|
|
@@ -49514,7 +50005,7 @@ var immediateProvider = {
|
|
|
49514
50005
|
args[_i] = arguments[_i];
|
|
49515
50006
|
}
|
|
49516
50007
|
var delegate = immediateProvider.delegate;
|
|
49517
|
-
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args)));
|
|
50008
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate$1).apply(void 0, __spreadArray([], __read(args)));
|
|
49518
50009
|
},
|
|
49519
50010
|
clearImmediate: function (handle) {
|
|
49520
50011
|
return (clearImmediate)(handle);
|
|
@@ -55121,7 +55612,7 @@ const DivComponent = React__default["default"].forwardRef((_a, ref) => {
|
|
|
55121
55612
|
return React__default["default"].createElement("div", Object.assign({ ref: ref }, props), children);
|
|
55122
55613
|
});
|
|
55123
55614
|
const Widget = React.forwardRef(({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }, clientRef) => {
|
|
55124
|
-
const widget_version = "1.1.
|
|
55615
|
+
const widget_version = "1.1.54";
|
|
55125
55616
|
const [isWidgetOpen, setIsWidgetOpen] = React.useState(false);
|
|
55126
55617
|
const [isWidgetMinimized, setIsWidgetMinimized] = React.useState(false);
|
|
55127
55618
|
const [isIncognitoMode, setIsIncognitoMode] = React.useState(false);
|