x-essential-lib 0.10.1 → 0.10.2
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/i18n-en.nsm1ldfp.js +113 -0
- package/dist/i18n-zhHans.do0bpr19.js +113 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1552 -1
- package/dist/rolldown-runtime.c6i0pdwe.js +18 -0
- package/dist/vendor.homyhtbu.js +751 -0
- package/package.json +3 -2
- package/dist/i18n-en.f0pmulir.js +0 -1
- package/dist/i18n-zhHans.ex0oq1u6.js +0 -1
- package/dist/rolldown-runtime.mam1o4z7.js +0 -1
- package/dist/style.css +0 -1
- package/dist/vendor.kktsxo4w.js +0 -3
|
@@ -0,0 +1,751 @@
|
|
|
1
|
+
import { Fragment, computed, defineComponent, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isRef, onBeforeMount, onBeforeUnmount, onMounted, provide, ref, shallowRef, toValue, unref, watch, watchEffect } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.38_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
4
|
+
const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
/**
|
|
6
|
+
* On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* injectLocal('MyInjectionKey', 1)
|
|
11
|
+
* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @__NO_SIDE_EFFECTS__
|
|
15
|
+
*/
|
|
16
|
+
const injectLocal = (...args) => {
|
|
17
|
+
var _getCurrentInstance;
|
|
18
|
+
const key = args[0];
|
|
19
|
+
const instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;
|
|
20
|
+
const owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();
|
|
21
|
+
if (owner == null && !hasInjectionContext()) throw new Error("injectLocal must be called in setup");
|
|
22
|
+
if (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];
|
|
23
|
+
return inject(...args);
|
|
24
|
+
};
|
|
25
|
+
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
26
|
+
const isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
27
|
+
const toString$1 = Object.prototype.toString;
|
|
28
|
+
const isObject = (val) => toString$1.call(val) === "[object Object]";
|
|
29
|
+
/**
|
|
30
|
+
* Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client
|
|
31
|
+
*/
|
|
32
|
+
function pxValue(px) {
|
|
33
|
+
return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
|
|
34
|
+
}
|
|
35
|
+
function toArray(value) {
|
|
36
|
+
return Array.isArray(value) ? value : [value];
|
|
37
|
+
}
|
|
38
|
+
function cacheStringFunction(fn) {
|
|
39
|
+
const cache = Object.create(null);
|
|
40
|
+
return ((str) => {
|
|
41
|
+
return cache[str] || (cache[str] = fn(str));
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const hyphenateRE = /\B([A-Z])/g;
|
|
45
|
+
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
46
|
+
const camelizeRE = /-(\w)/g;
|
|
47
|
+
const camelize = cacheStringFunction((str) => {
|
|
48
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* Shorthand for watching value with {immediate: true}
|
|
52
|
+
*
|
|
53
|
+
* @see https://vueuse.org/watchImmediate
|
|
54
|
+
*/
|
|
55
|
+
function watchImmediate(source, cb, options) {
|
|
56
|
+
return watch(source, cb, {
|
|
57
|
+
...options,
|
|
58
|
+
immediate: true
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.38_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
64
|
+
const defaultWindow = isClient ? window : void 0;
|
|
65
|
+
const defaultDocument = isClient ? window.document : void 0;
|
|
66
|
+
const defaultNavigator = isClient ? window.navigator : void 0;
|
|
67
|
+
const defaultLocation = isClient ? window.location : void 0;
|
|
68
|
+
/**
|
|
69
|
+
* Get the dom element of a ref of element or Vue component instance
|
|
70
|
+
*
|
|
71
|
+
* @param elRef
|
|
72
|
+
*/
|
|
73
|
+
function unrefElement(elRef) {
|
|
74
|
+
var _$el;
|
|
75
|
+
const plain = toValue(elRef);
|
|
76
|
+
return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
|
|
77
|
+
}
|
|
78
|
+
function useEventListener(...args) {
|
|
79
|
+
const register = (el, event, listener, options) => {
|
|
80
|
+
el.addEventListener(event, listener, options);
|
|
81
|
+
return () => el.removeEventListener(event, listener, options);
|
|
82
|
+
};
|
|
83
|
+
const firstParamTargets = computed(() => {
|
|
84
|
+
const test = toArray(toValue(args[0])).filter((e) => e != null);
|
|
85
|
+
return test.every((e) => typeof e !== "string") ? test : void 0;
|
|
86
|
+
});
|
|
87
|
+
return watchImmediate(() => {
|
|
88
|
+
var _firstParamTargets$va, _firstParamTargets$va2;
|
|
89
|
+
return [
|
|
90
|
+
(_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
|
|
91
|
+
toArray(toValue(firstParamTargets.value ? args[1] : args[0])),
|
|
92
|
+
toArray(unref(firstParamTargets.value ? args[2] : args[1])),
|
|
93
|
+
toValue(firstParamTargets.value ? args[3] : args[2])
|
|
94
|
+
];
|
|
95
|
+
}, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
|
|
96
|
+
if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
|
|
97
|
+
const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
|
|
98
|
+
const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
|
|
99
|
+
onCleanup(() => {
|
|
100
|
+
cleanups.forEach((fn) => fn());
|
|
101
|
+
});
|
|
102
|
+
}, { flush: "post" });
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Mounted state in ref.
|
|
106
|
+
*
|
|
107
|
+
* @see https://vueuse.org/useMounted
|
|
108
|
+
*
|
|
109
|
+
* @__NO_SIDE_EFFECTS__
|
|
110
|
+
*/
|
|
111
|
+
function useMounted() {
|
|
112
|
+
const isMounted = shallowRef(false);
|
|
113
|
+
const instance = getCurrentInstance();
|
|
114
|
+
if (instance) onMounted(() => {
|
|
115
|
+
isMounted.value = true;
|
|
116
|
+
}, instance);
|
|
117
|
+
return isMounted;
|
|
118
|
+
}
|
|
119
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
120
|
+
function useSupported(callback) {
|
|
121
|
+
const isMounted = useMounted();
|
|
122
|
+
return computed(() => {
|
|
123
|
+
isMounted.value;
|
|
124
|
+
return Boolean(callback());
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
const ssrWidthSymbol = Symbol("vueuse-ssr-width");
|
|
128
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
129
|
+
function useSSRWidth() {
|
|
130
|
+
const ssrWidth = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;
|
|
131
|
+
return typeof ssrWidth === "number" ? ssrWidth : void 0;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Reactive Media Query.
|
|
135
|
+
*
|
|
136
|
+
* @see https://vueuse.org/useMediaQuery
|
|
137
|
+
* @param query
|
|
138
|
+
* @param options
|
|
139
|
+
*/
|
|
140
|
+
function useMediaQuery(query, options = {}) {
|
|
141
|
+
const { window = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
|
|
142
|
+
const isSupported = /* @__PURE__ */ useSupported(() => window && "matchMedia" in window && typeof window.matchMedia === "function");
|
|
143
|
+
const ssrSupport = shallowRef(typeof ssrWidth === "number");
|
|
144
|
+
const mediaQuery = shallowRef();
|
|
145
|
+
const matches = shallowRef(false);
|
|
146
|
+
const handler = (event) => {
|
|
147
|
+
matches.value = event.matches;
|
|
148
|
+
};
|
|
149
|
+
watchEffect(() => {
|
|
150
|
+
if (ssrSupport.value) {
|
|
151
|
+
ssrSupport.value = !isSupported.value;
|
|
152
|
+
matches.value = toValue(query).split(",").some((queryString) => {
|
|
153
|
+
const not = queryString.includes("not all");
|
|
154
|
+
const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
155
|
+
const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
|
|
156
|
+
let res = Boolean(minWidth || maxWidth);
|
|
157
|
+
if (minWidth && res) res = ssrWidth >= pxValue(minWidth[1]);
|
|
158
|
+
if (maxWidth && res) res = ssrWidth <= pxValue(maxWidth[1]);
|
|
159
|
+
return not ? !res : res;
|
|
160
|
+
});
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (!isSupported.value) return;
|
|
164
|
+
mediaQuery.value = window.matchMedia(toValue(query));
|
|
165
|
+
matches.value = mediaQuery.value.matches;
|
|
166
|
+
});
|
|
167
|
+
useEventListener(mediaQuery, "change", handler, { passive: true });
|
|
168
|
+
return computed(() => matches.value);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Reactive dark theme preference.
|
|
172
|
+
*
|
|
173
|
+
* @see https://vueuse.org/usePreferredDark
|
|
174
|
+
* @param [options]
|
|
175
|
+
*
|
|
176
|
+
* @__NO_SIDE_EFFECTS__
|
|
177
|
+
*/
|
|
178
|
+
function usePreferredDark(options) {
|
|
179
|
+
return useMediaQuery("(prefers-color-scheme: dark)", options);
|
|
180
|
+
}
|
|
181
|
+
const DEFAULT_UNITS = [
|
|
182
|
+
{
|
|
183
|
+
max: 6e4,
|
|
184
|
+
value: 1e3,
|
|
185
|
+
name: "second"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
max: 276e4,
|
|
189
|
+
value: 6e4,
|
|
190
|
+
name: "minute"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
max: 72e6,
|
|
194
|
+
value: 36e5,
|
|
195
|
+
name: "hour"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
max: 5184e5,
|
|
199
|
+
value: 864e5,
|
|
200
|
+
name: "day"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
max: 24192e5,
|
|
204
|
+
value: 6048e5,
|
|
205
|
+
name: "week"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
max: 28512e6,
|
|
209
|
+
value: 2592e6,
|
|
210
|
+
name: "month"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
max: Number.POSITIVE_INFINITY,
|
|
214
|
+
value: 31536e6,
|
|
215
|
+
name: "year"
|
|
216
|
+
}
|
|
217
|
+
];
|
|
218
|
+
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region node_modules/.pnpm/js-cookie@3.0.8/node_modules/js-cookie/dist/js.cookie.mjs
|
|
221
|
+
/*! js-cookie v3.0.8 | MIT */
|
|
222
|
+
function assign(target) {
|
|
223
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
224
|
+
var source = arguments[i];
|
|
225
|
+
for (var key in source) {
|
|
226
|
+
if (key === "__proto__") continue;
|
|
227
|
+
target[key] = source[key];
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return target;
|
|
231
|
+
}
|
|
232
|
+
var defaultConverter = {
|
|
233
|
+
read: function(value) {
|
|
234
|
+
if (value[0] === "\"") value = value.slice(1, -1);
|
|
235
|
+
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
236
|
+
},
|
|
237
|
+
write: function(value) {
|
|
238
|
+
return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
function init(converter, defaultAttributes) {
|
|
242
|
+
function set(name, value, attributes) {
|
|
243
|
+
if (typeof document === "undefined") return;
|
|
244
|
+
attributes = assign({}, defaultAttributes, attributes);
|
|
245
|
+
if (typeof attributes.expires === "number") attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
|
246
|
+
if (attributes.expires) attributes.expires = attributes.expires.toUTCString();
|
|
247
|
+
name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
248
|
+
var stringifiedAttributes = "";
|
|
249
|
+
for (var attributeName in attributes) {
|
|
250
|
+
if (!attributes[attributeName]) continue;
|
|
251
|
+
stringifiedAttributes += "; " + attributeName;
|
|
252
|
+
if (attributes[attributeName] === true) continue;
|
|
253
|
+
stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
|
|
254
|
+
}
|
|
255
|
+
return document.cookie = name + "=" + converter.write(value, name) + stringifiedAttributes;
|
|
256
|
+
}
|
|
257
|
+
function get(name) {
|
|
258
|
+
if (typeof document === "undefined" || arguments.length && !name) return;
|
|
259
|
+
var cookies = document.cookie ? document.cookie.split("; ") : [];
|
|
260
|
+
var jar = {};
|
|
261
|
+
for (var i = 0; i < cookies.length; i++) {
|
|
262
|
+
var parts = cookies[i].split("=");
|
|
263
|
+
var value = parts.slice(1).join("=");
|
|
264
|
+
try {
|
|
265
|
+
var found = decodeURIComponent(parts[0]);
|
|
266
|
+
if (!(found in jar)) jar[found] = converter.read(value, found);
|
|
267
|
+
if (name === found) break;
|
|
268
|
+
} catch (_e) {}
|
|
269
|
+
}
|
|
270
|
+
return name ? jar[name] : jar;
|
|
271
|
+
}
|
|
272
|
+
return Object.create({
|
|
273
|
+
set,
|
|
274
|
+
get,
|
|
275
|
+
remove: function(name, attributes) {
|
|
276
|
+
set(name, "", assign({}, attributes, { expires: -1 }));
|
|
277
|
+
},
|
|
278
|
+
withAttributes: function(attributes) {
|
|
279
|
+
return init(this.converter, assign({}, this.attributes, attributes));
|
|
280
|
+
},
|
|
281
|
+
withConverter: function(converter) {
|
|
282
|
+
return init(assign({}, this.converter, converter), this.attributes);
|
|
283
|
+
}
|
|
284
|
+
}, {
|
|
285
|
+
attributes: { value: Object.freeze(defaultAttributes) },
|
|
286
|
+
converter: { value: Object.freeze(converter) }
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
var api = init(defaultConverter, { path: "/" });
|
|
290
|
+
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/dist/mitt.mjs
|
|
293
|
+
function mitt_default(n) {
|
|
294
|
+
return {
|
|
295
|
+
all: n = n || /* @__PURE__ */ new Map(),
|
|
296
|
+
on: function(t, e) {
|
|
297
|
+
var i = n.get(t);
|
|
298
|
+
i ? i.push(e) : n.set(t, [e]);
|
|
299
|
+
},
|
|
300
|
+
off: function(t, e) {
|
|
301
|
+
var i = n.get(t);
|
|
302
|
+
i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
|
|
303
|
+
},
|
|
304
|
+
emit: function(t, e) {
|
|
305
|
+
var i = n.get(t);
|
|
306
|
+
i && i.slice().map(function(n) {
|
|
307
|
+
n(e);
|
|
308
|
+
}), (i = n.get("*")) && i.slice().map(function(n) {
|
|
309
|
+
n(t, e);
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js
|
|
317
|
+
/** Detect free variable `global` from Node.js. */
|
|
318
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
319
|
+
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_root.js
|
|
322
|
+
/** Detect free variable `self`. */
|
|
323
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
324
|
+
/** Used as a reference to the global object. */
|
|
325
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
326
|
+
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js
|
|
329
|
+
/** Built-in value references. */
|
|
330
|
+
var Symbol$1 = root.Symbol;
|
|
331
|
+
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js
|
|
334
|
+
/**
|
|
335
|
+
* A specialized version of `_.map` for arrays without support for iteratee
|
|
336
|
+
* shorthands.
|
|
337
|
+
*
|
|
338
|
+
* @private
|
|
339
|
+
* @param {Array} [array] The array to iterate over.
|
|
340
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
341
|
+
* @returns {Array} Returns the new mapped array.
|
|
342
|
+
*/
|
|
343
|
+
function arrayMap(array, iteratee) {
|
|
344
|
+
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
345
|
+
while (++index < length) result[index] = iteratee(array[index], index, array);
|
|
346
|
+
return result;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.js
|
|
351
|
+
/**
|
|
352
|
+
* Checks if `value` is classified as an `Array` object.
|
|
353
|
+
*
|
|
354
|
+
* @static
|
|
355
|
+
* @memberOf _
|
|
356
|
+
* @since 0.1.0
|
|
357
|
+
* @category Lang
|
|
358
|
+
* @param {*} value The value to check.
|
|
359
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
360
|
+
* @example
|
|
361
|
+
*
|
|
362
|
+
* _.isArray([1, 2, 3]);
|
|
363
|
+
* // => true
|
|
364
|
+
*
|
|
365
|
+
* _.isArray(document.body.children);
|
|
366
|
+
* // => false
|
|
367
|
+
*
|
|
368
|
+
* _.isArray('abc');
|
|
369
|
+
* // => false
|
|
370
|
+
*
|
|
371
|
+
* _.isArray(_.noop);
|
|
372
|
+
* // => false
|
|
373
|
+
*/
|
|
374
|
+
var isArray = Array.isArray;
|
|
375
|
+
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js
|
|
378
|
+
/** Used for built-in method references. */
|
|
379
|
+
var objectProto = Object.prototype;
|
|
380
|
+
/** Used to check objects for own properties. */
|
|
381
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
382
|
+
/**
|
|
383
|
+
* Used to resolve the
|
|
384
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
385
|
+
* of values.
|
|
386
|
+
*/
|
|
387
|
+
var nativeObjectToString$1 = objectProto.toString;
|
|
388
|
+
/** Built-in value references. */
|
|
389
|
+
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
390
|
+
/**
|
|
391
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
392
|
+
*
|
|
393
|
+
* @private
|
|
394
|
+
* @param {*} value The value to query.
|
|
395
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
396
|
+
*/
|
|
397
|
+
function getRawTag(value) {
|
|
398
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
399
|
+
try {
|
|
400
|
+
value[symToStringTag$1] = void 0;
|
|
401
|
+
var unmasked = true;
|
|
402
|
+
} catch (e) {}
|
|
403
|
+
var result = nativeObjectToString$1.call(value);
|
|
404
|
+
if (unmasked) if (isOwn) value[symToStringTag$1] = tag;
|
|
405
|
+
else delete value[symToStringTag$1];
|
|
406
|
+
return result;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
//#endregion
|
|
410
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js
|
|
411
|
+
/**
|
|
412
|
+
* Used to resolve the
|
|
413
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
414
|
+
* of values.
|
|
415
|
+
*/
|
|
416
|
+
var nativeObjectToString = Object.prototype.toString;
|
|
417
|
+
/**
|
|
418
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
419
|
+
*
|
|
420
|
+
* @private
|
|
421
|
+
* @param {*} value The value to convert.
|
|
422
|
+
* @returns {string} Returns the converted string.
|
|
423
|
+
*/
|
|
424
|
+
function objectToString(value) {
|
|
425
|
+
return nativeObjectToString.call(value);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js
|
|
430
|
+
/** `Object#toString` result references. */
|
|
431
|
+
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
432
|
+
/** Built-in value references. */
|
|
433
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
434
|
+
/**
|
|
435
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
436
|
+
*
|
|
437
|
+
* @private
|
|
438
|
+
* @param {*} value The value to query.
|
|
439
|
+
* @returns {string} Returns the `toStringTag`.
|
|
440
|
+
*/
|
|
441
|
+
function baseGetTag(value) {
|
|
442
|
+
if (value == null) return value === void 0 ? undefinedTag : nullTag;
|
|
443
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js
|
|
448
|
+
/**
|
|
449
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
450
|
+
* and has a `typeof` result of "object".
|
|
451
|
+
*
|
|
452
|
+
* @static
|
|
453
|
+
* @memberOf _
|
|
454
|
+
* @since 4.0.0
|
|
455
|
+
* @category Lang
|
|
456
|
+
* @param {*} value The value to check.
|
|
457
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
458
|
+
* @example
|
|
459
|
+
*
|
|
460
|
+
* _.isObjectLike({});
|
|
461
|
+
* // => true
|
|
462
|
+
*
|
|
463
|
+
* _.isObjectLike([1, 2, 3]);
|
|
464
|
+
* // => true
|
|
465
|
+
*
|
|
466
|
+
* _.isObjectLike(_.noop);
|
|
467
|
+
* // => false
|
|
468
|
+
*
|
|
469
|
+
* _.isObjectLike(null);
|
|
470
|
+
* // => false
|
|
471
|
+
*/
|
|
472
|
+
function isObjectLike(value) {
|
|
473
|
+
return value != null && typeof value == "object";
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js
|
|
478
|
+
/** `Object#toString` result references. */
|
|
479
|
+
var symbolTag = "[object Symbol]";
|
|
480
|
+
/**
|
|
481
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
482
|
+
*
|
|
483
|
+
* @static
|
|
484
|
+
* @memberOf _
|
|
485
|
+
* @since 4.0.0
|
|
486
|
+
* @category Lang
|
|
487
|
+
* @param {*} value The value to check.
|
|
488
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
489
|
+
* @example
|
|
490
|
+
*
|
|
491
|
+
* _.isSymbol(Symbol.iterator);
|
|
492
|
+
* // => true
|
|
493
|
+
*
|
|
494
|
+
* _.isSymbol('abc');
|
|
495
|
+
* // => false
|
|
496
|
+
*/
|
|
497
|
+
function isSymbol(value) {
|
|
498
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js
|
|
503
|
+
/** Used as references for various `Number` constants. */
|
|
504
|
+
var INFINITY = Infinity;
|
|
505
|
+
/** Used to convert symbols to primitives and strings. */
|
|
506
|
+
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
507
|
+
/**
|
|
508
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
509
|
+
* values to empty strings.
|
|
510
|
+
*
|
|
511
|
+
* @private
|
|
512
|
+
* @param {*} value The value to process.
|
|
513
|
+
* @returns {string} Returns the string.
|
|
514
|
+
*/
|
|
515
|
+
function baseToString(value) {
|
|
516
|
+
if (typeof value == "string") return value;
|
|
517
|
+
if (isArray(value)) return arrayMap(value, baseToString) + "";
|
|
518
|
+
if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
|
|
519
|
+
var result = value + "";
|
|
520
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
//#endregion
|
|
524
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toString.js
|
|
525
|
+
/**
|
|
526
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
527
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
528
|
+
*
|
|
529
|
+
* @static
|
|
530
|
+
* @memberOf _
|
|
531
|
+
* @since 4.0.0
|
|
532
|
+
* @category Lang
|
|
533
|
+
* @param {*} value The value to convert.
|
|
534
|
+
* @returns {string} Returns the converted string.
|
|
535
|
+
* @example
|
|
536
|
+
*
|
|
537
|
+
* _.toString(null);
|
|
538
|
+
* // => ''
|
|
539
|
+
*
|
|
540
|
+
* _.toString(-0);
|
|
541
|
+
* // => '-0'
|
|
542
|
+
*
|
|
543
|
+
* _.toString([1, 2, 3]);
|
|
544
|
+
* // => '1,2,3'
|
|
545
|
+
*/
|
|
546
|
+
function toString(value) {
|
|
547
|
+
return value == null ? "" : baseToString(value);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
//#endregion
|
|
551
|
+
//#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toLower.js
|
|
552
|
+
/**
|
|
553
|
+
* Converts `string`, as a whole, to lower case just like
|
|
554
|
+
* [String#toLowerCase](https://mdn.io/toLowerCase).
|
|
555
|
+
*
|
|
556
|
+
* @static
|
|
557
|
+
* @memberOf _
|
|
558
|
+
* @since 4.0.0
|
|
559
|
+
* @category String
|
|
560
|
+
* @param {string} [string=''] The string to convert.
|
|
561
|
+
* @returns {string} Returns the lower cased string.
|
|
562
|
+
* @example
|
|
563
|
+
*
|
|
564
|
+
* _.toLower('--Foo-Bar--');
|
|
565
|
+
* // => '--foo-bar--'
|
|
566
|
+
*
|
|
567
|
+
* _.toLower('fooBar');
|
|
568
|
+
* // => 'foobar'
|
|
569
|
+
*
|
|
570
|
+
* _.toLower('__FOO_BAR__');
|
|
571
|
+
* // => '__foo_bar__'
|
|
572
|
+
*/
|
|
573
|
+
function toLower(value) {
|
|
574
|
+
return toString(value).toLowerCase();
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
//#endregion
|
|
578
|
+
//#region node_modules/.pnpm/mitt@3.0.1/node_modules/mitt/index.d.ts
|
|
579
|
+
var EventType = [
|
|
580
|
+
61,
|
|
581
|
+
() => [],
|
|
582
|
+
[]
|
|
583
|
+
];
|
|
584
|
+
var Handler = [
|
|
585
|
+
62,
|
|
586
|
+
(T) => [T],
|
|
587
|
+
[
|
|
588
|
+
"",
|
|
589
|
+
"",
|
|
590
|
+
""
|
|
591
|
+
]
|
|
592
|
+
];
|
|
593
|
+
var WildcardHandler = [
|
|
594
|
+
63,
|
|
595
|
+
(T) => [
|
|
596
|
+
Record,
|
|
597
|
+
T,
|
|
598
|
+
T,
|
|
599
|
+
T
|
|
600
|
+
],
|
|
601
|
+
[
|
|
602
|
+
"",
|
|
603
|
+
"",
|
|
604
|
+
"",
|
|
605
|
+
"",
|
|
606
|
+
"",
|
|
607
|
+
"",
|
|
608
|
+
""
|
|
609
|
+
]
|
|
610
|
+
];
|
|
611
|
+
var EventHandlerList = [
|
|
612
|
+
64,
|
|
613
|
+
(T) => [
|
|
614
|
+
T,
|
|
615
|
+
Handler,
|
|
616
|
+
Array
|
|
617
|
+
],
|
|
618
|
+
[
|
|
619
|
+
"",
|
|
620
|
+
"",
|
|
621
|
+
"",
|
|
622
|
+
""
|
|
623
|
+
]
|
|
624
|
+
];
|
|
625
|
+
var WildCardEventHandlerList = [
|
|
626
|
+
65,
|
|
627
|
+
(T) => [
|
|
628
|
+
Record,
|
|
629
|
+
T,
|
|
630
|
+
WildcardHandler,
|
|
631
|
+
Array
|
|
632
|
+
],
|
|
633
|
+
[
|
|
634
|
+
"",
|
|
635
|
+
"",
|
|
636
|
+
"",
|
|
637
|
+
"",
|
|
638
|
+
""
|
|
639
|
+
]
|
|
640
|
+
];
|
|
641
|
+
var EventHandlerMap = [
|
|
642
|
+
66,
|
|
643
|
+
(Events) => [
|
|
644
|
+
EventType,
|
|
645
|
+
Record,
|
|
646
|
+
Events,
|
|
647
|
+
Events,
|
|
648
|
+
Events,
|
|
649
|
+
EventHandlerList,
|
|
650
|
+
Events,
|
|
651
|
+
WildCardEventHandlerList,
|
|
652
|
+
Map
|
|
653
|
+
],
|
|
654
|
+
[
|
|
655
|
+
"",
|
|
656
|
+
"",
|
|
657
|
+
"",
|
|
658
|
+
"",
|
|
659
|
+
"",
|
|
660
|
+
"",
|
|
661
|
+
"",
|
|
662
|
+
"",
|
|
663
|
+
"",
|
|
664
|
+
""
|
|
665
|
+
]
|
|
666
|
+
];
|
|
667
|
+
var Emitter = [
|
|
668
|
+
67,
|
|
669
|
+
(Key, Events) => [
|
|
670
|
+
EventType,
|
|
671
|
+
Record,
|
|
672
|
+
Events,
|
|
673
|
+
EventHandlerMap,
|
|
674
|
+
Events,
|
|
675
|
+
Key,
|
|
676
|
+
Events,
|
|
677
|
+
Key,
|
|
678
|
+
Handler,
|
|
679
|
+
Events,
|
|
680
|
+
WildcardHandler,
|
|
681
|
+
Events,
|
|
682
|
+
Key,
|
|
683
|
+
Events,
|
|
684
|
+
Key,
|
|
685
|
+
Handler,
|
|
686
|
+
Events,
|
|
687
|
+
WildcardHandler,
|
|
688
|
+
Events,
|
|
689
|
+
Key,
|
|
690
|
+
Events,
|
|
691
|
+
Key,
|
|
692
|
+
Events,
|
|
693
|
+
Events,
|
|
694
|
+
Key,
|
|
695
|
+
Key
|
|
696
|
+
],
|
|
697
|
+
[
|
|
698
|
+
"",
|
|
699
|
+
"",
|
|
700
|
+
"",
|
|
701
|
+
"",
|
|
702
|
+
"",
|
|
703
|
+
"",
|
|
704
|
+
"",
|
|
705
|
+
"",
|
|
706
|
+
"",
|
|
707
|
+
"",
|
|
708
|
+
"",
|
|
709
|
+
"",
|
|
710
|
+
"",
|
|
711
|
+
"",
|
|
712
|
+
"",
|
|
713
|
+
"",
|
|
714
|
+
"",
|
|
715
|
+
"",
|
|
716
|
+
"",
|
|
717
|
+
"",
|
|
718
|
+
"",
|
|
719
|
+
"",
|
|
720
|
+
"",
|
|
721
|
+
"",
|
|
722
|
+
"",
|
|
723
|
+
"",
|
|
724
|
+
"",
|
|
725
|
+
"",
|
|
726
|
+
"",
|
|
727
|
+
"",
|
|
728
|
+
"",
|
|
729
|
+
"",
|
|
730
|
+
"",
|
|
731
|
+
"",
|
|
732
|
+
"",
|
|
733
|
+
"",
|
|
734
|
+
"",
|
|
735
|
+
"",
|
|
736
|
+
"",
|
|
737
|
+
"",
|
|
738
|
+
"",
|
|
739
|
+
"",
|
|
740
|
+
"",
|
|
741
|
+
"",
|
|
742
|
+
"",
|
|
743
|
+
"",
|
|
744
|
+
"",
|
|
745
|
+
"",
|
|
746
|
+
""
|
|
747
|
+
]
|
|
748
|
+
];
|
|
749
|
+
|
|
750
|
+
//#endregion
|
|
751
|
+
export { api as a, mitt_default as i, EventType as n, usePreferredDark as o, toLower as r, Emitter as t };
|