@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 @@
|
|
|
1
|
+
{"version":3,"file":"buildURL.js","sources":["../../../../../node_modules/axios/lib/helpers/buildURL.js"],"sourcesContent":["'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from './AxiosURLSearchParams.js';\n\n/**\n * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with\n * their plain counterparts (`:`, `$`, `,`, `+`).\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nexport function encode(val) {\n return encodeURIComponent(val)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n if (!params) {\n return url;\n }\n url = url || '';\n\n const _options = utils.isFunction(options)\n ? {\n serialize: options,\n }\n : options;\n\n // Read serializer options pollution-safely: own properties and methods on a\n // class/template prototype are honored, but values injected onto a polluted\n // Object.prototype are ignored.\n const _encode = utils.getSafeProp(_options, 'encode') || encode;\n const serializeFn = utils.getSafeProp(_options, 'serialize');\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, _options);\n } else {\n serializedParams = utils.isURLSearchParams(params)\n ? params.toString()\n : new AxiosURLSearchParams(params, _options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf('#');\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n"],"names":["encode","val","buildURL","url","params","options","_options","utils","_encode","serializeFn","serializedParams","AxiosURLSearchParams","hashmarkIndex"],"mappings":";;AAaO,SAASA,EAAOC,GAAK;AAC1B,SAAO,mBAAmBA,CAAG,EAC1B,QAAQ,SAAS,GAAG,EACpB,QAAQ,QAAQ,GAAG,EACnB,QAAQ,SAAS,GAAG,EACpB,QAAQ,QAAQ,GAAG;AACxB;AAWe,SAASC,EAASC,GAAKC,GAAQC,GAAS;AACrD,MAAI,CAACD;AACH,WAAOD;AAET,EAAAA,IAAMA,KAAO;AAEb,QAAMG,IAAWC,EAAM,WAAWF,CAAO,IACrC;AAAA,IACE,WAAWA;AAAA,EACnB,IACMA,GAKEG,IAAUD,EAAM,YAAYD,GAAU,QAAQ,KAAKN,GACnDS,IAAcF,EAAM,YAAYD,GAAU,WAAW;AAE3D,MAAII;AAUJ,MARID,IACFC,IAAmBD,EAAYL,GAAQE,CAAQ,IAE/CI,IAAmBH,EAAM,kBAAkBH,CAAM,IAC7CA,EAAO,SAAQ,IACf,IAAIO,EAAqBP,GAAQE,CAAQ,EAAE,SAASE,CAAO,GAG7DE,GAAkB;AACpB,UAAME,IAAgBT,EAAI,QAAQ,GAAG;AAErC,IAAIS,MAAkB,OACpBT,IAAMA,EAAI,MAAM,GAAGS,CAAa,IAElCT,MAAQA,EAAI,QAAQ,GAAG,MAAM,KAAK,MAAM,OAAOO;AAAA,EACjD;AAEA,SAAOP;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combineURLs.js","sources":["../../../../../node_modules/axios/lib/helpers/combineURLs.js"],"sourcesContent":["'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n"],"names":["combineURLs","baseURL","relativeURL"],"mappings":"AAUe,SAASA,EAAYC,GAASC,GAAa;AACxD,SAAOA,IACHD,EAAQ,QAAQ,UAAU,EAAE,IAAI,MAAMC,EAAY,QAAQ,QAAQ,EAAE,IACpED;AACN;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import a from "../cancel/CanceledError.js";
|
|
2
|
+
import u from "../core/AxiosError.js";
|
|
3
|
+
import l from "../utils.js";
|
|
4
|
+
const p = (r, t) => {
|
|
5
|
+
if (r = r ? r.filter(Boolean) : [], !t && !r.length)
|
|
6
|
+
return;
|
|
7
|
+
const f = new AbortController();
|
|
8
|
+
let s = !1;
|
|
9
|
+
const n = function(e) {
|
|
10
|
+
if (!s) {
|
|
11
|
+
s = !0, b();
|
|
12
|
+
const o = e instanceof Error ? e : this.reason;
|
|
13
|
+
f.abort(
|
|
14
|
+
o instanceof u ? o : new a(o instanceof Error ? o.message : o)
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
let c = t && setTimeout(() => {
|
|
19
|
+
c = null, n(new u(`timeout of ${t}ms exceeded`, u.ETIMEDOUT));
|
|
20
|
+
}, t);
|
|
21
|
+
const b = () => {
|
|
22
|
+
r && (c && clearTimeout(c), c = null, r.forEach((e) => {
|
|
23
|
+
e.unsubscribe ? e.unsubscribe(n) : e.removeEventListener("abort", n);
|
|
24
|
+
}), r = null);
|
|
25
|
+
};
|
|
26
|
+
r.forEach((e) => e.addEventListener("abort", n, { once: !0 }));
|
|
27
|
+
const { signal: i } = f;
|
|
28
|
+
return i.unsubscribe = () => l.asap(b), i;
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
p as default
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=composeSignals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composeSignals.js","sources":["../../../../../node_modules/axios/lib/helpers/composeSignals.js"],"sourcesContent":["import CanceledError from '../cancel/CanceledError.js';\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n signals = signals ? signals.filter(Boolean) : [];\n\n if (!timeout && !signals.length) {\n return;\n }\n\n const controller = new AbortController();\n\n let aborted = false;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(\n err instanceof AxiosError\n ? err\n : new CanceledError(err instanceof Error ? err.message : err)\n );\n }\n };\n\n let timer =\n timeout &&\n setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (!signals) { return; }\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach((signal) => {\n signal.unsubscribe\n ? signal.unsubscribe(onabort)\n : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n };\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort, { once: true }));\n\n const { signal } = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n};\n\nexport default composeSignals;\n"],"names":["composeSignals","signals","timeout","controller","aborted","onabort","reason","unsubscribe","err","AxiosError","CanceledError","timer","signal","utils"],"mappings":";;;AAIK,MAACA,IAAiB,CAACC,GAASC,MAAY;AAG3C,MAFAD,IAAUA,IAAUA,EAAQ,OAAO,OAAO,IAAI,CAAA,GAE1C,CAACC,KAAW,CAACD,EAAQ;AACvB;AAGF,QAAME,IAAa,IAAI,gBAAe;AAEtC,MAAIC,IAAU;AAEd,QAAMC,IAAU,SAAUC,GAAQ;AAChC,QAAI,CAACF,GAAS;AACZ,MAAAA,IAAU,IACVG,EAAW;AACX,YAAMC,IAAMF,aAAkB,QAAQA,IAAS,KAAK;AACpD,MAAAH,EAAW;AAAA,QACTK,aAAeC,IACXD,IACA,IAAIE,EAAcF,aAAe,QAAQA,EAAI,UAAUA,CAAG;AAAA,MACtE;AAAA,IACI;AAAA,EACF;AAEA,MAAIG,IACFT,KACA,WAAW,MAAM;AACf,IAAAS,IAAQ,MACRN,EAAQ,IAAII,EAAW,cAAcP,CAAO,eAAeO,EAAW,SAAS,CAAC;AAAA,EAClF,GAAGP,CAAO;AAEZ,QAAMK,IAAc,MAAM;AACxB,IAAKN,MACLU,KAAS,aAAaA,CAAK,GAC3BA,IAAQ,MACRV,EAAQ,QAAQ,CAACW,MAAW;AAC1B,MAAAA,EAAO,cACHA,EAAO,YAAYP,CAAO,IAC1BO,EAAO,oBAAoB,SAASP,CAAO;AAAA,IACjD,CAAC,GACDJ,IAAU;AAAA,EACZ;AAEA,EAAAA,EAAQ,QAAQ,CAACW,MAAWA,EAAO,iBAAiB,SAASP,GAAS,EAAE,MAAM,GAAI,CAAE,CAAC;AAErF,QAAM,EAAE,QAAAO,EAAM,IAAKT;AAEnB,SAAAS,EAAO,cAAc,MAAMC,EAAM,KAAKN,CAAW,GAE1CK;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import s from "../utils.js";
|
|
2
|
+
import f from "../platform/index.js";
|
|
3
|
+
const p = f.hasStandardBrowserEnv ? (
|
|
4
|
+
// Standard browser envs support document.cookie
|
|
5
|
+
{
|
|
6
|
+
write(n, r, o, e, t, u, c) {
|
|
7
|
+
if (typeof document > "u") return;
|
|
8
|
+
const i = [`${n}=${encodeURIComponent(r)}`];
|
|
9
|
+
s.isNumber(o) && i.push(`expires=${new Date(o).toUTCString()}`), s.isString(e) && i.push(`path=${e}`), s.isString(t) && i.push(`domain=${t}`), u === !0 && i.push("secure"), s.isString(c) && i.push(`SameSite=${c}`), document.cookie = i.join("; ");
|
|
10
|
+
},
|
|
11
|
+
read(n) {
|
|
12
|
+
if (typeof document > "u") return null;
|
|
13
|
+
const r = document.cookie.split(";");
|
|
14
|
+
for (let o = 0; o < r.length; o++) {
|
|
15
|
+
const e = r[o].replace(/^\s+/, ""), t = e.indexOf("=");
|
|
16
|
+
if (t !== -1 && e.slice(0, t) === n)
|
|
17
|
+
try {
|
|
18
|
+
return decodeURIComponent(e.slice(t + 1));
|
|
19
|
+
} catch {
|
|
20
|
+
return e.slice(t + 1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
},
|
|
25
|
+
remove(n) {
|
|
26
|
+
this.write(n, "", Date.now() - 864e5, "/");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
) : (
|
|
30
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
31
|
+
{
|
|
32
|
+
write() {
|
|
33
|
+
},
|
|
34
|
+
read() {
|
|
35
|
+
return null;
|
|
36
|
+
},
|
|
37
|
+
remove() {
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
export {
|
|
42
|
+
p as default
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=cookies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookies.js","sources":["../../../../../node_modules/axios/lib/helpers/cookies.js"],"sourcesContent":["import utils from '../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure, sameSite) {\n if (typeof document === 'undefined') return;\n\n const cookie = [`${name}=${encodeURIComponent(value)}`];\n\n if (utils.isNumber(expires)) {\n cookie.push(`expires=${new Date(expires).toUTCString()}`);\n }\n if (utils.isString(path)) {\n cookie.push(`path=${path}`);\n }\n if (utils.isString(domain)) {\n cookie.push(`domain=${domain}`);\n }\n if (secure === true) {\n cookie.push('secure');\n }\n if (utils.isString(sameSite)) {\n cookie.push(`SameSite=${sameSite}`);\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n if (typeof document === 'undefined') return null;\n // Match name=value by splitting on the semicolon separator instead of building a\n // RegExp from `name` — interpolating an unescaped string into a RegExp would let\n // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or\n // match the wrong cookie. Browsers may serialize cookie pairs as either \";\" or\n // \"; \", so ignore optional whitespace before each cookie name.\n const cookies = document.cookie.split(';');\n for (let i = 0; i < cookies.length; i++) {\n const cookie = cookies[i].replace(/^\\s+/, '');\n const eq = cookie.indexOf('=');\n if (eq !== -1 && cookie.slice(0, eq) === name) {\n try {\n return decodeURIComponent(cookie.slice(eq + 1));\n } catch (e) {\n return cookie.slice(eq + 1);\n }\n }\n }\n return null;\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000, '/');\n },\n }\n : // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {},\n };\n"],"names":["cookies","platform","name","value","expires","path","domain","secure","sameSite","cookie","utils","i","eq"],"mappings":";;AAGA,MAAAA,IAAeC,EAAS;AAAA;AAAA,EAEpB;AAAA,IACE,MAAMC,GAAMC,GAAOC,GAASC,GAAMC,GAAQC,GAAQC,GAAU;AAC1D,UAAI,OAAO,WAAa,IAAa;AAErC,YAAMC,IAAS,CAAC,GAAGP,CAAI,IAAI,mBAAmBC,CAAK,CAAC,EAAE;AAEtD,MAAIO,EAAM,SAASN,CAAO,KACxBK,EAAO,KAAK,WAAW,IAAI,KAAKL,CAAO,EAAE,YAAW,CAAE,EAAE,GAEtDM,EAAM,SAASL,CAAI,KACrBI,EAAO,KAAK,QAAQJ,CAAI,EAAE,GAExBK,EAAM,SAASJ,CAAM,KACvBG,EAAO,KAAK,UAAUH,CAAM,EAAE,GAE5BC,MAAW,MACbE,EAAO,KAAK,QAAQ,GAElBC,EAAM,SAASF,CAAQ,KACzBC,EAAO,KAAK,YAAYD,CAAQ,EAAE,GAGpC,SAAS,SAASC,EAAO,KAAK,IAAI;AAAA,IACpC;AAAA,IAEA,KAAKP,GAAM;AACT,UAAI,OAAO,WAAa,IAAa,QAAO;AAM5C,YAAMF,IAAU,SAAS,OAAO,MAAM,GAAG;AACzC,eAASW,IAAI,GAAGA,IAAIX,EAAQ,QAAQW,KAAK;AACvC,cAAMF,IAAST,EAAQW,CAAC,EAAE,QAAQ,QAAQ,EAAE,GACtCC,IAAKH,EAAO,QAAQ,GAAG;AAC7B,YAAIG,MAAO,MAAMH,EAAO,MAAM,GAAGG,CAAE,MAAMV;AACvC,cAAI;AACF,mBAAO,mBAAmBO,EAAO,MAAMG,IAAK,CAAC,CAAC;AAAA,UAChD,QAAY;AACV,mBAAOH,EAAO,MAAMG,IAAK,CAAC;AAAA,UAC5B;AAAA,MAEJ;AACA,aAAO;AAAA,IACT;AAAA,IAEA,OAAOV,GAAM;AACX,WAAK,MAAMA,GAAM,IAAI,KAAK,IAAG,IAAK,OAAU,GAAG;AAAA,IACjD;AAAA,EACN;AAAA;AAAA;AAAA,EAEI;AAAA,IACE,QAAQ;AAAA,IAAC;AAAA,IACT,OAAO;AACL,aAAO;AAAA,IACT;AAAA,IACA,SAAS;AAAA,IAAC;AAAA,EAChB;AAAA;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const d = (e) => e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102, C = (e, n, r) => n + 2 < r && d(e.charCodeAt(n + 1)) && d(e.charCodeAt(n + 2));
|
|
2
|
+
function p(e) {
|
|
3
|
+
if (!e || typeof e != "string" || !e.startsWith("data:")) return 0;
|
|
4
|
+
const n = e.indexOf(",");
|
|
5
|
+
if (n < 0) return 0;
|
|
6
|
+
const r = e.slice(5, n), t = e.slice(n + 1);
|
|
7
|
+
if (/;base64/i.test(r)) {
|
|
8
|
+
let o = t.length;
|
|
9
|
+
const a = t.length;
|
|
10
|
+
for (let s = 0; s < a; s++)
|
|
11
|
+
if (t.charCodeAt(s) === 37 && s + 2 < a) {
|
|
12
|
+
const x = t.charCodeAt(s + 1), A = t.charCodeAt(s + 2);
|
|
13
|
+
d(x) && d(A) && (o -= 2, s += 2);
|
|
14
|
+
}
|
|
15
|
+
let i = 0, c = a - 1;
|
|
16
|
+
const l = (s) => s >= 2 && t.charCodeAt(s - 2) === 37 && // '%'
|
|
17
|
+
t.charCodeAt(s - 1) === 51 && // '3'
|
|
18
|
+
(t.charCodeAt(s) === 68 || t.charCodeAt(s) === 100);
|
|
19
|
+
c >= 0 && (t.charCodeAt(c) === 61 ? (i++, c--) : l(c) && (i++, c -= 3)), i === 1 && c >= 0 && (t.charCodeAt(c) === 61 || l(c)) && i++;
|
|
20
|
+
const h = Math.floor(o / 4) * 3 - (i || 0);
|
|
21
|
+
return h > 0 ? h : 0;
|
|
22
|
+
}
|
|
23
|
+
let f = 0;
|
|
24
|
+
for (let o = 0, a = t.length; o < a; o++) {
|
|
25
|
+
const i = t.charCodeAt(o);
|
|
26
|
+
if (i === 37 && C(t, o, a))
|
|
27
|
+
f += 1, o += 2;
|
|
28
|
+
else if (i < 128)
|
|
29
|
+
f += 1;
|
|
30
|
+
else if (i < 2048)
|
|
31
|
+
f += 2;
|
|
32
|
+
else if (i >= 55296 && i <= 56319 && o + 1 < a) {
|
|
33
|
+
const c = t.charCodeAt(o + 1);
|
|
34
|
+
c >= 56320 && c <= 57343 ? (f += 4, o++) : f += 3;
|
|
35
|
+
} else
|
|
36
|
+
f += 3;
|
|
37
|
+
}
|
|
38
|
+
return f;
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
p as default
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=estimateDataURLDecodedBytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"estimateDataURLDecodedBytes.js","sources":["../../../../../node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js"],"sourcesContent":["/**\n * Estimate decoded byte length of a data:// URL *without* allocating large buffers.\n * - For base64: compute exact decoded size using length and padding;\n * handle %XX at the character-count level (no string allocation).\n * - For non-base64: compute the exact percent-decoded UTF-8 byte length.\n *\n * @param {string} url\n * @returns {number}\n */\nconst isHexDigit = (charCode) =>\n (charCode >= 48 && charCode <= 57) ||\n (charCode >= 65 && charCode <= 70) ||\n (charCode >= 97 && charCode <= 102);\n\nconst isPercentEncodedByte = (str, i, len) =>\n i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));\n\nexport default function estimateDataURLDecodedBytes(url) {\n if (!url || typeof url !== 'string') return 0;\n if (!url.startsWith('data:')) return 0;\n\n const comma = url.indexOf(',');\n if (comma < 0) return 0;\n\n const meta = url.slice(5, comma);\n const body = url.slice(comma + 1);\n const isBase64 = /;base64/i.test(meta);\n\n if (isBase64) {\n let effectiveLen = body.length;\n const len = body.length; // cache length\n\n for (let i = 0; i < len; i++) {\n if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {\n const a = body.charCodeAt(i + 1);\n const b = body.charCodeAt(i + 2);\n const isHex = isHexDigit(a) && isHexDigit(b);\n\n if (isHex) {\n effectiveLen -= 2;\n i += 2;\n }\n }\n }\n\n let pad = 0;\n let idx = len - 1;\n\n const tailIsPct3D = (j) =>\n j >= 2 &&\n body.charCodeAt(j - 2) === 37 && // '%'\n body.charCodeAt(j - 1) === 51 && // '3'\n (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'\n\n if (idx >= 0) {\n if (body.charCodeAt(idx) === 61 /* '=' */) {\n pad++;\n idx--;\n } else if (tailIsPct3D(idx)) {\n pad++;\n idx -= 3;\n }\n }\n\n if (pad === 1 && idx >= 0) {\n if (body.charCodeAt(idx) === 61 /* '=' */) {\n pad++;\n } else if (tailIsPct3D(idx)) {\n pad++;\n }\n }\n\n const groups = Math.floor(effectiveLen / 4);\n const bytes = groups * 3 - (pad || 0);\n return bytes > 0 ? bytes : 0;\n }\n\n // Compute UTF-8 byte length directly from UTF-16 code units without allocating\n // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).\n // Valid %XX triplets count as one decoded byte; this matches the bytes that\n // decodeURIComponent(body) would produce before Buffer re-encodes the string.\n let bytes = 0;\n for (let i = 0, len = body.length; i < len; i++) {\n const c = body.charCodeAt(i);\n if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n bytes += 1;\n i += 2;\n } else if (c < 0x80) {\n bytes += 1;\n } else if (c < 0x800) {\n bytes += 2;\n } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {\n const next = body.charCodeAt(i + 1);\n if (next >= 0xdc00 && next <= 0xdfff) {\n bytes += 4;\n i++;\n } else {\n bytes += 3;\n }\n } else {\n bytes += 3;\n }\n }\n return bytes;\n}\n"],"names":["isHexDigit","charCode","isPercentEncodedByte","str","i","len","estimateDataURLDecodedBytes","url","comma","meta","body","effectiveLen","a","b","pad","idx","tailIsPct3D","j","bytes","c","next"],"mappings":"AASA,MAAMA,IAAa,CAACC,MACjBA,KAAY,MAAMA,KAAY,MAC9BA,KAAY,MAAMA,KAAY,MAC9BA,KAAY,MAAMA,KAAY,KAE3BC,IAAuB,CAACC,GAAKC,GAAGC,MACpCD,IAAI,IAAIC,KAAOL,EAAWG,EAAI,WAAWC,IAAI,CAAC,CAAC,KAAKJ,EAAWG,EAAI,WAAWC,IAAI,CAAC,CAAC;AAEvE,SAASE,EAA4BC,GAAK;AAEvD,MADI,CAACA,KAAO,OAAOA,KAAQ,YACvB,CAACA,EAAI,WAAW,OAAO,EAAG,QAAO;AAErC,QAAMC,IAAQD,EAAI,QAAQ,GAAG;AAC7B,MAAIC,IAAQ,EAAG,QAAO;AAEtB,QAAMC,IAAOF,EAAI,MAAM,GAAGC,CAAK,GACzBE,IAAOH,EAAI,MAAMC,IAAQ,CAAC;AAGhC,MAFiB,WAAW,KAAKC,CAAI,GAEvB;AACZ,QAAIE,IAAeD,EAAK;AACxB,UAAML,IAAMK,EAAK;AAEjB,aAASN,IAAI,GAAGA,IAAIC,GAAKD;AACvB,UAAIM,EAAK,WAAWN,CAAC,MAAM,MAAgBA,IAAI,IAAIC,GAAK;AACtD,cAAMO,IAAIF,EAAK,WAAWN,IAAI,CAAC,GACzBS,IAAIH,EAAK,WAAWN,IAAI,CAAC;AAG/B,QAFcJ,EAAWY,CAAC,KAAKZ,EAAWa,CAAC,MAGzCF,KAAgB,GAChBP,KAAK;AAAA,MAET;AAGF,QAAIU,IAAM,GACNC,IAAMV,IAAM;AAEhB,UAAMW,IAAc,CAACC,MACnBA,KAAK,KACLP,EAAK,WAAWO,IAAI,CAAC,MAAM;AAAA,IAC3BP,EAAK,WAAWO,IAAI,CAAC,MAAM;AAAA,KAC1BP,EAAK,WAAWO,CAAC,MAAM,MAAMP,EAAK,WAAWO,CAAC,MAAM;AAEvD,IAAIF,KAAO,MACLL,EAAK,WAAWK,CAAG,MAAM,MAC3BD,KACAC,OACSC,EAAYD,CAAG,MACxBD,KACAC,KAAO,KAIPD,MAAQ,KAAKC,KAAO,MAClBL,EAAK,WAAWK,CAAG,MAAM,MAElBC,EAAYD,CAAG,MACxBD;AAKJ,UAAMI,IADS,KAAK,MAAMP,IAAe,CAAC,IACnB,KAAKG,KAAO;AACnC,WAAOI,IAAQ,IAAIA,IAAQ;AAAA,EAC7B;AAMA,MAAIA,IAAQ;AACZ,WAASd,IAAI,GAAGC,IAAMK,EAAK,QAAQN,IAAIC,GAAKD,KAAK;AAC/C,UAAMe,IAAIT,EAAK,WAAWN,CAAC;AAC3B,QAAIe,MAAM,MAAgBjB,EAAqBQ,GAAMN,GAAGC,CAAG;AACzD,MAAAa,KAAS,GACTd,KAAK;AAAA,aACIe,IAAI;AACb,MAAAD,KAAS;AAAA,aACAC,IAAI;AACb,MAAAD,KAAS;AAAA,aACAC,KAAK,SAAUA,KAAK,SAAUf,IAAI,IAAIC,GAAK;AACpD,YAAMe,IAAOV,EAAK,WAAWN,IAAI,CAAC;AAClC,MAAIgB,KAAQ,SAAUA,KAAQ,SAC5BF,KAAS,GACTd,OAEAc,KAAS;AAAA,IAEb;AACE,MAAAA,KAAS;AAAA,EAEb;AACA,SAAOA;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import t from "../utils.js";
|
|
2
|
+
import u from "../core/AxiosError.js";
|
|
3
|
+
import { DEFAULT_FORM_DATA_MAX_DEPTH as E } from "./toFormData.js";
|
|
4
|
+
const f = E;
|
|
5
|
+
function h(r) {
|
|
6
|
+
if (r > f)
|
|
7
|
+
throw new u(
|
|
8
|
+
"FormData field is too deeply nested (" + r + " levels). Max depth: " + f,
|
|
9
|
+
u.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
function _(r) {
|
|
13
|
+
const i = [], e = /\w+|\[(\w*)]/g;
|
|
14
|
+
let s;
|
|
15
|
+
for (; (s = e.exec(r)) !== null; )
|
|
16
|
+
h(i.length), i.push(s[0] === "[]" ? "" : s[1] || s[0]);
|
|
17
|
+
return i;
|
|
18
|
+
}
|
|
19
|
+
function m(r) {
|
|
20
|
+
const i = {}, e = Object.keys(r);
|
|
21
|
+
let s;
|
|
22
|
+
const n = e.length;
|
|
23
|
+
let c;
|
|
24
|
+
for (s = 0; s < n; s++)
|
|
25
|
+
c = e[s], i[c] = r[c];
|
|
26
|
+
return i;
|
|
27
|
+
}
|
|
28
|
+
function O(r) {
|
|
29
|
+
function i(e, s, n, c) {
|
|
30
|
+
h(c);
|
|
31
|
+
let o = e[c++];
|
|
32
|
+
if (o === "__proto__") return !0;
|
|
33
|
+
const l = Number.isFinite(+o), p = c >= e.length;
|
|
34
|
+
return o = !o && t.isArray(n) ? n.length : o, p ? (t.hasOwnProp(n, o) ? n[o] = t.isArray(n[o]) ? n[o].concat(s) : [n[o], s] : n[o] = s, !l) : ((!t.hasOwnProp(n, o) || !t.isObject(n[o])) && (n[o] = []), i(e, s, n[o], c) && t.isArray(n[o]) && (n[o] = m(n[o])), !l);
|
|
35
|
+
}
|
|
36
|
+
if (t.isFormData(r) && t.isFunction(r.entries)) {
|
|
37
|
+
const e = {};
|
|
38
|
+
return t.forEachEntry(r, (s, n) => {
|
|
39
|
+
i(_(s), n, e, 0);
|
|
40
|
+
}), e;
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
O as default
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=formDataToJSON.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formDataToJSON.js","sources":["../../../../../node_modules/axios/lib/helpers/formDataToJSON.js"],"sourcesContent":["'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport { DEFAULT_FORM_DATA_MAX_DEPTH } from './toFormData.js';\n\nconst MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;\n\nfunction throwIfDepthExceeded(index) {\n if (index > MAX_DEPTH) {\n throw new AxiosError(\n 'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH,\n AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n );\n }\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n const path = [];\n const pattern = /\\w+|\\[(\\w*)]/g;\n let match;\n\n while ((match = pattern.exec(name)) !== null) {\n throwIfDepthExceeded(path.length);\n path.push(match[0] === '[]' ? '' : match[1] || match[0]);\n }\n\n return path;\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n throwIfDepthExceeded(index);\n\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = utils.isArray(target[name])\n ? target[name].concat(value)\n : [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!utils.hasOwnProp(target, name) || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n"],"names":["MAX_DEPTH","DEFAULT_FORM_DATA_MAX_DEPTH","throwIfDepthExceeded","index","AxiosError","parsePropPath","name","path","pattern","match","arrayToObject","arr","obj","keys","i","len","key","formDataToJSON","formData","buildPath","value","target","isNumericKey","isLast","utils"],"mappings":";;;AAMA,MAAMA,IAAYC;AAElB,SAASC,EAAqBC,GAAO;AACnC,MAAIA,IAAQH;AACV,UAAM,IAAII;AAAA,MACR,0CAA0CD,IAAQ,0BAA0BH;AAAA,MAC5EI,EAAW;AAAA,IACjB;AAEA;AASA,SAASC,EAAcC,GAAM;AAK3B,QAAMC,IAAO,CAAA,GACPC,IAAU;AAChB,MAAIC;AAEJ,UAAQA,IAAQD,EAAQ,KAAKF,CAAI,OAAO;AACtC,IAAAJ,EAAqBK,EAAK,MAAM,GAChCA,EAAK,KAAKE,EAAM,CAAC,MAAM,OAAO,KAAKA,EAAM,CAAC,KAAKA,EAAM,CAAC,CAAC;AAGzD,SAAOF;AACT;AASA,SAASG,EAAcC,GAAK;AAC1B,QAAMC,IAAM,CAAA,GACNC,IAAO,OAAO,KAAKF,CAAG;AAC5B,MAAIG;AACJ,QAAMC,IAAMF,EAAK;AACjB,MAAIG;AACJ,OAAKF,IAAI,GAAGA,IAAIC,GAAKD;AACnB,IAAAE,IAAMH,EAAKC,CAAC,GACZF,EAAII,CAAG,IAAIL,EAAIK,CAAG;AAEpB,SAAOJ;AACT;AASA,SAASK,EAAeC,GAAU;AAChC,WAASC,EAAUZ,GAAMa,GAAOC,GAAQlB,GAAO;AAC7C,IAAAD,EAAqBC,CAAK;AAE1B,QAAIG,IAAOC,EAAKJ,GAAO;AAEvB,QAAIG,MAAS,YAAa,QAAO;AAEjC,UAAMgB,IAAe,OAAO,SAAS,CAAChB,CAAI,GACpCiB,IAASpB,KAASI,EAAK;AAG7B,WAFAD,IAAO,CAACA,KAAQkB,EAAM,QAAQH,CAAM,IAAIA,EAAO,SAASf,GAEpDiB,KACEC,EAAM,WAAWH,GAAQf,CAAI,IAC/Be,EAAOf,CAAI,IAAIkB,EAAM,QAAQH,EAAOf,CAAI,CAAC,IACrCe,EAAOf,CAAI,EAAE,OAAOc,CAAK,IACzB,CAACC,EAAOf,CAAI,GAAGc,CAAK,IAExBC,EAAOf,CAAI,IAAIc,GAGV,CAACE,OAGN,CAACE,EAAM,WAAWH,GAAQf,CAAI,KAAK,CAACkB,EAAM,SAASH,EAAOf,CAAI,CAAC,OACjEe,EAAOf,CAAI,IAAI,CAAA,IAGFa,EAAUZ,GAAMa,GAAOC,EAAOf,CAAI,GAAGH,CAAK,KAE3CqB,EAAM,QAAQH,EAAOf,CAAI,CAAC,MACtCe,EAAOf,CAAI,IAAII,EAAcW,EAAOf,CAAI,CAAC,IAGpC,CAACgB;AAAA,EACV;AAEA,MAAIE,EAAM,WAAWN,CAAQ,KAAKM,EAAM,WAAWN,EAAS,OAAO,GAAG;AACpE,UAAMN,IAAM,CAAA;AAEZ,WAAAY,EAAM,aAAaN,GAAU,CAACZ,GAAMc,MAAU;AAC5C,MAAAD,EAAUd,EAAcC,CAAI,GAAGc,GAAOR,GAAK,CAAC;AAAA,IAC9C,CAAC,GAEMA;AAAA,EACT;AAEA,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isAbsoluteURL.js","sources":["../../../../../node_modules/axios/lib/helpers/isAbsoluteURL.js"],"sourcesContent":["'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n if (typeof url !== 'string') {\n return false;\n }\n\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n"],"names":["isAbsoluteURL","url"],"mappings":"AASe,SAASA,EAAcC,GAAK;AAIzC,SAAI,OAAOA,KAAQ,WACV,KAGF,8BAA8B,KAAKA,CAAG;AAC/C;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isAxiosError.js","sources":["../../../../../node_modules/axios/lib/helpers/isAxiosError.js"],"sourcesContent":["'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && payload.isAxiosError === true;\n}\n"],"names":["isAxiosError","payload","utils"],"mappings":";AAWe,SAASA,EAAaC,GAAS;AAC5C,SAAOC,EAAM,SAASD,CAAO,KAAKA,EAAQ,iBAAiB;AAC7D;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import o from "../platform/index.js";
|
|
2
|
+
const n = o.hasStandardBrowserEnv ? /* @__PURE__ */ ((r, e) => (t) => (t = new URL(t, o.origin), r.protocol === t.protocol && r.host === t.host && (e || r.port === t.port)))(
|
|
3
|
+
new URL(o.origin),
|
|
4
|
+
o.navigator && /(msie|trident)/i.test(o.navigator.userAgent)
|
|
5
|
+
) : () => !0;
|
|
6
|
+
export {
|
|
7
|
+
n as default
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=isURLSameOrigin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isURLSameOrigin.js","sources":["../../../../../node_modules/axios/lib/helpers/isURLSameOrigin.js"],"sourcesContent":["import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n })(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n )\n : () => true;\n"],"names":["isURLSameOrigin","platform","origin","isMSIE","url"],"mappings":";AAEA,MAAAA,IAAeC,EAAS,wBACnB,kBAACC,GAAQC,MAAW,CAACC,OACpBA,IAAM,IAAI,IAAIA,GAAKH,EAAS,MAAM,GAGhCC,EAAO,aAAaE,EAAI,YACxBF,EAAO,SAASE,EAAI,SACnBD,KAAUD,EAAO,SAASE,EAAI;AAAA,EAGjC,IAAI,IAAIH,EAAS,MAAM;AAAA,EACvBA,EAAS,aAAa,kBAAkB,KAAKA,EAAS,UAAU,SAAS;AAC/E,IACI,MAAM;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"null.js","sources":["../../../../../node_modules/axios/lib/helpers/null.js"],"sourcesContent":["// eslint-disable-next-line strict\nexport default null;\n"],"names":["httpAdapter"],"mappings":"AACA,MAAAA,IAAe;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import n from "../utils.js";
|
|
2
|
+
const a = n.toObjectSet([
|
|
3
|
+
"age",
|
|
4
|
+
"authorization",
|
|
5
|
+
"content-length",
|
|
6
|
+
"content-type",
|
|
7
|
+
"etag",
|
|
8
|
+
"expires",
|
|
9
|
+
"from",
|
|
10
|
+
"host",
|
|
11
|
+
"if-modified-since",
|
|
12
|
+
"if-unmodified-since",
|
|
13
|
+
"last-modified",
|
|
14
|
+
"location",
|
|
15
|
+
"max-forwards",
|
|
16
|
+
"proxy-authorization",
|
|
17
|
+
"referer",
|
|
18
|
+
"retry-after",
|
|
19
|
+
"user-agent"
|
|
20
|
+
]), u = (s) => {
|
|
21
|
+
const t = {};
|
|
22
|
+
let e, r, i;
|
|
23
|
+
return s && s.split(`
|
|
24
|
+
`).forEach(function(o) {
|
|
25
|
+
i = o.indexOf(":"), e = o.substring(0, i).trim().toLowerCase(), r = o.substring(i + 1).trim(), !(!e || t[e] && a[e]) && (e === "set-cookie" ? t[e] ? t[e].push(r) : t[e] = [r] : t[e] = t[e] ? t[e] + ", " + r : r);
|
|
26
|
+
}), t;
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
u as default
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=parseHeaders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseHeaders.js","sources":["../../../../../node_modules/axios/lib/helpers/parseHeaders.js"],"sourcesContent":["'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age',\n 'authorization',\n 'content-length',\n 'content-type',\n 'etag',\n 'expires',\n 'from',\n 'host',\n 'if-modified-since',\n 'if-unmodified-since',\n 'last-modified',\n 'location',\n 'max-forwards',\n 'proxy-authorization',\n 'referer',\n 'retry-after',\n 'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders &&\n rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n"],"names":["ignoreDuplicateOf","utils","parseHeaders","rawHeaders","parsed","key","val","line"],"mappings":";AAMA,MAAMA,IAAoBC,EAAM,YAAY;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,GAgBDC,IAAe,CAACC,MAAe;AAC7B,QAAMC,IAAS,CAAA;AACf,MAAIC,GACAC,GACA;AAEJ,SAAAH,KACEA,EAAW,MAAM;AAAA,CAAI,EAAE,QAAQ,SAAgBI,GAAM;AAKnD,IAJA,IAAIA,EAAK,QAAQ,GAAG,GACpBF,IAAME,EAAK,UAAU,GAAG,CAAC,EAAE,KAAI,EAAG,YAAW,GAC7CD,IAAMC,EAAK,UAAU,IAAI,CAAC,EAAE,KAAI,GAE5B,GAACF,KAAQD,EAAOC,CAAG,KAAKL,EAAkBK,CAAG,OAI7CA,MAAQ,eACND,EAAOC,CAAG,IACZD,EAAOC,CAAG,EAAE,KAAKC,CAAG,IAEpBF,EAAOC,CAAG,IAAI,CAACC,CAAG,IAGpBF,EAAOC,CAAG,IAAID,EAAOC,CAAG,IAAID,EAAOC,CAAG,IAAI,OAAOC,IAAMA;AAAA,EAE3D,CAAC,GAEIF;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseProtocol.js","sources":["../../../../../node_modules/axios/lib/helpers/parseProtocol.js"],"sourcesContent":["'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25}):(?:\\/\\/)?/.exec(url);\n return (match && match[1]) || '';\n}\n"],"names":["parseProtocol","url","match"],"mappings":"AAEe,SAASA,EAAcC,GAAK;AACzC,QAAMC,IAAQ,4BAA4B,KAAKD,CAAG;AAClD,SAAQC,KAASA,EAAM,CAAC,KAAM;AAChC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import c from "./speedometer.js";
|
|
2
|
+
import i from "./throttle.js";
|
|
3
|
+
import f from "../utils.js";
|
|
4
|
+
const y = (t, o, d = 3) => {
|
|
5
|
+
let r = 0;
|
|
6
|
+
const m = c(50, 250);
|
|
7
|
+
return i((n) => {
|
|
8
|
+
if (!n || typeof n.loaded != "number")
|
|
9
|
+
return;
|
|
10
|
+
const l = n.loaded, e = n.lengthComputable ? n.total : void 0, s = e != null ? Math.min(l, e) : l, u = Math.max(0, s - r), a = m(u);
|
|
11
|
+
r = Math.max(r, s);
|
|
12
|
+
const p = {
|
|
13
|
+
loaded: s,
|
|
14
|
+
total: e,
|
|
15
|
+
progress: e ? s / e : void 0,
|
|
16
|
+
bytes: u,
|
|
17
|
+
rate: a || void 0,
|
|
18
|
+
estimated: a && e ? (e - s) / a : void 0,
|
|
19
|
+
event: n,
|
|
20
|
+
lengthComputable: e != null,
|
|
21
|
+
[o ? "download" : "upload"]: !0
|
|
22
|
+
};
|
|
23
|
+
t(p);
|
|
24
|
+
}, d);
|
|
25
|
+
}, v = (t, o) => {
|
|
26
|
+
const d = t != null;
|
|
27
|
+
return [
|
|
28
|
+
(r) => o[0]({
|
|
29
|
+
lengthComputable: d,
|
|
30
|
+
total: t,
|
|
31
|
+
loaded: r
|
|
32
|
+
}),
|
|
33
|
+
o[1]
|
|
34
|
+
];
|
|
35
|
+
}, x = (t) => (...o) => f.asap(() => t(...o));
|
|
36
|
+
export {
|
|
37
|
+
x as asyncDecorator,
|
|
38
|
+
v as progressEventDecorator,
|
|
39
|
+
y as progressEventReducer
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=progressEventReducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progressEventReducer.js","sources":["../../../../../node_modules/axios/lib/helpers/progressEventReducer.js"],"sourcesContent":["import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle((e) => {\n if (!e || typeof e.loaded !== 'number') {\n return;\n }\n const rawLoaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;\n const progressBytes = Math.max(0, loaded - bytesNotified);\n const rate = _speedometer(progressBytes);\n\n bytesNotified = Math.max(bytesNotified, loaded);\n\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true,\n };\n\n listener(data);\n }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [\n (loaded) =>\n throttled[0]({\n lengthComputable,\n total,\n loaded,\n }),\n throttled[1],\n ];\n};\n\nexport const asyncDecorator =\n (fn) =>\n (...args) =>\n utils.asap(() => fn(...args));\n"],"names":["progressEventReducer","listener","isDownloadStream","freq","bytesNotified","_speedometer","speedometer","throttle","e","rawLoaded","total","loaded","progressBytes","rate","data","progressEventDecorator","throttled","lengthComputable","asyncDecorator","fn","args","utils"],"mappings":";;;AAIY,MAACA,IAAuB,CAACC,GAAUC,GAAkBC,IAAO,MAAM;AAC5E,MAAIC,IAAgB;AACpB,QAAMC,IAAeC,EAAY,IAAI,GAAG;AAExC,SAAOC,EAAS,CAACC,MAAM;AACrB,QAAI,CAACA,KAAK,OAAOA,EAAE,UAAW;AAC5B;AAEF,UAAMC,IAAYD,EAAE,QACdE,IAAQF,EAAE,mBAAmBA,EAAE,QAAQ,QACvCG,IAASD,KAAS,OAAO,KAAK,IAAID,GAAWC,CAAK,IAAID,GACtDG,IAAgB,KAAK,IAAI,GAAGD,IAASP,CAAa,GAClDS,IAAOR,EAAaO,CAAa;AAEvC,IAAAR,IAAgB,KAAK,IAAIA,GAAeO,CAAM;AAE9C,UAAMG,IAAO;AAAA,MACX,QAAAH;AAAA,MACA,OAAAD;AAAA,MACA,UAAUA,IAAQC,IAASD,IAAQ;AAAA,MACnC,OAAOE;AAAA,MACP,MAAMC,KAAc;AAAA,MACpB,WAAWA,KAAQH,KAASA,IAAQC,KAAUE,IAAO;AAAA,MACrD,OAAOL;AAAA,MACP,kBAAkBE,KAAS;AAAA,MAC3B,CAACR,IAAmB,aAAa,QAAQ,GAAG;AAAA,IAClD;AAEI,IAAAD,EAASa,CAAI;AAAA,EACf,GAAGX,CAAI;AACT,GAEaY,IAAyB,CAACL,GAAOM,MAAc;AAC1D,QAAMC,IAAmBP,KAAS;AAElC,SAAO;AAAA,IACL,CAACC,MACCK,EAAU,CAAC,EAAE;AAAA,MACX,kBAAAC;AAAA,MACA,OAAAP;AAAA,MACA,QAAAC;AAAA,IACR,CAAO;AAAA,IACHK,EAAU,CAAC;AAAA,EACf;AACA,GAEaE,IACX,CAACC,MACD,IAAIC,MACFC,EAAM,KAAK,MAAMF,EAAG,GAAGC,CAAI,CAAC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import d from "../platform/index.js";
|
|
2
|
+
import a from "../utils.js";
|
|
3
|
+
import u from "../core/AxiosError.js";
|
|
4
|
+
import R from "./isURLSameOrigin.js";
|
|
5
|
+
import F from "./cookies.js";
|
|
6
|
+
import g from "../core/buildFullPath.js";
|
|
7
|
+
import A from "../core/mergeConfig.js";
|
|
8
|
+
import C from "../core/AxiosHeaders.js";
|
|
9
|
+
import E from "./buildURL.js";
|
|
10
|
+
const b = ["content-type", "content-length"];
|
|
11
|
+
function U(r, o, e) {
|
|
12
|
+
if (e !== "content-only") {
|
|
13
|
+
r.set(o);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
Object.entries(o || {}).forEach(([t, s]) => {
|
|
17
|
+
b.includes(t.toLowerCase()) && r.set(t, s);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
const x = (r) => encodeURIComponent(r).replace(
|
|
21
|
+
/%([0-9A-F]{2})/gi,
|
|
22
|
+
(o, e) => String.fromCharCode(parseInt(e, 16))
|
|
23
|
+
);
|
|
24
|
+
function B(r) {
|
|
25
|
+
const o = A({}, r), e = (i) => a.hasOwnProp(o, i) ? o[i] : void 0, t = e("data");
|
|
26
|
+
let s = e("withXSRFToken");
|
|
27
|
+
const l = e("xsrfHeaderName"), c = e("xsrfCookieName");
|
|
28
|
+
let n = e("headers");
|
|
29
|
+
const m = e("auth"), p = e("baseURL"), h = e("allowAbsoluteUrls"), S = e("url");
|
|
30
|
+
if (o.headers = n = C.from(n), o.url = E(
|
|
31
|
+
g(p, S, h, o),
|
|
32
|
+
e("params"),
|
|
33
|
+
e("paramsSerializer")
|
|
34
|
+
), m) {
|
|
35
|
+
const i = a.getSafeProp(m, "username") || "", f = a.getSafeProp(m, "password") || "";
|
|
36
|
+
try {
|
|
37
|
+
n.set(
|
|
38
|
+
"Authorization",
|
|
39
|
+
"Basic " + btoa(i + ":" + (f ? x(f) : ""))
|
|
40
|
+
);
|
|
41
|
+
} catch (w) {
|
|
42
|
+
throw u.from(w, u.ERR_BAD_OPTION_VALUE, r);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (a.isFormData(t) && (d.hasStandardBrowserEnv || d.hasStandardBrowserWebWorkerEnv || a.isReactNative(t) ? n.setContentType(void 0) : a.isFunction(t.getHeaders) && U(n, t.getHeaders(), e("formDataHeaderPolicy"))), d.hasStandardBrowserEnv && (a.isFunction(s) && (s = s(o)), s === !0 || s == null && R(o.url))) {
|
|
46
|
+
const f = l && c && F.read(c);
|
|
47
|
+
f && n.set(l, f);
|
|
48
|
+
}
|
|
49
|
+
return o;
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
B as default
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=resolveConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveConfig.js","sources":["../../../../../node_modules/axios/lib/helpers/resolveConfig.js"],"sourcesContent":["import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport buildURL from './buildURL.js';\n\nconst FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];\n\nfunction setFormDataHeaders(headers, formHeaders, policy) {\n if (policy !== 'content-only') {\n headers.set(formHeaders);\n return;\n }\n\n Object.entries(formHeaders || {}).forEach(([key, val]) => {\n if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {\n headers.set(key, val);\n }\n });\n}\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n String.fromCharCode(parseInt(hex, 16))\n );\n\nfunction resolveConfig(config) {\n const newConfig = mergeConfig({}, config);\n\n // Read only own properties to prevent prototype pollution gadgets\n // (e.g. Object.prototype.baseURL = 'https://evil.com').\n const own = (key) => (utils.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);\n\n const data = own('data');\n let withXSRFToken = own('withXSRFToken');\n const xsrfHeaderName = own('xsrfHeaderName');\n const xsrfCookieName = own('xsrfCookieName');\n let headers = own('headers');\n const auth = own('auth');\n const baseURL = own('baseURL');\n const allowAbsoluteUrls = own('allowAbsoluteUrls');\n const url = own('url');\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(\n buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig),\n own('params'),\n own('paramsSerializer')\n );\n\n // HTTP basic authentication\n if (auth) {\n const username = utils.getSafeProp(auth, 'username') || '';\n const password = utils.getSafeProp(auth, 'password') || '';\n\n try {\n headers.set(\n 'Authorization',\n 'Basic ' + btoa(username + ':' + (password ? encodeUTF8(password) : ''))\n );\n } catch (e) {\n throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);\n }\n }\n\n if (utils.isFormData(data)) {\n if (\n platform.hasStandardBrowserEnv ||\n platform.hasStandardBrowserWebWorkerEnv ||\n utils.isReactNative(data)\n ) {\n headers.setContentType(undefined); // browser/web worker/RN handles it\n } else if (utils.isFunction(data.getHeaders)) {\n // Node.js FormData (like form-data package)\n setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n if (utils.isFunction(withXSRFToken)) {\n withXSRFToken = withXSRFToken(newConfig);\n }\n\n // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)\n // and misconfigurations (e.g. \"false\") from short-circuiting the same-origin check and leaking\n // the XSRF token cross-origin.\n const shouldSendXSRF =\n withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url));\n\n if (shouldSendXSRF) {\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\nexport default resolveConfig;\n"],"names":["FORM_DATA_CONTENT_HEADERS","setFormDataHeaders","headers","formHeaders","policy","key","val","encodeUTF8","str","_","hex","resolveConfig","config","newConfig","mergeConfig","own","utils","data","withXSRFToken","xsrfHeaderName","xsrfCookieName","auth","baseURL","allowAbsoluteUrls","url","AxiosHeaders","buildURL","buildFullPath","username","password","e","AxiosError","platform","isURLSameOrigin","xsrfValue","cookies"],"mappings":";;;;;;;;;AAUA,MAAMA,IAA4B,CAAC,gBAAgB,gBAAgB;AAEnE,SAASC,EAAmBC,GAASC,GAAaC,GAAQ;AACxD,MAAIA,MAAW,gBAAgB;AAC7B,IAAAF,EAAQ,IAAIC,CAAW;AACvB;AAAA,EACF;AAEA,SAAO,QAAQA,KAAe,CAAA,CAAE,EAAE,QAAQ,CAAC,CAACE,GAAKC,CAAG,MAAM;AACxD,IAAIN,EAA0B,SAASK,EAAI,YAAW,CAAE,KACtDH,EAAQ,IAAIG,GAAKC,CAAG;AAAA,EAExB,CAAC;AACH;AAUA,MAAMC,IAAa,CAACC,MAClB,mBAAmBA,CAAG,EAAE;AAAA,EAAQ;AAAA,EAAoB,CAACC,GAAGC,MACtD,OAAO,aAAa,SAASA,GAAK,EAAE,CAAC;AACzC;AAEA,SAASC,EAAcC,GAAQ;AAC7B,QAAMC,IAAYC,EAAY,CAAA,GAAIF,CAAM,GAIlCG,IAAM,CAACV,MAASW,EAAM,WAAWH,GAAWR,CAAG,IAAIQ,EAAUR,CAAG,IAAI,QAEpEY,IAAOF,EAAI,MAAM;AACvB,MAAIG,IAAgBH,EAAI,eAAe;AACvC,QAAMI,IAAiBJ,EAAI,gBAAgB,GACrCK,IAAiBL,EAAI,gBAAgB;AAC3C,MAAIb,IAAUa,EAAI,SAAS;AAC3B,QAAMM,IAAON,EAAI,MAAM,GACjBO,IAAUP,EAAI,SAAS,GACvBQ,IAAoBR,EAAI,mBAAmB,GAC3CS,IAAMT,EAAI,KAAK;AAWrB,MATAF,EAAU,UAAUX,IAAUuB,EAAa,KAAKvB,CAAO,GAEvDW,EAAU,MAAMa;AAAA,IACdC,EAAcL,GAASE,GAAKD,GAAmBV,CAAS;AAAA,IACxDE,EAAI,QAAQ;AAAA,IACZA,EAAI,kBAAkB;AAAA,EAC1B,GAGMM,GAAM;AACR,UAAMO,IAAWZ,EAAM,YAAYK,GAAM,UAAU,KAAK,IAClDQ,IAAWb,EAAM,YAAYK,GAAM,UAAU,KAAK;AAExD,QAAI;AACF,MAAAnB,EAAQ;AAAA,QACN;AAAA,QACA,WAAW,KAAK0B,IAAW,OAAOC,IAAWtB,EAAWsB,CAAQ,IAAI,GAAG;AAAA,MAC/E;AAAA,IACI,SAASC,GAAG;AACV,YAAMC,EAAW,KAAKD,GAAGC,EAAW,sBAAsBnB,CAAM;AAAA,IAClE;AAAA,EACF;AAmBA,MAjBII,EAAM,WAAWC,CAAI,MAErBe,EAAS,yBACTA,EAAS,kCACThB,EAAM,cAAcC,CAAI,IAExBf,EAAQ,eAAe,MAAS,IACvBc,EAAM,WAAWC,EAAK,UAAU,KAEzChB,EAAmBC,GAASe,EAAK,WAAU,GAAIF,EAAI,sBAAsB,CAAC,IAQ1EiB,EAAS,0BACPhB,EAAM,WAAWE,CAAa,MAChCA,IAAgBA,EAAcL,CAAS,IAOvCK,MAAkB,MAASA,KAAiB,QAAQe,EAAgBpB,EAAU,GAAG,IAE/D;AAClB,UAAMqB,IAAYf,KAAkBC,KAAkBe,EAAQ,KAAKf,CAAc;AAEjF,IAAIc,KACFhC,EAAQ,IAAIiB,GAAgBe,CAAS;AAAA,EAEzC;AAGF,SAAOrB;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import o from "../utils.js";
|
|
2
|
+
function c(e) {
|
|
3
|
+
let t = 0, n = e.length;
|
|
4
|
+
for (; t < n; ) {
|
|
5
|
+
const r = e.charCodeAt(t);
|
|
6
|
+
if (r !== 9 && r !== 32)
|
|
7
|
+
break;
|
|
8
|
+
t += 1;
|
|
9
|
+
}
|
|
10
|
+
for (; n > t; ) {
|
|
11
|
+
const r = e.charCodeAt(n - 1);
|
|
12
|
+
if (r !== 9 && r !== 32)
|
|
13
|
+
break;
|
|
14
|
+
n -= 1;
|
|
15
|
+
}
|
|
16
|
+
return t === 0 && n === e.length ? e : e.slice(t, n);
|
|
17
|
+
}
|
|
18
|
+
const u = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), a = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
19
|
+
function i(e, t) {
|
|
20
|
+
return o.isArray(e) ? e.map((n) => i(n, t)) : c(String(e).replace(t, ""));
|
|
21
|
+
}
|
|
22
|
+
const l = (e) => i(e, u), f = (e) => i(e, a);
|
|
23
|
+
function E(e) {
|
|
24
|
+
const t = /* @__PURE__ */ Object.create(null);
|
|
25
|
+
return o.forEach(e.toJSON(), (n, r) => {
|
|
26
|
+
t[r] = f(n);
|
|
27
|
+
}), t;
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
f as sanitizeByteStringHeaderValue,
|
|
31
|
+
l as sanitizeHeaderValue,
|
|
32
|
+
E as toByteStringHeaderObject
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=sanitizeHeaderValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitizeHeaderValue.js","sources":["../../../../../node_modules/axios/lib/helpers/sanitizeHeaderValue.js"],"sourcesContent":["'use strict';\n\nimport utils from '../utils.js';\n\nfunction trimSPorHTAB(str) {\n let start = 0;\n let end = str.length;\n\n while (start < end) {\n const code = str.charCodeAt(start);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n start += 1;\n }\n\n while (end > start) {\n const code = str.charCodeAt(end - 1);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n end -= 1;\n }\n\n return start === 0 && end === str.length ? str : str.slice(start, end);\n}\n\n// The control-code ranges are intentional: header sanitization strips C0/DEL bytes.\n// eslint-disable-next-line no-control-regex\nconst INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\\\u0000-\\\\u0008\\\\u000a-\\\\u001f\\\\u007f]+', 'g');\n// eslint-disable-next-line no-control-regex\nconst INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\\\u0009\\\\u0020-\\\\u007e\\\\u0080-\\\\u00ff]+', 'g');\n\nfunction sanitizeValue(value, invalidChars) {\n if (utils.isArray(value)) {\n return value.map((item) => sanitizeValue(item, invalidChars));\n }\n\n return trimSPorHTAB(String(value).replace(invalidChars, ''));\n}\n\nexport const sanitizeHeaderValue = (value) =>\n sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);\n\nexport const sanitizeByteStringHeaderValue = (value) =>\n sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);\n\nexport function toByteStringHeaderObject(headers) {\n const byteStringHeaders = Object.create(null);\n\n utils.forEach(headers.toJSON(), (value, header) => {\n byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);\n });\n\n return byteStringHeaders;\n}\n"],"names":["trimSPorHTAB","str","start","end","code","INVALID_UNICODE_HEADER_VALUE_CHARS","INVALID_BYTE_STRING_HEADER_VALUE_CHARS","sanitizeValue","value","invalidChars","utils","item","sanitizeHeaderValue","sanitizeByteStringHeaderValue","toByteStringHeaderObject","headers","byteStringHeaders","header"],"mappings":";AAIA,SAASA,EAAaC,GAAK;AACzB,MAAIC,IAAQ,GACRC,IAAMF,EAAI;AAEd,SAAOC,IAAQC,KAAK;AAClB,UAAMC,IAAOH,EAAI,WAAWC,CAAK;AAEjC,QAAIE,MAAS,KAAQA,MAAS;AAC5B;AAGF,IAAAF,KAAS;AAAA,EACX;AAEA,SAAOC,IAAMD,KAAO;AAClB,UAAME,IAAOH,EAAI,WAAWE,IAAM,CAAC;AAEnC,QAAIC,MAAS,KAAQA,MAAS;AAC5B;AAGF,IAAAD,KAAO;AAAA,EACT;AAEA,SAAOD,MAAU,KAAKC,MAAQF,EAAI,SAASA,IAAMA,EAAI,MAAMC,GAAOC,CAAG;AACvE;AAIA,MAAME,IAAqC,IAAI,OAAO,4CAA4C,GAAG,GAE/FC,IAAyC,IAAI,OAAO,6CAA6C,GAAG;AAE1G,SAASC,EAAcC,GAAOC,GAAc;AAC1C,SAAIC,EAAM,QAAQF,CAAK,IACdA,EAAM,IAAI,CAACG,MAASJ,EAAcI,GAAMF,CAAY,CAAC,IAGvDT,EAAa,OAAOQ,CAAK,EAAE,QAAQC,GAAc,EAAE,CAAC;AAC7D;AAEY,MAACG,IAAsB,CAACJ,MAClCD,EAAcC,GAAOH,CAAkC,GAE5CQ,IAAgC,CAACL,MAC5CD,EAAcC,GAAOF,CAAsC;AAEtD,SAASQ,EAAyBC,GAAS;AAChD,QAAMC,IAAoB,uBAAO,OAAO,IAAI;AAE5C,SAAAN,EAAM,QAAQK,EAAQ,OAAM,GAAI,CAACP,GAAOS,MAAW;AACjD,IAAAD,EAAkBC,CAAM,IAAIJ,EAA8BL,CAAK;AAAA,EACjE,CAAC,GAEMQ;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function y(t, n) {
|
|
2
|
+
t = t || 10;
|
|
3
|
+
const c = new Array(t), o = new Array(t);
|
|
4
|
+
let e = 0, r = 0, i;
|
|
5
|
+
return n = n !== void 0 ? n : 1e3, function(h) {
|
|
6
|
+
const d = Date.now(), a = o[r];
|
|
7
|
+
i || (i = d), c[e] = h, o[e] = d;
|
|
8
|
+
let f = r, u = 0;
|
|
9
|
+
for (; f !== e; )
|
|
10
|
+
u += c[f++], f = f % t;
|
|
11
|
+
if (e = (e + 1) % t, e === r && (r = (r + 1) % t), d - i < n)
|
|
12
|
+
return;
|
|
13
|
+
const w = a && d - a;
|
|
14
|
+
return w ? Math.round(u * 1e3 / w) : void 0;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
y as default
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=speedometer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speedometer.js","sources":["../../../../../node_modules/axios/lib/helpers/speedometer.js"],"sourcesContent":["'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n };\n}\n\nexport default speedometer;\n"],"names":["speedometer","samplesCount","min","bytes","timestamps","head","tail","firstSampleTS","chunkLength","now","startedAt","i","bytesCount","passed"],"mappings":"AAQA,SAASA,EAAYC,GAAcC,GAAK;AACtC,EAAAD,IAAeA,KAAgB;AAC/B,QAAME,IAAQ,IAAI,MAAMF,CAAY,GAC9BG,IAAa,IAAI,MAAMH,CAAY;AACzC,MAAII,IAAO,GACPC,IAAO,GACPC;AAEJ,SAAAL,IAAMA,MAAQ,SAAYA,IAAM,KAEzB,SAAcM,GAAa;AAChC,UAAMC,IAAM,KAAK,IAAG,GAEdC,IAAYN,EAAWE,CAAI;AAEjC,IAAKC,MACHA,IAAgBE,IAGlBN,EAAME,CAAI,IAAIG,GACdJ,EAAWC,CAAI,IAAII;AAEnB,QAAIE,IAAIL,GACJM,IAAa;AAEjB,WAAOD,MAAMN;AACX,MAAAO,KAAcT,EAAMQ,GAAG,GACvBA,IAAIA,IAAIV;AASV,QANAI,KAAQA,IAAO,KAAKJ,GAEhBI,MAASC,MACXA,KAAQA,IAAO,KAAKL,IAGlBQ,IAAMF,IAAgBL;AACxB;AAGF,UAAMW,IAASH,KAAaD,IAAMC;AAElC,WAAOG,IAAS,KAAK,MAAOD,IAAa,MAAQC,CAAM,IAAI;AAAA,EAC7D;AACF;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spread.js","sources":["../../../../../node_modules/axios/lib/helpers/spread.js"],"sourcesContent":["'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * const args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n"],"names":["spread","callback","arr"],"mappings":"AAuBe,SAASA,EAAOC,GAAU;AACvC,SAAO,SAAcC,GAAK;AACxB,WAAOD,EAAS,MAAM,MAAMC,CAAG;AAAA,EACjC;AACF;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function h(r, a) {
|
|
2
|
+
let s = 0, u = 1e3 / a, e, t;
|
|
3
|
+
const n = (l, o = Date.now()) => {
|
|
4
|
+
s = o, e = null, t && (clearTimeout(t), t = null), r(...l);
|
|
5
|
+
};
|
|
6
|
+
return [(...l) => {
|
|
7
|
+
const o = Date.now(), i = o - s;
|
|
8
|
+
i >= u ? n(l, o) : (e = l, t || (t = setTimeout(() => {
|
|
9
|
+
t = null, n(e);
|
|
10
|
+
}, u - i)));
|
|
11
|
+
}, () => e && n(e)];
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
h as default
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=throttle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throttle.js","sources":["../../../../../node_modules/axios/lib/helpers/throttle.js"],"sourcesContent":["/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn(...args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if (passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n"],"names":["throttle","fn","freq","timestamp","threshold","lastArgs","timer","invoke","args","now","passed"],"mappings":"AAMA,SAASA,EAASC,GAAIC,GAAM;AAC1B,MAAIC,IAAY,GACZC,IAAY,MAAOF,GACnBG,GACAC;AAEJ,QAAMC,IAAS,CAACC,GAAMC,IAAM,KAAK,IAAG,MAAO;AACzC,IAAAN,IAAYM,GACZJ,IAAW,MACPC,MACF,aAAaA,CAAK,GAClBA,IAAQ,OAEVL,EAAG,GAAGO,CAAI;AAAA,EACZ;AAoBA,SAAO,CAlBW,IAAIA,MAAS;AAC7B,UAAMC,IAAM,KAAK,IAAG,GACdC,IAASD,IAAMN;AACrB,IAAIO,KAAUN,IACZG,EAAOC,GAAMC,CAAG,KAEhBJ,IAAWG,GACNF,MACHA,IAAQ,WAAW,MAAM;AACvB,MAAAA,IAAQ,MACRC,EAAOF,CAAQ;AAAA,IACjB,GAAGD,IAAYM,CAAM;AAAA,EAG3B,GAEc,MAAML,KAAYE,EAAOF,CAAQ,CAEvB;AAC1B;","x_google_ignoreList":[0]}
|