xiaomusic/docs/.vitepress/dist/assets/chunks/theme.CHcreDy7.js

2 lines
52 KiB
JavaScript
Raw Normal View History

2024-12-12 17:02:34 +00:00
import{d as m,o as a,c as u,r as c,n as N,a as z,t as M,b as k,w as p,e as h,T as ce,_ as b,u as Ae,i as Be,f as Ce,g as ue,h as $,j as v,k as r,l as W,m as ae,p as T,q as D,s as Q,v as j,x as de,y as ve,z as Ee,A as Fe,B as q,F as w,C as B,D as ge,E as X,G as _,H as E,I as $e,J as Z,K as U,L as x,M as De,N as ye,O as Oe,P as Pe,Q as Le,R as ee,S as Ge,U as Ve,V as Se,W as Ue,X as je,Y as ze,Z as We,$ as qe}from"./framework.p2VkXzrt.js";const Ke=m({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(s){return(e,t)=>(a(),u("span",{class:N(["VPBadge",e.type])},[c(e.$slots,"default",{},()=>[z(M(e.text),1)])],2))}}),Je={key:0,class:"VPBackdrop"},Re=m({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(s){return(e,t)=>(a(),k(ce,{name:"fade"},{default:p(()=>[e.show?(a(),u("div",Je)):h("",!0)]),_:1}))}}),Ye=b(Re,[["__scopeId","data-v-54a304ca"]]),P=Ae;function Qe(s,e){let t,o=!1;return()=>{t&&clearTimeout(t),o?t=setTimeout(s,e):(s(),(o=!0)&&setTimeout(()=>o=!1,e))}}function re(s){return/^\//.test(s)?s:`/${s}`}function pe(s){const{pathname:e,search:t,hash:o,protocol:n}=new URL(s,"http://a.com");if(Be(s)||s.startsWith("#")||!n.startsWith("http")||!Ce(e))return s;const{site:i}=P(),l=e.endsWith("/")||e.endsWith(".html")?s:s.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,i.value.cleanUrls?"":".html")}${t}${o}`);return ue(l)}function J({correspondingLink:s=!1}={}){const{site:e,localeIndex:t,page:o,theme:n,hash:i}=P(),l=$(()=>{var d,y;return{label:(d=e.value.locales[t.value])==null?void 0:d.label,link:((y=e.value.locales[t.value])==null?void 0:y.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:$(()=>Object.entries(e.value.locales).flatMap(([d,y])=>l.value.label===y.label?[]:{text:y.label,link:Xe(y.link||(d==="root"?"/":`/${d}/`),n.value.i18nRouting!==!1&&s,o.value.relativePath.slice(l.value.link.length-1),!e.value.cleanUrls)+i.value})),currentLang:l}}function Xe(s,e,t,o){return e?s.replace(/\/$/,"")+re(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,o?".html":"")):s}const Ze={class:"NotFound"},xe={class:"code"},et={class:"title"},tt={class:"quote"},nt={class:"action"},ot=["href","aria-label"],st=m({__name:"NotFound",setup(s){const{theme:e}=P(),{currentLang:t}=J();return(o,n)=>{var i,l,f,d,y;return a(),u("div",Ze,[v("p",xe,M(((i=r(e).notFound)==null?void 0:i.code)??"404"),1),v("h1",et,M(((l=r(e).notFound)==null?void 0:l.title)??"PAGE NOT FOUND"),1),n[0]||(n[0]=v("div",{class:"divider"},null,-1)),v("blockquote",tt,M(((f=r(e).notFound)==null?void 0:f.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),v("div",nt,[v("a",{class:"link",href:r(ue)(r(t).link),"aria-label":((d=r(e).notFound)==null?void 0:d.linkLabel)??"go to home"},M(((y=r(e).notFound)==null?void 0:y.linkText)??"Take me home"),9,ot)])])}}}),at=b(st,[["__scopeId","data-v-6ff51ddd"]]);function Te(s,e){if(Array.isArray(s))return R(s);if(s==null)return[];e=re(e);const t=Object.keys(s).sort((n,i)=>i.split("/").length-n.split("/").length).find(n=>e.startsWith(re(n))),o=t?s[t]:[];return Array.isArray(o)?R(o):R(o.items,o.base)}function rt(s){const e=[];let t=0;for(const o in s){const n=s[o];if(n.items){t=e.push(n);continue}e[t]||e.push({items:[]}),e[t].items.push(n)}return e}function it(s){const e=[];function t(o){for(const n of o)n.text&&n.link&&e.push({text:n.text,link:n.link,docFooterText:n.docFooterText}),n.items&&t(n.items)}return t(s),e}function ie(s,e){return Array.isArray(e)?e.some(t=>ie(s,t)):W(s,e.link)?!0:e.items?ie(s,e.items):!1}function R(s,e){return[...s].map(t=>{const o={...t},n=o.base||e;return n&&o.link&&(o.link=n+o.link),o.items&&(o.items=R(o.items,n)),o})}function O(){const{frontmatter:s,page:e,theme:t}=P(),o=ae("(min-width: 960px)"),n=T(!1),i=$(()=>{const A=t.value.sidebar,S=e.value.relativePath;return A?Te(A,S):[]}),l=T(i.value);D(i,(A,S)=>{JSON.stringify(A)!==JSON.stringify(S)&&(l.value=i.value)});const f=$(()=>s.value.sidebar!==!1&&l.value.length>0&&s.value.layout!=="home"),d=$(()=>y?s.value.aside==null?t.value.aside==="left":s.value.aside==="left":!1),y=$(()=