Warp/docs/.vitepress/dist/assets/chunks/theme.makJcAKq.js

2 lines
63 KiB
JavaScript
Raw Permalink Normal View History

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