y9-interface-platform/y9vue-interfacePlatform/interface/assets/@vueuse-409d7ed5.js

2 lines
9.7 KiB
JavaScript

import"./vue-20eed888.js";import{g as B,f as X,n as G,i as se,r as _,h as Y,j as Z,w as S,u as $,k as j,s as ee,l as ie,m as te,p as ue}from"./@vue-e95c845e.js";function k(e){return Y()?(Z(e),!0):!1}const C=typeof window<"u",ce=e=>typeof e=="string",F=()=>{};function fe(e,t){function r(...n){e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})}return r}const de=e=>e();var N=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,me=(e,t)=>{var r={};for(var n in e)pe.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&N)for(var n of N(e))t.indexOf(n)<0&&ve.call(e,n)&&(r[n]=e[n]);return r};function ge(e,t,r={}){const n=r,{eventFilter:l=de}=n,o=me(n,["eventFilter"]);return S(e,fe(l,t),o)}function M(e,t=!0){B()?X(e):t?e():G(e)}function et(e=!1){if(se(e))return t=>(e.value=typeof t=="boolean"?t:!e.value,e.value);{const t=_(e);return[t,n=>(t.value=typeof n=="boolean"?n:!t.value,t.value)]}}function we(e){var t;const r=$(e);return(t=r==null?void 0:r.$el)!=null?t:r}const b=C?window:void 0,he=C?window.document:void 0;function L(...e){let t,r,n,l;if(ce(e[0])?([r,n,l]=e,t=b):[t,r,n,l]=e,!t)return F;let o=F;const i=S(()=>$(t),s=>{o(),s&&(s.addEventListener(r,n,l),o=()=>{s.removeEventListener(r,n,l),o=F})},{immediate:!0,flush:"post"}),a=()=>{i(),o()};return k(a),a}function _e(e,t={}){const{window:r=b}=t;let n;const l=_(!1),o=()=>{r&&(n||(n=r.matchMedia(e)),l.value=n.matches)};return M(()=>{o(),n&&("addEventListener"in n?n.addEventListener("change",o):n.addListener(o),k(()=>{"removeEventListener"in o?n.removeEventListener("change",o):n.removeListener(o)}))}),l}const T=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},D="__vueuse_ssr_handlers__";T[D]=T[D]||{};const ye=T[D];function re(e,t){return ye[e]||t}function be(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"||Array.isArray(e)?"object":Number.isNaN(e)?"any":"number"}const Oe={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.entries()))}};function Se(e,t,r,n={}){var l;const{flush:o="pre",deep:i=!0,listenToStorageChanges:a=!0,writeDefaults:s=!0,shallow:u,window:v=b,eventFilter:m,onError:c=d=>{console.error(d)}}=n,g=$(t),h=be(g),f=(u?ee:_)(t),p=(l=n.serializer)!=null?l:Oe[h];if(!r)try{r=re("getDefaultStorage",()=>{var d;return(d=b)==null?void 0:d.localStorage})()}catch(d){c(d)}function y(d){if(!(!r||d&&d.key!==e))try{const w=d?d.newValue:r.getItem(e);w==null?(f.value=g,s&&g!==null&&r.setItem(e,p.write(g))):typeof w!="string"?f.value=w:f.value=p.read(w)}catch(w){c(w)}}return y(),v&&a&&L(v,"storage",d=>setTimeout(()=>y(d),0)),r&&ge(f,()=>{try{f.value==null?r.removeItem(e):r.setItem(e,p.write(f.value))}catch(d){c(d)}},{flush:o,deep:i,eventFilter:m}),f}function ne(e){return _e("(prefers-color-scheme: dark)",e)}var Pe=Object.defineProperty,x=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,R=(e,t,r)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fe=(e,t)=>{for(var r in t||(t={}))Ee.call(t,r)&&R(e,r,t[r]);if(x)for(var r of x(t))$e.call(t,r)&&R(e,r,t[r]);return e};function je(e={}){const{selector:t="html",attribute:r="class",window:n=b,storage:l,storageKey:o="vueuse-color-scheme",listenToStorageChanges:i=!0,storageRef:a}=e,s=Fe({auto:"",light:"light",dark:"dark"},e.modes||{}),u=ne({window:n}),v=j(()=>u.value?"dark":"light"),m=a||(o==null?_("auto"):Se(o,"auto",l,{window:n,listenToStorageChanges:i})),c=j({get(){return m.value==="auto"?v.value:m.value},set(p){m.value=p}}),g=re("updateHTMLAttrs",(p,y,d)=>{const w=n==null?void 0:n.document.querySelector(p);if(w)if(y==="class"){const ae=d.split(/\s/g);Object.values(s).flatMap(O=>(O||"").split(/\s/g)).filter(Boolean).forEach(O=>{ae.includes(O)?w.classList.add(O):w.classList.remove(O)})}else w.setAttribute(y,d)});function h(p){var y;g(t,r,(y=s[p])!=null?y:p)}function f(p){e.onChanged?e.onChanged(p,h):h(p)}return S(c,f,{flush:"post",immediate:!0}),M(()=>f(c.value)),c}var Te=Object.defineProperty,De=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,z=(e,t,r)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Le=(e,t)=>{for(var r in t||(t={}))Ce.call(t,r)&&z(e,r,t[r]);if(I)for(var r of I(t))Me.call(t,r)&&z(e,r,t[r]);return e},Ne=(e,t)=>De(e,ke(t));function tt(e={}){const{valueDark:t="dark",valueLight:r="",window:n=b}=e,l=je(Ne(Le({},e),{onChanged:(a,s)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,a==="dark"):s(a)},modes:{dark:t,light:r}})),o=ne({window:n});return j({get(){return l.value==="dark"},set(a){a===o.value?l.value="auto":l.value=a?"dark":"light"}})}const A=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];function rt(e,t={}){const{document:r=he,autoExit:n=!1}=t,l=e||(r==null?void 0:r.querySelector("html")),o=_(!1);let i=!1,a=A[0];if(!r)i=!1;else for(const f of A)if(f[1]in r){a=f,i=!0;break}const[s,u,v,,m]=a;async function c(){i&&(r!=null&&r[v]&&await r[u](),o.value=!1)}async function g(){if(!i)return;await c();const f=we(l);f&&(await f[s](),o.value=!0)}async function h(){o.value?await c():await g()}return r&&L(r,m,()=>{o.value=!!(r!=null&&r[v])},!1),n&&k(c),{isSupported:i,isFullscreen:o,enter:g,exit:c,toggle:h}}var W,q;C&&(window!=null&&window.navigator)&&((W=window==null?void 0:window.navigator)!=null&&W.platform)&&/iP(ad|hone|od)/.test((q=window==null?void 0:window.navigator)==null?void 0:q.platform);var xe=Object.defineProperty,J=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,H=(e,t,r)=>t in e?xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ze=(e,t)=>{for(var r in t||(t={}))Re.call(t,r)&&H(e,r,t[r]);if(J)for(var r of J(t))Ie.call(t,r)&&H(e,r,t[r]);return e};const Ae={top:0,left:0,bottom:0,right:0,height:0,width:0};ze({text:""},Ae);function nt({window:e=b,initialWidth:t=1/0,initialHeight:r=1/0}={}){const n=_(t),l=_(r),o=()=>{e&&(n.value=e.innerWidth,l.value=e.innerHeight)};return o(),M(o),L("resize",o,{passive:!0}),{width:n,height:l}}var We=Object.defineProperty,qe=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,V=(e,t,r)=>t in e?We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ve=(e,t)=>{for(var r in t||(t={}))He.call(t,r)&&V(e,r,t[r]);if(Q)for(var r of Q(t))Qe.call(t,r)&&V(e,r,t[r]);return e},Ke=(e,t)=>qe(e,Je(t));function ot(e,t){var r;const n=ee();return ie(()=>{n.value=e()},Ke(Ve({},t),{flush:(r=t==null?void 0:t.flush)!=null?r:"sync"})),te(n)}var K;const oe=typeof window<"u",lt=e=>typeof e<"u",U=e=>typeof e=="function",at=e=>typeof e=="string",P=()=>{},st=oe&&((K=window==null?void 0:window.navigator)==null?void 0:K.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function E(e){return typeof e=="function"?e():$(e)}function le(e,t){function r(...n){return new Promise((l,o)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(l).catch(o)})}return r}function Ue(e,t={}){let r,n,l=P;const o=a=>{clearTimeout(a),l(),l=P};return a=>{const s=E(e),u=E(t.maxWait);return r&&o(r),s<=0||u!==void 0&&u<=0?(n&&(o(n),n=null),Promise.resolve(a())):new Promise((v,m)=>{l=t.rejectOnCancel?m:v,u&&!n&&(n=setTimeout(()=>{r&&o(r),n=null,v(a())},u)),r=setTimeout(()=>{n&&o(n),n=null,v(a())},s)})}}function Be(e,t=!0,r=!0,n=!1){let l=0,o,i=!0,a=P,s;const u=()=>{o&&(clearTimeout(o),o=void 0,a(),a=P)};return m=>{const c=E(e),g=Date.now()-l,h=()=>s=m();return u(),c<=0?(l=Date.now(),h()):(g>c&&(r||!i)?(l=Date.now(),h()):t&&(s=new Promise((f,p)=>{a=n?p:f,o=setTimeout(()=>{l=Date.now(),i=!0,f(h()),u()},Math.max(0,c-g))})),!r&&!o&&(o=setTimeout(()=>i=!0,c)),i=!1,s)}}function it(e){return e}function ut(e,t){let r,n,l;const o=_(!0),i=()=>{o.value=!0,l()};S(e,i,{flush:"sync"});const a=U(t)?t:t.get,s=U(t)?void 0:t.set,u=ue((v,m)=>(n=v,l=m,{get(){return o.value&&(r=a(),o.value=!1),n(),r},set(c){s==null||s(c)}}));return Object.isExtensible(u)&&(u.trigger=i),u}function Xe(e){return Y()?(Z(e),!0):!1}function Ge(e,t=200,r={}){return le(Ue(t,r),e)}function ct(e,t=200,r={}){const n=_(e.value),l=Ge(()=>{n.value=e.value},t,r);return S(e,()=>l()),n}function ft(e,t=200,r=!1,n=!0,l=!1){return le(Be(t,r,n,l),e)}function dt(e,t=!0){B()?X(e):t?e():G(e)}function pt(e,t,r={}){const{immediate:n=!0}=r,l=_(!1);let o=null;function i(){o&&(clearTimeout(o),o=null)}function a(){l.value=!1,i()}function s(...u){i(),l.value=!0,o=setTimeout(()=>{l.value=!1,o=null,e(...u)},E(t))}return n&&(l.value=!0,oe&&s()),Xe(a),{isPending:te(l),start:s,stop:a}}export{st as a,dt as b,ut as c,oe as d,it as e,U as f,lt as g,ot as h,at as i,ct as j,pt as k,nt as l,rt as m,P as n,tt as o,et as p,E as r,Xe as t,ft as u};