@do11y/ui 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @do11y/ui
2
+
3
+ A very bare-bones UI for [`@do11y/docs`](https://www.npmjs.com/package/@do11y/docs).
@@ -0,0 +1 @@
1
+ const s=(t,r)=>{const o=t.__vccOpts||t;for(const[c,e]of r)o[c]=e;return o};export{s as _};
@@ -1 +1 @@
1
- import{defineComponent as p,computed as c,provide as m,renderSlot as u,createApp as i,h as o}from"vue";import f from"do11y:routes";import{c as d,a as _,u as h}from"./vue-router.js";import r from"do11y:site";const s=d({history:_("/"),routes:f}),l=p({__name:"Docs",setup(e){const t=h(),a=c(()=>t?.meta??{});return m("frontmatter",a),(n,y)=>u(n.$slots,"default")}});(async()=>{const e=(await r.Site()).default,t=i(o(l,void 0,()=>o(e)));t.use(s),await r.setup?.(t,s),t.mount("#app")})();
1
+ import{renderSlot as a,createApp as c,h as r}from"vue";import n from"do11y:routes";import{createRouter as i,createWebHashHistory as p}from"vue-router";import e from"do11y:site";import{_ as m}from"./_plugin-vue_export-helper.js";const s=i({history:p("/"),routes:n}),f={};function u(o,t){return a(o.$slots,"default")}const _=m(f,[["render",u]]);(async()=>{const o=(await e.Site()).default,t=c(r(_,void 0,()=>r(o)));t.use(s),await e.setup?.(t,s),t.mount("#app")})();
@@ -1 +1 @@
1
- import{renderSlot as a,createApp as p,h as r}from"vue";import{p as i}from"./vue-router.js";import f from"do11y:sandbox";import m from"do11y:site";const d=(o,t)=>{const n=o.__vccOpts||o;for(const[s,c]of t)n[s]=c;return n},_={};function u(o,t){return a(o.$slots,"default")}const l=d(_,[["render",u]]),v=i(window.location.search),{component:e}=f.find(({url:o})=>o===v.id)??{};e&&(async()=>{const o=await e(),t=p(r(l,void 0,()=>r(o)));await m.setup?.(t),t.mount("#app")})();
1
+ import{renderSlot as e,createApp as s,h as r}from"vue";import{parseQuery as c}from"vue-router";import a from"do11y:sandbox";import i from"do11y:site";import{_ as p}from"./_plugin-vue_export-helper.js";const m={};function f(o,t){return e(o.$slots,"default")}const d=p(m,[["render",f]]),_=c(window.location.search),{component:n}=a.find(({url:o})=>o===_.id)??{};n&&(async()=>{const o=await n(),t=s(r(d,void 0,()=>r(o)));await i.setup?.(t),t.mount("#app")})();
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@do11y/ui",
3
- "version": "0.0.1",
3
+ "description": "The UI for @do11y/docs - a very bare-bones tool to help document Vue components.",
4
+ "version": "0.0.3",
4
5
  "type": "module",
5
6
  "repository": {
6
7
  "type": "git",
@@ -11,9 +12,7 @@
11
12
  ],
12
13
  "peerDependencies": {
13
14
  "@vitejs/plugin-vue": "^6.0.2",
14
- "vue": "3.5.25"
15
- },
16
- "dependencies": {
15
+ "vue": "3.5.25",
17
16
  "vue-router": "^4.6.3"
18
17
  },
19
18
  "devDependencies": {
@@ -1,4 +0,0 @@
1
- import{onUnmounted as En,onDeactivated as _n,onActivated as Rn,inject as q,watch as st,computed as G,unref as Z,getCurrentInstance as An,defineComponent as Ke,reactive as lt,h as We,provide as fe,ref as ct,shallowRef as ut,nextTick as ft,shallowReactive as dt}from"vue";const W=typeof document<"u";function qe(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ht(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&qe(e.default)}const b=Object.assign;function de(e,t){const n={};for(const r in t){const o=t[r];n[r]=$(o)?o.map(e):e(o)}return n}const ee=()=>{},$=Array.isArray;function Oe(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const Fe=/#/g,pt=/&/g,mt=/\//g,gt=/=/g,vt=/\?/g,Qe=/\+/g,yt=/%5B/g,wt=/%5D/g,ze=/%5E/g,Et=/%60/g,Ye=/%7B/g,_t=/%7C/g,Je=/%7D/g,Rt=/%20/g;function Ee(e){return e==null?"":encodeURI(""+e).replace(_t,"|").replace(yt,"[").replace(wt,"]")}function At(e){return Ee(e).replace(Ye,"{").replace(Je,"}").replace(ze,"^")}function ge(e){return Ee(e).replace(Qe,"%2B").replace(Rt,"+").replace(Fe,"%23").replace(pt,"%26").replace(Et,"`").replace(Ye,"{").replace(Je,"}").replace(ze,"^")}function bt(e){return ge(e).replace(gt,"%3D")}function Ct(e){return Ee(e).replace(Fe,"%23").replace(vt,"%3F")}function Pt(e){return Ct(e).replace(mt,"%2F")}function te(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const It=/\/$/,Ot=e=>e.replace(It,"");function he(e,t,n="/"){let r,o={},u="",d="";const g=t.indexOf("#");let s=t.indexOf("?");return s=g>=0&&s>g?-1:s,s>=0&&(r=t.slice(0,s),u=t.slice(s,g>0?g:t.length),o=e(u.slice(1))),g>=0&&(r=r||t.slice(0,g),d=t.slice(g,t.length)),r=xt(r??t,n),{fullPath:r+u+d,path:r,query:o,hash:te(d)}}function St(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Se(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Nt(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&F(t.matched[r],n.matched[o])&&Xe(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function F(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Xe(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!kt(e[n],t[n]))return!1;return!0}function kt(e,t){return $(e)?Ne(e,t):$(t)?Ne(t,e):e?.valueOf()===t?.valueOf()}function Ne(e,t){return $(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function xt(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let u=n.length-1,d,g;for(d=0;d<r.length;d++)if(g=r[d],g!==".")if(g==="..")u>1&&u--;else break;return n.slice(0,u).join("/")+"/"+r.slice(d).join("/")}const M={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let ve=(function(e){return e.pop="pop",e.push="push",e})({}),pe=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Tt(e){if(!e)if(W){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Ot(e)}const Lt=/^[^#]+#/;function Dt(e,t){return e.replace(Lt,"#")+t}function $t(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const oe=()=>({left:window.scrollX,top:window.scrollY});function Gt(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=$t(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function ke(e,t){return(history.state?history.state.position-t:-1)+e}const ye=new Map;function Vt(e,t){ye.set(e,t)}function Bt(e){const t=ye.get(e);return ye.delete(e),t}function Ut(e){return typeof e=="string"||e&&typeof e=="object"}function Ze(e){return typeof e=="string"||typeof e=="symbol"}let O=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const et=Symbol("");const Cn={[O.MATCHER_NOT_FOUND]({location:e,currentLocation:t}){return`No match for
2
- ${JSON.stringify(e)}${t?`
3
- while being at
4
- `+JSON.stringify(t):""}`},[O.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${jt(t)}" via a navigation guard.`},[O.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[O.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[O.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function Q(e,t){return b(new Error,{type:e,[et]:!0},t)}function V(e,t){return e instanceof Error&&et in e&&(t==null||!!(e.type&t))}const Mt=["params","query","hash"];function jt(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Mt)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Ht(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const o=n[r].replace(Qe," "),u=o.indexOf("="),d=te(u<0?o:o.slice(0,u)),g=u<0?null:te(o.slice(u+1));if(d in t){let s=t[d];$(s)||(s=t[d]=[s]),s.push(g)}else t[d]=g}return t}function xe(e){let t="";for(let n in e){const r=e[n];if(n=bt(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}($(r)?r.map(o=>o&&ge(o)):[r&&ge(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Kt(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=$(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const Wt=Symbol(""),Te=Symbol(""),_e=Symbol(""),Re=Symbol(""),we=Symbol("");function X(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function j(e,t,n,r,o,u=d=>d()){const d=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((g,s)=>{const h=l=>{l===!1?s(Q(O.NAVIGATION_ABORTED,{from:n,to:t})):l instanceof Error?s(l):Ut(l)?s(Q(O.NAVIGATION_GUARD_REDIRECT,{from:t,to:l})):(d&&r.enterCallbacks[o]===d&&typeof l=="function"&&d.push(l),g())},f=u(()=>e.call(r&&r.instances[o],t,n,h));let i=Promise.resolve(f);e.length<3&&(i=i.then(h)),i.catch(l=>s(l))})}function me(e,t,n,r,o=u=>u()){const u=[];for(const d of e)for(const g in d.components){let s=d.components[g];if(!(t!=="beforeRouteEnter"&&!d.instances[g]))if(qe(s)){const h=(s.__vccOpts||s)[t];h&&u.push(j(h,n,r,d,g,o))}else{let h=s();u.push(()=>h.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${g}" at "${d.path}"`);const i=ht(f)?f.default:f;d.mods[g]=f,d.components[g]=i;const l=(i.__vccOpts||i)[t];return l&&j(l,n,r,d,g,o)()}))}}return u}function qt(e,t){const n=[],r=[],o=[],u=Math.max(t.matched.length,e.matched.length);for(let d=0;d<u;d++){const g=t.matched[d];g&&(e.matched.find(h=>F(h,g))?r.push(g):n.push(g));const s=e.matched[d];s&&(t.matched.find(h=>F(h,s))||o.push(s))}return[n,r,o]}let Ft=()=>location.protocol+"//"+location.host;function tt(e,t){const{pathname:n,search:r,hash:o}=t,u=e.indexOf("#");if(u>-1){let d=o.includes(e.slice(u))?e.slice(u).length:1,g=o.slice(d);return g[0]!=="/"&&(g="/"+g),Se(g,"")}return Se(n,e)+r+o}function Qt(e,t,n,r){let o=[],u=[],d=null;const g=({state:l})=>{const c=tt(e,location),w=n.value,A=t.value;let P=0;if(l){if(n.value=c,t.value=l,d&&d===w){d=null;return}P=A?l.position-A.position:0}else r(c);o.forEach(I=>{I(n.value,w,{delta:P,type:ve.pop,direction:P?P>0?pe.forward:pe.back:pe.unknown})})};function s(){d=n.value}function h(l){o.push(l);const c=()=>{const w=o.indexOf(l);w>-1&&o.splice(w,1)};return u.push(c),c}function f(){if(document.visibilityState==="hidden"){const{history:l}=window;if(!l.state)return;l.replaceState(b({},l.state,{scroll:oe()}),"")}}function i(){for(const l of u)l();u=[],window.removeEventListener("popstate",g),window.removeEventListener("pagehide",f),document.removeEventListener("visibilitychange",f)}return window.addEventListener("popstate",g),window.addEventListener("pagehide",f),document.addEventListener("visibilitychange",f),{pauseListeners:s,listen:h,destroy:i}}function Le(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?oe():null}}function zt(e){const{history:t,location:n}=window,r={value:tt(e,n)},o={value:t.state};o.value||u(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function u(s,h,f){const i=e.indexOf("#"),l=i>-1?(n.host&&document.querySelector("base")?e:e.slice(i))+s:Ft()+e+s;try{t[f?"replaceState":"pushState"](h,"",l),o.value=h}catch(c){console.error(c),n[f?"replace":"assign"](l)}}function d(s,h){u(s,b({},t.state,Le(o.value.back,s,o.value.forward,!0),h,{position:o.value.position}),!0),r.value=s}function g(s,h){const f=b({},o.value,t.state,{forward:s,scroll:oe()});u(f.current,f,!0),u(s,b({},Le(r.value,s,null),{position:f.position+1},h),!1),r.value=s}return{location:r,state:o,push:g,replace:d}}function Yt(e){e=Tt(e);const t=zt(e),n=Qt(e,t.state,t.location,t.replace);function r(u,d=!0){d||n.pauseListeners(),history.go(u)}const o=b({location:"",base:e,go:r,createHref:Dt.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Pn(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Yt(e)}let H=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var k=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(k||{});const Jt={type:H.Static,value:""},Xt=/[a-zA-Z0-9_]/;function Zt(e){if(!e)return[[]];if(e==="/")return[[Jt]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(c){throw new Error(`ERR (${n})/"${h}": ${c}`)}let n=k.Static,r=n;const o=[];let u;function d(){u&&o.push(u),u=[]}let g=0,s,h="",f="";function i(){h&&(n===k.Static?u.push({type:H.Static,value:h}):n===k.Param||n===k.ParamRegExp||n===k.ParamRegExpEnd?(u.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),u.push({type:H.Param,value:h,regexp:f,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),h="")}function l(){h+=s}for(;g<e.length;){if(s=e[g++],s==="\\"&&n!==k.ParamRegExp){r=n,n=k.EscapeNext;continue}switch(n){case k.Static:s==="/"?(h&&i(),d()):s===":"?(i(),n=k.Param):l();break;case k.EscapeNext:l(),n=r;break;case k.Param:s==="("?n=k.ParamRegExp:Xt.test(s)?l():(i(),n=k.Static,s!=="*"&&s!=="?"&&s!=="+"&&g--);break;case k.ParamRegExp:s===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+s:n=k.ParamRegExpEnd:f+=s;break;case k.ParamRegExpEnd:i(),n=k.Static,s!=="*"&&s!=="?"&&s!=="+"&&g--,f="";break;default:t("Unknown state");break}}return n===k.ParamRegExp&&t(`Unfinished custom RegExp for param "${h}"`),i(),d(),o}const De="[^/]+?",en={sensitive:!1,strict:!1,start:!0,end:!0};var x=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(x||{});const tn=/[.+*?^${}()[\]/\\]/g;function nn(e,t){const n=b({},en,t),r=[];let o=n.start?"^":"";const u=[];for(const h of e){const f=h.length?[]:[x.Root];n.strict&&!h.length&&(o+="/");for(let i=0;i<h.length;i++){const l=h[i];let c=x.Segment+(n.sensitive?x.BonusCaseSensitive:0);if(l.type===H.Static)i||(o+="/"),o+=l.value.replace(tn,"\\$&"),c+=x.Static;else if(l.type===H.Param){const{value:w,repeatable:A,optional:P,regexp:I}=l;u.push({name:w,repeatable:A,optional:P});const E=I||De;if(E!==De){c+=x.BonusCustomRegExp;try{`${E}`}catch(L){throw new Error(`Invalid custom RegExp for param "${w}" (${E}): `+L.message)}}let C=A?`((?:${E})(?:/(?:${E}))*)`:`(${E})`;i||(C=P&&h.length<2?`(?:/${C})`:"/"+C),P&&(C+="?"),o+=C,c+=x.Dynamic,P&&(c+=x.BonusOptional),A&&(c+=x.BonusRepeatable),E===".*"&&(c+=x.BonusWildcard)}f.push(c)}r.push(f)}if(n.strict&&n.end){const h=r.length-1;r[h][r[h].length-1]+=x.BonusStrict}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const d=new RegExp(o,n.sensitive?"":"i");function g(h){const f=h.match(d),i={};if(!f)return null;for(let l=1;l<f.length;l++){const c=f[l]||"",w=u[l-1];i[w.name]=c&&w.repeatable?c.split("/"):c}return i}function s(h){let f="",i=!1;for(const l of e){(!i||!f.endsWith("/"))&&(f+="/"),i=!1;for(const c of l)if(c.type===H.Static)f+=c.value;else if(c.type===H.Param){const{value:w,repeatable:A,optional:P}=c,I=w in h?h[w]:"";if($(I)&&!A)throw new Error(`Provided param "${w}" is an array but it is not repeatable (* or + modifiers)`);const E=$(I)?I.join("/"):I;if(!E)if(P)l.length<2&&(f.endsWith("/")?f=f.slice(0,-1):i=!0);else throw new Error(`Missing required param "${w}"`);f+=E}}return f||"/"}return{re:d,score:r,keys:u,parse:g,stringify:s}}function rn(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===x.Static+x.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===x.Static+x.Segment?1:-1:0}function nt(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const u=rn(r[n],o[n]);if(u)return u;n++}if(Math.abs(o.length-r.length)===1){if($e(r))return 1;if($e(o))return-1}return o.length-r.length}function $e(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const on={strict:!1,end:!0,sensitive:!1};function an(e,t,n){const r=nn(Zt(e.path),n),o=b(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function sn(e,t){const n=[],r=new Map;t=Oe(on,t);function o(i){return r.get(i)}function u(i,l,c){const w=!c,A=Ve(i);A.aliasOf=c&&c.record;const P=Oe(t,i),I=[A];if("alias"in i){const L=typeof i.alias=="string"?[i.alias]:i.alias;for(const B of L)I.push(Ve(b({},A,{components:c?c.record.components:A.components,path:B,aliasOf:c?c.record:A})))}let E,C;for(const L of I){const{path:B}=L;if(l&&B[0]!=="/"){const U=l.record.path,D=U[U.length-1]==="/"?"":"/";L.path=l.record.path+(B&&D+B)}if(E=an(L,l,P),c?c.alias.push(E):(C=C||E,C!==E&&C.alias.push(E),w&&i.name&&!Be(E)&&d(i.name)),rt(E)&&s(E),A.children){const U=A.children;for(let D=0;D<U.length;D++)u(U[D],E,c&&c.children[D])}c=c||E}return C?()=>{d(C)}:ee}function d(i){if(Ze(i)){const l=r.get(i);l&&(r.delete(i),n.splice(n.indexOf(l),1),l.children.forEach(d),l.alias.forEach(d))}else{const l=n.indexOf(i);l>-1&&(n.splice(l,1),i.record.name&&r.delete(i.record.name),i.children.forEach(d),i.alias.forEach(d))}}function g(){return n}function s(i){const l=un(i,n);n.splice(l,0,i),i.record.name&&!Be(i)&&r.set(i.record.name,i)}function h(i,l){let c,w={},A,P;if("name"in i&&i.name){if(c=r.get(i.name),!c)throw Q(O.MATCHER_NOT_FOUND,{location:i});P=c.record.name,w=b(Ge(l.params,c.keys.filter(C=>!C.optional).concat(c.parent?c.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),i.params&&Ge(i.params,c.keys.map(C=>C.name))),A=c.stringify(w)}else if(i.path!=null)A=i.path,c=n.find(C=>C.re.test(A)),c&&(w=c.parse(A),P=c.record.name);else{if(c=l.name?r.get(l.name):n.find(C=>C.re.test(l.path)),!c)throw Q(O.MATCHER_NOT_FOUND,{location:i,currentLocation:l});P=c.record.name,w=b({},l.params,i.params),A=c.stringify(w)}const I=[];let E=c;for(;E;)I.unshift(E.record),E=E.parent;return{name:P,path:A,params:w,matched:I,meta:cn(I)}}e.forEach(i=>u(i));function f(){n.length=0,r.clear()}return{addRoute:u,resolve:h,removeRoute:d,clearRoutes:f,getRoutes:g,getRecordMatcher:o}}function Ge(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Ve(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ln(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ln(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Be(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function cn(e){return e.reduce((t,n)=>b(t,n.meta),{})}function un(e,t){let n=0,r=t.length;for(;n!==r;){const u=n+r>>1;nt(e,t[u])<0?r=u:n=u+1}const o=fn(e);return o&&(r=t.lastIndexOf(o,r-1)),r}function fn(e){let t=e;for(;t=t.parent;)if(rt(t)&&nt(e,t)===0)return t}function rt({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Ue(e){const t=q(_e),n=q(Re);let r=!1,o=null;const u=G(()=>{const f=Z(e.to);return t.resolve(f)}),d=G(()=>{const{matched:f}=u.value,{length:i}=f,l=f[i-1],c=n.matched;if(!l||!c.length)return-1;const w=c.findIndex(F.bind(null,l));if(w>-1)return w;const A=Me(f[i-2]);return i>1&&Me(l)===A&&c[c.length-1].path!==A?c.findIndex(F.bind(null,f[i-2])):w}),g=G(()=>d.value>-1&&gn(n.params,u.value.params)),s=G(()=>d.value>-1&&d.value===n.matched.length-1&&Xe(n.params,u.value.params));function h(f={}){if(mn(f)){const i=t[Z(e.replace)?"replace":"push"](Z(e.to)).catch(ee);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>i),i}return Promise.resolve()}return{route:u,href:G(()=>u.value.href),isActive:g,isExactActive:s,navigate:h}}function dn(e){return e.length===1?e[0]:e}const hn=Ke({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Ue,setup(e,{slots:t}){const n=lt(Ue(e)),{options:r}=q(_e),o=G(()=>({[je(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[je(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const u=t.default&&dn(t.default(n));return e.custom?u:We("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},u)}}}),pn=hn;function mn(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function gn(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!$(o)||o.length!==r.length||r.some((u,d)=>u.valueOf()!==o[d].valueOf()))return!1}return!0}function Me(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const je=(e,t,n)=>e??t??n,vn=Ke({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=q(we),o=G(()=>e.route||r.value),u=q(Te,0),d=G(()=>{let h=Z(u);const{matched:f}=o.value;let i;for(;(i=f[h])&&!i.components;)h++;return h}),g=G(()=>o.value.matched[d.value]);fe(Te,G(()=>d.value+1)),fe(Wt,g),fe(we,o);const s=ct();return st(()=>[s.value,g.value,e.name],([h,f,i],[l,c,w])=>{f&&(f.instances[i]=h,c&&c!==f&&h&&h===l&&(f.leaveGuards.size||(f.leaveGuards=c.leaveGuards),f.updateGuards.size||(f.updateGuards=c.updateGuards))),h&&f&&(!c||!F(f,c)||!l)&&(f.enterCallbacks[i]||[]).forEach(A=>A(h))},{flush:"post"}),()=>{const h=o.value,f=e.name,i=g.value,l=i&&i.components[f];if(!l)return He(n.default,{Component:l,route:h});const c=i.props[f],w=c?c===!0?h.params:typeof c=="function"?c(h):c:null,P=We(l,b({},w,t,{onVnodeUnmounted:I=>{I.component.isUnmounted&&(i.instances[f]=null)},ref:s}));return He(n.default,{Component:P,route:h})||P}}});function He(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const yn=vn;function In(e){const t=sn(e.routes,e),n=e.parseQuery||Ht,r=e.stringifyQuery||xe,o=e.history,u=X(),d=X(),g=X(),s=ut(M);let h=M;W&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=de.bind(null,a=>""+a),i=de.bind(null,Pt),l=de.bind(null,te);function c(a,m){let p,v;return Ze(a)?(p=t.getRecordMatcher(a),v=m):v=a,t.addRoute(v,p)}function w(a){const m=t.getRecordMatcher(a);m&&t.removeRoute(m)}function A(){return t.getRoutes().map(a=>a.record)}function P(a){return!!t.getRecordMatcher(a)}function I(a,m){if(m=b({},m||s.value),typeof a=="string"){const y=he(n,a,m.path),N=t.resolve({path:y.path},m),J=o.createHref(y.fullPath);return b(y,N,{params:l(N.params),hash:te(y.hash),redirectedFrom:void 0,href:J})}let p;if(a.path!=null)p=b({},a,{path:he(n,a.path,m.path).path});else{const y=b({},a.params);for(const N in y)y[N]==null&&delete y[N];p=b({},a,{params:i(y)}),m.params=i(m.params)}const v=t.resolve(p,m),R=a.hash||"";v.params=f(l(v.params));const S=St(r,b({},a,{hash:At(R),path:v.path})),_=o.createHref(S);return b({fullPath:S,hash:R,query:r===xe?Kt(a.query):a.query||{}},v,{redirectedFrom:void 0,href:_})}function E(a){return typeof a=="string"?he(n,a,s.value.path):b({},a)}function C(a,m){if(h!==a)return Q(O.NAVIGATION_CANCELLED,{from:m,to:a})}function L(a){return D(a)}function B(a){return L(b(E(a),{replace:!0}))}function U(a,m){const p=a.matched[a.matched.length-1];if(p&&p.redirect){const{redirect:v}=p;let R=typeof v=="function"?v(a,m):v;return typeof R=="string"&&(R=R.includes("?")||R.includes("#")?R=E(R):{path:R},R.params={}),b({query:a.query,hash:a.hash,params:R.path!=null?{}:a.params},R)}}function D(a,m){const p=h=I(a),v=s.value,R=a.state,S=a.force,_=a.replace===!0,y=U(p,v);if(y)return D(b(E(y),{state:typeof y=="object"?b({},R,y.state):R,force:S,replace:_}),m||p);const N=p;N.redirectedFrom=m;let J;return!S&&Nt(r,v,p)&&(J=Q(O.NAVIGATION_DUPLICATED,{to:N,from:v}),Ie(v,v,!0,!1)),(J?Promise.resolve(J):Ae(N,v)).catch(T=>V(T)?V(T,O.NAVIGATION_GUARD_REDIRECT)?T:le(T):se(T,N,v)).then(T=>{if(T){if(V(T,O.NAVIGATION_GUARD_REDIRECT))return D(b({replace:_},E(T.to),{state:typeof T.to=="object"?b({},R,T.to.state):R,force:S}),m||N)}else T=Ce(N,v,!0,_,R);return be(N,v,T),T})}function ot(a,m){const p=C(a,m);return p?Promise.reject(p):Promise.resolve()}function ae(a){const m=re.values().next().value;return m&&typeof m.runWithContext=="function"?m.runWithContext(a):a()}function Ae(a,m){let p;const[v,R,S]=qt(a,m);p=me(v.reverse(),"beforeRouteLeave",a,m);for(const y of v)y.leaveGuards.forEach(N=>{p.push(j(N,a,m))});const _=ot.bind(null,a,m);return p.push(_),K(p).then(()=>{p=[];for(const y of u.list())p.push(j(y,a,m));return p.push(_),K(p)}).then(()=>{p=me(R,"beforeRouteUpdate",a,m);for(const y of R)y.updateGuards.forEach(N=>{p.push(j(N,a,m))});return p.push(_),K(p)}).then(()=>{p=[];for(const y of S)if(y.beforeEnter)if($(y.beforeEnter))for(const N of y.beforeEnter)p.push(j(N,a,m));else p.push(j(y.beforeEnter,a,m));return p.push(_),K(p)}).then(()=>(a.matched.forEach(y=>y.enterCallbacks={}),p=me(S,"beforeRouteEnter",a,m,ae),p.push(_),K(p))).then(()=>{p=[];for(const y of d.list())p.push(j(y,a,m));return p.push(_),K(p)}).catch(y=>V(y,O.NAVIGATION_CANCELLED)?y:Promise.reject(y))}function be(a,m,p){g.list().forEach(v=>ae(()=>v(a,m,p)))}function Ce(a,m,p,v,R){const S=C(a,m);if(S)return S;const _=m===M,y=W?history.state:{};p&&(v||_?o.replace(a.fullPath,b({scroll:_&&y&&y.scroll},R)):o.push(a.fullPath,R)),s.value=a,Ie(a,m,p,_),le()}let z;function at(){z||(z=o.listen((a,m,p)=>{if(!Y.listening)return;const v=I(a),R=U(v,Y.currentRoute.value);if(R){D(b(R,{replace:!0,force:!0}),v).catch(ee);return}h=v;const S=s.value;W&&Vt(ke(S.fullPath,p.delta),oe()),Ae(v,S).catch(_=>V(_,O.NAVIGATION_ABORTED|O.NAVIGATION_CANCELLED)?_:V(_,O.NAVIGATION_GUARD_REDIRECT)?(D(b(E(_.to),{force:!0}),v).then(y=>{V(y,O.NAVIGATION_ABORTED|O.NAVIGATION_DUPLICATED)&&!p.delta&&p.type===ve.pop&&o.go(-1,!1)}).catch(ee),Promise.reject()):(p.delta&&o.go(-p.delta,!1),se(_,v,S))).then(_=>{_=_||Ce(v,S,!1),_&&(p.delta&&!V(_,O.NAVIGATION_CANCELLED)?o.go(-p.delta,!1):p.type===ve.pop&&V(_,O.NAVIGATION_ABORTED|O.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),be(v,S,_)}).catch(ee)}))}let ie=X(),Pe=X(),ne;function se(a,m,p){le(a);const v=Pe.list();return v.length?v.forEach(R=>R(a,m,p)):console.error(a),Promise.reject(a)}function it(){return ne&&s.value!==M?Promise.resolve():new Promise((a,m)=>{ie.add([a,m])})}function le(a){return ne||(ne=!a,at(),ie.list().forEach(([m,p])=>a?p(a):m()),ie.reset()),a}function Ie(a,m,p,v){const{scrollBehavior:R}=e;if(!W||!R)return Promise.resolve();const S=!p&&Bt(ke(a.fullPath,0))||(v||!p)&&history.state&&history.state.scroll||null;return ft().then(()=>R(a,m,S)).then(_=>_&&Gt(_)).catch(_=>se(_,a,m))}const ce=a=>o.go(a);let ue;const re=new Set,Y={currentRoute:s,listening:!0,addRoute:c,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:P,getRoutes:A,resolve:I,options:e,push:L,replace:B,go:ce,back:()=>ce(-1),forward:()=>ce(1),beforeEach:u.add,beforeResolve:d.add,afterEach:g.add,onError:Pe.add,isReady:it,install(a){a.component("RouterLink",pn),a.component("RouterView",yn),a.config.globalProperties.$router=Y,Object.defineProperty(a.config.globalProperties,"$route",{enumerable:!0,get:()=>Z(s)}),W&&!ue&&s.value===M&&(ue=!0,L(o.location).catch(v=>{}));const m={};for(const v in M)Object.defineProperty(m,v,{get:()=>s.value[v],enumerable:!0});a.provide(_e,Y),a.provide(Re,dt(m)),a.provide(we,s);const p=a.unmount;re.add(a),a.unmount=function(){re.delete(a),re.size<1&&(h=M,z&&z(),z=null,s.value=M,ue=!1,ne=!1),p()}}};function K(a){return a.reduce((m,p)=>m.then(()=>ae(p)),Promise.resolve())}return Y}function On(e){return q(Re)}export{Pn as a,In as c,Ht as p,On as u};