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