物管理前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
6.7 KiB

  1. import{G as U,x as M,E as X,H as Y,I as J,J as Z,z as P,K as x,M as H,N as W,O as ee,P as te,y as E,Q as ne,V as re}from"./index-Bo-aCpEW.js";function I(e){return ee()?(te(e),!0):!1}function O(e){return typeof e=="function"?e():X(e)}const oe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ae=Object.prototype.toString,se=e=>ae.call(e)==="[object Object]",B=()=>{};function ie(e,t){function n(...a){return new Promise((r,s)=>{Promise.resolve(e(()=>t.apply(this,a),{fn:t,thisArg:this,args:a})).then(r).catch(s)})}return n}const G=e=>e();function ue(e=G){const t=M(!0);function n(){t.value=!1}function a(){t.value=!0}const r=(...s)=>{t.value&&e(...s)};return{isActive:J(t),pause:n,resume:a,eventFilter:r}}function le(e){return H()}function ce(...e){if(e.length!==1)return Y(...e);const t=e[0];return typeof t=="function"?J(Z(()=>({get:t,set:B}))):M(t)}function fe(e,t,n={}){const{eventFilter:a=G,...r}=n;return W(e,ie(a,t),r)}function de(e,t,n={}){const{eventFilter:a,...r}=n,{eventFilter:s,pause:l,resume:u,isActive:c}=ue(a);return{stop:fe(e,t,{...r,eventFilter:s}),pause:l,resume:u,isActive:c}}function K(e,t=!0,n){le()?P(e,n):t?e():x(e)}function pe(e=!1,t={}){const{truthyValue:n=!0,falsyValue:a=!1}=t,r=U(e),s=M(e);function l(u){if(arguments.length)return s.value=u,s.value;{const c=O(n);return s.value=s.value===c?O(a):c,s.value}}return r?l:[s,l]}function Q(e){var t;const n=O(e);return(t=n==null?void 0:n.$el)!=null?t:n}const D=oe?window:void 0;function z(...e){let t,n,a,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,a,r]=e,t=D):[t,n,a,r]=e,!t)return B;Array.isArray(n)||(n=[n]),Array.isArray(a)||(a=[a]);const s=[],l=()=>{s.forEach(m=>m()),s.length=0},u=(m,d,S,v)=>(m.addEventListener(d,S,v),()=>m.removeEventListener(d,S,v)),c=W(()=>[Q(t),O(r)],([m,d])=>{if(l(),!m)return;const S=se(d)?{...d}:d;s.push(...n.flatMap(v=>a.map(y=>u(m,v,y,S))))},{immediate:!0,flush:"post"}),g=()=>{c(),l()};return I(g),g}function ge(){const e=M(!1),t=H();return t&&P(()=>{e.value=!0},t),e}function me(e){const t=ge();return E(()=>(t.value,!!e()))}function he(e,t={}){const{window:n=D}=t,a=me(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const s=M(!1),l=g=>{s.value=g.matches},u=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",l):r.removeListener(l))},c=ne(()=>{a.value&&(u(),r=n.matchMedia(O(e)),"addEventListener"in r?r.addEventListener("change",l):r.addListener(l),s.value=r.matches)});return I(()=>{c(),u(),r=void 0}),s}const j=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},R="__vueuse_ssr_handlers__",ve=ye();function ye(){return R in j||(j[R]=j[R]||{}),j[R]}function $(e,t){return ve[e]||t}function we(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 Se={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()}},V="vueuse-storage";function be(e,t,n,a={}){var r;const{flush:s="pre",deep:l=!0,listenToStorageChanges:u=!0,writeDefaults:c=!0,mergeDefaults:g=!1,shallow:m,window:d=D,eventFilter:S,onError:v=o=>{console.error(o)},initOnMounted:y}=a,h=(m?re:M)(typeof t=="function"?t():t);if(!n)try{n=$("getDefaultStorage",()=>{var o;return(o=D)==null?void 0:o.localStorage})()}catch(o){v(o)}if(!n)return h;const w=O(t),T=we(w),b=(r=a.serializer)!=null?r:Se[T],{pause:N,resume:p}=de(h,()=>F(h.value),{flush:s,deep:l,eventFilter:S});d&&u&&K(()=>{n instanceof Storage?z(d,"storage",C):z(d,V,L),y&&C()}),y||C();function A(o,i){if(d){const f={key:e,oldValue:o,newValue:i,storageAr