@dartcom/ui-kit 2.9.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/layers/leaflet/hooks/useGetLeafletLayer.js +51 -0
- package/dist/cjs/components/layers/leaflet/hooks/useGetLeafletLayer.js.map +1 -0
- package/dist/cjs/components/layers/leaflet/leaflet.js +47 -0
- package/dist/cjs/components/layers/leaflet/leaflet.js.map +1 -0
- package/dist/cjs/components/list/list.js +26 -5
- package/dist/cjs/components/list/list.js.map +1 -1
- package/dist/cjs/configs/global/constants.js +13 -0
- package/dist/cjs/configs/global/constants.js.map +1 -0
- package/dist/cjs/configs/global/global.js +32 -8
- package/dist/cjs/configs/global/global.js.map +1 -1
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/node_modules/@react-leaflet/core/lib/context.js +19 -0
- package/dist/cjs/node_modules/@react-leaflet/core/lib/context.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/adapters/adapters.js +88 -0
- package/dist/cjs/node_modules/axios/lib/adapters/adapters.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/adapters/fetch.js +293 -0
- package/dist/cjs/node_modules/axios/lib/adapters/fetch.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/adapters/xhr.js +207 -0
- package/dist/cjs/node_modules/axios/lib/adapters/xhr.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/axios.js +95 -0
- package/dist/cjs/node_modules/axios/lib/axios.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/cancel/CancelToken.js +141 -0
- package/dist/cjs/node_modules/axios/lib/cancel/CancelToken.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/cancel/CanceledError.js +29 -0
- package/dist/cjs/node_modules/axios/lib/cancel/CanceledError.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/cancel/isCancel.js +11 -0
- package/dist/cjs/node_modules/axios/lib/cancel/isCancel.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/core/Axios.js +244 -0
- package/dist/cjs/node_modules/axios/lib/core/Axios.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/core/AxiosError.js +114 -0
- package/dist/cjs/node_modules/axios/lib/core/AxiosError.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/core/AxiosHeaders.js +320 -0
- package/dist/cjs/node_modules/axios/lib/core/AxiosHeaders.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/core/InterceptorManager.js +77 -0
- package/dist/cjs/node_modules/axios/lib/core/InterceptorManager.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/core/buildFullPath.js +28 -0
- package/dist/cjs/node_modules/axios/lib/core/buildFullPath.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/core/dispatchRequest.js +87 -0
- package/dist/cjs/node_modules/axios/lib/core/dispatchRequest.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/core/mergeConfig.js +112 -0
- package/dist/cjs/node_modules/axios/lib/core/mergeConfig.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/core/settle.js +33 -0
- package/dist/cjs/node_modules/axios/lib/core/settle.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/core/transformData.js +34 -0
- package/dist/cjs/node_modules/axios/lib/core/transformData.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/defaults/index.js +167 -0
- package/dist/cjs/node_modules/axios/lib/defaults/index.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/defaults/transitional.js +13 -0
- package/dist/cjs/node_modules/axios/lib/defaults/transitional.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/env/data.js +8 -0
- package/dist/cjs/node_modules/axios/lib/env/data.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +62 -0
- package/dist/cjs/node_modules/axios/lib/helpers/AxiosURLSearchParams.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/HttpStatusCode.js +78 -0
- package/dist/cjs/node_modules/axios/lib/helpers/HttpStatusCode.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/bind.js +13 -0
- package/dist/cjs/node_modules/axios/lib/helpers/bind.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/buildURL.js +73 -0
- package/dist/cjs/node_modules/axios/lib/helpers/buildURL.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/combineURLs.js +21 -0
- package/dist/cjs/node_modules/axios/lib/helpers/combineURLs.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/composeSignals.js +55 -0
- package/dist/cjs/node_modules/axios/lib/helpers/composeSignals.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/cookies.js +48 -0
- package/dist/cjs/node_modules/axios/lib/helpers/cookies.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/formDataToJSON.js +99 -0
- package/dist/cjs/node_modules/axios/lib/helpers/formDataToJSON.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/isAbsoluteURL.js +21 -0
- package/dist/cjs/node_modules/axios/lib/helpers/isAbsoluteURL.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/isAxiosError.js +20 -0
- package/dist/cjs/node_modules/axios/lib/helpers/isAxiosError.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/isURLSameOrigin.js +21 -0
- package/dist/cjs/node_modules/axios/lib/helpers/isURLSameOrigin.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/null.js +9 -0
- package/dist/cjs/node_modules/axios/lib/helpers/null.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/parseHeaders.js +61 -0
- package/dist/cjs/node_modules/axios/lib/helpers/parseHeaders.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/parseProtocol.js +12 -0
- package/dist/cjs/node_modules/axios/lib/helpers/parseProtocol.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/progressEventReducer.js +53 -0
- package/dist/cjs/node_modules/axios/lib/helpers/progressEventReducer.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/resolveConfig.js +67 -0
- package/dist/cjs/node_modules/axios/lib/helpers/resolveConfig.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/speedometer.js +59 -0
- package/dist/cjs/node_modules/axios/lib/helpers/speedometer.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/spread.js +34 -0
- package/dist/cjs/node_modules/axios/lib/helpers/spread.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/throttle.js +49 -0
- package/dist/cjs/node_modules/axios/lib/helpers/throttle.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/toFormData.js +225 -0
- package/dist/cjs/node_modules/axios/lib/helpers/toFormData.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/toURLEncodedForm.js +25 -0
- package/dist/cjs/node_modules/axios/lib/helpers/toURLEncodedForm.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/trackStream.js +95 -0
- package/dist/cjs/node_modules/axios/lib/helpers/trackStream.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/helpers/validator.js +105 -0
- package/dist/cjs/node_modules/axios/lib/helpers/validator.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/platform/browser/classes/Blob.js +9 -0
- package/dist/cjs/node_modules/axios/lib/platform/browser/classes/Blob.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/platform/browser/classes/FormData.js +9 -0
- package/dist/cjs/node_modules/axios/lib/platform/browser/classes/FormData.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +11 -0
- package/dist/cjs/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/platform/browser/index.js +20 -0
- package/dist/cjs/node_modules/axios/lib/platform/browser/index.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/platform/common/utils.js +54 -0
- package/dist/cjs/node_modules/axios/lib/platform/common/utils.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/platform/index.js +14 -0
- package/dist/cjs/node_modules/axios/lib/platform/index.js.map +1 -0
- package/dist/cjs/node_modules/axios/lib/utils.js +788 -0
- package/dist/cjs/node_modules/axios/lib/utils.js.map +1 -0
- package/dist/cjs/node_modules/react-leaflet/lib/hooks.js +13 -0
- package/dist/cjs/node_modules/react-leaflet/lib/hooks.js.map +1 -0
- package/dist/cjs/node_modules/tangram/dist/tangram.min.js +58 -0
- package/dist/cjs/node_modules/tangram/dist/tangram.min.js.map +1 -0
- package/dist/cjs/services/api/api.service.js +45 -0
- package/dist/cjs/services/api/api.service.js.map +1 -0
- package/dist/esm/components/layers/leaflet/hooks/useGetLeafletLayer.js +2 -0
- package/dist/esm/components/layers/leaflet/hooks/useGetLeafletLayer.js.map +1 -0
- package/dist/esm/components/layers/leaflet/leaflet.js +2 -0
- package/dist/esm/components/layers/leaflet/leaflet.js.map +1 -0
- package/dist/esm/components/list/list.js +1 -1
- package/dist/esm/components/list/list.js.map +1 -1
- package/dist/esm/configs/global/constants.js +2 -0
- package/dist/esm/configs/global/constants.js.map +1 -0
- package/dist/esm/configs/global/global.js +1 -1
- package/dist/esm/configs/global/global.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/@react-leaflet/core/lib/context.js +2 -0
- package/dist/esm/node_modules/@react-leaflet/core/lib/context.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/adapters/adapters.js +2 -0
- package/dist/esm/node_modules/axios/lib/adapters/adapters.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/adapters/fetch.js +2 -0
- package/dist/esm/node_modules/axios/lib/adapters/fetch.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/adapters/xhr.js +2 -0
- package/dist/esm/node_modules/axios/lib/adapters/xhr.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/axios.js +3 -0
- package/dist/esm/node_modules/axios/lib/axios.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/cancel/CancelToken.js +3 -0
- package/dist/esm/node_modules/axios/lib/cancel/CancelToken.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/cancel/CanceledError.js +3 -0
- package/dist/esm/node_modules/axios/lib/cancel/CanceledError.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/cancel/isCancel.js +3 -0
- package/dist/esm/node_modules/axios/lib/cancel/isCancel.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/core/Axios.js +3 -0
- package/dist/esm/node_modules/axios/lib/core/Axios.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/core/AxiosError.js +3 -0
- package/dist/esm/node_modules/axios/lib/core/AxiosError.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/core/AxiosHeaders.js +3 -0
- package/dist/esm/node_modules/axios/lib/core/AxiosHeaders.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/core/InterceptorManager.js +3 -0
- package/dist/esm/node_modules/axios/lib/core/InterceptorManager.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/core/buildFullPath.js +3 -0
- package/dist/esm/node_modules/axios/lib/core/buildFullPath.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/core/dispatchRequest.js +3 -0
- package/dist/esm/node_modules/axios/lib/core/dispatchRequest.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/core/mergeConfig.js +3 -0
- package/dist/esm/node_modules/axios/lib/core/mergeConfig.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/core/settle.js +3 -0
- package/dist/esm/node_modules/axios/lib/core/settle.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/core/transformData.js +3 -0
- package/dist/esm/node_modules/axios/lib/core/transformData.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/defaults/index.js +3 -0
- package/dist/esm/node_modules/axios/lib/defaults/index.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/defaults/transitional.js +3 -0
- package/dist/esm/node_modules/axios/lib/defaults/transitional.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/env/data.js +2 -0
- package/dist/esm/node_modules/axios/lib/env/data.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/AxiosURLSearchParams.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/HttpStatusCode.js +2 -0
- package/dist/esm/node_modules/axios/lib/helpers/HttpStatusCode.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/bind.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/bind.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/buildURL.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/buildURL.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/combineURLs.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/combineURLs.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/composeSignals.js +2 -0
- package/dist/esm/node_modules/axios/lib/helpers/composeSignals.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/cookies.js +2 -0
- package/dist/esm/node_modules/axios/lib/helpers/cookies.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/formDataToJSON.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/formDataToJSON.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/isAbsoluteURL.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/isAxiosError.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/isAxiosError.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/isURLSameOrigin.js +2 -0
- package/dist/esm/node_modules/axios/lib/helpers/isURLSameOrigin.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/null.js +2 -0
- package/dist/esm/node_modules/axios/lib/helpers/null.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/parseHeaders.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/parseHeaders.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/parseProtocol.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/parseProtocol.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/progressEventReducer.js +2 -0
- package/dist/esm/node_modules/axios/lib/helpers/progressEventReducer.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/resolveConfig.js +2 -0
- package/dist/esm/node_modules/axios/lib/helpers/resolveConfig.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/speedometer.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/speedometer.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/spread.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/spread.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/throttle.js +2 -0
- package/dist/esm/node_modules/axios/lib/helpers/throttle.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/toFormData.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/toFormData.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/toURLEncodedForm.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/toURLEncodedForm.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/trackStream.js +2 -0
- package/dist/esm/node_modules/axios/lib/helpers/trackStream.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/helpers/validator.js +3 -0
- package/dist/esm/node_modules/axios/lib/helpers/validator.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/dist/esm/node_modules/axios/lib/platform/browser/classes/Blob.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/dist/esm/node_modules/axios/lib/platform/browser/classes/FormData.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +3 -0
- package/dist/esm/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/platform/browser/index.js +2 -0
- package/dist/esm/node_modules/axios/lib/platform/browser/index.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/platform/common/utils.js +2 -0
- package/dist/esm/node_modules/axios/lib/platform/common/utils.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/platform/index.js +2 -0
- package/dist/esm/node_modules/axios/lib/platform/index.js.map +1 -0
- package/dist/esm/node_modules/axios/lib/utils.js +3 -0
- package/dist/esm/node_modules/axios/lib/utils.js.map +1 -0
- package/dist/esm/node_modules/react-leaflet/lib/hooks.js +2 -0
- package/dist/esm/node_modules/react-leaflet/lib/hooks.js.map +1 -0
- package/dist/esm/node_modules/tangram/dist/tangram.min.js +2 -0
- package/dist/esm/node_modules/tangram/dist/tangram.min.js.map +1 -0
- package/dist/esm/scene.js +2 -0
- package/dist/esm/scene.js.map +1 -0
- package/dist/esm/services/api/api.service.js +2 -0
- package/dist/esm/services/api/api.service.js.map +1 -0
- package/dist/esm/types/components/index.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts.map +1 -1
- package/dist/esm/types/components/layers/index.d.ts +2 -0
- package/dist/esm/types/components/layers/index.d.ts.map +1 -0
- package/dist/esm/types/components/layers/leaflet/hooks/index.d.ts +2 -0
- package/dist/esm/types/components/layers/leaflet/hooks/index.d.ts.map +1 -0
- package/dist/esm/types/components/layers/leaflet/hooks/useGetLeafletLayer.d.ts +4 -0
- package/dist/esm/types/components/layers/leaflet/hooks/useGetLeafletLayer.d.ts.map +1 -0
- package/dist/esm/types/components/layers/leaflet/index.d.ts +4 -0
- package/dist/esm/types/components/layers/leaflet/index.d.ts.map +1 -0
- package/dist/esm/types/components/layers/leaflet/leaflet.d.ts +4 -0
- package/dist/esm/types/components/layers/leaflet/leaflet.d.ts.map +1 -0
- package/dist/esm/types/components/layers/leaflet/leaflet.stories.d.ts +8 -0
- package/dist/esm/types/components/layers/leaflet/leaflet.stories.d.ts.map +1 -0
- package/dist/esm/types/components/layers/leaflet/types.d.ts +23 -0
- package/dist/esm/types/components/layers/leaflet/types.d.ts.map +1 -0
- package/dist/esm/types/components/list/list.d.ts +6 -2
- package/dist/esm/types/components/list/list.d.ts.map +1 -1
- package/dist/esm/types/components/list/list.stories.d.ts +2 -0
- package/dist/esm/types/components/list/list.stories.d.ts.map +1 -1
- package/dist/esm/types/components/list/stories/constants.d.ts +1 -0
- package/dist/esm/types/components/list/stories/constants.d.ts.map +1 -1
- package/dist/esm/types/configs/global/constants.d.ts +7 -0
- package/dist/esm/types/configs/global/constants.d.ts.map +1 -0
- package/dist/esm/types/configs/global/global.d.ts +2 -1
- package/dist/esm/types/configs/global/global.d.ts.map +1 -1
- package/dist/esm/types/configs/global/index.d.ts +1 -0
- package/dist/esm/types/configs/global/index.d.ts.map +1 -1
- package/dist/esm/types/services/api/api.service.d.ts +27 -0
- package/dist/esm/types/services/api/api.service.d.ts.map +1 -0
- package/dist/esm/types/services/api/index.d.ts +2 -0
- package/dist/esm/types/services/api/index.d.ts.map +1 -0
- package/dist/esm/types/services/index.d.ts +2 -0
- package/dist/esm/types/services/index.d.ts.map +1 -0
- package/package.json +8 -2
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var utils = require('../utils.js');
|
|
7
|
+
var AxiosError = require('../core/AxiosError.js');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Determines if the given thing is a array or js object.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} thing - The object or array to be visited.
|
|
13
|
+
*
|
|
14
|
+
* @returns {boolean}
|
|
15
|
+
*/
|
|
16
|
+
function isVisitable(thing) {
|
|
17
|
+
return utils["default"].isPlainObject(thing) || utils["default"].isArray(thing);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* It removes the brackets from the end of a string
|
|
22
|
+
*
|
|
23
|
+
* @param {string} key - The key of the parameter.
|
|
24
|
+
*
|
|
25
|
+
* @returns {string} the key without the brackets.
|
|
26
|
+
*/
|
|
27
|
+
function removeBrackets(key) {
|
|
28
|
+
return utils["default"].endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* It takes a path, a key, and a boolean, and returns a string
|
|
33
|
+
*
|
|
34
|
+
* @param {string} path - The path to the current key.
|
|
35
|
+
* @param {string} key - The key of the current object being iterated over.
|
|
36
|
+
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
|
|
37
|
+
*
|
|
38
|
+
* @returns {string} The path to the current key.
|
|
39
|
+
*/
|
|
40
|
+
function renderKey(path, key, dots) {
|
|
41
|
+
if (!path) return key;
|
|
42
|
+
return path.concat(key).map(function each(token, i) {
|
|
43
|
+
// eslint-disable-next-line no-param-reassign
|
|
44
|
+
token = removeBrackets(token);
|
|
45
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
46
|
+
}).join(dots ? '.' : '');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* If the array is an array and none of its elements are visitable, then it's a flat array.
|
|
51
|
+
*
|
|
52
|
+
* @param {Array<any>} arr - The array to check
|
|
53
|
+
*
|
|
54
|
+
* @returns {boolean}
|
|
55
|
+
*/
|
|
56
|
+
function isFlatArray(arr) {
|
|
57
|
+
return utils["default"].isArray(arr) && !arr.some(isVisitable);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const predicates = utils["default"].toFlatObject(utils["default"], {}, null, function filter(prop) {
|
|
61
|
+
return /^is[A-Z]/.test(prop);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Convert a data object to FormData
|
|
66
|
+
*
|
|
67
|
+
* @param {Object} obj
|
|
68
|
+
* @param {?Object} [formData]
|
|
69
|
+
* @param {?Object} [options]
|
|
70
|
+
* @param {Function} [options.visitor]
|
|
71
|
+
* @param {Boolean} [options.metaTokens = true]
|
|
72
|
+
* @param {Boolean} [options.dots = false]
|
|
73
|
+
* @param {?Boolean} [options.indexes = false]
|
|
74
|
+
*
|
|
75
|
+
* @returns {Object}
|
|
76
|
+
**/
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* It converts an object into a FormData object
|
|
80
|
+
*
|
|
81
|
+
* @param {Object<any, any>} obj - The object to convert to form data.
|
|
82
|
+
* @param {string} formData - The FormData object to append to.
|
|
83
|
+
* @param {Object<string, any>} options
|
|
84
|
+
*
|
|
85
|
+
* @returns
|
|
86
|
+
*/
|
|
87
|
+
function toFormData(obj, formData, options) {
|
|
88
|
+
if (!utils["default"].isObject(obj)) {
|
|
89
|
+
throw new TypeError('target must be an object');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// eslint-disable-next-line no-param-reassign
|
|
93
|
+
formData = formData || new (FormData)();
|
|
94
|
+
|
|
95
|
+
// eslint-disable-next-line no-param-reassign
|
|
96
|
+
options = utils["default"].toFlatObject(options, {
|
|
97
|
+
metaTokens: true,
|
|
98
|
+
dots: false,
|
|
99
|
+
indexes: false
|
|
100
|
+
}, false, function defined(option, source) {
|
|
101
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
102
|
+
return !utils["default"].isUndefined(source[option]);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const metaTokens = options.metaTokens;
|
|
106
|
+
// eslint-disable-next-line no-use-before-define
|
|
107
|
+
const visitor = options.visitor || defaultVisitor;
|
|
108
|
+
const dots = options.dots;
|
|
109
|
+
const indexes = options.indexes;
|
|
110
|
+
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
111
|
+
const useBlob = _Blob && utils["default"].isSpecCompliantForm(formData);
|
|
112
|
+
|
|
113
|
+
if (!utils["default"].isFunction(visitor)) {
|
|
114
|
+
throw new TypeError('visitor must be a function');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function convertValue(value) {
|
|
118
|
+
if (value === null) return '';
|
|
119
|
+
|
|
120
|
+
if (utils["default"].isDate(value)) {
|
|
121
|
+
return value.toISOString();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (utils["default"].isBoolean(value)) {
|
|
125
|
+
return value.toString();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (!useBlob && utils["default"].isBlob(value)) {
|
|
129
|
+
throw new AxiosError["default"]('Blob is not supported. Use a Buffer instead.');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (utils["default"].isArrayBuffer(value) || utils["default"].isTypedArray(value)) {
|
|
133
|
+
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return value;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Default visitor.
|
|
141
|
+
*
|
|
142
|
+
* @param {*} value
|
|
143
|
+
* @param {String|Number} key
|
|
144
|
+
* @param {Array<String|Number>} path
|
|
145
|
+
* @this {FormData}
|
|
146
|
+
*
|
|
147
|
+
* @returns {boolean} return true to visit the each prop of the value recursively
|
|
148
|
+
*/
|
|
149
|
+
function defaultVisitor(value, key, path) {
|
|
150
|
+
let arr = value;
|
|
151
|
+
|
|
152
|
+
if (value && !path && typeof value === 'object') {
|
|
153
|
+
if (utils["default"].endsWith(key, '{}')) {
|
|
154
|
+
// eslint-disable-next-line no-param-reassign
|
|
155
|
+
key = metaTokens ? key : key.slice(0, -2);
|
|
156
|
+
// eslint-disable-next-line no-param-reassign
|
|
157
|
+
value = JSON.stringify(value);
|
|
158
|
+
} else if (
|
|
159
|
+
(utils["default"].isArray(value) && isFlatArray(value)) ||
|
|
160
|
+
((utils["default"].isFileList(value) || utils["default"].endsWith(key, '[]')) && (arr = utils["default"].toArray(value))
|
|
161
|
+
)) {
|
|
162
|
+
// eslint-disable-next-line no-param-reassign
|
|
163
|
+
key = removeBrackets(key);
|
|
164
|
+
|
|
165
|
+
arr.forEach(function each(el, index) {
|
|
166
|
+
!(utils["default"].isUndefined(el) || el === null) && formData.append(
|
|
167
|
+
// eslint-disable-next-line no-nested-ternary
|
|
168
|
+
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
|
169
|
+
convertValue(el)
|
|
170
|
+
);
|
|
171
|
+
});
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (isVisitable(value)) {
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
181
|
+
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const stack = [];
|
|
186
|
+
|
|
187
|
+
const exposedHelpers = Object.assign(predicates, {
|
|
188
|
+
defaultVisitor,
|
|
189
|
+
convertValue,
|
|
190
|
+
isVisitable
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
function build(value, path) {
|
|
194
|
+
if (utils["default"].isUndefined(value)) return;
|
|
195
|
+
|
|
196
|
+
if (stack.indexOf(value) !== -1) {
|
|
197
|
+
throw Error('Circular reference detected in ' + path.join('.'));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
stack.push(value);
|
|
201
|
+
|
|
202
|
+
utils["default"].forEach(value, function each(el, key) {
|
|
203
|
+
const result = !(utils["default"].isUndefined(el) || el === null) && visitor.call(
|
|
204
|
+
formData, el, utils["default"].isString(key) ? key.trim() : key, path, exposedHelpers
|
|
205
|
+
);
|
|
206
|
+
|
|
207
|
+
if (result === true) {
|
|
208
|
+
build(el, path ? path.concat(key) : [key]);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
stack.pop();
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (!utils["default"].isObject(obj)) {
|
|
216
|
+
throw new TypeError('data must be an object');
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
build(obj);
|
|
220
|
+
|
|
221
|
+
return formData;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
exports["default"] = toFormData;
|
|
225
|
+
//# sourceMappingURL=toFormData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toFormData.js","sources":["../../../../../../node_modules/axios/lib/helpers/toFormData.js"],"sourcesContent":["'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n"],"names":[],"mappings":";;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var utils = require('../utils.js');
|
|
7
|
+
var toFormData = require('./toFormData.js');
|
|
8
|
+
var index = require('../platform/index.js');
|
|
9
|
+
|
|
10
|
+
function toURLEncodedForm(data, options) {
|
|
11
|
+
return toFormData["default"](data, new index["default"].classes.URLSearchParams(), {
|
|
12
|
+
visitor: function(value, key, path, helpers) {
|
|
13
|
+
if (index["default"].isNode && utils["default"].isBuffer(value)) {
|
|
14
|
+
this.append(key, value.toString('base64'));
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return helpers.defaultVisitor.apply(this, arguments);
|
|
19
|
+
},
|
|
20
|
+
...options
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports["default"] = toURLEncodedForm;
|
|
25
|
+
//# sourceMappingURL=toURLEncodedForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toURLEncodedForm.js","sources":["../../../../../../node_modules/axios/lib/helpers/toURLEncodedForm.js"],"sourcesContent":["'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), {\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n },\n ...options\n });\n}\n"],"names":[],"mappings":";;;;;;;;;AAMe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const streamChunk = function* (chunk, chunkSize) {
|
|
6
|
+
let len = chunk.byteLength;
|
|
7
|
+
|
|
8
|
+
if (!chunkSize || len < chunkSize) {
|
|
9
|
+
yield chunk;
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let pos = 0;
|
|
14
|
+
let end;
|
|
15
|
+
|
|
16
|
+
while (pos < len) {
|
|
17
|
+
end = pos + chunkSize;
|
|
18
|
+
yield chunk.slice(pos, end);
|
|
19
|
+
pos = end;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const readBytes = async function* (iterable, chunkSize) {
|
|
24
|
+
for await (const chunk of readStream(iterable)) {
|
|
25
|
+
yield* streamChunk(chunk, chunkSize);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const readStream = async function* (stream) {
|
|
30
|
+
if (stream[Symbol.asyncIterator]) {
|
|
31
|
+
yield* stream;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const reader = stream.getReader();
|
|
36
|
+
try {
|
|
37
|
+
for (;;) {
|
|
38
|
+
const {done, value} = await reader.read();
|
|
39
|
+
if (done) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
yield value;
|
|
43
|
+
}
|
|
44
|
+
} finally {
|
|
45
|
+
await reader.cancel();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
50
|
+
const iterator = readBytes(stream, chunkSize);
|
|
51
|
+
|
|
52
|
+
let bytes = 0;
|
|
53
|
+
let done;
|
|
54
|
+
let _onFinish = (e) => {
|
|
55
|
+
if (!done) {
|
|
56
|
+
done = true;
|
|
57
|
+
onFinish && onFinish(e);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return new ReadableStream({
|
|
62
|
+
async pull(controller) {
|
|
63
|
+
try {
|
|
64
|
+
const {done, value} = await iterator.next();
|
|
65
|
+
|
|
66
|
+
if (done) {
|
|
67
|
+
_onFinish();
|
|
68
|
+
controller.close();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let len = value.byteLength;
|
|
73
|
+
if (onProgress) {
|
|
74
|
+
let loadedBytes = bytes += len;
|
|
75
|
+
onProgress(loadedBytes);
|
|
76
|
+
}
|
|
77
|
+
controller.enqueue(new Uint8Array(value));
|
|
78
|
+
} catch (err) {
|
|
79
|
+
_onFinish(err);
|
|
80
|
+
throw err;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
cancel(reason) {
|
|
84
|
+
_onFinish(reason);
|
|
85
|
+
return iterator.return();
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
highWaterMark: 2
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
exports.readBytes = readBytes;
|
|
93
|
+
exports.streamChunk = streamChunk;
|
|
94
|
+
exports.trackStream = trackStream;
|
|
95
|
+
//# sourceMappingURL=trackStream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackStream.js","sources":["../../../../../../node_modules/axios/lib/helpers/trackStream.js"],"sourcesContent":["\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n"],"names":[],"mappings":";;;;AACY,MAAC,WAAW,GAAG,WAAW,KAAK,EAAE,SAAS,EAAE;AACxD,EAAE,IAAI,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC;AAC7B;AACA,EAAE,IAAI,CAAC,SAAS,IAAI,GAAG,GAAG,SAAS,EAAE;AACrC,IAAI,MAAM,KAAK,CAAC;AAChB,IAAI,OAAO;AACX,GAAG;AACH;AACA,EAAE,IAAI,GAAG,GAAG,CAAC,CAAC;AACd,EAAE,IAAI,GAAG,CAAC;AACV;AACA,EAAE,OAAO,GAAG,GAAG,GAAG,EAAE;AACpB,IAAI,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC;AAC1B,IAAI,MAAM,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAChC,IAAI,GAAG,GAAG,GAAG,CAAC;AACd,GAAG;AACH,EAAC;AACD;AACY,MAAC,SAAS,GAAG,iBAAiB,QAAQ,EAAE,SAAS,EAAE;AAC/D,EAAE,WAAW,MAAM,KAAK,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;AAClD,IAAI,OAAO,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AACzC,GAAG;AACH,EAAC;AACD;AACA,MAAM,UAAU,GAAG,iBAAiB,MAAM,EAAE;AAC5C,EAAE,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;AACpC,IAAI,OAAO,MAAM,CAAC;AAClB,IAAI,OAAO;AACX,GAAG;AACH;AACA,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;AACpC,EAAE,IAAI;AACN,IAAI,SAAS;AACb,MAAM,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;AAChD,MAAM,IAAI,IAAI,EAAE;AAChB,QAAQ,MAAM;AACd,OAAO;AACP,MAAM,MAAM,KAAK,CAAC;AAClB,KAAK;AACL,GAAG,SAAS;AACZ,IAAI,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;AAC1B,GAAG;AACH,EAAC;AACD;AACY,MAAC,WAAW,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,KAAK;AACxE,EAAE,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAChD;AACA,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC;AAChB,EAAE,IAAI,IAAI,CAAC;AACX,EAAE,IAAI,SAAS,GAAG,CAAC,CAAC,KAAK;AACzB,IAAI,IAAI,CAAC,IAAI,EAAE;AACf,MAAM,IAAI,GAAG,IAAI,CAAC;AAClB,MAAM,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC9B,KAAK;AACL,IAAG;AACH;AACA,EAAE,OAAO,IAAI,cAAc,CAAC;AAC5B,IAAI,MAAM,IAAI,CAAC,UAAU,EAAE;AAC3B,MAAM,IAAI;AACV,QAAQ,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;AACpD;AACA,QAAQ,IAAI,IAAI,EAAE;AAClB,SAAS,SAAS,EAAE,CAAC;AACrB,UAAU,UAAU,CAAC,KAAK,EAAE,CAAC;AAC7B,UAAU,OAAO;AACjB,SAAS;AACT;AACA,QAAQ,IAAI,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC;AACnC,QAAQ,IAAI,UAAU,EAAE;AACxB,UAAU,IAAI,WAAW,GAAG,KAAK,IAAI,GAAG,CAAC;AACzC,UAAU,UAAU,CAAC,WAAW,CAAC,CAAC;AAClC,SAAS;AACT,QAAQ,UAAU,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AAClD,OAAO,CAAC,OAAO,GAAG,EAAE;AACpB,QAAQ,SAAS,CAAC,GAAG,CAAC,CAAC;AACvB,QAAQ,MAAM,GAAG,CAAC;AAClB,OAAO;AACP,KAAK;AACL,IAAI,MAAM,CAAC,MAAM,EAAE;AACnB,MAAM,SAAS,CAAC,MAAM,CAAC,CAAC;AACxB,MAAM,OAAO,QAAQ,CAAC,MAAM,EAAE,CAAC;AAC/B,KAAK;AACL,GAAG,EAAE;AACL,IAAI,aAAa,EAAE,CAAC;AACpB,GAAG,CAAC;AACJ;;;;;;"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var data = require('../env/data.js');
|
|
7
|
+
var AxiosError = require('../core/AxiosError.js');
|
|
8
|
+
|
|
9
|
+
const validators = {};
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line func-names
|
|
12
|
+
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
|
|
13
|
+
validators[type] = function validator(thing) {
|
|
14
|
+
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const deprecatedWarnings = {};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Transitional option validator
|
|
22
|
+
*
|
|
23
|
+
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
24
|
+
* @param {string?} version - deprecated version / removed since version
|
|
25
|
+
* @param {string?} message - some message with additional info
|
|
26
|
+
*
|
|
27
|
+
* @returns {function}
|
|
28
|
+
*/
|
|
29
|
+
validators.transitional = function transitional(validator, version, message) {
|
|
30
|
+
function formatMessage(opt, desc) {
|
|
31
|
+
return '[Axios v' + data.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line func-names
|
|
35
|
+
return (value, opt, opts) => {
|
|
36
|
+
if (validator === false) {
|
|
37
|
+
throw new AxiosError["default"](
|
|
38
|
+
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
39
|
+
AxiosError["default"].ERR_DEPRECATED
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
44
|
+
deprecatedWarnings[opt] = true;
|
|
45
|
+
// eslint-disable-next-line no-console
|
|
46
|
+
console.warn(
|
|
47
|
+
formatMessage(
|
|
48
|
+
opt,
|
|
49
|
+
' has been deprecated since v' + version + ' and will be removed in the near future'
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return validator ? validator(value, opt, opts) : true;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
validators.spelling = function spelling(correctSpelling) {
|
|
59
|
+
return (value, opt) => {
|
|
60
|
+
// eslint-disable-next-line no-console
|
|
61
|
+
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Assert object's properties type
|
|
68
|
+
*
|
|
69
|
+
* @param {object} options
|
|
70
|
+
* @param {object} schema
|
|
71
|
+
* @param {boolean?} allowUnknown
|
|
72
|
+
*
|
|
73
|
+
* @returns {object}
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
function assertOptions(options, schema, allowUnknown) {
|
|
77
|
+
if (typeof options !== 'object') {
|
|
78
|
+
throw new AxiosError["default"]('options must be an object', AxiosError["default"].ERR_BAD_OPTION_VALUE);
|
|
79
|
+
}
|
|
80
|
+
const keys = Object.keys(options);
|
|
81
|
+
let i = keys.length;
|
|
82
|
+
while (i-- > 0) {
|
|
83
|
+
const opt = keys[i];
|
|
84
|
+
const validator = schema[opt];
|
|
85
|
+
if (validator) {
|
|
86
|
+
const value = options[opt];
|
|
87
|
+
const result = value === undefined || validator(value, opt, options);
|
|
88
|
+
if (result !== true) {
|
|
89
|
+
throw new AxiosError["default"]('option ' + opt + ' must be ' + result, AxiosError["default"].ERR_BAD_OPTION_VALUE);
|
|
90
|
+
}
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (allowUnknown !== true) {
|
|
94
|
+
throw new AxiosError["default"]('Unknown option ' + opt, AxiosError["default"].ERR_BAD_OPTION);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
var validator = {
|
|
100
|
+
assertOptions,
|
|
101
|
+
validators
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
exports["default"] = validator;
|
|
105
|
+
//# sourceMappingURL=validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.js","sources":["../../../../../../node_modules/axios/lib/helpers/validator.js"],"sourcesContent":["'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n"],"names":[],"mappings":";;;;;;;;AAKA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blob.js","sources":["../../../../../../../../node_modules/axios/lib/platform/browser/classes/Blob.js"],"sourcesContent":["'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n"],"names":[],"mappings":";;;;;AAEA;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormData.js","sources":["../../../../../../../../node_modules/axios/lib/platform/browser/classes/FormData.js"],"sourcesContent":["'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n"],"names":[],"mappings":";;;;;AAEA;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var AxiosURLSearchParams = require('../../../helpers/AxiosURLSearchParams.js');
|
|
7
|
+
|
|
8
|
+
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams["default"];
|
|
9
|
+
|
|
10
|
+
exports["default"] = URLSearchParams$1;
|
|
11
|
+
//# sourceMappingURL=URLSearchParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"URLSearchParams.js","sources":["../../../../../../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"],"sourcesContent":["'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n"],"names":[],"mappings":";;;;;;;AAGA;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var URLSearchParams = require('./classes/URLSearchParams.js');
|
|
6
|
+
var FormData = require('./classes/FormData.js');
|
|
7
|
+
var Blob = require('./classes/Blob.js');
|
|
8
|
+
|
|
9
|
+
var platform = {
|
|
10
|
+
isBrowser: true,
|
|
11
|
+
classes: {
|
|
12
|
+
URLSearchParams: URLSearchParams["default"],
|
|
13
|
+
FormData: FormData["default"],
|
|
14
|
+
Blob: Blob["default"]
|
|
15
|
+
},
|
|
16
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports["default"] = platform;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/axios/lib/platform/browser/index.js"],"sourcesContent":["import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n"],"names":["URLSearchParams","FormData","Blob"],"mappings":";;;;;;;;AAIA,eAAe;AACf,EAAE,SAAS,EAAE,IAAI;AACjB,EAAE,OAAO,EAAE;AACX,qBAAIA,0BAAe;AACnB,cAAIC,mBAAQ;AACZ,UAAIC,eAAI;AACR,GAAG;AACH,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;AAC7D,CAAC;;;;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
6
|
+
|
|
7
|
+
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Determine if we're running in a standard browser environment
|
|
11
|
+
*
|
|
12
|
+
* This allows axios to run in a web worker, and react-native.
|
|
13
|
+
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
14
|
+
*
|
|
15
|
+
* web workers:
|
|
16
|
+
* typeof window -> undefined
|
|
17
|
+
* typeof document -> undefined
|
|
18
|
+
*
|
|
19
|
+
* react-native:
|
|
20
|
+
* navigator.product -> 'ReactNative'
|
|
21
|
+
* nativescript
|
|
22
|
+
* navigator.product -> 'NativeScript' or 'NS'
|
|
23
|
+
*
|
|
24
|
+
* @returns {boolean}
|
|
25
|
+
*/
|
|
26
|
+
const hasStandardBrowserEnv = hasBrowserEnv &&
|
|
27
|
+
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Determine if we're running in a standard browser webWorker environment
|
|
31
|
+
*
|
|
32
|
+
* Although the `isStandardBrowserEnv` method indicates that
|
|
33
|
+
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
34
|
+
* filtered out due to its judgment standard
|
|
35
|
+
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
36
|
+
* This leads to a problem when axios post `FormData` in webWorker
|
|
37
|
+
*/
|
|
38
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
39
|
+
return (
|
|
40
|
+
typeof WorkerGlobalScope !== 'undefined' &&
|
|
41
|
+
// eslint-disable-next-line no-undef
|
|
42
|
+
self instanceof WorkerGlobalScope &&
|
|
43
|
+
typeof self.importScripts === 'function'
|
|
44
|
+
);
|
|
45
|
+
})();
|
|
46
|
+
|
|
47
|
+
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
48
|
+
|
|
49
|
+
exports.hasBrowserEnv = hasBrowserEnv;
|
|
50
|
+
exports.hasStandardBrowserEnv = hasStandardBrowserEnv;
|
|
51
|
+
exports.hasStandardBrowserWebWorkerEnv = hasStandardBrowserWebWorkerEnv;
|
|
52
|
+
exports.navigator = _navigator;
|
|
53
|
+
exports.origin = origin;
|
|
54
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../node_modules/axios/lib/platform/common/utils.js"],"sourcesContent":["const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n"],"names":[],"mappings":";;;;AAAK,MAAC,aAAa,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,QAAQ,KAAK,YAAY;AACvF;AACK,MAAC,UAAU,GAAG,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,IAAI,UAAU;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACK,MAAC,qBAAqB,GAAG,aAAa;AAC3C,GAAG,CAAC,UAAU,IAAI,CAAC,aAAa,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACK,MAAC,8BAA8B,GAAG,CAAC,MAAM;AAC9C,EAAE;AACF,IAAI,OAAO,iBAAiB,KAAK,WAAW;AAC5C;AACA,IAAI,IAAI,YAAY,iBAAiB;AACrC,IAAI,OAAO,IAAI,CAAC,aAAa,KAAK,UAAU;AAC5C,IAAI;AACJ,CAAC,IAAI;AACL;AACK,MAAC,MAAM,GAAG,aAAa,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI;;;;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var index = require('./browser/index.js');
|
|
6
|
+
var utils = require('./common/utils.js');
|
|
7
|
+
|
|
8
|
+
var platform = {
|
|
9
|
+
...utils,
|
|
10
|
+
...index["default"]
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
exports["default"] = platform;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/axios/lib/platform/index.js"],"sourcesContent":["import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n"],"names":["platform"],"mappings":";;;;;;;AAGA,eAAe;AACf,EAAE,GAAG,KAAK;AACV,EAAE,GAAGA,gBAAQ;AACb;;;;"}
|