@vitest/browser 4.1.5 → 4.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/.vite/manifest.json +6 -6
- package/dist/client/__vitest__/assets/{index-BPQdrqGZ.js → index-DaKof6xz.js} +1 -1
- package/dist/client/__vitest__/index.html +1 -1
- package/dist/client/__vitest_browser__/{orchestrator-DM4mHHP0.js → orchestrator-B-wB8WWP.js} +1 -1
- package/dist/client/__vitest_browser__/{tester-Bf18VQr2.js → tester-DQAp97S5.js} +1 -1
- package/dist/client/__vitest_browser__/{utils-DmkAiRYk.js → utils-BsFW67Gk.js} +1 -1
- package/dist/client/orchestrator.html +2 -2
- package/dist/client/tester/tester.html +2 -2
- package/dist/index.js +4 -3
- package/package.json +6 -6
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_utils-
|
|
3
|
-
"file": "__vitest_browser__/utils-
|
|
2
|
+
"_utils-BsFW67Gk.js": {
|
|
3
|
+
"file": "__vitest_browser__/utils-BsFW67Gk.js",
|
|
4
4
|
"name": "utils"
|
|
5
5
|
},
|
|
6
6
|
"orchestrator.html": {
|
|
7
|
-
"file": "__vitest_browser__/orchestrator-
|
|
7
|
+
"file": "__vitest_browser__/orchestrator-B-wB8WWP.js",
|
|
8
8
|
"name": "orchestrator",
|
|
9
9
|
"src": "orchestrator.html",
|
|
10
10
|
"isEntry": true,
|
|
11
11
|
"imports": [
|
|
12
|
-
"_utils-
|
|
12
|
+
"_utils-BsFW67Gk.js"
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
"tester/tester.html": {
|
|
16
|
-
"file": "__vitest_browser__/tester-
|
|
16
|
+
"file": "__vitest_browser__/tester-DQAp97S5.js",
|
|
17
17
|
"name": "tester",
|
|
18
18
|
"src": "tester/tester.html",
|
|
19
19
|
"isEntry": true,
|
|
20
20
|
"imports": [
|
|
21
|
-
"_utils-
|
|
21
|
+
"_utils-BsFW67Gk.js"
|
|
22
22
|
]
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -47,7 +47,7 @@ ${e.map(i=>`- ${i.name}${i.description?`: ${i.description}`:""}`).join(`
|
|
|
47
47
|
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
48
48
|
- "vitest" is imported inside Vite / Vitest config file
|
|
49
49
|
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
50
|
-
`)}function qg(){return s_(Hn,"the runner"),Hn}function pi(){const e=Jn.currentSuite||o_;return s_(e,"the current suite"),e}function PR(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}const yb=Number.POSITIVE_INFINITY;function gl(e,t){if(t!=null&&typeof t=="object")throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let n={},i;if(typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");i=e}else typeof t=="function"&&(i=t);return{options:n,handler:i}}function IR(e,t=()=>{},n,i,o){const l=[];let u;v();const f=function($="",_={}){const C=Jn.currentSuite?.suite,L=(C??Jn.currentSuite?.file)?.tags||[],D=sb([...L,...bs(_.tags)]),N=D.map(S=>{const R=Hn.config.tags?.find(B=>B.name===S);if(!R&&Hn.config.strictTags)throw xf(Hn.config.tags,S);return R}).filter(S=>S!=null).sort((S,R)=>(R.priority??yb)-(S.priority??yb)).reduce((S,R)=>{const{name:B,description:ae,priority:ve,meta:_e,...Be}=R;return Object.assign(S,Be),_e&&(S.meta=Object.assign(S.meta??Object.create(null),_e)),S},{}),I=_.meta;_={...N,..._};const q=_.timeout??Hn.config.testTimeout,X=C?.meta,ie=N.meta,J=Object.create(null);ie&&Object.assign(J,ie),X&&Object.assign(J,X),I&&Object.assign(J,I);const U={id:"",name:$,fullName:Eu([C?.fullName??Jn.currentSuite?.file?.fullName,$]),fullTestName:Eu([C?.fullTestName,$]),suite:C,each:_.each,fails:_.fails,context:void 0,type:"test",file:C?.file??Jn.currentSuite?.file,timeout:q,retry:_.retry??Hn.config.retry,repeats:_.repeats,mode:_.only?"only":_.skip?"skip":_.todo?"todo":"run",meta:J,annotations:[],artifacts:[],tags:D},K=_.handler;U.mode==="run"&&!K&&(U.mode="todo"),(_.concurrent
|
|
50
|
+
`)}function qg(){return s_(Hn,"the runner"),Hn}function pi(){const e=Jn.currentSuite||o_;return s_(e,"the current suite"),e}function PR(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}const yb=Number.POSITIVE_INFINITY;function gl(e,t){if(t!=null&&typeof t=="object")throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let n={},i;if(typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");i=e}else typeof t=="function"&&(i=t);return{options:n,handler:i}}function IR(e,t=()=>{},n,i,o){const l=[];let u;v();const f=function($="",_={}){const C=Jn.currentSuite?.suite,L=(C??Jn.currentSuite?.file)?.tags||[],D=sb([...L,...bs(_.tags)]),N=D.map(S=>{const R=Hn.config.tags?.find(B=>B.name===S);if(!R&&Hn.config.strictTags)throw xf(Hn.config.tags,S);return R}).filter(S=>S!=null).sort((S,R)=>(R.priority??yb)-(S.priority??yb)).reduce((S,R)=>{const{name:B,description:ae,priority:ve,meta:_e,...Be}=R;return Object.assign(S,Be),_e&&(S.meta=Object.assign(S.meta??Object.create(null),_e)),S},{}),I=_.meta;_={...N,..._};const q=_.timeout??Hn.config.testTimeout,X=C?.meta,ie=N.meta,J=Object.create(null);ie&&Object.assign(J,ie),X&&Object.assign(J,X),I&&Object.assign(J,I);const U={id:"",name:$,fullName:Eu([C?.fullName??Jn.currentSuite?.file?.fullName,$]),fullTestName:Eu([C?.fullTestName,$]),suite:C,each:_.each,fails:_.fails,context:void 0,type:"test",file:C?.file??Jn.currentSuite?.file,timeout:q,retry:_.retry??Hn.config.retry,repeats:_.repeats,mode:_.only?"only":_.skip?"skip":_.todo?"todo":"run",meta:J,annotations:[],artifacts:[],tags:D},K=_.handler;U.mode==="run"&&!K&&(U.mode="todo"),(_.concurrent??(!_.sequential&&Hn.config.sequence.concurrent))&&(U.concurrent=!0),U.shuffle=o?.shuffle;const P=UR(U,Hn);Object.defineProperty(U,"context",{value:P,enumerable:!1}),cR(P,_.fixtures??new un);const O=Error.stackTraceLimit;Error.stackTraceLimit=10;const k=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=O,K&&aR(U,xs(WR(DR(Ec(K,{context:P}),U),U.context.signal),q,!1,k,(S,R)=>Vg([P],R))),Hn.config.includeTaskLocation){const S=k.stack,R=t_(RR,S);R&&(U.location={line:R.line,column:R.column})}return l.push(U),U},h=Ug(function($,_,C){let{options:E,handler:L}=gl(_,C);typeof o=="object"&&(E=Object.assign({},o,E));const D=this.concurrent??(!this.sequential&&E?.concurrent);E.concurrent!=null&&D!=null&&(E.concurrent=D);const N=this.sequential??(!this.concurrent&&E?.sequential);E.sequential!=null&&N!=null&&(E.sequential=N);const I=f(Mo($),{...this,...E,handler:L});I.type="test"}),p={type:"collector",name:e,mode:n,suite:u,options:o,test:h,file:u.file,tasks:l,collect:w,task:f,clear:y,on:g};function g($,..._){dR(u)[$].push(..._)}function v($){typeof o=="number"&&(o={timeout:o});const _=Jn.currentSuite?.suite,C=_??Jn.currentSuite?.file,E=bs(o?.tags);TR(Hn.config,E),u={id:"",type:"suite",name:e,fullName:Eu([_?.fullName??Jn.currentSuite?.file?.fullName,e]),fullTestName:Eu([_?.fullTestName,e]),suite:_,mode:n,each:i,file:_?.file??Jn.currentSuite?.file,shuffle:o?.shuffle,tasks:[],meta:o?.meta??Object.create(null),concurrent:o?.concurrent,tags:sb([...C?.tags||[],...E])},fR(u,PR())}function y(){l.length=0,v()}async function w($){if(!$)throw new TypeError("File is required to collect tasks.");t&&await jR(p,()=>t(h));const _=[];for(const C of l)_.push(C.type==="collector"?await C.collect($):C);return u.tasks=_,u}return BR(p),p}function DR(e,t){return(async(...n)=>{const i=await e(...n);if(t.promises){const l=(await Promise.allSettled(t.promises)).map(u=>u.status==="rejected"?u.reason:void 0).filter(Boolean);if(l.length)throw l}return i})}function FR(){function e(t,n,i){const o=Jn.currentSuite||o_;let{options:l,handler:u}=gl(n,i);const f=l.concurrent||this.concurrent||l.sequential===!1,h=l.sequential||this.sequential||l.concurrent===!1,{meta:p,...g}=o?.options||{};l={...g,...l};const v=this.shuffle??l.shuffle??o?.options?.shuffle??Hn?.config.sequence.shuffle;v!=null&&(l.shuffle=v);let y=this.only??l.only?"only":this.skip??l.skip?"skip":this.todo??l.todo?"todo":"run";y==="run"&&!u&&(y="todo");const w=f||l.concurrent&&!h,$=h||l.sequential&&!f;return w!=null&&(l.concurrent=w&&!$),$!=null&&(l.sequential=$&&!w),p&&(l.meta=Object.assign(Object.create(null),p,l.meta)),IR(Mo(t),u,y,this.each,l)}return e.each=function(t,...n){const i=Ii(this),o=i.withContext();return i.setContext("each",!0),Array.isArray(t)&&n.length&&(t=Sf(t,n)),(l,u,f)=>{const h=Mo(l),p=t.every(Array.isArray),{options:g,handler:v}=gl(u,f),y=typeof u=="function";t.forEach((w,$)=>{const _=Array.isArray(w)?w:[w];y?p?o(li(h,_,$),v?()=>v(..._):void 0,g.timeout):o(li(h,_,$),v?()=>v(w):void 0,g.timeout):p?o(li(h,_,$),g,v?()=>v(..._):void 0):o(li(h,_,$),g,v?()=>v(w):void 0)}),i.setContext("each",void 0)}},e.for=function(t,...n){return Array.isArray(t)&&n.length&&(t=Sf(t,n)),(i,o,l)=>{const u=Mo(i),{options:f,handler:h}=gl(o,l);t.forEach((p,g)=>{cs(li(u,bs(p),g),f,h?()=>h(p):void 0)})}},e.skipIf=t=>t?cs.skip:cs,e.runIf=t=>t?cs:cs.skip,YS(["concurrent","sequential","shuffle","skip","only","todo"],e)}function zR(e){const t=e;t.each=function(o,...l){const u=Ii(this),f=u.withContext();return u.setContext("each",!0),Array.isArray(o)&&l.length&&(o=Sf(o,l)),(h,p,g)=>{const v=Mo(h),y=o.every(Array.isArray),{options:w,handler:$}=gl(p,g),_=typeof p=="function";o.forEach((C,E)=>{const L=Array.isArray(C)?C:[C];_?y?f(li(v,L,E),$?()=>$(...L):void 0,w.timeout):f(li(v,L,E),$?()=>$(C):void 0,w.timeout):y?f(li(v,L,E),w,$?()=>$(...L):void 0):f(li(v,L,E),w,$?()=>$(C):void 0)}),u.setContext("each",void 0)}},t.for=function(o,...l){const f=Ii(this).withContext();return Array.isArray(o)&&l.length&&(o=Sf(o,l)),(h,p,g)=>{const v=Mo(h),{options:y,handler:w}=gl(p,g);o.forEach(($,_)=>{const C=w?E=>w($,E):void 0;C&&wf(C,{index:1,original:w}),f(li(v,bs($),_),y,C)})}},t.skipIf=function(o){return o?this.skip:this},t.runIf=function(o){return o?this:this.skip};function n(o,l,u){if(typeof o!="string")return o;const f=o;let h,p;if(u!==void 0?(h=l,p=u):l!==null&&typeof l=="object"&&!Array.isArray(l)&&un.isFixtureOptions(l)?(h=l,p={}):(h=void 0,p=l),typeof p=="function"){const g=p,v=async(y,w)=>{let $;const C=await g(y,{onCleanup:E=>{if($!==void 0)throw new Error("onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.");$=E}});await w(C),$&&await $()};return wf(v,{original:g}),h?{[f]:[v,h]}:{[f]:v}}return h?{[f]:[p,h]}:{[f]:p}}return t.override=function(o,l,u){const f=n(o,l,u);return Ii(this).getFixtures().override(Hn,f),this},t.scoped=function(o){return console.warn("test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead."),this.override(o)},t.extend=function(o,l,u){const f=n(o,l,u),h=Ii(this).getFixtures().extend(Hn,f),p=Ug(function(g,v,y){e.call(this,Mo(g),v,y)});return Ii(p).mergeContext({fixtures:h}),p},t.describe=cs,t.suite=cs,t.beforeEach=bR,t.afterEach=wR,t.beforeAll=vR,t.afterAll=yR,t.aroundEach=SR,t.aroundAll=xR,YS(["concurrent","sequential","skip","only","todo","fails"],t,{fixtures:new un})}function Ug(e){return zR(e)}function Mo(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}function li(e,t,n){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${n}`).replace(/%\$/g,`${n+1}`).replace(/__vitest_escaped_%__/g,"%%"));const i=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((p,g)=>{if(pO(t[g])||Object.is(t[g],-0)){let v=0;e=e.replace(/%f/g,y=>(v++,v===g+1?"-%f":y))}});const o=IS(t[0]);function l(h){return h.replace(/\$([$\w.]+)/g,(p,g)=>{const v=/^\d+$/.test(g);if(!o&&!v)return`$${g}`;const y=v?rb(t,g):void 0,w=o?rb(t[0],g,y):y;return dO(w,{truncate:Hn?.config?.chaiConfig?.truncateThreshold})})}let u="",f=0;return HR(e,OS,h=>{f<i?u+=fO(h[0],t[f++]):u+=h[0]},h=>{u+=l(h)}),u}function HR(e,t,n,i){let o=0;for(const l of e.matchAll(t))o<l.index&&i(e.slice(o,l.index)),n(l),o=l.index+l[0].length;o<e.length&&i(e.slice(o))}function Sf(e,t){const n=e.join("").trim().replace(/ /g,"").split(`
|
|
51
51
|
`).map(o=>o.split("|"))[0],i=[];for(let o=0;o<Math.floor(t.length/n.length);o++){const l={};for(let u=0;u<n.length;u++)l[n[u]]=t[o*n.length+u];i.push(l)}return i}const bb=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,Jn={currentSuite:null};function BR(e){Jn.currentSuite?.tasks.push(e)}async function jR(e,t){const n=Jn.currentSuite;Jn.currentSuite=e,await t(),Jn.currentSuite=n}function xs(e,t,n=!1,i,o){if(t<=0||t===Number.POSITIVE_INFINITY)return e;const{setTimeout:l,clearTimeout:u}=DS();return(function(...h){const p=bb(),g=qg();return g._currentTaskStartTime=p,g._currentTaskTimeout=t,new Promise((v,y)=>{const w=l(()=>{u(w),$()},t);w.unref?.();function $(){const E=VR(n,t,i);o?.(h,E),y(E)}function _(E){if(g._currentTaskStartTime=void 0,g._currentTaskTimeout=void 0,u(w),bb()-p>=t){$();return}v(E)}function C(E){g._currentTaskStartTime=void 0,g._currentTaskTimeout=void 0,u(w),y(E)}try{const E=e(...h);typeof E=="object"&&E!=null&&typeof E.then=="function"?E.then(_,C):_(E)}catch(E){C(E)}})})}function WR(e,t){return(function(...i){return new Promise((o,l)=>{t.addEventListener("abort",()=>l(t.reason));try{const u=e(...i);typeof u=="object"&&u!=null&&typeof u.then=="function"?u.then(o,l):o(u)}catch(u){l(u)}})})}const Ep=new WeakMap;function Vg([e],t){e&&qR(e,t)}function qR(e,t){Ep.get(e)?.abort(t)}function UR(e,t){const n=function(){throw new Error("done() callback is deprecated, use promise instead")};let i=Ep.get(n);return i||(i=new AbortController,Ep.set(n,i)),n.signal=i.signal,n.task=e,n.skip=(o,l)=>{if(o!==!1)throw e.result??={state:"skip"},e.result.pending=!0,new oR("test is skipped; abort execution",e,typeof o=="string"?o:l)},n.annotate=((o,l,u)=>{if(e.result&&e.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);const f={message:o,type:typeof l=="object"||l===void 0?"notice":l},h=typeof l=="object"?l:u;return h&&(f.attachment=h,a_(f.attachment)),XR(e,KR(e,{type:"internal:annotation",annotation:f}).then(async({annotation:p})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await l_(t);const g=await t.onTestAnnotate(e,p);return e.annotations.push(g),g}))}),n.onTestFailed=(o,l)=>{e.onFailed||=[],e.onFailed.push(xs(o,l??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(u,f)=>i.abort(f)))},n.onTestFinished=(o,l)=>{e.onFinished||=[],e.onFinished.push(xs(o,l??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(u,f)=>i.abort(f)))},t.extendTaskContext?.(n)||n}function VR(e,t,n){const i=`${e?"Hook":"Test"} timed out in ${t}ms.
|
|
52
52
|
If this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`,o=new Error(i);return n?.stack&&(o.stack=n.stack.replace(o.message,n.message)),o}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;DS();const Fh=new Map,wb=[],Wu=[];function GR(e){if(Fh.size){const t=Array.from(Fh).map(([i,o])=>[i,o[0],o[1]]),n=e.onTaskUpdate?.(t,wb);n&&(Wu.push(n),n.then(()=>Wu.splice(Wu.indexOf(n),1),()=>{})),wb.length=0,Fh.clear()}}async function l_(e){GR(e),await Promise.all(Wu)}async function KR(e,t){const n=qg(),i=t_(e.file.filepath,new Error("STACK_TRACE").stack);if(i&&(t.location={file:i.file,line:i.line,column:i.column},t.type==="internal:annotation"&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(const l of t.attachments)a_(l);if(t.type==="internal:annotation")return t;if(!n.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await l_(n);const o=await n.onTestArtifactRecord(e,t);return e.artifacts.push(o),o}const ar=[];for(let e=65;e<91;e++)ar.push(String.fromCharCode(e));for(let e=97;e<123;e++)ar.push(String.fromCharCode(e));for(let e=0;e<10;e++)ar.push(e.toString(10));ar.push("+","/");function YR(e){let t="";const n=e.byteLength;for(let i=0;i<n;i+=3)if(n===i+1){const o=(e[i]&252)>>2,l=(e[i]&3)<<4;t+=ar[o],t+=ar[l],t+="=="}else if(n===i+2){const o=(e[i]&252)>>2,l=(e[i]&3)<<4|(e[i+1]&240)>>4,u=(e[i+1]&15)<<2;t+=ar[o],t+=ar[l],t+=ar[u],t+="="}else{const o=(e[i]&252)>>2,l=(e[i]&3)<<4|(e[i+1]&240)>>4,u=(e[i+1]&15)<<2|(e[i+2]&192)>>6,f=e[i+2]&63;t+=ar[o],t+=ar[l],t+=ar[u],t+=ar[f]}return t}function XR(e,t){return t=t.finally(()=>{if(!e.promises)return;const n=e.promises.indexOf(t);n!==-1&&e.promises.splice(n,1)}),e.promises||(e.promises=[]),e.promises.push(t),t}function a_(e){if(e.body==null&&!e.path)throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');if(e.body&&e.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');if(e.path&&e.bodyEncoding)throw new TypeError('Test attachment with "path" should not have "bodyEncoding" specified.');e.body instanceof Uint8Array&&(e.body=YR(e.body)),e.body!=null&&(e.bodyEncoding??="base64")}const xb="q",Sb="s";function JR(){let e,t;return{promise:new Promise((n,i)=>{e=n,t=i}),resolve:e,reject:t}}const ZR=Math.random.bind(Math),QR="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";function eP(e=21){let t="",n=e;for(;n--;)t+=QR[ZR()*64|0];return t}const tP=6e4,c_=e=>e,nP=c_,{clearTimeout:_b,setTimeout:rP}=globalThis;function iP(e,t){const{post:n,on:i,off:o=()=>{},eventNames:l=[],serialize:u=c_,deserialize:f=nP,resolver:h,bind:p="rpc",timeout:g=tP,proxify:v=!0}=t;let y=!1;const w=new Map;let $,_;async function C(I,q,X,ie){if(y)throw new Error(`[birpc] rpc is closed, cannot call "${I}"`);const J={m:I,a:q,t:xb};ie&&(J.o=!0);const U=async B=>n(u(B));if(X){await U(J);return}if($)try{await $}finally{$=void 0}let{promise:K,resolve:P,reject:O}=JR();const k=eP();J.i=k;let S;async function R(B=J){return g>=0&&(S=rP(()=>{try{if(t.onTimeoutError?.call(_,I,q)!==!0)throw new Error(`[birpc] timeout on calling "${I}"`)}catch(ae){O(ae)}w.delete(k)},g),typeof S=="object"&&(S=S.unref?.())),w.set(k,{resolve:P,reject:O,timeoutId:S,method:I}),await U(B),K}try{t.onRequest?await t.onRequest.call(_,J,R,P):await R()}catch(B){if(t.onGeneralError?.call(_,B)!==!0)throw B;return}finally{_b(S),w.delete(k)}return K}const E={$call:(I,...q)=>C(I,q,!1),$callOptional:(I,...q)=>C(I,q,!1,!0),$callEvent:(I,...q)=>C(I,q,!0),$callRaw:I=>C(I.method,I.args,I.event,I.optional),$rejectPendingCalls:D,get $closed(){return y},get $meta(){return t.meta},$close:L,$functions:e};v?_=new Proxy({},{get(I,q){if(Object.prototype.hasOwnProperty.call(E,q))return E[q];if(q==="then"&&!l.includes("then")&&!("then"in e))return;const X=(...J)=>C(q,J,!0);if(l.includes(q))return X.asEvent=X,X;const ie=(...J)=>C(q,J,!1);return ie.asEvent=X,ie}}):_=E;function L(I){y=!0,w.forEach(({reject:q,method:X})=>{const ie=new Error(`[birpc] rpc is closed, cannot call "${X}"`);if(I)return I.cause??=ie,q(I);q(ie)}),w.clear(),o(N)}function D(I){const q=Array.from(w.values()).map(({method:X,reject:ie})=>I?I({method:X,reject:ie}):ie(new Error(`[birpc]: rejected pending call "${X}".`)));return w.clear(),q}async function N(I,...q){let X;try{X=f(I)}catch(ie){if(t.onGeneralError?.call(_,ie)!==!0)throw ie;return}if(X.t===xb){const{m:ie,a:J,o:U}=X;let K,P,O=await(h?h.call(_,ie,e[ie]):e[ie]);if(U&&(O||=()=>{}),!O)P=new Error(`[birpc] function "${ie}" not found`);else try{K=await O.apply(p==="rpc"?_:e,J)}catch(k){P=k}if(X.i){if(P&&t.onFunctionError&&t.onFunctionError.call(_,P,ie,J)===!0)return;if(!P)try{await n(u({t:Sb,i:X.i,r:K}),...q);return}catch(k){if(P=k,t.onGeneralError?.call(_,k,ie,J)!==!0)throw k}try{await n(u({t:Sb,i:X.i,e:P}),...q)}catch(k){if(t.onGeneralError?.call(_,k,ie,J)!==!0)throw k}}}else{const{i:ie,r:J,e:U}=X,K=w.get(ie);K&&(_b(K.timeoutId),U?K.reject(U):K.resolve(J)),w.delete(ie)}}return $=i(N),_}const{parse:u_,stringify:oP}=JSON,{keys:sP}=Object,uc=String,f_="string",kb={},_f="object",d_=(e,t)=>t,lP=e=>e instanceof uc?uc(e):e,aP=(e,t)=>typeof t===f_?new uc(t):t,cP=(e,t,n,i)=>o=>{for(let l=sP(o),{length:u}=l,f=0;f<u;f++){const h=l[f],p=o[h];if(p instanceof uc){const g=e[+p];typeof g===_f&&!n.has(g)?(n.add(g),o[h]=kb,t.push({o,k:h,r:g})):o[h]=i.call(o,h,g)}else o[h]!==kb&&(o[h]=i.call(o,h,p))}return o},Tb=(e,t,n)=>{const i=uc(t.push(n)-1);return e.set(n,i),i},Ap=(e,t)=>{const n=u_(e,aP).map(lP),i=t||d_;let o=n[0];if(typeof o===_f&&o){const l=[],u=cP(n,l,new Set,i);o=u(o);let f=0;for(;f<l.length;){const{o:h,k:p,r:g}=l[f++];h[p]=i.call(h,p,u(g))}}return i.call({"":o},"",o)},h_=(e,t,n)=>{const i=t&&typeof t===_f?(g,v)=>g===""||-1<t.indexOf(g)?v:void 0:t||d_,o=new Map,l=[],u=[];let f=+Tb(o,l,i.call({"":e},"",e)),h=!f;for(;f<l.length;)h=!0,u[f]=oP(l[f++],p,n);return"["+u.join(",")+"]";function p(g,v){if(h)return h=!h,v;const y=i.call(this,g,v);switch(typeof y){case _f:if(y===null)return y;case f_:return o.get(y)||Tb(o,l,y)}return y}},uP=e=>u_(h_(e));class p_{filesMap=new Map;pathsSet=new Set;idMap=new Map;getPaths(){return Array.from(this.pathsSet)}getFiles(t){return t?t.map(n=>this.filesMap.get(n)).flat().filter(n=>n&&!n.local):Array.from(this.filesMap.values()).flat().filter(n=>!n.local)}getFilepaths(){return Array.from(this.filesMap.keys())}getFailedFilepaths(){return this.getFiles().filter(t=>t.result?.state==="fail").map(t=>t.filepath)}collectPaths(t=[]){t.forEach(n=>{this.pathsSet.add(n)})}collectFiles(t=[]){t.forEach(n=>{const i=this.filesMap.get(n.filepath)||[],o=i.filter(u=>u.projectName!==n.projectName||u.meta.typecheck!==n.meta.typecheck),l=i.find(u=>u.projectName===n.projectName);l&&(n.logs=l.logs),o.push(n),this.filesMap.set(n.filepath,o),this.updateId(n)})}clearFiles(t,n=[]){const i=t;n.forEach(o=>{const l=this.filesMap.get(o),u=e_(o,i.config.root,i.config.name||"");if(u.local=!0,this.idMap.set(u.id,u),!l){this.filesMap.set(o,[u]);return}const f=l.filter(h=>h.projectName!==i.config.name);f.length?this.filesMap.set(o,[...f,u]):this.filesMap.set(o,[u])})}updateId(t){this.idMap.get(t.id)!==t&&(this.idMap.set(t.id,t),t.type==="suite"&&t.tasks.forEach(n=>{this.updateId(n)}))}updateTasks(t){for(const[n,i,o]of t){const l=this.idMap.get(n);l&&(l.result=i,l.meta=o,i?.state==="skip"&&(l.mode="skip"))}}updateUserLog(t){const n=t.taskId&&this.idMap.get(t.taskId);n&&(n.logs||(n.logs=[]),n.logs.push(t))}}function fP(e,t={}){const{handlers:n={},autoReconnect:i=!0,reconnectInterval:o=2e3,reconnectTries:l=10,connectTimeout:u=6e4,reactive:f=L=>L,WebSocketConstructor:h=globalThis.WebSocket}=t;let p=l;const g=f({ws:new h(e),state:new p_,waitForConnection:E,reconnect:_},"state");g.state.filesMap=f(g.state.filesMap,"filesMap"),g.state.idMap=f(g.state.idMap,"idMap");let v;const y={onTestAnnotate(L,D){n.onTestAnnotate?.(L,D)},onTestArtifactRecord(L,D){n.onTestArtifactRecord?.(L,D)},onSpecsCollected(L,D){L?.forEach(([N,I])=>{g.state.clearFiles({config:N},[I])}),n.onSpecsCollected?.(L,D)},onPathsCollected(L){g.state.collectPaths(L),n.onPathsCollected?.(L)},onCollected(L){g.state.collectFiles(L),n.onCollected?.(L)},onTaskUpdate(L,D){g.state.updateTasks(L),n.onTaskUpdate?.(L,D)},onUserConsoleLog(L){g.state.updateUserLog(L),n.onUserConsoleLog?.(L)},onFinished(L,D,N,I){n.onFinished?.(L,D,N,I)},onFinishedReportCoverage(){n.onFinishedReportCoverage?.()}},w={post:L=>g.ws.send(L),on:L=>v=L,serialize:L=>h_(L,(D,N)=>N instanceof Error?{name:N.name,message:N.message,stack:N.stack}:N),deserialize:Ap,timeout:-1};g.rpc=iP(y,w);let $;function _(L=!1){L&&(p=l),g.ws=new h(e),C()}function C(){$=new Promise((L,D)=>{const N=setTimeout(()=>{D(new Error(`Cannot connect to the server in ${u/1e3} seconds`))},u)?.unref?.();g.ws.OPEN===g.ws.readyState&&L(),g.ws.addEventListener("open",()=>{p=l,L(),clearTimeout(N)})}),g.ws.addEventListener("message",L=>{v(L.data)}),g.ws.addEventListener("close",()=>{p-=1,i&&p>0&&setTimeout(_,o)})}C();function E(){return $}return g}const Po=oM(),dP=BN(Po);function Ac(e){return Object.hasOwn(e,"tasks")}function hP(e,t){return typeof e!="string"||typeof t!="string"?!1:e.toLowerCase().includes(t.toLowerCase())}function us(e){return e>1e3?`${(e/1e3).toFixed(2)}s`:`${Math.round(e)}ms`}function zh(e){return e>1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(2)}ms`}function pP(e){const t=new Map,n=new Map,i=[];for(;;){let o=0;if(e.forEach((l,u)=>{const{splits:f,finished:h}=l;if(h){o++;const{raw:g,candidate:v}=l;t.set(g,v);return}if(f.length===0){l.finished=!0;return}const p=f[0];n.has(p)?(l.candidate+=l.candidate===""?p:`/${p}`,n.get(p)?.push(u),f.shift()):(n.set(p,[u]),i.push(u))}),i.forEach(l=>{const u=e[l],f=u.splits.shift();u.candidate+=u.candidate===""?f:`/${f}`}),n.forEach(l=>{if(l.length===1){const u=l[0];e[u].finished=!0}}),n.clear(),i.length=0,o===e.length)break}return t}function g_(e){let t=e;t.includes("/node_modules/")&&(t=e.split(/\/node_modules\//g).pop());const n=t.split(/\//g);return{raw:t,splits:n,splitsCopy:[...n],candidate:"",finished:!1,id:e}}function gP(e){return g_(e).raw}function qu(e){if(e>=500)return"danger";if(e>=100)return"warning"}function kf(e){const t=qu(e);if(t==="danger")return"text-red";if(t==="warning")return"text-orange"}function Uu(e,t=!1){if(!e)return"";const n=e.split("").reduce((l,u,f)=>l+u.charCodeAt(0)+f,0),i=Po.value?["yellow","cyan","#006800","magenta"]:["#ff5400","#02a4a4","green","magenta"],o=Po.value?["#ffff0091","#0ff6","#5dbb5dc9","#ff00ff80"]:["#ff540091","#00828266","#5dbb5dc9","#ff00ff80"];return(t?o:i)[n%i.length]}function m_(e){switch(e){case"blue":case"green":case"magenta":case"black":case"red":return"white";case"yellow":case"cyan":case"white":default:return"black"}}const $p=Vt([]),rr=Vt([]),Kr=Cc("vitest-ui_task-tree-opened",[],{shallow:!0}),Bl="__vitest_ui_all_projects__",Tf=Se(()=>new Set(Kr.value)),Ht=Cc("vitest-ui_task-tree-filter",{expandAll:void 0,failed:!1,success:!1,skipped:!1,slow:!1,onlyTests:!1,search:"",project:Bl,projectSort:void 0}),Fr=Ke(Ht.value.projectSort||"default"),ml=Vt(Ht.value?.project||Bl),Np=Se(()=>rm.value.length>1),mP=Se(()=>ml.value===Bl),Gg=Se(()=>!Np.value||ml.value===Bl?void 0:ml.value),Hr=Ke(Ht.value.search),Cb=new Map,vo=Se(()=>{if(Hr.value.startsWith("tag:")){if(!pt.value.tags)return{matcher:()=>!0};const e=Hr.value.slice(4).trim();let t=Cb.get(e);return t||(t=vP(e),Cb.set(e,t)),{matcher:n=>t.matcher(n.tags||[]),error:t.error}}return{matcher:e=>Hr.value===""||hP(e.name,Hr.value)}});function vP(e){if(!e)return{matcher:()=>!0};try{return{matcher:CR([e],pt.value.tags||[])}}catch(t){return{matcher:()=>!1,error:t.message}}}const yP={"&":"&","<":"<",">":">",'"':""","'":"'"};function v_(e){return e.replace(/[&<>"']/g,t=>yP[t])}const bP=Se(()=>{const e=Hr.value.toLowerCase();return e.length?new RegExp(`(${v_(e)})`,"gi"):null}),y_=Se(()=>Hr.value.trim()!==""),Ze=dr({failed:Ht.value.failed,success:Ht.value.success,skipped:Ht.value.skipped,slow:Ht.value.slow,onlyTests:Ht.value.onlyTests}),Mp=Se(()=>!!(Ze.failed||Ze.success||Ze.skipped||Ze.slow)),fd=Vt([]),Ml=Ke(!1),Eb=Se(()=>{const e=Ht.value.expandAll;return Kr.value.length>0?e!==!0:e!==!1}),wP=Se(()=>{const e=y_.value,t=Mp.value,n=Gg.value,i=Ze.onlyTests,o=$e.summary.filesFailed,l=$e.summary.filesSuccess,u=$e.summary.filesSkipped,f=$e.summary.filesRunning,h=fd.value;return $e.collectTestsTotal(e||t||!!n,i,h,{failed:o,success:l,skipped:u,running:f})});function xP(e){return e.type==="test"}function SP(e){return e.mode==="run"&&e.type==="test"}function Wn(e){return e.type==="file"}function Ui(e){return e.type==="file"||e.type==="suite"}function Lp(e){if(e.type!=="test")return!1;const t=e.result?.duration;if(typeof t!="number")return!1;const n=pt.value.slowTestThreshold;return typeof n=="number"&&t>n}function _P(e,t=$e.root.tasks){const n=[...t];return n.sort((i,o)=>{if(e==="duration-desc"||e==="duration-asc"){const l=i.duration??0,u=o.duration??0;if(l!==u)return e==="duration-desc"?u-l:l-u}else if(e==="asc"||e==="desc"){const l=i.projectName||"",u=o.projectName||"";if(l!==u)return e==="asc"?l.localeCompare(u):u.localeCompare(l)}return`${i.filepath}:${i.projectName}`.localeCompare(`${o.filepath}:${o.projectName}`)}),n}function fc(e,t=!1){let n=$e.nodes.get(e.id);if(n?(n.typecheck=!!e.meta&&"typecheck"in e.meta,n.state=e.result?.state,n.mode=e.mode,n.duration=typeof e.result?.duration=="number"?Math.round(e.result.duration):void 0,n.slow=!1,n.collectDuration=e.collectDuration,n.setupDuration=e.setupDuration,n.environmentLoad=e.environmentLoad,n.prepareDuration=e.prepareDuration):(n={id:e.id,parentId:"root",name:e.name,mode:e.mode,expandable:!0,expanded:Tf.value.size>0&&Tf.value.has(e.id),type:"file",children:new Set,tasks:[],typecheck:!!e.meta&&"typecheck"in e.meta,indent:0,duration:typeof e.result?.duration=="number"?Math.round(e.result.duration):void 0,slow:!1,filepath:e.filepath,projectName:e.projectName||"",projectNameColor:$e.colors.get(e.projectName||"")||Uu(e.projectName),collectDuration:e.collectDuration,setupDuration:e.setupDuration,environmentLoad:e.environmentLoad,prepareDuration:e.prepareDuration,state:e.result?.state},$e.nodes.set(e.id,n),$e.root.tasks.push(n)),t)for(let i=0;i<e.tasks.length;i++)$c(e.id,e.tasks[i],!0)}function b_(e,t){const n=$e.nodes.get(e);if(!n||!Ui(n))return;const i=ft.state.idMap.get(e);if(!(!i||!Ac(i)))return $c(n.parentId,i,t&&i.tasks.length>0),[n,i]}function kP(e){const t=$e.nodes.get(e);if(!t)return;const n=ft.state.idMap.get(e);!n||!Nl(n)||$c(t.parentId,n,!1)}function $c(e,t,n){const i=$e.nodes.get(e);let o;const l=typeof t.result?.duration=="number"?Math.round(t.result.duration):void 0;if(i&&(o=$e.nodes.get(t.id),o?(i.children.has(t.id)||(i.tasks.push(o),i.children.add(t.id)),o.name=t.name,o.mode=t.mode,o.duration=l,o.slow=Lp(t),o.state=t.result?.state):(Nl(t)?o={id:t.id,fileId:t.file.id,parentId:e,name:t.name,mode:t.mode,type:t.type,expandable:!1,expanded:!1,indent:i.indent+1,duration:l,slow:Lp(t),state:t.result?.state}:o={id:t.id,fileId:t.file.id,parentId:e,name:t.name,mode:t.mode,type:"suite",expandable:!0,expanded:Tf.value.size>0&&Tf.value.has(t.id),children:new Set,tasks:[],indent:i.indent+1,duration:l,slow:!1,state:t.result?.state},$e.nodes.set(t.id,o),i.tasks.push(o),i.children.add(t.id)),o&&n&&Ac(t)))for(let u=0;u<t.tasks.length;u++)$c(o.id,t.tasks[u],n)}function TP(e){const t=$e.nodes.get(e);if(!t||!Ui(t))return;const n=new Set(Kr.value);n.delete(t.id);const i=[...EP(t)];Kr.value=Array.from(n),rr.value=i}function CP(){Op($e.root.tasks);const e=[...rr.value.filter(Wn)];Op(e),Kr.value=[],Ht.value.expandAll=!0,rr.value=e}function Op(e){for(const t of e)Ui(t)&&(t.expanded=!1,Op(t.tasks))}function*w_(e,t){if(t&&(yield e.id),Ui(e))for(let n=0;n<e.tasks.length;n++)yield*w_(e.tasks[n],!0)}function*EP(e){const t=e.id,n=new Set(w_(e,!1));for(let i=0;i<rr.value.length;i++){const o=rr.value[i];if(o.id===t){o.expanded=!1,yield o;continue}if(n.has(o.id)){n.delete(o.id);continue}yield o}}const dd=Ke("idle"),ol=Se(()=>dd.value==="idle"),So=Ke([]),AP=Se(()=>(pt.value.tags||[]).reduce((t,n)=>(t[n.name]=n,t),{}));function $P(e,t,n){return e?__(e,t,n):!1}function Kg(e,t){const n=[...x_(e,t)];rr.value=n,fd.value=n.filter(Wn).map(i=>Cr(i.id))}function*x_(e,t){const n=Gg.value,i=_P(Fr.value);for(const o of i)n&&o.projectName!==n||(yield*S_(o,e,t))}function*S_(e,t,n){const i=new Set,o=new Map,l=[];let u;if(n.onlyTests)for(const[v,y]of Rp(e,i,w=>Ab(w,t,n)))l.push([v,y]);else{for(const[v,y]of Rp(e,i,w=>Ab(w,t,n)))Ui(y)?(o.set(y.id,v),Wn(y)?(v&&(u=y.id),l.push([v,y])):l.push([v||o.get(y.parentId)===!0,y])):l.push([v||o.get(y.parentId)===!0,y]);!u&&!Wn(e)&&"fileId"in e&&(u=e.fileId)}const f=new Set,h=[...MP(l,n.onlyTests,i,f,u)].reverse(),p=$e.nodes;for(const v of i){const y=p.get(v);y&&"expanded"in y&&(y.expanded=!0)}const g=new Set(h.filter(v=>Wn(v)||Ui(v)&&p.get(v.parentId)?.expanded).map(v=>v.id));yield*h.filter(v=>Wn(v)||g.has(v.parentId)&&p.get(v.parentId)?.expanded)}function NP(e,t,n,i,o){if(i){if(Wn(t))return o.has(t.id)?t:void 0;if(n.has(t.id)){const l=$e.nodes.get(t.parentId);return l&&Wn(l)&&o.add(l.id),t}}else if(e||n.has(t.id)||o.has(t.id)){const l=$e.nodes.get(t.parentId);return l&&Wn(l)&&o.add(l.id),t}}function*MP(e,t,n,i,o){for(let l=e.length-1;l>=0;l--){const[u,f]=e[l],h=Ui(f);if(!t&&o&&n.has(o)&&"fileId"in f&&f.fileId===o){h&&n.add(f.id);let p=$e.nodes.get(f.parentId);for(;p;)n.add(p.id),Wn(p)&&i.add(p.id),p=$e.nodes.get(p.parentId);yield f;continue}if(h){const p=NP(u,f,n,t,i);p&&(yield p)}else if(u){const p=$e.nodes.get(f.parentId);p&&Wn(p)&&i.add(p.id),yield f}}}function LP(e,t){if(t.slow&&e.type==="test"){const n=pt.value.slowTestThreshold;if(typeof n=="number"&&typeof e.result?.duration=="number"&&e.result.duration>n)return!0}return(t.success||t.failed)&&"result"in e&&(t.success&&e.result?.state==="pass"||t.failed&&e.result?.state==="fail")?!0:t.skipped&&"mode"in e?e.mode==="skip"||e.mode==="todo":!1}function __(e,t,n){if(t(e))if(n.success||n.failed||n.skipped||n.slow){if(LP(e,n))return!0}else return!0;return!1}function*Rp(e,t,n){const i=n(e);if(i)if(xP(e)){let o=$e.nodes.get(e.parentId);for(;o;)t.add(o.id),o=$e.nodes.get(o.parentId)}else if(Wn(e))t.add(e.id);else{t.add(e.id);let o=$e.nodes.get(e.parentId);for(;o;)t.add(o.id),o=$e.nodes.get(o.parentId)}if(yield[i,e],Ui(e))for(let o=0;o<e.tasks.length;o++)yield*Rp(e.tasks[o],t,n)}function Ab(e,t,n){const i=ft.state.idMap.get(e.id);return i?__(i,t,n):!1}function OP(e,t,n){const i=b_(e,!1);if(!i)return;const[o,l]=i;for(const p of l.tasks)$c(o.id,p,!1);o.expanded=!0;const u=new Set(Kr.value);u.add(o.id);const f=new Set(S_(o,t,n)),h=[...IP(o,f)];Kr.value=Array.from(u),rr.value=h}function RP(e,t){Yg($e.root.tasks,!1);const n=[...x_(e,t)];Ht.value.expandAll=!1,Kr.value=[],rr.value=n,fd.value=n.filter(Wn).map(i=>Cr(i.id))}function PP(e,t){if(e.size)for(const n of rr.value)e.has(n.id)&&(n.expanded=!0);else t&&Yg(rr.value.filter(Wn),!0)}function Yg(e,t){for(const n of e)Ui(n)&&(n.expanded=!0,Yg(n.tasks,!1));t&&(Ht.value.expandAll=!1,Kr.value=[])}function*IP(e,t){const n=e.id,i=new Set(Array.from(t).map(o=>o.id));for(const o of rr.value)o.id===n?(o.expanded=!0,i.has(o.id)||(yield e),yield*t):i.has(o.id)||(yield o)}function Xg(e){return i_(e).some(t=>t.result?.errors?.some(n=>typeof n?.message=="string"&&n.message.match(/Snapshot .* mismatched/)))}function DP(e,t,n,i){e.map(o=>[`${o.filepath}:${o.projectName||""}`,o]).sort(([o],[l])=>o.localeCompare(l)).map(([,o])=>fc(o,t)),$p.value=[...$e.root.tasks],Kg(n,{failed:i.failed,success:i.success,skipped:i.skipped,slow:i.slow,onlyTests:i.onlyTests})}function FP(e){queueMicrotask(()=>{const t=$e.pendingTasks,n=ft.state.idMap;for(const i of e)if(i[1]){const l=n.get(i[0]);if(l){let u=t.get(l.file.id);u||(u=new Set,t.set(l.file.id,u)),u.add(l.id)}}})}function zP(e,t){const n=$e.pendingTasks,o=ft.state.idMap.get(e);if(o?.type==="test"){let l=n.get(o.file.id);l||(l=new Set,n.set(o.file.id,l)),l.add(o.id),t.type==="internal:annotation"?o.annotations.push(t.annotation):o.artifacts.push(t)}}function $b(e,t,n,i,o,l){e&&UP(n);const u=!e;queueMicrotask(()=>{t?jP(u):WP(u)}),queueMicrotask(()=>{VP(n,l)}),queueMicrotask(()=>{t&&(n.failedSnapshot=$p.value&&Xg($p.value.map(f=>Cr(f.id))),n.failedSnapshotEnabled=!0)}),queueMicrotask(()=>{qP(i,o,t)})}function*HP(){yield*rr.value.filter(SP)}function BP(){const e=ft.state.idMap;let t;for(const n of HP())t=e.get(n.parentId),t&&Ac(t)&&t.mode==="todo"&&(t=e.get(n.id),t&&(t.mode="todo"))}function jP(e){const t=ft.state.getFiles(),n=$e.nodes,i=t.filter(l=>!n.has(l.id));for(let l=0;l<i.length;l++)fc(i[l],e),Cf(i[l].tasks);const o=$e.root.tasks;for(let l=0;l<o.length;l++){const u=o[l],f=Cr(u.id);!f||(fc(f,e),!f.tasks?.length)||Cf(f.tasks)}}function WP(e){const t=new Map($e.pendingTasks.entries());$e.pendingTasks.clear();const n=$e.nodes,i=Array.from(t.keys()).filter(f=>!n.has(f)).map(f=>Cr(f)).filter(Boolean);let o;for(let f=0;f<i.length;f++)o=i[f],fc(o,!1),Cf(o.tasks),t.delete(o.id);const l=ft.state.idMap,u=$e.root.tasks;for(let f=0;f<u.length;f++){const h=u[f],p=Cr(h.id);if(!p)continue;const g=t.get(p.id);g&&(fc(p,e),Cf(Array.from(g,v=>l.get(v)).filter(Boolean)))}}function qP(e,t,n=!1){const i=Ht.value.expandAll,o=i!==!0,l=new Set(Kr.value),u=l.size>0&&i===!1||o;queueMicrotask(()=>{Nb(e,t,n)}),Ml.value||queueMicrotask(()=>{(rr.value.length||n)&&(Ml.value=!0)}),u&&(queueMicrotask(()=>{PP(l,n),o&&(Ht.value.expandAll=!1)}),queueMicrotask(()=>{Nb(e,t,n)}))}function Nb(e,t,n){Kg(e,t),n&&(BP(),dd.value="idle")}function Cf(e){let t;for(let n=0;n<e.length;n++)t=e[n],Ac(t)?b_(t.id,!0):kP(t.id)}function UP(e){e.files=0,e.time="",e.filesFailed=0,e.filesSuccess=0,e.filesIgnore=0,e.filesRunning=0,e.filesSkipped=0,e.filesTodo=0,e.testsFailed=0,e.testsSuccess=0,e.testsIgnore=0,e.testsSkipped=0,e.testsTodo=0,e.testsExpectedFail=0,e.testsSlow=0,e.totalTests=0,e.failedSnapshotEnabled=!1}function VP(e,t){const n=ft.state.idMap,i=new Map($e.root.tasks.filter(u=>n.has(u.id)).map(u=>[u.id,u])),o=Array.from(i.values(),u=>[u.id,Cr(u.id)]),l={files:i.size,time:t>1e3?`${(t/1e3).toFixed(2)}s`:`${Math.round(t)}ms`,filesFailed:0,filesSuccess:0,filesIgnore:0,filesRunning:0,filesSkipped:0,filesTodo:0,testsFailed:0,testsSuccess:0,testsIgnore:0,testsSkipped:0,testsTodo:0,testsExpectedFail:0,testsSlow:0,totalTests:0};for(const[u,f]of o){if(!f)continue;f.result?.state==="fail"?l.filesFailed++:f.result?.state==="pass"?l.filesSuccess++:f.mode==="skip"?(l.filesIgnore++,l.filesSkipped++):f.mode==="todo"?(l.filesIgnore++,l.filesTodo++):l.filesRunning++;const{failed:h,success:p,skipped:g,total:v,ignored:y,todo:w,expectedFail:$,slow:_}=k_(f);l.totalTests+=v,l.testsFailed+=h,l.testsSuccess+=p,l.testsSkipped+=g,l.testsTodo+=w,l.testsExpectedFail+=$,l.testsSlow+=_,l.testsIgnore+=y}e.files=l.files,e.time=l.time,e.filesFailed=l.filesFailed,e.filesSuccess=l.filesSuccess,e.filesIgnore=l.filesIgnore,e.filesRunning=l.filesRunning,e.filesSkipped=l.filesSkipped,e.filesTodo=l.filesTodo,e.testsFailed=l.testsFailed,e.testsSuccess=l.testsSuccess,e.testsTodo=l.testsTodo,e.testsExpectedFail=l.testsExpectedFail,e.testsSlow=l.testsSlow,e.testsIgnore=l.testsIgnore,e.testsSkipped=l.testsSkipped,e.totalTests=l.totalTests}function k_(e,t=()=>!0,n){const i={failed:0,success:0,skipped:0,running:0,total:0,ignored:0,todo:0,expectedFail:0,slow:0};for(const o of T_(e))(!n||$P(o,t,n))&&(i.total++,Lp(o)&&i.slow++,o.result?.state==="fail"?i.failed++:o.result?.state==="pass"?o.fails?i.expectedFail++:i.success++:o.mode==="skip"?(i.ignored++,i.skipped++):o.mode==="todo"&&(i.ignored++,i.todo++));return i.running=i.total-i.failed-i.success-i.ignored-i.expectedFail,i}function GP(e,t,n,i,o,l){if(t)return n.map(u=>k_(u,o,l)).reduce((u,{failed:f,success:h,ignored:p,running:g})=>(u.failed+=f,u.success+=h,u.skipped+=p,u.running+=g,u),{failed:0,success:0,skipped:0,running:0});if(e){const u={failed:0,success:0,skipped:0,running:0},f=!l.success&&!l.failed,h=l.failed||f,p=l.success||f;for(const g of n)g.result?.state==="fail"?u.failed+=h?1:0:g.result?.state==="pass"?u.success+=p?1:0:g.mode==="skip"||g.mode==="todo"||u.running++;return u}return i}function*T_(e){const t=bs(e);let n;for(let i=0;i<t.length;i++)n=t[i],Nl(n)?yield n:yield*T_(n.tasks)}class KP{constructor(t=[],n=new Map,i=!1,o=500,l={id:"vitest-root-node",expandable:!0,expanded:!0,tasks:[]},u=new Map,f=new Map,h=dr({files:0,time:"",filesFailed:0,filesSuccess:0,filesIgnore:0,filesRunning:0,filesSkipped:0,filesSnapshotFailed:0,filesTodo:0,testsFailed:0,testsSuccess:0,testsIgnore:0,testsSkipped:0,testsTodo:0,testsExpectedFail:0,testsSlow:0,totalTests:0,failedSnapshot:!1,failedSnapshotEnabled:!1})){this.projects=t,this.colors=n,this.onTaskUpdateCalled=i,this.resumeEndTimeout=o,this.root=l,this.pendingTasks=u,this.nodes=f,this.summary=h,this.rafCollector=YN(this.runCollect.bind(this),{fpsLimit:10,immediate:!1})}rafCollector;resumeEndRunId;startTime=0;executionTime=0;loadFiles(t,n){this.projects.splice(0,this.projects.length,...n.map(i=>i.name)),this.colors=new Map(n.map(i=>[i.name,i.color])),DP(t,!0,vo.value.matcher,{failed:Ze.failed,success:Ze.success,skipped:Ze.skipped,slow:Ze.slow,onlyTests:Ze.onlyTests})}startRun(){this.startTime=performance.now(),this.resumeEndRunId=setTimeout(()=>this.endRun(),this.resumeEndTimeout),this.collect(!0,!1)}recordTestArtifact(t,n){zP(t,n),this.onTaskUpdateCalled||(clearTimeout(this.resumeEndRunId),this.onTaskUpdateCalled=!0,this.collect(!0,!1,!1),this.rafCollector.resume())}resumeRun(t,n){FP(t),this.onTaskUpdateCalled||(clearTimeout(this.resumeEndRunId),this.onTaskUpdateCalled=!0,this.collect(!0,!1,!1),this.rafCollector.resume())}endRun(t=performance.now()-this.startTime){this.executionTime=t,this.rafCollector.pause(),this.onTaskUpdateCalled=!1,this.collect(!1,!0)}runCollect(){this.collect(!1,!1)}collect(t,n,i=!0){i?queueMicrotask(()=>{$b(t,n,this.summary,vo.value.matcher,{failed:Ze.failed,success:Ze.success,skipped:Ze.skipped,slow:Ze.slow,onlyTests:Ze.onlyTests},n?this.executionTime:performance.now()-this.startTime)}):$b(t,n,this.summary,vo.value.matcher,{failed:Ze.failed,success:Ze.success,skipped:Ze.skipped,slow:Ze.slow,onlyTests:Ze.onlyTests},n?this.executionTime:performance.now()-this.startTime)}collectTestsTotal(t,n,i,o){return GP(t,n,i,o,vo.value.matcher,{failed:Ze.failed,success:Ze.success,skipped:Ze.skipped,slow:Ze.slow,onlyTests:Ze.onlyTests})}collapseNode(t){queueMicrotask(()=>{TP(t)})}expandNode(t){queueMicrotask(()=>{OP(t,vo.value.matcher,{failed:Ze.failed,success:Ze.success,skipped:Ze.skipped,slow:Ze.slow,onlyTests:Ze.onlyTests})})}collapseAllNodes(){queueMicrotask(()=>{CP()})}expandAllNodes(){queueMicrotask(()=>{RP(vo.value.matcher,{failed:Ze.failed,success:Ze.success,skipped:Ze.skipped,slow:Ze.slow,onlyTests:Ze.onlyTests})})}filterNodes(){queueMicrotask(()=>{Kg(vo.value.matcher,{failed:Ze.failed,success:Ze.success,skipped:Ze.skipped,slow:Ze.slow,onlyTests:Ze.onlyTests})})}}const $e=new KP;function Jg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vu={exports:{}},YP=Vu.exports,Mb;function Ho(){return Mb||(Mb=1,(function(e,t){(function(n,i){e.exports=i()})(YP,(function(){var n=navigator.userAgent,i=navigator.platform,o=/gecko\/\d/i.test(n),l=/MSIE \d/.test(n),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(n),f=/Edge\/(\d+)/.exec(n),h=l||u||f,p=h&&(l?document.documentMode||6:+(f||u)[1]),g=!f&&/WebKit\//.test(n),v=g&&/Qt\/\d+\.\d+/.test(n),y=!f&&/Chrome\/(\d+)/.exec(n),w=y&&+y[1],$=/Opera\//.test(n),_=/Apple Computer/.test(navigator.vendor),C=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(n),E=/PhantomJS/.test(n),L=_&&(/Mobile\/\w+/.test(n)||navigator.maxTouchPoints>2),D=/Android/.test(n),N=L||D||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(n),I=L||/Mac/.test(i),q=/\bCrOS\b/.test(n),X=/win/i.test(i),ie=$&&n.match(/Version\/(\d*\.\d*)/);ie&&(ie=Number(ie[1])),ie&&ie>=15&&($=!1,g=!0);var J=I&&(v||$&&(ie==null||ie<12.11)),U=o||h&&p>=9;function K(r){return new RegExp("(^|\\s)"+r+"(?:$|\\s)\\s*")}var P=function(r,s){var c=r.className,a=K(s).exec(c);if(a){var d=c.slice(a.index+a[0].length);r.className=c.slice(0,a.index)+(d?a[1]+d:"")}};function O(r){for(var s=r.childNodes.length;s>0;--s)r.removeChild(r.firstChild);return r}function k(r,s){return O(r).appendChild(s)}function S(r,s,c,a){var d=document.createElement(r);if(c&&(d.className=c),a&&(d.style.cssText=a),typeof s=="string")d.appendChild(document.createTextNode(s));else if(s)for(var m=0;m<s.length;++m)d.appendChild(s[m]);return d}function R(r,s,c,a){var d=S(r,s,c,a);return d.setAttribute("role","presentation"),d}var B;document.createRange?B=function(r,s,c,a){var d=document.createRange();return d.setEnd(a||r,c),d.setStart(r,s),d}:B=function(r,s,c){var a=document.body.createTextRange();try{a.moveToElementText(r.parentNode)}catch{return a}return a.collapse(!0),a.moveEnd("character",c),a.moveStart("character",s),a};function ae(r,s){if(s.nodeType==3&&(s=s.parentNode),r.contains)return r.contains(s);do if(s.nodeType==11&&(s=s.host),s==r)return!0;while(s=s.parentNode)}function ve(r){var s=r.ownerDocument||r,c;try{c=r.activeElement}catch{c=s.body||null}for(;c&&c.shadowRoot&&c.shadowRoot.activeElement;)c=c.shadowRoot.activeElement;return c}function _e(r,s){var c=r.className;K(s).test(c)||(r.className+=(c?" ":"")+s)}function Be(r,s){for(var c=r.split(" "),a=0;a<c.length;a++)c[a]&&!K(c[a]).test(s)&&(s+=" "+c[a]);return s}var Ee=function(r){r.select()};L?Ee=function(r){r.selectionStart=0,r.selectionEnd=r.value.length}:h&&(Ee=function(r){try{r.select()}catch{}});function Ge(r){return r.display.wrapper.ownerDocument}function Ue(r){return He(r.display.wrapper)}function He(r){return r.getRootNode?r.getRootNode():r.ownerDocument}function Re(r){return Ge(r).defaultView}function z(r){var s=Array.prototype.slice.call(arguments,1);return function(){return r.apply(null,s)}}function Z(r,s,c){s||(s={});for(var a in r)r.hasOwnProperty(a)&&(c!==!1||!s.hasOwnProperty(a))&&(s[a]=r[a]);return s}function re(r,s,c,a,d){s==null&&(s=r.search(/[^\s\u00a0]/),s==-1&&(s=r.length));for(var m=a||0,b=d||0;;){var x=r.indexOf(" ",m);if(x<0||x>=s)return b+(s-m);b+=x-m,b+=c-b%c,m=x+1}}var le=function(){this.id=null,this.f=null,this.time=0,this.handler=z(this.onTimeout,this)};le.prototype.onTimeout=function(r){r.id=0,r.time<=+new Date?r.f():setTimeout(r.handler,r.time-+new Date)},le.prototype.set=function(r,s){this.f=s;var c=+new Date+r;(!this.id||c<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,r),this.time=c)};function ce(r,s){for(var c=0;c<r.length;++c)if(r[c]==s)return c;return-1}var F=50,j={toString:function(){return"CodeMirror.Pass"}},ee={scroll:!1},de={origin:"*mouse"},he={origin:"+move"};function me(r,s,c){for(var a=0,d=0;;){var m=r.indexOf(" ",a);m==-1&&(m=r.length);var b=m-a;if(m==r.length||d+b>=s)return a+Math.min(b,s-d);if(d+=m-a,d+=c-d%c,a=m+1,d>=s)return a}}var Ce=[""];function Ae(r){for(;Ce.length<=r;)Ce.push(xe(Ce)+" ");return Ce[r]}function xe(r){return r[r.length-1]}function be(r,s){for(var c=[],a=0;a<r.length;a++)c[a]=s(r[a],a);return c}function Q(r,s,c){for(var a=0,d=c(s);a<r.length&&c(r[a])<=d;)a++;r.splice(a,0,s)}function ue(){}function oe(r,s){var c;return Object.create?c=Object.create(r):(ue.prototype=r,c=new ue),s&&Z(s,c),c}var Pe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function et(r){return/\w/.test(r)||r>""&&(r.toUpperCase()!=r.toLowerCase()||Pe.test(r))}function ct(r,s){return s?s.source.indexOf("\\w")>-1&&et(r)?!0:s.test(r):et(r)}function dt(r){for(var s in r)if(r.hasOwnProperty(s)&&r[s])return!1;return!0}var Ot=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ut(r){return r.charCodeAt(0)>=768&&Ot.test(r)}function en(r,s,c){for(;(c<0?s>0:s<r.length)&&ut(r.charAt(s));)s+=c;return s}function Gt(r,s,c){for(var a=s>c?-1:1;;){if(s==c)return s;var d=(s+c)/2,m=a<0?Math.ceil(d):Math.floor(d);if(m==s)return r(m)?s:c;r(m)?c=m:s=m+a}}function Vn(r,s,c,a){if(!r)return a(s,c,"ltr",0);for(var d=!1,m=0;m<r.length;++m){var b=r[m];(b.from<c&&b.to>s||s==c&&b.to==s)&&(a(Math.max(b.from,s),Math.min(b.to,c),b.level==1?"rtl":"ltr",m),d=!0)}d||a(s,c,"ltr")}var Jr=null;function Wt(r,s,c){var a;Jr=null;for(var d=0;d<r.length;++d){var m=r[d];if(m.from<s&&m.to>s)return d;m.to==s&&(m.from!=m.to&&c=="before"?a=d:Jr=d),m.from==s&&(m.from!=m.to&&c!="before"?a=d:Jr=d)}return a??Jr}var Gn=(function(){var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",s="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function c(A){return A<=247?r.charAt(A):1424<=A&&A<=1524?"R":1536<=A&&A<=1785?s.charAt(A-1536):1774<=A&&A<=2220?"r":8192<=A&&A<=8203?"w":A==8204?"b":"L"}var a=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,d=/[stwN]/,m=/[LRr]/,b=/[Lb1n]/,x=/[1n]/;function T(A,H,G){this.level=A,this.from=H,this.to=G}return function(A,H){var G=H=="ltr"?"L":"R";if(A.length==0||H=="ltr"&&!a.test(A))return!1;for(var se=A.length,ne=[],pe=0;pe<se;++pe)ne.push(c(A.charCodeAt(pe)));for(var we=0,Te=G;we<se;++we){var Le=ne[we];Le=="m"?ne[we]=Te:Te=Le}for(var De=0,Oe=G;De<se;++De){var ze=ne[De];ze=="1"&&Oe=="r"?ne[De]="n":m.test(ze)&&(Oe=ze,ze=="r"&&(ne[De]="R"))}for(var Je=1,Ve=ne[0];Je<se-1;++Je){var lt=ne[Je];lt=="+"&&Ve=="1"&&ne[Je+1]=="1"?ne[Je]="1":lt==","&&Ve==ne[Je+1]&&(Ve=="1"||Ve=="n")&&(ne[Je]=Ve),Ve=lt}for(var Ct=0;Ct<se;++Ct){var sn=ne[Ct];if(sn==",")ne[Ct]="N";else if(sn=="%"){var Rt=void 0;for(Rt=Ct+1;Rt<se&&ne[Rt]=="%";++Rt);for(var Xn=Ct&&ne[Ct-1]=="!"||Rt<se&&ne[Rt]=="1"?"1":"N",Ln=Ct;Ln<Rt;++Ln)ne[Ln]=Xn;Ct=Rt-1}}for(var Kt=0,On=G;Kt<se;++Kt){var cn=ne[Kt];On=="L"&&cn=="1"?ne[Kt]="L":m.test(cn)&&(On=cn)}for(var Jt=0;Jt<se;++Jt)if(d.test(ne[Jt])){var Yt=void 0;for(Yt=Jt+1;Yt<se&&d.test(ne[Yt]);++Yt);for(var zt=(Jt?ne[Jt-1]:G)=="L",Rn=(Yt<se?ne[Yt]:G)=="L",Xs=zt==Rn?zt?"L":"R":G,co=Jt;co<Yt;++co)ne[co]=Xs;Jt=Yt-1}for(var mn=[],ni,ln=0;ln<se;)if(b.test(ne[ln])){var dh=ln;for(++ln;ln<se&&b.test(ne[ln]);++ln);mn.push(new T(0,dh,ln))}else{var ki=ln,Jo=mn.length,Zo=H=="rtl"?1:0;for(++ln;ln<se&&ne[ln]!="L";++ln);for(var _n=ki;_n<ln;)if(x.test(ne[_n])){ki<_n&&(mn.splice(Jo,0,new T(1,ki,_n)),Jo+=Zo);var Js=_n;for(++_n;_n<ln&&x.test(ne[_n]);++_n);mn.splice(Jo,0,new T(2,Js,_n)),Jo+=Zo,ki=_n}else++_n;ki<ln&&mn.splice(Jo,0,new T(1,ki,ln))}return H=="ltr"&&(mn[0].level==1&&(ni=A.match(/^\s+/))&&(mn[0].from=ni[0].length,mn.unshift(new T(0,0,ni[0].length))),xe(mn).level==1&&(ni=A.match(/\s+$/))&&(xe(mn).to-=ni[0].length,mn.push(new T(0,se-ni[0].length,se)))),H=="rtl"?mn.reverse():mn}})();function at(r,s){var c=r.order;return c==null&&(c=r.order=Gn(r.text,s)),c}var Bo=[],Xe=function(r,s,c){if(r.addEventListener)r.addEventListener(s,c,!1);else if(r.attachEvent)r.attachEvent("on"+s,c);else{var a=r._handlers||(r._handlers={});a[s]=(a[s]||Bo).concat(c)}};function vi(r,s){return r._handlers&&r._handlers[s]||Bo}function hn(r,s,c){if(r.removeEventListener)r.removeEventListener(s,c,!1);else if(r.detachEvent)r.detachEvent("on"+s,c);else{var a=r._handlers,d=a&&a[s];if(d){var m=ce(d,c);m>-1&&(a[s]=d.slice(0,m).concat(d.slice(m+1)))}}}function It(r,s){var c=vi(r,s);if(c.length)for(var a=Array.prototype.slice.call(arguments,2),d=0;d<c.length;++d)c[d].apply(null,a)}function Dt(r,s,c){return typeof s=="string"&&(s={type:s,preventDefault:function(){this.defaultPrevented=!0}}),It(r,c||s.type,r,s),An(s)||s.codemirrorIgnore}function yr(r){var s=r._handlers&&r._handlers.cursorActivity;if(s)for(var c=r.curOp.cursorActivityHandlers||(r.curOp.cursorActivityHandlers=[]),a=0;a<s.length;++a)ce(c,s[a])==-1&&c.push(s[a])}function Kn(r,s){return vi(r,s).length>0}function Er(r){r.prototype.on=function(s,c){Xe(this,s,c)},r.prototype.off=function(s,c){hn(this,s,c)}}function pn(r){r.preventDefault?r.preventDefault():r.returnValue=!1}function Ts(r){r.stopPropagation?r.stopPropagation():r.cancelBubble=!0}function An(r){return r.defaultPrevented!=null?r.defaultPrevented:r.returnValue==!1}function Ji(r){pn(r),Ts(r)}function jl(r){return r.target||r.srcElement}function Ar(r){var s=r.which;return s==null&&(r.button&1?s=1:r.button&2?s=3:r.button&4&&(s=2)),I&&r.ctrlKey&&s==1&&(s=3),s}var bd=(function(){if(h&&p<9)return!1;var r=S("div");return"draggable"in r||"dragDrop"in r})(),Cs;function Pc(r){if(Cs==null){var s=S("span","");k(r,S("span",[s,document.createTextNode("x")])),r.firstChild.offsetHeight!=0&&(Cs=s.offsetWidth<=1&&s.offsetHeight>2&&!(h&&p<8))}var c=Cs?S("span",""):S("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}var Wl;function Zi(r){if(Wl!=null)return Wl;var s=k(r,document.createTextNode("AخA")),c=B(s,0,1).getBoundingClientRect(),a=B(s,1,2).getBoundingClientRect();return O(r),!c||c.left==c.right?!1:Wl=a.right-c.right<3}var br=`
|
|
53
53
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
})();
|
|
24
24
|
</script>
|
|
25
25
|
<!-- !LOAD_METADATA! -->
|
|
26
|
-
<script type="module" src="./assets/index-
|
|
26
|
+
<script type="module" src="./assets/index-DaKof6xz.js"></script>
|
|
27
27
|
<link rel="stylesheet" href="./assets/index-Da0hb3oU.css">
|
|
28
28
|
</head>
|
|
29
29
|
<body>
|
package/dist/client/__vitest_browser__/{orchestrator-DM4mHHP0.js → orchestrator-B-wB8WWP.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getBrowserState, a as getConfig, r as relative, b as generateFileHash } from "./utils-
|
|
1
|
+
import { g as getBrowserState, a as getConfig, r as relative, b as generateFileHash } from "./utils-BsFW67Gk.js";
|
|
2
2
|
import { channel, globalChannel, client } from "@vitest/browser/client";
|
|
3
3
|
import { Traces } from "vitest/internal/browser";
|
|
4
4
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as resolve, m as moduleRunner, d as getWorkerState, g as getBrowserState, e as getTestName, a as getConfig } from "./utils-
|
|
1
|
+
import { c as resolve, m as moduleRunner, d as getWorkerState, g as getBrowserState, e as getTestName, a as getConfig } from "./utils-BsFW67Gk.js";
|
|
2
2
|
import { onCancel, globalChannel, channel, client } from "@vitest/browser/client";
|
|
3
3
|
import { userEvent, page, server } from "vitest/browser";
|
|
4
4
|
import { getSafeTimers, DecodedMap as DecodedMap$1, getOriginalPosition as getOriginalPosition$1, loadDiffConfig, loadSnapshotSerializers, takeCoverageInsideWorker, browserFormat, Traces, setupCommonEnv, startCoverageInsideWorker, stopCoverageInsideWorker, startTests, collectTests, SpyModule } from "vitest/internal/browser";
|
|
@@ -3065,7 +3065,7 @@ function createSuiteCollector(name, factory = () => {
|
|
|
3065
3065
|
if (task2.mode === "run" && !handler) {
|
|
3066
3066
|
task2.mode = "todo";
|
|
3067
3067
|
}
|
|
3068
|
-
if (options.concurrent
|
|
3068
|
+
if (options.concurrent ?? (!options.sequential && runner.config.sequence.concurrent)) {
|
|
3069
3069
|
task2.concurrent = true;
|
|
3070
3070
|
}
|
|
3071
3071
|
task2.shuffle = suiteOptions == null ? void 0 : suiteOptions.shuffle;
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
{__VITEST_INJECTOR__}
|
|
27
27
|
{__VITEST_ERROR_CATCHER__}
|
|
28
28
|
{__VITEST_SCRIPTS__}
|
|
29
|
-
<script type="module" crossorigin src="/__vitest_browser__/orchestrator-
|
|
30
|
-
<link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-
|
|
29
|
+
<script type="module" crossorigin src="/__vitest_browser__/orchestrator-B-wB8WWP.js"></script>
|
|
30
|
+
<link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-BsFW67Gk.js">
|
|
31
31
|
</head>
|
|
32
32
|
<body>
|
|
33
33
|
<div id="vitest-tester"></div>
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<link rel="icon" href="{__VITEST_FAVICON__}" type="image/svg+xml">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Vitest Browser Tester</title>
|
|
8
|
-
<script type="module" crossorigin src="/__vitest_browser__/tester-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-
|
|
8
|
+
<script type="module" crossorigin src="/__vitest_browser__/tester-DQAp97S5.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-BsFW67Gk.js">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
</body>
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { PNG } from 'pngjs';
|
|
|
18
18
|
import { diff } from '@blazediff/core';
|
|
19
19
|
import { WebSocketServer } from 'ws';
|
|
20
20
|
|
|
21
|
-
var version = "4.1.
|
|
21
|
+
var version = "4.1.7";
|
|
22
22
|
|
|
23
23
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
24
24
|
function normalizeWindowsPath(input = "") {
|
|
@@ -702,7 +702,7 @@ async function resolveOrchestrator(globalServer, url, res) {
|
|
|
702
702
|
__VITEST_TYPE__: "\"orchestrator\"",
|
|
703
703
|
__VITEST_SESSION_ID__: JSON.stringify(sessionId),
|
|
704
704
|
__VITEST_TESTER_ID__: "\"none\"",
|
|
705
|
-
__VITEST_OTEL_CARRIER__:
|
|
705
|
+
__VITEST_OTEL_CARRIER__: JSON.stringify(session?.otelCarrier ?? null),
|
|
706
706
|
__VITEST_PROVIDED_CONTEXT__: JSON.stringify(stringify(browserProject.project.getProvidedContext())),
|
|
707
707
|
__VITEST_API_TOKEN__: JSON.stringify(globalServer.vitest.config.api.token)
|
|
708
708
|
});
|
|
@@ -2090,7 +2090,8 @@ function resolveOptions({ context, name, options, testName }) {
|
|
|
2090
2090
|
testFileDirectory: relative(root, dirname(context.testPath)),
|
|
2091
2091
|
testFileName: basename(context.testPath),
|
|
2092
2092
|
testName: sanitize(testName, false),
|
|
2093
|
-
browserName: context.project.config.browser.name
|
|
2093
|
+
browserName: context.project.config.browser.name,
|
|
2094
|
+
project: context.project
|
|
2094
2095
|
};
|
|
2095
2096
|
return {
|
|
2096
2097
|
codec: getCodec(extension),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest/browser",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.7",
|
|
5
5
|
"description": "Browser running for Vitest",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"providers"
|
|
58
58
|
],
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"vitest": "4.1.
|
|
60
|
+
"vitest": "4.1.7"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@blazediff/core": "1.9.1",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"sirv": "^3.0.2",
|
|
67
67
|
"tinyrainbow": "^3.1.0",
|
|
68
68
|
"ws": "^8.19.0",
|
|
69
|
-
"@vitest/mocker": "4.1.
|
|
70
|
-
"@vitest/utils": "4.1.
|
|
69
|
+
"@vitest/mocker": "4.1.7",
|
|
70
|
+
"@vitest/utils": "4.1.7"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@opentelemetry/api": "^1.9.0",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"ivya": "^1.8.0",
|
|
80
80
|
"mime": "^4.1.0",
|
|
81
81
|
"pathe": "^2.0.3",
|
|
82
|
-
"vitest": "4.1.
|
|
83
|
-
"
|
|
82
|
+
"@vitest/runner": "4.1.7",
|
|
83
|
+
"vitest": "4.1.7"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"typecheck": "tsc -p ./src/client/tsconfig.json --noEmit",
|