@hkyhy/marsun-components-core 0.1.18 → 0.1.21
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/components/AgentHub/Chat/Detail/ChatAgentFab/index.d.ts +24 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/index.js +95 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/index.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/style.module.scss.js +15 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.d.ts +16 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.js +37 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/style.module.scss.js +9 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.d.ts +14 -0
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.js +79 -0
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/style.module.scss.js +18 -0
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatInput/index.d.ts +2 -0
- package/dist/components/AgentHub/Chat/Detail/ChatInput/index.js +60 -49
- package/dist/components/AgentHub/Chat/Detail/ChatInput/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatInput/style.module.scss.js +7 -6
- package/dist/components/AgentHub/Chat/Detail/ChatInput/style.module.scss.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/index.d.ts +17 -4
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/index.js +104 -68
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/style.module.scss.js +13 -8
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/style.module.scss.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatSuggestionRow/index.js +5 -4
- package/dist/components/AgentHub/Chat/Detail/ChatSuggestionRow/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatSuggestionRow/style.module.scss.js +2 -2
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/ChatWidgetSparkline.d.ts +7 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/ChatWidgetSparkline.js +55 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/ChatWidgetSparkline.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/index.d.ts +10 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/index.js +120 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/index.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/style.module.scss.js +32 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/CitationContent/style.module.scss.js +2 -2
- package/dist/components/AgentHub/Chat/Detail/MessageItem/index.js +130 -114
- package/dist/components/AgentHub/Chat/Detail/MessageItem/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/MessageItem/style.module.scss.js +20 -18
- package/dist/components/AgentHub/Chat/Detail/MessageItem/style.module.scss.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/index.d.ts +8 -0
- package/dist/components/AgentHub/Chat/hooks/index.d.ts +2 -0
- package/dist/components/AgentHub/Chat/hooks/useCitationPanel.d.ts +11 -0
- package/dist/components/AgentHub/Chat/hooks/useCitationPanel.js +22 -0
- package/dist/components/AgentHub/Chat/hooks/useCitationPanel.js.map +1 -0
- package/dist/components/AgentHub/types.d.ts +21 -0
- package/dist/components/Auth/ProtectedRoute.js +20 -14
- package/dist/components/Auth/ProtectedRoute.js.map +1 -1
- package/dist/components/File/index.d.ts +2 -0
- package/dist/components/File/utils/download.d.ts +20 -0
- package/dist/components/File/utils/download.js +30 -0
- package/dist/components/File/utils/download.js.map +1 -0
- package/dist/components/Filter/FilterDateRange/index.d.ts +6 -1
- package/dist/components/Filter/FilterDateRange/index.js +84 -62
- package/dist/components/Filter/FilterDateRange/index.js.map +1 -1
- package/dist/components/Filter/types.d.ts +1 -0
- package/dist/components/Filter/types.js.map +1 -1
- package/dist/components/Icons/index.d.ts +3 -1
- package/dist/components/Icons/index.js +157 -151
- package/dist/components/Icons/index.js.map +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.js +377 -298
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/node_modules/axios/index.js +41 -0
- package/dist/node_modules/axios/index.js.map +1 -0
- package/dist/node_modules/axios/lib/adapters/adapters.js +66 -0
- package/dist/node_modules/axios/lib/adapters/adapters.js.map +1 -0
- package/dist/node_modules/axios/lib/adapters/fetch.js +324 -0
- package/dist/node_modules/axios/lib/adapters/fetch.js.map +1 -0
- package/dist/node_modules/axios/lib/adapters/xhr.js +86 -0
- package/dist/node_modules/axios/lib/adapters/xhr.js.map +1 -0
- package/dist/node_modules/axios/lib/axios.js +47 -0
- package/dist/node_modules/axios/lib/axios.js.map +1 -0
- package/dist/node_modules/axios/lib/cancel/CancelToken.js +78 -0
- package/dist/node_modules/axios/lib/cancel/CancelToken.js.map +1 -0
- package/dist/node_modules/axios/lib/cancel/CanceledError.js +19 -0
- package/dist/node_modules/axios/lib/cancel/CanceledError.js.map +1 -0
- package/dist/node_modules/axios/lib/cancel/isCancel.js +7 -0
- package/dist/node_modules/axios/lib/cancel/isCancel.js.map +1 -0
- package/dist/node_modules/axios/lib/core/Axios.js +168 -0
- package/dist/node_modules/axios/lib/core/Axios.js.map +1 -0
- package/dist/node_modules/axios/lib/core/AxiosError.js +110 -0
- package/dist/node_modules/axios/lib/core/AxiosError.js.map +1 -0
- package/dist/node_modules/axios/lib/core/AxiosHeaders.js +193 -0
- package/dist/node_modules/axios/lib/core/AxiosHeaders.js.map +1 -0
- package/dist/node_modules/axios/lib/core/InterceptorManager.js +60 -0
- package/dist/node_modules/axios/lib/core/InterceptorManager.js.map +1 -0
- package/dist/node_modules/axios/lib/core/buildFullPath.js +30 -0
- package/dist/node_modules/axios/lib/core/buildFullPath.js.map +1 -0
- package/dist/node_modules/axios/lib/core/dispatchRequest.js +43 -0
- package/dist/node_modules/axios/lib/core/dispatchRequest.js.map +1 -0
- package/dist/node_modules/axios/lib/core/mergeConfig.js +94 -0
- package/dist/node_modules/axios/lib/core/mergeConfig.js.map +1 -0
- package/dist/node_modules/axios/lib/core/settle.js +15 -0
- package/dist/node_modules/axios/lib/core/settle.js.map +1 -0
- package/dist/node_modules/axios/lib/core/transformData.js +14 -0
- package/dist/node_modules/axios/lib/core/transformData.js.map +1 -0
- package/dist/node_modules/axios/lib/defaults/index.js +96 -0
- package/dist/node_modules/axios/lib/defaults/index.js.map +1 -0
- package/dist/node_modules/axios/lib/defaults/transitional.js +12 -0
- package/dist/node_modules/axios/lib/defaults/transitional.js.map +1 -0
- package/dist/node_modules/axios/lib/env/data.js +5 -0
- package/dist/node_modules/axios/lib/env/data.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +31 -0
- package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/HttpStatusCode.js +78 -0
- package/dist/node_modules/axios/lib/helpers/HttpStatusCode.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/bind.js +9 -0
- package/dist/node_modules/axios/lib/helpers/bind.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/buildURL.js +24 -0
- package/dist/node_modules/axios/lib/helpers/buildURL.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/combineURLs.js +7 -0
- package/dist/node_modules/axios/lib/helpers/combineURLs.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/composeSignals.js +33 -0
- package/dist/node_modules/axios/lib/helpers/composeSignals.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/cookies.js +44 -0
- package/dist/node_modules/axios/lib/helpers/cookies.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +43 -0
- package/dist/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/formDataToJSON.js +47 -0
- package/dist/node_modules/axios/lib/helpers/formDataToJSON.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/isAbsoluteURL.js +7 -0
- package/dist/node_modules/axios/lib/helpers/isAbsoluteURL.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/isAxiosError.js +8 -0
- package/dist/node_modules/axios/lib/helpers/isAxiosError.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/isURLSameOrigin.js +9 -0
- package/dist/node_modules/axios/lib/helpers/isURLSameOrigin.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/null.js +5 -0
- package/dist/node_modules/axios/lib/helpers/null.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/parseHeaders.js +31 -0
- package/dist/node_modules/axios/lib/helpers/parseHeaders.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/parseProtocol.js +8 -0
- package/dist/node_modules/axios/lib/helpers/parseProtocol.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/progressEventReducer.js +41 -0
- package/dist/node_modules/axios/lib/helpers/progressEventReducer.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/resolveConfig.js +54 -0
- package/dist/node_modules/axios/lib/helpers/resolveConfig.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +34 -0
- package/dist/node_modules/axios/lib/helpers/sanitizeHeaderValue.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/speedometer.js +20 -0
- package/dist/node_modules/axios/lib/helpers/speedometer.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/spread.js +9 -0
- package/dist/node_modules/axios/lib/helpers/spread.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/throttle.js +16 -0
- package/dist/node_modules/axios/lib/helpers/throttle.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/toFormData.js +115 -0
- package/dist/node_modules/axios/lib/helpers/toFormData.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/toURLEncodedForm.js +15 -0
- package/dist/node_modules/axios/lib/helpers/toURLEncodedForm.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/trackStream.js +67 -0
- package/dist/node_modules/axios/lib/helpers/trackStream.js.map +1 -0
- package/dist/node_modules/axios/lib/helpers/validator.js +58 -0
- package/dist/node_modules/axios/lib/helpers/validator.js.map +1 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/Blob.js +5 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/Blob.js.map +1 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/FormData.js +5 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/FormData.js.map +1 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +6 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js.map +1 -0
- package/dist/node_modules/axios/lib/platform/browser/index.js +16 -0
- package/dist/node_modules/axios/lib/platform/browser/index.js.map +1 -0
- package/dist/node_modules/axios/lib/platform/common/utils.js +10 -0
- package/dist/node_modules/axios/lib/platform/common/utils.js.map +1 -0
- package/dist/node_modules/axios/lib/platform/index.js +10 -0
- package/dist/node_modules/axios/lib/platform/index.js.map +1 -0
- package/dist/node_modules/axios/lib/utils.js +303 -0
- package/dist/node_modules/axios/lib/utils.js.map +1 -0
- package/dist/styles/global.css +1 -1
- package/dist/types/auth.d.ts +18 -0
- package/dist/utils/authRedirect.d.ts +6 -0
- package/dist/utils/authRedirect.js +33 -0
- package/dist/utils/authRedirect.js.map +1 -0
- package/dist/utils/createMarsunRequest.d.ts +26 -0
- package/dist/utils/createMarsunRequest.js +53 -0
- package/dist/utils/createMarsunRequest.js.map +1 -0
- package/dist/utils/date.d.ts +16 -0
- package/dist/utils/date.js +36 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/department/departmentPath.d.ts +18 -0
- package/dist/utils/department/departmentPath.js +63 -0
- package/dist/utils/department/departmentPath.js.map +1 -0
- package/dist/utils/department/departmentScope.d.ts +20 -0
- package/dist/utils/department/departmentScope.js +63 -0
- package/dist/utils/department/departmentScope.js.map +1 -0
- package/dist/utils/department/types.d.ts +12 -0
- package/dist/utils/permissionStorage.d.ts +13 -0
- package/dist/utils/permissionStorage.js +43 -0
- package/dist/utils/permissionStorage.js.map +1 -0
- package/dist/utils/personOption.d.ts +49 -0
- package/dist/utils/personOption.js +90 -0
- package/dist/utils/personOption.js.map +1 -0
- package/dist/utils/sessionActivity.d.ts +5 -0
- package/dist/utils/sessionActivity.js +18 -0
- package/dist/utils/sessionActivity.js.map +1 -0
- package/dist/utils/user/employeeId.d.ts +8 -0
- package/dist/utils/user/employeeId.js +14 -0
- package/dist/utils/user/employeeId.js.map +1 -0
- package/package.json +26 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import n from "../utils.js";
|
|
2
|
+
import p from "../core/AxiosError.js";
|
|
3
|
+
const D = 100;
|
|
4
|
+
function m(e) {
|
|
5
|
+
return n.isPlainObject(e) || n.isArray(e);
|
|
6
|
+
}
|
|
7
|
+
function F(e) {
|
|
8
|
+
return n.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
9
|
+
}
|
|
10
|
+
function E(e, s, f) {
|
|
11
|
+
return e ? e.concat(s).map(function(c, u) {
|
|
12
|
+
return c = F(c), !f && u ? "[" + c + "]" : c;
|
|
13
|
+
}).join(f ? "." : "") : s;
|
|
14
|
+
}
|
|
15
|
+
function S(e) {
|
|
16
|
+
return n.isArray(e) && !e.some(m);
|
|
17
|
+
}
|
|
18
|
+
const U = n.toFlatObject(n, {}, null, function(s) {
|
|
19
|
+
return /^is[A-Z]/.test(s);
|
|
20
|
+
});
|
|
21
|
+
function P(e, s, f) {
|
|
22
|
+
if (!n.isObject(e))
|
|
23
|
+
throw new TypeError("target must be an object");
|
|
24
|
+
s = s || new FormData(), f = n.toFlatObject(
|
|
25
|
+
f,
|
|
26
|
+
{
|
|
27
|
+
metaTokens: !0,
|
|
28
|
+
dots: !1,
|
|
29
|
+
indexes: !1
|
|
30
|
+
},
|
|
31
|
+
!1,
|
|
32
|
+
function(i, r) {
|
|
33
|
+
return !n.isUndefined(r[i]);
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
const B = f.metaTokens, c = f.visitor || x, u = f.dots, O = f.indexes, h = f.Blob || typeof Blob < "u" && Blob, a = f.maxDepth === void 0 ? D : f.maxDepth, A = h && n.isSpecCompliantForm(s), w = [];
|
|
37
|
+
if (!n.isFunction(c))
|
|
38
|
+
throw new TypeError("visitor must be a function");
|
|
39
|
+
function b(t) {
|
|
40
|
+
if (t === null) return "";
|
|
41
|
+
if (n.isDate(t))
|
|
42
|
+
return t.toISOString();
|
|
43
|
+
if (n.isBoolean(t))
|
|
44
|
+
return t.toString();
|
|
45
|
+
if (!A && n.isBlob(t))
|
|
46
|
+
throw new p("Blob is not supported. Use a Buffer instead.");
|
|
47
|
+
if (n.isArrayBuffer(t) || n.isTypedArray(t)) {
|
|
48
|
+
if (A && typeof h == "function")
|
|
49
|
+
return new h([t]);
|
|
50
|
+
if (typeof Buffer < "u")
|
|
51
|
+
return Buffer.from(t);
|
|
52
|
+
throw new p("Blob is not supported. Use a Buffer instead.", p.ERR_NOT_SUPPORT);
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
}
|
|
56
|
+
function T(t) {
|
|
57
|
+
if (t > a)
|
|
58
|
+
throw new p(
|
|
59
|
+
"Object is too deeply nested (" + t + " levels). Max depth: " + a,
|
|
60
|
+
p.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
function g(t, i) {
|
|
64
|
+
if (a === 1 / 0)
|
|
65
|
+
return JSON.stringify(t);
|
|
66
|
+
const r = [];
|
|
67
|
+
return JSON.stringify(t, function(d, o) {
|
|
68
|
+
if (!n.isObject(o))
|
|
69
|
+
return o;
|
|
70
|
+
for (; r.length && r[r.length - 1] !== this; )
|
|
71
|
+
r.pop();
|
|
72
|
+
return r.push(o), T(i + r.length - 1), o;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function x(t, i, r) {
|
|
76
|
+
let l = t;
|
|
77
|
+
if (n.isReactNative(s) && n.isReactNativeBlob(t))
|
|
78
|
+
return s.append(E(r, i, u), b(t)), !1;
|
|
79
|
+
if (t && !r && typeof t == "object") {
|
|
80
|
+
if (n.endsWith(i, "{}"))
|
|
81
|
+
i = B ? i : i.slice(0, -2), t = g(t, 1);
|
|
82
|
+
else if (n.isArray(t) && S(t) || (n.isFileList(t) || n.endsWith(i, "[]")) && (l = n.toArray(t)))
|
|
83
|
+
return i = F(i), l.forEach(function(o, j) {
|
|
84
|
+
!(n.isUndefined(o) || o === null) && s.append(
|
|
85
|
+
// eslint-disable-next-line no-nested-ternary
|
|
86
|
+
O === !0 ? E([i], j, u) : O === null ? i : i + "[]",
|
|
87
|
+
b(o)
|
|
88
|
+
);
|
|
89
|
+
}), !1;
|
|
90
|
+
}
|
|
91
|
+
return m(t) ? !0 : (s.append(E(r, i, u), b(t)), !1);
|
|
92
|
+
}
|
|
93
|
+
const R = Object.assign(U, {
|
|
94
|
+
defaultVisitor: x,
|
|
95
|
+
convertValue: b,
|
|
96
|
+
isVisitable: m
|
|
97
|
+
});
|
|
98
|
+
function _(t, i, r = 0) {
|
|
99
|
+
if (!n.isUndefined(t)) {
|
|
100
|
+
if (T(r), w.indexOf(t) !== -1)
|
|
101
|
+
throw new Error("Circular reference detected in " + i.join("."));
|
|
102
|
+
w.push(t), n.forEach(t, function(d, o) {
|
|
103
|
+
(!(n.isUndefined(d) || d === null) && c.call(s, d, n.isString(o) ? o.trim() : o, i, R)) === !0 && _(d, i ? i.concat(o) : [o], r + 1);
|
|
104
|
+
}), w.pop();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (!n.isObject(e))
|
|
108
|
+
throw new TypeError("data must be an object");
|
|
109
|
+
return _(e), s;
|
|
110
|
+
}
|
|
111
|
+
export {
|
|
112
|
+
D as DEFAULT_FORM_DATA_MAX_DEPTH,
|
|
113
|
+
P as default
|
|
114
|
+
};
|
|
115
|
+
//# 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// Default nesting limit shared with the inverse transform (formDataToJSON) so\n// the FormData <-> JSON round-trip stays symmetric.\nexport const DEFAULT_FORM_DATA_MAX_DEPTH = 100;\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\n .concat(key)\n .map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n })\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(\n options,\n {\n metaTokens: true,\n dots: false,\n indexes: false,\n },\n false,\n function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n }\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 maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n const stack = [];\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 if (useBlob && typeof _Blob === 'function') {\n return new _Blob([value]);\n }\n if (typeof Buffer !== 'undefined') {\n return Buffer.from(value);\n }\n throw new AxiosError('Blob is not supported. Use a Buffer instead.', AxiosError.ERR_NOT_SUPPORT);\n }\n\n return value;\n }\n\n function throwIfMaxDepthExceeded(depth) {\n if (depth > maxDepth) {\n throw new AxiosError(\n 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,\n AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n );\n }\n }\n\n function stringifyWithDepthLimit(value, depth) {\n if (maxDepth === Infinity) {\n return JSON.stringify(value);\n }\n\n const ancestors = [];\n\n return JSON.stringify(value, function limitDepth(_key, currentValue) {\n if (!utils.isObject(currentValue)) {\n return currentValue;\n }\n\n while (ancestors.length && ancestors[ancestors.length - 1] !== this) {\n ancestors.pop();\n }\n\n ancestors.push(currentValue);\n throwIfMaxDepthExceeded(depth + ancestors.length - 1);\n\n return currentValue;\n });\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 (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {\n formData.append(renderKey(path, key, dots), convertValue(value));\n return false;\n }\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 = stringifyWithDepthLimit(value, 1);\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) &&\n formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true\n ? renderKey([key], index, dots)\n : indexes === null\n ? key\n : 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 exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable,\n });\n\n function build(value, path, depth = 0) {\n if (utils.isUndefined(value)) return;\n\n throwIfMaxDepthExceeded(depth);\n\n if (stack.indexOf(value) !== -1) {\n throw new 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 =\n !(utils.isUndefined(el) || el === null) &&\n visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key], depth + 1);\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":["DEFAULT_FORM_DATA_MAX_DEPTH","isVisitable","thing","utils","removeBrackets","key","renderKey","path","dots","token","i","isFlatArray","arr","predicates","prop","toFormData","obj","formData","options","option","source","metaTokens","visitor","defaultVisitor","indexes","_Blob","maxDepth","useBlob","stack","convertValue","value","AxiosError","throwIfMaxDepthExceeded","depth","stringifyWithDepthLimit","ancestors","_key","currentValue","el","index","exposedHelpers","build"],"mappings":";;AASY,MAACA,IAA8B;AAS3C,SAASC,EAAYC,GAAO;AAC1B,SAAOC,EAAM,cAAcD,CAAK,KAAKC,EAAM,QAAQD,CAAK;AAC1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cAAM,IAAI,MAAM,oCAAoCvB,EAAK,KAAK,GAAG,CAAC;AAGpE,MAAAqB,EAAM,KAAKE,CAAK,GAEhB3B,EAAM,QAAQ2B,GAAO,SAAcQ,GAAIjC,GAAK;AAK1C,SAHE,EAAEF,EAAM,YAAYmC,CAAE,KAAKA,MAAO,SAClChB,EAAQ,KAAKL,GAAUqB,GAAInC,EAAM,SAASE,CAAG,IAAIA,EAAI,KAAI,IAAKA,GAAKE,GAAMiC,CAAc,OAE1E,MACbC,EAAMH,GAAI/B,IAAOA,EAAK,OAAOF,CAAG,IAAI,CAACA,CAAG,GAAG4B,IAAQ,CAAC;AAAA,MAExD,CAAC,GAEDL,EAAM,IAAG;AAAA;AAAA,EACX;AAEA,MAAI,CAACzB,EAAM,SAASa,CAAG;AACrB,UAAM,IAAI,UAAU,wBAAwB;AAG9C,SAAAyB,EAAMzB,CAAG,GAEFC;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import s from "../utils.js";
|
|
2
|
+
import f from "./toFormData.js";
|
|
3
|
+
import r from "../platform/index.js";
|
|
4
|
+
function d(o, i) {
|
|
5
|
+
return f(o, new r.classes.URLSearchParams(), {
|
|
6
|
+
visitor: function(t, a, n, e) {
|
|
7
|
+
return r.isNode && s.isBuffer(t) ? (this.append(a, t.toString("base64")), !1) : e.defaultVisitor.apply(this, arguments);
|
|
8
|
+
},
|
|
9
|
+
...i
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
d as default
|
|
14
|
+
};
|
|
15
|
+
//# 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":["toURLEncodedForm","data","options","toFormData","platform","value","key","path","helpers","utils"],"mappings":";;;AAMe,SAASA,EAAiBC,GAAMC,GAAS;AACtD,SAAOC,EAAWF,GAAM,IAAIG,EAAS,QAAQ,gBAAe,GAAI;AAAA,IAC9D,SAAS,SAAUC,GAAOC,GAAKC,GAAMC,GAAS;AAC5C,aAAIJ,EAAS,UAAUK,EAAM,SAASJ,CAAK,KACzC,KAAK,OAAOC,GAAKD,EAAM,SAAS,QAAQ,CAAC,GAClC,MAGFG,EAAQ,eAAe,MAAM,MAAM,SAAS;AAAA,IACrD;AAAA,IACA,GAAGN;AAAA,EACP,CAAG;AACH;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const f = function* (e, t) {
|
|
2
|
+
let n = e.byteLength;
|
|
3
|
+
if (n < t) {
|
|
4
|
+
yield e;
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
let a = 0, r;
|
|
8
|
+
for (; a < n; )
|
|
9
|
+
r = a + t, yield e.slice(a, r), a = r;
|
|
10
|
+
}, w = async function* (e, t) {
|
|
11
|
+
for await (const n of b(e))
|
|
12
|
+
yield* f(n, t);
|
|
13
|
+
}, b = async function* (e) {
|
|
14
|
+
if (e[Symbol.asyncIterator]) {
|
|
15
|
+
yield* e;
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const t = e.getReader();
|
|
19
|
+
try {
|
|
20
|
+
for (; ; ) {
|
|
21
|
+
const { done: n, value: a } = await t.read();
|
|
22
|
+
if (n)
|
|
23
|
+
break;
|
|
24
|
+
yield a;
|
|
25
|
+
}
|
|
26
|
+
} finally {
|
|
27
|
+
await t.cancel();
|
|
28
|
+
}
|
|
29
|
+
}, h = (e, t, n, a) => {
|
|
30
|
+
const r = w(e, t);
|
|
31
|
+
let d = 0, o, c = (l) => {
|
|
32
|
+
o || (o = !0, a && a(l));
|
|
33
|
+
};
|
|
34
|
+
return new ReadableStream(
|
|
35
|
+
{
|
|
36
|
+
async pull(l) {
|
|
37
|
+
try {
|
|
38
|
+
const { done: i, value: y } = await r.next();
|
|
39
|
+
if (i) {
|
|
40
|
+
c(), l.close();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
let s = y.byteLength;
|
|
44
|
+
if (n) {
|
|
45
|
+
let u = d += s;
|
|
46
|
+
n(u);
|
|
47
|
+
}
|
|
48
|
+
l.enqueue(new Uint8Array(y));
|
|
49
|
+
} catch (i) {
|
|
50
|
+
throw c(i), i;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
cancel(l) {
|
|
54
|
+
return c(l), r.return();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
highWaterMark: 2
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
w as readBytes,
|
|
64
|
+
f as streamChunk,
|
|
65
|
+
h as trackStream
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=trackStream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackStream.js","sources":["../../../../../node_modules/axios/lib/helpers/trackStream.js"],"sourcesContent":["export 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 {\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 {\n highWaterMark: 2,\n }\n );\n};\n"],"names":["streamChunk","chunk","chunkSize","len","pos","end","readBytes","iterable","readStream","stream","reader","done","value","trackStream","onProgress","onFinish","iterator","bytes","_onFinish","e","controller","loadedBytes","err","reason"],"mappings":"AAAY,MAACA,IAAc,WAAWC,GAAOC,GAAW;AACtD,MAAIC,IAAMF,EAAM;AAEhB,MAAkBE,IAAMD,GAAW;AACjC,UAAMD;AACN;AAAA,EACF;AAEA,MAAIG,IAAM,GACNC;AAEJ,SAAOD,IAAMD;AACX,IAAAE,IAAMD,IAAMF,GACZ,MAAMD,EAAM,MAAMG,GAAKC,CAAG,GAC1BD,IAAMC;AAEV,GAEaC,IAAY,iBAAiBC,GAAUL,GAAW;AAC7D,mBAAiBD,KAASO,EAAWD,CAAQ;AAC3C,WAAOP,EAAYC,GAAOC,CAAS;AAEvC,GAEMM,IAAa,iBAAiBC,GAAQ;AAC1C,MAAIA,EAAO,OAAO,aAAa,GAAG;AAChC,WAAOA;AACP;AAAA,EACF;AAEA,QAAMC,IAASD,EAAO,UAAS;AAC/B,MAAI;AACF,eAAS;AACP,YAAM,EAAE,MAAAE,GAAM,OAAAC,EAAK,IAAK,MAAMF,EAAO,KAAI;AACzC,UAAIC;AACF;AAEF,YAAMC;AAAA,IACR;AAAA,EACF,UAAC;AACC,UAAMF,EAAO,OAAM;AAAA,EACrB;AACF,GAEaG,IAAc,CAACJ,GAAQP,GAAWY,GAAYC,MAAa;AACtE,QAAMC,IAAWV,EAAUG,GAAQP,CAAS;AAE5C,MAAIe,IAAQ,GACRN,GACAO,IAAY,CAACC,MAAM;AACrB,IAAKR,MACHA,IAAO,IACPI,KAAYA,EAASI,CAAC;AAAA,EAE1B;AAEA,SAAO,IAAI;AAAA,IACT;AAAA,MACE,MAAM,KAAKC,GAAY;AACrB,YAAI;AACF,gBAAM,EAAE,MAAAT,GAAM,OAAAC,EAAK,IAAK,MAAMI,EAAS,KAAI;AAE3C,cAAIL,GAAM;AACR,YAAAO,EAAS,GACTE,EAAW,MAAK;AAChB;AAAA,UACF;AAEA,cAAIjB,IAAMS,EAAM;AAChB,cAAIE,GAAY;AACd,gBAAIO,IAAeJ,KAASd;AAC5B,YAAAW,EAAWO,CAAW;AAAA,UACxB;AACA,UAAAD,EAAW,QAAQ,IAAI,WAAWR,CAAK,CAAC;AAAA,QAC1C,SAASU,GAAK;AACZ,gBAAAJ,EAAUI,CAAG,GACPA;AAAA,QACR;AAAA,MACF;AAAA,MACA,OAAOC,GAAQ;AACb,eAAAL,EAAUK,CAAM,GACTP,EAAS,OAAM;AAAA,MACxB;AAAA,IACN;AAAA,IACI;AAAA,MACE,eAAe;AAAA,IACrB;AAAA,EACA;AACA;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { VERSION as d } from "../env/data.js";
|
|
2
|
+
import a from "../core/AxiosError.js";
|
|
3
|
+
const u = {};
|
|
4
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((n, e) => {
|
|
5
|
+
u[n] = function(o) {
|
|
6
|
+
return typeof o === n || "a" + (e < 1 ? "n " : " ") + n;
|
|
7
|
+
};
|
|
8
|
+
});
|
|
9
|
+
const f = {};
|
|
10
|
+
u.transitional = function(e, i, o) {
|
|
11
|
+
function l(t, r) {
|
|
12
|
+
return "[Axios v" + d + "] Transitional option '" + t + "'" + r + (o ? ". " + o : "");
|
|
13
|
+
}
|
|
14
|
+
return (t, r, s) => {
|
|
15
|
+
if (e === !1)
|
|
16
|
+
throw new a(
|
|
17
|
+
l(r, " has been removed" + (i ? " in " + i : "")),
|
|
18
|
+
a.ERR_DEPRECATED
|
|
19
|
+
);
|
|
20
|
+
return i && !f[r] && (f[r] = !0, console.warn(
|
|
21
|
+
l(
|
|
22
|
+
r,
|
|
23
|
+
" has been deprecated since v" + i + " and will be removed in the near future"
|
|
24
|
+
)
|
|
25
|
+
)), e ? e(t, r, s) : !0;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
u.spelling = function(e) {
|
|
29
|
+
return (i, o) => (console.warn(`${o} is likely a misspelling of ${e}`), !0);
|
|
30
|
+
};
|
|
31
|
+
function w(n, e, i) {
|
|
32
|
+
if (typeof n != "object" || n === null)
|
|
33
|
+
throw new a("options must be an object", a.ERR_BAD_OPTION_VALUE);
|
|
34
|
+
const o = Object.keys(n);
|
|
35
|
+
let l = o.length;
|
|
36
|
+
for (; l-- > 0; ) {
|
|
37
|
+
const t = o[l], r = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
|
|
38
|
+
if (r) {
|
|
39
|
+
const s = n[t], c = s === void 0 || r(s, t, n);
|
|
40
|
+
if (c !== !0)
|
|
41
|
+
throw new a(
|
|
42
|
+
"option " + t + " must be " + c,
|
|
43
|
+
a.ERR_BAD_OPTION_VALUE
|
|
44
|
+
);
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
if (i !== !0)
|
|
48
|
+
throw new a("Unknown option " + t, a.ERR_BAD_OPTION);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const O = {
|
|
52
|
+
assertOptions: w,
|
|
53
|
+
validators: u
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
O as default
|
|
57
|
+
};
|
|
58
|
+
//# 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 (\n '[Axios v' +\n VERSION +\n \"] Transitional option '\" +\n opt +\n \"'\" +\n desc +\n (message ? '. ' + message : '')\n );\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' || options === null) {\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 // Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply\n // a non-function validator and cause a TypeError.\n const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;\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(\n 'option ' + opt + ' must be ' + result,\n AxiosError.ERR_BAD_OPTION_VALUE\n );\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":["validators","type","i","thing","deprecatedWarnings","validator","version","message","formatMessage","opt","desc","VERSION","value","opts","AxiosError","correctSpelling","assertOptions","options","schema","allowUnknown","keys","result"],"mappings":";;AAKA,MAAMA,IAAa,CAAA;AAGnB,CAAC,UAAU,WAAW,UAAU,YAAY,UAAU,QAAQ,EAAE,QAAQ,CAACC,GAAMC,MAAM;AACnF,EAAAF,EAAWC,CAAI,IAAI,SAAmBE,GAAO;AAC3C,WAAO,OAAOA,MAAUF,KAAQ,OAAOC,IAAI,IAAI,OAAO,OAAOD;AAAA,EAC/D;AACF,CAAC;AAED,MAAMG,IAAqB,CAAA;AAW3BJ,EAAW,eAAe,SAAsBK,GAAWC,GAASC,GAAS;AAC3E,WAASC,EAAcC,GAAKC,GAAM;AAChC,WACE,aACAC,IACA,4BACAF,IACA,MACAC,KACCH,IAAU,OAAOA,IAAU;AAAA,EAEhC;AAGA,SAAO,CAACK,GAAOH,GAAKI,MAAS;AAC3B,QAAIR,MAAc;AAChB,YAAM,IAAIS;AAAA,QACRN,EAAcC,GAAK,uBAAuBH,IAAU,SAASA,IAAU,GAAG;AAAA,QAC1EQ,EAAW;AAAA,MACnB;AAGI,WAAIR,KAAW,CAACF,EAAmBK,CAAG,MACpCL,EAAmBK,CAAG,IAAI,IAE1B,QAAQ;AAAA,MACND;AAAA,QACEC;AAAA,QACA,iCAAiCH,IAAU;AAAA,MACrD;AAAA,IACA,IAGWD,IAAYA,EAAUO,GAAOH,GAAKI,CAAI,IAAI;AAAA,EACnD;AACF;AAEAb,EAAW,WAAW,SAAkBe,GAAiB;AACvD,SAAO,CAACH,GAAOH,OAEb,QAAQ,KAAK,GAAGA,CAAG,+BAA+BM,CAAe,EAAE,GAC5D;AAEX;AAYA,SAASC,EAAcC,GAASC,GAAQC,GAAc;AACpD,MAAI,OAAOF,KAAY,YAAYA,MAAY;AAC7C,UAAM,IAAIH,EAAW,6BAA6BA,EAAW,oBAAoB;AAEnF,QAAMM,IAAO,OAAO,KAAKH,CAAO;AAChC,MAAIf,IAAIkB,EAAK;AACb,SAAOlB,MAAM,KAAG;AACd,UAAMO,IAAMW,EAAKlB,CAAC,GAGZG,IAAY,OAAO,UAAU,eAAe,KAAKa,GAAQT,CAAG,IAAIS,EAAOT,CAAG,IAAI;AACpF,QAAIJ,GAAW;AACb,YAAMO,IAAQK,EAAQR,CAAG,GACnBY,IAAST,MAAU,UAAaP,EAAUO,GAAOH,GAAKQ,CAAO;AACnE,UAAII,MAAW;AACb,cAAM,IAAIP;AAAA,UACR,YAAYL,IAAM,cAAcY;AAAA,UAChCP,EAAW;AAAA,QACrB;AAEM;AAAA,IACF;AACA,QAAIK,MAAiB;AACnB,YAAM,IAAIL,EAAW,oBAAoBL,GAAKK,EAAW,cAAc;AAAA,EAE3E;AACF;AAEA,MAAAT,IAAe;AAAA,EACb,eAAAW;AAAA,EACA,YAAAhB;AACF;","x_google_ignoreList":[0]}
|
|
@@ -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":["Blob$1"],"mappings":"AAEA,MAAAA,IAAe,OAAO,OAAS,MAAc,OAAO;","x_google_ignoreList":[0]}
|
|
@@ -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":["FormData$1"],"mappings":"AAEA,MAAAA,IAAe,OAAO,WAAa,MAAc,WAAW;","x_google_ignoreList":[0]}
|
|
@@ -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":["URLSearchParams$1","AxiosURLSearchParams"],"mappings":";AAGA,MAAAA,IAAe,OAAO,kBAAoB,MAAc,kBAAkBC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import o from "./classes/URLSearchParams.js";
|
|
2
|
+
import r from "./classes/FormData.js";
|
|
3
|
+
import t from "./classes/Blob.js";
|
|
4
|
+
const l = {
|
|
5
|
+
isBrowser: !0,
|
|
6
|
+
classes: {
|
|
7
|
+
URLSearchParams: o,
|
|
8
|
+
FormData: r,
|
|
9
|
+
Blob: t
|
|
10
|
+
},
|
|
11
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
l as default
|
|
15
|
+
};
|
|
16
|
+
//# 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":["platform","URLSearchParams","FormData","Blob"],"mappings":";;;AAIA,MAAAA,IAAe;AAAA,EACb,WAAW;AAAA,EACX,SAAS;AAAA,IACP,iBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,EACJ;AAAA,EACE,WAAW,CAAC,QAAQ,SAAS,QAAQ,QAAQ,OAAO,MAAM;AAC5D;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const e = typeof window < "u" && typeof document < "u", o = typeof navigator == "object" && navigator || void 0, n = e && (!o || ["ReactNative", "NativeScript", "NS"].indexOf(o.product) < 0), t = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
2
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", r = e && window.location.href || "http://localhost";
|
|
3
|
+
export {
|
|
4
|
+
e as hasBrowserEnv,
|
|
5
|
+
n as hasStandardBrowserEnv,
|
|
6
|
+
t as hasStandardBrowserWebWorkerEnv,
|
|
7
|
+
o as navigator,
|
|
8
|
+
r as origin
|
|
9
|
+
};
|
|
10
|
+
//# 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 =\n 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":["hasBrowserEnv","_navigator","hasStandardBrowserEnv","hasStandardBrowserWebWorkerEnv","origin"],"mappings":"AAAK,MAACA,IAAgB,OAAO,SAAW,OAAe,OAAO,WAAa,KAErEC,IAAc,OAAO,aAAc,YAAY,aAAc,QAmB7DC,IACJF,MACC,CAACC,KAAc,CAAC,eAAe,gBAAgB,IAAI,EAAE,QAAQA,EAAW,OAAO,IAAI,IAWhFE,IAEF,OAAO,oBAAsB;AAE7B,gBAAgB,qBAChB,OAAO,KAAK,iBAAkB,YAI5BC,IAAUJ,KAAiB,OAAO,SAAS,QAAS;","x_google_ignoreList":[0]}
|
|
@@ -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","utils"],"mappings":";;AAGA,MAAAA,IAAe;AAAA,EACb,GAAGC;AAAA,EACH,GAAGD;AACL;","x_google_ignoreList":[0]}
|