@vtj/pro 0.9.4 → 0.9.6
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/dist/@vtj/materials/assets/antdv/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/element/index.umd.js +3 -3
- package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/vant/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +9 -9
- package/dist/@vtj/materials/deps/@vueuse/core/index.iife.min.js +1 -1
- package/dist/@vtj/materials/deps/xe-utils/xe-utils.umd.min.js +2 -2
- package/dist/assets/{@element-plus-icons-vue-Cffh5gMs.js → @element-plus-icons-vue-BM7nPgXL.js} +1 -1
- package/dist/assets/@vueuse-BwkL59YI.js +1 -0
- package/dist/assets/{Editor-ZiUDqfgK-DcBtFFt2.js → Editor-ZiUDqfgK-lELAAGrH.js} +1 -1
- package/dist/assets/{auth-dRF3ivor.js → auth-BNLa1o8j.js} +1 -1
- package/dist/assets/{element-plus-YyQpMNX9.js → element-plus-BHLTgCyt.js} +1 -1
- package/dist/assets/{extension-C8ZhAfEn.js → extension-C3i8Db2L.js} +19 -19
- package/dist/assets/{index-BvLtH7Ej.js → index-Bo3SubWr.js} +1 -1
- package/dist/assets/{index-5i6FClbb.js → index-CSO9rqBp.js} +28 -28
- package/dist/assets/page-OZVGcgfg.js +2 -0
- package/dist/assets/preview-BK90FAA6.js +2 -0
- package/dist/assets/{vue-MNNkR0KN.js → vue-Dzbx66BV.js} +1 -1
- package/dist/assets/{vue-router-70esBOLy.js → vue-router-CBK9GHjZ.js} +2 -2
- package/dist/assets/vxe-l3jZ90Gb.js +4 -0
- package/dist/index.html +8 -8
- package/package.json +11 -11
- package/dist/assets/@vueuse-lzvNycZY.js +0 -1
- package/dist/assets/page-Cgw1GDNx.js +0 -2
- package/dist/assets/preview-BovWIv7Z.js +0 -2
- package/dist/assets/vxe-y57a8oB3.js +0 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-CBK9GHjZ.js","./vue-Dzbx66BV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var D=Object.defineProperty,S=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var w=(o,t,e)=>t in o?D(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,l=(o,t)=>{for(var e in t||(t={}))B.call(t,e)&&w(o,e,t[e]);if(A)for(var e of A(t))L.call(t,e)&&w(o,e,t[e]);return o},E=(o,t)=>S(o,V(t));var g=(o,t,e)=>new Promise((p,c)=>{var _=s=>{try{i(e.next(s))}catch(m){c(m)}},r=s=>{try{i(e.throw(s))}catch(m){c(m)}},i=s=>s.done?p(s.value):Promise.resolve(s.value).then(_,r);i((e=e.apply(o,t)).next())});import{_ as x}from"./monaco-editor-Lba3v2gb.js";import{useRoute as T}from"./vue-router-CBK9GHjZ.js";import{b,E as k,i as H}from"./extension-C3i8Db2L.js";import{D as I,A as K,H as N,y as M,N as j}from"./index-CSO9rqBp.js";import{c as G}from"./element-plus-BHLTgCyt.js";import"./vxe-l3jZ90Gb.js";import{d as J,aA as R,e as Y,J as h,K as q,u as z,h as F,o as P,M as Q,O as U}from"./vue-Dzbx66BV.js";import"./@element-plus-icons-vue-BM7nPgXL.js";import"./@vueuse-BwkL59YI.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BiYWQEnZ.js";import"./dayjs-DO-COJPZ.js";import"./lodash-es-Cmvm8wvQ.js";import"./shared-BAqo0W56.js";const ut=J({__name:"page",setup(o){return g(this,null,function*(){let t,e;const p=new j,c=([t,e]=R(()=>p.getExtension().catch(()=>null)),t=yield t,e(),t),{options:_,adapters:r}=c?([t,e]=R(()=>new k(c).load()),t=yield t,e(),t):{},{__BASE_PATH__:i="/"}=c||{},s=r==null?void 0:r.access,m=r==null?void 0:r.remote,f=s?new I(E(l({},s),{alert:G.alert,storageKey:K})):void 0,{provider:v,onReady:O}=N(E(l({mode:M.Runtime,service:p,materialPath:i,adapter:{access:f,remote:m}},_||{}),{dependencies:{Vue:()=>x(()=>import("./vue-Dzbx66BV.js").then(a=>a.ay),[],import.meta.url),VueRouter:()=>x(()=>import("./vue-router-CBK9GHjZ.js"),__vite__mapDeps([0,1]),import.meta.url)}})),y=T(),u=Y(),d=F();return O(()=>g(this,null,function*(){const a=d==null?void 0:d.appContext.app;a&&(a.use(b),a.use(v)),u.value=yield v.getRenderComponent(y.params.id.toString(),n=>{Object.assign(y.meta,n.meta);const C=a==null?void 0:a._container;(n==null?void 0:n.type)==="page"&&C.classList.add("is-page"),(n==null?void 0:n.pure)&&C.classList.add("is-pure")})})),(a,n)=>(P(),h(z(H),null,{default:q(()=>[u.value?(P(),h(Q(u.value),{key:0})):U("",!0)]),_:1}))})}});export{ut as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-CBK9GHjZ.js","./vue-Dzbx66BV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var h=Object.defineProperty,D=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var C=(o,e,t)=>e in o?h(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,E=(o,e)=>{for(var t in e||(e={}))V.call(e,t)&&C(o,t,e[t]);if(A)for(var t of A(e))b.call(e,t)&&C(o,t,e[t]);return o},w=(o,e)=>D(o,S(e));var g=(o,e,t)=>new Promise((_,c)=>{var m=s=>{try{i(t.next(s))}catch(p){c(p)}},a=s=>{try{i(t.throw(s))}catch(p){c(p)}},i=s=>s.done?_(s.value):Promise.resolve(s.value).then(m,a);i((t=t.apply(o,e)).next())});import{_ as R}from"./monaco-editor-Lba3v2gb.js";import{useRoute as f}from"./vue-router-CBK9GHjZ.js";import{c as B}from"./element-plus-BHLTgCyt.js";import"./vxe-l3jZ90Gb.js";import{b as L,E as T}from"./extension-C3i8Db2L.js";import{D as k,A as H,H as I,y as N,N as j}from"./index-CSO9rqBp.js";import{d as K,aA as x,e as M,J as G,M as J,O as Y,h as q,o as z}from"./vue-Dzbx66BV.js";import"./lodash-es-Cmvm8wvQ.js";import"./@vueuse-BwkL59YI.js";import"./@element-plus-icons-vue-BM7nPgXL.js";import"./shared-BAqo0W56.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BiYWQEnZ.js";const ie=K({__name:"preview",setup(o){return g(this,null,function*(){let e,t;const _=new j,c=([e,t]=x(()=>_.getExtension().catch(()=>null)),e=yield e,t(),e),{options:m,adapters:a}=c?([e,t]=x(()=>new T(c).load()),e=yield e,t(),e):{},{__BASE_PATH__:i="/"}=c||{},s=a==null?void 0:a.access,p=a==null?void 0:a.remote,O=s?new k(E({alert:B.alert,storageKey:H},s)):void 0,{provider:l,onReady:P}=I(w(E({mode:N.Runtime,service:_,materialPath:i},m||{}),{adapter:Object.assign({access:O,remote:p},(m==null?void 0:m.adapter)||{}),dependencies:{Vue:()=>R(()=>import("./vue-Dzbx66BV.js").then(r=>r.ay),[],import.meta.url),VueRouter:()=>R(()=>import("./vue-router-CBK9GHjZ.js"),__vite__mapDeps([0,1]),import.meta.url)}})),v=f(),u=M(),d=q();return P(()=>g(this,null,function*(){const r=d==null?void 0:d.appContext.app;r&&(r.use(L),r.use(l)),u.value=yield l.getRenderComponent(v.params.id.toString(),n=>{Object.assign(v.meta,n.meta);const y=r==null?void 0:r._container;(n==null?void 0:n.type)==="page"&&y.classList.add("is-page"),(n==null?void 0:n.pure)&&y.classList.add("is-pure")})})),(r,n)=>u.value?(z(),G(J(u.value),{key:0})):Y("",!0)})}});export{ie as default};
|
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
* @vue/shared v3.4.21
|
|
32
32
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
33
33
|
* @license MIT
|
|
34
|
-
**/const xh=()=>{},yh=Object.prototype.hasOwnProperty,Sh=(e,t)=>yh.call(e,t),wh=Array.isArray,Ah=e=>Xl(e)==="[object Date]",qs=e=>typeof e=="function",Oh=e=>typeof e=="string",bh=e=>e!==null&&typeof e=="object",Rh=e=>(bh(e)||qs(e))&&qs(e.then)&&qs(e.catch),vh=Object.prototype.toString,Xl=e=>vh.call(e),Ph=e=>Xl(e)==="[object Object]",Yr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ch=/-(\w)/g,Nh=Yr(e=>e.replace(Ch,(t,n)=>n?n.toUpperCase():"")),Th=/\B([A-Z])/g,Mh=Yr(e=>e.replace(Th,"-$1").toLowerCase()),Ih=Yr(e=>e.charAt(0).toUpperCase()+e.slice(1));export{
|
|
34
|
+
**/const xh=()=>{},yh=Object.prototype.hasOwnProperty,Sh=(e,t)=>yh.call(e,t),wh=Array.isArray,Ah=e=>Xl(e)==="[object Date]",qs=e=>typeof e=="function",Oh=e=>typeof e=="string",bh=e=>e!==null&&typeof e=="object",Rh=e=>(bh(e)||qs(e))&&qs(e.then)&&qs(e.catch),vh=Object.prototype.toString,Xl=e=>vh.call(e),Ph=e=>Xl(e)==="[object Object]",Yr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ch=/-(\w)/g,Nh=Yr(e=>e.replace(Ch,(t,n)=>n?n.toUpperCase():"")),Th=/\B([A-Z])/g,Mh=Yr(e=>e.replace(Th,"-$1").toLowerCase()),Ih=Yr(e=>e.charAt(0).toUpperCase()+e.slice(1));export{xs as $,oa as A,qs as B,Bo as C,Nh as D,zf as E,En as F,Tn as G,gl as H,fu as I,es as J,Rr as K,Sf as L,Jf as M,xh as N,Zu as O,Br as P,go as Q,he as R,re as S,Fl as T,Ia as U,ws as V,uu as W,hh as X,Ss as Y,as as Z,Po as _,kr as a,Ue as a0,ft as a1,ie as a2,Af as a3,Io as a4,No as a5,Xf as a6,ph as a7,Qf as a8,Ah as a9,pu as aA,Wf as aB,Dc as aC,hu as aD,Iu as aE,Lc as aF,pf as aa,pl as ab,Xe as ac,Z as ad,Gr as ae,qr as af,Tl as ag,Yf as ah,Ih as ai,Fr as aj,Rh as ak,os as al,eu as am,sh as an,so as ao,ac as ap,Ph as aq,Zf as ar,nn as as,ql as at,yr as au,Mh as av,no as aw,Uf as ax,Eh as ay,ju as az,hc as b,Gu as c,Mr as d,tn as e,$t as f,ji as g,Ie as h,Sn as i,oo as j,Cl as k,ue as l,Uc as m,vs as n,vn as o,Tu as p,ln as q,xr as r,ro as s,jc as t,ps as u,Oh as v,Pu as w,wh as x,bh as y,Sh as z};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{s as ut,u as Y,
|
|
1
|
+
import{s as ut,u as Y,aw as ft,q as $,k as I,n as ht,V as pt,a5 as dt,_ as mt,d as ze,Z as gt,ag as Ue,C as le,e as vt,f as yt}from"./vue-Dzbx66BV.js";/*!
|
|
2
2
|
* vue-router v4.5.0
|
|
3
3
|
* (c) 2024 Eduardo San Martin Morote
|
|
4
4
|
* @license MIT
|
|
5
|
-
*/const V=typeof document!="undefined";function De(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ke(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&De(e.default)}const P=Object.assign;function ue(e,t){const n={};for(const r in t){const o=t[r];n[r]=T(o)?o.map(e):e(o)}return n}const X=()=>{},T=Array.isArray,We=/#/g,Rt=/&/g,Et=/\//g,wt=/=/g,Pt=/\?/g,Qe=/\+/g,St=/%5B/g,Ct=/%5D/g,Fe=/%5E/g,kt=/%60/g,Ye=/%7B/g,bt=/%7C/g,Xe=/%7D/g,At=/%20/g;function ve(e){return encodeURI(""+e).replace(bt,"|").replace(St,"[").replace(Ct,"]")}function Ot(e){return ve(e).replace(Ye,"{").replace(Xe,"}").replace(Fe,"^")}function de(e){return ve(e).replace(Qe,"%2B").replace(At,"+").replace(We,"%23").replace(Rt,"%26").replace(kt,"`").replace(Ye,"{").replace(Xe,"}").replace(Fe,"^")}function _t(e){return de(e).replace(wt,"%3D")}function xt(e){return ve(e).replace(We,"%23").replace(Pt,"%3F")}function Mt(e){return e==null?"":xt(e).replace(Et,"%2F")}function Z(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}const Lt=/\/$/,Tt=e=>e.replace(Lt,"");function fe(e,t,n="/"){let r,o={},a="",p="";const d=t.indexOf("#");let i=t.indexOf("?");return d<i&&d>=0&&(i=-1),i>-1&&(r=t.slice(0,i),a=t.slice(i+1,d>-1?d:t.length),o=e(a)),d>-1&&(r=r||t.slice(0,d),p=t.slice(d,t.length)),r=jt(r!=null?r:t,n),{fullPath:r+(a&&"?")+a+p,path:r,query:o,hash:Z(p)}}function It(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function be(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&&U(t.matched[r],n.matched[o])&&Ze(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function U(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ze(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!$t(e[n],t[n]))return!1;return!0}function $t(e,t){return T(e)?Ae(e,t):T(t)?Ae(t,e):e===t}function Ae(e,t){return T(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function jt(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 a=n.length-1,p,d;for(p=0;p<r.length;p++)if(d=r[p],d!==".")if(d==="..")a>1&&a--;else break;return n.slice(0,a).join("/")+"/"+r.slice(p).join("/")}const H={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var D;(function(e){e.pop="pop",e.push="push"})(D||(D={}));var q;(function(e){e.back="back",e.forward="forward",e.unknown=""})(q||(q={}));const he="";function Je(e){if(!e)if(V){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Tt(e)}const Ht=/^[^#]+#/;function et(e,t){return e.replace(Ht,"#")+t}function Bt(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 te=()=>({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=Bt(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 Oe(e,t){return(history.state?history.state.position-t:-1)+e}const me=new Map;function qt(e,t){me.set(e,t)}function zt(e){const t=me.get(e);return me.delete(e),t}let Vt=()=>location.protocol+"//"+location.host;function tt(e,t){const{pathname:n,search:r,hash:o}=t,a=e.indexOf("#");if(a>-1){let d=o.includes(e.slice(a))?e.slice(a).length:1,i=o.slice(d);return i[0]!=="/"&&(i="/"+i),be(i,"")}return be(n,e)+r+o}function Ut(e,t,n,r){let o=[],a=[],p=null;const d=({state:u})=>{const f=tt(e,location),w=n.value,S=t.value;let b=0;if(u){if(n.value=f,t.value=u,p&&p===w){p=null;return}b=S?u.position-S.position:0}else r(f);o.forEach(A=>{A(n.value,w,{delta:b,type:D.pop,direction:b?b>0?q.forward:q.back:q.unknown})})};function i(){p=n.value}function l(u){o.push(u);const f=()=>{const w=o.indexOf(u);w>-1&&o.splice(w,1)};return a.push(f),f}function h(){const{history:u}=window;u.state&&u.replaceState(P({},u.state,{scroll:te()}),"")}function c(){for(const u of a)u();a=[],window.removeEventListener("popstate",d),window.removeEventListener("beforeunload",h)}return window.addEventListener("popstate",d),window.addEventListener("beforeunload",h,{passive:!0}),{pauseListeners:i,listen:l,destroy:c}}function _e(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?te():null}}function Dt(e){const{history:t,location:n}=window,r={value:tt(e,n)},o={value:t.state};o.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(i,l,h){const c=e.indexOf("#"),u=c>-1?(n.host&&document.querySelector("base")?e:e.slice(c))+i:Vt()+e+i;try{t[h?"replaceState":"pushState"](l,"",u),o.value=l}catch(f){console.error(f),n[h?"replace":"assign"](u)}}function p(i,l){const h=P({},t.state,_e(o.value.back,i,o.value.forward,!0),l,{position:o.value.position});a(i,h,!0),r.value=i}function d(i,l){const h=P({},o.value,t.state,{forward:i,scroll:te()});a(h.current,h,!0);const c=P({},_e(r.value,i,null),{position:h.position+1},l);a(i,c,!1),r.value=i}return{location:r,state:o,push:d,replace:p}}function Kt(e){e=Je(e);const t=Dt(e),n=Ut(e,t.state,t.location,t.replace);function r(a,p=!0){p||n.pauseListeners(),history.go(a)}const o=P({location:"",base:e,go:r,createHref:et.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 Rn(e=""){let t=[],n=[he],r=0;e=Je(e);function o(d){r++,r!==n.length&&n.splice(r),n.push(d)}function a(d,i,{direction:l,delta:h}){const c={direction:l,delta:h,type:D.pop};for(const u of t)u(d,i,c)}const p={location:he,state:{},base:e,createHref:et.bind(null,e),replace(d){n.splice(r--,1),o(d)},push(d,i){o(d)},listen(d){return t.push(d),()=>{const i=t.indexOf(d);i>-1&&t.splice(i,1)}},destroy(){t=[],n=[he],r=0},go(d,i=!0){const l=this.location,h=d<0?q.back:q.forward;r=Math.max(0,Math.min(r+d,n.length-1)),i&&a(this.location,l,{direction:h,delta:d})}};return Object.defineProperty(p,"location",{enumerable:!0,get:()=>n[r]}),p}function En(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Kt(e)}function Wt(e){return typeof e=="string"||e&&typeof e=="object"}function nt(e){return typeof e=="string"||typeof e=="symbol"}const rt=Symbol("");var xe;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(xe||(xe={}));function K(e,t){return P(new Error,{type:e,[rt]:!0},t)}function N(e,t){return e instanceof Error&&rt in e&&(t==null||!!(e.type&t))}const Me="[^/]+?",Qt={sensitive:!1,strict:!1,start:!0,end:!0},Ft=/[.+*?^${}()[\]/\\]/g;function Yt(e,t){const n=P({},Qt,t),r=[];let o=n.start?"^":"";const a=[];for(const l of e){const h=l.length?[]:[90];n.strict&&!l.length&&(o+="/");for(let c=0;c<l.length;c++){const u=l[c];let f=40+(n.sensitive?.25:0);if(u.type===0)c||(o+="/"),o+=u.value.replace(Ft,"\\$&"),f+=40;else if(u.type===1){const{value:w,repeatable:S,optional:b,regexp:A}=u;a.push({name:w,repeatable:S,optional:b});const E=A||Me;if(E!==Me){f+=10;try{new RegExp(`(${E})`)}catch(L){throw new Error(`Invalid custom RegExp for param "${w}" (${E}): `+L.message)}}let C=S?`((?:${E})(?:/(?:${E}))*)`:`(${E})`;c||(C=b&&l.length<2?`(?:/${C})`:"/"+C),b&&(C+="?"),o+=C,f+=20,b&&(f+=-8),S&&(f+=-20),E===".*"&&(f+=-50)}h.push(f)}r.push(h)}if(n.strict&&n.end){const l=r.length-1;r[l][r[l].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const p=new RegExp(o,n.sensitive?"":"i");function d(l){const h=l.match(p),c={};if(!h)return null;for(let u=1;u<h.length;u++){const f=h[u]||"",w=a[u-1];c[w.name]=f&&w.repeatable?f.split("/"):f}return c}function i(l){let h="",c=!1;for(const u of e){(!c||!h.endsWith("/"))&&(h+="/"),c=!1;for(const f of u)if(f.type===0)h+=f.value;else if(f.type===1){const{value:w,repeatable:S,optional:b}=f,A=w in l?l[w]:"";if(T(A)&&!S)throw new Error(`Provided param "${w}" is an array but it is not repeatable (* or + modifiers)`);const E=T(A)?A.join("/"):A;if(!E)if(b)u.length<2&&(h.endsWith("/")?h=h.slice(0,-1):c=!0);else throw new Error(`Missing required param "${w}"`);h+=E}}return h||"/"}return{re:p,score:r,keys:a,parse:d,stringify:i}}function Xt(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]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function ot(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const a=Xt(r[n],o[n]);if(a)return a;n++}if(Math.abs(o.length-r.length)===1){if(Le(r))return 1;if(Le(o))return-1}return o.length-r.length}function Le(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Zt={type:0,value:""},Jt=/[a-zA-Z0-9_]/;function en(e){if(!e)return[[]];if(e==="/")return[[Zt]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${n})/"${l}": ${f}`)}let n=0,r=n;const o=[];let a;function p(){a&&o.push(a),a=[]}let d=0,i,l="",h="";function c(){l&&(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(i==="*"||i==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:h,repeatable:i==="*"||i==="+",optional:i==="*"||i==="?"})):t("Invalid state to consume buffer"),l="")}function u(){l+=i}for(;d<e.length;){if(i=e[d++],i==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:i==="/"?(l&&c(),p()):i===":"?(c(),n=1):u();break;case 4:u(),n=r;break;case 1:i==="("?n=2:Jt.test(i)?u():(c(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&d--);break;case 2:i===")"?h[h.length-1]=="\\"?h=h.slice(0,-1)+i:n=3:h+=i;break;case 3:c(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&d--,h="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),c(),p(),o}function tn(e,t,n){const r=Yt(en(e.path),n),o=P(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function nn(e,t){const n=[],r=new Map;t=$e({strict:!1,end:!0,sensitive:!1},t);function o(c){return r.get(c)}function a(c,u,f){const w=!f,S=Ie(c);S.aliasOf=f&&f.record;const b=$e(t,c),A=[S];if("alias"in c){const L=typeof c.alias=="string"?[c.alias]:c.alias;for(const G of L)A.push(Ie(P({},S,{components:f?f.record.components:S.components,path:G,aliasOf:f?f.record:S})))}let E,C;for(const L of A){const{path:G}=L;if(u&&G[0]!=="/"){const j=u.record.path,M=j[j.length-1]==="/"?"":"/";L.path=u.record.path+(G&&M+G)}if(E=tn(L,u,b),f?f.alias.push(E):(C=C||E,C!==E&&C.alias.push(E),w&&c.name&&!Ne(E)&&p(c.name)),st(E)&&i(E),S.children){const j=S.children;for(let M=0;M<j.length;M++)a(j[M],E,f&&f.children[M])}f=f||E}return C?()=>{p(C)}:X}function p(c){if(nt(c)){const u=r.get(c);u&&(r.delete(c),n.splice(n.indexOf(u),1),u.children.forEach(p),u.alias.forEach(p))}else{const u=n.indexOf(c);u>-1&&(n.splice(u,1),c.record.name&&r.delete(c.record.name),c.children.forEach(p),c.alias.forEach(p))}}function d(){return n}function i(c){const u=sn(c,n);n.splice(u,0,c),c.record.name&&!Ne(c)&&r.set(c.record.name,c)}function l(c,u){let f,w={},S,b;if("name"in c&&c.name){if(f=r.get(c.name),!f)throw K(1,{location:c});b=f.record.name,w=P(Te(u.params,f.keys.filter(C=>!C.optional).concat(f.parent?f.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),c.params&&Te(c.params,f.keys.map(C=>C.name))),S=f.stringify(w)}else if(c.path!=null)S=c.path,f=n.find(C=>C.re.test(S)),f&&(w=f.parse(S),b=f.record.name);else{if(f=u.name?r.get(u.name):n.find(C=>C.re.test(u.path)),!f)throw K(1,{location:c,currentLocation:u});b=f.record.name,w=P({},u.params,c.params),S=f.stringify(w)}const A=[];let E=f;for(;E;)A.unshift(E.record),E=E.parent;return{name:b,path:S,params:w,matched:A,meta:on(A)}}e.forEach(c=>a(c));function h(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:p,clearRoutes:h,getRoutes:d,getRecordMatcher:o}}function Te(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Ie(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:rn(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 rn(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 Ne(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function on(e){return e.reduce((t,n)=>P(t,n.meta),{})}function $e(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function sn(e,t){let n=0,r=t.length;for(;n!==r;){const a=n+r>>1;ot(e,t[a])<0?r=a:n=a+1}const o=cn(e);return o&&(r=t.lastIndexOf(o,r-1)),r}function cn(e){let t=e;for(;t=t.parent;)if(st(t)&&ot(e,t)===0)return t}function st({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function an(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<r.length;++o){const a=r[o].replace(Qe," "),p=a.indexOf("="),d=Z(p<0?a:a.slice(0,p)),i=p<0?null:Z(a.slice(p+1));if(d in t){let l=t[d];T(l)||(l=t[d]=[l]),l.push(i)}else t[d]=i}return t}function je(e){let t="";for(let n in e){const r=e[n];if(n=_t(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(T(r)?r.map(a=>a&&de(a)):[r&&de(r)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function ln(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=T(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const ye=Symbol(""),He=Symbol(""),ne=Symbol(""),Re=Symbol(""),ge=Symbol("");function F(){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 it(e,t,n){const r=()=>{e[t].delete(n)};pt(r),dt(r),mt(()=>{e[t].add(n)}),e[t].add(n)}function wn(e){const t=$(ye,{}).value;t&&it(t,"leaveGuards",e)}function Pn(e){const t=$(ye,{}).value;t&&it(t,"updateGuards",e)}function B(e,t,n,r,o,a=p=>p()){const p=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((d,i)=>{const l=u=>{u===!1?i(K(4,{from:n,to:t})):u instanceof Error?i(u):Wt(u)?i(K(2,{from:t,to:u})):(p&&r.enterCallbacks[o]===p&&typeof u=="function"&&p.push(u),d())},h=a(()=>e.call(r&&r.instances[o],t,n,l));let c=Promise.resolve(h);e.length<3&&(c=c.then(l)),c.catch(u=>i(u))})}function pe(e,t,n,r,o=a=>a()){const a=[];for(const p of e)for(const d in p.components){let i=p.components[d];if(!(t!=="beforeRouteEnter"&&!p.instances[d]))if(De(i)){const h=(i.__vccOpts||i)[t];h&&a.push(B(h,n,r,p,d,o))}else{let l=i();a.push(()=>l.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${d}" at "${p.path}"`);const c=Ke(h)?h.default:h;p.mods[d]=h,p.components[d]=c;const f=(c.__vccOpts||c)[t];return f&&B(f,n,r,p,d,o)()}))}}return a}function Sn(e){return e.matched.every(t=>t.redirect)?Promise.reject(new Error("Cannot load a route that redirects.")):Promise.all(e.matched.map(t=>t.components&&Promise.all(Object.keys(t.components).reduce((n,r)=>{const o=t.components[r];return typeof o=="function"&&!("displayName"in o)&&n.push(o().then(a=>{if(!a)return Promise.reject(new Error(`Couldn't resolve component "${r}" at "${t.path}". Ensure you passed a function that returns a promise.`));const p=Ke(a)?a.default:a;t.mods[r]=a,t.components[r]=p})),n},[])))).then(()=>e)}function Be(e){const t=$(ne),n=$(Re),r=I(()=>{const i=Y(e.to);return t.resolve(i)}),o=I(()=>{const{matched:i}=r.value,{length:l}=i,h=i[l-1],c=n.matched;if(!h||!c.length)return-1;const u=c.findIndex(U.bind(null,h));if(u>-1)return u;const f=Ge(i[l-2]);return l>1&&Ge(h)===f&&c[c.length-1].path!==f?c.findIndex(U.bind(null,i[l-2])):u}),a=I(()=>o.value>-1&&dn(n.params,r.value.params)),p=I(()=>o.value>-1&&o.value===n.matched.length-1&&Ze(n.params,r.value.params));function d(i={}){if(pn(i)){const l=t[Y(e.replace)?"replace":"push"](Y(e.to)).catch(X);return e.viewTransition&&typeof document!="undefined"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:r,href:I(()=>r.value.href),isActive:a,isExactActive:p,navigate:d}}function un(e){return e.length===1?e[0]:e}const fn=Ve({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"}},useLink:Be,setup(e,{slots:t}){const n=gt(Be(e)),{options:r}=$(ne),o=I(()=>({[qe(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[qe(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&un(t.default(n));return e.custom?a:Ue("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},a)}}}),hn=fn;function pn(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 dn(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(!T(o)||o.length!==r.length||r.some((a,p)=>a!==o[p]))return!1}return!0}function Ge(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const qe=(e,t,n)=>e!=null?e:t!=null?t:n,mn=Ve({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=$(ge),o=I(()=>e.route||r.value),a=$(He,0),p=I(()=>{let l=Y(a);const{matched:h}=o.value;let c;for(;(c=h[l])&&!c.components;)l++;return l}),d=I(()=>o.value.matched[p.value]);le(He,I(()=>p.value+1)),le(ye,d),le(ge,o);const i=vt();return yt(()=>[i.value,d.value,e.name],([l,h,c],[u,f,w])=>{h&&(h.instances[c]=l,f&&f!==h&&l&&l===u&&(h.leaveGuards.size||(h.leaveGuards=f.leaveGuards),h.updateGuards.size||(h.updateGuards=f.updateGuards))),l&&h&&(!f||!U(h,f)||!u)&&(h.enterCallbacks[c]||[]).forEach(S=>S(l))},{flush:"post"}),()=>{const l=o.value,h=e.name,c=d.value,u=c&&c.components[h];if(!u)return ze(n.default,{Component:u,route:l});const f=c.props[h],w=f?f===!0?l.params:typeof f=="function"?f(l):f:null,b=Ue(u,P({},w,t,{onVnodeUnmounted:A=>{A.component.isUnmounted&&(c.instances[h]=null)},ref:i}));return ze(n.default,{Component:b,route:l})||b}}});function ze(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const gn=mn;function Cn(e){const t=nn(e.routes,e),n=e.parseQuery||an,r=e.stringifyQuery||je,o=e.history,a=F(),p=F(),d=F(),i=ut(H);let l=H;V&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=ue.bind(null,s=>""+s),c=ue.bind(null,Mt),u=ue.bind(null,Z);function f(s,g){let m,v;return nt(s)?(m=t.getRecordMatcher(s),v=g):v=s,t.addRoute(v,m)}function w(s){const g=t.getRecordMatcher(s);g&&t.removeRoute(g)}function S(){return t.getRoutes().map(s=>s.record)}function b(s){return!!t.getRecordMatcher(s)}function A(s,g){if(g=P({},g||i.value),typeof s=="string"){const y=fe(n,s,g.path),_=t.resolve({path:y.path},g),Q=o.createHref(y.fullPath);return P(y,_,{params:u(_.params),hash:Z(y.hash),redirectedFrom:void 0,href:Q})}let m;if(s.path!=null)m=P({},s,{path:fe(n,s.path,g.path).path});else{const y=P({},s.params);for(const _ in y)y[_]==null&&delete y[_];m=P({},s,{params:c(y)}),g.params=c(g.params)}const v=t.resolve(m,g),k=s.hash||"";v.params=h(u(v.params));const O=It(r,P({},s,{hash:Ot(k),path:v.path})),R=o.createHref(O);return P({fullPath:O,hash:k,query:r===je?ln(s.query):s.query||{}},v,{redirectedFrom:void 0,href:R})}function E(s){return typeof s=="string"?fe(n,s,i.value.path):P({},s)}function C(s,g){if(l!==s)return K(8,{from:g,to:s})}function L(s){return M(s)}function G(s){return L(P(E(s),{replace:!0}))}function j(s){const g=s.matched[s.matched.length-1];if(g&&g.redirect){const{redirect:m}=g;let v=typeof m=="function"?m(s):m;return typeof v=="string"&&(v=v.includes("?")||v.includes("#")?v=E(v):{path:v},v.params={}),P({query:s.query,hash:s.hash,params:v.path!=null?{}:s.params},v)}}function M(s,g){const m=l=A(s),v=i.value,k=s.state,O=s.force,R=s.replace===!0,y=j(m);if(y)return M(P(E(y),{state:typeof y=="object"?P({},k,y.state):k,force:O,replace:R}),g||m);const _=m;_.redirectedFrom=g;let Q;return!O&&Nt(r,v,m)&&(Q=K(16,{to:_,from:v}),Ce(v,v,!0,!1)),(Q?Promise.resolve(Q):Ee(_,v)).catch(x=>N(x)?N(x,2)?x:ie(x):se(x,_,v)).then(x=>{if(x){if(N(x,2))return M(P({replace:R},E(x.to),{state:typeof x.to=="object"?P({},k,x.to.state):k,force:O}),g||_)}else x=Pe(_,v,!0,R,k);return we(_,v,x),x})}function ct(s,g){const m=C(s,g);return m?Promise.reject(m):Promise.resolve()}function re(s){const g=ee.values().next().value;return g&&typeof g.runWithContext=="function"?g.runWithContext(s):s()}function Ee(s,g){let m;const[v,k,O]=vn(s,g);m=pe(v.reverse(),"beforeRouteLeave",s,g);for(const y of v)y.leaveGuards.forEach(_=>{m.push(B(_,s,g))});const R=ct.bind(null,s,g);return m.push(R),z(m).then(()=>{m=[];for(const y of a.list())m.push(B(y,s,g));return m.push(R),z(m)}).then(()=>{m=pe(k,"beforeRouteUpdate",s,g);for(const y of k)y.updateGuards.forEach(_=>{m.push(B(_,s,g))});return m.push(R),z(m)}).then(()=>{m=[];for(const y of O)if(y.beforeEnter)if(T(y.beforeEnter))for(const _ of y.beforeEnter)m.push(B(_,s,g));else m.push(B(y.beforeEnter,s,g));return m.push(R),z(m)}).then(()=>(s.matched.forEach(y=>y.enterCallbacks={}),m=pe(O,"beforeRouteEnter",s,g,re),m.push(R),z(m))).then(()=>{m=[];for(const y of p.list())m.push(B(y,s,g));return m.push(R),z(m)}).catch(y=>N(y,8)?y:Promise.reject(y))}function we(s,g,m){d.list().forEach(v=>re(()=>v(s,g,m)))}function Pe(s,g,m,v,k){const O=C(s,g);if(O)return O;const R=g===H,y=V?history.state:{};m&&(v||R?o.replace(s.fullPath,P({scroll:R&&y&&y.scroll},k)):o.push(s.fullPath,k)),i.value=s,Ce(s,g,m,R),ie()}let W;function at(){W||(W=o.listen((s,g,m)=>{if(!ke.listening)return;const v=A(s),k=j(v);if(k){M(P(k,{replace:!0,force:!0}),v).catch(X);return}l=v;const O=i.value;V&&qt(Oe(O.fullPath,m.delta),te()),Ee(v,O).catch(R=>N(R,12)?R:N(R,2)?(M(P(E(R.to),{force:!0}),v).then(y=>{N(y,20)&&!m.delta&&m.type===D.pop&&o.go(-1,!1)}).catch(X),Promise.reject()):(m.delta&&o.go(-m.delta,!1),se(R,v,O))).then(R=>{R=R||Pe(v,O,!1),R&&(m.delta&&!N(R,8)?o.go(-m.delta,!1):m.type===D.pop&&N(R,20)&&o.go(-1,!1)),we(v,O,R)}).catch(X)}))}let oe=F(),Se=F(),J;function se(s,g,m){ie(s);const v=Se.list();return v.length?v.forEach(k=>k(s,g,m)):console.error(s),Promise.reject(s)}function lt(){return J&&i.value!==H?Promise.resolve():new Promise((s,g)=>{oe.add([s,g])})}function ie(s){return J||(J=!s,at(),oe.list().forEach(([g,m])=>s?m(s):g()),oe.reset()),s}function Ce(s,g,m,v){const{scrollBehavior:k}=e;if(!V||!k)return Promise.resolve();const O=!m&&zt(Oe(s.fullPath,0))||(v||!m)&&history.state&&history.state.scroll||null;return ht().then(()=>k(s,g,O)).then(R=>R&&Gt(R)).catch(R=>se(R,s,g))}const ce=s=>o.go(s);let ae;const ee=new Set,ke={currentRoute:i,listening:!0,addRoute:f,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:b,getRoutes:S,resolve:A,options:e,push:L,replace:G,go:ce,back:()=>ce(-1),forward:()=>ce(1),beforeEach:a.add,beforeResolve:p.add,afterEach:d.add,onError:Se.add,isReady:lt,install(s){const g=this;s.component("RouterLink",hn),s.component("RouterView",gn),s.config.globalProperties.$router=g,Object.defineProperty(s.config.globalProperties,"$route",{enumerable:!0,get:()=>Y(i)}),V&&!ae&&i.value===H&&(ae=!0,L(o.location).catch(k=>{}));const m={};for(const k in H)Object.defineProperty(m,k,{get:()=>i.value[k],enumerable:!0});s.provide(ne,g),s.provide(Re,ft(m)),s.provide(ge,i);const v=s.unmount;ee.add(s),s.unmount=function(){ee.delete(s),ee.size<1&&(l=H,W&&W(),W=null,i.value=H,ae=!1,J=!1),v()}}};function z(s){return s.reduce((g,m)=>g.then(()=>re(m)),Promise.resolve())}return ke}function vn(e,t){const n=[],r=[],o=[],a=Math.max(t.matched.length,e.matched.length);for(let p=0;p<a;p++){const d=t.matched[p];d&&(e.matched.find(l=>U(l,d))?r.push(d):n.push(d));const i=e.matched[p];i&&(t.matched.find(l=>U(l,i))||o.push(i))}return[n,r,o]}function kn(){return $(ne)}function bn(e){return $(Re)}export{xe as NavigationFailureType,hn as RouterLink,gn as RouterView,H as START_LOCATION,Rn as createMemoryHistory,Cn as createRouter,nn as createRouterMatcher,En as createWebHashHistory,Kt as createWebHistory,N as isNavigationFailure,Sn as loadRouteLocation,ye as matchedRouteKey,wn as onBeforeRouteLeave,Pn as onBeforeRouteUpdate,an as parseQuery,Re as routeLocationKey,ne as routerKey,ge as routerViewLocationKey,je as stringifyQuery,Be as useLink,bn as useRoute,kn as useRouter,He as viewDepthKey};
|
|
5
|
+
*/const z=typeof document!="undefined";function Ke(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function De(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Ke(e.default)}const P=Object.assign;function ue(e,t){const n={};for(const r in t){const o=t[r];n[r]=T(o)?o.map(e):e(o)}return n}const X=()=>{},T=Array.isArray,We=/#/g,Rt=/&/g,Et=/\//g,wt=/=/g,Pt=/\?/g,Qe=/\+/g,St=/%5B/g,Ct=/%5D/g,Fe=/%5E/g,kt=/%60/g,Ye=/%7B/g,bt=/%7C/g,Xe=/%7D/g,At=/%20/g;function ve(e){return encodeURI(""+e).replace(bt,"|").replace(St,"[").replace(Ct,"]")}function Ot(e){return ve(e).replace(Ye,"{").replace(Xe,"}").replace(Fe,"^")}function de(e){return ve(e).replace(Qe,"%2B").replace(At,"+").replace(We,"%23").replace(Rt,"%26").replace(kt,"`").replace(Ye,"{").replace(Xe,"}").replace(Fe,"^")}function _t(e){return de(e).replace(wt,"%3D")}function xt(e){return ve(e).replace(We,"%23").replace(Pt,"%3F")}function Mt(e){return e==null?"":xt(e).replace(Et,"%2F")}function Z(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}const Lt=/\/$/,Tt=e=>e.replace(Lt,"");function fe(e,t,n="/"){let r,o={},a="",p="";const d=t.indexOf("#");let i=t.indexOf("?");return d<i&&d>=0&&(i=-1),i>-1&&(r=t.slice(0,i),a=t.slice(i+1,d>-1?d:t.length),o=e(a)),d>-1&&(r=r||t.slice(0,d),p=t.slice(d,t.length)),r=jt(r!=null?r:t,n),{fullPath:r+(a&&"?")+a+p,path:r,query:o,hash:Z(p)}}function It(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function be(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&&U(t.matched[r],n.matched[o])&&Ze(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function U(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ze(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!$t(e[n],t[n]))return!1;return!0}function $t(e,t){return T(e)?Ae(e,t):T(t)?Ae(t,e):e===t}function Ae(e,t){return T(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function jt(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 a=n.length-1,p,d;for(p=0;p<r.length;p++)if(d=r[p],d!==".")if(d==="..")a>1&&a--;else break;return n.slice(0,a).join("/")+"/"+r.slice(p).join("/")}const H={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var K;(function(e){e.pop="pop",e.push="push"})(K||(K={}));var G;(function(e){e.back="back",e.forward="forward",e.unknown=""})(G||(G={}));const he="";function Je(e){if(!e)if(z){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Tt(e)}const Ht=/^[^#]+#/;function et(e,t){return e.replace(Ht,"#")+t}function Bt(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 te=()=>({left:window.scrollX,top:window.scrollY});function qt(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=Bt(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 Oe(e,t){return(history.state?history.state.position-t:-1)+e}const me=new Map;function Gt(e,t){me.set(e,t)}function Vt(e){const t=me.get(e);return me.delete(e),t}let zt=()=>location.protocol+"//"+location.host;function tt(e,t){const{pathname:n,search:r,hash:o}=t,a=e.indexOf("#");if(a>-1){let d=o.includes(e.slice(a))?e.slice(a).length:1,i=o.slice(d);return i[0]!=="/"&&(i="/"+i),be(i,"")}return be(n,e)+r+o}function Ut(e,t,n,r){let o=[],a=[],p=null;const d=({state:u})=>{const f=tt(e,location),w=n.value,S=t.value;let b=0;if(u){if(n.value=f,t.value=u,p&&p===w){p=null;return}b=S?u.position-S.position:0}else r(f);o.forEach(A=>{A(n.value,w,{delta:b,type:K.pop,direction:b?b>0?G.forward:G.back:G.unknown})})};function i(){p=n.value}function l(u){o.push(u);const f=()=>{const w=o.indexOf(u);w>-1&&o.splice(w,1)};return a.push(f),f}function h(){const{history:u}=window;u.state&&u.replaceState(P({},u.state,{scroll:te()}),"")}function c(){for(const u of a)u();a=[],window.removeEventListener("popstate",d),window.removeEventListener("beforeunload",h)}return window.addEventListener("popstate",d),window.addEventListener("beforeunload",h,{passive:!0}),{pauseListeners:i,listen:l,destroy:c}}function _e(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?te():null}}function Kt(e){const{history:t,location:n}=window,r={value:tt(e,n)},o={value:t.state};o.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(i,l,h){const c=e.indexOf("#"),u=c>-1?(n.host&&document.querySelector("base")?e:e.slice(c))+i:zt()+e+i;try{t[h?"replaceState":"pushState"](l,"",u),o.value=l}catch(f){console.error(f),n[h?"replace":"assign"](u)}}function p(i,l){const h=P({},t.state,_e(o.value.back,i,o.value.forward,!0),l,{position:o.value.position});a(i,h,!0),r.value=i}function d(i,l){const h=P({},o.value,t.state,{forward:i,scroll:te()});a(h.current,h,!0);const c=P({},_e(r.value,i,null),{position:h.position+1},l);a(i,c,!1),r.value=i}return{location:r,state:o,push:d,replace:p}}function Dt(e){e=Je(e);const t=Kt(e),n=Ut(e,t.state,t.location,t.replace);function r(a,p=!0){p||n.pauseListeners(),history.go(a)}const o=P({location:"",base:e,go:r,createHref:et.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 Rn(e=""){let t=[],n=[he],r=0;e=Je(e);function o(d){r++,r!==n.length&&n.splice(r),n.push(d)}function a(d,i,{direction:l,delta:h}){const c={direction:l,delta:h,type:K.pop};for(const u of t)u(d,i,c)}const p={location:he,state:{},base:e,createHref:et.bind(null,e),replace(d){n.splice(r--,1),o(d)},push(d,i){o(d)},listen(d){return t.push(d),()=>{const i=t.indexOf(d);i>-1&&t.splice(i,1)}},destroy(){t=[],n=[he],r=0},go(d,i=!0){const l=this.location,h=d<0?G.back:G.forward;r=Math.max(0,Math.min(r+d,n.length-1)),i&&a(this.location,l,{direction:h,delta:d})}};return Object.defineProperty(p,"location",{enumerable:!0,get:()=>n[r]}),p}function En(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Dt(e)}function Wt(e){return typeof e=="string"||e&&typeof e=="object"}function nt(e){return typeof e=="string"||typeof e=="symbol"}const rt=Symbol("");var xe;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(xe||(xe={}));function D(e,t){return P(new Error,{type:e,[rt]:!0},t)}function N(e,t){return e instanceof Error&&rt in e&&(t==null||!!(e.type&t))}const Me="[^/]+?",Qt={sensitive:!1,strict:!1,start:!0,end:!0},Ft=/[.+*?^${}()[\]/\\]/g;function Yt(e,t){const n=P({},Qt,t),r=[];let o=n.start?"^":"";const a=[];for(const l of e){const h=l.length?[]:[90];n.strict&&!l.length&&(o+="/");for(let c=0;c<l.length;c++){const u=l[c];let f=40+(n.sensitive?.25:0);if(u.type===0)c||(o+="/"),o+=u.value.replace(Ft,"\\$&"),f+=40;else if(u.type===1){const{value:w,repeatable:S,optional:b,regexp:A}=u;a.push({name:w,repeatable:S,optional:b});const E=A||Me;if(E!==Me){f+=10;try{new RegExp(`(${E})`)}catch(L){throw new Error(`Invalid custom RegExp for param "${w}" (${E}): `+L.message)}}let C=S?`((?:${E})(?:/(?:${E}))*)`:`(${E})`;c||(C=b&&l.length<2?`(?:/${C})`:"/"+C),b&&(C+="?"),o+=C,f+=20,b&&(f+=-8),S&&(f+=-20),E===".*"&&(f+=-50)}h.push(f)}r.push(h)}if(n.strict&&n.end){const l=r.length-1;r[l][r[l].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const p=new RegExp(o,n.sensitive?"":"i");function d(l){const h=l.match(p),c={};if(!h)return null;for(let u=1;u<h.length;u++){const f=h[u]||"",w=a[u-1];c[w.name]=f&&w.repeatable?f.split("/"):f}return c}function i(l){let h="",c=!1;for(const u of e){(!c||!h.endsWith("/"))&&(h+="/"),c=!1;for(const f of u)if(f.type===0)h+=f.value;else if(f.type===1){const{value:w,repeatable:S,optional:b}=f,A=w in l?l[w]:"";if(T(A)&&!S)throw new Error(`Provided param "${w}" is an array but it is not repeatable (* or + modifiers)`);const E=T(A)?A.join("/"):A;if(!E)if(b)u.length<2&&(h.endsWith("/")?h=h.slice(0,-1):c=!0);else throw new Error(`Missing required param "${w}"`);h+=E}}return h||"/"}return{re:p,score:r,keys:a,parse:d,stringify:i}}function Xt(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]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function ot(e,t){let n=0;const r=e.score,o=t.score;for(;n<r.length&&n<o.length;){const a=Xt(r[n],o[n]);if(a)return a;n++}if(Math.abs(o.length-r.length)===1){if(Le(r))return 1;if(Le(o))return-1}return o.length-r.length}function Le(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Zt={type:0,value:""},Jt=/[a-zA-Z0-9_]/;function en(e){if(!e)return[[]];if(e==="/")return[[Zt]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${n})/"${l}": ${f}`)}let n=0,r=n;const o=[];let a;function p(){a&&o.push(a),a=[]}let d=0,i,l="",h="";function c(){l&&(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(i==="*"||i==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:h,repeatable:i==="*"||i==="+",optional:i==="*"||i==="?"})):t("Invalid state to consume buffer"),l="")}function u(){l+=i}for(;d<e.length;){if(i=e[d++],i==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:i==="/"?(l&&c(),p()):i===":"?(c(),n=1):u();break;case 4:u(),n=r;break;case 1:i==="("?n=2:Jt.test(i)?u():(c(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&d--);break;case 2:i===")"?h[h.length-1]=="\\"?h=h.slice(0,-1)+i:n=3:h+=i;break;case 3:c(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&d--,h="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),c(),p(),o}function tn(e,t,n){const r=Yt(en(e.path),n),o=P(r,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function nn(e,t){const n=[],r=new Map;t=$e({strict:!1,end:!0,sensitive:!1},t);function o(c){return r.get(c)}function a(c,u,f){const w=!f,S=Ie(c);S.aliasOf=f&&f.record;const b=$e(t,c),A=[S];if("alias"in c){const L=typeof c.alias=="string"?[c.alias]:c.alias;for(const q of L)A.push(Ie(P({},S,{components:f?f.record.components:S.components,path:q,aliasOf:f?f.record:S})))}let E,C;for(const L of A){const{path:q}=L;if(u&&q[0]!=="/"){const j=u.record.path,M=j[j.length-1]==="/"?"":"/";L.path=u.record.path+(q&&M+q)}if(E=tn(L,u,b),f?f.alias.push(E):(C=C||E,C!==E&&C.alias.push(E),w&&c.name&&!Ne(E)&&p(c.name)),st(E)&&i(E),S.children){const j=S.children;for(let M=0;M<j.length;M++)a(j[M],E,f&&f.children[M])}f=f||E}return C?()=>{p(C)}:X}function p(c){if(nt(c)){const u=r.get(c);u&&(r.delete(c),n.splice(n.indexOf(u),1),u.children.forEach(p),u.alias.forEach(p))}else{const u=n.indexOf(c);u>-1&&(n.splice(u,1),c.record.name&&r.delete(c.record.name),c.children.forEach(p),c.alias.forEach(p))}}function d(){return n}function i(c){const u=sn(c,n);n.splice(u,0,c),c.record.name&&!Ne(c)&&r.set(c.record.name,c)}function l(c,u){let f,w={},S,b;if("name"in c&&c.name){if(f=r.get(c.name),!f)throw D(1,{location:c});b=f.record.name,w=P(Te(u.params,f.keys.filter(C=>!C.optional).concat(f.parent?f.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),c.params&&Te(c.params,f.keys.map(C=>C.name))),S=f.stringify(w)}else if(c.path!=null)S=c.path,f=n.find(C=>C.re.test(S)),f&&(w=f.parse(S),b=f.record.name);else{if(f=u.name?r.get(u.name):n.find(C=>C.re.test(u.path)),!f)throw D(1,{location:c,currentLocation:u});b=f.record.name,w=P({},u.params,c.params),S=f.stringify(w)}const A=[];let E=f;for(;E;)A.unshift(E.record),E=E.parent;return{name:b,path:S,params:w,matched:A,meta:on(A)}}e.forEach(c=>a(c));function h(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:p,clearRoutes:h,getRoutes:d,getRecordMatcher:o}}function Te(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Ie(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:rn(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 rn(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 Ne(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function on(e){return e.reduce((t,n)=>P(t,n.meta),{})}function $e(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function sn(e,t){let n=0,r=t.length;for(;n!==r;){const a=n+r>>1;ot(e,t[a])<0?r=a:n=a+1}const o=cn(e);return o&&(r=t.lastIndexOf(o,r-1)),r}function cn(e){let t=e;for(;t=t.parent;)if(st(t)&&ot(e,t)===0)return t}function st({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function an(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<r.length;++o){const a=r[o].replace(Qe," "),p=a.indexOf("="),d=Z(p<0?a:a.slice(0,p)),i=p<0?null:Z(a.slice(p+1));if(d in t){let l=t[d];T(l)||(l=t[d]=[l]),l.push(i)}else t[d]=i}return t}function je(e){let t="";for(let n in e){const r=e[n];if(n=_t(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(T(r)?r.map(a=>a&&de(a)):[r&&de(r)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function ln(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=T(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const ye=Symbol(""),He=Symbol(""),ne=Symbol(""),Re=Symbol(""),ge=Symbol("");function F(){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 it(e,t,n){const r=()=>{e[t].delete(n)};pt(r),dt(r),mt(()=>{e[t].add(n)}),e[t].add(n)}function wn(e){const t=$(ye,{}).value;t&&it(t,"leaveGuards",e)}function Pn(e){const t=$(ye,{}).value;t&&it(t,"updateGuards",e)}function B(e,t,n,r,o,a=p=>p()){const p=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((d,i)=>{const l=u=>{u===!1?i(D(4,{from:n,to:t})):u instanceof Error?i(u):Wt(u)?i(D(2,{from:t,to:u})):(p&&r.enterCallbacks[o]===p&&typeof u=="function"&&p.push(u),d())},h=a(()=>e.call(r&&r.instances[o],t,n,l));let c=Promise.resolve(h);e.length<3&&(c=c.then(l)),c.catch(u=>i(u))})}function pe(e,t,n,r,o=a=>a()){const a=[];for(const p of e)for(const d in p.components){let i=p.components[d];if(!(t!=="beforeRouteEnter"&&!p.instances[d]))if(Ke(i)){const h=(i.__vccOpts||i)[t];h&&a.push(B(h,n,r,p,d,o))}else{let l=i();a.push(()=>l.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${d}" at "${p.path}"`);const c=De(h)?h.default:h;p.mods[d]=h,p.components[d]=c;const f=(c.__vccOpts||c)[t];return f&&B(f,n,r,p,d,o)()}))}}return a}function Sn(e){return e.matched.every(t=>t.redirect)?Promise.reject(new Error("Cannot load a route that redirects.")):Promise.all(e.matched.map(t=>t.components&&Promise.all(Object.keys(t.components).reduce((n,r)=>{const o=t.components[r];return typeof o=="function"&&!("displayName"in o)&&n.push(o().then(a=>{if(!a)return Promise.reject(new Error(`Couldn't resolve component "${r}" at "${t.path}". Ensure you passed a function that returns a promise.`));const p=De(a)?a.default:a;t.mods[r]=a,t.components[r]=p})),n},[])))).then(()=>e)}function Be(e){const t=$(ne),n=$(Re),r=I(()=>{const i=Y(e.to);return t.resolve(i)}),o=I(()=>{const{matched:i}=r.value,{length:l}=i,h=i[l-1],c=n.matched;if(!h||!c.length)return-1;const u=c.findIndex(U.bind(null,h));if(u>-1)return u;const f=qe(i[l-2]);return l>1&&qe(h)===f&&c[c.length-1].path!==f?c.findIndex(U.bind(null,i[l-2])):u}),a=I(()=>o.value>-1&&dn(n.params,r.value.params)),p=I(()=>o.value>-1&&o.value===n.matched.length-1&&Ze(n.params,r.value.params));function d(i={}){if(pn(i)){const l=t[Y(e.replace)?"replace":"push"](Y(e.to)).catch(X);return e.viewTransition&&typeof document!="undefined"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:r,href:I(()=>r.value.href),isActive:a,isExactActive:p,navigate:d}}function un(e){return e.length===1?e[0]:e}const fn=ze({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"}},useLink:Be,setup(e,{slots:t}){const n=gt(Be(e)),{options:r}=$(ne),o=I(()=>({[Ge(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Ge(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&un(t.default(n));return e.custom?a:Ue("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},a)}}}),hn=fn;function pn(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 dn(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(!T(o)||o.length!==r.length||r.some((a,p)=>a!==o[p]))return!1}return!0}function qe(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ge=(e,t,n)=>e!=null?e:t!=null?t:n,mn=ze({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=$(ge),o=I(()=>e.route||r.value),a=$(He,0),p=I(()=>{let l=Y(a);const{matched:h}=o.value;let c;for(;(c=h[l])&&!c.components;)l++;return l}),d=I(()=>o.value.matched[p.value]);le(He,I(()=>p.value+1)),le(ye,d),le(ge,o);const i=vt();return yt(()=>[i.value,d.value,e.name],([l,h,c],[u,f,w])=>{h&&(h.instances[c]=l,f&&f!==h&&l&&l===u&&(h.leaveGuards.size||(h.leaveGuards=f.leaveGuards),h.updateGuards.size||(h.updateGuards=f.updateGuards))),l&&h&&(!f||!U(h,f)||!u)&&(h.enterCallbacks[c]||[]).forEach(S=>S(l))},{flush:"post"}),()=>{const l=o.value,h=e.name,c=d.value,u=c&&c.components[h];if(!u)return Ve(n.default,{Component:u,route:l});const f=c.props[h],w=f?f===!0?l.params:typeof f=="function"?f(l):f:null,b=Ue(u,P({},w,t,{onVnodeUnmounted:A=>{A.component.isUnmounted&&(c.instances[h]=null)},ref:i}));return Ve(n.default,{Component:b,route:l})||b}}});function Ve(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const gn=mn;function Cn(e){const t=nn(e.routes,e),n=e.parseQuery||an,r=e.stringifyQuery||je,o=e.history,a=F(),p=F(),d=F(),i=ut(H);let l=H;z&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=ue.bind(null,s=>""+s),c=ue.bind(null,Mt),u=ue.bind(null,Z);function f(s,g){let m,v;return nt(s)?(m=t.getRecordMatcher(s),v=g):v=s,t.addRoute(v,m)}function w(s){const g=t.getRecordMatcher(s);g&&t.removeRoute(g)}function S(){return t.getRoutes().map(s=>s.record)}function b(s){return!!t.getRecordMatcher(s)}function A(s,g){if(g=P({},g||i.value),typeof s=="string"){const y=fe(n,s,g.path),_=t.resolve({path:y.path},g),Q=o.createHref(y.fullPath);return P(y,_,{params:u(_.params),hash:Z(y.hash),redirectedFrom:void 0,href:Q})}let m;if(s.path!=null)m=P({},s,{path:fe(n,s.path,g.path).path});else{const y=P({},s.params);for(const _ in y)y[_]==null&&delete y[_];m=P({},s,{params:c(y)}),g.params=c(g.params)}const v=t.resolve(m,g),k=s.hash||"";v.params=h(u(v.params));const O=It(r,P({},s,{hash:Ot(k),path:v.path})),R=o.createHref(O);return P({fullPath:O,hash:k,query:r===je?ln(s.query):s.query||{}},v,{redirectedFrom:void 0,href:R})}function E(s){return typeof s=="string"?fe(n,s,i.value.path):P({},s)}function C(s,g){if(l!==s)return D(8,{from:g,to:s})}function L(s){return M(s)}function q(s){return L(P(E(s),{replace:!0}))}function j(s){const g=s.matched[s.matched.length-1];if(g&&g.redirect){const{redirect:m}=g;let v=typeof m=="function"?m(s):m;return typeof v=="string"&&(v=v.includes("?")||v.includes("#")?v=E(v):{path:v},v.params={}),P({query:s.query,hash:s.hash,params:v.path!=null?{}:s.params},v)}}function M(s,g){const m=l=A(s),v=i.value,k=s.state,O=s.force,R=s.replace===!0,y=j(m);if(y)return M(P(E(y),{state:typeof y=="object"?P({},k,y.state):k,force:O,replace:R}),g||m);const _=m;_.redirectedFrom=g;let Q;return!O&&Nt(r,v,m)&&(Q=D(16,{to:_,from:v}),Ce(v,v,!0,!1)),(Q?Promise.resolve(Q):Ee(_,v)).catch(x=>N(x)?N(x,2)?x:ie(x):se(x,_,v)).then(x=>{if(x){if(N(x,2))return M(P({replace:R},E(x.to),{state:typeof x.to=="object"?P({},k,x.to.state):k,force:O}),g||_)}else x=Pe(_,v,!0,R,k);return we(_,v,x),x})}function ct(s,g){const m=C(s,g);return m?Promise.reject(m):Promise.resolve()}function re(s){const g=ee.values().next().value;return g&&typeof g.runWithContext=="function"?g.runWithContext(s):s()}function Ee(s,g){let m;const[v,k,O]=vn(s,g);m=pe(v.reverse(),"beforeRouteLeave",s,g);for(const y of v)y.leaveGuards.forEach(_=>{m.push(B(_,s,g))});const R=ct.bind(null,s,g);return m.push(R),V(m).then(()=>{m=[];for(const y of a.list())m.push(B(y,s,g));return m.push(R),V(m)}).then(()=>{m=pe(k,"beforeRouteUpdate",s,g);for(const y of k)y.updateGuards.forEach(_=>{m.push(B(_,s,g))});return m.push(R),V(m)}).then(()=>{m=[];for(const y of O)if(y.beforeEnter)if(T(y.beforeEnter))for(const _ of y.beforeEnter)m.push(B(_,s,g));else m.push(B(y.beforeEnter,s,g));return m.push(R),V(m)}).then(()=>(s.matched.forEach(y=>y.enterCallbacks={}),m=pe(O,"beforeRouteEnter",s,g,re),m.push(R),V(m))).then(()=>{m=[];for(const y of p.list())m.push(B(y,s,g));return m.push(R),V(m)}).catch(y=>N(y,8)?y:Promise.reject(y))}function we(s,g,m){d.list().forEach(v=>re(()=>v(s,g,m)))}function Pe(s,g,m,v,k){const O=C(s,g);if(O)return O;const R=g===H,y=z?history.state:{};m&&(v||R?o.replace(s.fullPath,P({scroll:R&&y&&y.scroll},k)):o.push(s.fullPath,k)),i.value=s,Ce(s,g,m,R),ie()}let W;function at(){W||(W=o.listen((s,g,m)=>{if(!ke.listening)return;const v=A(s),k=j(v);if(k){M(P(k,{replace:!0,force:!0}),v).catch(X);return}l=v;const O=i.value;z&&Gt(Oe(O.fullPath,m.delta),te()),Ee(v,O).catch(R=>N(R,12)?R:N(R,2)?(M(P(E(R.to),{force:!0}),v).then(y=>{N(y,20)&&!m.delta&&m.type===K.pop&&o.go(-1,!1)}).catch(X),Promise.reject()):(m.delta&&o.go(-m.delta,!1),se(R,v,O))).then(R=>{R=R||Pe(v,O,!1),R&&(m.delta&&!N(R,8)?o.go(-m.delta,!1):m.type===K.pop&&N(R,20)&&o.go(-1,!1)),we(v,O,R)}).catch(X)}))}let oe=F(),Se=F(),J;function se(s,g,m){ie(s);const v=Se.list();return v.length?v.forEach(k=>k(s,g,m)):console.error(s),Promise.reject(s)}function lt(){return J&&i.value!==H?Promise.resolve():new Promise((s,g)=>{oe.add([s,g])})}function ie(s){return J||(J=!s,at(),oe.list().forEach(([g,m])=>s?m(s):g()),oe.reset()),s}function Ce(s,g,m,v){const{scrollBehavior:k}=e;if(!z||!k)return Promise.resolve();const O=!m&&Vt(Oe(s.fullPath,0))||(v||!m)&&history.state&&history.state.scroll||null;return ht().then(()=>k(s,g,O)).then(R=>R&&qt(R)).catch(R=>se(R,s,g))}const ce=s=>o.go(s);let ae;const ee=new Set,ke={currentRoute:i,listening:!0,addRoute:f,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:b,getRoutes:S,resolve:A,options:e,push:L,replace:q,go:ce,back:()=>ce(-1),forward:()=>ce(1),beforeEach:a.add,beforeResolve:p.add,afterEach:d.add,onError:Se.add,isReady:lt,install(s){const g=this;s.component("RouterLink",hn),s.component("RouterView",gn),s.config.globalProperties.$router=g,Object.defineProperty(s.config.globalProperties,"$route",{enumerable:!0,get:()=>Y(i)}),z&&!ae&&i.value===H&&(ae=!0,L(o.location).catch(k=>{}));const m={};for(const k in H)Object.defineProperty(m,k,{get:()=>i.value[k],enumerable:!0});s.provide(ne,g),s.provide(Re,ft(m)),s.provide(ge,i);const v=s.unmount;ee.add(s),s.unmount=function(){ee.delete(s),ee.size<1&&(l=H,W&&W(),W=null,i.value=H,ae=!1,J=!1),v()}}};function V(s){return s.reduce((g,m)=>g.then(()=>re(m)),Promise.resolve())}return ke}function vn(e,t){const n=[],r=[],o=[],a=Math.max(t.matched.length,e.matched.length);for(let p=0;p<a;p++){const d=t.matched[p];d&&(e.matched.find(l=>U(l,d))?r.push(d):n.push(d));const i=e.matched[p];i&&(t.matched.find(l=>U(l,i))||o.push(i))}return[n,r,o]}function kn(){return $(ne)}function bn(e){return $(Re)}export{xe as NavigationFailureType,hn as RouterLink,gn as RouterView,H as START_LOCATION,Rn as createMemoryHistory,Cn as createRouter,nn as createRouterMatcher,En as createWebHashHistory,Dt as createWebHistory,N as isNavigationFailure,Sn as loadRouteLocation,ye as matchedRouteKey,wn as onBeforeRouteLeave,Pn as onBeforeRouteUpdate,an as parseQuery,Re as routeLocationKey,ne as routerKey,ge as routerViewLocationKey,je as stringifyQuery,Be as useLink,bn as useRoute,kn as useRouter,He as viewDepthKey};
|