suyuan/public/admin/assets/@vueuse.d3d080b7.js

2 lines
12 KiB
JavaScript

import{g as se,e as le,f as x,i as ie,n as X,j as ue,r as w,s as Y,k as ce,l as fe,w as F,u as O,m as de,b as M}from"./@vue.108c970a.js";var pe=Object.defineProperty,ve=Object.defineProperties,me=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,A=(e,t,r)=>t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_e=(e,t)=>{for(var r in t||(t={}))ge.call(t,r)&&A(e,r,t[r]);if(k)for(var r of k(t))we.call(t,r)&&A(e,r,t[r]);return e},he=(e,t)=>ve(e,me(t));function ot(e,t){var r;const n=Y();return ce(()=>{n.value=e()},he(_e({},t),{flush:(r=t==null?void 0:t.flush)!=null?r:"sync"})),fe(n)}var W;const T=typeof window<"u",be=e=>typeof e<"u",st=e=>typeof e=="boolean",lt=e=>typeof e=="number",ye=e=>typeof e=="string",C=()=>{};T&&((W=window==null?void 0:window.navigator)==null?void 0:W.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function z(e,t){function r(...n){e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})}return r}const Z=e=>e();function Oe(e,t={}){let r,n;return o=>{const s=O(e),l=O(t.maxWait);if(r&&clearTimeout(r),s<=0||l!==void 0&&l<=0)return n&&(clearTimeout(n),n=null),o();l&&!n&&(n=setTimeout(()=>{r&&clearTimeout(r),n=null,o()},l)),r=setTimeout(()=>{n&&clearTimeout(n),n=null,o()},s)}}function Pe(e,t=!0,r=!0){let n=0,a,o=!0;const s=()=>{a&&(clearTimeout(a),a=void 0)};return u=>{const f=O(e),m=Date.now()-n;if(s(),f<=0)return n=Date.now(),u();m>f&&(r||!o)?(n=Date.now(),u()):t&&(a=setTimeout(()=>{n=Date.now(),o=!0,s(),u()},f)),!r&&!a&&(a=setTimeout(()=>o=!0,f)),o=!1}}function Se(e=Z){const t=w(!0);function r(){t.value=!1}function n(){t.value=!0}return{isActive:t,pause:r,resume:n,eventFilter:(...o)=>{t.value&&e(...o)}}}function D(e){return se()?(le(e),!0):!1}function Ee(e,t=200,r={}){return z(Oe(t,r),e)}function it(e,t=200,r={}){if(t<=0)return e;const n=w(e.value),a=Ee(()=>{n.value=e.value},t,r);return F(e,()=>a()),n}function ut(e,t=200,r=!0,n=!0){return z(Pe(t,r,n),e)}function $e(e,t=!0){x()?de(e):t?e():X(e)}function ee(e,t=!0){x()?ie(e):t?e():X(e)}function ct(e,t,r={}){const{immediate:n=!0}=r,a=w(!1);let o=null;function s(){o&&(clearTimeout(o),o=null)}function l(){a.value=!1,s()}function u(...f){s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=null,e(...f)},O(t))}return n&&(a.value=!0,T&&u()),D(l),{isPending:a,start:u,stop:l}}function ft(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,a=ue(e),o=w(e);function s(l){return arguments.length?(o.value=l,o.value):(o.value=o.value===O(r)?O(n):O(r),o.value)}return a?s:[o,s]}var V=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Te=(e,t)=>{var r={};for(var n in e)Fe.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&V)for(var n of V(e))t.indexOf(n)<0&&je.call(e,n)&&(r[n]=e[n]);return r};function De(e,t,r={}){const n=r,{eventFilter:a=Z}=n,o=Te(n,["eventFilter"]);return F(e,z(a,t),o)}var Ne=Object.defineProperty,Me=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,q=(e,t,r)=>t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ce=(e,t)=>{for(var r in t||(t={}))te.call(t,r)&&q(e,r,t[r]);if(R)for(var r of R(t))re.call(t,r)&&q(e,r,t[r]);return e},Ie=(e,t)=>Me(e,Re(t)),Le=(e,t)=>{var r={};for(var n in e)te.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&R)for(var n of R(e))t.indexOf(n)<0&&re.call(e,n)&&(r[n]=e[n]);return r};function xe(e,t,r={}){const n=r,{eventFilter:a}=n,o=Le(n,["eventFilter"]),{eventFilter:s,pause:l,resume:u,isActive:f}=Se(a);return{stop:De(e,t,Ie(Ce({},o),{eventFilter:s})),pause:l,resume:u,isActive:f}}function $(e){var t;const r=O(e);return(t=r==null?void 0:r.$el)!=null?t:r}const y=T?window:void 0,ne=T?window.document:void 0;T&&window.navigator;T&&window.location;function b(...e){let t,r,n,a;if(ye(e[0])?([r,n,a]=e,t=y):[t,r,n,a]=e,!t)return C;let o=C;const s=F(()=>$(t),u=>{o(),u&&(u.addEventListener(r,n,a),o=()=>{u.removeEventListener(r,n,a),o=C})},{immediate:!0,flush:"post"}),l=()=>{s(),o()};return D(l),l}function dt(e,t,r={}){const{window:n=y,ignore:a,capture:o=!0,detectIframe:s=!1}=r;if(!n)return;const l=w(!0);let u;const f=i=>{n.clearTimeout(u);const c=$(e),g=i.composedPath();!c||c===i.target||g.includes(c)||!l.value||a&&a.length>0&&a.some(v=>{const _=$(v);return _&&(i.target===_||g.includes(_))})||t(i)},m=[b(n,"click",f,{passive:!0,capture:o}),b(n,"pointerdown",i=>{const c=$(e);l.value=!!c&&!i.composedPath().includes(c)},{passive:!0}),b(n,"pointerup",i=>{if(i.button===0){const c=i.composedPath();i.composedPath=()=>c,u=n.setTimeout(()=>f(i),50)}},{passive:!0}),s&&b(n,"blur",i=>{var c;const g=$(e);((c=document.activeElement)==null?void 0:c.tagName)==="IFRAME"&&!(g!=null&&g.contains(document.activeElement))&&t(i)})].filter(Boolean);return()=>m.forEach(i=>i())}function ze(e,t={}){const{window:r=y}=t,n=Boolean(r&&"matchMedia"in r&&typeof r.matchMedia=="function");let a;const o=w(!1),s=()=>{!n||(a||(a=r.matchMedia(e)),o.value=a.matches)};return $e(()=>{s(),a&&("addEventListener"in a?a.addEventListener("change",s):a.addListener(s),D(()=>{"removeEventListener"in a?a.removeEventListener("change",s):a.removeListener(s)}))}),o}const I=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},L="__vueuse_ssr_handlers__";I[L]=I[L]||{};const ke=I[L];function ae(e,t){return ke[e]||t}function Ae(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"||Array.isArray(e)?"object":Number.isNaN(e)?"any":"number"}const We={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()}};function Ve(e,t,r,n={}){var a;const{flush:o="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:u=!0,shallow:f,window:m=y,eventFilter:p,onError:i=d=>{console.error(d)}}=n,c=(f?Y:w)(t);if(!r)try{r=ae("getDefaultStorage",()=>{var d;return(d=y)==null?void 0:d.localStorage})()}catch(d){i(d)}if(!r)return c;const g=O(t),v=Ae(g),_=(a=n.serializer)!=null?a:We[v],{pause:h,resume:S}=xe(c,()=>E(c.value),{flush:o,deep:s,eventFilter:p});return m&&l&&b(m,"storage",N),N(),c;function E(d){try{d==null?r.removeItem(e):r.setItem(e,_.write(d))}catch(P){i(P)}}function j(d){if(!(d&&d.key!==e)){h();try{const P=d?d.newValue:r.getItem(e);return P==null?(u&&g!==null&&r.setItem(e,_.write(g)),g):typeof P!="string"?P:_.read(P)}catch(P){i(P)}finally{S()}}}function N(d){d&&d.key!==e||(c.value=j(d))}}function oe(e){return ze("(prefers-color-scheme: dark)",e)}var qe=Object.defineProperty,H=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,B=(e,t,r)=>t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Je=(e,t)=>{for(var r in t||(t={}))He.call(t,r)&&B(e,r,t[r]);if(H)for(var r of H(t))Be.call(t,r)&&B(e,r,t[r]);return e};function Qe(e={}){const{selector:t="html",attribute:r="class",window:n=y,storage:a,storageKey:o="vueuse-color-scheme",listenToStorageChanges:s=!0,storageRef:l,emitAuto:u}=e,f=Je({auto:"",light:"light",dark:"dark"},e.modes||{}),m=oe({window:n}),p=M(()=>m.value?"dark":"light"),i=l||(o==null?w("auto"):Ve(o,"auto",a,{window:n,listenToStorageChanges:s})),c=M({get(){return i.value==="auto"&&!u?p.value:i.value},set(h){i.value=h}}),g=ae("updateHTMLAttrs",(h,S,E)=>{const j=n==null?void 0:n.document.querySelector(h);if(!!j)if(S==="class"){const N=E.split(/\s/g);Object.values(f).flatMap(d=>(d||"").split(/\s/g)).filter(Boolean).forEach(d=>{N.includes(d)?j.classList.add(d):j.classList.remove(d)})}else j.setAttribute(S,E)});function v(h){var S;const E=h==="auto"?p.value:h;g(t,r,(S=f[E])!=null?S:E)}function _(h){e.onChanged?e.onChanged(h,v):v(h)}return F(c,_,{flush:"post",immediate:!0}),ee(()=>_(c.value)),c}var Ue=Object.defineProperty,Ge=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Q=(e,t,r)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ze=(e,t)=>{for(var r in t||(t={}))Xe.call(t,r)&&Q(e,r,t[r]);if(J)for(var r of J(t))Ye.call(t,r)&&Q(e,r,t[r]);return e},et=(e,t)=>Ge(e,Ke(t));function pt(e={}){const{valueDark:t="dark",valueLight:r="",window:n=y}=e,a=Qe(et(Ze({},e),{onChanged:(l,u)=>{var f;e.onChanged?(f=e.onChanged)==null||f.call(e,l==="dark"):u(l)},modes:{dark:t,light:r}})),o=oe({window:n});return M({get(){return a.value==="dark"},set(l){l===o.value?a.value="auto":a.value=l?"dark":"light"}})}function vt({document:e=ne}={}){if(!e)return w("visible");const t=w(e.visibilityState);return b(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var U=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,nt=(e,t)=>{var r={};for(var n in e)tt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&U)for(var n of U(e))t.indexOf(n)<0&&rt.call(e,n)&&(r[n]=e[n]);return r};function mt(e,t,r={}){const n=r,{window:a=y}=n,o=nt(n,["window"]);let s;const l=a&&"ResizeObserver"in a,u=()=>{s&&(s.disconnect(),s=void 0)},f=F(()=>$(e),p=>{u(),l&&a&&p&&(s=new ResizeObserver(t),s.observe(p,o))},{immediate:!0,flush:"post"}),m=()=>{u(),f()};return D(m),{isSupported:l,stop:m}}const G=[["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 gt(e,t={}){const{document:r=ne,autoExit:n=!1}=t,a=e||(r==null?void 0:r.querySelector("html")),o=w(!1);let s=!1,l=G[0];if(!r)s=!1;else for(const v of G)if(v[1]in r){l=v,s=!0;break}const[u,f,m,,p]=l;async function i(){!s||(r!=null&&r[m]&&await r[f](),o.value=!1)}async function c(){if(!s)return;await i();const v=$(a);v&&(await v[u](),o.value=!0)}async function g(){o.value?await i():await c()}return r&&b(r,p,()=>{o.value=!!(r!=null&&r[m])},!1),n&&D(i),{isSupported:s,isFullscreen:o,enter:c,exit:i,toggle:g}}var K;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(K||(K={}));function wt(e,t,r,n={}){var a,o,s;const{passive:l=!1,eventName:u,deep:f=!1,defaultValue:m}=n,p=x(),i=r||(p==null?void 0:p.emit)||((a=p==null?void 0:p.$emit)==null?void 0:a.bind(p))||((s=(o=p==null?void 0:p.proxy)==null?void 0:o.$emit)==null?void 0:s.bind(p==null?void 0:p.proxy));let c=u;t||(t="modelValue"),c=u||c||`update:${t.toString()}`;const g=()=>be(e[t])?e[t]:m;if(l){const v=w(g());return F(()=>e[t],_=>v.value=_),F(v,_=>{(_!==e[t]||f)&&i(c,_)},{deep:f}),v}else return M({get(){return g()},set(v){i(c,v)}})}function _t({window:e=y}={}){if(!e)return w(!1);const t=w(e.document.hasFocus());return b(e,"blur",()=>{t.value=!1}),b(e,"focus",()=>{t.value=!0}),t}function ht(e={}){const{window:t=y,initialWidth:r=1/0,initialHeight:n=1/0,listenOrientation:a=!0}=e,o=w(r),s=w(n),l=()=>{t&&(o.value=t.innerWidth,s.value=t.innerHeight)};return l(),ee(l),b("resize",l,{passive:!0}),a&&b("orientationchange",l,{passive:!0}),{width:o,height:s}}export{lt as a,st as b,b as c,$ as d,ct as e,ut as f,vt as g,_t as h,T as i,ot as j,wt as k,gt as l,pt as m,ft as n,dt as o,ht as p,it as r,D as t,mt as u};