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
169
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 8.2.3 to 8.2.4

2

index.iife.js

@@ -337,3 +337,3 @@ ;var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {

read: (v) => new Set(JSON.parse(v)),
write: (v) => JSON.stringify(Array.from(v.entries()))
write: (v) => JSON.stringify(Array.from(v))
},

@@ -340,0 +340,0 @@ date: {

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

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

@@ -36,6 +36,6 @@ "keywords": [

"dependencies": {
"@vueuse/core": "8.2.3",
"@vueuse/shared": "8.2.3",
"@vueuse/core": "8.2.4",
"@vueuse/shared": "8.2.4",
"vue-demi": "*"
}
}

Sorry, the diff of this file is not supported yet

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