peerpigeon
Version:
WebRTC-based peer-to-peer mesh networking library with intelligent routing and signaling server
1 lines • 105 kB
JavaScript
var VueDemi=function(h,d,a){if(h.install)return h;if(!d)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),h;if(d.version.slice(0,4)==="2.7."){let q=function(X,J){var K,L={},A={config:d.config,use:d.use.bind(d),mixin:d.mixin.bind(d),component:d.component.bind(d),provide:function(H,U){return L[H]=U,this},directive:function(H,U){return U?(d.directive(H,U),A):d.directive(H)},mount:function(H,U){return K||(K=new d(Object.assign({propsData:J},X,{provide:Object.assign(L,X.provide)})),K.$mount(H,U),K)},unmount:function(){K&&(K.$destroy(),K=void 0)}};return A};var Ve=q;for(var Y in d)h[Y]=d[Y];h.isVue2=!0,h.isVue3=!1,h.install=function(){},h.Vue=d,h.Vue2=d,h.version=d.version,h.warn=d.util.warn,h.hasInjectionContext=function(){return!!h.getCurrentInstance()},h.createApp=q}else if(d.version.slice(0,2)==="2.")if(a){for(var Y in a)h[Y]=a[Y];h.isVue2=!0,h.isVue3=!1,h.install=function(){},h.Vue=d,h.Vue2=d,h.version=d.version,h.hasInjectionContext=function(){return!!h.getCurrentInstance()}}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(d.version.slice(0,2)==="3."){for(var Y in d)h[Y]=d[Y];h.isVue2=!1,h.isVue3=!0,h.install=function(){},h.Vue=d,h.Vue2=void 0,h.version=d.version,h.set=function(q,X,J){return Array.isArray(q)?(q.length=Math.max(q.length,X),q.splice(X,1,J),J):(q[X]=J,J)},h.del=function(q,X){if(Array.isArray(q)){q.splice(X,1);return}delete q[X]}}else console.error("[vue-demi] Vue version "+d.version+" is unsupported.");return h}((globalThis||self).VueDemi=(globalThis||self).VueDemi||(typeof VueDemi<"u"?VueDemi:{}),(globalThis||self).Vue||(typeof Vue<"u"?Vue:void 0),(globalThis||self).VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(h,d,a){"use strict";function Y(e,t,n){let r;a.isRef(n)?r={evaluating:n}:r=n||{};const{lazy:l=!1,evaluating:o=void 0,shallow:u=!0,onError:i=d.noop}=r,s=a.ref(!l),c=u?a.shallowRef(t):a.ref(t);let f=0;return a.watchEffect(async v=>{if(!s.value)return;f++;const y=f;let p=!1;o&&Promise.resolve().then(()=>{o.value=!0});try{const m=await e(S=>{v(()=>{o&&(o.value=!1),p||S()})});y===f&&(c.value=m)}catch(m){i(m)}finally{o&&y===f&&(o.value=!1),p=!0}}),l?a.computed(()=>(s.value=!0,c.value)):c}function Ve(e,t,n,r){let l=a.inject(e);return n&&(l=a.inject(e,n)),r&&(l=a.inject(e,n,r)),typeof t=="function"?a.computed(o=>t(l,o)):a.computed({get:o=>t.get(l,o),set:t.set})}function q(e={}){if(!a.isVue3&&!a.version.startsWith("2.7.")){if(process.env.NODE_ENV!=="production")throw new Error("[VueUse] createReusableTemplate only works in Vue 2.7 or above.");return}const{inheritAttrs:t=!0}=e,n=a.shallowRef(),r=a.defineComponent({setup(o,{slots:u}){return()=>{n.value=u.default}}}),l=a.defineComponent({inheritAttrs:t,setup(o,{attrs:u,slots:i}){return()=>{var s;if(!n.value&&process.env.NODE_ENV!=="production")throw new Error("[VueUse] Failed to find the definition of reusable template");const c=(s=n.value)==null?void 0:s.call(n,{...X(u),$slots:i});return t&&c?.length===1?c[0]:c}}});return d.makeDestructurable({define:r,reuse:l},[r,l])}function X(e){const t={};for(const n in e)t[d.camelize(n)]=e[n];return t}function J(e={}){if(!a.isVue3){if(process.env.NODE_ENV!=="production")throw new Error("[VueUse] createTemplatePromise only works in Vue 3 or above.");return}let t=0;const n=a.ref([]);function r(...u){const i=a.shallowReactive({key:t++,args:u,promise:void 0,resolve:()=>{},reject:()=>{},isResolving:!1,options:e});return n.value.push(i),i.promise=new Promise((s,c)=>{i.resolve=f=>(i.isResolving=!0,s(f)),i.reject=c}).finally(()=>{i.promise=void 0;const s=n.value.indexOf(i);s!==-1&&n.value.splice(s,1)}),i.promise}function l(...u){return e.singleton&&n.value.length>0?n.value[0].promise:r(...u)}const o=a.defineComponent((u,{slots:i})=>{const s=()=>n.value.map(c=>{var f;return a.h(a.Fragment,{key:c.key},(f=i.default)==null?void 0:f.call(i,c))});return e.transition?()=>a.h(a.TransitionGroup,e.transition,s):s});return o.start=l,o}function K(e){return function(...t){return e.apply(this,t.map(n=>d.toValue(n)))}}function L(e){var t;const n=d.toValue(e);return(t=n?.$el)!=null?t:n}const A=d.isClient?window:void 0,H=d.isClient?window.document:void 0,U=d.isClient?window.navigator:void 0,kt=d.isClient?window.location:void 0;function _(...e){let t,n,r,l;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,l]=e,t=A):[t,n,r,l]=e,!t)return d.noop;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],u=()=>{o.forEach(f=>f()),o.length=0},i=(f,v,y,p)=>(f.addEventListener(v,y,p),()=>f.removeEventListener(v,y,p)),s=a.watch(()=>[L(t),d.toValue(l)],([f,v])=>{if(u(),!f)return;const y=d.isObject(v)?{...v}:v;o.push(...n.flatMap(p=>r.map(m=>i(f,p,m,y))))},{immediate:!0,flush:"post"}),c=()=>{s(),u()};return d.tryOnScopeDispose(c),c}let Ae=!1;function _t(e,t,n={}){const{window:r=A,ignore:l=[],capture:o=!0,detectIframe:u=!1}=n;if(!r)return d.noop;d.isIOS&&!Ae&&(Ae=!0,Array.from(r.document.body.children).forEach(y=>y.addEventListener("click",d.noop)),r.document.documentElement.addEventListener("click",d.noop));let i=!0;const s=y=>l.some(p=>{if(typeof p=="string")return Array.from(r.document.querySelectorAll(p)).some(m=>m===y.target||y.composedPath().includes(m));{const m=L(p);return m&&(y.target===m||y.composedPath().includes(m))}}),f=[_(r,"click",y=>{const p=L(e);if(!(!p||p===y.target||y.composedPath().includes(p))){if(y.detail===0&&(i=!s(y)),!i){i=!0;return}t(y)}},{passive:!0,capture:o}),_(r,"pointerdown",y=>{const p=L(e);i=!s(y)&&!!(p&&!y.composedPath().includes(p))},{passive:!0}),u&&_(r,"blur",y=>{setTimeout(()=>{var p;const m=L(e);((p=r.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!m?.contains(r.document.activeElement)&&t(y)},0)})].filter(Boolean);return()=>f.forEach(y=>y())}function Rt(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ce(...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:l=A,eventName:o="keydown",passive:u=!1,dedupe:i=!1}=r,s=Rt(t);return _(l,o,f=>{f.repeat&&d.toValue(i)||s(f)&&n(f)},u)}function Ft(e,t,n={}){return ce(e,t,{...n,eventName:"keydown"})}function Pt(e,t,n={}){return ce(e,t,{...n,eventName:"keypress"})}function Ct(e,t,n={}){return ce(e,t,{...n,eventName:"keyup"})}const Vt=500,At=10;function It(e,t,n){var r,l;const o=a.computed(()=>L(e));let u,i,s,c=!1;function f(){u&&(clearTimeout(u),u=void 0),i=void 0,s=void 0,c=!1}function v(g){var b,E,R;const[k,V,T]=[s,i,c];if(f(),!n?.onMouseUp||!V||!k||(b=n?.modifiers)!=null&&b.self&&g.target!==o.value)return;(E=n?.modifiers)!=null&&E.prevent&&g.preventDefault(),(R=n?.modifiers)!=null&&R.stop&&g.stopPropagation();const C=g.x-V.x,F=g.y-V.y,O=Math.sqrt(C*C+F*F);n.onMouseUp(g.timeStamp-k,O,T)}function y(g){var b,E,R,k;(b=n?.modifiers)!=null&&b.self&&g.target!==o.value||(f(),(E=n?.modifiers)!=null&&E.prevent&&g.preventDefault(),(R=n?.modifiers)!=null&&R.stop&&g.stopPropagation(),i={x:g.x,y:g.y},s=g.timeStamp,u=setTimeout(()=>{c=!0,t(g)},(k=n?.delay)!=null?k:Vt))}function p(g){var b,E,R,k;if((b=n?.modifiers)!=null&&b.self&&g.target!==o.value||!i||n?.distanceThreshold===!1)return;(E=n?.modifiers)!=null&&E.prevent&&g.preventDefault(),(R=n?.modifiers)!=null&&R.stop&&g.stopPropagation();const V=g.x-i.x,T=g.y-i.y;Math.sqrt(V*V+T*T)>=((k=n?.distanceThreshold)!=null?k:At)&&f()}const m={capture:(r=n?.modifiers)==null?void 0:r.capture,once:(l=n?.modifiers)==null?void 0:l.once},S=[_(o,"pointerdown",y,m),_(o,"pointermove",p,m),_(o,["pointerup","pointerleave"],v,m)];return()=>S.forEach(g=>g())}function Mt(){const{activeElement:e,body:t}=document;if(!e||e===t)return!1;switch(e.tagName){case"INPUT":case"TEXTAREA":return!0}return e.hasAttribute("contenteditable")}function Lt({keyCode:e,metaKey:t,ctrlKey:n,altKey:r}){return t||n||r?!1:e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function Nt(e,t={}){const{document:n=H}=t;n&&_(n,"keydown",l=>{!Mt()&&Lt(l)&&e(l)},{passive:!0})}function xt(e,t=null){const n=a.getCurrentInstance();let r=()=>{};const l=a.customRef((o,u)=>(r=u,{get(){var i,s;return o(),(s=(i=n?.proxy)==null?void 0:i.$refs[e])!=null?s:t},set(){}}));return d.tryOnMounted(r),a.onUpdated(r),l}function Ie(){const e=a.ref(!1),t=a.getCurrentInstance();return t&&a.onMounted(()=>{e.value=!0},a.isVue2?void 0:t),e}function x(e){const t=Ie();return a.computed(()=>(t.value,!!e()))}function te(e,t,n={}){const{window:r=A,...l}=n;let o;const u=x(()=>r&&"MutationObserver"in r),i=()=>{o&&(o.disconnect(),o=void 0)},s=a.computed(()=>{const y=d.toValue(e),p=(Array.isArray(y)?y:[y]).map(L).filter(d.notNullish);return new Set(p)}),c=a.watch(()=>s.value,y=>{i(),u.value&&y.size&&(o=new MutationObserver(t),y.forEach(p=>o.observe(p,l)))},{immediate:!0,flush:"post"}),f=()=>o?.takeRecords(),v=()=>{i(),c()};return d.tryOnScopeDispose(v),{isSupported:u,stop:v,takeRecords:f}}function Me(e={}){var t;const{window:n=A,deep:r=!0,triggerOnRemoval:l=!1}=e,o=(t=e.document)!=null?t:n?.document,u=()=>{var c;let f=o?.activeElement;if(r)for(;f?.shadowRoot;)f=(c=f?.shadowRoot)==null?void 0:c.activeElement;return f},i=a.ref(),s=()=>{i.value=u()};return n&&(_(n,"blur",c=>{c.relatedTarget===null&&s()},!0),_(n,"focus",s,!0)),l&&te(o,c=>{c.filter(f=>f.removedNodes.length).map(f=>Array.from(f.removedNodes)).flat().forEach(f=>{f===i.value&&s()})},{childList:!0,subtree:!0}),s(),i}function Z(e,t={}){const{immediate:n=!0,fpsLimit:r=void 0,window:l=A}=t,o=a.ref(!1),u=r?1e3/r:null;let i=0,s=null;function c(y){if(!o.value||!l)return;i||(i=y);const p=y-i;if(u&&p<u){s=l.requestAnimationFrame(c);return}i=y,e({delta:p,timestamp:y}),s=l.requestAnimationFrame(c)}function f(){!o.value&&l&&(o.value=!0,i=0,s=l.requestAnimationFrame(c))}function v(){o.value=!1,s!=null&&l&&(l.cancelAnimationFrame(s),s=null)}return n&&f(),d.tryOnScopeDispose(v),{isActive:a.readonly(o),pause:v,resume:f}}function Wt(e,t,n){let r,l;d.isObject(n)?(r=n,l=d.objectOmit(n,["window","immediate","commitStyles","persist","onReady","onError"])):(r={duration:n},l=n);const{window:o=A,immediate:u=!0,commitStyles:i,persist:s,playbackRate:c=1,onReady:f,onError:v=M=>{console.error(M)}}=r,y=x(()=>o&&HTMLElement&&"animate"in HTMLElement.prototype),p=a.shallowRef(void 0),m=a.shallowReactive({startTime:null,currentTime:null,timeline:null,playbackRate:c,pending:!1,playState:u?"idle":"paused",replaceState:"active"}),S=a.computed(()=>m.pending),w=a.computed(()=>m.playState),g=a.computed(()=>m.replaceState),b=a.computed({get(){return m.startTime},set(M){m.startTime=M,p.value&&(p.value.startTime=M)}}),E=a.computed({get(){return m.currentTime},set(M){m.currentTime=M,p.value&&(p.value.currentTime=M,B())}}),R=a.computed({get(){return m.timeline},set(M){m.timeline=M,p.value&&(p.value.timeline=M)}}),k=a.computed({get(){return m.playbackRate},set(M){m.playbackRate=M,p.value&&(p.value.playbackRate=M)}}),V=()=>{if(p.value)try{p.value.play(),B()}catch(M){W(),v(M)}else P()},T=()=>{var M;try{(M=p.value)==null||M.pause(),W()}catch($){v($)}},C=()=>{var M;!p.value&&P();try{(M=p.value)==null||M.reverse(),B()}catch($){W(),v($)}},F=()=>{var M;try{(M=p.value)==null||M.finish(),W()}catch($){v($)}},O=()=>{var M;try{(M=p.value)==null||M.cancel(),W()}catch($){v($)}};a.watch(()=>L(e),M=>{M&&P()}),a.watch(()=>t,M=>{!p.value&&P(),!L(e)&&p.value&&(p.value.effect=new KeyframeEffect(L(e),d.toValue(M),l))},{deep:!0}),d.tryOnMounted(()=>{a.nextTick(()=>P(!0))}),d.tryOnScopeDispose(O);function P(M){const $=L(e);!y.value||!$||(p.value||(p.value=$.animate(d.toValue(t),l)),s&&p.value.persist(),c!==1&&(p.value.playbackRate=c),M&&!u?p.value.pause():B(),f?.(p.value))}_(p,["cancel","finish","remove"],W),_(p,"finish",()=>{var M;i&&((M=p.value)==null||M.commitStyles())});const{resume:I,pause:N}=Z(()=>{p.value&&(m.pending=p.value.pending,m.playState=p.value.playState,m.replaceState=p.value.replaceState,m.startTime=p.value.startTime,m.currentTime=p.value.currentTime,m.timeline=p.value.timeline,m.playbackRate=p.value.playbackRate)},{immediate:!1});function B(){y.value&&I()}function W(){y.value&&o&&o.requestAnimationFrame(N)}return{isSupported:y,animate:p,play:V,pause:T,reverse:C,finish:F,cancel:O,pending:S,playState:w,replaceState:g,startTime:b,currentTime:E,timeline:R,playbackRate:k}}function $t(e,t){const{interrupt:n=!0,onError:r=d.noop,onFinished:l=d.noop,signal:o}=t||{},u={aborted:"aborted",fulfilled:"fulfilled",pending:"pending",rejected:"rejected"},i=Array.from(Array.from({length:e.length}),()=>({state:u.pending,data:null})),s=a.reactive(i),c=a.ref(-1);if(!e||e.length===0)return l(),{activeIndex:c,result:s};function f(v,y){c.value++,s[c.value].data=y,s[c.value].state=v}return e.reduce((v,y)=>v.then(p=>{var m;if(o?.aborted){f(u.aborted,new Error("aborted"));return}if(((m=s[c.value])==null?void 0:m.state)===u.rejected&&n){l();return}const S=y(p).then(w=>(f(u.fulfilled,w),c.value===e.length-1&&l(),w));return o?Promise.race([S,Ht(o)]):S}).catch(p=>o?.aborted?(f(u.aborted,p),p):(f(u.rejected,p),r(),p)),Promise.resolve()),{activeIndex:c,result:s}}function Ht(e){return new Promise((t,n)=>{const r=new Error("aborted");e.aborted?n(r):e.addEventListener("abort",()=>n(r),{once:!0})})}function Le(e,t,n){const{immediate:r=!0,delay:l=0,onError:o=d.noop,onSuccess:u=d.noop,resetOnExecute:i=!0,shallow:s=!0,throwError:c}=n??{},f=s?a.shallowRef(t):a.ref(t),v=a.ref(!1),y=a.ref(!1),p=a.shallowRef(void 0);async function m(g=0,...b){i&&(f.value=t),p.value=void 0,v.value=!1,y.value=!0,g>0&&await d.promiseTimeout(g);const E=typeof e=="function"?e(...b):e;try{const R=await E;f.value=R,v.value=!0,u(R)}catch(R){if(p.value=R,o(R),c)throw R}finally{y.value=!1}return f.value}r&&m(l);const S={state:f,isReady:v,isLoading:y,error:p,execute:m};function w(){return new Promise((g,b)=>{d.until(y).toBe(!1).then(()=>g(S)).catch(b)})}return{...S,then(g,b){return w().then(g,b)}}}const oe={array:e=>JSON.stringify(e),object:e=>JSON.stringify(e),set:e=>JSON.stringify(Array.from(e)),map:e=>JSON.stringify(Object.fromEntries(e)),null:()=>""};function Ut(e){return e?e instanceof Map?oe.map:e instanceof Set?oe.set:Array.isArray(e)?oe.array:oe.object:oe.null}function Bt(e,t){const n=a.ref(""),r=a.ref();function l(){if(d.isClient)return r.value=new Promise((o,u)=>{try{const i=d.toValue(e);if(i==null)o("");else if(typeof i=="string")o(Se(new Blob([i],{type:"text/plain"})));else if(i instanceof Blob)o(Se(i));else if(i instanceof ArrayBuffer)o(window.btoa(String.fromCharCode(...new Uint8Array(i))));else if(i instanceof HTMLCanvasElement)o(i.toDataURL(t?.type,t?.quality));else if(i instanceof HTMLImageElement){const s=i.cloneNode(!1);s.crossOrigin="Anonymous",jt(s).then(()=>{const c=document.createElement("canvas"),f=c.getContext("2d");c.width=s.width,c.height=s.height,f.drawImage(s,0,0,c.width,c.height),o(c.toDataURL(t?.type,t?.quality))}).catch(u)}else if(typeof i=="object"){const c=(t?.serializer||Ut(i))(i);return o(Se(new Blob([c],{type:"application/json"})))}else u(new Error("target is unsupported types"))}catch(i){u(i)}}),r.value.then(o=>n.value=o),r.value}return a.isRef(e)||typeof e=="function"?a.watch(e,l,{immediate:!0}):l(),{base64:n,promise:r,execute:l}}function jt(e){return new Promise((t,n)=>{e.complete?t():(e.onload=()=>{t()},e.onerror=n)})}function Se(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=l=>{t(l.target.result)},r.onerror=n,r.readAsDataURL(e)})}function zt(e={}){const{navigator:t=U}=e,n=["chargingchange","chargingtimechange","dischargingtimechange","levelchange"],r=x(()=>t&&"getBattery"in t&&typeof t.getBattery=="function"),l=a.ref(!1),o=a.ref(0),u=a.ref(0),i=a.ref(1);let s;function c(){l.value=this.charging,o.value=this.chargingTime||0,u.value=this.dischargingTime||0,i.value=this.level}return r.value&&t.getBattery().then(f=>{s=f,c.call(s),_(s,n,c,{passive:!0})}),{isSupported:r,charging:l,chargingTime:o,dischargingTime:u,level:i}}function qt(e){let{acceptAllDevices:t=!1}=e||{};const{filters:n=void 0,optionalServices:r=void 0,navigator:l=U}=e||{},o=x(()=>l&&"bluetooth"in l),u=a.shallowRef(void 0),i=a.shallowRef(null);a.watch(u,()=>{v()});async function s(){if(o.value){i.value=null,n&&n.length>0&&(t=!1);try{u.value=await l?.bluetooth.requestDevice({acceptAllDevices:t,filters:n,optionalServices:r})}catch(y){i.value=y}}}const c=a.ref(),f=a.computed(()=>{var y;return((y=c.value)==null?void 0:y.connected)||!1});async function v(){if(i.value=null,u.value&&u.value.gatt){u.value.addEventListener("gattserverdisconnected",()=>{});try{c.value=await u.value.gatt.connect()}catch(y){i.value=y}}}return d.tryOnMounted(()=>{var y;u.value&&((y=u.value.gatt)==null||y.connect())}),d.tryOnScopeDispose(()=>{var y;u.value&&((y=u.value.gatt)==null||y.disconnect())}),{isSupported:o,isConnected:f,device:u,requestDevice:s,server:c,error:i}}function G(e,t={}){const{window:n=A}=t,r=x(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let l;const o=a.ref(!1),u=c=>{o.value=c.matches},i=()=>{l&&("removeEventListener"in l?l.removeEventListener("change",u):l.removeListener(u))},s=a.watchEffect(()=>{r.value&&(i(),l=n.matchMedia(d.toValue(e)),"addEventListener"in l?l.addEventListener("change",u):l.addListener(u),o.value=l.matches)});return d.tryOnScopeDispose(()=>{s(),i(),l=void 0}),o}const Gt={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Yt={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},Ne={xs:0,sm:600,md:960,lg:1264,xl:1904},Xt={xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560},Kt=Ne,Jt={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600},Qt={xs:0,sm:600,md:1024,lg:1440,xl:1920},Zt={mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560},Dt={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},en={sm:576,md:768,lg:992,xl:1200};function tn(e,t={}){function n(f,v){let y=d.toValue(e[d.toValue(f)]);return v!=null&&(y=d.increaseWithUnit(y,v)),typeof y=="number"&&(y=`${y}px`),y}const{window:r=A,strategy:l="min-width"}=t;function o(f){return r?r.matchMedia(f).matches:!1}const u=f=>G(()=>`(min-width: ${n(f)})`,t),i=f=>G(()=>`(max-width: ${n(f)})`,t),s=Object.keys(e).reduce((f,v)=>(Object.defineProperty(f,v,{get:()=>l==="min-width"?u(v):i(v),enumerable:!0,configurable:!0}),f),{});function c(){const f=Object.keys(e).map(v=>[v,u(v)]);return a.computed(()=>f.filter(([,v])=>v.value).map(([v])=>v))}return Object.assign(s,{greaterOrEqual:u,smallerOrEqual:i,greater(f){return G(()=>`(min-width: ${n(f,.1)})`,t)},smaller(f){return G(()=>`(max-width: ${n(f,-.1)})`,t)},between(f,v){return G(()=>`(min-width: ${n(f)}) and (max-width: ${n(v,-.1)})`,t)},isGreater(f){return o(`(min-width: ${n(f,.1)})`)},isGreaterOrEqual(f){return o(`(min-width: ${n(f)})`)},isSmaller(f){return o(`(max-width: ${n(f,-.1)})`)},isSmallerOrEqual(f){return o(`(max-width: ${n(f)})`)},isInBetween(f,v){return o(`(min-width: ${n(f)}) and (max-width: ${n(v,-.1)})`)},current:c,active(){const f=c();return a.computed(()=>f.value.length===0?"":f.value.at(-1))}})}function nn(e){const{name:t,window:n=A}=e,r=x(()=>n&&"BroadcastChannel"in n),l=a.ref(!1),o=a.ref(),u=a.ref(),i=a.shallowRef(null),s=f=>{o.value&&o.value.postMessage(f)},c=()=>{o.value&&o.value.close(),l.value=!0};return r.value&&d.tryOnMounted(()=>{i.value=null,o.value=new BroadcastChannel(t),o.value.addEventListener("message",f=>{u.value=f.data},{passive:!0}),o.value.addEventListener("messageerror",f=>{i.value=f},{passive:!0}),o.value.addEventListener("close",()=>{l.value=!0})}),d.tryOnScopeDispose(()=>{c()}),{isSupported:r,channel:o,data:u,post:s,close:c,error:i,isClosed:l}}const xe=["hash","host","hostname","href","pathname","port","protocol","search"];function on(e={}){const{window:t=A}=e,n=Object.fromEntries(xe.map(o=>[o,a.ref()]));for(const[o,u]of d.objectEntries(n))a.watch(u,i=>{!t?.location||t.location[o]===i||(t.location[o]=i)});const r=o=>{var u;const{state:i,length:s}=t?.history||{},{origin:c}=t?.location||{};for(const f of xe)n[f].value=(u=t?.location)==null?void 0:u[f];return a.reactive({trigger:o,state:i,length:s,origin:c,...n})},l=a.ref(r("load"));return t&&(_(t,"popstate",()=>l.value=r("popstate"),{passive:!0}),_(t,"hashchange",()=>l.value=r("hashchange"),{passive:!0})),l}function rn(e,t=(r,l)=>r===l,n){const r=a.ref(e.value);return a.watch(()=>e.value,l=>{t(l,r.value)||(r.value=l)},n),r}function fe(e,t={}){const{controls:n=!1,navigator:r=U}=t,l=x(()=>r&&"permissions"in r);let o;const u=typeof e=="string"?{name:e}:e,i=a.ref(),s=()=>{o&&(i.value=o.state)},c=d.createSingletonPromise(async()=>{if(l.value){if(!o)try{o=await r.permissions.query(u),_(o,"change",s),s()}catch{i.value="prompt"}return o}});return c(),n?{state:i,isSupported:l,query:c}:i}function ln(e={}){const{navigator:t=U,read:n=!1,source:r,copiedDuring:l=1500,legacy:o=!1}=e,u=x(()=>t&&"clipboard"in t),i=fe("clipboard-read"),s=fe("clipboard-write"),c=a.computed(()=>u.value||o),f=a.ref(""),v=a.ref(!1),y=d.useTimeoutFn(()=>v.value=!1,l);function p(){u.value&&g(i.value)?t.clipboard.readText().then(b=>{f.value=b}):f.value=w()}c.value&&n&&_(["copy","cut"],p);async function m(b=d.toValue(r)){c.value&&b!=null&&(u.value&&g(s.value)?await t.clipboard.writeText(b):S(b),f.value=b,v.value=!0,y.start())}function S(b){const E=document.createElement("textarea");E.value=b??"",E.style.position="absolute",E.style.opacity="0",document.body.appendChild(E),E.select(),document.execCommand("copy"),E.remove()}function w(){var b,E,R;return(R=(E=(b=document?.getSelection)==null?void 0:b.call(document))==null?void 0:E.toString())!=null?R:""}function g(b){return b==="granted"||b==="prompt"}return{isSupported:c,text:f,copied:v,copy:m}}function an(e={}){const{navigator:t=U,read:n=!1,source:r,copiedDuring:l=1500}=e,o=x(()=>t&&"clipboard"in t),u=a.ref([]),i=a.ref(!1),s=d.useTimeoutFn(()=>i.value=!1,l);function c(){o.value&&t.clipboard.read().then(v=>{u.value=v})}o.value&&n&&_(["copy","cut"],c);async function f(v=d.toValue(r)){o.value&&v!=null&&(await t.clipboard.write(v),u.value=v,i.value=!0,s.start())}return{isSupported:o,content:u,copied:i,copy:f}}function re(e){return JSON.parse(JSON.stringify(e))}function un(e,t={}){const n=a.ref({}),{manual:r,clone:l=re,deep:o=!0,immediate:u=!0}=t;function i(){n.value=l(d.toValue(e))}return!r&&(a.isRef(e)||typeof e=="function")?a.watch(e,i,{...t,deep:o,immediate:u}):i(),{cloned:n,sync:i}}const de=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ve="__vueuse_ssr_handlers__",We=sn();function sn(){return ve in de||(de[ve]=de[ve]||{}),de[ve]}function pe(e,t){return We[e]||t}function cn(e,t){We[e]=t}function $e(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 Ee={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()}},Te="vueuse-storage";function ye(e,t,n,r={}){var l;const{flush:o="pre",deep:u=!0,listenToStorageChanges:i=!0,writeDefaults:s=!0,mergeDefaults:c=!1,shallow:f,window:v=A,eventFilter:y,onError:p=O=>{console.error(O)},initOnMounted:m}=r,S=(f?a.shallowRef:a.ref)(typeof t=="function"?t():t);if(!n)try{n=pe("getDefaultStorage",()=>{var O;return(O=A)==null?void 0:O.localStorage})()}catch(O){p(O)}if(!n)return S;const w=d.toValue(t),g=$e(w),b=(l=r.serializer)!=null?l:Ee[g],{pause:E,resume:R}=d.pausableWatch(S,()=>V(S.value),{flush:o,deep:u,eventFilter:y});v&&i&&d.tryOnMounted(()=>{_(v,"storage",C),_(v,Te,F),m&&C()}),m||C();function k(O,P){v&&v.dispatchEvent(new CustomEvent(Te,{detail:{key:e,oldValue:O,newValue:P,storageArea:n}}))}function V(O){try{const P=n.getItem(e);if(O==null)k(P,null),n.removeItem(e);else{const I=b.write(O);P!==I&&(n.setItem(e,I),k(P,I))}}catch(P){p(P)}}function T(O){const P=O?O.newValue:n.getItem(e);if(P==null)return s&&w!=null&&n.setItem(e,b.write(w)),w;if(!O&&c){const I=b.read(P);return typeof c=="function"?c(I,w):g==="object"&&!Array.isArray(I)?{...w,...I}:I}else return typeof P!="string"?P:b.read(P)}function C(O){if(!(O&&O.storageArea!==n)){if(O&&O.key==null){S.value=w;return}if(!(O&&O.key!==e)){E();try{O?.newValue!==b.write(S.value)&&(S.value=T(O))}catch(P){p(P)}finally{O?a.nextTick(R):R()}}}}function F(O){C(O.detail)}return S}function Oe(e){return G("(prefers-color-scheme: dark)",e)}function He(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:l=A,storage:o,storageKey:u="vueuse-color-scheme",listenToStorageChanges:i=!0,storageRef:s,emitAuto:c,disableTransition:f=!0}=e,v={auto:"",light:"light",dark:"dark",...e.modes||{}},y=Oe({window:l}),p=a.computed(()=>y.value?"dark":"light"),m=s||(u==null?d.toRef(r):ye(u,r,o,{window:l,listenToStorageChanges:i})),S=a.computed(()=>m.value==="auto"?p.value:m.value),w=pe("updateHTMLAttrs",(R,k,V)=>{const T=typeof R=="string"?l?.document.querySelector(R):L(R);if(!T)return;let C;if(f&&(C=l.document.createElement("style"),C.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),l.document.head.appendChild(C)),k==="class"){const F=V.split(/\s/g);Object.values(v).flatMap(O=>(O||"").split(/\s/g)).filter(Boolean).forEach(O=>{F.includes(O)?T.classList.add(O):T.classList.remove(O)})}else T.setAttribute(k,V);f&&(l.getComputedStyle(C).opacity,document.head.removeChild(C))});function g(R){var k;w(t,n,(k=v[R])!=null?k:R)}function b(R){e.onChanged?e.onChanged(R,g):g(R)}a.watch(S,b,{flush:"post",immediate:!0}),d.tryOnMounted(()=>b(S.value));const E=a.computed({get(){return c?m.value:S.value},set(R){m.value=R}});try{return Object.assign(E,{store:m,system:p,state:S})}catch{return E}}function fn(e=a.ref(!1)){const t=d.createEventHook(),n=d.createEventHook(),r=d.createEventHook();let l=d.noop;const o=s=>(r.trigger(s),e.value=!0,new Promise(c=>{l=c})),u=s=>{e.value=!1,t.trigger(s),l({data:s,isCanceled:!1})},i=s=>{e.value=!1,n.trigger(s),l({data:s,isCanceled:!0})};return{isRevealed:a.computed(()=>e.value),reveal:o,confirm:u,cancel:i,onReveal:r.on,onConfirm:t.on,onCancel:n.on}}function le(e,t,n={}){const{window:r=A,initialValue:l="",observe:o=!1}=n,u=a.ref(l),i=a.computed(()=>{var c;return L(t)||((c=r?.document)==null?void 0:c.documentElement)});function s(){var c;const f=d.toValue(e),v=d.toValue(i);if(v&&r){const y=(c=r.getComputedStyle(v).getPropertyValue(f))==null?void 0:c.trim();u.value=y||l}}return o&&te(i,s,{attributeFilter:["style","class"],window:r}),a.watch([i,()=>d.toValue(e)],s,{immediate:!0}),a.watch(u,c=>{var f;(f=i.value)!=null&&f.style&&i.value.style.setProperty(d.toValue(e),c)}),u}function Ue(e){const t=a.getCurrentInstance(),n=d.computedWithControl(()=>null,()=>e?L(e):t.proxy.$el);return a.onUpdated(n.trigger),a.onMounted(n.trigger),n}function dn(e,t){const n=a.shallowRef(c()),r=d.toRef(e),l=a.computed({get(){var f;const v=r.value;let y=t?.getIndexOf?t.getIndexOf(n.value,v):v.indexOf(n.value);return y<0&&(y=(f=t?.fallbackIndex)!=null?f:0),y},set(f){o(f)}});function o(f){const v=r.value,y=v.length,p=(f%y+y)%y,m=v[p];return n.value=m,m}function u(f=1){return o(l.value+f)}function i(f=1){return u(f)}function s(f=1){return u(-f)}function c(){var f,v;return(v=d.toValue((f=t?.initialValue)!=null?f:d.toValue(e)[0]))!=null?v:void 0}return a.watch(r,()=>o(l.value)),{state:n,index:l,next:i,prev:s,go:o}}function vn(e={}){const{valueDark:t="dark",valueLight:n="",window:r=A}=e,l=He({...e,onChanged:(i,s)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,i==="dark",s,i):s(i)},modes:{dark:t,light:n}}),o=a.computed(()=>l.system?l.system.value:Oe({window:r}).value?"dark":"light");return a.computed({get(){return l.value==="dark"},set(i){const s=i?"dark":"light";o.value===s?l.value="auto":l.value=s}})}function Be(e){return e}function pn(e,t){return e.value=t}function yn(e){return e?typeof e=="function"?e:re:Be}function mn(e){return e?typeof e=="function"?e:re:Be}function je(e,t={}){const{clone:n=!1,dump:r=yn(n),parse:l=mn(n),setSource:o=pn}=t;function u(){return a.markRaw({snapshot:r(e.value),timestamp:d.timestamp()})}const i=a.ref(u()),s=a.ref([]),c=a.ref([]),f=E=>{o(e,l(E.snapshot)),i.value=E},v=()=>{s.value.unshift(i.value),i.value=u(),t.capacity&&s.value.length>t.capacity&&s.value.splice(t.capacity,Number.POSITIVE_INFINITY),c.value.length&&c.value.splice(0,c.value.length)},y=()=>{s.value.splice(0,s.value.length),c.value.splice(0,c.value.length)},p=()=>{const E=s.value.shift();E&&(c.value.unshift(i.value),f(E))},m=()=>{const E=c.value.shift();E&&(s.value.unshift(i.value),f(E))},S=()=>{f(i.value)},w=a.computed(()=>[i.value,...s.value]),g=a.computed(()=>s.value.length>0),b=a.computed(()=>c.value.length>0);return{source:e,undoStack:s,redoStack:c,last:i,history:w,canUndo:g,canRedo:b,clear:y,commit:v,reset:S,undo:p,redo:m}}function ke(e,t={}){const{deep:n=!1,flush:r="pre",eventFilter:l}=t,{eventFilter:o,pause:u,resume:i,isActive:s}=d.pausableFilter(l),{ignoreUpdates:c,ignorePrevAsyncUpdates:f,stop:v}=d.watchIgnorable(e,w,{deep:n,flush:r,eventFilter:o});function y(R,k){f(),c(()=>{R.value=k})}const p=je(e,{...t,clone:t.clone||n,setSource:y}),{clear:m,commit:S}=p;function w(){f(),S()}function g(R){i(),R&&w()}function b(R){let k=!1;const V=()=>k=!0;c(()=>{R(V)}),k||w()}function E(){v(),m()}return{...p,isTracking:s,pause:u,resume:g,commit:w,batch:b,dispose:E}}function gn(e,t={}){const n=t.debounce?d.debounceFilter(t.debounce):void 0;return{...ke(e,{...t,eventFilter:n})}}function hn(e={}){const{window:t=A,eventFilter:n=d.bypassFilter}=e,r=a.ref({x:null,y:null,z:null}),l=a.ref({alpha:null,beta:null,gamma:null}),o=a.ref(0),u=a.ref({x:null,y:null,z:null});if(t){const i=d.createFilterWrapper(n,s=>{r.value=s.acceleration,u.value=s.accelerationIncludingGravity,l.value=s.rotationRate,o.value=s.interval});_(t,"devicemotion",i)}return{acceleration:r,accelerationIncludingGravity:u,rotationRate:l,interval:o}}function ze(e={}){const{window:t=A}=e,n=x(()=>t&&"DeviceOrientationEvent"in t),r=a.ref(!1),l=a.ref(null),o=a.ref(null),u=a.ref(null);return t&&n.value&&_(t,"deviceorientation",i=>{r.value=i.absolute,l.value=i.alpha,o.value=i.beta,u.value=i.gamma}),{isSupported:n,isAbsolute:r,alpha:l,beta:o,gamma:u}}function wn(e={}){const{window:t=A}=e,n=a.ref(1);if(t){let r=function(){n.value=t.devicePixelRatio,l(),o=t.matchMedia(`(resolution: ${n.value}dppx)`),o.addEventListener("change",r,{once:!0})},l=function(){o?.removeEventListener("change",r)},o;r(),d.tryOnScopeDispose(l)}return{pixelRatio:n}}function bn(e={}){const{navigator:t=U,requestPermissions:n=!1,constraints:r={audio:!0,video:!0},onUpdated:l}=e,o=a.ref([]),u=a.computed(()=>o.value.filter(m=>m.kind==="videoinput")),i=a.computed(()=>o.value.filter(m=>m.kind==="audioinput")),s=a.computed(()=>o.value.filter(m=>m.kind==="audiooutput")),c=x(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),f=a.ref(!1);let v;async function y(){c.value&&(o.value=await t.mediaDevices.enumerateDevices(),l?.(o.value),v&&(v.getTracks().forEach(m=>m.stop()),v=null))}async function p(){if(!c.value)return!1;if(f.value)return!0;const{state:m,query:S}=fe("camera",{controls:!0});return await S(),m.value!=="granted"&&(v=await t.mediaDevices.getUserMedia(r),y()),f.value=!0,f.value}return c.value&&(n&&p(),_(t.mediaDevices,"devicechange",y),y()),{devices:o,ensurePermissions:p,permissionGranted:f,videoInputs:u,audioInputs:i,audioOutputs:s,isSupported:c}}function Sn(e={}){var t;const n=a.ref((t=e.enabled)!=null?t:!1),r=e.video,l=e.audio,{navigator:o=U}=e,u=x(()=>{var p;return(p=o?.mediaDevices)==null?void 0:p.getDisplayMedia}),i={audio:l,video:r},s=a.shallowRef();async function c(){var p;if(!(!u.value||s.value))return s.value=await o.mediaDevices.getDisplayMedia(i),(p=s.value)==null||p.getTracks().forEach(m=>m.addEventListener("ended",v)),s.value}async function f(){var p;(p=s.value)==null||p.getTracks().forEach(m=>m.stop()),s.value=void 0}function v(){f(),n.value=!1}async function y(){return await c(),s.value&&(n.value=!0),s.value}return a.watch(n,p=>{p?c():f()},{immediate:!0}),{isSupported:u,stream:s,start:y,stop:v,enabled:n}}function En(e={}){const{document:t=H}=e;if(!t)return a.ref("visible");const n=a.ref(t.visibilityState);return _(t,"visibilitychange",()=>{n.value=t.visibilityState}),n}function Tn(e,t={}){var n,r;const{pointerTypes:l,preventDefault:o,stopPropagation:u,exact:i,onMove:s,onEnd:c,onStart:f,initialValue:v,axis:y="both",draggingElement:p=A,containerElement:m,handle:S=e}=t,w=a.ref((n=d.toValue(v))!=null?n:{x:0,y:0}),g=a.ref(),b=T=>l?l.includes(T.pointerType):!0,E=T=>{d.toValue(o)&&T.preventDefault(),d.toValue(u)&&T.stopPropagation()},R=T=>{var C;if(T.button!==0||d.toValue(t.disabled)||!b(T)||d.toValue(i)&&T.target!==d.toValue(e))return;const F=d.toValue(m),O=(C=F?.getBoundingClientRect)==null?void 0:C.call(F),P=d.toValue(e).getBoundingClientRect(),I={x:T.clientX-(F?P.left-O.left+F.scrollLeft:P.left),y:T.clientY-(F?P.top-O.top+F.scrollTop:P.top)};f?.(I,T)!==!1&&(g.value=I,E(T))},k=T=>{if(d.toValue(t.disabled)||!b(T)||!g.value)return;const C=d.toValue(m),F=d.toValue(e).getBoundingClientRect();let{x:O,y:P}=w.value;(y==="x"||y==="both")&&(O=T.clientX-g.value.x,C&&(O=Math.min(Math.max(0,O),C.scrollWidth-F.width))),(y==="y"||y==="both")&&(P=T.clientY-g.value.y,C&&(P=Math.min(Math.max(0,P),C.scrollHeight-F.height))),w.value={x:O,y:P},s?.(w.value,T),E(T)},V=T=>{d.toValue(t.disabled)||!b(T)||g.value&&(g.value=void 0,c?.(w.value,T),E(T))};if(d.isClient){const T={capture:(r=t.capture)!=null?r:!0};_(S,"pointerdown",R,T),_(p,"pointermove",k,T),_(p,"pointerup",V,T)}return{...d.toRefs(w),position:w,isDragging:a.computed(()=>!!g.value),style:a.computed(()=>`left:${w.value.x}px;top:${w.value.y}px;`)}}function On(e,t={}){const n=a.ref(!1),r=a.shallowRef(null);let l=0,o=!0;if(d.isClient){const u=typeof t=="function"?{onDrop:t}:t,i=s=>{var c,f;const v=Array.from((f=(c=s.dataTransfer)==null?void 0:c.files)!=null?f:[]);return r.value=v.length===0?null:v};_(e,"dragenter",s=>{var c,f;const v=Array.from(((c=s?.dataTransfer)==null?void 0:c.items)||[]).map(y=>y.kind==="file"?y.type:null).filter(d.notNullish);if(u.dataTypes&&s.dataTransfer){const y=a.unref(u.dataTypes);if(o=typeof y=="function"?y(v):y?y.some(p=>v.includes(p)):!0,!o)return}s.preventDefault(),l+=1,n.value=!0,(f=u.onEnter)==null||f.call(u,i(s),s)}),_(e,"dragover",s=>{var c;o&&(s.preventDefault(),(c=u.onOver)==null||c.call(u,i(s),s))}),_(e,"dragleave",s=>{var c;o&&(s.preventDefault(),l-=1,l===0&&(n.value=!1),(c=u.onLeave)==null||c.call(u,i(s),s))}),_(e,"drop",s=>{var c;s.preventDefault(),l=0,n.value=!1,(c=u.onDrop)==null||c.call(u,i(s),s)})}return{files:r,isOverDropZone:n}}function me(e,t,n={}){const{window:r=A,...l}=n;let o;const u=x(()=>r&&"ResizeObserver"in r),i=()=>{o&&(o.disconnect(),o=void 0)},s=a.computed(()=>Array.isArray(e)?e.map(v=>L(v)):[L(e)]),c=a.watch(s,v=>{if(i(),u.value&&r){o=new ResizeObserver(t);for(const y of v)y&&o.observe(y,l)}},{immediate:!0,flush:"post"}),f=()=>{i(),c()};return d.tryOnScopeDispose(f),{isSupported:u,stop:f}}function kn(e,t={}){const{reset:n=!0,windowResize:r=!0,windowScroll:l=!0,immediate:o=!0}=t,u=a.ref(0),i=a.ref(0),s=a.ref(0),c=a.ref(0),f=a.ref(0),v=a.ref(0),y=a.ref(0),p=a.ref(0);function m(){const S=L(e);if(!S){n&&(u.value=0,i.value=0,s.value=0,c.value=0,f.value=0,v.value=0,y.value=0,p.value=0);return}const w=S.getBoundingClientRect();u.value=w.height,i.value=w.bottom,s.value=w.left,c.value=w.right,f.value=w.top,v.value=w.width,y.value=w.x,p.value=w.y}return me(e,m),a.watch(()=>L(e),S=>!S&&m()),te(e,m,{attributeFilter:["style","class"]}),l&&_("scroll",m,{capture:!0,passive:!0}),r&&_("resize",m,{passive:!0}),d.tryOnMounted(()=>{o&&m()}),{height:u,bottom:i,left:s,right:c,top:f,width:v,x:y,y:p,update:m}}function _n(e){const{x:t,y:n,document:r=H,multiple:l,interval:o="requestAnimationFrame",immediate:u=!0}=e,i=x(()=>d.toValue(l)?r&&"elementsFromPoint"in r:r&&"elementFromPoint"in r),s=a.ref(null),c=()=>{var v,y;s.value=d.toValue(l)?(v=r?.elementsFromPoint(d.toValue(t),d.toValue(n)))!=null?v:[]:(y=r?.elementFromPoint(d.toValue(t),d.toValue(n)))!=null?y:null},f=o==="requestAnimationFrame"?Z(c,{immediate:u}):d.useIntervalFn(c,o,{immediate:u});return{isSupported:i,element:s,...f}}function Rn(e,t={}){const{delayEnter:n=0,delayLeave:r=0,window:l=A}=t,o=a.ref(!1);let u;const i=s=>{const c=s?n:r;u&&(clearTimeout(u),u=void 0),c?u=setTimeout(()=>o.value=s,c):o.value=s};return l&&(_(e,"mouseenter",()=>i(!0),{passive:!0}),_(e,"mouseleave",()=>i(!1),{passive:!0})),o}function qe(e,t={width:0,height:0},n={}){const{window:r=A,box:l="content-box"}=n,o=a.computed(()=>{var v,y;return(y=(v=L(e))==null?void 0:v.namespaceURI)==null?void 0:y.includes("svg")}),u=a.ref(t.width),i=a.ref(t.height),{stop:s}=me(e,([v])=>{const y=l==="border-box"?v.borderBoxSize:l==="content-box"?v.contentBoxSize:v.devicePixelContentBoxSize;if(r&&o.value){const p=L(e);if(p){const m=p.getBoundingClientRect();u.value=m.width,i.value=m.height}}else if(y){const p=Array.isArray(y)?y:[y];u.value=p.reduce((m,{inlineSize:S})=>m+S,0),i.value=p.reduce((m,{blockSize:S})=>m+S,0)}else u.value=v.contentRect.width,i.value=v.contentRect.height},n);d.tryOnMounted(()=>{const v=L(e);v&&(u.value="offsetWidth"in v?v.offsetWidth:t.width,i.value="offsetHeight"in v?v.offsetHeight:t.height)});const c=a.watch(()=>L(e),v=>{u.value=v?t.width:0,i.value=v?t.height:0});function f(){s(),c()}return{width:u,height:i,stop:f}}function Ge(e,t,n={}){const{root:r,rootMargin:l="0px",threshold:o=.1,window:u=A,immediate:i=!0}=n,s=x(()=>u&&"IntersectionObserver"in u),c=a.computed(()=>{const m=d.toValue(e);return(Array.isArray(m)?m:[m]).map(L).filter(d.notNullish)});let f=d.noop;const v=a.ref(i),y=s.value?a.watch(()=>[c.value,L(r),v.value],([m,S])=>{if(f(),!v.value||!m.length)return;const w=new IntersectionObserver(t,{root:L(S),rootMargin:l,threshold:o});m.forEach(g=>g&&w.observe(g)),f=()=>{w.disconnect(),f=d.noop}},{immediate:i,flush:"post"}):d.noop,p=()=>{f(),y(),v.value=!1};return d.tryOnScopeDispose(p),{isSupported:s,isActive:v,pause(){f(),v.value=!1},resume(){v.value=!0},stop:p}}function Ye(e,t={}){const{window:n=A,scrollTarget:r,threshold:l=0}=t,o=a.ref(!1);return Ge(e,u=>{let i=o.value,s=0;for(const c of u)c.time>=s&&(s=c.time,i=c.isIntersecting);o.value=i},{root:r,window:n,threshold:l}),o}const ae=new Map;function Fn(e){const t=a.getCurrentScope();function n(i){var s;const c=ae.get(e)||new Set;c.add(i),ae.set(e,c);const f=()=>l(i);return(s=t?.cleanups)==null||s.push(f),f}function r(i){function s(...c){l(s),i(...c)}return n(s)}function l(i){const s=ae.get(e);s&&(s.delete(i),s.size||o())}function o(){ae.delete(e)}function u(i,s){var c;(c=ae.get(e))==null||c.forEach(f=>f(i,s))}return{on:n,once:r,off:l,emit:u,reset:o}}function Pn(e){return e===!0?{}:e}function Cn(e,t=[],n={}){const r=a.ref(null),l=a.ref(null),o=a.ref("CONNECTING"),u=a.ref(null),i=a.shallowRef(null),s=d.toRef(e),c=a.shallowRef(null);let f=!1,v=0;const{withCredentials:y=!1,immediate:p=!0}=n,m=()=>{d.isClient&&u.value&&(u.value.close(),u.value=null,o.value="CLOSED",f=!0)},S=()=>{if(f||typeof s.value>"u")return;const g=new EventSource(s.value,{withCredentials:y});o.value="CONNECTING",u.value=g,g.onopen=()=>{o.value="OPEN",i.value=null},g.onerror=b=>{if(o.value="CLOSED",i.value=b,g.readyState===2&&!f&&n.autoReconnect){g.close();const{retries:E=-1,delay:R=1e3,onFailed:k}=Pn(n.autoReconnect);v+=1,typeof E=="number"&&(E<0||v<E)||typeof E=="function"&&E()?setTimeout(S,R):k?.()}},g.onmessage=b=>{r.value=null,l.value=b.data,c.value=b.lastEventId};for(const b of t)_(g,b,E=>{r.value=b,l.value=E.data||null})},w=()=>{d.isClient&&(m(),f=!1,v=0,S())};return p&&a.watch(s,w,{immediate:!0}),d.tryOnScopeDispose(m),{eventSource:u,event:r,data:l,status:o,error:i,open:w,close:m,lastEventId:c}}function Vn(e={}){const{initialValue:t=""}=e,n=x(()=>typeof window<"u"&&"EyeDropper"in window),r=a.ref(t);async function l(o){if(!n.value)return;const i=await new window.EyeDropper().open(o);return r.value=i.sRGBHex,i}return{isSupported:n,sRGBHex:r,open:l}}function An(e=null,t={}){const{baseUrl:n="",rel:r="icon",document:l=H}=t,o=d.toRef(e),u=i=>{const s=l?.head.querySelectorAll(`link[rel*="${r}"]`);if(!s||s.length===0){const c=l?.createElement("link");c&&(c.rel=r,c.href=`${n}${i}`,c.type=`image/${i.split(".").pop()}`,l?.head.append(c));return}s?.forEach(c=>c.href=`${n}${i}`)};return a.watch(o,(i,s)=>{typeof i=="string"&&i!==s&&u(i)},{immediate:!0}),o}const In={json:"application/json",text:"text/plain"};function ge(e){return e&&d.containsProp(e,"immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError","fetch","updateDataOnError")}const Mn=/^(?:[a-z][a-z\d+\-.]*:)?\/\//i;function Ln(e){return Mn.test(e)}function ue(e){return typeof Headers<"u"&&e instanceof Headers?Object.fromEntries(e.entries()):e}function ne(e,...t){return e==="overwrite"?async n=>{const r=t[t.length-1];return r?{...n,...await r(n)}:n}:async n=>{for(const r of t)r&&(n={...n,...await r(n)});return n}}function Nn(e={}){const t=e.combination||"chain",n=e.options||{},r=e.fetchOptions||{};function l(o,...u){const i=a.computed(()=>{const f=d.toValue(e.baseUrl),v=d.toValue(o);return f&&!Ln(v)?xn(f,v):v});let s=n,c=r;return u.length>0&&(ge(u[0])?s={...s,...u[0],beforeFetch:ne(t,n.beforeFetch,u[0].beforeFetch),afterFetch:ne(t,n.afterFetch,u[0].afterFetch),onFetchError:ne(t,n.onFetchError,u[0].onFetchError)}:c={...c,...u[0],headers:{...ue(c.headers)||{},...ue(u[0].headers)||{}}}),u.length>1&&ge(u[1])&&(s={...s,...u[1],beforeFetch:ne(t,n.beforeFetch,u[1].beforeFetch),afterFetch:ne(t,n.afterFetch,u[1].afterFetch),onFetchError:ne(t,n.onFetchError,u[1].onFetchError)}),Xe(i,c,s)}return l}function Xe(e,...t){var n;const r=typeof AbortController=="function";let l={},o={immediate:!0,refetch:!1,timeout:0,updateDataOnError:!1};const u={method:"GET",type:"text",payload:void 0};t.length>0&&(ge(t[0])?o={...o,...t[0]}:l=t[0]),t.length>1&&ge(t[1])&&(o={...o,...t[1]});const{fetch:i=(n=A)==null?void 0:n.fetch,initialData:s,timeout:c}=o,f=d.createEventHook(),v=d.createEventHook(),y=d.createEventHook(),p=a.ref(!1),m=a.ref(!1),S=a.ref(!1),w=a.ref(null),g=a.shallowRef(null),b=a.shallowRef(null),E=a.shallowRef(s||null),R=a.computed(()=>r&&m.value);let k,V;const T=()=>{r&&(k?.abort(),k=new AbortController,k.signal.onabort=()=>S.value=!0,l={...l,signal:k.signal})},C=M=>{m.value=M,p.value=!M};c&&(V=d.useTimeoutFn(T,c,{immediate:!1}));let F=0;const O=async(M=!1)=>{var $,j;T(),C(!0),b.value=null,w.value=null,S.value=!1,F+=1;const ie=F,D={method:u.method,headers:{}};if(u.payload){const z=ue(D.headers),Q=d.toValue(u.payload);!u.payloadType&&Q&&Object.getPrototypeOf(Q)===Object.prototype&&!(Q instanceof FormData)&&(u.payloadType="json"),u.payloadType&&(z["Content-Type"]=($=In[u.payloadType])!=null?$:u.payloadType),D.body=u.payloadType==="json"?JSON.stringify(Q):Q}let Ot=!1;const se={url:d.toValue(e),options:{...D,...l},cancel:()=>{Ot=!0}};if(o.beforeFetch&&Object.assign(se,await o.beforeFetch(se)),Ot||!i)return C(!1),Promise.resolve(null);let ee=null;return V&&V.start(),i(se.url,{...D,...se.options,headers:{...ue(D.headers),...ue((j=se.options)==null?void 0:j.headers)}}).then(async z=>{if(g.value=z,w.value=z.status,ee=await z.clone()[u.type](),!z.ok)throw E.value=s||null,new Error(z.statusText);return o.afterFetch&&({data:ee}=await o.afterFetch({data:ee,response:z})),E.value=ee,f.trigger(z),z}).catch(async z=>{let Q=z.message||z.name;if(o.onFetchError&&({error:Q,data:ee}=await o.onFetchError({data:ee,error:z,response:g.value})),b.value=Q,o.updateDataOnError&&(E.value=ee),v.trigger(z),M)throw z;return null}).finally(()=>{ie===F&&C(!1),V&&V.stop(),y.trigger(null)})},P=d.toRef(o.refetch);a.watch([P,d.toRef(e)],([M])=>M&&O(),{deep:!0});const I={isFinished:a.readonly(p),isFetching:a.readonly(m),statusCode:w,response:g,error:b,data:E,canAbort:R,aborted:S,abort:T,execute:O,onFetchResponse:f.on,onFetchError:v.on,onFetchFinally:y.on,get:N("GET"),put:N("PUT"),post:N("POST"),delete:N("DELETE"),patch:N("PATCH"),head:N("HEAD"),options:N("OPTIONS"),json:W("json"),text:W("text"),blob:W("blob"),arrayBuffer:W("arrayBuffer"),formData:W("formData")};function N(M){return($,j)=>{if(!m.value)return u.method=M,u.payload=$,u.payloadType=j,a.isRef(u.payload)&&a.watch([P,d.toRef(u.payload)],([ie])=>ie&&O(),{deep:!0}),{...I,then(ie,D){return B().then(ie,D)}}}}function B(){return new Promise((M,$)=>{d.until(p).toBe(!0).then(()=>M(I)).catch(j=>$(j))})}function W(M){return()=>{if(!m.value)return u.type=M,{...I,then($,j){return B().then($,j)}}}}return o.immediate&&Promise.resolve().then(()=>O()),{...I,then(M,$){return B().then(M,$)}}}function xn(e,t){return!e.endsWith("/")&&!t.startsWith("/")?`${e}/${t}`:`${e}${t}`}const Wn={multiple:!0,accept:"*",reset:!1,directory:!1};function $n(e={}){const{document:t=H}=e,n=a.ref(null),{on:r,trigger:l}=d.createEventHook();let o;t&&(o=t.createElement("input"),o.type="file",o.onchange=s=>{const c=s.target;n.value=c.files,l(n.value)});const u=()=>{n.value=null,o&&o.value&&(o.value="",l(null))},i=s=>{if(!o)return;const c={...Wn,...e,...s};o.multiple=c.multiple,o.accept=c.accept,o.webkitdirectory=c.directory,d.hasOwn(c,"capture")&&(o.capture=c.capture),c.reset&&u(),o.click()};return{files:a.readonly(n),open:i,reset:u,onChange:r}}function Hn(e={}){const{window:t=A,dataType:n="Text"}=e,r=t,l=x(()=>r&&"showSaveFilePicker"in r&&"showOpenFilePicker"in r),o=a.ref(),u=a.ref(),i=a.ref(),s=a.computed(()=>{var b,E;return(E=(b=i.value)==null?void 0:b.name)!=null?E:""}),c=a.computed(()=>{var b,E;return(E=(b=i.value)==null?void 0:b.type)!=null?E:""}),f=a.computed(()=>{var b,E;return(E=(b=i.value)==null?void 0:b.size)!=null?E:0}),v=a.computed(()=>{var b,E;return(E=(b=i.value)==null?void 0:b.lastModified)!=null?E:0});async function y(b={}){if(!l.value)return;const[E]=await r.showOpenFilePicker({...d.toValue(e),...b});o.value=E,await g()}async function p(b={}){l.value&&(o.value=await r.showSaveFilePicker({...e,...b}),u.value=void 0,await g())}async function m(b={}){if(l.value){if(!o.value)return S(b);if(u.value){const E=await o.value.createWritable();await E.write(u.value),await E.close()}await w()}}async function S(b={}){if(l.value){if(o.value=await r.showSaveFilePicker({...e,...b}),u.value){const E=await o.value.createWritable();await E.write(u.value),await E.close()}await w()}}async function w(){var b;i.value=await((b=o.value)==null?void 0:b.getFile())}async function g(){var b,E;await w();const R=d.toValue(n);R==="Text"?u.value=await((b=i.value)==null?void 0:b.text()):R==="ArrayBuffer"?u.value=await((E=i.value)==null?void 0:E.arrayBuffer()):R==="Blob"&&(u.value=i.value)}return a.watch(()=>d.toValue(n),g),{isSupported:l,data:u,file:i,fileName:s,fileMIME:c,fileSize:f,fileLastModified:v,open:y,create:p,save:m,saveAs:S,updateData:g}}function Un(e,t={}){const{initialValue:n=!1,focusVisible:r=!1,preventScroll:l=!1}=t,o=a.ref(!1),u=a.computed(()=>L(e));_(u,"focus",s=>{var c,f;(!r||(f=(c=s.target).matches)!=null&&f.call(c,":focus-visible"))&&(o.value=!0)}),_(u,"blur",()=>o.value=!1);const i=a.computed({get:()=>o.value,set(s){var c,f;!s&&o.value?(c=u.value)==null||c.blur():s&&!o.value&&((f=u.value)==null||f.focus({preventScroll:l}))}});return a.watch(u,()=>{i.value=n},{immediate:!0,flush:"post"}),{focused:i}}function Bn(e,t={}){const n=Me(t),r=a.computed(()=>L(e));return{focused:a.computed(()=>r.value&&n.value?r.value.contains(n.value):!1)}}function jn(e){var t;const n=a.ref(0);if(typeof performance>"u")return n;const r=(t=e?.every)!=null?t:10;let l=performance.now(),o=0;return Z(()=>{if(o+=1,o>=r){const u=performance.now(),i=u-l;n.value=Math.round(1e3/(i/o)),l=u,o=0}}),n}const Ke=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function zn(e,t={}){const{document:n=H,autoExit:r=!1}=t,l=a.computed(()=>{var g;return(g=L(e))!=null?g:n?.querySelector("html")}),o=a.ref(!1),u=a.computed(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(g=>n&&g in n||l.value&&g in l.value)),i=a.computed(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(g=>n&&g in n||l.value&&g in l.value)),s=a.computed(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(g=>n&&g in n||l.value&&g in l.value)),c=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(g=>n&&g in n),f=x(()=>l.value&&n&&u.value!==void 0&&i.value!==void 0&&s.value!==void 0),v=()=>c?n?.[c]===l.value:!1,y=()=>{if(s.value){if(n&&n[s.value]!=null)return n[s.value];{const g=l.value;if(g?.[s.value]!=null)return!!g[s.value]}}return!1};async function p(){if(!(!f.value||!o.value)){if(i.value)if(n?.[i.value]!=null)await n[i.value]();else{const g=l.value;g?.[i.value]!=null&&await g[i.value]()}o.value=!1}}async function m(){if(!f.value||o.value)return;y()&&await p();const g=l.value;u.value&&g?.[u.value]!=null&&(await g[u.value](),o.value=!0)}async function S(){await(o.value?p():m())}const w=()=>{const g=y();(!g||g&&v())&&(o.value=g)};return _(n,Ke,w,!1),_(()=>L(l),Ke,w,!1),r&&d.tryOnScopeDispose(p),{isSupported:f,isFullscreen:o,enter:m,exit:p,toggle:S}}function qn(e){return a.computed(()=>e.value?{buttons:{a:e.value.buttons[0],b:e.value.buttons[1],x:e.value.buttons[2],y:e.value.buttons[3]},bumper:{left:e.value.buttons[4],right:e.value.buttons[5]},triggers:{left:e.value.buttons[6],right:e.valu