@kitbag/router 0.17.6 → 0.18.0
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/kitbag-router.d.ts +3 -1
- package/dist/kitbag-router.js +968 -960
- package/dist/kitbag-router.umd.cjs +3 -3
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(k,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(k=typeof globalThis<"u"?globalThis:k||self,c(k["@kitbag/router"]={},k.Vue))})(this,function(k,c){"use strict";var lo=Object.defineProperty;var ho=(k,c,Z)=>c in k?lo(k,c,{enumerable:!0,configurable:!0,writable:!0,value:Z}):k[c]=Z;var W=(k,c,Z)=>ho(k,typeof c!="symbol"?c+"":c,Z);function Z(e){return typeof e!="string"?!1:/^(https?:\/\/|\/).*/g.test(e)}function xe(e){return Z(e)?e:`/${e}`}class ot extends Error{constructor(t){super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`)}}class at extends Error{constructor(t){super(`Child property on meta for ${t} conflicts with the parent meta.`)}}class ee extends Error{constructor(){super("Router not installed")}}class st extends Error{constructor(t,r){super(`useRoute called with incorrect route. Given ${t}, expected ${r}`)}}const ct=Symbol();function Pe(){const e=c.inject(ct);if(!e)throw new ee;return e}function ie(e){return Array.isArray(e)?e:[e]}function it(e,t){return e.filter(r=>t===r).length}function ue(...e){const t=e.flatMap(r=>Array.isArray(r)?r:Object.keys(r).map(yr));for(const r of t)if(it(t,r)>1)throw new ot(r)}function yr(e){return e.startsWith("?")?e.slice(1):e}class G extends Error{}const z="[",K="]";function gr(e){return e!==String&&e!==Boolean&&e!==Number&&e!==Date}function Rr(e){return typeof e=="function"&&gr(e)}function be(e){return typeof e=="object"&&"get"in e&&typeof e.get=="function"&&"set"in e&&typeof e.set=="function"}function ut(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ft(e,t){return be(e)?{...e,defaultValue:t??e.defaultValue}:{get:r=>te(r,e),set:r=>re(r,e),defaultValue:t}}function wr(e){return be(e)&&e.defaultValue!==void 0}function Er(e,t){return ft(e,t)}function lt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function M(e){return typeof e=="string"&&e.length>0}let P=null;async function Pr(){const{ZodSchema:e,ZodString:t,ZodBoolean:r,ZodDate:n,ZodNumber:o,ZodLiteral:a,ZodObject:s,ZodEnum:f,ZodNativeEnum:l,ZodArray:u,ZodTuple:y,ZodUnion:S,ZodDiscriminatedUnion:N,ZodRecord:g,ZodMap:h,ZodSet:R,ZodIntersection:i,ZodPromise:d,ZodFunction:U}=await import("zod");return{ZodSchema:e,ZodString:t,ZodBoolean:r,ZodDate:n,ZodNumber:o,ZodLiteral:a,ZodObject:s,ZodEnum:f,ZodNativeEnum:l,ZodArray:u,ZodTuple:y,ZodUnion:S,ZodDiscriminatedUnion:N,ZodRecord:g,ZodMap:h,ZodSet:R,ZodIntersection:i,ZodPromise:d,ZodFunction:U}}function br(e){return Object.values(e).some(t=>Object.values(t.host.params).some(r=>Ve(r))||Object.values(t.path.params).some(r=>Ve(r))||Object.values(t.query.params).some(r=>Ve(r)))}function Ve(e){return typeof e=="object"&&"parse"in e&&typeof e.parse=="function"}async function Sr(){try{P=await Pr()}catch{throw new Error("Failed to initialize Zod")}}function dt(e){return P?e instanceof P.ZodSchema:!1}function ht(e){return{get:(t,{invalid:r})=>{try{return je(t,e)}catch{throw r()}},set:(t,{invalid:r})=>{try{return Ze(t,e)}catch{throw r()}}}}const vr=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function fe(e,t){if(typeof t=="string"&&vr.test(t)){const r=new Date(t);return isNaN(r.getTime())?t:r}return t}function le(e){for(const t of e)try{return t()}catch{continue}throw new Error("All functions failed")}function Se(e,t){return P!=null&&P.ZodString&&e instanceof P.ZodString?1:P!=null&&P.ZodString&&t instanceof P.ZodString?-1:0}function je(e,t){if(!P)throw new Error("Zod is not initialized");if(t instanceof P.ZodString)return t.parse(e);if(t instanceof P.ZodBoolean)return t.parse(!!e);if(t instanceof P.ZodDate)return t.parse(new Date(e));if(t instanceof P.ZodNumber)return t.parse(Number(e));if(t instanceof P.ZodLiteral)return le([()=>t.parse(Number(e)),()=>t.parse(!!e),()=>t.parse(e)]);if(t instanceof P.ZodObject)return t.parse(JSON.parse(e,fe));if(t instanceof P.ZodEnum)return t.parse(e);if(t instanceof P.ZodNativeEnum)return le([()=>t.parse(Number(e)),()=>t.parse(e)]);if(t instanceof P.ZodArray||t instanceof P.ZodTuple)return t.parse(JSON.parse(e,fe));if(t instanceof P.ZodUnion){const r=Array.from(t._def.options).sort(Se).map(n=>()=>je(e,n));return le(r)}if(t instanceof P.ZodDiscriminatedUnion){const r=Array.from(t.options).sort(Se).map(n=>()=>je(e,n));return le(r)}if(t instanceof P.ZodRecord)return t.parse(JSON.parse(e,fe));if(t instanceof P.ZodMap)return t.parse(new Map(JSON.parse(e,fe)));if(t instanceof P.ZodSet)return t.parse(new Set(JSON.parse(e,fe)));if(t instanceof P.ZodIntersection)throw new Error("Intersection schemas are not supported");if(t instanceof P.ZodPromise)throw new Error("Promise schemas are not supported");if(t instanceof P.ZodFunction)throw new Error("Function schemas are not supported");return t.parse(e)}function Ze(e,t){if(!P)throw new Error("Zod is not initialized");if(t instanceof P.ZodString)return t.parse(e);if(t instanceof P.ZodBoolean)return t.parse(e).toString();if(t instanceof P.ZodDate)return t.parse(e).toISOString();if(t instanceof P.ZodNumber)return t.parse(Number(e)).toString();if(t instanceof P.ZodLiteral)return t.parse(e).toString();if(t instanceof P.ZodObject)return JSON.stringify(t.parse(e));if(t instanceof P.ZodEnum)return t.parse(e);if(t instanceof P.ZodNativeEnum)return t.parse(e).toString();if(t instanceof P.ZodArray||t instanceof P.ZodTuple)return JSON.stringify(t.parse(e));if(t instanceof P.ZodUnion){const r=Array.from(t._def.options).sort(Se).map(n=>()=>Ze(e,n));return le(r)}if(t instanceof P.ZodDiscriminatedUnion){const r=Array.from(t.options).sort(Se).map(n=>()=>Ze(e,n));return le(r)}if(t instanceof P.ZodRecord)return JSON.stringify(t.parse(e));if(t instanceof P.ZodMap){const r=t.parse(e);return JSON.stringify(Array.from(r.entries()))}if(t instanceof P.ZodSet){const r=t.parse(e);return JSON.stringify(Array.from(r.values()))}if(t instanceof P.ZodIntersection)throw new Error("Intersection schemas are not supported");if(t instanceof P.ZodPromise)throw new Error("Promise schemas are not supported");if(t instanceof P.ZodFunction)throw new Error("Function schemas are not supported");return JSON.stringify(t.parse(e))}function Ar(e,t){return e[t]??String}const j={invalid:e=>{throw new G(e)}},pt={get:e=>e,set:(e,{invalid:t})=>{if(typeof e!="string")throw t();return e}},$e={get:(e,{invalid:t})=>{if(e==="true")return!0;if(e==="false")return!1;throw t()},set:(e,{invalid:t})=>{if(typeof e!="boolean")throw t();return e.toString()}},Oe={get:(e,{invalid:t})=>{const r=Number(e);if(isNaN(r))throw t();return r},set:(e,{invalid:t})=>{if(typeof e!="number")throw t();return e.toString()}},mt={get:(e,{invalid:t})=>{const r=new Date(e);if(isNaN(r.getTime()))throw t();return r},set:(e,{invalid:t})=>{if(typeof e!="object"||!(e instanceof Date))throw t();return e.toISOString()}},yt={get:(e,{invalid:t})=>{try{return JSON.parse(e)}catch{throw t()}},set:(e,{invalid:t})=>{try{return JSON.stringify(e)}catch{throw t()}}};function kr(e,t){switch(typeof t){case"string":return pt.get(e,j)===t;case"number":return Oe.get(e,j)===t;case"boolean":return $e.get(e,j)===t;default:return!1}}function te(e,t,r=!1){if(e===void 0||!M(e)){if(wr(t))return t.defaultValue;if(r)return;throw new G}if(t===String)return pt.get(e,j);if(t===Boolean)return $e.get(e,j);if(t===Number)return Oe.get(e,j);if(t===Date)return mt.get(e,j);if(t===JSON)return yt.get(e,j);if(Rr(t))return t(e,j);if(be(t))return t.get(e,j);if(t instanceof RegExp){if(t.test(e))return e;throw new G}if(ut(t)){if(kr(e,t))return t;throw new G}return dt(t)?ht(t).get(e,j):e}function Ur(e,t,r=!1){try{return te(e,t,r)}catch(n){if(n instanceof G)return;throw n}}function Lr(e,t,r=!1){try{return re(e,t,r)}catch(n){if(n instanceof G)return;throw n}}function re(e,t,r=!1){if(e===void 0){if(r)return"";throw new G}if(t===Boolean)return $e.set(e,j);if(t===Number)return Oe.set(e,j);if(t===Date)return mt.set(e,j);if(t===JSON)return yt.set(e,j);if(be(t))return t.set(e,j);if(ut(t)){if(t!==e)throw new G;return e.toString()}if(dt(t))return ht(t).set(e,j);try{return e.toString()}catch{throw new G}}function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Br(e,t){const r=Array.from(e.matchAll(t));if(r.length===0)return[e];let n=0;const o=r.reduce((s,f)=>{const l=_e(e.slice(n,f.index));l.length&&s.push(l);const[u]=f;return s.push(u),n=f.index+u.length,s},[]),a=e.slice(n);return a&&o.push(a),o}function Cr(e){const t=gt(e.path.value);return new RegExp(`^${t}$`,"i")}function Nr(e){const t=new URLSearchParams(e.query.value);return Array.from(t.entries()).filter(([,r])=>!He(r)).map(([r,n])=>{const o=gt(n);return new RegExp(`${_e(r)}=${o}(&|$)`,"i")})}function gt(e){return Br(e,new RegExp(xr,"g")).map(t=>t.startsWith(z)?Rt(t):_e(t)).join("")}function Rt(e){return[Vr,jr].reduce((t,r)=>r(t),e)}const xr=`\\${z}\\??([\\w-_]+)\\${K}`,qe=`\\${z}\\?([\\w-_]+)\\${K}`,wt=`\\${z}([\\w-_]+)\\${K}`;function Vr(e){return e.replace(new RegExp(qe,"g"),".*")}function He(e){return new RegExp(qe,"g").test(e)}function jr(e){return e.replace(new RegExp(wt,"g"),".+")}function ye(e){const[t]=ve(e,new RegExp(qe,"g")),[r]=ve(e,new RegExp(wt,"g"));return t??r}function ve(e,t){return Array.from(e.matchAll(t)).flatMap(([,...n])=>n.map(o=>M(o)?o:""))}function Zr(e="",t={}){if(!M(e))return{};const r=new RegExp(`\\${z}(\\??[\\w-_]+)\\${K}`,"g");return Array.from(e.matchAll(r)).reduce((o,[a,s])=>{const f=ye(a);if(!f)return o;const l=Ar(t,f);return ue([f],o),o[s]=l,o},{})}function $r(e){return lt(e)&&typeof e.value=="string"}function ne(e){return e===void 0?F():$r(e)?e:F(e,{})}function F(e,t){return{value:e??"",params:Zr(e,t)}}function Et(e,t){ue(e.params,t.params);const r=`${e.value}${t.value}`;return F(r,{...e.params,...t.params})}function Or(e,t){return Et(e,t)}function _r(e,t){return qr(e,t),{...e,...t}}function qr(e,t){const r=Object.keys(e).find(n=>n in t&&typeof t[n]!=typeof e[n]);if(r)throw new at(r)}function Hr(e,t){ue(e.params,t.params);const r=[e.value,t.value].filter(M).join("&");return F(r,{...e.params,...t.params})}function Ir(e,t){return ue(e,t),{...e,...t}}function Pt(e){return"parent"in e&&!!e.parent}function bt(e){return"component"in e&&!!e.component}function St(e){return"props"in e&&typeof e.props=="function"}function vt(e){return"components"in e&&!!e.components}function At(e){return"props"in e&&typeof e.props=="object"}function kt(e,t){return{...t,path:Et(e.path,t.path),query:Hr(e.query,t.query),meta:_r(e.meta,t.meta),state:Ir(e.state,t.state),hash:Or(e.hash,t.hash),matches:[...e.matches,t.matched],host:e.host,depth:e.depth+1}}function Ie(){return typeof window<"u"&&typeof window.document<"u"}function De(e){const t=new URLSearchParams(e);return{get:(...r)=>t.get(...r),getAll:(...r)=>t.getAll(...r),set:(...r)=>{t.set(...r)},append:(...r)=>{t.append(...r)},delete:(...r)=>{t.delete(...r)},toString:(...r)=>t.toString(...r),forEach:(...r)=>{t.forEach(...r)},entries:(...r)=>t.entries(...r),keys:(...r)=>t.keys(...r),values:(...r)=>t.values(...r),has:(...r)=>t.has(...r),size:t.size,sort:()=>{t.sort()},[Symbol.iterator]:()=>t[Symbol.iterator]()}}function Te(){let e=0;return()=>(++e).toString()}const Dr=Te()();function Tr(e){return e===Dr}const Me=Te();function Ut(e){return e===void 0?"":e}function oe(e,t){const r=Me(),n=Ut(e.name),o=ne(e.path),a=ne(e.query),s=ne(e.hash),f=e.meta??{},l=e.state??{},u=c.markRaw({id:r,meta:f,state:l,...e,props:t}),y={id:r,matched:u,matches:[u],name:n,path:o,query:a,hash:s,meta:f,state:l,depth:1,host:F(),prefetch:e.prefetch},S=Pt(e)?kt(e.parent,y):y;return ue(S.path.params,S.query.params,S.hash.params),S}const Ae={template:"<div>This is component</div>"},Fe=oe({name:"parentA",path:"/parentA/[paramA]"}),Lt=oe({parent:Fe,name:"parentA.childA",path:"/childA/[?paramB]"}),Mr=oe({parent:Fe,name:"parentA.childB",path:"/childB/[paramD]",component:Ae}),Fr=oe({parent:Lt,name:"parentA.childA.grandChildA",path:"/[paramC]",component:Ae});oe({name:"parentB",path:"/parentB",component:Ae}),oe({name:"parentC",path:"/",component:Ae});const Jr="lazy",Wr={components:!0,props:!1};function ke(e){return["eager","lazy","intent"].includes(e)}function Bt({routerPrefetch:e,routePrefetch:t,linkPrefetch:r},n){const o=Je(r,n),a=Je(t,n),s=Je(e,n),f=[o,a,s,Wr[n],Jr].reduce((l,u)=>ke(l)?l:l===!0&&ke(u)?u:l===!0&&!ke(u)?l:l===void 0?u:l,void 0);return ke(f)?f:!1}function Je(e,t){return lt(e)?e[t]:e}class Ct extends Error{constructor(){super("Uncaught CallbackContextAbortError");W(this,"response");this.response={status:"ABORT"}}}class de extends Error{constructor(r){super("Uncaught CallbackContextPushError");W(this,"response");this.response={status:"PUSH",to:r}}}class Ue extends Error{constructor(r){super("Uncaught CallbackContextRejectionError");W(this,"response");this.response={status:"REJECT",type:r}}}function Nt(){return{reject:o=>{throw new Ue(o)},push:(...o)=>{throw new de(o)},replace:(o,a,s)=>{if(Z(o)){const u=a??{};throw new de([o,{...u,replace:!0}])}const f=a,l=s??{};throw new de([o,f,{...l,replace:!0}])},abort:()=>{throw new Ct}}}function xt(e){return typeof e=="object"&&e!==null&&"then"in e}function Vt(e){try{const t=e();return xt(t)?t.catch(r=>r):t}catch(t){return t}}const jt=Symbol();function Gr(){const e=c.reactive(new Map),{push:t,replace:r,reject:n}=Nt(),o=(g,h,R)=>h.matches.filter(i=>Bt({...R,routePrefetch:i.prefetch},"props")===g).flatMap(i=>S(i)).reduce((i,{id:d,name:U,props:w})=>{if(!w)return i;const E=y(d,U,h),A=Vt(()=>w(h,{push:t,replace:r,reject:n,parent:l(h,!0)}));return i[E]=A,i},{}),a=g=>{Object.entries(g).forEach(([h,R])=>{e.set(h,R)})},s=async g=>{const h=g.matches.flatMap(S),R=[],i=[];for(const{id:d,name:U,props:w}of h){if(!w)continue;const E=y(d,U,g);if(R.push(E),!e.has(E)){const A=Vt(()=>w(g,{push:t,replace:r,reject:n,parent:l(g)}));e.set(E,A)}i.push((async()=>{const A=await e.get(E);if(A instanceof Error)throw A})())}N(R);try{return await Promise.all(i),{status:"SUCCESS"}}catch(d){if(d instanceof de||d instanceof Ue)return d.response;throw d}},f=(g,h,R)=>{const i=y(g,h,R);return e.get(i)};function l(g,h=!1){const R=g.matches.at(-2);if(R)return St(R)?{name:R.name??"",get props(){return u(R,"default",g,h)}}:At(R)?{name:R.name??"",props:new Proxy({},{get(i,d){return typeof d!="string"?Reflect.get(i,d):u(R,d,g,h)}})}:{name:R.name??"",props:void 0}}function u(g,h,R,i=!1){const d=f(g.id,h,R);if(i&&!d){const U=g.name??"unknown",w=R.name||"unknown";console.warn(`
|
|
2
|
-
Unable to access parent props "${
|
|
1
|
+
(function(k,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(k=typeof globalThis<"u"?globalThis:k||self,i(k["@kitbag/router"]={},k.Vue))})(this,function(k,i){"use strict";var po=Object.defineProperty;var mo=(k,i,Z)=>i in k?po(k,i,{enumerable:!0,configurable:!0,writable:!0,value:Z}):k[i]=Z;var W=(k,i,Z)=>mo(k,typeof i!="symbol"?i+"":i,Z);function Z(e){return typeof e!="string"?!1:/^(https?:\/\/|\/).*/g.test(e)}function Ne(e){return Z(e)?e:`/${e}`}class at extends Error{constructor(t){super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`)}}class st extends Error{constructor(t){super(`Child property on meta for ${t} conflicts with the parent meta.`)}}class ee extends Error{constructor(){super("Router not installed")}}class ct extends Error{constructor(t,r){super(`useRoute called with incorrect route. Given ${t}, expected ${r}`)}}const it=Symbol();function Pe(){const e=i.inject(it);if(!e)throw new ee;return e}function ie(e){return Array.isArray(e)?e:[e]}function ut(e,t){return e.filter(r=>t===r).length}function ue(...e){const t=e.flatMap(r=>Array.isArray(r)?r:Object.keys(r).map(gr));for(const r of t)if(ut(t,r)>1)throw new at(r)}function gr(e){return e.startsWith("?")?e.slice(1):e}class G extends Error{}const z="[",K="]";function Rr(e){return e!==String&&e!==Boolean&&e!==Number&&e!==Date}function wr(e){return typeof e=="function"&&Rr(e)}function be(e){return typeof e=="object"&&"get"in e&&typeof e.get=="function"&&"set"in e&&typeof e.set=="function"}function ft(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function lt(e,t){return be(e)?{...e,defaultValue:t??e.defaultValue}:{get:r=>te(r,e),set:r=>re(r,e),defaultValue:t}}function Er(e){return be(e)&&e.defaultValue!==void 0}function Pr(e,t){return lt(e,t)}function dt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function M(e){return typeof e=="string"&&e.length>0}let P=null;async function br(){const{ZodSchema:e,ZodString:t,ZodBoolean:r,ZodDate:n,ZodNumber:o,ZodLiteral:a,ZodObject:s,ZodEnum:l,ZodNativeEnum:p,ZodArray:d,ZodTuple:h,ZodUnion:v,ZodDiscriminatedUnion:C,ZodRecord:L,ZodMap:R,ZodSet:m,ZodIntersection:c,ZodPromise:f,ZodFunction:S}=await import("zod");return{ZodSchema:e,ZodString:t,ZodBoolean:r,ZodDate:n,ZodNumber:o,ZodLiteral:a,ZodObject:s,ZodEnum:l,ZodNativeEnum:p,ZodArray:d,ZodTuple:h,ZodUnion:v,ZodDiscriminatedUnion:C,ZodRecord:L,ZodMap:R,ZodSet:m,ZodIntersection:c,ZodPromise:f,ZodFunction:S}}function Sr(e){return Object.values(e).some(t=>Object.values(t.host.params).some(r=>Ve(r))||Object.values(t.path.params).some(r=>Ve(r))||Object.values(t.query.params).some(r=>Ve(r)))}function Ve(e){return typeof e=="object"&&"parse"in e&&typeof e.parse=="function"}async function vr(){try{P=await br()}catch{throw new Error("Failed to initialize Zod")}}function ht(e){return P?e instanceof P.ZodSchema:!1}function pt(e){return{get:(t,{invalid:r})=>{try{return je(t,e)}catch{throw r()}},set:(t,{invalid:r})=>{try{return Ze(t,e)}catch{throw r()}}}}const Ar=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function fe(e,t){if(typeof t=="string"&&Ar.test(t)){const r=new Date(t);return isNaN(r.getTime())?t:r}return t}function le(e){for(const t of e)try{return t()}catch{continue}throw new Error("All functions failed")}function Se(e,t){return P!=null&&P.ZodString&&e instanceof P.ZodString?1:P!=null&&P.ZodString&&t instanceof P.ZodString?-1:0}function je(e,t){if(!P)throw new Error("Zod is not initialized");if(t instanceof P.ZodString)return t.parse(e);if(t instanceof P.ZodBoolean)return t.parse(!!e);if(t instanceof P.ZodDate)return t.parse(new Date(e));if(t instanceof P.ZodNumber)return t.parse(Number(e));if(t instanceof P.ZodLiteral)return le([()=>t.parse(Number(e)),()=>t.parse(!!e),()=>t.parse(e)]);if(t instanceof P.ZodObject)return t.parse(JSON.parse(e,fe));if(t instanceof P.ZodEnum)return t.parse(e);if(t instanceof P.ZodNativeEnum)return le([()=>t.parse(Number(e)),()=>t.parse(e)]);if(t instanceof P.ZodArray||t instanceof P.ZodTuple)return t.parse(JSON.parse(e,fe));if(t instanceof P.ZodUnion){const r=Array.from(t._def.options).sort(Se).map(n=>()=>je(e,n));return le(r)}if(t instanceof P.ZodDiscriminatedUnion){const r=Array.from(t.options).sort(Se).map(n=>()=>je(e,n));return le(r)}if(t instanceof P.ZodRecord)return t.parse(JSON.parse(e,fe));if(t instanceof P.ZodMap)return t.parse(new Map(JSON.parse(e,fe)));if(t instanceof P.ZodSet)return t.parse(new Set(JSON.parse(e,fe)));if(t instanceof P.ZodIntersection)throw new Error("Intersection schemas are not supported");if(t instanceof P.ZodPromise)throw new Error("Promise schemas are not supported");if(t instanceof P.ZodFunction)throw new Error("Function schemas are not supported");return t.parse(e)}function Ze(e,t){if(!P)throw new Error("Zod is not initialized");if(t instanceof P.ZodString)return t.parse(e);if(t instanceof P.ZodBoolean)return t.parse(e).toString();if(t instanceof P.ZodDate)return t.parse(e).toISOString();if(t instanceof P.ZodNumber)return t.parse(Number(e)).toString();if(t instanceof P.ZodLiteral)return t.parse(e).toString();if(t instanceof P.ZodObject)return JSON.stringify(t.parse(e));if(t instanceof P.ZodEnum)return t.parse(e);if(t instanceof P.ZodNativeEnum)return t.parse(e).toString();if(t instanceof P.ZodArray||t instanceof P.ZodTuple)return JSON.stringify(t.parse(e));if(t instanceof P.ZodUnion){const r=Array.from(t._def.options).sort(Se).map(n=>()=>Ze(e,n));return le(r)}if(t instanceof P.ZodDiscriminatedUnion){const r=Array.from(t.options).sort(Se).map(n=>()=>Ze(e,n));return le(r)}if(t instanceof P.ZodRecord)return JSON.stringify(t.parse(e));if(t instanceof P.ZodMap){const r=t.parse(e);return JSON.stringify(Array.from(r.entries()))}if(t instanceof P.ZodSet){const r=t.parse(e);return JSON.stringify(Array.from(r.values()))}if(t instanceof P.ZodIntersection)throw new Error("Intersection schemas are not supported");if(t instanceof P.ZodPromise)throw new Error("Promise schemas are not supported");if(t instanceof P.ZodFunction)throw new Error("Function schemas are not supported");return JSON.stringify(t.parse(e))}function kr(e,t){return e[t]??e[`?${t}`]??String}const j={invalid:e=>{throw new G(e)}},mt={get:e=>e,set:(e,{invalid:t})=>{if(typeof e!="string")throw t();return e}},$e={get:(e,{invalid:t})=>{if(e==="true")return!0;if(e==="false")return!1;throw t()},set:(e,{invalid:t})=>{if(typeof e!="boolean")throw t();return e.toString()}},Oe={get:(e,{invalid:t})=>{const r=Number(e);if(isNaN(r))throw t();return r},set:(e,{invalid:t})=>{if(typeof e!="number")throw t();return e.toString()}},yt={get:(e,{invalid:t})=>{const r=new Date(e);if(isNaN(r.getTime()))throw t();return r},set:(e,{invalid:t})=>{if(typeof e!="object"||!(e instanceof Date))throw t();return e.toISOString()}},gt={get:(e,{invalid:t})=>{try{return JSON.parse(e)}catch{throw t()}},set:(e,{invalid:t})=>{try{return JSON.stringify(e)}catch{throw t()}}};function Ur(e,t){switch(typeof t){case"string":return mt.get(e,j)===t;case"number":return Oe.get(e,j)===t;case"boolean":return $e.get(e,j)===t;default:return!1}}function te(e,t,r=!1){if(e===void 0||!M(e)){if(Er(t))return t.defaultValue;if(r)return;throw new G}if(t===String)return mt.get(e,j);if(t===Boolean)return $e.get(e,j);if(t===Number)return Oe.get(e,j);if(t===Date)return yt.get(e,j);if(t===JSON)return gt.get(e,j);if(wr(t))return t(e,j);if(be(t))return t.get(e,j);if(t instanceof RegExp){if(t.test(e))return e;throw new G}if(ft(t)){if(Ur(e,t))return t;throw new G}return ht(t)?pt(t).get(e,j):e}function Lr(e,t,r=!1){try{return te(e,t,r)}catch(n){if(n instanceof G)return;throw n}}function Cr(e,t,r=!1){try{return re(e,t,r)}catch(n){if(n instanceof G)return;throw n}}function re(e,t,r=!1){if(e===void 0){if(r)return"";throw new G}if(t===Boolean)return $e.set(e,j);if(t===Number)return Oe.set(e,j);if(t===Date)return yt.set(e,j);if(t===JSON)return gt.set(e,j);if(be(t))return t.set(e,j);if(ft(t)){if(t!==e)throw new G;return e.toString()}if(ht(t))return pt(t).set(e,j);try{return e.toString()}catch{throw new G}}function _e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Br(e,t){const r=Array.from(e.matchAll(t));if(r.length===0)return[e];let n=0;const o=r.reduce((s,l)=>{const p=_e(e.slice(n,l.index));p.length&&s.push(p);const[d]=l;return s.push(d),n=l.index+d.length,s},[]),a=e.slice(n);return a&&o.push(a),o}function xr(e){const t=Rt(e.path.value);return new RegExp(`^${t}$`,"i")}function Nr(e){const t=new URLSearchParams(e.query.value);return Array.from(t.entries()).filter(([,r])=>!He(r)).map(([r,n])=>{const o=Rt(n);return new RegExp(`${_e(r)}=${o}(&|$)`,"i")})}function Rt(e){return Br(e,new RegExp(Vr,"g")).map(t=>t.startsWith(z)?wt(t):_e(t)).join("")}function wt(e){return[jr,Zr].reduce((t,r)=>r(t),e)}const Vr=`\\${z}\\??([\\w-_]+)\\${K}`,qe=`\\${z}\\?([\\w-_]+)\\${K}`,Et=`\\${z}([\\w-_]+)\\${K}`;function jr(e){return e.replace(new RegExp(qe,"g"),".*")}function He(e){return new RegExp(qe,"g").test(e)}function Zr(e){return e.replace(new RegExp(Et,"g"),".+")}function ye(e){const[t]=ve(e,new RegExp(qe,"g")),[r]=ve(e,new RegExp(Et,"g"));return t??r}function ve(e,t){return Array.from(e.matchAll(t)).flatMap(([,...n])=>n.map(o=>M(o)?o:""))}function $r(e="",t={}){if(!M(e))return{};const r=new RegExp(`\\${z}(\\??[\\w-_]+)\\${K}`,"g");return Array.from(e.matchAll(r)).reduce((o,[a,s])=>{const l=ye(a);if(!l)return o;const p=kr(t,l);return ue([l],o),o[s]=p,o},{})}function Or(e){return dt(e)&&typeof e.value=="string"}function ne(e){return e===void 0?F():Or(e)?e:F(e,{})}function F(e,t){return{value:e??"",params:$r(e,t)}}function Pt(e,t){ue(e.params,t.params);const r=`${e.value}${t.value}`;return F(r,{...e.params,...t.params})}function _r(e,t){return Pt(e,t)}function qr(e,t){return Hr(e,t),{...e,...t}}function Hr(e,t){const r=Object.keys(e).find(n=>n in t&&typeof t[n]!=typeof e[n]);if(r)throw new st(r)}function Ir(e,t){ue(e.params,t.params);const r=[e.value,t.value].filter(M).join("&");return F(r,{...e.params,...t.params})}function Dr(e,t){return ue(e,t),{...e,...t}}function bt(e){return"parent"in e&&!!e.parent}function St(e){return"component"in e&&!!e.component}function vt(e){return"props"in e&&typeof e.props=="function"}function At(e){return"components"in e&&!!e.components}function kt(e){return"props"in e&&typeof e.props=="object"}function Ut(e,t){return{...t,path:Pt(e.path,t.path),query:Ir(e.query,t.query),meta:qr(e.meta,t.meta),state:Dr(e.state,t.state),hash:_r(e.hash,t.hash),matches:[...e.matches,t.matched],host:e.host,depth:e.depth+1}}function Ie(){return typeof window<"u"&&typeof window.document<"u"}function De(e){const t=new URLSearchParams(e);return{get:(...r)=>t.get(...r),getAll:(...r)=>t.getAll(...r),set:(...r)=>{t.set(...r)},append:(...r)=>{t.append(...r)},delete:(...r)=>{t.delete(...r)},toString:(...r)=>t.toString(...r),forEach:(...r)=>{t.forEach(...r)},entries:(...r)=>t.entries(...r),keys:(...r)=>t.keys(...r),values:(...r)=>t.values(...r),has:(...r)=>t.has(...r),size:t.size,sort:()=>{t.sort()},[Symbol.iterator]:()=>t[Symbol.iterator]()}}function Te(){let e=0;return()=>(++e).toString()}const Tr=Te()();function Mr(e){return e===Tr}const Me=Te();function Lt(e){return e===void 0?"":e}function oe(e,t){const r=Me(),n=Lt(e.name),o=ne(e.path),a=ne(e.query),s=ne(e.hash),l=e.meta??{},p=e.state??{},d=i.markRaw({id:r,meta:l,state:p,...e,props:t}),h={id:r,matched:d,matches:[d],name:n,path:o,query:a,hash:s,meta:l,state:p,depth:1,host:F(),prefetch:e.prefetch},v=bt(e)?Ut(e.parent,h):h;return ue(v.path.params,v.query.params,v.hash.params),v}const Ae={template:"<div>This is component</div>"},Fe=oe({name:"parentA",path:"/parentA/[paramA]"}),Ct=oe({parent:Fe,name:"parentA.childA",path:"/childA/[?paramB]"}),Fr=oe({parent:Fe,name:"parentA.childB",path:"/childB/[paramD]",component:Ae}),Jr=oe({parent:Ct,name:"parentA.childA.grandChildA",path:"/[paramC]",component:Ae});oe({name:"parentB",path:"/parentB",component:Ae}),oe({name:"parentC",path:"/",component:Ae});const Wr="lazy",Gr={components:!0,props:!1};function ke(e){return["eager","lazy","intent"].includes(e)}function Bt({routerPrefetch:e,routePrefetch:t,linkPrefetch:r},n){const o=Je(r,n),a=Je(t,n),s=Je(e,n),l=[o,a,s,Gr[n],Wr].reduce((p,d)=>ke(p)?p:p===!0&&ke(d)?d:p===!0&&!ke(d)?p:p===void 0?d:p,void 0);return ke(l)?l:!1}function Je(e,t){return dt(e)?e[t]:e}class xt extends Error{constructor(){super("Uncaught CallbackContextAbortError");W(this,"response");this.response={status:"ABORT"}}}class de extends Error{constructor(r){super("Uncaught CallbackContextPushError");W(this,"response");this.response={status:"PUSH",to:r}}}class Ue extends Error{constructor(r){super("Uncaught CallbackContextRejectionError");W(this,"response");this.response={status:"REJECT",type:r}}}function Nt(){return{reject:o=>{throw new Ue(o)},push:(...o)=>{throw new de(o)},replace:(o,a,s)=>{if(Z(o)){const d=a??{};throw new de([o,{...d,replace:!0}])}const l=a,p=s??{};throw new de([o,l,{...p,replace:!0}])},abort:()=>{throw new xt}}}function Vt(e){return typeof e=="object"&&e!==null&&"then"in e}function We(e,t){return t?t.runWithContext(e):e()}function jt(e,t){try{const r=We(e,t);return Vt(r)?r.catch(n=>n):r}catch(r){return r}}const Zt=Symbol();function zr(){let e=null;const t=i.reactive(new Map),{push:r,replace:n,reject:o}=Nt(),a=(m,c,f)=>c.matches.filter(S=>Bt({...f,routePrefetch:S.prefetch},"props")===m).flatMap(S=>L(S)).reduce((S,{id:y,name:w,props:A})=>{if(!A)return S;const U=C(y,w,c),g=jt(()=>A(c,{push:r,replace:n,reject:o,parent:h(c,!0)}),e);return S[U]=g,S},{}),s=m=>{Object.entries(m).forEach(([c,f])=>{t.set(c,f)})},l=async m=>{const c=m.matches.flatMap(L),f=[],S=[];for(const{id:y,name:w,props:A}of c){if(!A)continue;const U=C(y,w,m);if(f.push(U),!t.has(U)){const g=jt(()=>A(m,{push:r,replace:n,reject:o,parent:h(m)}),e);t.set(U,g)}S.push((async()=>{const g=await t.get(U);if(g instanceof Error)throw g})())}R(f);try{return await Promise.all(S),{status:"SUCCESS"}}catch(y){if(y instanceof de||y instanceof Ue)return y.response;throw y}},p=(m,c,f)=>{const S=C(m,c,f);return t.get(S)},d=m=>{e=m};function h(m,c=!1){const f=m.matches.at(-2);if(f)return vt(f)?{name:f.name??"",get props(){return v(f,"default",m,c)}}:kt(f)?{name:f.name??"",props:new Proxy({},{get(S,y){return typeof y!="string"?Reflect.get(S,y):v(f,y,m,c)}})}:{name:f.name??"",props:void 0}}function v(m,c,f,S=!1){const y=p(m.id,c,f);if(S&&!y){const w=m.name??"unknown",A=f.name||"unknown";console.warn(`
|
|
2
|
+
Unable to access parent props "${c}" from route "${w}" while prefetching props for route "${A}".
|
|
3
3
|
This may occur if the parent route's props were not also prefetched.
|
|
4
|
-
`)}return d}function y(g,h,R){return[g,h,R.id,JSON.stringify(R.params)].join("-")}function S(g){return St(g)?[{id:g.id,name:"default",props:g.props}]:At(g)?Object.entries(g.props).map(([h,R])=>({id:g.id,name:h,props:R})):[]}function N(g){for(const h of e.keys())g.includes(h)||e.delete(h)}return{getPrefetchProps:o,setPrefetchProps:a,getProps:f,setProps:s}}function Zt(){const e=c.inject(jt);if(!e)throw new ee;return e}const zr=c.defineAsyncComponent(()=>new Promise(e=>{e({default:{template:"foo"}})}));function $t(e){return e.name===zr.name&&"__asyncLoader"in e}const Ot=Symbol("visibilityObserver");function Qr(e){const t=c.inject(Ot);if(!t)throw new ee;return c.watch(e,(n,o)=>{n&&t.observe(n),o&&t.unobserve(o)},{immediate:!0}),c.onUnmounted(()=>{e.value&&t.unobserve(e.value)}),{isElementVisible:c.computed(()=>e.value?t.isElementVisible(e.value):!1)}}function _t(e,t,r){c.watch(e,(n,o)=>{n&&n.addEventListener(t,r),o&&o.removeEventListener(t,r)},{immediate:!0}),c.onUnmounted(()=>{e.value&&e.value.removeEventListener(t,r)})}function Kr(e){const t=new Map,r=c.ref(),{getPrefetchProps:n,setPrefetchProps:o}=Zt(),{isElementVisible:a}=Qr(r),s=()=>{const u=Array.from(t.values()).reduce((y,S)=>(Object.assign(y,S),y),{});o(u)};c.watch(()=>c.toValue(e),({route:u,...y})=>{t.clear(),u&&l("eager",u,y)},{immediate:!0}),c.watch(a,u=>{const{route:y,...S}=c.toValue(e);!y||!u||l("lazy",y,S)},{immediate:!0}),_t(r,"focusin",f),_t(r,"mouseover",f);function f(){const{route:u,...y}=c.toValue(e);u&&l("intent",u,y)}function l(u,y,S){Yr(u,y,S),t.has(u)||t.set(u,n(u,y,S))}return{element:r,commit:s}}function Yr(e,t,r){t.matches.forEach(n=>{Bt({...r,routePrefetch:n.prefetch},"components")===e&&(bt(n)&&$t(n.component)&&n.component.__asyncLoader(),vt(n)&&Object.values(n.components).forEach(a=>{$t(a)&&a.__asyncLoader()}))})}const qt=Symbol("isRouterRouteSymbol");function Xr(e){return typeof e=="object"&&e!==null&&qt in e}function en(e,t){function r(i,d,U){if(typeof i=="object"){const E={...e.params,...i};return t(e.name,E,d)}const w={...e.params,[i]:d};return t(e.name,w,U)}const n=(...i)=>{const d=new URLSearchParams(e.query);d.set(...i),r({},{query:d})},o=(...i)=>{const d=new URLSearchParams(e.query);d.append(...i),r({},{query:d})},a=(...i)=>{const d=new URLSearchParams(e.query);d.delete(...i),r({},{query:d})},{id:s,matched:f,matches:l,name:u,hash:y,href:S}=c.toRefs(e),N=c.computed({get(){return new Proxy(e.params,{set(i,d,U){return r(d,U),!0}})},set(i){r(i)}}),g=c.computed({get(){return new Proxy(e.query,{get(i,d,U){switch(d){case"append":return o;case"set":return n;case"delete":return a;default:return Reflect.get(i,d,U)}}})},set(i){r({},{query:i})}}),h=c.computed({get(){return new Proxy(e.state,{set(i,d,U){return r({},{state:{...e.state,[d]:U}}),!0}})},set(i){r({},{state:i})}});return c.reactive({id:s,matched:f,matches:l,state:h,query:g,hash:y,params:N,name:u,href:S,update:r,[qt]:!0})}function We(e,t,{exact:r}={}){return Xr(e)?t===void 0?!0:r?e.matched.name===t:e.matches.map(n=>n.name).includes(t):!1}function Ge(...e){const t=new URLSearchParams;for(const r of e){const n=new URLSearchParams(r);for(const[o,a]of n.entries())t.append(o,a)}return t}function Ht(e,t={},r={}){const n=Pe(),o=c.computed(()=>{const h=c.toValue(e);return typeof h!="string"?h:Z(h)?n.find(h,c.toValue(r)):n.resolve(h,c.toValue(t),c.toValue(r))}),a=c.computed(()=>{if(o.value)return o.value.href;const h=c.toValue(e);if(Z(h))return h;console.error(new Error("Failed to resolve route in RouterLink."))}),s=c.computed(()=>We(n.route)&&n.route.matches.some(h=>{var R;return h.id===((R=o.value)==null?void 0:R.id)})),f=c.computed(()=>{var h;return n.route.id===((h=o.value)==null?void 0:h.id)}),l=c.computed(()=>!!a.value&&n.isExternal(a.value)),u=c.computed(()=>{const h=c.toValue(e);return typeof h!="string"||Z(h)?c.toValue(t):c.toValue(r)}),{element:y,commit:S}=Kr(()=>({route:o.value,routerPrefetch:n.prefetch,linkPrefetch:u.value.prefetch})),N=h=>{S();const R={replace:(h==null?void 0:h.replace)??u.value.replace,query:Ge(u.value.query,h==null?void 0:h.query),hash:(h==null?void 0:h.hash)??u.value.hash,state:{...u.value.state,...h==null?void 0:h.state}},i=c.toValue(e);return Z(i)||typeof i=="object"?n.push(i,R):n.push(i,c.toValue(t),R)};return{element:y,route:o,href:a,isMatch:s,isExactMatch:f,isExternal:l,push:N,replace:h=>N({...h,replace:!0})}}const tn=["href"],It=c.defineComponent({__name:"routerLink",props:{to:{},prefetch:{type:[Boolean,String,Object],default:void 0},query:{},hash:{},replace:{type:Boolean},state:{}},setup(e){const t=e,r=Pe(),n=c.computed(()=>N(t.to)),o=c.computed(()=>g(t.to)),a=c.computed(()=>{const{to:R,...i}=t;return i}),{element:s,isMatch:f,isExactMatch:l,isExternal:u,push:y}=Ht(()=>typeof t.to=="function"?t.to(r.resolve):t.to,a),S=c.computed(()=>({"router-link--match":f.value,"router-link--exact-match":l.value}));function N(R){if(typeof R=="function"){const i=R(r.resolve);return N(i)}return Z(R)?r.find(R):R}function g(R){if(typeof R=="function"){const i=R(r.resolve);return g(i)}return Z(R)?R:R==null?void 0:R.href}function h(R){R.preventDefault(),y()}return(R,i)=>(c.openBlock(),c.createElementBlock("a",{ref_key:"element",ref:s,href:o.value,class:c.normalizeClass(["router-link",S.value]),onClick:h},[c.renderSlot(R.$slots,"default",c.normalizeProps(c.guardReactiveProps({route:n.value,isMatch:c.unref(f),isExactMatch:c.unref(l),isExternal:c.unref(u)})))],10,tn))}}),Dt=Symbol();function rn(){const e=c.inject(Dt);if(!e)throw new ee;return e}function ze(e,t){const r=Pe();function n(){if(!e)return;if(!We(r.route,e,t))throw new st(e,r.route.name)}return c.watch(r.route,n,{immediate:!0,deep:!0}),r.route}const Tt=Symbol();function Qe(){return c.inject(Tt,0)}function nn(e,t,r){return c.defineComponent({name:"PropsWrapper",expose:[],setup(){const n=c.getCurrentInstance(),o=Zt(),a=ze();return()=>{const s=o.getProps(e.id,t,a);return s instanceof Error?"":xt(s)?n!=null&&n.suspense?c.h(an,{component:r,props:s}):c.h(on,{component:r,props:s}):c.h(r,s)}}})}const on=c.defineComponent(e=>{const t=c.ref();return c.watch(()=>e.props,async r=>{t.value=await r},{immediate:!0,deep:!0}),()=>t.value instanceof Error?"":t.value?c.h(e.component,t.value):""},{props:["component","props"]}),an=c.defineComponent(async e=>{const t=c.ref();return t.value=await e.props,c.watch(()=>t.value,async r=>{t.value=await r},{deep:!0}),()=>t.value instanceof Error?"":t.value?c.h(e.component,t.value):""},{props:["component","props"]}),Mt=Symbol();function sn(){const e=new Map;return{getRouteComponents:r=>{const n=e.get(r.id);if(n)return n;const o=cn(r);return e.set(r.id,o),o}}}function cn(e){return vt(e)?Ft(e,e.components):bt(e)?Ft(e,{default:e.component}):{default:Ke}}function Ft(e,t){return Object.fromEntries(Object.entries(t).map(([r,n])=>[r,nn(e,r,n)]))}function un(){const e=c.inject(Mt);if(!e)throw new ee;return e}const Ke=c.defineComponent({__name:"routerView",props:{name:{default:"default"}},setup(e){const t=ze(),r=rn(),n=Qe(),{getRouteComponents:o}=un();c.provide(Tt,n+1);const a=c.computed(()=>{if(r.value)return r.value.component;const s=t.matches.at(n);return s?o(s)[e.name]:null});return(s,f)=>a.value?c.renderSlot(s.$slots,"default",c.normalizeProps(c.mergeProps({key:0},{route:c.unref(t),component:a.value,rejection:c.unref(r)})),()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(a.value)))]):c.createCommentVNode("",!0)}});class ae{constructor(){W(this,"onBeforeRouteEnter",new Set);W(this,"onBeforeRouteUpdate",new Set);W(this,"onBeforeRouteLeave",new Set);W(this,"onAfterRouteEnter",new Set);W(this,"onAfterRouteUpdate",new Set);W(this,"onAfterRouteLeave",new Set)}}const ge=(e,t,r)=>{var a,s;const n=e.matches,o=(t==null?void 0:t.matches)??[];return((a=n.at(r))==null?void 0:a.id)!==((s=o.at(r))==null?void 0:s.id)},Re=(e,t,r)=>{var a,s;const n=e.matches,o=(t==null?void 0:t.matches)??[];return((a=n.at(r))==null?void 0:a.id)!==((s=o.at(r))==null?void 0:s.id)},we=(e,t,r)=>{var n,o;return((n=e.matches.at(r))==null?void 0:n.id)===((o=t==null?void 0:t.matches.at(r))==null?void 0:o.id)};function Jt(e){switch(e){case"onBeforeRouteEnter":case"onAfterRouteEnter":return ge;case"onBeforeRouteUpdate":case"onAfterRouteUpdate":return we;case"onBeforeRouteLeave":case"onAfterRouteLeave":return Re;default:throw new Error(`Switch is not exhaustive for lifecycle: ${e}`)}}function fn(e,t){const r=new ae;return e.matches.forEach((n,o)=>{n.onBeforeRouteEnter&&ge(e,t,o)&&ie(n.onBeforeRouteEnter).forEach(a=>r.onBeforeRouteEnter.add(a)),n.onBeforeRouteUpdate&&we(e,t,o)&&ie(n.onBeforeRouteUpdate).forEach(a=>r.onBeforeRouteUpdate.add(a))}),t==null||t.matches.forEach((n,o)=>{n.onBeforeRouteLeave&&Re(e,t,o)&&ie(n.onBeforeRouteLeave).forEach(a=>r.onBeforeRouteLeave.add(a))}),r}function ln(e,t){const r=new ae;return e.matches.forEach((n,o)=>{n.onAfterRouteEnter&&ge(e,t,o)&&ie(n.onAfterRouteEnter).forEach(a=>r.onAfterRouteEnter.add(a)),n.onAfterRouteUpdate&&we(e,t,o)&&ie(n.onAfterRouteUpdate).forEach(a=>r.onAfterRouteUpdate.add(a))}),t==null||t.matches.forEach((n,o)=>{n.onAfterRouteLeave&&Re(e,t,o)&&ie(n.onAfterRouteLeave).forEach(a=>r.onAfterRouteLeave.add(a))}),r}function dn(e,t,r){const n=new ae;return e.matches.forEach((o,a)=>{ge(e,t,a)&&r.onBeforeRouteEnter.forEach(s=>n.onBeforeRouteEnter.add(s)),we(e,t,a)&&r.onBeforeRouteUpdate.forEach(s=>n.onBeforeRouteUpdate.add(s))}),t==null||t.matches.forEach((o,a)=>{Re(e,t,a)&&r.onBeforeRouteLeave.forEach(s=>n.onBeforeRouteLeave.add(s))}),n}function hn(e,t,r){const n=new ae;return e.matches.forEach((o,a)=>{ge(e,t,a)&&r.onAfterRouteEnter.forEach(s=>n.onAfterRouteEnter.add(s)),we(e,t,a)&&r.onAfterRouteUpdate.forEach(s=>n.onAfterRouteUpdate.add(s))}),t==null||t.matches.forEach((o,a)=>{Re(e,t,a)&&r.onAfterRouteLeave.forEach(s=>n.onAfterRouteLeave.add(s))}),n}const Wt=Symbol();function pn(){const e={global:new ae,component:new ae},{reject:t,push:r,replace:n,abort:o}=Nt(),a=i=>(e.global.onBeforeRouteEnter.add(i),()=>e.global.onBeforeRouteEnter.delete(i)),s=i=>(e.global.onBeforeRouteUpdate.add(i),()=>e.global.onBeforeRouteUpdate.delete(i)),f=i=>(e.global.onBeforeRouteLeave.add(i),()=>e.global.onBeforeRouteLeave.delete(i)),l=i=>(e.global.onAfterRouteEnter.add(i),()=>e.global.onAfterRouteEnter.delete(i)),u=i=>(e.global.onAfterRouteUpdate.add(i),()=>e.global.onAfterRouteUpdate.delete(i)),y=i=>(e.global.onAfterRouteLeave.add(i),()=>e.global.onAfterRouteLeave.delete(i));async function S({to:i,from:d}){const{global:U,component:w}=e,E=fn(i,d),A=dn(i,d,U),B=[...A.onBeforeRouteEnter,...E.onBeforeRouteEnter,...A.onBeforeRouteUpdate,...E.onBeforeRouteUpdate,...w.onBeforeRouteUpdate,...A.onBeforeRouteLeave,...E.onBeforeRouteLeave,...w.onBeforeRouteLeave];try{const m=B.map(p=>p(i,{from:d,reject:t,push:r,replace:n,abort:o}));await Promise.all(m)}catch(m){if(m instanceof de||m instanceof Ue||m instanceof Ct)return m.response;throw m}return{status:"SUCCESS"}}async function N({to:i,from:d}){const{global:U,component:w}=e,E=ln(i,d),A=hn(i,d,U),B=[...w.onAfterRouteLeave,...E.onAfterRouteLeave,...A.onAfterRouteLeave,...w.onAfterRouteUpdate,...E.onAfterRouteUpdate,...A.onAfterRouteUpdate,...w.onAfterRouteEnter,...E.onAfterRouteEnter,...A.onAfterRouteEnter];try{const m=B.map(p=>p(i,{from:d,reject:t,push:r,replace:n}));await Promise.all(m)}catch(m){if(m instanceof de||m instanceof Ue)return m.response;throw m}return{status:"SUCCESS"}}return{runBeforeRouteHooks:S,runAfterRouteHooks:N,addComponentBeforeRouteHook:({lifecycle:i,depth:d,hook:U})=>{const w=Jt(i),E=e.component[i],A=(B,m)=>{if(w(B,m.from,d))return U(B,m)};return E.add(A),()=>E.delete(A)},addComponentAfterRouteHook:({lifecycle:i,depth:d,hook:U})=>{const w=Jt(i),E=e.component[i],A=(B,m)=>{if(w(B,m.from,d))return U(B,m)};return E.add(A),()=>E.delete(A)},addGlobalRouteHooks:i=>{i.onBeforeRouteEnter.forEach(d=>a(d)),i.onBeforeRouteUpdate.forEach(d=>s(d)),i.onBeforeRouteLeave.forEach(d=>f(d)),i.onAfterRouteEnter.forEach(d=>l(d)),i.onAfterRouteUpdate.forEach(d=>u(d)),i.onAfterRouteLeave.forEach(d=>y(d))},onBeforeRouteEnter:a,onBeforeRouteUpdate:s,onBeforeRouteLeave:f,onAfterRouteEnter:l,onAfterRouteUpdate:u,onAfterRouteLeave:y}}function Gt(){const e=c.inject(Wt);if(!e)throw new ee;return e}function zt(e){return t=>{const r=Qe(),o=Gt().addComponentBeforeRouteHook({lifecycle:e,hook:t,depth:r-1});return c.onUnmounted(o),o}}function Qt(e){return t=>{const r=Qe(),o=Gt().addComponentAfterRouteHook({lifecycle:e,hook:t,depth:r-1});return c.onUnmounted(o),o}}const mn=zt("onBeforeRouteLeave"),yn=zt("onBeforeRouteUpdate"),gn=Qt("onAfterRouteLeave"),Rn=Qt("onAfterRouteUpdate");function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(null,arguments)}var O;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(O||(O={}));var he=process.env.NODE_ENV!=="production"?function(e){return Object.freeze(e)}:function(e){return e};function se(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}var Le="beforeunload",wn="hashchange",Kt="popstate";function Yt(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,o=n.history;function a(){var m=n.location,p=m.pathname,b=m.search,L=m.hash,C=o.state||{};return[C.idx,he({pathname:p,search:b,hash:L,state:C.usr||null,key:C.key||"default"})]}var s=null;function f(){if(s)g.call(s),s=null;else{var m=O.Pop,p=a(),b=p[0],L=p[1];if(g.length)if(b!=null){var C=y-b;C&&(s={action:m,location:L,retry:function(){A(C*-1)}},A(C))}else process.env.NODE_ENV!=="production"&&se(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else U(m)}}n.addEventListener(Kt,f);var l=O.Pop,u=a(),y=u[0],S=u[1],N=pe(),g=pe();y==null&&(y=0,o.replaceState(Y({},o.state,{idx:y}),""));function h(m){return typeof m=="string"?m:ce(m)}function R(m,p){return p===void 0&&(p=null),he(Y({pathname:S.pathname,hash:"",search:""},typeof m=="string"?Ee(m):m,{state:p,key:Ce()}))}function i(m,p){return[{usr:m.state,key:m.key,idx:p},h(m)]}function d(m,p,b){return!g.length||(g.call({action:m,location:p,retry:b}),!1)}function U(m){l=m;var p=a();y=p[0],S=p[1],N.call({action:l,location:S})}function w(m,p){var b=O.Push,L=R(m,p);function C(){w(m,p)}if(d(b,L,C)){var V=i(L,y+1),$=V[0],_=V[1];try{o.pushState($,"",_)}catch{n.location.assign(_)}U(b)}}function E(m,p){var b=O.Replace,L=R(m,p);function C(){E(m,p)}if(d(b,L,C)){var V=i(L,y),$=V[0],_=V[1];o.replaceState($,"",_),U(b)}}function A(m){o.go(m)}var B={get action(){return l},get location(){return S},createHref:h,push:w,replace:E,go:A,back:function(){A(-1)},forward:function(){A(1)},listen:function(p){return N.push(p)},block:function(p){var b=g.push(p);return g.length===1&&n.addEventListener(Le,Be),function(){b(),g.length||n.removeEventListener(Le,Be)}}};return B}function En(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,o=n.history;function a(){var p=Ee(n.location.hash.substr(1)),b=p.pathname,L=b===void 0?"/":b,C=p.search,V=C===void 0?"":C,$=p.hash,_=$===void 0?"":$,I=o.state||{};return[I.idx,he({pathname:L,search:V,hash:_,state:I.usr||null,key:I.key||"default"})]}var s=null;function f(){if(s)g.call(s),s=null;else{var p=O.Pop,b=a(),L=b[0],C=b[1];if(g.length)if(L!=null){var V=y-L;V&&(s={action:p,location:C,retry:function(){B(V*-1)}},B(V))}else process.env.NODE_ENV!=="production"&&se(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else w(p)}}n.addEventListener(Kt,f),n.addEventListener(wn,function(){var p=a(),b=p[1];ce(b)!==ce(S)&&f()});var l=O.Pop,u=a(),y=u[0],S=u[1],N=pe(),g=pe();y==null&&(y=0,o.replaceState(Y({},o.state,{idx:y}),""));function h(){var p=document.querySelector("base"),b="";if(p&&p.getAttribute("href")){var L=n.location.href,C=L.indexOf("#");b=C===-1?L:L.slice(0,C)}return b}function R(p){return h()+"#"+(typeof p=="string"?p:ce(p))}function i(p,b){return b===void 0&&(b=null),he(Y({pathname:S.pathname,hash:"",search:""},typeof p=="string"?Ee(p):p,{state:b,key:Ce()}))}function d(p,b){return[{usr:p.state,key:p.key,idx:b},R(p)]}function U(p,b,L){return!g.length||(g.call({action:p,location:b,retry:L}),!1)}function w(p){l=p;var b=a();y=b[0],S=b[1],N.call({action:l,location:S})}function E(p,b){var L=O.Push,C=i(p,b);function V(){E(p,b)}if(process.env.NODE_ENV!=="production"&&se(C.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.push("+JSON.stringify(p)+")"),U(L,C,V)){var $=d(C,y+1),_=$[0],I=$[1];try{o.pushState(_,"",I)}catch{n.location.assign(I)}w(L)}}function A(p,b){var L=O.Replace,C=i(p,b);function V(){A(p,b)}if(process.env.NODE_ENV!=="production"&&se(C.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.replace("+JSON.stringify(p)+")"),U(L,C,V)){var $=d(C,y),_=$[0],I=$[1];o.replaceState(_,"",I),w(L)}}function B(p){o.go(p)}var m={get action(){return l},get location(){return S},createHref:R,push:E,replace:A,go:B,back:function(){B(-1)},forward:function(){B(1)},listen:function(b){return N.push(b)},block:function(b){var L=g.push(b);return g.length===1&&n.addEventListener(Le,Be),function(){L(),g.length||n.removeEventListener(Le,Be)}}};return m}function Xt(e){e===void 0&&(e={});var t=e,r=t.initialEntries,n=r===void 0?["/"]:r,o=t.initialIndex,a=n.map(function(w){var E=he(Y({pathname:"/",search:"",hash:"",state:null,key:Ce()},typeof w=="string"?Ee(w):w));return process.env.NODE_ENV!=="production"&&se(E.pathname.charAt(0)==="/","Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(w)+")"),E}),s=er(o??a.length-1,0,a.length-1),f=O.Pop,l=a[s],u=pe(),y=pe();function S(w){return typeof w=="string"?w:ce(w)}function N(w,E){return E===void 0&&(E=null),he(Y({pathname:l.pathname,search:"",hash:""},typeof w=="string"?Ee(w):w,{state:E,key:Ce()}))}function g(w,E,A){return!y.length||(y.call({action:w,location:E,retry:A}),!1)}function h(w,E){f=w,l=E,u.call({action:f,location:l})}function R(w,E){var A=O.Push,B=N(w,E);function m(){R(w,E)}process.env.NODE_ENV!=="production"&&se(l.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.push("+JSON.stringify(w)+")"),g(A,B,m)&&(s+=1,a.splice(s,a.length,B),h(A,B))}function i(w,E){var A=O.Replace,B=N(w,E);function m(){i(w,E)}process.env.NODE_ENV!=="production"&&se(l.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.replace("+JSON.stringify(w)+")"),g(A,B,m)&&(a[s]=B,h(A,B))}function d(w){var E=er(s+w,0,a.length-1),A=O.Pop,B=a[E];function m(){d(w)}g(A,B,m)&&(s=E,h(A,B))}var U={get index(){return s},get action(){return f},get location(){return l},createHref:S,push:R,replace:i,go:d,back:function(){d(-1)},forward:function(){d(1)},listen:function(E){return u.push(E)},block:function(E){return y.push(E)}};return U}function er(e,t,r){return Math.min(Math.max(e,t),r)}function Be(e){e.preventDefault(),e.returnValue=""}function pe(){var e=[];return{get length(){return e.length},push:function(r){return e.push(r),function(){e=e.filter(function(n){return n!==r})}},call:function(r){e.forEach(function(n){return n&&n(r)})}}}function Ce(){return Math.random().toString(36).substr(2,8)}function ce(e){var t=e.pathname,r=t===void 0?"/":t,n=e.search,o=n===void 0?"":n,a=e.hash,s=a===void 0?"":a;return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),s&&s!=="#"&&(r+=s.charAt(0)==="#"?s:"#"+s),r}function Ee(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}const tr=Symbol();function Pn(e,t){const r=c.reactive({...e}),n=s=>{Object.assign(r,{[tr]:!1,...s})},o=r,a=en(o,t);return{currentRoute:o,routerRoute:a,updateRoute:n}}function q(e){return!e.startsWith("http")?Sn(e):bn(e)}function bn(e){const{protocol:t,host:r,pathname:n,search:o,searchParams:a,hash:s}=new URL(e,e);return{protocol:t,host:r,pathname:n,search:o,searchParams:a,hash:s}}function Sn(e){const{pathname:t,search:r,searchParams:n,hash:o}=new URL(e,"https://localhost");return{pathname:t,search:r,searchParams:n,hash:o}}function vn(e){return t=>{const{host:r}=q(t);return!(r===void 0||r===e)}}function An({mode:e,listener:t}){const r=kn(e),n=(l,u)=>{if(u!=null&&u.replace){r.replace(l,u.state);return}r.push(l,u==null?void 0:u.state)},o=()=>{const l=ce(r.location);r.replace(l)};let a;return{...r,update:n,refresh:o,startListening:()=>{a==null||a(),a=r.listen(t)},stopListening:()=>{a==null||a()}}}function kn(e="auto"){switch(e){case"auto":return Ie()?Yt():Xt();case"browser":return Yt();case"memory":return Xt();case"hash":return En();default:const t=e;throw new Error(`Switch is not exhaustive for mode: ${t}`)}}function Un(e){return c.defineComponent(()=>()=>c.h("h1",e),{name:e,props:[]})}function Ln(e){const t=a=>c.markRaw(e[a]??Un(a)),r=a=>{const s=c.markRaw(t(a)),f={id:Me(),component:s,meta:{},state:{}};return{id:f.id,matched:f,matches:[f],name:a,query:De(""),params:{},state:{},href:"/",hash:"",[tr]:!0}},n=a=>{if(!a){o.value=null;return}const s=t(a);o.value={type:a,component:s}},o=c.ref(null);return{setRejection:n,rejection:o,getRejectionRoute:r}}class Bn extends Error{constructor(){super("initialUrl must be set if window.location is unavailable")}}function Cn(e){if(e)return e;if(Ie())return window.location.toString();throw new Bn}function rr(e){return!!e&&typeof e=="object"}const Ne=!0;function Nn(e,t,r){if(rr(e)&&t in e){const n=e[t];return typeof n=="string"?te(n,r,Ne):n}return te(void 0,r,Ne)}function nr(e,t){const r={};for(const[n,o]of Object.entries(e)){const a=Nn(t,n,o);r[n]=a}return r}function xn(e,t,r){if(rr(e)&&t in e){const n=e[t];return re(n,r,Ne)}return re(void 0,r,Ne)}const or=(e,t)=>{const r={};for(const[n,o]of Object.entries(e)){const a=xn(t,n,o);r[n]=a}return r};function Vn(){const e=c.reactive(new Map),t=Ie()?s():null,r=f=>{e.set(f,!1),t==null||t.observe(f)},n=f=>{e.delete(f),t==null||t.unobserve(f)},o=()=>{t==null||t.disconnect()},a=f=>e.get(f)??!1;function s(){return new IntersectionObserver(f=>{f.forEach(l=>{e.set(l.target,l.isIntersecting)})})}return{observe:r,unobserve:n,disconnect:o,isElementVisible:a}}class jn extends Error{constructor(t){super(`Route not found: "${t}"`)}}function ar(e,t,r){const n=cr(t,r),[o]=ve(e,n);return o}function sr(e,t){if(!t)return e;const{name:r,param:n,value:o}=t,a=cr(e,r);return ve(e,a).reduce((f,l)=>l===void 0?f:f.replace(l,()=>re(o,n,r.startsWith("?"))),e)}function cr(e,t){const r=[Zn,$n,Rt].reduce((n,o)=>o(n,t),e);return new RegExp(r,"g")}function Zn(e,t){if(!t.startsWith("?"))return e;const r=new RegExp(`\\${z}\\${t}\\${K}`,"g");return e.replace(r,"(.*)")}function $n(e,t){if(t.startsWith("?"))return e;const r=new RegExp(`\\${z}${t}\\${K}`,"g");return e.replace(r,"(.+)")}function ir({protocol:e,host:t,pathname:r,search:n,searchParams:o,hash:a}){const s=new URL("https://localhost");e&&(s.protocol=e),t&&(s.host=t),r&&(s.pathname=r),o?s.search=new URLSearchParams(o).toString():n&&(s.search=n),a&&(s.hash=a);const f=s.toString().replace(/^https:\/\/localhost\/*/,"/");return xe(f)}function On(e,t={}){const{params:r={},query:n}=t,o=qn(e.query,r),a=Ge(o,n),s=ur(e.path,r),f=e.hash.value?ur(e.hash,r):t.hash,l=_n(e.host,r),{protocol:u,host:y}=q(l);return ir({protocol:u,host:y,pathname:s,searchParams:a,hash:f})}function _n(e,t){const r=e.value&&!e.value.startsWith("http")?`https://${e.value}`:e.value;return Object.entries(e.params).reduce((n,[o,a])=>{const s=ye(`${z}${o}${K}`);return s?sr(n,{name:o,param:a,value:t[s]}):n},r)}function ur(e,t){return Object.entries(e.params).reduce((r,[n,o])=>{const a=ye(`${z}${n}${K}`);return a?sr(r,{name:n,param:o,value:t[a]}):r},e.value)}function qn(e,t){const r=new URLSearchParams(e.value);if(!e.value)return r;for(const[n,o]of Array.from(r.entries())){const a=ye(o);if(!a)continue;const f=He(o),l=f?`?${a}`:a,u=re(t[a],e.params[l],f),y=t[a]===void 0&&u==="";f&&y?r.delete(n,o):r.set(n,u)}return r}const Hn=(e,t)=>{try{Ye(e,t)}catch{return!1}return!0},Ye=(e,t)=>{const{protocol:r,host:n,pathname:o,search:a,hash:s}=q(t);return{...Xe(e.host,`${r}//${n}`),...Xe(e.path,o),...In(e.query,a),...Xe(e.hash,s)}};function Xe(e,t){const r={},n=decodeURIComponent(t);for(const[o,a]of Object.entries(e.params)){const s=o.startsWith("?"),f=s?o.slice(1):o,l=ar(n,e.value,o),u=te(l,a,s);r[f]=u}return r}function In(e,t){const r={},n=new URLSearchParams(e.value),o=new URLSearchParams(t);for(const[a,s]of Array.from(n.entries())){const f=ye(s);if(!f)continue;const u=He(s),y=u?`?${f}`:f,S=o.get(a)??void 0,N=te(S,e.params[y],u);r[f]=N}return r}function Dn(e,t={},r={}){const n=On(e,{params:t,query:r.query,hash:r.hash}),{search:o,hash:a}=q(n);return{id:e.id,matched:e.matched,matches:e.matches,name:e.name,query:De(o),params:Ye(e,n),state:nr(e.state,r.state),hash:a,href:n}}const Tn=e=>"name"in e.matched&&!!e.matched.name,Mn=(e,t)=>{const{pathname:r}=q(t);return Cr(e).test(r)},Fn=(e,t)=>{const{search:r}=q(t);return Nr(e).every(o=>o.test(r))},et=(e,t)=>{const{hash:r}=q(t),{value:n}=e.hash;return M(n)?`#${n.replace(/^#*/,"")}`.toLowerCase()===r.toLowerCase():!0};function Jn(e){const{searchParams:t,pathname:r}=q(e),n=-1,o=1;return(a,s)=>{const f=lr(a,t),l=fr(a,r),u=lr(s,t),y=fr(s,r);return a.depth>s.depth?n:a.depth<s.depth?o:f+l>u+y?n:f+l<u+y?o:et(a,e)?n:et(s,e)?o:0}}function fr(e,t){const r=Object.keys(e.path.params).filter(o=>o.startsWith("?")).map(o=>o),n=r.filter(o=>ar(t,e.path.value,o)===void 0);return r.length-n.length}function lr(e,t){const r=new URLSearchParams(t),n=new URLSearchParams(e.query.value),o=Array.from(n.keys()),a=o.filter(s=>!r.has(s));return o.length-a.length}const Wn=[Tn,Mn,Fn,et,Hn];function Gn(e,t){const r=Jn(t);return e.filter(n=>Wn.every(o=>o(n,t))).sort(r)}function zn(e,t,r){const n=Gn(e,t);if(!n.length)return;const[o]=n,{searchParams:a,hash:s}=q(t);return{id:o.id,matched:o.matched,matches:o.matches,name:o.name,query:De(a),params:Ye(o,t),state:nr(o.state,r),hash:s,href:xe(t)}}function dr(e,t){const r=typeof e=="string"?q(e):e,n=typeof t=="string"?q(t):t,o=r.searchParams??new URLSearchParams(r.search),a=n.searchParams??new URLSearchParams(n.search);return ir({protocol:M(n.protocol)?n.protocol:r.protocol,host:M(n.host)?n.host:r.host,pathname:M(n.pathname)?n.pathname:r.pathname,searchParams:Ge(a,o),hash:M(n.hash)?n.hash:r.hash})}function Qn(e,t){return M(t)?e.map(r=>{const n=`${t}${r.path.value}`;return{...r,path:F(n,r.path.params)}}):e}class Kn extends Error{constructor(t){super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`)}}function Yn(e){const t=e.map(({name:r})=>r);for(const r of t)if(it(t,r)>1)throw new Kn(r)}function Xn(e,t=[],r){const n=[...e,...t.map(o=>o.routes)].flat();return Yn(n),Qn(n,r)}function eo(e={},t=[]){const r=new ae;return me("onBeforeRouteEnter",e,t).forEach(n=>r.onBeforeRouteEnter.add(n)),me("onBeforeRouteUpdate",e,t).forEach(n=>r.onBeforeRouteUpdate.add(n)),me("onBeforeRouteLeave",e,t).forEach(n=>r.onBeforeRouteLeave.add(n)),me("onAfterRouteEnter",e,t).forEach(n=>r.onAfterRouteEnter.add(n)),me("onAfterRouteUpdate",e,t).forEach(n=>r.onAfterRouteUpdate.add(n)),me("onAfterRouteLeave",e,t).forEach(n=>r.onAfterRouteLeave.add(n)),r}function me(e,t,r){return[t[e],...r.map(o=>o[e])].flat().filter(o=>o!==void 0)}function to(e,t,r=[]){const n=Xn(e,r,t==null?void 0:t.base),o=pn();o.addGlobalRouteHooks(eo(t,r));const a=Te(),s=Gr(),f=sn(),l=Vn(),u=An({mode:t==null?void 0:t.historyMode,listener:({location:v})=>{const x=ce(v);S(x,{state:v.state,replace:!0})}});function y(v,x={}){return zn(n,v,x.state)}async function S(v,x={}){const Q=a();if(u.stopListening(),L(v)){u.update(v,x);return}const D=y(v,x)??U("NotFound"),H=pr(Q),X=await o.runBeforeRouteHooks({to:D,from:H});switch(X.status){case"ABORT":return;case"PUSH":u.update(v,x),await g(...X.to);return;case"REJECT":u.update(v,x),i(X.type);break;case"SUCCESS":u.update(v,x),i(null);break;default:throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(X)}`)}const tt=Q;s.setProps(D).then(T=>{if(tt===Q)switch(T.status){case"SUCCESS":break;case"PUSH":g(...T.to);break;case"REJECT":i(T.type);break;default:const rt=T;throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(rt)}`)}}),B(D);const J=await o.runAfterRouteHooks({to:D,from:H});switch(J.status){case"PUSH":await g(...J.to);break;case"REJECT":i(J.type);break;case"SUCCESS":break;default:const T=J;throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(T)}`)}u.startListening()}const N=(v,x={},Q={})=>{const D=n.find(H=>H.name===v);if(!D)throw new jn(String(v));return Dn(D,x,Q)},g=(v,x,Q)=>{if(Z(v)){const J={...x},T=dr(v,{searchParams:J.query,hash:J.hash});return S(T,J)}if(typeof v=="string"){const{replace:J,...T}={...Q},rt={...x},nt=N(v,rt,T),fo=or({...nt.matched.state},{...nt.state,...T.state});return S(nt.href,{replace:J,state:fo})}const{replace:D,...H}={...x},X=or({...v.matched.state},{...v.state,...H.state}),tt=dr(v.href,{searchParams:H.query,hash:H.hash});return S(tt,{replace:D,state:X})},h=(v,x,Q)=>{if(Z(v)){const H={...x,replace:!0};return g(v,H)}if(typeof v=="string"){const H={...Q,replace:!0},X={...x};return g(v,X,H)}const D={...x,replace:!0};return g(v,D)},R=v=>{i(v)},{setRejection:i,rejection:d,getRejectionRoute:U}=Ln({...r.reduce((v,x)=>({...v,...x.rejections}),{}),...t==null?void 0:t.rejections}),w=U("NotFound"),{currentRoute:E,routerRoute:A,updateRoute:B}=Pn(w,g),m=Cn(t==null?void 0:t.initialUrl),p=u.location.state,{host:b}=q(m),L=vn(b);let C=!1;const{promise:V,resolve:$}=Promise.withResolvers();async function _(){if(C)return V;br(n)&&await Sr(),C=!0,await S(m,{replace:!0,state:p}),u.startListening(),$()}function I(){u.stopListening()}function pr(v){return Tr(v)?null:{...E}}function uo(v){v.component("RouterView",Ke),v.component("RouterLink",It),v.provide(Dt,d),v.provide(Wt,o),v.provide(jt,s),v.provide(Mt,f),v.provide(Ot,l),v.provide(ct,mr),_()}const mr={route:A,resolve:N,find:y,push:g,replace:h,reject:R,refresh:u.refresh,forward:u.forward,back:u.back,go:u.go,install:uo,isExternal:L,onBeforeRouteEnter:o.onBeforeRouteEnter,onBeforeRouteUpdate:o.onBeforeRouteUpdate,onBeforeRouteLeave:o.onBeforeRouteLeave,onAfterRouteEnter:o.onAfterRouteEnter,onAfterRouteUpdate:o.onAfterRouteUpdate,onAfterRouteLeave:o.onAfterRouteLeave,prefetch:t==null?void 0:t.prefetch,start:_,stop:I};return mr}function ro(e){return{routes:e.routes??[],rejections:e.rejections??{},...e}}function hr(...e){return{get:(t,{invalid:r})=>{for(const n of e){const o=Ur(t,n);if(o!==void 0)return o}throw r(`Value ${t} does not satisfy any of the possible values`)},set:(t,{invalid:r})=>{for(const n of e){const o=Lr(t,n);if(o!==void 0)return o}throw r(`Value ${t} does not satisfy any of the possible values`)}}}function no(...e){const t=hr(...e);return{get:(r,n)=>r.split(",").map(o=>t.get(o,n)),set:(r,n)=>{if(!Array.isArray(r))throw n.invalid("Expected an array");return r.map(o=>t.set(o,n)).join(",")}}}function oo(...e){return{get:t=>{const r=t.split(",");return e.map((n,o)=>te(r.at(o),n))},set:(t,{invalid:r})=>{if(!Array.isArray(t))throw r("Expected a tuple");if(t.length!==e.length)throw r(`Expected tuple with ${e.length} values but received ${t.length} values`);return e.map((n,o)=>re(t.at(o),n)).join(",")}}}const ao=F,so=F,co=F;function io(e){const t=Me(),r=Ut(e.name),n=ne(e.path),o=ne(e.query),a=ne(e.hash),s=e.meta??{},f=ne(e.host),l=c.markRaw({id:t,meta:{},state:{},...e}),u={id:t,matched:l,matches:[l],name:r,host:f,path:n,query:o,hash:a,meta:s,depth:1,state:{}},y=Pt(e)?kt(e.parent,u):u;return ue(y.path.params,y.query.params,y.host.params,y.hash.params),y}k.DuplicateParamsError=ot,k.MetaPropertyConflict=at,k.RouterLink=It,k.RouterNotInstalledError=ee,k.RouterView=Ke,k.UseRouteInvalidError=st,k.arrayOf=no,k.asUrl=xe,k.createExternalRoute=io,k.createParam=ft,k.createRoute=oe,k.createRouter=to,k.createRouterPlugin=ro,k.host=so,k.isRoute=We,k.isUrl=Z,k.onAfterRouteLeave=gn,k.onAfterRouteUpdate=Rn,k.onBeforeRouteLeave=mn,k.onBeforeRouteUpdate=yn,k.path=ao,k.query=co,k.tupleOf=oo,k.unionOf=hr,k.useLink=Ht,k.useRoute=ze,k.useRouter=Pe,k.withDefault=Er,k.withParams=F,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|
|
4
|
+
`)}return y}function C(m,c,f){return[m,c,f.id,JSON.stringify(f.params)].join("-")}function L(m){return vt(m)?[{id:m.id,name:"default",props:m.props}]:kt(m)?Object.entries(m.props).map(([c,f])=>({id:m.id,name:c,props:f})):[]}function R(m){for(const c of t.keys())m.includes(c)||t.delete(c)}return{getPrefetchProps:a,setPrefetchProps:s,getProps:p,setProps:l,setVueApp:d}}function $t(){const e=i.inject(Zt);if(!e)throw new ee;return e}const Qr=i.defineAsyncComponent(()=>new Promise(e=>{e({default:{template:"foo"}})}));function Ot(e){return e.name===Qr.name&&"__asyncLoader"in e}const _t=Symbol("visibilityObserver");function Kr(e){const t=i.inject(_t);if(!t)throw new ee;return i.watch(e,(n,o)=>{n&&t.observe(n),o&&t.unobserve(o)},{immediate:!0}),i.onUnmounted(()=>{e.value&&t.unobserve(e.value)}),{isElementVisible:i.computed(()=>e.value?t.isElementVisible(e.value):!1)}}function qt(e,t,r){i.watch(e,(n,o)=>{n&&n.addEventListener(t,r),o&&o.removeEventListener(t,r)},{immediate:!0}),i.onUnmounted(()=>{e.value&&e.value.removeEventListener(t,r)})}function Yr(e){const t=new Map,r=i.ref(),{getPrefetchProps:n,setPrefetchProps:o}=$t(),{isElementVisible:a}=Kr(r),s=()=>{const d=Array.from(t.values()).reduce((h,v)=>(Object.assign(h,v),h),{});o(d)};i.watch(()=>i.toValue(e),({route:d,...h})=>{t.clear(),d&&p("eager",d,h)},{immediate:!0}),i.watch(a,d=>{const{route:h,...v}=i.toValue(e);!h||!d||p("lazy",h,v)},{immediate:!0}),qt(r,"focusin",l),qt(r,"mouseover",l);function l(){const{route:d,...h}=i.toValue(e);d&&p("intent",d,h)}function p(d,h,v){Xr(d,h,v),t.has(d)||t.set(d,n(d,h,v))}return{element:r,commit:s}}function Xr(e,t,r){t.matches.forEach(n=>{Bt({...r,routePrefetch:n.prefetch},"components")===e&&(St(n)&&Ot(n.component)&&n.component.__asyncLoader(),At(n)&&Object.values(n.components).forEach(a=>{Ot(a)&&a.__asyncLoader()}))})}const Ht=Symbol("isRouterRouteSymbol");function en(e){return typeof e=="object"&&e!==null&&Ht in e}function tn(e,t){function r(c,f,S){if(typeof c=="object"){const w={...e.params,...c};return t(e.name,w,f)}const y={...e.params,[c]:f};return t(e.name,y,S)}const n=(...c)=>{const f=new URLSearchParams(e.query);f.set(...c),r({},{query:f})},o=(...c)=>{const f=new URLSearchParams(e.query);f.append(...c),r({},{query:f})},a=(...c)=>{const f=new URLSearchParams(e.query);f.delete(...c),r({},{query:f})},{id:s,matched:l,matches:p,name:d,hash:h,href:v}=i.toRefs(e),C=i.computed({get(){return new Proxy(e.params,{set(c,f,S){return r(f,S),!0}})},set(c){r(c)}}),L=i.computed({get(){return new Proxy(e.query,{get(c,f,S){switch(f){case"append":return o;case"set":return n;case"delete":return a;default:return Reflect.get(c,f,S)}}})},set(c){r({},{query:c})}}),R=i.computed({get(){return new Proxy(e.state,{set(c,f,S){return r({},{state:{...e.state,[f]:S}}),!0}})},set(c){r({},{state:c})}});return i.reactive({id:s,matched:l,matches:p,state:R,query:L,hash:h,params:C,name:d,href:v,update:r,[Ht]:!0})}function Ge(e,t,{exact:r}={}){return en(e)?t===void 0?!0:r?e.matched.name===t:e.matches.map(n=>n.name).includes(t):!1}function ze(...e){const t=new URLSearchParams;for(const r of e){const n=new URLSearchParams(r);for(const[o,a]of n.entries())t.append(o,a)}return t}function It(e,t={},r={}){const n=Pe(),o=i.computed(()=>{const R=i.toValue(e);return typeof R!="string"?R:Z(R)?n.find(R,i.toValue(r)):n.resolve(R,i.toValue(t),i.toValue(r))}),a=i.computed(()=>{if(o.value)return o.value.href;const R=i.toValue(e);if(Z(R))return R;console.error(new Error("Failed to resolve route in RouterLink."))}),s=i.computed(()=>Ge(n.route)&&n.route.matches.some(R=>{var m;return R.id===((m=o.value)==null?void 0:m.id)})),l=i.computed(()=>{var R;return n.route.id===((R=o.value)==null?void 0:R.id)}),p=i.computed(()=>!!a.value&&n.isExternal(a.value)),d=i.computed(()=>{const R=i.toValue(e);return typeof R!="string"||Z(R)?i.toValue(t):i.toValue(r)}),{element:h,commit:v}=Yr(()=>({route:o.value,routerPrefetch:n.prefetch,linkPrefetch:d.value.prefetch})),C=R=>{v();const m={replace:(R==null?void 0:R.replace)??d.value.replace,query:ze(d.value.query,R==null?void 0:R.query),hash:(R==null?void 0:R.hash)??d.value.hash,state:{...d.value.state,...R==null?void 0:R.state}},c=i.toValue(e);return Z(c)||typeof c=="object"?n.push(c,m):n.push(c,i.toValue(t),m)};return{element:h,route:o,href:a,isMatch:s,isExactMatch:l,isExternal:p,push:C,replace:R=>C({...R,replace:!0})}}const rn=["href"],Dt=i.defineComponent({__name:"routerLink",props:{to:{},prefetch:{type:[Boolean,String,Object],default:void 0},query:{},hash:{},replace:{type:Boolean},state:{}},setup(e){const t=e,r=Pe(),n=i.computed(()=>C(t.to)),o=i.computed(()=>L(t.to)),a=i.computed(()=>{const{to:m,...c}=t;return c}),{element:s,isMatch:l,isExactMatch:p,isExternal:d,push:h}=It(()=>typeof t.to=="function"?t.to(r.resolve):t.to,a),v=i.computed(()=>({"router-link--match":l.value,"router-link--exact-match":p.value}));function C(m){if(typeof m=="function"){const c=m(r.resolve);return C(c)}return Z(m)?r.find(m):m}function L(m){if(typeof m=="function"){const c=m(r.resolve);return L(c)}return Z(m)?m:m==null?void 0:m.href}function R(m){m.preventDefault(),h()}return(m,c)=>(i.openBlock(),i.createElementBlock("a",{ref_key:"element",ref:s,href:o.value,class:i.normalizeClass(["router-link",v.value]),onClick:R},[i.renderSlot(m.$slots,"default",i.normalizeProps(i.guardReactiveProps({route:n.value,isMatch:i.unref(l),isExactMatch:i.unref(p),isExternal:i.unref(d)})))],10,rn))}}),Tt=Symbol();function nn(){const e=i.inject(Tt);if(!e)throw new ee;return e}function Qe(e,t){const r=Pe();function n(){if(!e)return;if(!Ge(r.route,e,t))throw new ct(e,r.route.name)}return i.watch(r.route,n,{immediate:!0,deep:!0}),r.route}const Mt=Symbol();function Ke(){return i.inject(Mt,0)}function on(e,t,r){return i.defineComponent({name:"PropsWrapper",expose:[],setup(){const n=i.getCurrentInstance(),o=$t(),a=Qe();return()=>{const s=o.getProps(e.id,t,a);return s instanceof Error?"":Vt(s)?n!=null&&n.suspense?i.h(sn,{component:r,props:s}):i.h(an,{component:r,props:s}):i.h(r,s)}}})}const an=i.defineComponent(e=>{const t=i.ref();return i.watch(()=>e.props,async r=>{t.value=await r},{immediate:!0,deep:!0}),()=>t.value instanceof Error?"":t.value?i.h(e.component,t.value):""},{props:["component","props"]}),sn=i.defineComponent(async e=>{const t=i.ref();return t.value=await e.props,i.watch(()=>t.value,async r=>{t.value=await r},{deep:!0}),()=>t.value instanceof Error?"":t.value?i.h(e.component,t.value):""},{props:["component","props"]}),Ft=Symbol();function cn(){const e=new Map;return{getRouteComponents:r=>{const n=e.get(r.id);if(n)return n;const o=un(r);return e.set(r.id,o),o}}}function un(e){return At(e)?Jt(e,e.components):St(e)?Jt(e,{default:e.component}):{default:Ye}}function Jt(e,t){return Object.fromEntries(Object.entries(t).map(([r,n])=>[r,on(e,r,n)]))}function fn(){const e=i.inject(Ft);if(!e)throw new ee;return e}const Ye=i.defineComponent({__name:"routerView",props:{name:{default:"default"}},setup(e){const t=Qe(),r=nn(),n=Ke(),{getRouteComponents:o}=fn();i.provide(Mt,n+1);const a=i.computed(()=>{if(r.value)return r.value.component;const s=t.matches.at(n);return s?o(s)[e.name]:null});return(s,l)=>a.value?i.renderSlot(s.$slots,"default",i.normalizeProps(i.mergeProps({key:0},{route:i.unref(t),component:a.value,rejection:i.unref(r)})),()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.value)))]):i.createCommentVNode("",!0)}});class ae{constructor(){W(this,"onBeforeRouteEnter",new Set);W(this,"onBeforeRouteUpdate",new Set);W(this,"onBeforeRouteLeave",new Set);W(this,"onAfterRouteEnter",new Set);W(this,"onAfterRouteUpdate",new Set);W(this,"onAfterRouteLeave",new Set)}}const ge=(e,t,r)=>{var a,s;const n=e.matches,o=(t==null?void 0:t.matches)??[];return((a=n.at(r))==null?void 0:a.id)!==((s=o.at(r))==null?void 0:s.id)},Re=(e,t,r)=>{var a,s;const n=e.matches,o=(t==null?void 0:t.matches)??[];return((a=n.at(r))==null?void 0:a.id)!==((s=o.at(r))==null?void 0:s.id)},we=(e,t,r)=>{var n,o;return((n=e.matches.at(r))==null?void 0:n.id)===((o=t==null?void 0:t.matches.at(r))==null?void 0:o.id)};function Wt(e){switch(e){case"onBeforeRouteEnter":case"onAfterRouteEnter":return ge;case"onBeforeRouteUpdate":case"onAfterRouteUpdate":return we;case"onBeforeRouteLeave":case"onAfterRouteLeave":return Re;default:throw new Error(`Switch is not exhaustive for lifecycle: ${e}`)}}function ln(e,t){const r=new ae;return e.matches.forEach((n,o)=>{n.onBeforeRouteEnter&&ge(e,t,o)&&ie(n.onBeforeRouteEnter).forEach(a=>r.onBeforeRouteEnter.add(a)),n.onBeforeRouteUpdate&&we(e,t,o)&&ie(n.onBeforeRouteUpdate).forEach(a=>r.onBeforeRouteUpdate.add(a))}),t==null||t.matches.forEach((n,o)=>{n.onBeforeRouteLeave&&Re(e,t,o)&&ie(n.onBeforeRouteLeave).forEach(a=>r.onBeforeRouteLeave.add(a))}),r}function dn(e,t){const r=new ae;return e.matches.forEach((n,o)=>{n.onAfterRouteEnter&&ge(e,t,o)&&ie(n.onAfterRouteEnter).forEach(a=>r.onAfterRouteEnter.add(a)),n.onAfterRouteUpdate&&we(e,t,o)&&ie(n.onAfterRouteUpdate).forEach(a=>r.onAfterRouteUpdate.add(a))}),t==null||t.matches.forEach((n,o)=>{n.onAfterRouteLeave&&Re(e,t,o)&&ie(n.onAfterRouteLeave).forEach(a=>r.onAfterRouteLeave.add(a))}),r}function hn(e,t,r){const n=new ae;return e.matches.forEach((o,a)=>{ge(e,t,a)&&r.onBeforeRouteEnter.forEach(s=>n.onBeforeRouteEnter.add(s)),we(e,t,a)&&r.onBeforeRouteUpdate.forEach(s=>n.onBeforeRouteUpdate.add(s))}),t==null||t.matches.forEach((o,a)=>{Re(e,t,a)&&r.onBeforeRouteLeave.forEach(s=>n.onBeforeRouteLeave.add(s))}),n}function pn(e,t,r){const n=new ae;return e.matches.forEach((o,a)=>{ge(e,t,a)&&r.onAfterRouteEnter.forEach(s=>n.onAfterRouteEnter.add(s)),we(e,t,a)&&r.onAfterRouteUpdate.forEach(s=>n.onAfterRouteUpdate.add(s))}),t==null||t.matches.forEach((o,a)=>{Re(e,t,a)&&r.onAfterRouteLeave.forEach(s=>n.onAfterRouteLeave.add(s))}),n}const Gt=Symbol();function mn(){const e={global:new ae,component:new ae},{reject:t,push:r,replace:n,abort:o}=Nt(),a=c=>(e.global.onBeforeRouteEnter.add(c),()=>e.global.onBeforeRouteEnter.delete(c)),s=c=>(e.global.onBeforeRouteUpdate.add(c),()=>e.global.onBeforeRouteUpdate.delete(c)),l=c=>(e.global.onBeforeRouteLeave.add(c),()=>e.global.onBeforeRouteLeave.delete(c)),p=c=>(e.global.onAfterRouteEnter.add(c),()=>e.global.onAfterRouteEnter.delete(c)),d=c=>(e.global.onAfterRouteUpdate.add(c),()=>e.global.onAfterRouteUpdate.delete(c)),h=c=>(e.global.onAfterRouteLeave.add(c),()=>e.global.onAfterRouteLeave.delete(c));async function v({to:c,from:f,app:S}){const{global:y,component:w}=e,A=ln(c,f),U=hn(c,f,y),g=[...U.onBeforeRouteEnter,...A.onBeforeRouteEnter,...U.onBeforeRouteUpdate,...A.onBeforeRouteUpdate,...w.onBeforeRouteUpdate,...U.onBeforeRouteLeave,...A.onBeforeRouteLeave,...w.onBeforeRouteLeave];try{const u=g.map(E=>We(()=>E(c,{from:f,reject:t,push:r,replace:n,abort:o}),S));await Promise.all(u)}catch(u){if(u instanceof de||u instanceof Ue||u instanceof xt)return u.response;throw u}return{status:"SUCCESS"}}async function C({to:c,from:f,app:S}){const{global:y,component:w}=e,A=dn(c,f),U=pn(c,f,y),g=[...w.onAfterRouteLeave,...A.onAfterRouteLeave,...U.onAfterRouteLeave,...w.onAfterRouteUpdate,...A.onAfterRouteUpdate,...U.onAfterRouteUpdate,...w.onAfterRouteEnter,...A.onAfterRouteEnter,...U.onAfterRouteEnter];try{const u=g.map(E=>We(()=>E(c,{from:f,reject:t,push:r,replace:n}),S));await Promise.all(u)}catch(u){if(u instanceof de||u instanceof Ue)return u.response;throw u}return{status:"SUCCESS"}}return{runBeforeRouteHooks:v,runAfterRouteHooks:C,addComponentBeforeRouteHook:({lifecycle:c,depth:f,hook:S})=>{const y=Wt(c),w=e.component[c],A=(U,g)=>{if(y(U,g.from,f))return S(U,g)};return w.add(A),()=>w.delete(A)},addComponentAfterRouteHook:({lifecycle:c,depth:f,hook:S})=>{const y=Wt(c),w=e.component[c],A=(U,g)=>{if(y(U,g.from,f))return S(U,g)};return w.add(A),()=>w.delete(A)},addGlobalRouteHooks:c=>{c.onBeforeRouteEnter.forEach(f=>a(f)),c.onBeforeRouteUpdate.forEach(f=>s(f)),c.onBeforeRouteLeave.forEach(f=>l(f)),c.onAfterRouteEnter.forEach(f=>p(f)),c.onAfterRouteUpdate.forEach(f=>d(f)),c.onAfterRouteLeave.forEach(f=>h(f))},onBeforeRouteEnter:a,onBeforeRouteUpdate:s,onBeforeRouteLeave:l,onAfterRouteEnter:p,onAfterRouteUpdate:d,onAfterRouteLeave:h}}function zt(){const e=i.inject(Gt);if(!e)throw new ee;return e}function Qt(e){return t=>{const r=Ke(),o=zt().addComponentBeforeRouteHook({lifecycle:e,hook:t,depth:r-1});return i.onUnmounted(o),o}}function Kt(e){return t=>{const r=Ke(),o=zt().addComponentAfterRouteHook({lifecycle:e,hook:t,depth:r-1});return i.onUnmounted(o),o}}const yn=Qt("onBeforeRouteLeave"),gn=Qt("onBeforeRouteUpdate"),Rn=Kt("onAfterRouteLeave"),wn=Kt("onAfterRouteUpdate");function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(null,arguments)}var O;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(O||(O={}));var he=process.env.NODE_ENV!=="production"?function(e){return Object.freeze(e)}:function(e){return e};function se(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}var Le="beforeunload",En="hashchange",Yt="popstate";function Xt(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,o=n.history;function a(){var g=n.location,u=g.pathname,E=g.search,B=g.hash,x=o.state||{};return[x.idx,he({pathname:u,search:E,hash:B,state:x.usr||null,key:x.key||"default"})]}var s=null;function l(){if(s)L.call(s),s=null;else{var g=O.Pop,u=a(),E=u[0],B=u[1];if(L.length)if(E!=null){var x=h-E;x&&(s={action:g,location:B,retry:function(){A(x*-1)}},A(x))}else process.env.NODE_ENV!=="production"&&se(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else S(g)}}n.addEventListener(Yt,l);var p=O.Pop,d=a(),h=d[0],v=d[1],C=pe(),L=pe();h==null&&(h=0,o.replaceState(Y({},o.state,{idx:h}),""));function R(g){return typeof g=="string"?g:ce(g)}function m(g,u){return u===void 0&&(u=null),he(Y({pathname:v.pathname,hash:"",search:""},typeof g=="string"?Ee(g):g,{state:u,key:Be()}))}function c(g,u){return[{usr:g.state,key:g.key,idx:u},R(g)]}function f(g,u,E){return!L.length||(L.call({action:g,location:u,retry:E}),!1)}function S(g){p=g;var u=a();h=u[0],v=u[1],C.call({action:p,location:v})}function y(g,u){var E=O.Push,B=m(g,u);function x(){y(g,u)}if(f(E,B,x)){var V=c(B,h+1),$=V[0],q=V[1];try{o.pushState($,"",q)}catch{n.location.assign(q)}S(E)}}function w(g,u){var E=O.Replace,B=m(g,u);function x(){w(g,u)}if(f(E,B,x)){var V=c(B,h),$=V[0],q=V[1];o.replaceState($,"",q),S(E)}}function A(g){o.go(g)}var U={get action(){return p},get location(){return v},createHref:R,push:y,replace:w,go:A,back:function(){A(-1)},forward:function(){A(1)},listen:function(u){return C.push(u)},block:function(u){var E=L.push(u);return L.length===1&&n.addEventListener(Le,Ce),function(){E(),L.length||n.removeEventListener(Le,Ce)}}};return U}function Pn(e){e===void 0&&(e={});var t=e,r=t.window,n=r===void 0?document.defaultView:r,o=n.history;function a(){var u=Ee(n.location.hash.substr(1)),E=u.pathname,B=E===void 0?"/":E,x=u.search,V=x===void 0?"":x,$=u.hash,q=$===void 0?"":$,H=o.state||{};return[H.idx,he({pathname:B,search:V,hash:q,state:H.usr||null,key:H.key||"default"})]}var s=null;function l(){if(s)L.call(s),s=null;else{var u=O.Pop,E=a(),B=E[0],x=E[1];if(L.length)if(B!=null){var V=h-B;V&&(s={action:u,location:x,retry:function(){U(V*-1)}},U(V))}else process.env.NODE_ENV!=="production"&&se(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else y(u)}}n.addEventListener(Yt,l),n.addEventListener(En,function(){var u=a(),E=u[1];ce(E)!==ce(v)&&l()});var p=O.Pop,d=a(),h=d[0],v=d[1],C=pe(),L=pe();h==null&&(h=0,o.replaceState(Y({},o.state,{idx:h}),""));function R(){var u=document.querySelector("base"),E="";if(u&&u.getAttribute("href")){var B=n.location.href,x=B.indexOf("#");E=x===-1?B:B.slice(0,x)}return E}function m(u){return R()+"#"+(typeof u=="string"?u:ce(u))}function c(u,E){return E===void 0&&(E=null),he(Y({pathname:v.pathname,hash:"",search:""},typeof u=="string"?Ee(u):u,{state:E,key:Be()}))}function f(u,E){return[{usr:u.state,key:u.key,idx:E},m(u)]}function S(u,E,B){return!L.length||(L.call({action:u,location:E,retry:B}),!1)}function y(u){p=u;var E=a();h=E[0],v=E[1],C.call({action:p,location:v})}function w(u,E){var B=O.Push,x=c(u,E);function V(){w(u,E)}if(process.env.NODE_ENV!=="production"&&se(x.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.push("+JSON.stringify(u)+")"),S(B,x,V)){var $=f(x,h+1),q=$[0],H=$[1];try{o.pushState(q,"",H)}catch{n.location.assign(H)}y(B)}}function A(u,E){var B=O.Replace,x=c(u,E);function V(){A(u,E)}if(process.env.NODE_ENV!=="production"&&se(x.pathname.charAt(0)==="/","Relative pathnames are not supported in hash history.replace("+JSON.stringify(u)+")"),S(B,x,V)){var $=f(x,h),q=$[0],H=$[1];o.replaceState(q,"",H),y(B)}}function U(u){o.go(u)}var g={get action(){return p},get location(){return v},createHref:m,push:w,replace:A,go:U,back:function(){U(-1)},forward:function(){U(1)},listen:function(E){return C.push(E)},block:function(E){var B=L.push(E);return L.length===1&&n.addEventListener(Le,Ce),function(){B(),L.length||n.removeEventListener(Le,Ce)}}};return g}function er(e){e===void 0&&(e={});var t=e,r=t.initialEntries,n=r===void 0?["/"]:r,o=t.initialIndex,a=n.map(function(y){var w=he(Y({pathname:"/",search:"",hash:"",state:null,key:Be()},typeof y=="string"?Ee(y):y));return process.env.NODE_ENV!=="production"&&se(w.pathname.charAt(0)==="/","Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: "+JSON.stringify(y)+")"),w}),s=tr(o??a.length-1,0,a.length-1),l=O.Pop,p=a[s],d=pe(),h=pe();function v(y){return typeof y=="string"?y:ce(y)}function C(y,w){return w===void 0&&(w=null),he(Y({pathname:p.pathname,search:"",hash:""},typeof y=="string"?Ee(y):y,{state:w,key:Be()}))}function L(y,w,A){return!h.length||(h.call({action:y,location:w,retry:A}),!1)}function R(y,w){l=y,p=w,d.call({action:l,location:p})}function m(y,w){var A=O.Push,U=C(y,w);function g(){m(y,w)}process.env.NODE_ENV!=="production"&&se(p.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.push("+JSON.stringify(y)+")"),L(A,U,g)&&(s+=1,a.splice(s,a.length,U),R(A,U))}function c(y,w){var A=O.Replace,U=C(y,w);function g(){c(y,w)}process.env.NODE_ENV!=="production"&&se(p.pathname.charAt(0)==="/","Relative pathnames are not supported in memory history.replace("+JSON.stringify(y)+")"),L(A,U,g)&&(a[s]=U,R(A,U))}function f(y){var w=tr(s+y,0,a.length-1),A=O.Pop,U=a[w];function g(){f(y)}L(A,U,g)&&(s=w,R(A,U))}var S={get index(){return s},get action(){return l},get location(){return p},createHref:v,push:m,replace:c,go:f,back:function(){f(-1)},forward:function(){f(1)},listen:function(w){return d.push(w)},block:function(w){return h.push(w)}};return S}function tr(e,t,r){return Math.min(Math.max(e,t),r)}function Ce(e){e.preventDefault(),e.returnValue=""}function pe(){var e=[];return{get length(){return e.length},push:function(r){return e.push(r),function(){e=e.filter(function(n){return n!==r})}},call:function(r){e.forEach(function(n){return n&&n(r)})}}}function Be(){return Math.random().toString(36).substr(2,8)}function ce(e){var t=e.pathname,r=t===void 0?"/":t,n=e.search,o=n===void 0?"":n,a=e.hash,s=a===void 0?"":a;return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),s&&s!=="#"&&(r+=s.charAt(0)==="#"?s:"#"+s),r}function Ee(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}const rr=Symbol();function bn(e,t){const r=i.reactive({...e}),n=s=>{Object.assign(r,{[rr]:!1,...s})},o=r,a=tn(o,t);return{currentRoute:o,routerRoute:a,updateRoute:n}}function _(e){return!e.startsWith("http")?vn(e):Sn(e)}function Sn(e){const{protocol:t,host:r,pathname:n,search:o,searchParams:a,hash:s}=new URL(e,e);return{protocol:t,host:r,pathname:n,search:o,searchParams:a,hash:s}}function vn(e){const{pathname:t,search:r,searchParams:n,hash:o}=new URL(e,"https://localhost");return{pathname:t,search:r,searchParams:n,hash:o}}function An(e){return t=>{const{host:r}=_(t);return!(r===void 0||r===e)}}function kn({mode:e,listener:t}){const r=Un(e),n=(p,d)=>{if(d!=null&&d.replace){r.replace(p,d.state);return}r.push(p,d==null?void 0:d.state)},o=()=>{const p=ce(r.location);r.replace(p)};let a;return{...r,update:n,refresh:o,startListening:()=>{a==null||a(),a=r.listen(t)},stopListening:()=>{a==null||a()}}}function Un(e="auto"){switch(e){case"auto":return Ie()?Xt():er();case"browser":return Xt();case"memory":return er();case"hash":return Pn();default:const t=e;throw new Error(`Switch is not exhaustive for mode: ${t}`)}}function Ln(e){return i.defineComponent(()=>()=>i.h("h1",e),{name:e,props:[]})}function Cn(e){const t=a=>i.markRaw(e[a]??Ln(a)),r=a=>{const s=i.markRaw(t(a)),l={id:Me(),component:s,meta:{},state:{}};return{id:l.id,matched:l,matches:[l],name:a,query:De(""),params:{},state:{},href:"/",hash:"",[rr]:!0}},n=a=>{if(!a){o.value=null;return}const s=t(a);o.value={type:a,component:s}},o=i.ref(null);return{setRejection:n,rejection:o,getRejectionRoute:r}}class Bn extends Error{constructor(){super("initialUrl must be set if window.location is unavailable")}}function xn(e){if(e)return e;if(Ie())return window.location.toString();throw new Bn}function nr(e){return!!e&&typeof e=="object"}const xe=!0;function Nn(e,t,r){if(nr(e)&&t in e){const n=e[t];return typeof n=="string"?te(n,r,xe):n}return te(void 0,r,xe)}function or(e,t){const r={};for(const[n,o]of Object.entries(e)){const a=Nn(t,n,o);r[n]=a}return r}function Vn(e,t,r){if(nr(e)&&t in e){const n=e[t];return re(n,r,xe)}return re(void 0,r,xe)}const ar=(e,t)=>{const r={};for(const[n,o]of Object.entries(e)){const a=Vn(t,n,o);r[n]=a}return r};function jn(){const e=i.reactive(new Map),t=Ie()?s():null,r=l=>{e.set(l,!1),t==null||t.observe(l)},n=l=>{e.delete(l),t==null||t.unobserve(l)},o=()=>{t==null||t.disconnect()},a=l=>e.get(l)??!1;function s(){return new IntersectionObserver(l=>{l.forEach(p=>{e.set(p.target,p.isIntersecting)})})}return{observe:r,unobserve:n,disconnect:o,isElementVisible:a}}class Zn extends Error{constructor(t){super(`Route not found: "${t}"`)}}function sr(e,t,r){const n=ir(t,r),[o]=ve(e,n);return o}function cr(e,t){if(!t)return e;const{name:r,param:n,value:o}=t,a=ir(e,r);return ve(e,a).reduce((l,p)=>p===void 0?l:l.replace(p,()=>re(o,n,r.startsWith("?"))),e)}function ir(e,t){const r=[$n,On,wt].reduce((n,o)=>o(n,t),e);return new RegExp(r,"g")}function $n(e,t){if(!t.startsWith("?"))return e;const r=new RegExp(`\\${z}\\${t}\\${K}`,"g");return e.replace(r,"(.*)")}function On(e,t){if(t.startsWith("?"))return e;const r=new RegExp(`\\${z}${t}\\${K}`,"g");return e.replace(r,"(.+)")}function ur({protocol:e,host:t,pathname:r,search:n,searchParams:o,hash:a}){const s=new URL("https://localhost");e&&(s.protocol=e),t&&(s.host=t),r&&(s.pathname=r),o?s.search=new URLSearchParams(o).toString():n&&(s.search=n),a&&(s.hash=a);const l=s.toString().replace(/^https:\/\/localhost\/*/,"/");return Ne(l)}function _n(e,t={}){const{params:r={},query:n}=t,o=Hn(e.query,r),a=ze(o,n),s=fr(e.path,r),l=e.hash.value?fr(e.hash,r):t.hash,p=qn(e.host,r),{protocol:d,host:h}=_(p);return ur({protocol:d,host:h,pathname:s,searchParams:a,hash:l})}function qn(e,t){const r=e.value&&!e.value.startsWith("http")?`https://${e.value}`:e.value;return Object.entries(e.params).reduce((n,[o,a])=>{const s=ye(`${z}${o}${K}`);return s?cr(n,{name:o,param:a,value:t[s]}):n},r)}function fr(e,t){return Object.entries(e.params).reduce((r,[n,o])=>{const a=ye(`${z}${n}${K}`);return a?cr(r,{name:n,param:o,value:t[a]}):r},e.value)}function Hn(e,t){const r=new URLSearchParams(e.value);if(!e.value)return r;for(const[n,o]of Array.from(r.entries())){const a=ye(o);if(!a)continue;const l=He(o),p=l?`?${a}`:a,d=re(t[a],e.params[p],l),h=t[a]===void 0&&d==="";l&&h?r.delete(n,o):r.set(n,d)}return r}const In=(e,t)=>{try{Xe(e,t)}catch{return!1}return!0},Xe=(e,t)=>{const{protocol:r,host:n,pathname:o,search:a,hash:s}=_(t);return{...et(e.host,`${r}//${n}`),...et(e.path,o),...Dn(e.query,a),...et(e.hash,s)}};function et(e,t){const r={},n=decodeURIComponent(t);for(const[o,a]of Object.entries(e.params)){const s=o.startsWith("?"),l=s?o.slice(1):o,p=sr(n,e.value,o),d=te(p,a,s);r[l]=d}return r}function Dn(e,t){const r={},n=new URLSearchParams(e.value),o=new URLSearchParams(t);for(const[a,s]of Array.from(n.entries())){const l=ye(s);if(!l)continue;const d=He(s),h=d?`?${l}`:l,v=o.get(a)??void 0,C=te(v,e.params[h],d);r[l]=C}return r}function Tn(e,t={},r={}){const n=_n(e,{params:t,query:r.query,hash:r.hash}),{search:o,hash:a}=_(n);return{id:e.id,matched:e.matched,matches:e.matches,name:e.name,query:De(o),params:Xe(e,n),state:or(e.state,r.state),hash:a,href:n}}const Mn=e=>"name"in e.matched&&!!e.matched.name,Fn=(e,t)=>{const{pathname:r}=_(t);return xr(e).test(r)},Jn=(e,t)=>{const{search:r}=_(t);return Nr(e).every(o=>o.test(r))},tt=(e,t)=>{const{hash:r}=_(t),{value:n}=e.hash;return M(n)?`#${n.replace(/^#*/,"")}`.toLowerCase()===r.toLowerCase():!0};function Wn(e){const{searchParams:t,pathname:r}=_(e),n=-1,o=1;return(a,s)=>{const l=dr(a,t),p=lr(a,r),d=dr(s,t),h=lr(s,r);return a.depth>s.depth?n:a.depth<s.depth?o:l+p>d+h?n:l+p<d+h?o:tt(a,e)?n:tt(s,e)?o:0}}function lr(e,t){const r=Object.keys(e.path.params).filter(o=>o.startsWith("?")).map(o=>o),n=r.filter(o=>sr(t,e.path.value,o)===void 0);return r.length-n.length}function dr(e,t){const r=new URLSearchParams(t),n=new URLSearchParams(e.query.value),o=Array.from(n.keys()),a=o.filter(s=>!r.has(s));return o.length-a.length}const Gn=[Mn,Fn,Jn,tt,In];function zn(e,t){const r=Wn(t);return e.filter(n=>Gn.every(o=>o(n,t))).sort(r)}function Qn(e,t,r){const n=zn(e,t);if(!n.length)return;const[o]=n,{searchParams:a,hash:s}=_(t);return{id:o.id,matched:o.matched,matches:o.matches,name:o.name,query:De(a),params:Xe(o,t),state:or(o.state,r),hash:s,href:Ne(t)}}function hr(e,t){const r=typeof e=="string"?_(e):e,n=typeof t=="string"?_(t):t,o=r.searchParams??new URLSearchParams(r.search),a=n.searchParams??new URLSearchParams(n.search);return ur({protocol:M(n.protocol)?n.protocol:r.protocol,host:M(n.host)?n.host:r.host,pathname:M(n.pathname)?n.pathname:r.pathname,searchParams:ze(a,o),hash:M(n.hash)?n.hash:r.hash})}function Kn(e,t){return M(t)?e.map(r=>{const n=`${t}${r.path.value}`;return{...r,path:F(n,r.path.params)}}):e}class Yn extends Error{constructor(t){super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`)}}function Xn(e){const t=e.map(({name:r})=>r);for(const r of t)if(ut(t,r)>1)throw new Yn(r)}function eo(e,t=[],r){const n=[...e,...t.map(o=>o.routes)].flat();return Xn(n),Kn(n,r)}function to(e={},t=[]){const r=new ae;return me("onBeforeRouteEnter",e,t).forEach(n=>r.onBeforeRouteEnter.add(n)),me("onBeforeRouteUpdate",e,t).forEach(n=>r.onBeforeRouteUpdate.add(n)),me("onBeforeRouteLeave",e,t).forEach(n=>r.onBeforeRouteLeave.add(n)),me("onAfterRouteEnter",e,t).forEach(n=>r.onAfterRouteEnter.add(n)),me("onAfterRouteUpdate",e,t).forEach(n=>r.onAfterRouteUpdate.add(n)),me("onAfterRouteLeave",e,t).forEach(n=>r.onAfterRouteLeave.add(n)),r}function me(e,t,r){return[t[e],...r.map(o=>o[e])].flat().filter(o=>o!==void 0)}function ro(e,t,r=[]){let n=null;const o=eo(e,r,t==null?void 0:t.base),a=mn();a.addGlobalRouteHooks(to(t,r));const s=Te(),l=zr(),p=cn(),d=jn(),h=kn({mode:t==null?void 0:t.historyMode,listener:({location:b})=>{const N=ce(b);C(N,{state:b.state,replace:!0})}});function v(b,N={}){return Qn(o,b,N.state)}async function C(b,N={}){const Q=s();if(h.stopListening(),x(b)){h.update(b,N);return}const D=v(b,N)??y("NotFound"),I=fo(Q),X=await a.runBeforeRouteHooks({to:D,from:I,app:n});switch(X.status){case"ABORT":return;case"PUSH":h.update(b,N),await R(...X.to);return;case"REJECT":h.update(b,N),f(X.type);break;case"SUCCESS":h.update(b,N),f(null);break;default:throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(X)}`)}const rt=Q;l.setProps(D).then(T=>{if(rt===Q)switch(T.status){case"SUCCESS":break;case"PUSH":R(...T.to);break;case"REJECT":f(T.type);break;default:const nt=T;throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(nt)}`)}}),g(D);const J=await a.runAfterRouteHooks({to:D,from:I,app:n});switch(J.status){case"PUSH":await R(...J.to);break;case"REJECT":f(J.type);break;case"SUCCESS":break;default:const T=J;throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(T)}`)}h.startListening()}const L=(b,N={},Q={})=>{const D=o.find(I=>I.name===b);if(!D)throw new Zn(String(b));return Tn(D,N,Q)},R=(b,N,Q)=>{if(Z(b)){const J={...N},T=hr(b,{searchParams:J.query,hash:J.hash});return C(T,J)}if(typeof b=="string"){const{replace:J,...T}={...Q},nt={...N},ot=L(b,nt,T),ho=ar({...ot.matched.state},{...ot.state,...T.state});return C(ot.href,{replace:J,state:ho})}const{replace:D,...I}={...N},X=ar({...b.matched.state},{...b.state,...I.state}),rt=hr(b.href,{searchParams:I.query,hash:I.hash});return C(rt,{replace:D,state:X})},m=(b,N,Q)=>{if(Z(b)){const I={...N,replace:!0};return R(b,I)}if(typeof b=="string"){const I={...Q,replace:!0},X={...N};return R(b,X,I)}const D={...N,replace:!0};return R(b,D)},c=b=>{f(b)},{setRejection:f,rejection:S,getRejectionRoute:y}=Cn({...r.reduce((b,N)=>({...b,...N.rejections}),{}),...t==null?void 0:t.rejections}),w=y("NotFound"),{currentRoute:A,routerRoute:U,updateRoute:g}=bn(w,R),u=xn(t==null?void 0:t.initialUrl),E=h.location.state,{host:B}=_(u),x=An(B);let V=!1;const{promise:$,resolve:q}=Promise.withResolvers();async function H(){if(V)return $;Sr(o)&&await vr(),V=!0,await C(u,{replace:!0,state:E}),h.startListening(),q()}function mr(){h.stopListening()}function fo(b){return Mr(b)?null:{...A}}function lo(b){n=b,l.setVueApp(b),b.component("RouterView",Ye),b.component("RouterLink",Dt),b.provide(Tt,S),b.provide(Gt,a),b.provide(Zt,l),b.provide(Ft,p),b.provide(_t,d),b.provide(it,yr),H()}const yr={route:U,resolve:L,find:v,push:R,replace:m,reject:c,refresh:h.refresh,forward:h.forward,back:h.back,go:h.go,install:lo,isExternal:x,onBeforeRouteEnter:a.onBeforeRouteEnter,onBeforeRouteUpdate:a.onBeforeRouteUpdate,onBeforeRouteLeave:a.onBeforeRouteLeave,onAfterRouteEnter:a.onAfterRouteEnter,onAfterRouteUpdate:a.onAfterRouteUpdate,onAfterRouteLeave:a.onAfterRouteLeave,prefetch:t==null?void 0:t.prefetch,start:H,stop:mr};return yr}function no(e){return{routes:e.routes??[],rejections:e.rejections??{},...e}}function pr(...e){return{get:(t,{invalid:r})=>{for(const n of e){const o=Lr(t,n);if(o!==void 0)return o}throw r(`Value ${t} does not satisfy any of the possible values`)},set:(t,{invalid:r})=>{for(const n of e){const o=Cr(t,n);if(o!==void 0)return o}throw r(`Value ${t} does not satisfy any of the possible values`)}}}function oo(...e){const t=pr(...e);return{get:(r,n)=>r.split(",").map(o=>t.get(o,n)),set:(r,n)=>{if(!Array.isArray(r))throw n.invalid("Expected an array");return r.map(o=>t.set(o,n)).join(",")}}}function ao(...e){return{get:t=>{const r=t.split(",");return e.map((n,o)=>te(r.at(o),n))},set:(t,{invalid:r})=>{if(!Array.isArray(t))throw r("Expected a tuple");if(t.length!==e.length)throw r(`Expected tuple with ${e.length} values but received ${t.length} values`);return e.map((n,o)=>re(t.at(o),n)).join(",")}}}const so=F,co=F,io=F;function uo(e){const t=Me(),r=Lt(e.name),n=ne(e.path),o=ne(e.query),a=ne(e.hash),s=e.meta??{},l=ne(e.host),p=i.markRaw({id:t,meta:{},state:{},...e}),d={id:t,matched:p,matches:[p],name:r,host:l,path:n,query:o,hash:a,meta:s,depth:1,state:{}},h=bt(e)?Ut(e.parent,d):d;return ue(h.path.params,h.query.params,h.host.params,h.hash.params),h}k.DuplicateParamsError=at,k.MetaPropertyConflict=st,k.RouterLink=Dt,k.RouterNotInstalledError=ee,k.RouterView=Ye,k.UseRouteInvalidError=ct,k.arrayOf=oo,k.asUrl=Ne,k.createExternalRoute=uo,k.createParam=lt,k.createRoute=oe,k.createRouter=ro,k.createRouterPlugin=no,k.host=co,k.isRoute=Ge,k.isUrl=Z,k.onAfterRouteLeave=Rn,k.onAfterRouteUpdate=wn,k.onBeforeRouteLeave=yn,k.onBeforeRouteUpdate=gn,k.path=so,k.query=io,k.tupleOf=ao,k.unionOf=pr,k.useLink=It,k.useRoute=Qe,k.useRouter=Pe,k.withDefault=Pr,k.withParams=F,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitbag/router",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.0",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/kitbagjs/router/issues"
|
|
7
7
|
},
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"homepage": "https://github.com/kitbagjs/router#readme",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "vite build",
|
|
19
|
-
"build:watch": "vite build --watch",
|
|
19
|
+
"build:watch": "vite build --watch --minify=false",
|
|
20
20
|
"test": "vitest --typecheck",
|
|
21
21
|
"lint": "eslint ./src",
|
|
22
22
|
"lint:fix": "eslint ./src --fix",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"@kitbag/eslint-config": "1.0.2",
|
|
44
44
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
45
45
|
"@vue/test-utils": "^2.4.6",
|
|
46
|
-
"eslint": "^9.
|
|
46
|
+
"eslint": "^9.20.1",
|
|
47
47
|
"globals": "^15.14.0",
|
|
48
48
|
"happy-dom": "^16.8.1",
|
|
49
|
-
"typedoc": "^0.27.
|
|
50
|
-
"typedoc-plugin-markdown": "^4.4.
|
|
49
|
+
"typedoc": "^0.27.7",
|
|
50
|
+
"typedoc-plugin-markdown": "^4.4.2",
|
|
51
51
|
"typedoc-vitepress-theme": "^1.1.2",
|
|
52
52
|
"typescript": "^5.7.3",
|
|
53
|
-
"vite": "^6.0
|
|
53
|
+
"vite": "^6.1.0",
|
|
54
54
|
"vite-plugin-dts": "^4.5.0",
|
|
55
55
|
"vitepress": "^1.6.3",
|
|
56
56
|
"vitest": "^2.1.6",
|