LocalCDN-Firefox-Chrome-Brave/resources/vue-router/4.3.0/vue-router.global.min.jsm

11 lines
40 KiB
JavaScript
Raw Normal View History

2024-02-29 18:54:39 +01:00
var VueRouter=function(e,N){"use strict";const M="undefined"!=typeof document;function p(e){return e.__esModule||"Module"===e[Symbol.toStringTag]}const U=Object.assign;function D(e,t){const n={};for(const r in t){const o=t[r];n[r]=B(o)?o.map(e):e(o)}return n}const V=()=>{},B=Array.isArray;function W(e){var t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const o=/#/g,c=/&/g,f=/\//g,m=/=/g,v=/\?/g,g=/\+/g,y=/%5B/g,b=/%5D/g,ie=/%5E/g,w=/%60/g,se=/%7B/g,_=/%7C/g,le=/%7D/g,E=/%20/g;function q(e){return encodeURI(""+e).replace(_,"|").replace(y,"[").replace(b,"]")}function a(e){return q(e).replace(g,"%2B").replace(E,"+").replace(o,"%23").replace(c,"%26").replace(w,"`").replace(se,"{").replace(le,"}").replace(ie,"^")}function ce(e){return null==e?"":q(e).replace(o,"%23").replace(v,"%3F").replace(f,"%2F")}function G(t){try{return decodeURIComponent(""+t)}catch(e){W(`Error decoding "${t}". Using original value`)}return""+t}const $=/\/$/,C=e=>e.replace($,"");function F(e,t,n="/"){let r,o={},a="",i="";var s=t.indexOf("#");let l=t.indexOf("?");return-1<(l=s<l&&0<=s?-1:l)&&(r=t.slice(0,l),a=t.slice(l+1,-1<s?s:t.length),o=e(a)),-1<s&&(r=r||t.slice(0,s),i=t.slice(s,t.length)),{fullPath:(r=function(e,t){if(e.startsWith("/"))return e;if(!t.startsWith("/"))return W(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),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,i,s;for(i=0;i<r.length;i++)if("."!==(s=r[i])){if(".."!==s)break;1<a&&a--}return n.slice(0,a).join("/")+"/"+r.slice(i).join("/")}(null!=r?r:t,n))+(a&&"?")+a+i,path:r,query:o,hash:G(i)}}function R(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function ue(e,t,n){var r=t.matched.length-1,o=n.matched.length-1;return-1<r&&r==o&&K(t.matched[r],n.matched[o])&&x(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function K(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function x(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const o in e)if(n=e[o],r=t[o],!(B(n)?P(n,r):B(r)?P(r,n):n===r))return!1;var n,r;return!0}function P(e,n){return B(n)?e.length===n.length&&e.every((e,t)=>e===n[t]):1===e.length&&e[0]===n}var Q,d,t;(t=Q=Q||{}).pop="pop",t.push="push",(t=d=d||{}).back="back",t.forward="forward";t.unknown="";function O(e){if(!e)if(M){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),C(e)}const S=/^[^#]+#/;function j(e,t){return e.replace(S,"#")+t}const H=()=>({left:window.scrollX,top:window.scrollY});function de(t){let e;if("el"in t){const a=t.el;var n="string"==typeof a&&a.startsWith("#");if(!("string"!=typeof t.el||n&&document.getElementById(t.el.slice(1))))try{var r=document.querySelector(t.el);if(n&&r)return void W(`The selector "${t.el}" should be passed as "el: document.querySelector('${t.el}')" because it starts with "#".`)}catch(e){return void W(`The selector "${t.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`)}r="string"==typeof a?n?document.getElementById(a.slice(1)):document.querySelector(a):a;if(!r)return void W(`Couldn't find element using selector "${t.el}" returned by scrollBehavior.`);e=(n=r,r=t,o=document.documentElement.getBoundingClientRect(),n=n.getBoundingClientRect(),{behavior:r.behavior,left:n.left-o.left-(r.left||0),top:n.top-o.top-(r.top||0)})}else e=t;var o;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(null!=e.left?e.left:window.scrollX,null!=e.top?e.top:window.scrollY)}function he(e,t){return(history.state?history.state.position-t:-1)+e}const z=new Map;let A=()=>location.protocol+"//"+location.host;function I(t,n){const{pathname:e,search:r,has
`+JSON.stringify(e)+(t?"\nwhile being at\n"+JSON.stringify(t):"")},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${function(e){if("string"==typeof e)return e;if(null!=e.path)return e.path;const t={};for(const n of ye)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}});function Y(e,t){return U(new Error(ge[e](t)),{type:e,[ve]:!0},t)}function X(e,t){return e instanceof Error&&ve in e&&(null==t||!!(e.type&t))}const ye=["params","query","hash"];const be={sensitive:!1,strict:!1,start:!0,end:!0},we=/[.+*?^${}()[\]/\\]/g;function _e(c,e){var r=U({},be,e);const t=[];let o=r.start?"^":"";const a=[];for(const h of c){const p=h.length?[]:[90];r.strict&&!h.length&&(o+="/");for(let n=0;n<h.length;n++){const f=h[n];let t=40+(r.sensitive?.25:0);if(0===f.type)n||(o+="/"),o+=f.value.replace(we,"\\$&"),t+=40;else if(1===f.type){var{value:i,repeatable:s,optional:l,regexp:u}=f;a.push({name:i,repeatable:s,optional:l});const d=u||"[^/]+?";if("[^/]+?"!==d){t+=10;try{new RegExp(`(${d})`)}catch(e){throw new Error(`Invalid custom RegExp for param "${i}" (${d}): `+e.message)}}let e=s?`((?:${d})(?:/(?:${d}))*)`:`(${d})`;n||(e=l&&h.length<2?`(?:/${e})`:"/"+e),l&&(e+="?"),o+=e,t+=20,l&&(t+=-8),s&&(t+=-20),".*"===d&&(t+=-50)}p.push(t)}t.push(p)}r.strict&&r.end&&(e=t.length-1,t[e][t[e].length-1]+=.7000000000000001),r.strict||(o+="/?"),r.end?o+="$":r.strict&&(o+="(?:/|$)");const d=new RegExp(o,r.sensitive?"":"i");return{re:d,score:t,keys:a,parse:function(e){var t=e.match(d);const n={};if(!t)return null;for(let e=1;e<t.length;e++){const o=t[e]||"";var r=a[e-1];n[r.name]=o&&r.repeatable?o.split("/"):o}return n},stringify:function(e){let t="",n=!1;for(const i of c){n&&t.endsWith("/")||(t+="/"),n=!1;for(const s of i)if(0===s.type)t+=s.value;else if(1===s.type){var{value:r,repeatable:o,optional:a}=s;const l=r in e?e[r]:"";if(B(l)&&!o)throw new Error(`Provided param "${r}" is an array but it is not repeatable (* or + modifiers)`);o=B(l)?l.join("/"):l;if(!o){if(!a)throw new Error(`Missing required param "${r}"`);i.length<2&&(t.endsWith("/")?t=t.slice(0,-1):n=!0)}t+=o}}return t||"/"}}}function ke(e,t){let n=0;for(var r=e.score,o=t.score;n<r.length&&n<o.length;){var a=function(e,t){let n=0;for(;n<e.length&&n<t.length;){var r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?1===e.length&&80===e[0]?-1:1:e.length>t.length?1===t.length&&80===t[0]?1:-1:0}(r[n],o[n]);if(a)return a;n++}if(1===Math.abs(o.length-r.length)){if(Ee(r))return 1;if(Ee(o))return-1}return o.length-r.length}function Ee(e){var t=e[e.length-1];return 0<e.length&&t[t.length-1]<0}const $e={type:0,value:""},Ce=/[a-zA-Z0-9_]/;function Re(e,t,n){n=_e(function(e){if(!e)return[[]];if("/"===e)return[[$e]];if(!e.startsWith("/"))throw new Error(`Route paths should start with a "/": "${e}" should be "/${e}".`);function t(e){throw new Error(`ERR (${n})/"${c}": `+e)}let n=0,r=n;const o=[];let a;function i(){a&&o.push(a),a=[]}let s=0,l,c="",u="";function d(){c&&(0===n?a.push({type:0,value:c}):1===n||2===n||3===n?(1<a.length&&("*"===l||"+"===l)&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:c,regexp:u,repeatable:"*"===l||"+"===l,optional:"*"===l||"?"===l})):t("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;s<e.length;)if("\\"===(l=e[s++])&&2!==n)r=n,n=4;else switch(n){case 0:"/"===l?(c&&d(),i()):":"===l?(d(),n=1):h();break;case 4:h(),n=r;break;case 1:"("===l?n=2:Ce.test(l)?h():(d(),n=0,"*"!==l&&"?"!==l&&"+"!==l&&s--);break;case 2:")"===l?"\\"==u[u.length-1]?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:d(),n=0,"*"!==l&&"?"!==l&&"+"!==l&&s--,u="";break;default:t("Unknown state")}return 2===n&&t(`Unfinished custom RegExp for param "${c}"`),d(),i(),o}(e.path),n);{const r=new Set;for(const o of n.keys)r
${i.toString()}
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if("object"==typeof e&&"then"in e)o=o.then(e=>t._called?e:(W(a),Promise.reject(new Error("Invalid navigation guard"))));else if(void 0!==e&&!t._called)return W(a),void r(new Error("Invalid navigation guard"))}o.catch(e=>r(e))})}function ae(e,n,r,o,a=e=>e()){const i=[];for(const l of e){l.components||l.children.length||W(`Record with path "${l.path}" is either missing a "component(s)"`+' or "children" property.');for(const c in l.components){let t=l.components[c];if(!t||"object"!=typeof t&&"function"!=typeof t)throw W(`Component "${c}" in record with path "${l.path}" is not`+` a valid component. Received "${String(t)}".`),new Error("Invalid route component");if("then"in t){W(`Component "${c}" in record with path "${l.path}" is a `+"Promise instead of a function that returns a Promise. Did you "+`write "import('./MyPage.vue')" instead of `+`"() => import('./MyPage.vue')" ? This will break in `+"production if not fixed.");const u=t;t=()=>u}else t.__asyncLoader&&!t.__warnedDefineAsync&&(t.__warnedDefineAsync=!0,W(`Component "${c}" in record with path "${l.path}" is defined `+'using "defineAsyncComponent()". '+`Write "() => import('./MyPage.vue')" instead of `+`"defineAsyncComponent(() => import('./MyPage.vue'))".`));if("beforeRouteEnter"===n||l.instances[c])if("object"==typeof(s=t)||"displayName"in s||"props"in s||"__vccOpts"in s){s=(t.__vccOpts||t)[n];s&&i.push(oe(s,r,o,l,c,a))}else{let e=t();"catch"in e||(W(`Component "${c}" in record with path "${l.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),e=Promise.resolve(e)),i.push(()=>e.then(e=>{if(!e)return Promise.reject(new Error(`Couldn't resolve component "${c}" at "${l.path}"`));e=p(e)?e.default:e,e=((l.components[c]=e).__vccOpts||e)[n];return e&&oe(e,r,o,l,c,a)()}))}}}var s;return i}function l(t){const n=N.inject(ee),i=N.inject(te),s=N.computed(()=>n.resolve(N.unref(t.to))),e=N.computed(()=>{var e=s.value["matched"],t=e["length"],n=e[t-1];const r=i.matched;if(!n||!r.length)return-1;var o=r.findIndex(K.bind(null,n));if(-1<o)return o;var a=Te(e[t-2]);return 1<t&&Te(n)===a&&r[r.length-1].path!==a?r.findIndex(K.bind(null,e[t-2])):o}),r=N.computed(()=>-1<e.value&&function(e,t){for(const n in t){const r=t[n],o=e[n];if("string"==typeof r){if(r!==o)return!1}else if(!B(o)||o.length!==r.length||r.some((e,t)=>e!==o[t]))return!1}return!0}(i.params,s.value.params)),o=N.computed(()=>-1<e.value&&e.value===i.matched.length-1&&x(i.params,s.value.params));if(M){const a=N.getCurrentInstance();if(a){const l={route:s.value,isActive:r.value,isExactActive:o.value};a.__vrl_devtools=a.__vrl_devtools||[],a.__vrl_devtools.push(l),N.watchEffect(()=>{l.route=s.value,l.isActive=r.value,l.isExactActive=o.value},{flush:"post"})}}return{route:s,href:N.computed(()=>s.value.href),isActive:r,isExactActive:o,navigate:function(e={}){return function(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),1}}(e)?n[N.unref(t.replace)?"replace":"push"](N.unref(t.to)).catch(V):Promise.resolve()}}}const Ie=N.defineComponent({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:l,setup(t,{slots:n}){const r=N.reactive(l(t)),e=N.inject(ee)["options"],o=N.computed(()=>({[Le(t.activeClass,e.linkActiveClass,"router-link-active")]:r.isActive,[Le(t.exactActiveClass,e.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{var e=n.default&&n.default(r);return t.custom?e:N.h("a",{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,
`+` <component :is="Component" />
`+` </${e}>
`+"</router-view>")}const t=N.inject(ne),h=N.computed(()=>c.route||t.value),r=N.inject(s,0),p=N.computed(()=>{let e=N.unref(r);for(var t,n=h.value["matched"];(t=n[e])&&!t.components;)e++;return e}),f=N.computed(()=>h.value.matched[p.value]),m=(N.provide(s,N.computed(()=>p.value+1)),N.provide(i,f),N.provide(ne,h),N.ref());return N.watch(()=>[m.value,f.value,c.name],([t,e,n],[r,o])=>{e&&(e.instances[n]=t,o&&o!==e&&t&&t===r&&(e.leaveGuards.size||(e.leaveGuards=o.leaveGuards),e.updateGuards.size||(e.updateGuards=o.updateGuards))),!t||!e||o&&K(e,o)&&r||(e.enterCallbacks[n]||[]).forEach(e=>e(t))},{flush:"post"}),()=>{var e=h.value;const t=c.name,n=f.value;var r=n&&n.components[t];if(!r)return Ne(d.default,{Component:r,route:e});const o=n.props[t];var a=o?!0===o?e.params:"function"==typeof o?o(e):o:null;const i=N.h(r,U({},a,u,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(n.instances[t]=null)},ref:m}));if(M&&i.ref){const s={depth:p.value,name:n.name,path:n.path,meta:n.meta},l=B(i.ref)?i.ref.map(e=>e.i):[i.ref.i];l.forEach(e=>{e.__vrv_devtools=s})}return Ne(d.default,{Component:i,route:e})||i}}});function Ue(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}}const De="function"==typeof Proxy,Ve="devtools-plugin:setup";let n,r;function Be(){return void 0!==n||("undefined"!=typeof window&&window.performance?(n=!0,r=window.performance):"undefined"!=typeof global&&null!=(e=global.perf_hooks)&&e.performance?(n=!0,r=global.perf_hooks.performance):n=!1),(n?r:Date).now();var e}class We{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const l in e.settings){var r=e.settings[l];n[l]=r.defaultValue}const o="__vue-devtools-plugin-settings__"+e.id;let a=Object.assign({},n);try{var i=localStorage.getItem(o),s=JSON.parse(i);Object.assign(a,s)}catch(e){}this.fallbacks={getSettings(){return a},setSettings(e){try{localStorage.setItem(o,JSON.stringify(e))}catch(e){}a=e},now(){return Be()}},t&&t.on("plugin:settings:set",(e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)}),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,n)=>this.target?this.target[n]:"on"===n?this.proxiedOn:Object.keys(this.fallbacks).includes(n)?(...e)=>(this.targetQueue.push({method:n,args:e,resolve:()=>{}}),this.fallbacks[n](...e)):(...t)=>new Promise(e=>{this.targetQueue.push({method:n,args:t,resolve:e})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function qe(e,t){var n=e;const r=Ue(),o=Ue().__VUE_DEVTOOLS_GLOBAL_HOOK__;var a=De&&n.enableEarlyProxy;if(!o||!r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&a){a=a?new We(n,o):null;const i=r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[];i.push({pluginDescriptor:n,setupFn:t,proxy:a}),a&&t(a.proxiedTarget)}else o.emit(Ve,e,t)}function u(e,t){var n=U({},e,{matched:e.matched.map(e=>{{var t=e,n=["instances","children","aliasOf"];const r={};for(const o in t)n.includes(o)||(r[o]=t[o]);return r}})});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function h(e){return{_custom:{display:e}}}let Ge=0;function Fe(s,l,c){if(!l.__hasDevtools){l.__hasDevtools=!0;const e=Ge++;qe({id:"org.vuejs.router"+(e?"."+e:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:s},o=>{"function"!=typeof o.now&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),o.on.inspectComponent((e,t)=>{e.instanceData&&e.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:u(l.currentRoute.value,"Current Route")})}),o.on.visitComponentTree(({treeNode:r,compo
${JSON.stringify(e,null,2)}
when navigating to "${t.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect")}}function $(e,t){var n=v=w(e);const r=m.value,o=e.state,a=e.force,i=!0===e.replace;e=E(n);if(e)return $(U(_(e),{state:"object"==typeof e?U({},o,e.state):o,force:a,replace:i}),t||n);const s=n;s.redirectedFrom=t;let l;return!a&&ue(d,r,n)&&(l=Y(16,{to:s,from:r}),j(r,r,!0,!1)),(l?Promise.resolve(l):R(s,r)).catch(e=>X(e)?X(e,2)?e:S(e):O(e,s,r)).then(e=>{if(e){if(X(e,2))return ue(d,w(e.to),s)&&t&&30<(t._count=t._count?t._count+1:1)?(W(`Detected a possibly infinite redirection in a navigation guard when going from "${r.fullPath}" to "${s.fullPath}". Aborting to avoid a Stack Overflow.
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):$(U({replace:i},_(e.to),{state:"object"==typeof e.to?U({},o,e.to.state):o,force:a}),t||s)}else e=P(s,r,!0,i,o);return x(s,r,e),e})}function C(e){const t=I.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function R(n,r){let o;const[e,t,a]=function(t,n){const r=[],o=[],a=[],i=Math.max(n.matched.length,t.matched.length);for(let e=0;e<i;e++){const s=n.matched[e],l=(s&&(t.matched.find(e=>K(e,s))?o:r).push(s),t.matched[e]);!l||n.matched.find(e=>K(e,l))||a.push(l)}return[r,o,a]}(n,r);o=ae(e.reverse(),"beforeRouteLeave",n,r);for(const s of e)s.leaveGuards.forEach(e=>{o.push(oe(e,n,r))});const i=function(e,t){return(e=k(e,t))?Promise.reject(e):Promise.resolve()}.bind(null,n,r);return o.push(i),L(o).then(()=>{o=[];for(const e of p.list())o.push(oe(e,n,r));return o.push(i),L(o)}).then(()=>{o=ae(t,"beforeRouteUpdate",n,r);for(const e of t)e.updateGuards.forEach(e=>{o.push(oe(e,n,r))});return o.push(i),L(o)}).then(()=>{o=[];for(const e of a)if(e.beforeEnter)if(B(e.beforeEnter))for(const t of e.beforeEnter)o.push(oe(t,n,r));else o.push(oe(e.beforeEnter,n,r));return o.push(i),L(o)}).then(()=>(n.matched.forEach(e=>e.enterCallbacks={}),(o=ae(a,"beforeRouteEnter",n,r,C)).push(i),L(o))).then(()=>{o=[];for(const e of f.list())o.push(oe(e,n,r));return o.push(i),L(o)}).catch(e=>X(e,8)?e:Promise.reject(e))}function x(t,n,r){e.list().forEach(e=>C(()=>e(t,n,r)))}function P(e,t,n,r,o){var a=k(e,t);if(a)return a;var a=t===J,i=M?history.state:{};n&&(r||a?h.replace(e.fullPath,U({scroll:a&&i&&i.scroll},o)):h.push(e.fullPath,o)),j(m.value=e,t,n,a),S()}let a;function t(){a=a||h.listen((e,t,n)=>{if(T.listening){const o=w(e);var r,e=E(o);if(e)$(U(e,{replace:!0}),o).catch(V);else{v=o;const a=m.value;M&&(e=he(a.fullPath,n.delta),r=H(),z.set(e,r)),R(o,a).catch(e=>X(e,12)?e:X(e,2)?($(e.to,o).then(e=>{X(e,20)&&!n.delta&&n.type===Q.pop&&h.go(-1,!1)}).catch(V),Promise.reject()):(n.delta&&h.go(-n.delta,!1),O(e,o,a))).then(e=>{(e=e||P(o,a,!1))&&(n.delta&&!X(e,8)?h.go(-n.delta,!1):n.type===Q.pop&&X(e,20)&&h.go(-1,!1)),x(o,a,e)}).catch(V)}}})}let r=re(),i=re(),s;function O(t,n,r){S(t);const e=i.list();return e.length?e.forEach(e=>e(t,n,r)):(W("uncaught error during route navigation:"),console.error(t)),Promise.reject(t)}function S(n){return s||(s=!n,t(),r.list().forEach(([e,t])=>n?t(n):e()),r.reset()),n}function j(t,n,e,r){const o=l["scrollBehavior"];if(!M||!o)return Promise.resolve();const a=!e&&(i=he(t.fullPath,0),s=z.get(i),z.delete(i),s)||(r||!e)&&history.state&&history.state.scroll||null;var i,s;N.nextTick().then(()=>o(t,n,a)).then(e=>e&&de(e)).catch(e=>O(e,t,n))}const n=e=>h.go(e);let A;const I=new Set,T={currentRoute:m,listening:!0,addRoute:function(e,t){let n,r;return r=me(e)?(n=c.getRecordMatcher(e),t):e,c.addRoute(r,n)},removeRoute:function(e){var t=c.getRecordMatcher(e);t?c.removeRoute(t):W(`Cannot remove non-existent route "${String(e)}"`)},hasRoute:function(e){return!!c.getRecordMatcher(e)},getRoutes:function(){return c.getRoutes().map(e=>e.record)},resolve:w,options:l,push:o,replace:function(e){return o(U(_(e),{replace:!0}))},go:n,back:()=>n(-1),forward:()=>n(1),beforeEach:p.add,beforeResolve:f.add,afterEach:e.add,onError:i.add,isReady:function(){return s&&m.value!==J?Promise.resolve():new Promise((e,t)=>{r.add([e,t])})},install(e){e.component("RouterLink",Ie),e.component("RouterView",Me),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>N.unref(m)}),M&&!A&&m.value===J&&(A=!0,o(h.location).catch(e=>{W("Unexpected error when starting the router:",e)}));var t={};for(const r in J)Object.defineProperty(t,r,{get:()=>m.value[r],enumerable:!0});e.provide(ee,this),e.provide(te,N.shallowReactive(t)),e.provide(ne,m);const n=e.unmount;I.add(e),e.unmount=function(){I.delete(e),I
"${e}" should be "${e.replace(/#.*$/,"#")}".`),fe(e)},e.createWebHistory=fe,e.isNavigationFailure=X,e.loadRouteLocation=function(e){return e.matched.every(e=>e.redirect)?Promise.reject(new Error("Cannot load a route that redirects.")):Promise.all(e.matched.map(r=>r.components&&Promise.all(Object.keys(r.components).reduce((e,t)=>{const n=r.components[t];return"function"!=typeof n||"displayName"in n||e.push(n().then(e=>{if(!e)return Promise.reject(new Error(`Couldn't resolve component "${t}" at "${r.path}". Ensure you passed a function that returns a promise.`));e=p(e)?e.default:e;r.components[t]=e})),e},[])))).then(()=>e)},e.matchedRouteKey=i,e.onBeforeRouteLeave=function(e){var t;N.getCurrentInstance()?(t=N.inject(i,{}).value)?Ae(t,"leaveGuards",e):W("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?"):W("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function")},e.onBeforeRouteUpdate=function(e){var t;N.getCurrentInstance()?(t=N.inject(i,{}).value)?Ae(t,"updateGuards",e):W("No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?"):W("getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function")},e.parseQuery=je,e.routeLocationKey=te,e.routerKey=ee,e.routerViewLocationKey=ne,e.stringifyQuery=Z,e.useLink=l,e.useRoute=function(){return N.inject(te)},e.useRouter=function(){return N.inject(ee)},e.viewDepthKey=s,e}({},Vue);