MCPcopy
hub / github.com/vitest-dev/vitest / k0

Function k0

test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:57–57  ·  test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js::k0
(e)

Source from the content-addressed store, hash-verified

55 * (c) 2025 Eduardo San Martin Morote
56 * @license MIT
57 */let V0e=()=>location.protocol+class="st">"class="cm">//"+location.host;function P1(e,t){const{pathname:r,search:o,hash:s}=t,c=e.indexOf(class="st">"#");if(c>-1){let f=s.includes(e.slice(c))?e.slice(c).length:1,d=s.slice(f);return d[0]!==class="st">"/"&&(d=class="st">"/"+d),f0(d,class="st">"")}return f0(r,e)+o+s}function G0e(e,t,r,o){let s=[],c=[],f=null;const d=({state:b})=>{const w=P1(e,location),E=r.value,L=t.value;let P=0;if(b){if(r.value=w,t.value=b,f&&f===E){f=null;return}P=L?b.position-L.position:0}else o(w);s.forEach(M=>{M(r.value,E,{delta:P,type:Ih.pop,direction:P?P>0?Wd.forward:Wd.back:Wd.unknown})})};function h(){f=r.value}function p(b){s.push(b);const w=()=>{const E=s.indexOf(b);E>-1&&s.splice(E,1)};return c.push(w),w}function g(){if(document.visibilityState===class="st">"hidden"){const{history:b}=window;if(!b.state)return;b.replaceState(bt({},b.state,{scroll:gf()}),class="st">"")}}function v(){for(const b of c)b();c=[],window.removeEventListener(class="st">"popstate",d),window.removeEventListener(class="st">"pagehide",g),document.removeEventListener(class="st">"visibilitychange",g)}return window.addEventListener(class="st">"popstate",d),window.addEventListener(class="st">"pagehide",g),document.addEventListener(class="st">"visibilitychange",g),{pauseListeners:h,listen:p,destroy:v}}function m0(e,t,r,o=!1,s=!1){return{back:e,current:t,forward:r,replaced:o,position:window.history.length,scroll:s?gf():null}}function K0e(e){const{history:t,location:r}=window,o={value:P1(e,r)},s={value:t.state};s.value||c(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function c(h,p,g){const v=e.indexOf(class="st">"#"),b=v>-1?(r.host&&document.querySelector(class="st">"base")?e:e.slice(v))+h:V0e()+e+h;try{t[g?class="st">"replaceState":class="st">"pushState"](p,class="st">"",b),s.value=p}catch(w){console.error(w),r[g?class="st">"replace":class="st">"assign"](b)}}function f(h,p){c(h,bt({},t.state,m0(s.value.back,h,s.value.forward,!0),p,{position:s.value.position}),!0),o.value=h}function d(h,p){const g=bt({},s.value,t.state,{forward:h,scroll:gf()});c(g.current,g,!0),c(h,bt({},m0(o.value,h,null),{position:g.position+1},p),!1),o.value=h}return{location:o,state:s,push:d,replace:f}}function X0e(e){e=O0e(e);const t=K0e(e),r=G0e(e,t.state,t.location,t.replace);function o(c,f=!0){f||r.pauseListeners(),history.go(c)}const s=bt({location:class="st">"",base:e,go:o,createHref:R0e.bind(null,e)},t,r);return Object.defineProperty(s,class="st">"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,class="st">"state",{enumerable:!0,get:()=>t.state.value}),s}function Y0e(e){return e=location.host?e||location.pathname+location.search:class="st">"",e.includes(class="st">"#")||(e+=class="st">"#"),X0e(e)}let Wo=(function(e){return e[e.Static=0]=class="st">"Static",e[e.Param=1]=class="st">"Param",e[e.Group=2]=class="st">"Group",e})({});var rn=(function(e){return e[e.Static=0]=class="st">"Static",e[e.Param=1]=class="st">"Param",e[e.ParamRegExp=2]=class="st">"ParamRegExp",e[e.ParamRegExpEnd=3]=class="st">"ParamRegExpEnd",e[e.EscapeNext=4]=class="st">"EscapeNext",e})(rn||{});const Z0e={type:Wo.Static,value:class="st">""},J0e=/[a-zA-Z0-9_]/;function Q0e(e){if(!e)return[[]];if(e===class="st">"/")return[[Z0e]];if(!e.startsWith(class="st">"/"))throw new Error(`Invalid path class="st">"${e}"`);function t(w){throw new Error(`ERR (${r})/class="st">"${p}": ${w}`)}let r=rn.Static,o=r;const s=[];let c;function f(){c&&s.push(c),c=[]}let d=0,h,p=class="st">"",g=class="st">"";function v(){p&&(r===rn.Static?c.push({type:Wo.Static,value:p}):r===rn.Param||r===rn.ParamRegExp||r===rn.ParamRegExpEnd?(c.length>1&&(h===class="st">"*"||h===class="st">"+")&&t(`A repeatable param (${p}) must be alone in its segment. eg: '/:ids+.`),c.push({type:Wo.Param,value:p,regexp:g,repeatable:h===class="st">"*"||h===class="st">"+",optional:h===class="st">"*"||h===class="st">"?"})):t(class="st">"Invalid state to consume buffer"),p=class="st">"")}function b(){p+=h}for(;d<e.length;){if(h=e[d++],h===class="st">"\\"&&r!==rn.ParamRegExp){o=r,r=rn.EscapeNext;continue}switch(r){case rn.Static:h===class="st">"/"?(p&&v(),f()):h===class="st">":"?(v(),r=rn.Param):b();break;case rn.EscapeNext:b(),r=o;break;case rn.Param:h===class="st">"("?r=rn.ParamRegExp:J0e.test(h)?b():(v(),r=rn.Static,h!==class="st">"*"&&h!==class="st">"?"&&h!==class="st">"+"&&d--);break;case rn.ParamRegExp:h===class="st">")"?g[g.length-1]==class="st">"\\"?g=g.slice(0,-1)+h:r=rn.ParamRegExpEnd:g+=h;break;case rn.ParamRegExpEnd:v(),r=rn.Static,h!==class="st">"*"&&h!==class="st">"?"&&h!==class="st">"+"&&d--,g=class="st">"";break;default:t(class="st">"Unknown state");break}}return r===rn.ParamRegExp&&t(`Unfinished custom RegExp for param class="st">"${p}"`),v(),f(),s}const v0=class="st">"[^/]+?",ebe={sensitive:!1,strict:!1,start:!0,end:!0};var On=(function(e){return e[e._multiplier=10]=class="st">"_multiplier",e[e.Root=90]=class="st">"Root",e[e.Segment=40]=class="st">"Segment",e[e.SubSegment=30]=class="st">"SubSegment",e[e.Static=40]=class="st">"Static",e[e.Dynamic=20]=class="st">"Dynamic",e[e.BonusCustomRegExp=10]=class="st">"BonusCustomRegExp",e[e.BonusWildcard=-50]=class="st">"BonusWildcard",e[e.BonusRepeatable=-20]=class="st">"BonusRepeatable",e[e.BonusOptional=-8]=class="st">"BonusOptional",e[e.BonusStrict=.7000000000000001]=class="st">"BonusStrict",e[e.BonusCaseSensitive=.25]=class="st">"BonusCaseSensitive",e})(On||{});const tbe=/[.+*?^${}()[\]/\\]/g;function nbe(e,t){const r=bt({},ebe,t),o=[];let s=r.start?class="st">"^":class="st">"";const c=[];for(const p of e){const g=p.length?[]:[On.Root];r.strict&&!p.length&&(s+=class="st">"/");for(let v=0;v<p.length;v++){const b=p[v];let w=On.Segment+(r.sensitive?On.BonusCaseSensitive:0);if(b.type===Wo.Static)v||(s+=class="st">"/"),s+=b.value.replace(tbe,class="st">"\\$&"),w+=On.Static;else if(b.type===Wo.Param){const{value:E,repeatable:L,optional:P,regexp:M}=b;c.push({name:E,repeatable:L,optional:P});const R=M||v0;if(R!==v0){w+=On.BonusCustomRegExp;try{`${R}`}catch(_){throw new Error(`Invalid custom RegExp for param class="st">"${E}" (${R}): `+_.message)}}let I=L?`((?:${R})(?:/(?:${R}))*)`:`(${R})`;v||(I=P&&p.length<2?`(?:/${I})`:class="st">"/"+I),P&&(I+=class="st">"?"),s+=I,w+=On.Dynamic,P&&(w+=On.BonusOptional),L&&(w+=On.BonusRepeatable),R===class="st">".*"&&(w+=On.BonusWildcard)}g.push(w)}o.push(g)}if(r.strict&&r.end){const p=o.length-1;o[p][o[p].length-1]+=On.BonusStrict}r.strict||(s+=class="st">"/?"),r.end?s+=class="st">"$":r.strict&&!s.endsWith(class="st">"/")&&(s+=class="st">"(?:/|$)");const f=new RegExp(s,r.sensitive?class="st">"":class="st">"i");function d(p){const g=p.match(f),v={};if(!g)return null;for(let b=1;b<g.length;b++){const w=g[b]||class="st">"",E=c[b-1];v[E.name]=w&&E.repeatable?w.split(class="st">"/"):w}return v}function h(p){let g=class="st">"",v=!1;for(const b of e){(!v||!g.endsWith(class="st">"/"))&&(g+=class="st">"/"),v=!1;for(const w of b)if(w.type===Wo.Static)g+=w.value;else if(w.type===Wo.Param){const{value:E,repeatable:L,optional:P}=w,M=E in p?p[E]:class="st">"";if(zr(M)&&!L)throw new Error(`Provided param class="st">"${E}" is an array but it is not repeatable (* or + modifiers)`);const R=zr(M)?M.join(class="st">"/"):M;if(!R)if(P)b.length<2&&(g.endsWith(class="st">"/")?g=g.slice(0,-1):v=!0);else throw new Error(`Missing required param class="st">"${E}"`);g+=R}}return g||class="st">"/"}return{re:f,score:o,keys:c,parse:d,stringify:h}}function rbe(e,t){let r=0;for(;r<e.length&&r<t.length;){const o=t[r]-e[r];if(o)return o;r++}return e.length<t.length?e.length===1&&e[0]===On.Static+On.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===On.Static+On.Segment?1:-1:0}function R1(e,t){let r=0;const o=e.score,s=t.score;for(;r<o.length&&r<s.length;){const c=rbe(o[r],s[r]);if(c)return c;r++}if(Math.abs(s.length-o.length)===1){if(y0(o))return 1;if(y0(s))return-1}return s.length-o.length}function y0(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ibe={strict:!1,end:!0,sensitive:!1};function obe(e,t,r){const o=nbe(Q0e(e.path),r),s=bt(o,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function sbe(e,t){const r=[],o=new Map;t=u0(ibe,t);function s(v){return o.get(v)}function c(v,b,w){const E=!w,L=w0(v);L.aliasOf=w&&w.record;const P=u0(t,v),M=[L];if(class="st">"alias"in v){const _=typeof v.alias==class="st">"string"?[v.alias]:v.alias;for(const $ of _)M.push(w0(bt({},L,{components:w?w.record.components:L.components,path:$,aliasOf:w?w.record:L})))}let R,I;for(const _ of M){const{path:$}=_;if(b&&$[0]!==class="st">"/"){const W=b.record.path,ne=W[W.length-1]===class="st">"/"?class="st">"":class="st">"/";_.path=b.record.path+($&&ne+$)}if(R=obe(_,b,P),w?w.alias.push(R):(I=I||R,I!==R&&I.alias.push(R),E&&v.name&&!x0(R)&&f(v.name)),$1(R)&&h(R),L.children){const W=L.children;for(let ne=0;ne<W.length;ne++)c(W[ne],R,w&&w.children[ne])}w=w||R}return I?()=>{f(I)}:la}function f(v){if(M1(v)){const b=o.get(v);b&&(o.delete(v),r.splice(r.indexOf(b),1),b.children.forEach(f),b.alias.forEach(f))}else{const b=r.indexOf(v);b>-1&&(r.splice(b,1),v.record.name&&o.delete(v.record.name),v.children.forEach(f),v.alias.forEach(f))}}function d(){return r}function h(v){const b=cbe(v,r);r.splice(b,0,v),v.record.name&&!x0(v)&&o.set(v.record.name,v)}function p(v,b){let w,E={},L,P;if(class="st">"name"in v&&v.name){if(w=o.get(v.name),!w)throw il(qt.MATCHER_NOT_FOUND,{location:v});P=w.record.name,E=bt(b0(b.params,w.keys.filter(I=>!I.optional).concat(w.parent?w.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),v.params&&b0(v.params,w.keys.map(I=>I.name))),L=w.stringify(E)}else if(v.path!=null)L=v.path,w=r.find(I=>I.re.test(L)),w&&(E=w.parse(L),P=w.record.name);else{if(w=b.name?o.get(b.name):r.find(I=>I.re.test(b.path)),!w)throw il(qt.MATCHER_NOT_FOUND,{location:v,currentLocation:b});P=w.record.name,E=bt({},b.params,v.params),L=w.stringify(E)}const M=[];let R=w;for(;R;)M.unshift(R.record),R=R.parent;return{name:P,path:L,params:E,matched:M,meta:abe(M)}}e.forEach(v=>c(v));function g(){r.length=0,o.clear()}return{addRoute:c,resolve:p,removeRoute:f,clearRoutes:g,getRoutes:d,getRecordMatcher:s}}function b0(e,t){const r={};for(const o of t)o in e&&(r[o]=e[o]);return r}function w0(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:lbe(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:class="st">"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,class="st">"mods",{value:{}}),t}function lbe(e){const t={},r=e.props||!1;if(class="st">"component"in e)t.default=r;else for(const o in e.components)t[o]=typeof r==class="st">"object"?r[o]:r;return t}function x0(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function abe(e){return e.reduce((t,r)=>bt(t,r.meta),{})}function cbe(e,t){let r=0,o=t.length;for(;r!==o;){const c=r+o>>1;R1(e,t[c])<0?o=c:r=c+1}const s=ube(e);return s&&(o=t.lastIndexOf(s,o-1)),o}function ube(e){let t=e;for(;t=t.parent;)if($1(t)&&R1(e,t)===0)return t}function $1({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function k0(e){const t=pn(Hp),r=pn(O1),o=ke(()=>{const h=K(e.to);return t.resolve(h)}),s=ke(()=>{const{matched:h}=o.value,{length:p}=h,g=h[p-1],v=r.matched;if(!g||!v.length)return-1;const b=v.findIndex(rl.bind(null,g));if(b>-1)return b;const w=S0(h[p-2]);return p>1&&S0(g)===w&&v[v.length-1].path!==w?v.findIndex(rl.bind(null,h[p-2])):b}),c=ke(()=>s.value>-1&&gbe(r.params,o.value.params)),f=ke(()=>s.value>-1&&s.value===r.matched.length-1&&L1(r.params,o.value.params));function d(h={}){if(pbe(h)){const p=t[K(e.replace)?class="st">"replace":class="st">"push"](K(e.to)).catch(la);return e.viewTransition&&typeof document<class="st">"u"&&class="st">"startViewTransition"in document&&document.startViewTransition(()=>p),p}return Promise.resolve()}return{route:o,href:ke(()=>o.value.href),isActive:c,isExactActive:f,navigate:d}}function fbe(e){return e.length===1?e[0]:e}const dbe=rt({name:class="st">"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:class="st">"page"},viewTransition:Boolean},useLink:k0,setup(e,{slots:t}){const r=ir(k0(e)),{options:o}=pn(Hp),s=ke(()=>({[_0(e.activeClass,o.linkActiveClass,class="st">"router-link-active")]:r.isActive,[_0(e.exactActiveClass,o.linkExactActiveClass,class="st">"router-link-exact-active")]:r.isExactActive}));return()=>{const c=t.default&&fbe(t.default(r));return e.custom?c:za(class="st">"a",{class="st">"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:s.value},c)}}}),hbe=dbe;function pbe(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute(class="st">"target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function gbe(e,t){for(const r in t){const o=t[r],s=e[r];if(typeof o==class="st">"string"){if(o!==s)return!1}else if(!zr(s)||s.length!==o.length||o.some((c,f)=>c!==s[f]))return!1}return!0}function S0(e){return e?e.aliasOf?e.aliasOf.path:e.path:class="st">""}const _0=(e,t,r)=>e??t??r,mbe=rt({name:class="st">"RouterView",inheritAttrs:!1,props:{name:{type:String,default:class="st">"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:r}){const o=pn(zh),s=ke(()=>e.route||o.value),c=pn(g0,0),f=ke(()=>{let p=K(c);const{matched:g}=s.value;let v;for(;(v=g[p])&&!v.components;)p++;return p}),d=ke(()=>s.value.matched[f.value]);dr(g0,ke(()=>f.value+1)),dr(j0e,d),dr(zh,s);const h=Ge();return xt(()=>[h.value,d.value,e.name],([p,g,v],[b,w,E])=>{g&&(g.instances[v]=p,w&&w!==g&&p&&p===b&&(g.leaveGuards.size||(g.leaveGuards=w.leaveGuards),g.updateGuards.size||(g.updateGuards=w.updateGuards))),p&&g&&(!w||!rl(g,w)||!b)&&(g.enterCallbacks[v]||[]).forEach(L=>L(p))},{flush:class="st">"post"}),()=>{const p=s.value,g=e.name,v=d.value,b=v&&v.components[g];if(!b)return T0(r.default,{Component:b,route:p});const w=v.props[g],E=w?w===!0?p.params:typeof w==class="st">"function"?w(p):w:null,P=za(b,bt({},E,t,{onVnodeUnmounted:M=>{M.component.isUnmounted&&(v.instances[g]=null)},ref:h}));return T0(r.default,{Component:P,route:p})||P}}});function T0(e,t){if(!e)return null;const r=e(t);return r.length===1?r[0]:r}const vbe=mbe;function ybe(e){const t=sbe(e.routes,e),r=e.parseQuery||W0e,o=e.stringifyQuery||p0,s=e.history,c=jl(),f=jl(),d=jl(),h=Ft(Gi);let p=Gi;Ls&&e.scrollBehavior&&class="st">"scrollRestoration"in history&&(history.scrollRestoration=class="st">"manual");const g=Hd.bind(null,F=>class="st">""+F),v=Hd.bind(null,T0e),b=Hd.bind(null,Na);function w(F,Y){let re,le;return M1(F)?(re=t.getRecordMatcher(F),le=Y):le=F,t.addRoute(le,re)}function E(F){const Y=t.getRecordMatcher(F);Y&&t.removeRoute(Y)}function L(){return t.getRoutes().map(F=>F.record)}function P(F){return!!t.getRecordMatcher(F)}function M(F,Y){if(Y=bt({},Y||h.value),typeof F==class="st">"string"){const Q=Bd(r,F,Y.path),he=t.resolve({path:Q.path},Y),de=s.createHref(Q.fullPath);return bt(Q,he,{params:b(he.params),hash:Na(Q.hash),redirectedFrom:void 0,href:de})}let re;if(F.path!=null)re=bt({},F,{path:Bd(r,F.path,Y.path).path});else{const Q=bt({},F.params);for(const he in Q)Q[he]==null&&delete Q[he];re=bt({},F,{params:v(Q)}),Y.params=v(Y.params)}const le=t.resolve(re,Y),ae=F.hash||class="st">"";le.params=g(b(le.params));const D=A0e(o,bt({},F,{hash:k0e(ae),path:le.path})),q=s.createHref(D);return bt({fullPath:D,hash:ae,query:o===p0?q0e(F.query):F.query||{}},le,{redirectedFrom:void 0,href:q})}function R(F){return typeof F==class="st">"string"?Bd(r,F,h.value.path):bt({},F)}function I(F,Y){if(p!==F)return il(qt.NAVIGATION_CANCELLED,{from:Y,to:F})}function _(F){return ne(F)}function $(F){return _(bt(R(F),{replace:!0}))}function W(F,Y){const re=F.matched[F.matched.length-1];if(re&&re.redirect){const{redirect:le}=re;let ae=typeof le==class="st">"function"?le(F,Y):le;return typeof ae==class="st">"string"&&(ae=ae.includes(class="st">"?")||ae.includes(class="st">"#")?ae=R(ae):{path:ae},ae.params={}),bt({query:F.query,hash:F.hash,params:ae.path!=null?{}:F.params},ae)}}function ne(F,Y){const re=p=M(F),le=h.value,ae=F.state,D=F.force,q=F.replace===!0,Q=W(re,le);if(Q)return ne(bt(R(Q),{state:typeof Q==class="st">"object"?bt({},ae,Q.state):ae,force:D,replace:q}),Y||re);const he=re;he.redirectedFrom=Y;let de;return!D&&L0e(o,le,re)&&(de=il(qt.NAVIGATION_DUPLICATED,{to:he,from:le}),Be(le,le,!0,!1)),(de?Promise.resolve(de):G(he,le)).catch(ge=>pi(ge)?pi(ge,qt.NAVIGATION_GUARD_REDIRECT)?ge:Se(ge):ce(ge,he,le)).then(ge=>{if(ge){if(pi(ge,qt.NAVIGATION_GUARD_REDIRECT))return ne(bt({replace:q},R(ge.to),{state:typeof ge.to==class="st">"object"?bt({},ae,ge.to.state):ae,force:D}),Y||he)}else ge=N(he,le,!0,q,ae);return j(he,le,ge),ge})}function ee(F,Y){const re=I(F,Y);return re?Promise.reject(re):Promise.resolve()}function Z(F){const Y=je.values().next().value;return Y&&typeof Y.runWithContext==class="st">"function"?Y.runWithContext(F):F()}function G(F,Y){let re;const[le,ae,D]=U0e(F,Y);re=qd(le.reverse(),class="st">"beforeRouteLeave",F,Y);for(const Q of le)Q.leaveGuards.forEach(he=>{re.push(no(he,F,Y))});const q=ee.bind(null,F,Y);return re.push(q),Pe(re).then(()=>{re=[];for(const Q of c.list())re.push(no(Q,F,Y));return re.push(q),Pe(re)}).then(()=>{re=qd(ae,class="st">"beforeRouteUpdate",F,Y);for(const Q of ae)Q.updateGuards.forEach(he=>{re.push(no(he,F,Y))});return re.push(q),Pe(re)}).then(()=>{re=[];for(const Q of D)if(Q.beforeEnter)if(zr(Q.beforeEnter))for(const he of Q.beforeEnter)re.push(no(he,F,Y));else re.push(no(Q.beforeEnter,F,Y));return re.push(q),Pe(re)}).then(()=>(F.matched.forEach(Q=>Q.enterCallbacks={}),re=qd(D,class="st">"beforeRouteEnter",F,Y,Z),re.push(q),Pe(re))).then(()=>{re=[];for(const Q of f.list())re.push(no(Q,F,Y));return re.push(q),Pe(re)}).catch(Q=>pi(Q,qt.NAVIGATION_CANCELLED)?Q:Promise.reject(Q))}function j(F,Y,re){d.list().forEach(le=>Z(()=>le(F,Y,re)))}function N(F,Y,re,le,ae){const D=I(F,Y);if(D)return D;const q=Y===Gi,Q=Ls?history.state:{};re&&(le||q?s.replace(F.fullPath,bt({scroll:q&&Q&&Q.scroll},ae)):s.push(F.fullPath,ae)),h.value=F,Be(F,Y,re,q),Se()}let O;function C(){O||(O=s.listen((F,Y,re)=>{if(!Fe.listening)return;const le=M(F),ae=W(le,Fe.currentRoute.value);if(ae){ne(bt(ae,{replace:!0,force:!0}),le).catch(la);return}p=le;const D=h.value;Ls&&D0e(h0(D.fullPath,re.delta),gf()),G(le,D).catch(q=>pi(q,qt.NAVIGATION_ABORTED|qt.NAVIGATION_CANCELLED)?q:pi(q,qt.NAVIGATION_GUARD_REDIRECT)?(ne(bt(R(q.to),{force:!0}),le).then(Q=>{pi(Q,qt.NAVIGATION_ABORTED|qt.NAVIGATION_DUPLICATED)&&!re.delta&&re.type===Ih.pop&&s.go(-1,!1)}).catch(la),Promise.reject()):(re.delta&&s.go(-re.delta,!1),ce(q,le,D))).then(q=>{q=q||N(le,D,!1),q&&(re.delta&&!pi(q,qt.NAVIGATION_CANCELLED)?s.go(-re.delta,!1):re.type===Ih.pop&&pi(q,qt.NAVIGATION_ABORTED|qt.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),j(le,D,q)}).catch(la)}))}let k=jl(),z=jl(),B;function ce(F,Y,re){Se(F);const le=z.list();return le.length?le.forEach(ae=>ae(F,Y,re)):console.error(F),Promise.reject(F)}function be(){return B&&h.value!==Gi?Promise.resolve():new Promise((F,Y)=>{k.add([F,Y])})}function Se(F){return B||(B=!F,C(),k.list().forEach(([Y,re])=>F?re(F):Y()),k.reset()),F}function Be(F,Y,re,le){const{scrollBehavior:ae}=e;if(!Ls||!ae)return Promise.resolve();const D=!re&&z0e(h0(F.fullPath,0))||(le||!re)&&history.state&&history.state.scroll||null;return Et().then(()=>ae(F,Y,D)).then(q=>q&&I0e(q)).catch(q=>ce(q,F,Y))}const Ae=F=>s.go(F);let Ke;const je=new Set,Fe={currentRoute:h,listening:!0,addRoute:w,removeRoute:E,clearRoutes:t.clearRoutes,hasRoute:P,getRoutes:L,resolve:M,options:e,push:_,replace:$,go:Ae,back:()=>Ae(-1),forward:()=>Ae(1),beforeEach:c.add,beforeResolve:f.add,afterEach:d.add,onError:z.add,isReady:be,install(F){F.component(class="st">"RouterLink",hbe),F.component(class="st">"RouterView",vbe),F.config.globalProperties.$router=Fe,Object.defineProperty(F.config.globalProperties,class="st">"$route",{enumerable:!0,get:()=>K(h)}),Ls&&!Ke&&h.value===Gi&&(Ke=!0,_(s.location).catch(le=>{}));const Y={};for(const le in Gi)Object.defineProperty(Y,le,{get:()=>h.value[le],enumerable:!0});F.provide(Hp,Fe),F.provide(O1,Gh(Y)),F.provide(zh,h);const re=F.unmount;je.add(F),F.unmount=function(){je.delete(F),je.size<1&&(p=Gi,O&&O(),O=null,h.value=Gi,Ke=!1,B=!1),re()}}};function Pe(F){return F.reduce((Y,re)=>Y.then(()=>Z(re)),Promise.resolve())}return Fe}const bbe={tooltip:pE};ww.options.instantMove=!0;ww.options.distance=10;function wbe(){return ybe({history:Y0e(),routes:f0e})}const xbe=[wbe],Bp=Qb(vC);xbe.forEach(e=>{Bp.use(e())});Object.entries(bbe).forEach(([e,t])=>{Bp.directive(e,t)});Bp.mount(class="st">"#app");

Callers 1

setupFunction · 0.70

Calls 8

bindMethod · 0.80
pnFunction · 0.70
keFunction · 0.70
KFunction · 0.70
S0Function · 0.70
gbeFunction · 0.70
L1Function · 0.70
resolveMethod · 0.45

Tested by

no test coverage detected