@storybook/addon-vitest 0.0.0-pr-32795-sha-f0ac445c → 0.0.0-pr-32717-sha-b8c5e103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,58 +1,112 @@
1
- import CJS_COMPAT_NODE_URL_oycy7mg2pm from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_oycy7mg2pm from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_oycy7mg2pm from "node:module";
1
+ import CJS_COMPAT_NODE_URL_cw5mnzbfh6n from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_cw5mnzbfh6n from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_cw5mnzbfh6n from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_oycy7mg2pm.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_oycy7mg2pm.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_oycy7mg2pm.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_cw5mnzbfh6n.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_cw5mnzbfh6n.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_cw5mnzbfh6n.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  require_picocolors
14
- } from "../_node-chunks/chunk-PI4OHO3O.js";
14
+ } from "../_node-chunks/chunk-7I3XZAZ7.js";
15
+ import {
16
+ require_dist
17
+ } from "../_node-chunks/chunk-NGGAGIMA.js";
15
18
  import {
16
19
  join,
17
20
  normalize,
18
21
  relative,
19
22
  resolve,
20
23
  sep
21
- } from "../_node-chunks/chunk-SNWBLFHL.js";
24
+ } from "../_node-chunks/chunk-KSSAW7TR.js";
22
25
  import {
23
26
  __commonJS,
27
+ __name,
24
28
  __require,
25
29
  __toESM
26
- } from "../_node-chunks/chunk-HCCHV65D.js";
30
+ } from "../_node-chunks/chunk-ZMWJWQPS.js";
27
31
 
28
32
  // ../../node_modules/braces/lib/utils.js
29
33
  var require_utils = __commonJS({
30
34
  "../../node_modules/braces/lib/utils.js"(exports) {
31
35
  "use strict";
32
- exports.isInteger = (num) => typeof num == "number" ? Number.isInteger(num) : typeof num == "string" && num.trim() !== "" ? Number.isInteger(Number(num)) : !1;
36
+ exports.isInteger = (num) => {
37
+ if (typeof num === "number") {
38
+ return Number.isInteger(num);
39
+ }
40
+ if (typeof num === "string" && num.trim() !== "") {
41
+ return Number.isInteger(Number(num));
42
+ }
43
+ return false;
44
+ };
33
45
  exports.find = (node, type) => node.nodes.find((node2) => node2.type === type);
34
- exports.exceedsLimit = (min, max, step = 1, limit) => limit === !1 || !exports.isInteger(min) || !exports.isInteger(max) ? !1 : (Number(max) - Number(min)) / Number(step) >= limit;
46
+ exports.exceedsLimit = (min, max, step = 1, limit) => {
47
+ if (limit === false) return false;
48
+ if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
49
+ return (Number(max) - Number(min)) / Number(step) >= limit;
50
+ };
35
51
  exports.escapeNode = (block, n = 0, type) => {
36
- let node = block.nodes[n];
37
- node && (type && node.type === type || node.type === "open" || node.type === "close") && node.escaped !== !0 && (node.value = "\\" + node.value, node.escaped = !0);
52
+ const node = block.nodes[n];
53
+ if (!node) return;
54
+ if (type && node.type === type || node.type === "open" || node.type === "close") {
55
+ if (node.escaped !== true) {
56
+ node.value = "\\" + node.value;
57
+ node.escaped = true;
58
+ }
59
+ }
60
+ };
61
+ exports.encloseBrace = (node) => {
62
+ if (node.type !== "brace") return false;
63
+ if (node.commas >> 0 + node.ranges >> 0 === 0) {
64
+ node.invalid = true;
65
+ return true;
66
+ }
67
+ return false;
68
+ };
69
+ exports.isInvalidBrace = (block) => {
70
+ if (block.type !== "brace") return false;
71
+ if (block.invalid === true || block.dollar) return true;
72
+ if (block.commas >> 0 + block.ranges >> 0 === 0) {
73
+ block.invalid = true;
74
+ return true;
75
+ }
76
+ if (block.open !== true || block.close !== true) {
77
+ block.invalid = true;
78
+ return true;
79
+ }
80
+ return false;
81
+ };
82
+ exports.isOpenOrClose = (node) => {
83
+ if (node.type === "open" || node.type === "close") {
84
+ return true;
85
+ }
86
+ return node.open === true || node.close === true;
38
87
  };
39
- exports.encloseBrace = (node) => node.type !== "brace" ? !1 : node.commas >> 0 + node.ranges >> 0 === 0 ? (node.invalid = !0, !0) : !1;
40
- exports.isInvalidBrace = (block) => block.type !== "brace" ? !1 : block.invalid === !0 || block.dollar ? !0 : block.commas >> 0 + block.ranges >> 0 === 0 || block.open !== !0 || block.close !== !0 ? (block.invalid = !0, !0) : !1;
41
- exports.isOpenOrClose = (node) => node.type === "open" || node.type === "close" ? !0 : node.open === !0 || node.close === !0;
42
- exports.reduce = (nodes) => nodes.reduce((acc, node) => (node.type === "text" && acc.push(node.value), node.type === "range" && (node.type = "text"), acc), []);
88
+ exports.reduce = (nodes) => nodes.reduce((acc, node) => {
89
+ if (node.type === "text") acc.push(node.value);
90
+ if (node.type === "range") node.type = "text";
91
+ return acc;
92
+ }, []);
43
93
  exports.flatten = (...args) => {
44
- let result = [], flat = (arr) => {
94
+ const result = [];
95
+ const flat = /* @__PURE__ */ __name((arr) => {
45
96
  for (let i = 0; i < arr.length; i++) {
46
- let ele = arr[i];
97
+ const ele = arr[i];
47
98
  if (Array.isArray(ele)) {
48
99
  flat(ele);
49
100
  continue;
50
101
  }
51
- ele !== void 0 && result.push(ele);
102
+ if (ele !== void 0) {
103
+ result.push(ele);
104
+ }
52
105
  }
53
106
  return result;
54
- };
55
- return flat(args), result;
107
+ }, "flat");
108
+ flat(args);
109
+ return result;
56
110
  };
57
111
  }
58
112
  });
@@ -63,17 +117,26 @@ var require_stringify = __commonJS({
63
117
  "use strict";
64
118
  var utils = require_utils();
65
119
  module.exports = (ast, options = {}) => {
66
- let stringify = (node, parent = {}) => {
67
- let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent), invalidNode = node.invalid === !0 && options.escapeInvalid === !0, output = "";
68
- if (node.value)
69
- return (invalidBlock || invalidNode) && utils.isOpenOrClose(node) ? "\\" + node.value : node.value;
70
- if (node.value)
120
+ const stringify = /* @__PURE__ */ __name((node, parent = {}) => {
121
+ const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
122
+ const invalidNode = node.invalid === true && options.escapeInvalid === true;
123
+ let output = "";
124
+ if (node.value) {
125
+ if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
126
+ return "\\" + node.value;
127
+ }
128
+ return node.value;
129
+ }
130
+ if (node.value) {
71
131
  return node.value;
72
- if (node.nodes)
73
- for (let child of node.nodes)
132
+ }
133
+ if (node.nodes) {
134
+ for (const child of node.nodes) {
74
135
  output += stringify(child);
136
+ }
137
+ }
75
138
  return output;
76
- };
139
+ }, "stringify");
77
140
  return stringify(ast);
78
141
  };
79
142
  }
@@ -84,7 +147,13 @@ var require_is_number = __commonJS({
84
147
  "../../node_modules/is-number/index.js"(exports, module) {
85
148
  "use strict";
86
149
  module.exports = function(num) {
87
- return typeof num == "number" ? num - num === 0 : typeof num == "string" && num.trim() !== "" ? Number.isFinite ? Number.isFinite(+num) : isFinite(+num) : !1;
150
+ if (typeof num === "number") {
151
+ return num - num === 0;
152
+ }
153
+ if (typeof num === "string" && num.trim() !== "") {
154
+ return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
155
+ }
156
+ return false;
88
157
  };
89
158
  }
90
159
  });
