@opendesign-plus-test/plugins 0.0.1-rc.10 → 0.0.1-rc.12

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,20 +1,24 @@
1
- var Ht = Object.defineProperty;
2
- var St = (i) => {
1
+ var Ut = Object.defineProperty;
2
+ var yt = (i) => {
3
3
  throw TypeError(i);
4
4
  };
5
- var Jt = (i, t, e) => t in i ? Ht(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
6
- var $ = (i, t, e) => Jt(i, typeof t != "symbol" ? t + "" : t, e), at = (i, t, e) => t.has(i) || St("Cannot " + e);
7
- var o = (i, t, e) => (at(i, t, "read from private field"), e ? e.call(i) : t.get(i)), v = (i, t, e) => t.has(i) ? St("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), E = (i, t, e, s) => (at(i, t, "write to private field"), s ? s.call(i, e) : t.set(i, e), e), x = (i, t, e) => (at(i, t, "access private method"), e);
8
- var ht = (i, t, e, s) => ({
5
+ var Zt = (i, t, e) => t in i ? Ut(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
6
+ var T = (i, t, e) => Zt(i, typeof t != "symbol" ? t + "" : t, e), ct = (i, t, e) => t.has(i) || yt("Cannot " + e);
7
+ var o = (i, t, e) => (ct(i, t, "read from private field"), e ? e.call(i) : t.get(i)), R = (i, t, e) => t.has(i) ? yt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), S = (i, t, e, s) => (ct(i, t, "write to private field"), s ? s.call(i, e) : t.set(i, e), e), x = (i, t, e) => (ct(i, t, "access private method"), e);
8
+ var lt = (i, t, e, s) => ({
9
9
  set _(n) {
10
- E(i, t, n, e);
10
+ S(i, t, n, e);
11
11
  },
12
12
  get _() {
13
13
  return o(i, t, s);
14
14
  }
15
15
  });
16
- const vt = (i, t, e) => {
17
- const s = i instanceof RegExp ? Et(i, e) : i, n = t instanceof RegExp ? Et(t, e) : t, r = s !== null && n != null && Vt(s, n, e);
16
+ import Ht, { resolve as Jt } from "node:path";
17
+ import { exec as Vt } from "node:child_process";
18
+ import { writeFileSync as Xt } from "node:fs";
19
+ import { promisify as Qt } from "node:util";
20
+ const Ot = (i, t, e) => {
21
+ const s = i instanceof RegExp ? wt(i, e) : i, n = t instanceof RegExp ? wt(t, e) : t, r = s !== null && n != null && Kt(s, n, e);
18
22
  return r && {
19
23
  start: r[0],
20
24
  end: r[1],
@@ -22,124 +26,124 @@ const vt = (i, t, e) => {
22
26
  body: e.slice(r[0] + s.length, r[1]),
23
27
  post: e.slice(r[1] + n.length)
24
28
  };
25
- }, Et = (i, t) => {
29
+ }, wt = (i, t) => {
26
30
  const e = t.match(i);
27
31
  return e ? e[0] : null;
28
- }, Vt = (i, t, e) => {
29
- let s, n, r, c, f, p = e.indexOf(i), a = e.indexOf(t, p + 1), h = p;
30
- if (p >= 0 && a > 0) {
32
+ }, Kt = (i, t, e) => {
33
+ let s, n, r, c, a, p = e.indexOf(i), h = e.indexOf(t, p + 1), f = p;
34
+ if (p >= 0 && h > 0) {
31
35
  if (i === t)
32
- return [p, a];
33
- for (s = [], r = e.length; h >= 0 && !f; ) {
34
- if (h === p)
35
- s.push(h), p = e.indexOf(i, h + 1);
36
+ return [p, h];
37
+ for (s = [], r = e.length; f >= 0 && !a; ) {
38
+ if (f === p)
39
+ s.push(f), p = e.indexOf(i, f + 1);
36
40
  else if (s.length === 1) {
37
41
  const l = s.pop();
38
- l !== void 0 && (f = [l, a]);
42
+ l !== void 0 && (a = [l, h]);
39
43
  } else
40
- n = s.pop(), n !== void 0 && n < r && (r = n, c = a), a = e.indexOf(t, h + 1);
41
- h = p < a && p >= 0 ? p : a;
44
+ n = s.pop(), n !== void 0 && n < r && (r = n, c = h), h = e.indexOf(t, f + 1);
45
+ f = p < h && p >= 0 ? p : h;
42
46
  }
43
- s.length && c !== void 0 && (f = [r, c]);
47
+ s.length && c !== void 0 && (a = [r, c]);
44
48
  }
45
- return f;
46
- }, Rt = "\0SLASH" + Math.random() + "\0", jt = "\0OPEN" + Math.random() + "\0", yt = "\0CLOSE" + Math.random() + "\0", Pt = "\0COMMA" + Math.random() + "\0", Ct = "\0PERIOD" + Math.random() + "\0", Xt = new RegExp(Rt, "g"), Qt = new RegExp(jt, "g"), Kt = new RegExp(yt, "g"), Yt = new RegExp(Pt, "g"), te = new RegExp(Ct, "g"), ee = /\\\\/g, se = /\\{/g, ne = /\\}/g, ie = /\\,/g, re = /\\\./g, oe = 1e5;
47
- function ft(i) {
49
+ return a;
50
+ }, Tt = "\0SLASH" + Math.random() + "\0", vt = "\0OPEN" + Math.random() + "\0", dt = "\0CLOSE" + Math.random() + "\0", Rt = "\0COMMA" + Math.random() + "\0", Pt = "\0PERIOD" + Math.random() + "\0", Yt = new RegExp(Tt, "g"), te = new RegExp(vt, "g"), ee = new RegExp(dt, "g"), se = new RegExp(Rt, "g"), ne = new RegExp(Pt, "g"), ie = /\\\\/g, re = /\\{/g, oe = /\\}/g, ce = /\\,/g, le = /\\\./g, he = 1e5;
51
+ function ht(i) {
48
52
  return isNaN(i) ? i.charCodeAt(0) : parseInt(i, 10);
49
53
  }
50
- function ce(i) {
51
- return i.replace(ee, Rt).replace(se, jt).replace(ne, yt).replace(ie, Pt).replace(re, Ct);
54
+ function ae(i) {
55
+ return i.replace(ie, Tt).replace(re, vt).replace(oe, dt).replace(ce, Rt).replace(le, Pt);
52
56
  }
53
- function le(i) {
54
- return i.replace(Xt, "\\").replace(Qt, "{").replace(Kt, "}").replace(Yt, ",").replace(te, ".");
57
+ function fe(i) {
58
+ return i.replace(Yt, "\\").replace(te, "{").replace(ee, "}").replace(se, ",").replace(ne, ".");
55
59
  }
56
- function Wt(i) {
60
+ function jt(i) {
57
61
  if (!i)
58
62
  return [""];
59
- const t = [], e = vt("{", "}", i);
63
+ const t = [], e = Ot("{", "}", i);
60
64
  if (!e)
61
65
  return i.split(",");
62
66
  const { pre: s, body: n, post: r } = e, c = s.split(",");
63
67
  c[c.length - 1] += "{" + n + "}";
64
- const f = Wt(r);
65
- return r.length && (c[c.length - 1] += f.shift(), c.push.apply(c, f)), t.push.apply(t, c), t;
68
+ const a = jt(r);
69
+ return r.length && (c[c.length - 1] += a.shift(), c.push.apply(c, a)), t.push.apply(t, c), t;
66
70
  }
67
- function ae(i, t = {}) {
71
+ function ue(i, t = {}) {
68
72
  if (!i)
69
73
  return [];
70
- const { max: e = oe } = t;
71
- return i.slice(0, 2) === "{}" && (i = "\\{\\}" + i.slice(2)), tt(ce(i), e, !0).map(le);
74
+ const { max: e = he } = t;
75
+ return i.slice(0, 2) === "{}" && (i = "\\{\\}" + i.slice(2)), K(ae(i), e, !0).map(fe);
72
76
  }
73
- function he(i) {
77
+ function pe(i) {
74
78
  return "{" + i + "}";
75
79
  }
76
- function fe(i) {
80
+ function ge(i) {
77
81
  return /^-?0\d/.test(i);
78
82
  }
79
- function ue(i, t) {
83
+ function de(i, t) {
80
84
  return i <= t;
81
85
  }
82
- function pe(i, t) {
86
+ function me(i, t) {
83
87
  return i >= t;
84
88
  }
85
- function tt(i, t, e) {
86
- const s = [], n = vt("{", "}", i);
89
+ function K(i, t, e) {
90
+ const s = [], n = Ot("{", "}", i);
87
91
  if (!n)
88
92
  return [i];
89
- const r = n.pre, c = n.post.length ? tt(n.post, t, !1) : [""];
93
+ const r = n.pre, c = n.post.length ? K(n.post, t, !1) : [""];
90
94
  if (/\$$/.test(n.pre))
91
- for (let f = 0; f < c.length && f < t; f++) {
92
- const p = r + "{" + n.body + "}" + c[f];
95
+ for (let a = 0; a < c.length && a < t; a++) {
96
+ const p = r + "{" + n.body + "}" + c[a];
93
97
  s.push(p);
94
98
  }
95
99
  else {
96
- const f = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body), p = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body), a = f || p, h = n.body.indexOf(",") >= 0;
97
- if (!a && !h)
98
- return n.post.match(/,(?!,).*\}/) ? (i = n.pre + "{" + n.body + yt + n.post, tt(i, t, !0)) : [i];
100
+ const a = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body), p = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body), h = a || p, f = n.body.indexOf(",") >= 0;
101
+ if (!h && !f)
102
+ return n.post.match(/,(?!,).*\}/) ? (i = n.pre + "{" + n.body + dt + n.post, K(i, t, !0)) : [i];
99
103
  let l;
100
- if (a)
104
+ if (h)
101
105
  l = n.body.split(/\.\./);
102
- else if (l = Wt(n.body), l.length === 1 && l[0] !== void 0 && (l = tt(l[0], t, !1).map(he), l.length === 1))
106
+ else if (l = jt(n.body), l.length === 1 && l[0] !== void 0 && (l = K(l[0], t, !1).map(pe), l.length === 1))
103
107
  return c.map((g) => n.pre + l[0] + g);
104
108
  let u;
105
- if (a && l[0] !== void 0 && l[1] !== void 0) {
106
- const g = ft(l[0]), w = ft(l[1]), b = Math.max(l[0].length, l[1].length);
107
- let P = l.length === 3 && l[2] !== void 0 ? Math.max(Math.abs(ft(l[2])), 1) : 1, T = ue;
108
- w < g && (P *= -1, T = pe);
109
- const S = l.some(fe);
109
+ if (h && l[0] !== void 0 && l[1] !== void 0) {
110
+ const g = ht(l[0]), y = ht(l[1]), E = Math.max(l[0].length, l[1].length);
111
+ let w = l.length === 3 && l[2] !== void 0 ? Math.max(Math.abs(ht(l[2])), 1) : 1, b = de;
112
+ y < g && (w *= -1, b = me);
113
+ const d = l.some(ge);
110
114
  u = [];
111
- for (let m = g; T(m, w); m += P) {
112
- let y;
115
+ for (let $ = g; b($, y); $ += w) {
116
+ let N;
113
117
  if (p)
114
- y = String.fromCharCode(m), y === "\\" && (y = "");
115
- else if (y = String(m), S) {
116
- const k = b - y.length;
117
- if (k > 0) {
118
- const C = new Array(k + 1).join("0");
119
- m < 0 ? y = "-" + C + y.slice(1) : y = C + y;
118
+ N = String.fromCharCode($), N === "\\" && (N = "");
119
+ else if (N = String($), d) {
120
+ const H = E - N.length;
121
+ if (H > 0) {
122
+ const X = new Array(H + 1).join("0");
123
+ $ < 0 ? N = "-" + X + N.slice(1) : N = X + N;
120
124
  }
121
125
  }
122
- u.push(y);
126
+ u.push(N);
123
127
  }
124
128
  } else {
125
129
  u = [];
126
130
  for (let g = 0; g < l.length; g++)
127
- u.push.apply(u, tt(l[g], t, !1));
131
+ u.push.apply(u, K(l[g], t, !1));
128
132
  }
129
133
  for (let g = 0; g < u.length; g++)
130
- for (let w = 0; w < c.length && s.length < t; w++) {
131
- const b = r + u[g] + c[w];
132
- (!e || a || b) && s.push(b);
134
+ for (let y = 0; y < c.length && s.length < t; y++) {
135
+ const E = r + u[g] + c[y];
136
+ (!e || h || E) && s.push(E);
133
137
  }
134
138
  }
135
139
  return s;
136
140
  }
137
- const ge = 1024 * 64, ot = (i) => {
141
+ const ye = 1024 * 64, it = (i) => {
138
142
  if (typeof i != "string")
139
143
  throw new TypeError("invalid pattern");
140
- if (i.length > ge)
144
+ if (i.length > ye)
141
145
  throw new TypeError("pattern is too long");
142
- }, de = {
146
+ }, we = {
143
147
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
144
148
  "[:alpha:]": ["\\p{L}\\p{Nl}", !0],
145
149
  "[:ascii:]": ["\\x00-\\x7f", !1],
@@ -154,78 +158,78 @@ const ge = 1024 * 64, ot = (i) => {
154
158
  "[:upper:]": ["\\p{Lu}", !0],
155
159
  "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
156
160
  "[:xdigit:]": ["A-Fa-f0-9", !1]
157
- }, Y = (i) => i.replace(/[[\]\\-]/g, "\\$&"), me = (i) => i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), bt = (i) => i.join(""), ye = (i, t) => {
161
+ }, Q = (i) => i.replace(/[[\]\\-]/g, "\\$&"), Se = (i) => i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), St = (i) => i.join(""), Ee = (i, t) => {
158
162
  const e = t;
159
163
  if (i.charAt(e) !== "[")
160
164
  throw new Error("not in a brace expression");
161
165
  const s = [], n = [];
162
- let r = e + 1, c = !1, f = !1, p = !1, a = !1, h = e, l = "";
166
+ let r = e + 1, c = !1, a = !1, p = !1, h = !1, f = e, l = "";
163
167
  t: for (; r < i.length; ) {
164
- const b = i.charAt(r);
165
- if ((b === "!" || b === "^") && r === e + 1) {
166
- a = !0, r++;
168
+ const E = i.charAt(r);
169
+ if ((E === "!" || E === "^") && r === e + 1) {
170
+ h = !0, r++;
167
171
  continue;
168
172
  }
169
- if (b === "]" && c && !p) {
170
- h = r + 1;
173
+ if (E === "]" && c && !p) {
174
+ f = r + 1;
171
175
  break;
172
176
  }
173
- if (c = !0, b === "\\" && !p) {
177
+ if (c = !0, E === "\\" && !p) {
174
178
  p = !0, r++;
175
179
  continue;
176
180
  }
177
- if (b === "[" && !p) {
178
- for (const [P, [T, N, S]] of Object.entries(de))
179
- if (i.startsWith(P, r)) {
181
+ if (E === "[" && !p) {
182
+ for (const [w, [b, A, d]] of Object.entries(we))
183
+ if (i.startsWith(w, r)) {
180
184
  if (l)
181
185
  return ["$.", !1, i.length - e, !0];
182
- r += P.length, S ? n.push(T) : s.push(T), f = f || N;
186
+ r += w.length, d ? n.push(b) : s.push(b), a = a || A;
183
187
  continue t;
184
188
  }
185
189
  }
186
190
  if (p = !1, l) {
187
- b > l ? s.push(Y(l) + "-" + Y(b)) : b === l && s.push(Y(b)), l = "", r++;
191
+ E > l ? s.push(Q(l) + "-" + Q(E)) : E === l && s.push(Q(E)), l = "", r++;
188
192
  continue;
189
193
  }
190
194
  if (i.startsWith("-]", r + 1)) {
191
- s.push(Y(b + "-")), r += 2;
195
+ s.push(Q(E + "-")), r += 2;
192
196
  continue;
193
197
  }
194
198
  if (i.startsWith("-", r + 1)) {
195
- l = b, r += 2;
199
+ l = E, r += 2;
196
200
  continue;
197
201
  }
198
- s.push(Y(b)), r++;
202
+ s.push(Q(E)), r++;
199
203
  }
200
- if (h < r)
204
+ if (f < r)
201
205
  return ["", !1, 0, !1];
202
206
  if (!s.length && !n.length)
203
207
  return ["$.", !1, i.length - e, !0];
204
- if (n.length === 0 && s.length === 1 && /^\\?.$/.test(s[0]) && !a) {
205
- const b = s[0].length === 2 ? s[0].slice(-1) : s[0];
206
- return [me(b), !1, h - e, !1];
208
+ if (n.length === 0 && s.length === 1 && /^\\?.$/.test(s[0]) && !h) {
209
+ const E = s[0].length === 2 ? s[0].slice(-1) : s[0];
210
+ return [Se(E), !1, f - e, !1];
207
211
  }
208
- const u = "[" + (a ? "^" : "") + bt(s) + "]", g = "[" + (a ? "" : "^") + bt(n) + "]";
209
- return [s.length && n.length ? "(" + u + "|" + g + ")" : s.length ? u : g, f, h - e, !0];
210
- }, et = (i, { windowsPathsNoEscape: t = !1, magicalBraces: e = !0 } = {}) => e ? t ? i.replace(/\[([^/\\])\]/g, "$1") : i.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1") : t ? i.replace(/\[([^/\\{}])\]/g, "$1") : i.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
211
- var D;
212
- const we = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), ut = (i) => we.has(i), xt = (i) => ut(i.type), Se = /* @__PURE__ */ new Map([
212
+ const u = "[" + (h ? "^" : "") + St(s) + "]", g = "[" + (h ? "" : "^") + St(n) + "]";
213
+ return [s.length && n.length ? "(" + u + "|" + g + ")" : s.length ? u : g, a, f - e, !0];
214
+ }, Y = (i, { windowsPathsNoEscape: t = !1, magicalBraces: e = !0 } = {}) => e ? t ? i.replace(/\[([^/\\])\]/g, "$1") : i.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1") : t ? i.replace(/\[([^/\\{}])\]/g, "$1") : i.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
215
+ var W;
216
+ const be = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), at = (i) => be.has(i), Et = (i) => at(i.type), xe = /* @__PURE__ */ new Map([
213
217
  ["!", ["@"]],
214
218
  ["?", ["?", "@"]],
215
219
  ["@", ["@"]],
216
220
  ["*", ["*", "+", "?", "@"]],
217
221
  ["+", ["+", "@"]]
218
- ]), Ee = /* @__PURE__ */ new Map([
222
+ ]), Me = /* @__PURE__ */ new Map([
219
223
  ["!", ["?"]],
220
224
  ["@", ["?"]],
221
225
  ["+", ["?", "*"]]
222
- ]), be = /* @__PURE__ */ new Map([
226
+ ]), Ne = /* @__PURE__ */ new Map([
223
227
  ["!", ["?", "@"]],
224
228
  ["?", ["?", "@"]],
225
229
  ["@", ["?", "@"]],
226
230
  ["*", ["*", "+", "?", "@"]],
227
231
  ["+", ["+", "@", "?", "*"]]
228
- ]), Mt = /* @__PURE__ */ new Map([
232
+ ]), bt = /* @__PURE__ */ new Map([
229
233
  ["!", /* @__PURE__ */ new Map([["!", "@"]])],
230
234
  [
231
235
  "?",
@@ -251,32 +255,32 @@ const we = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), ut = (i) => we.ha
251
255
  ["*", "*"]
252
256
  ])
253
257
  ]
254
- ]), xe = "(?!(?:^|/)\\.\\.?(?:$|/))", st = "(?!\\.)", Me = /* @__PURE__ */ new Set(["[", "."]), Ne = /* @__PURE__ */ new Set(["..", "."]), Ae = new Set("().*{}+?[]^$\\!"), $e = (i) => i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), wt = "[^/]", Nt = wt + "*?", At = wt + "+?";
255
- let Oe = 0;
256
- var O, R, F, d, A, B, H, I, z, G, Q, M, Dt, Z, nt, Lt, pt, it, kt, gt, _t, qt, zt, rt, dt, Gt;
257
- class ct {
258
+ ]), Ae = "(?!(?:^|/)\\.\\.?(?:$|/))", tt = "(?!\\.)", $e = /* @__PURE__ */ new Set(["[", "."]), Oe = /* @__PURE__ */ new Set(["..", "."]), Te = new Set("().*{}+?[]^$\\!"), ve = (i) => i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), mt = "[^/]", xt = mt + "*?", Mt = mt + "+?";
259
+ let Re = 0;
260
+ var v, P, z, m, O, G, U, F, _, q, V, M, Ct, I, et, Wt, ft, st, Dt, ut, Lt, kt, _t, nt, pt, qt;
261
+ class rt {
258
262
  constructor(t, e, s = {}) {
259
- v(this, M);
260
- $(this, "type");
261
- v(this, O);
262
- v(this, R);
263
- v(this, F, !1);
264
- v(this, d, []);
265
- v(this, A);
266
- v(this, B);
267
- v(this, H);
268
- v(this, I, !1);
269
- v(this, z);
270
- v(this, G);
263
+ R(this, M);
264
+ T(this, "type");
265
+ R(this, v);
266
+ R(this, P);
267
+ R(this, z, !1);
268
+ R(this, m, []);
269
+ R(this, O);
270
+ R(this, G);
271
+ R(this, U);
272
+ R(this, F, !1);
273
+ R(this, _);
274
+ R(this, q);
271
275
  // set to true if it's an extglob with no children
272
276
  // (which really means one child of '')
273
- v(this, Q, !1);
274
- $(this, "id", ++Oe);
275
- this.type = t, t && E(this, R, !0), E(this, A, e), E(this, O, o(this, A) ? o(o(this, A), O) : this), E(this, z, o(this, O) === this ? s : o(o(this, O), z)), E(this, H, o(this, O) === this ? [] : o(o(this, O), H)), t === "!" && !o(o(this, O), I) && o(this, H).push(this), E(this, B, o(this, A) ? o(o(this, A), d).length : 0);
277
+ R(this, V, !1);
278
+ T(this, "id", ++Re);
279
+ this.type = t, t && S(this, P, !0), S(this, O, e), S(this, v, o(this, O) ? o(o(this, O), v) : this), S(this, _, o(this, v) === this ? s : o(o(this, v), _)), S(this, U, o(this, v) === this ? [] : o(o(this, v), U)), t === "!" && !o(o(this, v), F) && o(this, U).push(this), S(this, G, o(this, O) ? o(o(this, O), m).length : 0);
276
280
  }
277
281
  get depth() {
278
282
  var t;
279
- return (((t = o(this, A)) == null ? void 0 : t.depth) ?? -1) + 1;
283
+ return (((t = o(this, O)) == null ? void 0 : t.depth) ?? -1) + 1;
280
284
  }
281
285
  [Symbol.for("nodejs.util.inspect.custom")]() {
282
286
  var t;
@@ -284,95 +288,95 @@ class ct {
284
288
  "@@type": "AST",
285
289
  id: this.id,
286
290
  type: this.type,
287
- root: o(this, O).id,
288
- parent: (t = o(this, A)) == null ? void 0 : t.id,
291
+ root: o(this, v).id,
292
+ parent: (t = o(this, O)) == null ? void 0 : t.id,
289
293
  depth: this.depth,
290
- partsLength: o(this, d).length,
291
- parts: o(this, d)
294
+ partsLength: o(this, m).length,
295
+ parts: o(this, m)
292
296
  };
293
297
  }
294
298
  get hasMagic() {
295
- if (o(this, R) !== void 0)
296
- return o(this, R);
297
- for (const t of o(this, d))
299
+ if (o(this, P) !== void 0)
300
+ return o(this, P);
301
+ for (const t of o(this, m))
298
302
  if (typeof t != "string" && (t.type || t.hasMagic))
299
- return E(this, R, !0);
300
- return o(this, R);
303
+ return S(this, P, !0);
304
+ return o(this, P);
301
305
  }
302
306
  // reconstructs the pattern
303
307
  toString() {
304
- return o(this, G) !== void 0 ? o(this, G) : this.type ? E(this, G, this.type + "(" + o(this, d).map((t) => String(t)).join("|") + ")") : E(this, G, o(this, d).map((t) => String(t)).join(""));
308
+ return o(this, q) !== void 0 ? o(this, q) : this.type ? S(this, q, this.type + "(" + o(this, m).map((t) => String(t)).join("|") + ")") : S(this, q, o(this, m).map((t) => String(t)).join(""));
305
309
  }
306
310
  push(...t) {
307
311
  for (const e of t)
308
312
  if (e !== "") {
309
- if (typeof e != "string" && !(e instanceof D && o(e, A) === this))
313
+ if (typeof e != "string" && !(e instanceof W && o(e, O) === this))
310
314
  throw new Error("invalid part: " + e);
311
- o(this, d).push(e);
315
+ o(this, m).push(e);
312
316
  }
313
317
  }
314
318
  toJSON() {
315
319
  var e;
316
- const t = this.type === null ? o(this, d).slice().map((s) => typeof s == "string" ? s : s.toJSON()) : [this.type, ...o(this, d).map((s) => s.toJSON())];
317
- return this.isStart() && !this.type && t.unshift([]), this.isEnd() && (this === o(this, O) || o(o(this, O), I) && ((e = o(this, A)) == null ? void 0 : e.type) === "!") && t.push({}), t;
320
+ const t = this.type === null ? o(this, m).slice().map((s) => typeof s == "string" ? s : s.toJSON()) : [this.type, ...o(this, m).map((s) => s.toJSON())];
321
+ return this.isStart() && !this.type && t.unshift([]), this.isEnd() && (this === o(this, v) || o(o(this, v), F) && ((e = o(this, O)) == null ? void 0 : e.type) === "!") && t.push({}), t;
318
322
  }
319
323
  isStart() {
320
324
  var e;
321
- if (o(this, O) === this)
325
+ if (o(this, v) === this)
322
326
  return !0;
323
- if (!((e = o(this, A)) != null && e.isStart()))
327
+ if (!((e = o(this, O)) != null && e.isStart()))
324
328
  return !1;
325
- if (o(this, B) === 0)
329
+ if (o(this, G) === 0)
326
330
  return !0;
327
- const t = o(this, A);
328
- for (let s = 0; s < o(this, B); s++) {
329
- const n = o(t, d)[s];
330
- if (!(n instanceof D && n.type === "!"))
331
+ const t = o(this, O);
332
+ for (let s = 0; s < o(this, G); s++) {
333
+ const n = o(t, m)[s];
334
+ if (!(n instanceof W && n.type === "!"))
331
335
  return !1;
332
336
  }
333
337
  return !0;
334
338
  }
335
339
  isEnd() {
336
340
  var e, s, n;
337
- if (o(this, O) === this || ((e = o(this, A)) == null ? void 0 : e.type) === "!")
341
+ if (o(this, v) === this || ((e = o(this, O)) == null ? void 0 : e.type) === "!")
338
342
  return !0;
339
- if (!((s = o(this, A)) != null && s.isEnd()))
343
+ if (!((s = o(this, O)) != null && s.isEnd()))
340
344
  return !1;
341
345
  if (!this.type)
342
- return (n = o(this, A)) == null ? void 0 : n.isEnd();
343
- const t = o(this, A) ? o(o(this, A), d).length : 0;
344
- return o(this, B) === t - 1;
346
+ return (n = o(this, O)) == null ? void 0 : n.isEnd();
347
+ const t = o(this, O) ? o(o(this, O), m).length : 0;
348
+ return o(this, G) === t - 1;
345
349
  }
346
350
  copyIn(t) {
347
351
  typeof t == "string" ? this.push(t) : this.push(t.clone(this));
348
352
  }
349
353
  clone(t) {
350
- const e = new D(this.type, t);
351
- for (const s of o(this, d))
354
+ const e = new W(this.type, t);
355
+ for (const s of o(this, m))
352
356
  e.copyIn(s);
353
357
  return e;
354
358
  }
355
359
  static fromGlob(t, e = {}) {
356
360
  var n;
357
- const s = new D(null, void 0, e);
358
- return x(n = D, Z, nt).call(n, t, s, 0, e, 0), s;
361
+ const s = new W(null, void 0, e);
362
+ return x(n = W, I, et).call(n, t, s, 0, e, 0), s;
359
363
  }
360
364
  // returns the regular expression if there's magic, or the unescaped
361
365
  // string if not.
362
366
  toMMPattern() {
363
- if (this !== o(this, O))
364
- return o(this, O).toMMPattern();
367
+ if (this !== o(this, v))
368
+ return o(this, v).toMMPattern();
365
369
  const t = this.toString(), [e, s, n, r] = this.toRegExpSource();
366
- if (!(n || o(this, R) || o(this, z).nocase && !o(this, z).nocaseMagicOnly && t.toUpperCase() !== t.toLowerCase()))
370
+ if (!(n || o(this, P) || o(this, _).nocase && !o(this, _).nocaseMagicOnly && t.toUpperCase() !== t.toLowerCase()))
367
371
  return s;
368
- const f = (o(this, z).nocase ? "i" : "") + (r ? "u" : "");
369
- return Object.assign(new RegExp(`^${e}$`, f), {
372
+ const a = (o(this, _).nocase ? "i" : "") + (r ? "u" : "");
373
+ return Object.assign(new RegExp(`^${e}$`, a), {
370
374
  _src: e,
371
375
  _glob: t
372
376
  });
373
377
  }
374
378
  get options() {
375
- return o(this, z);
379
+ return o(this, _);
376
380
  }
377
381
  // returns the string match, the regexp source, whether there's magic
378
382
  // in the regexp (so a regular expression is required) and whether or
@@ -445,328 +449,328 @@ class ct {
445
449
  // or start or whatever) and prepend ^ or / at the Regexp construction.
446
450
  toRegExpSource(t) {
447
451
  var p;
448
- const e = t ?? !!o(this, z).dot;
449
- if (o(this, O) === this && (x(this, M, rt).call(this), x(this, M, Dt).call(this)), !xt(this)) {
450
- const a = this.isStart() && this.isEnd() && !o(this, d).some((w) => typeof w != "string"), h = o(this, d).map((w) => {
451
- var S;
452
- const [b, P, T, N] = typeof w == "string" ? x(S = D, Z, Gt).call(S, w, o(this, R), a) : w.toRegExpSource(t);
453
- return E(this, R, o(this, R) || T), E(this, F, o(this, F) || N), b;
452
+ const e = t ?? !!o(this, _).dot;
453
+ if (o(this, v) === this && (x(this, M, nt).call(this), x(this, M, Ct).call(this)), !Et(this)) {
454
+ const h = this.isStart() && this.isEnd() && !o(this, m).some((y) => typeof y != "string"), f = o(this, m).map((y) => {
455
+ var d;
456
+ const [E, w, b, A] = typeof y == "string" ? x(d = W, I, qt).call(d, y, o(this, P), h) : y.toRegExpSource(t);
457
+ return S(this, P, o(this, P) || b), S(this, z, o(this, z) || A), E;
454
458
  }).join("");
455
459
  let l = "";
456
- if (this.isStart() && typeof o(this, d)[0] == "string" && !(o(this, d).length === 1 && Ne.has(o(this, d)[0]))) {
457
- const b = Me, P = (
460
+ if (this.isStart() && typeof o(this, m)[0] == "string" && !(o(this, m).length === 1 && Oe.has(o(this, m)[0]))) {
461
+ const E = $e, w = (
458
462
  // dots are allowed, and the pattern starts with [ or .
459
- e && b.has(h.charAt(0)) || // the pattern starts with \., and then [ or .
460
- h.startsWith("\\.") && b.has(h.charAt(2)) || // the pattern starts with \.\., and then [ or .
461
- h.startsWith("\\.\\.") && b.has(h.charAt(4))
462
- ), T = !e && !t && b.has(h.charAt(0));
463
- l = P ? xe : T ? st : "";
463
+ e && E.has(f.charAt(0)) || // the pattern starts with \., and then [ or .
464
+ f.startsWith("\\.") && E.has(f.charAt(2)) || // the pattern starts with \.\., and then [ or .
465
+ f.startsWith("\\.\\.") && E.has(f.charAt(4))
466
+ ), b = !e && !t && E.has(f.charAt(0));
467
+ l = w ? Ae : b ? tt : "";
464
468
  }
465
469
  let u = "";
466
- return this.isEnd() && o(o(this, O), I) && ((p = o(this, A)) == null ? void 0 : p.type) === "!" && (u = "(?:$|\\/)"), [
467
- l + h + u,
468
- et(h),
469
- E(this, R, !!o(this, R)),
470
- o(this, F)
470
+ return this.isEnd() && o(o(this, v), F) && ((p = o(this, O)) == null ? void 0 : p.type) === "!" && (u = "(?:$|\\/)"), [
471
+ l + f + u,
472
+ Y(f),
473
+ S(this, P, !!o(this, P)),
474
+ o(this, z)
471
475
  ];
472
476
  }
473
477
  const s = this.type === "*" || this.type === "+", n = this.type === "!" ? "(?:(?!(?:" : "(?:";
474
- let r = x(this, M, dt).call(this, e);
478
+ let r = x(this, M, pt).call(this, e);
475
479
  if (this.isStart() && this.isEnd() && !r && this.type !== "!") {
476
- const a = this.toString(), h = this;
477
- return E(h, d, [a]), h.type = null, E(h, R, void 0), [a, et(this.toString()), !1, !1];
480
+ const h = this.toString(), f = this;
481
+ return S(f, m, [h]), f.type = null, S(f, P, void 0), [h, Y(this.toString()), !1, !1];
478
482
  }
479
- let c = !s || t || e || !st ? "" : x(this, M, dt).call(this, !0);
483
+ let c = !s || t || e || !tt ? "" : x(this, M, pt).call(this, !0);
480
484
  c === r && (c = ""), c && (r = `(?:${r})(?:${c})*?`);
481
- let f = "";
482
- if (this.type === "!" && o(this, Q))
483
- f = (this.isStart() && !e ? st : "") + At;
485
+ let a = "";
486
+ if (this.type === "!" && o(this, V))
487
+ a = (this.isStart() && !e ? tt : "") + Mt;
484
488
  else {
485
- const a = this.type === "!" ? (
489
+ const h = this.type === "!" ? (
486
490
  // !() must match something,but !(x) can match ''
487
- "))" + (this.isStart() && !e && !t ? st : "") + Nt + ")"
491
+ "))" + (this.isStart() && !e && !t ? tt : "") + xt + ")"
488
492
  ) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && c ? ")" : this.type === "*" && c ? ")?" : `)${this.type}`;
489
- f = n + r + a;
493
+ a = n + r + h;
490
494
  }
491
495
  return [
492
- f,
493
- et(r),
494
- E(this, R, !!o(this, R)),
495
- o(this, F)
496
+ a,
497
+ Y(r),
498
+ S(this, P, !!o(this, P)),
499
+ o(this, z)
496
500
  ];
497
501
  }
498
502
  }
499
- O = new WeakMap(), R = new WeakMap(), F = new WeakMap(), d = new WeakMap(), A = new WeakMap(), B = new WeakMap(), H = new WeakMap(), I = new WeakMap(), z = new WeakMap(), G = new WeakMap(), Q = new WeakMap(), M = new WeakSet(), Dt = function() {
500
- if (this !== o(this, O))
503
+ v = new WeakMap(), P = new WeakMap(), z = new WeakMap(), m = new WeakMap(), O = new WeakMap(), G = new WeakMap(), U = new WeakMap(), F = new WeakMap(), _ = new WeakMap(), q = new WeakMap(), V = new WeakMap(), M = new WeakSet(), Ct = function() {
504
+ if (this !== o(this, v))
501
505
  throw new Error("should only call on root");
502
- if (o(this, I))
506
+ if (o(this, F))
503
507
  return this;
504
- this.toString(), E(this, I, !0);
508
+ this.toString(), S(this, F, !0);
505
509
  let t;
506
- for (; t = o(this, H).pop(); ) {
510
+ for (; t = o(this, U).pop(); ) {
507
511
  if (t.type !== "!")
508
512
  continue;
509
- let e = t, s = o(e, A);
513
+ let e = t, s = o(e, O);
510
514
  for (; s; ) {
511
- for (let n = o(e, B) + 1; !s.type && n < o(s, d).length; n++)
512
- for (const r of o(t, d)) {
515
+ for (let n = o(e, G) + 1; !s.type && n < o(s, m).length; n++)
516
+ for (const r of o(t, m)) {
513
517
  if (typeof r == "string")
514
518
  throw new Error("string part in extglob AST??");
515
- r.copyIn(o(s, d)[n]);
519
+ r.copyIn(o(s, m)[n]);
516
520
  }
517
- e = s, s = o(e, A);
521
+ e = s, s = o(e, O);
518
522
  }
519
523
  }
520
524
  return this;
521
- }, Z = new WeakSet(), nt = function(t, e, s, n, r) {
522
- var b, P, T, N;
525
+ }, I = new WeakSet(), et = function(t, e, s, n, r) {
526
+ var E, w, b, A;
523
527
  const c = n.maxExtglobRecursion ?? 2;
524
- let f = !1, p = !1, a = -1, h = !1;
528
+ let a = !1, p = !1, h = -1, f = !1;
525
529
  if (e.type === null) {
526
- let S = s, m = "";
527
- for (; S < t.length; ) {
528
- const y = t.charAt(S++);
529
- if (f || y === "\\") {
530
- f = !f, m += y;
530
+ let d = s, $ = "";
531
+ for (; d < t.length; ) {
532
+ const N = t.charAt(d++);
533
+ if (a || N === "\\") {
534
+ a = !a, $ += N;
531
535
  continue;
532
536
  }
533
537
  if (p) {
534
- S === a + 1 ? (y === "^" || y === "!") && (h = !0) : y === "]" && !(S === a + 2 && h) && (p = !1), m += y;
538
+ d === h + 1 ? (N === "^" || N === "!") && (f = !0) : N === "]" && !(d === h + 2 && f) && (p = !1), $ += N;
535
539
  continue;
536
- } else if (y === "[") {
537
- p = !0, a = S, h = !1, m += y;
540
+ } else if (N === "[") {
541
+ p = !0, h = d, f = !1, $ += N;
538
542
  continue;
539
543
  }
540
- if (!n.noext && ut(y) && t.charAt(S) === "(" && r <= c) {
541
- e.push(m), m = "";
542
- const C = new D(y, e);
543
- S = x(b = D, Z, nt).call(b, t, C, S, n, r + 1), e.push(C);
544
+ if (!n.noext && at(N) && t.charAt(d) === "(" && r <= c) {
545
+ e.push($), $ = "";
546
+ const X = new W(N, e);
547
+ d = x(E = W, I, et).call(E, t, X, d, n, r + 1), e.push(X);
544
548
  continue;
545
549
  }
546
- m += y;
550
+ $ += N;
547
551
  }
548
- return e.push(m), S;
552
+ return e.push($), d;
549
553
  }
550
- let l = s + 1, u = new D(null, e);
554
+ let l = s + 1, u = new W(null, e);
551
555
  const g = [];
552
- let w = "";
556
+ let y = "";
553
557
  for (; l < t.length; ) {
554
- const S = t.charAt(l++);
555
- if (f || S === "\\") {
556
- f = !f, w += S;
558
+ const d = t.charAt(l++);
559
+ if (a || d === "\\") {
560
+ a = !a, y += d;
557
561
  continue;
558
562
  }
559
563
  if (p) {
560
- l === a + 1 ? (S === "^" || S === "!") && (h = !0) : S === "]" && !(l === a + 2 && h) && (p = !1), w += S;
564
+ l === h + 1 ? (d === "^" || d === "!") && (f = !0) : d === "]" && !(l === h + 2 && f) && (p = !1), y += d;
561
565
  continue;
562
- } else if (S === "[") {
563
- p = !0, a = l, h = !1, w += S;
566
+ } else if (d === "[") {
567
+ p = !0, h = l, f = !1, y += d;
564
568
  continue;
565
569
  }
566
- if (!n.noext && ut(S) && t.charAt(l) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
567
- (r <= c || e && x(P = e, M, it).call(P, S))) {
568
- const y = e && x(T = e, M, it).call(T, S) ? 0 : 1;
569
- u.push(w), w = "";
570
- const k = new D(S, u);
571
- u.push(k), l = x(N = D, Z, nt).call(N, t, k, l, n, r + y);
570
+ if (!n.noext && at(d) && t.charAt(l) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
571
+ (r <= c || e && x(w = e, M, st).call(w, d))) {
572
+ const N = e && x(b = e, M, st).call(b, d) ? 0 : 1;
573
+ u.push(y), y = "";
574
+ const H = new W(d, u);
575
+ u.push(H), l = x(A = W, I, et).call(A, t, H, l, n, r + N);
572
576
  continue;
573
577
  }
574
- if (S === "|") {
575
- u.push(w), w = "", g.push(u), u = new D(null, e);
578
+ if (d === "|") {
579
+ u.push(y), y = "", g.push(u), u = new W(null, e);
576
580
  continue;
577
581
  }
578
- if (S === ")")
579
- return w === "" && o(e, d).length === 0 && E(e, Q, !0), u.push(w), w = "", e.push(...g, u), l;
580
- w += S;
582
+ if (d === ")")
583
+ return y === "" && o(e, m).length === 0 && S(e, V, !0), u.push(y), y = "", e.push(...g, u), l;
584
+ y += d;
581
585
  }
582
- return e.type = null, E(e, R, void 0), E(e, d, [t.substring(s - 1)]), l;
583
- }, Lt = function(t) {
584
- return x(this, M, pt).call(this, t, Ee);
585
- }, pt = function(t, e = Se) {
586
- if (!t || typeof t != "object" || t.type !== null || o(t, d).length !== 1 || this.type === null)
586
+ return e.type = null, S(e, P, void 0), S(e, m, [t.substring(s - 1)]), l;
587
+ }, Wt = function(t) {
588
+ return x(this, M, ft).call(this, t, Me);
589
+ }, ft = function(t, e = xe) {
590
+ if (!t || typeof t != "object" || t.type !== null || o(t, m).length !== 1 || this.type === null)
587
591
  return !1;
588
- const s = o(t, d)[0];
589
- return !s || typeof s != "object" || s.type === null ? !1 : x(this, M, it).call(this, s.type, e);
590
- }, it = function(t, e = be) {
592
+ const s = o(t, m)[0];
593
+ return !s || typeof s != "object" || s.type === null ? !1 : x(this, M, st).call(this, s.type, e);
594
+ }, st = function(t, e = Ne) {
591
595
  var s;
592
596
  return !!((s = e.get(this.type)) != null && s.includes(t));
593
- }, kt = function(t, e) {
594
- const s = o(t, d)[0], n = new D(null, s, this.options);
595
- o(n, d).push(""), s.push(n), x(this, M, gt).call(this, t, e);
596
- }, gt = function(t, e) {
597
- const s = o(t, d)[0];
598
- o(this, d).splice(e, 1, ...o(s, d));
599
- for (const n of o(s, d))
600
- typeof n == "object" && E(n, A, this);
601
- E(this, G, void 0);
602
- }, _t = function(t) {
603
- const e = Mt.get(this.type);
597
+ }, Dt = function(t, e) {
598
+ const s = o(t, m)[0], n = new W(null, s, this.options);
599
+ o(n, m).push(""), s.push(n), x(this, M, ut).call(this, t, e);
600
+ }, ut = function(t, e) {
601
+ const s = o(t, m)[0];
602
+ o(this, m).splice(e, 1, ...o(s, m));
603
+ for (const n of o(s, m))
604
+ typeof n == "object" && S(n, O, this);
605
+ S(this, q, void 0);
606
+ }, Lt = function(t) {
607
+ const e = bt.get(this.type);
604
608
  return !!(e != null && e.has(t));
605
- }, qt = function(t) {
606
- if (!t || typeof t != "object" || t.type !== null || o(t, d).length !== 1 || this.type === null || o(this, d).length !== 1)
609
+ }, kt = function(t) {
610
+ if (!t || typeof t != "object" || t.type !== null || o(t, m).length !== 1 || this.type === null || o(this, m).length !== 1)
607
611
  return !1;
608
- const e = o(t, d)[0];
609
- return !e || typeof e != "object" || e.type === null ? !1 : x(this, M, _t).call(this, e.type);
610
- }, zt = function(t) {
611
- const e = Mt.get(this.type), s = o(t, d)[0], n = e == null ? void 0 : e.get(s.type);
612
+ const e = o(t, m)[0];
613
+ return !e || typeof e != "object" || e.type === null ? !1 : x(this, M, Lt).call(this, e.type);
614
+ }, _t = function(t) {
615
+ const e = bt.get(this.type), s = o(t, m)[0], n = e == null ? void 0 : e.get(s.type);
612
616
  if (!n)
613
617
  return !1;
614
- E(this, d, o(s, d));
615
- for (const r of o(this, d))
616
- typeof r == "object" && E(r, A, this);
617
- this.type = n, E(this, G, void 0), E(this, Q, !1);
618
- }, rt = function() {
618
+ S(this, m, o(s, m));
619
+ for (const r of o(this, m))
620
+ typeof r == "object" && S(r, O, this);
621
+ this.type = n, S(this, q, void 0), S(this, V, !1);
622
+ }, nt = function() {
619
623
  var t, e;
620
- if (xt(this)) {
624
+ if (Et(this)) {
621
625
  let s = 0, n = !1;
622
626
  do {
623
627
  n = !0;
624
- for (let r = 0; r < o(this, d).length; r++) {
625
- const c = o(this, d)[r];
626
- typeof c == "object" && (x(e = c, M, rt).call(e), x(this, M, pt).call(this, c) ? (n = !1, x(this, M, gt).call(this, c, r)) : x(this, M, Lt).call(this, c) ? (n = !1, x(this, M, kt).call(this, c, r)) : x(this, M, qt).call(this, c) && (n = !1, x(this, M, zt).call(this, c)));
628
+ for (let r = 0; r < o(this, m).length; r++) {
629
+ const c = o(this, m)[r];
630
+ typeof c == "object" && (x(e = c, M, nt).call(e), x(this, M, ft).call(this, c) ? (n = !1, x(this, M, ut).call(this, c, r)) : x(this, M, Wt).call(this, c) ? (n = !1, x(this, M, Dt).call(this, c, r)) : x(this, M, kt).call(this, c) && (n = !1, x(this, M, _t).call(this, c)));
627
631
  }
628
632
  } while (!n && ++s < 10);
629
633
  } else
630
- for (const s of o(this, d))
631
- typeof s == "object" && x(t = s, M, rt).call(t);
632
- E(this, G, void 0);
633
- }, dt = function(t) {
634
- return o(this, d).map((e) => {
634
+ for (const s of o(this, m))
635
+ typeof s == "object" && x(t = s, M, nt).call(t);
636
+ S(this, q, void 0);
637
+ }, pt = function(t) {
638
+ return o(this, m).map((e) => {
635
639
  if (typeof e == "string")
636
640
  throw new Error("string type in extglob ast??");
637
641
  const [s, n, r, c] = e.toRegExpSource(t);
638
- return E(this, F, o(this, F) || c), s;
642
+ return S(this, z, o(this, z) || c), s;
639
643
  }).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join("|");
640
- }, Gt = function(t, e, s = !1) {
641
- let n = !1, r = "", c = !1, f = !1;
644
+ }, qt = function(t, e, s = !1) {
645
+ let n = !1, r = "", c = !1, a = !1;
642
646
  for (let p = 0; p < t.length; p++) {
643
- const a = t.charAt(p);
647
+ const h = t.charAt(p);
644
648
  if (n) {
645
- n = !1, r += (Ae.has(a) ? "\\" : "") + a;
649
+ n = !1, r += (Te.has(h) ? "\\" : "") + h;
646
650
  continue;
647
651
  }
648
- if (a === "*") {
649
- if (f)
652
+ if (h === "*") {
653
+ if (a)
650
654
  continue;
651
- f = !0, r += s && /^[*]+$/.test(t) ? At : Nt, e = !0;
655
+ a = !0, r += s && /^[*]+$/.test(t) ? Mt : xt, e = !0;
652
656
  continue;
653
657
  } else
654
- f = !1;
655
- if (a === "\\") {
658
+ a = !1;
659
+ if (h === "\\") {
656
660
  p === t.length - 1 ? r += "\\\\" : n = !0;
657
661
  continue;
658
662
  }
659
- if (a === "[") {
660
- const [h, l, u, g] = ye(t, p);
663
+ if (h === "[") {
664
+ const [f, l, u, g] = Ee(t, p);
661
665
  if (u) {
662
- r += h, c = c || l, p += u - 1, e = e || g;
666
+ r += f, c = c || l, p += u - 1, e = e || g;
663
667
  continue;
664
668
  }
665
669
  }
666
- if (a === "?") {
667
- r += wt, e = !0;
670
+ if (h === "?") {
671
+ r += mt, e = !0;
668
672
  continue;
669
673
  }
670
- r += $e(a);
674
+ r += ve(h);
671
675
  }
672
- return [r, et(t), !!e, c];
673
- }, v(ct, Z);
674
- D = ct;
675
- const Te = (i, { windowsPathsNoEscape: t = !1, magicalBraces: e = !1 } = {}) => e ? t ? i.replace(/[?*()[\]{}]/g, "[$&]") : i.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? i.replace(/[?*()[\]]/g, "[$&]") : i.replace(/[?*()[\]\\]/g, "\\$&"), j = (i, t, e = {}) => (ot(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new lt(t, e).match(i)), ve = /^\*+([^+@!?*[(]*)$/, Re = (i) => (t) => !t.startsWith(".") && t.endsWith(i), je = (i) => (t) => t.endsWith(i), Pe = (i) => (i = i.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(i)), Ce = (i) => (i = i.toLowerCase(), (t) => t.toLowerCase().endsWith(i)), We = /^\*+\.\*+$/, De = (i) => !i.startsWith(".") && i.includes("."), Le = (i) => i !== "." && i !== ".." && i.includes("."), ke = /^\.\*+$/, _e = (i) => i !== "." && i !== ".." && i.startsWith("."), qe = /^\*+$/, ze = (i) => i.length !== 0 && !i.startsWith("."), Ge = (i) => i.length !== 0 && i !== "." && i !== "..", Fe = /^\?+([^+@!?*[(]*)?$/, Be = ([i, t = ""]) => {
676
- const e = Ft([i]);
676
+ return [r, Y(t), !!e, c];
677
+ }, R(rt, I);
678
+ W = rt;
679
+ const Pe = (i, { windowsPathsNoEscape: t = !1, magicalBraces: e = !1 } = {}) => e ? t ? i.replace(/[?*()[\]{}]/g, "[$&]") : i.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? i.replace(/[?*()[\]]/g, "[$&]") : i.replace(/[?*()[\]\\]/g, "\\$&"), j = (i, t, e = {}) => (it(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new ot(t, e).match(i)), je = /^\*+([^+@!?*[(]*)$/, Ce = (i) => (t) => !t.startsWith(".") && t.endsWith(i), We = (i) => (t) => t.endsWith(i), De = (i) => (i = i.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(i)), Le = (i) => (i = i.toLowerCase(), (t) => t.toLowerCase().endsWith(i)), ke = /^\*+\.\*+$/, _e = (i) => !i.startsWith(".") && i.includes("."), qe = (i) => i !== "." && i !== ".." && i.includes("."), ze = /^\.\*+$/, Ge = (i) => i !== "." && i !== ".." && i.startsWith("."), Fe = /^\*+$/, Be = (i) => i.length !== 0 && !i.startsWith("."), Ie = (i) => i.length !== 0 && i !== "." && i !== "..", Ue = /^\?+([^+@!?*[(]*)?$/, Ze = ([i, t = ""]) => {
680
+ const e = zt([i]);
677
681
  return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
678
- }, Ie = ([i, t = ""]) => {
679
- const e = Bt([i]);
682
+ }, He = ([i, t = ""]) => {
683
+ const e = Gt([i]);
680
684
  return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
681
- }, Ue = ([i, t = ""]) => {
682
- const e = Bt([i]);
685
+ }, Je = ([i, t = ""]) => {
686
+ const e = Gt([i]);
683
687
  return t ? (s) => e(s) && s.endsWith(t) : e;
684
- }, Ze = ([i, t = ""]) => {
685
- const e = Ft([i]);
688
+ }, Ve = ([i, t = ""]) => {
689
+ const e = zt([i]);
686
690
  return t ? (s) => e(s) && s.endsWith(t) : e;
687
- }, Ft = ([i]) => {
691
+ }, zt = ([i]) => {
688
692
  const t = i.length;
689
693
  return (e) => e.length === t && !e.startsWith(".");
690
- }, Bt = ([i]) => {
694
+ }, Gt = ([i]) => {
691
695
  const t = i.length;
692
696
  return (e) => e.length === t && e !== "." && e !== "..";
693
- }, It = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", $t = {
697
+ }, Ft = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", Nt = {
694
698
  win32: { sep: "\\" },
695
699
  posix: { sep: "/" }
696
- }, He = It === "win32" ? $t.win32.sep : $t.posix.sep;
697
- j.sep = He;
698
- const W = Symbol("globstar **");
699
- j.GLOBSTAR = W;
700
- const Je = "[^/]", Ve = Je + "*?", Xe = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", Qe = "(?:(?!(?:\\/|^)\\.).)*?", Ke = (i, t = {}) => (e) => j(e, i, t);
701
- j.filter = Ke;
702
- const q = (i, t = {}) => Object.assign({}, i, t), Ye = (i) => {
700
+ }, Xe = Ft === "win32" ? Nt.win32.sep : Nt.posix.sep;
701
+ j.sep = Xe;
702
+ const C = Symbol("globstar **");
703
+ j.GLOBSTAR = C;
704
+ const Qe = "[^/]", Ke = Qe + "*?", Ye = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", ts = "(?:(?!(?:\\/|^)\\.).)*?", es = (i, t = {}) => (e) => j(e, i, t);
705
+ j.filter = es;
706
+ const k = (i, t = {}) => Object.assign({}, i, t), ss = (i) => {
703
707
  if (!i || typeof i != "object" || !Object.keys(i).length)
704
708
  return j;
705
709
  const t = j;
706
- return Object.assign((s, n, r = {}) => t(s, n, q(i, r)), {
710
+ return Object.assign((s, n, r = {}) => t(s, n, k(i, r)), {
707
711
  Minimatch: class extends t.Minimatch {
708
712
  constructor(n, r = {}) {
709
- super(n, q(i, r));
713
+ super(n, k(i, r));
710
714
  }
711
715
  static defaults(n) {
712
- return t.defaults(q(i, n)).Minimatch;
716
+ return t.defaults(k(i, n)).Minimatch;
713
717
  }
714
718
  },
715
719
  AST: class extends t.AST {
716
720
  /* c8 ignore start */
717
721
  constructor(n, r, c = {}) {
718
- super(n, r, q(i, c));
722
+ super(n, r, k(i, c));
719
723
  }
720
724
  /* c8 ignore stop */
721
725
  static fromGlob(n, r = {}) {
722
- return t.AST.fromGlob(n, q(i, r));
726
+ return t.AST.fromGlob(n, k(i, r));
723
727
  }
724
728
  },
725
- unescape: (s, n = {}) => t.unescape(s, q(i, n)),
726
- escape: (s, n = {}) => t.escape(s, q(i, n)),
727
- filter: (s, n = {}) => t.filter(s, q(i, n)),
728
- defaults: (s) => t.defaults(q(i, s)),
729
- makeRe: (s, n = {}) => t.makeRe(s, q(i, n)),
730
- braceExpand: (s, n = {}) => t.braceExpand(s, q(i, n)),
731
- match: (s, n, r = {}) => t.match(s, n, q(i, r)),
729
+ unescape: (s, n = {}) => t.unescape(s, k(i, n)),
730
+ escape: (s, n = {}) => t.escape(s, k(i, n)),
731
+ filter: (s, n = {}) => t.filter(s, k(i, n)),
732
+ defaults: (s) => t.defaults(k(i, s)),
733
+ makeRe: (s, n = {}) => t.makeRe(s, k(i, n)),
734
+ braceExpand: (s, n = {}) => t.braceExpand(s, k(i, n)),
735
+ match: (s, n, r = {}) => t.match(s, n, k(i, r)),
732
736
  sep: t.sep,
733
- GLOBSTAR: W
737
+ GLOBSTAR: C
734
738
  });
735
739
  };
736
- j.defaults = Ye;
737
- const Ut = (i, t = {}) => (ot(i), t.nobrace || !/\{(?:(?!\{).)*\}/.test(i) ? [i] : ae(i, { max: t.braceExpandMax }));
738
- j.braceExpand = Ut;
739
- const ts = (i, t = {}) => new lt(i, t).makeRe();
740
- j.makeRe = ts;
741
- const es = (i, t, e = {}) => {
742
- const s = new lt(t, e);
740
+ j.defaults = ss;
741
+ const Bt = (i, t = {}) => (it(i), t.nobrace || !/\{(?:(?!\{).)*\}/.test(i) ? [i] : ue(i, { max: t.braceExpandMax }));
742
+ j.braceExpand = Bt;
743
+ const ns = (i, t = {}) => new ot(i, t).makeRe();
744
+ j.makeRe = ns;
745
+ const is = (i, t, e = {}) => {
746
+ const s = new ot(t, e);
743
747
  return i = i.filter((n) => s.match(n)), s.options.nonull && !i.length && i.push(t), i;
744
748
  };
745
- j.match = es;
746
- const Ot = /[?*]|[+@!]\(.*?\)|\[|\]/, ss = (i) => i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
747
- var _, Zt, mt, X;
748
- class lt {
749
+ j.match = is;
750
+ const At = /[?*]|[+@!]\(.*?\)|\[|\]/, rs = (i) => i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
751
+ var L, It, gt, J;
752
+ class ot {
749
753
  constructor(t, e = {}) {
750
- v(this, _);
751
- $(this, "options");
752
- $(this, "set");
753
- $(this, "pattern");
754
- $(this, "windowsPathsNoEscape");
755
- $(this, "nonegate");
756
- $(this, "negate");
757
- $(this, "comment");
758
- $(this, "empty");
759
- $(this, "preserveMultipleSlashes");
760
- $(this, "partial");
761
- $(this, "globSet");
762
- $(this, "globParts");
763
- $(this, "nocase");
764
- $(this, "isWindows");
765
- $(this, "platform");
766
- $(this, "windowsNoMagicRoot");
767
- $(this, "maxGlobstarRecursion");
768
- $(this, "regexp");
769
- ot(t), e = e || {}, this.options = e, this.maxGlobstarRecursion = e.maxGlobstarRecursion ?? 200, this.pattern = t, this.platform = e.platform || It, this.isWindows = this.platform === "win32";
754
+ R(this, L);
755
+ T(this, "options");
756
+ T(this, "set");
757
+ T(this, "pattern");
758
+ T(this, "windowsPathsNoEscape");
759
+ T(this, "nonegate");
760
+ T(this, "negate");
761
+ T(this, "comment");
762
+ T(this, "empty");
763
+ T(this, "preserveMultipleSlashes");
764
+ T(this, "partial");
765
+ T(this, "globSet");
766
+ T(this, "globParts");
767
+ T(this, "nocase");
768
+ T(this, "isWindows");
769
+ T(this, "platform");
770
+ T(this, "windowsNoMagicRoot");
771
+ T(this, "maxGlobstarRecursion");
772
+ T(this, "regexp");
773
+ it(t), e = e || {}, this.options = e, this.maxGlobstarRecursion = e.maxGlobstarRecursion ?? 200, this.pattern = t, this.platform = e.platform || Ft, this.isWindows = this.platform === "win32";
770
774
  const s = "allowWindowsEscape";
771
775
  this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e[s] === !1, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!e.preserveMultipleSlashes, this.regexp = null, this.negate = !1, this.nonegate = !!e.nonegate, this.comment = !1, this.empty = !1, this.partial = !!e.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = e.windowsNoMagicRoot !== void 0 ? e.windowsNoMagicRoot : !!(this.isWindows && this.nocase), this.globSet = [], this.globParts = [], this.set = [], this.make();
772
776
  }
@@ -794,16 +798,16 @@ class lt {
794
798
  this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], e.debug && (this.debug = (...r) => console.error(...r)), this.debug(this.pattern, this.globSet);
795
799
  const s = this.globSet.map((r) => this.slashSplit(r));
796
800
  this.globParts = this.preprocess(s), this.debug(this.pattern, this.globParts);
797
- let n = this.globParts.map((r, c, f) => {
801
+ let n = this.globParts.map((r, c, a) => {
798
802
  if (this.isWindows && this.windowsNoMagicRoot) {
799
- const p = r[0] === "" && r[1] === "" && (r[2] === "?" || !Ot.test(r[2])) && !Ot.test(r[3]), a = /^[a-z]:/i.test(r[0]);
803
+ const p = r[0] === "" && r[1] === "" && (r[2] === "?" || !At.test(r[2])) && !At.test(r[3]), h = /^[a-z]:/i.test(r[0]);
800
804
  if (p)
801
805
  return [
802
806
  ...r.slice(0, 4),
803
- ...r.slice(4).map((h) => this.parse(h))
807
+ ...r.slice(4).map((f) => this.parse(f))
804
808
  ];
805
- if (a)
806
- return [r[0], ...r.slice(1).map((h) => this.parse(h))];
809
+ if (h)
810
+ return [r[0], ...r.slice(1).map((f) => this.parse(f))];
807
811
  }
808
812
  return r.map((p) => this.parse(p));
809
813
  });
@@ -895,18 +899,18 @@ class lt {
895
899
  for (; s[c + 1] === "**"; )
896
900
  c++;
897
901
  c > n && s.splice(n + 1, c - n);
898
- let f = s[n + 1];
899
- const p = s[n + 2], a = s[n + 3];
900
- if (f !== ".." || !p || p === "." || p === ".." || !a || a === "." || a === "..")
902
+ let a = s[n + 1];
903
+ const p = s[n + 2], h = s[n + 3];
904
+ if (a !== ".." || !p || p === "." || p === ".." || !h || h === "." || h === "..")
901
905
  continue;
902
906
  e = !0, s.splice(n, 1);
903
- const h = s.slice(0);
904
- h[n] = "**", t.push(h), n--;
907
+ const f = s.slice(0);
908
+ f[n] = "**", t.push(f), n--;
905
909
  }
906
910
  if (!this.preserveMultipleSlashes) {
907
911
  for (let c = 1; c < s.length - 1; c++) {
908
- const f = s[c];
909
- c === 1 && f === "" && s[0] === "" || (f === "." || f === "") && (e = !0, s.splice(c, 1), c--);
912
+ const a = s[c];
913
+ c === 1 && a === "" && s[0] === "" || (a === "." || a === "") && (e = !0, s.splice(c, 1), c--);
910
914
  }
911
915
  s[0] === "." && s.length === 2 && (s[1] === "." || s[1] === "") && (e = !0, s.pop());
912
916
  }
@@ -942,22 +946,22 @@ class lt {
942
946
  return t.filter((e) => e.length);
943
947
  }
944
948
  partsMatch(t, e, s = !1) {
945
- let n = 0, r = 0, c = [], f = "";
949
+ let n = 0, r = 0, c = [], a = "";
946
950
  for (; n < t.length && r < e.length; )
947
951
  if (t[n] === e[r])
948
- c.push(f === "b" ? e[r] : t[n]), n++, r++;
952
+ c.push(a === "b" ? e[r] : t[n]), n++, r++;
949
953
  else if (s && t[n] === "**" && e[r] === t[n + 1])
950
954
  c.push(t[n]), n++;
951
955
  else if (s && e[r] === "**" && t[n] === e[r + 1])
952
956
  c.push(e[r]), r++;
953
957
  else if (t[n] === "*" && e[r] && (this.options.dot || !e[r].startsWith(".")) && e[r] !== "**") {
954
- if (f === "b")
958
+ if (a === "b")
955
959
  return !1;
956
- f = "a", c.push(t[n]), n++, r++;
960
+ a = "a", c.push(t[n]), n++, r++;
957
961
  } else if (e[r] === "*" && t[n] && (this.options.dot || !t[n].startsWith(".")) && t[n] !== "**") {
958
- if (f === "a")
962
+ if (a === "a")
959
963
  return !1;
960
- f = "b", c.push(e[r]), n++, r++;
964
+ a = "b", c.push(e[r]), n++, r++;
961
965
  } else
962
966
  return !1;
963
967
  return t.length === e.length && c;
@@ -979,31 +983,31 @@ class lt {
979
983
  matchOne(t, e, s = !1) {
980
984
  let n = 0, r = 0;
981
985
  if (this.isWindows) {
982
- const f = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), p = !f && t[0] === "" && t[1] === "" && t[2] === "?" && /^[a-z]:$/i.test(t[3]), a = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), h = !a && e[0] === "" && e[1] === "" && e[2] === "?" && typeof e[3] == "string" && /^[a-z]:$/i.test(e[3]), l = p ? 3 : f ? 0 : void 0, u = h ? 3 : a ? 0 : void 0;
986
+ const a = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), p = !a && t[0] === "" && t[1] === "" && t[2] === "?" && /^[a-z]:$/i.test(t[3]), h = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), f = !h && e[0] === "" && e[1] === "" && e[2] === "?" && typeof e[3] == "string" && /^[a-z]:$/i.test(e[3]), l = p ? 3 : a ? 0 : void 0, u = f ? 3 : h ? 0 : void 0;
983
987
  if (typeof l == "number" && typeof u == "number") {
984
- const [g, w] = [
988
+ const [g, y] = [
985
989
  t[l],
986
990
  e[u]
987
991
  ];
988
- g.toLowerCase() === w.toLowerCase() && (e[u] = g, r = u, n = l);
992
+ g.toLowerCase() === y.toLowerCase() && (e[u] = g, r = u, n = l);
989
993
  }
990
994
  }
991
995
  const { optimizationLevel: c = 1 } = this.options;
992
- return c >= 2 && (t = this.levelTwoFileOptimize(t)), e.includes(W) ? x(this, _, Zt).call(this, t, e, s, n, r) : x(this, _, X).call(this, t, e, s, n, r);
996
+ return c >= 2 && (t = this.levelTwoFileOptimize(t)), e.includes(C) ? x(this, L, It).call(this, t, e, s, n, r) : x(this, L, J).call(this, t, e, s, n, r);
993
997
  }
994
998
  braceExpand() {
995
- return Ut(this.pattern, this.options);
999
+ return Bt(this.pattern, this.options);
996
1000
  }
997
1001
  parse(t) {
998
- ot(t);
1002
+ it(t);
999
1003
  const e = this.options;
1000
1004
  if (t === "**")
1001
- return W;
1005
+ return C;
1002
1006
  if (t === "")
1003
1007
  return "";
1004
1008
  let s, n = null;
1005
- (s = t.match(qe)) ? n = e.dot ? Ge : ze : (s = t.match(ve)) ? n = (e.nocase ? e.dot ? Ce : Pe : e.dot ? je : Re)(s[1]) : (s = t.match(Fe)) ? n = (e.nocase ? e.dot ? Ie : Be : e.dot ? Ue : Ze)(s) : (s = t.match(We)) ? n = e.dot ? Le : De : (s = t.match(ke)) && (n = _e);
1006
- const r = ct.fromGlob(t, this.options).toMMPattern();
1009
+ (s = t.match(Fe)) ? n = e.dot ? Ie : Be : (s = t.match(je)) ? n = (e.nocase ? e.dot ? Le : De : e.dot ? We : Ce)(s[1]) : (s = t.match(Ue)) ? n = (e.nocase ? e.dot ? He : Ze : e.dot ? Je : Ve)(s) : (s = t.match(ke)) ? n = e.dot ? qe : _e : (s = t.match(ze)) && (n = Ge);
1010
+ const r = rt.fromGlob(t, this.options).toMMPattern();
1007
1011
  return n && typeof r == "object" && Reflect.defineProperty(r, "test", { value: n }), r;
1008
1012
  }
1009
1013
  makeRe() {
@@ -1012,29 +1016,29 @@ class lt {
1012
1016
  const t = this.set;
1013
1017
  if (!t.length)
1014
1018
  return this.regexp = !1, this.regexp;
1015
- const e = this.options, s = e.noglobstar ? Ve : e.dot ? Xe : Qe, n = new Set(e.nocase ? ["i"] : []);
1019
+ const e = this.options, s = e.noglobstar ? Ke : e.dot ? Ye : ts, n = new Set(e.nocase ? ["i"] : []);
1016
1020
  let r = t.map((p) => {
1017
- const a = p.map((l) => {
1021
+ const h = p.map((l) => {
1018
1022
  if (l instanceof RegExp)
1019
1023
  for (const u of l.flags.split(""))
1020
1024
  n.add(u);
1021
- return typeof l == "string" ? ss(l) : l === W ? W : l._src;
1025
+ return typeof l == "string" ? rs(l) : l === C ? C : l._src;
1022
1026
  });
1023
- a.forEach((l, u) => {
1024
- const g = a[u + 1], w = a[u - 1];
1025
- l !== W || w === W || (w === void 0 ? g !== void 0 && g !== W ? a[u + 1] = "(?:\\/|" + s + "\\/)?" + g : a[u] = s : g === void 0 ? a[u - 1] = w + "(?:\\/|\\/" + s + ")?" : g !== W && (a[u - 1] = w + "(?:\\/|\\/" + s + "\\/)" + g, a[u + 1] = W));
1027
+ h.forEach((l, u) => {
1028
+ const g = h[u + 1], y = h[u - 1];
1029
+ l !== C || y === C || (y === void 0 ? g !== void 0 && g !== C ? h[u + 1] = "(?:\\/|" + s + "\\/)?" + g : h[u] = s : g === void 0 ? h[u - 1] = y + "(?:\\/|\\/" + s + ")?" : g !== C && (h[u - 1] = y + "(?:\\/|\\/" + s + "\\/)" + g, h[u + 1] = C));
1026
1030
  });
1027
- const h = a.filter((l) => l !== W);
1028
- if (this.partial && h.length >= 1) {
1031
+ const f = h.filter((l) => l !== C);
1032
+ if (this.partial && f.length >= 1) {
1029
1033
  const l = [];
1030
- for (let u = 1; u <= h.length; u++)
1031
- l.push(h.slice(0, u).join("/"));
1034
+ for (let u = 1; u <= f.length; u++)
1035
+ l.push(f.slice(0, u).join("/"));
1032
1036
  return "(?:" + l.join("|") + ")";
1033
1037
  }
1034
- return h.join("/");
1038
+ return f.join("/");
1035
1039
  }).join("|");
1036
- const [c, f] = t.length > 1 ? ["(?:", ")"] : ["", ""];
1037
- r = "^" + c + r + f + "$", this.partial && (r = "^(?:\\/|" + c + r.slice(1, -1) + f + ")$"), this.negate && (r = "^(?!" + r + ").+$");
1040
+ const [c, a] = t.length > 1 ? ["(?:", ")"] : ["", ""];
1041
+ r = "^" + c + r + a + "$", this.partial && (r = "^(?:\\/|" + c + r.slice(1, -1) + a + ")$"), this.negate && (r = "^(?!" + r + ").+$");
1038
1042
  try {
1039
1043
  this.regexp = new RegExp(r, [...n].join(""));
1040
1044
  } catch {
@@ -1060,11 +1064,11 @@ class lt {
1060
1064
  this.debug(this.pattern, "set", r);
1061
1065
  let c = n[n.length - 1];
1062
1066
  if (!c)
1063
- for (let f = n.length - 2; !c && f >= 0; f--)
1064
- c = n[f];
1065
- for (const f of r) {
1067
+ for (let a = n.length - 2; !c && a >= 0; a--)
1068
+ c = n[a];
1069
+ for (const a of r) {
1066
1070
  let p = n;
1067
- if (s.matchBase && f.length === 1 && (p = [c]), this.matchOne(p, f, e))
1071
+ if (s.matchBase && a.length === 1 && (p = [c]), this.matchOne(p, a, e))
1068
1072
  return s.flipNegate ? !0 : !this.negate;
1069
1073
  }
1070
1074
  return s.flipNegate ? !1 : this.negate;
@@ -1073,71 +1077,71 @@ class lt {
1073
1077
  return j.defaults(t).Minimatch;
1074
1078
  }
1075
1079
  }
1076
- _ = new WeakSet(), Zt = function(t, e, s, n, r) {
1077
- const c = e.indexOf(W, r), f = e.lastIndexOf(W), [p, a, h] = s ? [
1080
+ L = new WeakSet(), It = function(t, e, s, n, r) {
1081
+ const c = e.indexOf(C, r), a = e.lastIndexOf(C), [p, h, f] = s ? [
1078
1082
  e.slice(r, c),
1079
1083
  e.slice(c + 1),
1080
1084
  []
1081
1085
  ] : [
1082
1086
  e.slice(r, c),
1083
- e.slice(c + 1, f),
1084
- e.slice(f + 1)
1087
+ e.slice(c + 1, a),
1088
+ e.slice(a + 1)
1085
1089
  ];
1086
1090
  if (p.length) {
1087
- const N = t.slice(n, n + p.length);
1088
- if (!x(this, _, X).call(this, N, p, s, 0, 0))
1091
+ const A = t.slice(n, n + p.length);
1092
+ if (!x(this, L, J).call(this, A, p, s, 0, 0))
1089
1093
  return !1;
1090
1094
  n += p.length, r += p.length;
1091
1095
  }
1092
1096
  let l = 0;
1093
- if (h.length) {
1094
- if (h.length + n > t.length)
1097
+ if (f.length) {
1098
+ if (f.length + n > t.length)
1095
1099
  return !1;
1096
- let N = t.length - h.length;
1097
- if (x(this, _, X).call(this, t, h, s, N, 0))
1098
- l = h.length;
1100
+ let A = t.length - f.length;
1101
+ if (x(this, L, J).call(this, t, f, s, A, 0))
1102
+ l = f.length;
1099
1103
  else {
1100
- if (t[t.length - 1] !== "" || n + h.length === t.length || (N--, !x(this, _, X).call(this, t, h, s, N, 0)))
1104
+ if (t[t.length - 1] !== "" || n + f.length === t.length || (A--, !x(this, L, J).call(this, t, f, s, A, 0)))
1101
1105
  return !1;
1102
- l = h.length + 1;
1106
+ l = f.length + 1;
1103
1107
  }
1104
1108
  }
1105
- if (!a.length) {
1106
- let N = !!l;
1107
- for (let S = n; S < t.length - l; S++) {
1108
- const m = String(t[S]);
1109
- if (N = !0, m === "." || m === ".." || !this.options.dot && m.startsWith("."))
1109
+ if (!h.length) {
1110
+ let A = !!l;
1111
+ for (let d = n; d < t.length - l; d++) {
1112
+ const $ = String(t[d]);
1113
+ if (A = !0, $ === "." || $ === ".." || !this.options.dot && $.startsWith("."))
1110
1114
  return !1;
1111
1115
  }
1112
- return s || N;
1116
+ return s || A;
1113
1117
  }
1114
1118
  const u = [[[], 0]];
1115
- let g = u[0], w = 0;
1116
- const b = [0];
1117
- for (const N of a)
1118
- N === W ? (b.push(w), g = [[], 0], u.push(g)) : (g[0].push(N), w++);
1119
- let P = u.length - 1;
1120
- const T = t.length - l;
1121
- for (const N of u)
1122
- N[1] = T - (b[P--] + N[0].length);
1123
- return !!x(this, _, mt).call(this, t, u, n, 0, s, 0, !!l);
1119
+ let g = u[0], y = 0;
1120
+ const E = [0];
1121
+ for (const A of h)
1122
+ A === C ? (E.push(y), g = [[], 0], u.push(g)) : (g[0].push(A), y++);
1123
+ let w = u.length - 1;
1124
+ const b = t.length - l;
1125
+ for (const A of u)
1126
+ A[1] = b - (E[w--] + A[0].length);
1127
+ return !!x(this, L, gt).call(this, t, u, n, 0, s, 0, !!l);
1124
1128
  }, // return false for "nope, not matching"
1125
1129
  // return null for "not matching, cannot keep trying"
1126
- mt = function(t, e, s, n, r, c, f) {
1130
+ gt = function(t, e, s, n, r, c, a) {
1127
1131
  const p = e[n];
1128
1132
  if (!p) {
1129
1133
  for (let l = s; l < t.length; l++) {
1130
- f = !0;
1134
+ a = !0;
1131
1135
  const u = t[l];
1132
1136
  if (u === "." || u === ".." || !this.options.dot && u.startsWith("."))
1133
1137
  return !1;
1134
1138
  }
1135
- return f;
1139
+ return a;
1136
1140
  }
1137
- const [a, h] = p;
1138
- for (; s <= h; ) {
1139
- if (x(this, _, X).call(this, t.slice(0, s + a.length), a, r, s, 0) && c < this.maxGlobstarRecursion) {
1140
- const g = x(this, _, mt).call(this, t, e, s + a.length, n + 1, r, c + 1, f);
1141
+ const [h, f] = p;
1142
+ for (; s <= f; ) {
1143
+ if (x(this, L, J).call(this, t.slice(0, s + h.length), h, r, s, 0) && c < this.maxGlobstarRecursion) {
1144
+ const g = x(this, L, gt).call(this, t, e, s + h.length, n + 1, r, c + 1, a);
1141
1145
  if (g !== !1)
1142
1146
  return g;
1143
1147
  }
@@ -1147,99 +1151,99 @@ mt = function(t, e, s, n, r, c, f) {
1147
1151
  s++;
1148
1152
  }
1149
1153
  return r || null;
1150
- }, X = function(t, e, s, n, r) {
1151
- let c, f, p, a;
1152
- for (c = n, f = r, a = t.length, p = e.length; c < a && f < p; c++, f++) {
1154
+ }, J = function(t, e, s, n, r) {
1155
+ let c, a, p, h;
1156
+ for (c = n, a = r, h = t.length, p = e.length; c < h && a < p; c++, a++) {
1153
1157
  this.debug("matchOne loop");
1154
- let h = e[f], l = t[c];
1155
- if (this.debug(e, h, l), h === !1 || h === W)
1158
+ let f = e[a], l = t[c];
1159
+ if (this.debug(e, f, l), f === !1 || f === C)
1156
1160
  return !1;
1157
1161
  let u;
1158
- if (typeof h == "string" ? (u = l === h, this.debug("string match", h, l, u)) : (u = h.test(l), this.debug("pattern match", h, l, u)), !u)
1162
+ if (typeof f == "string" ? (u = l === f, this.debug("string match", f, l, u)) : (u = f.test(l), this.debug("pattern match", f, l, u)), !u)
1159
1163
  return !1;
1160
1164
  }
1161
- if (c === a && f === p)
1165
+ if (c === h && a === p)
1162
1166
  return !0;
1163
- if (c === a)
1167
+ if (c === h)
1164
1168
  return s;
1165
- if (f === p)
1166
- return c === a - 1 && t[c] === "";
1169
+ if (a === p)
1170
+ return c === h - 1 && t[c] === "";
1167
1171
  throw new Error("wtf?");
1168
1172
  };
1169
- j.AST = ct;
1170
- j.Minimatch = lt;
1171
- j.escape = Te;
1172
- j.unescape = et;
1173
- class ns {
1173
+ j.AST = rt;
1174
+ j.Minimatch = ot;
1175
+ j.escape = Pe;
1176
+ j.unescape = Y;
1177
+ class os {
1174
1178
  constructor(t) {
1175
- $(this, "value");
1176
- $(this, "next");
1179
+ T(this, "value");
1180
+ T(this, "next");
1177
1181
  this.value = t;
1178
1182
  }
1179
1183
  }
1180
- var L, U, J;
1181
- class is {
1184
+ var D, B, Z;
1185
+ class cs {
1182
1186
  constructor() {
1183
- v(this, L);
1184
- v(this, U);
1185
- v(this, J);
1187
+ R(this, D);
1188
+ R(this, B);
1189
+ R(this, Z);
1186
1190
  this.clear();
1187
1191
  }
1188
1192
  enqueue(t) {
1189
- const e = new ns(t);
1190
- o(this, L) ? (o(this, U).next = e, E(this, U, e)) : (E(this, L, e), E(this, U, e)), ht(this, J)._++;
1193
+ const e = new os(t);
1194
+ o(this, D) ? (o(this, B).next = e, S(this, B, e)) : (S(this, D, e), S(this, B, e)), lt(this, Z)._++;
1191
1195
  }
1192
1196
  dequeue() {
1193
- const t = o(this, L);
1197
+ const t = o(this, D);
1194
1198
  if (t)
1195
- return E(this, L, o(this, L).next), ht(this, J)._--, o(this, L) || E(this, U, void 0), t.value;
1199
+ return S(this, D, o(this, D).next), lt(this, Z)._--, o(this, D) || S(this, B, void 0), t.value;
1196
1200
  }
1197
1201
  peek() {
1198
- if (o(this, L))
1199
- return o(this, L).value;
1202
+ if (o(this, D))
1203
+ return o(this, D).value;
1200
1204
  }
1201
1205
  clear() {
1202
- E(this, L, void 0), E(this, U, void 0), E(this, J, 0);
1206
+ S(this, D, void 0), S(this, B, void 0), S(this, Z, 0);
1203
1207
  }
1204
1208
  get size() {
1205
- return o(this, J);
1209
+ return o(this, Z);
1206
1210
  }
1207
1211
  *[Symbol.iterator]() {
1208
- let t = o(this, L);
1212
+ let t = o(this, D);
1209
1213
  for (; t; )
1210
1214
  yield t.value, t = t.next;
1211
1215
  }
1212
1216
  *drain() {
1213
- for (; o(this, L); )
1217
+ for (; o(this, D); )
1214
1218
  yield this.dequeue();
1215
1219
  }
1216
1220
  }
1217
- L = new WeakMap(), U = new WeakMap(), J = new WeakMap();
1218
- function rs(i) {
1221
+ D = new WeakMap(), B = new WeakMap(), Z = new WeakMap();
1222
+ function ls(i) {
1219
1223
  let t = !1;
1220
- if (typeof i == "object" && ({ concurrency: i, rejectOnClear: t = !1 } = i), Tt(i), typeof t != "boolean")
1224
+ if (typeof i == "object" && ({ concurrency: i, rejectOnClear: t = !1 } = i), $t(i), typeof t != "boolean")
1221
1225
  throw new TypeError("Expected `rejectOnClear` to be a boolean");
1222
- const e = new is();
1226
+ const e = new cs();
1223
1227
  let s = 0;
1224
1228
  const n = () => {
1225
1229
  s < i && e.size > 0 && (s++, e.dequeue().run());
1226
1230
  }, r = () => {
1227
1231
  s--, n();
1228
- }, c = async (a, h, l) => {
1229
- const u = (async () => a(...l))();
1230
- h(u);
1232
+ }, c = async (h, f, l) => {
1233
+ const u = (async () => h(...l))();
1234
+ f(u);
1231
1235
  try {
1232
1236
  await u;
1233
1237
  } catch {
1234
1238
  }
1235
1239
  r();
1236
- }, f = (a, h, l, u) => {
1240
+ }, a = (h, f, l, u) => {
1237
1241
  const g = { reject: l };
1238
- new Promise((w) => {
1239
- g.run = w, e.enqueue(g);
1240
- }).then(c.bind(void 0, a, h, u)), s < i && n();
1241
- }, p = (a, ...h) => new Promise((l, u) => {
1242
- f(a, l, u, h);
1242
+ new Promise((y) => {
1243
+ g.run = y, e.enqueue(g);
1244
+ }).then(c.bind(void 0, h, f, u)), s < i && n();
1245
+ }, p = (h, ...f) => new Promise((l, u) => {
1246
+ a(h, l, u, f);
1243
1247
  });
1244
1248
  return Object.defineProperties(p, {
1245
1249
  activeCount: {
@@ -1254,33 +1258,34 @@ function rs(i) {
1254
1258
  e.clear();
1255
1259
  return;
1256
1260
  }
1257
- const a = AbortSignal.abort().reason;
1261
+ const h = AbortSignal.abort().reason;
1258
1262
  for (; e.size > 0; )
1259
- e.dequeue().reject(a);
1263
+ e.dequeue().reject(h);
1260
1264
  }
1261
1265
  },
1262
1266
  concurrency: {
1263
1267
  get: () => i,
1264
- set(a) {
1265
- Tt(a), i = a, queueMicrotask(() => {
1268
+ set(h) {
1269
+ $t(h), i = h, queueMicrotask(() => {
1266
1270
  for (; s < i && e.size > 0; )
1267
1271
  n();
1268
1272
  });
1269
1273
  }
1270
1274
  },
1271
1275
  map: {
1272
- async value(a, h) {
1273
- const l = Array.from(a, (u, g) => this(h, u, g));
1276
+ async value(h, f) {
1277
+ const l = Array.from(h, (u, g) => this(f, u, g));
1274
1278
  return Promise.all(l);
1275
1279
  }
1276
1280
  }
1277
1281
  }), p;
1278
1282
  }
1279
- function Tt(i) {
1283
+ function $t(i) {
1280
1284
  if (!((Number.isInteger(i) || i === Number.POSITIVE_INFINITY) && i > 0))
1281
1285
  throw new TypeError("Expected `concurrency` to be a number from 1 and up");
1282
1286
  }
1283
- function os(i) {
1287
+ const hs = Qt(Vt);
1288
+ function as(i) {
1284
1289
  if (i.length < 2) return "never";
1285
1290
  const t = [...i].sort((n, r) => n - r);
1286
1291
  let e = 0;
@@ -1289,84 +1294,82 @@ function os(i) {
1289
1294
  const s = e / (t.length - 1) / 864e5;
1290
1295
  return s <= 1 ? "daily" : s <= 7 ? "weekly" : s <= 30 ? "monthly" : s <= 365 ? "yearly" : "never";
1291
1296
  }
1292
- function hs(i) {
1297
+ function ws(i) {
1293
1298
  const t = i.pageEntryPattern;
1294
1299
  let e = i.rootDir ?? "", s = i.outputFile ?? "";
1295
- const n = i.concurrency ?? 20, r = i.commitCount ?? 10, c = i.ignoreDeps ? Array.isArray(i.ignoreDeps) ? i.ignoreDeps : [i.ignoreDeps] : [], f = {};
1300
+ const n = i.concurrency ?? 20, r = i.commitCount ?? 10, c = i.ignoreDeps ? Array.isArray(i.ignoreDeps) ? i.ignoreDeps : [i.ignoreDeps] : [], a = {};
1296
1301
  let p;
1297
1302
  return {
1298
1303
  name: "vite-last-modified",
1299
- async configResolved(a) {
1300
- const { resolve: h } = await import("./__vite-browser-external-BDMct_Gn.js");
1301
- p = a.build.ssr, e || (e = a.root), s || (s = h(e, "last-modified.json"));
1304
+ async configResolved(h) {
1305
+ p = h.build.ssr, e || (e = h.root), s || (s = Jt(e, "last-modified.json"));
1302
1306
  },
1303
1307
  async buildEnd() {
1304
1308
  if (p || process.env.NODE_ENV !== "production")
1305
1309
  return;
1306
- const { exec: a } = await import("./__vite-browser-external-BDMct_Gn.js"), h = await import("./__vite-browser-external-BDMct_Gn.js"), { promisify: l } = await import("./__vite-browser-external-BDMct_Gn.js"), u = l(a), g = /* @__PURE__ */ new Map(), w = rs(n), b = (m) => {
1307
- if (g.has(m))
1308
- return g.get(m);
1309
- const y = w(async () => {
1310
+ const h = /* @__PURE__ */ new Map(), f = ls(n), l = (w) => {
1311
+ if (h.has(w))
1312
+ return h.get(w);
1313
+ const b = f(async () => {
1310
1314
  try {
1311
- const k = m.includes("?") ? m.slice(0, m.indexOf("?")) : m, C = h.relative(e, k).replace(/\\/g, "/"), { stdout: V } = await u(`git log --follow -n ${r} --format=%at -- "${C}"`, { cwd: e });
1312
- return V.trim() ? V.trim().split(`
1313
- `).map((K) => parseInt(K, 10) * 1e3) : [];
1315
+ const A = w.includes("?") ? w.slice(0, w.indexOf("?")) : w, d = Ht.relative(e, A).replace(/\\/g, "/"), { stdout: $ } = await hs(`git log --follow -n ${r} --format=%at -- "${d}"`, { cwd: e });
1316
+ return $.trim() ? $.trim().split(`
1317
+ `).map((N) => parseInt(N, 10) * 1e3) : [];
1314
1318
  } catch {
1315
1319
  return [];
1316
1320
  }
1317
1321
  });
1318
- return g.set(m, y), y;
1319
- }, P = (m, y) => {
1320
- if (y.has(m)) return;
1321
- y.add(m);
1322
- const k = this.getModuleInfo(m);
1323
- if (k)
1324
- for (const C of k.importedIds) {
1325
- if (C.includes("node_modules") || !C.startsWith(e))
1322
+ return h.set(w, b), b;
1323
+ }, u = (w, b) => {
1324
+ if (b.has(w)) return;
1325
+ b.add(w);
1326
+ const A = this.getModuleInfo(w);
1327
+ if (A)
1328
+ for (const d of A.importedIds) {
1329
+ if (d.includes("node_modules") || !d.startsWith(e))
1326
1330
  continue;
1327
- const V = C.slice(e.length).replace(/^\/?/, "").split("?")[0];
1328
- c.some((K) => j(V, K, { dot: !0 })) || P(C, y);
1331
+ const $ = d.slice(e.length).replace(/^\/?/, "").split("?")[0];
1332
+ c.some((N) => j($, N, { dot: !0 })) || u(d, b);
1329
1333
  }
1330
- }, T = [...this.getModuleIds()].filter((m) => {
1331
- if (!m.startsWith(e))
1334
+ }, g = [...this.getModuleIds()].filter((w) => {
1335
+ if (!w.startsWith(e))
1332
1336
  return !1;
1333
- const y = m.slice(e.length).replace(/^\//, "");
1334
- return typeof t == "string" ? j(y, t, { dot: !0 }) : t.test(y);
1337
+ const b = w.slice(e.length).replace(/^\//, "");
1338
+ return typeof t == "string" ? j(b, t, { dot: !0 }) : t.test(b);
1335
1339
  });
1336
- if (T.length === 0) {
1340
+ if (g.length === 0) {
1337
1341
  console.warn("[lastModifiedPlugin] No MD files found in module graph");
1338
1342
  return;
1339
1343
  }
1340
1344
  console.log("[lastModifiedPlugin] start collect entry files deps");
1341
- let N = /* @__PURE__ */ new Map();
1342
- for (const m of T) {
1343
- const y = /* @__PURE__ */ new Set();
1344
- P(m, y), N.set(m, y);
1345
+ let y = /* @__PURE__ */ new Map();
1346
+ for (const w of g) {
1347
+ const b = /* @__PURE__ */ new Set();
1348
+ u(w, b), y.set(w, b);
1345
1349
  }
1346
- if (console.log(`[lastModifiedPlugin] Analyzed ${T.length} entry files`), typeof i.modifyDepMap == "function") {
1347
- const m = await i.modifyDepMap(N);
1348
- m && m instanceof Map && (N = m);
1350
+ if (console.log(`[lastModifiedPlugin] Analyzed ${g.length} entry files`), typeof i.modifyDepMap == "function") {
1351
+ const w = await i.modifyDepMap(y);
1352
+ w && w instanceof Map && (y = w);
1349
1353
  }
1350
- const S = /* @__PURE__ */ new Set();
1351
- for (const m of N.values())
1352
- for (const y of m)
1353
- S.add(y);
1354
- await Promise.all([...S].map(b));
1355
- for (const [m, y] of N) {
1356
- const k = m.slice(e.length).replace(/^\//, ""), C = (await Promise.all([...y].map(b))).flat(), V = C.length > 0 ? Math.max(...C) : 0, K = os(C);
1357
- f[k] = { lastmod: V, changefreq: K };
1354
+ const E = /* @__PURE__ */ new Set();
1355
+ for (const w of y.values())
1356
+ for (const b of w)
1357
+ E.add(b);
1358
+ await Promise.all([...E].map(l));
1359
+ for (const [w, b] of y) {
1360
+ const A = w.slice(e.length).replace(/^\//, ""), d = (await Promise.all([...b].map(l))).flat(), $ = d.length > 0 ? Math.max(...d) : 0, N = as(d);
1361
+ a[A] = { lastmod: $, changefreq: N };
1358
1362
  }
1359
1363
  },
1360
- async closeBundle() {
1361
- const { writeFileSync: a } = await import("./__vite-browser-external-BDMct_Gn.js");
1364
+ closeBundle() {
1362
1365
  if (p || process.env.NODE_ENV !== "production")
1363
1366
  return;
1364
- const h = Object.fromEntries(Object.entries(f).sort(([l], [u]) => l.localeCompare(u)));
1365
- a(s, JSON.stringify(h, null, 2), "utf8"), console.log(`[lastModifiedPlugin] Written ${s}`);
1367
+ const h = Object.fromEntries(Object.entries(a).sort(([f], [l]) => f.localeCompare(l)));
1368
+ Xt(s, JSON.stringify(h, null, 2), "utf8"), console.log(`[lastModifiedPlugin] Written ${s}`);
1366
1369
  }
1367
1370
  };
1368
1371
  }
1369
1372
  export {
1370
- hs as g,
1373
+ ws as g,
1371
1374
  j as m
1372
1375
  };