2023-06-06 13:24:29 +08:00
|
|
|
var P=(a,e,n)=>new Promise((i,h)=>{var o=m=>{try{y(n.next(m))}catch(u){h(u)}},p=m=>{try{y(n.throw(m))}catch(u){h(u)}},y=m=>m.done?i(m.value):Promise.resolve(m.value).then(o,p);y((n=n.apply(a,e)).next())});import{am as hn,an as on,d as j,O as V,r as B,o as K,D as f,w as C,b as t,u as c,ao as pn,ap as mn,aq as yn,ar as un,as as tn,at as xn,j as l,l as D,J as $,$ as cn,a1 as U,c as T,n as Y,e as v,a6 as k,t as E,au as Cn,F as Bn,ae as Rn,h as J,B as Mn,P as Kn,a as z,av as Gn}from"./index-4ec2ce15.js";import{i as L}from"./icon-42fa39e7.js";const Xn=(a,e)=>{!window.$vue.component(a)&&e&&window.$vue.component(a,e)},Yn=a=>hn({loader:a,loadingComponent:on,delay:20}),gn=j({__name:"index",setup(a){const{MoonIcon:e,SunnyIcon:n}=L.ionicons5,i=V(),h=()=>{i.changeTheme(),pn()};return(o,p)=>{const y=B("n-icon"),m=B("n-button");return K(),f(m,{quaternary:"",onClick:h,title:"主题"},{default:C(()=>[t(y,{size:"20",depth:1},{default:C(()=>[c(i).darkTheme?(K(),f(c(e),{key:0})):(K(),f(c(n),{key:1}))]),_:1})]),_:1})}}}),ln=j({__name:"index",setup(a){const{LanguageIcon:e}=L.ionicons5,{locale:n}=mn(),i=yn(),h=un,o=p=>{n.value=p,i.changeLang(p)};return(p,y)=>{const m=B("n-icon"),u=B("n-button"),M=B("n-dropdown");return K(),f(M,{trigger:"hover",onSelect:o,"show-arrow":!0,options:c(h)},{default:C(()=>[t(u,{quaternary:""},{default:C(()=>[t(m,{size:"20",depth:1},{default:C(()=>[t(c(e))]),_:1})]),_:1})]),_:1},8,["options"])}}}),sn=""+new URL("../png/theme-color.png",import.meta.url).href;function Q(a){return tn()?(xn(a),!0):!1}const w=typeof window!="undefined",dn=a=>typeof a=="string",_=()=>{};function X(a,e){function n(...i){a(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})}return n}function fn(a,e={}){let n,i;return o=>{const p=c(a),y=c(e.maxWait);if(n&&clearTimeout(n),p<=0||y!==void 0&&y<=0)return i&&(clearTimeout(i),i=null),o();y&&!i&&(i=setTimeout(()=>{n&&clearTimeout(n),i=null,o()},y)),n=setTimeout(()=>{i&&clearTimeout(i),i=null,o()},p)}}function rn(a,e=!0,n=!0){let i=0,h,o=!n;const p=()=>{h&&(clearTimeout(h),h=void 0)};return m=>{const u=c(a),M=Date.now()-i;if(p(),u<=0)return i=Date.now(),m();M>u&&(i=Date.now(),o?o=!1:m()),e&&(h=setTimeout(()=>{i=Date.now(),n||(o=!0),p(),m()},u)),!n&&!h&&(h=setTimeout(()=>o=!0,u))}}function bn(a,e=200,n={}){return X(fn(e,n),a)}function vn(a,e=200,n=!0,i=!0){return X(rn(e,n,i),a)}function _n(a,e,n={}){const{immediate:i=!0}=n,h=l(!1);let o=null;function p(){o&&(clearTimeout(o),o=null)}function y(){h.value=!1,p()}function m(...u){p(),h.value=!0,o=setTimeout(()=>{h.value=!1,o=null,a(...u)},c(e))}return i&&(h.value=!0,w&&m()),Q(y),{isPending:h,start:m,stop:y}}const zn=w?window:void 0,jn=w?window.navigator:void 0;function Z(...a){let e,n,i,h;if(dn(a[0])?([n,i,h]=a,e=zn):[e,n,i,h]=a,!e)return _;let o=_;const p=$(()=>c(e),m=>{o(),m&&(m.addEventListener(n,i,h),o=()=>{m.removeEventListener(n,i,h),o=_})},{immediate:!0,flush:"post"}),y=()=>{p(),o()};return Q(y),y}function Zn(a={}){const{navigator:e=jn,read:n=!1,source:i,copiedDuring:h=1500}=a,o=["copy","cut"],p=!!(e&&"clipboard"in e),y=l(""),m=l(!1),u=_n(()=>m.value=!1,h);function M(){e.clipboard.readText().then(x=>{y.value=x})}if(p&&n)for(const x of o)Z(x,M);function R(){return P(this,arguments,function*(x=c(i)){p&&x!=null&&(yield e.clipboard.writeText(x),y.value=x,m.value=!0,u.start())})}return{isSupported:p,text:y,copied:m,copy:R}}const I=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},O="__vueuse_ssr_handlers__";I[O]=I[O]||{};function wn(a,e={}){const{throttle:n=0,idle:i=200,onStop:h=_,onScroll:o=_,offset:p={left:0,right:0,top:0,bottom:0},eventListenerOptions:y={capture:!1,passive:!0}}=e,m=l(0),u=l(0),M=l(!1),R=D({left:!0,right:!1,top:!0,bottom:!1}),x=D({left:!1,right:!1,top:!1,bottom:!1});if(a){const s=bn(G=>{M.value=!1,x.left=!1,x.right=!1,x.top=!1,x.bottom=!1,h(G)},n+i),g=G=>{const d=G.target===document?G.target.documentElement:G.target,r=d.scrollLeft;x.left=r<m.value,x.right=r>m.value,R.left=r<=0+(p.left||0),R.right=r+d.clientWidth>=d.scrollWidth-(p.right||0),m.value
|