@vueuse/shared 10.1.2 → 10.2.1
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 +3 -3
- package/index.d.ts +3 -6
- package/index.iife.js +5 -3
- package/index.iife.min.js +1 -1
- package/index.mjs +3 -3
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -480,7 +480,7 @@ function increaseWithUnit(target, delta) {
|
|
|
480
480
|
return target + delta;
|
|
481
481
|
const value = ((_a = target.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : _a[0]) || "";
|
|
482
482
|
const unit = target.slice(value.length);
|
|
483
|
-
const result = parseFloat(value) + delta;
|
|
483
|
+
const result = Number.parseFloat(value) + delta;
|
|
484
484
|
if (Number.isNaN(result))
|
|
485
485
|
return target;
|
|
486
486
|
return result + unit;
|
|
@@ -739,7 +739,7 @@ function toRefs(objectRef) {
|
|
|
739
739
|
objectRef.value = copy;
|
|
740
740
|
} else {
|
|
741
741
|
const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v });
|
|
742
|
-
Object.setPrototypeOf(newObject, objectRef.value);
|
|
742
|
+
Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));
|
|
743
743
|
objectRef.value = newObject;
|
|
744
744
|
}
|
|
745
745
|
}
|
|
@@ -1281,7 +1281,7 @@ function useToNumber(value, options = {}) {
|
|
|
1281
1281
|
let resolved = toValue(value);
|
|
1282
1282
|
if (typeof resolved === "string")
|
|
1283
1283
|
resolved = Number[method](resolved, radix);
|
|
1284
|
-
if (nanToZero && isNaN(resolved))
|
|
1284
|
+
if (nanToZero && Number.isNaN(resolved))
|
|
1285
1285
|
resolved = 0;
|
|
1286
1286
|
return resolved;
|
|
1287
1287
|
});
|
package/index.d.ts
CHANGED
|
@@ -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
|
/**
|
|
@@ -1045,9 +1042,9 @@ declare function watchIgnorable<T extends Readonly<WatchSource<unknown>[]>, Imme
|
|
|
1045
1042
|
declare function watchIgnorable<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
|
|
1046
1043
|
declare function watchIgnorable<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
|
|
1047
1044
|
|
|
1048
|
-
declare function watchImmediate<T extends Readonly<MultiWatchSources>>(source: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, true>>, options?: Omit<WatchOptions<true>, '
|
|
1049
|
-
declare function watchImmediate<T>(source: WatchSource<T>, cb: WatchCallback<T, T | undefined>, options?: Omit<WatchOptions<true>, '
|
|
1050
|
-
declare function watchImmediate<T extends object>(source: T, cb: WatchCallback<T, T | undefined>, options?: Omit<WatchOptions<true>, '
|
|
1045
|
+
declare function watchImmediate<T extends Readonly<MultiWatchSources>>(source: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, true>>, options?: Omit<WatchOptions<true>, 'immediate'>): WatchStopHandle;
|
|
1046
|
+
declare function watchImmediate<T>(source: WatchSource<T>, cb: WatchCallback<T, T | undefined>, options?: Omit<WatchOptions<true>, 'immediate'>): WatchStopHandle;
|
|
1047
|
+
declare function watchImmediate<T extends object>(source: T, cb: WatchCallback<T, T | undefined>, options?: Omit<WatchOptions<true>, 'immediate'>): WatchStopHandle;
|
|
1051
1048
|
|
|
1052
1049
|
declare function watchOnce<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(source: [...T], cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchOptions<Immediate>): void;
|
|
1053
1050
|
declare function watchOnce<T, Immediate extends Readonly<boolean> = false>(sources: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): void;
|
package/index.iife.js
CHANGED
|
@@ -19,6 +19,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
19
19
|
VueDemi.Vue2 = Vue
|
|
20
20
|
VueDemi.version = Vue.version
|
|
21
21
|
VueDemi.warn = Vue.util.warn
|
|
22
|
+
VueDemi.hasInjectionContext = () => !!VueDemi.getCurrentInstance()
|
|
22
23
|
function createApp(rootComponent, rootProps) {
|
|
23
24
|
var vm
|
|
24
25
|
var provide = {}
|
|
@@ -71,6 +72,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
71
72
|
VueDemi.Vue = Vue
|
|
72
73
|
VueDemi.Vue2 = Vue
|
|
73
74
|
VueDemi.version = Vue.version
|
|
75
|
+
VueDemi.hasInjectionContext = () => !!VueDemi.getCurrentInstance()
|
|
74
76
|
} else {
|
|
75
77
|
console.error('[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.')
|
|
76
78
|
}
|
|
@@ -593,7 +595,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
593
595
|
return target + delta;
|
|
594
596
|
const value = ((_a = target.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : _a[0]) || "";
|
|
595
597
|
const unit = target.slice(value.length);
|
|
596
|
-
const result = parseFloat(value) + delta;
|
|
598
|
+
const result = Number.parseFloat(value) + delta;
|
|
597
599
|
if (Number.isNaN(result))
|
|
598
600
|
return target;
|
|
599
601
|
return result + unit;
|
|
@@ -852,7 +854,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
852
854
|
objectRef.value = copy;
|
|
853
855
|
} else {
|
|
854
856
|
const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v });
|
|
855
|
-
Object.setPrototypeOf(newObject, objectRef.value);
|
|
857
|
+
Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));
|
|
856
858
|
objectRef.value = newObject;
|
|
857
859
|
}
|
|
858
860
|
}
|
|
@@ -1394,7 +1396,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1394
1396
|
let resolved = toValue(value);
|
|
1395
1397
|
if (typeof resolved === "string")
|
|
1396
1398
|
resolved = Number[method](resolved, radix);
|
|
1397
|
-
if (nanToZero && isNaN(resolved))
|
|
1399
|
+
if (nanToZero && Number.isNaN(resolved))
|
|
1398
1400
|
resolved = 0;
|
|
1399
1401
|
return resolved;
|
|
1400
1402
|
});
|
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,A){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:A},P,{provide:Object.assign(N,P.provide)})),g.$mount($,S),g)},unmount:function(){g&&(g.$destroy(),g=void 0)}};return U};var Ze=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.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}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,A){return Array.isArray(h)?(h.length=Math.max(h.length,P),h.splice(P,1,A),A):(h[P]=A,A)},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,Ze=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?T(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))A.call(t,r)&&g(e,r,t[r]);return e},U=(e,t)=>b(e,Ze(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),l=()=>{c.value=!0,o()};i.watch(e,l,{flush:"sync"});const u=typeof t=="function"?t:t.get,f=typeof t=="function"?void 0:t.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 j(e){return i.getCurrentScope()?(i.onScopeDispose(e),!0):!1}function Je(){const e=new Set,t=o=>{e.delete(o)};return{on:o=>{e.add(o);const c=()=>t(o);return j(c),{off:c}},off:t,trigger:o=>Promise.all(Array.from(e).map(c=>c(o)))}}function Xe(e){let t=!1,r;const n=i.effectScope(!0);return(...o)=>(t||(r=n.run(()=>e(...o)),t=!0),r)}function Ke(e){const t=Symbol("InjectionState");return[(...o)=>{const c=e(...o);return i.provide(t,c),c},()=>i.inject(t)]}function Qe(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))),j(o),r)}function ee(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(l){c.value=l},enumerable:r}):Object.defineProperty(e,o,{value:c,enumerable:r}));return e}function Ve(e,t){return t==null?i.unref(e):i.unref(e)[t]}function De(e){return i.unref(e)!=null}var xe=Object.defineProperty,te=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,re=(e,t,r)=>t in e?xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rt=(e,t)=>{for(var r in t||(t={}))et.call(t,r)&&re(e,r,t[r]);if(te)for(var r of te(t))tt.call(t,r)&&re(e,r,t[r]);return e};function nt(e,t){if(typeof Symbol<"u"){const r=rt({},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 ot=s;function G(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 at(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"?G(c.bind(e),n):c]}))}function ne(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 q(e){return ne(i.computed(e))}function it(e,...t){const r=t.flat(),n=r[0];return q(()=>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",ct=e=>typeof e<"u",lt=e=>e!=null,ut=(e,...t)=>{e||console.warn(...t)},st=Object.prototype.toString,oe=e=>st.call(e)==="[object Object]",ft=()=>Date.now(),ae=()=>+Date.now(),dt=(e,t,r)=>Math.min(r,Math.max(t,e)),I=()=>{},pt=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e),_t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),yt=vt();function vt(){var e;return R&&((e=window?.navigator)==null?void 0:e.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function M(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 z(e,t={}){let r,n,o=I;const c=u=>{clearTimeout(u),o(),o=I};return u=>{const f=s(e),y=s(t.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=t.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(e,t=!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(e),O=Date.now()-o,v=()=>f=p();return y(),_<=0?(o=Date.now(),v()):(O>_&&(r||!l)?(o=Date.now(),v()):t&&(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 ie(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 Ot={mounted:i.isVue3?"mounted":"inserted",updated:i.isVue3?"updated":"componentUpdated",unmounted:i.isVue3?"unmounted":"unbind"};function J(e,t=!1,r="Timeout"){return new Promise((n,o)=>{setTimeout(t?()=>o(r):n,e)})}function ht(e){return e}function wt(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 mt(e){return e()}function ce(e,...t){return t.some(r=>r in e)}function Pt(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=parseFloat(n)+t;return Number.isNaN(c)?e:c+o}function gt(e,t,r=!1){return t.reduce((n,o)=>(o in e&&(!r||e[o]!==void 0)&&(n[o]=e[o]),n),{})}function bt(e,t,r=!1){return Object.fromEntries(Object.entries(e).filter(([n,o])=>(!r||o!==void 0)&&!t.includes(n)))}function $t(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:I}))):i.ref(t)}const St=X;function At(e,...t){const r=t.flat(),n=r[0];return q(()=>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 le(e,t=1e4){return i.customRef((r,n)=>{let o=e,c;const l=()=>setTimeout(()=>{o=e,n()},s(t));return j(()=>{clearTimeout(c)}),{get(){return r(),o},set(u){o=u,n(),clearTimeout(c),c=l()}}})}function ue(e,t=200,r={}){return M(z(t,r),e)}function K(e,t=200,r={}){const n=i.ref(e.value),o=ue(()=>{n.value=e.value},t,r);return i.watch(e,()=>o()),n}function jt(e,t){return i.computed({get(){var r;return(r=e.value)!=null?r:t},set(r){e.value=r}})}function se(e,t=200,r=!1,n=!0,o=!1){return M(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=se(()=>{o.value=e.value},t,r,n);return i.watch(e,()=>c()),o}function fe(e,t={}){let r=e,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=t.onBeforeChange)==null?void 0:v.call(t,_,w))!==!1&&(r=_,(m=t.onChanged)==null||m.call(t,_,w),O&&o())}return ee(c,{get:l,set:u,untrackedGet:()=>l(!1),silentSet:_=>u(_,!1),peek:()=>l(!1),lay:_=>u(_,!1)},{enumerable:!0})}const It=fe;function Et(...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 Ft(e,t,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(e,v=>t.value=_(v),{flush:c,deep:l,immediate:u})),(f==="both"||f==="rtl")&&(p=i.watch(t,v=>e.value=O(v),{flush:c,deep:l,immediate:u})),()=>{d?.(),p?.()}}function Tt(e,t,r={}){const{flush:n="sync",deep:o=!1,immediate:c=!0}=r;return Array.isArray(t)||(t=[t]),i.watch(e,l=>t.forEach(u=>u.value=l),{flush:n,deep:o,immediate:c})}var Rt=Object.defineProperty,Mt=Object.defineProperties,Ct=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,pe=(e,t,r)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wt=(e,t)=>{for(var r in t||(t={}))Nt.call(t,r)&&pe(e,r,t[r]);if(de)for(var r of de(t))Ut.call(t,r)&&pe(e,r,t[r]);return e},Lt=(e,t)=>Mt(e,Ct(t));function Bt(e){if(!i.isRef(e))return i.toRefs(e);const t=Array.isArray(e.value)?new Array(e.value.length):{};for(const r in e.value)t[r]=i.customRef(()=>({get(){return e.value[r]},set(n){if(Array.isArray(e.value)){const o=[...e.value];o[r]=n,e.value=o}else{const o=Lt(Wt({},e.value),{[r]:n});Object.setPrototypeOf(o,e.value),e.value=o}}}));return t}function Ht(e,t=!0){i.getCurrentInstance()?i.onBeforeMount(e):t?e():i.nextTick(e)}function Yt(e){i.getCurrentInstance()&&i.onBeforeUnmount(e)}function kt(e,t=!0){i.getCurrentInstance()?i.onMounted(e):t?e():i.nextTick(e)}function Gt(e){i.getCurrentInstance()&&i.onUnmounted(e)}function V(e,t=!1){function r(p,{flush:_="sync",deep:O=!1,timeout:v,throwOnTimeout:m}={}){let w=null;const x=[new Promise(k=>{w=i.watch(e,F=>{p(F)!==t&&(w?.(),k(F))},{flush:_,deep:O,immediate:!0})})];return v!=null&&x.push(J(v,m).then(()=>s(e)).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([e,p],([ze,Cn])=>{t!==(ze===Cn)&&(E?.(),F(ze))},{flush:O,deep:v,immediate:!0})})];return m!=null&&k.push(J(m,w).then(()=>s(e)).finally(()=>(E?.(),s(e)))),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(e))?{toMatch:r,toContains:f,changed:y,changedTimes:d,get not(){return V(e,!t)}}:{toMatch:r,toBe:n,toBeTruthy:o,toBeNull:c,toBeNaN:u,toBeUndefined:l,changed:y,changedTimes:d,get not(){return V(e,!t)}}}function qt(e){return V(e)}function zt(e,t){return e===t}function Zt(...e){var t;const r=e[0],n=e[1];let o=(t=e[2])!=null?t:zt;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 Jt(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 Kt(e,t){return i.computed(()=>s(s(e).find((r,n,o)=>t(s(r),n,o))))}function Qt(e,t){return i.computed(()=>s(e).findIndex((r,n,o)=>t(s(r),n,o)))}function Vt(e,t){let r=e.length;for(;r-- >0;)if(t(e[r],r,e))return e[r]}function Dt(e,t){return i.computed(()=>s(Array.prototype.findLast?s(e).findLast((r,n,o)=>t(s(r),n,o)):Vt(s(e),(r,n,o)=>t(s(r),n,o))))}function xt(e){return oe(e)&&ce(e,"formIndex","comparator")}function er(...e){var t;const r=e[0],n=e[1];let o=e[2],c=0;if(xt(o)&&(c=(t=o.fromIndex)!=null?t: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 tr(e,t){return i.computed(()=>s(e).map(r=>s(r)).join(s(t)))}function rr(e,t){return i.computed(()=>s(e).map(r=>s(r)).map(t))}function nr(e,t,...r){const n=(o,c,l)=>t(s(o),s(c),l);return i.computed(()=>{const o=s(e);return r.length?o.reduce(n,s(r[0])):o.reduce(n)})}function or(e,t){return i.computed(()=>s(e).some((r,n,o)=>t(s(r),n,o)))}function ar(e){return Array.from(new Set(e))}function ir(e,t){return e.reduce((r,n)=>(r.some(o=>t(n,o,e))||r.push(n),r),[])}function cr(e,t){return i.computed(()=>{const r=s(e).map(n=>s(n));return t?ir(r,t):ar(r)})}function lr(e=0,t={}){const r=i.ref(e),{max:n=1/0,min:o=-1/0}=t,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=e)=>(e=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(e,t,r,n){let o=e<12?"AM":"PM";return n&&(o=o.split("").reduce((c,l)=>c+=`${l}.`,"")),r?o.toLowerCase():o}function _e(e,t,r={}){var n;const o=e.getFullYear(),c=e.getMonth(),l=e.getDate(),u=e.getHours(),f=e.getMinutes(),y=e.getSeconds(),d=e.getMilliseconds(),p=e.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:()=>e.toLocaleDateString(r.locales,{month:"short"}),MMMM:()=>e.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:()=>e.toLocaleDateString(r.locales,{weekday:"narrow"}),ddd:()=>e.toLocaleDateString(r.locales,{weekday:"short"}),dddd:()=>e.toLocaleDateString(r.locales,{weekday:"long"}),A:()=>_(u,f),AA:()=>_(u,f,!1,!0),a:()=>_(u,f,!0),aa:()=>_(u,f,!0,!0)};return t.replace(sr,(v,m)=>{var w;return m||((w=O[v])==null?void 0:w.call(O))||v})}function ye(e){if(e===null)return new Date(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(ur);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 dr(e,t="HH:mm:ss",r={}){return i.computed(()=>_e(ye(s(e)),s(t),r))}function ve(e,t=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(t);d<=0||(l.value=!0,o&&e(),u(),c=setInterval(e,d))}if(n&&R&&y(),i.isRef(t)||typeof t=="function"){const d=i.watch(t,()=>{l.value&&R&&y()});j(d)}return j(f),{isActive:l,pause:f,resume:y}}var pr=Object.defineProperty,Oe=Object.getOwnPropertySymbols,_r=Object.prototype.hasOwnProperty,yr=Object.prototype.propertyIsEnumerable,he=(e,t,r)=>t in e?pr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vr=(e,t)=>{for(var r in t||(t={}))_r.call(t,r)&&he(e,r,t[r]);if(Oe)for(var r of Oe(t))yr.call(t,r)&&he(e,r,t[r]);return e};function Or(e=1e3,t={}){const{controls:r=!1,immediate:n=!0,callback:o}=t,c=i.ref(0),l=()=>c.value+=1,u=()=>{c.value=0},f=ve(o?()=>{l(),o(c.value)}:l,e,{immediate:n});return r?vr({counter:c,reset:u},f):c}function hr(e,t={}){var r;const n=i.ref((r=t.initialValue)!=null?r:null);return i.watch(e,()=>n.value=ae(),t),n}function we(e,t,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,e(...y)},s(t))}return n&&(o.value=!0,R&&f()),j(u),{isPending:i.readonly(o),start:f,stop:u}}var wr=Object.defineProperty,me=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Pe=(e,t,r)=>t in e?wr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gr=(e,t)=>{for(var r in t||(t={}))mr.call(t,r)&&Pe(e,r,t[r]);if(me)for(var r of me(t))Pr.call(t,r)&&Pe(e,r,t[r]);return e};function br(e=1e3,t={}){const{controls:r=!1,callback:n}=t,o=we(n??I,e,t),c=i.computed(()=>!o.isPending.value);return r?gr({ready:c},o):c}function $r(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&&isNaN(c)&&(c=0),c})}function Sr(e){return i.computed(()=>`${s(e)}`)}function Ar(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,o=i.isRef(e),c=i.ref(e);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 jr(e,t,r){let n=r?.immediate?[]:[...e instanceof Function?e():Array.isArray(e)?e:s(e)];return i.watch(e,(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]);t(o,n,f,y,l),n=[...o]},r)}var ge=Object.getOwnPropertySymbols,Ir=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable,Fr=(e,t)=>{var r={};for(var n in e)Ir.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ge)for(var n of ge(e))t.indexOf(n)<0&&Er.call(e,n)&&(r[n]=e[n]);return r};function C(e,t,r={}){const n=r,{eventFilter:o=W}=n,c=Fr(n,["eventFilter"]);return i.watch(e,M(o,t),c)}var be=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,Mr=(e,t)=>{var r={};for(var n in e)Tr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&be)for(var n of be(e))t.indexOf(n)<0&&Rr.call(e,n)&&(r[n]=e[n]);return r};function Cr(e,t,r){const n=r,{count:o}=n,c=Mr(n,["count"]),l=i.ref(0),u=C(e,(...f)=>{l.value+=1,l.value>=s(o)&&i.nextTick(()=>u()),t(...f)},c);return{count:l,stop:u}}var Nr=Object.defineProperty,Ur=Object.defineProperties,Wr=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,Ae=(e,t,r)=>t in e?Nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lr=(e,t)=>{for(var r in t||(t={}))$e.call(t,r)&&Ae(e,r,t[r]);if(L)for(var r of L(t))Se.call(t,r)&&Ae(e,r,t[r]);return e},Br=(e,t)=>Ur(e,Wr(t)),Hr=(e,t)=>{var r={};for(var n in e)$e.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&&Se.call(e,n)&&(r[n]=e[n]);return r};function je(e,t,r={}){const n=r,{debounce:o=0,maxWait:c=void 0}=n,l=Hr(n,["debounce","maxWait"]);return C(e,t,Br(Lr({},l),{eventFilter:z(o,{maxWait:c})}))}var Yr=Object.defineProperty,kr=Object.defineProperties,Gr=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Ee=(e,t,r)=>t in e?Yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zr=(e,t)=>{for(var r in t||(t={}))qr.call(t,r)&&Ee(e,r,t[r]);if(Ie)for(var r of Ie(t))zr.call(t,r)&&Ee(e,r,t[r]);return e},Jr=(e,t)=>kr(e,Gr(t));function Xr(e,t,r){return i.watch(e,t,Jr(Zr({},r),{deep:!0}))}var Kr=Object.defineProperty,Qr=Object.defineProperties,Vr=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Re=(e,t,r)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dr=(e,t)=>{for(var r in t||(t={}))Fe.call(t,r)&&Re(e,r,t[r]);if(B)for(var r of B(t))Te.call(t,r)&&Re(e,r,t[r]);return e},xr=(e,t)=>Qr(e,Vr(t)),en=(e,t)=>{var r={};for(var n in e)Fe.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&&Te.call(e,n)&&(r[n]=e[n]);return r};function D(e,t,r={}){const n=r,{eventFilter:o=W}=n,c=en(n,["eventFilter"]),l=M(o,t);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(e,(...p)=>{d.value||l(...p)},c)}else{const d=[],p=i.ref(0),_=i.ref(0);f=()=>{p.value=_.value},d.push(i.watch(e,()=>{_.value++},xr(Dr({},c),{flush:"sync"}))),u=O=>{const v=_.value;O(),p.value+=_.value-v},d.push(i.watch(e,(...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 tn=Object.defineProperty,rn=Object.defineProperties,nn=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,on=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable,Ce=(e,t,r)=>t in e?tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cn=(e,t)=>{for(var r in t||(t={}))on.call(t,r)&&Ce(e,r,t[r]);if(Me)for(var r of Me(t))an.call(t,r)&&Ce(e,r,t[r]);return e},ln=(e,t)=>rn(e,nn(t));function un(e,t,r){return i.watch(e,t,ln(cn({},r),{immediate:!0}))}function sn(e,t,r){const n=i.watch(e,(...o)=>(i.nextTick(()=>n()),t(...o)),r)}var fn=Object.defineProperty,dn=Object.defineProperties,pn=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,We=(e,t,r)=>t in e?fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_n=(e,t)=>{for(var r in t||(t={}))Ne.call(t,r)&&We(e,r,t[r]);if(H)for(var r of H(t))Ue.call(t,r)&&We(e,r,t[r]);return e},yn=(e,t)=>dn(e,pn(t)),vn=(e,t)=>{var r={};for(var n in e)Ne.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&&Ue.call(e,n)&&(r[n]=e[n]);return r};function Le(e,t,r={}){const n=r,{eventFilter:o}=n,c=vn(n,["eventFilter"]),{eventFilter:l,pause:u,resume:f,isActive:y}=ie(o);return{stop:C(e,t,yn(_n({},c),{eventFilter:l})),pause:u,resume:f,isActive:y}}var On=Object.defineProperty,hn=Object.defineProperties,wn=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Ye=(e,t,r)=>t in e?On(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mn=(e,t)=>{for(var r in t||(t={}))Be.call(t,r)&&Ye(e,r,t[r]);if(Y)for(var r of Y(t))He.call(t,r)&&Ye(e,r,t[r]);return e},Pn=(e,t)=>hn(e,wn(t)),gn=(e,t)=>{var r={};for(var n in e)Be.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&&He.call(e,n)&&(r[n]=e[n]);return r};function ke(e,t,r={}){const n=r,{throttle:o=0,trailing:c=!0,leading:l=!0}=n,u=gn(n,["throttle","trailing","leading"]);return C(e,t,Pn(mn({},u),{eventFilter:Z(o,c,l)}))}var bn=Object.defineProperty,$n=Object.defineProperties,Sn=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,An=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,qe=(e,t,r)=>t in e?bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,In=(e,t)=>{for(var r in t||(t={}))An.call(t,r)&&qe(e,r,t[r]);if(Ge)for(var r of Ge(t))jn.call(t,r)&&qe(e,r,t[r]);return e},En=(e,t)=>$n(e,Sn(t));function Fn(e,t,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(),t(d,p,c)),u=D(e,l,r),{ignoreUpdates:f}=u,y=()=>{let d;return f(()=>{d=l(Tn(e),Rn(e))}),d};return En(In({},u),{trigger:y})}function Tn(e){return i.isReactive(e)?e:Array.isArray(e)?e.map(t=>s(t)):s(e)}function Rn(e){return Array.isArray(e)?e.map(()=>{}):void 0}function Mn(e,t,r){return i.watch(e,(n,o,c)=>{n&&t(n,o,c)},r)}a.assert=ut,a.autoResetRef=le,a.bypassFilter=W,a.clamp=dt,a.computedEager=$,a.computedWithControl=S,a.containsProp=ce,a.controlledComputed=S,a.controlledRef=It,a.createEventHook=Je,a.createFilterWrapper=M,a.createGlobalState=Xe,a.createInjectionState=Ke,a.createReactiveFn=G,a.createSharedComposable=Qe,a.createSingletonPromise=wt,a.debounceFilter=z,a.debouncedRef=K,a.debouncedWatch=je,a.directiveHooks=Ot,a.eagerComputed=$,a.extendRef=ee,a.formatDate=_e,a.get=Ve,a.hasOwn=_t,a.identity=ht,a.ignorableWatch=D,a.increaseWithUnit=Pt,a.invoke=mt,a.isClient=R,a.isDef=ct,a.isDefined=De,a.isIOS=yt,a.isObject=oe,a.makeDestructurable=nt,a.noop=I,a.normalizeDate=ye,a.notNullish=lt,a.now=ft,a.objectEntries=$t,a.objectOmit=bt,a.objectPick=gt,a.pausableFilter=ie,a.pausableWatch=Le,a.promiseTimeout=J,a.rand=pt,a.reactify=G,a.reactifyObject=at,a.reactiveComputed=q,a.reactiveOmit=it,a.reactivePick=At,a.refAutoReset=le,a.refDebounced=K,a.refDefault=jt,a.refThrottled=Q,a.refWithControl=fe,a.resolveRef=St,a.resolveUnref=ot,a.set=Et,a.syncRef=Ft,a.syncRefs=Tt,a.throttleFilter=Z,a.throttledRef=Q,a.throttledWatch=ke,a.timestamp=ae,a.toReactive=ne,a.toRef=X,a.toRefs=Bt,a.toValue=s,a.tryOnBeforeMount=Ht,a.tryOnBeforeUnmount=Yt,a.tryOnMounted=kt,a.tryOnScopeDispose=j,a.tryOnUnmounted=Gt,a.until=qt,a.useArrayDifference=Zt,a.useArrayEvery=Jt,a.useArrayFilter=Xt,a.useArrayFind=Kt,a.useArrayFindIndex=Qt,a.useArrayFindLast=Dt,a.useArrayIncludes=er,a.useArrayJoin=tr,a.useArrayMap=rr,a.useArrayReduce=nr,a.useArraySome=or,a.useArrayUnique=cr,a.useCounter=lr,a.useDateFormat=dr,a.useDebounce=K,a.useDebounceFn=ue,a.useInterval=Or,a.useIntervalFn=ve,a.useLastChanged=hr,a.useThrottle=Q,a.useThrottleFn=se,a.useTimeout=br,a.useTimeoutFn=we,a.useToNumber=$r,a.useToString=Sr,a.useToggle=Ar,a.watchArray=jr,a.watchAtMost=Cr,a.watchDebounced=je,a.watchDeep=Xr,a.watchIgnorable=D,a.watchImmediate=un,a.watchOnce=sn,a.watchPausable=Le,a.watchThrottled=ke,a.watchTriggerable=Fn,a.watchWithFilter=C,a.whenever=Mn})(this.VueUse=this.VueUse||{},VueDemi);
|
|
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 tt=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,tt=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,tt(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,_=i.customRef((d,p)=>(n=d,o=p,{get(){return c.value&&(r=u(),c.value=!1),n(),r},set(y){f?.(y)}}));return Object.isExtensible(_)&&(_.trigger=l),_}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 et(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,rt=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,nt=(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)&&nt(t,r,e[r]);if(rt)for(var r of rt(e))ee.call(e,r)&&nt(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 ot(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 ot(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,at=t=>se.call(t)==="[object Object]",fe=()=>Date.now(),it=()=>+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),ye=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),_e=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),_=s(e.maxWait);return r&&c(r),f<=0||_!==void 0&&_<=0?(n&&(c(n),n=null),Promise.resolve(u())):new Promise((d,p)=>{o=e.rejectOnCancel?p:d,_&&!n&&(n=setTimeout(()=>{r&&c(r),n=null,d(u())},_)),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 _=()=>{c&&(clearTimeout(c),c=void 0,u(),u=I)};return p=>{const y=s(t),O=Date.now()-o,v=()=>f=p();return _(),y<=0?(o=Date.now(),v()):(O>y&&(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()),_()},Math.max(0,y-O))})),!r&&!c&&(c=setTimeout(()=>l=!0,y)),l=!1,f)}}function ct(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 lt(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 ut(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 st(t,e=200,r={}){return M(z(e,r),t)}function K(t,e=200,r={}){const n=i.ref(t.value),o=st(()=>{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 ft(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=ft(()=>{o.value=t.value},e,r,n);return i.watch(t,()=>c()),o}function dt(t,e={}){let r=t,n,o;const c=i.customRef((y,O)=>(n=y,o=O,{get(){return l()},set(v){u(v)}}));function l(y=!0){return y&&n(),r}function u(y,O=!0){var v,m;if(y===r)return;const w=r;((v=e.onBeforeChange)==null?void 0:v.call(e,y,w))!==!1&&(r=y,(m=e.onChanged)==null||m.call(e,y,w),O&&o())}return et(c,{get:l,set:u,untrackedGet:()=>l(!1),silentSet:y=>u(y,!1),peek:()=>l(!1),lay:y=>u(y,!1)},{enumerable:!0})}const Ie=dt;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:_={}}=r;let d,p;const y=(n=_.ltr)!=null?n:v=>v,O=(o=_.rtl)!=null?o:v=>v;return(f==="both"||f==="ltr")&&(d=i.watch(t,v=>e.value=y(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,pt=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,yt=(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)&&yt(t,r,e[r]);if(pt)for(var r of pt(e))Ue.call(e,r)&&yt(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,Object.getPrototypeOf(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:y="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:y,deep:O,immediate:!0})})];return v!=null&&x.push(J(v,m).then(()=>s(t)).finally(()=>w?.())),Promise.race(x)}function n(p,y){if(!i.isRef(p))return r(F=>F===p,y);const{flush:O="sync",deep:v=!1,timeout:m,throwOnTimeout:w}=y??{};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(y=>!!y,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,y){return r(O=>{const v=Array.from(O);return v.includes(p)||v.includes(s(p))},y)}function _(p){return d(1,p)}function d(p=1,y){let O=-1;return r(()=>(O+=1,O>=p),y)}return Array.isArray(s(t))?{toMatch:r,toContains:f,changed:_,changedTimes:d,get not(){return V(t,!e)}}:{toMatch:r,toBe:n,toBeTruthy:o,toBeNull:c,toBeNaN:u,toBeUndefined:l,changed:_,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 at(t)&<(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(),_=t.getSeconds(),d=t.getMilliseconds(),p=t.getDay(),y=(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(_),ss:()=>`${_}`.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:()=>y(u,f),AA:()=>y(u,f,!1,!0),a:()=>y(u,f,!0),aa:()=>y(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 vt(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(vt(s(t)),s(e),r))}function Ot(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 _(){const d=s(e);d<=0||(l.value=!0,o&&t(),u(),c=setInterval(t,d))}if(n&&R&&_(),i.isRef(e)||typeof e=="function"){const d=i.watch(e,()=>{l.value&&R&&_()});A(d)}return A(f),{isActive:l,pause:f,resume:_}}var pr=Object.defineProperty,ht=Object.getOwnPropertySymbols,yr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable,wt=(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={}))yr.call(e,r)&&wt(t,r,e[r]);if(ht)for(var r of ht(e))_r.call(e,r)&&wt(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=Ot(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=it(),e),n}function mt(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(..._){l(),o.value=!0,c=setTimeout(()=>{o.value=!1,c=null,t(..._)},s(e))}return n&&(o.value=!0,R&&f()),A(u),{isPending:i.readonly(o),start:f,stop:u}}var wr=Object.defineProperty,Pt=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,gt=(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)&>(t,r,e[r]);if(Pt)for(var r of Pt(e))Pr.call(e,r)&>(t,r,e[r]);return t};function br(t=1e3,e={}){const{controls:r=!1,callback:n}=e,o=mt(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 y=0;y<n.length;y++)if(!u[y]&&d===n[y]){u[y]=!0,p=!0;break}p||f.push(d)}const _=n.filter((d,p)=>!u[p]);e(o,n,f,_,l),n=[...o]},r)}var bt=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&&bt)for(var n of bt(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 $t=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&&$t)for(var n of $t(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,St=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,At=(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={}))St.call(e,r)&&At(t,r,e[r]);if(L)for(var r of L(e))jt.call(e,r)&&At(t,r,e[r]);return t},Br=(t,e)=>Ur(t,Wr(e)),Hr=(t,e)=>{var r={};for(var n in t)St.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&&jt.call(t,n)&&(r[n]=t[n]);return r};function It(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,Et=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Ft=(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)&&Ft(t,r,e[r]);if(Et)for(var r of Et(e))zr.call(e,r)&&Ft(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,Tt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Mt=(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={}))Tt.call(e,r)&&Mt(t,r,e[r]);if(B)for(var r of B(e))Rt.call(e,r)&&Mt(t,r,e[r]);return t},xr=(t,e)=>Qr(t,Vr(e)),tn=(t,e)=>{var r={};for(var n in t)Tt.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&&Rt.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,_;if(c.flush==="sync"){const d=i.ref(!1);f=()=>{},u=p=>{d.value=!0,p(),d.value=!1},_=i.watch(t,(...p)=>{d.value||l(...p)},c)}else{const d=[],p=i.ref(0),y=i.ref(0);f=()=>{p.value=y.value},d.push(i.watch(t,()=>{y.value++},xr(Dr({},c),{flush:"sync"}))),u=O=>{const v=y.value;O(),p.value+=y.value-v},d.push(i.watch(t,(...O)=>{const v=p.value>0&&p.value===y.value;p.value=0,y.value=0,!v&&l(...O)},c)),_=()=>{d.forEach(O=>O())}}return{stop:_,ignoreUpdates:u,ignorePrevAsyncUpdates:f}}var en=Object.defineProperty,rn=Object.defineProperties,nn=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,on=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable,Nt=(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)&&Nt(t,r,e[r]);if(Ct)for(var r of Ct(e))an.call(e,r)&&Nt(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,Ut=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,Lt=(t,e,r)=>e in t?fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yn=(t,e)=>{for(var r in e||(e={}))Ut.call(e,r)&&Lt(t,r,e[r]);if(H)for(var r of H(e))Wt.call(e,r)&&Lt(t,r,e[r]);return t},_n=(t,e)=>dn(t,pn(e)),vn=(t,e)=>{var r={};for(var n in t)Ut.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&&Wt.call(t,n)&&(r[n]=t[n]);return r};function Bt(t,e,r={}){const n=r,{eventFilter:o}=n,c=vn(n,["eventFilter"]),{eventFilter:l,pause:u,resume:f,isActive:_}=ct(o);return{stop:C(t,e,_n(yn({},c),{eventFilter:l})),pause:u,resume:f,isActive:_}}var On=Object.defineProperty,hn=Object.defineProperties,wn=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,kt=(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={}))Ht.call(e,r)&&kt(t,r,e[r]);if(Y)for(var r of Y(e))Yt.call(e,r)&&kt(t,r,e[r]);return t},Pn=(t,e)=>hn(t,wn(e)),gn=(t,e)=>{var r={};for(var n in t)Ht.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&&Yt.call(t,n)&&(r[n]=t[n]);return r};function Gt(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,qt=Object.getOwnPropertySymbols,jn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,zt=(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)&&zt(t,r,e[r]);if(qt)for(var r of qt(e))An.call(e,r)&&zt(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,_=()=>{let d;return f(()=>{d=l(Tn(t),Rn(t))}),d};return En(In({},u),{trigger:_})}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=ut,a.bypassFilter=W,a.clamp=de,a.computedEager=$,a.computedWithControl=S,a.containsProp=lt,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=It,a.directiveHooks=Oe,a.eagerComputed=$,a.extendRef=et,a.formatDate=_t,a.get=Vt,a.hasOwn=ye,a.identity=he,a.ignorableWatch=D,a.increaseWithUnit=Pe,a.invoke=me,a.isClient=R,a.isDef=ce,a.isDefined=Dt,a.isIOS=_e,a.isObject=at,a.makeDestructurable=ne,a.noop=I,a.normalizeDate=vt,a.notNullish=le,a.now=fe,a.objectEntries=$e,a.objectOmit=be,a.objectPick=ge,a.pausableFilter=ct,a.pausableWatch=Bt,a.promiseTimeout=J,a.rand=pe,a.reactify=G,a.reactifyObject=ae,a.reactiveComputed=q,a.reactiveOmit=ie,a.reactivePick=je,a.refAutoReset=ut,a.refDebounced=K,a.refDefault=Ae,a.refThrottled=Q,a.refWithControl=dt,a.resolveRef=Se,a.resolveUnref=oe,a.set=Ee,a.syncRef=Fe,a.syncRefs=Te,a.throttleFilter=Z,a.throttledRef=Q,a.throttledWatch=Gt,a.timestamp=it,a.toReactive=ot,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=st,a.useInterval=Or,a.useIntervalFn=Ot,a.useLastChanged=hr,a.useThrottle=Q,a.useThrottleFn=ft,a.useTimeout=br,a.useTimeoutFn=mt,a.useToNumber=$r,a.useToString=Sr,a.useToggle=jr,a.watchArray=Ar,a.watchAtMost=Cr,a.watchDebounced=It,a.watchDeep=Xr,a.watchIgnorable=D,a.watchImmediate=un,a.watchOnce=sn,a.watchPausable=Bt,a.watchThrottled=Gt,a.watchTriggerable=Fn,a.watchWithFilter=C,a.whenever=Mn})(this.VueUse=this.VueUse||{},VueDemi);
|
package/index.mjs
CHANGED
|
@@ -478,7 +478,7 @@ function increaseWithUnit(target, delta) {
|
|
|
478
478
|
return target + delta;
|
|
479
479
|
const value = ((_a = target.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : _a[0]) || "";
|
|
480
480
|
const unit = target.slice(value.length);
|
|
481
|
-
const result = parseFloat(value) + delta;
|
|
481
|
+
const result = Number.parseFloat(value) + delta;
|
|
482
482
|
if (Number.isNaN(result))
|
|
483
483
|
return target;
|
|
484
484
|
return result + unit;
|
|
@@ -737,7 +737,7 @@ function toRefs(objectRef) {
|
|
|
737
737
|
objectRef.value = copy;
|
|
738
738
|
} else {
|
|
739
739
|
const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v });
|
|
740
|
-
Object.setPrototypeOf(newObject, objectRef.value);
|
|
740
|
+
Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));
|
|
741
741
|
objectRef.value = newObject;
|
|
742
742
|
}
|
|
743
743
|
}
|
|
@@ -1279,7 +1279,7 @@ function useToNumber(value, options = {}) {
|
|
|
1279
1279
|
let resolved = toValue(value);
|
|
1280
1280
|
if (typeof resolved === "string")
|
|
1281
1281
|
resolved = Number[method](resolved, radix);
|
|
1282
|
-
if (nanToZero && isNaN(resolved))
|
|
1282
|
+
if (nanToZero && Number.isNaN(resolved))
|
|
1283
1283
|
resolved = 0;
|
|
1284
1284
|
return resolved;
|
|
1285
1285
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueuse/shared",
|
|
3
|
-
"version": "10.1
|
|
3
|
+
"version": "10.2.1",
|
|
4
4
|
"author": "Anthony Fu <https://github.com/antfu>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"funding": "https://github.com/sponsors/antfu",
|
|
@@ -33,6 +33,6 @@
|
|
|
33
33
|
"jsdelivr": "./index.iife.min.js",
|
|
34
34
|
"types": "./index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"vue-demi": ">=0.14.
|
|
36
|
+
"vue-demi": ">=0.14.5"
|
|
37
37
|
}
|
|
38
38
|
}
|