@bitrix24/b24jssdk 1.0.4 → 1.0.6
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/esm/_virtual/_commonjsHelpers.mjs +1 -1
- package/dist/esm/_virtual/protobuf.mjs +1 -1
- package/dist/esm/_virtual/protobuf2.mjs +1 -1
- package/dist/esm/core/abstract-b24.mjs +1 -1
- package/dist/esm/core/actions/abstract-action.mjs +1 -1
- package/dist/esm/core/actions/abstract-batch.mjs +1 -1
- package/dist/esm/core/actions/manager.mjs +1 -1
- package/dist/esm/core/actions/v2/batch-by-chunk.mjs +1 -1
- package/dist/esm/core/actions/v2/batch.mjs +1 -1
- package/dist/esm/core/actions/v2/call-list.mjs +7 -3
- package/dist/esm/core/actions/v2/call-list.mjs.map +1 -1
- package/dist/esm/core/actions/v2/call.mjs +1 -1
- package/dist/esm/core/actions/v2/fetch-list.mjs +7 -3
- package/dist/esm/core/actions/v2/fetch-list.mjs.map +1 -1
- package/dist/esm/core/actions/v2/manager-v2.mjs +1 -1
- package/dist/esm/core/actions/v3/batch-by-chunk.mjs +1 -1
- package/dist/esm/core/actions/v3/batch.mjs +1 -1
- package/dist/esm/core/actions/v3/call-list.mjs +9 -5
- package/dist/esm/core/actions/v3/call-list.mjs.map +1 -1
- package/dist/esm/core/actions/v3/call.mjs +1 -1
- package/dist/esm/core/actions/v3/fetch-list.mjs +9 -5
- package/dist/esm/core/actions/v3/fetch-list.mjs.map +1 -1
- package/dist/esm/core/actions/v3/manager-v3.mjs +1 -1
- package/dist/esm/core/http/abstract-http.mjs +2 -2
- package/dist/esm/core/http/ajax-error.mjs +1 -1
- package/dist/esm/core/http/ajax-result.mjs +1 -1
- package/dist/esm/core/http/limiters/adaptive-delayer.mjs +1 -1
- package/dist/esm/core/http/limiters/manager.mjs +1 -1
- package/dist/esm/core/http/limiters/operating-limiter.mjs +1 -1
- package/dist/esm/core/http/limiters/params-factory.mjs +1 -1
- package/dist/esm/core/http/limiters/rate-limiter.mjs +1 -1
- package/dist/esm/core/http/v2.mjs +2 -2
- package/dist/esm/core/http/v3.mjs +2 -2
- package/dist/esm/core/interaction/batch/abstract-interaction-batch.mjs +1 -1
- package/dist/esm/core/interaction/batch/parse-row.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/interface-strategy.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v2/abstract-processing.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v2/as-array.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v2/as-object.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v3/abstract-processing.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v3/as-array.mjs +1 -1
- package/dist/esm/core/interaction/batch/processing/v3/as-object.mjs +1 -1
- package/dist/esm/core/interaction/batch/v2.mjs +1 -1
- package/dist/esm/core/interaction/batch/v3.mjs +1 -1
- package/dist/esm/core/language/list.mjs +1 -1
- package/dist/esm/core/request-id-generator.mjs +1 -1
- package/dist/esm/core/result.mjs +1 -1
- package/dist/esm/core/sdk-error.mjs +1 -1
- package/dist/esm/core/tools/abstract-tool.mjs +1 -1
- package/dist/esm/core/tools/healthcheck.mjs +1 -1
- package/dist/esm/core/tools/manager.mjs +1 -1
- package/dist/esm/core/tools/ping.mjs +1 -1
- package/dist/esm/core/version-manager.mjs +1 -1
- package/dist/esm/frame/auth.mjs +1 -1
- package/dist/esm/frame/b24.mjs +1 -1
- package/dist/esm/frame/dialog.mjs +1 -1
- package/dist/esm/frame/frame.mjs +1 -1
- package/dist/esm/frame/message/commands.mjs +1 -1
- package/dist/esm/frame/message/controller.mjs +1 -1
- package/dist/esm/frame/options.mjs +1 -1
- package/dist/esm/frame/parent.mjs +1 -1
- package/dist/esm/frame/placement.mjs +1 -1
- package/dist/esm/frame/slider.mjs +1 -1
- package/dist/esm/helper/abstract-helper.mjs +1 -1
- package/dist/esm/helper/app-manager.mjs +1 -1
- package/dist/esm/helper/currency-manager.mjs +8 -2
- package/dist/esm/helper/currency-manager.mjs.map +1 -1
- package/dist/esm/helper/helper-manager.mjs +2 -2
- package/dist/esm/helper/license-manager.mjs +1 -1
- package/dist/esm/helper/options-manager.mjs +1 -1
- package/dist/esm/helper/payment-manager.mjs +1 -1
- package/dist/esm/helper/profile-manager.mjs +1 -1
- package/dist/esm/helper/use-b24-helper.mjs +1 -1
- package/dist/esm/hook/auth.mjs +1 -1
- package/dist/esm/hook/b24.mjs +1 -1
- package/dist/esm/index.d.mts +4 -4
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/loader-b24frame.mjs +1 -1
- package/dist/esm/logger/abstract-logger.mjs +1 -1
- package/dist/esm/logger/browser.mjs +1 -1
- package/dist/esm/logger/formatter/abstract-formatter.mjs +1 -1
- package/dist/esm/logger/formatter/json-formatter.mjs +1 -1
- package/dist/esm/logger/formatter/line-formatter.mjs +1 -1
- package/dist/esm/logger/formatter/telegram-formatter.mjs +1 -1
- package/dist/esm/logger/handler/abstract-handler.mjs +1 -1
- package/dist/esm/logger/handler/consola-adapter.mjs +1 -1
- package/dist/esm/logger/handler/console-handler.mjs +1 -1
- package/dist/esm/logger/handler/console-v2-handler.mjs +1 -1
- package/dist/esm/logger/handler/memory-handler.mjs +1 -1
- package/dist/esm/logger/handler/stream-handler.mjs +1 -1
- package/dist/esm/logger/handler/telegram-handler.mjs +1 -1
- package/dist/esm/logger/handler/winston-adapter.mjs +1 -1
- package/dist/esm/logger/logger-factory.mjs +1 -1
- package/dist/esm/logger/logger.mjs +1 -1
- package/dist/esm/logger/null-logger.mjs +1 -1
- package/dist/esm/logger/processor/memory-usage-processor.mjs +1 -1
- package/dist/esm/logger/processor/pid-processor.mjs +1 -1
- package/dist/esm/oauth/auth.mjs +1 -1
- package/dist/esm/oauth/b24.mjs +1 -1
- package/dist/esm/oauth/refresh-token-error.mjs +1 -1
- package/dist/esm/pullClient/abstract-connector.mjs +1 -1
- package/dist/esm/pullClient/channel-manager.mjs +1 -1
- package/dist/esm/pullClient/client.mjs +1 -1
- package/dist/esm/pullClient/errors.mjs +1 -1
- package/dist/esm/pullClient/json-rpc.mjs +1 -1
- package/dist/esm/pullClient/long-polling-connector.mjs +1 -1
- package/dist/esm/pullClient/protobuf/index.mjs +1 -1
- package/dist/esm/pullClient/protobuf/model.mjs +1 -1
- package/dist/esm/pullClient/protobuf/protobuf.mjs +1 -1
- package/dist/esm/pullClient/shared-config.mjs +1 -1
- package/dist/esm/pullClient/storage-manager.mjs +1 -1
- package/dist/esm/pullClient/web-socket-connector.mjs +1 -1
- package/dist/esm/tools/browser.mjs +1 -1
- package/dist/esm/tools/environment.mjs +1 -1
- package/dist/esm/tools/formatters/iban.mjs +1 -1
- package/dist/esm/tools/formatters/numbers.mjs +1 -1
- package/dist/esm/tools/index.mjs +1 -1
- package/dist/esm/tools/scroll-size.mjs +1 -1
- package/dist/esm/tools/text.mjs +1 -1
- package/dist/esm/tools/type.mjs +1 -1
- package/dist/esm/tools/use-formatters.mjs +1 -1
- package/dist/esm/tools/uuidv7.mjs +1 -1
- package/dist/esm/types/b24-helper.mjs +1 -1
- package/dist/esm/types/b24.mjs +1 -1
- package/dist/esm/types/bizproc/index.mjs +1 -1
- package/dist/esm/types/catalog/index.mjs +1 -1
- package/dist/esm/types/common.mjs +1 -1
- package/dist/esm/types/crm/entity-type.mjs +1 -1
- package/dist/esm/types/crm/productrow.mjs +1 -1
- package/dist/esm/types/logger.mjs +1 -1
- package/dist/esm/types/pull.mjs +1 -1
- package/dist/umd/index.js +1210 -832
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.min.js +29 -26
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +5 -5
package/dist/umd/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @package @bitrix24/b24jssdk
|
|
3
|
-
* @version 1.0.
|
|
3
|
+
* @version 1.0.6
|
|
4
4
|
* @copyright (c) 2026 Bitrix24
|
|
5
5
|
* @license MIT
|
|
6
6
|
* @see https://github.com/bitrix24/b24jssdk
|
|
@@ -12131,10 +12131,14 @@ ${JSON.stringify({
|
|
|
12131
12131
|
const idKey = options?.idKey ?? "ID";
|
|
12132
12132
|
const customKeyForResult = options?.customKeyForResult ?? null;
|
|
12133
12133
|
const params = options?.params ?? {};
|
|
12134
|
+
if ("order" in params && params["order"]) {
|
|
12135
|
+
this._logger.warning("callList.make: user-provided `order` parameter is ignored because cursor-based pagination requires ordering by idKey. Use `filter` to narrow results instead.");
|
|
12136
|
+
}
|
|
12134
12137
|
const moreIdKey = `>${idKey}`;
|
|
12138
|
+
const { order: _ignoredOrder, ...restParams } = params;
|
|
12135
12139
|
const requestParams = {
|
|
12136
|
-
...
|
|
12137
|
-
order: {
|
|
12140
|
+
...restParams,
|
|
12141
|
+
order: { [idKey]: "ASC" },
|
|
12138
12142
|
filter: { ...params["filter"] || {}, [moreIdKey]: 0 },
|
|
12139
12143
|
start: -1
|
|
12140
12144
|
};
|
|
@@ -12252,10 +12256,14 @@ ${JSON.stringify({
|
|
|
12252
12256
|
const idKey = options?.idKey ?? "ID";
|
|
12253
12257
|
const customKeyForResult = options?.customKeyForResult ?? null;
|
|
12254
12258
|
const params = options?.params ?? {};
|
|
12259
|
+
if ("order" in params && params["order"]) {
|
|
12260
|
+
this._logger.warning("fetchList.make: user-provided `order` parameter is ignored because cursor-based pagination requires ordering by idKey. Use `filter` to narrow results instead.");
|
|
12261
|
+
}
|
|
12255
12262
|
const moreIdKey = `>${idKey}`;
|
|
12263
|
+
const { order: _ignoredOrder, ...restParams } = params;
|
|
12256
12264
|
const requestParams = {
|
|
12257
|
-
...
|
|
12258
|
-
order: {
|
|
12265
|
+
...restParams,
|
|
12266
|
+
order: { [idKey]: "ASC" },
|
|
12259
12267
|
filter: { ...params["filter"] || {}, [moreIdKey]: 0 },
|
|
12260
12268
|
start: -1
|
|
12261
12269
|
};
|
|
@@ -12741,9 +12749,13 @@ ${JSON.stringify({
|
|
|
12741
12749
|
const idKey = options?.idKey ?? "id";
|
|
12742
12750
|
const customKeyForResult = options?.customKeyForResult ?? null;
|
|
12743
12751
|
const params = options?.params ?? {};
|
|
12752
|
+
if ("order" in params && params["order"]) {
|
|
12753
|
+
this._logger.warning("callList.make: user-provided `order` parameter is ignored because cursor-based pagination requires ordering by idKey. Use `filter` to narrow results instead.");
|
|
12754
|
+
}
|
|
12755
|
+
const { order: _ignoredOrder, ...restParams } = params;
|
|
12744
12756
|
const requestParams = {
|
|
12745
|
-
...
|
|
12746
|
-
order: {
|
|
12757
|
+
...restParams,
|
|
12758
|
+
order: { [idKey]: "ASC" },
|
|
12747
12759
|
filter: [...params["filter"] || []],
|
|
12748
12760
|
pagination: { page: 0, limit: batchSize }
|
|
12749
12761
|
};
|
|
@@ -12751,11 +12763,11 @@ ${JSON.stringify({
|
|
|
12751
12763
|
let isContinue = true;
|
|
12752
12764
|
let nextId = 0;
|
|
12753
12765
|
do {
|
|
12754
|
-
const sendParams = { ...requestParams };
|
|
12766
|
+
const sendParams = { ...requestParams, filter: [...requestParams.filter] };
|
|
12755
12767
|
sendParams.filter.push([idKey, ">", nextId]);
|
|
12756
12768
|
const response = await this._b24.actions.v3.call.make({
|
|
12757
12769
|
method: options.method,
|
|
12758
|
-
params:
|
|
12770
|
+
params: sendParams,
|
|
12759
12771
|
requestId: options.requestId
|
|
12760
12772
|
});
|
|
12761
12773
|
if (!response.isSuccess) {
|
|
@@ -12856,20 +12868,24 @@ ${JSON.stringify({
|
|
|
12856
12868
|
const idKey = options?.idKey ?? "id";
|
|
12857
12869
|
const customKeyForResult = options?.customKeyForResult ?? null;
|
|
12858
12870
|
const params = options?.params ?? {};
|
|
12871
|
+
if ("order" in params && params["order"]) {
|
|
12872
|
+
this._logger.warning("fetchList.make: user-provided `order` parameter is ignored because cursor-based pagination requires ordering by idKey. Use `filter` to narrow results instead.");
|
|
12873
|
+
}
|
|
12874
|
+
const { order: _ignoredOrder, ...restParams } = params;
|
|
12859
12875
|
const requestParams = {
|
|
12860
|
-
...
|
|
12861
|
-
order: {
|
|
12876
|
+
...restParams,
|
|
12877
|
+
order: { [idKey]: "ASC" },
|
|
12862
12878
|
filter: [...params["filter"] || []],
|
|
12863
12879
|
pagination: { page: 0, limit: batchSize }
|
|
12864
12880
|
};
|
|
12865
12881
|
let isContinue = true;
|
|
12866
12882
|
let nextId = 0;
|
|
12867
12883
|
do {
|
|
12868
|
-
const sendParams = { ...requestParams };
|
|
12884
|
+
const sendParams = { ...requestParams, filter: [...requestParams.filter] };
|
|
12869
12885
|
sendParams.filter.push([idKey, ">", nextId]);
|
|
12870
12886
|
const response = await this._b24.actions.v3.call.make({
|
|
12871
12887
|
method: options.method,
|
|
12872
|
-
params:
|
|
12888
|
+
params: sendParams,
|
|
12873
12889
|
requestId: options.requestId
|
|
12874
12890
|
});
|
|
12875
12891
|
if (!response.isSuccess) {
|
|
@@ -13709,7 +13725,7 @@ ${JSON.stringify({
|
|
|
13709
13725
|
*
|
|
13710
13726
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
13711
13727
|
*/
|
|
13712
|
-
const isUndefined = typeOfTest(
|
|
13728
|
+
const isUndefined = typeOfTest('undefined');
|
|
13713
13729
|
|
|
13714
13730
|
/**
|
|
13715
13731
|
* Determine if a value is a Buffer
|
|
@@ -13736,7 +13752,7 @@ ${JSON.stringify({
|
|
|
13736
13752
|
*
|
|
13737
13753
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
13738
13754
|
*/
|
|
13739
|
-
const isArrayBuffer = kindOfTest(
|
|
13755
|
+
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
13740
13756
|
|
|
13741
13757
|
/**
|
|
13742
13758
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -13747,7 +13763,7 @@ ${JSON.stringify({
|
|
|
13747
13763
|
*/
|
|
13748
13764
|
function isArrayBufferView(val) {
|
|
13749
13765
|
let result;
|
|
13750
|
-
if (typeof ArrayBuffer !==
|
|
13766
|
+
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
13751
13767
|
result = ArrayBuffer.isView(val);
|
|
13752
13768
|
} else {
|
|
13753
13769
|
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
@@ -13762,7 +13778,7 @@ ${JSON.stringify({
|
|
|
13762
13778
|
*
|
|
13763
13779
|
* @returns {boolean} True if value is a String, otherwise false
|
|
13764
13780
|
*/
|
|
13765
|
-
const isString = typeOfTest(
|
|
13781
|
+
const isString = typeOfTest('string');
|
|
13766
13782
|
|
|
13767
13783
|
/**
|
|
13768
13784
|
* Determine if a value is a Function
|
|
@@ -13770,7 +13786,7 @@ ${JSON.stringify({
|
|
|
13770
13786
|
* @param {*} val The value to test
|
|
13771
13787
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
13772
13788
|
*/
|
|
13773
|
-
const isFunction$1 = typeOfTest(
|
|
13789
|
+
const isFunction$1 = typeOfTest('function');
|
|
13774
13790
|
|
|
13775
13791
|
/**
|
|
13776
13792
|
* Determine if a value is a Number
|
|
@@ -13779,7 +13795,7 @@ ${JSON.stringify({
|
|
|
13779
13795
|
*
|
|
13780
13796
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
13781
13797
|
*/
|
|
13782
|
-
const isNumber = typeOfTest(
|
|
13798
|
+
const isNumber = typeOfTest('number');
|
|
13783
13799
|
|
|
13784
13800
|
/**
|
|
13785
13801
|
* Determine if a value is an Object
|
|
@@ -13788,7 +13804,7 @@ ${JSON.stringify({
|
|
|
13788
13804
|
*
|
|
13789
13805
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
13790
13806
|
*/
|
|
13791
|
-
const isObject = (thing) => thing !== null && typeof thing ===
|
|
13807
|
+
const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
13792
13808
|
|
|
13793
13809
|
/**
|
|
13794
13810
|
* Determine if a value is a Boolean
|
|
@@ -13806,7 +13822,7 @@ ${JSON.stringify({
|
|
|
13806
13822
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
13807
13823
|
*/
|
|
13808
13824
|
const isPlainObject = (val) => {
|
|
13809
|
-
if (kindOf(val) !==
|
|
13825
|
+
if (kindOf(val) !== 'object') {
|
|
13810
13826
|
return false;
|
|
13811
13827
|
}
|
|
13812
13828
|
|
|
@@ -13834,10 +13850,7 @@ ${JSON.stringify({
|
|
|
13834
13850
|
}
|
|
13835
13851
|
|
|
13836
13852
|
try {
|
|
13837
|
-
return (
|
|
13838
|
-
Object.keys(val).length === 0 &&
|
|
13839
|
-
Object.getPrototypeOf(val) === Object.prototype
|
|
13840
|
-
);
|
|
13853
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
13841
13854
|
} catch (e) {
|
|
13842
13855
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
13843
13856
|
return false;
|
|
@@ -13851,7 +13864,7 @@ ${JSON.stringify({
|
|
|
13851
13864
|
*
|
|
13852
13865
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
13853
13866
|
*/
|
|
13854
|
-
const isDate = kindOfTest(
|
|
13867
|
+
const isDate = kindOfTest('Date');
|
|
13855
13868
|
|
|
13856
13869
|
/**
|
|
13857
13870
|
* Determine if a value is a File
|
|
@@ -13860,7 +13873,32 @@ ${JSON.stringify({
|
|
|
13860
13873
|
*
|
|
13861
13874
|
* @returns {boolean} True if value is a File, otherwise false
|
|
13862
13875
|
*/
|
|
13863
|
-
const isFile = kindOfTest(
|
|
13876
|
+
const isFile = kindOfTest('File');
|
|
13877
|
+
|
|
13878
|
+
/**
|
|
13879
|
+
* Determine if a value is a React Native Blob
|
|
13880
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
13881
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
13882
|
+
*
|
|
13883
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
13884
|
+
*
|
|
13885
|
+
* @param {*} value The value to test
|
|
13886
|
+
*
|
|
13887
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
13888
|
+
*/
|
|
13889
|
+
const isReactNativeBlob = (value) => {
|
|
13890
|
+
return !!(value && typeof value.uri !== 'undefined');
|
|
13891
|
+
};
|
|
13892
|
+
|
|
13893
|
+
/**
|
|
13894
|
+
* Determine if environment is React Native
|
|
13895
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
13896
|
+
*
|
|
13897
|
+
* @param {*} formData The formData to test
|
|
13898
|
+
*
|
|
13899
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
13900
|
+
*/
|
|
13901
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
13864
13902
|
|
|
13865
13903
|
/**
|
|
13866
13904
|
* Determine if a value is a Blob
|
|
@@ -13869,7 +13907,7 @@ ${JSON.stringify({
|
|
|
13869
13907
|
*
|
|
13870
13908
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
13871
13909
|
*/
|
|
13872
|
-
const isBlob = kindOfTest(
|
|
13910
|
+
const isBlob = kindOfTest('Blob');
|
|
13873
13911
|
|
|
13874
13912
|
/**
|
|
13875
13913
|
* Determine if a value is a FileList
|
|
@@ -13878,7 +13916,7 @@ ${JSON.stringify({
|
|
|
13878
13916
|
*
|
|
13879
13917
|
* @returns {boolean} True if value is a File, otherwise false
|
|
13880
13918
|
*/
|
|
13881
|
-
const isFileList = kindOfTest(
|
|
13919
|
+
const isFileList = kindOfTest('FileList');
|
|
13882
13920
|
|
|
13883
13921
|
/**
|
|
13884
13922
|
* Determine if a value is a Stream
|
|
@@ -13896,18 +13934,28 @@ ${JSON.stringify({
|
|
|
13896
13934
|
*
|
|
13897
13935
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
13898
13936
|
*/
|
|
13937
|
+
function getGlobal() {
|
|
13938
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
13939
|
+
if (typeof self !== 'undefined') return self;
|
|
13940
|
+
if (typeof window !== 'undefined') return window;
|
|
13941
|
+
if (typeof global !== 'undefined') return global;
|
|
13942
|
+
return {};
|
|
13943
|
+
}
|
|
13944
|
+
|
|
13945
|
+
const G = getGlobal();
|
|
13946
|
+
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
13947
|
+
|
|
13899
13948
|
const isFormData = (thing) => {
|
|
13900
|
-
|
|
13901
|
-
return
|
|
13902
|
-
|
|
13903
|
-
|
|
13904
|
-
|
|
13905
|
-
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
);
|
|
13949
|
+
if (!thing) return false;
|
|
13950
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
13951
|
+
// Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData (GHSA-6chq-wfr3-2hj9).
|
|
13952
|
+
const proto = getPrototypeOf(thing);
|
|
13953
|
+
if (!proto || proto === Object.prototype) return false;
|
|
13954
|
+
if (!isFunction$1(thing.append)) return false;
|
|
13955
|
+
const kind = kindOf(thing);
|
|
13956
|
+
return kind === 'formdata' ||
|
|
13957
|
+
// detect form-data instance
|
|
13958
|
+
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]');
|
|
13911
13959
|
};
|
|
13912
13960
|
|
|
13913
13961
|
/**
|
|
@@ -13917,13 +13965,13 @@ ${JSON.stringify({
|
|
|
13917
13965
|
*
|
|
13918
13966
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
13919
13967
|
*/
|
|
13920
|
-
const isURLSearchParams = kindOfTest(
|
|
13968
|
+
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
13921
13969
|
|
|
13922
13970
|
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
13923
|
-
|
|
13924
|
-
|
|
13925
|
-
|
|
13926
|
-
|
|
13971
|
+
'ReadableStream',
|
|
13972
|
+
'Request',
|
|
13973
|
+
'Response',
|
|
13974
|
+
'Headers',
|
|
13927
13975
|
].map(kindOfTest);
|
|
13928
13976
|
|
|
13929
13977
|
/**
|
|
@@ -13933,9 +13981,9 @@ ${JSON.stringify({
|
|
|
13933
13981
|
*
|
|
13934
13982
|
* @returns {String} The String freed of excess whitespace
|
|
13935
13983
|
*/
|
|
13936
|
-
const trim = (str) =>
|
|
13937
|
-
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
|
13938
|
-
|
|
13984
|
+
const trim = (str) => {
|
|
13985
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
13986
|
+
};
|
|
13939
13987
|
/**
|
|
13940
13988
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
13941
13989
|
*
|
|
@@ -13954,7 +14002,7 @@ ${JSON.stringify({
|
|
|
13954
14002
|
*/
|
|
13955
14003
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
13956
14004
|
// Don't bother if no value provided
|
|
13957
|
-
if (obj === null || typeof obj ===
|
|
14005
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
13958
14006
|
return;
|
|
13959
14007
|
}
|
|
13960
14008
|
|
|
@@ -13962,7 +14010,7 @@ ${JSON.stringify({
|
|
|
13962
14010
|
let l;
|
|
13963
14011
|
|
|
13964
14012
|
// Force an array if not already something iterable
|
|
13965
|
-
if (typeof obj !==
|
|
14013
|
+
if (typeof obj !== 'object') {
|
|
13966
14014
|
/*eslint no-param-reassign:0*/
|
|
13967
14015
|
obj = [obj];
|
|
13968
14016
|
}
|
|
@@ -13979,9 +14027,7 @@ ${JSON.stringify({
|
|
|
13979
14027
|
}
|
|
13980
14028
|
|
|
13981
14029
|
// Iterate over object keys
|
|
13982
|
-
const keys = allOwnKeys
|
|
13983
|
-
? Object.getOwnPropertyNames(obj)
|
|
13984
|
-
: Object.keys(obj);
|
|
14030
|
+
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
13985
14031
|
const len = keys.length;
|
|
13986
14032
|
let key;
|
|
13987
14033
|
|
|
@@ -13992,6 +14038,14 @@ ${JSON.stringify({
|
|
|
13992
14038
|
}
|
|
13993
14039
|
}
|
|
13994
14040
|
|
|
14041
|
+
/**
|
|
14042
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
14043
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
14044
|
+
*
|
|
14045
|
+
* @param {Object} obj - The object to search.
|
|
14046
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
14047
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
14048
|
+
*/
|
|
13995
14049
|
function findKey(obj, key) {
|
|
13996
14050
|
if (isBuffer$1(obj)) {
|
|
13997
14051
|
return null;
|
|
@@ -14012,16 +14066,11 @@ ${JSON.stringify({
|
|
|
14012
14066
|
|
|
14013
14067
|
const _global = (() => {
|
|
14014
14068
|
/*eslint no-undef:0*/
|
|
14015
|
-
if (typeof globalThis !==
|
|
14016
|
-
return typeof self !==
|
|
14017
|
-
? self
|
|
14018
|
-
: typeof window !== "undefined"
|
|
14019
|
-
? window
|
|
14020
|
-
: global;
|
|
14069
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
14070
|
+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
|
|
14021
14071
|
})();
|
|
14022
14072
|
|
|
14023
|
-
const isContextDefined = (context) =>
|
|
14024
|
-
!isUndefined(context) && context !== _global;
|
|
14073
|
+
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
14025
14074
|
|
|
14026
14075
|
/**
|
|
14027
14076
|
* Accepts varargs expecting each argument to be an object, then
|
|
@@ -14046,7 +14095,7 @@ ${JSON.stringify({
|
|
|
14046
14095
|
const result = {};
|
|
14047
14096
|
const assignValue = (val, key) => {
|
|
14048
14097
|
// Skip dangerous property names to prevent prototype pollution
|
|
14049
|
-
if (key ===
|
|
14098
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
14050
14099
|
return;
|
|
14051
14100
|
}
|
|
14052
14101
|
|
|
@@ -14099,7 +14148,7 @@ ${JSON.stringify({
|
|
|
14099
14148
|
});
|
|
14100
14149
|
}
|
|
14101
14150
|
},
|
|
14102
|
-
{ allOwnKeys }
|
|
14151
|
+
{ allOwnKeys }
|
|
14103
14152
|
);
|
|
14104
14153
|
return a;
|
|
14105
14154
|
};
|
|
@@ -14128,17 +14177,14 @@ ${JSON.stringify({
|
|
|
14128
14177
|
* @returns {void}
|
|
14129
14178
|
*/
|
|
14130
14179
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
14131
|
-
constructor.prototype = Object.create(
|
|
14132
|
-
|
|
14133
|
-
descriptors,
|
|
14134
|
-
);
|
|
14135
|
-
Object.defineProperty(constructor.prototype, "constructor", {
|
|
14180
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
14181
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
14136
14182
|
value: constructor,
|
|
14137
14183
|
writable: true,
|
|
14138
14184
|
enumerable: false,
|
|
14139
14185
|
configurable: true,
|
|
14140
14186
|
});
|
|
14141
|
-
Object.defineProperty(constructor,
|
|
14187
|
+
Object.defineProperty(constructor, 'super', {
|
|
14142
14188
|
value: superConstructor.prototype,
|
|
14143
14189
|
});
|
|
14144
14190
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -14168,20 +14214,13 @@ ${JSON.stringify({
|
|
|
14168
14214
|
i = props.length;
|
|
14169
14215
|
while (i-- > 0) {
|
|
14170
14216
|
prop = props[i];
|
|
14171
|
-
if (
|
|
14172
|
-
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
|
|
14173
|
-
!merged[prop]
|
|
14174
|
-
) {
|
|
14217
|
+
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
14175
14218
|
destObj[prop] = sourceObj[prop];
|
|
14176
14219
|
merged[prop] = true;
|
|
14177
14220
|
}
|
|
14178
14221
|
}
|
|
14179
14222
|
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
14180
|
-
} while (
|
|
14181
|
-
sourceObj &&
|
|
14182
|
-
(!filter || filter(sourceObj, destObj)) &&
|
|
14183
|
-
sourceObj !== Object.prototype
|
|
14184
|
-
);
|
|
14223
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
14185
14224
|
|
|
14186
14225
|
return destObj;
|
|
14187
14226
|
};
|
|
@@ -14238,7 +14277,7 @@ ${JSON.stringify({
|
|
|
14238
14277
|
return (thing) => {
|
|
14239
14278
|
return TypedArray && thing instanceof TypedArray;
|
|
14240
14279
|
};
|
|
14241
|
-
})(typeof Uint8Array !==
|
|
14280
|
+
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
14242
14281
|
|
|
14243
14282
|
/**
|
|
14244
14283
|
* For each entry in the object, call the function with the key and value.
|
|
@@ -14281,14 +14320,12 @@ ${JSON.stringify({
|
|
|
14281
14320
|
};
|
|
14282
14321
|
|
|
14283
14322
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
14284
|
-
const isHTMLForm = kindOfTest(
|
|
14323
|
+
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
14285
14324
|
|
|
14286
14325
|
const toCamelCase = (str) => {
|
|
14287
|
-
return str
|
|
14288
|
-
.
|
|
14289
|
-
|
|
14290
|
-
return p1.toUpperCase() + p2;
|
|
14291
|
-
});
|
|
14326
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
14327
|
+
return p1.toUpperCase() + p2;
|
|
14328
|
+
});
|
|
14292
14329
|
};
|
|
14293
14330
|
|
|
14294
14331
|
/* Creating a function that will check if an object has a property. */
|
|
@@ -14305,7 +14342,7 @@ ${JSON.stringify({
|
|
|
14305
14342
|
*
|
|
14306
14343
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
14307
14344
|
*/
|
|
14308
|
-
const isRegExp = kindOfTest(
|
|
14345
|
+
const isRegExp = kindOfTest('RegExp');
|
|
14309
14346
|
|
|
14310
14347
|
const reduceDescriptors = (obj, reducer) => {
|
|
14311
14348
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -14329,10 +14366,7 @@ ${JSON.stringify({
|
|
|
14329
14366
|
const freezeMethods = (obj) => {
|
|
14330
14367
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
14331
14368
|
// skip restricted props in strict mode
|
|
14332
|
-
if (
|
|
14333
|
-
isFunction$1(obj) &&
|
|
14334
|
-
["arguments", "caller", "callee"].indexOf(name) !== -1
|
|
14335
|
-
) {
|
|
14369
|
+
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
14336
14370
|
return false;
|
|
14337
14371
|
}
|
|
14338
14372
|
|
|
@@ -14342,7 +14376,7 @@ ${JSON.stringify({
|
|
|
14342
14376
|
|
|
14343
14377
|
descriptor.enumerable = false;
|
|
14344
14378
|
|
|
14345
|
-
if (
|
|
14379
|
+
if ('writable' in descriptor) {
|
|
14346
14380
|
descriptor.writable = false;
|
|
14347
14381
|
return;
|
|
14348
14382
|
}
|
|
@@ -14355,6 +14389,14 @@ ${JSON.stringify({
|
|
|
14355
14389
|
});
|
|
14356
14390
|
};
|
|
14357
14391
|
|
|
14392
|
+
/**
|
|
14393
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
14394
|
+
* Useful for fast membership checks.
|
|
14395
|
+
*
|
|
14396
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
14397
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
14398
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
14399
|
+
*/
|
|
14358
14400
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
14359
14401
|
const obj = {};
|
|
14360
14402
|
|
|
@@ -14364,9 +14406,7 @@ ${JSON.stringify({
|
|
|
14364
14406
|
});
|
|
14365
14407
|
};
|
|
14366
14408
|
|
|
14367
|
-
isArray$2(arrayOrString)
|
|
14368
|
-
? define(arrayOrString)
|
|
14369
|
-
: define(String(arrayOrString).split(delimiter));
|
|
14409
|
+
isArray$2(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
14370
14410
|
|
|
14371
14411
|
return obj;
|
|
14372
14412
|
};
|
|
@@ -14374,9 +14414,7 @@ ${JSON.stringify({
|
|
|
14374
14414
|
const noop = () => {};
|
|
14375
14415
|
|
|
14376
14416
|
const toFiniteNumber = (value, defaultValue) => {
|
|
14377
|
-
return value != null && Number.isFinite((value = +value))
|
|
14378
|
-
? value
|
|
14379
|
-
: defaultValue;
|
|
14417
|
+
return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
|
|
14380
14418
|
};
|
|
14381
14419
|
|
|
14382
14420
|
/**
|
|
@@ -14390,11 +14428,17 @@ ${JSON.stringify({
|
|
|
14390
14428
|
return !!(
|
|
14391
14429
|
thing &&
|
|
14392
14430
|
isFunction$1(thing.append) &&
|
|
14393
|
-
thing[toStringTag] ===
|
|
14431
|
+
thing[toStringTag] === 'FormData' &&
|
|
14394
14432
|
thing[iterator]
|
|
14395
14433
|
);
|
|
14396
14434
|
}
|
|
14397
14435
|
|
|
14436
|
+
/**
|
|
14437
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
14438
|
+
*
|
|
14439
|
+
* @param {Object} obj - The object to convert.
|
|
14440
|
+
* @returns {Object} The JSON-compatible object.
|
|
14441
|
+
*/
|
|
14398
14442
|
const toJSONObject = (obj) => {
|
|
14399
14443
|
const stack = new Array(10);
|
|
14400
14444
|
|
|
@@ -14409,7 +14453,7 @@ ${JSON.stringify({
|
|
|
14409
14453
|
return source;
|
|
14410
14454
|
}
|
|
14411
14455
|
|
|
14412
|
-
if (!(
|
|
14456
|
+
if (!('toJSON' in source)) {
|
|
14413
14457
|
stack[i] = source;
|
|
14414
14458
|
const target = isArray$2(source) ? [] : {};
|
|
14415
14459
|
|
|
@@ -14430,8 +14474,20 @@ ${JSON.stringify({
|
|
|
14430
14474
|
return visit(obj, 0);
|
|
14431
14475
|
};
|
|
14432
14476
|
|
|
14433
|
-
|
|
14477
|
+
/**
|
|
14478
|
+
* Determines if a value is an async function.
|
|
14479
|
+
*
|
|
14480
|
+
* @param {*} thing - The value to test.
|
|
14481
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
14482
|
+
*/
|
|
14483
|
+
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
14434
14484
|
|
|
14485
|
+
/**
|
|
14486
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
14487
|
+
*
|
|
14488
|
+
* @param {*} thing - The value to test.
|
|
14489
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
14490
|
+
*/
|
|
14435
14491
|
const isThenable = (thing) =>
|
|
14436
14492
|
thing &&
|
|
14437
14493
|
(isObject(thing) || isFunction$1(thing)) &&
|
|
@@ -14441,6 +14497,14 @@ ${JSON.stringify({
|
|
|
14441
14497
|
// original code
|
|
14442
14498
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
14443
14499
|
|
|
14500
|
+
/**
|
|
14501
|
+
* Provides a cross-platform setImmediate implementation.
|
|
14502
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
14503
|
+
*
|
|
14504
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
14505
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
14506
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
14507
|
+
*/
|
|
14444
14508
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
14445
14509
|
if (setImmediateSupported) {
|
|
14446
14510
|
return setImmediate;
|
|
@@ -14449,27 +14513,33 @@ ${JSON.stringify({
|
|
|
14449
14513
|
return postMessageSupported
|
|
14450
14514
|
? ((token, callbacks) => {
|
|
14451
14515
|
_global.addEventListener(
|
|
14452
|
-
|
|
14516
|
+
'message',
|
|
14453
14517
|
({ source, data }) => {
|
|
14454
14518
|
if (source === _global && data === token) {
|
|
14455
14519
|
callbacks.length && callbacks.shift()();
|
|
14456
14520
|
}
|
|
14457
14521
|
},
|
|
14458
|
-
false
|
|
14522
|
+
false
|
|
14459
14523
|
);
|
|
14460
14524
|
|
|
14461
14525
|
return (cb) => {
|
|
14462
14526
|
callbacks.push(cb);
|
|
14463
|
-
_global.postMessage(token,
|
|
14527
|
+
_global.postMessage(token, '*');
|
|
14464
14528
|
};
|
|
14465
14529
|
})(`axios@${Math.random()}`, [])
|
|
14466
14530
|
: (cb) => setTimeout(cb);
|
|
14467
|
-
})(typeof setImmediate ===
|
|
14531
|
+
})(typeof setImmediate === 'function', isFunction$1(_global.postMessage));
|
|
14468
14532
|
|
|
14533
|
+
/**
|
|
14534
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
14535
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
14536
|
+
*
|
|
14537
|
+
* @type {Function}
|
|
14538
|
+
*/
|
|
14469
14539
|
const asap =
|
|
14470
|
-
typeof queueMicrotask !==
|
|
14540
|
+
typeof queueMicrotask !== 'undefined'
|
|
14471
14541
|
? queueMicrotask.bind(_global)
|
|
14472
|
-
: (typeof process !==
|
|
14542
|
+
: (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
|
|
14473
14543
|
|
|
14474
14544
|
// *********************
|
|
14475
14545
|
|
|
@@ -14494,6 +14564,8 @@ ${JSON.stringify({
|
|
|
14494
14564
|
isUndefined,
|
|
14495
14565
|
isDate,
|
|
14496
14566
|
isFile,
|
|
14567
|
+
isReactNativeBlob,
|
|
14568
|
+
isReactNative,
|
|
14497
14569
|
isBlob,
|
|
14498
14570
|
isRegExp,
|
|
14499
14571
|
isFunction: isFunction$1,
|
|
@@ -14536,57 +14608,74 @@ ${JSON.stringify({
|
|
|
14536
14608
|
};
|
|
14537
14609
|
|
|
14538
14610
|
let AxiosError$1 = class AxiosError extends Error {
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
customProps && Object.assign(axiosError, customProps);
|
|
14544
|
-
return axiosError;
|
|
14545
|
-
}
|
|
14611
|
+
static from(error, code, config, request, response, customProps) {
|
|
14612
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
14613
|
+
axiosError.cause = error;
|
|
14614
|
+
axiosError.name = error.name;
|
|
14546
14615
|
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
* @param {string} message The error message.
|
|
14551
|
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
14552
|
-
* @param {Object} [config] The config.
|
|
14553
|
-
* @param {Object} [request] The request.
|
|
14554
|
-
* @param {Object} [response] The response.
|
|
14555
|
-
*
|
|
14556
|
-
* @returns {Error} The created error.
|
|
14557
|
-
*/
|
|
14558
|
-
constructor(message, code, config, request, response) {
|
|
14559
|
-
super(message);
|
|
14560
|
-
this.name = 'AxiosError';
|
|
14561
|
-
this.isAxiosError = true;
|
|
14562
|
-
code && (this.code = code);
|
|
14563
|
-
config && (this.config = config);
|
|
14564
|
-
request && (this.request = request);
|
|
14565
|
-
if (response) {
|
|
14566
|
-
this.response = response;
|
|
14567
|
-
this.status = response.status;
|
|
14568
|
-
}
|
|
14616
|
+
// Preserve status from the original error if not already set from response
|
|
14617
|
+
if (error.status != null && axiosError.status == null) {
|
|
14618
|
+
axiosError.status = error.status;
|
|
14569
14619
|
}
|
|
14570
14620
|
|
|
14571
|
-
|
|
14572
|
-
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
|
|
14582
|
-
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14588
|
-
|
|
14621
|
+
customProps && Object.assign(axiosError, customProps);
|
|
14622
|
+
return axiosError;
|
|
14623
|
+
}
|
|
14624
|
+
|
|
14625
|
+
/**
|
|
14626
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
14627
|
+
*
|
|
14628
|
+
* @param {string} message The error message.
|
|
14629
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
14630
|
+
* @param {Object} [config] The config.
|
|
14631
|
+
* @param {Object} [request] The request.
|
|
14632
|
+
* @param {Object} [response] The response.
|
|
14633
|
+
*
|
|
14634
|
+
* @returns {Error} The created error.
|
|
14635
|
+
*/
|
|
14636
|
+
constructor(message, code, config, request, response) {
|
|
14637
|
+
super(message);
|
|
14638
|
+
|
|
14639
|
+
// Make message enumerable to maintain backward compatibility
|
|
14640
|
+
// The native Error constructor sets message as non-enumerable,
|
|
14641
|
+
// but axios < v1.13.3 had it as enumerable
|
|
14642
|
+
Object.defineProperty(this, 'message', {
|
|
14643
|
+
value: message,
|
|
14644
|
+
enumerable: true,
|
|
14645
|
+
writable: true,
|
|
14646
|
+
configurable: true,
|
|
14647
|
+
});
|
|
14648
|
+
|
|
14649
|
+
this.name = 'AxiosError';
|
|
14650
|
+
this.isAxiosError = true;
|
|
14651
|
+
code && (this.code = code);
|
|
14652
|
+
config && (this.config = config);
|
|
14653
|
+
request && (this.request = request);
|
|
14654
|
+
if (response) {
|
|
14655
|
+
this.response = response;
|
|
14656
|
+
this.status = response.status;
|
|
14589
14657
|
}
|
|
14658
|
+
}
|
|
14659
|
+
|
|
14660
|
+
toJSON() {
|
|
14661
|
+
return {
|
|
14662
|
+
// Standard
|
|
14663
|
+
message: this.message,
|
|
14664
|
+
name: this.name,
|
|
14665
|
+
// Microsoft
|
|
14666
|
+
description: this.description,
|
|
14667
|
+
number: this.number,
|
|
14668
|
+
// Mozilla
|
|
14669
|
+
fileName: this.fileName,
|
|
14670
|
+
lineNumber: this.lineNumber,
|
|
14671
|
+
columnNumber: this.columnNumber,
|
|
14672
|
+
stack: this.stack,
|
|
14673
|
+
// Axios
|
|
14674
|
+
config: utils$1.toJSONObject(this.config),
|
|
14675
|
+
code: this.code,
|
|
14676
|
+
status: this.status,
|
|
14677
|
+
};
|
|
14678
|
+
}
|
|
14590
14679
|
};
|
|
14591
14680
|
|
|
14592
14681
|
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
@@ -14602,6 +14691,7 @@ ${JSON.stringify({
|
|
|
14602
14691
|
AxiosError$1.ERR_CANCELED = 'ERR_CANCELED';
|
|
14603
14692
|
AxiosError$1.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
14604
14693
|
AxiosError$1.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
14694
|
+
AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
14605
14695
|
|
|
14606
14696
|
// eslint-disable-next-line strict
|
|
14607
14697
|
const httpAdapter = null;
|
|
@@ -14639,11 +14729,14 @@ ${JSON.stringify({
|
|
|
14639
14729
|
*/
|
|
14640
14730
|
function renderKey(path, key, dots) {
|
|
14641
14731
|
if (!path) return key;
|
|
14642
|
-
return path
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14732
|
+
return path
|
|
14733
|
+
.concat(key)
|
|
14734
|
+
.map(function each(token, i) {
|
|
14735
|
+
// eslint-disable-next-line no-param-reassign
|
|
14736
|
+
token = removeBrackets(token);
|
|
14737
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
14738
|
+
})
|
|
14739
|
+
.join(dots ? '.' : '');
|
|
14647
14740
|
}
|
|
14648
14741
|
|
|
14649
14742
|
/**
|
|
@@ -14693,21 +14786,27 @@ ${JSON.stringify({
|
|
|
14693
14786
|
formData = formData || new (FormData)();
|
|
14694
14787
|
|
|
14695
14788
|
// eslint-disable-next-line no-param-reassign
|
|
14696
|
-
options = utils$1.toFlatObject(
|
|
14697
|
-
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14703
|
-
|
|
14789
|
+
options = utils$1.toFlatObject(
|
|
14790
|
+
options,
|
|
14791
|
+
{
|
|
14792
|
+
metaTokens: true,
|
|
14793
|
+
dots: false,
|
|
14794
|
+
indexes: false,
|
|
14795
|
+
},
|
|
14796
|
+
false,
|
|
14797
|
+
function defined(option, source) {
|
|
14798
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
14799
|
+
return !utils$1.isUndefined(source[option]);
|
|
14800
|
+
}
|
|
14801
|
+
);
|
|
14704
14802
|
|
|
14705
14803
|
const metaTokens = options.metaTokens;
|
|
14706
14804
|
// eslint-disable-next-line no-use-before-define
|
|
14707
14805
|
const visitor = options.visitor || defaultVisitor;
|
|
14708
14806
|
const dots = options.dots;
|
|
14709
14807
|
const indexes = options.indexes;
|
|
14710
|
-
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
14808
|
+
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
14809
|
+
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
14711
14810
|
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
14712
14811
|
|
|
14713
14812
|
if (!utils$1.isFunction(visitor)) {
|
|
@@ -14749,6 +14848,11 @@ ${JSON.stringify({
|
|
|
14749
14848
|
function defaultVisitor(value, key, path) {
|
|
14750
14849
|
let arr = value;
|
|
14751
14850
|
|
|
14851
|
+
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
14852
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
14853
|
+
return false;
|
|
14854
|
+
}
|
|
14855
|
+
|
|
14752
14856
|
if (value && !path && typeof value === 'object') {
|
|
14753
14857
|
if (utils$1.endsWith(key, '{}')) {
|
|
14754
14858
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -14757,17 +14861,22 @@ ${JSON.stringify({
|
|
|
14757
14861
|
value = JSON.stringify(value);
|
|
14758
14862
|
} else if (
|
|
14759
14863
|
(utils$1.isArray(value) && isFlatArray(value)) ||
|
|
14760
|
-
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
|
|
14761
|
-
|
|
14864
|
+
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)))
|
|
14865
|
+
) {
|
|
14762
14866
|
// eslint-disable-next-line no-param-reassign
|
|
14763
14867
|
key = removeBrackets(key);
|
|
14764
14868
|
|
|
14765
14869
|
arr.forEach(function each(el, index) {
|
|
14766
|
-
!(utils$1.isUndefined(el) || el === null) &&
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14870
|
+
!(utils$1.isUndefined(el) || el === null) &&
|
|
14871
|
+
formData.append(
|
|
14872
|
+
// eslint-disable-next-line no-nested-ternary
|
|
14873
|
+
indexes === true
|
|
14874
|
+
? renderKey([key], index, dots)
|
|
14875
|
+
: indexes === null
|
|
14876
|
+
? key
|
|
14877
|
+
: key + '[]',
|
|
14878
|
+
convertValue(el)
|
|
14879
|
+
);
|
|
14771
14880
|
});
|
|
14772
14881
|
return false;
|
|
14773
14882
|
}
|
|
@@ -14787,12 +14896,19 @@ ${JSON.stringify({
|
|
|
14787
14896
|
const exposedHelpers = Object.assign(predicates, {
|
|
14788
14897
|
defaultVisitor,
|
|
14789
14898
|
convertValue,
|
|
14790
|
-
isVisitable
|
|
14899
|
+
isVisitable,
|
|
14791
14900
|
});
|
|
14792
14901
|
|
|
14793
|
-
function build(value, path) {
|
|
14902
|
+
function build(value, path, depth = 0) {
|
|
14794
14903
|
if (utils$1.isUndefined(value)) return;
|
|
14795
14904
|
|
|
14905
|
+
if (depth > maxDepth) {
|
|
14906
|
+
throw new AxiosError$1(
|
|
14907
|
+
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
14908
|
+
AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
14909
|
+
);
|
|
14910
|
+
}
|
|
14911
|
+
|
|
14796
14912
|
if (stack.indexOf(value) !== -1) {
|
|
14797
14913
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
14798
14914
|
}
|
|
@@ -14800,12 +14916,12 @@ ${JSON.stringify({
|
|
|
14800
14916
|
stack.push(value);
|
|
14801
14917
|
|
|
14802
14918
|
utils$1.forEach(value, function each(el, key) {
|
|
14803
|
-
const result =
|
|
14804
|
-
|
|
14805
|
-
|
|
14919
|
+
const result =
|
|
14920
|
+
!(utils$1.isUndefined(el) || el === null) &&
|
|
14921
|
+
visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
14806
14922
|
|
|
14807
14923
|
if (result === true) {
|
|
14808
|
-
build(el, path ? path.concat(key) : [key]);
|
|
14924
|
+
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
14809
14925
|
}
|
|
14810
14926
|
});
|
|
14811
14927
|
|
|
@@ -14837,9 +14953,8 @@ ${JSON.stringify({
|
|
|
14837
14953
|
')': '%29',
|
|
14838
14954
|
'~': '%7E',
|
|
14839
14955
|
'%20': '+',
|
|
14840
|
-
'%00': '\x00'
|
|
14841
14956
|
};
|
|
14842
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20
|
|
14957
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
14843
14958
|
return charMap[match];
|
|
14844
14959
|
});
|
|
14845
14960
|
}
|
|
@@ -14865,29 +14980,33 @@ ${JSON.stringify({
|
|
|
14865
14980
|
};
|
|
14866
14981
|
|
|
14867
14982
|
prototype.toString = function toString(encoder) {
|
|
14868
|
-
const _encode = encoder
|
|
14869
|
-
|
|
14870
|
-
|
|
14983
|
+
const _encode = encoder
|
|
14984
|
+
? function (value) {
|
|
14985
|
+
return encoder.call(this, value, encode$2);
|
|
14986
|
+
}
|
|
14987
|
+
: encode$2;
|
|
14871
14988
|
|
|
14872
|
-
return this._pairs
|
|
14873
|
-
|
|
14874
|
-
|
|
14989
|
+
return this._pairs
|
|
14990
|
+
.map(function each(pair) {
|
|
14991
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
14992
|
+
}, '')
|
|
14993
|
+
.join('&');
|
|
14875
14994
|
};
|
|
14876
14995
|
|
|
14877
14996
|
/**
|
|
14878
|
-
* It replaces
|
|
14879
|
-
*
|
|
14997
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
14998
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
14880
14999
|
*
|
|
14881
15000
|
* @param {string} val The value to be encoded.
|
|
14882
15001
|
*
|
|
14883
15002
|
* @returns {string} The encoded value.
|
|
14884
15003
|
*/
|
|
14885
15004
|
function encode$1(val) {
|
|
14886
|
-
return encodeURIComponent(val)
|
|
14887
|
-
replace(/%3A/gi, ':')
|
|
14888
|
-
replace(/%24/g, '$')
|
|
14889
|
-
replace(/%2C/gi, ',')
|
|
14890
|
-
replace(/%20/g, '+');
|
|
15005
|
+
return encodeURIComponent(val)
|
|
15006
|
+
.replace(/%3A/gi, ':')
|
|
15007
|
+
.replace(/%24/g, '$')
|
|
15008
|
+
.replace(/%2C/gi, ',')
|
|
15009
|
+
.replace(/%20/g, '+');
|
|
14891
15010
|
}
|
|
14892
15011
|
|
|
14893
15012
|
/**
|
|
@@ -14904,11 +15023,13 @@ ${JSON.stringify({
|
|
|
14904
15023
|
return url;
|
|
14905
15024
|
}
|
|
14906
15025
|
|
|
14907
|
-
const _encode = options && options.encode || encode$1;
|
|
15026
|
+
const _encode = (options && options.encode) || encode$1;
|
|
14908
15027
|
|
|
14909
|
-
const _options = utils$1.isFunction(options)
|
|
14910
|
-
|
|
14911
|
-
|
|
15028
|
+
const _options = utils$1.isFunction(options)
|
|
15029
|
+
? {
|
|
15030
|
+
serialize: options,
|
|
15031
|
+
}
|
|
15032
|
+
: options;
|
|
14912
15033
|
|
|
14913
15034
|
const serializeFn = _options && _options.serialize;
|
|
14914
15035
|
|
|
@@ -14917,13 +15038,13 @@ ${JSON.stringify({
|
|
|
14917
15038
|
if (serializeFn) {
|
|
14918
15039
|
serializedParams = serializeFn(params, _options);
|
|
14919
15040
|
} else {
|
|
14920
|
-
serializedParams = utils$1.isURLSearchParams(params)
|
|
14921
|
-
params.toString()
|
|
14922
|
-
new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
15041
|
+
serializedParams = utils$1.isURLSearchParams(params)
|
|
15042
|
+
? params.toString()
|
|
15043
|
+
: new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
14923
15044
|
}
|
|
14924
15045
|
|
|
14925
15046
|
if (serializedParams) {
|
|
14926
|
-
const hashmarkIndex = url.indexOf(
|
|
15047
|
+
const hashmarkIndex = url.indexOf('#');
|
|
14927
15048
|
|
|
14928
15049
|
if (hashmarkIndex !== -1) {
|
|
14929
15050
|
url = url.slice(0, hashmarkIndex);
|
|
@@ -14953,7 +15074,7 @@ ${JSON.stringify({
|
|
|
14953
15074
|
fulfilled,
|
|
14954
15075
|
rejected,
|
|
14955
15076
|
synchronous: options ? options.synchronous : false,
|
|
14956
|
-
runWhen: options ? options.runWhen : null
|
|
15077
|
+
runWhen: options ? options.runWhen : null,
|
|
14957
15078
|
});
|
|
14958
15079
|
return this.handlers.length - 1;
|
|
14959
15080
|
}
|
|
@@ -15005,7 +15126,7 @@ ${JSON.stringify({
|
|
|
15005
15126
|
silentJSONParsing: true,
|
|
15006
15127
|
forcedJSONParsing: true,
|
|
15007
15128
|
clarifyTimeoutError: false,
|
|
15008
|
-
legacyInterceptorReqResOrdering: true
|
|
15129
|
+
legacyInterceptorReqResOrdering: true,
|
|
15009
15130
|
};
|
|
15010
15131
|
|
|
15011
15132
|
const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
|
@@ -15019,14 +15140,14 @@ ${JSON.stringify({
|
|
|
15019
15140
|
classes: {
|
|
15020
15141
|
URLSearchParams: URLSearchParams$1,
|
|
15021
15142
|
FormData: FormData$1,
|
|
15022
|
-
Blob: Blob$1
|
|
15143
|
+
Blob: Blob$1,
|
|
15023
15144
|
},
|
|
15024
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
15145
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
15025
15146
|
};
|
|
15026
15147
|
|
|
15027
15148
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
15028
15149
|
|
|
15029
|
-
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
15150
|
+
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
15030
15151
|
|
|
15031
15152
|
/**
|
|
15032
15153
|
* Determine if we're running in a standard browser environment
|
|
@@ -15045,7 +15166,8 @@ ${JSON.stringify({
|
|
|
15045
15166
|
*
|
|
15046
15167
|
* @returns {boolean}
|
|
15047
15168
|
*/
|
|
15048
|
-
const hasStandardBrowserEnv =
|
|
15169
|
+
const hasStandardBrowserEnv =
|
|
15170
|
+
hasBrowserEnv &&
|
|
15049
15171
|
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
15050
15172
|
|
|
15051
15173
|
/**
|
|
@@ -15066,7 +15188,7 @@ ${JSON.stringify({
|
|
|
15066
15188
|
);
|
|
15067
15189
|
})();
|
|
15068
15190
|
|
|
15069
|
-
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
15191
|
+
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
15070
15192
|
|
|
15071
15193
|
const utils = {
|
|
15072
15194
|
__proto__: null,
|
|
@@ -15079,12 +15201,12 @@ ${JSON.stringify({
|
|
|
15079
15201
|
|
|
15080
15202
|
const platform = {
|
|
15081
15203
|
...utils,
|
|
15082
|
-
...platform$1
|
|
15204
|
+
...platform$1,
|
|
15083
15205
|
};
|
|
15084
15206
|
|
|
15085
15207
|
function toURLEncodedForm(data, options) {
|
|
15086
15208
|
return toFormData$1(data, new platform.classes.URLSearchParams(), {
|
|
15087
|
-
visitor: function(value, key, path, helpers) {
|
|
15209
|
+
visitor: function (value, key, path, helpers) {
|
|
15088
15210
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
15089
15211
|
this.append(key, value.toString('base64'));
|
|
15090
15212
|
return false;
|
|
@@ -15092,7 +15214,7 @@ ${JSON.stringify({
|
|
|
15092
15214
|
|
|
15093
15215
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
15094
15216
|
},
|
|
15095
|
-
...options
|
|
15217
|
+
...options,
|
|
15096
15218
|
});
|
|
15097
15219
|
}
|
|
15098
15220
|
|
|
@@ -15108,7 +15230,7 @@ ${JSON.stringify({
|
|
|
15108
15230
|
// foo.x.y.z
|
|
15109
15231
|
// foo-x-y-z
|
|
15110
15232
|
// foo x y z
|
|
15111
|
-
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
15233
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
15112
15234
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
15113
15235
|
});
|
|
15114
15236
|
}
|
|
@@ -15152,7 +15274,9 @@ ${JSON.stringify({
|
|
|
15152
15274
|
|
|
15153
15275
|
if (isLast) {
|
|
15154
15276
|
if (utils$1.hasOwnProp(target, name)) {
|
|
15155
|
-
target[name] =
|
|
15277
|
+
target[name] = utils$1.isArray(target[name])
|
|
15278
|
+
? target[name].concat(value)
|
|
15279
|
+
: [target[name], value];
|
|
15156
15280
|
} else {
|
|
15157
15281
|
target[name] = value;
|
|
15158
15282
|
}
|
|
@@ -15186,6 +15310,8 @@ ${JSON.stringify({
|
|
|
15186
15310
|
return null;
|
|
15187
15311
|
}
|
|
15188
15312
|
|
|
15313
|
+
const own = (obj, key) => (obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined);
|
|
15314
|
+
|
|
15189
15315
|
/**
|
|
15190
15316
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
15191
15317
|
* of the input
|
|
@@ -15212,96 +15338,110 @@ ${JSON.stringify({
|
|
|
15212
15338
|
}
|
|
15213
15339
|
|
|
15214
15340
|
const defaults$1 = {
|
|
15215
|
-
|
|
15216
15341
|
transitional: transitionalDefaults,
|
|
15217
15342
|
|
|
15218
15343
|
adapter: ['xhr', 'http', 'fetch'],
|
|
15219
15344
|
|
|
15220
|
-
transformRequest: [
|
|
15221
|
-
|
|
15222
|
-
|
|
15223
|
-
|
|
15345
|
+
transformRequest: [
|
|
15346
|
+
function transformRequest(data, headers) {
|
|
15347
|
+
const contentType = headers.getContentType() || '';
|
|
15348
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
15349
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
15224
15350
|
|
|
15225
|
-
|
|
15226
|
-
|
|
15227
|
-
|
|
15228
|
-
|
|
15229
|
-
const isFormData = utils$1.isFormData(data);
|
|
15230
|
-
|
|
15231
|
-
if (isFormData) {
|
|
15232
|
-
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
15233
|
-
}
|
|
15351
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
15352
|
+
data = new FormData(data);
|
|
15353
|
+
}
|
|
15234
15354
|
|
|
15235
|
-
|
|
15236
|
-
utils$1.isBuffer(data) ||
|
|
15237
|
-
utils$1.isStream(data) ||
|
|
15238
|
-
utils$1.isFile(data) ||
|
|
15239
|
-
utils$1.isBlob(data) ||
|
|
15240
|
-
utils$1.isReadableStream(data)
|
|
15241
|
-
) {
|
|
15242
|
-
return data;
|
|
15243
|
-
}
|
|
15244
|
-
if (utils$1.isArrayBufferView(data)) {
|
|
15245
|
-
return data.buffer;
|
|
15246
|
-
}
|
|
15247
|
-
if (utils$1.isURLSearchParams(data)) {
|
|
15248
|
-
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
15249
|
-
return data.toString();
|
|
15250
|
-
}
|
|
15355
|
+
const isFormData = utils$1.isFormData(data);
|
|
15251
15356
|
|
|
15252
|
-
|
|
15357
|
+
if (isFormData) {
|
|
15358
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
15359
|
+
}
|
|
15253
15360
|
|
|
15254
|
-
|
|
15255
|
-
|
|
15256
|
-
|
|
15361
|
+
if (
|
|
15362
|
+
utils$1.isArrayBuffer(data) ||
|
|
15363
|
+
utils$1.isBuffer(data) ||
|
|
15364
|
+
utils$1.isStream(data) ||
|
|
15365
|
+
utils$1.isFile(data) ||
|
|
15366
|
+
utils$1.isBlob(data) ||
|
|
15367
|
+
utils$1.isReadableStream(data)
|
|
15368
|
+
) {
|
|
15369
|
+
return data;
|
|
15370
|
+
}
|
|
15371
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
15372
|
+
return data.buffer;
|
|
15373
|
+
}
|
|
15374
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
15375
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
15376
|
+
return data.toString();
|
|
15257
15377
|
}
|
|
15258
15378
|
|
|
15259
|
-
|
|
15260
|
-
const _FormData = this.env && this.env.FormData;
|
|
15379
|
+
let isFileList;
|
|
15261
15380
|
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15381
|
+
if (isObjectPayload) {
|
|
15382
|
+
const formSerializer = own(this, 'formSerializer');
|
|
15383
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
15384
|
+
return toURLEncodedForm(data, formSerializer).toString();
|
|
15385
|
+
}
|
|
15386
|
+
|
|
15387
|
+
if (
|
|
15388
|
+
(isFileList = utils$1.isFileList(data)) ||
|
|
15389
|
+
contentType.indexOf('multipart/form-data') > -1
|
|
15390
|
+
) {
|
|
15391
|
+
const env = own(this, 'env');
|
|
15392
|
+
const _FormData = env && env.FormData;
|
|
15393
|
+
|
|
15394
|
+
return toFormData$1(
|
|
15395
|
+
isFileList ? { 'files[]': data } : data,
|
|
15396
|
+
_FormData && new _FormData(),
|
|
15397
|
+
formSerializer
|
|
15398
|
+
);
|
|
15399
|
+
}
|
|
15267
15400
|
}
|
|
15268
|
-
}
|
|
15269
15401
|
|
|
15270
|
-
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
|
|
15402
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
15403
|
+
headers.setContentType('application/json', false);
|
|
15404
|
+
return stringifySafely(data);
|
|
15405
|
+
}
|
|
15274
15406
|
|
|
15275
|
-
|
|
15276
|
-
|
|
15407
|
+
return data;
|
|
15408
|
+
},
|
|
15409
|
+
],
|
|
15277
15410
|
|
|
15278
|
-
transformResponse: [
|
|
15279
|
-
|
|
15280
|
-
|
|
15281
|
-
|
|
15411
|
+
transformResponse: [
|
|
15412
|
+
function transformResponse(data) {
|
|
15413
|
+
const transitional = own(this, 'transitional') || defaults$1.transitional;
|
|
15414
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
15415
|
+
const responseType = own(this, 'responseType');
|
|
15416
|
+
const JSONRequested = responseType === 'json';
|
|
15282
15417
|
|
|
15283
|
-
|
|
15284
|
-
|
|
15285
|
-
|
|
15418
|
+
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
15419
|
+
return data;
|
|
15420
|
+
}
|
|
15286
15421
|
|
|
15287
|
-
|
|
15288
|
-
|
|
15289
|
-
|
|
15422
|
+
if (
|
|
15423
|
+
data &&
|
|
15424
|
+
utils$1.isString(data) &&
|
|
15425
|
+
((forcedJSONParsing && !responseType) || JSONRequested)
|
|
15426
|
+
) {
|
|
15427
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
15428
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
15290
15429
|
|
|
15291
|
-
|
|
15292
|
-
|
|
15293
|
-
|
|
15294
|
-
|
|
15295
|
-
|
|
15296
|
-
|
|
15430
|
+
try {
|
|
15431
|
+
return JSON.parse(data, own(this, 'parseReviver'));
|
|
15432
|
+
} catch (e) {
|
|
15433
|
+
if (strictJSONParsing) {
|
|
15434
|
+
if (e.name === 'SyntaxError') {
|
|
15435
|
+
throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, own(this, 'response'));
|
|
15436
|
+
}
|
|
15437
|
+
throw e;
|
|
15297
15438
|
}
|
|
15298
|
-
throw e;
|
|
15299
15439
|
}
|
|
15300
15440
|
}
|
|
15301
|
-
}
|
|
15302
15441
|
|
|
15303
|
-
|
|
15304
|
-
|
|
15442
|
+
return data;
|
|
15443
|
+
},
|
|
15444
|
+
],
|
|
15305
15445
|
|
|
15306
15446
|
/**
|
|
15307
15447
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -15317,7 +15457,7 @@ ${JSON.stringify({
|
|
|
15317
15457
|
|
|
15318
15458
|
env: {
|
|
15319
15459
|
FormData: platform.classes.FormData,
|
|
15320
|
-
Blob: platform.classes.Blob
|
|
15460
|
+
Blob: platform.classes.Blob,
|
|
15321
15461
|
},
|
|
15322
15462
|
|
|
15323
15463
|
validateStatus: function validateStatus(status) {
|
|
@@ -15326,10 +15466,10 @@ ${JSON.stringify({
|
|
|
15326
15466
|
|
|
15327
15467
|
headers: {
|
|
15328
15468
|
common: {
|
|
15329
|
-
|
|
15330
|
-
'Content-Type': undefined
|
|
15331
|
-
}
|
|
15332
|
-
}
|
|
15469
|
+
Accept: 'application/json, text/plain, */*',
|
|
15470
|
+
'Content-Type': undefined,
|
|
15471
|
+
},
|
|
15472
|
+
},
|
|
15333
15473
|
};
|
|
15334
15474
|
|
|
15335
15475
|
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
@@ -15339,10 +15479,23 @@ ${JSON.stringify({
|
|
|
15339
15479
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
15340
15480
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
15341
15481
|
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
15342
|
-
'age',
|
|
15343
|
-
'
|
|
15344
|
-
'
|
|
15345
|
-
'
|
|
15482
|
+
'age',
|
|
15483
|
+
'authorization',
|
|
15484
|
+
'content-length',
|
|
15485
|
+
'content-type',
|
|
15486
|
+
'etag',
|
|
15487
|
+
'expires',
|
|
15488
|
+
'from',
|
|
15489
|
+
'host',
|
|
15490
|
+
'if-modified-since',
|
|
15491
|
+
'if-unmodified-since',
|
|
15492
|
+
'last-modified',
|
|
15493
|
+
'location',
|
|
15494
|
+
'max-forwards',
|
|
15495
|
+
'proxy-authorization',
|
|
15496
|
+
'referer',
|
|
15497
|
+
'retry-after',
|
|
15498
|
+
'user-agent',
|
|
15346
15499
|
]);
|
|
15347
15500
|
|
|
15348
15501
|
/**
|
|
@@ -15359,47 +15512,81 @@ ${JSON.stringify({
|
|
|
15359
15512
|
*
|
|
15360
15513
|
* @returns {Object} Headers parsed into an object
|
|
15361
15514
|
*/
|
|
15362
|
-
const parseHeaders = rawHeaders => {
|
|
15515
|
+
const parseHeaders = (rawHeaders) => {
|
|
15363
15516
|
const parsed = {};
|
|
15364
15517
|
let key;
|
|
15365
15518
|
let val;
|
|
15366
15519
|
let i;
|
|
15367
15520
|
|
|
15368
|
-
rawHeaders &&
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15521
|
+
rawHeaders &&
|
|
15522
|
+
rawHeaders.split('\n').forEach(function parser(line) {
|
|
15523
|
+
i = line.indexOf(':');
|
|
15524
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
15525
|
+
val = line.substring(i + 1).trim();
|
|
15372
15526
|
|
|
15373
|
-
|
|
15374
|
-
|
|
15375
|
-
|
|
15527
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
15528
|
+
return;
|
|
15529
|
+
}
|
|
15376
15530
|
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
|
|
15531
|
+
if (key === 'set-cookie') {
|
|
15532
|
+
if (parsed[key]) {
|
|
15533
|
+
parsed[key].push(val);
|
|
15534
|
+
} else {
|
|
15535
|
+
parsed[key] = [val];
|
|
15536
|
+
}
|
|
15380
15537
|
} else {
|
|
15381
|
-
parsed[key] = [val
|
|
15538
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
15382
15539
|
}
|
|
15383
|
-
}
|
|
15384
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
15385
|
-
}
|
|
15386
|
-
});
|
|
15540
|
+
});
|
|
15387
15541
|
|
|
15388
15542
|
return parsed;
|
|
15389
15543
|
};
|
|
15390
15544
|
|
|
15391
15545
|
const $internals = Symbol('internals');
|
|
15392
15546
|
|
|
15547
|
+
const INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
15548
|
+
|
|
15549
|
+
function trimSPorHTAB(str) {
|
|
15550
|
+
let start = 0;
|
|
15551
|
+
let end = str.length;
|
|
15552
|
+
|
|
15553
|
+
while (start < end) {
|
|
15554
|
+
const code = str.charCodeAt(start);
|
|
15555
|
+
|
|
15556
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
15557
|
+
break;
|
|
15558
|
+
}
|
|
15559
|
+
|
|
15560
|
+
start += 1;
|
|
15561
|
+
}
|
|
15562
|
+
|
|
15563
|
+
while (end > start) {
|
|
15564
|
+
const code = str.charCodeAt(end - 1);
|
|
15565
|
+
|
|
15566
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
15567
|
+
break;
|
|
15568
|
+
}
|
|
15569
|
+
|
|
15570
|
+
end -= 1;
|
|
15571
|
+
}
|
|
15572
|
+
|
|
15573
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
15574
|
+
}
|
|
15575
|
+
|
|
15393
15576
|
function normalizeHeader(header) {
|
|
15394
15577
|
return header && String(header).trim().toLowerCase();
|
|
15395
15578
|
}
|
|
15396
15579
|
|
|
15580
|
+
function sanitizeHeaderValue(str) {
|
|
15581
|
+
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
|
|
15582
|
+
}
|
|
15583
|
+
|
|
15397
15584
|
function normalizeValue(value) {
|
|
15398
15585
|
if (value === false || value == null) {
|
|
15399
15586
|
return value;
|
|
15400
15587
|
}
|
|
15401
15588
|
|
|
15402
|
-
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
15589
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
15403
15590
|
}
|
|
15404
15591
|
|
|
15405
15592
|
function parseTokens(str) {
|
|
@@ -15437,8 +15624,10 @@ ${JSON.stringify({
|
|
|
15437
15624
|
}
|
|
15438
15625
|
|
|
15439
15626
|
function formatHeader(header) {
|
|
15440
|
-
return header
|
|
15441
|
-
.
|
|
15627
|
+
return header
|
|
15628
|
+
.trim()
|
|
15629
|
+
.toLowerCase()
|
|
15630
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
15442
15631
|
return char.toUpperCase() + str;
|
|
15443
15632
|
});
|
|
15444
15633
|
}
|
|
@@ -15446,12 +15635,12 @@ ${JSON.stringify({
|
|
|
15446
15635
|
function buildAccessors(obj, header) {
|
|
15447
15636
|
const accessorName = utils$1.toCamelCase(' ' + header);
|
|
15448
15637
|
|
|
15449
|
-
['get', 'set', 'has'].forEach(methodName => {
|
|
15638
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
15450
15639
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
15451
|
-
value: function(arg1, arg2, arg3) {
|
|
15640
|
+
value: function (arg1, arg2, arg3) {
|
|
15452
15641
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
15453
15642
|
},
|
|
15454
|
-
configurable: true
|
|
15643
|
+
configurable: true,
|
|
15455
15644
|
});
|
|
15456
15645
|
});
|
|
15457
15646
|
}
|
|
@@ -15473,7 +15662,12 @@ ${JSON.stringify({
|
|
|
15473
15662
|
|
|
15474
15663
|
const key = utils$1.findKey(self, lHeader);
|
|
15475
15664
|
|
|
15476
|
-
if
|
|
15665
|
+
if (
|
|
15666
|
+
!key ||
|
|
15667
|
+
self[key] === undefined ||
|
|
15668
|
+
_rewrite === true ||
|
|
15669
|
+
(_rewrite === undefined && self[key] !== false)
|
|
15670
|
+
) {
|
|
15477
15671
|
self[key || _header] = normalizeValue(_value);
|
|
15478
15672
|
}
|
|
15479
15673
|
}
|
|
@@ -15483,17 +15677,22 @@ ${JSON.stringify({
|
|
|
15483
15677
|
|
|
15484
15678
|
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
15485
15679
|
setHeaders(header, valueOrRewrite);
|
|
15486
|
-
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
15680
|
+
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
15487
15681
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
15488
15682
|
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
|
15489
|
-
let obj = {},
|
|
15683
|
+
let obj = {},
|
|
15684
|
+
dest,
|
|
15685
|
+
key;
|
|
15490
15686
|
for (const entry of header) {
|
|
15491
15687
|
if (!utils$1.isArray(entry)) {
|
|
15492
15688
|
throw TypeError('Object iterator must return a key-value pair');
|
|
15493
15689
|
}
|
|
15494
15690
|
|
|
15495
|
-
obj[key = entry[0]] = (dest = obj[key])
|
|
15496
|
-
|
|
15691
|
+
obj[(key = entry[0])] = (dest = obj[key])
|
|
15692
|
+
? utils$1.isArray(dest)
|
|
15693
|
+
? [...dest, entry[1]]
|
|
15694
|
+
: [dest, entry[1]]
|
|
15695
|
+
: entry[1];
|
|
15497
15696
|
}
|
|
15498
15697
|
|
|
15499
15698
|
setHeaders(obj, valueOrRewrite);
|
|
@@ -15540,7 +15739,11 @@ ${JSON.stringify({
|
|
|
15540
15739
|
if (header) {
|
|
15541
15740
|
const key = utils$1.findKey(this, header);
|
|
15542
15741
|
|
|
15543
|
-
return !!(
|
|
15742
|
+
return !!(
|
|
15743
|
+
key &&
|
|
15744
|
+
this[key] !== undefined &&
|
|
15745
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
15746
|
+
);
|
|
15544
15747
|
}
|
|
15545
15748
|
|
|
15546
15749
|
return false;
|
|
@@ -15580,7 +15783,7 @@ ${JSON.stringify({
|
|
|
15580
15783
|
|
|
15581
15784
|
while (i--) {
|
|
15582
15785
|
const key = keys[i];
|
|
15583
|
-
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
15786
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
15584
15787
|
delete this[key];
|
|
15585
15788
|
deleted = true;
|
|
15586
15789
|
}
|
|
@@ -15624,7 +15827,9 @@ ${JSON.stringify({
|
|
|
15624
15827
|
const obj = Object.create(null);
|
|
15625
15828
|
|
|
15626
15829
|
utils$1.forEach(this, (value, header) => {
|
|
15627
|
-
value != null &&
|
|
15830
|
+
value != null &&
|
|
15831
|
+
value !== false &&
|
|
15832
|
+
(obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
|
|
15628
15833
|
});
|
|
15629
15834
|
|
|
15630
15835
|
return obj;
|
|
@@ -15635,11 +15840,13 @@ ${JSON.stringify({
|
|
|
15635
15840
|
}
|
|
15636
15841
|
|
|
15637
15842
|
toString() {
|
|
15638
|
-
return Object.entries(this.toJSON())
|
|
15843
|
+
return Object.entries(this.toJSON())
|
|
15844
|
+
.map(([header, value]) => header + ': ' + value)
|
|
15845
|
+
.join('\n');
|
|
15639
15846
|
}
|
|
15640
15847
|
|
|
15641
15848
|
getSetCookie() {
|
|
15642
|
-
return this.get(
|
|
15849
|
+
return this.get('set-cookie') || [];
|
|
15643
15850
|
}
|
|
15644
15851
|
|
|
15645
15852
|
get [Symbol.toStringTag]() {
|
|
@@ -15659,9 +15866,12 @@ ${JSON.stringify({
|
|
|
15659
15866
|
}
|
|
15660
15867
|
|
|
15661
15868
|
static accessor(header) {
|
|
15662
|
-
const internals =
|
|
15663
|
-
|
|
15664
|
-
|
|
15869
|
+
const internals =
|
|
15870
|
+
(this[$internals] =
|
|
15871
|
+
this[$internals] =
|
|
15872
|
+
{
|
|
15873
|
+
accessors: {},
|
|
15874
|
+
});
|
|
15665
15875
|
|
|
15666
15876
|
const accessors = internals.accessors;
|
|
15667
15877
|
const prototype = this.prototype;
|
|
@@ -15681,17 +15891,24 @@ ${JSON.stringify({
|
|
|
15681
15891
|
}
|
|
15682
15892
|
};
|
|
15683
15893
|
|
|
15684
|
-
AxiosHeaders$1.accessor([
|
|
15894
|
+
AxiosHeaders$1.accessor([
|
|
15895
|
+
'Content-Type',
|
|
15896
|
+
'Content-Length',
|
|
15897
|
+
'Accept',
|
|
15898
|
+
'Accept-Encoding',
|
|
15899
|
+
'User-Agent',
|
|
15900
|
+
'Authorization',
|
|
15901
|
+
]);
|
|
15685
15902
|
|
|
15686
15903
|
// reserved names hotfix
|
|
15687
|
-
utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({value}, key) => {
|
|
15904
|
+
utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
|
|
15688
15905
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
15689
15906
|
return {
|
|
15690
15907
|
get: () => value,
|
|
15691
15908
|
set(headerValue) {
|
|
15692
15909
|
this[mapped] = headerValue;
|
|
15693
|
-
}
|
|
15694
|
-
}
|
|
15910
|
+
},
|
|
15911
|
+
};
|
|
15695
15912
|
});
|
|
15696
15913
|
|
|
15697
15914
|
utils$1.freezeMethods(AxiosHeaders$1);
|
|
@@ -15754,19 +15971,23 @@ ${JSON.stringify({
|
|
|
15754
15971
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
15755
15972
|
resolve(response);
|
|
15756
15973
|
} else {
|
|
15757
|
-
reject(
|
|
15758
|
-
|
|
15759
|
-
|
|
15760
|
-
|
|
15761
|
-
|
|
15762
|
-
|
|
15763
|
-
|
|
15974
|
+
reject(
|
|
15975
|
+
new AxiosError$1(
|
|
15976
|
+
'Request failed with status code ' + response.status,
|
|
15977
|
+
[AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][
|
|
15978
|
+
Math.floor(response.status / 100) - 4
|
|
15979
|
+
],
|
|
15980
|
+
response.config,
|
|
15981
|
+
response.request,
|
|
15982
|
+
response
|
|
15983
|
+
)
|
|
15984
|
+
);
|
|
15764
15985
|
}
|
|
15765
15986
|
}
|
|
15766
15987
|
|
|
15767
15988
|
function parseProtocol(url) {
|
|
15768
15989
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
15769
|
-
return match && match[1] || '';
|
|
15990
|
+
return (match && match[1]) || '';
|
|
15770
15991
|
}
|
|
15771
15992
|
|
|
15772
15993
|
/**
|
|
@@ -15817,7 +16038,7 @@ ${JSON.stringify({
|
|
|
15817
16038
|
|
|
15818
16039
|
const passed = startedAt && now - startedAt;
|
|
15819
16040
|
|
|
15820
|
-
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
16041
|
+
return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
|
|
15821
16042
|
};
|
|
15822
16043
|
}
|
|
15823
16044
|
|
|
@@ -15846,7 +16067,7 @@ ${JSON.stringify({
|
|
|
15846
16067
|
const throttled = (...args) => {
|
|
15847
16068
|
const now = Date.now();
|
|
15848
16069
|
const passed = now - timestamp;
|
|
15849
|
-
if (
|
|
16070
|
+
if (passed >= threshold) {
|
|
15850
16071
|
invoke(args, now);
|
|
15851
16072
|
} else {
|
|
15852
16073
|
lastArgs = args;
|
|
@@ -15868,25 +16089,25 @@ ${JSON.stringify({
|
|
|
15868
16089
|
let bytesNotified = 0;
|
|
15869
16090
|
const _speedometer = speedometer(50, 250);
|
|
15870
16091
|
|
|
15871
|
-
return throttle(e => {
|
|
15872
|
-
const
|
|
16092
|
+
return throttle((e) => {
|
|
16093
|
+
const rawLoaded = e.loaded;
|
|
15873
16094
|
const total = e.lengthComputable ? e.total : undefined;
|
|
15874
|
-
const
|
|
16095
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
16096
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
15875
16097
|
const rate = _speedometer(progressBytes);
|
|
15876
|
-
const inRange = loaded <= total;
|
|
15877
16098
|
|
|
15878
|
-
bytesNotified = loaded;
|
|
16099
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
15879
16100
|
|
|
15880
16101
|
const data = {
|
|
15881
16102
|
loaded,
|
|
15882
16103
|
total,
|
|
15883
|
-
progress: total ?
|
|
16104
|
+
progress: total ? loaded / total : undefined,
|
|
15884
16105
|
bytes: progressBytes,
|
|
15885
16106
|
rate: rate ? rate : undefined,
|
|
15886
|
-
estimated: rate && total
|
|
16107
|
+
estimated: rate && total ? (total - loaded) / rate : undefined,
|
|
15887
16108
|
event: e,
|
|
15888
16109
|
lengthComputable: total != null,
|
|
15889
|
-
[isDownloadStream ? 'download' : 'upload']: true
|
|
16110
|
+
[isDownloadStream ? 'download' : 'upload']: true,
|
|
15890
16111
|
};
|
|
15891
16112
|
|
|
15892
16113
|
listener(data);
|
|
@@ -15896,77 +16117,82 @@ ${JSON.stringify({
|
|
|
15896
16117
|
const progressEventDecorator = (total, throttled) => {
|
|
15897
16118
|
const lengthComputable = total != null;
|
|
15898
16119
|
|
|
15899
|
-
return [
|
|
15900
|
-
|
|
15901
|
-
|
|
15902
|
-
|
|
15903
|
-
|
|
16120
|
+
return [
|
|
16121
|
+
(loaded) =>
|
|
16122
|
+
throttled[0]({
|
|
16123
|
+
lengthComputable,
|
|
16124
|
+
total,
|
|
16125
|
+
loaded,
|
|
16126
|
+
}),
|
|
16127
|
+
throttled[1],
|
|
16128
|
+
];
|
|
15904
16129
|
};
|
|
15905
16130
|
|
|
15906
|
-
const asyncDecorator =
|
|
16131
|
+
const asyncDecorator =
|
|
16132
|
+
(fn) =>
|
|
16133
|
+
(...args) =>
|
|
16134
|
+
utils$1.asap(() => fn(...args));
|
|
15907
16135
|
|
|
15908
|
-
const isURLSameOrigin = platform.hasStandardBrowserEnv
|
|
15909
|
-
|
|
16136
|
+
const isURLSameOrigin = platform.hasStandardBrowserEnv
|
|
16137
|
+
? ((origin, isMSIE) => (url) => {
|
|
16138
|
+
url = new URL(url, platform.origin);
|
|
15910
16139
|
|
|
15911
|
-
|
|
15912
|
-
|
|
15913
|
-
|
|
15914
|
-
|
|
15915
|
-
|
|
15916
|
-
|
|
15917
|
-
|
|
15918
|
-
|
|
15919
|
-
|
|
15920
|
-
|
|
15921
|
-
const cookies = platform.hasStandardBrowserEnv ?
|
|
16140
|
+
return (
|
|
16141
|
+
origin.protocol === url.protocol &&
|
|
16142
|
+
origin.host === url.host &&
|
|
16143
|
+
(isMSIE || origin.port === url.port)
|
|
16144
|
+
);
|
|
16145
|
+
})(
|
|
16146
|
+
new URL(platform.origin),
|
|
16147
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
16148
|
+
)
|
|
16149
|
+
: () => true;
|
|
15922
16150
|
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
16151
|
+
const cookies = platform.hasStandardBrowserEnv
|
|
16152
|
+
? // Standard browser envs support document.cookie
|
|
16153
|
+
{
|
|
16154
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
16155
|
+
if (typeof document === 'undefined') return;
|
|
15927
16156
|
|
|
15928
|
-
|
|
16157
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
15929
16158
|
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
|
|
15933
|
-
|
|
15934
|
-
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15940
|
-
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
|
|
16159
|
+
if (utils$1.isNumber(expires)) {
|
|
16160
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
16161
|
+
}
|
|
16162
|
+
if (utils$1.isString(path)) {
|
|
16163
|
+
cookie.push(`path=${path}`);
|
|
16164
|
+
}
|
|
16165
|
+
if (utils$1.isString(domain)) {
|
|
16166
|
+
cookie.push(`domain=${domain}`);
|
|
16167
|
+
}
|
|
16168
|
+
if (secure === true) {
|
|
16169
|
+
cookie.push('secure');
|
|
16170
|
+
}
|
|
16171
|
+
if (utils$1.isString(sameSite)) {
|
|
16172
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
16173
|
+
}
|
|
15945
16174
|
|
|
15946
|
-
|
|
15947
|
-
|
|
16175
|
+
document.cookie = cookie.join('; ');
|
|
16176
|
+
},
|
|
15948
16177
|
|
|
15949
|
-
|
|
15950
|
-
|
|
15951
|
-
|
|
15952
|
-
|
|
15953
|
-
|
|
16178
|
+
read(name) {
|
|
16179
|
+
if (typeof document === 'undefined') return null;
|
|
16180
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
16181
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
16182
|
+
},
|
|
15954
16183
|
|
|
15955
|
-
|
|
15956
|
-
|
|
16184
|
+
remove(name) {
|
|
16185
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
16186
|
+
},
|
|
15957
16187
|
}
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15964
|
-
|
|
15965
|
-
|
|
15966
|
-
return null;
|
|
15967
|
-
},
|
|
15968
|
-
remove() {}
|
|
15969
|
-
};
|
|
16188
|
+
: // Non-standard browser env (web workers, react-native) lack needed support.
|
|
16189
|
+
{
|
|
16190
|
+
write() {},
|
|
16191
|
+
read() {
|
|
16192
|
+
return null;
|
|
16193
|
+
},
|
|
16194
|
+
remove() {},
|
|
16195
|
+
};
|
|
15970
16196
|
|
|
15971
16197
|
/**
|
|
15972
16198
|
* Determines whether the specified URL is absolute
|
|
@@ -16012,14 +16238,13 @@ ${JSON.stringify({
|
|
|
16012
16238
|
*/
|
|
16013
16239
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
16014
16240
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
16015
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
16241
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
16016
16242
|
return combineURLs(baseURL, requestedURL);
|
|
16017
16243
|
}
|
|
16018
16244
|
return requestedURL;
|
|
16019
16245
|
}
|
|
16020
16246
|
|
|
16021
|
-
const headersToObject = (thing) =>
|
|
16022
|
-
thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
16247
|
+
const headersToObject = (thing) => (thing instanceof AxiosHeaders$1 ? { ...thing } : thing);
|
|
16023
16248
|
|
|
16024
16249
|
/**
|
|
16025
16250
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -16033,7 +16258,18 @@ ${JSON.stringify({
|
|
|
16033
16258
|
function mergeConfig$1(config1, config2) {
|
|
16034
16259
|
// eslint-disable-next-line no-param-reassign
|
|
16035
16260
|
config2 = config2 || {};
|
|
16036
|
-
|
|
16261
|
+
|
|
16262
|
+
// Use a null-prototype object so that downstream reads such as `config.auth`
|
|
16263
|
+
// or `config.baseURL` cannot inherit polluted values from Object.prototype
|
|
16264
|
+
// (see GHSA-q8qp-cvcw-x6jj). `hasOwnProperty` is restored as a non-enumerable
|
|
16265
|
+
// own slot to preserve ergonomics for user code that relies on it.
|
|
16266
|
+
const config = Object.create(null);
|
|
16267
|
+
Object.defineProperty(config, 'hasOwnProperty', {
|
|
16268
|
+
value: Object.prototype.hasOwnProperty,
|
|
16269
|
+
enumerable: false,
|
|
16270
|
+
writable: true,
|
|
16271
|
+
configurable: true,
|
|
16272
|
+
});
|
|
16037
16273
|
|
|
16038
16274
|
function getMergedValue(target, source, prop, caseless) {
|
|
16039
16275
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
@@ -16072,9 +16308,9 @@ ${JSON.stringify({
|
|
|
16072
16308
|
|
|
16073
16309
|
// eslint-disable-next-line consistent-return
|
|
16074
16310
|
function mergeDirectKeys(a, b, prop) {
|
|
16075
|
-
if (prop
|
|
16311
|
+
if (utils$1.hasOwnProp(config2, prop)) {
|
|
16076
16312
|
return getMergedValue(a, b);
|
|
16077
|
-
} else if (prop
|
|
16313
|
+
} else if (utils$1.hasOwnProp(config1, prop)) {
|
|
16078
16314
|
return getMergedValue(undefined, a);
|
|
16079
16315
|
}
|
|
16080
16316
|
}
|
|
@@ -16106,29 +16342,21 @@ ${JSON.stringify({
|
|
|
16106
16342
|
httpsAgent: defaultToConfig2,
|
|
16107
16343
|
cancelToken: defaultToConfig2,
|
|
16108
16344
|
socketPath: defaultToConfig2,
|
|
16345
|
+
allowedSocketPaths: defaultToConfig2,
|
|
16109
16346
|
responseEncoding: defaultToConfig2,
|
|
16110
16347
|
validateStatus: mergeDirectKeys,
|
|
16111
16348
|
headers: (a, b, prop) =>
|
|
16112
16349
|
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
16113
16350
|
};
|
|
16114
16351
|
|
|
16115
|
-
utils$1.forEach(
|
|
16116
|
-
|
|
16117
|
-
|
|
16118
|
-
|
|
16119
|
-
|
|
16120
|
-
|
|
16121
|
-
|
|
16122
|
-
|
|
16123
|
-
return;
|
|
16124
|
-
const merge = utils$1.hasOwnProp(mergeMap, prop)
|
|
16125
|
-
? mergeMap[prop]
|
|
16126
|
-
: mergeDeepProperties;
|
|
16127
|
-
const configValue = merge(config1[prop], config2[prop], prop);
|
|
16128
|
-
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
|
|
16129
|
-
(config[prop] = configValue);
|
|
16130
|
-
},
|
|
16131
|
-
);
|
|
16352
|
+
utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
16353
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
16354
|
+
const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
16355
|
+
const a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : undefined;
|
|
16356
|
+
const b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : undefined;
|
|
16357
|
+
const configValue = merge(a, b, prop);
|
|
16358
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
16359
|
+
});
|
|
16132
16360
|
|
|
16133
16361
|
return config;
|
|
16134
16362
|
}
|
|
@@ -16136,16 +16364,38 @@ ${JSON.stringify({
|
|
|
16136
16364
|
const resolveConfig = (config) => {
|
|
16137
16365
|
const newConfig = mergeConfig$1({}, config);
|
|
16138
16366
|
|
|
16139
|
-
|
|
16367
|
+
// Read only own properties to prevent prototype pollution gadgets
|
|
16368
|
+
// (e.g. Object.prototype.baseURL = 'https://evil.com'). See GHSA-q8qp-cvcw-x6jj.
|
|
16369
|
+
const own = (key) => (utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
|
|
16370
|
+
|
|
16371
|
+
const data = own('data');
|
|
16372
|
+
let withXSRFToken = own('withXSRFToken');
|
|
16373
|
+
const xsrfHeaderName = own('xsrfHeaderName');
|
|
16374
|
+
const xsrfCookieName = own('xsrfCookieName');
|
|
16375
|
+
let headers = own('headers');
|
|
16376
|
+
const auth = own('auth');
|
|
16377
|
+
const baseURL = own('baseURL');
|
|
16378
|
+
const allowAbsoluteUrls = own('allowAbsoluteUrls');
|
|
16379
|
+
const url = own('url');
|
|
16140
16380
|
|
|
16141
16381
|
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
|
16142
16382
|
|
|
16143
|
-
newConfig.url = buildURL(
|
|
16383
|
+
newConfig.url = buildURL(
|
|
16384
|
+
buildFullPath(baseURL, url, allowAbsoluteUrls),
|
|
16385
|
+
config.params,
|
|
16386
|
+
config.paramsSerializer
|
|
16387
|
+
);
|
|
16144
16388
|
|
|
16145
16389
|
// HTTP basic authentication
|
|
16146
16390
|
if (auth) {
|
|
16147
|
-
headers.set(
|
|
16148
|
-
|
|
16391
|
+
headers.set(
|
|
16392
|
+
'Authorization',
|
|
16393
|
+
'Basic ' +
|
|
16394
|
+
btoa(
|
|
16395
|
+
(auth.username || '') +
|
|
16396
|
+
':' +
|
|
16397
|
+
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
16398
|
+
)
|
|
16149
16399
|
);
|
|
16150
16400
|
}
|
|
16151
16401
|
|
|
@@ -16163,17 +16413,25 @@ ${JSON.stringify({
|
|
|
16163
16413
|
}
|
|
16164
16414
|
});
|
|
16165
16415
|
}
|
|
16166
|
-
}
|
|
16416
|
+
}
|
|
16167
16417
|
|
|
16168
16418
|
// Add xsrf header
|
|
16169
16419
|
// This is only done if running in a standard browser environment.
|
|
16170
16420
|
// Specifically not if we're in a web worker, or react-native.
|
|
16171
16421
|
|
|
16172
16422
|
if (platform.hasStandardBrowserEnv) {
|
|
16173
|
-
|
|
16423
|
+
if (utils$1.isFunction(withXSRFToken)) {
|
|
16424
|
+
withXSRFToken = withXSRFToken(newConfig);
|
|
16425
|
+
}
|
|
16426
|
+
|
|
16427
|
+
// Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
|
|
16428
|
+
// and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
|
|
16429
|
+
// the XSRF token cross-origin. See GHSA-xx6v-rp6x-q39c.
|
|
16430
|
+
const shouldSendXSRF =
|
|
16431
|
+
withXSRFToken === true ||
|
|
16432
|
+
(withXSRFToken == null && isURLSameOrigin(newConfig.url));
|
|
16174
16433
|
|
|
16175
|
-
if (
|
|
16176
|
-
// Add xsrf header
|
|
16434
|
+
if (shouldSendXSRF) {
|
|
16177
16435
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
16178
16436
|
|
|
16179
16437
|
if (xsrfValue) {
|
|
@@ -16187,196 +16445,218 @@ ${JSON.stringify({
|
|
|
16187
16445
|
|
|
16188
16446
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
16189
16447
|
|
|
16190
|
-
const xhrAdapter = isXHRAdapterSupported &&
|
|
16191
|
-
|
|
16192
|
-
|
|
16193
|
-
|
|
16194
|
-
|
|
16195
|
-
|
|
16196
|
-
|
|
16197
|
-
|
|
16198
|
-
|
|
16448
|
+
const xhrAdapter = isXHRAdapterSupported &&
|
|
16449
|
+
function (config) {
|
|
16450
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
16451
|
+
const _config = resolveConfig(config);
|
|
16452
|
+
let requestData = _config.data;
|
|
16453
|
+
const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
|
|
16454
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
16455
|
+
let onCanceled;
|
|
16456
|
+
let uploadThrottled, downloadThrottled;
|
|
16457
|
+
let flushUpload, flushDownload;
|
|
16199
16458
|
|
|
16200
|
-
|
|
16201
|
-
|
|
16202
|
-
|
|
16459
|
+
function done() {
|
|
16460
|
+
flushUpload && flushUpload(); // flush events
|
|
16461
|
+
flushDownload && flushDownload(); // flush events
|
|
16203
16462
|
|
|
16204
|
-
|
|
16463
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
16205
16464
|
|
|
16206
|
-
|
|
16207
|
-
|
|
16465
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
16466
|
+
}
|
|
16208
16467
|
|
|
16209
|
-
|
|
16468
|
+
let request = new XMLHttpRequest();
|
|
16210
16469
|
|
|
16211
|
-
|
|
16470
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
16212
16471
|
|
|
16213
|
-
|
|
16214
|
-
|
|
16472
|
+
// Set the request timeout in MS
|
|
16473
|
+
request.timeout = _config.timeout;
|
|
16215
16474
|
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16475
|
+
function onloadend() {
|
|
16476
|
+
if (!request) {
|
|
16477
|
+
return;
|
|
16478
|
+
}
|
|
16479
|
+
// Prepare the response
|
|
16480
|
+
const responseHeaders = AxiosHeaders$1.from(
|
|
16481
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
16482
|
+
);
|
|
16483
|
+
const responseData =
|
|
16484
|
+
!responseType || responseType === 'text' || responseType === 'json'
|
|
16485
|
+
? request.responseText
|
|
16486
|
+
: request.response;
|
|
16487
|
+
const response = {
|
|
16488
|
+
data: responseData,
|
|
16489
|
+
status: request.status,
|
|
16490
|
+
statusText: request.statusText,
|
|
16491
|
+
headers: responseHeaders,
|
|
16492
|
+
config,
|
|
16493
|
+
request,
|
|
16494
|
+
};
|
|
16495
|
+
|
|
16496
|
+
settle(
|
|
16497
|
+
function _resolve(value) {
|
|
16498
|
+
resolve(value);
|
|
16499
|
+
done();
|
|
16500
|
+
},
|
|
16501
|
+
function _reject(err) {
|
|
16502
|
+
reject(err);
|
|
16503
|
+
done();
|
|
16504
|
+
},
|
|
16505
|
+
response
|
|
16506
|
+
);
|
|
16507
|
+
|
|
16508
|
+
// Clean up request
|
|
16509
|
+
request = null;
|
|
16219
16510
|
}
|
|
16220
|
-
// Prepare the response
|
|
16221
|
-
const responseHeaders = AxiosHeaders$1.from(
|
|
16222
|
-
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
16223
|
-
);
|
|
16224
|
-
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
16225
|
-
request.responseText : request.response;
|
|
16226
|
-
const response = {
|
|
16227
|
-
data: responseData,
|
|
16228
|
-
status: request.status,
|
|
16229
|
-
statusText: request.statusText,
|
|
16230
|
-
headers: responseHeaders,
|
|
16231
|
-
config,
|
|
16232
|
-
request
|
|
16233
|
-
};
|
|
16234
16511
|
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
}
|
|
16239
|
-
|
|
16240
|
-
|
|
16241
|
-
|
|
16512
|
+
if ('onloadend' in request) {
|
|
16513
|
+
// Use onloadend if available
|
|
16514
|
+
request.onloadend = onloadend;
|
|
16515
|
+
} else {
|
|
16516
|
+
// Listen for ready state to emulate onloadend
|
|
16517
|
+
request.onreadystatechange = function handleLoad() {
|
|
16518
|
+
if (!request || request.readyState !== 4) {
|
|
16519
|
+
return;
|
|
16520
|
+
}
|
|
16242
16521
|
|
|
16243
|
-
|
|
16244
|
-
|
|
16245
|
-
|
|
16522
|
+
// The request errored out and we didn't get a response, this will be
|
|
16523
|
+
// handled by onerror instead
|
|
16524
|
+
// With one exception: request that using file: protocol, most browsers
|
|
16525
|
+
// will return status as 0 even though it's a successful request
|
|
16526
|
+
if (
|
|
16527
|
+
request.status === 0 &&
|
|
16528
|
+
!(request.responseURL && request.responseURL.indexOf('file:') === 0)
|
|
16529
|
+
) {
|
|
16530
|
+
return;
|
|
16531
|
+
}
|
|
16532
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
16533
|
+
// so we should call onloadend on the next 'tick'
|
|
16534
|
+
setTimeout(onloadend);
|
|
16535
|
+
};
|
|
16536
|
+
}
|
|
16246
16537
|
|
|
16247
|
-
|
|
16248
|
-
|
|
16249
|
-
|
|
16250
|
-
} else {
|
|
16251
|
-
// Listen for ready state to emulate onloadend
|
|
16252
|
-
request.onreadystatechange = function handleLoad() {
|
|
16253
|
-
if (!request || request.readyState !== 4) {
|
|
16538
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
16539
|
+
request.onabort = function handleAbort() {
|
|
16540
|
+
if (!request) {
|
|
16254
16541
|
return;
|
|
16255
16542
|
}
|
|
16256
16543
|
|
|
16257
|
-
|
|
16258
|
-
|
|
16259
|
-
//
|
|
16260
|
-
|
|
16261
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
16262
|
-
return;
|
|
16263
|
-
}
|
|
16264
|
-
// readystate handler is calling before onerror or ontimeout handlers,
|
|
16265
|
-
// so we should call onloadend on the next 'tick'
|
|
16266
|
-
setTimeout(onloadend);
|
|
16544
|
+
reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
|
|
16545
|
+
|
|
16546
|
+
// Clean up request
|
|
16547
|
+
request = null;
|
|
16267
16548
|
};
|
|
16268
|
-
}
|
|
16269
16549
|
|
|
16270
|
-
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
|
|
16274
|
-
|
|
16550
|
+
// Handle low level network errors
|
|
16551
|
+
request.onerror = function handleError(event) {
|
|
16552
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
16553
|
+
// (message may be empty; when present, surface it)
|
|
16554
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
16555
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
16556
|
+
const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
|
16557
|
+
// attach the underlying event for consumers who want details
|
|
16558
|
+
err.event = event || null;
|
|
16559
|
+
reject(err);
|
|
16560
|
+
request = null;
|
|
16561
|
+
};
|
|
16275
16562
|
|
|
16276
|
-
|
|
16563
|
+
// Handle timeout
|
|
16564
|
+
request.ontimeout = function handleTimeout() {
|
|
16565
|
+
let timeoutErrorMessage = _config.timeout
|
|
16566
|
+
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
16567
|
+
: 'timeout exceeded';
|
|
16568
|
+
const transitional = _config.transitional || transitionalDefaults;
|
|
16569
|
+
if (_config.timeoutErrorMessage) {
|
|
16570
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
16571
|
+
}
|
|
16572
|
+
reject(
|
|
16573
|
+
new AxiosError$1(
|
|
16574
|
+
timeoutErrorMessage,
|
|
16575
|
+
transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
16576
|
+
config,
|
|
16577
|
+
request
|
|
16578
|
+
)
|
|
16579
|
+
);
|
|
16277
16580
|
|
|
16278
|
-
|
|
16279
|
-
|
|
16280
|
-
|
|
16581
|
+
// Clean up request
|
|
16582
|
+
request = null;
|
|
16583
|
+
};
|
|
16281
16584
|
|
|
16282
|
-
|
|
16283
|
-
|
|
16284
|
-
// Browsers deliver a ProgressEvent in XHR onerror
|
|
16285
|
-
// (message may be empty; when present, surface it)
|
|
16286
|
-
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
16287
|
-
const msg = event && event.message ? event.message : 'Network Error';
|
|
16288
|
-
const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
|
16289
|
-
// attach the underlying event for consumers who want details
|
|
16290
|
-
err.event = event || null;
|
|
16291
|
-
reject(err);
|
|
16292
|
-
request = null;
|
|
16293
|
-
};
|
|
16294
|
-
|
|
16295
|
-
// Handle timeout
|
|
16296
|
-
request.ontimeout = function handleTimeout() {
|
|
16297
|
-
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
16298
|
-
const transitional = _config.transitional || transitionalDefaults;
|
|
16299
|
-
if (_config.timeoutErrorMessage) {
|
|
16300
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
16301
|
-
}
|
|
16302
|
-
reject(new AxiosError$1(
|
|
16303
|
-
timeoutErrorMessage,
|
|
16304
|
-
transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
16305
|
-
config,
|
|
16306
|
-
request));
|
|
16307
|
-
|
|
16308
|
-
// Clean up request
|
|
16309
|
-
request = null;
|
|
16310
|
-
};
|
|
16585
|
+
// Remove Content-Type if data is undefined
|
|
16586
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
16311
16587
|
|
|
16312
|
-
|
|
16313
|
-
|
|
16588
|
+
// Add headers to the request
|
|
16589
|
+
if ('setRequestHeader' in request) {
|
|
16590
|
+
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
16591
|
+
request.setRequestHeader(key, val);
|
|
16592
|
+
});
|
|
16593
|
+
}
|
|
16314
16594
|
|
|
16315
|
-
|
|
16316
|
-
|
|
16317
|
-
|
|
16318
|
-
|
|
16319
|
-
});
|
|
16320
|
-
}
|
|
16595
|
+
// Add withCredentials to request if needed
|
|
16596
|
+
if (!utils$1.isUndefined(_config.withCredentials)) {
|
|
16597
|
+
request.withCredentials = !!_config.withCredentials;
|
|
16598
|
+
}
|
|
16321
16599
|
|
|
16322
|
-
|
|
16323
|
-
|
|
16324
|
-
|
|
16325
|
-
|
|
16600
|
+
// Add responseType to request if needed
|
|
16601
|
+
if (responseType && responseType !== 'json') {
|
|
16602
|
+
request.responseType = _config.responseType;
|
|
16603
|
+
}
|
|
16326
16604
|
|
|
16327
|
-
|
|
16328
|
-
|
|
16329
|
-
|
|
16330
|
-
|
|
16605
|
+
// Handle progress if needed
|
|
16606
|
+
if (onDownloadProgress) {
|
|
16607
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
16608
|
+
request.addEventListener('progress', downloadThrottled);
|
|
16609
|
+
}
|
|
16331
16610
|
|
|
16332
|
-
|
|
16333
|
-
|
|
16334
|
-
|
|
16335
|
-
request.addEventListener('progress', downloadThrottled);
|
|
16336
|
-
}
|
|
16611
|
+
// Not all browsers support upload events
|
|
16612
|
+
if (onUploadProgress && request.upload) {
|
|
16613
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
16337
16614
|
|
|
16338
|
-
|
|
16339
|
-
if (onUploadProgress && request.upload) {
|
|
16340
|
-
([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
|
|
16615
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
16341
16616
|
|
|
16342
|
-
|
|
16617
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
16618
|
+
}
|
|
16343
16619
|
|
|
16344
|
-
|
|
16345
|
-
|
|
16620
|
+
if (_config.cancelToken || _config.signal) {
|
|
16621
|
+
// Handle cancellation
|
|
16622
|
+
// eslint-disable-next-line func-names
|
|
16623
|
+
onCanceled = (cancel) => {
|
|
16624
|
+
if (!request) {
|
|
16625
|
+
return;
|
|
16626
|
+
}
|
|
16627
|
+
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
|
16628
|
+
request.abort();
|
|
16629
|
+
request = null;
|
|
16630
|
+
};
|
|
16346
16631
|
|
|
16347
|
-
|
|
16348
|
-
|
|
16349
|
-
|
|
16350
|
-
|
|
16351
|
-
|
|
16352
|
-
return;
|
|
16632
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
16633
|
+
if (_config.signal) {
|
|
16634
|
+
_config.signal.aborted
|
|
16635
|
+
? onCanceled()
|
|
16636
|
+
: _config.signal.addEventListener('abort', onCanceled);
|
|
16353
16637
|
}
|
|
16354
|
-
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
|
16355
|
-
request.abort();
|
|
16356
|
-
request = null;
|
|
16357
|
-
};
|
|
16358
|
-
|
|
16359
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
16360
|
-
if (_config.signal) {
|
|
16361
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
16362
16638
|
}
|
|
16363
|
-
}
|
|
16364
16639
|
|
|
16365
|
-
|
|
16366
|
-
|
|
16367
|
-
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
16368
|
-
reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
|
|
16369
|
-
return;
|
|
16370
|
-
}
|
|
16640
|
+
const protocol = parseProtocol(_config.url);
|
|
16371
16641
|
|
|
16642
|
+
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
16643
|
+
reject(
|
|
16644
|
+
new AxiosError$1(
|
|
16645
|
+
'Unsupported protocol ' + protocol + ':',
|
|
16646
|
+
AxiosError$1.ERR_BAD_REQUEST,
|
|
16647
|
+
config
|
|
16648
|
+
)
|
|
16649
|
+
);
|
|
16650
|
+
return;
|
|
16651
|
+
}
|
|
16372
16652
|
|
|
16373
|
-
|
|
16374
|
-
|
|
16375
|
-
|
|
16376
|
-
|
|
16653
|
+
// Send the request
|
|
16654
|
+
request.send(requestData || null);
|
|
16655
|
+
});
|
|
16656
|
+
};
|
|
16377
16657
|
|
|
16378
16658
|
const composeSignals = (signals, timeout) => {
|
|
16379
|
-
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
16659
|
+
const { length } = (signals = signals ? signals.filter(Boolean) : []);
|
|
16380
16660
|
|
|
16381
16661
|
if (timeout || length) {
|
|
16382
16662
|
let controller = new AbortController();
|
|
@@ -16388,21 +16668,29 @@ ${JSON.stringify({
|
|
|
16388
16668
|
aborted = true;
|
|
16389
16669
|
unsubscribe();
|
|
16390
16670
|
const err = reason instanceof Error ? reason : this.reason;
|
|
16391
|
-
controller.abort(
|
|
16671
|
+
controller.abort(
|
|
16672
|
+
err instanceof AxiosError$1
|
|
16673
|
+
? err
|
|
16674
|
+
: new CanceledError$1(err instanceof Error ? err.message : err)
|
|
16675
|
+
);
|
|
16392
16676
|
}
|
|
16393
16677
|
};
|
|
16394
16678
|
|
|
16395
|
-
let timer =
|
|
16396
|
-
|
|
16397
|
-
|
|
16398
|
-
|
|
16679
|
+
let timer =
|
|
16680
|
+
timeout &&
|
|
16681
|
+
setTimeout(() => {
|
|
16682
|
+
timer = null;
|
|
16683
|
+
onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
|
|
16684
|
+
}, timeout);
|
|
16399
16685
|
|
|
16400
16686
|
const unsubscribe = () => {
|
|
16401
16687
|
if (signals) {
|
|
16402
16688
|
timer && clearTimeout(timer);
|
|
16403
16689
|
timer = null;
|
|
16404
|
-
signals.forEach(signal => {
|
|
16405
|
-
signal.unsubscribe
|
|
16690
|
+
signals.forEach((signal) => {
|
|
16691
|
+
signal.unsubscribe
|
|
16692
|
+
? signal.unsubscribe(onabort)
|
|
16693
|
+
: signal.removeEventListener('abort', onabort);
|
|
16406
16694
|
});
|
|
16407
16695
|
signals = null;
|
|
16408
16696
|
}
|
|
@@ -16410,7 +16698,7 @@ ${JSON.stringify({
|
|
|
16410
16698
|
|
|
16411
16699
|
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
16412
16700
|
|
|
16413
|
-
const {signal} = controller;
|
|
16701
|
+
const { signal } = controller;
|
|
16414
16702
|
|
|
16415
16703
|
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
16416
16704
|
|
|
@@ -16451,7 +16739,7 @@ ${JSON.stringify({
|
|
|
16451
16739
|
const reader = stream.getReader();
|
|
16452
16740
|
try {
|
|
16453
16741
|
for (;;) {
|
|
16454
|
-
const {done, value} = await reader.read();
|
|
16742
|
+
const { done, value } = await reader.read();
|
|
16455
16743
|
if (done) {
|
|
16456
16744
|
break;
|
|
16457
16745
|
}
|
|
@@ -16474,64 +16762,69 @@ ${JSON.stringify({
|
|
|
16474
16762
|
}
|
|
16475
16763
|
};
|
|
16476
16764
|
|
|
16477
|
-
return new ReadableStream(
|
|
16478
|
-
|
|
16479
|
-
|
|
16480
|
-
|
|
16765
|
+
return new ReadableStream(
|
|
16766
|
+
{
|
|
16767
|
+
async pull(controller) {
|
|
16768
|
+
try {
|
|
16769
|
+
const { done, value } = await iterator.next();
|
|
16481
16770
|
|
|
16482
|
-
|
|
16483
|
-
|
|
16484
|
-
|
|
16485
|
-
|
|
16486
|
-
|
|
16771
|
+
if (done) {
|
|
16772
|
+
_onFinish();
|
|
16773
|
+
controller.close();
|
|
16774
|
+
return;
|
|
16775
|
+
}
|
|
16487
16776
|
|
|
16488
|
-
|
|
16489
|
-
|
|
16490
|
-
|
|
16491
|
-
|
|
16777
|
+
let len = value.byteLength;
|
|
16778
|
+
if (onProgress) {
|
|
16779
|
+
let loadedBytes = (bytes += len);
|
|
16780
|
+
onProgress(loadedBytes);
|
|
16781
|
+
}
|
|
16782
|
+
controller.enqueue(new Uint8Array(value));
|
|
16783
|
+
} catch (err) {
|
|
16784
|
+
_onFinish(err);
|
|
16785
|
+
throw err;
|
|
16492
16786
|
}
|
|
16493
|
-
|
|
16494
|
-
|
|
16495
|
-
_onFinish(
|
|
16496
|
-
|
|
16497
|
-
}
|
|
16787
|
+
},
|
|
16788
|
+
cancel(reason) {
|
|
16789
|
+
_onFinish(reason);
|
|
16790
|
+
return iterator.return();
|
|
16791
|
+
},
|
|
16498
16792
|
},
|
|
16499
|
-
|
|
16500
|
-
|
|
16501
|
-
return iterator.return();
|
|
16793
|
+
{
|
|
16794
|
+
highWaterMark: 2,
|
|
16502
16795
|
}
|
|
16503
|
-
|
|
16504
|
-
highWaterMark: 2
|
|
16505
|
-
})
|
|
16796
|
+
);
|
|
16506
16797
|
};
|
|
16507
16798
|
|
|
16508
16799
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
16509
16800
|
|
|
16510
|
-
const {isFunction} = utils$1;
|
|
16801
|
+
const { isFunction } = utils$1;
|
|
16511
16802
|
|
|
16512
|
-
const globalFetchAPI = (({Request, Response}) => ({
|
|
16513
|
-
Request,
|
|
16803
|
+
const globalFetchAPI = (({ Request, Response }) => ({
|
|
16804
|
+
Request,
|
|
16805
|
+
Response,
|
|
16514
16806
|
}))(utils$1.global);
|
|
16515
16807
|
|
|
16516
|
-
const {
|
|
16517
|
-
ReadableStream: ReadableStream$1, TextEncoder
|
|
16518
|
-
} = utils$1.global;
|
|
16519
|
-
|
|
16808
|
+
const { ReadableStream: ReadableStream$1, TextEncoder } = utils$1.global;
|
|
16520
16809
|
|
|
16521
16810
|
const test = (fn, ...args) => {
|
|
16522
16811
|
try {
|
|
16523
16812
|
return !!fn(...args);
|
|
16524
16813
|
} catch (e) {
|
|
16525
|
-
return false
|
|
16814
|
+
return false;
|
|
16526
16815
|
}
|
|
16527
16816
|
};
|
|
16528
16817
|
|
|
16529
16818
|
const factory = (env) => {
|
|
16530
|
-
env = utils$1.merge.call(
|
|
16531
|
-
|
|
16532
|
-
|
|
16819
|
+
env = utils$1.merge.call(
|
|
16820
|
+
{
|
|
16821
|
+
skipUndefined: true,
|
|
16822
|
+
},
|
|
16823
|
+
globalFetchAPI,
|
|
16824
|
+
env
|
|
16825
|
+
);
|
|
16533
16826
|
|
|
16534
|
-
const {fetch: envFetch, Request, Response} = env;
|
|
16827
|
+
const { fetch: envFetch, Request, Response } = env;
|
|
16535
16828
|
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
16536
16829
|
const isRequestSupported = isFunction(Request);
|
|
16537
16830
|
const isResponseSupported = isFunction(Response);
|
|
@@ -16542,46 +16835,67 @@ ${JSON.stringify({
|
|
|
16542
16835
|
|
|
16543
16836
|
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
|
|
16544
16837
|
|
|
16545
|
-
const encodeText =
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
|
|
16838
|
+
const encodeText =
|
|
16839
|
+
isFetchSupported &&
|
|
16840
|
+
(typeof TextEncoder === 'function'
|
|
16841
|
+
? (
|
|
16842
|
+
(encoder) => (str) =>
|
|
16843
|
+
encoder.encode(str)
|
|
16844
|
+
)(new TextEncoder())
|
|
16845
|
+
: async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
16846
|
+
|
|
16847
|
+
const supportsRequestStream =
|
|
16848
|
+
isRequestSupported &&
|
|
16849
|
+
isReadableStreamSupported &&
|
|
16850
|
+
test(() => {
|
|
16851
|
+
let duplexAccessed = false;
|
|
16852
|
+
|
|
16853
|
+
const request = new Request(platform.origin, {
|
|
16854
|
+
body: new ReadableStream$1(),
|
|
16855
|
+
method: 'POST',
|
|
16856
|
+
get duplex() {
|
|
16857
|
+
duplexAccessed = true;
|
|
16858
|
+
return 'half';
|
|
16859
|
+
},
|
|
16860
|
+
});
|
|
16549
16861
|
|
|
16550
|
-
|
|
16551
|
-
let duplexAccessed = false;
|
|
16862
|
+
const hasContentType = request.headers.has('Content-Type');
|
|
16552
16863
|
|
|
16553
|
-
|
|
16554
|
-
|
|
16555
|
-
|
|
16556
|
-
get duplex() {
|
|
16557
|
-
duplexAccessed = true;
|
|
16558
|
-
return 'half';
|
|
16559
|
-
},
|
|
16560
|
-
}).headers.has('Content-Type');
|
|
16864
|
+
if (request.body != null) {
|
|
16865
|
+
request.body.cancel();
|
|
16866
|
+
}
|
|
16561
16867
|
|
|
16562
|
-
|
|
16563
|
-
|
|
16868
|
+
return duplexAccessed && !hasContentType;
|
|
16869
|
+
});
|
|
16564
16870
|
|
|
16565
|
-
const supportsResponseStream =
|
|
16871
|
+
const supportsResponseStream =
|
|
16872
|
+
isResponseSupported &&
|
|
16873
|
+
isReadableStreamSupported &&
|
|
16566
16874
|
test(() => utils$1.isReadableStream(new Response('').body));
|
|
16567
16875
|
|
|
16568
16876
|
const resolvers = {
|
|
16569
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
16877
|
+
stream: supportsResponseStream && ((res) => res.body),
|
|
16570
16878
|
};
|
|
16571
16879
|
|
|
16572
|
-
isFetchSupported &&
|
|
16573
|
-
|
|
16574
|
-
|
|
16575
|
-
|
|
16880
|
+
isFetchSupported &&
|
|
16881
|
+
(() => {
|
|
16882
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
|
|
16883
|
+
!resolvers[type] &&
|
|
16884
|
+
(resolvers[type] = (res, config) => {
|
|
16885
|
+
let method = res && res[type];
|
|
16576
16886
|
|
|
16577
|
-
|
|
16578
|
-
|
|
16579
|
-
|
|
16887
|
+
if (method) {
|
|
16888
|
+
return method.call(res);
|
|
16889
|
+
}
|
|
16580
16890
|
|
|
16581
|
-
|
|
16891
|
+
throw new AxiosError$1(
|
|
16892
|
+
`Response type '${type}' is not supported`,
|
|
16893
|
+
AxiosError$1.ERR_NOT_SUPPORT,
|
|
16894
|
+
config
|
|
16895
|
+
);
|
|
16896
|
+
});
|
|
16582
16897
|
});
|
|
16583
|
-
});
|
|
16584
|
-
})());
|
|
16898
|
+
})();
|
|
16585
16899
|
|
|
16586
16900
|
const getBodyLength = async (body) => {
|
|
16587
16901
|
if (body == null) {
|
|
@@ -16632,32 +16946,41 @@ ${JSON.stringify({
|
|
|
16632
16946
|
responseType,
|
|
16633
16947
|
headers,
|
|
16634
16948
|
withCredentials = 'same-origin',
|
|
16635
|
-
fetchOptions
|
|
16949
|
+
fetchOptions,
|
|
16636
16950
|
} = resolveConfig(config);
|
|
16637
16951
|
|
|
16638
16952
|
let _fetch = envFetch || fetch;
|
|
16639
16953
|
|
|
16640
16954
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
16641
16955
|
|
|
16642
|
-
let composedSignal = composeSignals(
|
|
16956
|
+
let composedSignal = composeSignals(
|
|
16957
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
16958
|
+
timeout
|
|
16959
|
+
);
|
|
16643
16960
|
|
|
16644
16961
|
let request = null;
|
|
16645
16962
|
|
|
16646
|
-
const unsubscribe =
|
|
16647
|
-
composedSignal
|
|
16648
|
-
|
|
16963
|
+
const unsubscribe =
|
|
16964
|
+
composedSignal &&
|
|
16965
|
+
composedSignal.unsubscribe &&
|
|
16966
|
+
(() => {
|
|
16967
|
+
composedSignal.unsubscribe();
|
|
16968
|
+
});
|
|
16649
16969
|
|
|
16650
16970
|
let requestContentLength;
|
|
16651
16971
|
|
|
16652
16972
|
try {
|
|
16653
16973
|
if (
|
|
16654
|
-
onUploadProgress &&
|
|
16974
|
+
onUploadProgress &&
|
|
16975
|
+
supportsRequestStream &&
|
|
16976
|
+
method !== 'get' &&
|
|
16977
|
+
method !== 'head' &&
|
|
16655
16978
|
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
16656
16979
|
) {
|
|
16657
16980
|
let _request = new Request(url, {
|
|
16658
16981
|
method: 'POST',
|
|
16659
16982
|
body: data,
|
|
16660
|
-
duplex:
|
|
16983
|
+
duplex: 'half',
|
|
16661
16984
|
});
|
|
16662
16985
|
|
|
16663
16986
|
let contentTypeHeader;
|
|
@@ -16682,7 +17005,20 @@ ${JSON.stringify({
|
|
|
16682
17005
|
|
|
16683
17006
|
// Cloudflare Workers throws when credentials are defined
|
|
16684
17007
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
16685
|
-
const isCredentialsSupported = isRequestSupported &&
|
|
17008
|
+
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
17009
|
+
|
|
17010
|
+
// If data is FormData and Content-Type is multipart/form-data without boundary,
|
|
17011
|
+
// delete it so fetch can set it correctly with the boundary
|
|
17012
|
+
if (utils$1.isFormData(data)) {
|
|
17013
|
+
const contentType = headers.getContentType();
|
|
17014
|
+
if (
|
|
17015
|
+
contentType &&
|
|
17016
|
+
/^multipart\/form-data/i.test(contentType) &&
|
|
17017
|
+
!/boundary=/i.test(contentType)
|
|
17018
|
+
) {
|
|
17019
|
+
headers.delete('content-type');
|
|
17020
|
+
}
|
|
17021
|
+
}
|
|
16686
17022
|
|
|
16687
17023
|
const resolvedOptions = {
|
|
16688
17024
|
...fetchOptions,
|
|
@@ -16690,29 +17026,35 @@ ${JSON.stringify({
|
|
|
16690
17026
|
method: method.toUpperCase(),
|
|
16691
17027
|
headers: headers.normalize().toJSON(),
|
|
16692
17028
|
body: data,
|
|
16693
|
-
duplex:
|
|
16694
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
17029
|
+
duplex: 'half',
|
|
17030
|
+
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
16695
17031
|
};
|
|
16696
17032
|
|
|
16697
17033
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
16698
17034
|
|
|
16699
|
-
let response = await (isRequestSupported
|
|
17035
|
+
let response = await (isRequestSupported
|
|
17036
|
+
? _fetch(request, fetchOptions)
|
|
17037
|
+
: _fetch(url, resolvedOptions));
|
|
16700
17038
|
|
|
16701
|
-
const isStreamResponse =
|
|
17039
|
+
const isStreamResponse =
|
|
17040
|
+
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
16702
17041
|
|
|
16703
17042
|
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
16704
17043
|
const options = {};
|
|
16705
17044
|
|
|
16706
|
-
['status', 'statusText', 'headers'].forEach(prop => {
|
|
17045
|
+
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
16707
17046
|
options[prop] = response[prop];
|
|
16708
17047
|
});
|
|
16709
17048
|
|
|
16710
17049
|
const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
|
16711
17050
|
|
|
16712
|
-
const [onProgress, flush] =
|
|
16713
|
-
|
|
16714
|
-
|
|
16715
|
-
|
|
17051
|
+
const [onProgress, flush] =
|
|
17052
|
+
(onDownloadProgress &&
|
|
17053
|
+
progressEventDecorator(
|
|
17054
|
+
responseContentLength,
|
|
17055
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
17056
|
+
)) ||
|
|
17057
|
+
[];
|
|
16716
17058
|
|
|
16717
17059
|
response = new Response(
|
|
16718
17060
|
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
@@ -16725,7 +17067,10 @@ ${JSON.stringify({
|
|
|
16725
17067
|
|
|
16726
17068
|
responseType = responseType || 'text';
|
|
16727
17069
|
|
|
16728
|
-
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
|
|
17070
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
|
|
17071
|
+
response,
|
|
17072
|
+
config
|
|
17073
|
+
);
|
|
16729
17074
|
|
|
16730
17075
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
16731
17076
|
|
|
@@ -16736,43 +17081,50 @@ ${JSON.stringify({
|
|
|
16736
17081
|
status: response.status,
|
|
16737
17082
|
statusText: response.statusText,
|
|
16738
17083
|
config,
|
|
16739
|
-
request
|
|
17084
|
+
request,
|
|
16740
17085
|
});
|
|
16741
|
-
})
|
|
17086
|
+
});
|
|
16742
17087
|
} catch (err) {
|
|
16743
17088
|
unsubscribe && unsubscribe();
|
|
16744
17089
|
|
|
16745
17090
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
16746
17091
|
throw Object.assign(
|
|
16747
|
-
new AxiosError$1(
|
|
17092
|
+
new AxiosError$1(
|
|
17093
|
+
'Network Error',
|
|
17094
|
+
AxiosError$1.ERR_NETWORK,
|
|
17095
|
+
config,
|
|
17096
|
+
request,
|
|
17097
|
+
err && err.response
|
|
17098
|
+
),
|
|
16748
17099
|
{
|
|
16749
|
-
cause: err.cause || err
|
|
17100
|
+
cause: err.cause || err,
|
|
16750
17101
|
}
|
|
16751
|
-
)
|
|
17102
|
+
);
|
|
16752
17103
|
}
|
|
16753
17104
|
|
|
16754
17105
|
throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
|
|
16755
17106
|
}
|
|
16756
|
-
}
|
|
17107
|
+
};
|
|
16757
17108
|
};
|
|
16758
17109
|
|
|
16759
17110
|
const seedCache = new Map();
|
|
16760
17111
|
|
|
16761
17112
|
const getFetch = (config) => {
|
|
16762
17113
|
let env = (config && config.env) || {};
|
|
16763
|
-
const {fetch, Request, Response} = env;
|
|
16764
|
-
const seeds = [
|
|
16765
|
-
Request, Response, fetch
|
|
16766
|
-
];
|
|
17114
|
+
const { fetch, Request, Response } = env;
|
|
17115
|
+
const seeds = [Request, Response, fetch];
|
|
16767
17116
|
|
|
16768
|
-
let len = seeds.length,
|
|
16769
|
-
|
|
17117
|
+
let len = seeds.length,
|
|
17118
|
+
i = len,
|
|
17119
|
+
seed,
|
|
17120
|
+
target,
|
|
17121
|
+
map = seedCache;
|
|
16770
17122
|
|
|
16771
17123
|
while (i--) {
|
|
16772
17124
|
seed = seeds[i];
|
|
16773
17125
|
target = map.get(seed);
|
|
16774
17126
|
|
|
16775
|
-
target === undefined && map.set(seed, target =
|
|
17127
|
+
target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
|
|
16776
17128
|
|
|
16777
17129
|
map = target;
|
|
16778
17130
|
}
|
|
@@ -16788,7 +17140,7 @@ ${JSON.stringify({
|
|
|
16788
17140
|
* - `http` for Node.js
|
|
16789
17141
|
* - `xhr` for browsers
|
|
16790
17142
|
* - `fetch` for fetch API-based requests
|
|
16791
|
-
*
|
|
17143
|
+
*
|
|
16792
17144
|
* @type {Object<string, Function|Object>}
|
|
16793
17145
|
*/
|
|
16794
17146
|
const knownAdapters = {
|
|
@@ -16796,7 +17148,7 @@ ${JSON.stringify({
|
|
|
16796
17148
|
xhr: xhrAdapter,
|
|
16797
17149
|
fetch: {
|
|
16798
17150
|
get: getFetch,
|
|
16799
|
-
}
|
|
17151
|
+
},
|
|
16800
17152
|
};
|
|
16801
17153
|
|
|
16802
17154
|
// Assign adapter names for easier debugging and identification
|
|
@@ -16813,7 +17165,7 @@ ${JSON.stringify({
|
|
|
16813
17165
|
|
|
16814
17166
|
/**
|
|
16815
17167
|
* Render a rejection reason string for unknown or unsupported adapters
|
|
16816
|
-
*
|
|
17168
|
+
*
|
|
16817
17169
|
* @param {string} reason
|
|
16818
17170
|
* @returns {string}
|
|
16819
17171
|
*/
|
|
@@ -16821,17 +17173,18 @@ ${JSON.stringify({
|
|
|
16821
17173
|
|
|
16822
17174
|
/**
|
|
16823
17175
|
* Check if the adapter is resolved (function, null, or false)
|
|
16824
|
-
*
|
|
17176
|
+
*
|
|
16825
17177
|
* @param {Function|null|false} adapter
|
|
16826
17178
|
* @returns {boolean}
|
|
16827
17179
|
*/
|
|
16828
|
-
const isResolvedHandle = (adapter) =>
|
|
17180
|
+
const isResolvedHandle = (adapter) =>
|
|
17181
|
+
utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
16829
17182
|
|
|
16830
17183
|
/**
|
|
16831
17184
|
* Get the first suitable adapter from the provided list.
|
|
16832
17185
|
* Tries each adapter in order until a supported one is found.
|
|
16833
17186
|
* Throws an AxiosError if no adapter is suitable.
|
|
16834
|
-
*
|
|
17187
|
+
*
|
|
16835
17188
|
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
16836
17189
|
* @param {Object} config - Axios request configuration
|
|
16837
17190
|
* @throws {AxiosError} If no suitable adapter is available
|
|
@@ -16868,14 +17221,17 @@ ${JSON.stringify({
|
|
|
16868
17221
|
}
|
|
16869
17222
|
|
|
16870
17223
|
if (!adapter) {
|
|
16871
|
-
const reasons = Object.entries(rejectedReasons)
|
|
16872
|
-
|
|
17224
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
17225
|
+
([id, state]) =>
|
|
17226
|
+
`adapter ${id} ` +
|
|
16873
17227
|
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
16874
|
-
|
|
17228
|
+
);
|
|
16875
17229
|
|
|
16876
|
-
let s = length
|
|
16877
|
-
|
|
16878
|
-
|
|
17230
|
+
let s = length
|
|
17231
|
+
? reasons.length > 1
|
|
17232
|
+
? 'since :\n' + reasons.map(renderReason).join('\n')
|
|
17233
|
+
: ' ' + renderReason(reasons[0])
|
|
17234
|
+
: 'as no adapter specified';
|
|
16879
17235
|
|
|
16880
17236
|
throw new AxiosError$1(
|
|
16881
17237
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
@@ -16900,7 +17256,7 @@ ${JSON.stringify({
|
|
|
16900
17256
|
* Exposes all known adapters
|
|
16901
17257
|
* @type {Object<string, Function|Object>}
|
|
16902
17258
|
*/
|
|
16903
|
-
adapters: knownAdapters
|
|
17259
|
+
adapters: knownAdapters,
|
|
16904
17260
|
};
|
|
16905
17261
|
|
|
16906
17262
|
/**
|
|
@@ -16933,10 +17289,7 @@ ${JSON.stringify({
|
|
|
16933
17289
|
config.headers = AxiosHeaders$1.from(config.headers);
|
|
16934
17290
|
|
|
16935
17291
|
// Transform request data
|
|
16936
|
-
config.data = transformData.call(
|
|
16937
|
-
config,
|
|
16938
|
-
config.transformRequest
|
|
16939
|
-
);
|
|
17292
|
+
config.data = transformData.call(config, config.transformRequest);
|
|
16940
17293
|
|
|
16941
17294
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
16942
17295
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
@@ -16944,39 +17297,38 @@ ${JSON.stringify({
|
|
|
16944
17297
|
|
|
16945
17298
|
const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
|
|
16946
17299
|
|
|
16947
|
-
return adapter(config).then(
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
// Transform response data
|
|
16951
|
-
response.data = transformData.call(
|
|
16952
|
-
config,
|
|
16953
|
-
config.transformResponse,
|
|
16954
|
-
response
|
|
16955
|
-
);
|
|
16956
|
-
|
|
16957
|
-
response.headers = AxiosHeaders$1.from(response.headers);
|
|
16958
|
-
|
|
16959
|
-
return response;
|
|
16960
|
-
}, function onAdapterRejection(reason) {
|
|
16961
|
-
if (!isCancel$1(reason)) {
|
|
17300
|
+
return adapter(config).then(
|
|
17301
|
+
function onAdapterResolution(response) {
|
|
16962
17302
|
throwIfCancellationRequested(config);
|
|
16963
17303
|
|
|
16964
17304
|
// Transform response data
|
|
16965
|
-
|
|
16966
|
-
|
|
16967
|
-
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
|
|
17305
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
17306
|
+
|
|
17307
|
+
response.headers = AxiosHeaders$1.from(response.headers);
|
|
17308
|
+
|
|
17309
|
+
return response;
|
|
17310
|
+
},
|
|
17311
|
+
function onAdapterRejection(reason) {
|
|
17312
|
+
if (!isCancel$1(reason)) {
|
|
17313
|
+
throwIfCancellationRequested(config);
|
|
17314
|
+
|
|
17315
|
+
// Transform response data
|
|
17316
|
+
if (reason && reason.response) {
|
|
17317
|
+
reason.response.data = transformData.call(
|
|
17318
|
+
config,
|
|
17319
|
+
config.transformResponse,
|
|
17320
|
+
reason.response
|
|
17321
|
+
);
|
|
17322
|
+
reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
|
|
17323
|
+
}
|
|
16972
17324
|
}
|
|
16973
|
-
}
|
|
16974
17325
|
|
|
16975
|
-
|
|
16976
|
-
|
|
17326
|
+
return Promise.reject(reason);
|
|
17327
|
+
}
|
|
17328
|
+
);
|
|
16977
17329
|
}
|
|
16978
17330
|
|
|
16979
|
-
const VERSION$1 = "1.
|
|
17331
|
+
const VERSION$1 = "1.15.2";
|
|
16980
17332
|
|
|
16981
17333
|
const validators$1 = {};
|
|
16982
17334
|
|
|
@@ -17000,7 +17352,15 @@ ${JSON.stringify({
|
|
|
17000
17352
|
*/
|
|
17001
17353
|
validators$1.transitional = function transitional(validator, version, message) {
|
|
17002
17354
|
function formatMessage(opt, desc) {
|
|
17003
|
-
return
|
|
17355
|
+
return (
|
|
17356
|
+
'[Axios v' +
|
|
17357
|
+
VERSION$1 +
|
|
17358
|
+
"] Transitional option '" +
|
|
17359
|
+
opt +
|
|
17360
|
+
"'" +
|
|
17361
|
+
desc +
|
|
17362
|
+
(message ? '. ' + message : '')
|
|
17363
|
+
);
|
|
17004
17364
|
}
|
|
17005
17365
|
|
|
17006
17366
|
// eslint-disable-next-line func-names
|
|
@@ -17032,7 +17392,7 @@ ${JSON.stringify({
|
|
|
17032
17392
|
// eslint-disable-next-line no-console
|
|
17033
17393
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
17034
17394
|
return true;
|
|
17035
|
-
}
|
|
17395
|
+
};
|
|
17036
17396
|
};
|
|
17037
17397
|
|
|
17038
17398
|
/**
|
|
@@ -17053,12 +17413,17 @@ ${JSON.stringify({
|
|
|
17053
17413
|
let i = keys.length;
|
|
17054
17414
|
while (i-- > 0) {
|
|
17055
17415
|
const opt = keys[i];
|
|
17056
|
-
|
|
17416
|
+
// Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
|
|
17417
|
+
// a non-function validator and cause a TypeError. See GHSA-q8qp-cvcw-x6jj.
|
|
17418
|
+
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
|
|
17057
17419
|
if (validator) {
|
|
17058
17420
|
const value = options[opt];
|
|
17059
17421
|
const result = value === undefined || validator(value, opt, options);
|
|
17060
17422
|
if (result !== true) {
|
|
17061
|
-
throw new AxiosError$1(
|
|
17423
|
+
throw new AxiosError$1(
|
|
17424
|
+
'option ' + opt + ' must be ' + result,
|
|
17425
|
+
AxiosError$1.ERR_BAD_OPTION_VALUE
|
|
17426
|
+
);
|
|
17062
17427
|
}
|
|
17063
17428
|
continue;
|
|
17064
17429
|
}
|
|
@@ -17070,7 +17435,7 @@ ${JSON.stringify({
|
|
|
17070
17435
|
|
|
17071
17436
|
const validator = {
|
|
17072
17437
|
assertOptions,
|
|
17073
|
-
validators: validators$1
|
|
17438
|
+
validators: validators$1,
|
|
17074
17439
|
};
|
|
17075
17440
|
|
|
17076
17441
|
const validators = validator.validators;
|
|
@@ -17087,7 +17452,7 @@ ${JSON.stringify({
|
|
|
17087
17452
|
this.defaults = instanceConfig || {};
|
|
17088
17453
|
this.interceptors = {
|
|
17089
17454
|
request: new InterceptorManager(),
|
|
17090
|
-
response: new InterceptorManager()
|
|
17455
|
+
response: new InterceptorManager(),
|
|
17091
17456
|
};
|
|
17092
17457
|
}
|
|
17093
17458
|
|
|
@@ -17109,13 +17474,29 @@ ${JSON.stringify({
|
|
|
17109
17474
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
17110
17475
|
|
|
17111
17476
|
// slice off the Error: ... line
|
|
17112
|
-
const stack =
|
|
17477
|
+
const stack = (() => {
|
|
17478
|
+
if (!dummy.stack) {
|
|
17479
|
+
return '';
|
|
17480
|
+
}
|
|
17481
|
+
|
|
17482
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
17483
|
+
|
|
17484
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
17485
|
+
})();
|
|
17113
17486
|
try {
|
|
17114
17487
|
if (!err.stack) {
|
|
17115
17488
|
err.stack = stack;
|
|
17116
17489
|
// match without the 2 top stack lines
|
|
17117
|
-
} else if (stack
|
|
17118
|
-
|
|
17490
|
+
} else if (stack) {
|
|
17491
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
17492
|
+
const secondNewlineIndex =
|
|
17493
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
17494
|
+
const stackWithoutTwoTopLines =
|
|
17495
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
17496
|
+
|
|
17497
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
17498
|
+
err.stack += '\n' + stack;
|
|
17499
|
+
}
|
|
17119
17500
|
}
|
|
17120
17501
|
} catch (e) {
|
|
17121
17502
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -17138,27 +17519,35 @@ ${JSON.stringify({
|
|
|
17138
17519
|
|
|
17139
17520
|
config = mergeConfig$1(this.defaults, config);
|
|
17140
17521
|
|
|
17141
|
-
const {transitional, paramsSerializer, headers} = config;
|
|
17522
|
+
const { transitional, paramsSerializer, headers } = config;
|
|
17142
17523
|
|
|
17143
17524
|
if (transitional !== undefined) {
|
|
17144
|
-
validator.assertOptions(
|
|
17145
|
-
|
|
17146
|
-
|
|
17147
|
-
|
|
17148
|
-
|
|
17149
|
-
|
|
17525
|
+
validator.assertOptions(
|
|
17526
|
+
transitional,
|
|
17527
|
+
{
|
|
17528
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
17529
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
17530
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
17531
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
17532
|
+
},
|
|
17533
|
+
false
|
|
17534
|
+
);
|
|
17150
17535
|
}
|
|
17151
17536
|
|
|
17152
17537
|
if (paramsSerializer != null) {
|
|
17153
17538
|
if (utils$1.isFunction(paramsSerializer)) {
|
|
17154
17539
|
config.paramsSerializer = {
|
|
17155
|
-
serialize: paramsSerializer
|
|
17540
|
+
serialize: paramsSerializer,
|
|
17156
17541
|
};
|
|
17157
17542
|
} else {
|
|
17158
|
-
validator.assertOptions(
|
|
17159
|
-
|
|
17160
|
-
|
|
17161
|
-
|
|
17543
|
+
validator.assertOptions(
|
|
17544
|
+
paramsSerializer,
|
|
17545
|
+
{
|
|
17546
|
+
encode: validators.function,
|
|
17547
|
+
serialize: validators.function,
|
|
17548
|
+
},
|
|
17549
|
+
true
|
|
17550
|
+
);
|
|
17162
17551
|
}
|
|
17163
17552
|
}
|
|
17164
17553
|
|
|
@@ -17169,26 +17558,25 @@ ${JSON.stringify({
|
|
|
17169
17558
|
config.allowAbsoluteUrls = true;
|
|
17170
17559
|
}
|
|
17171
17560
|
|
|
17172
|
-
validator.assertOptions(
|
|
17173
|
-
|
|
17174
|
-
|
|
17175
|
-
|
|
17561
|
+
validator.assertOptions(
|
|
17562
|
+
config,
|
|
17563
|
+
{
|
|
17564
|
+
baseUrl: validators.spelling('baseURL'),
|
|
17565
|
+
withXsrfToken: validators.spelling('withXSRFToken'),
|
|
17566
|
+
},
|
|
17567
|
+
true
|
|
17568
|
+
);
|
|
17176
17569
|
|
|
17177
17570
|
// Set config.method
|
|
17178
17571
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
17179
17572
|
|
|
17180
17573
|
// Flatten headers
|
|
17181
|
-
let contextHeaders = headers && utils$1.merge(
|
|
17182
|
-
headers.common,
|
|
17183
|
-
headers[config.method]
|
|
17184
|
-
);
|
|
17574
|
+
let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
|
|
17185
17575
|
|
|
17186
|
-
headers &&
|
|
17187
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
17188
|
-
(method) => {
|
|
17576
|
+
headers &&
|
|
17577
|
+
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
17189
17578
|
delete headers[method];
|
|
17190
|
-
}
|
|
17191
|
-
);
|
|
17579
|
+
});
|
|
17192
17580
|
|
|
17193
17581
|
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
|
17194
17582
|
|
|
@@ -17203,7 +17591,8 @@ ${JSON.stringify({
|
|
|
17203
17591
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
17204
17592
|
|
|
17205
17593
|
const transitional = config.transitional || transitionalDefaults;
|
|
17206
|
-
const legacyInterceptorReqResOrdering =
|
|
17594
|
+
const legacyInterceptorReqResOrdering =
|
|
17595
|
+
transitional && transitional.legacyInterceptorReqResOrdering;
|
|
17207
17596
|
|
|
17208
17597
|
if (legacyInterceptorReqResOrdering) {
|
|
17209
17598
|
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
@@ -17277,28 +17666,32 @@ ${JSON.stringify({
|
|
|
17277
17666
|
// Provide aliases for supported request methods
|
|
17278
17667
|
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
17279
17668
|
/*eslint func-names:0*/
|
|
17280
|
-
Axios$1.prototype[method] = function(url, config) {
|
|
17281
|
-
return this.request(
|
|
17282
|
-
|
|
17283
|
-
|
|
17284
|
-
|
|
17285
|
-
|
|
17669
|
+
Axios$1.prototype[method] = function (url, config) {
|
|
17670
|
+
return this.request(
|
|
17671
|
+
mergeConfig$1(config || {}, {
|
|
17672
|
+
method,
|
|
17673
|
+
url,
|
|
17674
|
+
data: (config || {}).data,
|
|
17675
|
+
})
|
|
17676
|
+
);
|
|
17286
17677
|
};
|
|
17287
17678
|
});
|
|
17288
17679
|
|
|
17289
17680
|
utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
17290
|
-
/*eslint func-names:0*/
|
|
17291
|
-
|
|
17292
17681
|
function generateHTTPMethod(isForm) {
|
|
17293
17682
|
return function httpMethod(url, data, config) {
|
|
17294
|
-
return this.request(
|
|
17295
|
-
|
|
17296
|
-
|
|
17297
|
-
|
|
17298
|
-
|
|
17299
|
-
|
|
17300
|
-
|
|
17301
|
-
|
|
17683
|
+
return this.request(
|
|
17684
|
+
mergeConfig$1(config || {}, {
|
|
17685
|
+
method,
|
|
17686
|
+
headers: isForm
|
|
17687
|
+
? {
|
|
17688
|
+
'Content-Type': 'multipart/form-data',
|
|
17689
|
+
}
|
|
17690
|
+
: {},
|
|
17691
|
+
url,
|
|
17692
|
+
data,
|
|
17693
|
+
})
|
|
17694
|
+
);
|
|
17302
17695
|
};
|
|
17303
17696
|
}
|
|
17304
17697
|
|
|
@@ -17329,7 +17722,7 @@ ${JSON.stringify({
|
|
|
17329
17722
|
const token = this;
|
|
17330
17723
|
|
|
17331
17724
|
// eslint-disable-next-line func-names
|
|
17332
|
-
this.promise.then(cancel => {
|
|
17725
|
+
this.promise.then((cancel) => {
|
|
17333
17726
|
if (!token._listeners) return;
|
|
17334
17727
|
|
|
17335
17728
|
let i = token._listeners.length;
|
|
@@ -17341,10 +17734,10 @@ ${JSON.stringify({
|
|
|
17341
17734
|
});
|
|
17342
17735
|
|
|
17343
17736
|
// eslint-disable-next-line func-names
|
|
17344
|
-
this.promise.then = onfulfilled => {
|
|
17737
|
+
this.promise.then = (onfulfilled) => {
|
|
17345
17738
|
let _resolve;
|
|
17346
17739
|
// eslint-disable-next-line func-names
|
|
17347
|
-
const promise = new Promise(resolve => {
|
|
17740
|
+
const promise = new Promise((resolve) => {
|
|
17348
17741
|
token.subscribe(resolve);
|
|
17349
17742
|
_resolve = resolve;
|
|
17350
17743
|
}).then(onfulfilled);
|
|
@@ -17432,7 +17825,7 @@ ${JSON.stringify({
|
|
|
17432
17825
|
});
|
|
17433
17826
|
return {
|
|
17434
17827
|
token,
|
|
17435
|
-
cancel
|
|
17828
|
+
cancel,
|
|
17436
17829
|
};
|
|
17437
17830
|
}
|
|
17438
17831
|
};
|
|
@@ -17472,7 +17865,7 @@ ${JSON.stringify({
|
|
|
17472
17865
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
17473
17866
|
*/
|
|
17474
17867
|
function isAxiosError$1(payload) {
|
|
17475
|
-
return utils$1.isObject(payload) &&
|
|
17868
|
+
return utils$1.isObject(payload) && payload.isAxiosError === true;
|
|
17476
17869
|
}
|
|
17477
17870
|
|
|
17478
17871
|
const HttpStatusCode$1 = {
|
|
@@ -17563,10 +17956,10 @@ ${JSON.stringify({
|
|
|
17563
17956
|
const instance = bind(Axios$1.prototype.request, context);
|
|
17564
17957
|
|
|
17565
17958
|
// Copy axios.prototype to instance
|
|
17566
|
-
utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
|
|
17959
|
+
utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
|
|
17567
17960
|
|
|
17568
17961
|
// Copy context to instance
|
|
17569
|
-
utils$1.extend(instance, context, null, {allOwnKeys: true});
|
|
17962
|
+
utils$1.extend(instance, context, null, { allOwnKeys: true });
|
|
17570
17963
|
|
|
17571
17964
|
// Factory for creating new instances
|
|
17572
17965
|
instance.create = function create(instanceConfig) {
|
|
@@ -17610,7 +18003,7 @@ ${JSON.stringify({
|
|
|
17610
18003
|
|
|
17611
18004
|
axios.AxiosHeaders = AxiosHeaders$1;
|
|
17612
18005
|
|
|
17613
|
-
axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
18006
|
+
axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
17614
18007
|
|
|
17615
18008
|
axios.getAdapter = adapters.getAdapter;
|
|
17616
18009
|
|
|
@@ -17637,7 +18030,7 @@ ${JSON.stringify({
|
|
|
17637
18030
|
HttpStatusCode,
|
|
17638
18031
|
formToJSON,
|
|
17639
18032
|
getAdapter,
|
|
17640
|
-
mergeConfig
|
|
18033
|
+
mergeConfig,
|
|
17641
18034
|
} = axios;
|
|
17642
18035
|
|
|
17643
18036
|
var __defProp$P = Object.defineProperty;
|
|
@@ -17697,7 +18090,7 @@ ${JSON.stringify({
|
|
|
17697
18090
|
this._logger = LoggerFactory.createNullLogger();
|
|
17698
18091
|
const defaultHeaders = {};
|
|
17699
18092
|
if (this.isServerSide()) {
|
|
17700
|
-
defaultHeaders["User-Agent"] = "b24-js-sdk/1.0.
|
|
18093
|
+
defaultHeaders["User-Agent"] = "b24-js-sdk/1.0.6";
|
|
17701
18094
|
}
|
|
17702
18095
|
this._authActions = authActions;
|
|
17703
18096
|
this._requestIdGenerator = new RequestIdGenerator();
|
|
@@ -18333,7 +18726,7 @@ ${JSON.stringify({
|
|
|
18333
18726
|
|
|
18334
18727
|
const limit = 1024;
|
|
18335
18728
|
|
|
18336
|
-
const encode = function encode(str,
|
|
18729
|
+
const encode = function encode(str, _defaultEncoder, _kind, format) {
|
|
18337
18730
|
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
18338
18731
|
// It has been adapted here for stricter adherence to RFC 3986
|
|
18339
18732
|
if (str.length === 0) {
|
|
@@ -18347,12 +18740,6 @@ ${JSON.stringify({
|
|
|
18347
18740
|
string = String(str);
|
|
18348
18741
|
}
|
|
18349
18742
|
|
|
18350
|
-
if (charset === 'iso-8859-1') {
|
|
18351
|
-
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
18352
|
-
return '%26%23' + parseInt($0.slice(2), 16) + '%3B'
|
|
18353
|
-
})
|
|
18354
|
-
}
|
|
18355
|
-
|
|
18356
18743
|
let out = '';
|
|
18357
18744
|
for (let j = 0; j < string.length; j += limit) {
|
|
18358
18745
|
const segment = string.length >= limit ? string.slice(j, j + limit) : string;
|
|
@@ -18454,8 +18841,6 @@ ${JSON.stringify({
|
|
|
18454
18841
|
allowDots: false,
|
|
18455
18842
|
allowEmptyArrays: false,
|
|
18456
18843
|
arrayFormat: 'indices',
|
|
18457
|
-
charset: 'utf-8',
|
|
18458
|
-
charsetSentinel: false,
|
|
18459
18844
|
delimiter: '&',
|
|
18460
18845
|
encode: true,
|
|
18461
18846
|
encodeDotInKeys: false,
|
|
@@ -18501,7 +18886,6 @@ ${JSON.stringify({
|
|
|
18501
18886
|
format,
|
|
18502
18887
|
formatter,
|
|
18503
18888
|
encodeValuesOnly,
|
|
18504
|
-
charset,
|
|
18505
18889
|
sideChannel,
|
|
18506
18890
|
) {
|
|
18507
18891
|
let obj = object;
|
|
@@ -18541,7 +18925,7 @@ ${JSON.stringify({
|
|
|
18541
18925
|
if (obj === null) {
|
|
18542
18926
|
if (strictNullHandling) {
|
|
18543
18927
|
return encoder && !encodeValuesOnly
|
|
18544
|
-
? encoder(prefix, defaults.encoder,
|
|
18928
|
+
? encoder(prefix, defaults.encoder, 'key', format)
|
|
18545
18929
|
: prefix
|
|
18546
18930
|
}
|
|
18547
18931
|
|
|
@@ -18552,11 +18936,11 @@ ${JSON.stringify({
|
|
|
18552
18936
|
if (encoder) {
|
|
18553
18937
|
const keyValue = encodeValuesOnly
|
|
18554
18938
|
? prefix
|
|
18555
|
-
: encoder(prefix, defaults.encoder,
|
|
18939
|
+
: encoder(prefix, defaults.encoder, 'key', format);
|
|
18556
18940
|
return [
|
|
18557
18941
|
formatter(keyValue) +
|
|
18558
18942
|
'=' +
|
|
18559
|
-
formatter(encoder(obj, defaults.encoder,
|
|
18943
|
+
formatter(encoder(obj, defaults.encoder, 'value', format)),
|
|
18560
18944
|
]
|
|
18561
18945
|
}
|
|
18562
18946
|
return [formatter(prefix) + '=' + formatter(String(obj))]
|
|
@@ -18628,7 +19012,6 @@ ${JSON.stringify({
|
|
|
18628
19012
|
format,
|
|
18629
19013
|
formatter,
|
|
18630
19014
|
encodeValuesOnly,
|
|
18631
|
-
charset,
|
|
18632
19015
|
valueSideChannel,
|
|
18633
19016
|
),
|
|
18634
19017
|
);
|
|
@@ -18701,24 +19084,13 @@ ${JSON.stringify({
|
|
|
18701
19084
|
options.format,
|
|
18702
19085
|
options.formatter,
|
|
18703
19086
|
options.encodeValuesOnly,
|
|
18704
|
-
options.charset,
|
|
18705
19087
|
sideChannel,
|
|
18706
19088
|
),
|
|
18707
19089
|
);
|
|
18708
19090
|
}
|
|
18709
19091
|
|
|
18710
19092
|
const joined = keys.join(options.delimiter);
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
if (options.charsetSentinel) {
|
|
18714
|
-
if (options.charset === 'iso-8859-1') {
|
|
18715
|
-
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
|
18716
|
-
prefix += 'utf8=%26%2310003%3B&';
|
|
18717
|
-
} else {
|
|
18718
|
-
// encodeURIComponent('✓')
|
|
18719
|
-
prefix += 'utf8=%E2%9C%93&';
|
|
18720
|
-
}
|
|
18721
|
-
}
|
|
19093
|
+
const prefix = options.addQueryPrefix === true ? '?' : '';
|
|
18722
19094
|
|
|
18723
19095
|
return joined.length > 0 ? prefix + joined : ''
|
|
18724
19096
|
}
|
|
@@ -18971,7 +19343,7 @@ ${JSON.stringify({
|
|
|
18971
19343
|
}
|
|
18972
19344
|
const queryParams = new URLSearchParams({
|
|
18973
19345
|
[this._requestIdGenerator.getQueryStringParameterName()]: requestId,
|
|
18974
|
-
[this._requestIdGenerator.getQueryStringSdkParameterName()]: "1.0.
|
|
19346
|
+
[this._requestIdGenerator.getQueryStringSdkParameterName()]: "1.0.6",
|
|
18975
19347
|
[this._requestIdGenerator.getQueryStringSdkTypeParameterName()]: "b24-js-sdk"
|
|
18976
19348
|
});
|
|
18977
19349
|
return `${baseUrl}${methodUrl}?${queryParams.toString()}`;
|
|
@@ -19218,7 +19590,7 @@ ${JSON.stringify({
|
|
|
19218
19590
|
const methodUrl = `/${encodeURIComponent(method)}`;
|
|
19219
19591
|
const queryParams = new URLSearchParams({
|
|
19220
19592
|
[this._requestIdGenerator.getQueryStringParameterName()]: requestId,
|
|
19221
|
-
[this._requestIdGenerator.getQueryStringSdkParameterName()]: "1.0.
|
|
19593
|
+
[this._requestIdGenerator.getQueryStringSdkParameterName()]: "1.0.6",
|
|
19222
19594
|
[this._requestIdGenerator.getQueryStringSdkTypeParameterName()]: "b24-js-sdk"
|
|
19223
19595
|
});
|
|
19224
19596
|
return `${baseUrl}${methodUrl}?${queryParams.toString()}`;
|
|
@@ -21855,8 +22227,14 @@ ${JSON.stringify({
|
|
|
21855
22227
|
return Promise.resolve();
|
|
21856
22228
|
}
|
|
21857
22229
|
try {
|
|
21858
|
-
const response = await this._b24.
|
|
22230
|
+
const response = await this._b24.actions.v2.batchByChunk.make({
|
|
22231
|
+
calls: batchRequest,
|
|
22232
|
+
options: { isHaltOnError: true }
|
|
22233
|
+
});
|
|
21859
22234
|
const data = response.getData();
|
|
22235
|
+
if (!Array.isArray(data)) {
|
|
22236
|
+
return Promise.resolve();
|
|
22237
|
+
}
|
|
21860
22238
|
data.forEach((row) => {
|
|
21861
22239
|
if (typeof row.LANG === "undefined") {
|
|
21862
22240
|
return;
|