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

2 lines
9.7 KiB
JavaScript
Raw Normal View History

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")