Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vueuse/components

Package Overview
Dependencies
Maintainers
3
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vueuse/components - npm Package Compare versions

Comparing version 9.7.0 to 9.8.0

2

index.d.ts

@@ -28,3 +28,3 @@ import * as vue_demi from 'vue-demi';

*/
ignore?: MaybeElementRef[];
ignore?: (MaybeElementRef | string)[];
/**

@@ -31,0 +31,0 @@ * Use capturing phase for internal event listener.

@@ -1,1 +0,1 @@

var VueDemi=function(s,n,f){if(s.install)return s;if(!n)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),s;if(n.version.slice(0,4)==="2.7."){let y=function(w,b){var A,N={},R={config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),provide:function(M,T){return N[M]=T,this},directive:function(M,T){return T?(n.directive(M,T),R):n.directive(M)},mount:function(M,T){return A||(A=new n(Object.assign({propsData:b},w,{provide:Object.assign(N,w.provide)})),A.$mount(M,T),A)},unmount:function(){A&&(A.$destroy(),A=void 0)}};return R};var Me=y;for(var u in n)s[u]=n[u];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version,s.warn=n.util.warn,s.createApp=y}else if(n.version.slice(0,2)==="2.")if(f){for(var u in f)s[u]=f[u];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var u in n)s[u]=n[u];s.isVue2=!1,s.isVue3=!0,s.install=function(){},s.Vue=n,s.Vue2=void 0,s.version=n.version,s.set=function(y,w,b){return Array.isArray(y)?(y.length=Math.max(y.length,w),y.splice(w,1,b),b):(y[w]=b,b)},s.del=function(y,w){if(Array.isArray(y)){y.splice(w,1);return}delete y[w]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");return s}(this.VueDemi=this.VueDemi||(typeof VueDemi!="undefined"?VueDemi:{}),this.Vue||(typeof Vue!="undefined"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI!="undefined"?VueCompositionAPI:void 0));(function(s,n,f,u){"use strict";const Me=n.defineComponent({name:"OnClickOutside",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return f.onClickOutside(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}});function y(t){var e;const r=u.resolveUnref(t);return(e=r==null?void 0:r.$el)!=null?e:r}const w=u.isClient?window:void 0;function b(...t){let e,r,o,a;if(u.isString(t[0])||Array.isArray(t[0])?([r,o,a]=t,e=w):[e,r,o,a]=t,!e)return u.noop;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach(d=>d()),i.length=0},c=(d,O,P)=>(d.addEventListener(O,P,a),()=>d.removeEventListener(O,P,a)),v=n.watch(()=>y(e),d=>{l(),!!d&&i.push(...r.flatMap(O=>o.map(P=>c(d,O,P))))},{immediate:!0,flush:"post"}),p=()=>{v(),l()};return u.tryOnScopeDispose(p),p}function A(t,e,r={}){const{window:o=w,ignore:a,capture:i=!0,detectIframe:l=!1}=r;if(!o)return;let c=!0,v;const p=_=>{o.clearTimeout(v);const g=y(t);if(!(!g||g===_.target||_.composedPath().includes(g))){if(!c){c=!0;return}e(_)}},d=_=>a&&a.some(g=>{const h=y(g);return h&&(_.target===h||_.composedPath().includes(h))}),O=[b(o,"click",p,{passive:!0,capture:i}),b(o,"pointerdown",_=>{const g=y(t);g&&(c=!_.composedPath().includes(g)&&!d(_))},{passive:!0}),b(o,"pointerup",_=>{if(_.button===0){const g=_.composedPath();_.composedPath=()=>g,v=o.setTimeout(()=>p(_),50)}},{passive:!0}),l&&b(o,"blur",_=>{var g;const h=y(t);((g=o.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!(h==null?void 0:h.contains(o.document.activeElement))&&e(_)})].filter(Boolean);return()=>O.forEach(_=>_())}const N={[u.directiveHooks.mounted](t,e){const r=!e.modifiers.bubble;if(typeof e.value=="function")t.__onClickOutside_stop=A(t,e.value,{capture:r});else{const[o,a]=e.value;t.__onClickOutside_stop=A(t,o,Object.assign({capture:r},a))}},[u.directiveHooks.unmounted](t){t.__onClickOutside_stop()}},R=t=>typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0;function M(...t){let e,r,o={};t.length===3?(e=t[0],r=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],o=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:a=w,eventName:i="keydown",passive:l=!1}=o,c=R(e);return b(a,i,p=>{c(p)&&r(p)},l)}var T=Object.defineProperty,J=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,G=(t,e,r)=>e in t?T(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)&&G(t,r,e[r]);if(J)for(var r of J(e))Ne.call(e,r)&&G(t,r,e[r]);return t};const He={[u.directiveHooks.mounted](t,e){var r,o;const a=(o=(r=e.arg)==null?void 0:r.split(","))!=null?o:!0;if(typeof e.value=="function")M(a,e.value,{target:t});else{const[i,l]=e.value;M(a,i,Re({target:t},l))}}},ze=500;function k(t,e,r){var o,a;const i=n.computed(()=>y(t));let l;function c(){l&&(clearTimeout(l),l=void 0)}function v(d){var O,P,_,g;((O=r==null?void 0:r.modifiers)==null?void 0:O.self)&&d.target!==i.value||(c(),((P=r==null?void 0:r.modifiers)==null?void 0:P.prevent)&&d.preventDefault(),((_=r==null?void 0:r.modifiers)==null?void 0:_.stop)&&d.stopPropagation(),l=setTimeout(()=>e(d),(g=r==null?void 0:r.delay)!=null?g:ze))}const p={capture:(o=r==null?void 0:r.modifiers)==null?void 0:o.capture,once:(a=r==null?void 0:r.modifiers)==null?void 0:a.once};b(i,"pointerdown",v,p),b(i,"pointerup",c,p),b(i,"pointerleave",c,p)}const Ve=n.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return k(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}}),q={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?k(t,e.value,{modifiers:e.modifiers}):k(t,...e.value)}},ke=n.defineComponent({name:"UseActiveElement",setup(t,{slots:e}){const r=n.reactive({element:f.useActiveElement()});return()=>{if(e.default)return e.default(r)}}}),Be=n.defineComponent({name:"UseBattery",setup(t,{slots:e}){const r=n.reactive(f.useBattery(t));return()=>{if(e.default)return e.default(r)}}}),We=n.defineComponent({name:"UseBrowserLocation",setup(t,{slots:e}){const r=n.reactive(f.useBrowserLocation());return()=>{if(e.default)return e.default(r)}}}),B=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},W="__vueuse_ssr_handlers__";B[W]=B[W]||{};const Fe=B[W];function Q(t,e){return Fe[t]||e}function Ke(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}var Je=Object.defineProperty,X=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Y=(t,e,r)=>e in t?Je(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Z=(t,e)=>{for(var r in e||(e={}))Ge.call(e,r)&&Y(t,r,e[r]);if(X)for(var r of X(e))qe.call(e,r)&&Y(t,r,e[r]);return t};const Qe={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}};function Xe(t,e,r,o={}){var a;const{flush:i="pre",deep:l=!0,listenToStorageChanges:c=!0,writeDefaults:v=!0,mergeDefaults:p=!1,shallow:d,window:O=w,eventFilter:P,onError:_=m=>{console.error(m)}}=o,g=(d?n.shallowRef:n.ref)(e);if(!r)try{r=Q("getDefaultStorage",()=>{var m;return(m=w)==null?void 0:m.localStorage})()}catch(m){_(m)}if(!r)return g;const h=u.resolveUnref(e),S=Ke(h),C=(a=o.serializer)!=null?a:Qe[S],{pause:I,resume:U}=u.pausableWatch(g,()=>$(g.value),{flush:i,deep:l,eventFilter:P});return O&&c&&b(O,"storage",j),j(),g;function $(m){try{m==null?r.removeItem(t):r.setItem(t,C.write(m))}catch(L){_(L)}}function E(m){I();try{const L=m?m.newValue:r.getItem(t);if(L==null)return v&&h!==null&&r.setItem(t,C.write(h)),h;if(!m&&p){const V=C.read(L);return u.isFunction(p)?p(V,h):S==="object"&&!Array.isArray(V)?Z(Z({},h),V):V}else return typeof L!="string"?L:C.read(L)}catch(L){_(L)}finally{U()}}function j(m){if(!(m&&m.storageArea!==r)){if(m&&m.key===null){g.value=h;return}m&&m.key!==t||(g.value=E(m))}}}function F(t,e=!1){const r=n.ref(),o=()=>r.value=Boolean(t());return o(),u.tryOnMounted(o,e),r}function Ye(t,e={}){const{window:r=w}=e,o=F(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let a;const i=n.ref(!1),l=()=>{!a||("removeEventListener"in a?a.removeEventListener("change",c):a.removeListener(c))},c=()=>{!o.value||(l(),a=r.matchMedia(u.resolveRef(t).value),i.value=a.matches,"addEventListener"in a?a.addEventListener("change",c):a.addListener(c))};return n.watchEffect(c),u.tryOnScopeDispose(()=>l()),i}function Ze(t){return Ye("(prefers-color-scheme: dark)",t)}var xe=Object.defineProperty,x=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,D=(t,e,r)=>e in t?xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,tt=(t,e)=>{for(var r in e||(e={}))De.call(e,r)&&D(t,r,e[r]);if(x)for(var r of x(e))et.call(e,r)&&D(t,r,e[r]);return t};function rt(t={}){const{selector:e="html",attribute:r="class",initialValue:o="auto",window:a=w,storage:i,storageKey:l="vueuse-color-scheme",listenToStorageChanges:c=!0,storageRef:v,emitAuto:p}=t,d=tt({auto:"",light:"light",dark:"dark"},t.modes||{}),O=Ze({window:a}),P=n.computed(()=>O.value?"dark":"light"),_=v||(l==null?n.ref(o):Xe(l,o,i,{window:a,listenToStorageChanges:c})),g=n.computed({get(){return _.value==="auto"&&!p?P.value:_.value},set(I){_.value=I}}),h=Q("updateHTMLAttrs",(I,U,$)=>{const E=a==null?void 0:a.document.querySelector(I);if(!!E)if(U==="class"){const j=$.split(/\s/g);Object.values(d).flatMap(m=>(m||"").split(/\s/g)).filter(Boolean).forEach(m=>{j.includes(m)?E.classList.add(m):E.classList.remove(m)})}else E.setAttribute(U,$)});function S(I){var U;const $=I==="auto"?P.value:I;h(e,r,(U=d[$])!=null?U:$)}function C(I){t.onChanged?t.onChanged(I,S):S(I)}return n.watch(g,C,{flush:"post",immediate:!0}),p&&n.watch(P,()=>C(g.value),{flush:"post"}),u.tryOnMounted(()=>C(g.value)),g}const nt=n.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(t,{slots:e}){const r=rt(t),o=n.reactive({mode:r});return()=>{if(e.default)return e.default(o)}}}),ot=n.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(t,{slots:e}){const r=f.useDark(t),o=n.reactive({isDark:r,toggleDark:u.useToggle(r)});return()=>{if(e.default)return e.default(o)}}}),at=n.defineComponent({name:"UseDeviceMotion",setup(t,{slots:e}){const r=n.reactive(f.useDeviceMotion());return()=>{if(e.default)return e.default(r)}}}),st=n.defineComponent({name:"UseDeviceOrientation",setup(t,{slots:e}){const r=n.reactive(f.useDeviceOrientation());return()=>{if(e.default)return e.default(r)}}}),lt=n.defineComponent({name:"UseDevicePixelRatio",setup(t,{slots:e}){const r=n.reactive({pixelRatio:f.useDevicePixelRatio()});return()=>{if(e.default)return e.default(r)}}}),it=n.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(t,{slots:e}){const r=n.reactive(f.useDevicesList(t));return()=>{if(e.default)return e.default(r)}}}),ct=n.defineComponent({name:"UseDocumentVisibility",setup(t,{slots:e}){const r=n.reactive({visibility:f.useDocumentVisibility()});return()=>{if(e.default)return e.default(r)}}});var ut=Object.defineProperty,ft=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,te=(t,e,r)=>e in t?ut(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_t=(t,e)=>{for(var r in e||(e={}))pt.call(e,r)&&te(t,r,e[r]);if(ee)for(var r of ee(e))vt.call(e,r)&&te(t,r,e[r]);return t},gt=(t,e)=>ft(t,dt(e));const Ot=n.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle"],setup(t,{slots:e}){const r=n.ref(),o=n.computed(()=>{var l;return(l=t.handle)!=null?l:r.value}),a=t.storageKey?f.useStorage(t.storageKey,u.resolveUnref(t.initialValue)||{x:0,y:0},f.isClient?t.storageType==="session"?sessionStorage:localStorage:void 0):t.initialValue||{x:0,y:0},i=n.reactive(f.useDraggable(r,gt(_t({},t),{handle:o,initialValue:a})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r,style:`touch-action:none;${i.style}`},e.default(i))}}}),mt=n.defineComponent({name:"UseElementBounding",props:["box","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(f.useElementBounding(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function yt(t){const e=n.ref(!1);return b(t,"mouseenter",()=>e.value=!0),b(t,"mouseleave",()=>e.value=!1),e}const Pt={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=yt(t);n.watch(r,o=>e.value(o))}}},ht=n.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(f.useElementSize(r,{width:t.width,height:t.height},{box:t.box}));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var re=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Ut=(t,e)=>{var r={};for(var o in t)wt.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&re)for(var o of re(t))e.indexOf(o)<0&&bt.call(t,o)&&(r[o]=t[o]);return r};function St(t,e,r={}){const o=r,{window:a=w}=o,i=Ut(o,["window"]);let l;const c=F(()=>a&&"ResizeObserver"in a),v=()=>{l&&(l.disconnect(),l=void 0)},p=n.watch(()=>y(t),O=>{v(),c.value&&a&&O&&(l=new ResizeObserver(e),l.observe(O,i))},{immediate:!0,flush:"post"}),d=()=>{v(),p()};return u.tryOnScopeDispose(d),{isSupported:c,stop:d}}function $t(t,e={width:0,height:0},r={}){const{box:o="content-box"}=r,a=n.ref(e.width),i=n.ref(e.height);return St(t,([l])=>{const c=o==="border-box"?l.borderBoxSize:o==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;c?(a.value=c.reduce((v,{inlineSize:p})=>v+p,0),i.value=c.reduce((v,{blockSize:p})=>v+p,0)):(a.value=l.contentRect.width,i.value=l.contentRect.height)},r),n.watch(()=>y(t),l=>{a.value=l?e.width:0,i.value=l?e.height:0}),{width:a,height:i}}const Ct={[u.directiveHooks.mounted](t,e){var r;const o=typeof e.value=="function"?e.value:(r=e.value)==null?void 0:r[0],a=typeof e.value=="function"?[]:e.value.slice(1),{width:i,height:l}=$t(t,...a);n.watch([i,l],([c,v])=>o({width:c,height:v}))}},Et=n.defineComponent({name:"UseElementVisibility",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive({isVisible:f.useElementVisibility(r)});return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function ne(t,{window:e=w,scrollTarget:r}={}){const o=n.ref(!1),a=()=>{if(!e)return;const i=e.document,l=y(t);if(!l)o.value=!1;else{const c=l.getBoundingClientRect();o.value=c.top<=(e.innerHeight||i.documentElement.clientHeight)&&c.left<=(e.innerWidth||i.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return n.watch(()=>y(t),()=>a(),{immediate:!0,flush:"post"}),e&&b(r||e,"scroll",a,{capture:!1,passive:!0}),o}const jt={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=ne(t);n.watch(o,a=>r(a),{immediate:!0})}else{const[r,o]=e.value,a=ne(t,o);n.watch(a,i=>r(i),{immediate:!0})}}},It=n.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(t,{slots:e}){const r=n.reactive(f.useEyeDropper());return()=>{if(e.default)return e.default(r)}}}),Lt=n.defineComponent({name:"UseFullscreen",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(f.useFullscreen(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),At=n.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(t,{slots:e}){const r=n.reactive(f.useGeolocation(t));return()=>{if(e.default)return e.default(r)}}}),Mt=n.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(t,{slots:e}){const r=n.reactive(f.useIdle(t.timeout,t));return()=>{if(e.default)return e.default(r)}}});function Tt(t,e,r){const{immediate:o=!0,delay:a=0,onError:i=u.noop,resetOnExecute:l=!0,shallow:c=!0,throwError:v}=r??{},p=c?n.shallowRef(e):n.ref(e),d=n.ref(!1),O=n.ref(!1),P=n.ref(void 0);async function _(g=0,...h){l&&(p.value=e),P.value=void 0,d.value=!1,O.value=!0,g>0&&await u.promiseTimeout(g);const S=typeof t=="function"?t(...h):t;try{const C=await S;p.value=C,d.value=!0}catch(C){if(P.value=C,i(C),v)throw P}finally{O.value=!1}return p.value}return o&&_(a),{state:p,isReady:d,isLoading:O,error:P,execute:_}}var Nt=Object.defineProperty,oe=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,ae=(t,e,r)=>e in t?Nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zt=(t,e)=>{for(var r in e||(e={}))Rt.call(e,r)&&ae(t,r,e[r]);if(oe)for(var r of oe(e))Ht.call(e,r)&&ae(t,r,e[r]);return t};async function Vt(t){return new Promise((e,r)=>{const o=new Image,{src:a,srcset:i,sizes:l}=t;o.src=a,i&&(o.srcset=i),l&&(o.sizes=l),o.onload=()=>e(o),o.onerror=r})}const kt=(t,e={})=>{const r=Tt(()=>Vt(u.resolveUnref(t)),void 0,zt({resetOnExecute:!0},e));return n.watch(()=>u.resolveUnref(t),()=>r.execute(e.delay),{deep:!0}),r},Bt=n.defineComponent({name:"UseImage",props:["src","srcset","sizes","as"],setup(t,{slots:e}){const r=n.reactive(kt(t));return()=>r.isLoading&&e.loading?e.loading(r):r.error&&e.error?e.error(r.error):e.default?e.default(r):n.h(t.as||"img",t)}}),se=1;function K(t,e={}){const{throttle:r=0,idle:o=200,onStop:a=u.noop,onScroll:i=u.noop,offset:l={left:0,right:0,top:0,bottom:0},eventListenerOptions:c={capture:!1,passive:!0},behavior:v="auto"}=e,p=n.ref(0),d=n.ref(0),O=n.computed({get(){return p.value},set(U){_(U,void 0)}}),P=n.computed({get(){return d.value},set(U){_(void 0,U)}});function _(U,$){var E,j,m;const L=u.resolveUnref(t);!L||(m=L instanceof Document?document.body:L)==null||m.scrollTo({top:(E=u.resolveUnref($))!=null?E:P.value,left:(j=u.resolveUnref(U))!=null?j:O.value,behavior:u.resolveUnref(v)})}const g=n.ref(!1),h=n.reactive({left:!0,right:!1,top:!0,bottom:!1}),S=n.reactive({left:!1,right:!1,top:!1,bottom:!1}),C=u.useDebounceFn(U=>{g.value=!1,S.left=!1,S.right=!1,S.top=!1,S.bottom=!1,a(U)},r+o),I=U=>{const $=U.target===document?U.target.documentElement:U.target,E=$.scrollLeft;S.left=E<p.value,S.right=E>d.value,h.left=E<=0+(l.left||0),h.right=E+$.clientWidth>=$.scrollWidth-(l.right||0)-se,p.value=E;let j=$.scrollTop;U.target===document&&!j&&(j=document.body.scrollTop),S.top=j<d.value,S.bottom=j>d.value,h.top=j<=0+(l.top||0),h.bottom=j+$.clientHeight>=$.scrollHeight-(l.bottom||0)-se,d.value=j,g.value=!0,C(U),i(U)};return b(t,"scroll",r?u.useThrottleFn(I,r,!0,!1):I,c),{x:O,y:P,isScrolling:g,arrivedState:h,directions:S}}var Wt=Object.defineProperty,Ft=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,Jt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,ie=(t,e,r)=>e in t?Wt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ce=(t,e)=>{for(var r in e||(e={}))Jt.call(e,r)&&ie(t,r,e[r]);if(le)for(var r of le(e))Gt.call(e,r)&&ie(t,r,e[r]);return t},qt=(t,e)=>Ft(t,Kt(e));function ue(t,e,r={}){var o,a;const i=(o=r.direction)!=null?o:"bottom",l=n.reactive(K(t,qt(ce({},r),{offset:ce({[i]:(a=r.distance)!=null?a:0},r.offset)})));n.watch(()=>l.arrivedState[i],async c=>{var v,p;if(c){const d=u.resolveUnref(t),O={height:(v=d==null?void 0:d.scrollHeight)!=null?v:0,width:(p=d==null?void 0:d.scrollWidth)!=null?p:0};await e(l),r.preserveScrollPosition&&d&&n.nextTick(()=>{d.scrollTo({top:d.scrollHeight-O.height,left:d.scrollWidth-O.width})})}})}const Qt={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?ue(t,e.value):ue(t,...e.value)}};function fe(t,e,r={}){const{root:o,rootMargin:a="0px",threshold:i=.1,window:l=w}=r,c=F(()=>l&&"IntersectionObserver"in l);let v=u.noop;const p=c.value?n.watch(()=>({el:y(t),root:y(o)}),({el:O,root:P})=>{if(v(),!O)return;const _=new IntersectionObserver(e,{root:P,rootMargin:a,threshold:i});_.observe(O),v=()=>{_.disconnect(),v=u.noop}},{immediate:!0,flush:"post"}):u.noop,d=()=>{v(),p()};return u.tryOnScopeDispose(d),{isSupported:c,stop:d}}const Xt={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?fe(t,e.value):fe(t,...e.value)}},Yt=n.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(t,{slots:e}){const r=n.reactive(f.useMouse(t));return()=>{if(e.default)return e.default(r)}}}),Zt=n.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(f.useMouseInElement(r,t));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var xt=Object.defineProperty,Dt=Object.defineProperties,er=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,pe=(t,e,r)=>e in t?xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nr=(t,e)=>{for(var r in e||(e={}))tr.call(e,r)&&pe(t,r,e[r]);if(de)for(var r of de(e))rr.call(e,r)&&pe(t,r,e[r]);return t},or=(t,e)=>Dt(t,er(e));const ar=n.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(f.useMousePressed(or(nr({},t),{target:r})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),sr=n.defineComponent({name:"UseNetwork",setup(t,{slots:e}){const r=n.reactive(f.useNetwork());return()=>{if(e.default)return e.default(r)}}});var lr=Object.defineProperty,ir=Object.defineProperties,cr=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,ur=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable,_e=(t,e,r)=>e in t?lr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dr=(t,e)=>{for(var r in e||(e={}))ur.call(e,r)&&_e(t,r,e[r]);if(ve)for(var r of ve(e))fr.call(e,r)&&_e(t,r,e[r]);return t},pr=(t,e)=>ir(t,cr(e));const vr=n.defineComponent({name:"UseNow",props:["interval"],setup(t,{slots:e}){const r=n.reactive(f.useNow(pr(dr({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}}),_r=n.defineComponent({name:"UseObjectUrl",props:["object"],setup(t,{slots:e}){const r=n.toRef(t,"object"),o=f.useObjectUrl(r);return()=>{if(e.default&&o.value)return e.default(o)}}});var gr=Object.defineProperty,Or=Object.defineProperties,mr=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,yr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Oe=(t,e,r)=>e in t?gr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,hr=(t,e)=>{for(var r in e||(e={}))yr.call(e,r)&&Oe(t,r,e[r]);if(ge)for(var r of ge(e))Pr.call(e,r)&&Oe(t,r,e[r]);return t},wr=(t,e)=>Or(t,mr(e));const br=n.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(t,{slots:e,emit:r}){const o=n.reactive(f.useOffsetPagination(wr(hr({},t),{onPageChange(...a){var i;(i=t.onPageChange)==null||i.call(t,...a),r("page-change",...a)},onPageSizeChange(...a){var i;(i=t.onPageSizeChange)==null||i.call(t,...a),r("page-size-change",...a)},onPageCountChange(...a){var i;(i=t.onPageCountChange)==null||i.call(t,...a),r("page-count-change",...a)}})));return()=>{if(e.default)return e.default(o)}}}),Ur=n.defineComponent({name:"UseOnline",setup(t,{slots:e}){const r=n.reactive({isOnline:f.useOnline()});return()=>{if(e.default)return e.default(r)}}}),Sr=n.defineComponent({name:"UsePageLeave",setup(t,{slots:e}){const r=n.reactive({isLeft:f.usePageLeave()});return()=>{if(e.default)return e.default(r)}}});var $r=Object.defineProperty,Cr=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Ir=Object.prototype.propertyIsEnumerable,ye=(t,e,r)=>e in t?$r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Lr=(t,e)=>{for(var r in e||(e={}))jr.call(e,r)&&ye(t,r,e[r]);if(me)for(var r of me(e))Ir.call(e,r)&&ye(t,r,e[r]);return t},Ar=(t,e)=>Cr(t,Er(e));const Mr=n.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(t,{slots:e}){const r=n.ref(null),o=n.reactive(f.usePointer(Ar(Lr({},t),{target:t.target==="self"?r:w})));return()=>{if(e.default)return e.default(o,{ref:r})}}}),Tr=n.defineComponent({name:"UsePreferredColorScheme",setup(t,{slots:e}){const r=n.reactive({colorScheme:f.usePreferredColorScheme()});return()=>{if(e.default)return e.default(r)}}}),Nr=n.defineComponent({name:"UsePreferredContrast",setup(t,{slots:e}){const r=n.reactive({contrast:f.usePreferredContrast()});return()=>{if(e.default)return e.default(r)}}}),Rr=n.defineComponent({name:"UsePreferredDark",setup(t,{slots:e}){const r=n.reactive({prefersDark:f.usePreferredDark()});return()=>{if(e.default)return e.default(r)}}}),Hr=n.defineComponent({name:"UsePreferredLanguages",setup(t,{slots:e}){const r=n.reactive({languages:f.usePreferredLanguages()});return()=>{if(e.default)return e.default(r)}}}),zr=n.defineComponent({name:"UsePreferredReducedMotion",setup(t,{slots:e}){const r=n.reactive({motion:f.usePreferredReducedMotion()});return()=>{if(e.default)return e.default(r)}}});function H(t,e,{window:r=w,initialValue:o=""}={}){const a=n.ref(o),i=n.computed(()=>{var l;return y(e)||((l=r==null?void 0:r.document)==null?void 0:l.documentElement)});return n.watch([i,()=>u.resolveUnref(t)],([l,c])=>{var v;if(l&&r){const p=(v=r.getComputedStyle(l).getPropertyValue(c))==null?void 0:v.trim();a.value=p||o}},{immediate:!0}),n.watch(a,l=>{var c;((c=i.value)==null?void 0:c.style)&&i.value.style.setProperty(u.resolveUnref(t),l)}),a}const Pe="--vueuse-safe-area-top",he="--vueuse-safe-area-right",we="--vueuse-safe-area-bottom",be="--vueuse-safe-area-left";function Vr(){const t=n.ref(""),e=n.ref(""),r=n.ref(""),o=n.ref("");if(u.isClient){const i=H(Pe),l=H(he),c=H(we),v=H(be);i.value="env(safe-area-inset-top, 0px)",l.value="env(safe-area-inset-right, 0px)",c.value="env(safe-area-inset-bottom, 0px)",v.value="env(safe-area-inset-left, 0px)",a(),b("resize",u.useDebounceFn(a))}function a(){t.value=z(Pe),e.value=z(he),r.value=z(we),o.value=z(be)}return{top:t,right:e,bottom:r,left:o,update:a}}function z(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}const kr=n.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(t,{slots:e}){const{top:r,right:o,bottom:a,left:i}=Vr();return()=>{if(e.default)return n.h("div",{style:{paddingTop:t.top?r.value:"",paddingRight:t.right?o.value:"",paddingBottom:t.bottom?a.value:"",paddingLeft:t.left?i.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},e.default())}}});var Br=Object.defineProperty,Wr=Object.defineProperties,Fr=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Jr=Object.prototype.propertyIsEnumerable,Se=(t,e,r)=>e in t?Br(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Gr=(t,e)=>{for(var r in e||(e={}))Kr.call(e,r)&&Se(t,r,e[r]);if(Ue)for(var r of Ue(e))Jr.call(e,r)&&Se(t,r,e[r]);return t},qr=(t,e)=>Wr(t,Fr(e));const Qr={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=K(t,{onScroll(){r(o)},onStop(){r(o)}})}else{const[r,o]=e.value,a=K(t,qr(Gr({},o),{onScroll(i){var l;(l=o.onScroll)==null||l.call(o,i),r(a)},onStop(i){var l;(l=o.onStop)==null||l.call(o,i),r(a)}}))}}};function Xr(t){const e=t||window.event;return e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}function Yr(t,e=!1){const r=n.ref(e);let o=null,a;n.watch(u.resolveRef(t),c=>{if(c){const v=c;a=v.style.overflow,r.value&&(v.style.overflow="hidden")}},{immediate:!0});const i=()=>{const c=u.resolveUnref(t);!c||r.value||(u.isIOS&&(o=b(c,"touchmove",Xr,{passive:!1})),c.style.overflow="hidden",r.value=!0)},l=()=>{const c=u.resolveUnref(t);!c||!r.value||(u.isIOS&&(o==null||o()),c.style.overflow=a,r.value=!1)};return u.tryOnScopeDispose(l),n.computed({get(){return r.value},set(c){c?i():l()}})}const Zr=(()=>{let t=!1;const e=n.ref(!1);return(r,o)=>{if(e.value=o.value,t)return;t=!0;const a=Yr(r,o.value);n.watch(e,i=>a.value=i)}})();var xr=Object.defineProperty,Dr=Object.defineProperties,en=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,Ce=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nn=(t,e)=>{for(var r in e||(e={}))tn.call(e,r)&&Ce(t,r,e[r]);if($e)for(var r of $e(e))rn.call(e,r)&&Ce(t,r,e[r]);return t},on=(t,e)=>Dr(t,en(e));const an=n.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages","showSecond"],setup(t,{slots:e}){const r=n.reactive(f.useTimeAgo(()=>t.time,on(nn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var sn=Object.defineProperty,ln=Object.defineProperties,cn=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,je=(t,e,r)=>e in t?sn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dn=(t,e)=>{for(var r in e||(e={}))un.call(e,r)&&je(t,r,e[r]);if(Ee)for(var r of Ee(e))fn.call(e,r)&&je(t,r,e[r]);return t},pn=(t,e)=>ln(t,cn(e));const vn=n.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(t,{slots:e}){const r=n.reactive(f.useTimestamp(pn(dn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var _n=Object.defineProperty,Ie=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable,Le=(t,e,r)=>e in t?_n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ae=(t,e)=>{for(var r in e||(e={}))gn.call(e,r)&&Le(t,r,e[r]);if(Ie)for(var r of Ie(e))On.call(e,r)&&Le(t,r,e[r]);return t};const mn=n.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(t,{slots:e}){const{list:r}=n.toRefs(t),{list:o,containerProps:a,wrapperProps:i}=f.useVirtualList(r,t.options);return typeof a.style=="object"&&!Array.isArray(a.style)&&(a.style.height=t.height||"300px"),()=>n.h("div",Ae({},a),[n.h("div",Ae({},i.value),o.value.map(l=>n.h("div",{style:{overFlow:"hidden",height:l.height}},e.default?e.default(l):"Please set content!")))])}}),yn=n.defineComponent({name:"UseWindowFocus",setup(t,{slots:e}){const r=n.reactive({focused:f.useWindowFocus()});return()=>{if(e.default)return e.default(r)}}}),Pn=n.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(t,{slots:e}){const r=n.reactive(f.useWindowSize(t));return()=>{if(e.default)return e.default(r)}}});s.OnClickOutside=Me,s.OnLongPress=Ve,s.UseActiveElement=ke,s.UseBattery=Be,s.UseBrowserLocation=We,s.UseColorMode=nt,s.UseDark=ot,s.UseDeviceMotion=at,s.UseDeviceOrientation=st,s.UseDevicePixelRatio=lt,s.UseDevicesList=it,s.UseDocumentVisibility=ct,s.UseDraggable=Ot,s.UseElementBounding=mt,s.UseElementSize=ht,s.UseElementVisibility=Et,s.UseEyeDropper=It,s.UseFullscreen=Lt,s.UseGeolocation=At,s.UseIdle=Mt,s.UseImage=Bt,s.UseMouse=Yt,s.UseMouseInElement=Zt,s.UseMousePressed=ar,s.UseNetwork=sr,s.UseNow=vr,s.UseObjectUrl=_r,s.UseOffsetPagination=br,s.UseOnline=Ur,s.UsePageLeave=Sr,s.UsePointer=Mr,s.UsePreferredColorScheme=Tr,s.UsePreferredContrast=Nr,s.UsePreferredDark=Rr,s.UsePreferredLanguages=Hr,s.UsePreferredReducedMotion=zr,s.UseScreenSafeArea=kr,s.UseTimeAgo=an,s.UseTimestamp=vn,s.UseVirtualList=mn,s.UseWindowFocus=yn,s.UseWindowSize=Pn,s.VOnClickOutside=N,s.VOnLongPress=q,s.vElementHover=Pt,s.vElementSize=Ct,s.vElementVisibility=jt,s.vInfiniteScroll=Qt,s.vIntersectionObserver=Xt,s.vOnClickOutside=N,s.vOnKeyStroke=He,s.vOnLongPress=q,s.vScroll=Qr,s.vScrollLock=Zr})(this.VueUse=this.VueUse||{},VueDemi,VueUse,VueUse);
var VueDemi=function(s,n,d){if(s.install)return s;if(!n)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),s;if(n.version.slice(0,4)==="2.7."){let P=function(w,b){var A,N={},R={config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),provide:function(M,T){return N[M]=T,this},directive:function(M,T){return T?(n.directive(M,T),R):n.directive(M)},mount:function(M,T){return A||(A=new n(Object.assign({propsData:b},w,{provide:Object.assign(N,w.provide)})),A.$mount(M,T),A)},unmount:function(){A&&(A.$destroy(),A=void 0)}};return R};var Me=P;for(var u in n)s[u]=n[u];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version,s.warn=n.util.warn,s.createApp=P}else if(n.version.slice(0,2)==="2.")if(d){for(var u in d)s[u]=d[u];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var u in n)s[u]=n[u];s.isVue2=!1,s.isVue3=!0,s.install=function(){},s.Vue=n,s.Vue2=void 0,s.version=n.version,s.set=function(P,w,b){return Array.isArray(P)?(P.length=Math.max(P.length,w),P.splice(w,1,b),b):(P[w]=b,b)},s.del=function(P,w){if(Array.isArray(P)){P.splice(w,1);return}delete P[w]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");return s}(this.VueDemi=this.VueDemi||(typeof VueDemi!="undefined"?VueDemi:{}),this.Vue||(typeof Vue!="undefined"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI!="undefined"?VueCompositionAPI:void 0));(function(s,n,d,u){"use strict";const Me=n.defineComponent({name:"OnClickOutside",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return d.onClickOutside(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}});function P(t){var e;const r=u.resolveUnref(t);return(e=r==null?void 0:r.$el)!=null?e:r}const w=u.isClient?window:void 0;function b(...t){let e,r,o,a;if(u.isString(t[0])||Array.isArray(t[0])?([r,o,a]=t,e=w):[e,r,o,a]=t,!e)return u.noop;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach(f=>f()),i.length=0},c=(f,m,h)=>(f.addEventListener(m,h,a),()=>f.removeEventListener(m,h,a)),_=n.watch(()=>P(e),f=>{l(),!!f&&i.push(...r.flatMap(m=>o.map(h=>c(f,m,h))))},{immediate:!0,flush:"post"}),v=()=>{_(),l()};return u.tryOnScopeDispose(v),v}function A(t,e,r={}){const{window:o=w,ignore:a=[],capture:i=!0,detectIframe:l=!1}=r;if(!o)return;let c=!0,_;const v=p=>a.some(g=>{if(typeof g=="string")return Array.from(o.document.querySelectorAll(g)).some(y=>y===p.target||p.composedPath().includes(y));{const y=P(g);return y&&(p.target===y||p.composedPath().includes(y))}}),f=p=>{o.clearTimeout(_);const g=P(t);if(!(!g||g===p.target||p.composedPath().includes(g))){if(p.detail===0&&(c=!v(p)),!c){c=!0;return}e(p)}},m=[b(o,"click",f,{passive:!0,capture:i}),b(o,"pointerdown",p=>{const g=P(t);g&&(c=!p.composedPath().includes(g)&&!v(p))},{passive:!0}),b(o,"pointerup",p=>{if(p.button===0){const g=p.composedPath();p.composedPath=()=>g,_=o.setTimeout(()=>f(p),50)}},{passive:!0}),l&&b(o,"blur",p=>{var g;const y=P(t);((g=o.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!(y==null?void 0:y.contains(o.document.activeElement))&&e(p)})].filter(Boolean);return()=>m.forEach(p=>p())}const N={[u.directiveHooks.mounted](t,e){const r=!e.modifiers.bubble;if(typeof e.value=="function")t.__onClickOutside_stop=A(t,e.value,{capture:r});else{const[o,a]=e.value;t.__onClickOutside_stop=A(t,o,Object.assign({capture:r},a))}},[u.directiveHooks.unmounted](t){t.__onClickOutside_stop()}},R=t=>typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0;function M(...t){let e,r,o={};t.length===3?(e=t[0],r=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],o=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:a=w,eventName:i="keydown",passive:l=!1}=o,c=R(e);return b(a,i,v=>{c(v)&&r(v)},l)}var T=Object.defineProperty,J=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,G=(t,e,r)=>e in t?T(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)&&G(t,r,e[r]);if(J)for(var r of J(e))Ne.call(e,r)&&G(t,r,e[r]);return t};const He={[u.directiveHooks.mounted](t,e){var r,o;const a=(o=(r=e.arg)==null?void 0:r.split(","))!=null?o:!0;if(typeof e.value=="function")M(a,e.value,{target:t});else{const[i,l]=e.value;M(a,i,Re({target:t},l))}}},ze=500;function k(t,e,r){var o,a;const i=n.computed(()=>P(t));let l;function c(){l&&(clearTimeout(l),l=void 0)}function _(f){var m,h,p,g;((m=r==null?void 0:r.modifiers)==null?void 0:m.self)&&f.target!==i.value||(c(),((h=r==null?void 0:r.modifiers)==null?void 0:h.prevent)&&f.preventDefault(),((p=r==null?void 0:r.modifiers)==null?void 0:p.stop)&&f.stopPropagation(),l=setTimeout(()=>e(f),(g=r==null?void 0:r.delay)!=null?g:ze))}const v={capture:(o=r==null?void 0:r.modifiers)==null?void 0:o.capture,once:(a=r==null?void 0:r.modifiers)==null?void 0:a.once};b(i,"pointerdown",_,v),b(i,"pointerup",c,v),b(i,"pointerleave",c,v)}const Ve=n.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return k(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}}),q={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?k(t,e.value,{modifiers:e.modifiers}):k(t,...e.value)}},ke=n.defineComponent({name:"UseActiveElement",setup(t,{slots:e}){const r=n.reactive({element:d.useActiveElement()});return()=>{if(e.default)return e.default(r)}}}),Be=n.defineComponent({name:"UseBattery",setup(t,{slots:e}){const r=n.reactive(d.useBattery(t));return()=>{if(e.default)return e.default(r)}}}),We=n.defineComponent({name:"UseBrowserLocation",setup(t,{slots:e}){const r=n.reactive(d.useBrowserLocation());return()=>{if(e.default)return e.default(r)}}}),B=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},W="__vueuse_ssr_handlers__";B[W]=B[W]||{};const Fe=B[W];function Q(t,e){return Fe[t]||e}function Ke(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}var Je=Object.defineProperty,X=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Y=(t,e,r)=>e in t?Je(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Z=(t,e)=>{for(var r in e||(e={}))Ge.call(e,r)&&Y(t,r,e[r]);if(X)for(var r of X(e))qe.call(e,r)&&Y(t,r,e[r]);return t};const Qe={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}};function Xe(t,e,r,o={}){var a;const{flush:i="pre",deep:l=!0,listenToStorageChanges:c=!0,writeDefaults:_=!0,mergeDefaults:v=!1,shallow:f,window:m=w,eventFilter:h,onError:p=O=>{console.error(O)}}=o,g=(f?n.shallowRef:n.ref)(e);if(!r)try{r=Q("getDefaultStorage",()=>{var O;return(O=w)==null?void 0:O.localStorage})()}catch(O){p(O)}if(!r)return g;const y=u.resolveUnref(e),S=Ke(y),C=(a=o.serializer)!=null?a:Qe[S],{pause:I,resume:U}=u.pausableWatch(g,()=>$(g.value),{flush:i,deep:l,eventFilter:h});return m&&c&&b(m,"storage",j),j(),g;function $(O){try{O==null?r.removeItem(t):r.setItem(t,C.write(O))}catch(L){p(L)}}function E(O){I();try{const L=O?O.newValue:r.getItem(t);if(L==null)return _&&y!==null&&r.setItem(t,C.write(y)),y;if(!O&&v){const V=C.read(L);return u.isFunction(v)?v(V,y):S==="object"&&!Array.isArray(V)?Z(Z({},y),V):V}else return typeof L!="string"?L:C.read(L)}catch(L){p(L)}finally{U()}}function j(O){if(!(O&&O.storageArea!==r)){if(O&&O.key===null){g.value=y;return}O&&O.key!==t||(g.value=E(O))}}}function F(t,e=!1){const r=n.ref(),o=()=>r.value=Boolean(t());return o(),u.tryOnMounted(o,e),r}function Ye(t,e={}){const{window:r=w}=e,o=F(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let a;const i=n.ref(!1),l=()=>{!a||("removeEventListener"in a?a.removeEventListener("change",c):a.removeListener(c))},c=()=>{!o.value||(l(),a=r.matchMedia(u.resolveRef(t).value),i.value=a.matches,"addEventListener"in a?a.addEventListener("change",c):a.addListener(c))};return n.watchEffect(c),u.tryOnScopeDispose(()=>l()),i}function Ze(t){return Ye("(prefers-color-scheme: dark)",t)}var xe=Object.defineProperty,x=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,D=(t,e,r)=>e in t?xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,tt=(t,e)=>{for(var r in e||(e={}))De.call(e,r)&&D(t,r,e[r]);if(x)for(var r of x(e))et.call(e,r)&&D(t,r,e[r]);return t};function rt(t={}){const{selector:e="html",attribute:r="class",initialValue:o="auto",window:a=w,storage:i,storageKey:l="vueuse-color-scheme",listenToStorageChanges:c=!0,storageRef:_,emitAuto:v}=t,f=tt({auto:"",light:"light",dark:"dark"},t.modes||{}),m=Ze({window:a}),h=n.computed(()=>m.value?"dark":"light"),p=_||(l==null?n.ref(o):Xe(l,o,i,{window:a,listenToStorageChanges:c})),g=n.computed({get(){return p.value==="auto"&&!v?h.value:p.value},set(I){p.value=I}}),y=Q("updateHTMLAttrs",(I,U,$)=>{const E=a==null?void 0:a.document.querySelector(I);if(!!E)if(U==="class"){const j=$.split(/\s/g);Object.values(f).flatMap(O=>(O||"").split(/\s/g)).filter(Boolean).forEach(O=>{j.includes(O)?E.classList.add(O):E.classList.remove(O)})}else E.setAttribute(U,$)});function S(I){var U;const $=I==="auto"?h.value:I;y(e,r,(U=f[$])!=null?U:$)}function C(I){t.onChanged?t.onChanged(I,S):S(I)}return n.watch(g,C,{flush:"post",immediate:!0}),v&&n.watch(h,()=>C(g.value),{flush:"post"}),u.tryOnMounted(()=>C(g.value)),g}const nt=n.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(t,{slots:e}){const r=rt(t),o=n.reactive({mode:r});return()=>{if(e.default)return e.default(o)}}}),ot=n.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(t,{slots:e}){const r=d.useDark(t),o=n.reactive({isDark:r,toggleDark:u.useToggle(r)});return()=>{if(e.default)return e.default(o)}}}),at=n.defineComponent({name:"UseDeviceMotion",setup(t,{slots:e}){const r=n.reactive(d.useDeviceMotion());return()=>{if(e.default)return e.default(r)}}}),st=n.defineComponent({name:"UseDeviceOrientation",setup(t,{slots:e}){const r=n.reactive(d.useDeviceOrientation());return()=>{if(e.default)return e.default(r)}}}),lt=n.defineComponent({name:"UseDevicePixelRatio",setup(t,{slots:e}){const r=n.reactive({pixelRatio:d.useDevicePixelRatio()});return()=>{if(e.default)return e.default(r)}}}),it=n.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(t,{slots:e}){const r=n.reactive(d.useDevicesList(t));return()=>{if(e.default)return e.default(r)}}}),ct=n.defineComponent({name:"UseDocumentVisibility",setup(t,{slots:e}){const r=n.reactive({visibility:d.useDocumentVisibility()});return()=>{if(e.default)return e.default(r)}}});var ut=Object.defineProperty,ft=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,te=(t,e,r)=>e in t?ut(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_t=(t,e)=>{for(var r in e||(e={}))pt.call(e,r)&&te(t,r,e[r]);if(ee)for(var r of ee(e))vt.call(e,r)&&te(t,r,e[r]);return t},gt=(t,e)=>ft(t,dt(e));const mt=n.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle"],setup(t,{slots:e}){const r=n.ref(),o=n.computed(()=>{var l;return(l=t.handle)!=null?l:r.value}),a=t.storageKey?d.useStorage(t.storageKey,u.resolveUnref(t.initialValue)||{x:0,y:0},d.isClient?t.storageType==="session"?sessionStorage:localStorage:void 0):t.initialValue||{x:0,y:0},i=n.reactive(d.useDraggable(r,gt(_t({},t),{handle:o,initialValue:a})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r,style:`touch-action:none;${i.style}`},e.default(i))}}}),Ot=n.defineComponent({name:"UseElementBounding",props:["box","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(d.useElementBounding(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function yt(t){const e=n.ref(!1);return b(t,"mouseenter",()=>e.value=!0),b(t,"mouseleave",()=>e.value=!1),e}const Pt={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=yt(t);n.watch(r,o=>e.value(o))}}},ht=n.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(d.useElementSize(r,{width:t.width,height:t.height},{box:t.box}));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var re=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Ut=(t,e)=>{var r={};for(var o in t)wt.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&re)for(var o of re(t))e.indexOf(o)<0&&bt.call(t,o)&&(r[o]=t[o]);return r};function St(t,e,r={}){const o=r,{window:a=w}=o,i=Ut(o,["window"]);let l;const c=F(()=>a&&"ResizeObserver"in a),_=()=>{l&&(l.disconnect(),l=void 0)},v=n.watch(()=>P(t),m=>{_(),c.value&&a&&m&&(l=new ResizeObserver(e),l.observe(m,i))},{immediate:!0,flush:"post"}),f=()=>{_(),v()};return u.tryOnScopeDispose(f),{isSupported:c,stop:f}}function $t(t,e={width:0,height:0},r={}){const{box:o="content-box"}=r,a=n.ref(e.width),i=n.ref(e.height);return St(t,([l])=>{const c=o==="border-box"?l.borderBoxSize:o==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;c?(a.value=c.reduce((_,{inlineSize:v})=>_+v,0),i.value=c.reduce((_,{blockSize:v})=>_+v,0)):(a.value=l.contentRect.width,i.value=l.contentRect.height)},r),n.watch(()=>P(t),l=>{a.value=l?e.width:0,i.value=l?e.height:0}),{width:a,height:i}}const Ct={[u.directiveHooks.mounted](t,e){var r;const o=typeof e.value=="function"?e.value:(r=e.value)==null?void 0:r[0],a=typeof e.value=="function"?[]:e.value.slice(1),{width:i,height:l}=$t(t,...a);n.watch([i,l],([c,_])=>o({width:c,height:_}))}},Et=n.defineComponent({name:"UseElementVisibility",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive({isVisible:d.useElementVisibility(r)});return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function ne(t,{window:e=w,scrollTarget:r}={}){const o=n.ref(!1),a=()=>{if(!e)return;const i=e.document,l=P(t);if(!l)o.value=!1;else{const c=l.getBoundingClientRect();o.value=c.top<=(e.innerHeight||i.documentElement.clientHeight)&&c.left<=(e.innerWidth||i.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return n.watch(()=>P(t),()=>a(),{immediate:!0,flush:"post"}),e&&b(r||e,"scroll",a,{capture:!1,passive:!0}),o}const jt={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=ne(t);n.watch(o,a=>r(a),{immediate:!0})}else{const[r,o]=e.value,a=ne(t,o);n.watch(a,i=>r(i),{immediate:!0})}}},It=n.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(t,{slots:e}){const r=n.reactive(d.useEyeDropper());return()=>{if(e.default)return e.default(r)}}}),Lt=n.defineComponent({name:"UseFullscreen",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(d.useFullscreen(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),At=n.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(t,{slots:e}){const r=n.reactive(d.useGeolocation(t));return()=>{if(e.default)return e.default(r)}}}),Mt=n.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(t,{slots:e}){const r=n.reactive(d.useIdle(t.timeout,t));return()=>{if(e.default)return e.default(r)}}});function Tt(t,e,r){const{immediate:o=!0,delay:a=0,onError:i=u.noop,resetOnExecute:l=!0,shallow:c=!0,throwError:_}=r??{},v=c?n.shallowRef(e):n.ref(e),f=n.ref(!1),m=n.ref(!1),h=n.ref(void 0);async function p(g=0,...y){l&&(v.value=e),h.value=void 0,f.value=!1,m.value=!0,g>0&&await u.promiseTimeout(g);const S=typeof t=="function"?t(...y):t;try{const C=await S;v.value=C,f.value=!0}catch(C){if(h.value=C,i(C),_)throw h}finally{m.value=!1}return v.value}return o&&p(a),{state:v,isReady:f,isLoading:m,error:h,execute:p}}var Nt=Object.defineProperty,oe=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,ae=(t,e,r)=>e in t?Nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zt=(t,e)=>{for(var r in e||(e={}))Rt.call(e,r)&&ae(t,r,e[r]);if(oe)for(var r of oe(e))Ht.call(e,r)&&ae(t,r,e[r]);return t};async function Vt(t){return new Promise((e,r)=>{const o=new Image,{src:a,srcset:i,sizes:l}=t;o.src=a,i&&(o.srcset=i),l&&(o.sizes=l),o.onload=()=>e(o),o.onerror=r})}const kt=(t,e={})=>{const r=Tt(()=>Vt(u.resolveUnref(t)),void 0,zt({resetOnExecute:!0},e));return n.watch(()=>u.resolveUnref(t),()=>r.execute(e.delay),{deep:!0}),r},Bt=n.defineComponent({name:"UseImage",props:["src","srcset","sizes","as"],setup(t,{slots:e}){const r=n.reactive(kt(t));return()=>r.isLoading&&e.loading?e.loading(r):r.error&&e.error?e.error(r.error):e.default?e.default(r):n.h(t.as||"img",t)}}),se=1;function K(t,e={}){const{throttle:r=0,idle:o=200,onStop:a=u.noop,onScroll:i=u.noop,offset:l={left:0,right:0,top:0,bottom:0},eventListenerOptions:c={capture:!1,passive:!0},behavior:_="auto"}=e,v=n.ref(0),f=n.ref(0),m=n.computed({get(){return v.value},set(U){p(U,void 0)}}),h=n.computed({get(){return f.value},set(U){p(void 0,U)}});function p(U,$){var E,j,O;const L=u.resolveUnref(t);!L||(O=L instanceof Document?document.body:L)==null||O.scrollTo({top:(E=u.resolveUnref($))!=null?E:h.value,left:(j=u.resolveUnref(U))!=null?j:m.value,behavior:u.resolveUnref(_)})}const g=n.ref(!1),y=n.reactive({left:!0,right:!1,top:!0,bottom:!1}),S=n.reactive({left:!1,right:!1,top:!1,bottom:!1}),C=u.useDebounceFn(U=>{g.value=!1,S.left=!1,S.right=!1,S.top=!1,S.bottom=!1,a(U)},r+o),I=U=>{const $=U.target===document?U.target.documentElement:U.target,E=$.scrollLeft;S.left=E<v.value,S.right=E>f.value,y.left=E<=0+(l.left||0),y.right=E+$.clientWidth>=$.scrollWidth-(l.right||0)-se,v.value=E;let j=$.scrollTop;U.target===document&&!j&&(j=document.body.scrollTop),S.top=j<f.value,S.bottom=j>f.value,y.top=j<=0+(l.top||0),y.bottom=j+$.clientHeight>=$.scrollHeight-(l.bottom||0)-se,f.value=j,g.value=!0,C(U),i(U)};return b(t,"scroll",r?u.useThrottleFn(I,r,!0,!1):I,c),{x:m,y:h,isScrolling:g,arrivedState:y,directions:S}}var Wt=Object.defineProperty,Ft=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,Jt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,ie=(t,e,r)=>e in t?Wt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ce=(t,e)=>{for(var r in e||(e={}))Jt.call(e,r)&&ie(t,r,e[r]);if(le)for(var r of le(e))Gt.call(e,r)&&ie(t,r,e[r]);return t},qt=(t,e)=>Ft(t,Kt(e));function ue(t,e,r={}){var o,a;const i=(o=r.direction)!=null?o:"bottom",l=n.reactive(K(t,qt(ce({},r),{offset:ce({[i]:(a=r.distance)!=null?a:0},r.offset)})));n.watch(()=>l.arrivedState[i],async c=>{var _,v;if(c){const f=u.resolveUnref(t),m={height:(_=f==null?void 0:f.scrollHeight)!=null?_:0,width:(v=f==null?void 0:f.scrollWidth)!=null?v:0};await e(l),r.preserveScrollPosition&&f&&n.nextTick(()=>{f.scrollTo({top:f.scrollHeight-m.height,left:f.scrollWidth-m.width})})}})}const Qt={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?ue(t,e.value):ue(t,...e.value)}};function fe(t,e,r={}){const{root:o,rootMargin:a="0px",threshold:i=.1,window:l=w}=r,c=F(()=>l&&"IntersectionObserver"in l);let _=u.noop;const v=c.value?n.watch(()=>({el:P(t),root:P(o)}),({el:m,root:h})=>{if(_(),!m)return;const p=new IntersectionObserver(e,{root:h,rootMargin:a,threshold:i});p.observe(m),_=()=>{p.disconnect(),_=u.noop}},{immediate:!0,flush:"post"}):u.noop,f=()=>{_(),v()};return u.tryOnScopeDispose(f),{isSupported:c,stop:f}}const Xt={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?fe(t,e.value):fe(t,...e.value)}},Yt=n.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(t,{slots:e}){const r=n.reactive(d.useMouse(t));return()=>{if(e.default)return e.default(r)}}}),Zt=n.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(d.useMouseInElement(r,t));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var xt=Object.defineProperty,Dt=Object.defineProperties,er=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,pe=(t,e,r)=>e in t?xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nr=(t,e)=>{for(var r in e||(e={}))tr.call(e,r)&&pe(t,r,e[r]);if(de)for(var r of de(e))rr.call(e,r)&&pe(t,r,e[r]);return t},or=(t,e)=>Dt(t,er(e));const ar=n.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(d.useMousePressed(or(nr({},t),{target:r})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),sr=n.defineComponent({name:"UseNetwork",setup(t,{slots:e}){const r=n.reactive(d.useNetwork());return()=>{if(e.default)return e.default(r)}}});var lr=Object.defineProperty,ir=Object.defineProperties,cr=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,ur=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable,_e=(t,e,r)=>e in t?lr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dr=(t,e)=>{for(var r in e||(e={}))ur.call(e,r)&&_e(t,r,e[r]);if(ve)for(var r of ve(e))fr.call(e,r)&&_e(t,r,e[r]);return t},pr=(t,e)=>ir(t,cr(e));const vr=n.defineComponent({name:"UseNow",props:["interval"],setup(t,{slots:e}){const r=n.reactive(d.useNow(pr(dr({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}}),_r=n.defineComponent({name:"UseObjectUrl",props:["object"],setup(t,{slots:e}){const r=n.toRef(t,"object"),o=d.useObjectUrl(r);return()=>{if(e.default&&o.value)return e.default(o)}}});var gr=Object.defineProperty,mr=Object.defineProperties,Or=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,yr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,me=(t,e,r)=>e in t?gr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,hr=(t,e)=>{for(var r in e||(e={}))yr.call(e,r)&&me(t,r,e[r]);if(ge)for(var r of ge(e))Pr.call(e,r)&&me(t,r,e[r]);return t},wr=(t,e)=>mr(t,Or(e));const br=n.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(t,{slots:e,emit:r}){const o=n.reactive(d.useOffsetPagination(wr(hr({},t),{onPageChange(...a){var i;(i=t.onPageChange)==null||i.call(t,...a),r("page-change",...a)},onPageSizeChange(...a){var i;(i=t.onPageSizeChange)==null||i.call(t,...a),r("page-size-change",...a)},onPageCountChange(...a){var i;(i=t.onPageCountChange)==null||i.call(t,...a),r("page-count-change",...a)}})));return()=>{if(e.default)return e.default(o)}}}),Ur=n.defineComponent({name:"UseOnline",setup(t,{slots:e}){const r=n.reactive({isOnline:d.useOnline()});return()=>{if(e.default)return e.default(r)}}}),Sr=n.defineComponent({name:"UsePageLeave",setup(t,{slots:e}){const r=n.reactive({isLeft:d.usePageLeave()});return()=>{if(e.default)return e.default(r)}}});var $r=Object.defineProperty,Cr=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Ir=Object.prototype.propertyIsEnumerable,ye=(t,e,r)=>e in t?$r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Lr=(t,e)=>{for(var r in e||(e={}))jr.call(e,r)&&ye(t,r,e[r]);if(Oe)for(var r of Oe(e))Ir.call(e,r)&&ye(t,r,e[r]);return t},Ar=(t,e)=>Cr(t,Er(e));const Mr=n.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(t,{slots:e}){const r=n.ref(null),o=n.reactive(d.usePointer(Ar(Lr({},t),{target:t.target==="self"?r:w})));return()=>{if(e.default)return e.default(o,{ref:r})}}}),Tr=n.defineComponent({name:"UsePreferredColorScheme",setup(t,{slots:e}){const r=n.reactive({colorScheme:d.usePreferredColorScheme()});return()=>{if(e.default)return e.default(r)}}}),Nr=n.defineComponent({name:"UsePreferredContrast",setup(t,{slots:e}){const r=n.reactive({contrast:d.usePreferredContrast()});return()=>{if(e.default)return e.default(r)}}}),Rr=n.defineComponent({name:"UsePreferredDark",setup(t,{slots:e}){const r=n.reactive({prefersDark:d.usePreferredDark()});return()=>{if(e.default)return e.default(r)}}}),Hr=n.defineComponent({name:"UsePreferredLanguages",setup(t,{slots:e}){const r=n.reactive({languages:d.usePreferredLanguages()});return()=>{if(e.default)return e.default(r)}}}),zr=n.defineComponent({name:"UsePreferredReducedMotion",setup(t,{slots:e}){const r=n.reactive({motion:d.usePreferredReducedMotion()});return()=>{if(e.default)return e.default(r)}}});function H(t,e,{window:r=w,initialValue:o=""}={}){const a=n.ref(o),i=n.computed(()=>{var l;return P(e)||((l=r==null?void 0:r.document)==null?void 0:l.documentElement)});return n.watch([i,()=>u.resolveUnref(t)],([l,c])=>{var _;if(l&&r){const v=(_=r.getComputedStyle(l).getPropertyValue(c))==null?void 0:_.trim();a.value=v||o}},{immediate:!0}),n.watch(a,l=>{var c;((c=i.value)==null?void 0:c.style)&&i.value.style.setProperty(u.resolveUnref(t),l)}),a}const Pe="--vueuse-safe-area-top",he="--vueuse-safe-area-right",we="--vueuse-safe-area-bottom",be="--vueuse-safe-area-left";function Vr(){const t=n.ref(""),e=n.ref(""),r=n.ref(""),o=n.ref("");if(u.isClient){const i=H(Pe),l=H(he),c=H(we),_=H(be);i.value="env(safe-area-inset-top, 0px)",l.value="env(safe-area-inset-right, 0px)",c.value="env(safe-area-inset-bottom, 0px)",_.value="env(safe-area-inset-left, 0px)",a(),b("resize",u.useDebounceFn(a))}function a(){t.value=z(Pe),e.value=z(he),r.value=z(we),o.value=z(be)}return{top:t,right:e,bottom:r,left:o,update:a}}function z(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}const kr=n.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(t,{slots:e}){const{top:r,right:o,bottom:a,left:i}=Vr();return()=>{if(e.default)return n.h("div",{style:{paddingTop:t.top?r.value:"",paddingRight:t.right?o.value:"",paddingBottom:t.bottom?a.value:"",paddingLeft:t.left?i.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},e.default())}}});var Br=Object.defineProperty,Wr=Object.defineProperties,Fr=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Jr=Object.prototype.propertyIsEnumerable,Se=(t,e,r)=>e in t?Br(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Gr=(t,e)=>{for(var r in e||(e={}))Kr.call(e,r)&&Se(t,r,e[r]);if(Ue)for(var r of Ue(e))Jr.call(e,r)&&Se(t,r,e[r]);return t},qr=(t,e)=>Wr(t,Fr(e));const Qr={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=K(t,{onScroll(){r(o)},onStop(){r(o)}})}else{const[r,o]=e.value,a=K(t,qr(Gr({},o),{onScroll(i){var l;(l=o.onScroll)==null||l.call(o,i),r(a)},onStop(i){var l;(l=o.onStop)==null||l.call(o,i),r(a)}}))}}};function Xr(t){const e=t||window.event;return e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}function Yr(t,e=!1){const r=n.ref(e);let o=null,a;n.watch(u.resolveRef(t),c=>{if(c){const _=c;a=_.style.overflow,r.value&&(_.style.overflow="hidden")}},{immediate:!0});const i=()=>{const c=u.resolveUnref(t);!c||r.value||(u.isIOS&&(o=b(c,"touchmove",Xr,{passive:!1})),c.style.overflow="hidden",r.value=!0)},l=()=>{const c=u.resolveUnref(t);!c||!r.value||(u.isIOS&&(o==null||o()),c.style.overflow=a,r.value=!1)};return u.tryOnScopeDispose(l),n.computed({get(){return r.value},set(c){c?i():l()}})}const Zr=(()=>{let t=!1;const e=n.ref(!1);return(r,o)=>{if(e.value=o.value,t)return;t=!0;const a=Yr(r,o.value);n.watch(e,i=>a.value=i)}})();var xr=Object.defineProperty,Dr=Object.defineProperties,en=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,Ce=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nn=(t,e)=>{for(var r in e||(e={}))tn.call(e,r)&&Ce(t,r,e[r]);if($e)for(var r of $e(e))rn.call(e,r)&&Ce(t,r,e[r]);return t},on=(t,e)=>Dr(t,en(e));const an=n.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages","showSecond"],setup(t,{slots:e}){const r=n.reactive(d.useTimeAgo(()=>t.time,on(nn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var sn=Object.defineProperty,ln=Object.defineProperties,cn=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,je=(t,e,r)=>e in t?sn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dn=(t,e)=>{for(var r in e||(e={}))un.call(e,r)&&je(t,r,e[r]);if(Ee)for(var r of Ee(e))fn.call(e,r)&&je(t,r,e[r]);return t},pn=(t,e)=>ln(t,cn(e));const vn=n.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(t,{slots:e}){const r=n.reactive(d.useTimestamp(pn(dn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var _n=Object.defineProperty,Ie=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable,Le=(t,e,r)=>e in t?_n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ae=(t,e)=>{for(var r in e||(e={}))gn.call(e,r)&&Le(t,r,e[r]);if(Ie)for(var r of Ie(e))mn.call(e,r)&&Le(t,r,e[r]);return t};const On=n.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(t,{slots:e}){const{list:r}=n.toRefs(t),{list:o,containerProps:a,wrapperProps:i}=d.useVirtualList(r,t.options);return typeof a.style=="object"&&!Array.isArray(a.style)&&(a.style.height=t.height||"300px"),()=>n.h("div",Ae({},a),[n.h("div",Ae({},i.value),o.value.map(l=>n.h("div",{style:{overFlow:"hidden",height:l.height}},e.default?e.default(l):"Please set content!")))])}}),yn=n.defineComponent({name:"UseWindowFocus",setup(t,{slots:e}){const r=n.reactive({focused:d.useWindowFocus()});return()=>{if(e.default)return e.default(r)}}}),Pn=n.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(t,{slots:e}){const r=n.reactive(d.useWindowSize(t));return()=>{if(e.default)return e.default(r)}}});s.OnClickOutside=Me,s.OnLongPress=Ve,s.UseActiveElement=ke,s.UseBattery=Be,s.UseBrowserLocation=We,s.UseColorMode=nt,s.UseDark=ot,s.UseDeviceMotion=at,s.UseDeviceOrientation=st,s.UseDevicePixelRatio=lt,s.UseDevicesList=it,s.UseDocumentVisibility=ct,s.UseDraggable=mt,s.UseElementBounding=Ot,s.UseElementSize=ht,s.UseElementVisibility=Et,s.UseEyeDropper=It,s.UseFullscreen=Lt,s.UseGeolocation=At,s.UseIdle=Mt,s.UseImage=Bt,s.UseMouse=Yt,s.UseMouseInElement=Zt,s.UseMousePressed=ar,s.UseNetwork=sr,s.UseNow=vr,s.UseObjectUrl=_r,s.UseOffsetPagination=br,s.UseOnline=Ur,s.UsePageLeave=Sr,s.UsePointer=Mr,s.UsePreferredColorScheme=Tr,s.UsePreferredContrast=Nr,s.UsePreferredDark=Rr,s.UsePreferredLanguages=Hr,s.UsePreferredReducedMotion=zr,s.UseScreenSafeArea=kr,s.UseTimeAgo=an,s.UseTimestamp=vn,s.UseVirtualList=On,s.UseWindowFocus=yn,s.UseWindowSize=Pn,s.VOnClickOutside=N,s.VOnLongPress=q,s.vElementHover=Pt,s.vElementSize=Ct,s.vElementVisibility=jt,s.vInfiniteScroll=Qt,s.vIntersectionObserver=Xt,s.vOnClickOutside=N,s.vOnKeyStroke=He,s.vOnLongPress=q,s.vScroll=Qr,s.vScrollLock=Zr})(this.VueUse=this.VueUse||{},VueDemi,VueUse,VueUse);
{
"name": "@vueuse/components",
"version": "9.7.0",
"version": "9.8.0",
"description": "Renderless components for VueUse",

@@ -36,6 +36,6 @@ "author": "Jacob Clevenger<https://github.com/wheatjs>",

"dependencies": {
"@vueuse/core": "9.7.0",
"@vueuse/shared": "9.7.0",
"@vueuse/core": "9.8.0",
"@vueuse/shared": "9.8.0",
"vue-demi": "*"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc