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

@vueuse/components

Package Overview
Dependencies
Maintainers
4
Versions
161
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 10.3.0 to 10.4.0

2

index.d.ts

@@ -650,2 +650,2 @@ import * as vue_demi from 'vue-demi';

export { OnClickOutside, OnClickOutsideProps, OnLongPress, OnLongPressProps, UseActiveElement, UseBattery, UseBrowserLocation, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, UseDraggableProps, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, UseObjectUrlProps, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, UseVirtualListProps, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vScroll, vScrollLock };
export { OnClickOutside, type OnClickOutsideProps, OnLongPress, type OnLongPressProps, UseActiveElement, UseBattery, UseBrowserLocation, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, type UseDraggableProps, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, type UseObjectUrlProps, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, type UseVirtualListProps, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vScroll, vScrollLock };

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

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

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

".": {
"require": "./index.cjs",
"import": "./index.mjs"
"import": "./index.mjs",
"require": "./index.cjs"
},

@@ -36,6 +36,6 @@ "./*": "./*"

"dependencies": {
"@vueuse/core": "10.3.0",
"@vueuse/shared": "10.3.0",
"@vueuse/core": "10.4.0",
"@vueuse/shared": "10.4.0",
"vue-demi": ">=0.14.5"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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