vitest-tiny-reporter 1.3.4 → 1.3.5

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,58 +1,2346 @@
1
- import e from "tinyrainbow";
2
- function h(s) {
3
- return s == null && (s = []), Array.isArray(s) ? s : [s];
1
+ import T from "tinyrainbow";
2
+ function Pt(e, t) {
3
+ return t.forEach(function(n) {
4
+ n && typeof n != "string" && !Array.isArray(n) && Object.keys(n).forEach(function(r) {
5
+ if (r !== "default" && !(r in e)) {
6
+ var s = Object.getOwnPropertyDescriptor(n, r);
7
+ Object.defineProperty(e, r, s.get ? s : {
8
+ enumerable: !0,
9
+ get: function() {
10
+ return n[r];
11
+ }
12
+ });
13
+ }
14
+ });
15
+ }), Object.freeze(e);
4
16
  }
5
- function g(s) {
6
- return s.type === "test";
17
+ function jn(e, t) {
18
+ const n = Object.keys(e), r = t === null ? n : n.sort(t);
19
+ if (Object.getOwnPropertySymbols)
20
+ for (const s of Object.getOwnPropertySymbols(e))
21
+ Object.getOwnPropertyDescriptor(e, s).enumerable && r.push(s);
22
+ return r;
7
23
  }
8
- function a(s) {
9
- const t = [], r = h(s);
24
+ function ge(e, t, n, r, s, o, i = ": ") {
25
+ let u = "", c = 0, l = e.next();
26
+ if (!l.done) {
27
+ u += t.spacingOuter;
28
+ const f = n + t.indent;
29
+ for (; !l.done; ) {
30
+ if (u += f, c++ === t.maxWidth) {
31
+ u += "…";
32
+ break;
33
+ }
34
+ const m = o(l.value[0], t, f, r, s), g = o(l.value[1], t, f, r, s);
35
+ u += m + i + g, l = e.next(), l.done ? t.min || (u += ",") : u += `,${t.spacingInner}`;
36
+ }
37
+ u += t.spacingOuter + n;
38
+ }
39
+ return u;
40
+ }
41
+ function Me(e, t, n, r, s, o) {
42
+ let i = "", u = 0, c = e.next();
43
+ if (!c.done) {
44
+ i += t.spacingOuter;
45
+ const l = n + t.indent;
46
+ for (; !c.done; ) {
47
+ if (i += l, u++ === t.maxWidth) {
48
+ i += "…";
49
+ break;
50
+ }
51
+ i += o(c.value, t, l, r, s), c = e.next(), c.done ? t.min || (i += ",") : i += `,${t.spacingInner}`;
52
+ }
53
+ i += t.spacingOuter + n;
54
+ }
55
+ return i;
56
+ }
57
+ function me(e, t, n, r, s, o) {
58
+ let i = "";
59
+ e = e instanceof ArrayBuffer ? new DataView(e) : e;
60
+ const u = (l) => l instanceof DataView, c = u(e) ? e.byteLength : e.length;
61
+ if (c > 0) {
62
+ i += t.spacingOuter;
63
+ const l = n + t.indent;
64
+ for (let f = 0; f < c; f++) {
65
+ if (i += l, f === t.maxWidth) {
66
+ i += "…";
67
+ break;
68
+ }
69
+ (u(e) || f in e) && (i += o(u(e) ? e.getInt8(f) : e[f], t, l, r, s)), f < c - 1 ? i += `,${t.spacingInner}` : t.min || (i += ",");
70
+ }
71
+ i += t.spacingOuter + n;
72
+ }
73
+ return i;
74
+ }
75
+ function Pe(e, t, n, r, s, o) {
76
+ let i = "";
77
+ const u = jn(e, t.compareKeys);
78
+ if (u.length > 0) {
79
+ i += t.spacingOuter;
80
+ const c = n + t.indent;
81
+ for (let l = 0; l < u.length; l++) {
82
+ const f = u[l], m = o(f, t, c, r, s), g = o(e[f], t, c, r, s);
83
+ i += `${c + m}: ${g}`, l < u.length - 1 ? i += `,${t.spacingInner}` : t.min || (i += ",");
84
+ }
85
+ i += t.spacingOuter + n;
86
+ }
87
+ return i;
88
+ }
89
+ const Fn = typeof Symbol == "function" && Symbol.for ? /* @__PURE__ */ Symbol.for("jest.asymmetricMatcher") : 1267621, se = " ", Ln = (e, t, n, r, s, o) => {
90
+ const i = e.toString();
91
+ if (i === "ArrayContaining" || i === "ArrayNotContaining")
92
+ return ++r > t.maxDepth ? `[${i}]` : `${i + se}[${me(e.sample, t, n, r, s, o)}]`;
93
+ if (i === "ObjectContaining" || i === "ObjectNotContaining")
94
+ return ++r > t.maxDepth ? `[${i}]` : `${i + se}{${Pe(e.sample, t, n, r, s, o)}}`;
95
+ if (i === "StringMatching" || i === "StringNotMatching" || i === "StringContaining" || i === "StringNotContaining")
96
+ return i + se + o(e.sample, t, n, r, s);
97
+ if (typeof e.toAsymmetricMatcher != "function")
98
+ throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);
99
+ return e.toAsymmetricMatcher();
100
+ }, Dn = (e) => e && e.$$typeof === Fn, zn = {
101
+ serialize: Ln,
102
+ test: Dn
103
+ }, vn = " ", jt = /* @__PURE__ */ new Set(["DOMStringMap", "NamedNodeMap"]), Un = /^(?:HTML\w*Collection|NodeList)$/;
104
+ function Wn(e) {
105
+ return jt.has(e) || Un.test(e);
106
+ }
107
+ const Vn = (e) => e && e.constructor && !!e.constructor.name && Wn(e.constructor.name);
108
+ function Kn(e) {
109
+ return e.constructor.name === "NamedNodeMap";
110
+ }
111
+ const Bn = (e, t, n, r, s, o) => {
112
+ const i = e.constructor.name;
113
+ return ++r > t.maxDepth ? `[${i}]` : (t.min ? "" : i + vn) + (jt.has(i) ? `{${Pe(Kn(e) ? [...e].reduce((u, c) => (u[c.name] = c.value, u), {}) : { ...e }, t, n, r, s, o)}}` : `[${me([...e], t, n, r, s, o)}]`);
114
+ }, qn = {
115
+ serialize: Bn,
116
+ test: Vn
117
+ };
118
+ function Ft(e) {
119
+ return e.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
120
+ }
121
+ function je(e, t, n, r, s, o, i) {
122
+ const u = r + n.indent, c = n.colors;
123
+ return e.map((l) => {
124
+ const f = t[l];
125
+ if (typeof f == "string" && f[0] === "_" && f.startsWith("__vitest_") && f.match(/__vitest_\d+__/))
126
+ return "";
127
+ let m = i(f, n, u, s, o);
128
+ return typeof f != "string" && (m.includes(`
129
+ `) && (m = n.spacingOuter + u + m + n.spacingOuter + r), m = `{${m}}`), `${n.spacingInner + r + c.prop.open + l + c.prop.close}=${c.value.open}${m}${c.value.close}`;
130
+ }).join("");
131
+ }
132
+ function ye(e, t, n, r, s, o) {
133
+ return e.map((i) => t.spacingOuter + n + (typeof i == "string" ? Lt(i, t) : o(i, t, n, r, s))).join("");
134
+ }
135
+ function Yn(e, t, n, r, s, o) {
136
+ return t.printShadowRoot === !1 ? "" : [`${t.spacingOuter + n}#shadow-root`, ye(e, t, n + t.indent, r, s, o)].join("");
137
+ }
138
+ function Lt(e, t) {
139
+ const n = t.colors.content;
140
+ return n.open + Ft(e) + n.close;
141
+ }
142
+ function Hn(e, t) {
143
+ const n = t.colors.comment;
144
+ return `${n.open}<!--${Ft(e)}-->${n.close}`;
145
+ }
146
+ function Fe(e, t, n, r, s) {
147
+ const o = r.colors.tag;
148
+ return `${o.open}<${e}${t && o.close + t + r.spacingOuter + s + o.open}${n ? `>${o.close}${n}${r.spacingOuter}${s}${o.open}</${e}` : `${t && !r.min ? "" : " "}/`}>${o.close}`;
149
+ }
150
+ function Le(e, t) {
151
+ const n = t.colors.tag;
152
+ return `${n.open}<${e}${n.close} …${n.open} />${n.close}`;
153
+ }
154
+ const Gn = 1, De = 3, Dt = 8, zt = 11, Jn = /^(?:(?:HTML|SVG)\w*)?Element$/;
155
+ function Xn(e) {
156
+ try {
157
+ return typeof e.hasAttribute == "function" && e.hasAttribute("is");
158
+ } catch {
159
+ return !1;
160
+ }
161
+ }
162
+ function Zn(e) {
163
+ const t = e.constructor.name, { nodeType: n, tagName: r } = e, s = typeof r == "string" && r.includes("-") || Xn(e);
164
+ return n === Gn && (Jn.test(t) || s) || n === De && t === "Text" || n === Dt && t === "Comment" || n === zt && t === "DocumentFragment";
165
+ }
166
+ const vt = (e) => e?.constructor?.name && Zn(e);
167
+ function Qn(e) {
168
+ return e.nodeType === De;
169
+ }
170
+ function er(e) {
171
+ return e.nodeType === Dt;
172
+ }
173
+ function oe(e) {
174
+ return e.nodeType === zt;
175
+ }
176
+ function Xe(e, t) {
177
+ let n = e.filter((r) => r.nodeType === De ? (r.data || "").trim().length > 0 : !0);
178
+ return t && (n = n.filter(t)), n;
179
+ }
180
+ function Ut(e, t, n, r, s, o, i) {
181
+ if (Qn(e))
182
+ return Lt(e.data, t);
183
+ if (er(e))
184
+ return Hn(e.data, t);
185
+ const u = oe(e) ? "DocumentFragment" : e.tagName.toLowerCase();
186
+ if (++r > t.maxDepth)
187
+ return Le(u, t);
188
+ const c = Array.prototype.slice.call(e.childNodes || e.children), l = oe(e) || !e.shadowRoot ? [] : Array.prototype.slice.call(e.shadowRoot.children), f = i ? Xe(c, i) : c, m = i ? Xe(l, i) : l;
189
+ return Fe(u, je(oe(e) ? [] : Array.from(e.attributes, (g) => g.name).sort(), oe(e) ? {} : [...e.attributes].reduce((g, h) => (g[h.name] = h.value, g), {}), t, n + t.indent, r, s, o), (m.length > 0 ? Yn(m, t, n + t.indent, r, s, o) : "") + ye(f, t, n + t.indent, r, s, o), t, n);
190
+ }
191
+ const tr = (e, t, n, r, s, o) => Ut(e, t, n, r, s, o);
192
+ function nr(e) {
193
+ return {
194
+ test: vt,
195
+ serialize: (t, n, r, s, o, i) => Ut(t, n, r, s, o, i, e)
196
+ };
197
+ }
198
+ const rr = {
199
+ serialize: tr,
200
+ test: vt
201
+ }, sr = "@@__IMMUTABLE_ITERABLE__@@", or = "@@__IMMUTABLE_LIST__@@", ir = "@@__IMMUTABLE_KEYED__@@", cr = "@@__IMMUTABLE_MAP__@@", Ze = "@@__IMMUTABLE_ORDERED__@@", ur = "@@__IMMUTABLE_RECORD__@@", ar = "@@__IMMUTABLE_SEQ__@@", lr = "@@__IMMUTABLE_SET__@@", fr = "@@__IMMUTABLE_STACK__@@", B = (e) => `Immutable.${e}`, be = (e) => `[${e}]`, J = " ", Qe = "…";
202
+ function pr(e, t, n, r, s, o, i) {
203
+ return ++r > t.maxDepth ? be(B(i)) : `${B(i) + J}{${ge(e.entries(), t, n, r, s, o)}}`;
204
+ }
205
+ function mr(e) {
206
+ let t = 0;
207
+ return { next() {
208
+ if (t < e._keys.length) {
209
+ const n = e._keys[t++];
210
+ return {
211
+ done: !1,
212
+ value: [n, e.get(n)]
213
+ };
214
+ }
215
+ return {
216
+ done: !0,
217
+ value: void 0
218
+ };
219
+ } };
220
+ }
221
+ function dr(e, t, n, r, s, o) {
222
+ const i = B(e._name || "Record");
223
+ return ++r > t.maxDepth ? be(i) : `${i + J}{${ge(mr(e), t, n, r, s, o)}}`;
224
+ }
225
+ function hr(e, t, n, r, s, o) {
226
+ const i = B("Seq");
227
+ return ++r > t.maxDepth ? be(i) : e[ir] ? `${i + J}{${e._iter || e._object ? ge(e.entries(), t, n, r, s, o) : Qe}}` : `${i + J}[${e._iter || e._array || e._collection || e._iterable ? Me(e.values(), t, n, r, s, o) : Qe}]`;
228
+ }
229
+ function Ee(e, t, n, r, s, o, i) {
230
+ return ++r > t.maxDepth ? be(B(i)) : `${B(i) + J}[${Me(e.values(), t, n, r, s, o)}]`;
231
+ }
232
+ const gr = (e, t, n, r, s, o) => e[cr] ? pr(e, t, n, r, s, o, e[Ze] ? "OrderedMap" : "Map") : e[or] ? Ee(e, t, n, r, s, o, "List") : e[lr] ? Ee(e, t, n, r, s, o, e[Ze] ? "OrderedSet" : "Set") : e[fr] ? Ee(e, t, n, r, s, o, "Stack") : e[ar] ? hr(e, t, n, r, s, o) : dr(e, t, n, r, s, o), yr = (e) => e && (e[sr] === !0 || e[ur] === !0), br = {
233
+ serialize: gr,
234
+ test: yr
235
+ };
236
+ function Wt(e) {
237
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
238
+ }
239
+ var Te = { exports: {} }, S = {};
240
+ var et;
241
+ function Sr() {
242
+ if (et) return S;
243
+ et = 1;
244
+ var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.portal"), n = /* @__PURE__ */ Symbol.for("react.fragment"), r = /* @__PURE__ */ Symbol.for("react.strict_mode"), s = /* @__PURE__ */ Symbol.for("react.profiler"), o = /* @__PURE__ */ Symbol.for("react.consumer"), i = /* @__PURE__ */ Symbol.for("react.context"), u = /* @__PURE__ */ Symbol.for("react.forward_ref"), c = /* @__PURE__ */ Symbol.for("react.suspense"), l = /* @__PURE__ */ Symbol.for("react.suspense_list"), f = /* @__PURE__ */ Symbol.for("react.memo"), m = /* @__PURE__ */ Symbol.for("react.lazy"), g = /* @__PURE__ */ Symbol.for("react.view_transition"), h = /* @__PURE__ */ Symbol.for("react.client.reference");
245
+ function d(a) {
246
+ if (typeof a == "object" && a !== null) {
247
+ var p = a.$$typeof;
248
+ switch (p) {
249
+ case e:
250
+ switch (a = a.type, a) {
251
+ case n:
252
+ case s:
253
+ case r:
254
+ case c:
255
+ case l:
256
+ case g:
257
+ return a;
258
+ default:
259
+ switch (a = a && a.$$typeof, a) {
260
+ case i:
261
+ case u:
262
+ case m:
263
+ case f:
264
+ return a;
265
+ case o:
266
+ return a;
267
+ default:
268
+ return p;
269
+ }
270
+ }
271
+ case t:
272
+ return p;
273
+ }
274
+ }
275
+ }
276
+ return S.ContextConsumer = o, S.ContextProvider = i, S.Element = e, S.ForwardRef = u, S.Fragment = n, S.Lazy = m, S.Memo = f, S.Portal = t, S.Profiler = s, S.StrictMode = r, S.Suspense = c, S.SuspenseList = l, S.isContextConsumer = function(a) {
277
+ return d(a) === o;
278
+ }, S.isContextProvider = function(a) {
279
+ return d(a) === i;
280
+ }, S.isElement = function(a) {
281
+ return typeof a == "object" && a !== null && a.$$typeof === e;
282
+ }, S.isForwardRef = function(a) {
283
+ return d(a) === u;
284
+ }, S.isFragment = function(a) {
285
+ return d(a) === n;
286
+ }, S.isLazy = function(a) {
287
+ return d(a) === m;
288
+ }, S.isMemo = function(a) {
289
+ return d(a) === f;
290
+ }, S.isPortal = function(a) {
291
+ return d(a) === t;
292
+ }, S.isProfiler = function(a) {
293
+ return d(a) === s;
294
+ }, S.isStrictMode = function(a) {
295
+ return d(a) === r;
296
+ }, S.isSuspense = function(a) {
297
+ return d(a) === c;
298
+ }, S.isSuspenseList = function(a) {
299
+ return d(a) === l;
300
+ }, S.isValidElementType = function(a) {
301
+ return typeof a == "string" || typeof a == "function" || a === n || a === s || a === r || a === c || a === l || typeof a == "object" && a !== null && (a.$$typeof === m || a.$$typeof === f || a.$$typeof === i || a.$$typeof === o || a.$$typeof === u || a.$$typeof === h || a.getModuleId !== void 0);
302
+ }, S.typeOf = d, S;
303
+ }
304
+ var tt;
305
+ function Er() {
306
+ return tt || (tt = 1, Te.exports = Sr()), Te.exports;
307
+ }
308
+ var Vt = Er(), Tr = /* @__PURE__ */ Wt(Vt), $r = /* @__PURE__ */ Pt({
309
+ __proto__: null,
310
+ default: Tr
311
+ }, [Vt]), $e = { exports: {} }, b = {};
312
+ var nt;
313
+ function _r() {
314
+ if (nt) return b;
315
+ nt = 1;
316
+ var e = /* @__PURE__ */ Symbol.for("react.element"), t = /* @__PURE__ */ Symbol.for("react.portal"), n = /* @__PURE__ */ Symbol.for("react.fragment"), r = /* @__PURE__ */ Symbol.for("react.strict_mode"), s = /* @__PURE__ */ Symbol.for("react.profiler"), o = /* @__PURE__ */ Symbol.for("react.provider"), i = /* @__PURE__ */ Symbol.for("react.context"), u = /* @__PURE__ */ Symbol.for("react.server_context"), c = /* @__PURE__ */ Symbol.for("react.forward_ref"), l = /* @__PURE__ */ Symbol.for("react.suspense"), f = /* @__PURE__ */ Symbol.for("react.suspense_list"), m = /* @__PURE__ */ Symbol.for("react.memo"), g = /* @__PURE__ */ Symbol.for("react.lazy"), h = /* @__PURE__ */ Symbol.for("react.offscreen"), d;
317
+ d = /* @__PURE__ */ Symbol.for("react.module.reference");
318
+ function a(p) {
319
+ if (typeof p == "object" && p !== null) {
320
+ var y = p.$$typeof;
321
+ switch (y) {
322
+ case e:
323
+ switch (p = p.type, p) {
324
+ case n:
325
+ case s:
326
+ case r:
327
+ case l:
328
+ case f:
329
+ return p;
330
+ default:
331
+ switch (p = p && p.$$typeof, p) {
332
+ case u:
333
+ case i:
334
+ case c:
335
+ case g:
336
+ case m:
337
+ case o:
338
+ return p;
339
+ default:
340
+ return y;
341
+ }
342
+ }
343
+ case t:
344
+ return y;
345
+ }
346
+ }
347
+ }
348
+ return b.ContextConsumer = i, b.ContextProvider = o, b.Element = e, b.ForwardRef = c, b.Fragment = n, b.Lazy = g, b.Memo = m, b.Portal = t, b.Profiler = s, b.StrictMode = r, b.Suspense = l, b.SuspenseList = f, b.isAsyncMode = function() {
349
+ return !1;
350
+ }, b.isConcurrentMode = function() {
351
+ return !1;
352
+ }, b.isContextConsumer = function(p) {
353
+ return a(p) === i;
354
+ }, b.isContextProvider = function(p) {
355
+ return a(p) === o;
356
+ }, b.isElement = function(p) {
357
+ return typeof p == "object" && p !== null && p.$$typeof === e;
358
+ }, b.isForwardRef = function(p) {
359
+ return a(p) === c;
360
+ }, b.isFragment = function(p) {
361
+ return a(p) === n;
362
+ }, b.isLazy = function(p) {
363
+ return a(p) === g;
364
+ }, b.isMemo = function(p) {
365
+ return a(p) === m;
366
+ }, b.isPortal = function(p) {
367
+ return a(p) === t;
368
+ }, b.isProfiler = function(p) {
369
+ return a(p) === s;
370
+ }, b.isStrictMode = function(p) {
371
+ return a(p) === r;
372
+ }, b.isSuspense = function(p) {
373
+ return a(p) === l;
374
+ }, b.isSuspenseList = function(p) {
375
+ return a(p) === f;
376
+ }, b.isValidElementType = function(p) {
377
+ return typeof p == "string" || typeof p == "function" || p === n || p === s || p === r || p === l || p === f || p === h || typeof p == "object" && p !== null && (p.$$typeof === g || p.$$typeof === m || p.$$typeof === o || p.$$typeof === i || p.$$typeof === c || p.$$typeof === d || p.getModuleId !== void 0);
378
+ }, b.typeOf = a, b;
379
+ }
380
+ var rt;
381
+ function wr() {
382
+ return rt || (rt = 1, $e.exports = _r()), $e.exports;
383
+ }
384
+ var Kt = wr(), Ar = /* @__PURE__ */ Wt(Kt), Cr = /* @__PURE__ */ Pt({
385
+ __proto__: null,
386
+ default: Ar
387
+ }, [Kt]);
388
+ const xr = [
389
+ "isAsyncMode",
390
+ "isConcurrentMode",
391
+ "isContextConsumer",
392
+ "isContextProvider",
393
+ "isElement",
394
+ "isForwardRef",
395
+ "isFragment",
396
+ "isLazy",
397
+ "isMemo",
398
+ "isPortal",
399
+ "isProfiler",
400
+ "isStrictMode",
401
+ "isSuspense",
402
+ "isSuspenseList",
403
+ "isValidElementType"
404
+ ], z = Object.fromEntries(xr.map((e) => [e, (t) => Cr[e](t) || $r[e](t)]));
405
+ function Bt(e, t = []) {
406
+ if (Array.isArray(e))
407
+ for (const n of e)
408
+ Bt(n, t);
409
+ else e != null && e !== !1 && e !== "" && t.push(e);
410
+ return t;
411
+ }
412
+ function st(e) {
413
+ const t = e.type;
414
+ if (typeof t == "string")
415
+ return t;
416
+ if (typeof t == "function")
417
+ return t.displayName || t.name || "Unknown";
418
+ if (z.isFragment(e))
419
+ return "React.Fragment";
420
+ if (z.isSuspense(e))
421
+ return "React.Suspense";
422
+ if (typeof t == "object" && t !== null) {
423
+ if (z.isContextProvider(e))
424
+ return "Context.Provider";
425
+ if (z.isContextConsumer(e))
426
+ return "Context.Consumer";
427
+ if (z.isForwardRef(e)) {
428
+ if (t.displayName)
429
+ return t.displayName;
430
+ const n = t.render.displayName || t.render.name || "";
431
+ return n === "" ? "ForwardRef" : `ForwardRef(${n})`;
432
+ }
433
+ if (z.isMemo(e)) {
434
+ const n = t.displayName || t.type.displayName || t.type.name || "";
435
+ return n === "" ? "Memo" : `Memo(${n})`;
436
+ }
437
+ }
438
+ return "UNDEFINED";
439
+ }
440
+ function Ir(e) {
441
+ const { props: t } = e;
442
+ return Object.keys(t).filter((n) => n !== "children" && t[n] !== void 0).sort();
443
+ }
444
+ const Nr = (e, t, n, r, s, o) => ++r > t.maxDepth ? Le(st(e), t) : Fe(st(e), je(Ir(e), e.props, t, n + t.indent, r, s, o), ye(Bt(e.props.children), t, n + t.indent, r, s, o), t, n), Or = (e) => e != null && z.isElement(e), Rr = {
445
+ serialize: Nr,
446
+ test: Or
447
+ }, kr = typeof Symbol == "function" && Symbol.for ? /* @__PURE__ */ Symbol.for("react.test.json") : 245830487;
448
+ function Mr(e) {
449
+ const { props: t } = e;
450
+ return t ? Object.keys(t).filter((n) => t[n] !== void 0).sort() : [];
451
+ }
452
+ const Pr = (e, t, n, r, s, o) => ++r > t.maxDepth ? Le(e.type, t) : Fe(e.type, e.props ? je(Mr(e), e.props, t, n + t.indent, r, s, o) : "", e.children ? ye(e.children, t, n + t.indent, r, s, o) : "", t, n), jr = (e) => e && e.$$typeof === kr, Fr = {
453
+ serialize: Pr,
454
+ test: jr
455
+ }, qt = Object.prototype.toString, Lr = Date.prototype.toISOString, Dr = Error.prototype.toString, ot = RegExp.prototype.toString;
456
+ function _e(e) {
457
+ return typeof e.constructor == "function" && e.constructor.name || "Object";
458
+ }
459
+ function zr(e) {
460
+ return typeof window < "u" && e === window;
461
+ }
462
+ const vr = /^Symbol\((.*)\)(.*)$/, Ur = /\n/g;
463
+ class Yt extends Error {
464
+ constructor(t, n) {
465
+ super(t), this.stack = n, this.name = this.constructor.name;
466
+ }
467
+ }
468
+ function Wr(e) {
469
+ return e === "[object Array]" || e === "[object ArrayBuffer]" || e === "[object DataView]" || e === "[object Float32Array]" || e === "[object Float64Array]" || e === "[object Int8Array]" || e === "[object Int16Array]" || e === "[object Int32Array]" || e === "[object Uint8Array]" || e === "[object Uint8ClampedArray]" || e === "[object Uint16Array]" || e === "[object Uint32Array]";
470
+ }
471
+ function Vr(e) {
472
+ return Object.is(e, -0) ? "-0" : String(e);
473
+ }
474
+ function Kr(e) {
475
+ return `${e}n`;
476
+ }
477
+ function it(e, t) {
478
+ return t ? `[Function ${e.name || "anonymous"}]` : "[Function]";
479
+ }
480
+ function ct(e) {
481
+ return String(e).replace(vr, "Symbol($1)");
482
+ }
483
+ function ut(e) {
484
+ return `[${Dr.call(e)}]`;
485
+ }
486
+ function Ht(e, t, n, r) {
487
+ if (e === !0 || e === !1)
488
+ return `${e}`;
489
+ if (e === void 0)
490
+ return "undefined";
491
+ if (e === null)
492
+ return "null";
493
+ const s = typeof e;
494
+ if (s === "number")
495
+ return Vr(e);
496
+ if (s === "bigint")
497
+ return Kr(e);
498
+ if (s === "string")
499
+ return r ? `"${e.replaceAll(/"|\\/g, "\\$&")}"` : `"${e}"`;
500
+ if (s === "function")
501
+ return it(e, t);
502
+ if (s === "symbol")
503
+ return ct(e);
504
+ const o = qt.call(e);
505
+ return o === "[object WeakMap]" ? "WeakMap {}" : o === "[object WeakSet]" ? "WeakSet {}" : o === "[object Function]" || o === "[object GeneratorFunction]" ? it(e, t) : o === "[object Symbol]" ? ct(e) : o === "[object Date]" ? Number.isNaN(+e) ? "Date { NaN }" : Lr.call(e) : o === "[object Error]" ? ut(e) : o === "[object RegExp]" ? n ? ot.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&") : ot.call(e) : e instanceof Error ? ut(e) : null;
506
+ }
507
+ function Gt(e, t, n, r, s, o) {
508
+ if (s.includes(e))
509
+ return "[Circular]";
510
+ s = [...s], s.push(e);
511
+ const i = ++r > t.maxDepth, u = t.min;
512
+ if (t.callToJSON && !i && e.toJSON && typeof e.toJSON == "function" && !o)
513
+ return F(e.toJSON(), t, n, r, s, !0);
514
+ const c = qt.call(e);
515
+ return c === "[object Arguments]" ? i ? "[Arguments]" : `${u ? "" : "Arguments "}[${me(e, t, n, r, s, F)}]` : Wr(c) ? i ? `[${e.constructor.name}]` : `${u || !t.printBasicPrototype && e.constructor.name === "Array" ? "" : `${e.constructor.name} `}[${me(e, t, n, r, s, F)}]` : c === "[object Map]" ? i ? "[Map]" : `Map {${ge(e.entries(), t, n, r, s, F, " => ")}}` : c === "[object Set]" ? i ? "[Set]" : `Set {${Me(e.values(), t, n, r, s, F)}}` : i || zr(e) ? `[${_e(e)}]` : `${u || !t.printBasicPrototype && _e(e) === "Object" ? "" : `${_e(e)} `}{${Pe(e, t, n, r, s, F)}}`;
516
+ }
517
+ function Br(e) {
518
+ return e.serialize != null;
519
+ }
520
+ function Jt(e, t, n, r, s, o) {
521
+ let i;
522
+ try {
523
+ i = Br(e) ? e.serialize(t, n, r, s, o, F) : e.print(t, (u) => F(u, n, r, s, o), (u) => {
524
+ const c = r + n.indent;
525
+ return c + u.replaceAll(Ur, `
526
+ ${c}`);
527
+ }, {
528
+ edgeSpacing: n.spacingOuter,
529
+ min: n.min,
530
+ spacing: n.spacingInner
531
+ }, n.colors);
532
+ } catch (u) {
533
+ throw new Yt(u.message, u.stack);
534
+ }
535
+ if (typeof i != "string")
536
+ throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof i}".`);
537
+ return i;
538
+ }
539
+ function Xt(e, t) {
540
+ for (const n of e)
541
+ try {
542
+ if (n.test(t))
543
+ return n;
544
+ } catch (r) {
545
+ throw new Yt(r.message, r.stack);
546
+ }
547
+ return null;
548
+ }
549
+ function F(e, t, n, r, s, o) {
550
+ let i;
551
+ const u = Xt(t.plugins, e);
552
+ if (u !== null)
553
+ i = Jt(u, e, t, n, r, s);
554
+ else {
555
+ const c = Ht(e, t.printFunctionName, t.escapeRegex, t.escapeString);
556
+ c !== null ? i = c : i = Gt(e, t, n, r, s, o);
557
+ }
558
+ return t._outputLengthPerDepth[r] ??= 0, t._outputLengthPerDepth[r] += i.length, t._outputLengthPerDepth[r] > t.maxOutputLength && (t.maxDepth = 0), i;
559
+ }
560
+ const ze = {
561
+ comment: "gray",
562
+ content: "reset",
563
+ prop: "yellow",
564
+ tag: "cyan",
565
+ value: "green"
566
+ }, Zt = Object.keys(ze), I = {
567
+ callToJSON: !0,
568
+ compareKeys: void 0,
569
+ escapeRegex: !1,
570
+ escapeString: !0,
571
+ highlight: !1,
572
+ indent: 2,
573
+ maxDepth: Number.POSITIVE_INFINITY,
574
+ maxOutputLength: 1e6,
575
+ maxWidth: Number.POSITIVE_INFINITY,
576
+ min: !1,
577
+ plugins: [],
578
+ printBasicPrototype: !0,
579
+ printFunctionName: !0,
580
+ printShadowRoot: !0,
581
+ theme: ze
582
+ };
583
+ function qr(e) {
584
+ for (const t of Object.keys(e))
585
+ if (!Object.hasOwn(I, t))
586
+ throw new Error(`pretty-format: Unknown option "${t}".`);
587
+ if (e.min && e.indent !== void 0 && e.indent !== 0)
588
+ throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');
589
+ }
590
+ function Yr() {
591
+ return Zt.reduce((e, t) => {
592
+ const n = ze[t], r = n && T[n];
593
+ if (r && typeof r.close == "string" && typeof r.open == "string")
594
+ e[t] = r;
595
+ else
596
+ throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${n}" is undefined in ansi-styles.`);
597
+ return e;
598
+ }, /* @__PURE__ */ Object.create(null));
599
+ }
600
+ function Hr() {
601
+ return Zt.reduce((e, t) => (e[t] = {
602
+ close: "",
603
+ open: ""
604
+ }, e), /* @__PURE__ */ Object.create(null));
605
+ }
606
+ function Qt(e) {
607
+ return e?.printFunctionName ?? I.printFunctionName;
608
+ }
609
+ function en(e) {
610
+ return e?.escapeRegex ?? I.escapeRegex;
611
+ }
612
+ function tn(e) {
613
+ return e?.escapeString ?? I.escapeString;
614
+ }
615
+ function at(e) {
616
+ return {
617
+ callToJSON: e?.callToJSON ?? I.callToJSON,
618
+ colors: e?.highlight ? Yr() : Hr(),
619
+ compareKeys: typeof e?.compareKeys == "function" || e?.compareKeys === null ? e.compareKeys : I.compareKeys,
620
+ escapeRegex: en(e),
621
+ escapeString: tn(e),
622
+ indent: e?.min ? "" : Gr(e?.indent ?? I.indent),
623
+ maxDepth: e?.maxDepth ?? I.maxDepth,
624
+ maxWidth: e?.maxWidth ?? I.maxWidth,
625
+ min: e?.min ?? I.min,
626
+ plugins: e?.plugins ?? I.plugins,
627
+ printBasicPrototype: e?.printBasicPrototype ?? !0,
628
+ printFunctionName: Qt(e),
629
+ printShadowRoot: e?.printShadowRoot ?? !0,
630
+ spacingInner: e?.min ? " " : `
631
+ `,
632
+ spacingOuter: e?.min ? "" : `
633
+ `,
634
+ maxOutputLength: e?.maxOutputLength ?? I.maxOutputLength,
635
+ _outputLengthPerDepth: []
636
+ };
637
+ }
638
+ function Gr(e) {
639
+ return Array.from({ length: e + 1 }).join(" ");
640
+ }
641
+ function lt(e, t) {
642
+ if (t && (qr(t), t.plugins)) {
643
+ const r = Xt(t.plugins, e);
644
+ if (r !== null)
645
+ return Jt(r, e, at(t), "", 0, []);
646
+ }
647
+ const n = Ht(e, Qt(t), en(t), tn(t));
648
+ return n !== null ? n : Gt(e, at(t), "", 0, []);
649
+ }
650
+ const Jr = {
651
+ AsymmetricMatcher: zn,
652
+ DOMCollection: qn,
653
+ DOMElement: rr,
654
+ Immutable: br,
655
+ ReactElement: Rr,
656
+ ReactTestComponent: Fr
657
+ }, ft = {
658
+ bold: ["1", "22"],
659
+ dim: ["2", "22"],
660
+ italic: ["3", "23"],
661
+ underline: ["4", "24"],
662
+ // 5 & 6 are blinking
663
+ inverse: ["7", "27"],
664
+ hidden: ["8", "28"],
665
+ strike: ["9", "29"],
666
+ // 10-20 are fonts
667
+ // 21-29 are resets for 1-9
668
+ black: ["30", "39"],
669
+ red: ["31", "39"],
670
+ green: ["32", "39"],
671
+ yellow: ["33", "39"],
672
+ blue: ["34", "39"],
673
+ magenta: ["35", "39"],
674
+ cyan: ["36", "39"],
675
+ white: ["37", "39"],
676
+ brightblack: ["30;1", "39"],
677
+ brightred: ["31;1", "39"],
678
+ brightgreen: ["32;1", "39"],
679
+ brightyellow: ["33;1", "39"],
680
+ brightblue: ["34;1", "39"],
681
+ brightmagenta: ["35;1", "39"],
682
+ brightcyan: ["36;1", "39"],
683
+ brightwhite: ["37;1", "39"],
684
+ grey: ["90", "39"]
685
+ }, Xr = {
686
+ special: "cyan",
687
+ number: "yellow",
688
+ bigint: "yellow",
689
+ boolean: "yellow",
690
+ undefined: "grey",
691
+ null: "bold",
692
+ string: "green",
693
+ symbol: "green",
694
+ date: "magenta",
695
+ regexp: "red"
696
+ }, q = "…";
697
+ function Zr(e, t) {
698
+ const n = ft[Xr[t]] || ft[t] || "";
699
+ return n ? `\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m` : String(e);
700
+ }
701
+ function Qr({
702
+ showHidden: e = !1,
703
+ depth: t = 2,
704
+ colors: n = !1,
705
+ customInspect: r = !0,
706
+ showProxy: s = !1,
707
+ maxArrayLength: o = 1 / 0,
708
+ breakLength: i = 1 / 0,
709
+ seen: u = [],
710
+ // eslint-disable-next-line no-shadow
711
+ truncate: c = 1 / 0,
712
+ stylize: l = String
713
+ } = {}, f) {
714
+ const m = {
715
+ showHidden: !!e,
716
+ depth: Number(t),
717
+ colors: !!n,
718
+ customInspect: !!r,
719
+ showProxy: !!s,
720
+ maxArrayLength: Number(o),
721
+ breakLength: Number(i),
722
+ truncate: Number(c),
723
+ seen: u,
724
+ inspect: f,
725
+ stylize: l
726
+ };
727
+ return m.colors && (m.stylize = Zr), m;
728
+ }
729
+ function es(e) {
730
+ return e >= "\uD800" && e <= "\uDBFF";
731
+ }
732
+ function D(e, t, n = q) {
733
+ e = String(e);
734
+ const r = n.length, s = e.length;
735
+ if (r > t && s > r)
736
+ return n;
737
+ if (s > t && s > r) {
738
+ let o = t - r;
739
+ return o > 0 && es(e[o - 1]) && (o = o - 1), `${e.slice(0, o)}${n}`;
740
+ }
741
+ return e;
742
+ }
743
+ function N(e, t, n, r = ", ") {
744
+ n = n || t.inspect;
745
+ const s = e.length;
746
+ if (s === 0)
747
+ return "";
748
+ const o = t.truncate;
749
+ let i = "", u = "", c = "";
750
+ for (let l = 0; l < s; l += 1) {
751
+ const f = l + 1 === e.length, m = l + 2 === e.length;
752
+ c = `${q}(${e.length - l})`;
753
+ const g = e[l];
754
+ t.truncate = o - i.length - (f ? 0 : r.length);
755
+ const h = u || n(g, t) + (f ? "" : r), d = i.length + h.length, a = d + c.length;
756
+ if (f && d > o && i.length + c.length <= o || !f && !m && a > o || (u = f ? "" : n(e[l + 1], t) + (m ? "" : r), !f && m && a > o && d + u.length > o))
757
+ break;
758
+ if (i += h, !f && !m && d + u.length >= o) {
759
+ c = `${q}(${e.length - l - 1})`;
760
+ break;
761
+ }
762
+ c = "";
763
+ }
764
+ return `${i}${c}`;
765
+ }
766
+ function ts(e) {
767
+ return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/) ? e : JSON.stringify(e).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
768
+ }
769
+ function X([e, t], n) {
770
+ return n.truncate -= 2, typeof e == "string" ? e = ts(e) : typeof e != "number" && (e = `[${n.inspect(e, n)}]`), n.truncate -= e.length, t = n.inspect(t, n), `${e}: ${t}`;
771
+ }
772
+ function ns(e, t) {
773
+ const n = Object.keys(e).slice(e.length);
774
+ if (!e.length && !n.length)
775
+ return "[]";
776
+ t.truncate -= 4;
777
+ const r = N(e, t);
778
+ t.truncate -= r.length;
779
+ let s = "";
780
+ return n.length && (s = N(n.map((o) => [o, e[o]]), t, X)), `[ ${r}${s ? `, ${s}` : ""} ]`;
781
+ }
782
+ const rs = (e) => typeof Buffer == "function" && e instanceof Buffer ? "Buffer" : e[Symbol.toStringTag] ? e[Symbol.toStringTag] : e.constructor.name;
783
+ function M(e, t) {
784
+ const n = rs(e);
785
+ t.truncate -= n.length + 4;
786
+ const r = Object.keys(e).slice(e.length);
787
+ if (!e.length && !r.length)
788
+ return `${n}[]`;
789
+ let s = "";
790
+ for (let i = 0; i < e.length; i++) {
791
+ const u = `${t.stylize(D(e[i], t.truncate), "number")}${i === e.length - 1 ? "" : ", "}`;
792
+ if (t.truncate -= u.length, e[i] !== e.length && t.truncate <= 3) {
793
+ s += `${q}(${e.length - e[i] + 1})`;
794
+ break;
795
+ }
796
+ s += u;
797
+ }
798
+ let o = "";
799
+ return r.length && (o = N(r.map((i) => [i, e[i]]), t, X)), `${n}[ ${s}${o ? `, ${o}` : ""} ]`;
800
+ }
801
+ function ss(e, t) {
802
+ const n = e.toJSON();
803
+ if (n === null)
804
+ return "Invalid Date";
805
+ const r = n.split("T"), s = r[0];
806
+ return t.stylize(`${s}T${D(r[1], t.truncate - s.length - 1)}`, "date");
807
+ }
808
+ function pt(e, t) {
809
+ const n = e[Symbol.toStringTag] || "Function", r = e.name;
810
+ return r ? t.stylize(`[${n} ${D(r, t.truncate - 11)}]`, "special") : t.stylize(`[${n}]`, "special");
811
+ }
812
+ function os([e, t], n) {
813
+ return n.truncate -= 4, e = n.inspect(e, n), n.truncate -= e.length, t = n.inspect(t, n), `${e} => ${t}`;
814
+ }
815
+ function is(e) {
816
+ const t = [];
817
+ return e.forEach((n, r) => {
818
+ t.push([r, n]);
819
+ }), t;
820
+ }
821
+ function cs(e, t) {
822
+ return e.size === 0 ? "Map{}" : (t.truncate -= 7, `Map{ ${N(is(e), t, os)} }`);
823
+ }
824
+ const us = Number.isNaN || ((e) => e !== e);
825
+ function mt(e, t) {
826
+ return us(e) ? t.stylize("NaN", "number") : e === 1 / 0 ? t.stylize("Infinity", "number") : e === -1 / 0 ? t.stylize("-Infinity", "number") : e === 0 ? t.stylize(1 / e === 1 / 0 ? "+0" : "-0", "number") : t.stylize(D(String(e), t.truncate), "number");
827
+ }
828
+ function dt(e, t) {
829
+ let n = D(e.toString(), t.truncate - 1);
830
+ return n !== q && (n += "n"), t.stylize(n, "bigint");
831
+ }
832
+ function as(e, t) {
833
+ const n = e.toString().split("/")[2], r = t.truncate - (2 + n.length), s = e.source;
834
+ return t.stylize(`/${D(s, r)}/${n}`, "regexp");
835
+ }
836
+ function ls(e) {
837
+ const t = [];
838
+ return e.forEach((n) => {
839
+ t.push(n);
840
+ }), t;
841
+ }
842
+ function fs(e, t) {
843
+ return e.size === 0 ? "Set{}" : (t.truncate -= 7, `Set{ ${N(ls(e), t)} }`);
844
+ }
845
+ const ht = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g"), ps = {
846
+ "\b": "\\b",
847
+ " ": "\\t",
848
+ "\n": "\\n",
849
+ "\f": "\\f",
850
+ "\r": "\\r",
851
+ "'": "\\'",
852
+ "\\": "\\\\"
853
+ }, ms = 16;
854
+ function ds(e) {
855
+ return ps[e] || `\\u${`0000${e.charCodeAt(0).toString(ms)}`.slice(-4)}`;
856
+ }
857
+ function gt(e, t) {
858
+ return ht.test(e) && (e = e.replace(ht, ds)), t.stylize(`'${D(e, t.truncate - 2)}'`, "string");
859
+ }
860
+ function yt(e) {
861
+ return "description" in Symbol.prototype ? e.description ? `Symbol(${e.description})` : "Symbol()" : e.toString();
862
+ }
863
+ const hs = () => "Promise{…}";
864
+ function ae(e, t) {
865
+ const n = Object.getOwnPropertyNames(e), r = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e) : [];
866
+ if (n.length === 0 && r.length === 0)
867
+ return "{}";
868
+ if (t.truncate -= 4, t.seen = t.seen || [], t.seen.includes(e))
869
+ return "[Circular]";
870
+ t.seen.push(e);
871
+ const s = N(n.map((u) => [u, e[u]]), t, X), o = N(r.map((u) => [u, e[u]]), t, X);
872
+ t.seen.pop();
873
+ let i = "";
874
+ return s && o && (i = ", "), `{ ${s}${i}${o} }`;
875
+ }
876
+ const we = typeof Symbol < "u" && Symbol.toStringTag ? Symbol.toStringTag : !1;
877
+ function gs(e, t) {
878
+ let n = "";
879
+ return we && we in e && (n = e[we]), n = n || e.constructor.name, (!n || n === "_class") && (n = "<Anonymous Class>"), t.truncate -= n.length, `${n}${ae(e, t)}`;
880
+ }
881
+ function ys(e, t) {
882
+ return e.length === 0 ? "Arguments[]" : (t.truncate -= 13, `Arguments[ ${N(e, t)} ]`);
883
+ }
884
+ const bs = [
885
+ "stack",
886
+ "line",
887
+ "column",
888
+ "name",
889
+ "message",
890
+ "fileName",
891
+ "lineNumber",
892
+ "columnNumber",
893
+ "number",
894
+ "description",
895
+ "cause"
896
+ ];
897
+ function Ss(e, t) {
898
+ const n = Object.getOwnPropertyNames(e).filter((i) => bs.indexOf(i) === -1), r = e.name;
899
+ t.truncate -= r.length;
900
+ let s = "";
901
+ if (typeof e.message == "string" ? s = D(e.message, t.truncate) : n.unshift("message"), s = s ? `: ${s}` : "", t.truncate -= s.length + 5, t.seen = t.seen || [], t.seen.includes(e))
902
+ return "[Circular]";
903
+ t.seen.push(e);
904
+ const o = N(n.map((i) => [i, e[i]]), t, X);
905
+ return `${r}${s}${o ? ` { ${o} }` : ""}`;
906
+ }
907
+ function Es([e, t], n) {
908
+ return n.truncate -= 3, t ? `${n.stylize(String(e), "yellow")}=${n.stylize(`"${t}"`, "string")}` : `${n.stylize(String(e), "yellow")}`;
909
+ }
910
+ function Ne(e, t) {
911
+ return N(e, t, Ts, `
912
+ `);
913
+ }
914
+ function Ts(e, t) {
915
+ switch (e.nodeType) {
916
+ case 1:
917
+ return nn(e, t);
918
+ case 3:
919
+ return t.inspect(e.data, t);
920
+ default:
921
+ return t.inspect(e, t);
922
+ }
923
+ }
924
+ function nn(e, t) {
925
+ const n = e.getAttributeNames(), r = e.tagName.toLowerCase(), s = t.stylize(`<${r}`, "special"), o = t.stylize(">", "special"), i = t.stylize(`</${r}>`, "special");
926
+ t.truncate -= r.length * 2 + 5;
927
+ let u = "";
928
+ n.length > 0 && (u += " ", u += N(n.map((f) => [f, e.getAttribute(f)]), t, Es, " ")), t.truncate -= u.length;
929
+ const c = t.truncate;
930
+ let l = Ne(e.children, t);
931
+ return l && l.length > c && (l = `${q}(${e.children.length})`), `${s}${u}${o}${l}${i}`;
932
+ }
933
+ const $s = typeof Symbol == "function" && typeof Symbol.for == "function", Ae = $s ? /* @__PURE__ */ Symbol.for("chai/inspect") : "@@chai/inspect", Ce = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom"), bt = /* @__PURE__ */ new WeakMap(), St = {}, Et = {
934
+ undefined: (e, t) => t.stylize("undefined", "undefined"),
935
+ null: (e, t) => t.stylize("null", "null"),
936
+ boolean: (e, t) => t.stylize(String(e), "boolean"),
937
+ Boolean: (e, t) => t.stylize(String(e), "boolean"),
938
+ number: mt,
939
+ Number: mt,
940
+ bigint: dt,
941
+ BigInt: dt,
942
+ string: gt,
943
+ String: gt,
944
+ function: pt,
945
+ Function: pt,
946
+ symbol: yt,
947
+ // A Symbol polyfill will return `Symbol` not `symbol` from typedetect
948
+ Symbol: yt,
949
+ Array: ns,
950
+ Date: ss,
951
+ Map: cs,
952
+ Set: fs,
953
+ RegExp: as,
954
+ Promise: hs,
955
+ // WeakSet, WeakMap are totally opaque to us
956
+ WeakSet: (e, t) => t.stylize("WeakSet{…}", "special"),
957
+ WeakMap: (e, t) => t.stylize("WeakMap{…}", "special"),
958
+ Arguments: ys,
959
+ Int8Array: M,
960
+ Uint8Array: M,
961
+ Uint8ClampedArray: M,
962
+ Int16Array: M,
963
+ Uint16Array: M,
964
+ Int32Array: M,
965
+ Uint32Array: M,
966
+ Float32Array: M,
967
+ Float64Array: M,
968
+ Generator: () => "",
969
+ DataView: () => "",
970
+ ArrayBuffer: () => "",
971
+ Error: Ss,
972
+ HTMLCollection: Ne,
973
+ NodeList: Ne
974
+ }, _s = (e, t, n, r) => Ae in e && typeof e[Ae] == "function" ? e[Ae](t) : Ce in e && typeof e[Ce] == "function" ? e[Ce](t.depth, t, r) : "inspect" in e && typeof e.inspect == "function" ? e.inspect(t.depth, t) : "constructor" in e && bt.has(e.constructor) ? bt.get(e.constructor)(e, t) : St[n] ? St[n](e, t) : "", ws = Object.prototype.toString;
975
+ function le(e, t = {}) {
976
+ const n = Qr(t, le), { customInspect: r } = n;
977
+ let s = e === null ? "null" : typeof e;
978
+ if (s === "object" && (s = ws.call(e).slice(8, -1)), s in Et)
979
+ return Et[s](e, n);
980
+ if (r && e) {
981
+ const i = _s(e, n, s, le);
982
+ if (i)
983
+ return typeof i == "string" ? i : le(i, n);
984
+ }
985
+ const o = e ? Object.getPrototypeOf(e) : !1;
986
+ return o === Object.prototype || o === null ? ae(e, n) : e && typeof HTMLElement == "function" && e instanceof HTMLElement ? nn(e, n) : "constructor" in e ? e.constructor !== Object ? gs(e, n) : ae(e, n) : e === Object(e) ? ae(e, n) : n.stylize(String(e), s);
987
+ }
988
+ const { AsymmetricMatcher: rn, DOMCollection: sn, DOMElement: As, Immutable: on, ReactElement: cn, ReactTestComponent: un } = Jr, Cs = [
989
+ un,
990
+ cn,
991
+ As,
992
+ sn,
993
+ on,
994
+ rn
995
+ ];
996
+ function an(e, t = 10, { maxLength: n, filterNode: r, ...s } = {}) {
997
+ const o = n ?? 1e4;
998
+ let i;
999
+ const u = typeof r == "string" ? xs(r) : r, c = u ? [
1000
+ un,
1001
+ cn,
1002
+ nr(u),
1003
+ sn,
1004
+ on,
1005
+ rn
1006
+ ] : Cs;
1007
+ try {
1008
+ i = lt(e, {
1009
+ maxDepth: t,
1010
+ escapeString: !1,
1011
+ plugins: c,
1012
+ ...s
1013
+ });
1014
+ } catch {
1015
+ i = lt(e, {
1016
+ callToJSON: !1,
1017
+ maxDepth: t,
1018
+ escapeString: !1,
1019
+ plugins: c,
1020
+ ...s
1021
+ });
1022
+ }
1023
+ return i.length >= o && t > 1 ? an(e, Math.floor(Math.min(t, Number.MAX_SAFE_INTEGER) / 2), {
1024
+ maxLength: n,
1025
+ filterNode: r,
1026
+ ...s
1027
+ }) : i;
1028
+ }
1029
+ function xs(e) {
1030
+ return (r) => {
1031
+ if (r.nodeType === 8)
1032
+ return !1;
1033
+ if (r.nodeType === 1 && r.matches)
1034
+ try {
1035
+ return !r.matches(e);
1036
+ } catch {
1037
+ return !0;
1038
+ }
1039
+ return !0;
1040
+ };
1041
+ }
1042
+ const ln = /%[sdjifoOc%]/g;
1043
+ function Is(e, t = {}) {
1044
+ const n = (u, c) => t.prettifyObject ? an(u, void 0, {
1045
+ printBasicPrototype: !1,
1046
+ escapeString: !1
1047
+ }) : fn(u, c);
1048
+ if (typeof e[0] != "string") {
1049
+ const u = [];
1050
+ for (let c = 0; c < e.length; c++)
1051
+ u.push(n(e[c], {
1052
+ depth: 0,
1053
+ colors: !1
1054
+ }));
1055
+ return u.join(" ");
1056
+ }
1057
+ const r = e.length;
1058
+ let s = 1;
1059
+ const o = e[0];
1060
+ let i = String(o).replace(ln, (u) => {
1061
+ if (u === "%%")
1062
+ return "%";
1063
+ if (s >= r)
1064
+ return u;
1065
+ switch (u) {
1066
+ case "%s": {
1067
+ const c = e[s++];
1068
+ return typeof c == "bigint" ? `${c.toString()}n` : typeof c == "number" && c === 0 && 1 / c < 0 ? "-0" : typeof c == "object" && c !== null ? typeof c.toString == "function" && c.toString !== Object.prototype.toString ? c.toString() : n(c, {
1069
+ depth: 0,
1070
+ colors: !1
1071
+ }) : String(c);
1072
+ }
1073
+ case "%d": {
1074
+ const c = e[s++];
1075
+ return typeof c == "bigint" ? `${c.toString()}n` : typeof c == "symbol" ? "NaN" : Number(c).toString();
1076
+ }
1077
+ case "%i": {
1078
+ const c = e[s++];
1079
+ return typeof c == "bigint" ? `${c.toString()}n` : Number.parseInt(String(c)).toString();
1080
+ }
1081
+ case "%f":
1082
+ return Number.parseFloat(String(e[s++])).toString();
1083
+ case "%o":
1084
+ return n(e[s++], {
1085
+ showHidden: !0,
1086
+ showProxy: !0
1087
+ });
1088
+ case "%O":
1089
+ return n(e[s++]);
1090
+ case "%c":
1091
+ return s++, "";
1092
+ case "%j":
1093
+ try {
1094
+ return JSON.stringify(e[s++]);
1095
+ } catch (c) {
1096
+ const l = c.message;
1097
+ if (l.includes("circular structure") || l.includes("cyclic structures") || l.includes("cyclic object"))
1098
+ return "[Circular]";
1099
+ throw c;
1100
+ }
1101
+ default:
1102
+ return u;
1103
+ }
1104
+ });
1105
+ for (let u = e[s]; s < r; u = e[++s])
1106
+ u === null || typeof u != "object" ? i += ` ${typeof u == "symbol" ? u.toString() : u}` : i += ` ${n(u)}`;
1107
+ return i;
1108
+ }
1109
+ function Ns(...e) {
1110
+ return Is(e);
1111
+ }
1112
+ function fn(e, t = {}) {
1113
+ return t.truncate === 0 && (t.truncate = Number.POSITIVE_INFINITY), le(e, t);
1114
+ }
1115
+ function Os(e, t = {}) {
1116
+ typeof t.truncate > "u" && (t.truncate = 40);
1117
+ const n = fn(e, t), r = Object.prototype.toString.call(e);
1118
+ if (t.truncate && n.length >= t.truncate)
1119
+ if (r === "[object Function]") {
1120
+ const s = e;
1121
+ return s.name ? `[Function: ${s.name}]` : "[Function]";
1122
+ } else {
1123
+ if (r === "[object Array]")
1124
+ return `[ Array(${e.length}) ]`;
1125
+ if (r === "[object Object]") {
1126
+ const s = Object.keys(e);
1127
+ return `{ Object (${s.length > 2 ? `${s.splice(0, 2).join(", ")}, ...` : s.join(", ")}) }`;
1128
+ } else
1129
+ return n;
1130
+ }
1131
+ return n;
1132
+ }
1133
+ function Y(e, t, n) {
1134
+ const r = typeof e;
1135
+ if (!n.includes(r))
1136
+ throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`);
1137
+ }
1138
+ function Rs(e) {
1139
+ const t = [];
1140
+ let n = "none";
1141
+ for (let r = 0; r < e.length; ++r)
1142
+ n === "singleline" ? e[r] === `
1143
+ ` && (n = "none") : n === "multiline" ? e[r - 1] === "*" && e[r] === "/" && (n = "none") : n === "none" && (e[r] === "/" && e[r + 1] === "/" ? n = "singleline" : e[r] === "/" && e[r + 1] === "*" ? (n = "multiline", r += 2) : t.push(e[r]));
1144
+ return t.join("");
1145
+ }
1146
+ function Z(e) {
1147
+ return e == null && (e = []), Array.isArray(e) ? e : [e];
1148
+ }
1149
+ function pn(e) {
1150
+ return e != null && typeof e == "object" && !Array.isArray(e);
1151
+ }
1152
+ function Tt(e, t, n = void 0) {
1153
+ const r = t.replace(/\[(\d+)\]/g, ".$1").split(".");
1154
+ let s = e;
10
1155
  for (const o of r)
11
- if (g(o))
12
- t.push(o);
1156
+ if (s = new Object(s)[o], s === void 0)
1157
+ return n;
1158
+ return s;
1159
+ }
1160
+ function $t() {
1161
+ let e = null, t = null;
1162
+ const n = new Promise((r, s) => {
1163
+ e = r, t = s;
1164
+ });
1165
+ return n.resolve = e, n.reject = t, n;
1166
+ }
1167
+ function ks(e) {
1168
+ if (!Number.isNaN(e))
1169
+ return !1;
1170
+ const t = new Float64Array(1);
1171
+ return t[0] = e, new Uint32Array(t.buffer)[1] >>> 31 === 1;
1172
+ }
1173
+ function _t(e) {
1174
+ const t = e % 10, n = e % 100;
1175
+ return t === 1 && n !== 11 ? `${e}st` : t === 2 && n !== 12 ? `${e}nd` : t === 3 && n !== 13 ? `${e}rd` : `${e}th`;
1176
+ }
1177
+ function wt(e) {
1178
+ return Array.from(new Set(e));
1179
+ }
1180
+ const At = /* @__PURE__ */ Symbol("vitest:SAFE_TIMERS");
1181
+ function mn() {
1182
+ const { setTimeout: e, setInterval: t, clearInterval: n, clearTimeout: r, setImmediate: s, clearImmediate: o, queueMicrotask: i } = globalThis[At] || globalThis, { nextTick: u } = globalThis[At] || globalThis.process || {};
1183
+ return {
1184
+ nextTick: u,
1185
+ setTimeout: e,
1186
+ setInterval: t,
1187
+ clearInterval: n,
1188
+ clearTimeout: r,
1189
+ setImmediate: s,
1190
+ clearImmediate: o,
1191
+ queueMicrotask: i
1192
+ };
1193
+ }
1194
+ const Ms = /^[A-Za-z]:\//;
1195
+ function Ps(e = "") {
1196
+ return e && e.replace(/\\/g, "/").replace(Ms, (t) => t.toUpperCase());
1197
+ }
1198
+ const js = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
1199
+ function Fs() {
1200
+ return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
1201
+ }
1202
+ const Ls = function(...e) {
1203
+ e = e.map((r) => Ps(r));
1204
+ let t = "", n = !1;
1205
+ for (let r = e.length - 1; r >= -1 && !n; r--) {
1206
+ const s = r >= 0 ? e[r] : Fs();
1207
+ !s || s.length === 0 || (t = `${s}/${t}`, n = Ct(s));
1208
+ }
1209
+ return t = Ds(t, !n), n && !Ct(t) ? `/${t}` : t.length > 0 ? t : ".";
1210
+ };
1211
+ function Ds(e, t) {
1212
+ let n = "", r = 0, s = -1, o = 0, i = null;
1213
+ for (let u = 0; u <= e.length; ++u) {
1214
+ if (u < e.length)
1215
+ i = e[u];
1216
+ else {
1217
+ if (i === "/")
1218
+ break;
1219
+ i = "/";
1220
+ }
1221
+ if (i === "/") {
1222
+ if (!(s === u - 1 || o === 1)) if (o === 2) {
1223
+ if (n.length < 2 || r !== 2 || n[n.length - 1] !== "." || n[n.length - 2] !== ".") {
1224
+ if (n.length > 2) {
1225
+ const c = n.lastIndexOf("/");
1226
+ c === -1 ? (n = "", r = 0) : (n = n.slice(0, c), r = n.length - 1 - n.lastIndexOf("/")), s = u, o = 0;
1227
+ continue;
1228
+ } else if (n.length > 0) {
1229
+ n = "", r = 0, s = u, o = 0;
1230
+ continue;
1231
+ }
1232
+ }
1233
+ t && (n += n.length > 0 ? "/.." : "..", r = 2);
1234
+ } else
1235
+ n.length > 0 ? n += `/${e.slice(s + 1, u)}` : n = e.slice(s + 1, u), r = u - s - 1;
1236
+ s = u, o = 0;
1237
+ } else i === "." && o !== -1 ? ++o : o = -1;
1238
+ }
1239
+ return n;
1240
+ }
1241
+ const Ct = function(e) {
1242
+ return js.test(e);
1243
+ };
1244
+ var xt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", zs = new Uint8Array(64), vs = new Uint8Array(128);
1245
+ for (let e = 0; e < xt.length; e++) {
1246
+ const t = xt.charCodeAt(e);
1247
+ zs[e] = t, vs[t] = e;
1248
+ }
1249
+ const dn = /^\s*at .*(?:\S:\d+|\(native\))/m, Us = /^(?:eval@)?(?:\[native code\])?$/, Ws = Date.now().toString().length, Vs = new RegExp(`vitest=\\d{${Ws}}`);
1250
+ function hn(e) {
1251
+ if (!e.includes(":"))
1252
+ return [e];
1253
+ const n = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g, ""));
1254
+ if (!n)
1255
+ return [e];
1256
+ let r = n[1];
1257
+ if (r.startsWith("async ") && (r = r.slice(6)), r.startsWith("http:") || r.startsWith("https:")) {
1258
+ const s = new URL(r);
1259
+ s.searchParams.delete("import"), s.searchParams.delete("browserv"), r = s.pathname + s.hash + s.search;
1260
+ }
1261
+ if (r.startsWith("/@fs/")) {
1262
+ const s = /^\/@fs\/[a-zA-Z]:\//.test(r);
1263
+ r = r.slice(s ? 5 : 4);
1264
+ }
1265
+ return r.includes("vitest=") && (r = r.replace(Vs, "").replace(/[?&]$/, "")), [
1266
+ r,
1267
+ n[2] || void 0,
1268
+ n[3] || void 0
1269
+ ];
1270
+ }
1271
+ function Ks(e) {
1272
+ let t = e.trim();
1273
+ if (Us.test(t) || (t.includes(" > eval") && (t = t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), !t.includes("@")))
1274
+ return null;
1275
+ let n = -1, r = "", s;
1276
+ for (let c = 0; c < t.length; c++)
1277
+ if (t[c] === "@") {
1278
+ const l = t.slice(c + 1);
1279
+ if (l.includes(":") && l.length >= 3) {
1280
+ n = c, r = l, s = c > 0 ? t.slice(0, c) : void 0;
1281
+ break;
1282
+ }
1283
+ }
1284
+ if (n === -1 || !r.includes(":") || r.length < 3)
1285
+ return null;
1286
+ const [o, i, u] = hn(r);
1287
+ return !o || !i || !u ? null : {
1288
+ file: o,
1289
+ method: s || "",
1290
+ line: Number.parseInt(i),
1291
+ column: Number.parseInt(u)
1292
+ };
1293
+ }
1294
+ function Bs(e) {
1295
+ const t = e.trim();
1296
+ return dn.test(t) ? qs(t) : Ks(t);
1297
+ }
1298
+ function qs(e) {
1299
+ let t = e.trim();
1300
+ if (!dn.test(t))
1301
+ return null;
1302
+ t.includes("(eval ") && (t = t.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
1303
+ let n = t.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, "");
1304
+ const r = n.match(/ (\(.+\)$)/);
1305
+ n = r ? n.replace(r[0], "") : n;
1306
+ const [s, o, i] = hn(r ? r[1] : n);
1307
+ let u = r && n || "", c = s && ["eval", "<anonymous>"].includes(s) ? void 0 : s;
1308
+ return !c || !o || !i ? null : (u.startsWith("async ") && (u = u.slice(6)), c.startsWith("file://") && (c = c.slice(7)), c = c.startsWith("node:") || c.startsWith("internal:") ? c : Ls(c), u && (u = u.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g, "$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "").replace(/(Object\.)?__vite_ssr_export_default__\s?/g, "")), {
1309
+ method: u,
1310
+ file: c,
1311
+ line: Number.parseInt(o),
1312
+ column: Number.parseInt(i)
1313
+ });
1314
+ }
1315
+ class Ys extends Error {
1316
+ code = "VITEST_PENDING";
1317
+ taskId;
1318
+ constructor(t, n, r) {
1319
+ super(t), this.message = t, this.note = r, this.taskId = n.id;
1320
+ }
1321
+ }
1322
+ class j extends Error {
1323
+ name = "FixtureDependencyError";
1324
+ }
1325
+ class Hs extends Error {
1326
+ name = "FixtureAccessError";
1327
+ }
1328
+ class It extends Error {
1329
+ name = "FixtureParseError";
1330
+ }
1331
+ const Gs = /* @__PURE__ */ new WeakMap(), gn = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap();
1332
+ function Js(e, t) {
1333
+ Gs.set(e, t);
1334
+ }
1335
+ function Xs(e, t) {
1336
+ gn.set(e, t);
1337
+ }
1338
+ function Zs(e) {
1339
+ return gn.get(e);
1340
+ }
1341
+ function Qs(e, t) {
1342
+ yn.set(e, t);
1343
+ }
1344
+ function eo(e) {
1345
+ return yn.get(e);
1346
+ }
1347
+ const fe = /* @__PURE__ */ Symbol.for("VITEST_FIXTURE_STACK_TRACE");
1348
+ class E {
1349
+ _suiteContexts;
1350
+ _overrides = /* @__PURE__ */ new WeakMap();
1351
+ _registrations;
1352
+ static _definitions = [];
1353
+ static _builtinFixtures = [
1354
+ "task",
1355
+ "signal",
1356
+ "onTestFailed",
1357
+ "onTestFinished",
1358
+ "skip",
1359
+ "annotate"
1360
+ ];
1361
+ static _fixtureOptionKeys = [
1362
+ "auto",
1363
+ "injected",
1364
+ "scope"
1365
+ ];
1366
+ static _fixtureScopes = [
1367
+ "test",
1368
+ "file",
1369
+ "worker"
1370
+ ];
1371
+ static _workerContextSuite = { type: "worker" };
1372
+ static clearDefinitions() {
1373
+ E._definitions.length = 0;
1374
+ }
1375
+ static getWorkerContexts() {
1376
+ return E._definitions.map((t) => t.getWorkerContext());
1377
+ }
1378
+ static getFileContexts(t) {
1379
+ return E._definitions.map((n) => n.getFileContext(t));
1380
+ }
1381
+ static isFixtureOptions(t) {
1382
+ return pn(t) && Object.keys(t).some((n) => E._fixtureOptionKeys.includes(n));
1383
+ }
1384
+ constructor(t) {
1385
+ this._registrations = t ?? /* @__PURE__ */ new Map(), this._suiteContexts = /* @__PURE__ */ new WeakMap(), E._definitions.push(this);
1386
+ }
1387
+ extend(t, n) {
1388
+ const { suite: r } = k(), s = !r || r.file === r, o = this.parseUserFixtures(t, n, s);
1389
+ return new E(o);
1390
+ }
1391
+ get(t) {
1392
+ let n = t;
1393
+ for (; n; ) {
1394
+ const r = this._overrides.get(n);
1395
+ if (r)
1396
+ return r;
1397
+ if (n === n.file)
1398
+ break;
1399
+ n = n.suite || n.file;
1400
+ }
1401
+ return this._registrations;
1402
+ }
1403
+ override(t, n) {
1404
+ const { suite: r, file: s } = k(), o = r || s, i = !r || r.file === r, u = new Map(this.get(o)), c = this.parseUserFixtures(t, n, i, u);
1405
+ i ? this._registrations = c : this._overrides.set(o, c);
1406
+ }
1407
+ getFileContext(t) {
1408
+ return this._suiteContexts.has(t) || this._suiteContexts.set(t, /* @__PURE__ */ Object.create(null)), this._suiteContexts.get(t);
1409
+ }
1410
+ getWorkerContext() {
1411
+ return this._suiteContexts.has(E._workerContextSuite) || this._suiteContexts.set(E._workerContextSuite, /* @__PURE__ */ Object.create(null)), this._suiteContexts.get(E._workerContextSuite);
1412
+ }
1413
+ parseUserFixtures(t, n, r, s = new Map(this._registrations)) {
1414
+ const o = [];
1415
+ Object.entries(n).forEach(([i, u]) => {
1416
+ let c, l, f;
1417
+ Array.isArray(u) && u.length >= 2 && E.isFixtureOptions(u[1]) ? (f = u[1], c = {
1418
+ auto: f.auto ?? !1,
1419
+ scope: f.scope ?? "test",
1420
+ injected: f.injected ?? !1
1421
+ }, l = c.injected ? t.injectValue?.(i) ?? u[0] : u[0]) : l = u;
1422
+ const m = s.get(i);
1423
+ m && c ? (m.scope !== c.scope && o.push(new j(`The "${i}" fixture was already registered with a "${c.scope}" scope.`)), m.auto !== c.auto && o.push(new j(`The "${i}" fixture was already registered as { auto: ${c.auto} }.`))) : m ? c = {
1424
+ auto: m.auto,
1425
+ scope: m.scope,
1426
+ injected: m.injected
1427
+ } : c || (c = {
1428
+ auto: !1,
1429
+ injected: !1,
1430
+ scope: "test"
1431
+ }), c.scope && !E._fixtureScopes.includes(c.scope) && o.push(new j(`The "${i}" fixture has unknown scope "${c.scope}".`)), !r && c.scope !== "test" && o.push(new j(`The "${i}" fixture cannot be defined with a ${c.scope} scope${!f?.scope && m?.scope ? " (inherited from the base fixture)" : ""} inside the describe block. Define it at the top level of the file instead.`));
1432
+ const g = Q(l) ? ve(l) : /* @__PURE__ */ new Set(), h = {
1433
+ name: i,
1434
+ value: l,
1435
+ auto: c.auto ?? !1,
1436
+ injected: c.injected ?? !1,
1437
+ scope: c.scope ?? "test",
1438
+ deps: g,
1439
+ parent: m
1440
+ };
1441
+ Q(l) && Object.assign(l, { [fe]: new Error("STACK_TRACE_ERROR") }), s.set(i, h), h.scope === "worker" && (t.pool === "vmThreads" || t.pool === "vmForks") && (h.scope = "file");
1442
+ });
1443
+ for (const i of s.values())
1444
+ for (const u of i.deps) {
1445
+ if (E._builtinFixtures.includes(u))
1446
+ continue;
1447
+ const c = s.get(u);
1448
+ if (!c) {
1449
+ o.push(new j(`The "${i.name}" fixture depends on unknown fixture "${u}".`));
1450
+ continue;
1451
+ }
1452
+ if (u === i.name && !i.parent) {
1453
+ o.push(new j(`The "${i.name}" fixture depends on itself, but does not have a base implementation.`));
1454
+ continue;
1455
+ }
1456
+ if (E._fixtureScopes.indexOf(i.scope) > E._fixtureScopes.indexOf(c.scope)) {
1457
+ o.push(new j(`The ${i.scope} "${i.name}" fixture cannot depend on a ${c.scope} fixture "${c.name}".`));
1458
+ continue;
1459
+ }
1460
+ }
1461
+ if (o.length === 1)
1462
+ throw o[0];
1463
+ if (o.length > 1)
1464
+ throw new AggregateError(o, "Cannot resolve user fixtures. See errors for more information.");
1465
+ return s;
1466
+ }
1467
+ }
1468
+ const V = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap();
1469
+ function ee(e, t) {
1470
+ const n = k(), r = t?.suite || n.suite || n.file;
1471
+ return async (s) => {
1472
+ const o = s || t?.context;
1473
+ if (!o)
1474
+ return t?.suiteHook && so(e, t.suiteHook, t.stackTraceError), e({});
1475
+ const i = t?.fixtures || Zs(o);
1476
+ if (!i)
1477
+ return e(o);
1478
+ const u = i.get(r);
1479
+ if (!u.size)
1480
+ return e(o);
1481
+ const c = [], l = ve(e);
1482
+ for (const h of u.values())
1483
+ (to(h, t) || l.has(h.name)) && c.push(h);
1484
+ if (!c.length)
1485
+ return e(o);
1486
+ V.has(o) || V.set(o, []);
1487
+ const f = V.get(o), m = Sn(c, u);
1488
+ if (!m.length)
1489
+ return e(o);
1490
+ if (t?.suiteHook) {
1491
+ const h = m.filter((d) => d.scope === "test");
1492
+ if (h.length > 0) {
1493
+ const d = h.map((y) => `"${y.name}"`).join(", "), a = {
1494
+ aroundAll: "aroundEach",
1495
+ beforeAll: "beforeEach",
1496
+ afterAll: "afterEach"
1497
+ }, p = new j(`Test-scoped fixtures cannot be used inside ${t.suiteHook} hook. The following fixtures are test-scoped: ${d}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${a[t.suiteHook]} hook.`);
1498
+ throw t.stackTraceError?.stack && (p.stack = p.message + t.stackTraceError.stack.replace(t.stackTraceError.message, "")), p;
1499
+ }
1500
+ }
1501
+ xe.has(o) || xe.set(o, /* @__PURE__ */ new WeakSet());
1502
+ const g = xe.get(o);
1503
+ for (const h of m)
1504
+ if (h.scope === "test") {
1505
+ if (g.has(h))
1506
+ continue;
1507
+ g.add(h);
1508
+ const d = await no(h, o, f);
1509
+ o[h.name] = d, f.push(() => {
1510
+ g.delete(h);
1511
+ });
1512
+ } else {
1513
+ const d = await ro(i, r, h);
1514
+ o[h.name] = d;
1515
+ }
1516
+ return e(o);
1517
+ };
1518
+ }
1519
+ function to(e, t) {
1520
+ return !(!e.auto || t?.suiteHook && e.scope === "test");
1521
+ }
1522
+ function Q(e) {
1523
+ return typeof e == "function";
1524
+ }
1525
+ function no(e, t, n) {
1526
+ return Q(e.value) ? bn(e.value, e.name, t, n) : e.value;
1527
+ }
1528
+ const ie = /* @__PURE__ */ new WeakMap();
1529
+ async function ro(e, t, n) {
1530
+ const r = e.getWorkerContext(), s = e.getFileContext(t.file), o = n.scope === "worker" ? r : s;
1531
+ if (!Q(n.value))
1532
+ return o[n.name] = n.value, n.value;
1533
+ if (n.name in o)
1534
+ return o[n.name];
1535
+ if (ie.has(n))
1536
+ return ie.get(n);
1537
+ V.has(o) || V.set(o, []);
1538
+ const i = V.get(o), u = bn(n.value, n.name, n.scope === "file" ? {
1539
+ ...r,
1540
+ ...s
1541
+ } : o, i).then((c) => (o[n.name] = c, ie.delete(n), c));
1542
+ return ie.set(n, u), u;
1543
+ }
1544
+ async function bn(e, t, n, r) {
1545
+ const s = $t(), o = fe in e && e[fe] instanceof Error ? e[fe] : void 0;
1546
+ let i = !1;
1547
+ const u = e(n, async (c) => {
1548
+ i = !0, s.resolve(c);
1549
+ const l = $t();
1550
+ r.push(async () => {
1551
+ l.resolve(), await u;
1552
+ }), await l;
1553
+ }).then(() => {
1554
+ if (!i) {
1555
+ const c = new Error(`Fixture "${t}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);
1556
+ o?.stack && (c.stack = c.message + o.stack.replace(o.message, "")), s.reject(c);
1557
+ }
1558
+ }).catch((c) => {
1559
+ if (!i) {
1560
+ s.reject(c);
1561
+ return;
1562
+ }
1563
+ throw c;
1564
+ });
1565
+ return s;
1566
+ }
1567
+ function Sn(e, t, n = /* @__PURE__ */ new Set(), r = []) {
1568
+ return e.forEach((s) => {
1569
+ if (!r.includes(s)) {
1570
+ if (!Q(s.value) || !s.deps) {
1571
+ r.push(s);
1572
+ return;
1573
+ }
1574
+ if (n.has(s))
1575
+ if (s.parent)
1576
+ s = s.parent;
1577
+ else
1578
+ throw new Error(`Circular fixture dependency detected: ${s.name} <- ${[...n].reverse().map((o) => o.name).join(" <- ")}`);
1579
+ n.add(s), Sn([...s.deps].map((o) => o === s.name ? s.parent : t.get(o)).filter((o) => !!o), t, n, r), r.push(s), n.clear();
1580
+ }
1581
+ }), r;
1582
+ }
1583
+ function so(e, t, n) {
1584
+ const r = ve(e, {
1585
+ sourceError: n,
1586
+ suiteHook: t
1587
+ });
1588
+ if (r.size) {
1589
+ const s = new Hs(`The ${t} hook uses fixtures "${[...r].join('", "')}", but has no access to context. Did you forget to call it as "test.${t}()" instead of "${t}()"?
1590
+ If you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);
1591
+ throw n && (s.stack = n.stack?.replace(n.message, s.message)), s;
1592
+ }
1593
+ }
1594
+ const Oe = /* @__PURE__ */ Symbol("$vitest:fixture-props"), Re = /* @__PURE__ */ Symbol("$vitest:fixture-prop-names");
1595
+ function de(e, t) {
1596
+ Object.defineProperty(e, Oe, {
1597
+ value: t,
1598
+ enumerable: !1
1599
+ });
1600
+ }
1601
+ function ce(e, t) {
1602
+ return e[Re] = t, t;
1603
+ }
1604
+ function ve(e, { sourceError: t, suiteHook: n } = {}) {
1605
+ if (Re in e)
1606
+ return e[Re];
1607
+ const { index: r = 0, original: s = e } = Oe in e ? e[Oe] : {};
1608
+ let o = Rs(s.toString());
1609
+ /__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(o) && (o = o.split(/__async\((?:this|null),/)[1]);
1610
+ const i = o.match(/[^(]*\(([^)]*)/);
1611
+ if (!i)
1612
+ return ce(e, /* @__PURE__ */ new Set());
1613
+ const u = Nt(i[1]);
1614
+ if (!u.length)
1615
+ return ce(e, /* @__PURE__ */ new Set());
1616
+ const c = u[r];
1617
+ if (!c)
1618
+ return ce(e, /* @__PURE__ */ new Set());
1619
+ if (!(c[0] === "{" && c.endsWith("}"))) {
1620
+ const g = _t(r + 1), h = new It(`The ${g} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${c}".${n ? ` If you used internal "suite" task as the ${g} argument previously, access it in the ${_t(r + 2)} argument instead.` : ""}`);
1621
+ throw t && (h.stack = t.stack?.replace(t.message, h.message)), h;
1622
+ }
1623
+ const l = c.slice(1, -1).replace(/\s/g, ""), f = Nt(l).map((g) => g.replace(/:.*|=.*/g, "")), m = f.at(-1);
1624
+ if (m && m.startsWith("...")) {
1625
+ const g = new It(`Rest parameters are not supported in fixtures, received "${m}".`);
1626
+ throw t && (g.stack = t.stack?.replace(t.message, g.message)), g;
1627
+ }
1628
+ return ce(e, new Set(f));
1629
+ }
1630
+ function Nt(e) {
1631
+ const t = [], n = [];
1632
+ let r = 0;
1633
+ for (let o = 0; o < e.length; o++)
1634
+ if (e[o] === "{" || e[o] === "[")
1635
+ n.push(e[o] === "{" ? "}" : "]");
1636
+ else if (e[o] === n.at(-1))
1637
+ n.pop();
1638
+ else if (!n.length && e[o] === ",") {
1639
+ const i = e.substring(r, o).trim();
1640
+ i && t.push(i), r = o + 1;
1641
+ }
1642
+ const s = e.substring(r).trim();
1643
+ return s && t.push(s), t;
1644
+ }
1645
+ const En = /* @__PURE__ */ Symbol("kChainableContext");
1646
+ function P(e) {
1647
+ return e?.[En];
1648
+ }
1649
+ function Tn(e, t, n) {
1650
+ function r(o) {
1651
+ const i = function(...u) {
1652
+ return t.apply(o, u);
1653
+ };
1654
+ Object.assign(i, t), Object.defineProperty(i, En, {
1655
+ value: {
1656
+ withContext: () => i.bind(o),
1657
+ getFixtures: () => o.fixtures,
1658
+ setContext: (u, c) => {
1659
+ o[u] = c;
1660
+ },
1661
+ mergeContext: (u) => {
1662
+ Object.assign(o, u);
1663
+ }
1664
+ },
1665
+ enumerable: !1
1666
+ });
1667
+ for (const u of e)
1668
+ Object.defineProperty(i, u, { get() {
1669
+ return r({
1670
+ ...o,
1671
+ [u]: !0
1672
+ });
1673
+ } });
1674
+ return i;
1675
+ }
1676
+ const s = r(n ?? {});
1677
+ return Object.defineProperty(s, "fn", {
1678
+ value: t,
1679
+ enumerable: !1
1680
+ }), s;
1681
+ }
1682
+ function U() {
1683
+ return We().config.hookTimeout;
1684
+ }
1685
+ const $n = /* @__PURE__ */ Symbol.for("VITEST_CLEANUP_TIMEOUT"), _n = /* @__PURE__ */ Symbol.for("VITEST_CLEANUP_STACK_TRACE"), wn = /* @__PURE__ */ Symbol.for("VITEST_AROUND_TIMEOUT"), An = /* @__PURE__ */ Symbol.for("VITEST_AROUND_STACK_TRACE");
1686
+ function oo(e, t = U()) {
1687
+ Y(e, '"beforeAll" callback', ["function"]);
1688
+ const n = new Error("STACK_TRACE_ERROR"), r = P(this);
1689
+ return k().on("beforeAll", Object.assign(W(Ue("beforeAll", e, r, n), t, !0, n), {
1690
+ [$n]: t,
1691
+ [_n]: n
1692
+ }));
1693
+ }
1694
+ function io(e, t) {
1695
+ Y(e, '"afterAll" callback', ["function"]);
1696
+ const n = P(this), r = new Error("STACK_TRACE_ERROR");
1697
+ return k().on("afterAll", W(Ue("afterAll", e, n, r), t ?? U(), !0, r));
1698
+ }
1699
+ function co(e, t = U()) {
1700
+ Y(e, '"beforeEach" callback', ["function"]);
1701
+ const n = new Error("STACK_TRACE_ERROR"), r = (s, o) => ee(e, { suite: o })(s);
1702
+ return k().on("beforeEach", Object.assign(W(r, t ?? U(), !0, n, Ke), {
1703
+ [$n]: t,
1704
+ [_n]: n
1705
+ }));
1706
+ }
1707
+ function uo(e, t) {
1708
+ Y(e, '"afterEach" callback', ["function"]);
1709
+ const n = (r, s) => ee(e, { suite: s })(r);
1710
+ return k().on("afterEach", W(n, t ?? U(), !0, new Error("STACK_TRACE_ERROR"), Ke));
1711
+ }
1712
+ function ao(e, t) {
1713
+ Y(e, '"aroundAll" callback', ["function"]);
1714
+ const n = new Error("STACK_TRACE_ERROR"), r = t ?? U(), s = P(this);
1715
+ return k().on("aroundAll", Object.assign(Ue("aroundAll", e, s, n, 1), {
1716
+ [wn]: r,
1717
+ [An]: n
1718
+ }));
1719
+ }
1720
+ function lo(e, t) {
1721
+ Y(e, '"aroundEach" callback', ["function"]);
1722
+ const n = new Error("STACK_TRACE_ERROR"), r = t ?? U(), s = (o, i, u) => {
1723
+ const c = (f) => e(o, f, u);
1724
+ return de(c, {
1725
+ index: 1,
1726
+ original: e
1727
+ }), ee(c, { suite: u })(i);
1728
+ };
1729
+ return k().on("aroundEach", Object.assign(s, {
1730
+ [wn]: r,
1731
+ [An]: n
1732
+ }));
1733
+ }
1734
+ function Ue(e, t, n, r, s = 0) {
1735
+ return (...o) => {
1736
+ const i = o.at(-1), u = o.slice(0, -1), c = (g) => t(...u, g, i);
1737
+ de(c, {
1738
+ index: s,
1739
+ original: t
1740
+ });
1741
+ const l = n?.getFixtures(), f = l?.getFileContext(i.file);
1742
+ return ee(c, {
1743
+ suiteHook: e,
1744
+ fixtures: l,
1745
+ context: f,
1746
+ stackTraceError: r
1747
+ })();
1748
+ };
1749
+ }
1750
+ function Cn(e, t) {
1751
+ const n = t.split(`
1752
+ `).slice(1);
1753
+ for (const r of n) {
1754
+ const s = Bs(r);
1755
+ if (s && s.file === e)
1756
+ return s;
1757
+ }
1758
+ }
1759
+ function fo(e, t) {
1760
+ if (!e.strictTags)
1761
+ return;
1762
+ const n = new Set(e.tags.map((r) => r.name));
1763
+ for (const r of t)
1764
+ if (!n.has(r))
1765
+ throw xn(e.tags, r);
1766
+ }
1767
+ function xn(e, t, n = "tag") {
1768
+ throw e.length ? new Error(`The ${n} "${t}" is not defined in the configuration. Available tags are:
1769
+ ${e.map((r) => `- ${r.name}${r.description ? `: ${r.description}` : ""}`).join(`
1770
+ `)}`) : new Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${n} for this test. See: https://vitest.dev/guide/test-tags`);
1771
+ }
1772
+ function Ot(e) {
1773
+ return e.type === "test";
1774
+ }
1775
+ function In(e) {
1776
+ const t = [], n = Z(e);
1777
+ for (const r of n)
1778
+ if (Ot(r))
1779
+ t.push(r);
13
1780
  else
14
- for (const i of o.tasks)
15
- if (g(i))
16
- t.push(i);
1781
+ for (const s of r.tasks)
1782
+ if (Ot(s))
1783
+ t.push(s);
17
1784
  else {
18
- const d = a(i);
19
- for (const n of d)
20
- t.push(n);
1785
+ const o = In(s);
1786
+ for (const i of o)
1787
+ t.push(i);
21
1788
  }
22
1789
  return t;
23
1790
  }
24
- class u {
1791
+ function ue(e, t = " > ") {
1792
+ return e.filter((n) => n !== void 0).join(t);
1793
+ }
1794
+ const v = yo();
1795
+ Ve(function(e, t, n) {
1796
+ k().test.fn.call(this, L(e), t, n);
1797
+ });
1798
+ let $, Nn, po;
1799
+ function On(e, t) {
1800
+ if (!e)
1801
+ throw new Error(`Vitest failed to find ${t}. One of the following is possible:
1802
+ - "vitest" is imported directly without running "vitest" command
1803
+ - "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
1804
+ - "vitest" is imported inside Vite / Vitest config file
1805
+ - Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
1806
+ `);
1807
+ }
1808
+ function We() {
1809
+ return On($, "the runner"), $;
1810
+ }
1811
+ function k() {
1812
+ const e = w.currentSuite || Nn;
1813
+ return On(e, "the current suite"), e;
1814
+ }
1815
+ function mo() {
1816
+ return {
1817
+ beforeAll: [],
1818
+ afterAll: [],
1819
+ beforeEach: [],
1820
+ afterEach: [],
1821
+ aroundEach: [],
1822
+ aroundAll: []
1823
+ };
1824
+ }
1825
+ const Rt = Number.POSITIVE_INFINITY;
1826
+ function K(e, t) {
1827
+ if (t != null && typeof t == "object")
1828
+ 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.');
1829
+ let n = {}, r;
1830
+ if (typeof t == "number" ? n = { timeout: t } : typeof e == "object" && (n = e), typeof e == "function") {
1831
+ if (typeof t == "function")
1832
+ throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");
1833
+ r = e;
1834
+ } else typeof t == "function" && (r = t);
1835
+ return {
1836
+ options: n,
1837
+ handler: r
1838
+ };
1839
+ }
1840
+ function ho(e, t = () => {
1841
+ }, n, r, s) {
1842
+ const o = [];
1843
+ let i;
1844
+ m();
1845
+ const u = function(d = "", a = {}) {
1846
+ const p = w.currentSuite?.suite, O = (p ?? w.currentSuite?.file)?.tags || [], H = wt([...O, ...Z(a.tags)]), G = H.map((_) => {
1847
+ const x = $.config.tags?.find((Ge) => Ge.name === _);
1848
+ if (!x && $.config.strictTags)
1849
+ throw xn($.config.tags, _);
1850
+ return x;
1851
+ }).filter((_) => _ != null).sort((_, x) => (x.priority ?? Rt) - (_.priority ?? Rt)).reduce((_, x) => {
1852
+ const { name: Ge, description: Oo, priority: Ro, meta: Je, ...Pn } = x;
1853
+ return Object.assign(_, Pn), Je && (_.meta = Object.assign(_.meta ?? /* @__PURE__ */ Object.create(null), Je)), _;
1854
+ }, {}), te = a.meta;
1855
+ a = {
1856
+ ...G,
1857
+ ...a
1858
+ };
1859
+ const Be = a.timeout ?? $.config.testTimeout, qe = p?.meta, Ye = G.meta, ne = /* @__PURE__ */ Object.create(null);
1860
+ Ye && Object.assign(ne, Ye), qe && Object.assign(ne, qe), te && Object.assign(ne, te);
1861
+ const C = {
1862
+ id: "",
1863
+ name: d,
1864
+ fullName: ue([p?.fullName ?? w.currentSuite?.file?.fullName, d]),
1865
+ fullTestName: ue([p?.fullTestName, d]),
1866
+ suite: p,
1867
+ each: a.each,
1868
+ fails: a.fails,
1869
+ context: void 0,
1870
+ type: "test",
1871
+ file: p?.file ?? w.currentSuite?.file,
1872
+ timeout: Be,
1873
+ retry: a.retry ?? $.config.retry,
1874
+ repeats: a.repeats,
1875
+ mode: a.only ? "only" : a.skip ? "skip" : a.todo ? "todo" : "run",
1876
+ meta: ne,
1877
+ annotations: [],
1878
+ artifacts: [],
1879
+ tags: H
1880
+ }, Se = a.handler;
1881
+ C.mode === "run" && !Se && (C.mode = "todo"), (a.concurrent ?? (!a.sequential && $.config.sequence.concurrent)) && (C.concurrent = !0), C.shuffle = s?.shuffle;
1882
+ const re = wo(C, $);
1883
+ Object.defineProperty(C, "context", {
1884
+ value: re,
1885
+ enumerable: !1
1886
+ }), Xs(re, a.fixtures ?? new E());
1887
+ const Mn = Error.stackTraceLimit;
1888
+ Error.stackTraceLimit = 10;
1889
+ const He = new Error("STACK_TRACE_ERROR");
1890
+ if (Error.stackTraceLimit = Mn, Se && Js(C, W($o(go(ee(Se, { context: re }), C), C.context.signal), Be, !1, He, (_, x) => Ke([re], x))), $.config.includeTaskLocation) {
1891
+ const _ = He.stack, x = Cn(po, _);
1892
+ x && (C.location = {
1893
+ line: x.line,
1894
+ column: x.column
1895
+ });
1896
+ }
1897
+ return o.push(C), C;
1898
+ }, c = Ve(function(d, a, p) {
1899
+ let { options: y, handler: O } = K(a, p);
1900
+ typeof s == "object" && (y = Object.assign({}, s, y));
1901
+ const H = this.concurrent ?? (!this.sequential && y?.concurrent);
1902
+ y.concurrent != null && H != null && (y.concurrent = H);
1903
+ const G = this.sequential ?? (!this.concurrent && y?.sequential);
1904
+ y.sequential != null && G != null && (y.sequential = G);
1905
+ const te = u(L(d), {
1906
+ ...this,
1907
+ ...y,
1908
+ handler: O
1909
+ });
1910
+ te.type = "test";
1911
+ }), l = {
1912
+ type: "collector",
1913
+ name: e,
1914
+ mode: n,
1915
+ suite: i,
1916
+ options: s,
1917
+ test: c,
1918
+ file: i.file,
1919
+ tasks: o,
1920
+ collect: h,
1921
+ task: u,
1922
+ clear: g,
1923
+ on: f
1924
+ };
1925
+ function f(d, ...a) {
1926
+ eo(i)[d].push(...a);
1927
+ }
1928
+ function m(d) {
1929
+ typeof s == "number" && (s = { timeout: s });
1930
+ const a = w.currentSuite?.suite, p = a ?? w.currentSuite?.file, y = Z(s?.tags);
1931
+ fo($.config, y), i = {
1932
+ id: "",
1933
+ type: "suite",
1934
+ name: e,
1935
+ fullName: ue([a?.fullName ?? w.currentSuite?.file?.fullName, e]),
1936
+ fullTestName: ue([a?.fullTestName, e]),
1937
+ suite: a,
1938
+ mode: n,
1939
+ each: r,
1940
+ file: a?.file ?? w.currentSuite?.file,
1941
+ shuffle: s?.shuffle,
1942
+ tasks: [],
1943
+ meta: s?.meta ?? /* @__PURE__ */ Object.create(null),
1944
+ concurrent: s?.concurrent,
1945
+ tags: wt([...p?.tags || [], ...y])
1946
+ }, Qs(i, mo());
1947
+ }
1948
+ function g() {
1949
+ o.length = 0, m();
1950
+ }
1951
+ async function h(d) {
1952
+ if (!d)
1953
+ throw new TypeError("File is required to collect tasks.");
1954
+ t && await To(l, () => t(c));
1955
+ const a = [];
1956
+ for (const p of o)
1957
+ a.push(p.type === "collector" ? await p.collect(d) : p);
1958
+ return i.tasks = a, i;
1959
+ }
1960
+ return Eo(l), l;
1961
+ }
1962
+ function go(e, t) {
1963
+ return (async (...n) => {
1964
+ const r = await e(...n);
1965
+ if (t.promises) {
1966
+ const o = (await Promise.allSettled(t.promises)).map((i) => i.status === "rejected" ? i.reason : void 0).filter(Boolean);
1967
+ if (o.length)
1968
+ throw o;
1969
+ }
1970
+ return r;
1971
+ });
1972
+ }
1973
+ function yo() {
1974
+ function e(t, n, r) {
1975
+ const s = w.currentSuite || Nn;
1976
+ let { options: o, handler: i } = K(n, r);
1977
+ const u = o.concurrent || this.concurrent || o.sequential === !1, c = o.sequential || this.sequential || o.concurrent === !1, { meta: l, ...f } = s?.options || {};
1978
+ o = {
1979
+ ...f,
1980
+ ...o
1981
+ };
1982
+ const m = this.shuffle ?? o.shuffle ?? s?.options?.shuffle ?? $?.config.sequence.shuffle;
1983
+ m != null && (o.shuffle = m);
1984
+ let g = this.only ?? o.only ? "only" : this.skip ?? o.skip ? "skip" : this.todo ?? o.todo ? "todo" : "run";
1985
+ g === "run" && !i && (g = "todo");
1986
+ const h = u || o.concurrent && !c, d = c || o.sequential && !u;
1987
+ return h != null && (o.concurrent = h && !d), d != null && (o.sequential = d && !h), l && (o.meta = Object.assign(/* @__PURE__ */ Object.create(null), l, o.meta)), ho(L(t), i, g, this.each, o);
1988
+ }
1989
+ return e.each = function(t, ...n) {
1990
+ const r = P(this), s = r.withContext();
1991
+ return r.setContext("each", !0), Array.isArray(t) && n.length && (t = he(t, n)), (o, i, u) => {
1992
+ const c = L(o), l = t.every(Array.isArray), { options: f, handler: m } = K(i, u), g = typeof i == "function";
1993
+ t.forEach((h, d) => {
1994
+ const a = Array.isArray(h) ? h : [h];
1995
+ g ? l ? s(R(c, a, d), m ? () => m(...a) : void 0, f.timeout) : s(R(c, a, d), m ? () => m(h) : void 0, f.timeout) : l ? s(R(c, a, d), f, m ? () => m(...a) : void 0) : s(R(c, a, d), f, m ? () => m(h) : void 0);
1996
+ }), r.setContext("each", void 0);
1997
+ };
1998
+ }, e.for = function(t, ...n) {
1999
+ return Array.isArray(t) && n.length && (t = he(t, n)), (r, s, o) => {
2000
+ const i = L(r), { options: u, handler: c } = K(s, o);
2001
+ t.forEach((l, f) => {
2002
+ v(R(i, Z(l), f), u, c ? () => c(l) : void 0);
2003
+ });
2004
+ };
2005
+ }, e.skipIf = (t) => t ? v.skip : v, e.runIf = (t) => t ? v : v.skip, Tn([
2006
+ "concurrent",
2007
+ "sequential",
2008
+ "shuffle",
2009
+ "skip",
2010
+ "only",
2011
+ "todo"
2012
+ ], e);
2013
+ }
2014
+ function bo(e) {
2015
+ const t = e;
2016
+ t.each = function(s, ...o) {
2017
+ const i = P(this), u = i.withContext();
2018
+ return i.setContext("each", !0), Array.isArray(s) && o.length && (s = he(s, o)), (c, l, f) => {
2019
+ const m = L(c), g = s.every(Array.isArray), { options: h, handler: d } = K(l, f), a = typeof l == "function";
2020
+ s.forEach((p, y) => {
2021
+ const O = Array.isArray(p) ? p : [p];
2022
+ a ? g ? u(R(m, O, y), d ? () => d(...O) : void 0, h.timeout) : u(R(m, O, y), d ? () => d(p) : void 0, h.timeout) : g ? u(R(m, O, y), h, d ? () => d(...O) : void 0) : u(R(m, O, y), h, d ? () => d(p) : void 0);
2023
+ }), i.setContext("each", void 0);
2024
+ };
2025
+ }, t.for = function(s, ...o) {
2026
+ const u = P(this).withContext();
2027
+ return Array.isArray(s) && o.length && (s = he(s, o)), (c, l, f) => {
2028
+ const m = L(c), { options: g, handler: h } = K(l, f);
2029
+ s.forEach((d, a) => {
2030
+ const p = h ? (y) => h(d, y) : void 0;
2031
+ p && de(p, {
2032
+ index: 1,
2033
+ original: h
2034
+ }), u(R(m, Z(d), a), g, p);
2035
+ });
2036
+ };
2037
+ }, t.skipIf = function(s) {
2038
+ return s ? this.skip : this;
2039
+ }, t.runIf = function(s) {
2040
+ return s ? this : this.skip;
2041
+ };
2042
+ function n(s, o, i) {
2043
+ if (typeof s != "string")
2044
+ return s;
2045
+ const u = s;
2046
+ let c, l;
2047
+ if (i !== void 0 ? (c = o, l = i) : o !== null && typeof o == "object" && !Array.isArray(o) && E.isFixtureOptions(o) ? (c = o, l = {}) : (c = void 0, l = o), typeof l == "function") {
2048
+ const f = l, m = async (g, h) => {
2049
+ let d;
2050
+ const p = await f(g, { onCleanup: (y) => {
2051
+ if (d !== void 0)
2052
+ throw new Error("onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.");
2053
+ d = y;
2054
+ } });
2055
+ await h(p), d && await d();
2056
+ };
2057
+ return de(m, { original: f }), c ? { [u]: [m, c] } : { [u]: m };
2058
+ }
2059
+ return c ? { [u]: [l, c] } : { [u]: l };
2060
+ }
2061
+ return t.override = function(s, o, i) {
2062
+ const u = n(s, o, i);
2063
+ return P(this).getFixtures().override($, u), this;
2064
+ }, t.scoped = function(s) {
2065
+ return console.warn("test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead."), this.override(s);
2066
+ }, t.extend = function(s, o, i) {
2067
+ const u = n(s, o, i), c = P(this).getFixtures().extend($, u), l = Ve(function(f, m, g) {
2068
+ e.call(this, L(f), m, g);
2069
+ });
2070
+ return P(l).mergeContext({ fixtures: c }), l;
2071
+ }, t.describe = v, t.suite = v, t.beforeEach = co, t.afterEach = uo, t.beforeAll = oo, t.afterAll = io, t.aroundEach = lo, t.aroundAll = ao, Tn([
2072
+ "concurrent",
2073
+ "sequential",
2074
+ "skip",
2075
+ "only",
2076
+ "todo",
2077
+ "fails"
2078
+ ], t, { fixtures: new E() });
2079
+ }
2080
+ function Ve(e) {
2081
+ return bo(e);
2082
+ }
2083
+ function L(e) {
2084
+ return typeof e == "string" ? e : typeof e == "function" ? e.name || "<anonymous>" : String(e);
2085
+ }
2086
+ function R(e, t, n) {
2087
+ (e.includes("%#") || e.includes("%$")) && (e = e.replace(/%%/g, "__vitest_escaped_%__").replace(/%#/g, `${n}`).replace(/%\$/g, `${n + 1}`).replace(/__vitest_escaped_%__/g, "%%"));
2088
+ const r = e.split("%").length - 1;
2089
+ e.includes("%f") && (e.match(/%f/g) || []).forEach((l, f) => {
2090
+ if (ks(t[f]) || Object.is(t[f], -0)) {
2091
+ let m = 0;
2092
+ e = e.replace(/%f/g, (g) => (m++, m === f + 1 ? "-%f" : g));
2093
+ }
2094
+ });
2095
+ const s = pn(t[0]);
2096
+ function o(c) {
2097
+ return c.replace(/\$([$\w.]+)/g, (l, f) => {
2098
+ const m = /^\d+$/.test(f);
2099
+ if (!s && !m)
2100
+ return `$${f}`;
2101
+ const g = m ? Tt(t, f) : void 0, h = s ? Tt(t[0], f, g) : g;
2102
+ return Os(h, { truncate: $?.config?.chaiConfig?.truncateThreshold });
2103
+ });
2104
+ }
2105
+ let i = "", u = 0;
2106
+ return So(
2107
+ e,
2108
+ ln,
2109
+ // format "%"
2110
+ (c) => {
2111
+ u < r ? i += Ns(c[0], t[u++]) : i += c[0];
2112
+ },
2113
+ // format "$"
2114
+ (c) => {
2115
+ i += o(c);
2116
+ }
2117
+ ), i;
2118
+ }
2119
+ function So(e, t, n, r) {
2120
+ let s = 0;
2121
+ for (const o of e.matchAll(t))
2122
+ s < o.index && r(e.slice(s, o.index)), n(o), s = o.index + o[0].length;
2123
+ s < e.length && r(e.slice(s));
2124
+ }
2125
+ function he(e, t) {
2126
+ const n = e.join("").trim().replace(/ /g, "").split(`
2127
+ `).map((s) => s.split("|"))[0], r = [];
2128
+ for (let s = 0; s < Math.floor(t.length / n.length); s++) {
2129
+ const o = {};
2130
+ for (let i = 0; i < n.length; i++)
2131
+ o[n[i]] = t[s * n.length + i];
2132
+ r.push(o);
2133
+ }
2134
+ return r;
2135
+ }
2136
+ const kt = globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now, w = {
2137
+ currentSuite: null
2138
+ };
2139
+ function Eo(e) {
2140
+ w.currentSuite?.tasks.push(e);
2141
+ }
2142
+ async function To(e, t) {
2143
+ const n = w.currentSuite;
2144
+ w.currentSuite = e, await t(), w.currentSuite = n;
2145
+ }
2146
+ function W(e, t, n = !1, r, s) {
2147
+ if (t <= 0 || t === Number.POSITIVE_INFINITY)
2148
+ return e;
2149
+ const { setTimeout: o, clearTimeout: i } = mn();
2150
+ return (function(...c) {
2151
+ const l = kt(), f = We();
2152
+ return f._currentTaskStartTime = l, f._currentTaskTimeout = t, new Promise((m, g) => {
2153
+ const h = o(() => {
2154
+ i(h), d();
2155
+ }, t);
2156
+ h.unref?.();
2157
+ function d() {
2158
+ const y = Ao(n, t, r);
2159
+ s?.(c, y), g(y);
2160
+ }
2161
+ function a(y) {
2162
+ if (f._currentTaskStartTime = void 0, f._currentTaskTimeout = void 0, i(h), kt() - l >= t) {
2163
+ d();
2164
+ return;
2165
+ }
2166
+ m(y);
2167
+ }
2168
+ function p(y) {
2169
+ f._currentTaskStartTime = void 0, f._currentTaskTimeout = void 0, i(h), g(y);
2170
+ }
2171
+ try {
2172
+ const y = e(...c);
2173
+ typeof y == "object" && y != null && typeof y.then == "function" ? y.then(a, p) : a(y);
2174
+ } catch (y) {
2175
+ p(y);
2176
+ }
2177
+ });
2178
+ });
2179
+ }
2180
+ function $o(e, t) {
2181
+ return (function(...r) {
2182
+ return new Promise((s, o) => {
2183
+ t.addEventListener("abort", () => o(t.reason));
2184
+ try {
2185
+ const i = e(...r);
2186
+ typeof i == "object" && i != null && typeof i.then == "function" ? i.then(s, o) : s(i);
2187
+ } catch (i) {
2188
+ o(i);
2189
+ }
2190
+ });
2191
+ });
2192
+ }
2193
+ const ke = /* @__PURE__ */ new WeakMap();
2194
+ function Ke([e], t) {
2195
+ e && _o(e, t);
2196
+ }
2197
+ function _o(e, t) {
2198
+ ke.get(e)?.abort(t);
2199
+ }
2200
+ function wo(e, t) {
2201
+ const n = function() {
2202
+ throw new Error("done() callback is deprecated, use promise instead");
2203
+ };
2204
+ let r = ke.get(n);
2205
+ return r || (r = new AbortController(), ke.set(n, r)), n.signal = r.signal, n.task = e, n.skip = (s, o) => {
2206
+ if (s !== !1)
2207
+ throw e.result ??= { state: "skip" }, e.result.pending = !0, new Ys("test is skipped; abort execution", e, typeof s == "string" ? s : o);
2208
+ }, n.annotate = ((s, o, i) => {
2209
+ if (e.result && e.result.state !== "run")
2210
+ throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);
2211
+ const u = {
2212
+ message: s,
2213
+ type: typeof o == "object" || o === void 0 ? "notice" : o
2214
+ }, c = typeof o == "object" ? o : i;
2215
+ return c && (u.attachment = c, kn(u.attachment)), No(e, xo(e, {
2216
+ type: "internal:annotation",
2217
+ annotation: u
2218
+ }).then(async ({ annotation: l }) => {
2219
+ if (!t.onTestAnnotate)
2220
+ throw new Error("Test runner doesn't support test annotations.");
2221
+ await Rn(t);
2222
+ const f = await t.onTestAnnotate(e, l);
2223
+ return e.annotations.push(f), f;
2224
+ }));
2225
+ }), n.onTestFailed = (s, o) => {
2226
+ e.onFailed ||= [], e.onFailed.push(W(s, o ?? t.config.hookTimeout, !0, new Error("STACK_TRACE_ERROR"), (i, u) => r.abort(u)));
2227
+ }, n.onTestFinished = (s, o) => {
2228
+ e.onFinished ||= [], e.onFinished.push(W(s, o ?? t.config.hookTimeout, !0, new Error("STACK_TRACE_ERROR"), (i, u) => r.abort(u)));
2229
+ }, t.extendTaskContext?.(n) || n;
2230
+ }
2231
+ function Ao(e, t, n) {
2232
+ const r = `${e ? "Hook" : "Test"} timed out in ${t}ms.
2233
+ 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"}".`, s = new Error(r);
2234
+ return n?.stack && (s.stack = n.stack.replace(s.message, n.message)), s;
2235
+ }
2236
+ globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
2237
+ globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
2238
+ mn();
2239
+ const Ie = /* @__PURE__ */ new Map(), Mt = [], pe = [];
2240
+ function Co(e) {
2241
+ if (Ie.size) {
2242
+ const t = Array.from(Ie).map(([r, s]) => [
2243
+ r,
2244
+ s[0],
2245
+ s[1]
2246
+ ]), n = e.onTaskUpdate?.(t, Mt);
2247
+ n && (pe.push(n), n.then(() => pe.splice(pe.indexOf(n), 1), () => {
2248
+ })), Mt.length = 0, Ie.clear();
2249
+ }
2250
+ }
2251
+ async function Rn(e) {
2252
+ Co(e), await Promise.all(pe);
2253
+ }
2254
+ async function xo(e, t) {
2255
+ const n = We(), r = Cn(e.file.filepath, new Error("STACK_TRACE").stack);
2256
+ if (r && (t.location = {
2257
+ file: r.file,
2258
+ line: r.line,
2259
+ column: r.column
2260
+ }, t.type === "internal:annotation" && (t.annotation.location = t.location)), Array.isArray(t.attachments))
2261
+ for (const o of t.attachments)
2262
+ kn(o);
2263
+ if (t.type === "internal:annotation")
2264
+ return t;
2265
+ if (!n.onTestArtifactRecord)
2266
+ throw new Error("Test runner doesn't support test artifacts.");
2267
+ await Rn(n);
2268
+ const s = await n.onTestArtifactRecord(e, t);
2269
+ return e.artifacts.push(s), s;
2270
+ }
2271
+ const A = [];
2272
+ for (let e = 65; e < 91; e++)
2273
+ A.push(String.fromCharCode(e));
2274
+ for (let e = 97; e < 123; e++)
2275
+ A.push(String.fromCharCode(e));
2276
+ for (let e = 0; e < 10; e++)
2277
+ A.push(e.toString(10));
2278
+ A.push("+", "/");
2279
+ function Io(e) {
2280
+ let t = "";
2281
+ const n = e.byteLength;
2282
+ for (let r = 0; r < n; r += 3)
2283
+ if (n === r + 1) {
2284
+ const s = (e[r] & 252) >> 2, o = (e[r] & 3) << 4;
2285
+ t += A[s], t += A[o], t += "==";
2286
+ } else if (n === r + 2) {
2287
+ const s = (e[r] & 252) >> 2, o = (e[r] & 3) << 4 | (e[r + 1] & 240) >> 4, i = (e[r + 1] & 15) << 2;
2288
+ t += A[s], t += A[o], t += A[i], t += "=";
2289
+ } else {
2290
+ const s = (e[r] & 252) >> 2, o = (e[r] & 3) << 4 | (e[r + 1] & 240) >> 4, i = (e[r + 1] & 15) << 2 | (e[r + 2] & 192) >> 6, u = e[r + 2] & 63;
2291
+ t += A[s], t += A[o], t += A[i], t += A[u];
2292
+ }
2293
+ return t;
2294
+ }
2295
+ function No(e, t) {
2296
+ return t = t.finally(() => {
2297
+ if (!e.promises)
2298
+ return;
2299
+ const n = e.promises.indexOf(t);
2300
+ n !== -1 && e.promises.splice(n, 1);
2301
+ }), e.promises || (e.promises = []), e.promises.push(t), t;
2302
+ }
2303
+ function kn(e) {
2304
+ if (e.body == null && !e.path)
2305
+ throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');
2306
+ if (e.body && e.path)
2307
+ throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');
2308
+ if (e.path && e.bodyEncoding)
2309
+ throw new TypeError('Test attachment with "path" should not have "bodyEncoding" specified.');
2310
+ e.body instanceof Uint8Array && (e.body = Io(e.body)), e.body != null && (e.bodyEncoding ??= "base64");
2311
+ }
2312
+ class Mo {
25
2313
  // biome-ignore lint/style/noNonNullAssertion: Non-null assertion is allowed here because the onInit method is called before any other method
26
2314
  ctx = void 0;
27
2315
  verbose = !1;
28
2316
  onInit(t) {
29
2317
  this.ctx = t;
30
2318
  }
31
- onFinished(t = this.ctx.state.getFiles(), r = this.ctx.state.getUnhandledErrors()) {
32
- const { logger: o } = this.ctx, i = a(t), d = i.filter((c) => c.result?.state === "fail").length, n = !(d + r.length), l = n ? "✔ PASS" : "✖ FAIL", f = n ? e.green : e.red;
33
- o.log(
34
- `${f(e.bold(e.inverse(` ${l} `)))} ${f(
35
- n ? "All tests passed" : `${d} test${d > 1 ? "s" : ""} failed`
2319
+ onFinished(t = this.ctx.state.getFiles(), n = this.ctx.state.getUnhandledErrors()) {
2320
+ const { logger: r } = this.ctx, s = In(t), o = s.filter((l) => l.result?.state === "fail").length, i = !(o + n.length), u = i ? "✔ PASS" : "✖ FAIL", c = i ? T.green : T.red;
2321
+ r.log(
2322
+ `${c(T.bold(T.inverse(` ${u} `)))} ${c(
2323
+ i ? "All tests passed" : `${o} test${o > 1 ? "s" : ""} failed`
36
2324
  )}`
37
- ), o.log(this.padTitle("Test Files"), this.getStateString(t)), o.log(this.padTitle("Tests"), this.getStateString(i)), r.length && o.log(
2325
+ ), r.log(this.padTitle("Test Files"), this.getStateString(t)), r.log(this.padTitle("Tests"), this.getStateString(s)), n.length && r.log(
38
2326
  this.padTitle("Errors"),
39
- e.bold(e.red(`${r.length} error${r.length > 1 ? "s" : ""}`))
40
- ), n || (process.exitCode = 1);
2327
+ T.bold(T.red(`${n.length} error${n.length > 1 ? "s" : ""}`))
2328
+ ), i || (process.exitCode = 1);
41
2329
  }
42
- padTitle = (t) => e.dim(`${t.padStart(11)} `);
43
- getStateString(t, r = "tests") {
2330
+ padTitle = (t) => T.dim(`${t.padStart(11)} `);
2331
+ getStateString(t, n = "tests") {
44
2332
  if (!t.length)
45
- return e.dim(`no ${r}`);
46
- const o = t.filter((l) => l.result?.state === "pass").length, i = t.filter((l) => l.result?.state === "fail").length, d = t.filter((l) => l.mode === "skip").length, n = t.filter((l) => l.mode === "todo").length;
2333
+ return T.dim(`no ${n}`);
2334
+ const r = t.filter((u) => u.result?.state === "pass").length, s = t.filter((u) => u.result?.state === "fail").length, o = t.filter((u) => u.mode === "skip").length, i = t.filter((u) => u.mode === "todo").length;
47
2335
  return [
48
- i && e.bold(e.red(`${i} failed`)),
49
- o && e.bold(e.green(`${o} passed`)),
50
- d && e.yellow(`${d} skipped`),
51
- n && e.gray(`${n} todo`)
52
- ].filter(Boolean).join(e.dim(" | ")) + e.gray(` (${t.length})`);
2336
+ s && T.bold(T.red(`${s} failed`)),
2337
+ r && T.bold(T.green(`${r} passed`)),
2338
+ o && T.yellow(`${o} skipped`),
2339
+ i && T.gray(`${i} todo`)
2340
+ ].filter(Boolean).join(T.dim(" | ")) + T.gray(` (${t.length})`);
53
2341
  }
54
2342
  }
55
2343
  export {
56
- u as default
2344
+ Mo as default
57
2345
  };
58
2346
  //# sourceMappingURL=vitest-tiny-reporter.js.map