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