@flemist/simple-utils 2.1.3 → 2.1.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,55 +1,56 @@
1
- import { T as mt, Q as pt, E as yt } from "../urlGet-BCW9jvAm.mjs";
2
- import { L as de, V as he, W as me, O as pe, R as ye, _ as we, $ as ge, U as xe, K as Ee, G as Se, a2 as be, J as ke, H as Oe, M as Pe, q as je, Y as Ce, l as Ae, o as Le, A as De, B as Fe, C as Te, D as Ie, y as _e, z as Re, P as We, u as Ne, v as $e, w as Me, I as Be, p as ze, d as Je, g as Ue, Z as He, a1 as Ge, aq as ve, as as Ke, a5 as Ve, a3 as Ye, aP as qe, a4 as Qe, a8 as Xe, au as Ze, ax as tn, am as en, al as nn, a9 as rn, aI as sn, ag as an, aH as on, ae as cn, aG as ln, aj as un, ad as fn, aJ as dn, ab as hn, aa as mn, a7 as pn, aM as yn, ao as wn, an as gn, ac as xn, af as En, aA as Sn, aB as bn, aC as kn, aE as On, ay as Pn, aF as jn, ah as Cn, aD as An, az as Ln, aw as Dn, at as Fn, ap as Tn, ar as In, aK as _n, aL as Rn, a6 as Wn, ai as Nn, av as $n, ak as Mn, aN as Bn, aO as zn, b as Jn, m as Un, c as Hn, n as Gn, f as vn, k as Kn, r as Vn, h as Yn, e as qn, i as Qn, j as Xn, F as Zn, a as tr, s as er, S as nr, t as rr, x as sr, aV as ar, aX as or, aW as ir, aQ as cr, aU as lr, aR as ur, aT as fr, aS as dr, a0 as hr, N as mr, X as pr } from "../urlGet-BCW9jvAm.mjs";
3
- import { Locker as wt, useAbortController as gt, combineAbortSignals as st, delay as at } from "@flemist/async-utils";
4
- import { Pool as xt, poolRunWait as N } from "@flemist/time-limits";
5
- import Et from "node:os";
6
- import * as T from "path";
7
- import ot from "path";
8
- import { priorityCreate as z } from "@flemist/priority-queue";
1
+ import { V as bt, S as gt, F as Et } from "../urlGet-DZEwtNXt.mjs";
2
+ import { ac as Se, M as xe, W as ke, X as Oe, P as Te, aj as Pe, a2 as Ce, a3 as Ae, b5 as je, b6 as De, b7 as Le, b8 as Me, b9 as Ie, ba as Fe, bb as Re, bk as _e, bc as $e, bd as Ne, be as We, bf as ve, bg as Be, bh as ze, bi as Je, bj as Ue, R as Ge, $ as He, a0 as Ve, U as Ke, L as qe, H as Ye, a6 as Xe, ad as Qe, ae as Ze, K as tr, I as er, N as rr, q as nr, aa as sr, a9 as ar, a8 as or, Z as ir, l as cr, o as lr, B as ur, C as fr, D as hr, E as dr, z as mr, A as wr, a5 as yr, ag as pr, af as br, Q as gr, u as Er, v as Sr, w as xr, J as kr, p as Or, x as Tr, d as Pr, g as Cr, a4 as Ar, _ as jr, ab as Dr, aH as Lr, aJ as Mr, am as Ir, ak as Fr, b4 as Rr, al as _r, ap as $r, aL as Nr, aO as Wr, aD as vr, aC as Br, aq as zr, aZ as Jr, ax as Ur, aY as Gr, av as Hr, aX as Vr, aA as Kr, au as qr, a_ as Yr, as as Xr, ar as Qr, ao as Zr, b1 as tn, aF as en, aE as rn, at as nn, aw as sn, aR as an, aS as on, aT as cn, aV as ln, aP as un, aW as fn, ay as hn, aU as dn, aQ as mn, aN as wn, aK as yn, aG as pn, aI as bn, a$ as gn, b0 as En, an as Sn, ah as xn, ai as kn, az as On, aM as Tn, aB as Pn, b2 as Cn, b3 as An, b as jn, m as Dn, c as Ln, n as Mn, f as In, k as Fn, r as Rn, h as _n, e as $n, i as Nn, j as Wn, G as vn, a as Bn, s as zn, T as Jn, t as Un, y as Gn, bq as Hn, bs as Vn, br as Kn, bl as qn, bp as Yn, bm as Xn, bo as Qn, bn as Zn, a7 as ts, a1 as es, O as rs, Y as ns } from "../urlGet-DZEwtNXt.mjs";
3
+ import { Locker as St, useAbortController as xt, combineAbortSignals as tt, delay as it } from "@flemist/async-utils";
4
+ import { Pool as kt, poolRunWait as $ } from "@flemist/time-limits";
5
+ import Ot from "node:os";
6
+ import * as M from "path";
7
+ import ct from "path";
8
+ import { priorityCreate as B } from "@flemist/priority-queue";
9
9
  import * as I from "fs";
