@vueuse/shared 10.2.0 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +42 -17
- package/index.d.cts +1096 -0
- package/index.d.mts +1096 -0
- package/index.d.ts +17 -9
- package/index.iife.js +42 -17
- package/index.iife.min.js +1 -1
- package/index.mjs +41 -18
- package/package.json +2 -3
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue_demi from 'vue-demi';
|
|
2
|
-
import { WatchOptionsBase, Ref, ComputedRef, WritableComputedRef, WatchSource, ComputedGetter, WritableComputedOptions, WatchOptions, ShallowUnwrapRef as ShallowUnwrapRef$1, UnwrapRef, ToRef, ToRefs, WatchCallback, WatchStopHandle } from 'vue-demi';
|
|
2
|
+
import { WatchOptionsBase, Ref, ComputedRef, WritableComputedRef, WatchSource, ComputedGetter, WritableComputedOptions, WatchOptions, ShallowUnwrapRef as ShallowUnwrapRef$1, UnwrapNestedRefs, UnwrapRef, ToRef, ToRefs, MaybeRef as MaybeRef$1, WatchCallback, WatchStopHandle } from 'vue-demi';
|
|
3
3
|
|
|
4
4
|
declare function computedEager<T>(fn: () => T, options?: WatchOptionsBase): Readonly<Ref<T>>;
|
|
5
5
|
|
|
@@ -193,9 +193,6 @@ declare function createFilterWrapper<T extends AnyFn>(filter: EventFilter, fn: T
|
|
|
193
193
|
declare const bypassFilter: EventFilter;
|
|
194
194
|
/**
|
|
195
195
|
* Create an EventFilter that debounce the events
|
|
196
|
-
*
|
|
197
|
-
* @param ms
|
|
198
|
-
* @param options
|
|
199
196
|
*/
|
|
200
197
|
declare function debounceFilter(ms: MaybeRefOrGetter<number>, options?: DebounceFilterOptions): EventFilter<any[], any, AnyFn>;
|
|
201
198
|
/**
|
|
@@ -223,6 +220,9 @@ declare const directiveHooks: {
|
|
|
223
220
|
unmounted: "unmounted";
|
|
224
221
|
};
|
|
225
222
|
|
|
223
|
+
declare const hyphenate: (str: string) => string;
|
|
224
|
+
declare const camelize: (str: string) => string;
|
|
225
|
+
|
|
226
226
|
declare function promiseTimeout(ms: number, throwOnTimeout?: boolean, reason?: string): Promise<void>;
|
|
227
227
|
declare function identity<T>(arg: T): T;
|
|
228
228
|
interface SingletonPromiseReturn<T> {
|
|
@@ -365,7 +365,7 @@ declare function reactifyObject<T extends object, S extends boolean = true>(obj:
|
|
|
365
365
|
/**
|
|
366
366
|
* Computed reactive object.
|
|
367
367
|
*/
|
|
368
|
-
declare function reactiveComputed<T extends
|
|
368
|
+
declare function reactiveComputed<T extends object>(fn: () => T): UnwrapNestedRefs<T>;
|
|
369
369
|
|
|
370
370
|
type ReactiveOmitPredicate<T> = (value: T[keyof T], key: keyof T) => boolean;
|
|
371
371
|
declare function reactiveOmit<T extends object, K extends keyof T>(obj: T, ...keys: (K | K[])[]): Omit<T, K>;
|
|
@@ -513,7 +513,7 @@ declare function syncRefs<T>(source: WatchSource<T>, targets: Ref<T> | Ref<T>[],
|
|
|
513
513
|
* @see https://vueuse.org/toReactive
|
|
514
514
|
* @param objectRef A ref of object
|
|
515
515
|
*/
|
|
516
|
-
declare function toReactive<T extends object>(objectRef: MaybeRef<T>): T
|
|
516
|
+
declare function toReactive<T extends object>(objectRef: MaybeRef<T>): UnwrapNestedRefs<T>;
|
|
517
517
|
|
|
518
518
|
/**
|
|
519
519
|
* Normalize value/ref/getter to `ref` or `computed`.
|
|
@@ -529,13 +529,21 @@ declare function toRef<T extends object, K extends keyof T>(object: T, key: K, d
|
|
|
529
529
|
*/
|
|
530
530
|
declare const resolveRef: typeof toRef;
|
|
531
531
|
|
|
532
|
+
interface ToRefsOptions {
|
|
533
|
+
/**
|
|
534
|
+
* Replace the original ref with a copy on property update.
|
|
535
|
+
*
|
|
536
|
+
* @default true
|
|
537
|
+
*/
|
|
538
|
+
replaceRef?: MaybeRefOrGetter<boolean>;
|
|
539
|
+
}
|
|
532
540
|
/**
|
|
533
541
|
* Extended `toRefs` that also accepts refs of an object.
|
|
534
542
|
*
|
|
535
543
|
* @see https://vueuse.org/toRefs
|
|
536
544
|
* @param objectRef A ref or normal object or array.
|
|
537
545
|
*/
|
|
538
|
-
declare function toRefs<T extends object>(objectRef: MaybeRef<T
|
|
546
|
+
declare function toRefs<T extends object>(objectRef: MaybeRef<T>, options?: ToRefsOptions): ToRefs<T>;
|
|
539
547
|
|
|
540
548
|
/**
|
|
541
549
|
* Get the value of value/ref/getter.
|
|
@@ -788,7 +796,7 @@ interface UseCounterOptions {
|
|
|
788
796
|
* @param [initialValue=0]
|
|
789
797
|
* @param {Object} options
|
|
790
798
|
*/
|
|
791
|
-
declare function useCounter(initialValue?: number
|
|
799
|
+
declare function useCounter(initialValue?: MaybeRef$1<number>, options?: UseCounterOptions): {
|
|
792
800
|
count: vue_demi.Ref<number>;
|
|
793
801
|
inc: (delta?: number) => number;
|
|
794
802
|
dec: (delta?: number) => number;
|
|
@@ -1085,4 +1093,4 @@ declare function watchTriggerable<T extends object, FnReturnT>(source: T, cb: Wa
|
|
|
1085
1093
|
*/
|
|
1086
1094
|
declare function whenever<T>(source: WatchSource<T | false | null | undefined>, cb: WatchCallback<T>, options?: WatchOptions): vue_demi.WatchStopHandle;
|
|
1087
1095
|
|
|
1088
|
-
export { AnyFn, ArgumentsType, Arrayable, Awaitable, ComputedRefWithControl, ComputedWithControlRefExtra, ConfigurableEventFilter, ConfigurableFlush, ConfigurableFlushSync, ControlledRefOptions, DateLike, DebounceFilterOptions, DeepMaybeRef, ElementOf, EventFilter, EventHook, EventHookOff, EventHookOn, EventHookTrigger, ExtendRefOptions, Fn, FunctionArgs, FunctionWrapperOptions, IgnoredUpdater, MapOldSources, MapSources, MaybeRef, MaybeRefOrGetter, MultiWatchSources, Mutable, Pausable, PromisifyFn, Reactified, ReactifyNested, ReactifyObjectOptions, ReactifyOptions, ReactiveOmitPredicate, ReactivePickPredicate, ReadonlyRefOrGetter, RemovableRef, ShallowUnwrapRef, SingletonPromiseReturn, Stoppable, SyncRefOptions, SyncRefsOptions, UntilArrayInstance, UntilBaseInstance, UntilToMatchOptions, UntilValueInstance, UseArrayIncludesComparatorFn, UseArrayIncludesOptions, UseArrayReducer, UseCounterOptions, UseDateFormatOptions, UseDateFormatReturn, UseIntervalControls, UseIntervalFnOptions, UseIntervalOptions, UseLastChangedOptions, UseTimeoutFnOptions, UseTimeoutOptions, UseToNumberOptions, UseToggleOptions, WatchArrayCallback, WatchAtMostOptions, WatchAtMostReturn, WatchDebouncedOptions, WatchIgnorableReturn, WatchPausableReturn, WatchThrottledOptions, WatchTriggerableCallback, WatchTriggerableReturn, WatchWithFilterOptions, WritableComputedRefWithControl, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
|
1096
|
+
export { AnyFn, ArgumentsType, Arrayable, Awaitable, ComputedRefWithControl, ComputedWithControlRefExtra, ConfigurableEventFilter, ConfigurableFlush, ConfigurableFlushSync, ControlledRefOptions, DateLike, DebounceFilterOptions, DeepMaybeRef, ElementOf, EventFilter, EventHook, EventHookOff, EventHookOn, EventHookTrigger, ExtendRefOptions, Fn, FunctionArgs, FunctionWrapperOptions, IgnoredUpdater, MapOldSources, MapSources, MaybeRef, MaybeRefOrGetter, MultiWatchSources, Mutable, Pausable, PromisifyFn, Reactified, ReactifyNested, ReactifyObjectOptions, ReactifyOptions, ReactiveOmitPredicate, ReactivePickPredicate, ReadonlyRefOrGetter, RemovableRef, ShallowUnwrapRef, SingletonPromiseReturn, Stoppable, SyncRefOptions, SyncRefsOptions, ToRefsOptions, UntilArrayInstance, UntilBaseInstance, UntilToMatchOptions, UntilValueInstance, UseArrayIncludesComparatorFn, UseArrayIncludesOptions, UseArrayReducer, UseCounterOptions, UseDateFormatOptions, UseDateFormatReturn, UseIntervalControls, UseIntervalFnOptions, UseIntervalOptions, UseLastChangedOptions, UseTimeoutFnOptions, UseTimeoutOptions, UseToNumberOptions, UseToggleOptions, WatchArrayCallback, WatchAtMostOptions, WatchAtMostReturn, WatchDebouncedOptions, WatchIgnorableReturn, WatchPausableReturn, WatchThrottledOptions, WatchTriggerableCallback, WatchTriggerableReturn, WatchWithFilterOptions, WritableComputedRefWithControl, assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
package/index.iife.js
CHANGED
|
@@ -557,6 +557,22 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
557
557
|
unmounted: vueDemi.isVue3 ? "unmounted" : "unbind"
|
|
558
558
|
};
|
|
559
559
|
|
|
560
|
+
function cacheStringFunction(fn) {
|
|
561
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
562
|
+
return (str) => {
|
|
563
|
+
const hit = cache[str];
|
|
564
|
+
return hit || (cache[str] = fn(str));
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
const hyphenateRE = /\B([A-Z])/g;
|
|
568
|
+
const hyphenate = cacheStringFunction(
|
|
569
|
+
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
570
|
+
);
|
|
571
|
+
const camelizeRE = /-(\w)/g;
|
|
572
|
+
const camelize = cacheStringFunction((str) => {
|
|
573
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
574
|
+
});
|
|
575
|
+
|
|
560
576
|
function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
|
|
561
577
|
return new Promise((resolve, reject) => {
|
|
562
578
|
if (throwOnTimeout)
|
|
@@ -838,24 +854,30 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
838
854
|
return a;
|
|
839
855
|
};
|
|
840
856
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
841
|
-
function toRefs(objectRef) {
|
|
857
|
+
function toRefs(objectRef, options = {}) {
|
|
842
858
|
if (!vueDemi.isRef(objectRef))
|
|
843
859
|
return vueDemi.toRefs(objectRef);
|
|
844
|
-
const result = Array.isArray(objectRef.value) ?
|
|
860
|
+
const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};
|
|
845
861
|
for (const key in objectRef.value) {
|
|
846
862
|
result[key] = vueDemi.customRef(() => ({
|
|
847
863
|
get() {
|
|
848
864
|
return objectRef.value[key];
|
|
849
865
|
},
|
|
850
866
|
set(v) {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
objectRef.value
|
|
867
|
+
var _a;
|
|
868
|
+
const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;
|
|
869
|
+
if (replaceRef) {
|
|
870
|
+
if (Array.isArray(objectRef.value)) {
|
|
871
|
+
const copy = [...objectRef.value];
|
|
872
|
+
copy[key] = v;
|
|
873
|
+
objectRef.value = copy;
|
|
874
|
+
} else {
|
|
875
|
+
const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v });
|
|
876
|
+
Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));
|
|
877
|
+
objectRef.value = newObject;
|
|
878
|
+
}
|
|
855
879
|
} else {
|
|
856
|
-
|
|
857
|
-
Object.setPrototypeOf(newObject, objectRef.value);
|
|
858
|
-
objectRef.value = newObject;
|
|
880
|
+
objectRef.value[key] = v;
|
|
859
881
|
}
|
|
860
882
|
}
|
|
861
883
|
}));
|
|
@@ -1124,17 +1146,18 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1124
1146
|
}
|
|
1125
1147
|
|
|
1126
1148
|
function useCounter(initialValue = 0, options = {}) {
|
|
1149
|
+
let _initialValue = vueDemi.unref(initialValue);
|
|
1127
1150
|
const count = vueDemi.ref(initialValue);
|
|
1128
1151
|
const {
|
|
1129
|
-
max =
|
|
1130
|
-
min =
|
|
1152
|
+
max = Number.POSITIVE_INFINITY,
|
|
1153
|
+
min = Number.NEGATIVE_INFINITY
|
|
1131
1154
|
} = options;
|
|
1132
1155
|
const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);
|
|
1133
1156
|
const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);
|
|
1134
1157
|
const get = () => count.value;
|
|
1135
1158
|
const set = (val) => count.value = Math.max(min, Math.min(max, val));
|
|
1136
|
-
const reset = (val =
|
|
1137
|
-
|
|
1159
|
+
const reset = (val = _initialValue) => {
|
|
1160
|
+
_initialValue = val;
|
|
1138
1161
|
return set(val);
|
|
1139
1162
|
};
|
|
1140
1163
|
return { count, inc, dec, get, set, reset };
|
|
@@ -1187,13 +1210,13 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1187
1210
|
aa: () => meridiem(hours, minutes, true, true)
|
|
1188
1211
|
};
|
|
1189
1212
|
return formatStr.replace(REGEX_FORMAT, (match, $1) => {
|
|
1190
|
-
var _a2;
|
|
1191
|
-
return $1
|
|
1213
|
+
var _a2, _b;
|
|
1214
|
+
return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;
|
|
1192
1215
|
});
|
|
1193
1216
|
}
|
|
1194
1217
|
function normalizeDate(date) {
|
|
1195
1218
|
if (date === null)
|
|
1196
|
-
return
|
|
1219
|
+
return new Date(Number.NaN);
|
|
1197
1220
|
if (date === void 0)
|
|
1198
1221
|
return /* @__PURE__ */ new Date();
|
|
1199
1222
|
if (date instanceof Date)
|
|
@@ -1434,7 +1457,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1434
1457
|
...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)
|
|
1435
1458
|
];
|
|
1436
1459
|
return vueDemi.watch(source, (newList, _, onCleanup) => {
|
|
1437
|
-
const oldListRemains =
|
|
1460
|
+
const oldListRemains = Array.from({ length: oldList.length });
|
|
1438
1461
|
const added = [];
|
|
1439
1462
|
for (const obj of newList) {
|
|
1440
1463
|
let found = false;
|
|
@@ -1907,6 +1930,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1907
1930
|
exports.assert = assert;
|
|
1908
1931
|
exports.autoResetRef = refAutoReset;
|
|
1909
1932
|
exports.bypassFilter = bypassFilter;
|
|
1933
|
+
exports.camelize = camelize;
|
|
1910
1934
|
exports.clamp = clamp;
|
|
1911
1935
|
exports.computedEager = computedEager;
|
|
1912
1936
|
exports.computedWithControl = computedWithControl;
|
|
@@ -1929,6 +1953,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1929
1953
|
exports.formatDate = formatDate;
|
|
1930
1954
|
exports.get = get;
|
|
1931
1955
|
exports.hasOwn = hasOwn;
|
|
1956
|
+
exports.hyphenate = hyphenate;
|
|
1932
1957
|
exports.identity = identity;
|
|
1933
1958
|
exports.ignorableWatch = watchIgnorable;
|
|
1934
1959
|
exports.increaseWithUnit = increaseWithUnit;
|
package/index.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var VueDemi=function(a,i,T){if(a.install)return a;if(!i)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),a;if(i.version.slice(0,4)==="2.7."){let h=function(P,j){var g,N={},U={config:i.config,use:i.use.bind(i),mixin:i.mixin.bind(i),component:i.component.bind(i),provide:function($,S){return N[$]=S,this},directive:function($,S){return S?(i.directive($,S),U):i.directive($)},mount:function($,S){return g||(g=new i(Object.assign({propsData:j},P,{provide:Object.assign(N,P.provide)})),g.$mount($,S),g)},unmount:function(){g&&(g.$destroy(),g=void 0)}};return U};var Zt=h;for(var b in i)a[b]=i[b];a.isVue2=!0,a.isVue3=!1,a.install=function(){},a.Vue=i,a.Vue2=i,a.version=i.version,a.warn=i.util.warn,a.hasInjectionContext=()=>!!a.getCurrentInstance(),a.createApp=h}else if(i.version.slice(0,2)==="2.")if(T){for(var b in T)a[b]=T[b];a.isVue2=!0,a.isVue3=!1,a.install=function(){},a.Vue=i,a.Vue2=i,a.version=i.version,a.hasInjectionContext=()=>!!a.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(i.version.slice(0,2)==="3."){for(var b in i)a[b]=i[b];a.isVue2=!1,a.isVue3=!0,a.install=function(){},a.Vue=i,a.Vue2=void 0,a.version=i.version,a.set=function(h,P,j){return Array.isArray(h)?(h.length=Math.max(h.length,P),h.splice(P,1,j),j):(h[P]=j,j)},a.del=function(h,P){if(Array.isArray(h)){h.splice(P,1);return}delete h[P]}}else console.error("[vue-demi] Vue version "+i.version+" is unsupported.");return a}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(a,i){"use strict";var T=Object.defineProperty,b=Object.defineProperties,Zt=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,g=(t,e,r)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,N=(t,e)=>{for(var r in e||(e={}))P.call(e,r)&&g(t,r,e[r]);if(h)for(var r of h(e))j.call(e,r)&&g(t,r,e[r]);return t},U=(t,e)=>b(t,Zt(e));function $(t,e){var r;const n=i.shallowRef();return i.watchEffect(()=>{n.value=t()},U(N({},e),{flush:(r=e?.flush)!=null?r:"sync"})),i.readonly(n)}function S(t,e){let r,n,o;const c=i.ref(!0),l=()=>{c.value=!0,o()};i.watch(t,l,{flush:"sync"});const u=typeof e=="function"?e:e.get,f=typeof e=="function"?void 0:e.set,y=i.customRef((d,p)=>(n=d,o=p,{get(){return c.value&&(r=u(),c.value=!1),n(),r},set(_){f?.(_)}}));return Object.isExtensible(y)&&(y.trigger=l),y}function A(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}function Jt(){const t=new Set,e=o=>{t.delete(o)};return{on:o=>{t.add(o);const c=()=>e(o);return A(c),{off:c}},off:e,trigger:o=>Promise.all(Array.from(t).map(c=>c(o)))}}function Xt(t){let e=!1,r;const n=i.effectScope(!0);return(...o)=>(e||(r=n.run(()=>t(...o)),e=!0),r)}function Kt(t){const e=Symbol("InjectionState");return[(...o)=>{const c=t(...o);return i.provide(e,c),c},()=>i.inject(e)]}function Qt(t){let e=0,r,n;const o=()=>{e-=1,n&&e<=0&&(n.stop(),r=void 0,n=void 0)};return(...c)=>(e+=1,r||(n=i.effectScope(!0),r=n.run(()=>t(...c))),A(o),r)}function tt(t,e,{enumerable:r=!1,unwrap:n=!0}={}){if(!i.isVue3&&!i.version.startsWith("2.7.")){if(process.env.NODE_ENV!=="production")throw new Error("[VueUse] extendRef only works in Vue 2.7 or above.");return}for(const[o,c]of Object.entries(e))o!=="value"&&(i.isRef(c)&&n?Object.defineProperty(t,o,{get(){return c.value},set(l){c.value=l},enumerable:r}):Object.defineProperty(t,o,{value:c,enumerable:r}));return t}function Vt(t,e){return e==null?i.unref(t):i.unref(t)[e]}function Dt(t){return i.unref(t)!=null}var xt=Object.defineProperty,et=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,rt=(t,e,r)=>e in t?xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,re=(t,e)=>{for(var r in e||(e={}))te.call(e,r)&&rt(t,r,e[r]);if(et)for(var r of et(e))ee.call(e,r)&&rt(t,r,e[r]);return t};function ne(t,e){if(typeof Symbol<"u"){const r=re({},t);return Object.defineProperty(r,Symbol.iterator,{enumerable:!1,value(){let n=0;return{next:()=>({value:e[n++],done:n>e.length})}}}),r}else return Object.assign([...e],t)}function s(t){return typeof t=="function"?t():i.unref(t)}const oe=s;function G(t,e){const r=e?.computedGetter===!1?i.unref:s;return function(...n){return i.computed(()=>t.apply(this,n.map(o=>r(o))))}}function ae(t,e={}){let r=[],n;if(Array.isArray(e))r=e;else{n=e;const{includeOwnProperties:o=!0}=e;r.push(...Object.keys(t)),o&&r.push(...Object.getOwnPropertyNames(t))}return Object.fromEntries(r.map(o=>{const c=t[o];return[o,typeof c=="function"?G(c.bind(t),n):c]}))}function nt(t){if(!i.isRef(t))return i.reactive(t);const e=new Proxy({},{get(r,n,o){return i.unref(Reflect.get(t.value,n,o))},set(r,n,o){return i.isRef(t.value[n])&&!i.isRef(o)?t.value[n].value=o:t.value[n]=o,!0},deleteProperty(r,n){return Reflect.deleteProperty(t.value,n)},has(r,n){return Reflect.has(t.value,n)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return i.reactive(e)}function q(t){return nt(i.computed(t))}function ie(t,...e){const r=e.flat(),n=r[0];return q(()=>Object.fromEntries(typeof n=="function"?Object.entries(i.toRefs(t)).filter(([o,c])=>!n(s(c),o)):Object.entries(i.toRefs(t)).filter(o=>!r.includes(o[0]))))}const R=typeof window<"u",ce=t=>typeof t<"u",le=t=>t!=null,ue=(t,...e)=>{t||console.warn(...e)},se=Object.prototype.toString,ot=t=>se.call(t)==="[object Object]",fe=()=>Date.now(),at=()=>+Date.now(),de=(t,e,r)=>Math.min(r,Math.max(e,t)),I=()=>{},pe=(t,e)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),_e=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),ye=ve();function ve(){var t;return R&&((t=window?.navigator)==null?void 0:t.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function M(t,e){function r(...n){return new Promise((o,c)=>{Promise.resolve(t(()=>e.apply(this,n),{fn:e,thisArg:this,args:n})).then(o).catch(c)})}return r}const W=t=>t();function z(t,e={}){let r,n,o=I;const c=u=>{clearTimeout(u),o(),o=I};return u=>{const f=s(t),y=s(e.maxWait);return r&&c(r),f<=0||y!==void 0&&y<=0?(n&&(c(n),n=null),Promise.resolve(u())):new Promise((d,p)=>{o=e.rejectOnCancel?p:d,y&&!n&&(n=setTimeout(()=>{r&&c(r),n=null,d(u())},y)),r=setTimeout(()=>{n&&c(n),n=null,d(u())},f)})}}function Z(t,e=!0,r=!0,n=!1){let o=0,c,l=!0,u=I,f;const y=()=>{c&&(clearTimeout(c),c=void 0,u(),u=I)};return p=>{const _=s(t),O=Date.now()-o,v=()=>f=p();return y(),_<=0?(o=Date.now(),v()):(O>_&&(r||!l)?(o=Date.now(),v()):e&&(f=new Promise((m,w)=>{u=n?w:m,c=setTimeout(()=>{o=Date.now(),l=!0,m(v()),y()},Math.max(0,_-O))})),!r&&!c&&(c=setTimeout(()=>l=!0,_)),l=!1,f)}}function it(t=W){const e=i.ref(!0);function r(){e.value=!1}function n(){e.value=!0}const o=(...c)=>{e.value&&t(...c)};return{isActive:i.readonly(e),pause:r,resume:n,eventFilter:o}}const Oe={mounted:i.isVue3?"mounted":"inserted",updated:i.isVue3?"updated":"componentUpdated",unmounted:i.isVue3?"unmounted":"unbind"};function J(t,e=!1,r="Timeout"){return new Promise((n,o)=>{setTimeout(e?()=>o(r):n,t)})}function he(t){return t}function we(t){let e;function r(){return e||(e=t()),e}return r.reset=async()=>{const n=e;e=void 0,n&&await n},r}function me(t){return t()}function ct(t,...e){return e.some(r=>r in t)}function Pe(t,e){var r;if(typeof t=="number")return t+e;const n=((r=t.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:r[0])||"",o=t.slice(n.length),c=Number.parseFloat(n)+e;return Number.isNaN(c)?t:c+o}function ge(t,e,r=!1){return e.reduce((n,o)=>(o in t&&(!r||t[o]!==void 0)&&(n[o]=t[o]),n),{})}function be(t,e,r=!1){return Object.fromEntries(Object.entries(t).filter(([n,o])=>(!r||o!==void 0)&&!e.includes(n)))}function $e(t){return Object.entries(t)}function X(...t){if(t.length!==1)return i.toRef(...t);const e=t[0];return typeof e=="function"?i.readonly(i.customRef(()=>({get:e,set:I}))):i.ref(e)}const Se=X;function je(t,...e){const r=e.flat(),n=r[0];return q(()=>Object.fromEntries(typeof n=="function"?Object.entries(i.toRefs(t)).filter(([o,c])=>n(s(c),o)):r.map(o=>[o,X(t,o)])))}function lt(t,e=1e4){return i.customRef((r,n)=>{let o=t,c;const l=()=>setTimeout(()=>{o=t,n()},s(e));return A(()=>{clearTimeout(c)}),{get(){return r(),o},set(u){o=u,n(),clearTimeout(c),c=l()}}})}function ut(t,e=200,r={}){return M(z(e,r),t)}function K(t,e=200,r={}){const n=i.ref(t.value),o=ut(()=>{n.value=t.value},e,r);return i.watch(t,()=>o()),n}function Ae(t,e){return i.computed({get(){var r;return(r=t.value)!=null?r:e},set(r){t.value=r}})}function st(t,e=200,r=!1,n=!0,o=!1){return M(Z(e,r,n,o),t)}function Q(t,e=200,r=!0,n=!0){if(e<=0)return t;const o=i.ref(t.value),c=st(()=>{o.value=t.value},e,r,n);return i.watch(t,()=>c()),o}function ft(t,e={}){let r=t,n,o;const c=i.customRef((_,O)=>(n=_,o=O,{get(){return l()},set(v){u(v)}}));function l(_=!0){return _&&n(),r}function u(_,O=!0){var v,m;if(_===r)return;const w=r;((v=e.onBeforeChange)==null?void 0:v.call(e,_,w))!==!1&&(r=_,(m=e.onChanged)==null||m.call(e,_,w),O&&o())}return tt(c,{get:l,set:u,untrackedGet:()=>l(!1),silentSet:_=>u(_,!1),peek:()=>l(!1),lay:_=>u(_,!1)},{enumerable:!0})}const Ie=ft;function Ee(...t){if(t.length===2){const[e,r]=t;e.value=r}if(t.length===3)if(i.isVue2)i.set(...t);else{const[e,r,n]=t;e[r]=n}}function Fe(t,e,r={}){var n,o;const{flush:c="sync",deep:l=!1,immediate:u=!0,direction:f="both",transform:y={}}=r;let d,p;const _=(n=y.ltr)!=null?n:v=>v,O=(o=y.rtl)!=null?o:v=>v;return(f==="both"||f==="ltr")&&(d=i.watch(t,v=>e.value=_(v),{flush:c,deep:l,immediate:u})),(f==="both"||f==="rtl")&&(p=i.watch(e,v=>t.value=O(v),{flush:c,deep:l,immediate:u})),()=>{d?.(),p?.()}}function Te(t,e,r={}){const{flush:n="sync",deep:o=!1,immediate:c=!0}=r;return Array.isArray(e)||(e=[e]),i.watch(t,l=>e.forEach(u=>u.value=l),{flush:n,deep:o,immediate:c})}var Re=Object.defineProperty,Me=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,pt=(t,e,r)=>e in t?Re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,We=(t,e)=>{for(var r in e||(e={}))Ne.call(e,r)&&pt(t,r,e[r]);if(dt)for(var r of dt(e))Ue.call(e,r)&&pt(t,r,e[r]);return t},Le=(t,e)=>Me(t,Ce(e));function Be(t){if(!i.isRef(t))return i.toRefs(t);const e=Array.isArray(t.value)?new Array(t.value.length):{};for(const r in t.value)e[r]=i.customRef(()=>({get(){return t.value[r]},set(n){if(Array.isArray(t.value)){const o=[...t.value];o[r]=n,t.value=o}else{const o=Le(We({},t.value),{[r]:n});Object.setPrototypeOf(o,t.value),t.value=o}}}));return e}function He(t,e=!0){i.getCurrentInstance()?i.onBeforeMount(t):e?t():i.nextTick(t)}function Ye(t){i.getCurrentInstance()&&i.onBeforeUnmount(t)}function ke(t,e=!0){i.getCurrentInstance()?i.onMounted(t):e?t():i.nextTick(t)}function Ge(t){i.getCurrentInstance()&&i.onUnmounted(t)}function V(t,e=!1){function r(p,{flush:_="sync",deep:O=!1,timeout:v,throwOnTimeout:m}={}){let w=null;const x=[new Promise(k=>{w=i.watch(t,F=>{p(F)!==e&&(w?.(),k(F))},{flush:_,deep:O,immediate:!0})})];return v!=null&&x.push(J(v,m).then(()=>s(t)).finally(()=>w?.())),Promise.race(x)}function n(p,_){if(!i.isRef(p))return r(F=>F===p,_);const{flush:O="sync",deep:v=!1,timeout:m,throwOnTimeout:w}=_??{};let E=null;const k=[new Promise(F=>{E=i.watch([t,p],([zt,Cn])=>{e!==(zt===Cn)&&(E?.(),F(zt))},{flush:O,deep:v,immediate:!0})})];return m!=null&&k.push(J(m,w).then(()=>s(t)).finally(()=>(E?.(),s(t)))),Promise.race(k)}function o(p){return r(_=>!!_,p)}function c(p){return n(null,p)}function l(p){return n(void 0,p)}function u(p){return r(Number.isNaN,p)}function f(p,_){return r(O=>{const v=Array.from(O);return v.includes(p)||v.includes(s(p))},_)}function y(p){return d(1,p)}function d(p=1,_){let O=-1;return r(()=>(O+=1,O>=p),_)}return Array.isArray(s(t))?{toMatch:r,toContains:f,changed:y,changedTimes:d,get not(){return V(t,!e)}}:{toMatch:r,toBe:n,toBeTruthy:o,toBeNull:c,toBeNaN:u,toBeUndefined:l,changed:y,changedTimes:d,get not(){return V(t,!e)}}}function qe(t){return V(t)}function ze(t,e){return t===e}function Ze(...t){var e;const r=t[0],n=t[1];let o=(e=t[2])!=null?e:ze;if(typeof o=="string"){const c=o;o=(l,u)=>l[c]===u[c]}return i.computed(()=>s(r).filter(c=>s(n).findIndex(l=>o(c,l))===-1))}function Je(t,e){return i.computed(()=>s(t).every((r,n,o)=>e(s(r),n,o)))}function Xe(t,e){return i.computed(()=>s(t).map(r=>s(r)).filter(e))}function Ke(t,e){return i.computed(()=>s(s(t).find((r,n,o)=>e(s(r),n,o))))}function Qe(t,e){return i.computed(()=>s(t).findIndex((r,n,o)=>e(s(r),n,o)))}function Ve(t,e){let r=t.length;for(;r-- >0;)if(e(t[r],r,t))return t[r]}function De(t,e){return i.computed(()=>s(Array.prototype.findLast?s(t).findLast((r,n,o)=>e(s(r),n,o)):Ve(s(t),(r,n,o)=>e(s(r),n,o))))}function xe(t){return ot(t)&&ct(t,"formIndex","comparator")}function tr(...t){var e;const r=t[0],n=t[1];let o=t[2],c=0;if(xe(o)&&(c=(e=o.fromIndex)!=null?e:0,o=o.comparator),typeof o=="string"){const l=o;o=(u,f)=>u[l]===s(f)}return o=o??((l,u)=>l===s(u)),i.computed(()=>s(r).slice(c).some((l,u,f)=>o(s(l),s(n),u,s(f))))}function er(t,e){return i.computed(()=>s(t).map(r=>s(r)).join(s(e)))}function rr(t,e){return i.computed(()=>s(t).map(r=>s(r)).map(e))}function nr(t,e,...r){const n=(o,c,l)=>e(s(o),s(c),l);return i.computed(()=>{const o=s(t);return r.length?o.reduce(n,s(r[0])):o.reduce(n)})}function or(t,e){return i.computed(()=>s(t).some((r,n,o)=>e(s(r),n,o)))}function ar(t){return Array.from(new Set(t))}function ir(t,e){return t.reduce((r,n)=>(r.some(o=>e(n,o,t))||r.push(n),r),[])}function cr(t,e){return i.computed(()=>{const r=s(t).map(n=>s(n));return e?ir(r,e):ar(r)})}function lr(t=0,e={}){const r=i.ref(t),{max:n=1/0,min:o=-1/0}=e,c=(d=1)=>r.value=Math.min(n,r.value+d),l=(d=1)=>r.value=Math.max(o,r.value-d),u=()=>r.value,f=d=>r.value=Math.max(o,Math.min(n,d));return{count:r,inc:c,dec:l,get:u,set:f,reset:(d=t)=>(t=d,f(d))}}const ur=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,sr=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function fr(t,e,r,n){let o=t<12?"AM":"PM";return n&&(o=o.split("").reduce((c,l)=>c+=`${l}.`,"")),r?o.toLowerCase():o}function _t(t,e,r={}){var n;const o=t.getFullYear(),c=t.getMonth(),l=t.getDate(),u=t.getHours(),f=t.getMinutes(),y=t.getSeconds(),d=t.getMilliseconds(),p=t.getDay(),_=(n=r.customMeridiem)!=null?n:fr,O={YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>c+1,MM:()=>`${c+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(r.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(r.locales,{month:"long"}),D:()=>String(l),DD:()=>`${l}`.padStart(2,"0"),H:()=>String(u),HH:()=>`${u}`.padStart(2,"0"),h:()=>`${u%12||12}`.padStart(1,"0"),hh:()=>`${u%12||12}`.padStart(2,"0"),m:()=>String(f),mm:()=>`${f}`.padStart(2,"0"),s:()=>String(y),ss:()=>`${y}`.padStart(2,"0"),SSS:()=>`${d}`.padStart(3,"0"),d:()=>p,dd:()=>t.toLocaleDateString(r.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(r.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(r.locales,{weekday:"long"}),A:()=>_(u,f),AA:()=>_(u,f,!1,!0),a:()=>_(u,f,!0),aa:()=>_(u,f,!0,!0)};return e.replace(sr,(v,m)=>{var w;return m||((w=O[v])==null?void 0:w.call(O))||v})}function yt(t){if(t===null)return new Date(NaN);if(t===void 0)return new Date;if(t instanceof Date)return new Date(t);if(typeof t=="string"&&!/Z$/i.test(t)){const e=t.match(ur);if(e){const r=e[2]-1||0,n=(e[7]||"0").substring(0,3);return new Date(e[1],r,e[3]||1,e[4]||0,e[5]||0,e[6]||0,n)}}return new Date(t)}function dr(t,e="HH:mm:ss",r={}){return i.computed(()=>_t(yt(s(t)),s(e),r))}function vt(t,e=1e3,r={}){const{immediate:n=!0,immediateCallback:o=!1}=r;let c=null;const l=i.ref(!1);function u(){c&&(clearInterval(c),c=null)}function f(){l.value=!1,u()}function y(){const d=s(e);d<=0||(l.value=!0,o&&t(),u(),c=setInterval(t,d))}if(n&&R&&y(),i.isRef(e)||typeof e=="function"){const d=i.watch(e,()=>{l.value&&R&&y()});A(d)}return A(f),{isActive:l,pause:f,resume:y}}var pr=Object.defineProperty,Ot=Object.getOwnPropertySymbols,_r=Object.prototype.hasOwnProperty,yr=Object.prototype.propertyIsEnumerable,ht=(t,e,r)=>e in t?pr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vr=(t,e)=>{for(var r in e||(e={}))_r.call(e,r)&&ht(t,r,e[r]);if(Ot)for(var r of Ot(e))yr.call(e,r)&&ht(t,r,e[r]);return t};function Or(t=1e3,e={}){const{controls:r=!1,immediate:n=!0,callback:o}=e,c=i.ref(0),l=()=>c.value+=1,u=()=>{c.value=0},f=vt(o?()=>{l(),o(c.value)}:l,t,{immediate:n});return r?vr({counter:c,reset:u},f):c}function hr(t,e={}){var r;const n=i.ref((r=e.initialValue)!=null?r:null);return i.watch(t,()=>n.value=at(),e),n}function wt(t,e,r={}){const{immediate:n=!0}=r,o=i.ref(!1);let c=null;function l(){c&&(clearTimeout(c),c=null)}function u(){o.value=!1,l()}function f(...y){l(),o.value=!0,c=setTimeout(()=>{o.value=!1,c=null,t(...y)},s(e))}return n&&(o.value=!0,R&&f()),A(u),{isPending:i.readonly(o),start:f,stop:u}}var wr=Object.defineProperty,mt=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Pt=(t,e,r)=>e in t?wr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,gr=(t,e)=>{for(var r in e||(e={}))mr.call(e,r)&&Pt(t,r,e[r]);if(mt)for(var r of mt(e))Pr.call(e,r)&&Pt(t,r,e[r]);return t};function br(t=1e3,e={}){const{controls:r=!1,callback:n}=e,o=wt(n??I,t,e),c=i.computed(()=>!o.isPending.value);return r?gr({ready:c},o):c}function $r(t,e={}){const{method:r="parseFloat",radix:n,nanToZero:o}=e;return i.computed(()=>{let c=s(t);return typeof c=="string"&&(c=Number[r](c,n)),o&&Number.isNaN(c)&&(c=0),c})}function Sr(t){return i.computed(()=>`${s(t)}`)}function jr(t=!1,e={}){const{truthyValue:r=!0,falsyValue:n=!1}=e,o=i.isRef(t),c=i.ref(t);function l(u){if(arguments.length)return c.value=u,c.value;{const f=s(r);return c.value=c.value===f?s(n):f,c.value}}return o?l:[c,l]}function Ar(t,e,r){let n=r?.immediate?[]:[...t instanceof Function?t():Array.isArray(t)?t:s(t)];return i.watch(t,(o,c,l)=>{const u=new Array(n.length),f=[];for(const d of o){let p=!1;for(let _=0;_<n.length;_++)if(!u[_]&&d===n[_]){u[_]=!0,p=!0;break}p||f.push(d)}const y=n.filter((d,p)=>!u[p]);e(o,n,f,y,l),n=[...o]},r)}var gt=Object.getOwnPropertySymbols,Ir=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable,Fr=(t,e)=>{var r={};for(var n in t)Ir.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&>)for(var n of gt(t))e.indexOf(n)<0&&Er.call(t,n)&&(r[n]=t[n]);return r};function C(t,e,r={}){const n=r,{eventFilter:o=W}=n,c=Fr(n,["eventFilter"]);return i.watch(t,M(o,e),c)}var bt=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,Mr=(t,e)=>{var r={};for(var n in t)Tr.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&bt)for(var n of bt(t))e.indexOf(n)<0&&Rr.call(t,n)&&(r[n]=t[n]);return r};function Cr(t,e,r){const n=r,{count:o}=n,c=Mr(n,["count"]),l=i.ref(0),u=C(t,(...f)=>{l.value+=1,l.value>=s(o)&&i.nextTick(()=>u()),e(...f)},c);return{count:l,stop:u}}var Nr=Object.defineProperty,Ur=Object.defineProperties,Wr=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable,jt=(t,e,r)=>e in t?Nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Lr=(t,e)=>{for(var r in e||(e={}))$t.call(e,r)&&jt(t,r,e[r]);if(L)for(var r of L(e))St.call(e,r)&&jt(t,r,e[r]);return t},Br=(t,e)=>Ur(t,Wr(e)),Hr=(t,e)=>{var r={};for(var n in t)$t.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&L)for(var n of L(t))e.indexOf(n)<0&&St.call(t,n)&&(r[n]=t[n]);return r};function At(t,e,r={}){const n=r,{debounce:o=0,maxWait:c=void 0}=n,l=Hr(n,["debounce","maxWait"]);return C(t,e,Br(Lr({},l),{eventFilter:z(o,{maxWait:c})}))}var Yr=Object.defineProperty,kr=Object.defineProperties,Gr=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Et=(t,e,r)=>e in t?Yr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Zr=(t,e)=>{for(var r in e||(e={}))qr.call(e,r)&&Et(t,r,e[r]);if(It)for(var r of It(e))zr.call(e,r)&&Et(t,r,e[r]);return t},Jr=(t,e)=>kr(t,Gr(e));function Xr(t,e,r){return i.watch(t,e,Jr(Zr({},r),{deep:!0}))}var Kr=Object.defineProperty,Qr=Object.defineProperties,Vr=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable,Rt=(t,e,r)=>e in t?Kr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Dr=(t,e)=>{for(var r in e||(e={}))Ft.call(e,r)&&Rt(t,r,e[r]);if(B)for(var r of B(e))Tt.call(e,r)&&Rt(t,r,e[r]);return t},xr=(t,e)=>Qr(t,Vr(e)),tn=(t,e)=>{var r={};for(var n in t)Ft.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&B)for(var n of B(t))e.indexOf(n)<0&&Tt.call(t,n)&&(r[n]=t[n]);return r};function D(t,e,r={}){const n=r,{eventFilter:o=W}=n,c=tn(n,["eventFilter"]),l=M(o,e);let u,f,y;if(c.flush==="sync"){const d=i.ref(!1);f=()=>{},u=p=>{d.value=!0,p(),d.value=!1},y=i.watch(t,(...p)=>{d.value||l(...p)},c)}else{const d=[],p=i.ref(0),_=i.ref(0);f=()=>{p.value=_.value},d.push(i.watch(t,()=>{_.value++},xr(Dr({},c),{flush:"sync"}))),u=O=>{const v=_.value;O(),p.value+=_.value-v},d.push(i.watch(t,(...O)=>{const v=p.value>0&&p.value===_.value;p.value=0,_.value=0,!v&&l(...O)},c)),y=()=>{d.forEach(O=>O())}}return{stop:y,ignoreUpdates:u,ignorePrevAsyncUpdates:f}}var en=Object.defineProperty,rn=Object.defineProperties,nn=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,on=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable,Ct=(t,e,r)=>e in t?en(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,cn=(t,e)=>{for(var r in e||(e={}))on.call(e,r)&&Ct(t,r,e[r]);if(Mt)for(var r of Mt(e))an.call(e,r)&&Ct(t,r,e[r]);return t},ln=(t,e)=>rn(t,nn(e));function un(t,e,r){return i.watch(t,e,ln(cn({},r),{immediate:!0}))}function sn(t,e,r){const n=i.watch(t,(...o)=>(i.nextTick(()=>n()),e(...o)),r)}var fn=Object.defineProperty,dn=Object.defineProperties,pn=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,Wt=(t,e,r)=>e in t?fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_n=(t,e)=>{for(var r in e||(e={}))Nt.call(e,r)&&Wt(t,r,e[r]);if(H)for(var r of H(e))Ut.call(e,r)&&Wt(t,r,e[r]);return t},yn=(t,e)=>dn(t,pn(e)),vn=(t,e)=>{var r={};for(var n in t)Nt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&H)for(var n of H(t))e.indexOf(n)<0&&Ut.call(t,n)&&(r[n]=t[n]);return r};function Lt(t,e,r={}){const n=r,{eventFilter:o}=n,c=vn(n,["eventFilter"]),{eventFilter:l,pause:u,resume:f,isActive:y}=it(o);return{stop:C(t,e,yn(_n({},c),{eventFilter:l})),pause:u,resume:f,isActive:y}}var On=Object.defineProperty,hn=Object.defineProperties,wn=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,Yt=(t,e,r)=>e in t?On(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mn=(t,e)=>{for(var r in e||(e={}))Bt.call(e,r)&&Yt(t,r,e[r]);if(Y)for(var r of Y(e))Ht.call(e,r)&&Yt(t,r,e[r]);return t},Pn=(t,e)=>hn(t,wn(e)),gn=(t,e)=>{var r={};for(var n in t)Bt.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Y)for(var n of Y(t))e.indexOf(n)<0&&Ht.call(t,n)&&(r[n]=t[n]);return r};function kt(t,e,r={}){const n=r,{throttle:o=0,trailing:c=!0,leading:l=!0}=n,u=gn(n,["throttle","trailing","leading"]);return C(t,e,Pn(mn({},u),{eventFilter:Z(o,c,l)}))}var bn=Object.defineProperty,$n=Object.defineProperties,Sn=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,jn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,qt=(t,e,r)=>e in t?bn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,In=(t,e)=>{for(var r in e||(e={}))jn.call(e,r)&&qt(t,r,e[r]);if(Gt)for(var r of Gt(e))An.call(e,r)&&qt(t,r,e[r]);return t},En=(t,e)=>$n(t,Sn(e));function Fn(t,e,r={}){let n;function o(){if(!n)return;const d=n;n=void 0,d()}function c(d){n=d}const l=(d,p)=>(o(),e(d,p,c)),u=D(t,l,r),{ignoreUpdates:f}=u,y=()=>{let d;return f(()=>{d=l(Tn(t),Rn(t))}),d};return En(In({},u),{trigger:y})}function Tn(t){return i.isReactive(t)?t:Array.isArray(t)?t.map(e=>s(e)):s(t)}function Rn(t){return Array.isArray(t)?t.map(()=>{}):void 0}function Mn(t,e,r){return i.watch(t,(n,o,c)=>{n&&e(n,o,c)},r)}a.assert=ue,a.autoResetRef=lt,a.bypassFilter=W,a.clamp=de,a.computedEager=$,a.computedWithControl=S,a.containsProp=ct,a.controlledComputed=S,a.controlledRef=Ie,a.createEventHook=Jt,a.createFilterWrapper=M,a.createGlobalState=Xt,a.createInjectionState=Kt,a.createReactiveFn=G,a.createSharedComposable=Qt,a.createSingletonPromise=we,a.debounceFilter=z,a.debouncedRef=K,a.debouncedWatch=At,a.directiveHooks=Oe,a.eagerComputed=$,a.extendRef=tt,a.formatDate=_t,a.get=Vt,a.hasOwn=_e,a.identity=he,a.ignorableWatch=D,a.increaseWithUnit=Pe,a.invoke=me,a.isClient=R,a.isDef=ce,a.isDefined=Dt,a.isIOS=ye,a.isObject=ot,a.makeDestructurable=ne,a.noop=I,a.normalizeDate=yt,a.notNullish=le,a.now=fe,a.objectEntries=$e,a.objectOmit=be,a.objectPick=ge,a.pausableFilter=it,a.pausableWatch=Lt,a.promiseTimeout=J,a.rand=pe,a.reactify=G,a.reactifyObject=ae,a.reactiveComputed=q,a.reactiveOmit=ie,a.reactivePick=je,a.refAutoReset=lt,a.refDebounced=K,a.refDefault=Ae,a.refThrottled=Q,a.refWithControl=ft,a.resolveRef=Se,a.resolveUnref=oe,a.set=Ee,a.syncRef=Fe,a.syncRefs=Te,a.throttleFilter=Z,a.throttledRef=Q,a.throttledWatch=kt,a.timestamp=at,a.toReactive=nt,a.toRef=X,a.toRefs=Be,a.toValue=s,a.tryOnBeforeMount=He,a.tryOnBeforeUnmount=Ye,a.tryOnMounted=ke,a.tryOnScopeDispose=A,a.tryOnUnmounted=Ge,a.until=qe,a.useArrayDifference=Ze,a.useArrayEvery=Je,a.useArrayFilter=Xe,a.useArrayFind=Ke,a.useArrayFindIndex=Qe,a.useArrayFindLast=De,a.useArrayIncludes=tr,a.useArrayJoin=er,a.useArrayMap=rr,a.useArrayReduce=nr,a.useArraySome=or,a.useArrayUnique=cr,a.useCounter=lr,a.useDateFormat=dr,a.useDebounce=K,a.useDebounceFn=ut,a.useInterval=Or,a.useIntervalFn=vt,a.useLastChanged=hr,a.useThrottle=Q,a.useThrottleFn=st,a.useTimeout=br,a.useTimeoutFn=wt,a.useToNumber=$r,a.useToString=Sr,a.useToggle=jr,a.watchArray=Ar,a.watchAtMost=Cr,a.watchDebounced=At,a.watchDeep=Xr,a.watchIgnorable=D,a.watchImmediate=un,a.watchOnce=sn,a.watchPausable=Lt,a.watchThrottled=kt,a.watchTriggerable=Fn,a.watchWithFilter=C,a.whenever=Mn})(this.VueUse=this.VueUse||{},VueDemi);
|
|
1
|
+
var VueDemi=function(a,i,F){if(a.install)return a;if(!i)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),a;if(i.version.slice(0,4)==="2.7."){let h=function(P,j){var g,N={},U={config:i.config,use:i.use.bind(i),mixin:i.mixin.bind(i),component:i.component.bind(i),provide:function($,S){return N[$]=S,this},directive:function($,S){return S?(i.directive($,S),U):i.directive($)},mount:function($,S){return g||(g=new i(Object.assign({propsData:j},P,{provide:Object.assign(N,P.provide)})),g.$mount($,S),g)},unmount:function(){g&&(g.$destroy(),g=void 0)}};return U};var ee=h;for(var b in i)a[b]=i[b];a.isVue2=!0,a.isVue3=!1,a.install=function(){},a.Vue=i,a.Vue2=i,a.version=i.version,a.warn=i.util.warn,a.hasInjectionContext=()=>!!a.getCurrentInstance(),a.createApp=h}else if(i.version.slice(0,2)==="2.")if(F){for(var b in F)a[b]=F[b];a.isVue2=!0,a.isVue3=!1,a.install=function(){},a.Vue=i,a.Vue2=i,a.version=i.version,a.hasInjectionContext=()=>!!a.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(i.version.slice(0,2)==="3."){for(var b in i)a[b]=i[b];a.isVue2=!1,a.isVue3=!0,a.install=function(){},a.Vue=i,a.Vue2=void 0,a.version=i.version,a.set=function(h,P,j){return Array.isArray(h)?(h.length=Math.max(h.length,P),h.splice(P,1,j),j):(h[P]=j,j)},a.del=function(h,P){if(Array.isArray(h)){h.splice(P,1);return}delete h[P]}}else console.error("[vue-demi] Vue version "+i.version+" is unsupported.");return a}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(a,i){"use strict";var F=Object.defineProperty,b=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&g(e,r,t[r]);if(h)for(var r of h(t))j.call(t,r)&&g(e,r,t[r]);return e},U=(e,t)=>b(e,ee(t));function $(e,t){var r;const n=i.shallowRef();return i.watchEffect(()=>{n.value=e()},U(N({},t),{flush:(r=t?.flush)!=null?r:"sync"})),i.readonly(n)}function S(e,t){let r,n,o;const c=i.ref(!0),u=()=>{c.value=!0,o()};i.watch(e,u,{flush:"sync"});const l=typeof t=="function"?t:t.get,d=typeof t=="function"?void 0:t.set,y=i.customRef((_,f)=>(n=_,o=f,{get(){return c.value&&(r=l(),c.value=!1),n(),r},set(p){d?.(p)}}));return Object.isExtensible(y)&&(y.trigger=u),y}function I(e){return i.getCurrentScope()?(i.onScopeDispose(e),!0):!1}function Xe(){const e=new Set,t=o=>{e.delete(o)};return{on:o=>{e.add(o);const c=()=>t(o);return I(c),{off:c}},off:t,trigger:o=>Promise.all(Array.from(e).map(c=>c(o)))}}function Ke(e){let t=!1,r;const n=i.effectScope(!0);return(...o)=>(t||(r=n.run(()=>e(...o)),t=!0),r)}function Qe(e){const t=Symbol("InjectionState");return[(...o)=>{const c=e(...o);return i.provide(t,c),c},()=>i.inject(t)]}function Ve(e){let t=0,r,n;const o=()=>{t-=1,n&&t<=0&&(n.stop(),r=void 0,n=void 0)};return(...c)=>(t+=1,r||(n=i.effectScope(!0),r=n.run(()=>e(...c))),I(o),r)}function te(e,t,{enumerable:r=!1,unwrap:n=!0}={}){if(!i.isVue3&&!i.version.startsWith("2.7.")){if(process.env.NODE_ENV!=="production")throw new Error("[VueUse] extendRef only works in Vue 2.7 or above.");return}for(const[o,c]of Object.entries(t))o!=="value"&&(i.isRef(c)&&n?Object.defineProperty(e,o,{get(){return c.value},set(u){c.value=u},enumerable:r}):Object.defineProperty(e,o,{value:c,enumerable:r}));return e}function De(e,t){return t==null?i.unref(e):i.unref(e)[t]}function xe(e){return i.unref(e)!=null}var et=Object.defineProperty,re=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,ne=(e,t,r)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nt=(e,t)=>{for(var r in t||(t={}))tt.call(t,r)&&ne(e,r,t[r]);if(re)for(var r of re(t))rt.call(t,r)&&ne(e,r,t[r]);return e};function ot(e,t){if(typeof Symbol<"u"){const r=nt({},e);return Object.defineProperty(r,Symbol.iterator,{enumerable:!1,value(){let n=0;return{next:()=>({value:t[n++],done:n>t.length})}}}),r}else return Object.assign([...t],e)}function s(e){return typeof e=="function"?e():i.unref(e)}const at=s;function k(e,t){const r=t?.computedGetter===!1?i.unref:s;return function(...n){return i.computed(()=>e.apply(this,n.map(o=>r(o))))}}function it(e,t={}){let r=[],n;if(Array.isArray(t))r=t;else{n=t;const{includeOwnProperties:o=!0}=t;r.push(...Object.keys(e)),o&&r.push(...Object.getOwnPropertyNames(e))}return Object.fromEntries(r.map(o=>{const c=e[o];return[o,typeof c=="function"?k(c.bind(e),n):c]}))}function oe(e){if(!i.isRef(e))return i.reactive(e);const t=new Proxy({},{get(r,n,o){return i.unref(Reflect.get(e.value,n,o))},set(r,n,o){return i.isRef(e.value[n])&&!i.isRef(o)?e.value[n].value=o:e.value[n]=o,!0},deleteProperty(r,n){return Reflect.deleteProperty(e.value,n)},has(r,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return i.reactive(t)}function z(e){return oe(i.computed(e))}function ct(e,...t){const r=t.flat(),n=r[0];return z(()=>Object.fromEntries(typeof n=="function"?Object.entries(i.toRefs(e)).filter(([o,c])=>!n(s(c),o)):Object.entries(i.toRefs(e)).filter(o=>!r.includes(o[0]))))}const R=typeof window<"u",lt=e=>typeof e<"u",ut=e=>e!=null,st=(e,...t)=>{e||console.warn(...t)},ft=Object.prototype.toString,ae=e=>ft.call(e)==="[object Object]",dt=()=>Date.now(),ie=()=>+Date.now(),pt=(e,t,r)=>Math.min(r,Math.max(t,e)),E=()=>{},_t=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e),yt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),vt=Ot();function Ot(){var e;return R&&((e=window?.navigator)==null?void 0:e.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function C(e,t){function r(...n){return new Promise((o,c)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(o).catch(c)})}return r}const W=e=>e();function q(e,t={}){let r,n,o=E;const c=l=>{clearTimeout(l),o(),o=E};return l=>{const d=s(e),y=s(t.maxWait);return r&&c(r),d<=0||y!==void 0&&y<=0?(n&&(c(n),n=null),Promise.resolve(l())):new Promise((_,f)=>{o=t.rejectOnCancel?f:_,y&&!n&&(n=setTimeout(()=>{r&&c(r),n=null,_(l())},y)),r=setTimeout(()=>{n&&c(n),n=null,_(l())},d)})}}function Z(e,t=!0,r=!0,n=!1){let o=0,c,u=!0,l=E,d;const y=()=>{c&&(clearTimeout(c),c=void 0,l(),l=E)};return f=>{const p=s(e),O=Date.now()-o,v=()=>d=f();return y(),p<=0?(o=Date.now(),v()):(O>p&&(r||!u)?(o=Date.now(),v()):t&&(d=new Promise((m,w)=>{l=n?w:m,c=setTimeout(()=>{o=Date.now(),u=!0,m(v()),y()},Math.max(0,p-O))})),!r&&!c&&(c=setTimeout(()=>u=!0,p)),u=!1,d)}}function ce(e=W){const t=i.ref(!0);function r(){t.value=!1}function n(){t.value=!0}const o=(...c)=>{t.value&&e(...c)};return{isActive:i.readonly(t),pause:r,resume:n,eventFilter:o}}const ht={mounted:i.isVue3?"mounted":"inserted",updated:i.isVue3?"updated":"componentUpdated",unmounted:i.isVue3?"unmounted":"unbind"};function le(e){const t=Object.create(null);return r=>t[r]||(t[r]=e(r))}const wt=/\B([A-Z])/g,mt=le(e=>e.replace(wt,"-$1").toLowerCase()),Pt=/-(\w)/g,gt=le(e=>e.replace(Pt,(t,r)=>r?r.toUpperCase():""));function J(e,t=!1,r="Timeout"){return new Promise((n,o)=>{setTimeout(t?()=>o(r):n,e)})}function bt(e){return e}function $t(e){let t;function r(){return t||(t=e()),t}return r.reset=async()=>{const n=t;t=void 0,n&&await n},r}function St(e){return e()}function ue(e,...t){return t.some(r=>r in e)}function At(e,t){var r;if(typeof e=="number")return e+t;const n=((r=e.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:r[0])||"",o=e.slice(n.length),c=Number.parseFloat(n)+t;return Number.isNaN(c)?e:c+o}function jt(e,t,r=!1){return t.reduce((n,o)=>(o in e&&(!r||e[o]!==void 0)&&(n[o]=e[o]),n),{})}function It(e,t,r=!1){return Object.fromEntries(Object.entries(e).filter(([n,o])=>(!r||o!==void 0)&&!t.includes(n)))}function Et(e){return Object.entries(e)}function X(...e){if(e.length!==1)return i.toRef(...e);const t=e[0];return typeof t=="function"?i.readonly(i.customRef(()=>({get:t,set:E}))):i.ref(t)}const Tt=X;function Ft(e,...t){const r=t.flat(),n=r[0];return z(()=>Object.fromEntries(typeof n=="function"?Object.entries(i.toRefs(e)).filter(([o,c])=>n(s(c),o)):r.map(o=>[o,X(e,o)])))}function se(e,t=1e4){return i.customRef((r,n)=>{let o=e,c;const u=()=>setTimeout(()=>{o=e,n()},s(t));return I(()=>{clearTimeout(c)}),{get(){return r(),o},set(l){o=l,n(),clearTimeout(c),c=u()}}})}function fe(e,t=200,r={}){return C(q(t,r),e)}function K(e,t=200,r={}){const n=i.ref(e.value),o=fe(()=>{n.value=e.value},t,r);return i.watch(e,()=>o()),n}function Rt(e,t){return i.computed({get(){var r;return(r=e.value)!=null?r:t},set(r){e.value=r}})}function de(e,t=200,r=!1,n=!0,o=!1){return C(Z(t,r,n,o),e)}function Q(e,t=200,r=!0,n=!0){if(t<=0)return e;const o=i.ref(e.value),c=de(()=>{o.value=e.value},t,r,n);return i.watch(e,()=>c()),o}function pe(e,t={}){let r=e,n,o;const c=i.customRef((p,O)=>(n=p,o=O,{get(){return u()},set(v){l(v)}}));function u(p=!0){return p&&n(),r}function l(p,O=!0){var v,m;if(p===r)return;const w=r;((v=t.onBeforeChange)==null?void 0:v.call(t,p,w))!==!1&&(r=p,(m=t.onChanged)==null||m.call(t,p,w),O&&o())}return te(c,{get:u,set:l,untrackedGet:()=>u(!1),silentSet:p=>l(p,!1),peek:()=>u(!1),lay:p=>l(p,!1)},{enumerable:!0})}const Ct=pe;function Mt(...e){if(e.length===2){const[t,r]=e;t.value=r}if(e.length===3)if(i.isVue2)i.set(...e);else{const[t,r,n]=e;t[r]=n}}function Nt(e,t,r={}){var n,o;const{flush:c="sync",deep:u=!1,immediate:l=!0,direction:d="both",transform:y={}}=r;let _,f;const p=(n=y.ltr)!=null?n:v=>v,O=(o=y.rtl)!=null?o:v=>v;return(d==="both"||d==="ltr")&&(_=i.watch(e,v=>t.value=p(v),{flush:c,deep:u,immediate:l})),(d==="both"||d==="rtl")&&(f=i.watch(t,v=>e.value=O(v),{flush:c,deep:u,immediate:l})),()=>{_?.(),f?.()}}function Ut(e,t,r={}){const{flush:n="sync",deep:o=!1,immediate:c=!0}=r;return Array.isArray(t)||(t=[t]),i.watch(e,u=>t.forEach(l=>l.value=u),{flush:n,deep:o,immediate:c})}var Wt=Object.defineProperty,Lt=Object.defineProperties,Bt=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,ye=(e,t,r)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gt=(e,t)=>{for(var r in t||(t={}))Ht.call(t,r)&&ye(e,r,t[r]);if(_e)for(var r of _e(t))Yt.call(t,r)&&ye(e,r,t[r]);return e},kt=(e,t)=>Lt(e,Bt(t));function zt(e,t={}){if(!i.isRef(e))return i.toRefs(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=i.customRef(()=>({get(){return e.value[n]},set(o){var c;if((c=s(t.replaceRef))!=null?c:!0)if(Array.isArray(e.value)){const l=[...e.value];l[n]=o,e.value=l}else{const l=kt(Gt({},e.value),{[n]:o});Object.setPrototypeOf(l,Object.getPrototypeOf(e.value)),e.value=l}else e.value[n]=o}}));return r}function qt(e,t=!0){i.getCurrentInstance()?i.onBeforeMount(e):t?e():i.nextTick(e)}function Zt(e){i.getCurrentInstance()&&i.onBeforeUnmount(e)}function Jt(e,t=!0){i.getCurrentInstance()?i.onMounted(e):t?e():i.nextTick(e)}function Xt(e){i.getCurrentInstance()&&i.onUnmounted(e)}function V(e,t=!1){function r(f,{flush:p="sync",deep:O=!1,timeout:v,throwOnTimeout:m}={}){let w=null;const x=[new Promise(G=>{w=i.watch(e,T=>{f(T)!==t&&(w?.(),G(T))},{flush:p,deep:O,immediate:!0})})];return v!=null&&x.push(J(v,m).then(()=>s(e)).finally(()=>w?.())),Promise.race(x)}function n(f,p){if(!i.isRef(f))return r(T=>T===f,p);const{flush:O="sync",deep:v=!1,timeout:m,throwOnTimeout:w}=p??{};let A=null;const G=[new Promise(T=>{A=i.watch([e,f],([Je,Bn])=>{t!==(Je===Bn)&&(A?.(),T(Je))},{flush:O,deep:v,immediate:!0})})];return m!=null&&G.push(J(m,w).then(()=>s(e)).finally(()=>(A?.(),s(e)))),Promise.race(G)}function o(f){return r(p=>!!p,f)}function c(f){return n(null,f)}function u(f){return n(void 0,f)}function l(f){return r(Number.isNaN,f)}function d(f,p){return r(O=>{const v=Array.from(O);return v.includes(f)||v.includes(s(f))},p)}function y(f){return _(1,f)}function _(f=1,p){let O=-1;return r(()=>(O+=1,O>=f),p)}return Array.isArray(s(e))?{toMatch:r,toContains:d,changed:y,changedTimes:_,get not(){return V(e,!t)}}:{toMatch:r,toBe:n,toBeTruthy:o,toBeNull:c,toBeNaN:l,toBeUndefined:u,changed:y,changedTimes:_,get not(){return V(e,!t)}}}function Kt(e){return V(e)}function Qt(e,t){return e===t}function Vt(...e){var t;const r=e[0],n=e[1];let o=(t=e[2])!=null?t:Qt;if(typeof o=="string"){const c=o;o=(u,l)=>u[c]===l[c]}return i.computed(()=>s(r).filter(c=>s(n).findIndex(u=>o(c,u))===-1))}function Dt(e,t){return i.computed(()=>s(e).every((r,n,o)=>t(s(r),n,o)))}function xt(e,t){return i.computed(()=>s(e).map(r=>s(r)).filter(t))}function er(e,t){return i.computed(()=>s(s(e).find((r,n,o)=>t(s(r),n,o))))}function tr(e,t){return i.computed(()=>s(e).findIndex((r,n,o)=>t(s(r),n,o)))}function rr(e,t){let r=e.length;for(;r-- >0;)if(t(e[r],r,e))return e[r]}function nr(e,t){return i.computed(()=>s(Array.prototype.findLast?s(e).findLast((r,n,o)=>t(s(r),n,o)):rr(s(e),(r,n,o)=>t(s(r),n,o))))}function or(e){return ae(e)&&ue(e,"formIndex","comparator")}function ar(...e){var t;const r=e[0],n=e[1];let o=e[2],c=0;if(or(o)&&(c=(t=o.fromIndex)!=null?t:0,o=o.comparator),typeof o=="string"){const u=o;o=(l,d)=>l[u]===s(d)}return o=o??((u,l)=>u===s(l)),i.computed(()=>s(r).slice(c).some((u,l,d)=>o(s(u),s(n),l,s(d))))}function ir(e,t){return i.computed(()=>s(e).map(r=>s(r)).join(s(t)))}function cr(e,t){return i.computed(()=>s(e).map(r=>s(r)).map(t))}function lr(e,t,...r){const n=(o,c,u)=>t(s(o),s(c),u);return i.computed(()=>{const o=s(e);return r.length?o.reduce(n,s(r[0])):o.reduce(n)})}function ur(e,t){return i.computed(()=>s(e).some((r,n,o)=>t(s(r),n,o)))}function sr(e){return Array.from(new Set(e))}function fr(e,t){return e.reduce((r,n)=>(r.some(o=>t(n,o,e))||r.push(n),r),[])}function dr(e,t){return i.computed(()=>{const r=s(e).map(n=>s(n));return t?fr(r,t):sr(r)})}function pr(e=0,t={}){let r=i.unref(e);const n=i.ref(e),{max:o=Number.POSITIVE_INFINITY,min:c=Number.NEGATIVE_INFINITY}=t,u=(f=1)=>n.value=Math.min(o,n.value+f),l=(f=1)=>n.value=Math.max(c,n.value-f),d=()=>n.value,y=f=>n.value=Math.max(c,Math.min(o,f));return{count:n,inc:u,dec:l,get:d,set:y,reset:(f=r)=>(r=f,y(f))}}const _r=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,yr=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function vr(e,t,r,n){let o=e<12?"AM":"PM";return n&&(o=o.split("").reduce((c,u)=>c+=`${u}.`,"")),r?o.toLowerCase():o}function ve(e,t,r={}){var n;const o=e.getFullYear(),c=e.getMonth(),u=e.getDate(),l=e.getHours(),d=e.getMinutes(),y=e.getSeconds(),_=e.getMilliseconds(),f=e.getDay(),p=(n=r.customMeridiem)!=null?n:vr,O={YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>c+1,MM:()=>`${c+1}`.padStart(2,"0"),MMM:()=>e.toLocaleDateString(r.locales,{month:"short"}),MMMM:()=>e.toLocaleDateString(r.locales,{month:"long"}),D:()=>String(u),DD:()=>`${u}`.padStart(2,"0"),H:()=>String(l),HH:()=>`${l}`.padStart(2,"0"),h:()=>`${l%12||12}`.padStart(1,"0"),hh:()=>`${l%12||12}`.padStart(2,"0"),m:()=>String(d),mm:()=>`${d}`.padStart(2,"0"),s:()=>String(y),ss:()=>`${y}`.padStart(2,"0"),SSS:()=>`${_}`.padStart(3,"0"),d:()=>f,dd:()=>e.toLocaleDateString(r.locales,{weekday:"narrow"}),ddd:()=>e.toLocaleDateString(r.locales,{weekday:"short"}),dddd:()=>e.toLocaleDateString(r.locales,{weekday:"long"}),A:()=>p(l,d),AA:()=>p(l,d,!1,!0),a:()=>p(l,d,!0),aa:()=>p(l,d,!0,!0)};return t.replace(yr,(v,m)=>{var w,A;return(A=m??((w=O[v])==null?void 0:w.call(O)))!=null?A:v})}function Oe(e){if(e===null)return new Date(Number.NaN);if(e===void 0)return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){const t=e.match(_r);if(t){const r=t[2]-1||0,n=(t[7]||"0").substring(0,3);return new Date(t[1],r,t[3]||1,t[4]||0,t[5]||0,t[6]||0,n)}}return new Date(e)}function Or(e,t="HH:mm:ss",r={}){return i.computed(()=>ve(Oe(s(e)),s(t),r))}function he(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:o=!1}=r;let c=null;const u=i.ref(!1);function l(){c&&(clearInterval(c),c=null)}function d(){u.value=!1,l()}function y(){const _=s(t);_<=0||(u.value=!0,o&&e(),l(),c=setInterval(e,_))}if(n&&R&&y(),i.isRef(t)||typeof t=="function"){const _=i.watch(t,()=>{u.value&&R&&y()});I(_)}return I(d),{isActive:u,pause:d,resume:y}}var hr=Object.defineProperty,we=Object.getOwnPropertySymbols,wr=Object.prototype.hasOwnProperty,mr=Object.prototype.propertyIsEnumerable,me=(e,t,r)=>t in e?hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pr=(e,t)=>{for(var r in t||(t={}))wr.call(t,r)&&me(e,r,t[r]);if(we)for(var r of we(t))mr.call(t,r)&&me(e,r,t[r]);return e};function gr(e=1e3,t={}){const{controls:r=!1,immediate:n=!0,callback:o}=t,c=i.ref(0),u=()=>c.value+=1,l=()=>{c.value=0},d=he(o?()=>{u(),o(c.value)}:u,e,{immediate:n});return r?Pr({counter:c,reset:l},d):c}function br(e,t={}){var r;const n=i.ref((r=t.initialValue)!=null?r:null);return i.watch(e,()=>n.value=ie(),t),n}function Pe(e,t,r={}){const{immediate:n=!0}=r,o=i.ref(!1);let c=null;function u(){c&&(clearTimeout(c),c=null)}function l(){o.value=!1,u()}function d(...y){u(),o.value=!0,c=setTimeout(()=>{o.value=!1,c=null,e(...y)},s(t))}return n&&(o.value=!0,R&&d()),I(l),{isPending:i.readonly(o),start:d,stop:l}}var $r=Object.defineProperty,ge=Object.getOwnPropertySymbols,Sr=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,be=(e,t,r)=>t in e?$r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jr=(e,t)=>{for(var r in t||(t={}))Sr.call(t,r)&&be(e,r,t[r]);if(ge)for(var r of ge(t))Ar.call(t,r)&&be(e,r,t[r]);return e};function Ir(e=1e3,t={}){const{controls:r=!1,callback:n}=t,o=Pe(n??E,e,t),c=i.computed(()=>!o.isPending.value);return r?jr({ready:c},o):c}function Er(e,t={}){const{method:r="parseFloat",radix:n,nanToZero:o}=t;return i.computed(()=>{let c=s(e);return typeof c=="string"&&(c=Number[r](c,n)),o&&Number.isNaN(c)&&(c=0),c})}function Tr(e){return i.computed(()=>`${s(e)}`)}function Fr(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,o=i.isRef(e),c=i.ref(e);function u(l){if(arguments.length)return c.value=l,c.value;{const d=s(r);return c.value=c.value===d?s(n):d,c.value}}return o?u:[c,u]}function Rr(e,t,r){let n=r?.immediate?[]:[...e instanceof Function?e():Array.isArray(e)?e:s(e)];return i.watch(e,(o,c,u)=>{const l=Array.from({length:n.length}),d=[];for(const _ of o){let f=!1;for(let p=0;p<n.length;p++)if(!l[p]&&_===n[p]){l[p]=!0,f=!0;break}f||d.push(_)}const y=n.filter((_,f)=>!l[f]);t(o,n,d,y,u),n=[...o]},r)}var $e=Object.getOwnPropertySymbols,Cr=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable,Nr=(e,t)=>{var r={};for(var n in e)Cr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$e)for(var n of $e(e))t.indexOf(n)<0&&Mr.call(e,n)&&(r[n]=e[n]);return r};function M(e,t,r={}){const n=r,{eventFilter:o=W}=n,c=Nr(n,["eventFilter"]);return i.watch(e,C(o,t),c)}var Se=Object.getOwnPropertySymbols,Ur=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable,Lr=(e,t)=>{var r={};for(var n in e)Ur.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Se)for(var n of Se(e))t.indexOf(n)<0&&Wr.call(e,n)&&(r[n]=e[n]);return r};function Br(e,t,r){const n=r,{count:o}=n,c=Lr(n,["count"]),u=i.ref(0),l=M(e,(...d)=>{u.value+=1,u.value>=s(o)&&i.nextTick(()=>l()),t(...d)},c);return{count:u,stop:l}}var Hr=Object.defineProperty,Yr=Object.defineProperties,Gr=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Ie=(e,t,r)=>t in e?Hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kr=(e,t)=>{for(var r in t||(t={}))Ae.call(t,r)&&Ie(e,r,t[r]);if(L)for(var r of L(t))je.call(t,r)&&Ie(e,r,t[r]);return e},zr=(e,t)=>Yr(e,Gr(t)),qr=(e,t)=>{var r={};for(var n in e)Ae.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&L)for(var n of L(e))t.indexOf(n)<0&&je.call(e,n)&&(r[n]=e[n]);return r};function Ee(e,t,r={}){const n=r,{debounce:o=0,maxWait:c=void 0}=n,u=qr(n,["debounce","maxWait"]);return M(e,t,zr(kr({},u),{eventFilter:q(o,{maxWait:c})}))}var Zr=Object.defineProperty,Jr=Object.defineProperties,Xr=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Qr=Object.prototype.propertyIsEnumerable,Fe=(e,t,r)=>t in e?Zr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vr=(e,t)=>{for(var r in t||(t={}))Kr.call(t,r)&&Fe(e,r,t[r]);if(Te)for(var r of Te(t))Qr.call(t,r)&&Fe(e,r,t[r]);return e},Dr=(e,t)=>Jr(e,Xr(t));function xr(e,t,r){return i.watch(e,t,Dr(Vr({},r),{deep:!0}))}var en=Object.defineProperty,tn=Object.defineProperties,rn=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Me=(e,t,r)=>t in e?en(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nn=(e,t)=>{for(var r in t||(t={}))Re.call(t,r)&&Me(e,r,t[r]);if(B)for(var r of B(t))Ce.call(t,r)&&Me(e,r,t[r]);return e},on=(e,t)=>tn(e,rn(t)),an=(e,t)=>{var r={};for(var n in e)Re.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&B)for(var n of B(e))t.indexOf(n)<0&&Ce.call(e,n)&&(r[n]=e[n]);return r};function D(e,t,r={}){const n=r,{eventFilter:o=W}=n,c=an(n,["eventFilter"]),u=C(o,t);let l,d,y;if(c.flush==="sync"){const _=i.ref(!1);d=()=>{},l=f=>{_.value=!0,f(),_.value=!1},y=i.watch(e,(...f)=>{_.value||u(...f)},c)}else{const _=[],f=i.ref(0),p=i.ref(0);d=()=>{f.value=p.value},_.push(i.watch(e,()=>{p.value++},on(nn({},c),{flush:"sync"}))),l=O=>{const v=p.value;O(),f.value+=p.value-v},_.push(i.watch(e,(...O)=>{const v=f.value>0&&f.value===p.value;f.value=0,p.value=0,!v&&u(...O)},c)),y=()=>{_.forEach(O=>O())}}return{stop:y,ignoreUpdates:l,ignorePrevAsyncUpdates:d}}var cn=Object.defineProperty,ln=Object.defineProperties,un=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,Ue=(e,t,r)=>t in e?cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dn=(e,t)=>{for(var r in t||(t={}))sn.call(t,r)&&Ue(e,r,t[r]);if(Ne)for(var r of Ne(t))fn.call(t,r)&&Ue(e,r,t[r]);return e},pn=(e,t)=>ln(e,un(t));function _n(e,t,r){return i.watch(e,t,pn(dn({},r),{immediate:!0}))}function yn(e,t,r){const n=i.watch(e,(...o)=>(i.nextTick(()=>n()),t(...o)),r)}var vn=Object.defineProperty,On=Object.defineProperties,hn=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Be=(e,t,r)=>t in e?vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wn=(e,t)=>{for(var r in t||(t={}))We.call(t,r)&&Be(e,r,t[r]);if(H)for(var r of H(t))Le.call(t,r)&&Be(e,r,t[r]);return e},mn=(e,t)=>On(e,hn(t)),Pn=(e,t)=>{var r={};for(var n in e)We.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&H)for(var n of H(e))t.indexOf(n)<0&&Le.call(e,n)&&(r[n]=e[n]);return r};function He(e,t,r={}){const n=r,{eventFilter:o}=n,c=Pn(n,["eventFilter"]),{eventFilter:u,pause:l,resume:d,isActive:y}=ce(o);return{stop:M(e,t,mn(wn({},c),{eventFilter:u})),pause:l,resume:d,isActive:y}}var gn=Object.defineProperty,bn=Object.defineProperties,$n=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,ke=(e,t,r)=>t in e?gn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sn=(e,t)=>{for(var r in t||(t={}))Ye.call(t,r)&&ke(e,r,t[r]);if(Y)for(var r of Y(t))Ge.call(t,r)&&ke(e,r,t[r]);return e},An=(e,t)=>bn(e,$n(t)),jn=(e,t)=>{var r={};for(var n in e)Ye.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Y)for(var n of Y(e))t.indexOf(n)<0&&Ge.call(e,n)&&(r[n]=e[n]);return r};function ze(e,t,r={}){const n=r,{throttle:o=0,trailing:c=!0,leading:u=!0}=n,l=jn(n,["throttle","trailing","leading"]);return M(e,t,An(Sn({},l),{eventFilter:Z(o,c,u)}))}var In=Object.defineProperty,En=Object.defineProperties,Tn=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,Fn=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable,Ze=(e,t,r)=>t in e?In(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cn=(e,t)=>{for(var r in t||(t={}))Fn.call(t,r)&&Ze(e,r,t[r]);if(qe)for(var r of qe(t))Rn.call(t,r)&&Ze(e,r,t[r]);return e},Mn=(e,t)=>En(e,Tn(t));function Nn(e,t,r={}){let n;function o(){if(!n)return;const _=n;n=void 0,_()}function c(_){n=_}const u=(_,f)=>(o(),t(_,f,c)),l=D(e,u,r),{ignoreUpdates:d}=l,y=()=>{let _;return d(()=>{_=u(Un(e),Wn(e))}),_};return Mn(Cn({},l),{trigger:y})}function Un(e){return i.isReactive(e)?e:Array.isArray(e)?e.map(t=>s(t)):s(e)}function Wn(e){return Array.isArray(e)?e.map(()=>{}):void 0}function Ln(e,t,r){return i.watch(e,(n,o,c)=>{n&&t(n,o,c)},r)}a.assert=st,a.autoResetRef=se,a.bypassFilter=W,a.camelize=gt,a.clamp=pt,a.computedEager=$,a.computedWithControl=S,a.containsProp=ue,a.controlledComputed=S,a.controlledRef=Ct,a.createEventHook=Xe,a.createFilterWrapper=C,a.createGlobalState=Ke,a.createInjectionState=Qe,a.createReactiveFn=k,a.createSharedComposable=Ve,a.createSingletonPromise=$t,a.debounceFilter=q,a.debouncedRef=K,a.debouncedWatch=Ee,a.directiveHooks=ht,a.eagerComputed=$,a.extendRef=te,a.formatDate=ve,a.get=De,a.hasOwn=yt,a.hyphenate=mt,a.identity=bt,a.ignorableWatch=D,a.increaseWithUnit=At,a.invoke=St,a.isClient=R,a.isDef=lt,a.isDefined=xe,a.isIOS=vt,a.isObject=ae,a.makeDestructurable=ot,a.noop=E,a.normalizeDate=Oe,a.notNullish=ut,a.now=dt,a.objectEntries=Et,a.objectOmit=It,a.objectPick=jt,a.pausableFilter=ce,a.pausableWatch=He,a.promiseTimeout=J,a.rand=_t,a.reactify=k,a.reactifyObject=it,a.reactiveComputed=z,a.reactiveOmit=ct,a.reactivePick=Ft,a.refAutoReset=se,a.refDebounced=K,a.refDefault=Rt,a.refThrottled=Q,a.refWithControl=pe,a.resolveRef=Tt,a.resolveUnref=at,a.set=Mt,a.syncRef=Nt,a.syncRefs=Ut,a.throttleFilter=Z,a.throttledRef=Q,a.throttledWatch=ze,a.timestamp=ie,a.toReactive=oe,a.toRef=X,a.toRefs=zt,a.toValue=s,a.tryOnBeforeMount=qt,a.tryOnBeforeUnmount=Zt,a.tryOnMounted=Jt,a.tryOnScopeDispose=I,a.tryOnUnmounted=Xt,a.until=Kt,a.useArrayDifference=Vt,a.useArrayEvery=Dt,a.useArrayFilter=xt,a.useArrayFind=er,a.useArrayFindIndex=tr,a.useArrayFindLast=nr,a.useArrayIncludes=ar,a.useArrayJoin=ir,a.useArrayMap=cr,a.useArrayReduce=lr,a.useArraySome=ur,a.useArrayUnique=dr,a.useCounter=pr,a.useDateFormat=Or,a.useDebounce=K,a.useDebounceFn=fe,a.useInterval=gr,a.useIntervalFn=he,a.useLastChanged=br,a.useThrottle=Q,a.useThrottleFn=de,a.useTimeout=Ir,a.useTimeoutFn=Pe,a.useToNumber=Er,a.useToString=Tr,a.useToggle=Fr,a.watchArray=Rr,a.watchAtMost=Br,a.watchDebounced=Ee,a.watchDeep=xr,a.watchIgnorable=D,a.watchImmediate=_n,a.watchOnce=yn,a.watchPausable=He,a.watchThrottled=ze,a.watchTriggerable=Nn,a.watchWithFilter=M,a.whenever=Ln})(this.VueUse=this.VueUse||{},VueDemi);
|
package/index.mjs
CHANGED
|
@@ -440,6 +440,22 @@ const directiveHooks = {
|
|
|
440
440
|
unmounted: isVue3 ? "unmounted" : "unbind"
|
|
441
441
|
};
|
|
442
442
|
|
|
443
|
+
function cacheStringFunction(fn) {
|
|
444
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
445
|
+
return (str) => {
|
|
446
|
+
const hit = cache[str];
|
|
447
|
+
return hit || (cache[str] = fn(str));
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
const hyphenateRE = /\B([A-Z])/g;
|
|
451
|
+
const hyphenate = cacheStringFunction(
|
|
452
|
+
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
453
|
+
);
|
|
454
|
+
const camelizeRE = /-(\w)/g;
|
|
455
|
+
const camelize = cacheStringFunction((str) => {
|
|
456
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
457
|
+
});
|
|
458
|
+
|
|
443
459
|
function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
|
|
444
460
|
return new Promise((resolve, reject) => {
|
|
445
461
|
if (throwOnTimeout)
|
|
@@ -721,24 +737,30 @@ var __spreadValues$9 = (a, b) => {
|
|
|
721
737
|
return a;
|
|
722
738
|
};
|
|
723
739
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
724
|
-
function toRefs(objectRef) {
|
|
740
|
+
function toRefs(objectRef, options = {}) {
|
|
725
741
|
if (!isRef(objectRef))
|
|
726
742
|
return toRefs$1(objectRef);
|
|
727
|
-
const result = Array.isArray(objectRef.value) ?
|
|
743
|
+
const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};
|
|
728
744
|
for (const key in objectRef.value) {
|
|
729
745
|
result[key] = customRef(() => ({
|
|
730
746
|
get() {
|
|
731
747
|
return objectRef.value[key];
|
|
732
748
|
},
|
|
733
749
|
set(v) {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
objectRef.value
|
|
750
|
+
var _a;
|
|
751
|
+
const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;
|
|
752
|
+
if (replaceRef) {
|
|
753
|
+
if (Array.isArray(objectRef.value)) {
|
|
754
|
+
const copy = [...objectRef.value];
|
|
755
|
+
copy[key] = v;
|
|
756
|
+
objectRef.value = copy;
|
|
757
|
+
} else {
|
|
758
|
+
const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v });
|
|
759
|
+
Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));
|
|
760
|
+
objectRef.value = newObject;
|
|
761
|
+
}
|
|
738
762
|
} else {
|
|
739
|
-
|
|
740
|
-
Object.setPrototypeOf(newObject, objectRef.value);
|
|
741
|
-
objectRef.value = newObject;
|
|
763
|
+
objectRef.value[key] = v;
|
|
742
764
|
}
|
|
743
765
|
}
|
|
744
766
|
}));
|
|
@@ -1007,17 +1029,18 @@ function useArrayUnique(list, compareFn) {
|
|
|
1007
1029
|
}
|
|
1008
1030
|
|
|
1009
1031
|
function useCounter(initialValue = 0, options = {}) {
|
|
1032
|
+
let _initialValue = unref(initialValue);
|
|
1010
1033
|
const count = ref(initialValue);
|
|
1011
1034
|
const {
|
|
1012
|
-
max =
|
|
1013
|
-
min =
|
|
1035
|
+
max = Number.POSITIVE_INFINITY,
|
|
1036
|
+
min = Number.NEGATIVE_INFINITY
|
|
1014
1037
|
} = options;
|
|
1015
1038
|
const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);
|
|
1016
1039
|
const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);
|
|
1017
1040
|
const get = () => count.value;
|
|
1018
1041
|
const set = (val) => count.value = Math.max(min, Math.min(max, val));
|
|
1019
|
-
const reset = (val =
|
|
1020
|
-
|
|
1042
|
+
const reset = (val = _initialValue) => {
|
|
1043
|
+
_initialValue = val;
|
|
1021
1044
|
return set(val);
|
|
1022
1045
|
};
|
|
1023
1046
|
return { count, inc, dec, get, set, reset };
|
|
@@ -1070,13 +1093,13 @@ function formatDate(date, formatStr, options = {}) {
|
|
|
1070
1093
|
aa: () => meridiem(hours, minutes, true, true)
|
|
1071
1094
|
};
|
|
1072
1095
|
return formatStr.replace(REGEX_FORMAT, (match, $1) => {
|
|
1073
|
-
var _a2;
|
|
1074
|
-
return $1
|
|
1096
|
+
var _a2, _b;
|
|
1097
|
+
return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;
|
|
1075
1098
|
});
|
|
1076
1099
|
}
|
|
1077
1100
|
function normalizeDate(date) {
|
|
1078
1101
|
if (date === null)
|
|
1079
|
-
return
|
|
1102
|
+
return new Date(Number.NaN);
|
|
1080
1103
|
if (date === void 0)
|
|
1081
1104
|
return /* @__PURE__ */ new Date();
|
|
1082
1105
|
if (date instanceof Date)
|
|
@@ -1317,7 +1340,7 @@ function watchArray(source, cb, options) {
|
|
|
1317
1340
|
...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)
|
|
1318
1341
|
];
|
|
1319
1342
|
return watch(source, (newList, _, onCleanup) => {
|
|
1320
|
-
const oldListRemains =
|
|
1343
|
+
const oldListRemains = Array.from({ length: oldList.length });
|
|
1321
1344
|
const added = [];
|
|
1322
1345
|
for (const obj of newList) {
|
|
1323
1346
|
let found = false;
|
|
@@ -1787,4 +1810,4 @@ function whenever(source, cb, options) {
|
|
|
1787
1810
|
);
|
|
1788
1811
|
}
|
|
1789
1812
|
|
|
1790
|
-
export { assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
|
1813
|
+
export { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueuse/shared",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"author": "Anthony Fu <https://github.com/antfu>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"funding": "https://github.com/sponsors/antfu",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
-
"types": "./index.d.ts",
|
|
25
24
|
"require": "./index.cjs",
|
|
26
25
|
"import": "./index.mjs"
|
|
27
26
|
},
|
|
@@ -31,7 +30,7 @@
|
|
|
31
30
|
"module": "./index.mjs",
|
|
32
31
|
"unpkg": "./index.iife.min.js",
|
|
33
32
|
"jsdelivr": "./index.iife.min.js",
|
|
34
|
-
"types": "./index.d.
|
|
33
|
+
"types": "./index.d.cts",
|
|
35
34
|
"dependencies": {
|
|
36
35
|
"vue-demi": ">=0.14.5"
|
|
37
36
|
}
|