@@ -93,103 +162,208 @@ var require_is_number = __commonJS({
93
162
  var require_to_regex_range = __commonJS({
94
163
  "../../node_modules/to-regex-range/index.js"(exports, module) {
95
164
  "use strict";
96
- var isNumber = require_is_number(), toRegexRange = (min, max, options) => {
97
- if (isNumber(min) === !1)
165
+ var isNumber = require_is_number();
166
+ var toRegexRange = /* @__PURE__ */ __name((min, max, options) => {
167
+ if (isNumber(min) === false) {
98
168
  throw new TypeError("toRegexRange: expected the first argument to be a number");
99
- if (max === void 0 || min === max)
169
+ }
170
+ if (max === void 0 || min === max) {
100
171
  return String(min);
101
- if (isNumber(max) === !1)
172
+ }
173
+ if (isNumber(max) === false) {
102
174
  throw new TypeError("toRegexRange: expected the second argument to be a number.");
103
- let opts = { relaxZeros: !0, ...options };
104
- typeof opts.strictZeros == "boolean" && (opts.relaxZeros = opts.strictZeros === !1);
105
- let relax = String(opts.relaxZeros), shorthand = String(opts.shorthand), capture = String(opts.capture), wrap = String(opts.wrap), cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
106
- if (toRegexRange.cache.hasOwnProperty(cacheKey))
175
+ }
176
+ let opts = { relaxZeros: true, ...options };
177
+ if (typeof opts.strictZeros === "boolean") {
178
+ opts.relaxZeros = opts.strictZeros === false;
179
+ }
180
+ let relax = String(opts.relaxZeros);
181
+ let shorthand = String(opts.shorthand);
182
+ let capture = String(opts.capture);
183
+ let wrap = String(opts.wrap);
184
+ let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
185
+ if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
107
186
  return toRegexRange.cache[cacheKey].result;
108
- let a = Math.min(min, max), b = Math.max(min, max);
187
+ }
188
+ let a = Math.min(min, max);
189
+ let b = Math.max(min, max);
109
190
  if (Math.abs(a - b) === 1) {
110
191
  let result = min + "|" + max;
111
- return opts.capture ? `(${result})` : opts.wrap === !1 ? result : `(?:${result})`;
192
+ if (opts.capture) {
193
+ return `(${result})`;
194
+ }
195
+ if (opts.wrap === false) {
196
+ return result;
197
+ }
198
+ return `(?:${result})`;
112
199
  }
113
- let isPadded = hasPadding(min) || hasPadding(max), state = { min, max, a, b }, positives = [], negatives = [];
114
- if (isPadded && (state.isPadded = isPadded, state.maxLen = String(state.max).length), a < 0) {
200
+ let isPadded = hasPadding(min) || hasPadding(max);
201
+ let state = { min, max, a, b };
202
+ let positives = [];
203
+ let negatives = [];
204
+ if (isPadded) {
205
+ state.isPadded = isPadded;
206
+ state.maxLen = String(state.max).length;
207
+ }
208
+ if (a < 0) {
115
209
  let newMin = b < 0 ? Math.abs(b) : 1;
116
- negatives = splitToPatterns(newMin, Math.abs(a), state, opts), a = state.a = 0;
210
+ negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
211
+ a = state.a = 0;
117
212
  }
118
- return b >= 0 && (positives = splitToPatterns(a, b, state, opts)), state.negatives = negatives, state.positives = positives, state.result = collatePatterns(negatives, positives, opts), opts.capture === !0 ? state.result = `(${state.result})` : opts.wrap !== !1 && positives.length + negatives.length > 1 && (state.result = `(?:${state.result})`), toRegexRange.cache[cacheKey] = state, state.result;
119
- };
213
+ if (b >= 0) {
214
+ positives = splitToPatterns(a, b, state, opts);
215
+ }
216
+ state.negatives = negatives;
217
+ state.positives = positives;
218
+ state.result = collatePatterns(negatives, positives, opts);
219
+ if (opts.capture === true) {
220
+ state.result = `(${state.result})`;
221
+ } else if (opts.wrap !== false && positives.length + negatives.length > 1) {
222
+ state.result = `(?:${state.result})`;
223
+ }
224
+ toRegexRange.cache[cacheKey] = state;
225
+ return state.result;
226
+ }, "toRegexRange");
120
227
  function collatePatterns(neg, pos, options) {
121
- let onlyNegative = filterPatterns(neg, pos, "-", !1, options) || [], onlyPositive = filterPatterns(pos, neg, "", !1, options) || [], intersected = filterPatterns(neg, pos, "-?", !0, options) || [];
122
- return onlyNegative.concat(intersected).concat(onlyPositive).join("|");
228
+ let onlyNegative = filterPatterns(neg, pos, "-", false, options) || [];
229
+ let onlyPositive = filterPatterns(pos, neg, "", false, options) || [];
230
+ let intersected = filterPatterns(neg, pos, "-?", true, options) || [];
231
+ let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
232
+ return subpatterns.join("|");
123
233
  }
234
+ __name(collatePatterns, "collatePatterns");
124
235
  function splitToRanges(min, max) {
125
- let nines = 1, zeros = 1, stop = countNines(min, nines), stops = /* @__PURE__ */ new Set([max]);
126
- for (; min <= stop && stop <= max; )
127
- stops.add(stop), nines += 1, stop = countNines(min, nines);
128
- for (stop = countZeros(max + 1, zeros) - 1; min < stop && stop <= max; )
129
- stops.add(stop), zeros += 1, stop = countZeros(max + 1, zeros) - 1;
130
- return stops = [...stops], stops.sort(compare), stops;
236
+ let nines = 1;
237
+ let zeros = 1;
238
+ let stop = countNines(min, nines);
239
+ let stops = /* @__PURE__ */ new Set([max]);
240
+ while (min <= stop && stop <= max) {
241
+ stops.add(stop);
242
+ nines += 1;
243
+ stop = countNines(min, nines);
244
+ }
245
+ stop = countZeros(max + 1, zeros) - 1;
246
+ while (min < stop && stop <= max) {
247
+ stops.add(stop);
248
+ zeros += 1;
249
+ stop = countZeros(max + 1, zeros) - 1;
250
+ }
251
+ stops = [...stops];
252
+ stops.sort(compare);
253
+ return stops;
131
254
  }
255
+ __name(splitToRanges, "splitToRanges");
132
256
  function rangeToPattern(start, stop, options) {
133
- if (start === stop)
257
+ if (start === stop) {
134
258
  return { pattern: start, count: [], digits: 0 };
135
- let zipped = zip(start, stop), digits = zipped.length, pattern = "", count = 0;
259
+ }
260
+ let zipped = zip(start, stop);
261
+ let digits = zipped.length;
262
+ let pattern = "";
263
+ let count = 0;
136
264
  for (let i = 0; i < digits; i++) {
137
265
  let [startDigit, stopDigit] = zipped[i];
138
- startDigit === stopDigit ? pattern += startDigit : startDigit !== "0" || stopDigit !== "9" ? pattern += toCharacterClass(startDigit, stopDigit, options) : count++;
266
+ if (startDigit === stopDigit) {
267
+ pattern += startDigit;
268
+ } else if (startDigit !== "0" || stopDigit !== "9") {
269
+ pattern += toCharacterClass(startDigit, stopDigit, options);
270
+ } else {
271
+ count++;
272
+ }
273
+ }
274
+ if (count) {
275
+ pattern += options.shorthand === true ? "\\d" : "[0-9]";
139
276
  }
140
- return count && (pattern += options.shorthand === !0 ? "\\d" : "[0-9]"), { pattern, count: [count], digits };
277
+ return { pattern, count: [count], digits };
141
278
  }
279
+ __name(rangeToPattern, "rangeToPattern");
142
280
  function splitToPatterns(min, max, tok, options) {
143
- let ranges = splitToRanges(min, max), tokens = [], start = min, prev;
281
+ let ranges = splitToRanges(min, max);
282
+ let tokens = [];
283
+ let start = min;
284
+ let prev;
144
285
  for (let i = 0; i < ranges.length; i++) {
145
- let max2 = ranges[i], obj = rangeToPattern(String(start), String(max2), options), zeros = "";
286
+ let max2 = ranges[i];
287
+ let obj = rangeToPattern(String(start), String(max2), options);
288
+ let zeros = "";
146
289
  if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
147
- prev.count.length > 1 && prev.count.pop(), prev.count.push(obj.count[0]), prev.string = prev.pattern + toQuantifier(prev.count), start = max2 + 1;
290
+ if (prev.count.length > 1) {
291
+ prev.count.pop();
292
+ }
293
+ prev.count.push(obj.count[0]);
294
+ prev.string = prev.pattern + toQuantifier(prev.count);
295
+ start = max2 + 1;
148
296
  continue;
149
297
  }
150
- tok.isPadded && (zeros = padZeros(max2, tok, options)), obj.string = zeros + obj.pattern + toQuantifier(obj.count), tokens.push(obj), start = max2 + 1, prev = obj;
298
+ if (tok.isPadded) {
299
+ zeros = padZeros(max2, tok, options);
300
+ }
301
+ obj.string = zeros + obj.pattern + toQuantifier(obj.count);
302
+ tokens.push(obj);
303
+ start = max2 + 1;
304
+ prev = obj;
151
305
  }
152
306
  return tokens;
153
307
  }
308
+ __name(splitToPatterns, "splitToPatterns");
154
309
  function filterPatterns(arr, comparison, prefix, intersection, options) {
155
310
  let result = [];
156
311
  for (let ele of arr) {
157
312
  let { string } = ele;
158
- !intersection && !contains(comparison, "string", string) && result.push(prefix + string), intersection && contains(comparison, "string", string) && result.push(prefix + string);
313
+ if (!intersection && !contains(comparison, "string", string)) {
314
+ result.push(prefix + string);
315
+ }
316
+ if (intersection && contains(comparison, "string", string)) {
317
+ result.push(prefix + string);
318
+ }
159
319
  }
160
320
  return result;
161
321
  }
322
+ __name(filterPatterns, "filterPatterns");
162
323
  function zip(a, b) {
163
324
  let arr = [];
164
325
  for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
165
326
  return arr;
166
327
  }
328
+ __name(zip, "zip");
167
329
  function compare(a, b) {
168
330
  return a > b ? 1 : b > a ? -1 : 0;
169
331
  }
332
+ __name(compare, "compare");
170
333
  function contains(arr, key, val) {
171
334
  return arr.some((ele) => ele[key] === val);
172
335
  }
336
+ __name(contains, "contains");
173
337
  function countNines(min, len) {
174
338
  return Number(String(min).slice(0, -len) + "9".repeat(len));
175
339
  }
340
+ __name(countNines, "countNines");
176
341
  function countZeros(integer, zeros) {
177
342
  return integer - integer % Math.pow(10, zeros);
178
343
  }
344
+ __name(countZeros, "countZeros");
179
345
  function toQuantifier(digits) {
180
346
  let [start = 0, stop = ""] = digits;
181
- return stop || start > 1 ? `{${start + (stop ? "," + stop : "")}}` : "";
347
+ if (stop || start > 1) {
348
+ return `{${start + (stop ? "," + stop : "")}}`;
349
+ }
350
+ return "";
182
351
  }
352
+ __name(toQuantifier, "toQuantifier");
183
353
  function toCharacterClass(a, b, options) {
184
354
  return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
185
355
  }
356
+ __name(toCharacterClass, "toCharacterClass");
186
357
  function hasPadding(str) {
187
358
  return /^-?(0+)\d/.test(str);
188
359
  }
360
+ __name(hasPadding, "hasPadding");
189
361
  function padZeros(value, tok, options) {
190
- if (!tok.isPadded)
362
+ if (!tok.isPadded) {
191
363
  return value;
192
- let diff = Math.abs(tok.maxLen - String(value).length), relax = options.relaxZeros !== !1;
364
+ }
365
+ let diff = Math.abs(tok.maxLen - String(value).length);
366
+ let relax = options.relaxZeros !== false;
193
367
  switch (diff) {
194
368
  case 0:
195
369
  return "";
@@ -197,10 +371,12 @@ var require_to_regex_range = __commonJS({
197
371
  return relax ? "0?" : "0";
198
372
  case 2:
199
373
  return relax ? "0{0,2}" : "00";
200
- default:
374
+ default: {
201
375
  return relax ? `0{0,${diff}}` : `0{${diff}}`;
376
+ }
202
377
  }
203
378
  }
379
+ __name(padZeros, "padZeros");
204
380
  toRegexRange.cache = {};
205
381
  toRegexRange.clearCache = () => toRegexRange.cache = {};
206
382
  module.exports = toRegexRange;
@@ -211,83 +387,192 @@ var require_to_regex_range = __commonJS({
211
387
  var require_fill_range = __commonJS({
212
388
  "../../node_modules/fill-range/index.js"(exports, module) {
213
389
  "use strict";
214
- var util = __require("util"), toRegexRange = require_to_regex_range(), isObject = (val) => val !== null && typeof val == "object" && !Array.isArray(val), transform = (toNumber) => (value) => toNumber === !0 ? Number(value) : String(value), isValidValue = (value) => typeof value == "number" || typeof value == "string" && value !== "", isNumber = (num) => Number.isInteger(+num), zeros = (input) => {
215
- let value = `${input}`, index = -1;
216
- if (value[0] === "-" && (value = value.slice(1)), value === "0") return !1;
217
- for (; value[++index] === "0"; ) ;
390
+ var util = __require("util");
391
+ var toRegexRange = require_to_regex_range();
392
+ var isObject = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isObject");
393
+ var transform = /* @__PURE__ */ __name((toNumber) => {
394
+ return (value) => toNumber === true ? Number(value) : String(value);
395
+ }, "transform");
396
+ var isValidValue = /* @__PURE__ */ __name((value) => {
397
+ return typeof value === "number" || typeof value === "string" && value !== "";
398
+ }, "isValidValue");
399
+ var isNumber = /* @__PURE__ */ __name((num) => Number.isInteger(+num), "isNumber");
400
+ var zeros = /* @__PURE__ */ __name((input) => {
401
+ let value = `${input}`;
402
+ let index = -1;
403
+ if (value[0] === "-") value = value.slice(1);
404
+ if (value === "0") return false;
405
+ while (value[++index] === "0") ;
218
406
  return index > 0;
219
- }, stringify = (start, end, options) => typeof start == "string" || typeof end == "string" ? !0 : options.stringify === !0, pad = (input, maxLength, toNumber) => {
407
+ }, "zeros");
408
+ var stringify = /* @__PURE__ */ __name((start, end, options) => {
409
+ if (typeof start === "string" || typeof end === "string") {
410
+ return true;
411
+ }
412
+ return options.stringify === true;
413
+ }, "stringify");
414
+ var pad = /* @__PURE__ */ __name((input, maxLength, toNumber) => {
220
415
  if (maxLength > 0) {
221
416
  let dash = input[0] === "-" ? "-" : "";
222
- dash && (input = input.slice(1)), input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
417
+ if (dash) input = input.slice(1);
418
+ input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
419
+ }
420
+ if (toNumber === false) {
421
+ return String(input);
223
422
  }
224
- return toNumber === !1 ? String(input) : input;
225
- }, toMaxLen = (input, maxLength) => {
423
+ return input;
424
+ }, "pad");
425
+ var toMaxLen = /* @__PURE__ */ __name((input, maxLength) => {
226
426
  let negative = input[0] === "-" ? "-" : "";
227
- for (negative && (input = input.slice(1), maxLength--); input.length < maxLength; ) input = "0" + input;
427
+ if (negative) {
428
+ input = input.slice(1);
429
+ maxLength--;
430
+ }
431
+ while (input.length < maxLength) input = "0" + input;
228
432
  return negative ? "-" + input : input;
229
- }, toSequence = (parts, options, maxLen) => {
230
- parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0), parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
231
- let prefix = options.capture ? "" : "?:", positives = "", negatives = "", result;
232
- return parts.positives.length && (positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|")), parts.negatives.length && (negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`), positives && negatives ? result = `${positives}|${negatives}` : result = positives || negatives, options.wrap ? `(${prefix}${result})` : result;
233
- }, toRange = (a, b, isNumbers, options) => {
234
- if (isNumbers)
235
- return toRegexRange(a, b, { wrap: !1, ...options });
433
+ }, "toMaxLen");
434
+ var toSequence = /* @__PURE__ */ __name((parts, options, maxLen) => {
435
+ parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
436
+ parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
437
+ let prefix = options.capture ? "" : "?:";
438
+ let positives = "";
439
+ let negatives = "";
440
+ let result;
441
+ if (parts.positives.length) {
442
+ positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|");
443
+ }
444
+ if (parts.negatives.length) {
445
+ negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`;
446
+ }
447
+ if (positives && negatives) {
448
+ result = `${positives}|${negatives}`;
449
+ } else {
450
+ result = positives || negatives;
451
+ }
452
+ if (options.wrap) {
453
+ return `(${prefix}${result})`;
454
+ }
455
+ return result;
456
+ }, "toSequence");
457
+ var toRange = /* @__PURE__ */ __name((a, b, isNumbers, options) => {
458
+ if (isNumbers) {
459
+ return toRegexRange(a, b, { wrap: false, ...options });
460
+ }
236
461
  let start = String.fromCharCode(a);
237
462
  if (a === b) return start;
238
463
  let stop = String.fromCharCode(b);
239
464
  return `[${start}-${stop}]`;
240
- }, toRegex = (start, end, options) => {
465
+ }, "toRange");
466
+ var toRegex = /* @__PURE__ */ __name((start, end, options) => {
241
467
  if (Array.isArray(start)) {
242
- let wrap = options.wrap === !0, prefix = options.capture ? "" : "?:";
468
+ let wrap = options.wrap === true;
469
+ let prefix = options.capture ? "" : "?:";
243
470
  return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
244
471
  }
245
472
  return toRegexRange(start, end, options);
246
- }, rangeError = (...args) => new RangeError("Invalid range arguments: " + util.inspect(...args)), invalidRange = (start, end, options) => {
247
- if (options.strictRanges === !0) throw rangeError([start, end]);
473
+ }, "toRegex");
474
+ var rangeError = /* @__PURE__ */ __name((...args) => {
475
+ return new RangeError("Invalid range arguments: " + util.inspect(...args));
476
+ }, "rangeError");
477
+ var invalidRange = /* @__PURE__ */ __name((start, end, options) => {
478
+ if (options.strictRanges === true) throw rangeError([start, end]);
248
479
  return [];
249
- }, invalidStep = (step, options) => {
250
- if (options.strictRanges === !0)
480
+ }, "invalidRange");
481
+ var invalidStep = /* @__PURE__ */ __name((step, options) => {
482
+ if (options.strictRanges === true) {
251
483
  throw new TypeError(`Expected step "${step}" to be a number`);
484
+ }
252
485
  return [];
253
- }, fillNumbers = (start, end, step = 1, options = {}) => {
254
- let a = Number(start), b = Number(end);
486
+ }, "invalidStep");
487
+ var fillNumbers = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
488
+ let a = Number(start);
489
+ let b = Number(end);
255
490
  if (!Number.isInteger(a) || !Number.isInteger(b)) {
256
- if (options.strictRanges === !0) throw rangeError([start, end]);
491
+ if (options.strictRanges === true) throw rangeError([start, end]);
257
492
  return [];
258
493
  }
259
- a === 0 && (a = 0), b === 0 && (b = 0);
260
- let descending = a > b, startString = String(start), endString = String(end), stepString = String(step);
494
+ if (a === 0) a = 0;
495
+ if (b === 0) b = 0;
496
+ let descending = a > b;
497
+ let startString = String(start);
498
+ let endString = String(end);
499
+ let stepString = String(step);
261
500
  step = Math.max(Math.abs(step), 1);
262
- let padded = zeros(startString) || zeros(endString) || zeros(stepString), maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0, toNumber = padded === !1 && stringify(start, end, options) === !1, format = options.transform || transform(toNumber);
263
- if (options.toRegex && step === 1)
264
- return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), !0, options);
265
- let parts = { negatives: [], positives: [] }, push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)), range = [], index = 0;
266
- for (; descending ? a >= b : a <= b; )
267
- options.toRegex === !0 && step > 1 ? push(a) : range.push(pad(format(a, index), maxLen, toNumber)), a = descending ? a - step : a + step, index++;
268
- return options.toRegex === !0 ? step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: !1, ...options }) : range;
269
- }, fillLetters = (start, end, step = 1, options = {}) => {
270
- if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1)
501
+ let padded = zeros(startString) || zeros(endString) || zeros(stepString);
502
+ let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
503
+ let toNumber = padded === false && stringify(start, end, options) === false;
504
+ let format = options.transform || transform(toNumber);
505
+ if (options.toRegex && step === 1) {
506
+ return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
507
+ }
508
+ let parts = { negatives: [], positives: [] };
509
+ let push = /* @__PURE__ */ __name((num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)), "push");
510
+ let range = [];
511
+ let index = 0;
512
+ while (descending ? a >= b : a <= b) {
513
+ if (options.toRegex === true && step > 1) {
514
+ push(a);
515
+ } else {
516
+ range.push(pad(format(a, index), maxLen, toNumber));
517
+ }
518
+ a = descending ? a - step : a + step;
519
+ index++;
520
+ }
521
+ if (options.toRegex === true) {
522
+ return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options });
523
+ }
524
+ return range;
525
+ }, "fillNumbers");
526
+ var fillLetters = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
527
+ if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
271
528
  return invalidRange(start, end, options);
272
- let format = options.transform || ((val) => String.fromCharCode(val)), a = `${start}`.charCodeAt(0), b = `${end}`.charCodeAt(0), descending = a > b, min = Math.min(a, b), max = Math.max(a, b);
273
- if (options.toRegex && step === 1)
274
- return toRange(min, max, !1, options);
275
- let range = [], index = 0;
276
- for (; descending ? a >= b : a <= b; )
277
- range.push(format(a, index)), a = descending ? a - step : a + step, index++;
278
- return options.toRegex === !0 ? toRegex(range, null, { wrap: !1, options }) : range;
279
- }, fill = (start, end, step, options = {}) => {
280
- if (end == null && isValidValue(start))
529
+ }
530
+ let format = options.transform || ((val) => String.fromCharCode(val));
531
+ let a = `${start}`.charCodeAt(0);
532
+ let b = `${end}`.charCodeAt(0);
533
+ let descending = a > b;
534
+ let min = Math.min(a, b);
535
+ let max = Math.max(a, b);
536
+ if (options.toRegex && step === 1) {
537
+ return toRange(min, max, false, options);
538
+ }
539
+ let range = [];
540
+ let index = 0;
541
+ while (descending ? a >= b : a <= b) {
542
+ range.push(format(a, index));
543
+ a = descending ? a - step : a + step;
544
+ index++;
545
+ }
546
+ if (options.toRegex === true) {
547
+ return toRegex(range, null, { wrap: false, options });
548
+ }
549
+ return range;
550
+ }, "fillLetters");
551
+ var fill = /* @__PURE__ */ __name((start, end, step, options = {}) => {
552
+ if (end == null && isValidValue(start)) {
281
553
  return [start];
282
- if (!isValidValue(start) || !isValidValue(end))
554
+ }
555
+ if (!isValidValue(start) || !isValidValue(end)) {
283
556
  return invalidRange(start, end, options);
284
- if (typeof step == "function")
557
+ }
558
+ if (typeof step === "function") {
285
559
  return fill(start, end, 1, { transform: step });
286
- if (isObject(step))
560
+ }
561
+ if (isObject(step)) {
287
562
  return fill(start, end, 0, step);
563
+ }
288
564
  let opts = { ...options };
289
- return opts.capture === !0 && (opts.wrap = !0), step = step || opts.step || 1, isNumber(step) ? isNumber(start) && isNumber(end) ? fillNumbers(start, end, step, opts) : fillLetters(start, end, Math.max(Math.abs(step), 1), opts) : step != null && !isObject(step) ? invalidStep(step, opts) : fill(start, end, 1, step);
290
- };
565
+ if (opts.capture === true) opts.wrap = true;
566
+ step = step || opts.step || 1;
567
+ if (!isNumber(step)) {
568
+ if (step != null && !isObject(step)) return invalidStep(step, opts);
569
+ return fill(start, end, 1, step);
570
+ }
571
+ if (isNumber(start) && isNumber(end)) {
572
+ return fillNumbers(start, end, step, opts);
573
+ }
574
+ return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
575
+ }, "fill");
291
576
  module.exports = fill;
292
577
  }
293
578
  });
@@ -296,33 +581,50 @@ var require_fill_range = __commonJS({
296
581
  var require_compile = __commonJS({
297
582
  "../../node_modules/braces/lib/compile.js"(exports, module) {
298
583
  "use strict";
299
- var fill = require_fill_range(), utils = require_utils(), compile = (ast, options = {}) => {
300
- let walk = (node, parent = {}) => {
301
- let invalidBlock = utils.isInvalidBrace(parent), invalidNode = node.invalid === !0 && options.escapeInvalid === !0, invalid = invalidBlock === !0 || invalidNode === !0, prefix = options.escapeInvalid === !0 ? "\\" : "", output = "";
302
- if (node.isOpen === !0)
584
+ var fill = require_fill_range();
585
+ var utils = require_utils();
586
+ var compile = /* @__PURE__ */ __name((ast, options = {}) => {
587
+ const walk = /* @__PURE__ */ __name((node, parent = {}) => {
588
+ const invalidBlock = utils.isInvalidBrace(parent);
589
+ const invalidNode = node.invalid === true && options.escapeInvalid === true;
590
+ const invalid = invalidBlock === true || invalidNode === true;
591
+ const prefix = options.escapeInvalid === true ? "\\" : "";
592
+ let output = "";
593
+ if (node.isOpen === true) {
594
+ return prefix + node.value;
595
+ }
596
+ if (node.isClose === true) {
597
+ console.log("node.isClose", prefix, node.value);
303
598
  return prefix + node.value;
304
- if (node.isClose === !0)
305
- return console.log("node.isClose", prefix, node.value), prefix + node.value;
306
- if (node.type === "open")
599
+ }
600
+ if (node.type === "open") {
307
601
  return invalid ? prefix + node.value : "(";
308
- if (node.type === "close")
602
+ }
603
+ if (node.type === "close") {
309
604
  return invalid ? prefix + node.value : ")";
310
- if (node.type === "comma")
605
+ }
606
+ if (node.type === "comma") {
311
607
  return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
312
- if (node.value)
608
+ }
609
+ if (node.value) {
313
610
  return node.value;
611
+ }
314
612
  if (node.nodes && node.ranges > 0) {
315
- let args = utils.reduce(node.nodes), range = fill(...args, { ...options, wrap: !1, toRegex: !0, strictZeros: !0 });
316
- if (range.length !== 0)
613
+ const args = utils.reduce(node.nodes);
614
+ const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
615
+ if (range.length !== 0) {
317
616
  return args.length > 1 && range.length > 1 ? `(${range})` : range;
617
+ }
318
618
  }
319
- if (node.nodes)
320
- for (let child of node.nodes)
619
+ if (node.nodes) {
620
+ for (const child of node.nodes) {
321
621
  output += walk(child, node);
622
+ }
623
+ }
322
624
  return output;
323
- };
625
+ }, "walk");
324
626
  return walk(ast);
325
- };
627
+ }, "compile");
326
628
  module.exports = compile;
327
629
  }
328
630
  });
@@ -331,48 +633,74 @@ var require_compile = __commonJS({
331
633
  var require_expand = __commonJS({
332
634
  "../../node_modules/braces/lib/expand.js"(exports, module) {
333
635
  "use strict";
334
- var fill = require_fill_range(), stringify = require_stringify(), utils = require_utils(), append = (queue = "", stash = "", enclose = !1) => {
335
- let result = [];
336
- if (queue = [].concat(queue), stash = [].concat(stash), !stash.length) return queue;
337
- if (!queue.length)
636
+ var fill = require_fill_range();
637
+ var stringify = require_stringify();
638
+ var utils = require_utils();
639
+ var append = /* @__PURE__ */ __name((queue = "", stash = "", enclose = false) => {
640
+ const result = [];
641
+ queue = [].concat(queue);
642
+ stash = [].concat(stash);
643
+ if (!stash.length) return queue;
644
+ if (!queue.length) {
338
645
  return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
339
- for (let item of queue)
340
- if (Array.isArray(item))
341
- for (let value of item)
646
+ }
647
+ for (const item of queue) {
648
+ if (Array.isArray(item)) {
649
+ for (const value of item) {
342
650
  result.push(append(value, stash, enclose));
343
- else
344
- for (let ele of stash)
345
- enclose === !0 && typeof ele == "string" && (ele = `{${ele}}`), result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
651
+ }
652
+ } else {
653
+ for (let ele of stash) {
654
+ if (enclose === true && typeof ele === "string") ele = `{${ele}}`;
655
+ result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
656
+ }
657
+ }
658
+ }
346
659
  return utils.flatten(result);
347
- }, expand = (ast, options = {}) => {
348
- let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit, walk = (node, parent = {}) => {
660
+ }, "append");
661
+ var expand = /* @__PURE__ */ __name((ast, options = {}) => {
662
+ const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
663
+ const walk = /* @__PURE__ */ __name((node, parent = {}) => {
349
664
  node.queue = [];
350
- let p = parent, q = parent.queue;
351
- for (; p.type !== "brace" && p.type !== "root" && p.parent; )
352
- p = p.parent, q = p.queue;
665
+ let p = parent;
666
+ let q = parent.queue;
667
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
668
+ p = p.parent;
669
+ q = p.queue;
670
+ }
353
671
  if (node.invalid || node.dollar) {
354
672
  q.push(append(q.pop(), stringify(node, options)));
355
673
  return;
356
674
  }
357
- if (node.type === "brace" && node.invalid !== !0 && node.nodes.length === 2) {
675
+ if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
358
676
  q.push(append(q.pop(), ["{}"]));
359
677
  return;
360
678
  }
361
679
  if (node.nodes && node.ranges > 0) {
362
- let args = utils.reduce(node.nodes);
363
- if (utils.exceedsLimit(...args, options.step, rangeLimit))
680
+ const args = utils.reduce(node.nodes);
681
+ if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
364
682
  throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
683
+ }
365
684
  let range = fill(...args, options);
366
- range.length === 0 && (range = stringify(node, options)), q.push(append(q.pop(), range)), node.nodes = [];
685
+ if (range.length === 0) {
686
+ range = stringify(node, options);
687
+ }
688
+ q.push(append(q.pop(), range));
689
+ node.nodes = [];
367
690
  return;
368
691
  }
369
- let enclose = utils.encloseBrace(node), queue = node.queue, block = node;
370
- for (; block.type !== "brace" && block.type !== "root" && block.parent; )
371
- block = block.parent, queue = block.queue;
692
+ const enclose = utils.encloseBrace(node);
693
+ let queue = node.queue;
694
+ let block = node;
695
+ while (block.type !== "brace" && block.type !== "root" && block.parent) {
696
+ block = block.parent;
697
+ queue = block.queue;
698
+ }
372
699
  for (let i = 0; i < node.nodes.length; i++) {
373
- let child = node.nodes[i];
700
+ const child = node.nodes[i];
374
701
  if (child.type === "comma" && node.type === "brace") {
375
- i === 1 && queue.push(""), queue.push("");
702
+ if (i === 1) queue.push("");
703
+ queue.push("");
376
704
  continue;
377
705
  }
378
706
  if (child.type === "close") {
@@ -383,12 +711,14 @@ var require_expand = __commonJS({
383
711
  queue.push(append(queue.pop(), child.value));
384
712
  continue;
385
713
  }
386
- child.nodes && walk(child, node);
714
+ if (child.nodes) {
715
+ walk(child, node);
716
+ }
387
717
  }
388
718
  return queue;
389
- };
719
+ }, "walk");
390
720
  return utils.flatten(walk(ast));
391
- };
721
+ }, "expand");
392
722
  module.exports = expand;
393
723
  }
394
724
  });
@@ -460,8 +790,7 @@ var require_constants = __commonJS({
460
790
  /* { */
461
791
  CHAR_LEFT_SQUARE_BRACKET: "[",
462
792
  /* [ */
463
- CHAR_LINE_FEED: `
464
- `,
793
+ CHAR_LINE_FEED: "\n",
465
794
  /* \n */
466
795
  CHAR_NO_BREAK_SPACE: "\xA0",
467
796
  /* \u00A0 */
@@ -499,7 +828,8 @@ var require_constants = __commonJS({
499
828
  var require_parse = __commonJS({
500
829
  "../../node_modules/braces/lib/parse.js"(exports, module) {
501
830
  "use strict";
502
- var stringify = require_stringify(), {
831
+ var stringify = require_stringify();
832
+ var {
503
833
  MAX_LENGTH,
504
834
  CHAR_BACKSLASH,
505
835
  /* \ */
@@ -527,144 +857,207 @@ var require_parse = __commonJS({
527
857
  /* ' */
528
858
  CHAR_NO_BREAK_SPACE,
529
859
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
530
- } = require_constants(), parse = (input, options = {}) => {
531
- if (typeof input != "string")
860
+ } = require_constants();
861
+ var parse = /* @__PURE__ */ __name((input, options = {}) => {
862
+ if (typeof input !== "string") {
532
863
  throw new TypeError("Expected a string");
533
- let opts = options || {}, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
534
- if (input.length > max)
864
+ }
865
+ const opts = options || {};
866
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
867
+ if (input.length > max) {
535
868
  throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
536
- let ast = { type: "root", input, nodes: [] }, stack = [ast], block = ast, prev = ast, brackets = 0, length = input.length, index = 0, depth = 0, value, advance = () => input[index++], push = (node) => {
537
- if (node.type === "text" && prev.type === "dot" && (prev.type = "text"), prev && prev.type === "text" && node.type === "text") {
869
+ }
870
+ const ast = { type: "root", input, nodes: [] };
871
+ const stack = [ast];
872
+ let block = ast;
873
+ let prev = ast;
874
+ let brackets = 0;
875
+ const length = input.length;
876
+ let index = 0;
877
+ let depth = 0;
878
+ let value;
879
+ const advance = /* @__PURE__ */ __name(() => input[index++], "advance");
880
+ const push = /* @__PURE__ */ __name((node) => {
881
+ if (node.type === "text" && prev.type === "dot") {
882
+ prev.type = "text";
883
+ }
884
+ if (prev && prev.type === "text" && node.type === "text") {
538
885
  prev.value += node.value;
539
886
  return;
540
887
  }
541
- return block.nodes.push(node), node.parent = block, node.prev = prev, prev = node, node;
542
- };
543
- for (push({ type: "bos" }); index < length; )
544
- if (block = stack[stack.length - 1], value = advance(), !(value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE)) {
545
- if (value === CHAR_BACKSLASH) {
546
- push({ type: "text", value: (options.keepEscaping ? value : "") + advance() });
547
- continue;
548
- }
549
- if (value === CHAR_RIGHT_SQUARE_BRACKET) {
550
- push({ type: "text", value: "\\" + value });
551
- continue;
552
- }
553
- if (value === CHAR_LEFT_SQUARE_BRACKET) {
554
- brackets++;
555
- let next;
556
- for (; index < length && (next = advance()); ) {
557
- if (value += next, next === CHAR_LEFT_SQUARE_BRACKET) {
558
- brackets++;
559
- continue;
560
- }
561
- if (next === CHAR_BACKSLASH) {
562
- value += advance();
563
- continue;
564
- }
565
- if (next === CHAR_RIGHT_SQUARE_BRACKET && (brackets--, brackets === 0))
888
+ block.nodes.push(node);
889
+ node.parent = block;
890
+ node.prev = prev;
891
+ prev = node;
892
+ return node;
893
+ }, "push");
894
+ push({ type: "bos" });
895
+ while (index < length) {
896
+ block = stack[stack.length - 1];
897
+ value = advance();
898
+ if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
899
+ continue;
900
+ }
901
+ if (value === CHAR_BACKSLASH) {
902
+ push({ type: "text", value: (options.keepEscaping ? value : "") + advance() });
903
+ continue;
904
+ }
905
+ if (value === CHAR_RIGHT_SQUARE_BRACKET) {
906
+ push({ type: "text", value: "\\" + value });
907
+ continue;
908
+ }
909
+ if (value === CHAR_LEFT_SQUARE_BRACKET) {
910
+ brackets++;
911
+ let next;
912
+ while (index < length && (next = advance())) {
913
+ value += next;
914
+ if (next === CHAR_LEFT_SQUARE_BRACKET) {
915
+ brackets++;
916
+ continue;
917
+ }
918
+ if (next === CHAR_BACKSLASH) {
919
+ value += advance();
920
+ continue;
921
+ }
922
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
923
+ brackets--;
924
+ if (brackets === 0) {
566
925
  break;
926
+ }
567
927
  }
928
+ }
929
+ push({ type: "text", value });
930
+ continue;
931
+ }
932
+ if (value === CHAR_LEFT_PARENTHESES) {
933
+ block = push({ type: "paren", nodes: [] });
934
+ stack.push(block);
935
+ push({ type: "text", value });
936
+ continue;
937
+ }
938
+ if (value === CHAR_RIGHT_PARENTHESES) {
939
+ if (block.type !== "paren") {
568
940
  push({ type: "text", value });
569
941
  continue;
570
942
  }
571
- if (value === CHAR_LEFT_PARENTHESES) {
572
- block = push({ type: "paren", nodes: [] }), stack.push(block), push({ type: "text", value });
573
- continue;
943
+ block = stack.pop();
944
+ push({ type: "text", value });
945
+ block = stack[stack.length - 1];
946
+ continue;
947
+ }
948
+ if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
949
+ const open = value;
950
+ let next;
951
+ if (options.keepQuotes !== true) {
952
+ value = "";
574
953
  }
575
- if (value === CHAR_RIGHT_PARENTHESES) {
576
- if (block.type !== "paren") {
577
- push({ type: "text", value });
954
+ while (index < length && (next = advance())) {
955
+ if (next === CHAR_BACKSLASH) {
956
+ value += next + advance();
578
957
  continue;
579
958
  }
580
- block = stack.pop(), push({ type: "text", value }), block = stack[stack.length - 1];
581
- continue;
582
- }
583
- if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
584
- let open = value, next;
585
- for (options.keepQuotes !== !0 && (value = ""); index < length && (next = advance()); ) {
586
- if (next === CHAR_BACKSLASH) {
587
- value += next + advance();
588
- continue;
589
- }
590
- if (next === open) {
591
- options.keepQuotes === !0 && (value += next);
592
- break;
593
- }
594
- value += next;
959
+ if (next === open) {
960
+ if (options.keepQuotes === true) value += next;
961
+ break;
595
962
  }
963
+ value += next;
964
+ }
965
+ push({ type: "text", value });
966
+ continue;
967
+ }
968
+ if (value === CHAR_LEFT_CURLY_BRACE) {
969
+ depth++;
970
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
971
+ const brace = {
972
+ type: "brace",
973
+ open: true,
974
+ close: false,
975
+ dollar,
976
+ depth,
977
+ commas: 0,
978
+ ranges: 0,
979
+ nodes: []
980
+ };
981
+ block = push(brace);
982
+ stack.push(block);
983
+ push({ type: "open", value });
984
+ continue;
985
+ }
986
+ if (value === CHAR_RIGHT_CURLY_BRACE) {
987
+ if (block.type !== "brace") {
596
988
  push({ type: "text", value });
597
989
  continue;
598
990
  }
599
- if (value === CHAR_LEFT_CURLY_BRACE) {
600
- depth++;
601
- let brace = {
602
- type: "brace",
603
- open: !0,
604
- close: !1,
605
- dollar: prev.value && prev.value.slice(-1) === "$" || block.dollar === !0,
606
- depth,
607
- commas: 0,
608
- ranges: 0,
609
- nodes: []
610
- };
611
- block = push(brace), stack.push(block), push({ type: "open", value });
612
- continue;
991
+ const type = "close";
992
+ block = stack.pop();
993
+ block.close = true;
994
+ push({ type, value });
995
+ depth--;
996
+ block = stack[stack.length - 1];
997
+ continue;
998
+ }
999
+ if (value === CHAR_COMMA && depth > 0) {
1000
+ if (block.ranges > 0) {
1001
+ block.ranges = 0;
1002
+ const open = block.nodes.shift();
1003
+ block.nodes = [open, { type: "text", value: stringify(block) }];
613
1004
  }
614
- if (value === CHAR_RIGHT_CURLY_BRACE) {
615
- if (block.type !== "brace") {
616
- push({ type: "text", value });
617
- continue;
618
- }
619
- let type = "close";
620
- block = stack.pop(), block.close = !0, push({ type, value }), depth--, block = stack[stack.length - 1];
1005
+ push({ type: "comma", value });
1006
+ block.commas++;
1007
+ continue;
1008
+ }
1009
+ if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
1010
+ const siblings = block.nodes;
1011
+ if (depth === 0 || siblings.length === 0) {
1012
+ push({ type: "text", value });
621
1013
  continue;
622
1014
  }
623
- if (value === CHAR_COMMA && depth > 0) {
624
- if (block.ranges > 0) {
1015
+ if (prev.type === "dot") {
1016
+ block.range = [];
1017
+ prev.value += value;
1018
+ prev.type = "range";
1019
+ if (block.nodes.length !== 3 && block.nodes.length !== 5) {
1020
+ block.invalid = true;
625
1021
  block.ranges = 0;
626
- let open = block.nodes.shift();
627
- block.nodes = [open, { type: "text", value: stringify(block) }];
1022
+ prev.type = "text";
1023
+ continue;
628
1024
  }
629
- push({ type: "comma", value }), block.commas++;
1025
+ block.ranges++;
1026
+ block.args = [];
630
1027
  continue;
631
1028
  }
632
- if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
633
- let siblings = block.nodes;
634
- if (depth === 0 || siblings.length === 0) {
635
- push({ type: "text", value });
636
- continue;
637
- }
638
- if (prev.type === "dot") {
639
- if (block.range = [], prev.value += value, prev.type = "range", block.nodes.length !== 3 && block.nodes.length !== 5) {
640
- block.invalid = !0, block.ranges = 0, prev.type = "text";
641
- continue;
642
- }
643
- block.ranges++, block.args = [];
644
- continue;
645
- }
646
- if (prev.type === "range") {
647
- siblings.pop();
648
- let before = siblings[siblings.length - 1];
649
- before.value += prev.value + value, prev = before, block.ranges--;
650
- continue;
651
- }
652
- push({ type: "dot", value });
1029
+ if (prev.type === "range") {
1030
+ siblings.pop();
1031
+ const before = siblings[siblings.length - 1];
1032
+ before.value += prev.value + value;
1033
+ prev = before;
1034
+ block.ranges--;
653
1035
  continue;
654
1036
  }
655
- push({ type: "text", value });
1037
+ push({ type: "dot", value });
1038
+ continue;
656
1039
  }
657
- do
658
- if (block = stack.pop(), block.type !== "root") {
1040
+ push({ type: "text", value });
1041
+ }
1042
+ do {
1043
+ block = stack.pop();
1044
+ if (block.type !== "root") {
659
1045
  block.nodes.forEach((node) => {
660
- node.nodes || (node.type === "open" && (node.isOpen = !0), node.type === "close" && (node.isClose = !0), node.nodes || (node.type = "text"), node.invalid = !0);
1046
+ if (!node.nodes) {
1047
+ if (node.type === "open") node.isOpen = true;
1048
+ if (node.type === "close") node.isClose = true;
1049
+ if (!node.nodes) node.type = "text";
1050
+ node.invalid = true;
1051
+ }
661
1052
  });
662
- let parent = stack[stack.length - 1], index2 = parent.nodes.indexOf(block);
1053
+ const parent = stack[stack.length - 1];
1054
+ const index2 = parent.nodes.indexOf(block);
663
1055
  parent.nodes.splice(index2, 1, ...block.nodes);
664
1056
  }
665
- while (stack.length > 0);
666
- return push({ type: "eos" }), ast;
667
- };
1057
+ } while (stack.length > 0);
1058
+ push({ type: "eos" });
1059
+ return ast;
1060
+ }, "parse");
668
1061
  module.exports = parse;
669
1062
  }
670
1063
  });
@@ -673,26 +1066,61 @@ var require_parse = __commonJS({
673
1066
  var require_braces = __commonJS({
674
1067
  "../../node_modules/braces/index.js"(exports, module) {
675
1068
  "use strict";
676
- var stringify = require_stringify(), compile = require_compile(), expand = require_expand(), parse = require_parse(), braces = (input, options = {}) => {
1069
+ var stringify = require_stringify();
1070
+ var compile = require_compile();
1071
+ var expand = require_expand();
1072
+ var parse = require_parse();
1073
+ var braces = /* @__PURE__ */ __name((input, options = {}) => {
677
1074
  let output = [];
678
- if (Array.isArray(input))
679
- for (let pattern of input) {
680
- let result = braces.create(pattern, options);
681
- Array.isArray(result) ? output.push(...result) : output.push(result);
1075
+ if (Array.isArray(input)) {
1076
+ for (const pattern of input) {
1077
+ const result = braces.create(pattern, options);
1078
+ if (Array.isArray(result)) {
1079
+ output.push(...result);
1080
+ } else {
1081
+ output.push(result);
1082
+ }
682
1083
  }
683
- else
1084
+ } else {
684
1085
  output = [].concat(braces.create(input, options));
685
- return options && options.expand === !0 && options.nodupes === !0 && (output = [...new Set(output)]), output;
686
- };
1086
+ }
1087
+ if (options && options.expand === true && options.nodupes === true) {
1088
+ output = [...new Set(output)];
1089
+ }
1090
+ return output;
1091
+ }, "braces");
687
1092
  braces.parse = (input, options = {}) => parse(input, options);
688
- braces.stringify = (input, options = {}) => stringify(typeof input == "string" ? braces.parse(input, options) : input, options);
689
- braces.compile = (input, options = {}) => (typeof input == "string" && (input = braces.parse(input, options)), compile(input, options));
1093
+ braces.stringify = (input, options = {}) => {
1094
+ if (typeof input === "string") {
1095
+ return stringify(braces.parse(input, options), options);
1096
+ }
1097
+ return stringify(input, options);
1098
+ };
1099
+ braces.compile = (input, options = {}) => {
1100
+ if (typeof input === "string") {
1101
+ input = braces.parse(input, options);
1102
+ }
1103
+ return compile(input, options);
1104
+ };
690
1105
  braces.expand = (input, options = {}) => {
691
- typeof input == "string" && (input = braces.parse(input, options));
1106
+ if (typeof input === "string") {
1107
+ input = braces.parse(input, options);
1108
+ }
692
1109
  let result = expand(input, options);
693
- return options.noempty === !0 && (result = result.filter(Boolean)), options.nodupes === !0 && (result = [...new Set(result)]), result;
1110
+ if (options.noempty === true) {
1111
+ result = result.filter(Boolean);
1112
+ }
1113
+ if (options.nodupes === true) {
1114
+ result = [...new Set(result)];
1115
+ }
1116
+ return result;
1117
+ };
1118
+ braces.create = (input, options = {}) => {
1119
+ if (input === "" || input.length < 3) {
1120
+ return [input];
1121
+ }
1122
+ return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
694
1123
  };
695
- braces.create = (input, options = {}) => input === "" || input.length < 3 ? [input] : options.expand !== !0 ? braces.compile(input, options) : braces.expand(input, options);
696
1124
  module.exports = braces;
697
1125
  }
698
1126
  });
@@ -701,7 +1129,25 @@ var require_braces = __commonJS({
701
1129
  var require_constants2 = __commonJS({
702
1130
  "../../node_modules/picomatch/lib/constants.js"(exports, module) {
703
1131
  "use strict";
704
- var path = __require("path"), WIN_SLASH = "\\\\/", WIN_NO_SLASH = `[^${WIN_SLASH}]`, DOT_LITERAL = "\\.", PLUS_LITERAL = "\\+", QMARK_LITERAL = "\\?", SLASH_LITERAL = "\\/", ONE_CHAR = "(?=.)", QMARK = "[^/]", END_ANCHOR = `(?:${SLASH_LITERAL}|$)`, START_ANCHOR = `(?:^|${SLASH_LITERAL})`, DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`, NO_DOT = `(?!${DOT_LITERAL})`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`, STAR = `${QMARK}*?`, POSIX_CHARS = {
1132
+ var path = __require("path");
1133
+ var WIN_SLASH = "\\\\/";
1134
+ var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1135
+ var DOT_LITERAL = "\\.";
1136
+ var PLUS_LITERAL = "\\+";
1137
+ var QMARK_LITERAL = "\\?";
1138
+ var SLASH_LITERAL = "\\/";
1139
+ var ONE_CHAR = "(?=.)";
1140
+ var QMARK = "[^/]";
1141
+ var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
1142
+ var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
1143
+ var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
1144
+ var NO_DOT = `(?!${DOT_LITERAL})`;
1145
+ var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
1146
+ var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
1147
+ var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
1148
+ var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
1149
+ var STAR = `${QMARK}*?`;
1150
+ var POSIX_CHARS = {
705
1151
  DOT_LITERAL,
706
1152
  PLUS_LITERAL,
707
1153
  QMARK_LITERAL,
@@ -717,7 +1163,8 @@ var require_constants2 = __commonJS({
717
1163
  QMARK_NO_DOT,
718
1164
  STAR,
719
1165
  START_ANCHOR
720
- }, WINDOWS_CHARS = {
1166
+ };
1167
+ var WINDOWS_CHARS = {
721
1168
  ...POSIX_CHARS,
722
1169
  SLASH_LITERAL: `[${WIN_SLASH}]`,
723
1170
  QMARK: WIN_NO_SLASH,
@@ -730,7 +1177,8 @@ var require_constants2 = __commonJS({
730
1177
  QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
731
1178
  START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
732
1179
  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
733
- }, POSIX_REGEX_SOURCE = {
1180
+ };
1181
+ var POSIX_REGEX_SOURCE = {
734
1182
  alnum: "a-zA-Z0-9",
735
1183
  alpha: "a-zA-Z",
736
1184
  ascii: "\\x00-\\x7F",
@@ -868,7 +1316,7 @@ var require_constants2 = __commonJS({
868
1316
  * Create GLOB_CHARS
869
1317
  */
870
1318
  globChars(win32) {
871
- return win32 === !0 ? WINDOWS_CHARS : POSIX_CHARS;
1319
+ return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
872
1320
  }
873
1321
  };
874
1322
  }
@@ -878,34 +1326,59 @@ var require_constants2 = __commonJS({
878
1326
  var require_utils2 = __commonJS({
879
1327
  "../../node_modules/picomatch/lib/utils.js"(exports) {
880
1328
  "use strict";
881
- var path = __require("path"), win32 = process.platform === "win32", {
1329
+ var path = __require("path");
1330
+ var win32 = process.platform === "win32";
1331
+ var {
882
1332
  REGEX_BACKSLASH,
883
1333
  REGEX_REMOVE_BACKSLASH,
884
1334
  REGEX_SPECIAL_CHARS,
885
1335
  REGEX_SPECIAL_CHARS_GLOBAL
886
1336
  } = require_constants2();
887
- exports.isObject = (val) => val !== null && typeof val == "object" && !Array.isArray(val);
1337
+ exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
888
1338
  exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
889
1339
  exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
890
1340
  exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
891
1341
  exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
892
- exports.removeBackslashes = (str) => str.replace(REGEX_REMOVE_BACKSLASH, (match2) => match2 === "\\" ? "" : match2);
1342
+ exports.removeBackslashes = (str) => {
1343
+ return str.replace(REGEX_REMOVE_BACKSLASH, (match2) => {
1344
+ return match2 === "\\" ? "" : match2;
1345
+ });
1346
+ };
893
1347
  exports.supportsLookbehinds = () => {
894
- let segs = process.version.slice(1).split(".").map(Number);
895
- return segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10;
1348
+ const segs = process.version.slice(1).split(".").map(Number);
1349
+ if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
1350
+ return true;
1351
+ }
1352
+ return false;
1353
+ };
1354
+ exports.isWindows = (options) => {
1355
+ if (options && typeof options.windows === "boolean") {
1356
+ return options.windows;
1357
+ }
1358
+ return win32 === true || path.sep === "\\";
896
1359
  };
897
- exports.isWindows = (options) => options && typeof options.windows == "boolean" ? options.windows : win32 === !0 || path.sep === "\\";
898
1360
  exports.escapeLast = (input, char, lastIdx) => {
899
- let idx = input.lastIndexOf(char, lastIdx);
900
- return idx === -1 ? input : input[idx - 1] === "\\" ? exports.escapeLast(input, char, idx - 1) : `${input.slice(0, idx)}\\${input.slice(idx)}`;
1361
+ const idx = input.lastIndexOf(char, lastIdx);
1362
+ if (idx === -1) return input;
1363
+ if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
1364
+ return `${input.slice(0, idx)}\\${input.slice(idx)}`;
901
1365
  };
902
1366
  exports.removePrefix = (input, state = {}) => {
903
1367
  let output = input;
904
- return output.startsWith("./") && (output = output.slice(2), state.prefix = "./"), output;
1368
+ if (output.startsWith("./")) {
1369
+ output = output.slice(2);
1370
+ state.prefix = "./";
1371
+ }
1372
+ return output;
905
1373
  };
906
1374
  exports.wrapOutput = (input, state = {}, options = {}) => {
907
- let prepend = options.contains ? "" : "^", append = options.contains ? "" : "$", output = `${prepend}(?:${input})${append}`;
908
- return state.negated === !0 && (output = `(?:^(?!${output}).*$)`), output;
1375
+ const prepend = options.contains ? "" : "^";
1376
+ const append = options.contains ? "" : "$";
1377
+ let output = `${prepend}(?:${input})${append}`;
1378
+ if (state.negated === true) {
1379
+ output = `(?:^(?!${output}).*$)`;
1380
+ }
1381
+ return output;
909
1382
  };
910
1383
  }
911
1384
  });
@@ -914,7 +1387,8 @@ var require_utils2 = __commonJS({
914
1387
  var require_scan = __commonJS({
915
1388
  "../../node_modules/picomatch/lib/scan.js"(exports, module) {
916
1389
  "use strict";
917
- var utils = require_utils2(), {
1390
+ var utils = require_utils2();
1391
+ var {
918
1392
  CHAR_ASTERISK,
919
1393
  /* * */
920
1394
  CHAR_AT,
@@ -945,48 +1419,107 @@ var require_scan = __commonJS({
945
1419
  /* ) */
946
1420
  CHAR_RIGHT_SQUARE_BRACKET
947
1421
  /* ] */
948
- } = require_constants2(), isPathSeparator = (code) => code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH, depth = (token) => {
949
- token.isPrefix !== !0 && (token.depth = token.isGlobstar ? 1 / 0 : 1);
950
- }, scan = (input, options) => {
951
- let opts = options || {}, length = input.length - 1, scanToEnd = opts.parts === !0 || opts.scanToEnd === !0, slashes = [], tokens = [], parts = [], str = input, index = -1, start = 0, lastIndex = 0, isBrace = !1, isBracket = !1, isGlob = !1, isExtglob = !1, isGlobstar = !1, braceEscaped = !1, backslashes = !1, negated = !1, negatedExtglob = !1, finished = !1, braces = 0, prev, code, token = { value: "", depth: 0, isGlob: !1 }, eos = () => index >= length, peek = () => str.charCodeAt(index + 1), advance = () => (prev = code, str.charCodeAt(++index));
952
- for (; index < length; ) {
1422
+ } = require_constants2();
1423
+ var isPathSeparator = /* @__PURE__ */ __name((code) => {
1424
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
1425
+ }, "isPathSeparator");
1426
+ var depth = /* @__PURE__ */ __name((token) => {
1427
+ if (token.isPrefix !== true) {
1428
+ token.depth = token.isGlobstar ? Infinity : 1;
1429
+ }
1430
+ }, "depth");
1431
+ var scan = /* @__PURE__ */ __name((input, options) => {
1432
+ const opts = options || {};
1433
+ const length = input.length - 1;
1434
+ const scanToEnd = opts.parts === true || opts.scanToEnd === true;
1435
+ const slashes = [];
1436
+ const tokens = [];
1437
+ const parts = [];
1438
+ let str = input;
1439
+ let index = -1;
1440
+ let start = 0;
1441
+ let lastIndex = 0;
1442
+ let isBrace = false;
1443
+ let isBracket = false;
1444
+ let isGlob = false;
1445
+ let isExtglob = false;
1446
+ let isGlobstar = false;
1447
+ let braceEscaped = false;
1448
+ let backslashes = false;
1449
+ let negated = false;
1450
+ let negatedExtglob = false;
1451
+ let finished = false;
1452
+ let braces = 0;
1453
+ let prev;
1454
+ let code;
1455
+ let token = { value: "", depth: 0, isGlob: false };
1456
+ const eos = /* @__PURE__ */ __name(() => index >= length, "eos");
1457
+ const peek = /* @__PURE__ */ __name(() => str.charCodeAt(index + 1), "peek");
1458
+ const advance = /* @__PURE__ */ __name(() => {
1459
+ prev = code;
1460
+ return str.charCodeAt(++index);
1461
+ }, "advance");
1462
+ while (index < length) {
953
1463
  code = advance();
954
1464
  let next;
955
1465
  if (code === CHAR_BACKWARD_SLASH) {
956
- backslashes = token.backslashes = !0, code = advance(), code === CHAR_LEFT_CURLY_BRACE && (braceEscaped = !0);
1466
+ backslashes = token.backslashes = true;
1467
+ code = advance();
1468
+ if (code === CHAR_LEFT_CURLY_BRACE) {
1469
+ braceEscaped = true;
1470
+ }
957
1471
  continue;
958
1472
  }
959
- if (braceEscaped === !0 || code === CHAR_LEFT_CURLY_BRACE) {
960
- for (braces++; eos() !== !0 && (code = advance()); ) {
1473
+ if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
1474
+ braces++;
1475
+ while (eos() !== true && (code = advance())) {
961
1476
  if (code === CHAR_BACKWARD_SLASH) {
962
- backslashes = token.backslashes = !0, advance();
1477
+ backslashes = token.backslashes = true;
1478
+ advance();
963
1479
  continue;
964
1480
  }
965
1481
  if (code === CHAR_LEFT_CURLY_BRACE) {
966
1482
  braces++;
967
1483
  continue;
968
1484
  }
969
- if (braceEscaped !== !0 && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
970
- if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
1485
+ if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
1486
+ isBrace = token.isBrace = true;
1487
+ isGlob = token.isGlob = true;
1488
+ finished = true;
1489
+ if (scanToEnd === true) {
971
1490
  continue;
1491
+ }
972
1492
  break;
973
1493
  }
974
- if (braceEscaped !== !0 && code === CHAR_COMMA) {
975
- if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
1494
+ if (braceEscaped !== true && code === CHAR_COMMA) {
1495
+ isBrace = token.isBrace = true;
1496
+ isGlob = token.isGlob = true;
1497
+ finished = true;
1498
+ if (scanToEnd === true) {
976
1499
  continue;
1500
+ }
977
1501
  break;
978
1502
  }
979
- if (code === CHAR_RIGHT_CURLY_BRACE && (braces--, braces === 0)) {
980
- braceEscaped = !1, isBrace = token.isBrace = !0, finished = !0;
981
- break;
1503
+ if (code === CHAR_RIGHT_CURLY_BRACE) {
1504
+ braces--;
1505
+ if (braces === 0) {
1506
+ braceEscaped = false;
1507
+ isBrace = token.isBrace = true;
1508
+ finished = true;
1509
+ break;
1510
+ }
982
1511
  }
983
1512
  }
984
- if (scanToEnd === !0)
1513
+ if (scanToEnd === true) {
985
1514
  continue;
1515
+ }
986
1516
  break;
987
1517
  }
988
1518
  if (code === CHAR_FORWARD_SLASH) {
989
- if (slashes.push(index), tokens.push(token), token = { value: "", depth: 0, isGlob: !1 }, finished === !0) continue;
1519
+ slashes.push(index);
1520
+ tokens.push(token);
1521
+ token = { value: "", depth: 0, isGlob: false };
1522
+ if (finished === true) continue;
990
1523
  if (prev === CHAR_DOT && index === start + 1) {
991
1524
  start += 2;
992
1525
  continue;
@@ -994,60 +1527,85 @@ var require_scan = __commonJS({
994
1527
  lastIndex = index + 1;
995
1528
  continue;
996
1529
  }
997
- if (opts.noext !== !0 && (code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) === !0 && peek() === CHAR_LEFT_PARENTHESES) {
998
- if (isGlob = token.isGlob = !0, isExtglob = token.isExtglob = !0, finished = !0, code === CHAR_EXCLAMATION_MARK && index === start && (negatedExtglob = !0), scanToEnd === !0) {
999
- for (; eos() !== !0 && (code = advance()); ) {
1000
- if (code === CHAR_BACKWARD_SLASH) {
1001
- backslashes = token.backslashes = !0, code = advance();
1002
- continue;
1003
- }
1004
- if (code === CHAR_RIGHT_PARENTHESES) {
1005
- isGlob = token.isGlob = !0, finished = !0;
1006
- break;
1530
+ if (opts.noext !== true) {
1531
+ const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
1532
+ if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
1533
+ isGlob = token.isGlob = true;
1534
+ isExtglob = token.isExtglob = true;
1535
+ finished = true;
1536
+ if (code === CHAR_EXCLAMATION_MARK && index === start) {
1537
+ negatedExtglob = true;
1538
+ }
1539
+ if (scanToEnd === true) {
1540
+ while (eos() !== true && (code = advance())) {
1541
+ if (code === CHAR_BACKWARD_SLASH) {
1542
+ backslashes = token.backslashes = true;
1543
+ code = advance();
1544
+ continue;
1545
+ }
1546
+ if (code === CHAR_RIGHT_PARENTHESES) {
1547
+ isGlob = token.isGlob = true;
1548
+ finished = true;
1549
+ break;
1550
+ }
1007
1551
  }
1552
+ continue;
1008
1553
  }
1009
- continue;
1554
+ break;
1010
1555
  }
1011
- break;
1012
1556
  }
1013
1557
  if (code === CHAR_ASTERISK) {
1014
- if (prev === CHAR_ASTERISK && (isGlobstar = token.isGlobstar = !0), isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
1558
+ if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
1559
+ isGlob = token.isGlob = true;
1560
+ finished = true;
1561
+ if (scanToEnd === true) {
1015
1562
  continue;
1563
+ }
1016
1564
  break;
1017
1565
  }
1018
1566
  if (code === CHAR_QUESTION_MARK) {
1019
- if (isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
1567
+ isGlob = token.isGlob = true;
1568
+ finished = true;
1569
+ if (scanToEnd === true) {
1020
1570
  continue;
1571
+ }
1021
1572
  break;
1022
1573
  }
1023
1574
  if (code === CHAR_LEFT_SQUARE_BRACKET) {
1024
- for (; eos() !== !0 && (next = advance()); ) {
1575
+ while (eos() !== true && (next = advance())) {
1025
1576
  if (next === CHAR_BACKWARD_SLASH) {
1026
- backslashes = token.backslashes = !0, advance();
1577
+ backslashes = token.backslashes = true;
1578
+ advance();
1027
1579
  continue;
1028
1580
  }
1029
1581
  if (next === CHAR_RIGHT_SQUARE_BRACKET) {
1030
- isBracket = token.isBracket = !0, isGlob = token.isGlob = !0, finished = !0;
1582
+ isBracket = token.isBracket = true;
1583
+ isGlob = token.isGlob = true;
1584
+ finished = true;
1031
1585
  break;
1032
1586
  }
1033
1587
  }
1034
- if (scanToEnd === !0)
1588
+ if (scanToEnd === true) {
1035
1589
  continue;
1590
+ }
1036
1591
  break;
1037
1592
  }
1038
- if (opts.nonegate !== !0 && code === CHAR_EXCLAMATION_MARK && index === start) {
1039
- negated = token.negated = !0, start++;
1593
+ if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
1594
+ negated = token.negated = true;
1595
+ start++;
1040
1596
  continue;
1041
1597
  }
1042
- if (opts.noparen !== !0 && code === CHAR_LEFT_PARENTHESES) {
1043
- if (isGlob = token.isGlob = !0, scanToEnd === !0) {
1044
- for (; eos() !== !0 && (code = advance()); ) {
1598
+ if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
1599
+ isGlob = token.isGlob = true;
1600
+ if (scanToEnd === true) {
1601
+ while (eos() !== true && (code = advance())) {
1045
1602
  if (code === CHAR_LEFT_PARENTHESES) {
1046
- backslashes = token.backslashes = !0, code = advance();
1603
+ backslashes = token.backslashes = true;
1604
+ code = advance();
1047
1605
  continue;
1048
1606
  }
1049
1607
  if (code === CHAR_RIGHT_PARENTHESES) {
1050
- finished = !0;
1608
+ finished = true;
1051
1609
  break;
1052
1610
  }
1053
1611
  }
@@ -1055,16 +1613,47 @@ var require_scan = __commonJS({
1055
1613
  }
1056
1614
  break;
1057
1615
  }
1058
- if (isGlob === !0) {
1059
- if (finished = !0, scanToEnd === !0)
1616
+ if (isGlob === true) {
1617
+ finished = true;
1618
+ if (scanToEnd === true) {
1060
1619
  continue;
1620
+ }
1061
1621
  break;
1062
1622
  }
1063
1623
  }
1064
- opts.noext === !0 && (isExtglob = !1, isGlob = !1);
1065
- let base = str, prefix = "", glob = "";
1066
- start > 0 && (prefix = str.slice(0, start), str = str.slice(start), lastIndex -= start), base && isGlob === !0 && lastIndex > 0 ? (base = str.slice(0, lastIndex), glob = str.slice(lastIndex)) : isGlob === !0 ? (base = "", glob = str) : base = str, base && base !== "" && base !== "/" && base !== str && isPathSeparator(base.charCodeAt(base.length - 1)) && (base = base.slice(0, -1)), opts.unescape === !0 && (glob && (glob = utils.removeBackslashes(glob)), base && backslashes === !0 && (base = utils.removeBackslashes(base)));
1067
- let state = {
1624
+ if (opts.noext === true) {
1625
+ isExtglob = false;
1626
+ isGlob = false;
1627
+ }
1628
+ let base = str;
1629
+ let prefix = "";
1630
+ let glob = "";
1631
+ if (start > 0) {
1632
+ prefix = str.slice(0, start);
1633
+ str = str.slice(start);
1634
+ lastIndex -= start;
1635
+ }
1636
+ if (base && isGlob === true && lastIndex > 0) {
1637
+ base = str.slice(0, lastIndex);
1638
+ glob = str.slice(lastIndex);
1639
+ } else if (isGlob === true) {
1640
+ base = "";
1641
+ glob = str;
1642
+ } else {
1643
+ base = str;
1644
+ }
1645
+ if (base && base !== "" && base !== "/" && base !== str) {
1646
+ if (isPathSeparator(base.charCodeAt(base.length - 1))) {
1647
+ base = base.slice(0, -1);
1648
+ }
1649
+ }
1650
+ if (opts.unescape === true) {
1651
+ if (glob) glob = utils.removeBackslashes(glob);
1652
+ if (base && backslashes === true) {
1653
+ base = utils.removeBackslashes(base);
1654
+ }
1655
+ }
1656
+ const state = {
1068
1657
  prefix,
1069
1658
  input,
1070
1659
  start,
@@ -1078,20 +1667,48 @@ var require_scan = __commonJS({
1078
1667
  negated,
1079
1668
  negatedExtglob
1080
1669
  };
1081
- if (opts.tokens === !0 && (state.maxDepth = 0, isPathSeparator(code) || tokens.push(token), state.tokens = tokens), opts.parts === !0 || opts.tokens === !0) {
1670
+ if (opts.tokens === true) {
1671
+ state.maxDepth = 0;
1672
+ if (!isPathSeparator(code)) {
1673
+ tokens.push(token);
1674
+ }
1675
+ state.tokens = tokens;
1676
+ }
1677
+ if (opts.parts === true || opts.tokens === true) {
1082
1678
  let prevIndex;
1083
1679
  for (let idx = 0; idx < slashes.length; idx++) {
1084
- let n = prevIndex ? prevIndex + 1 : start, i = slashes[idx], value = input.slice(n, i);
1085
- opts.tokens && (idx === 0 && start !== 0 ? (tokens[idx].isPrefix = !0, tokens[idx].value = prefix) : tokens[idx].value = value, depth(tokens[idx]), state.maxDepth += tokens[idx].depth), (idx !== 0 || value !== "") && parts.push(value), prevIndex = i;
1680
+ const n = prevIndex ? prevIndex + 1 : start;
1681
+ const i = slashes[idx];
1682
+ const value = input.slice(n, i);
1683
+ if (opts.tokens) {
1684
+ if (idx === 0 && start !== 0) {
1685
+ tokens[idx].isPrefix = true;
1686
+ tokens[idx].value = prefix;
1687
+ } else {
1688
+ tokens[idx].value = value;
1689
+ }
1690
+ depth(tokens[idx]);
1691
+ state.maxDepth += tokens[idx].depth;
1692
+ }
1693
+ if (idx !== 0 || value !== "") {
1694
+ parts.push(value);
1695
+ }
1696
+ prevIndex = i;
1086
1697
  }
1087
1698
  if (prevIndex && prevIndex + 1 < input.length) {
1088
- let value = input.slice(prevIndex + 1);
1089
- parts.push(value), opts.tokens && (tokens[tokens.length - 1].value = value, depth(tokens[tokens.length - 1]), state.maxDepth += tokens[tokens.length - 1].depth);
1699
+ const value = input.slice(prevIndex + 1);
1700
+ parts.push(value);
1701
+ if (opts.tokens) {
1702
+ tokens[tokens.length - 1].value = value;
1703
+ depth(tokens[tokens.length - 1]);
1704
+ state.maxDepth += tokens[tokens.length - 1].depth;
1705
+ }
1090
1706
  }
1091
- state.slashes = slashes, state.parts = parts;
1707
+ state.slashes = slashes;
1708
+ state.parts = parts;
1092
1709
  }
1093
1710
  return state;
1094
- };
1711
+ }, "scan");
1095
1712
  module.exports = scan;
1096
1713
  }
1097
1714
  });
@@ -1100,31 +1717,49 @@ var require_scan = __commonJS({
1100
1717
  var require_parse2 = __commonJS({
1101
1718
  "../../node_modules/picomatch/lib/parse.js"(exports, module) {
1102
1719
  "use strict";
1103
- var constants = require_constants2(), utils = require_utils2(), {
1720
+ var constants = require_constants2();
1721
+ var utils = require_utils2();
1722
+ var {
1104
1723
  MAX_LENGTH,
1105
1724
  POSIX_REGEX_SOURCE,
1106
1725
  REGEX_NON_SPECIAL_CHARS,
1107
1726
  REGEX_SPECIAL_CHARS_BACKREF,
1108
1727
  REPLACEMENTS
1109
- } = constants, expandRange = (args, options) => {
1110
- if (typeof options.expandRange == "function")
1728
+ } = constants;
1729
+ var expandRange = /* @__PURE__ */ __name((args, options) => {
1730
+ if (typeof options.expandRange === "function") {
1111
1731
  return options.expandRange(...args, options);
1732
+ }
1112
1733
  args.sort();
1113
- let value = `[${args.join("-")}]`;
1734
+ const value = `[${args.join("-")}]`;
1114
1735
  try {
1115
1736
  new RegExp(value);
1116
- } catch {
1737
+ } catch (ex) {
1117
1738
  return args.map((v) => utils.escapeRegex(v)).join("..");
1118
1739
  }
1119
1740
  return value;
1120
- }, syntaxError = (type, char) => `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`, parse = (input, options) => {
1121
- if (typeof input != "string")
1741
+ }, "expandRange");
1742
+ var syntaxError = /* @__PURE__ */ __name((type, char) => {
1743
+ return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
1744
+ }, "syntaxError");
1745
+ var parse = /* @__PURE__ */ __name((input, options) => {
1746
+ if (typeof input !== "string") {
1122
1747
  throw new TypeError("Expected a string");
1748
+ }
1123
1749
  input = REPLACEMENTS[input] || input;
1124
- let opts = { ...options }, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
1125
- if (len > max)
1750
+ const opts = { ...options };
1751
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1752
+ let len = input.length;
1753
+ if (len > max) {
1126
1754
  throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1127
- let bos = { type: "bos", value: "", output: opts.prepend || "" }, tokens = [bos], capture = opts.capture ? "" : "?:", win32 = utils.isWindows(options), PLATFORM_CHARS = constants.globChars(win32), EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS), {
1755
+ }
1756
+ const bos = { type: "bos", value: "", output: opts.prepend || "" };
1757
+ const tokens = [bos];
1758
+ const capture = opts.capture ? "" : "?:";
1759
+ const win32 = utils.isWindows(options);
1760
+ const PLATFORM_CHARS = constants.globChars(win32);
1761
+ const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
1762
+ const {
1128
1763
  DOT_LITERAL,
1129
1764
  PLUS_LITERAL,
1130
1765
  SLASH_LITERAL,
@@ -1137,203 +1772,400 @@ var require_parse2 = __commonJS({
1137
1772
  QMARK_NO_DOT,
1138
1773
  STAR,
1139
1774
  START_ANCHOR
1140
- } = PLATFORM_CHARS, globstar = (opts2) => `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, nodot = opts.dot ? "" : NO_DOT, qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT, star = opts.bash === !0 ? globstar(opts) : STAR;
1141
- opts.capture && (star = `(${star})`), typeof opts.noext == "boolean" && (opts.noextglob = opts.noext);
1142
- let state = {
1775
+ } = PLATFORM_CHARS;
1776
+ const globstar = /* @__PURE__ */ __name((opts2) => {
1777
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1778
+ }, "globstar");
1779
+ const nodot = opts.dot ? "" : NO_DOT;
1780
+ const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
1781
+ let star = opts.bash === true ? globstar(opts) : STAR;
1782
+ if (opts.capture) {
1783
+ star = `(${star})`;
1784
+ }
1785
+ if (typeof opts.noext === "boolean") {
1786
+ opts.noextglob = opts.noext;
1787
+ }
1788
+ const state = {
1143
1789
  input,
1144
1790
  index: -1,
1145
1791
  start: 0,
1146
- dot: opts.dot === !0,
1792
+ dot: opts.dot === true,
1147
1793
  consumed: "",
1148
1794
  output: "",
1149
1795
  prefix: "",
1150
- backtrack: !1,
1151
- negated: !1,
1796
+ backtrack: false,
1797
+ negated: false,
1152
1798
  brackets: 0,
1153
1799
  braces: 0,
1154
1800
  parens: 0,
1155
1801
  quotes: 0,
1156
- globstar: !1,
1802
+ globstar: false,
1157
1803
  tokens
1158
1804
  };
1159
- input = utils.removePrefix(input, state), len = input.length;
1160
- let extglobs = [], braces = [], stack = [], prev = bos, value, eos = () => state.index === len - 1, peek = state.peek = (n = 1) => input[state.index + n], advance = state.advance = () => input[++state.index] || "", remaining = () => input.slice(state.index + 1), consume = (value2 = "", num = 0) => {
1161
- state.consumed += value2, state.index += num;
1162
- }, append = (token) => {
1163
- state.output += token.output != null ? token.output : token.value, consume(token.value);
1164
- }, negate = () => {
1805
+ input = utils.removePrefix(input, state);
1806
+ len = input.length;
1807
+ const extglobs = [];
1808
+ const braces = [];
1809
+ const stack = [];
1810
+ let prev = bos;
1811
+ let value;
1812
+ const eos = /* @__PURE__ */ __name(() => state.index === len - 1, "eos");
1813
+ const peek = state.peek = (n = 1) => input[state.index + n];
1814
+ const advance = state.advance = () => input[++state.index] || "";
1815
+ const remaining = /* @__PURE__ */ __name(() => input.slice(state.index + 1), "remaining");
1816
+ const consume = /* @__PURE__ */ __name((value2 = "", num = 0) => {
1817
+ state.consumed += value2;
1818
+ state.index += num;
1819
+ }, "consume");
1820
+ const append = /* @__PURE__ */ __name((token) => {
1821
+ state.output += token.output != null ? token.output : token.value;
1822
+ consume(token.value);
1823
+ }, "append");
1824
+ const negate = /* @__PURE__ */ __name(() => {
1165
1825
  let count = 1;
1166
- for (; peek() === "!" && (peek(2) !== "(" || peek(3) === "?"); )
1167
- advance(), state.start++, count++;
1168
- return count % 2 === 0 ? !1 : (state.negated = !0, state.start++, !0);
1169
- }, increment = (type) => {
1170
- state[type]++, stack.push(type);
1171
- }, decrement = (type) => {
1172
- state[type]--, stack.pop();
1173
- }, push = (tok) => {
1826
+ while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
1827
+ advance();
1828
+ state.start++;
1829
+ count++;
1830
+ }
1831
+ if (count % 2 === 0) {
1832
+ return false;
1833
+ }
1834
+ state.negated = true;
1835
+ state.start++;
1836
+ return true;
1837
+ }, "negate");
1838
+ const increment = /* @__PURE__ */ __name((type) => {
1839
+ state[type]++;
1840
+ stack.push(type);
1841
+ }, "increment");
1842
+ const decrement = /* @__PURE__ */ __name((type) => {
1843
+ state[type]--;
1844
+ stack.pop();
1845
+ }, "decrement");
1846
+ const push = /* @__PURE__ */ __name((tok) => {
1174
1847
  if (prev.type === "globstar") {
1175
- let isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"), isExtglob = tok.extglob === !0 || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
1176
- tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob && (state.output = state.output.slice(0, -prev.output.length), prev.type = "star", prev.value = "*", prev.output = star, state.output += prev.output);
1848
+ const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
1849
+ const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
1850
+ if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
1851
+ state.output = state.output.slice(0, -prev.output.length);
1852
+ prev.type = "star";
1853
+ prev.value = "*";
1854
+ prev.output = star;
1855
+ state.output += prev.output;
1856
+ }
1177
1857
  }
1178
- if (extglobs.length && tok.type !== "paren" && (extglobs[extglobs.length - 1].inner += tok.value), (tok.value || tok.output) && append(tok), prev && prev.type === "text" && tok.type === "text") {
1179
- prev.value += tok.value, prev.output = (prev.output || "") + tok.value;
1858
+ if (extglobs.length && tok.type !== "paren") {
1859
+ extglobs[extglobs.length - 1].inner += tok.value;
1860
+ }
1861
+ if (tok.value || tok.output) append(tok);
1862
+ if (prev && prev.type === "text" && tok.type === "text") {
1863
+ prev.value += tok.value;
1864
+ prev.output = (prev.output || "") + tok.value;
1180
1865
  return;
1181
1866
  }
1182
- tok.prev = prev, tokens.push(tok), prev = tok;
1183
- }, extglobOpen = (type, value2) => {
1184
- let token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
1185
- token.prev = prev, token.parens = state.parens, token.output = state.output;
1186
- let output = (opts.capture ? "(" : "") + token.open;
1187
- increment("parens"), push({ type, value: value2, output: state.output ? "" : ONE_CHAR }), push({ type: "paren", extglob: !0, value: advance(), output }), extglobs.push(token);
1188
- }, extglobClose = (token) => {
1189
- let output = token.close + (opts.capture ? ")" : ""), rest;
1867
+ tok.prev = prev;
1868
+ tokens.push(tok);
1869
+ prev = tok;
1870
+ }, "push");
1871
+ const extglobOpen = /* @__PURE__ */ __name((type, value2) => {
1872
+ const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
1873
+ token.prev = prev;
1874
+ token.parens = state.parens;
1875
+ token.output = state.output;
1876
+ const output = (opts.capture ? "(" : "") + token.open;
1877
+ increment("parens");
1878
+ push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
1879
+ push({ type: "paren", extglob: true, value: advance(), output });
1880
+ extglobs.push(token);
1881
+ }, "extglobOpen");
1882
+ const extglobClose = /* @__PURE__ */ __name((token) => {
1883
+ let output = token.close + (opts.capture ? ")" : "");
1884
+ let rest;
1190
1885
  if (token.type === "negate") {
1191
1886
  let extglobStar = star;
1192
- if (token.inner && token.inner.length > 1 && token.inner.includes("/") && (extglobStar = globstar(opts)), (extglobStar !== star || eos() || /^\)+$/.test(remaining())) && (output = token.close = `)$))${extglobStar}`), token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
1193
- let expression = parse(rest, { ...options, fastpaths: !1 }).output;
1887
+ if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
1888
+ extglobStar = globstar(opts);
1889
+ }
1890
+ if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
1891
+ output = token.close = `)$))${extglobStar}`;
1892
+ }
1893
+ if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
1894
+ const expression = parse(rest, { ...options, fastpaths: false }).output;
1194
1895
  output = token.close = `)${expression})${extglobStar})`;
1195
1896
  }
1196
- token.prev.type === "bos" && (state.negatedExtglob = !0);
1897
+ if (token.prev.type === "bos") {
1898
+ state.negatedExtglob = true;
1899
+ }
1197
1900
  }
1198
- push({ type: "paren", extglob: !0, value, output }), decrement("parens");
1199
- };
1200
- if (opts.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(input)) {
1201
- let backslashes = !1, output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => first === "\\" ? (backslashes = !0, m) : first === "?" ? esc ? esc + first + (rest ? QMARK.repeat(rest.length) : "") : index === 0 ? qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "") : QMARK.repeat(chars.length) : first === "." ? DOT_LITERAL.repeat(chars.length) : first === "*" ? esc ? esc + first + (rest ? star : "") : star : esc ? m : `\\${m}`);
1202
- return backslashes === !0 && (opts.unescape === !0 ? output = output.replace(/\\/g, "") : output = output.replace(/\\+/g, (m) => m.length % 2 === 0 ? "\\\\" : m ? "\\" : "")), output === input && opts.contains === !0 ? (state.output = input, state) : (state.output = utils.wrapOutput(output, state, options), state);
1901
+ push({ type: "paren", extglob: true, value, output });
1902
+ decrement("parens");
1903
+ }, "extglobClose");
1904
+ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
1905
+ let backslashes = false;
1906
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
1907
+ if (first === "\\") {
1908
+ backslashes = true;
1909
+ return m;
1910
+ }
1911
+ if (first === "?") {
1912
+ if (esc) {
1913
+ return esc + first + (rest ? QMARK.repeat(rest.length) : "");
1914
+ }
1915
+ if (index === 0) {
1916
+ return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
1917
+ }
1918
+ return QMARK.repeat(chars.length);
1919
+ }
1920
+ if (first === ".") {
1921
+ return DOT_LITERAL.repeat(chars.length);
1922
+ }
1923
+ if (first === "*") {
1924
+ if (esc) {
1925
+ return esc + first + (rest ? star : "");
1926
+ }
1927
+ return star;
1928
+ }
1929
+ return esc ? m : `\\${m}`;
1930
+ });
1931
+ if (backslashes === true) {
1932
+ if (opts.unescape === true) {
1933
+ output = output.replace(/\\/g, "");
1934
+ } else {
1935
+ output = output.replace(/\\+/g, (m) => {
1936
+ return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
1937
+ });
1938
+ }
1939
+ }
1940
+ if (output === input && opts.contains === true) {
1941
+ state.output = input;
1942
+ return state;
1943
+ }
1944
+ state.output = utils.wrapOutput(output, state, options);
1945
+ return state;
1203
1946
  }
1204
- for (; !eos(); ) {
1205
- if (value = advance(), value === "\0")
1947
+ while (!eos()) {
1948
+ value = advance();
1949
+ if (value === "\0") {
1206
1950
  continue;
1951
+ }
1207
1952
  if (value === "\\") {
1208
- let next = peek();
1209
- if (next === "/" && opts.bash !== !0 || next === "." || next === ";")
1953
+ const next = peek();
1954
+ if (next === "/" && opts.bash !== true) {
1955
+ continue;
1956
+ }
1957
+ if (next === "." || next === ";") {
1210
1958
  continue;
1959
+ }
1211
1960
  if (!next) {
1212
- value += "\\", push({ type: "text", value });
1961
+ value += "\\";
1962
+ push({ type: "text", value });
1213
1963
  continue;
1214
1964
  }
1215
- let match2 = /^\\+/.exec(remaining()), slashes = 0;
1216
- if (match2 && match2[0].length > 2 && (slashes = match2[0].length, state.index += slashes, slashes % 2 !== 0 && (value += "\\")), opts.unescape === !0 ? value = advance() : value += advance(), state.brackets === 0) {
1965
+ const match2 = /^\\+/.exec(remaining());
1966
+ let slashes = 0;
1967
+ if (match2 && match2[0].length > 2) {
1968
+ slashes = match2[0].length;
1969
+ state.index += slashes;
1970
+ if (slashes % 2 !== 0) {
1971
+ value += "\\";
1972
+ }
1973
+ }
1974
+ if (opts.unescape === true) {
1975
+ value = advance();
1976
+ } else {
1977
+ value += advance();
1978
+ }
1979
+ if (state.brackets === 0) {
1217
1980
  push({ type: "text", value });
1218
1981
  continue;
1219
1982
  }
1220
1983
  }
1221
1984
  if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
1222
- if (opts.posix !== !1 && value === ":") {
1223
- let inner = prev.value.slice(1);
1224
- if (inner.includes("[") && (prev.posix = !0, inner.includes(":"))) {
1225
- let idx = prev.value.lastIndexOf("["), pre = prev.value.slice(0, idx), rest2 = prev.value.slice(idx + 2), posix = POSIX_REGEX_SOURCE[rest2];
1226
- if (posix) {
1227
- prev.value = pre + posix, state.backtrack = !0, advance(), !bos.output && tokens.indexOf(prev) === 1 && (bos.output = ONE_CHAR);
1228
- continue;
1985
+ if (opts.posix !== false && value === ":") {
1986
+ const inner = prev.value.slice(1);
1987
+ if (inner.includes("[")) {
1988
+ prev.posix = true;
1989
+ if (inner.includes(":")) {
1990
+ const idx = prev.value.lastIndexOf("[");
1991
+ const pre = prev.value.slice(0, idx);
1992
+ const rest2 = prev.value.slice(idx + 2);
1993
+ const posix = POSIX_REGEX_SOURCE[rest2];
1994
+ if (posix) {
1995
+ prev.value = pre + posix;
1996
+ state.backtrack = true;
1997
+ advance();
1998
+ if (!bos.output && tokens.indexOf(prev) === 1) {
1999
+ bos.output = ONE_CHAR;
2000
+ }
2001
+ continue;
2002
+ }
1229
2003
  }
1230
2004
  }
1231
2005
  }
1232
- (value === "[" && peek() !== ":" || value === "-" && peek() === "]") && (value = `\\${value}`), value === "]" && (prev.value === "[" || prev.value === "[^") && (value = `\\${value}`), opts.posix === !0 && value === "!" && prev.value === "[" && (value = "^"), prev.value += value, append({ value });
2006
+ if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
2007
+ value = `\\${value}`;
2008
+ }
2009
+ if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
2010
+ value = `\\${value}`;
2011
+ }
2012
+ if (opts.posix === true && value === "!" && prev.value === "[") {
2013
+ value = "^";
2014
+ }
2015
+ prev.value += value;
2016
+ append({ value });
1233
2017
  continue;
1234
2018
  }
1235
2019
  if (state.quotes === 1 && value !== '"') {
1236
- value = utils.escapeRegex(value), prev.value += value, append({ value });
2020
+ value = utils.escapeRegex(value);
2021
+ prev.value += value;
2022
+ append({ value });
1237
2023
  continue;
1238
2024
  }
1239
2025
  if (value === '"') {
1240
- state.quotes = state.quotes === 1 ? 0 : 1, opts.keepQuotes === !0 && push({ type: "text", value });
2026
+ state.quotes = state.quotes === 1 ? 0 : 1;
2027
+ if (opts.keepQuotes === true) {
2028
+ push({ type: "text", value });
2029
+ }
1241
2030
  continue;
1242
2031
  }
1243
2032
  if (value === "(") {
1244
- increment("parens"), push({ type: "paren", value });
2033
+ increment("parens");
2034
+ push({ type: "paren", value });
1245
2035
  continue;
1246
2036
  }
1247
2037
  if (value === ")") {
1248
- if (state.parens === 0 && opts.strictBrackets === !0)
2038
+ if (state.parens === 0 && opts.strictBrackets === true) {
1249
2039
  throw new SyntaxError(syntaxError("opening", "("));
1250
- let extglob = extglobs[extglobs.length - 1];
2040
+ }
2041
+ const extglob = extglobs[extglobs.length - 1];
1251
2042
  if (extglob && state.parens === extglob.parens + 1) {
1252
2043
  extglobClose(extglobs.pop());
1253
2044
  continue;
1254
2045
  }
1255
- push({ type: "paren", value, output: state.parens ? ")" : "\\)" }), decrement("parens");
2046
+ push({ type: "paren", value, output: state.parens ? ")" : "\\)" });
2047
+ decrement("parens");
1256
2048
  continue;
1257
2049
  }
1258
2050
  if (value === "[") {
1259
- if (opts.nobracket === !0 || !remaining().includes("]")) {
1260
- if (opts.nobracket !== !0 && opts.strictBrackets === !0)
2051
+ if (opts.nobracket === true || !remaining().includes("]")) {
2052
+ if (opts.nobracket !== true && opts.strictBrackets === true) {
1261
2053
  throw new SyntaxError(syntaxError("closing", "]"));
2054
+ }
1262
2055
  value = `\\${value}`;
1263
- } else
2056
+ } else {
1264
2057
  increment("brackets");
2058
+ }
1265
2059
  push({ type: "bracket", value });
1266
2060
  continue;
1267
2061
  }
1268
2062
  if (value === "]") {
1269
- if (opts.nobracket === !0 || prev && prev.type === "bracket" && prev.value.length === 1) {
2063
+ if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
1270
2064
  push({ type: "text", value, output: `\\${value}` });
1271
2065
  continue;
1272
2066
  }
1273
2067
  if (state.brackets === 0) {
1274
- if (opts.strictBrackets === !0)
2068
+ if (opts.strictBrackets === true) {
1275
2069
  throw new SyntaxError(syntaxError("opening", "["));
2070
+ }
1276
2071
  push({ type: "text", value, output: `\\${value}` });
1277
2072
  continue;
1278
2073
  }
1279
2074
  decrement("brackets");
1280
- let prevValue = prev.value.slice(1);
1281
- if (prev.posix !== !0 && prevValue[0] === "^" && !prevValue.includes("/") && (value = `/${value}`), prev.value += value, append({ value }), opts.literalBrackets === !1 || utils.hasRegexChars(prevValue))
2075
+ const prevValue = prev.value.slice(1);
2076
+ if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
2077
+ value = `/${value}`;
2078
+ }
2079
+ prev.value += value;
2080
+ append({ value });
2081
+ if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
1282
2082
  continue;
1283
- let escaped = utils.escapeRegex(prev.value);
1284
- if (state.output = state.output.slice(0, -prev.value.length), opts.literalBrackets === !0) {
1285
- state.output += escaped, prev.value = escaped;
2083
+ }
2084
+ const escaped = utils.escapeRegex(prev.value);
2085
+ state.output = state.output.slice(0, -prev.value.length);
2086
+ if (opts.literalBrackets === true) {
2087
+ state.output += escaped;
2088
+ prev.value = escaped;
1286
2089
  continue;
1287
2090
  }
1288
- prev.value = `(${capture}${escaped}|${prev.value})`, state.output += prev.value;
2091
+ prev.value = `(${capture}${escaped}|${prev.value})`;
2092
+ state.output += prev.value;
1289
2093
  continue;
1290
2094
  }
1291
- if (value === "{" && opts.nobrace !== !0) {
2095
+ if (value === "{" && opts.nobrace !== true) {
1292
2096
  increment("braces");
1293
- let open = {
2097
+ const open = {
1294
2098
  type: "brace",
1295
2099
  value,
1296
2100
  output: "(",
1297
2101
  outputIndex: state.output.length,
1298
2102
  tokensIndex: state.tokens.length
1299
2103
  };
1300
- braces.push(open), push(open);
2104
+ braces.push(open);
2105
+ push(open);
1301
2106
  continue;
1302
2107
  }
1303
2108
  if (value === "}") {
1304
- let brace = braces[braces.length - 1];
1305
- if (opts.nobrace === !0 || !brace) {
2109
+ const brace = braces[braces.length - 1];
2110
+ if (opts.nobrace === true || !brace) {
1306
2111
  push({ type: "text", value, output: value });
1307
2112
  continue;
1308
2113
  }
1309
2114
  let output = ")";
1310
- if (brace.dots === !0) {
1311
- let arr = tokens.slice(), range = [];
1312
- for (let i = arr.length - 1; i >= 0 && (tokens.pop(), arr[i].type !== "brace"); i--)
1313
- arr[i].type !== "dots" && range.unshift(arr[i].value);
1314
- output = expandRange(range, opts), state.backtrack = !0;
1315
- }
1316
- if (brace.comma !== !0 && brace.dots !== !0) {
1317
- let out = state.output.slice(0, brace.outputIndex), toks = state.tokens.slice(brace.tokensIndex);
1318
- brace.value = brace.output = "\\{", value = output = "\\}", state.output = out;
1319
- for (let t of toks)
2115
+ if (brace.dots === true) {
2116
+ const arr = tokens.slice();
2117
+ const range = [];
2118
+ for (let i = arr.length - 1; i >= 0; i--) {
2119
+ tokens.pop();
2120
+ if (arr[i].type === "brace") {
2121
+ break;
2122
+ }
2123
+ if (arr[i].type !== "dots") {
2124
+ range.unshift(arr[i].value);
2125
+ }
2126
+ }
2127
+ output = expandRange(range, opts);
2128
+ state.backtrack = true;
2129
+ }
2130
+ if (brace.comma !== true && brace.dots !== true) {
2131
+ const out = state.output.slice(0, brace.outputIndex);
2132
+ const toks = state.tokens.slice(brace.tokensIndex);
2133
+ brace.value = brace.output = "\\{";
2134
+ value = output = "\\}";
2135
+ state.output = out;
2136
+ for (const t of toks) {
1320
2137
  state.output += t.output || t.value;
2138
+ }
1321
2139
  }
1322
- push({ type: "brace", value, output }), decrement("braces"), braces.pop();
2140
+ push({ type: "brace", value, output });
2141
+ decrement("braces");
2142
+ braces.pop();
1323
2143
  continue;
1324
2144
  }
1325
2145
  if (value === "|") {
1326
- extglobs.length > 0 && extglobs[extglobs.length - 1].conditions++, push({ type: "text", value });
2146
+ if (extglobs.length > 0) {
2147
+ extglobs[extglobs.length - 1].conditions++;
2148
+ }
2149
+ push({ type: "text", value });
1327
2150
  continue;
1328
2151
  }
1329
2152
  if (value === ",") {
1330
- let output = value, brace = braces[braces.length - 1];
1331
- brace && stack[stack.length - 1] === "braces" && (brace.comma = !0, output = "|"), push({ type: "comma", value, output });
2153
+ let output = value;
2154
+ const brace = braces[braces.length - 1];
2155
+ if (brace && stack[stack.length - 1] === "braces") {
2156
+ brace.comma = true;
2157
+ output = "|";
2158
+ }
2159
+ push({ type: "comma", value, output });
1332
2160
  continue;
1333
2161
  }
1334
2162
  if (value === "/") {
1335
2163
  if (prev.type === "dot" && state.index === state.start + 1) {
1336
- state.start = state.index + 1, state.consumed = "", state.output = "", tokens.pop(), prev = bos;
2164
+ state.start = state.index + 1;
2165
+ state.consumed = "";
2166
+ state.output = "";
2167
+ tokens.pop();
2168
+ prev = bos;
1337
2169
  continue;
1338
2170
  }
1339
2171
  push({ type: "slash", value, output: SLASH_LITERAL });
@@ -1341,9 +2173,12 @@ var require_parse2 = __commonJS({
1341
2173
  }
1342
2174
  if (value === ".") {
1343
2175
  if (state.braces > 0 && prev.type === "dot") {
1344
- prev.value === "." && (prev.output = DOT_LITERAL);
1345
- let brace = braces[braces.length - 1];
1346
- prev.type = "dots", prev.output += value, prev.value += value, brace.dots = !0;
2176
+ if (prev.value === ".") prev.output = DOT_LITERAL;
2177
+ const brace = braces[braces.length - 1];
2178
+ prev.type = "dots";
2179
+ prev.output += value;
2180
+ prev.value += value;
2181
+ brace.dots = true;
1347
2182
  continue;
1348
2183
  }
1349
2184
  if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
@@ -1354,18 +2189,24 @@ var require_parse2 = __commonJS({
1354
2189
  continue;
1355
2190
  }
1356
2191
  if (value === "?") {
1357
- if (!(prev && prev.value === "(") && opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
2192
+ const isGroup = prev && prev.value === "(";
2193
+ if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1358
2194
  extglobOpen("qmark", value);
1359
2195
  continue;
1360
2196
  }
1361
2197
  if (prev && prev.type === "paren") {
1362
- let next = peek(), output = value;
1363
- if (next === "<" && !utils.supportsLookbehinds())
2198
+ const next = peek();
2199
+ let output = value;
2200
+ if (next === "<" && !utils.supportsLookbehinds()) {
1364
2201
  throw new Error("Node.js v10 or higher is required for regex lookbehinds");
1365
- (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) && (output = `\\${value}`), push({ type: "text", value, output });
2202
+ }
2203
+ if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
2204
+ output = `\\${value}`;
2205
+ }
2206
+ push({ type: "text", value, output });
1366
2207
  continue;
1367
2208
  }
1368
- if (opts.dot !== !0 && (prev.type === "slash" || prev.type === "bos")) {
2209
+ if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
1369
2210
  push({ type: "qmark", value, output: QMARK_NO_DOT });
1370
2211
  continue;
1371
2212
  }
@@ -1373,21 +2214,23 @@ var require_parse2 = __commonJS({
1373
2214
  continue;
1374
2215
  }
1375
2216
  if (value === "!") {
1376
- if (opts.noextglob !== !0 && peek() === "(" && (peek(2) !== "?" || !/[!=<:]/.test(peek(3)))) {
1377
- extglobOpen("negate", value);
1378
- continue;
2217
+ if (opts.noextglob !== true && peek() === "(") {
2218
+ if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
2219
+ extglobOpen("negate", value);
2220
+ continue;
2221
+ }
1379
2222
  }
1380
- if (opts.nonegate !== !0 && state.index === 0) {
2223
+ if (opts.nonegate !== true && state.index === 0) {
1381
2224
  negate();
1382
2225
  continue;
1383
2226
  }
1384
2227
  }
1385
2228
  if (value === "+") {
1386
- if (opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
2229
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1387
2230
  extglobOpen("plus", value);
1388
2231
  continue;
1389
2232
  }
1390
- if (prev && prev.value === "(" || opts.regex === !1) {
2233
+ if (prev && prev.value === "(" || opts.regex === false) {
1391
2234
  push({ type: "plus", value, output: PLUS_LITERAL });
1392
2235
  continue;
1393
2236
  }
@@ -1399,105 +2242,190 @@ var require_parse2 = __commonJS({
1399
2242
  continue;
1400
2243
  }
1401
2244
  if (value === "@") {
1402
- if (opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
1403
- push({ type: "at", extglob: !0, value, output: "" });
2245
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
2246
+ push({ type: "at", extglob: true, value, output: "" });
1404
2247
  continue;
1405
2248
  }
1406
2249
  push({ type: "text", value });
1407
2250
  continue;
1408
2251
  }
1409
2252
  if (value !== "*") {
1410
- (value === "$" || value === "^") && (value = `\\${value}`);
1411
- let match2 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
1412
- match2 && (value += match2[0], state.index += match2[0].length), push({ type: "text", value });
2253
+ if (value === "$" || value === "^") {
2254
+ value = `\\${value}`;
2255
+ }
2256
+ const match2 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
2257
+ if (match2) {
2258
+ value += match2[0];
2259
+ state.index += match2[0].length;
2260
+ }
2261
+ push({ type: "text", value });
1413
2262
  continue;
1414
2263
  }
1415
- if (prev && (prev.type === "globstar" || prev.star === !0)) {
1416
- prev.type = "star", prev.star = !0, prev.value += value, prev.output = star, state.backtrack = !0, state.globstar = !0, consume(value);
2264
+ if (prev && (prev.type === "globstar" || prev.star === true)) {
2265
+ prev.type = "star";
2266
+ prev.star = true;
2267
+ prev.value += value;
2268
+ prev.output = star;
2269
+ state.backtrack = true;
2270
+ state.globstar = true;
2271
+ consume(value);
1417
2272
  continue;
1418
2273
  }
1419
2274
  let rest = remaining();
1420
- if (opts.noextglob !== !0 && /^\([^?]/.test(rest)) {
2275
+ if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
1421
2276
  extglobOpen("star", value);
1422
2277
  continue;
1423
2278
  }
1424
2279
  if (prev.type === "star") {
1425
- if (opts.noglobstar === !0) {
2280
+ if (opts.noglobstar === true) {
1426
2281
  consume(value);
1427
2282
  continue;
1428
2283
  }
1429
- let prior = prev.prev, before = prior.prev, isStart = prior.type === "slash" || prior.type === "bos", afterStar = before && (before.type === "star" || before.type === "globstar");
1430
- if (opts.bash === !0 && (!isStart || rest[0] && rest[0] !== "/")) {
2284
+ const prior = prev.prev;
2285
+ const before = prior.prev;
2286
+ const isStart = prior.type === "slash" || prior.type === "bos";
2287
+ const afterStar = before && (before.type === "star" || before.type === "globstar");
2288
+ if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
1431
2289
  push({ type: "star", value, output: "" });
1432
2290
  continue;
1433
2291
  }
1434
- let isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"), isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
2292
+ const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
2293
+ const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
1435
2294
  if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
1436
2295
  push({ type: "star", value, output: "" });
1437
2296
  continue;
1438
2297
  }
1439
- for (; rest.slice(0, 3) === "/**"; ) {
1440
- let after = input[state.index + 4];
1441
- if (after && after !== "/")
2298
+ while (rest.slice(0, 3) === "/**") {
2299
+ const after = input[state.index + 4];
2300
+ if (after && after !== "/") {
1442
2301
  break;
1443
- rest = rest.slice(3), consume("/**", 3);
2302
+ }
2303
+ rest = rest.slice(3);
2304
+ consume("/**", 3);
1444
2305
  }
1445
2306
  if (prior.type === "bos" && eos()) {
1446
- prev.type = "globstar", prev.value += value, prev.output = globstar(opts), state.output = prev.output, state.globstar = !0, consume(value);
2307
+ prev.type = "globstar";
2308
+ prev.value += value;
2309
+ prev.output = globstar(opts);
2310
+ state.output = prev.output;
2311
+ state.globstar = true;
2312
+ consume(value);
1447
2313
  continue;
1448
2314
  }
1449
2315
  if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
1450
- state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = "globstar", prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"), prev.value += value, state.globstar = !0, state.output += prior.output + prev.output, consume(value);
2316
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
2317
+ prior.output = `(?:${prior.output}`;
2318
+ prev.type = "globstar";
2319
+ prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
2320
+ prev.value += value;
2321
+ state.globstar = true;
2322
+ state.output += prior.output + prev.output;
2323
+ consume(value);
1451
2324
  continue;
1452
2325
  }
1453
2326
  if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
1454
- let end = rest[1] !== void 0 ? "|$" : "";
1455
- state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = "globstar", prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`, prev.value += value, state.output += prior.output + prev.output, state.globstar = !0, consume(value + advance()), push({ type: "slash", value: "/", output: "" });
2327
+ const end = rest[1] !== void 0 ? "|$" : "";
2328
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
2329
+ prior.output = `(?:${prior.output}`;
2330
+ prev.type = "globstar";
2331
+ prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
2332
+ prev.value += value;
2333
+ state.output += prior.output + prev.output;
2334
+ state.globstar = true;
2335
+ consume(value + advance());
2336
+ push({ type: "slash", value: "/", output: "" });
1456
2337
  continue;
1457
2338
  }
1458
2339
  if (prior.type === "bos" && rest[0] === "/") {
1459
- prev.type = "globstar", prev.value += value, prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`, state.output = prev.output, state.globstar = !0, consume(value + advance()), push({ type: "slash", value: "/", output: "" });
2340
+ prev.type = "globstar";
2341
+ prev.value += value;
2342
+ prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
2343
+ state.output = prev.output;
2344
+ state.globstar = true;
2345
+ consume(value + advance());
2346
+ push({ type: "slash", value: "/", output: "" });
1460
2347
  continue;
1461
2348
  }
1462
- state.output = state.output.slice(0, -prev.output.length), prev.type = "globstar", prev.output = globstar(opts), prev.value += value, state.output += prev.output, state.globstar = !0, consume(value);
2349
+ state.output = state.output.slice(0, -prev.output.length);
2350
+ prev.type = "globstar";
2351
+ prev.output = globstar(opts);
2352
+ prev.value += value;
2353
+ state.output += prev.output;
2354
+ state.globstar = true;
2355
+ consume(value);
1463
2356
  continue;
1464
2357
  }
1465
- let token = { type: "star", value, output: star };
1466
- if (opts.bash === !0) {
1467
- token.output = ".*?", (prev.type === "bos" || prev.type === "slash") && (token.output = nodot + token.output), push(token);
2358
+ const token = { type: "star", value, output: star };
2359
+ if (opts.bash === true) {
2360
+ token.output = ".*?";
2361
+ if (prev.type === "bos" || prev.type === "slash") {
2362
+ token.output = nodot + token.output;
2363
+ }
2364
+ push(token);
1468
2365
  continue;
1469
2366
  }
1470
- if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === !0) {
1471
- token.output = value, push(token);
2367
+ if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
2368
+ token.output = value;
2369
+ push(token);
1472
2370
  continue;
1473
2371
  }
1474
- (state.index === state.start || prev.type === "slash" || prev.type === "dot") && (prev.type === "dot" ? (state.output += NO_DOT_SLASH, prev.output += NO_DOT_SLASH) : opts.dot === !0 ? (state.output += NO_DOTS_SLASH, prev.output += NO_DOTS_SLASH) : (state.output += nodot, prev.output += nodot), peek() !== "*" && (state.output += ONE_CHAR, prev.output += ONE_CHAR)), push(token);
2372
+ if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
2373
+ if (prev.type === "dot") {
2374
+ state.output += NO_DOT_SLASH;
2375
+ prev.output += NO_DOT_SLASH;
2376
+ } else if (opts.dot === true) {
2377
+ state.output += NO_DOTS_SLASH;
2378
+ prev.output += NO_DOTS_SLASH;
2379
+ } else {
2380
+ state.output += nodot;
2381
+ prev.output += nodot;
2382
+ }
2383
+ if (peek() !== "*") {
2384
+ state.output += ONE_CHAR;
2385
+ prev.output += ONE_CHAR;
2386
+ }
2387
+ }
2388
+ push(token);
2389
+ }
2390
+ while (state.brackets > 0) {
2391
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
2392
+ state.output = utils.escapeLast(state.output, "[");
2393
+ decrement("brackets");
1475
2394
  }
1476
- for (; state.brackets > 0; ) {
1477
- if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", "]"));
1478
- state.output = utils.escapeLast(state.output, "["), decrement("brackets");
2395
+ while (state.parens > 0) {
2396
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
2397
+ state.output = utils.escapeLast(state.output, "(");
2398
+ decrement("parens");
1479
2399
  }
1480
- for (; state.parens > 0; ) {
1481
- if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", ")"));
1482
- state.output = utils.escapeLast(state.output, "("), decrement("parens");
2400
+ while (state.braces > 0) {
2401
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
2402
+ state.output = utils.escapeLast(state.output, "{");
2403
+ decrement("braces");
1483
2404
  }
1484
- for (; state.braces > 0; ) {
1485
- if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", "}"));
1486
- state.output = utils.escapeLast(state.output, "{"), decrement("braces");
2405
+ if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
2406
+ push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` });
1487
2407
  }
1488
- if (opts.strictSlashes !== !0 && (prev.type === "star" || prev.type === "bracket") && push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }), state.backtrack === !0) {
2408
+ if (state.backtrack === true) {
1489
2409
  state.output = "";
1490
- for (let token of state.tokens)
1491
- state.output += token.output != null ? token.output : token.value, token.suffix && (state.output += token.suffix);
2410
+ for (const token of state.tokens) {
2411
+ state.output += token.output != null ? token.output : token.value;
2412
+ if (token.suffix) {
2413
+ state.output += token.suffix;
2414
+ }
2415
+ }
1492
2416
  }
1493
2417
  return state;
1494
- };
2418
+ }, "parse");
1495
2419
  parse.fastpaths = (input, options) => {
1496
- let opts = { ...options }, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
1497
- if (len > max)
2420
+ const opts = { ...options };
2421
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
2422
+ const len = input.length;
2423
+ if (len > max) {
1498
2424
  throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
2425
+ }
1499
2426
  input = REPLACEMENTS[input] || input;
1500
- let win32 = utils.isWindows(options), {
2427
+ const win32 = utils.isWindows(options);
2428
+ const {
1501
2429
  DOT_LITERAL,
1502
2430
  SLASH_LITERAL,
1503
2431
  ONE_CHAR,
@@ -1507,9 +2435,20 @@ var require_parse2 = __commonJS({
1507
2435
  NO_DOTS_SLASH,
1508
2436
  STAR,
1509
2437
  START_ANCHOR
1510
- } = constants.globChars(win32), nodot = opts.dot ? NO_DOTS : NO_DOT, slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT, capture = opts.capture ? "" : "?:", state = { negated: !1, prefix: "" }, star = opts.bash === !0 ? ".*?" : STAR;
1511
- opts.capture && (star = `(${star})`);
1512
- let globstar = (opts2) => opts2.noglobstar === !0 ? star : `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, create = (str) => {
2438
+ } = constants.globChars(win32);
2439
+ const nodot = opts.dot ? NO_DOTS : NO_DOT;
2440
+ const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
2441
+ const capture = opts.capture ? "" : "?:";
2442
+ const state = { negated: false, prefix: "" };
2443
+ let star = opts.bash === true ? ".*?" : STAR;
2444
+ if (opts.capture) {
2445
+ star = `(${star})`;
2446
+ }
2447
+ const globstar = /* @__PURE__ */ __name((opts2) => {
2448
+ if (opts2.noglobstar === true) return star;
2449
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
2450
+ }, "globstar");
2451
+ const create = /* @__PURE__ */ __name((str) => {
1513
2452
  switch (str) {
1514
2453
  case "*":
1515
2454
  return `${nodot}${ONE_CHAR}${star}`;
@@ -1528,14 +2467,20 @@ var require_parse2 = __commonJS({
1528
2467
  case "**/.*":
1529
2468
  return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
1530
2469
  default: {
1531
- let match2 = /^(.*?)\.(\w+)$/.exec(str);
2470
+ const match2 = /^(.*?)\.(\w+)$/.exec(str);
1532
2471
  if (!match2) return;
1533
- let source2 = create(match2[1]);
1534
- return source2 ? source2 + DOT_LITERAL + match2[2] : void 0;
2472
+ const source2 = create(match2[1]);
2473
+ if (!source2) return;
2474
+ return source2 + DOT_LITERAL + match2[2];
1535
2475
  }
1536
2476
  }
1537
- }, output = utils.removePrefix(input, state), source = create(output);
1538
- return source && opts.strictSlashes !== !0 && (source += `${SLASH_LITERAL}?`), source;
2477
+ }, "create");
2478
+ const output = utils.removePrefix(input, state);
2479
+ let source = create(output);
2480
+ if (source && opts.strictSlashes !== true) {
2481
+ source += `${SLASH_LITERAL}?`;
2482
+ }
2483
+ return source;
1539
2484
  };
1540
2485
  module.exports = parse;
1541
2486
  }
@@ -1545,65 +2490,135 @@ var require_parse2 = __commonJS({
1545
2490
  var require_picomatch = __commonJS({
1546
2491
  "../../node_modules/picomatch/lib/picomatch.js"(exports, module) {
1547
2492
  "use strict";
1548
- var path = __require("path"), scan = require_scan(), parse = require_parse2(), utils = require_utils2(), constants = require_constants2(), isObject = (val) => val && typeof val == "object" && !Array.isArray(val), picomatch = (glob, options, returnState = !1) => {
2493
+ var path = __require("path");
2494
+ var scan = require_scan();
2495
+ var parse = require_parse2();
2496
+ var utils = require_utils2();
2497
+ var constants = require_constants2();
2498
+ var isObject = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject");
2499
+ var picomatch = /* @__PURE__ */ __name((glob, options, returnState = false) => {
1549
2500
  if (Array.isArray(glob)) {
1550
- let fns = glob.map((input) => picomatch(input, options, returnState));
1551
- return (str) => {
1552
- for (let isMatch of fns) {
1553
- let state2 = isMatch(str);
2501
+ const fns = glob.map((input) => picomatch(input, options, returnState));
2502
+ const arrayMatcher = /* @__PURE__ */ __name((str) => {
2503
+ for (const isMatch of fns) {
2504
+ const state2 = isMatch(str);
1554
2505
  if (state2) return state2;
1555
2506
  }
1556
- return !1;
1557
- };
2507
+ return false;
2508
+ }, "arrayMatcher");
2509
+ return arrayMatcher;
1558
2510
  }
1559
- let isState = isObject(glob) && glob.tokens && glob.input;
1560
- if (glob === "" || typeof glob != "string" && !isState)
2511
+ const isState = isObject(glob) && glob.tokens && glob.input;
2512
+ if (glob === "" || typeof glob !== "string" && !isState) {
1561
2513
  throw new TypeError("Expected pattern to be a non-empty string");
1562
- let opts = options || {}, posix = utils.isWindows(options), regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, !1, !0), state = regex.state;
2514
+ }
2515
+ const opts = options || {};
2516
+ const posix = utils.isWindows(options);
2517
+ const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
2518
+ const state = regex.state;
1563
2519
  delete regex.state;
1564
- let isIgnored = () => !1;
2520
+ let isIgnored = /* @__PURE__ */ __name(() => false, "isIgnored");
1565
2521
  if (opts.ignore) {
1566
- let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
2522
+ const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
1567
2523
  isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
1568
2524
  }
1569
- let matcher = (input, returnObject = !1) => {
1570
- let { isMatch, match: match2, output } = picomatch.test(input, regex, options, { glob, posix }), result = { glob, state, regex, posix, input, output, match: match2, isMatch };
1571
- return typeof opts.onResult == "function" && opts.onResult(result), isMatch === !1 ? (result.isMatch = !1, returnObject ? result : !1) : isIgnored(input) ? (typeof opts.onIgnore == "function" && opts.onIgnore(result), result.isMatch = !1, returnObject ? result : !1) : (typeof opts.onMatch == "function" && opts.onMatch(result), returnObject ? result : !0);
1572
- };
1573
- return returnState && (matcher.state = state), matcher;
1574
- };
2525
+ const matcher = /* @__PURE__ */ __name((input, returnObject = false) => {
2526
+ const { isMatch, match: match2, output } = picomatch.test(input, regex, options, { glob, posix });
2527
+ const result = { glob, state, regex, posix, input, output, match: match2, isMatch };
2528
+ if (typeof opts.onResult === "function") {
2529
+ opts.onResult(result);
2530
+ }
2531
+ if (isMatch === false) {
2532
+ result.isMatch = false;
2533
+ return returnObject ? result : false;
2534
+ }
2535
+ if (isIgnored(input)) {
2536
+ if (typeof opts.onIgnore === "function") {
2537
+ opts.onIgnore(result);
2538
+ }
2539
+ result.isMatch = false;
2540
+ return returnObject ? result : false;
2541
+ }
2542
+ if (typeof opts.onMatch === "function") {
2543
+ opts.onMatch(result);
2544
+ }
2545
+ return returnObject ? result : true;
2546
+ }, "matcher");
2547
+ if (returnState) {
2548
+ matcher.state = state;
2549
+ }
2550
+ return matcher;
2551
+ }, "picomatch");
1575
2552
  picomatch.test = (input, regex, options, { glob, posix } = {}) => {
1576
- if (typeof input != "string")
2553
+ if (typeof input !== "string") {
1577
2554
  throw new TypeError("Expected input to be a string");
1578
- if (input === "")
1579
- return { isMatch: !1, output: "" };
1580
- let opts = options || {}, format = opts.format || (posix ? utils.toPosixSlashes : null), match2 = input === glob, output = match2 && format ? format(input) : input;
1581
- return match2 === !1 && (output = format ? format(input) : input, match2 = output === glob), (match2 === !1 || opts.capture === !0) && (opts.matchBase === !0 || opts.basename === !0 ? match2 = picomatch.matchBase(input, regex, options, posix) : match2 = regex.exec(output)), { isMatch: !!match2, match: match2, output };
2555
+ }
2556
+ if (input === "") {
2557
+ return { isMatch: false, output: "" };
2558
+ }
2559
+ const opts = options || {};
2560
+ const format = opts.format || (posix ? utils.toPosixSlashes : null);
2561
+ let match2 = input === glob;
2562
+ let output = match2 && format ? format(input) : input;
2563
+ if (match2 === false) {
2564
+ output = format ? format(input) : input;
2565
+ match2 = output === glob;
2566
+ }
2567
+ if (match2 === false || opts.capture === true) {
2568
+ if (opts.matchBase === true || opts.basename === true) {
2569
+ match2 = picomatch.matchBase(input, regex, options, posix);
2570
+ } else {
2571
+ match2 = regex.exec(output);
2572
+ }
2573
+ }
2574
+ return { isMatch: Boolean(match2), match: match2, output };
2575
+ };
2576
+ picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
2577
+ const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
2578
+ return regex.test(path.basename(input));
1582
2579
  };
1583
- picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path.basename(input));
1584
2580
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
1585
- picomatch.parse = (pattern, options) => Array.isArray(pattern) ? pattern.map((p) => picomatch.parse(p, options)) : parse(pattern, { ...options, fastpaths: !1 });
2581
+ picomatch.parse = (pattern, options) => {
2582
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
2583
+ return parse(pattern, { ...options, fastpaths: false });
2584
+ };
1586
2585
  picomatch.scan = (input, options) => scan(input, options);
1587
- picomatch.compileRe = (state, options, returnOutput = !1, returnState = !1) => {
1588
- if (returnOutput === !0)
2586
+ picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
2587
+ if (returnOutput === true) {
1589
2588
  return state.output;
1590
- let opts = options || {}, prepend = opts.contains ? "" : "^", append = opts.contains ? "" : "$", source = `${prepend}(?:${state.output})${append}`;
1591
- state && state.negated === !0 && (source = `^(?!${source}).*$`);
1592
- let regex = picomatch.toRegex(source, options);
1593
- return returnState === !0 && (regex.state = state), regex;
2589
+ }
2590
+ const opts = options || {};
2591
+ const prepend = opts.contains ? "" : "^";
2592
+ const append = opts.contains ? "" : "$";
2593
+ let source = `${prepend}(?:${state.output})${append}`;
2594
+ if (state && state.negated === true) {
2595
+ source = `^(?!${source}).*$`;
2596
+ }
2597
+ const regex = picomatch.toRegex(source, options);
2598
+ if (returnState === true) {
2599
+ regex.state = state;
2600
+ }
2601
+ return regex;
1594
2602
  };
1595
- picomatch.makeRe = (input, options = {}, returnOutput = !1, returnState = !1) => {
1596
- if (!input || typeof input != "string")
2603
+ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
2604
+ if (!input || typeof input !== "string") {
1597
2605
  throw new TypeError("Expected a non-empty string");
1598
- let parsed = { negated: !1, fastpaths: !0 };
1599
- return options.fastpaths !== !1 && (input[0] === "." || input[0] === "*") && (parsed.output = parse.fastpaths(input, options)), parsed.output || (parsed = parse(input, options)), picomatch.compileRe(parsed, options, returnOutput, returnState);
2606
+ }
2607
+ let parsed = { negated: false, fastpaths: true };
2608
+ if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
2609
+ parsed.output = parse.fastpaths(input, options);
2610
+ }
2611
+ if (!parsed.output) {
2612
+ parsed = parse(input, options);
2613
+ }
2614
+ return picomatch.compileRe(parsed, options, returnOutput, returnState);
1600
2615
  };
1601
2616
  picomatch.toRegex = (source, options) => {
1602
2617
  try {
1603
- let opts = options || {};
2618
+ const opts = options || {};
1604
2619
  return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
1605
2620
  } catch (err) {
1606
- if (options && options.debug === !0) throw err;
2621
+ if (options && options.debug === true) throw err;
1607
2622
  return /$^/;
1608
2623
  }
1609
2624
  };
@@ -1624,61 +2639,99 @@ var require_picomatch2 = __commonJS({
1624
2639
  var require_micromatch = __commonJS({
1625
2640
  "../../node_modules/micromatch/index.js"(exports, module) {
1626
2641
  "use strict";
1627
- var util = __require("util"), braces = require_braces(), picomatch = require_picomatch2(), utils = require_utils2(), isEmptyString = (v) => v === "" || v === "./", hasBraces = (v) => {
1628
- let index = v.indexOf("{");
2642
+ var util = __require("util");
2643
+ var braces = require_braces();
2644
+ var picomatch = require_picomatch2();
2645
+ var utils = require_utils2();
2646
+ var isEmptyString = /* @__PURE__ */ __name((v) => v === "" || v === "./", "isEmptyString");
2647
+ var hasBraces = /* @__PURE__ */ __name((v) => {
2648
+ const index = v.indexOf("{");
1629
2649
  return index > -1 && v.indexOf("}", index) > -1;
1630
- }, micromatch = (list, patterns, options) => {
1631
- patterns = [].concat(patterns), list = [].concat(list);
1632
- let omit = /* @__PURE__ */ new Set(), keep = /* @__PURE__ */ new Set(), items = /* @__PURE__ */ new Set(), negatives = 0, onResult = (state) => {
1633
- items.add(state.output), options && options.onResult && options.onResult(state);
1634
- };
2650
+ }, "hasBraces");
2651
+ var micromatch = /* @__PURE__ */ __name((list, patterns, options) => {
2652
+ patterns = [].concat(patterns);
2653
+ list = [].concat(list);
2654
+ let omit = /* @__PURE__ */ new Set();
2655
+ let keep = /* @__PURE__ */ new Set();
2656
+ let items = /* @__PURE__ */ new Set();
2657
+ let negatives = 0;
2658
+ let onResult = /* @__PURE__ */ __name((state) => {
2659
+ items.add(state.output);
2660
+ if (options && options.onResult) {
2661
+ options.onResult(state);
2662
+ }
2663
+ }, "onResult");
1635
2664
  for (let i = 0; i < patterns.length; i++) {
1636
- let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, !0), negated = isMatch.state.negated || isMatch.state.negatedExtglob;
1637
- negated && negatives++;
2665
+ let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
2666
+ let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
2667
+ if (negated) negatives++;
1638
2668
  for (let item of list) {
1639
- let matched = isMatch(item, !0);
1640
- (negated ? !matched.isMatch : matched.isMatch) && (negated ? omit.add(matched.output) : (omit.delete(matched.output), keep.add(matched.output)));
2669
+ let matched = isMatch(item, true);
2670
+ let match2 = negated ? !matched.isMatch : matched.isMatch;
2671
+ if (!match2) continue;
2672
+ if (negated) {
2673
+ omit.add(matched.output);
2674
+ } else {
2675
+ omit.delete(matched.output);
2676
+ keep.add(matched.output);
2677
+ }
1641
2678
  }
1642
2679
  }
1643
- let matches = (negatives === patterns.length ? [...items] : [...keep]).filter((item) => !omit.has(item));
2680
+ let result = negatives === patterns.length ? [...items] : [...keep];
2681
+ let matches = result.filter((item) => !omit.has(item));
1644
2682
  if (options && matches.length === 0) {
1645
- if (options.failglob === !0)
2683
+ if (options.failglob === true) {
1646
2684
  throw new Error(`No matches found for "${patterns.join(", ")}"`);
1647
- if (options.nonull === !0 || options.nullglob === !0)
2685
+ }
2686
+ if (options.nonull === true || options.nullglob === true) {
1648
2687
  return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
2688
+ }
1649
2689
  }
1650
2690
  return matches;
1651
- };
2691
+ }, "micromatch");
1652
2692
  micromatch.match = micromatch;
1653
2693
  micromatch.matcher = (pattern, options) => picomatch(pattern, options);
1654
2694
  micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
1655
2695
  micromatch.any = micromatch.isMatch;
1656
2696
  micromatch.not = (list, patterns, options = {}) => {
1657
2697
  patterns = [].concat(patterns).map(String);
1658
- let result = /* @__PURE__ */ new Set(), items = [], onResult = (state) => {
1659
- options.onResult && options.onResult(state), items.push(state.output);
1660
- }, matches = new Set(micromatch(list, patterns, { ...options, onResult }));
1661
- for (let item of items)
1662
- matches.has(item) || result.add(item);
2698
+ let result = /* @__PURE__ */ new Set();
2699
+ let items = [];
2700
+ let onResult = /* @__PURE__ */ __name((state) => {
2701
+ if (options.onResult) options.onResult(state);
2702
+ items.push(state.output);
2703
+ }, "onResult");
2704
+ let matches = new Set(micromatch(list, patterns, { ...options, onResult }));
2705
+ for (let item of items) {
2706
+ if (!matches.has(item)) {
2707
+ result.add(item);
2708
+ }
2709
+ }
1663
2710
  return [...result];
1664
2711
  };
1665
2712
  micromatch.contains = (str, pattern, options) => {
1666
- if (typeof str != "string")
2713
+ if (typeof str !== "string") {
1667
2714
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
1668
- if (Array.isArray(pattern))
2715
+ }
2716
+ if (Array.isArray(pattern)) {
1669
2717
  return pattern.some((p) => micromatch.contains(str, p, options));
1670
- if (typeof pattern == "string") {
1671
- if (isEmptyString(str) || isEmptyString(pattern))
1672
- return !1;
1673
- if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern))
1674
- return !0;
1675
2718
  }
1676
- return micromatch.isMatch(str, pattern, { ...options, contains: !0 });
2719
+ if (typeof pattern === "string") {
2720
+ if (isEmptyString(str) || isEmptyString(pattern)) {
2721
+ return false;
2722
+ }
2723
+ if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
2724
+ return true;
2725
+ }
2726
+ }
2727
+ return micromatch.isMatch(str, pattern, { ...options, contains: true });
1677
2728
  };
1678
2729
  micromatch.matchKeys = (obj, patterns, options) => {
1679
- if (!utils.isObject(obj))
2730
+ if (!utils.isObject(obj)) {
1680
2731
  throw new TypeError("Expected the first argument to be an object");
1681
- let keys = micromatch(Object.keys(obj), patterns, options), res = {};
2732
+ }
2733
+ let keys = micromatch(Object.keys(obj), patterns, options);
2734
+ let res = {};
1682
2735
  for (let key of keys) res[key] = obj[key];
1683
2736
  return res;
1684
2737
  };
@@ -1686,46 +2739,57 @@ var require_micromatch = __commonJS({
1686
2739
  let items = [].concat(list);
1687
2740
  for (let pattern of [].concat(patterns)) {
1688
2741
  let isMatch = picomatch(String(pattern), options);
1689
- if (items.some((item) => isMatch(item)))
1690
- return !0;
2742
+ if (items.some((item) => isMatch(item))) {
2743
+ return true;
2744
+ }
1691
2745
  }
1692
- return !1;
2746
+ return false;
1693
2747
  };
1694
2748
  micromatch.every = (list, patterns, options) => {
1695
2749
  let items = [].concat(list);
1696
2750
  for (let pattern of [].concat(patterns)) {
1697
2751
  let isMatch = picomatch(String(pattern), options);
1698
- if (!items.every((item) => isMatch(item)))
1699
- return !1;
2752
+ if (!items.every((item) => isMatch(item))) {
2753
+ return false;
2754
+ }
1700
2755
  }
1701
- return !0;
2756
+ return true;
1702
2757
  };
1703
2758
  micromatch.all = (str, patterns, options) => {
1704
- if (typeof str != "string")
2759
+ if (typeof str !== "string") {
1705
2760
  throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
2761
+ }
1706
2762
  return [].concat(patterns).every((p) => picomatch(p, options)(str));
1707
2763
  };
1708
2764
  micromatch.capture = (glob, input, options) => {
1709
- let posix = utils.isWindows(options), match2 = picomatch.makeRe(String(glob), { ...options, capture: !0 }).exec(posix ? utils.toPosixSlashes(input) : input);
1710
- if (match2)
2765
+ let posix = utils.isWindows(options);
2766
+ let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
2767
+ let match2 = regex.exec(posix ? utils.toPosixSlashes(input) : input);
2768
+ if (match2) {
1711
2769
  return match2.slice(1).map((v) => v === void 0 ? "" : v);
2770
+ }
1712
2771
  };
1713
2772
  micromatch.makeRe = (...args) => picomatch.makeRe(...args);
1714
2773
  micromatch.scan = (...args) => picomatch.scan(...args);
1715
2774
  micromatch.parse = (patterns, options) => {
1716
2775
  let res = [];
1717
- for (let pattern of [].concat(patterns || []))
1718
- for (let str of braces(String(pattern), options))
2776
+ for (let pattern of [].concat(patterns || [])) {
2777
+ for (let str of braces(String(pattern), options)) {
1719
2778
  res.push(picomatch.parse(str, options));
2779
+ }
2780
+ }
1720
2781
  return res;
1721
2782
  };
1722
2783
  micromatch.braces = (pattern, options) => {
1723
- if (typeof pattern != "string") throw new TypeError("Expected a string");
1724
- return options && options.nobrace === !0 || !hasBraces(pattern) ? [pattern] : braces(pattern, options);
2784
+ if (typeof pattern !== "string") throw new TypeError("Expected a string");
2785
+ if (options && options.nobrace === true || !hasBraces(pattern)) {
2786
+ return [pattern];
2787
+ }
2788
+ return braces(pattern, options);
1725
2789
  };
1726
2790
  micromatch.braceExpand = (pattern, options) => {
1727
- if (typeof pattern != "string") throw new TypeError("Expected a string");
1728
- return micromatch.braces(pattern, { ...options, expand: !0 });
2791
+ if (typeof pattern !== "string") throw new TypeError("Expected a string");
2792
+ return micromatch.braces(pattern, { ...options, expand: true });
1729
2793
  };
1730
2794
  micromatch.hasBraces = hasBraces;
1731
2795
  module.exports = micromatch;
@@ -1735,13 +2799,19 @@ var require_micromatch = __commonJS({
1735
2799
  // ../../node_modules/totalist/sync/index.js
1736
2800
  var require_sync = __commonJS({
1737
2801
  "../../node_modules/totalist/sync/index.js"(exports) {
1738
- var { join: join2, resolve: resolve2 } = __require("path"), { readdirSync, statSync } = __require("fs");
2802
+ var { join: join2, resolve: resolve2 } = __require("path");
2803
+ var { readdirSync, statSync } = __require("fs");
1739
2804
  function totalist(dir, callback, pre = "") {
1740
2805
  dir = resolve2(".", dir);
1741
- let arr = readdirSync(dir), i = 0, abs, stats;
1742
- for (; i < arr.length; i++)
1743
- abs = join2(dir, arr[i]), stats = statSync(abs), stats.isDirectory() ? totalist(abs, callback, join2(pre, arr[i])) : callback(join2(pre, arr[i]), abs, stats);
2806
+ let arr = readdirSync(dir);
2807
+ let i = 0, abs, stats;
2808
+ for (; i < arr.length; i++) {
2809
+ abs = join2(dir, arr[i]);
2810
+ stats = statSync(abs);
2811
+ stats.isDirectory() ? totalist(abs, callback, join2(pre, arr[i])) : callback(join2(pre, arr[i]), abs, stats);
2812
+ }
1744
2813
  }
2814
+ __name(totalist, "totalist");
1745
2815
  exports.totalist = totalist;
1746
2816
  }
1747
2817
  });
@@ -1758,10 +2828,22 @@ var require_build = __commonJS({
1758
2828
  let pathname = raw, search = "", query, hash;
1759
2829
  if (raw.length > 1) {
1760
2830
  let idx = raw.indexOf("#", 1);
1761
- idx !== -1 && (hash = raw.substring(idx), pathname = raw.substring(0, idx)), idx = pathname.indexOf("?", 1), idx !== -1 && (search = pathname.substring(idx), pathname = pathname.substring(0, idx), search.length > 1 && (query = qs.parse(search.substring(1))));
2831
+ if (idx !== -1) {
2832
+ hash = raw.substring(idx);
2833
+ pathname = raw.substring(0, idx);
2834
+ }
2835
+ idx = pathname.indexOf("?", 1);
2836
+ if (idx !== -1) {
2837
+ search = pathname.substring(idx);
2838
+ pathname = pathname.substring(0, idx);
2839
+ if (search.length > 1) {
2840
+ query = qs.parse(search.substring(1));
2841
+ }
2842
+ }
1762
2843
  }
1763
2844
  return req._parsedUrl = { pathname, search, query, hash, raw };
1764
2845
  }
2846
+ __name(parse, "parse");
1765
2847
  exports.parse = parse;
1766
2848
  }
1767
2849
  });
@@ -1774,445 +2856,447 @@ var require_mrmime = __commonJS({
1774
2856
  "3gp": "video/3gpp",
1775
2857
  "3gpp": "video/3gpp",
1776
2858
  "3mf": "model/3mf",
1777
- aac: "audio/aac",
1778
- ac: "application/pkix-attr-cert",
1779
- adp: "audio/adpcm",
1780
- adts: "audio/aac",
1781
- ai: "application/postscript",
1782
- aml: "application/automationml-aml+xml",
1783
- amlx: "application/automationml-amlx+zip",
1784
- amr: "audio/amr",
1785
- apng: "image/apng",
1786
- appcache: "text/cache-manifest",
1787
- appinstaller: "application/appinstaller",
1788
- appx: "application/appx",
1789
- appxbundle: "application/appxbundle",
1790
- asc: "application/pgp-keys",
1791
- atom: "application/atom+xml",
1792
- atomcat: "application/atomcat+xml",
1793
- atomdeleted: "application/atomdeleted+xml",
1794
- atomsvc: "application/atomsvc+xml",
1795
- au: "audio/basic",
1796
- avci: "image/avci",
1797
- avcs: "image/avcs",
1798
- avif: "image/avif",
1799
- aw: "application/applixware",
1800
- bdoc: "application/bdoc",
1801
- bin: "application/octet-stream",
1802
- bmp: "image/bmp",
1803
- bpk: "application/octet-stream",
1804
- btf: "image/prs.btif",
1805
- btif: "image/prs.btif",
1806
- buffer: "application/octet-stream",
1807
- ccxml: "application/ccxml+xml",
1808
- cdfx: "application/cdfx+xml",
1809
- cdmia: "application/cdmi-capability",
1810
- cdmic: "application/cdmi-container",
1811
- cdmid: "application/cdmi-domain",
1812
- cdmio: "application/cdmi-object",
1813
- cdmiq: "application/cdmi-queue",
1814
- cer: "application/pkix-cert",
1815
- cgm: "image/cgm",
1816
- cjs: "application/node",
1817
- class: "application/java-vm",
1818
- coffee: "text/coffeescript",
1819
- conf: "text/plain",
1820
- cpl: "application/cpl+xml",
1821
- cpt: "application/mac-compactpro",
1822
- crl: "application/pkix-crl",
1823
- css: "text/css",
1824
- csv: "text/csv",
1825
- cu: "application/cu-seeme",
1826
- cwl: "application/cwl",
1827
- cww: "application/prs.cww",
1828
- davmount: "application/davmount+xml",
1829
- dbk: "application/docbook+xml",
1830
- deb: "application/octet-stream",
1831
- def: "text/plain",
1832
- deploy: "application/octet-stream",
1833
- dib: "image/bmp",
2859
+ "aac": "audio/aac",
2860
+ "ac": "application/pkix-attr-cert",
2861
+ "adp": "audio/adpcm",
2862
+ "adts": "audio/aac",
2863
+ "ai": "application/postscript",
2864
+ "aml": "application/automationml-aml+xml",
2865
+ "amlx": "application/automationml-amlx+zip",
2866
+ "amr": "audio/amr",
2867
+ "apng": "image/apng",
2868
+ "appcache": "text/cache-manifest",
2869
+ "appinstaller": "application/appinstaller",
2870
+ "appx": "application/appx",
2871
+ "appxbundle": "application/appxbundle",
2872
+ "asc": "application/pgp-keys",
2873
+ "atom": "application/atom+xml",
2874
+ "atomcat": "application/atomcat+xml",
2875
+ "atomdeleted": "application/atomdeleted+xml",
2876
+ "atomsvc": "application/atomsvc+xml",
2877
+ "au": "audio/basic",
2878
+ "avci": "image/avci",
2879
+ "avcs": "image/avcs",
2880
+ "avif": "image/avif",
2881
+ "aw": "application/applixware",
2882
+ "bdoc": "application/bdoc",
2883
+ "bin": "application/octet-stream",
2884
+ "bmp": "image/bmp",
2885
+ "bpk": "application/octet-stream",
2886
+ "btf": "image/prs.btif",
2887
+ "btif": "image/prs.btif",
2888
+ "buffer": "application/octet-stream",
2889
+ "ccxml": "application/ccxml+xml",
2890
+ "cdfx": "application/cdfx+xml",
2891
+ "cdmia": "application/cdmi-capability",
2892
+ "cdmic": "application/cdmi-container",
2893
+ "cdmid": "application/cdmi-domain",
2894
+ "cdmio": "application/cdmi-object",
2895
+ "cdmiq": "application/cdmi-queue",
2896
+ "cer": "application/pkix-cert",
2897
+ "cgm": "image/cgm",
2898
+ "cjs": "application/node",
2899
+ "class": "application/java-vm",
2900
+ "coffee": "text/coffeescript",
2901
+ "conf": "text/plain",
2902
+ "cpl": "application/cpl+xml",
2903
+ "cpt": "application/mac-compactpro",
2904
+ "crl": "application/pkix-crl",
2905
+ "css": "text/css",
2906
+ "csv": "text/csv",
2907
+ "cu": "application/cu-seeme",
2908
+ "cwl": "application/cwl",
2909
+ "cww": "application/prs.cww",
2910
+ "davmount": "application/davmount+xml",
2911
+ "dbk": "application/docbook+xml",
2912
+ "deb": "application/octet-stream",
2913
+ "def": "text/plain",
2914
+ "deploy": "application/octet-stream",
2915
+ "dib": "image/bmp",
1834
2916
  "disposition-notification": "message/disposition-notification",
1835
- dist: "application/octet-stream",
1836
- distz: "application/octet-stream",
1837
- dll: "application/octet-stream",
1838
- dmg: "application/octet-stream",
1839
- dms: "application/octet-stream",
1840
- doc: "application/msword",
1841
- dot: "application/msword",
1842
- dpx: "image/dpx",
1843
- drle: "image/dicom-rle",
1844
- dsc: "text/prs.lines.tag",
1845
- dssc: "application/dssc+der",
1846
- dtd: "application/xml-dtd",
1847
- dump: "application/octet-stream",
1848
- dwd: "application/atsc-dwd+xml",
1849
- ear: "application/java-archive",
1850
- ecma: "application/ecmascript",
1851
- elc: "application/octet-stream",
1852
- emf: "image/emf",
1853
- eml: "message/rfc822",
1854
- emma: "application/emma+xml",
1855
- emotionml: "application/emotionml+xml",
1856
- eps: "application/postscript",
1857
- epub: "application/epub+zip",
1858
- exe: "application/octet-stream",
1859
- exi: "application/exi",
1860
- exp: "application/express",
1861
- exr: "image/aces",
1862
- ez: "application/andrew-inset",
1863
- fdf: "application/fdf",
1864
- fdt: "application/fdt+xml",
1865
- fits: "image/fits",
1866
- g3: "image/g3fax",
1867
- gbr: "application/rpki-ghostbusters",
1868
- geojson: "application/geo+json",
1869
- gif: "image/gif",
1870
- glb: "model/gltf-binary",
1871
- gltf: "model/gltf+json",
1872
- gml: "application/gml+xml",
1873
- gpx: "application/gpx+xml",
1874
- gram: "application/srgs",
1875
- grxml: "application/srgs+xml",
1876
- gxf: "application/gxf",
1877
- gz: "application/gzip",
1878
- h261: "video/h261",
1879
- h263: "video/h263",
1880
- h264: "video/h264",
1881
- heic: "image/heic",
1882
- heics: "image/heic-sequence",
1883
- heif: "image/heif",
1884
- heifs: "image/heif-sequence",
1885
- hej2: "image/hej2k",
1886
- held: "application/atsc-held+xml",
1887
- hjson: "application/hjson",
1888
- hlp: "application/winhlp",
1889
- hqx: "application/mac-binhex40",
1890
- hsj2: "image/hsj2",
1891
- htm: "text/html",
1892
- html: "text/html",
1893
- ics: "text/calendar",
1894
- ief: "image/ief",
1895
- ifb: "text/calendar",
1896
- iges: "model/iges",
1897
- igs: "model/iges",
1898
- img: "application/octet-stream",
1899
- in: "text/plain",
1900
- ini: "text/plain",
1901
- ink: "application/inkml+xml",
1902
- inkml: "application/inkml+xml",
1903
- ipfix: "application/ipfix",
1904
- iso: "application/octet-stream",
1905
- its: "application/its+xml",
1906
- jade: "text/jade",
1907
- jar: "application/java-archive",
1908
- jhc: "image/jphc",
1909
- jls: "image/jls",
1910
- jp2: "image/jp2",
1911
- jpe: "image/jpeg",
1912
- jpeg: "image/jpeg",
1913
- jpf: "image/jpx",
1914
- jpg: "image/jpeg",
1915
- jpg2: "image/jp2",
1916
- jpgm: "image/jpm",
1917
- jpgv: "video/jpeg",
1918
- jph: "image/jph",
1919
- jpm: "image/jpm",
1920
- jpx: "image/jpx",
1921
- js: "text/javascript",
1922
- json: "application/json",
1923
- json5: "application/json5",
1924
- jsonld: "application/ld+json",
1925
- jsonml: "application/jsonml+json",
1926
- jsx: "text/jsx",
1927
- jt: "model/jt",
1928
- jxl: "image/jxl",
1929
- jxr: "image/jxr",
1930
- jxra: "image/jxra",
1931
- jxrs: "image/jxrs",
1932
- jxs: "image/jxs",
1933
- jxsc: "image/jxsc",
1934
- jxsi: "image/jxsi",
1935
- jxss: "image/jxss",
1936
- kar: "audio/midi",
1937
- ktx: "image/ktx",
1938
- ktx2: "image/ktx2",
1939
- less: "text/less",
1940
- lgr: "application/lgr+xml",
1941
- list: "text/plain",
1942
- litcoffee: "text/coffeescript",
1943
- log: "text/plain",
1944
- lostxml: "application/lost+xml",
1945
- lrf: "application/octet-stream",
1946
- m1v: "video/mpeg",
1947
- m21: "application/mp21",
1948
- m2a: "audio/mpeg",
1949
- m2t: "video/mp2t",
1950
- m2ts: "video/mp2t",
1951
- m2v: "video/mpeg",
1952
- m3a: "audio/mpeg",
1953
- m4a: "audio/mp4",
1954
- m4p: "application/mp4",
1955
- m4s: "video/iso.segment",
1956
- ma: "application/mathematica",
1957
- mads: "application/mads+xml",
1958
- maei: "application/mmt-aei+xml",
1959
- man: "text/troff",
1960
- manifest: "text/cache-manifest",
1961
- map: "application/json",
1962
- mar: "application/octet-stream",
1963
- markdown: "text/markdown",
1964
- mathml: "application/mathml+xml",
1965
- mb: "application/mathematica",
1966
- mbox: "application/mbox",
1967
- md: "text/markdown",
1968
- mdx: "text/mdx",
1969
- me: "text/troff",
1970
- mesh: "model/mesh",
1971
- meta4: "application/metalink4+xml",
1972
- metalink: "application/metalink+xml",
1973
- mets: "application/mets+xml",
1974
- mft: "application/rpki-manifest",
1975
- mid: "audio/midi",
1976
- midi: "audio/midi",
1977
- mime: "message/rfc822",
1978
- mj2: "video/mj2",
1979
- mjp2: "video/mj2",
1980
- mjs: "text/javascript",
1981
- mml: "text/mathml",
1982
- mods: "application/mods+xml",
1983
- mov: "video/quicktime",
1984
- mp2: "audio/mpeg",
1985
- mp21: "application/mp21",
1986
- mp2a: "audio/mpeg",
1987
- mp3: "audio/mpeg",
1988
- mp4: "video/mp4",
1989
- mp4a: "audio/mp4",
1990
- mp4s: "application/mp4",
1991
- mp4v: "video/mp4",
1992
- mpd: "application/dash+xml",
1993
- mpe: "video/mpeg",
1994
- mpeg: "video/mpeg",
1995
- mpf: "application/media-policy-dataset+xml",
1996
- mpg: "video/mpeg",
1997
- mpg4: "video/mp4",
1998
- mpga: "audio/mpeg",
1999
- mpp: "application/dash-patch+xml",
2000
- mrc: "application/marc",
2001
- mrcx: "application/marcxml+xml",
2002
- ms: "text/troff",
2003
- mscml: "application/mediaservercontrol+xml",
2004
- msh: "model/mesh",
2005
- msi: "application/octet-stream",
2006
- msix: "application/msix",
2007
- msixbundle: "application/msixbundle",
2008
- msm: "application/octet-stream",
2009
- msp: "application/octet-stream",
2010
- mtl: "model/mtl",
2011
- mts: "video/mp2t",
2012
- musd: "application/mmt-usd+xml",
2013
- mxf: "application/mxf",
2014
- mxmf: "audio/mobile-xmf",
2015
- mxml: "application/xv+xml",
2016
- n3: "text/n3",
2017
- nb: "application/mathematica",
2018
- nq: "application/n-quads",
2019
- nt: "application/n-triples",
2020
- obj: "model/obj",
2021
- oda: "application/oda",
2022
- oga: "audio/ogg",
2023
- ogg: "audio/ogg",
2024
- ogv: "video/ogg",
2025
- ogx: "application/ogg",
2026
- omdoc: "application/omdoc+xml",
2027
- onepkg: "application/onenote",
2028
- onetmp: "application/onenote",
2029
- onetoc: "application/onenote",
2030
- onetoc2: "application/onenote",
2031
- opf: "application/oebps-package+xml",
2032
- opus: "audio/ogg",
2033
- otf: "font/otf",
2034
- owl: "application/rdf+xml",
2035
- oxps: "application/oxps",
2036
- p10: "application/pkcs10",
2037
- p7c: "application/pkcs7-mime",
2038
- p7m: "application/pkcs7-mime",
2039
- p7s: "application/pkcs7-signature",
2040
- p8: "application/pkcs8",
2041
- pdf: "application/pdf",
2042
- pfr: "application/font-tdpfr",
2043
- pgp: "application/pgp-encrypted",
2044
- pkg: "application/octet-stream",
2045
- pki: "application/pkixcmp",
2046
- pkipath: "application/pkix-pkipath",
2047
- pls: "application/pls+xml",
2048
- png: "image/png",
2049
- prc: "model/prc",
2050
- prf: "application/pics-rules",
2051
- provx: "application/provenance+xml",
2052
- ps: "application/postscript",
2053
- pskcxml: "application/pskc+xml",
2054
- pti: "image/prs.pti",
2055
- qt: "video/quicktime",
2056
- raml: "application/raml+yaml",
2057
- rapd: "application/route-apd+xml",
2058
- rdf: "application/rdf+xml",
2059
- relo: "application/p2p-overlay+xml",
2060
- rif: "application/reginfo+xml",
2061
- rl: "application/resource-lists+xml",
2062
- rld: "application/resource-lists-diff+xml",
2063
- rmi: "audio/midi",
2064
- rnc: "application/relax-ng-compact-syntax",
2065
- rng: "application/xml",
2066
- roa: "application/rpki-roa",
2067
- roff: "text/troff",
2068
- rq: "application/sparql-query",
2069
- rs: "application/rls-services+xml",
2070
- rsat: "application/atsc-rsat+xml",
2071
- rsd: "application/rsd+xml",
2072
- rsheet: "application/urc-ressheet+xml",
2073
- rss: "application/rss+xml",
2074
- rtf: "text/rtf",
2075
- rtx: "text/richtext",
2076
- rusd: "application/route-usd+xml",
2077
- s3m: "audio/s3m",
2078
- sbml: "application/sbml+xml",
2079
- scq: "application/scvp-cv-request",
2080
- scs: "application/scvp-cv-response",
2081
- sdp: "application/sdp",
2082
- senmlx: "application/senml+xml",
2083
- sensmlx: "application/sensml+xml",
2084
- ser: "application/java-serialized-object",
2085
- setpay: "application/set-payment-initiation",
2086
- setreg: "application/set-registration-initiation",
2087
- sgi: "image/sgi",
2088
- sgm: "text/sgml",
2089
- sgml: "text/sgml",
2090
- shex: "text/shex",
2091
- shf: "application/shf+xml",
2092
- shtml: "text/html",
2093
- sieve: "application/sieve",
2094
- sig: "application/pgp-signature",
2095
- sil: "audio/silk",
2096
- silo: "model/mesh",
2097
- siv: "application/sieve",
2098
- slim: "text/slim",
2099
- slm: "text/slim",
2100
- sls: "application/route-s-tsid+xml",
2101
- smi: "application/smil+xml",
2102
- smil: "application/smil+xml",
2103
- snd: "audio/basic",
2104
- so: "application/octet-stream",
2105
- spdx: "text/spdx",
2106
- spp: "application/scvp-vp-response",
2107
- spq: "application/scvp-vp-request",
2108
- spx: "audio/ogg",
2109
- sql: "application/sql",
2110
- sru: "application/sru+xml",
2111
- srx: "application/sparql-results+xml",
2112
- ssdl: "application/ssdl+xml",
2113
- ssml: "application/ssml+xml",
2114
- stk: "application/hyperstudio",
2115
- stl: "model/stl",
2116
- stpx: "model/step+xml",
2117
- stpxz: "model/step-xml+zip",
2118
- stpz: "model/step+zip",
2119
- styl: "text/stylus",
2120
- stylus: "text/stylus",
2121
- svg: "image/svg+xml",
2122
- svgz: "image/svg+xml",
2123
- swidtag: "application/swid+xml",
2124
- t: "text/troff",
2125
- t38: "image/t38",
2126
- td: "application/urc-targetdesc+xml",
2127
- tei: "application/tei+xml",
2128
- teicorpus: "application/tei+xml",
2129
- text: "text/plain",
2130
- tfi: "application/thraud+xml",
2131
- tfx: "image/tiff-fx",
2132
- tif: "image/tiff",
2133
- tiff: "image/tiff",
2134
- toml: "application/toml",
2135
- tr: "text/troff",
2136
- trig: "application/trig",
2137
- ts: "video/mp2t",
2138
- tsd: "application/timestamped-data",
2139
- tsv: "text/tab-separated-values",
2140
- ttc: "font/collection",
2141
- ttf: "font/ttf",
2142
- ttl: "text/turtle",
2143
- ttml: "application/ttml+xml",
2144
- txt: "text/plain",
2145
- u3d: "model/u3d",
2146
- u8dsn: "message/global-delivery-status",
2147
- u8hdr: "message/global-headers",
2148
- u8mdn: "message/global-disposition-notification",
2149
- u8msg: "message/global",
2150
- ubj: "application/ubjson",
2151
- uri: "text/uri-list",
2152
- uris: "text/uri-list",
2153
- urls: "text/uri-list",
2154
- vcard: "text/vcard",
2155
- vrml: "model/vrml",
2156
- vtt: "text/vtt",
2157
- vxml: "application/voicexml+xml",
2158
- war: "application/java-archive",
2159
- wasm: "application/wasm",
2160
- wav: "audio/wav",
2161
- weba: "audio/webm",
2162
- webm: "video/webm",
2163
- webmanifest: "application/manifest+json",
2164
- webp: "image/webp",
2165
- wgsl: "text/wgsl",
2166
- wgt: "application/widget",
2167
- wif: "application/watcherinfo+xml",
2168
- wmf: "image/wmf",
2169
- woff: "font/woff",
2170
- woff2: "font/woff2",
2171
- wrl: "model/vrml",
2172
- wsdl: "application/wsdl+xml",
2173
- wspolicy: "application/wspolicy+xml",
2174
- x3d: "model/x3d+xml",
2175
- x3db: "model/x3d+fastinfoset",
2176
- x3dbz: "model/x3d+binary",
2177
- x3dv: "model/x3d-vrml",
2178
- x3dvz: "model/x3d+vrml",
2179
- x3dz: "model/x3d+xml",
2180
- xaml: "application/xaml+xml",
2181
- xav: "application/xcap-att+xml",
2182
- xca: "application/xcap-caps+xml",
2183
- xcs: "application/calendar+xml",
2184
- xdf: "application/xcap-diff+xml",
2185
- xdssc: "application/dssc+xml",
2186
- xel: "application/xcap-el+xml",
2187
- xenc: "application/xenc+xml",
2188
- xer: "application/patch-ops-error+xml",
2189
- xfdf: "application/xfdf",
2190
- xht: "application/xhtml+xml",
2191
- xhtml: "application/xhtml+xml",
2192
- xhvml: "application/xv+xml",
2193
- xlf: "application/xliff+xml",
2194
- xm: "audio/xm",
2195
- xml: "text/xml",
2196
- xns: "application/xcap-ns+xml",
2197
- xop: "application/xop+xml",
2198
- xpl: "application/xproc+xml",
2199
- xsd: "application/xml",
2200
- xsf: "application/prs.xsf+xml",
2201
- xsl: "application/xml",
2202
- xslt: "application/xml",
2203
- xspf: "application/xspf+xml",
2204
- xvm: "application/xv+xml",
2205
- xvml: "application/xv+xml",
2206
- yaml: "text/yaml",
2207
- yang: "application/yang",
2208
- yin: "application/yin+xml",
2209
- yml: "text/yaml",
2210
- zip: "application/zip"
2917
+ "dist": "application/octet-stream",
2918
+ "distz": "application/octet-stream",
2919
+ "dll": "application/octet-stream",
2920
+ "dmg": "application/octet-stream",
2921
+ "dms": "application/octet-stream",
2922
+ "doc": "application/msword",
2923
+ "dot": "application/msword",
2924
+ "dpx": "image/dpx",
2925
+ "drle": "image/dicom-rle",
2926
+ "dsc": "text/prs.lines.tag",
2927
+ "dssc": "application/dssc+der",
2928
+ "dtd": "application/xml-dtd",
2929
+ "dump": "application/octet-stream",
2930
+ "dwd": "application/atsc-dwd+xml",
2931
+ "ear": "application/java-archive",
2932
+ "ecma": "application/ecmascript",
2933
+ "elc": "application/octet-stream",
2934
+ "emf": "image/emf",
2935
+ "eml": "message/rfc822",
2936
+ "emma": "application/emma+xml",
2937
+ "emotionml": "application/emotionml+xml",
2938
+ "eps": "application/postscript",
2939
+ "epub": "application/epub+zip",
2940
+ "exe": "application/octet-stream",
2941
+ "exi": "application/exi",
2942
+ "exp": "application/express",
2943
+ "exr": "image/aces",
2944
+ "ez": "application/andrew-inset",
2945
+ "fdf": "application/fdf",
2946
+ "fdt": "application/fdt+xml",
2947
+ "fits": "image/fits",
2948
+ "g3": "image/g3fax",
2949
+ "gbr": "application/rpki-ghostbusters",
2950
+ "geojson": "application/geo+json",
2951
+ "gif": "image/gif",
2952
+ "glb": "model/gltf-binary",
2953
+ "gltf": "model/gltf+json",
2954
+ "gml": "application/gml+xml",
2955
+ "gpx": "application/gpx+xml",
2956
+ "gram": "application/srgs",
2957
+ "grxml": "application/srgs+xml",
2958
+ "gxf": "application/gxf",
2959
+ "gz": "application/gzip",
2960
+ "h261": "video/h261",
2961
+ "h263": "video/h263",
2962
+ "h264": "video/h264",
2963
+ "heic": "image/heic",
2964
+ "heics": "image/heic-sequence",
2965
+ "heif": "image/heif",
2966
+ "heifs": "image/heif-sequence",
2967
+ "hej2": "image/hej2k",
2968
+ "held": "application/atsc-held+xml",
2969
+ "hjson": "application/hjson",
2970
+ "hlp": "application/winhlp",
2971
+ "hqx": "application/mac-binhex40",
2972
+ "hsj2": "image/hsj2",
2973
+ "htm": "text/html",
2974
+ "html": "text/html",
2975
+ "ics": "text/calendar",
2976
+ "ief": "image/ief",
2977
+ "ifb": "text/calendar",
2978
+ "iges": "model/iges",
2979
+ "igs": "model/iges",
2980
+ "img": "application/octet-stream",
2981
+ "in": "text/plain",
2982
+ "ini": "text/plain",
2983
+ "ink": "application/inkml+xml",
2984
+ "inkml": "application/inkml+xml",
2985
+ "ipfix": "application/ipfix",
2986
+ "iso": "application/octet-stream",
2987
+ "its": "application/its+xml",
2988
+ "jade": "text/jade",
2989
+ "jar": "application/java-archive",
2990
+ "jhc": "image/jphc",
2991
+ "jls": "image/jls",
2992
+ "jp2": "image/jp2",
2993
+ "jpe": "image/jpeg",
2994
+ "jpeg": "image/jpeg",
2995
+ "jpf": "image/jpx",
2996
+ "jpg": "image/jpeg",
2997
+ "jpg2": "image/jp2",
2998
+ "jpgm": "image/jpm",
2999
+ "jpgv": "video/jpeg",
3000
+ "jph": "image/jph",
3001
+ "jpm": "image/jpm",
3002
+ "jpx": "image/jpx",
3003
+ "js": "text/javascript",
3004
+ "json": "application/json",
3005
+ "json5": "application/json5",
3006
+ "jsonld": "application/ld+json",
3007
+ "jsonml": "application/jsonml+json",
3008
+ "jsx": "text/jsx",
3009
+ "jt": "model/jt",
3010
+ "jxl": "image/jxl",
3011
+ "jxr": "image/jxr",
3012
+ "jxra": "image/jxra",
3013
+ "jxrs": "image/jxrs",
3014
+ "jxs": "image/jxs",
3015
+ "jxsc": "image/jxsc",
3016
+ "jxsi": "image/jxsi",
3017
+ "jxss": "image/jxss",
3018
+ "kar": "audio/midi",
3019
+ "ktx": "image/ktx",
3020
+ "ktx2": "image/ktx2",
3021
+ "less": "text/less",
3022
+ "lgr": "application/lgr+xml",
3023
+ "list": "text/plain",
3024
+ "litcoffee": "text/coffeescript",
3025
+ "log": "text/plain",
3026
+ "lostxml": "application/lost+xml",
3027
+ "lrf": "application/octet-stream",
3028
+ "m1v": "video/mpeg",
3029
+ "m21": "application/mp21",
3030
+ "m2a": "audio/mpeg",
3031
+ "m2t": "video/mp2t",
3032
+ "m2ts": "video/mp2t",
3033
+ "m2v": "video/mpeg",
3034
+ "m3a": "audio/mpeg",
3035
+ "m4a": "audio/mp4",
3036
+ "m4p": "application/mp4",
3037
+ "m4s": "video/iso.segment",
3038
+ "ma": "application/mathematica",
3039
+ "mads": "application/mads+xml",
3040
+ "maei": "application/mmt-aei+xml",
3041
+ "man": "text/troff",
3042
+ "manifest": "text/cache-manifest",
3043
+ "map": "application/json",
3044
+ "mar": "application/octet-stream",
3045
+ "markdown": "text/markdown",
3046
+ "mathml": "application/mathml+xml",
3047
+ "mb": "application/mathematica",
3048
+ "mbox": "application/mbox",
3049
+ "md": "text/markdown",
3050
+ "mdx": "text/mdx",
3051
+ "me": "text/troff",
3052
+ "mesh": "model/mesh",
3053
+ "meta4": "application/metalink4+xml",
3054
+ "metalink": "application/metalink+xml",
3055
+ "mets": "application/mets+xml",
3056
+ "mft": "application/rpki-manifest",
3057
+ "mid": "audio/midi",
3058
+ "midi": "audio/midi",
3059
+ "mime": "message/rfc822",
3060
+ "mj2": "video/mj2",
3061
+ "mjp2": "video/mj2",
3062
+ "mjs": "text/javascript",
3063
+ "mml": "text/mathml",
3064
+ "mods": "application/mods+xml",
3065
+ "mov": "video/quicktime",
3066
+ "mp2": "audio/mpeg",
3067
+ "mp21": "application/mp21",
3068
+ "mp2a": "audio/mpeg",
3069
+ "mp3": "audio/mpeg",
3070
+ "mp4": "video/mp4",
3071
+ "mp4a": "audio/mp4",
3072
+ "mp4s": "application/mp4",
3073
+ "mp4v": "video/mp4",
3074
+ "mpd": "application/dash+xml",
3075
+ "mpe": "video/mpeg",
3076
+ "mpeg": "video/mpeg",
3077
+ "mpf": "application/media-policy-dataset+xml",
3078
+ "mpg": "video/mpeg",
3079
+ "mpg4": "video/mp4",
3080
+ "mpga": "audio/mpeg",
3081
+ "mpp": "application/dash-patch+xml",
3082
+ "mrc": "application/marc",
3083
+ "mrcx": "application/marcxml+xml",
3084
+ "ms": "text/troff",
3085
+ "mscml": "application/mediaservercontrol+xml",
3086
+ "msh": "model/mesh",
3087
+ "msi": "application/octet-stream",
3088
+ "msix": "application/msix",
3089
+ "msixbundle": "application/msixbundle",
3090
+ "msm": "application/octet-stream",
3091
+ "msp": "application/octet-stream",
3092
+ "mtl": "model/mtl",
3093
+ "mts": "video/mp2t",
3094
+ "musd": "application/mmt-usd+xml",
3095
+ "mxf": "application/mxf",
3096
+ "mxmf": "audio/mobile-xmf",
3097
+ "mxml": "application/xv+xml",
3098
+ "n3": "text/n3",
3099
+ "nb": "application/mathematica",
3100
+ "nq": "application/n-quads",
3101
+ "nt": "application/n-triples",
3102
+ "obj": "model/obj",
3103
+ "oda": "application/oda",
3104
+ "oga": "audio/ogg",
3105
+ "ogg": "audio/ogg",
3106
+ "ogv": "video/ogg",
3107
+ "ogx": "application/ogg",
3108
+ "omdoc": "application/omdoc+xml",
3109
+ "onepkg": "application/onenote",
3110
+ "onetmp": "application/onenote",
3111
+ "onetoc": "application/onenote",
3112
+ "onetoc2": "application/onenote",
3113
+ "opf": "application/oebps-package+xml",
3114
+ "opus": "audio/ogg",
3115
+ "otf": "font/otf",
3116
+ "owl": "application/rdf+xml",
3117
+ "oxps": "application/oxps",
3118
+ "p10": "application/pkcs10",
3119
+ "p7c": "application/pkcs7-mime",
3120
+ "p7m": "application/pkcs7-mime",
3121
+ "p7s": "application/pkcs7-signature",
3122
+ "p8": "application/pkcs8",
3123
+ "pdf": "application/pdf",
3124
+ "pfr": "application/font-tdpfr",
3125
+ "pgp": "application/pgp-encrypted",
3126
+ "pkg": "application/octet-stream",
3127
+ "pki": "application/pkixcmp",
3128
+ "pkipath": "application/pkix-pkipath",
3129
+ "pls": "application/pls+xml",
3130
+ "png": "image/png",
3131
+ "prc": "model/prc",
3132
+ "prf": "application/pics-rules",
3133
+ "provx": "application/provenance+xml",
3134
+ "ps": "application/postscript",
3135
+ "pskcxml": "application/pskc+xml",
3136
+ "pti": "image/prs.pti",
3137
+ "qt": "video/quicktime",
3138
+ "raml": "application/raml+yaml",
3139
+ "rapd": "application/route-apd+xml",
3140
+ "rdf": "application/rdf+xml",
3141
+ "relo": "application/p2p-overlay+xml",
3142
+ "rif": "application/reginfo+xml",
3143
+ "rl": "application/resource-lists+xml",
3144
+ "rld": "application/resource-lists-diff+xml",
3145
+ "rmi": "audio/midi",
3146
+ "rnc": "application/relax-ng-compact-syntax",
3147
+ "rng": "application/xml",
3148
+ "roa": "application/rpki-roa",
3149
+ "roff": "text/troff",
3150
+ "rq": "application/sparql-query",
3151
+ "rs": "application/rls-services+xml",
3152
+ "rsat": "application/atsc-rsat+xml",
3153
+ "rsd": "application/rsd+xml",
3154
+ "rsheet": "application/urc-ressheet+xml",
3155
+ "rss": "application/rss+xml",
3156
+ "rtf": "text/rtf",
3157
+ "rtx": "text/richtext",
3158
+ "rusd": "application/route-usd+xml",
3159
+ "s3m": "audio/s3m",
3160
+ "sbml": "application/sbml+xml",
3161
+ "scq": "application/scvp-cv-request",
3162
+ "scs": "application/scvp-cv-response",
3163
+ "sdp": "application/sdp",
3164
+ "senmlx": "application/senml+xml",
3165
+ "sensmlx": "application/sensml+xml",
3166
+ "ser": "application/java-serialized-object",
3167
+ "setpay": "application/set-payment-initiation",
3168
+ "setreg": "application/set-registration-initiation",
3169
+ "sgi": "image/sgi",
3170
+ "sgm": "text/sgml",
3171
+ "sgml": "text/sgml",
3172
+ "shex": "text/shex",
3173
+ "shf": "application/shf+xml",
3174
+ "shtml": "text/html",
3175
+ "sieve": "application/sieve",
3176
+ "sig": "application/pgp-signature",
3177
+ "sil": "audio/silk",
3178
+ "silo": "model/mesh",
3179
+ "siv": "application/sieve",
3180
+ "slim": "text/slim",
3181
+ "slm": "text/slim",
3182
+ "sls": "application/route-s-tsid+xml",
3183
+ "smi": "application/smil+xml",
3184
+ "smil": "application/smil+xml",
3185
+ "snd": "audio/basic",
3186
+ "so": "application/octet-stream",
3187
+ "spdx": "text/spdx",
3188
+ "spp": "application/scvp-vp-response",
3189
+ "spq": "application/scvp-vp-request",
3190
+ "spx": "audio/ogg",
3191
+ "sql": "application/sql",
3192
+ "sru": "application/sru+xml",
3193
+ "srx": "application/sparql-results+xml",
3194
+ "ssdl": "application/ssdl+xml",
3195
+ "ssml": "application/ssml+xml",
3196
+ "stk": "application/hyperstudio",
3197
+ "stl": "model/stl",
3198
+ "stpx": "model/step+xml",
3199
+ "stpxz": "model/step-xml+zip",
3200
+ "stpz": "model/step+zip",
3201
+ "styl": "text/stylus",
3202
+ "stylus": "text/stylus",
3203
+ "svg": "image/svg+xml",
3204
+ "svgz": "image/svg+xml",
3205
+ "swidtag": "application/swid+xml",
3206
+ "t": "text/troff",
3207
+ "t38": "image/t38",
3208
+ "td": "application/urc-targetdesc+xml",
3209
+ "tei": "application/tei+xml",
3210
+ "teicorpus": "application/tei+xml",
3211
+ "text": "text/plain",
3212
+ "tfi": "application/thraud+xml",
3213
+ "tfx": "image/tiff-fx",
3214
+ "tif": "image/tiff",
3215
+ "tiff": "image/tiff",
3216
+ "toml": "application/toml",
3217
+ "tr": "text/troff",
3218
+ "trig": "application/trig",
3219
+ "ts": "video/mp2t",
3220
+ "tsd": "application/timestamped-data",
3221
+ "tsv": "text/tab-separated-values",
3222
+ "ttc": "font/collection",
3223
+ "ttf": "font/ttf",
3224
+ "ttl": "text/turtle",
3225
+ "ttml": "application/ttml+xml",
3226
+ "txt": "text/plain",
3227
+ "u3d": "model/u3d",
3228
+ "u8dsn": "message/global-delivery-status",
3229
+ "u8hdr": "message/global-headers",
3230
+ "u8mdn": "message/global-disposition-notification",
3231
+ "u8msg": "message/global",
3232
+ "ubj": "application/ubjson",
3233
+ "uri": "text/uri-list",
3234
+ "uris": "text/uri-list",
3235
+ "urls": "text/uri-list",
3236
+ "vcard": "text/vcard",
3237
+ "vrml": "model/vrml",
3238
+ "vtt": "text/vtt",
3239
+ "vxml": "application/voicexml+xml",
3240
+ "war": "application/java-archive",
3241
+ "wasm": "application/wasm",
3242
+ "wav": "audio/wav",
3243
+ "weba": "audio/webm",
3244
+ "webm": "video/webm",
3245
+ "webmanifest": "application/manifest+json",
3246
+ "webp": "image/webp",
3247
+ "wgsl": "text/wgsl",
3248
+ "wgt": "application/widget",
3249
+ "wif": "application/watcherinfo+xml",
3250
+ "wmf": "image/wmf",
3251
+ "woff": "font/woff",
3252
+ "woff2": "font/woff2",
3253
+ "wrl": "model/vrml",
3254
+ "wsdl": "application/wsdl+xml",
3255
+ "wspolicy": "application/wspolicy+xml",
3256
+ "x3d": "model/x3d+xml",
3257
+ "x3db": "model/x3d+fastinfoset",
3258
+ "x3dbz": "model/x3d+binary",
3259
+ "x3dv": "model/x3d-vrml",
3260
+ "x3dvz": "model/x3d+vrml",
3261
+ "x3dz": "model/x3d+xml",
3262
+ "xaml": "application/xaml+xml",
3263
+ "xav": "application/xcap-att+xml",
3264
+ "xca": "application/xcap-caps+xml",
3265
+ "xcs": "application/calendar+xml",
3266
+ "xdf": "application/xcap-diff+xml",
3267
+ "xdssc": "application/dssc+xml",
3268
+ "xel": "application/xcap-el+xml",
3269
+ "xenc": "application/xenc+xml",
3270
+ "xer": "application/patch-ops-error+xml",
3271
+ "xfdf": "application/xfdf",
3272
+ "xht": "application/xhtml+xml",
3273
+ "xhtml": "application/xhtml+xml",
3274
+ "xhvml": "application/xv+xml",
3275
+ "xlf": "application/xliff+xml",
3276
+ "xm": "audio/xm",
3277
+ "xml": "text/xml",
3278
+ "xns": "application/xcap-ns+xml",
3279
+ "xop": "application/xop+xml",
3280
+ "xpl": "application/xproc+xml",
3281
+ "xsd": "application/xml",
3282
+ "xsf": "application/prs.xsf+xml",
3283
+ "xsl": "application/xml",
3284
+ "xslt": "application/xml",
3285
+ "xspf": "application/xspf+xml",
3286
+ "xvm": "application/xv+xml",
3287
+ "xvml": "application/xv+xml",
3288
+ "yaml": "text/yaml",
3289
+ "yang": "application/yang",
3290
+ "yin": "application/yin+xml",
3291
+ "yml": "text/yaml",
3292
+ "zip": "application/zip"
2211
3293
  };
2212
3294
  function lookup(extn) {
2213
- let tmp = ("" + extn).trim().toLowerCase(), idx = tmp.lastIndexOf(".");
2214
- return mimes[~idx ? tmp.substring(++idx) : tmp];
3295
+ let tmp = ("" + extn).trim().toLowerCase();
3296
+ let idx = tmp.lastIndexOf(".");
3297
+ return mimes[!~idx ? tmp : tmp.substring(++idx)];
2215
3298
  }
3299
+ __name(lookup, "lookup");
2216
3300
  exports.mimes = mimes;
2217
3301
  exports.lookup = lookup;
2218
3302
  }
@@ -2221,96 +3305,169 @@ var require_mrmime = __commonJS({
2221
3305
  // ../../node_modules/sirv/build.js
2222
3306
  var require_build2 = __commonJS({
2223
3307
  "../../node_modules/sirv/build.js"(exports, module) {
2224
- var fs = __require("fs"), { join: join2, normalize: normalize2, resolve: resolve2 } = __require("path"), { totalist } = require_sync(), { parse } = require_build(), { lookup } = require_mrmime(), noop = () => {
2225
- };
3308
+ var fs = __require("fs");
3309
+ var { join: join2, normalize: normalize2, resolve: resolve2 } = __require("path");
3310
+ var { totalist } = require_sync();
3311
+ var { parse } = require_build();
3312
+ var { lookup } = require_mrmime();
3313
+ var noop = /* @__PURE__ */ __name(() => {
3314
+ }, "noop");
2226
3315
  function isMatch(uri, arr) {
2227
- for (let i = 0; i < arr.length; i++)
2228
- if (arr[i].test(uri)) return !0;
3316
+ for (let i = 0; i < arr.length; i++) {
3317
+ if (arr[i].test(uri)) return true;
3318
+ }
2229
3319
  }
3320
+ __name(isMatch, "isMatch");
2230
3321
  function toAssume(uri, extns) {
2231
3322
  let i = 0, x, len = uri.length - 1;
2232
- uri.charCodeAt(len) === 47 && (uri = uri.substring(0, len));
3323
+ if (uri.charCodeAt(len) === 47) {
3324
+ uri = uri.substring(0, len);
3325
+ }
2233
3326
  let arr = [], tmp = `${uri}/index`;
2234
- for (; i < extns.length; i++)
2235
- x = extns[i] ? `.${extns[i]}` : "", uri && arr.push(uri + x), arr.push(tmp + x);
3327
+ for (; i < extns.length; i++) {
3328
+ x = extns[i] ? `.${extns[i]}` : "";
3329
+ if (uri) arr.push(uri + x);
3330
+ arr.push(tmp + x);
3331
+ }
2236
3332
  return arr;
2237
3333
  }
3334
+ __name(toAssume, "toAssume");
2238
3335
  function viaCache(cache, uri, extns) {
2239
3336
  let i = 0, data, arr = toAssume(uri, extns);
2240
- for (; i < arr.length; i++)
3337
+ for (; i < arr.length; i++) {
2241
3338
  if (data = cache[arr[i]]) return data;
3339
+ }
2242
3340
  }
3341
+ __name(viaCache, "viaCache");
2243
3342
  function viaLocal(dir, isEtag, uri, extns) {
2244
- let i = 0, arr = toAssume(uri, extns), abs, stats, name, headers;
2245
- for (; i < arr.length; i++)
2246
- if (abs = normalize2(join2(dir, name = arr[i])), abs.startsWith(dir) && fs.existsSync(abs)) {
2247
- if (stats = fs.statSync(abs), stats.isDirectory()) continue;
2248
- return headers = toHeaders(name, stats, isEtag), headers["Cache-Control"] = isEtag ? "no-cache" : "no-store", { abs, stats, headers };
3343
+ let i = 0, arr = toAssume(uri, extns);
3344
+ let abs, stats, name, headers;
3345
+ for (; i < arr.length; i++) {
3346
+ abs = normalize2(join2(dir, name = arr[i]));
3347
+ if (abs.startsWith(dir) && fs.existsSync(abs)) {
3348
+ stats = fs.statSync(abs);
3349
+ if (stats.isDirectory()) continue;
3350
+ headers = toHeaders(name, stats, isEtag);
3351
+ headers["Cache-Control"] = isEtag ? "no-cache" : "no-store";
3352
+ return { abs, stats, headers };
2249
3353
  }
3354
+ }
2250
3355
  }
3356
+ __name(viaLocal, "viaLocal");
2251
3357
  function is404(req, res) {
2252
3358
  return res.statusCode = 404, res.end();
2253
3359
  }
3360
+ __name(is404, "is404");
2254
3361
  function send(req, res, file, stats, headers) {
2255
3362
  let code = 200, tmp, opts = {};
2256
3363
  headers = { ...headers };
2257
- for (let key in headers)
2258
- tmp = res.getHeader(key), tmp && (headers[key] = tmp);
2259
- if ((tmp = res.getHeader("content-type")) && (headers["Content-Type"] = tmp), req.headers.range) {
3364
+ for (let key in headers) {
3365
+ tmp = res.getHeader(key);
3366
+ if (tmp) headers[key] = tmp;
3367
+ }
3368
+ if (tmp = res.getHeader("content-type")) {
3369
+ headers["Content-Type"] = tmp;
3370
+ }
3371
+ if (req.headers.range) {
2260
3372
  code = 206;
2261
- let [x, y] = req.headers.range.replace("bytes=", "").split("-"), end = opts.end = parseInt(y, 10) || stats.size - 1, start = opts.start = parseInt(x, 10) || 0;
2262
- if (end >= stats.size && (end = stats.size - 1), start >= stats.size)
2263
- return res.setHeader("Content-Range", `bytes */${stats.size}`), res.statusCode = 416, res.end();
2264
- headers["Content-Range"] = `bytes ${start}-${end}/${stats.size}`, headers["Content-Length"] = end - start + 1, headers["Accept-Ranges"] = "bytes";
3373
+ let [x, y] = req.headers.range.replace("bytes=", "").split("-");
3374
+ let end = opts.end = parseInt(y, 10) || stats.size - 1;
3375
+ let start = opts.start = parseInt(x, 10) || 0;
3376
+ if (end >= stats.size) {
3377
+ end = stats.size - 1;
3378
+ }
3379
+ if (start >= stats.size) {
3380
+ res.setHeader("Content-Range", `bytes */${stats.size}`);
3381
+ res.statusCode = 416;
3382
+ return res.end();
3383
+ }
3384
+ headers["Content-Range"] = `bytes ${start}-${end}/${stats.size}`;
3385
+ headers["Content-Length"] = end - start + 1;
3386
+ headers["Accept-Ranges"] = "bytes";
2265
3387
  }
2266
- res.writeHead(code, headers), fs.createReadStream(file, opts).pipe(res);
3388
+ res.writeHead(code, headers);
3389
+ fs.createReadStream(file, opts).pipe(res);
2267
3390
  }
3391
+ __name(send, "send");
2268
3392
  var ENCODING = {
2269
3393
  ".br": "br",
2270
3394
  ".gz": "gzip"
2271
3395
  };
2272
3396
  function toHeaders(name, stats, isEtag) {
2273
- let enc = ENCODING[name.slice(-3)], ctype = lookup(name.slice(0, enc && -3)) || "";
2274
- ctype === "text/html" && (ctype += ";charset=utf-8");
3397
+ let enc = ENCODING[name.slice(-3)];
3398
+ let ctype = lookup(name.slice(0, enc && -3)) || "";
3399
+ if (ctype === "text/html") ctype += ";charset=utf-8";
2275
3400
  let headers = {
2276
3401
  "Content-Length": stats.size,
2277
3402
  "Content-Type": ctype,
2278
3403
  "Last-Modified": stats.mtime.toUTCString()
2279
3404
  };
2280
- return enc && (headers["Content-Encoding"] = enc), isEtag && (headers.ETag = `W/"${stats.size}-${stats.mtime.getTime()}"`), headers;
3405
+ if (enc) headers["Content-Encoding"] = enc;
3406
+ if (isEtag) headers["ETag"] = `W/"${stats.size}-${stats.mtime.getTime()}"`;
3407
+ return headers;
2281
3408
  }
3409
+ __name(toHeaders, "toHeaders");
2282
3410
  module.exports = function(dir, opts = {}) {
2283
3411
  dir = resolve2(dir || ".");
2284
- let isNotFound = opts.onNoMatch || is404, setHeaders = opts.setHeaders || noop, extensions = opts.extensions || ["html", "htm"], gzips = opts.gzip && extensions.map((x) => `${x}.gz`).concat("gz"), brots = opts.brotli && extensions.map((x) => `${x}.br`).concat("br"), FILES = {}, fallback = "/", isEtag = !!opts.etag, isSPA = !!opts.single;
2285
- if (typeof opts.single == "string") {
3412
+ let isNotFound = opts.onNoMatch || is404;
3413
+ let setHeaders = opts.setHeaders || noop;
3414
+ let extensions = opts.extensions || ["html", "htm"];
3415
+ let gzips = opts.gzip && extensions.map((x) => `${x}.gz`).concat("gz");
3416
+ let brots = opts.brotli && extensions.map((x) => `${x}.br`).concat("br");
3417
+ const FILES = {};
3418
+ let fallback = "/";
3419
+ let isEtag = !!opts.etag;
3420
+ let isSPA = !!opts.single;
3421
+ if (typeof opts.single === "string") {
2286
3422
  let idx = opts.single.lastIndexOf(".");
2287
- fallback += ~idx ? opts.single.substring(0, idx) : opts.single;
3423
+ fallback += !!~idx ? opts.single.substring(0, idx) : opts.single;
2288
3424
  }
2289
3425
  let ignores = [];
2290
- opts.ignores !== !1 && (ignores.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/), opts.dotfiles ? ignores.push(/\/\.\w/) : ignores.push(/\/\.well-known/), [].concat(opts.ignores || []).forEach((x) => {
2291
- ignores.push(new RegExp(x, "i"));
2292
- }));
3426
+ if (opts.ignores !== false) {
3427
+ ignores.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/);
3428
+ if (opts.dotfiles) ignores.push(/\/\.\w/);
3429
+ else ignores.push(/\/\.well-known/);
3430
+ [].concat(opts.ignores || []).forEach((x) => {
3431
+ ignores.push(new RegExp(x, "i"));
3432
+ });
3433
+ }
2293
3434
  let cc = opts.maxAge != null && `public,max-age=${opts.maxAge}`;
2294
- cc && opts.immutable ? cc += ",immutable" : cc && opts.maxAge === 0 && (cc += ",must-revalidate"), opts.dev || totalist(dir, (name, abs, stats) => {
2295
- if (!/\.well-known[\\+\/]/.test(name)) {
2296
- if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name)) return;
2297
- }
2298
- let headers = toHeaders(name, stats, isEtag);
2299
- cc && (headers["Cache-Control"] = cc), FILES["/" + name.normalize().replace(/\\+/g, "/")] = { abs, stats, headers };
2300
- });
3435
+ if (cc && opts.immutable) cc += ",immutable";
3436
+ else if (cc && opts.maxAge === 0) cc += ",must-revalidate";
3437
+ if (!opts.dev) {
3438
+ totalist(dir, (name, abs, stats) => {
3439
+ if (/\.well-known[\\+\/]/.test(name)) {
3440
+ } else if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name)) return;
3441
+ let headers = toHeaders(name, stats, isEtag);
3442
+ if (cc) headers["Cache-Control"] = cc;
3443
+ FILES["/" + name.normalize().replace(/\\+/g, "/")] = { abs, stats, headers };
3444
+ });
3445
+ }
2301
3446
  let lookup2 = opts.dev ? viaLocal.bind(0, dir, isEtag) : viaCache.bind(0, FILES);
2302
3447
  return function(req, res, next) {
2303
- let extns = [""], pathname = parse(req).pathname, val = req.headers["accept-encoding"] || "";
2304
- if (gzips && val.includes("gzip") && extns.unshift(...gzips), brots && /(br|brotli)/i.test(val) && extns.unshift(...brots), extns.push(...extensions), pathname.indexOf("%") !== -1)
3448
+ let extns = [""];
3449
+ let pathname = parse(req).pathname;
3450
+ let val = req.headers["accept-encoding"] || "";
3451
+ if (gzips && val.includes("gzip")) extns.unshift(...gzips);
3452
+ if (brots && /(br|brotli)/i.test(val)) extns.unshift(...brots);
3453
+ extns.push(...extensions);
3454
+ if (pathname.indexOf("%") !== -1) {
2305
3455
  try {
2306
3456
  pathname = decodeURI(pathname);
2307
- } catch {
3457
+ } catch (err) {
2308
3458
  }
3459
+ }
2309
3460
  let data = lookup2(pathname, extns) || isSPA && !isMatch(pathname, ignores) && lookup2(fallback, extns);
2310
3461
  if (!data) return next ? next() : isNotFound(req, res);
2311
- if (isEtag && req.headers["if-none-match"] === data.headers.ETag)
2312
- return res.writeHead(304), res.end();
2313
- (gzips || brots) && res.setHeader("Vary", "Accept-Encoding"), setHeaders(res, pathname, data.stats), send(req, res, data.abs, data.stats, data.headers);
3462
+ if (isEtag && req.headers["if-none-match"] === data.headers["ETag"]) {
3463
+ res.writeHead(304);
3464
+ return res.end();
3465
+ }
3466
+ if (gzips || brots) {
3467
+ res.setHeader("Vary", "Accept-Encoding");
3468
+ }
3469
+ setHeaders(res, pathname, data.stats);
3470
+ send(req, res, data.abs, data.stats, data.headers);
2314
3471
  };
2315
3472
  };
2316
3473
  }
@@ -2337,31 +3494,47 @@ import { readConfig, vitestTransform } from "storybook/internal/csf-tools";
2337
3494
  import { MainFileMissingError } from "storybook/internal/server-errors";
2338
3495
  import { telemetry } from "storybook/internal/telemetry";
2339
3496
  import { oneWayHash } from "storybook/internal/telemetry";
2340
- var import_picocolors = __toESM(require_picocolors(), 1), import_sirv = __toESM(require_build2(), 1);
2341
- import { dedent } from "ts-dedent";
3497
+ var import_picocolors = __toESM(require_picocolors(), 1);
3498
+ var import_sirv = __toESM(require_build2(), 1);
3499
+ var import_ts_dedent = __toESM(require_dist(), 1);
2342
3500
 
2343
3501
  // ../../builders/builder-vite/src/utils/without-vite-plugins.ts
2344
- var withoutVitePlugins = async (plugins = [], namesToRemove) => {
2345
- let result = [], resolvedPlugins = await Promise.all(plugins);
2346
- for (let plugin of resolvedPlugins)
2347
- Array.isArray(plugin) ? result.push(await withoutVitePlugins(plugin, namesToRemove)) : plugin && typeof plugin == "object" && "name" in plugin && typeof plugin.name == "string" && !namesToRemove.includes(plugin.name) && result.push(plugin);
3502
+ var withoutVitePlugins = /* @__PURE__ */ __name(async (plugins = [], namesToRemove) => {
3503
+ const result = [];
3504
+ const resolvedPlugins = await Promise.all(plugins);
3505
+ for (const plugin of resolvedPlugins) {
3506
+ if (Array.isArray(plugin)) {
3507
+ result.push(await withoutVitePlugins(plugin, namesToRemove));
3508
+ } else if (plugin && typeof plugin === "object" && "name" in plugin && typeof plugin.name === "string" && !namesToRemove.includes(plugin.name)) {
3509
+ result.push(plugin);
3510
+ }
3511
+ }
2348
3512
  return result;
2349
- };
3513
+ }, "withoutVitePlugins");
2350
3514
 
2351
3515
  // src/vitest-plugin/index.ts
2352
- var WORKING_DIR = process.cwd(), defaultOptions = {
3516
+ var WORKING_DIR = process.cwd();
3517
+ var defaultOptions = {
2353
3518
  storybookScript: void 0,
2354
3519
  configDir: resolve(join(WORKING_DIR, ".storybook")),
2355
3520
  storybookUrl: "http://localhost:6006",
2356
- disableAddonDocs: !0
2357
- }, extractTagsFromPreview = async (configDir) => {
2358
- let previewConfigPath = getInterpretedFile(join(resolve(configDir), "preview"));
2359
- return previewConfigPath ? (await readConfig(previewConfigPath)).getFieldValue(["tags"]) ?? [] : [];
2360
- }, getStoryGlobsAndFiles = async (presets, directories) => {
2361
- let stories = await presets.apply("stories", []), normalizedStories = normalizeStories(stories, {
3521
+ disableAddonDocs: true
3522
+ };
3523
+ var extractTagsFromPreview = /* @__PURE__ */ __name(async (configDir) => {
3524
+ const previewConfigPath = getInterpretedFile(join(resolve(configDir), "preview"));
3525
+ if (!previewConfigPath) {
3526
+ return [];
3527
+ }
3528
+ const previewConfig = await readConfig(previewConfigPath);
3529
+ return previewConfig.getFieldValue(["tags"]) ?? [];
3530
+ }, "extractTagsFromPreview");
3531
+ var getStoryGlobsAndFiles = /* @__PURE__ */ __name(async (presets, directories) => {
3532
+ const stories = await presets.apply("stories", []);
3533
+ const normalizedStories = normalizeStories(stories, {
2362
3534
  configDir: directories.configDir,
2363
3535
  workingDir: directories.workingDir
2364
- }), matchingStoryFiles = await StoryIndexGenerator.findMatchingFilesForSpecifiers(
3536
+ });
3537
+ const matchingStoryFiles = await StoryIndexGenerator.findMatchingFilesForSpecifiers(
2365
3538
  normalizedStories,
2366
3539
  directories.workingDir
2367
3540
  );
@@ -2371,17 +3544,25 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
2371
3544
  new Map(matchingStoryFiles.map(([specifier, cache]) => [specifier, cache]))
2372
3545
  )
2373
3546
  };
2374
- }, mdxStubPlugin = {
3547
+ }, "getStoryGlobsAndFiles");
3548
+ var mdxStubPlugin = {
2375
3549
  name: "storybook:stub-mdx-plugin",
2376
3550
  enforce: "pre",
2377
3551
  resolveId(id) {
2378
- return id.endsWith(".mdx") ? id : null;
3552
+ if (id.endsWith(".mdx")) {
3553
+ return id;
3554
+ }
3555
+ return null;
2379
3556
  },
2380
3557
  load(id) {
2381
- return id.endsWith(".mdx") ? "export default {};" : null;
3558
+ if (id.endsWith(".mdx")) {
3559
+ return `export default {};`;
3560
+ }
3561
+ return null;
2382
3562
  }
2383
- }, storybookTest = async (options) => {
2384
- let finalOptions = {
3563
+ };
3564
+ var storybookTest = /* @__PURE__ */ __name(async (options) => {
3565
+ const finalOptions = {
2385
3566
  ...defaultOptions,
2386
3567
  ...options,
2387
3568
  configDir: options?.configDir ? resolve(WORKING_DIR, options.configDir) : defaultOptions.configDir,
@@ -2391,14 +3572,22 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
2391
3572
  skip: options?.tags?.skip ?? []
2392
3573
  }
2393
3574
  };
2394
- optionalEnvToBoolean(process.env.DEBUG) && (finalOptions.debug = !0), process.env.__STORYBOOK_URL__ = finalOptions.storybookUrl, process.env.__STORYBOOK_SCRIPT__ = finalOptions.storybookScript;
2395
- let isVitestStorybook = optionalEnvToBoolean(process.env.VITEST_STORYBOOK), directories = {
3575
+ if (optionalEnvToBoolean(process.env.DEBUG)) {
3576
+ finalOptions.debug = true;
3577
+ }
3578
+ process.env.__STORYBOOK_URL__ = finalOptions.storybookUrl;
3579
+ process.env.__STORYBOOK_SCRIPT__ = finalOptions.storybookScript;
3580
+ const isVitestStorybook = optionalEnvToBoolean(process.env.VITEST_STORYBOOK);
3581
+ const directories = {
2396
3582
  configDir: finalOptions.configDir,
2397
3583
  workingDir: WORKING_DIR
2398
- }, { presets } = await experimental_loadStorybook({
3584
+ };
3585
+ const { presets } = await experimental_loadStorybook({
2399
3586
  configDir: finalOptions.configDir,
2400
3587
  packageJson: {}
2401
- }), stories = await presets.apply("stories", []), [
3588
+ });
3589
+ const stories = await presets.apply("stories", []);
3590
+ const [
2402
3591
  { storiesGlobs },
2403
3592
  framework,
2404
3593
  storybookEnv,
@@ -2418,20 +3607,25 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
2418
3607
  presets.apply("core"),
2419
3608
  presets.apply("optimizeViteDeps", []),
2420
3609
  presets.apply("features", {})
2421
- ]), pluginsToIgnore = [
3610
+ ]);
3611
+ const pluginsToIgnore = [
2422
3612
  "storybook:react-docgen-plugin",
2423
3613
  "vite:react-docgen-typescript",
2424
3614
  // aka @joshwooding/vite-plugin-react-docgen-typescript
2425
3615
  "storybook:svelte-docgen-plugin",
2426
3616
  "storybook:vue-component-meta-plugin"
2427
3617
  ];
2428
- finalOptions.disableAddonDocs && pluginsToIgnore.push("storybook:package-deduplication", "storybook:mdx-plugin");
2429
- let plugins = await withoutVitePlugins(viteConfigFromStorybook.plugins ?? [], pluginsToIgnore);
2430
- finalOptions.disableAddonDocs && plugins.push(mdxStubPlugin);
2431
- let storybookTestPlugin = {
3618
+ if (finalOptions.disableAddonDocs) {
3619
+ pluginsToIgnore.push("storybook:package-deduplication", "storybook:mdx-plugin");
3620
+ }
3621
+ const plugins = await withoutVitePlugins(viteConfigFromStorybook.plugins ?? [], pluginsToIgnore);
3622
+ if (finalOptions.disableAddonDocs) {
3623
+ plugins.push(mdxStubPlugin);
3624
+ }
3625
+ const storybookTestPlugin = {
2432
3626
  name: "vite-plugin-storybook-test",
2433
3627
  async transformIndexHtml(html) {
2434
- let [headHtmlSnippet, bodyHtmlSnippet] = await Promise.all([
3628
+ const [headHtmlSnippet, bodyHtmlSnippet] = await Promise.all([
2435
3629
  presets.apply("previewHead"),
2436
3630
  presets.apply("previewBody")
2437
3631
  ]);
@@ -2440,26 +3634,35 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
2440
3634
  async config(nonMutableInputConfig) {
2441
3635
  try {
2442
3636
  await validateConfigurationFiles(finalOptions.configDir);
2443
- } catch {
3637
+ } catch (err) {
2444
3638
  throw new MainFileMissingError({
2445
3639
  location: finalOptions.configDir,
2446
3640
  source: "vitest"
2447
3641
  });
2448
3642
  }
2449
- let frameworkName = typeof framework == "string" ? framework : framework.name, testConfig = nonMutableInputConfig.test;
3643
+ const frameworkName = typeof framework === "string" ? framework : framework.name;
3644
+ const testConfig = nonMutableInputConfig.test;
2450
3645
  finalOptions.vitestRoot = testConfig?.dir || testConfig?.root || nonMutableInputConfig.root || process.cwd();
2451
- let includeStories = stories.map((story) => {
3646
+ const includeStories = stories.map((story) => {
2452
3647
  let storyPath;
2453
- return typeof story == "string" ? storyPath = story : storyPath = `${story.directory}/${story.files ?? DEFAULT_FILES_PATTERN}`, join(finalOptions.configDir, storyPath);
2454
- }).map((story) => relative(finalOptions.vitestRoot, story));
3648
+ if (typeof story === "string") {
3649
+ storyPath = story;
3650
+ } else {
3651
+ storyPath = `${story.directory}/${story.files ?? DEFAULT_FILES_PATTERN}`;
3652
+ }
3653
+ return join(finalOptions.configDir, storyPath);
3654
+ }).map((story) => {
3655
+ return relative(finalOptions.vitestRoot, story);
3656
+ });
2455
3657
  finalOptions.includeStories = includeStories;
2456
- let projectId = oneWayHash(finalOptions.configDir), baseConfig = {
3658
+ const projectId = oneWayHash(finalOptions.configDir);
3659
+ const baseConfig = {
2457
3660
  cacheDir: resolvePathInStorybookCache("sb-vitest", projectId),
2458
3661
  test: {
2459
3662
  setupFiles: [
2460
3663
  fileURLToPath(import.meta.resolve("@storybook/addon-vitest/internal/setup-file")),
2461
3664
  // if the existing setupFiles is a string, we have to include it otherwise we're overwriting it
2462
- typeof nonMutableInputConfig.test?.setupFiles == "string" && nonMutableInputConfig.test?.setupFiles
3665
+ typeof nonMutableInputConfig.test?.setupFiles === "string" && nonMutableInputConfig.test?.setupFiles
2463
3666
  ].filter(Boolean),
2464
3667
  ...finalOptions.storybookScript ? {
2465
3668
  globalSetup: [
@@ -2484,7 +3687,7 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
2484
3687
  ],
2485
3688
  // if the existing deps.inline is true, we keep it as-is, because it will inline everything
2486
3689
  // TODO: Remove the check once we don't support Vitest 3 anymore
2487
- ...nonMutableInputConfig.test?.server?.deps?.inline !== !0 ? {
3690
+ ...nonMutableInputConfig.test?.server?.deps?.inline !== true ? {
2488
3691
  server: {
2489
3692
  deps: {
2490
3693
  inline: ["@storybook/addon-vitest"]
@@ -2493,18 +3696,19 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
2493
3696
  } : {},
2494
3697
  browser: {
2495
3698
  commands: {
2496
- getInitialGlobals: () => {
2497
- let envConfig = JSON.parse(process.env.VITEST_STORYBOOK_CONFIG ?? "{}");
3699
+ getInitialGlobals: /* @__PURE__ */ __name(() => {
3700
+ const envConfig = JSON.parse(process.env.VITEST_STORYBOOK_CONFIG ?? "{}");
3701
+ const shouldRunA11yTests = isVitestStorybook ? envConfig.a11y ?? false : true;
2498
3702
  return {
2499
3703
  a11y: {
2500
- manual: !(isVitestStorybook ? envConfig.a11y ?? !1 : !0)
3704
+ manual: !shouldRunA11yTests
2501
3705
  }
2502
3706
  };
2503
- }
3707
+ }, "getInitialGlobals")
2504
3708
  },
2505
3709
  // if there is a test.browser config AND test.browser.screenshotFailures is not explicitly set, we set it to false
2506
3710
  ...nonMutableInputConfig.test?.browser && nonMutableInputConfig.test.browser.screenshotFailures === void 0 ? {
2507
- screenshotFailures: !1
3711
+ screenshotFailures: false
2508
3712
  } : {}
2509
3713
  }
2510
3714
  },
@@ -2536,53 +3740,64 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
2536
3740
  ...frameworkName?.includes("vue3") ? { __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: "false" } : {},
2537
3741
  FEATURES: JSON.stringify(features)
2538
3742
  }
2539
- }, config = mergeConfig(
3743
+ };
3744
+ const config = mergeConfig(
2540
3745
  baseConfig,
2541
3746
  viteConfigFromStorybook
2542
3747
  );
2543
- return (nonMutableInputConfig.test?.include?.length ?? 0) > 0 && (nonMutableInputConfig.test.include = [], console.log(
2544
- import_picocolors.default.yellow(dedent`
3748
+ if ((nonMutableInputConfig.test?.include?.length ?? 0) > 0) {
3749
+ nonMutableInputConfig.test.include = [];
3750
+ console.log(
3751
+ import_picocolors.default.yellow(import_ts_dedent.dedent`
2545
3752
  Warning: Starting in Storybook 8.5.0-alpha.18, the "test.include" option in Vitest is discouraged in favor of just using the "stories" field in your Storybook configuration.
2546
3753
 
2547
3754
  The values you passed to "test.include" will be ignored, please remove them from your Vitest configuration where the Storybook plugin is applied.
2548
3755
 
2549
3756
  More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#addon-test-indexing-behavior-of-storybookaddon-test-is-changed
2550
3757
  `)
2551
- )), config;
3758
+ );
3759
+ }
3760
+ return config;
2552
3761
  },
2553
3762
  configureVitest(context) {
2554
- context.vitest.config.coverage.exclude.push("storybook-static"), !core?.disableTelemetry && !optionalEnvToBoolean(process.env.STORYBOOK_DISABLE_TELEMETRY) && telemetry(
2555
- "test-run",
2556
- {
2557
- runner: "vitest",
2558
- watch: context.vitest.config.watch,
2559
- coverage: !!context.vitest.config.coverage?.enabled
2560
- },
2561
- { configDir: finalOptions.configDir }
2562
- );
3763
+ context.vitest.config.coverage.exclude.push("storybook-static");
3764
+ if (!core?.disableTelemetry && !optionalEnvToBoolean(process.env.STORYBOOK_DISABLE_TELEMETRY)) {
3765
+ telemetry(
3766
+ "test-run",
3767
+ {
3768
+ runner: "vitest",
3769
+ watch: context.vitest.config.watch,
3770
+ coverage: !!context.vitest.config.coverage?.enabled
3771
+ },
3772
+ { configDir: finalOptions.configDir }
3773
+ );
3774
+ }
2563
3775
  },
2564
3776
  async configureServer(server) {
2565
- if (staticDirs)
2566
- for (let staticDir of staticDirs)
3777
+ if (staticDirs) {
3778
+ for (const staticDir of staticDirs) {
2567
3779
  try {
2568
- let { staticPath, targetEndpoint } = mapStaticDir(staticDir, directories.configDir);
3780
+ const { staticPath, targetEndpoint } = mapStaticDir(staticDir, directories.configDir);
2569
3781
  server.middlewares.use(
2570
3782
  targetEndpoint,
2571
3783
  (0, import_sirv.default)(staticPath, {
2572
- dev: !0,
2573
- etag: !0,
3784
+ dev: true,
3785
+ etag: true,
2574
3786
  extensions: []
2575
3787
  })
2576
3788
  );
2577
3789
  } catch (e) {
2578
3790
  console.warn(e);
2579
3791
  }
3792
+ }
3793
+ }
2580
3794
  },
2581
3795
  async transform(code, id) {
2582
- if (!optionalEnvToBoolean(process.env.VITEST))
3796
+ if (!optionalEnvToBoolean(process.env.VITEST)) {
2583
3797
  return code;
2584
- let relativeId = relative(finalOptions.vitestRoot, id);
2585
- if ((0, import_micromatch.match)([relativeId], finalOptions.includeStories).length > 0)
3798
+ }
3799
+ const relativeId = relative(finalOptions.vitestRoot, id);
3800
+ if ((0, import_micromatch.match)([relativeId], finalOptions.includeStories).length > 0) {
2586
3801
  return vitestTransform({
2587
3802
  code,
2588
3803
  fileName: id,
@@ -2591,24 +3806,29 @@ var WORKING_DIR = process.cwd(), defaultOptions = {
2591
3806
  stories: storiesGlobs,
2592
3807
  previewLevelTags
2593
3808
  });
3809
+ }
2594
3810
  }
2595
3811
  };
2596
- if (plugins.push(storybookTestPlugin), isVitestStorybook) {
2597
- let projectName = `storybook:${normalize(finalOptions.configDir)}`;
3812
+ plugins.push(storybookTestPlugin);
3813
+ if (isVitestStorybook) {
3814
+ const projectName = `storybook:${normalize(finalOptions.configDir)}`;
2598
3815
  plugins.push({
2599
3816
  name: "storybook:workspace-name-override",
2600
3817
  config: {
2601
3818
  order: "pre",
2602
- handler: () => ({
2603
- test: {
2604
- name: projectName
2605
- }
2606
- })
3819
+ handler: /* @__PURE__ */ __name(() => {
3820
+ return {
3821
+ test: {
3822
+ name: projectName
3823
+ }
3824
+ };
3825
+ }, "handler")
2607
3826
  }
2608
3827
  });
2609
3828
  }
2610
3829
  return plugins;
2611
- }, vitest_plugin_default = storybookTest;
3830
+ }, "storybookTest");
3831
+ var vitest_plugin_default = storybookTest;
2612
3832
  export {
2613
3833
  vitest_plugin_default as default,
2614
3834
  storybookTest