@carbon/ibmdotcom-services 2.42.0 → 2.44.0
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/es/services/KalturaPlayerV7/KalturaPlayer.js +366 -0
- package/es/services/KalturaPlayerV7/index.js +8 -0
- package/lib/services/KalturaPlayerV7/KalturaPlayer.js +371 -0
- package/lib/services/KalturaPlayerV7/index.js +13 -0
- package/package.json +3 -3
- package/umd/ibmdotcom-services.js +160 -50
- package/umd/ibmdotcom-services.min.js +2 -2
|
@@ -882,7 +882,7 @@
|
|
|
882
882
|
*
|
|
883
883
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
884
884
|
*/
|
|
885
|
-
var isUndefined = typeOfTest(
|
|
885
|
+
var isUndefined = typeOfTest('undefined');
|
|
886
886
|
|
|
887
887
|
/**
|
|
888
888
|
* Determine if a value is a Buffer
|
|
@@ -902,7 +902,7 @@
|
|
|
902
902
|
*
|
|
903
903
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
904
904
|
*/
|
|
905
|
-
var isArrayBuffer = kindOfTest(
|
|
905
|
+
var isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
906
906
|
|
|
907
907
|
/**
|
|
908
908
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -913,7 +913,7 @@
|
|
|
913
913
|
*/
|
|
914
914
|
function isArrayBufferView(val) {
|
|
915
915
|
var result;
|
|
916
|
-
if (typeof ArrayBuffer !==
|
|
916
|
+
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
917
917
|
result = ArrayBuffer.isView(val);
|
|
918
918
|
} else {
|
|
919
919
|
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
@@ -928,7 +928,7 @@
|
|
|
928
928
|
*
|
|
929
929
|
* @returns {boolean} True if value is a String, otherwise false
|
|
930
930
|
*/
|
|
931
|
-
var isString = typeOfTest(
|
|
931
|
+
var isString = typeOfTest('string');
|
|
932
932
|
|
|
933
933
|
/**
|
|
934
934
|
* Determine if a value is a Function
|
|
@@ -936,7 +936,7 @@
|
|
|
936
936
|
* @param {*} val The value to test
|
|
937
937
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
938
938
|
*/
|
|
939
|
-
var isFunction$1 = typeOfTest(
|
|
939
|
+
var isFunction$1 = typeOfTest('function');
|
|
940
940
|
|
|
941
941
|
/**
|
|
942
942
|
* Determine if a value is a Number
|
|
@@ -945,7 +945,7 @@
|
|
|
945
945
|
*
|
|
946
946
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
947
947
|
*/
|
|
948
|
-
var isNumber = typeOfTest(
|
|
948
|
+
var isNumber = typeOfTest('number');
|
|
949
949
|
|
|
950
950
|
/**
|
|
951
951
|
* Determine if a value is an Object
|
|
@@ -955,7 +955,7 @@
|
|
|
955
955
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
956
956
|
*/
|
|
957
957
|
var isObject = function isObject(thing) {
|
|
958
|
-
return thing !== null && _typeof$1(thing) ===
|
|
958
|
+
return thing !== null && _typeof$1(thing) === 'object';
|
|
959
959
|
};
|
|
960
960
|
|
|
961
961
|
/**
|
|
@@ -976,7 +976,7 @@
|
|
|
976
976
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
977
977
|
*/
|
|
978
978
|
var isPlainObject = function isPlainObject(val) {
|
|
979
|
-
if (kindOf(val) !==
|
|
979
|
+
if (kindOf(val) !== 'object') {
|
|
980
980
|
return false;
|
|
981
981
|
}
|
|
982
982
|
var prototype = getPrototypeOf$1(val);
|
|
@@ -1010,7 +1010,7 @@
|
|
|
1010
1010
|
*
|
|
1011
1011
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
1012
1012
|
*/
|
|
1013
|
-
var isDate = kindOfTest(
|
|
1013
|
+
var isDate = kindOfTest('Date');
|
|
1014
1014
|
|
|
1015
1015
|
/**
|
|
1016
1016
|
* Determine if a value is a File
|
|
@@ -1019,7 +1019,34 @@
|
|
|
1019
1019
|
*
|
|
1020
1020
|
* @returns {boolean} True if value is a File, otherwise false
|
|
1021
1021
|
*/
|
|
1022
|
-
var isFile = kindOfTest(
|
|
1022
|
+
var isFile = kindOfTest('File');
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* Determine if a value is a React Native Blob
|
|
1026
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
1027
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
1028
|
+
*
|
|
1029
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
1030
|
+
*
|
|
1031
|
+
* @param {*} value The value to test
|
|
1032
|
+
*
|
|
1033
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
1034
|
+
*/
|
|
1035
|
+
var isReactNativeBlob = function isReactNativeBlob(value) {
|
|
1036
|
+
return !!(value && typeof value.uri !== 'undefined');
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* Determine if environment is React Native
|
|
1041
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
1042
|
+
*
|
|
1043
|
+
* @param {*} formData The formData to test
|
|
1044
|
+
*
|
|
1045
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
1046
|
+
*/
|
|
1047
|
+
var isReactNative = function isReactNative(formData) {
|
|
1048
|
+
return formData && typeof formData.getParts !== 'undefined';
|
|
1049
|
+
};
|
|
1023
1050
|
|
|
1024
1051
|
/**
|
|
1025
1052
|
* Determine if a value is a Blob
|
|
@@ -1028,7 +1055,7 @@
|
|
|
1028
1055
|
*
|
|
1029
1056
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
1030
1057
|
*/
|
|
1031
|
-
var isBlob = kindOfTest(
|
|
1058
|
+
var isBlob = kindOfTest('Blob');
|
|
1032
1059
|
|
|
1033
1060
|
/**
|
|
1034
1061
|
* Determine if a value is a FileList
|
|
@@ -1037,7 +1064,7 @@
|
|
|
1037
1064
|
*
|
|
1038
1065
|
* @returns {boolean} True if value is a File, otherwise false
|
|
1039
1066
|
*/
|
|
1040
|
-
var isFileList = kindOfTest(
|
|
1067
|
+
var isFileList = kindOfTest('FileList');
|
|
1041
1068
|
|
|
1042
1069
|
/**
|
|
1043
1070
|
* Determine if a value is a Stream
|
|
@@ -1057,11 +1084,20 @@
|
|
|
1057
1084
|
*
|
|
1058
1085
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
1059
1086
|
*/
|
|
1087
|
+
function getGlobal() {
|
|
1088
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
1089
|
+
if (typeof self !== 'undefined') return self;
|
|
1090
|
+
if (typeof window !== 'undefined') return window;
|
|
1091
|
+
if (typeof global !== 'undefined') return global;
|
|
1092
|
+
return {};
|
|
1093
|
+
}
|
|
1094
|
+
var G = getGlobal();
|
|
1095
|
+
var FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
1060
1096
|
var isFormData = function isFormData(thing) {
|
|
1061
1097
|
var kind;
|
|
1062
|
-
return thing && (
|
|
1098
|
+
return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction$1(thing.append) && ((kind = kindOf(thing)) === 'formdata' ||
|
|
1063
1099
|
// detect form-data instance
|
|
1064
|
-
kind ===
|
|
1100
|
+
kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]'));
|
|
1065
1101
|
};
|
|
1066
1102
|
|
|
1067
1103
|
/**
|
|
@@ -1071,8 +1107,8 @@
|
|
|
1071
1107
|
*
|
|
1072
1108
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
1073
1109
|
*/
|
|
1074
|
-
var isURLSearchParams = kindOfTest(
|
|
1075
|
-
var _map = [
|
|
1110
|
+
var isURLSearchParams = kindOfTest('URLSearchParams');
|
|
1111
|
+
var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest),
|
|
1076
1112
|
_map2 = _slicedToArray(_map, 4),
|
|
1077
1113
|
isReadableStream = _map2[0],
|
|
1078
1114
|
isRequest = _map2[1],
|
|
@@ -1087,9 +1123,8 @@
|
|
|
1087
1123
|
* @returns {String} The String freed of excess whitespace
|
|
1088
1124
|
*/
|
|
1089
1125
|
var trim = function trim(str) {
|
|
1090
|
-
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
|
1126
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
1091
1127
|
};
|
|
1092
|
-
|
|
1093
1128
|
/**
|
|
1094
1129
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
1095
1130
|
*
|
|
@@ -1111,14 +1146,14 @@
|
|
|
1111
1146
|
_ref$allOwnKeys = _ref.allOwnKeys,
|
|
1112
1147
|
allOwnKeys = _ref$allOwnKeys === void 0 ? false : _ref$allOwnKeys;
|
|
1113
1148
|
// Don't bother if no value provided
|
|
1114
|
-
if (obj === null || typeof obj ===
|
|
1149
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
1115
1150
|
return;
|
|
1116
1151
|
}
|
|
1117
1152
|
var i;
|
|
1118
1153
|
var l;
|
|
1119
1154
|
|
|
1120
1155
|
// Force an array if not already something iterable
|
|
1121
|
-
if (_typeof$1(obj) !==
|
|
1156
|
+
if (_typeof$1(obj) !== 'object') {
|
|
1122
1157
|
/*eslint no-param-reassign:0*/
|
|
1123
1158
|
obj = [obj];
|
|
1124
1159
|
}
|
|
@@ -1143,6 +1178,15 @@
|
|
|
1143
1178
|
}
|
|
1144
1179
|
}
|
|
1145
1180
|
}
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
1184
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
1185
|
+
*
|
|
1186
|
+
* @param {Object} obj - The object to search.
|
|
1187
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
1188
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
1189
|
+
*/
|
|
1146
1190
|
function findKey(obj, key) {
|
|
1147
1191
|
if (isBuffer(obj)) {
|
|
1148
1192
|
return null;
|
|
@@ -1161,8 +1205,8 @@
|
|
|
1161
1205
|
}
|
|
1162
1206
|
var _global = function () {
|
|
1163
1207
|
/*eslint no-undef:0*/
|
|
1164
|
-
if (typeof globalThis !==
|
|
1165
|
-
return typeof self !==
|
|
1208
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
1209
|
+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
|
|
1166
1210
|
}();
|
|
1167
1211
|
var isContextDefined = function isContextDefined(context) {
|
|
1168
1212
|
return !isUndefined(context) && context !== _global;
|
|
@@ -1194,7 +1238,7 @@
|
|
|
1194
1238
|
var result = {};
|
|
1195
1239
|
var assignValue = function assignValue(val, key) {
|
|
1196
1240
|
// Skip dangerous property names to prevent prototype pollution
|
|
1197
|
-
if (key ===
|
|
1241
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
1198
1242
|
return;
|
|
1199
1243
|
}
|
|
1200
1244
|
var targetKey = caseless && findKey(result, key) || key;
|
|
@@ -1275,13 +1319,13 @@
|
|
|
1275
1319
|
*/
|
|
1276
1320
|
var inherits$1 = function inherits(constructor, superConstructor, props, descriptors) {
|
|
1277
1321
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
1278
|
-
Object.defineProperty(constructor.prototype,
|
|
1322
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
1279
1323
|
value: constructor,
|
|
1280
1324
|
writable: true,
|
|
1281
1325
|
enumerable: false,
|
|
1282
1326
|
configurable: true
|
|
1283
1327
|
});
|
|
1284
|
-
Object.defineProperty(constructor,
|
|
1328
|
+
Object.defineProperty(constructor, 'super', {
|
|
1285
1329
|
value: superConstructor.prototype
|
|
1286
1330
|
});
|
|
1287
1331
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -1371,7 +1415,7 @@
|
|
|
1371
1415
|
return function (thing) {
|
|
1372
1416
|
return TypedArray && thing instanceof TypedArray;
|
|
1373
1417
|
};
|
|
1374
|
-
}(typeof Uint8Array !==
|
|
1418
|
+
}(typeof Uint8Array !== 'undefined' && getPrototypeOf$1(Uint8Array));
|
|
1375
1419
|
|
|
1376
1420
|
/**
|
|
1377
1421
|
* For each entry in the object, call the function with the key and value.
|
|
@@ -1409,7 +1453,7 @@
|
|
|
1409
1453
|
};
|
|
1410
1454
|
|
|
1411
1455
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
1412
|
-
var isHTMLForm = kindOfTest(
|
|
1456
|
+
var isHTMLForm = kindOfTest('HTMLFormElement');
|
|
1413
1457
|
var toCamelCase = function toCamelCase(str) {
|
|
1414
1458
|
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
1415
1459
|
return p1.toUpperCase() + p2;
|
|
@@ -1431,7 +1475,7 @@
|
|
|
1431
1475
|
*
|
|
1432
1476
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
1433
1477
|
*/
|
|
1434
|
-
var isRegExp = kindOfTest(
|
|
1478
|
+
var isRegExp = kindOfTest('RegExp');
|
|
1435
1479
|
var reduceDescriptors = function reduceDescriptors(obj, reducer) {
|
|
1436
1480
|
var descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
1437
1481
|
var reducedDescriptors = {};
|
|
@@ -1452,13 +1496,13 @@
|
|
|
1452
1496
|
var freezeMethods = function freezeMethods(obj) {
|
|
1453
1497
|
reduceDescriptors(obj, function (descriptor, name) {
|
|
1454
1498
|
// skip restricted props in strict mode
|
|
1455
|
-
if (isFunction$1(obj) && [
|
|
1499
|
+
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
1456
1500
|
return false;
|
|
1457
1501
|
}
|
|
1458
1502
|
var value = obj[name];
|
|
1459
1503
|
if (!isFunction$1(value)) return;
|
|
1460
1504
|
descriptor.enumerable = false;
|
|
1461
|
-
if (
|
|
1505
|
+
if ('writable' in descriptor) {
|
|
1462
1506
|
descriptor.writable = false;
|
|
1463
1507
|
return;
|
|
1464
1508
|
}
|
|
@@ -1469,6 +1513,15 @@
|
|
|
1469
1513
|
}
|
|
1470
1514
|
});
|
|
1471
1515
|
};
|
|
1516
|
+
|
|
1517
|
+
/**
|
|
1518
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
1519
|
+
* Useful for fast membership checks.
|
|
1520
|
+
*
|
|
1521
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
1522
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
1523
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
1524
|
+
*/
|
|
1472
1525
|
var toObjectSet = function toObjectSet(arrayOrString, delimiter) {
|
|
1473
1526
|
var obj = {};
|
|
1474
1527
|
var define = function define(arr) {
|
|
@@ -1492,8 +1545,15 @@
|
|
|
1492
1545
|
* @returns {boolean}
|
|
1493
1546
|
*/
|
|
1494
1547
|
function isSpecCompliantForm(thing) {
|
|
1495
|
-
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] ===
|
|
1548
|
+
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
|
1496
1549
|
}
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
1553
|
+
*
|
|
1554
|
+
* @param {Object} obj - The object to convert.
|
|
1555
|
+
* @returns {Object} The JSON-compatible object.
|
|
1556
|
+
*/
|
|
1497
1557
|
var toJSONObject = function toJSONObject(obj) {
|
|
1498
1558
|
var stack = new Array(10);
|
|
1499
1559
|
var _visit = function visit(source, i) {
|
|
@@ -1506,7 +1566,7 @@
|
|
|
1506
1566
|
if (isBuffer(source)) {
|
|
1507
1567
|
return source;
|
|
1508
1568
|
}
|
|
1509
|
-
if (!(
|
|
1569
|
+
if (!('toJSON' in source)) {
|
|
1510
1570
|
stack[i] = source;
|
|
1511
1571
|
var target = isArray(source) ? [] : {};
|
|
1512
1572
|
forEach(source, function (value, key) {
|
|
@@ -1521,7 +1581,21 @@
|
|
|
1521
1581
|
};
|
|
1522
1582
|
return _visit(obj, 0);
|
|
1523
1583
|
};
|
|
1524
|
-
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* Determines if a value is an async function.
|
|
1587
|
+
*
|
|
1588
|
+
* @param {*} thing - The value to test.
|
|
1589
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
1590
|
+
*/
|
|
1591
|
+
var isAsyncFn = kindOfTest('AsyncFunction');
|
|
1592
|
+
|
|
1593
|
+
/**
|
|
1594
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
1595
|
+
*
|
|
1596
|
+
* @param {*} thing - The value to test.
|
|
1597
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
1598
|
+
*/
|
|
1525
1599
|
var isThenable = function isThenable(thing) {
|
|
1526
1600
|
return thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
1527
1601
|
};
|
|
@@ -1529,12 +1603,20 @@
|
|
|
1529
1603
|
// original code
|
|
1530
1604
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
1531
1605
|
|
|
1606
|
+
/**
|
|
1607
|
+
* Provides a cross-platform setImmediate implementation.
|
|
1608
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
1609
|
+
*
|
|
1610
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
1611
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
1612
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
1613
|
+
*/
|
|
1532
1614
|
var _setImmediate = function (setImmediateSupported, postMessageSupported) {
|
|
1533
1615
|
if (setImmediateSupported) {
|
|
1534
1616
|
return setImmediate;
|
|
1535
1617
|
}
|
|
1536
1618
|
return postMessageSupported ? function (token, callbacks) {
|
|
1537
|
-
_global.addEventListener(
|
|
1619
|
+
_global.addEventListener('message', function (_ref5) {
|
|
1538
1620
|
var source = _ref5.source,
|
|
1539
1621
|
data = _ref5.data;
|
|
1540
1622
|
if (source === _global && data === token) {
|
|
@@ -1543,13 +1625,20 @@
|
|
|
1543
1625
|
}, false);
|
|
1544
1626
|
return function (cb) {
|
|
1545
1627
|
callbacks.push(cb);
|
|
1546
|
-
_global.postMessage(token,
|
|
1628
|
+
_global.postMessage(token, '*');
|
|
1547
1629
|
};
|
|
1548
1630
|
}("axios@".concat(Math.random()), []) : function (cb) {
|
|
1549
1631
|
return setTimeout(cb);
|
|
1550
1632
|
};
|
|
1551
|
-
}(typeof setImmediate ===
|
|
1552
|
-
|
|
1633
|
+
}(typeof setImmediate === 'function', isFunction$1(_global.postMessage));
|
|
1634
|
+
|
|
1635
|
+
/**
|
|
1636
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
1637
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
1638
|
+
*
|
|
1639
|
+
* @type {Function}
|
|
1640
|
+
*/
|
|
1641
|
+
var asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : typeof process !== 'undefined' && process.nextTick || _setImmediate;
|
|
1553
1642
|
|
|
1554
1643
|
// *********************
|
|
1555
1644
|
|
|
@@ -1575,6 +1664,8 @@
|
|
|
1575
1664
|
isUndefined: isUndefined,
|
|
1576
1665
|
isDate: isDate,
|
|
1577
1666
|
isFile: isFile,
|
|
1667
|
+
isReactNativeBlob: isReactNativeBlob,
|
|
1668
|
+
isReactNative: isReactNative,
|
|
1578
1669
|
isBlob: isBlob,
|
|
1579
1670
|
isRegExp: isRegExp,
|
|
1580
1671
|
isFunction: isFunction$1,
|
|
@@ -1777,6 +1868,16 @@
|
|
|
1777
1868
|
var _this;
|
|
1778
1869
|
_classCallCheck$1(this, AxiosError);
|
|
1779
1870
|
_this = _callSuper$1(this, AxiosError, [message]);
|
|
1871
|
+
|
|
1872
|
+
// Make message enumerable to maintain backward compatibility
|
|
1873
|
+
// The native Error constructor sets message as non-enumerable,
|
|
1874
|
+
// but axios < v1.13.3 had it as enumerable
|
|
1875
|
+
Object.defineProperty(_this, 'message', {
|
|
1876
|
+
value: message,
|
|
1877
|
+
enumerable: true,
|
|
1878
|
+
writable: true,
|
|
1879
|
+
configurable: true
|
|
1880
|
+
});
|
|
1780
1881
|
_this.name = 'AxiosError';
|
|
1781
1882
|
_this.isAxiosError = true;
|
|
1782
1883
|
code && (_this.code = code);
|
|
@@ -1816,6 +1917,11 @@
|
|
|
1816
1917
|
var axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
1817
1918
|
axiosError.cause = error;
|
|
1818
1919
|
axiosError.name = error.name;
|
|
1920
|
+
|
|
1921
|
+
// Preserve status from the original error if not already set from response
|
|
1922
|
+
if (error.status != null && axiosError.status == null) {
|
|
1923
|
+
axiosError.status = error.status;
|
|
1924
|
+
}
|
|
1819
1925
|
customProps && Object.assign(axiosError, customProps);
|
|
1820
1926
|
return axiosError;
|
|
1821
1927
|
}
|
|
@@ -1971,6 +2077,10 @@
|
|
|
1971
2077
|
*/
|
|
1972
2078
|
function defaultVisitor(value, key, path) {
|
|
1973
2079
|
var arr = value;
|
|
2080
|
+
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
2081
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
2082
|
+
return false;
|
|
2083
|
+
}
|
|
1974
2084
|
if (value && !path && _typeof$1(value) === 'object') {
|
|
1975
2085
|
if (utils$1.endsWith(key, '{}')) {
|
|
1976
2086
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -2106,7 +2216,7 @@
|
|
|
2106
2216
|
serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
2107
2217
|
}
|
|
2108
2218
|
if (serializedParams) {
|
|
2109
|
-
var hashmarkIndex = url.indexOf(
|
|
2219
|
+
var hashmarkIndex = url.indexOf('#');
|
|
2110
2220
|
if (hashmarkIndex !== -1) {
|
|
2111
2221
|
url = url.slice(0, hashmarkIndex);
|
|
2112
2222
|
}
|
|
@@ -2481,7 +2591,7 @@
|
|
|
2481
2591
|
},
|
|
2482
2592
|
headers: {
|
|
2483
2593
|
common: {
|
|
2484
|
-
|
|
2594
|
+
Accept: 'application/json, text/plain, */*',
|
|
2485
2595
|
'Content-Type': undefined
|
|
2486
2596
|
}
|
|
2487
2597
|
}
|
|
@@ -2813,7 +2923,7 @@
|
|
|
2813
2923
|
}, {
|
|
2814
2924
|
key: "getSetCookie",
|
|
2815
2925
|
value: function getSetCookie() {
|
|
2816
|
-
return this.get(
|
|
2926
|
+
return this.get('set-cookie') || [];
|
|
2817
2927
|
}
|
|
2818
2928
|
}, {
|
|
2819
2929
|
key: Symbol.toStringTag,
|
|
@@ -3271,7 +3381,7 @@
|
|
|
3271
3381
|
}
|
|
3272
3382
|
};
|
|
3273
3383
|
utils$1.forEach(Object.keys(_objectSpread$2(_objectSpread$2({}, config1), config2)), function computeConfigValue(prop) {
|
|
3274
|
-
if (prop ===
|
|
3384
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
3275
3385
|
var merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
3276
3386
|
var configValue = merge(config1[prop], config2[prop], prop);
|
|
3277
3387
|
utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
@@ -4085,7 +4195,7 @@
|
|
|
4085
4195
|
_request = new Request(url, {
|
|
4086
4196
|
method: 'POST',
|
|
4087
4197
|
body: data,
|
|
4088
|
-
duplex:
|
|
4198
|
+
duplex: 'half'
|
|
4089
4199
|
});
|
|
4090
4200
|
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
4091
4201
|
headers.setContentType(contentTypeHeader);
|
|
@@ -4101,13 +4211,13 @@
|
|
|
4101
4211
|
|
|
4102
4212
|
// Cloudflare Workers throws when credentials are defined
|
|
4103
4213
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
4104
|
-
isCredentialsSupported = isRequestSupported &&
|
|
4214
|
+
isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
4105
4215
|
resolvedOptions = _objectSpread$1(_objectSpread$1({}, fetchOptions), {}, {
|
|
4106
4216
|
signal: composedSignal,
|
|
4107
4217
|
method: method.toUpperCase(),
|
|
4108
4218
|
headers: headers.normalize().toJSON(),
|
|
4109
4219
|
body: data,
|
|
4110
|
-
duplex:
|
|
4220
|
+
duplex: 'half',
|
|
4111
4221
|
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
4112
4222
|
});
|
|
4113
4223
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
@@ -4199,7 +4309,7 @@
|
|
|
4199
4309
|
* - `http` for Node.js
|
|
4200
4310
|
* - `xhr` for browsers
|
|
4201
4311
|
* - `fetch` for fetch API-based requests
|
|
4202
|
-
*
|
|
4312
|
+
*
|
|
4203
4313
|
* @type {Object<string, Function|Object>}
|
|
4204
4314
|
*/
|
|
4205
4315
|
var knownAdapters = {
|
|
@@ -4228,7 +4338,7 @@
|
|
|
4228
4338
|
|
|
4229
4339
|
/**
|
|
4230
4340
|
* Render a rejection reason string for unknown or unsupported adapters
|
|
4231
|
-
*
|
|
4341
|
+
*
|
|
4232
4342
|
* @param {string} reason
|
|
4233
4343
|
* @returns {string}
|
|
4234
4344
|
*/
|
|
@@ -4238,7 +4348,7 @@
|
|
|
4238
4348
|
|
|
4239
4349
|
/**
|
|
4240
4350
|
* Check if the adapter is resolved (function, null, or false)
|
|
4241
|
-
*
|
|
4351
|
+
*
|
|
4242
4352
|
* @param {Function|null|false} adapter
|
|
4243
4353
|
* @returns {boolean}
|
|
4244
4354
|
*/
|
|
@@ -4250,7 +4360,7 @@
|
|
|
4250
4360
|
* Get the first suitable adapter from the provided list.
|
|
4251
4361
|
* Tries each adapter in order until a supported one is found.
|
|
4252
4362
|
* Throws an AxiosError if no adapter is suitable.
|
|
4253
|
-
*
|
|
4363
|
+
*
|
|
4254
4364
|
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
4255
4365
|
* @param {Object} config - Axios request configuration
|
|
4256
4366
|
* @throws {AxiosError} If no suitable adapter is available
|
|
@@ -4361,7 +4471,7 @@
|
|
|
4361
4471
|
});
|
|
4362
4472
|
}
|
|
4363
4473
|
|
|
4364
|
-
var VERSION = "1.13.
|
|
4474
|
+
var VERSION = "1.13.6";
|
|
4365
4475
|
|
|
4366
4476
|
var validators$1 = {};
|
|
4367
4477
|
|
|
@@ -4384,7 +4494,7 @@
|
|
|
4384
4494
|
*/
|
|
4385
4495
|
validators$1.transitional = function transitional(validator, version, message) {
|
|
4386
4496
|
function formatMessage(opt, desc) {
|
|
4387
|
-
return '[Axios v' + VERSION +
|
|
4497
|
+
return '[Axios v' + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? '. ' + message : '');
|
|
4388
4498
|
}
|
|
4389
4499
|
|
|
4390
4500
|
// eslint-disable-next-line func-names
|