10
- import St from "picomatch";
11
- import { spawn as H } from "child_process";
12
- import { AbortControllerFast as bt } from "@flemist/abort-controller-fast";
13
- const Z = new xt(Et.cpus().length);
14
- function $(t) {
10
+ import Tt from "picomatch";
11
+ import { spawn as U } from "child_process";
12
+ import { AbortControllerFast as lt, AbortError as nt } from "@flemist/abort-controller-fast";
13
+ import { createTestVariants as Pt } from "@flemist/test-variants";
14
+ const et = new kt(Ot.cpus().length);
15
+ function N(t) {
15
16
  return t.replace(/\\/g, "/");
16
17
  }
17
- let U = null;
18
- function kt(t) {
19
- U == null && (U = /* @__PURE__ */ new Map());
20
- const e = $(t);
21
- let r = U.get(e);
22
- return r == null && (r = new wt(), U.set(e, r)), r;
18
+ let J = null;
19
+ function Ct(t) {
20
+ J == null && (J = /* @__PURE__ */ new Map());
21
+ const e = N(t);
22
+ let n = J.get(e);
23
+ return n == null && (n = new St(), J.set(e, n)), n;
23
24
  }
24
- function Xt(t) {
25
- const { filePath: e, func: r } = t;
26
- return kt(e).lock(
27
- () => N({
28
- pool: Z,
25
+ function oe(t) {
26
+ const { filePath: e, func: n } = t;
27
+ return Ct(e).lock(
28
+ () => $({
29
+ pool: et,
29
30
  count: 1,
30
- func: r
31
+ func: n
31
32
  })
32
33
  );
33
34
  }
34
- function Ot(t) {
35
+ function At(t) {
35
36
  return t.match(/^[/\\]?[^/\\]+/)[0];
36
37
  }
37
- function Pt(t, e) {
38
- return Ot(t) + "|" + e.ino;
38
+ function jt(t, e) {
39
+ return At(t) + "|" + e.ino;
39
40
  }
40
- function jt(t) {
41
- return t.endsWith(":") && (t += "/"), T.resolve(t);
41
+ function Dt(t) {
42
+ return t.endsWith(":") && (t += "/"), M.resolve(t);
42
43
  }
43
- function et(t, e) {
44
+ function st(t, e) {
44
45
  t.totalSize += e.totalSize, t.maxFileDateModified = Math.max(
45
46
  t.maxFileDateModified,
46
47
  e.maxFileDateModified
47
48
  ), t.countFiles += e.countFiles, t.countDirs += e.countDirs, t.countLinks += e.countLinks;
48
49
  }
49
- const Ct = function(e) {
50
+ const Lt = function(e) {
50
51
  return e.code === "ENOENT";
51
52
  };
52
- function it(t) {
53
+ function ut(t) {
53
54
  const e = t.paths;
54
55
  if (!e || e.length === 0)
55
56
  return Promise.resolve({
@@ -59,265 +60,265 @@ function it(t) {
59
60
  countDirs: 0,
60
61
  countLinks: 0
61
62
  });
62
- const r = t.level ?? 0, s = t.walkedIds ?? /* @__PURE__ */ new Set(), n = t.abortSignal, a = t.pool ?? Z, o = t.handleError, i = t.priority ?? z(0), u = t.walkLinks ?? !1, c = t.log, E = t.handlePath, f = t.matchPath;
63
- async function y(d) {
64
- if (!(o && await o(d)) && !Ct(d))
65
- throw d;
63
+ const n = t.level ?? 0, s = t.walkedIds ?? /* @__PURE__ */ new Set(), r = t.abortSignal, a = t.pool ?? et, o = t.handleError, i = t.priority ?? B(0), h = t.walkLinks ?? !1, l = t.log, g = t.handlePath, d = t.matchPath;
64
+ async function f(u) {
65
+ if (!(o && await o(u)) && !Lt(u))
66
+ throw u;
66
67
  }
67
- function P(d) {
68
- return !(!c || c.minTotalContentSize != null && d < c.minTotalContentSize || c.maxNestedLevel != null && r > c.maxNestedLevel);
68
+ function x(u) {
69
+ return !(!l || l.minTotalContentSize != null && u < l.minTotalContentSize || l.maxNestedLevel != null && n > l.maxNestedLevel);
69
70
  }
70
- return gt(async (d) => {
71
- const w = st(n, d), m = {
71
+ return xt(async (u) => {
72
+ const m = tt(r, u), w = {
72
73
  totalSize: 0,
73
74
  maxFileDateModified: 0,
74
75
  countFiles: 0,
75
76
  countDirs: 0,
76
77
  countLinks: 0
77
78
  };
78
- function D(x, O) {
79
- if (P(O.totalSize)) {
80
- const g = `${O.totalSize.toLocaleString("en-US").replace(/,/g, " ").padStart(19)}: ${x}`;
81
- c?.handleLog ? c.handleLog(g) : console.log(g);
79
+ function P(y, T) {
80
+ if (x(T.totalSize)) {
81
+ const k = `${T.totalSize.toLocaleString("en-US").replace(/,/g, " ").padStart(19)}: ${y}`;
82
+ l?.handleLog ? l.handleLog(k) : console.log(k);
82
83
  }
83
84
  }
84
- async function l(x, O, p, g) {
85
- return E ? await N({
85
+ async function c(y, T, S, k) {
86
+ return g ? await $({
86
87
  pool: a,
87
88
  func: async () => {
88
89
  try {
89
- return await E({
90
- level: r,
91
- path: x,
92
- stat: O,
93
- itemStat: p,
94
- totalStat: m,
95
- abortSignal: w
90
+ return await g({
91
+ level: n,
92
+ path: y,
93
+ stat: T,
94
+ itemStat: S,
95
+ totalStat: w,
96
+ abortSignal: m
96
97
  });
97
- } catch (k) {
98
- return await y(k), !1;
98
+ } catch (O) {
99
+ return await f(O), !1;
99
100
  }
100
101
  },
101
102
  count: 1,
102
- priority: g,
103
- abortSignal: w
103
+ priority: k,
104
+ abortSignal: m
104
105
  }) : !0;
105
106
  }
106
- async function S(x, O, p, g) {
107
- g || (g = x);
108
- const k = await N({
107
+ async function p(y, T, S, k) {
108
+ k || (k = y);
109
+ const O = await $({
109
110
  pool: a,
110
- func: () => I.promises.lstat(x).catch(y),
111
+ func: () => I.promises.lstat(y).catch(f),
111
112
  count: 1,
112
- priority: z(O, z(1, i)),
113
- abortSignal: w
113
+ priority: B(T, B(1, i)),
114
+ abortSignal: m
114
115
  });
115
- if (!k || !p && k.isFile())
116
+ if (!O || !S && O.isFile())
116
117
  return null;
117
- const C = Pt(x, k);
118
- if (s.has(C))
118
+ const A = jt(y, O);
119
+ if (s.has(A))
119
120
  return null;
120
- s.add(C);
121
- let h = {
122
- totalSize: k.size,
123
- maxFileDateModified: k.isDirectory() ? 0 : k.mtimeMs,
121
+ s.add(A);
122
+ let b = {
123
+ totalSize: O.size,
124
+ maxFileDateModified: O.isDirectory() ? 0 : O.mtimeMs,
124
125
  countFiles: 0,
125
126
  countDirs: 0,
126
127
  countLinks: 0
127
128
  };
128
- const A = z(
129
- O,
130
- z(k.isDirectory() ? 2 : 3, i)
129
+ const j = B(
130
+ T,
131
+ B(O.isDirectory() ? 2 : 3, i)
131
132
  );
132
- if (k.isSymbolicLink()) {
133
- if (u) {
134
- const j = await N({
133
+ if (O.isSymbolicLink()) {
134
+ if (h) {
135
+ const C = await $({
135
136
  pool: a,
136
- func: () => I.promises.readlink(x).catch(y).then((F) => F ?? null),
137
+ func: () => I.promises.readlink(y).catch(f).then((L) => L ?? null),
137
138
  count: 1,
138
- priority: A,
139
- abortSignal: w
139
+ priority: j,
140
+ abortSignal: m
140
141
  });
141
- if (j) {
142
- const F = T.isAbsolute(j) ? j : T.resolve(T.dirname(g), j), _ = await S(
143
- F,
144
- O,
145
- p,
146
- g
142
+ if (C) {
143
+ const L = M.isAbsolute(C) ? C : M.resolve(M.dirname(k), C), F = await p(
144
+ L,
145
+ T,
146
+ S,
147
+ k
147
148
  );
148
- _ && (h = _);
149
+ F && (b = F);
149
150
  }
150
151
  }
151
- return (p || h.countFiles + h.countDirs + h.countLinks >= 1) && (h.countLinks += 1, await l(
152
- g,
152
+ return (S || b.countFiles + b.countDirs + b.countLinks >= 1) && (b.countLinks += 1, await c(
153
153
  k,
154
- h,
155
- A
156
- ) && (et(m, h), D(g, h))), h;
157
- } else if (k.isDirectory()) {
158
- const j = await N({
154
+ O,
155
+ b,
156
+ j
157
+ ) && (st(w, b), P(k, b))), b;
158
+ } else if (O.isDirectory()) {
159
+ const C = await $({
159
160
  pool: a,
160
- func: () => I.promises.readdir(x).catch(y),
161
+ func: () => I.promises.readdir(y).catch(f),
161
162
  count: 1,
162
163
  priority: i,
163
- abortSignal: w
164
+ abortSignal: m
164
165
  });
165
- if (j) {
166
- for (let F = 0, _ = j.length; F < _; F++)
167
- j[F] = T.join(g, j[F]);
168
- h = await it({
166
+ if (C) {
167
+ for (let L = 0, F = C.length; L < F; L++)
168
+ C[L] = M.join(k, C[L]);
169
+ b = await ut({
169
170
  ...t,
170
- paths: j,
171
- abortSignal: w,
172
- priority: A,
173
- level: r + 1,
171
+ paths: C,
172
+ abortSignal: m,
173
+ priority: j,
174
+ level: n + 1,
174
175
  walkedIds: s
175
176
  });
176
177
  }
177
178
  }
178
- return (p || h.countFiles + h.countDirs + h.countLinks >= 1) && (k.isDirectory() ? h.countDirs += 1 : k.isFile() && (h.countFiles += 1), await l(
179
- g,
179
+ return (S || b.countFiles + b.countDirs + b.countLinks >= 1) && (O.isDirectory() ? b.countDirs += 1 : O.isFile() && (b.countFiles += 1), await c(
180
180
  k,
181
- h,
182
- A
183
- ) && (et(m, h), D(g, h))), h;
181
+ O,
182
+ b,
183
+ j
184
+ ) && (st(w, b), P(k, b))), b;
184
185
  }
185
- const b = [];
186
- for (let x = 0, O = e.length; x < O; x++) {
187
- const p = jt(e[x]), g = f ? f(p) : !0;
188
- g !== !1 && b.push(S(p, x, g));
186
+ const E = [];
187
+ for (let y = 0, T = e.length; y < T; y++) {
188
+ const S = Dt(e[y]), k = d ? d(S) : !0;
189
+ k !== !1 && E.push(p(S, y, k));
189
190
  }
190
- return await Promise.all(b), m;
191
+ return await Promise.all(E), w;
191
192
  });
192
193
  }
193
- function Zt(t) {
194
- return it(t);
194
+ function ie(t) {
195
+ return ut(t);
195
196
  }
196
- function te({
197
+ function ce({
197
198
  globs: t,
198
199
  rootDir: e,
199
- noCase: r
200
+ noCase: n
200
201
  }) {
201
202
  const s = [];
202
- return t.forEach((n) => {
203
- n = $(n).trim();
204
- const a = n.startsWith("^");
205
- a && (n = n.substring(1).trim());
206
- const o = n.startsWith("!");
207
- if (o && (n = n.substring(1).trim()), n.startsWith("!") || n.startsWith("^"))
203
+ return t.forEach((r) => {
204
+ r = N(r).trim();
205
+ const a = r.startsWith("^");
206
+ a && (r = r.substring(1).trim());
207
+ const o = r.startsWith("!");
208
+ if (o && (r = r.substring(1).trim()), r.startsWith("!") || r.startsWith("^"))
208
209
  throw new Error(
209
- `Invalid glob pattern: "${n}". The syntax '${n.substring(0, 2)}' is not supported. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class), ! (negate pattern), ^ (exclude if included). Examples of valid patterns: "*.js", "src/**/*.ts", "!node_modules", "^dist". Avoid starting with '!' after '^' or multiple special prefixes.`
210
+ `Invalid glob pattern: "${r}". The syntax '${r.substring(0, 2)}' is not supported. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class), ! (negate pattern), ^ (exclude if included). Examples of valid patterns: "*.js", "src/**/*.ts", "!node_modules", "^dist". Avoid starting with '!' after '^' or multiple special prefixes.`
210
211
  );
211
- n.startsWith("/") && (n = "." + n);
212
- const i = $(e ? T.resolve(e, n) : n);
212
+ r.startsWith("/") && (r = "." + r);
213
+ const i = N(e ? M.resolve(e, r) : r);
213
214
  if (!i)
214
215
  return;
215
- let u;
216
+ let h;
216
217
  try {
217
- u = St(i, {
218
- nocase: r ?? !1,
218
+ h = Tt(i, {
219
+ nocase: n ?? !1,
219
220
  dot: !0,
220
221
  strictBrackets: !0
221
222
  // Validate bracket balance for patterns like "["
222
223
  });
223
- } catch (c) {
224
+ } catch (l) {
224
225
  throw new Error(
225
- `Invalid glob pattern: "${n}". ${c instanceof Error ? c.message : "Unknown error"}. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class with balanced brackets), ! (negate pattern), ^ (exclude if included). Examples: "*.js", "src/**/*.ts", "!node_modules", "[abc]def.txt". Ensure all brackets [ ] are properly closed and balanced.`
226
+ `Invalid glob pattern: "${r}". ${l instanceof Error ? l.message : "Unknown error"}. Valid glob patterns use: * (match any characters), ** (match any directories), ? (match single character), [abc] (character class with balanced brackets), ! (negate pattern), ^ (exclude if included). Examples: "*.js", "src/**/*.ts", "!node_modules", "[abc]def.txt". Ensure all brackets [ ] are properly closed and balanced.`
226
227
  );
227
228
  }
228
229
  s.push({
229
230
  exclude: a,
230
231
  negative: o,
231
232
  debugInfo: i,
232
- match: u
233
+ match: h
233
234
  });
234
235
  }), function(a) {
235
- a = $(a);
236
+ a = N(a);
236
237
  let o = null, i = !1;
237
- for (let u = 0, c = s.length; u < c; u++) {
238
- const E = s[u];
239
- E.match(a) && (E.exclude ? i = !E.negative : (o = !E.negative, i = !1));
238
+ for (let h = 0, l = s.length; h < l; h++) {
239
+ const g = s[h];
240
+ g.match(a) && (g.exclude ? i = !g.negative : (o = !g.negative, i = !1));
240
241
  }
241
242
  return i ? !1 : o;
242
243
  };
243
244
  }
244
- function At(t) {
245
+ function Mt(t) {
245
246
  const e = t.startsWith("!");
246
247
  return e && (t = t.substring(1)), t.startsWith("/") ? t = t.substring(1) : !t.startsWith("**") && !t.startsWith("../") && (t = `**/${t}`), e && (t = "!" + t), t;
247
248
  }
248
- function Lt(t, e) {
249
+ function It(t, e) {
249
250
  if (!e || e === ".")
250
251
  return t;
251
- const r = t.startsWith("^");
252
- r && (t = t.substring(1));
252
+ const n = t.startsWith("^");
253
+ n && (t = t.substring(1));
253
254
  const s = t.startsWith("!");
254
- return s && (t = t.substring(1)), t.startsWith("/") ? (e.endsWith("/") && (e = e.substring(0, e.length - 1)), t = e + t) : (e.endsWith("/") || (e += "/"), t.startsWith("./") ? t = e + t.substring(2) : t.startsWith("../") ? t = e + t : (e.startsWith("..") && (e = ""), t.startsWith("**") ? t = e + t : t = e + "**/" + t)), t = $(T.normalize(t)), s && (t = "!" + t), r && (t = "^" + t), t;
255
+ return s && (t = t.substring(1)), t.startsWith("/") ? (e.endsWith("/") && (e = e.substring(0, e.length - 1)), t = e + t) : (e.endsWith("/") || (e += "/"), t.startsWith("./") ? t = e + t.substring(2) : t.startsWith("../") ? t = e + t : (e.startsWith("..") && (e = ""), t.startsWith("**") ? t = e + t : t = e + "**/" + t)), t = N(M.normalize(t)), s && (t = "!" + t), n && (t = "^" + t), t;
255
256
  }
256
- function nt(t) {
257
+ function at(t) {
257
258
  return "^" + t;
258
259
  }
259
- async function Dt(t) {
260
- const r = (await I.promises.readFile(t, "utf-8")).split(`
260
+ async function Ft(t) {
261
+ const n = (await I.promises.readFile(t, "utf-8")).split(`
261
262
  `), s = [];
262
- return r.forEach((n) => {
263
- n = n.trim(), !(!n || n.startsWith("#")) && s.push(n);
263
+ return n.forEach((r) => {
264
+ r = r.trim(), !(!r || r.startsWith("#")) && s.push(r);
264
265
  }), s;
265
266
  }
266
- async function ee(t) {
267
- const e = t.rootDir ?? ".", r = [];
267
+ async function le(t) {
268
+ const e = t.rootDir ?? ".", n = [];
268
269
  if (!t.globs?.length)
269
- return r;
270
+ return n;
270
271
  const s = [];
271
- return t.globs.forEach((n) => {
272
- n.value && (n.valueType === "file-contains-patterns" ? s.push(n) : n.valueType === "pattern" && r.push(n.exclude ? nt(n.value) : n.value));
272
+ return t.globs.forEach((r) => {
273
+ r.value && (r.valueType === "file-contains-patterns" ? s.push(r) : r.valueType === "pattern" && n.push(r.exclude ? at(r.value) : r.value));
273
274
  }), s.length && await Promise.all(
274
- s.map(async (n) => {
275
- await N({
276
- pool: Z,
275
+ s.map(async (r) => {
276
+ await $({
277
+ pool: et,
277
278
  count: 1,
278
279
  func: async () => {
279
- const a = T.resolve(e, n.value), o = await Dt(a), i = T.relative(e, T.dirname(a));
280
- o.forEach((u) => {
281
- u = At(u), u = Lt(u, i), r.push(n.exclude ? nt(u) : u);
280
+ const a = M.resolve(e, r.value), o = await Ft(a), i = M.relative(e, M.dirname(a));
281
+ o.forEach((h) => {
282
+ h = Mt(h), h = It(h, i), n.push(r.exclude ? at(h) : h);
282
283
  });
283
284
  }
284
285
  });
285
286
  })
286
- ), r;
287
+ ), n;
287
288
  }
288
- function Ft(t, e = {}) {
289
- return new Promise((r, s) => {
290
- const n = H(t, {
289
+ function Rt(t, e = {}) {
290
+ return new Promise((n, s) => {
291
+ const r = U(t, {
291
292
  shell: !0,
292
293
  ...e
293
294
  }), a = [];
294
- n.stdout.on("data", (o) => {
295
+ r.stdout.on("data", (o) => {
295
296
  a.push(o);
296
- }), n.on("error", (o) => {
297
+ }), r.on("error", (o) => {
297
298
  s(o);
298
- }), n.on("exit", (o) => {
299
+ }), r.on("exit", (o) => {
299
300
  const i = Buffer.concat(a).toString("utf8");
300
301
  if (o !== 0) {
301
302
  s(new Error(`[exec][exit] code: ${o}`));
302
303
  return;
303
304
  }
304
- r(i);
305
+ n(i);
305
306
  });
306
307
  });
307
308
  }
308
- async function ne() {
309
+ async function ue() {
309
310
  let t;
310
311
  switch (process.platform) {
311
312
  case "darwin":
312
- t = H("afplay", ["/System/Library/Sounds/Ping.aiff"], {
313
+ t = U("afplay", ["/System/Library/Sounds/Ping.aiff"], {
313
314
  stdio: "ignore"
314
315
  });
315
316
  break;
316
317
  case "linux":
317
- t = H("beep", [], { stdio: "ignore", shell: !0 });
318
+ t = U("beep", [], { stdio: "ignore", shell: !0 });
318
319
  break;
319
320
  case "win32":
320
- t = H("powershell", ["-c", "[console]::beep(1000,300)"], {
321
+ t = U("powershell", ["-c", "[console]::beep(1000,300)"], {
321
322
  stdio: "ignore"
322
323
  });
323
324
  break;
@@ -326,120 +327,120 @@ async function ne() {
326
327
  `[nodeBeep] Beep not supported on platform: ${process.platform}`
327
328
  );
328
329
  }
329
- await new Promise((e, r) => {
330
- t.on("error", r), t.on("close", (s) => {
331
- s !== 0 ? r(new Error(`[nodeBeep] Beep process exited with code ${s}`)) : e();
330
+ await new Promise((e, n) => {
331
+ t.on("error", n), t.on("close", (s) => {
332
+ s !== 0 ? n(new Error(`[nodeBeep] Beep process exited with code ${s}`)) : e();
332
333
  });
333
334
  });
334
335
  }
335
- async function Tt({
336
+ async function _t({
336
337
  page: t,
337
338
  urlFilters: e,
338
- timeouts: r
339
+ timeouts: n
339
340
  }) {
340
- return r || (r = {}), r.downloadInternal || (r.downloadInternal = 10 * 1e3), r.downloadExternal || (r.downloadExternal = 60 * 1e3), r.total || (r.total = 300 * 1e3), await mt(
341
+ return n || (n = {}), n.downloadInternal || (n.downloadInternal = 10 * 1e3), n.downloadExternal || (n.downloadExternal = 60 * 1e3), n.total || (n.total = 300 * 1e3), await bt(
341
342
  () => t.evaluate(
342
343
  ({
343
- urlFilters: n,
344
+ urlFilters: r,
344
345
  timeouts: a
345
346
  }) => {
346
- function o(c) {
347
- return function(f) {
348
- let y = !1;
349
- for (let P = 0, d = c.length; P < d; P++) {
350
- const w = c[P];
351
- w.pattern.test(f) && (y = w.value);
347
+ function o(l) {
348
+ return function(d) {
349
+ let f = !1;
350
+ for (let x = 0, u = l.length; x < u; x++) {
351
+ const m = l[x];
352
+ m.pattern.test(d) && (f = m.value);
352
353
  }
353
- return y;
354
+ return f;
354
355
  };
355
356
  }
356
- const i = n && o(n);
357
- let u = performance.getEntries && performance.getEntries();
358
- return u || (u = []), u.push({
357
+ const i = r && o(r);
358
+ let h = performance.getEntries && performance.getEntries();
359
+ return h || (h = []), h.push({
359
360
  name: location.href
360
361
  }), Promise.all(
361
- u.map(
362
- (c) => {
363
- if (c.entryType != null && c.entryType !== "resource" || i && !i(c.name))
362
+ h.map(
363
+ (l) => {
364
+ if (l.entryType != null && l.entryType !== "resource" || i && !i(l.name))
364
365
  return null;
365
- if (c.responseStatus != null)
366
- return c.responseStatus >= 400 ? Promise.resolve({
367
- url: c.name,
368
- error: c.responseStatus
366
+ if (l.responseStatus != null)
367
+ return l.responseStatus >= 400 ? Promise.resolve({
368
+ url: l.name,
369
+ error: l.responseStatus
369
370
  }) : null;
370
371
  if (navigator.userAgent.indexOf("Chrome") === -1)
371
372
  return null;
372
- const E = typeof AbortController < "u" ? new AbortController() : null, f = new URL(c.name).origin === location.origin, y = f ? a.downloadInternal : a.downloadExternal;
373
- let P;
374
- const d = new Promise((l, S) => {
375
- P = S;
376
- }), w = y && setTimeout(() => {
377
- E?.abort(), P(
373
+ const g = typeof AbortController < "u" ? new AbortController() : null, d = new URL(l.name).origin === location.origin, f = d ? a.downloadInternal : a.downloadExternal;
374
+ let x;
375
+ const u = new Promise((c, p) => {
376
+ x = p;
377
+ }), m = f && setTimeout(() => {
378
+ g?.abort(), x(
378
379
  new Error("[test][getPageHttpErrors] fetch timeout")
379
380
  );
380
- }, y);
381
- let m = fetch(c.name, {
382
- mode: f ? "same-origin" : "no-cors",
383
- signal: E?.signal,
384
- cache: f ? "force-cache" : void 0,
381
+ }, f);
382
+ let w = fetch(l.name, {
383
+ mode: d ? "same-origin" : "no-cors",
384
+ signal: g?.signal,
385
+ cache: d ? "force-cache" : void 0,
385
386
  method: "HEAD"
386
- }).then((l) => l.ok ? null : {
387
- url: c.name,
388
- error: l.status + " " + l.statusText
389
- }).catch((l) => ({
390
- url: c.name,
391
- error: l.message
387
+ }).then((c) => c.ok ? null : {
388
+ url: l.name,
389
+ error: c.status + " " + c.statusText
390
+ }).catch((c) => ({
391
+ url: l.name,
392
+ error: c.message
392
393
  }));
393
- E || (m = Promise.race([m, d]));
394
- function D() {
395
- w && clearTimeout(w);
394
+ g || (w = Promise.race([w, u]));
395
+ function P() {
396
+ m && clearTimeout(m);
396
397
  }
397
- return m.then(
398
- (l) => (D(), l),
399
- (l) => {
400
- throw D(), l;
398
+ return w.then(
399
+ (c) => (P(), c),
400
+ (c) => {
401
+ throw P(), c;
401
402
  }
402
403
  );
403
404
  }
404
405
  )
405
- ).then((c) => {
406
- const E = c.filter((f) => f).map(
407
- (f) => ({
408
- url: new URL(f.url),
409
- error: f.error
406
+ ).then((l) => {
407
+ const g = l.filter((d) => d).map(
408
+ (d) => ({
409
+ url: new URL(d.url),
410
+ error: d.error
410
411
  })
411
412
  );
412
- return E.length > 0 ? E : null;
413
+ return g.length > 0 ? g : null;
413
414
  });
414
415
  },
415
416
  {
416
417
  urlFilters: e,
417
- timeouts: r
418
+ timeouts: n
418
419
  }
419
420
  ),
420
- { timeout: r.total }
421
+ { timeout: n.total }
421
422
  );
422
423
  }
423
- async function It({
424
+ async function $t({
424
425
  page: t,
425
426
  urlFilters: e,
426
- errorFilter: r
427
+ errorFilter: n
427
428
  }) {
428
- let s = await Tt({
429
+ let s = await _t({
429
430
  page: t,
430
431
  urlFilters: e
431
432
  });
432
- if (s && (r && (s = s.filter(r)), s.length > 0))
433
+ if (s && (n && (s = s.filter(n)), s.length > 0))
433
434
  throw new Error(
434
435
  `[test][checkPageHttpErrors] Page has http errors: ${JSON.stringify(s, null, 2)}`
435
436
  );
436
437
  }
437
- async function _t({
438
+ async function Nt({
438
439
  page: t,
439
440
  filter: e,
440
- onError: r
441
+ onError: n
441
442
  }) {
442
- const s = "callback_191b355ea6f64499a6607ad571da5d4d", n = t.context().browser()?.browserType().name(), a = pt();
443
+ const s = "callback_191b355ea6f64499a6607ad571da5d4d", r = t.context().browser()?.browserType().name(), a = gt();
443
444
  function o(i) {
444
445
  try {
445
446
  if (e && !e({
@@ -447,73 +448,73 @@ async function _t({
447
448
  error: i
448
449
  }))
449
450
  return;
450
- } catch (u) {
451
- i = String(u);
451
+ } catch (h) {
452
+ i = String(h);
452
453
  }
453
454
  try {
454
455
  console.error(
455
- `[test][subscribeJsErrors] BROWSER JS ERROR (${n}): ${i}`
456
+ `[test][subscribeJsErrors] BROWSER JS ERROR (${r}): ${i}`
456
457
  );
457
- const u = new Error(i);
458
- u.stack = a, r(u);
459
- } catch (u) {
460
- console.error("[test][subscribeJsErrors] error", u);
458
+ const h = new Error(i);
459
+ h.stack = a, n(h);
460
+ } catch (h) {
461
+ console.error("[test][subscribeJsErrors] error", h);
461
462
  }
462
463
  }
463
464
  await t.exposeFunction(s, o), await t.addInitScript((i) => {
464
- function u(f) {
465
- if (Array.isArray(f))
466
- return f.map(u).join(`\r
465
+ function h(d) {
466
+ if (Array.isArray(d))
467
+ return d.map(h).join(`\r
467
468
  \r
468
469
  `);
469
- if (f instanceof Error)
470
- return f.stack || f.toString();
471
- if (typeof f == "object" && f != null) {
472
- const y = /* @__PURE__ */ new Set();
470
+ if (d instanceof Error)
471
+ return d.stack || d.toString();
472
+ if (typeof d == "object" && d != null) {
473
+ const f = /* @__PURE__ */ new Set();
473
474
  return JSON.stringify(
474
- f,
475
- (P, d) => {
476
- if (typeof d == "object" && d != null) {
477
- if (y.has(d))
475
+ d,
476
+ (x, u) => {
477
+ if (typeof u == "object" && u != null) {
478
+ if (f.has(u))
478
479
  return "[Circular]";
479
- y.add(d);
480
+ f.add(u);
480
481
  }
481
- return d;
482
+ return u;
482
483
  },
483
484
  2
484
485
  );
485
486
  }
486
- return String(f);
487
+ return String(d);
487
488
  }
488
- function c(f) {
489
- window[i](f);
489
+ function l(d) {
490
+ window[i](d);
490
491
  }
491
- const E = {
492
+ const g = {
492
493
  warn: console.warn.bind(console),
493
494
  error: console.error.bind(console)
494
495
  };
495
- console.warn = function(...y) {
496
- return c("console.warn: " + u(y)), E.warn.apply(this, y);
497
- }, console.error = function(...y) {
498
- return c("console.error: " + u(y)), E.error.apply(this, y);
496
+ console.warn = function(...f) {
497
+ return l("console.warn: " + h(f)), g.warn.apply(this, f);
498
+ }, console.error = function(...f) {
499
+ return l("console.error: " + h(f)), g.error.apply(this, f);
499
500
  }, window.addEventListener(
500
501
  "error",
501
- function(f) {
502
- c("window error: " + (f.message || JSON.stringify(f)));
502
+ function(d) {
503
+ l("window error: " + (d.message || JSON.stringify(d)));
503
504
  },
504
505
  !0
505
506
  ), window.addEventListener(
506
507
  "unhandledrejection",
507
- function(f) {
508
- c("window unhandledrejection: " + u(f.reason));
508
+ function(d) {
509
+ l("window unhandledrejection: " + h(d.reason));
509
510
  },
510
511
  !0
511
512
  );
512
513
  }, s);
513
514
  }
514
- async function Rt() {
515
+ async function ft() {
515
516
  try {
516
- process.platform === "win32" && await Ft(
517
+ process.platform === "win32" && await Rt(
517
518
  `wmic process where "commandline like '%ms-playwright%' and not commandline like '%wmic.exe%' and priority != 4" CALL setpriority "idle"`
518
519
  );
519
520
  } catch (t) {
@@ -523,59 +524,59 @@ async function Rt() {
523
524
  console.warn("[test][setPlaywrightPriorityLow] error: " + e);
524
525
  }
525
526
  }
526
- let G = null, q = null;
527
- function re(t) {
528
- q = t;
527
+ let G = null, X = null;
528
+ function fe(t) {
529
+ X = t;
529
530
  }
530
531
  function Wt() {
531
532
  if (G)
532
533
  return;
533
- const t = q || (process.env.DELAY_ON_ERROR ? parseInt(process.env.DELAY_ON_ERROR, 10) : 0);
534
- if (q)
535
- return console.log(`[test][delayOnError] Delay on error: ${t} ms`), G = at(t), G;
534
+ const t = X || (process.env.DELAY_ON_ERROR ? parseInt(process.env.DELAY_ON_ERROR, 10) : 0);
535
+ if (X)
536
+ return console.log(`[test][delayOnError] Delay on error: ${t} ms`), G = it(t), G;
536
537
  }
537
- function se() {
538
+ function he() {
538
539
  return G;
539
540
  }
540
- async function Nt(t) {
541
- const { page: e } = t, r = e.context().browser()?.browserType().name(), s = new bt(), n = st(
541
+ async function vt(t) {
542
+ const { page: e } = t, n = e.context().browser()?.browserType().name(), s = new lt(), r = tt(
542
543
  s.signal,
543
544
  t.abortSignal
544
545
  ), a = (i) => {
545
- let u = `Error in (${r}) ${e.url()}
546
+ let h = `Error in (${n}) ${e.url()}
546
547
  `;
547
- t.pageFilePath && (u += ` at _ (${ot.resolve(t.pageFilePath)}:0:0)
548
- `), i.stack = u + (i.stack || i.message), i.message = u + i.message, console.error("[test][initPage] error", i), s.abort(i);
548
+ t.pageFilePath && (h += ` at _ (${ct.resolve(t.pageFilePath)}:0:0)
549
+ `), i.stack = h + (i.stack || i.message), i.message = h + i.message, console.error("[test][initPage] error", i), s.abort(i);
549
550
  };
550
- return await _t({
551
+ return await Nt({
551
552
  page: e,
552
553
  filter: t.filters?.js?.filter,
553
554
  onError: a
554
555
  }), {
555
- abortSignal: n,
556
+ abortSignal: r,
556
557
  checkErrors: async () => {
557
- await It({
558
+ await $t({
558
559
  page: e,
559
560
  urlFilters: t.filters?.http?.urlFilters,
560
561
  errorFilter: t.filters?.http?.errorFilter
561
- }), n.throwIfAborted();
562
+ }), r.throwIfAborted();
562
563
  }
563
564
  };
564
565
  }
565
- async function ae({
566
+ async function Bt({
566
567
  page: t,
567
568
  abortSignal: e,
568
- filters: r,
569
+ filters: n,
569
570
  func: s,
570
- pageFilePath: n
571
+ pageFilePath: r
571
572
  }) {
572
573
  const a = t.context().browser()?.browserType().name();
573
574
  try {
574
- const { abortSignal: o, checkErrors: i } = await Nt({
575
+ const { abortSignal: o, checkErrors: i } = await vt({
575
576
  page: t,
576
577
  abortSignal: e,
577
- filters: r,
578
- pageFilePath: n
578
+ filters: n,
579
+ pageFilePath: r
579
580
  });
580
581
  await s({
581
582
  page: t,
@@ -585,572 +586,765 @@ async function ae({
585
586
  } catch (o) {
586
587
  let i = `Error in (${a}) ${t.url()}
587
588
  `;
588
- throw n && (i += ` at _ (${ot.resolve(n)}:0:0)
589
+ throw r && (i += ` at _ (${ct.resolve(r)}:0:0)
589
590
  `), o.stack = i + (o.stack || o.message), o.message = i + o.message, o;
590
591
  }
591
592
  }
592
- function oe({
593
+ function de({
593
594
  browserType: t,
594
595
  options: e
595
596
  }) {
596
597
  return async function(s) {
597
- const n = await t.launch(e ?? void 0);
598
+ const r = await t.launch(e ?? void 0);
598
599
  try {
599
- return await s(n);
600
+ return await s(r);
600
601
  } finally {
601
- await n.close();
602
+ await r.close();
602
603
  }
603
604
  };
604
605
  }
605
- function ie({
606
+ function zt({
606
607
  browser: t,
607
608
  options: e
608
609
  }) {
609
610
  return async function(s) {
610
- const n = await t.newContext(e ?? void 0);
611
- await Rt();
611
+ const r = await t.newContext(e ?? void 0);
612
+ await ft();
612
613
  try {
613
- const a = await s(n);
614
- return await n.close(), a;
614
+ const a = await s(r);
615
+ return await r.close(), a;
615
616
  } catch (a) {
616
617
  const o = Wt?.();
617
- throw o ? (console.error("[test][useBrowserContext] error", a), o.finally(() => n.close())) : await n.close(), a;
618
+ throw o ? (console.error("[test][useBrowserContext] error", a), o.finally(() => r.close())) : await r.close(), a;
619
+ }
620
+ };
621
+ }
622
+ async function me(t, e) {
623
+ const n = await t.$$(e);
624
+ for (const s of n)
625
+ await s.click();
626
+ }
627
+ const q = new lt();
628
+ let Jt = 0;
629
+ function Ut(t) {
630
+ return async function({
631
+ browser: n,
632
+ contextOptions: s,
633
+ name: r,
634
+ url: a,
635
+ pool: o,
636
+ priority: i,
637
+ filters: h,
638
+ ...l
639
+ }, g) {
640
+ const d = tt(
641
+ q.signal,
642
+ g
643
+ );
644
+ try {
645
+ await $({
646
+ pool: o,
647
+ count: 1,
648
+ priority: i,
649
+ abortSignal: d,
650
+ func: async (f, x) => {
651
+ x.throwIfAborted(), await zt({
652
+ browser: n,
653
+ options: s
654
+ })(async (u) => {
655
+ x.throwIfAborted();
656
+ const m = await u.newPage();
657
+ await ft();
658
+ const w = n.browserType().name(), P = x.subscribe(() => {
659
+ m.isClosed() || (m.close({
660
+ // reason: reason?.message,
661
+ runBeforeUnload: !1
662
+ }), u.close({
663
+ // reason: reason?.message,
664
+ }));
665
+ });
666
+ try {
667
+ console.log(`START ${r} (${w}): ${a}`), await Bt({
668
+ page: m,
669
+ abortSignal: x,
670
+ filters: h,
671
+ func: async ({ page: c, checkErrors: p, abortSignal: E }) => {
672
+ await t({
673
+ page: c,
674
+ url: a,
675
+ checkErrors: p,
676
+ abortSignal: E,
677
+ args: l
678
+ });
679
+ }
680
+ }), console.log(
681
+ `END [${Jt++}] ${r} (${w}): ${a}`
682
+ );
683
+ } catch (c) {
684
+ if (x.aborted || c instanceof nt) {
685
+ console.log(`ABORTED ${r} (${w}): ${a}`);
686
+ return;
687
+ }
688
+ throw console.log(`ERROR ${r} (${w}): ${a}`), q.signal.aborted || (console.log("unsubscribe on first error"), P()), q.abort(), c;
689
+ }
690
+ });
691
+ }
692
+ });
693
+ } catch (f) {
694
+ if (f instanceof nt)
695
+ return;
696
+ throw f;
618
697
  }
619
698
  };
620
699
  }
700
+ function we(t) {
701
+ const e = Ut(t);
702
+ return Pt(async (n) => await e(n));
703
+ }
704
+ function ye(t, e) {
705
+ const n = e.stableTime, s = e.timeout, r = e.mutation ? {
706
+ childList: !!e.mutation.childList,
707
+ attributes: !!e.mutation.attributes,
708
+ characterData: !!e.mutation.characterData,
709
+ subtree: !!e.mutation.subtree,
710
+ selector: e.mutation.selector ?? null
711
+ } : null, a = e.resource ? {
712
+ resource: !!e.resource.resource,
713
+ navigation: !!e.resource.navigation,
714
+ paint: !!e.resource.paint,
715
+ longTask: !!e.resource.longTask
716
+ } : null;
717
+ return t.evaluate(
718
+ ({ stableTime: o, timeout: i, mutation: h, resource: l }) => {
719
+ return new Promise((f, x) => {
720
+ let u = Date.now(), m = null, w = null;
721
+ const P = [];
722
+ function c() {
723
+ u = Date.now();
724
+ }
725
+ function p() {
726
+ m != null && (clearTimeout(m), m = null), w != null && (clearTimeout(w), w = null);
727
+ for (let y = 0, T = P.length; y < T; y++)
728
+ P[y]();
729
+ }
730
+ function E() {
731
+ const y = o - (Date.now() - u);
732
+ y <= 0 ? (p(), f()) : m = setTimeout(E, y);
733
+ }
734
+ if (h) {
735
+ const y = g(h, c);
736
+ P.push(y);
737
+ }
738
+ if (l) {
739
+ const y = d(l, c);
740
+ P.push(y);
741
+ }
742
+ m = setTimeout(E, o), w = setTimeout(() => {
743
+ p(), x(
744
+ new Error(
745
+ `[waitPageStable] timed out after ${i}ms waiting for page to stabilize`
746
+ )
747
+ );
748
+ }, i);
749
+ });
750
+ function g(f, x) {
751
+ const u = f.selector ? document.querySelector(f.selector) : document.documentElement;
752
+ if (!u)
753
+ throw new Error(
754
+ `[waitPageStable] element not found: ${f.selector}`
755
+ );
756
+ const m = new MutationObserver(x);
757
+ return m.observe(u, {
758
+ childList: f.childList,
759
+ attributes: f.attributes,
760
+ characterData: f.characterData,
761
+ subtree: f.subtree
762
+ }), () => {
763
+ m.disconnect();
764
+ };
765
+ }
766
+ function d(f, x) {
767
+ const u = [];
768
+ f.resource && u.push("resource"), f.navigation && u.push("navigation"), f.paint && u.push("paint"), f.longTask && u.push("longtask");
769
+ const m = new PerformanceObserver(x);
770
+ return m.observe({ entryTypes: u }), () => {
771
+ m.disconnect();
772
+ };
773
+ }
774
+ },
775
+ { stableTime: n, timeout: s, mutation: r, resource: a }
776
+ );
777
+ }
621
778
  async function Y(t, e) {
622
- const r = T.dirname(t);
623
- await I.promises.stat(r).catch(() => null) || await I.promises.mkdir(r, { recursive: !0 }), await I.promises.writeFile(t, JSON.stringify(e, null, 4), {
779
+ const n = M.dirname(t);
780
+ await I.promises.stat(n).catch(() => null) || await I.promises.mkdir(n, { recursive: !0 }), await I.promises.writeFile(t, JSON.stringify(e, null, 4), {
624
781
  encoding: "utf-8"
625
782
  });
626
783
  }
627
- async function $t(t) {
784
+ async function Gt(t) {
628
785
  if (!await I.promises.stat(t).catch(() => null))
629
786
  return null;
630
787
  const e = await I.promises.readFile(t, { encoding: "utf-8" });
631
788
  return JSON.parse(e);
632
789
  }
633
- const Q = "-", X = "+";
634
- function v(t, e, r) {
790
+ const Q = "-", Z = "+";
791
+ function H(t, e, n) {
635
792
  if (t === e)
636
793
  return null;
637
794
  if (Array.isArray(t)) {
638
795
  if (Array.isArray(e)) {
639
- let n = null;
796
+ let r = null;
640
797
  for (let a = 0, o = Math.max(e.length, e.length); a < o; a++) {
641
- const i = v(t[a], e[a], r);
642
- i != null && (n || (n = []), n.push(i));
798
+ const i = H(t[a], e[a], n);
799
+ i != null && (r || (r = []), r.push(i));
643
800
  }
644
- return n != null && r && (n = r(t, e, n)), n;
801
+ return r != null && n && (r = n(t, e, r)), r;
645
802
  }
646
803
  } else if (t instanceof Object && e instanceof Object) {
647
- let n = null;
804
+ let r = null;
648
805
  for (const a in t)
649
806
  if (Object.prototype.hasOwnProperty.call(t, a)) {
650
- const o = v(t[a], e[a], r);
651
- o != null && (n || (n = {}), n[a] = o);
807
+ const o = H(t[a], e[a], n);
808
+ o != null && (r || (r = {}), r[a] = o);
652
809
  }
653
810
  for (const a in e)
654
811
  if (Object.prototype.hasOwnProperty.call(e, a) && !Object.prototype.hasOwnProperty.call(t, a)) {
655
- const o = v(t[a], e[a], r);
656
- o != null && (n || (n = {}), n[a] = o);
812
+ const o = H(t[a], e[a], n);
813
+ o != null && (r || (r = {}), r[a] = o);
657
814
  }
658
- return n != null && r && (n = r(t, e, n)), n;
815
+ return r != null && n && (r = n(t, e, r)), r;
659
816
  }
660
817
  let s = {
661
818
  [Q]: t,
662
- [X]: e
819
+ [Z]: e
663
820
  };
664
- return r && (s = r(t, e, s)), s;
821
+ return n && (s = n(t, e, s)), s;
665
822
  }
666
- function rt(t) {
667
- function e(l) {
668
- return l.sort((S, b) => S[0] > b[0] ? 1 : -1).reduce((S, b) => (S[b[0]] = b[1], S), {});
823
+ function ot(t) {
824
+ function e(c) {
825
+ return c.sort((p, E) => p[0] > E[0] ? 1 : -1).reduce((p, E) => (p[E[0]] = E[1], p), {});
669
826
  }
670
- function r(l) {
671
- return l.reduce((S, b) => (S[b] = !0, S), {});
827
+ function n(c) {
828
+ return c.reduce((p, E) => (p[E] = !0, p), {});
672
829
  }
673
- const s = t.filters && t.filters.excludeAttrs && r(t.filters.excludeAttrs), n = t.filters && t.filters.fixAttrs, a = t.filters && t.filters.fixStyles, o = t.filters && t.filters.excludeStyles && r(t.filters.excludeStyles), i = t.filters && t.filters.fixTags, u = t.filters && t.filters.excludeClasses, c = t.filters && t.filters.excludeIds, E = t.filters && t.filters.excludeSelectorClasses, f = t.filters && t.filters.excludeSelectorIds;
674
- let y;
830
+ const s = t.filters && t.filters.excludeAttrs && n(t.filters.excludeAttrs), r = t.filters && t.filters.fixAttrs, a = t.filters && t.filters.fixStyles, o = t.filters && t.filters.excludeStyles && n(t.filters.excludeStyles), i = t.filters && t.filters.fixTags, h = t.filters && t.filters.excludeClasses, l = t.filters && t.filters.excludeIds, g = t.filters && t.filters.excludeSelectorClasses, d = t.filters && t.filters.excludeSelectorIds;
831
+ let f;
675
832
  if (t.filters && t.filters.excludeSelectors && t.filters.excludeSelectors.length > 0) {
676
- const l = Array.from(
833
+ const c = Array.from(
677
834
  document.querySelectorAll(t.filters.excludeSelectors.join(","))
678
835
  );
679
- l.length > 0 && (y = new Set(l));
836
+ c.length > 0 && (f = new Set(c));
680
837
  }
681
- function P(l, S, b, x) {
682
- const O = getComputedStyle(l, S), p = [];
683
- for (let g = 0, k = O.length; g < k; g++) {
684
- const C = O[g];
685
- if (o && o[C])
838
+ function x(c, p, E, y) {
839
+ const T = getComputedStyle(c, p), S = [];
840
+ for (let k = 0, O = T.length; k < O; k++) {
841
+ const A = T[k];
842
+ if (o && o[A])
686
843
  continue;
687
- let h = O[C];
688
- if (h && a)
689
- for (let A = 0, j = a.length; A < j; A++)
690
- a[A].name.test(C) && (h = h.replace(a[A].search, a[A].replace));
691
- (!b || b[C] !== h) && (!x || x[C] === h) && p.push([C, h]);
844
+ let b = T[A];
845
+ if (b && a)
846
+ for (let j = 0, C = a.length; j < C; j++)
847
+ a[j].name.test(A) && (b = b.replace(a[j].search, a[j].replace));
848
+ (!E || E[A] !== b) && (!y || y[A] === b) && S.push([A, b]);
692
849
  }
693
- return e(p);
850
+ return e(S);
694
851
  }
695
- function d(l, S, b) {
852
+ function u(c, p, E) {
696
853
  return {
697
- _: P(
698
- l,
854
+ _: x(
855
+ c,
699
856
  void 0,
700
- S && S._,
701
- b && b._
857
+ p && p._,
858
+ E && E._
702
859
  ),
703
- before: P(
704
- l,
860
+ before: x(
861
+ c,
705
862
  "before",
706
- S && S.before,
707
- b && b.before
863
+ p && p.before,
864
+ E && E.before
708
865
  ),
709
- after: P(
710
- l,
866
+ after: x(
867
+ c,
711
868
  "after",
712
- S && S.after,
713
- b && b.after
869
+ p && p.after,
870
+ E && E.after
714
871
  )
715
872
  };
716
873
  }
717
- function w(l, S, b, x, O) {
718
- for (let p = 0, g = l.childNodes.length; p < g; p++) {
719
- const k = l.childNodes[p];
720
- if (!k)
874
+ function m(c, p, E, y, T) {
875
+ for (let S = 0, k = c.childNodes.length; S < k; S++) {
876
+ const O = c.childNodes[S];
877
+ if (!O)
721
878
  throw new Error(
722
- `child is null; index=${p}; ${x}, ${l.className}\r
879
+ `child is null; index=${S}; ${y}, ${c.className}\r
723
880
  You should wait js executions before test`
724
881
  );
725
- k instanceof Element && m(
726
- k,
727
- S,
728
- b,
729
- x,
730
- O
882
+ O instanceof Element && w(
883
+ O,
884
+ p,
885
+ E,
886
+ y,
887
+ T
731
888
  );
732
889
  }
733
890
  }
734
- function m(l, S, b, x, O) {
735
- const p = O && O[S.length];
736
- if (O && !p || y && y.has(l))
891
+ function w(c, p, E, y, T) {
892
+ const S = T && T[p.length];
893
+ if (T && !S || f && f.has(c))
737
894
  return;
738
- let g = l.tagName && l.tagName.toLowerCase();
739
- if (g === "head" && (b = !1), i)
740
- for (let L = 0, M = i.length; L < M; L++)
741
- g = g.replace(i[L].search, i[L].replace);
742
- if (p && p.tag !== g)
895
+ let k = c.tagName && c.tagName.toLowerCase();
896
+ if (k === "head" && (E = !1), i)
897
+ for (let D = 0, W = i.length; D < W; D++)
898
+ k = k.replace(i[D].search, i[D].replace);
899
+ if (S && S.tag !== k)
743
900
  return;
744
- const k = [];
745
- for (let L = 0, M = l.attributes.length; L < M; L++) {
746
- const R = l.attributes.item(L);
747
- let W = R.name, J = R.value;
748
- if (W = W.toLowerCase(), W !== "class" && !(s && s[W])) {
749
- if (n)
750
- for (let B = 0, ht = n.length; B < ht; B++)
751
- n[B].name.test(W) && (J = J.replace(n[B].search, n[B].replace));
752
- (!p || p.attrs && p.attrs[W] === J) && k.push([W, J]);
901
+ const O = [];
902
+ for (let D = 0, W = c.attributes.length; D < W; D++) {
903
+ const R = c.attributes.item(D);
904
+ let _ = R.name, z = R.value;
905
+ if (_ = _.toLowerCase(), _ !== "class" && !(s && s[_])) {
906
+ if (r)
907
+ for (let v = 0, pt = r.length; v < pt; v++)
908
+ r[v].name.test(_) && (z = z.replace(r[v].search, r[v].replace));
909
+ (!S || S.attrs && S.attrs[_] === z) && O.push([_, z]);
753
910
  }
754
911
  }
755
- const C = [], h = [];
756
- for (let L = 0, M = l.classList.length; L < M; L++) {
757
- const R = l.classList.item(L);
758
- (!u || !u.test(R)) && C.push(R), (!E || !E.test(R)) && h.push(R);
912
+ const A = [], b = [];
913
+ for (let D = 0, W = c.classList.length; D < W; D++) {
914
+ const R = c.classList.item(D);
915
+ (!h || !h.test(R)) && A.push(R), (!g || !g.test(R)) && b.push(R);
759
916
  }
760
- const A = b ? d(l, t.defaultStyle, p && p.style) : null, j = l.childElementCount ? [] : null;
761
- l.id && (!c || !c.test(l.id)) && l.id;
762
- const F = l.id && (!f || !f.test(l.id)) ? l.id : "", _ = (g || "") + (F ? "#" + F : "") + (h.length > 0 ? "." + h.join(".") : ""), tt = _ ? x ? x + " > " + _ : _ : x, dt = {
763
- tag: g,
764
- selector: tt,
765
- classes: C,
766
- attrs: k.length > 0 ? e(k) : null,
767
- style: A,
768
- childs: j
917
+ const j = E ? u(c, t.defaultStyle, S && S.style) : null, C = c.childElementCount ? [] : null;
918
+ c.id && (!l || !l.test(c.id)) && c.id;
919
+ const L = c.id && (!d || !d.test(c.id)) ? c.id : "", F = (k || "") + (L ? "#" + L : "") + (b.length > 0 ? "." + b.join(".") : ""), rt = F ? y ? y + " > " + F : F : y, yt = {
920
+ tag: k,
921
+ selector: rt,
922
+ classes: A,
923
+ attrs: O.length > 0 ? e(O) : null,
924
+ style: j,
925
+ childs: C
769
926
  };
770
- S.push(dt), j && w(
771
- l,
772
- j,
773
- b,
774
- tt,
775
- p && p.childs
927
+ p.push(yt), C && m(
928
+ c,
929
+ C,
930
+ E,
931
+ rt,
932
+ S && S.childs
776
933
  );
777
934
  }
778
- const D = [];
779
- return m(
935
+ const P = [];
936
+ return w(
780
937
  document.documentElement,
781
- D,
938
+ P,
782
939
  !0,
783
940
  "",
784
941
  t.shouldEqualResult && [t.shouldEqualResult]
785
- ), D[0];
942
+ ), P[0];
786
943
  }
787
- async function ct(t) {
944
+ async function ht(t) {
788
945
  const e = await t.context().newCDPSession(t);
789
946
  return await e.send("DOM.enable"), await e.send("CSS.enable"), e;
790
947
  }
791
- async function lt(t) {
948
+ async function dt(t) {
792
949
  await t.send("CSS.disable"), await t.send("DOM.disable"), await t.detach();
793
950
  }
794
- async function ce(t, e) {
795
- const r = await ct(t);
951
+ async function pe(t, e) {
952
+ const n = await ht(t);
796
953
  try {
797
- return await e(r);
954
+ return await e(n);
798
955
  } finally {
799
- await lt(r);
956
+ await dt(n);
800
957
  }
801
958
  }
802
- async function Mt(t, e) {
803
- const { nodes: r } = await t.send("DOM.getFlattenedDocument", {
959
+ async function Ht(t, e) {
960
+ const { nodes: n } = await t.send("DOM.getFlattenedDocument", {
804
961
  depth: -1,
805
962
  pierce: !0
806
- }), s = r.filter((n) => n.nodeType === 1).map((n) => n.nodeId);
807
- for (const n of s)
963
+ }), s = n.filter((r) => r.nodeType === 1).map((r) => r.nodeId);
964
+ for (const r of s)
808
965
  await t.send("CSS.forcePseudoState", {
809
- nodeId: n,
966
+ nodeId: r,
810
967
  forcedPseudoClasses: e
811
968
  });
812
969
  }
813
- function K(t, e) {
970
+ function V(t, e) {
814
971
  if (!t || !e)
815
972
  return e || null;
816
- let r = null;
973
+ let n = null;
817
974
  for (const s in e)
818
- Object.prototype.hasOwnProperty.call(e, s) && e[s] !== t[s] && (r || (r = {}), r[s] = e[s]);
975
+ Object.prototype.hasOwnProperty.call(e, s) && e[s] !== t[s] && (n || (n = {}), n[s] = e[s]);
819
976
  for (const s in t)
820
- Object.prototype.hasOwnProperty.call(t, s) && !Object.prototype.hasOwnProperty.call(e, s) && (r || (r = {}), r[s] = "");
821
- return r;
977
+ Object.prototype.hasOwnProperty.call(t, s) && !Object.prototype.hasOwnProperty.call(e, s) && (n || (n = {}), n[s] = "");
978
+ return n;
822
979
  }
823
- function Bt(t, e) {
980
+ function Vt(t, e) {
824
981
  if (!t || !e)
825
982
  return e || null;
826
- const r = K(t._, e._), s = K(t.before, e.before), n = K(t.after, e.after);
827
- return !r && !s && !n ? null : {
828
- _: r || {},
983
+ const n = V(t._, e._), s = V(t.before, e.before), r = V(t.after, e.after);
984
+ return !n && !s && !r ? null : {
985
+ _: n || {},
829
986
  before: s || {},
830
- after: n || {}
987
+ after: r || {}
831
988
  };
832
989
  }
833
- function zt(t, e) {
990
+ function Kt(t, e) {
834
991
  if (!t || !e)
835
992
  return e || null;
836
993
  if (t.length !== e.length)
837
994
  return e;
838
- for (let r = 0, s = t.length; r < s; r++)
839
- if (t[r] !== e[r])
995
+ for (let n = 0, s = t.length; n < s; n++)
996
+ if (t[n] !== e[n])
840
997
  return e;
841
998
  return null;
842
999
  }
843
- function ut(t, e) {
844
- const r = zt(t.classes, e.classes), s = K(t.attrs, e.attrs), n = Bt(t.style, e.style);
1000
+ function mt(t, e) {
1001
+ const n = Kt(t.classes, e.classes), s = V(t.attrs, e.attrs), r = Vt(t.style, e.style);
845
1002
  let a = null;
846
1003
  if (t.childs && e.childs) {
847
1004
  const o = Math.min(t.childs.length, e.childs.length);
848
1005
  for (let i = 0; i < o; i++) {
849
- const u = ut(t.childs[i], e.childs[i]);
850
- if (u) {
1006
+ const h = mt(t.childs[i], e.childs[i]);
1007
+ if (h) {
851
1008
  if (!a) {
852
1009
  a = [];
853
- for (let c = 0; c < o; c++)
1010
+ for (let l = 0; l < o; l++)
854
1011
  a.push({});
855
1012
  }
856
- a[i] = u;
1013
+ a[i] = h;
857
1014
  }
858
1015
  }
859
1016
  }
860
- return !r && !s && !n && !a ? null : {
1017
+ return !n && !s && !r && !a ? null : {
861
1018
  tag: e.tag,
862
1019
  selector: e.selector,
863
- classes: r,
1020
+ classes: n,
864
1021
  attrs: s,
865
- style: n,
1022
+ style: r,
866
1023
  childs: a
867
1024
  };
868
1025
  }
869
- const V = (t, e, r, s) => {
870
- const n = s(t, e, r, s);
871
- if (n == null)
872
- return n;
873
- if (Array.isArray(n))
874
- return n.map(
875
- (a, o, i) => V(a, o, i, s)
1026
+ const K = (t, e, n, s) => {
1027
+ const r = s(t, e, n, s);
1028
+ if (r == null)
1029
+ return r;
1030
+ if (Array.isArray(r))
1031
+ return r.map(
1032
+ (a, o, i) => K(a, o, i, s)
876
1033
  );
877
- if (typeof n == "object") {
1034
+ if (typeof r == "object") {
878
1035
  const a = {};
879
- for (const o in n)
880
- Object.prototype.hasOwnProperty.call(n, o) && (a[o] = V(n[o], o, n, s));
1036
+ for (const o in r)
1037
+ Object.prototype.hasOwnProperty.call(r, o) && (a[o] = K(r[o], o, r, s));
881
1038
  return a;
882
1039
  }
883
- return n;
1040
+ return r;
884
1041
  };
885
- function ft(t, e) {
1042
+ function wt(t, e) {
886
1043
  if (t.attrs && e.excludeAttrs) {
887
- for (let r = 0, s = e.excludeAttrs.length; r < s; r++)
888
- delete t.attrs[e.excludeAttrs[r]];
1044
+ for (let n = 0, s = e.excludeAttrs.length; n < s; n++)
1045
+ delete t.attrs[e.excludeAttrs[n]];
889
1046
  Object.keys(t.attrs).length === 0 && (t.attrs = null);
890
1047
  }
891
1048
  if (t.classes && e.excludeClasses && (t.classes = t.classes.filter(
892
- (r) => !e.excludeClasses.test(r)
1049
+ (n) => !e.excludeClasses.test(n)
893
1050
  )), t.style && e.excludeStyles)
894
- for (const r of ["_", "before", "after"]) {
895
- const s = t.style[r];
1051
+ for (const n of ["_", "before", "after"]) {
1052
+ const s = t.style[n];
896
1053
  if (s)
897
- for (let n = 0, a = e.excludeStyles.length; n < a; n++)
898
- delete s[e.excludeStyles[n]];
1054
+ for (let r = 0, a = e.excludeStyles.length; r < a; r++)
1055
+ delete s[e.excludeStyles[r]];
899
1056
  }
900
1057
  if (t.childs)
901
- for (let r = 0, s = t.childs.length; r < s; r++)
902
- ft(t.childs[r], e);
1058
+ for (let n = 0, s = t.childs.length; n < s; n++)
1059
+ wt(t.childs[n], e);
903
1060
  }
904
- function Jt(t, e) {
905
- for (const r in t) {
906
- if (!Object.prototype.hasOwnProperty.call(t, r)) continue;
907
- const s = t[r];
908
- for (const n in s) {
909
- if (!Object.prototype.hasOwnProperty.call(s, n)) continue;
910
- const a = s[n];
1061
+ function qt(t, e) {
1062
+ for (const n in t) {
1063
+ if (!Object.prototype.hasOwnProperty.call(t, n)) continue;
1064
+ const s = t[n];
1065
+ for (const r in s) {
1066
+ if (!Object.prototype.hasOwnProperty.call(s, r)) continue;
1067
+ const a = s[r];
911
1068
  for (const o in a)
912
- Object.prototype.hasOwnProperty.call(a, o) && ft(a[o], e);
1069
+ Object.prototype.hasOwnProperty.call(a, o) && wt(a[o], e);
913
1070
  }
914
1071
  }
915
1072
  }
916
- function le({
1073
+ function be({
917
1074
  actualResultFile: t,
918
1075
  expectedResultFile: e,
919
- diffResultFile: r,
1076
+ diffResultFile: n,
920
1077
  filters: s,
921
- transform: n,
1078
+ transform: r,
922
1079
  pseudoStates: a
923
1080
  }) {
924
- let o, i, u, c = {};
1081
+ let o, i, h, l = {};
925
1082
  return {
926
- async init(E) {
927
- o = await $t(e), n && (o = V(o, null, null, n)), o && s && Jt(o, s), await E.goto("about:blank"), i = await E.evaluate(rt, { filters: s }), u = i.style;
1083
+ async init(g) {
1084
+ o = await Gt(e), r && (o = K(o, null, null, r)), o && s && qt(o, s), await g.goto("about:blank"), i = await g.evaluate(ot, { filters: s }), h = i.style;
928
1085
  },
929
1086
  async handlePage({
930
- page: E,
931
- testId: f,
932
- url: y,
933
- stateId: P,
934
- _filters: d
1087
+ page: g,
1088
+ testId: d,
1089
+ url: f,
1090
+ stateId: x,
1091
+ _filters: u
935
1092
  }) {
936
- let w = c[f];
937
- w || (w = {}, c[f] = w);
938
- let m = w[y.href];
939
- m || (m = {}, w[y.href] = m), await E.addStyleTag({
1093
+ let m = l[d];
1094
+ m || (m = {}, l[d] = m);
1095
+ let w = m[f.href];
1096
+ w || (w = {}, m[f.href] = w), await g.addStyleTag({
940
1097
  content: "*, *::before, *::after { animation-name: none!important; transition-duration: 0s !important; }"
941
1098
  });
942
- const D = a ?? [{ states: [] }];
943
- let l = null, S;
1099
+ const P = a ?? [{ states: [] }];
1100
+ let c = null, p;
944
1101
  try {
945
- for (let b = 0; b < D.length; b++) {
946
- const x = D[b], O = x.states.length > 0 ? P + ":" + x.states.join(":") : P;
947
- let p = null;
948
- if (x.states.length > 0) {
949
- l || (l = await ct(E));
950
- const h = performance.now();
951
- await Mt(l, x.states), p = performance.now() - h;
1102
+ for (let E = 0; E < P.length; E++) {
1103
+ const y = P[E], T = y.states.length > 0 ? x + ":" + y.states.join(":") : x;
1104
+ let S = null;
1105
+ if (y.states.length > 0) {
1106
+ c || (c = await ht(g));
1107
+ const b = performance.now();
1108
+ await Ht(c, y.states), S = performance.now() - b;
952
1109
  }
953
- x.delay && await at(x.delay);
954
- const g = performance.now(), k = await E.evaluate(rt, {
955
- filters: d || s,
956
- defaultStyle: u,
957
- shouldEqualResult: m[O]
958
- }), C = performance.now() - g;
1110
+ y.delay && await it(y.delay);
1111
+ const k = performance.now(), O = await g.evaluate(ot, {
1112
+ filters: u || s,
1113
+ defaultStyle: h,
1114
+ shouldEqualResult: w[T]
1115
+ }), A = performance.now() - k;
959
1116
  if (console.log(
960
- `SNAPSHOT ${O}:` + (p != null ? ` forcePseudoClasses ${p.toFixed(0)}ms,` : "") + ` getAllElements ${C.toFixed(0)}ms`
961
- ), !S)
962
- S = k, m[O] = k;
1117
+ `SNAPSHOT ${T}:` + (S != null ? ` forcePseudoClasses ${S.toFixed(0)}ms,` : "") + ` getAllElements ${A.toFixed(0)}ms`
1118
+ ), !p)
1119
+ p = O, w[T] = O;
963
1120
  else {
964
- const h = ut(S, k);
965
- h && (m[O] = h);
1121
+ const b = mt(p, O);
1122
+ b && (w[T] = b);
966
1123
  }
967
1124
  }
968
1125
  } finally {
969
- l && await lt(l);
1126
+ c && await dt(c);
970
1127
  }
971
1128
  },
972
- async end({ checkExistUrlsOnly: E }) {
973
- if (c = yt(c), n && (c = V(c, null, null, n)), o) {
974
- let f, y;
975
- if (!E)
976
- f = o, y = c;
1129
+ async end({ checkExistUrlsOnly: g }) {
1130
+ if (l = Et(l), r && (l = K(l, null, null, r)), o) {
1131
+ let d, f;
1132
+ if (!g)
1133
+ d = o, f = l;
977
1134
  else {
978
- f = {}, y = {};
979
- for (const d in o)
980
- if (Object.prototype.hasOwnProperty.call(o, d) && Object.prototype.hasOwnProperty.call(c, d)) {
981
- f[d] = {}, y[d] = {};
982
- for (const w in o[d])
983
- Object.prototype.hasOwnProperty.call(o[d], w) && Object.prototype.hasOwnProperty.call(c[d], w) && (f[d][w] = o[d][w], y[d][w] = c[d][w]);
1135
+ d = {}, f = {};
1136
+ for (const u in o)
1137
+ if (Object.prototype.hasOwnProperty.call(o, u) && Object.prototype.hasOwnProperty.call(l, u)) {
1138
+ d[u] = {}, f[u] = {};
1139
+ for (const m in o[u])
1140
+ Object.prototype.hasOwnProperty.call(o[u], m) && Object.prototype.hasOwnProperty.call(l[u], m) && (d[u][m] = o[u][m], f[u][m] = l[u][m]);
984
1141
  }
985
1142
  }
986
- const P = v(
1143
+ const x = H(
1144
+ d,
987
1145
  f,
988
- y,
989
- (d, w, m) => m.selector && (delete m.selector, Object.keys(m).length === 0) ? null : m.childs && m.childs.length === 1 ? m.childs[0] : (w && w.selector ? m[X] ? m[X] = w.selector : m = { selector: w.selector, ...m } : d && d.selector && (m[Q] ? m[Q] = d.selector : m = { selector: d.selector, ...m }), m)
1146
+ (u, m, w) => w.selector && (delete w.selector, Object.keys(w).length === 0) ? null : w.childs && w.childs.length === 1 ? w.childs[0] : (m && m.selector ? w[Z] ? w[Z] = m.selector : w = { selector: m.selector, ...w } : u && u.selector && (w[Q] ? w[Q] = u.selector : w = { selector: u.selector, ...w }), w)
990
1147
  );
991
- if (r && await Y(r, P || {}), P)
992
- throw await Y(t, c), console.error(
993
- "Pages elements changes: " + JSON.stringify(P, null, 4).substring(0, 5e3)
1148
+ if (n && await Y(n, x || {}), x)
1149
+ throw await Y(t, l), console.error(
1150
+ "Pages elements changes: " + JSON.stringify(x, null, 4).substring(0, 5e3)
994
1151
  ), new Error("Pages elements changes detected");
995
1152
  await I.promises.stat(t).catch(() => null) && await I.promises.unlink(t);
996
1153
  } else
997
- await Y(e, c);
998
- return c;
1154
+ await Y(e, l);
1155
+ return l;
999
1156
  }
1000
1157
  };
1001
1158
  }
1002
1159
  export {
1003
- de as ConsoleMessageLevel,
1004
- X as DIFF_NEW,
1160
+ Se as CheckError,
1161
+ xe as ConsoleMessageLevel,
1162
+ Z as DIFF_NEW,
1005
1163
  Q as DIFF_OLD,
1006
- he as Lazy,
1007
- me as LazyWithId,
1008
- pe as LogLevel,
1009
- ye as Random,
1010
- we as Subject,
1011
- ge as SubjectWithId,
1012
- xe as UNIQUE_PSEUDO_RANDOM_MAX_COUNT,
1013
- Ee as alertConsole,
1014
- Se as alertReplace,
1015
- be as check,
1016
- It as checkPageHttpErrors,
1017
- ke as consoleIntercept,
1018
- Oe as consoleMessageToString,
1019
- Pe as consoleReplace,
1020
- je as convertTimeZone,
1021
- ct as createCDPSession,
1022
- te as createMatchPath,
1023
- le as createPagesElementsChangesTest,
1024
- Ce as createTaskDelayRetry,
1025
- Ae as createUniquePseudoRandom,
1026
- Le as dateNowUnique,
1027
- De as deepCloneJsonLike,
1028
- Fe as deepEqualJsonLike,
1029
- Te as deepEqualJsonLikeMap,
1164
+ ke as Lazy,
1165
+ Oe as LazyWithId,
1166
+ Te as LogLevel,
1167
+ Pe as MAX_REPORT_ITEMS_DEFAULT,
1168
+ Ce as MatchInternalError,
1169
+ Ae as Matcher,
1170
+ je as MatcherAny,
1171
+ De as MatcherArray,
1172
+ Le as MatcherArrayItem,
1173
+ Me as MatcherConvert,
1174
+ Ie as MatcherCustom,
1175
+ Fe as MatcherFew,
1176
+ Re as MatcherIn,
1177
+ _e as MatcherInstanceOf,
1178
+ $e as MatcherIs,
1179
+ Ne as MatcherNever,
1180
+ We as MatcherNot,
1181
+ ve as MatcherNumber,
1182
+ Be as MatcherObject,
1183
+ ze as MatcherObjectEntry,
1184
+ Je as MatcherRef,
1185
+ Ue as MatcherString,
1186
+ Ge as Random,
1187
+ He as Subject,
1188
+ Ve as SubjectWithId,
1189
+ Ke as UNIQUE_PSEUDO_RANDOM_MAX_COUNT,
1190
+ qe as alertConsole,
1191
+ Ye as alertReplace,
1192
+ Xe as argsToString,
1193
+ Qe as check,
1194
+ Ze as checkFunc,
1195
+ $t as checkPageHttpErrors,
1196
+ me as clickAll,
1197
+ tr as consoleIntercept,
1198
+ er as consoleMessageToString,
1199
+ rr as consoleReplace,
1200
+ nr as convertTimeZone,
1201
+ ht as createCDPSession,
1202
+ ce as createMatchPath,
1203
+ sr as createMatchResult,
1204
+ ar as createMatchResultBoolean,
1205
+ or as createMatchResultError,
1206
+ be as createPagesElementsChangesTest,
1207
+ ir as createTaskDelayRetry,
1208
+ Ut as createTestE2e,
1209
+ we as createTestE2eVariants,
1210
+ cr as createUniquePseudoRandom,
1211
+ lr as dateNowUnique,
1212
+ ur as deepCloneJsonLike,
1213
+ fr as deepEqualJsonLike,
1214
+ hr as deepEqualJsonLikeMap,
1030
1215
  Wt as delayOnErrorCall,
1031
- re as delayOnErrorSet,
1032
- se as delayOnErrorWait,
1033
- lt as destroyCDPSession,
1034
- Ie as equalArray,
1035
- _e as escapeHtml,
1036
- Re as escapeRegExp,
1037
- Ft as exec,
1038
- Xt as fileLock,
1039
- We as fixStackTrace,
1040
- Mt as forcePseudoClasses,
1041
- Ne as formatAny,
1042
- $e as formatDate,
1043
- Me as formatDateFileName,
1044
- rt as getAllElements,
1045
- Be as getConsoleMessages,
1046
- ze as getDateInet,
1047
- Ot as getDrive,
1048
- ut as getElementsStyleDiff,
1049
- Pt as getFileId,
1050
- yt as getNormalizedObject,
1051
- v as getObjectsDiff,
1052
- Tt as getPageHttpErrors,
1053
- Je as getRandomFunc,
1054
- Ue as getRandomSeed,
1055
- pt as getStackTrace,
1056
- At as globGitIgnoreToPicomatch,
1057
- Lt as globToRelative,
1058
- Nt as initPage,
1059
- He as isObservable,
1060
- ee as loadGlobs,
1061
- Dt as loadGlobsFromFile,
1062
- $t as loadJson,
1063
- Ge as match,
1064
- ve as matchAnd,
1065
- Ke as matchAndPipe,
1066
- Ve as matchAny,
1067
- Ye as matchArray,
1068
- qe as matchArrayBuffer,
1069
- Qe as matchArrayIncludes,
1070
- Xe as matchArrayItem,
1071
- Ze as matchArrayLength,
1072
- tn as matchArrayWith,
1073
- en as matchBoolean,
1074
- nn as matchConstructor,
1075
- rn as matchConvert,
1076
- sn as matchCustom,
1077
- an as matchDeep,
1078
- on as matchEnum,
1079
- cn as matchFloat,
1080
- ln as matchIn,
1081
- un as matchInstanceOf,
1082
- fn as matchInt,
1083
- dn as matchIntDate,
1084
- hn as matchIs,
1085
- mn as matchIsNonStrict,
1086
- pn as matchNever,
1087
- yn as matchNot,
1088
- wn as matchNotNullish,
1089
- gn as matchNullish,
1090
- xn as matchNumber,
1091
- En as matchObject,
1092
- Sn as matchObjectEntries,
1093
- bn as matchObjectEntry,
1094
- kn as matchObjectKey,
1095
- On as matchObjectKeyValue,
1096
- Pn as matchObjectKeys,
1097
- jn as matchObjectKeysNotNull,
1098
- Cn as matchObjectPartial,
1099
- An as matchObjectValue,
1100
- Ln as matchObjectValues,
1101
- Dn as matchObjectWith,
1102
- Fn as matchOptional,
1103
- Tn as matchOr,
1104
- In as matchOrPipe,
1105
- _n as matchRange,
1106
- Rn as matchRangeDate,
1107
- Wn as matchRef,
1108
- Nn as matchString,
1109
- $n as matchStringLength,
1110
- Mn as matchTypeOf,
1111
- Bn as matchUuid,
1112
- zn as matchValueState,
1113
- Jn as max,
1114
- Un as min,
1115
- Hn as minMax,
1116
- ne as nodeBeep,
1117
- Gn as numberMod,
1118
- V as objectTransform,
1119
- $ as pathNormalize,
1120
- jt as pathResolve,
1121
- Z as poolFs,
1122
- vn as randomBoolean,
1123
- Kn as randomEnum,
1124
- Vn as randomFloat,
1125
- Yn as randomIndexWeighted,
1126
- qn as randomInt,
1127
- Qn as randomItem,
1128
- Xn as randomItems,
1216
+ fe as delayOnErrorSet,
1217
+ he as delayOnErrorWait,
1218
+ dt as destroyCDPSession,
1219
+ dr as equalArray,
1220
+ mr as escapeHtml,
1221
+ wr as escapeRegExp,
1222
+ Rt as exec,
1223
+ yr as expectedToString,
1224
+ oe as fileLock,
1225
+ pr as filterMatchResult,
1226
+ br as filterMatchResultNested,
1227
+ gr as fixStackTrace,
1228
+ Ht as forcePseudoClasses,
1229
+ Er as formatAny,
1230
+ Sr as formatDate,
1231
+ xr as formatDateFileName,
1232
+ ot as getAllElements,
1233
+ kr as getConsoleMessages,
1234
+ Or as getDateInet,
1235
+ At as getDrive,
1236
+ mt as getElementsStyleDiff,
1237
+ jt as getFileId,
1238
+ Et as getNormalizedObject,
1239
+ Tr as getObjectId,
1240
+ H as getObjectsDiff,
1241
+ _t as getPageHttpErrors,
1242
+ Pr as getRandomFunc,
1243
+ Cr as getRandomSeed,
1244
+ gt as getStackTrace,
1245
+ Mt as globGitIgnoreToPicomatch,
1246
+ It as globToRelative,
1247
+ vt as initPage,
1248
+ Ar as isMatcher,
1249
+ jr as isObservable,
1250
+ le as loadGlobs,
1251
+ Ft as loadGlobsFromFile,
1252
+ Gt as loadJson,
1253
+ Dr as match,
1254
+ Lr as matchAnd,
1255
+ Mr as matchAndPipe,
1256
+ Ir as matchAny,
1257
+ Fr as matchArray,
1258
+ Rr as matchArrayBuffer,
1259
+ _r as matchArrayIncludes,
1260
+ $r as matchArrayItem,
1261
+ Nr as matchArrayLength,
1262
+ Wr as matchArrayWith,
1263
+ vr as matchBoolean,
1264
+ Br as matchConstructor,
1265
+ zr as matchConvert,
1266
+ Jr as matchCustom,
1267
+ Ur as matchDeep,
1268
+ Gr as matchEnum,
1269
+ Hr as matchFloat,
1270
+ Vr as matchIn,
1271
+ Kr as matchInstanceOf,
1272
+ qr as matchInt,
1273
+ Yr as matchIntDate,
1274
+ Xr as matchIs,
1275
+ Qr as matchIsNonStrict,
1276
+ Zr as matchNever,
1277
+ tn as matchNot,
1278
+ en as matchNotNullish,
1279
+ rn as matchNullish,
1280
+ nn as matchNumber,
1281
+ sn as matchObject,
1282
+ an as matchObjectEntries,
1283
+ on as matchObjectEntry,
1284
+ cn as matchObjectKey,
1285
+ ln as matchObjectKeyValue,
1286
+ un as matchObjectKeys,
1287
+ fn as matchObjectKeysNotNull,
1288
+ hn as matchObjectPartial,
1289
+ dn as matchObjectValue,
1290
+ mn as matchObjectValues,
1291
+ wn as matchObjectWith,
1292
+ yn as matchOptional,
1293
+ pn as matchOr,
1294
+ bn as matchOrPipe,
1295
+ gn as matchRange,
1296
+ En as matchRangeDate,
1297
+ Sn as matchRef,
1298
+ xn as matchResultNestedToString,
1299
+ kn as matchResultToString,
1300
+ On as matchString,
1301
+ Tn as matchStringLength,
1302
+ Pn as matchTypeOf,
1303
+ Cn as matchUuid,
1304
+ An as matchValueState,
1305
+ jn as max,
1306
+ Dn as min,
1307
+ Ln as minMax,
1308
+ ue as nodeBeep,
1309
+ Mn as numberMod,
1310
+ K as objectTransform,
1311
+ N as pathNormalize,
1312
+ Dt as pathResolve,
1313
+ et as poolFs,
1314
+ In as randomBoolean,
1315
+ Fn as randomEnum,
1316
+ Rn as randomFloat,
1317
+ _n as randomIndexWeighted,
1318
+ $n as randomInt,
1319
+ Nn as randomItem,
1320
+ Wn as randomItems,
1129
1321
  Y as saveJson,
1130
- Zn as setFuncName,
1131
- Rt as setPlaywrightPriorityLow,
1132
- tr as sha256,
1133
- er as sha256Buffer,
1134
- _t as subscribeJsErrors,
1135
- ae as testPage,
1136
- nr as timeoutAbortController,
1137
- rr as toHex,
1138
- sr as truncateString,
1139
- ar as urlGetBoolean,
1140
- or as urlGetFloat,
1141
- ir as urlGetInt,
1142
- cr as urlGetParams,
1143
- lr as urlGetString,
1144
- ur as urlParamToBoolean,
1145
- fr as urlParamToFloat,
1146
- dr as urlParamToInt,
1147
- oe as useBrowser,
1148
- ie as useBrowserContext,
1149
- ce as usingCDPSession,
1150
- hr as waitObservable,
1151
- Ct as walkPathHandleErrorDefault,
1152
- Zt as walkPaths,
1153
- mr as withConsoleReplace,
1154
- pr as withRetry,
1155
- mt as withTimeout
1322
+ vn as setFuncName,
1323
+ ft as setPlaywrightPriorityLow,
1324
+ Bn as sha256,
1325
+ zn as sha256Buffer,
1326
+ Nt as subscribeJsErrors,
1327
+ Bt as testPage,
1328
+ Jn as timeoutAbortController,
1329
+ Un as toHex,
1330
+ Gn as truncateString,
1331
+ Hn as urlGetBoolean,
1332
+ Vn as urlGetFloat,
1333
+ Kn as urlGetInt,
1334
+ qn as urlGetParams,
1335
+ Yn as urlGetString,
1336
+ Xn as urlParamToBoolean,
1337
+ Qn as urlParamToFloat,
1338
+ Zn as urlParamToInt,
1339
+ de as useBrowser,
1340
+ zt as useBrowserContext,
1341
+ pe as usingCDPSession,
1342
+ ts as validateMatchResult,
1343
+ es as waitObservable,
1344
+ ye as waitPageStable,
1345
+ Lt as walkPathHandleErrorDefault,
1346
+ ie as walkPaths,
1347
+ rs as withConsoleReplace,
1348
+ ns as withRetry,
1349
+ bt as withTimeout
1156
1350
  };