Files
AllinSSL/static/build/static/js/index-DqoePFej.js
2025-09-17 15:11:29 +08:00

2 lines
4.3 KiB
JavaScript

import{p as e,i as t,b as n,t as a,w as r,c as o,d as l,e as s,f as i}from"./index-vLksm2vp.js";import{bV as u,av as f,bW as c,k as d,bX as v,o as g,bY as p,bZ as w,r as m,x as y,V as h}from"./main-CjKjBbtn.js";const b=n?window:void 0;function S(...e){const t=[],n=()=>{t.forEach(e=>e()),t.length=0},s=d(()=>{const t=a(c(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0}),i=r(()=>{var t,n;return[null!=(n=null==(t=s.value)?void 0:t.map(e=>function(e){var t;const n=c(e);return null!=(t=null==n?void 0:n.$el)?t:n}(e)))?n:[b].filter(e=>null!=e),a(c(s.value?e[1]:e[0])),a(w(s.value?e[2]:e[1])),c(s.value?e[3]:e[2])]},([e,a,r,o])=>{if(n(),!(null==e?void 0:e.length)||!(null==a?void 0:a.length)||!(null==r?void 0:r.length))return;const s=l(o)?{...o}:o;t.push(...e.flatMap(e=>a.flatMap(t=>r.map(n=>((e,t,n,a)=>(e.addEventListener(t,n,a),()=>e.removeEventListener(t,n,a)))(e,t,n,s)))))},{flush:"post"});return o(n),()=>{i(),n()}}function N(e){const t=function(){const e=u(!1),t=p();return t&&g(()=>{e.value=!0},t),e}();return d(()=>(t.value,Boolean(e())))}const M=Symbol("vueuse-ssr-width");function O(){const e=v()?t(M,null):null;return"number"==typeof e?e:void 0}function E(t,n={}){const{window:a=b,ssrWidth:r=O()}=n,o=N(()=>a&&"matchMedia"in a&&"function"==typeof a.matchMedia),l=u("number"==typeof r),s=u(),i=u(!1);return f(()=>{if(l.value){l.value=!o.value;const n=c(t).split(",");return void(i.value=n.some(t=>{const n=t.includes("not all"),a=t.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),o=t.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let l=Boolean(a||o);return a&&l&&(l=r>=e(a[1])),o&&l&&(l=r<=e(o[1])),n?!l:l}))}o.value&&(s.value=a.matchMedia(c(t)),i.value=s.value.matches)}),S(s,"change",e=>{i.value=e.matches},{passive:!0}),d(()=>i.value)}const j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},A="__vueuse_ssr_handlers__",I=J();function J(){return A in j||(j[A]=j[A]||{}),j[A]}const V={boolean:{read:e=>"true"===e,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()}},_="vueuse-storage";function D(e,t,n,a={}){var r;const{flush:o="pre",deep:l=!0,listenToStorageChanges:f=!0,writeDefaults:v=!0,mergeDefaults:g=!1,shallow:p,window:w=b,eventFilter:N,onError:M=e=>{},initOnMounted:O}=a,E=(p?u:m)("function"==typeof t?t():t),j=d(()=>c(e));if(!n)try{n=function(e,t){return I[e]||t}("getDefaultStorage",()=>{var e;return null==(e=b)?void 0:e.localStorage})()}catch(B){M(B)}if(!n)return E;const A=c(t),J=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number"}(A),D=null!=(r=a.serializer)?r:V[J],{pause:k,resume:x}=s(E,()=>function(e){try{const t=n.getItem(j.value);if(null==e)z(t,null),n.removeItem(j.value);else{const a=D.write(e);t!==a&&(n.setItem(j.value,a),z(t,a))}}catch(B){M(B)}}(E.value),{flush:o,deep:l,eventFilter:N});function z(e,t){if(w){const a={key:j.value,oldValue:e,newValue:t,storageArea:n};w.dispatchEvent(n instanceof Storage?new StorageEvent("storage",a):new CustomEvent(_,{detail:a}))}}function F(e){if(!e||e.storageArea===n)if(e&&null==e.key)E.value=A;else if(!e||e.key===j.value){k();try{(null==e?void 0:e.newValue)!==D.write(E.value)&&(E.value=function(e){const t=e?e.newValue:n.getItem(j.value);if(null==t)return v&&null!=A&&n.setItem(j.value,D.write(A)),A;if(!e&&g){const e=D.read(t);return"function"==typeof g?g(e,A):"object"!==J||Array.isArray(e)?e:{...A,...e}}return"string"!=typeof t?t:D.read(t)}(e))}catch(B){M(B)}finally{e?h(x):x()}}}function T(e){F(e.detail)}return y(j,()=>F(),{flush:o}),w&&f&&i(()=>{n instanceof Storage?S(w,"storage",F,{passive:!0}):S(w,_,T),O&&F()}),O||F(),E}function k(e,t,n={}){const{window:a=b}=n;return D(e,t,null==a?void 0:a.localStorage,n)}function x(e,t,n={}){const{window:a=b}=n;return D(e,t,null==a?void 0:a.sessionStorage,n)}export{k as a,x as b,E as u};