@powerlines/deepkit 0.5.4 → 0.5.6

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.
@@ -0,0 +1,3531 @@
1
+ 'use strict';
2
+
3
+ var path = require('path');
4
+ var ts2 = require('typescript');
5
+ var fs = require('fs');
6
+
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var ts2__default = /*#__PURE__*/_interopDefault(ts2);
10
+
11
+ var __create = Object.create;
12
+ var __defProp = Object.defineProperty;
13
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
14
+ var __getOwnPropNames = Object.getOwnPropertyNames;
15
+ var __getProtoOf = Object.getPrototypeOf;
16
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
17
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
18
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
19
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
20
+ }) : x)(function(x) {
21
+ if (typeof require !== "undefined") return require.apply(this, arguments);
22
+ throw Error('Dynamic require of "' + x + '" is not supported');
23
+ });
24
+ var __esm = (fn, res) => function __init() {
25
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
26
+ };
27
+ var __commonJS = (cb, mod) => function __require2() {
28
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
29
+ };
30
+ var __copyProps = (to, from, except, desc) => {
31
+ if (from && typeof from === "object" || typeof from === "function") {
32
+ for (let key of __getOwnPropNames(from))
33
+ if (!__hasOwnProp.call(to, key) && key !== except)
34
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
35
+ }
36
+ return to;
37
+ };
38
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
39
+ // If the importer is in node compatibility mode or this is not an ESM
40
+ // file that has been converted to a CommonJS file using a Babel-
41
+ // compatible transform (i.e. "__esModule" has not been set), then set
42
+ // "default" to the CommonJS "module.exports" for node compatibility.
43
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
44
+ mod
45
+ ));
46
+
47
+ // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.55.2_@types+node@24.10.4__@swc+core@1.15.7_@swc+h_f8da27b0440c7f48fd09d237580fc3c9/node_modules/tsup/assets/cjs_shims.js
48
+ var init_cjs_shims = __esm({
49
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.55.2_@types+node@24.10.4__@swc+core@1.15.7_@swc+h_f8da27b0440c7f48fd09d237580fc3c9/node_modules/tsup/assets/cjs_shims.js"() {
50
+ }
51
+ });
52
+
53
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js
54
+ var require_utils = __commonJS({
55
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js"(exports$1) {
56
+ init_cjs_shims();
57
+ exports$1.isInteger = (num) => {
58
+ if (typeof num === "number") {
59
+ return Number.isInteger(num);
60
+ }
61
+ if (typeof num === "string" && num.trim() !== "") {
62
+ return Number.isInteger(Number(num));
63
+ }
64
+ return false;
65
+ };
66
+ exports$1.find = (node, type) => node.nodes.find((node2) => node2.type === type);
67
+ exports$1.exceedsLimit = (min, max, step = 1, limit) => {
68
+ if (limit === false) return false;
69
+ if (!exports$1.isInteger(min) || !exports$1.isInteger(max)) return false;
70
+ return (Number(max) - Number(min)) / Number(step) >= limit;
71
+ };
72
+ exports$1.escapeNode = (block, n = 0, type) => {
73
+ const node = block.nodes[n];
74
+ if (!node) return;
75
+ if (type && node.type === type || node.type === "open" || node.type === "close") {
76
+ if (node.escaped !== true) {
77
+ node.value = "\\" + node.value;
78
+ node.escaped = true;
79
+ }
80
+ }
81
+ };
82
+ exports$1.encloseBrace = (node) => {
83
+ if (node.type !== "brace") return false;
84
+ if (node.commas >> 0 + node.ranges >> 0 === 0) {
85
+ node.invalid = true;
86
+ return true;
87
+ }
88
+ return false;
89
+ };
90
+ exports$1.isInvalidBrace = (block) => {
91
+ if (block.type !== "brace") return false;
92
+ if (block.invalid === true || block.dollar) return true;
93
+ if (block.commas >> 0 + block.ranges >> 0 === 0) {
94
+ block.invalid = true;
95
+ return true;
96
+ }
97
+ if (block.open !== true || block.close !== true) {
98
+ block.invalid = true;
99
+ return true;
100
+ }
101
+ return false;
102
+ };
103
+ exports$1.isOpenOrClose = (node) => {
104
+ if (node.type === "open" || node.type === "close") {
105
+ return true;
106
+ }
107
+ return node.open === true || node.close === true;
108
+ };
109
+ exports$1.reduce = (nodes) => nodes.reduce((acc, node) => {
110
+ if (node.type === "text") acc.push(node.value);
111
+ if (node.type === "range") node.type = "text";
112
+ return acc;
113
+ }, []);
114
+ exports$1.flatten = (...args) => {
115
+ const result = [];
116
+ const flat = /* @__PURE__ */ __name((arr) => {
117
+ for (let i = 0; i < arr.length; i++) {
118
+ const ele = arr[i];
119
+ if (Array.isArray(ele)) {
120
+ flat(ele);
121
+ continue;
122
+ }
123
+ if (ele !== void 0) {
124
+ result.push(ele);
125
+ }
126
+ }
127
+ return result;
128
+ }, "flat");
129
+ flat(args);
130
+ return result;
131
+ };
132
+ }
133
+ });
134
+
135
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js
136
+ var require_stringify = __commonJS({
137
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js"(exports$1, module) {
138
+ init_cjs_shims();
139
+ var utils = require_utils();
140
+ module.exports = (ast, options = {}) => {
141
+ const stringify = /* @__PURE__ */ __name((node, parent = {}) => {
142
+ const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
143
+ const invalidNode = node.invalid === true && options.escapeInvalid === true;
144
+ let output = "";
145
+ if (node.value) {
146
+ if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
147
+ return "\\" + node.value;
148
+ }
149
+ return node.value;
150
+ }
151
+ if (node.value) {
152
+ return node.value;
153
+ }
154
+ if (node.nodes) {
155
+ for (const child of node.nodes) {
156
+ output += stringify(child);
157
+ }
158
+ }
159
+ return output;
160
+ }, "stringify");
161
+ return stringify(ast);
162
+ };
163
+ }
164
+ });
165
+
166
+ // ../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js
167
+ var require_is_number = __commonJS({
168
+ "../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js"(exports$1, module) {
169
+ init_cjs_shims();
170
+ module.exports = function(num) {
171
+ if (typeof num === "number") {
172
+ return num - num === 0;
173
+ }
174
+ if (typeof num === "string" && num.trim() !== "") {
175
+ return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
176
+ }
177
+ return false;
178
+ };
179
+ }
180
+ });
181
+
182
+ // ../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js
183
+ var require_to_regex_range = __commonJS({
184
+ "../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js"(exports$1, module) {
185
+ init_cjs_shims();
186
+ var isNumber = require_is_number();
187
+ var toRegexRange = /* @__PURE__ */ __name((min, max, options) => {
188
+ if (isNumber(min) === false) {
189
+ throw new TypeError("toRegexRange: expected the first argument to be a number");
190
+ }
191
+ if (max === void 0 || min === max) {
192
+ return String(min);
193
+ }
194
+ if (isNumber(max) === false) {
195
+ throw new TypeError("toRegexRange: expected the second argument to be a number.");
196
+ }
197
+ let opts = {
198
+ relaxZeros: true,
199
+ ...options
200
+ };
201
+ if (typeof opts.strictZeros === "boolean") {
202
+ opts.relaxZeros = opts.strictZeros === false;
203
+ }
204
+ let relax = String(opts.relaxZeros);
205
+ let shorthand = String(opts.shorthand);
206
+ let capture = String(opts.capture);
207
+ let wrap = String(opts.wrap);
208
+ let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
209
+ if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
210
+ return toRegexRange.cache[cacheKey].result;
211
+ }
212
+ let a = Math.min(min, max);
213
+ let b = Math.max(min, max);
214
+ if (Math.abs(a - b) === 1) {
215
+ let result = min + "|" + max;
216
+ if (opts.capture) {
217
+ return `(${result})`;
218
+ }
219
+ if (opts.wrap === false) {
220
+ return result;
221
+ }
222
+ return `(?:${result})`;
223
+ }
224
+ let isPadded = hasPadding(min) || hasPadding(max);
225
+ let state = {
226
+ min,
227
+ max,
228
+ a,
229
+ b
230
+ };
231
+ let positives = [];
232
+ let negatives = [];
233
+ if (isPadded) {
234
+ state.isPadded = isPadded;
235
+ state.maxLen = String(state.max).length;
236
+ }
237
+ if (a < 0) {
238
+ let newMin = b < 0 ? Math.abs(b) : 1;
239
+ negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
240
+ a = state.a = 0;
241
+ }
242
+ if (b >= 0) {
243
+ positives = splitToPatterns(a, b, state, opts);
244
+ }
245
+ state.negatives = negatives;
246
+ state.positives = positives;
247
+ state.result = collatePatterns(negatives, positives);
248
+ if (opts.capture === true) {
249
+ state.result = `(${state.result})`;
250
+ } else if (opts.wrap !== false && positives.length + negatives.length > 1) {
251
+ state.result = `(?:${state.result})`;
252
+ }
253
+ toRegexRange.cache[cacheKey] = state;
254
+ return state.result;
255
+ }, "toRegexRange");
256
+ function collatePatterns(neg, pos, options) {
257
+ let onlyNegative = filterPatterns(neg, pos, "-", false) || [];
258
+ let onlyPositive = filterPatterns(pos, neg, "", false) || [];
259
+ let intersected = filterPatterns(neg, pos, "-?", true) || [];
260
+ let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
261
+ return subpatterns.join("|");
262
+ }
263
+ __name(collatePatterns, "collatePatterns");
264
+ function splitToRanges(min, max) {
265
+ let nines = 1;
266
+ let zeros = 1;
267
+ let stop = countNines(min, nines);
268
+ let stops = /* @__PURE__ */ new Set([
269
+ max
270
+ ]);
271
+ while (min <= stop && stop <= max) {
272
+ stops.add(stop);
273
+ nines += 1;
274
+ stop = countNines(min, nines);
275
+ }
276
+ stop = countZeros(max + 1, zeros) - 1;
277
+ while (min < stop && stop <= max) {
278
+ stops.add(stop);
279
+ zeros += 1;
280
+ stop = countZeros(max + 1, zeros) - 1;
281
+ }
282
+ stops = [
283
+ ...stops
284
+ ];
285
+ stops.sort(compare);
286
+ return stops;
287
+ }
288
+ __name(splitToRanges, "splitToRanges");
289
+ function rangeToPattern(start, stop, options) {
290
+ if (start === stop) {
291
+ return {
292
+ pattern: start,
293
+ count: [],
294
+ digits: 0
295
+ };
296
+ }
297
+ let zipped = zip(start, stop);
298
+ let digits = zipped.length;
299
+ let pattern = "";
300
+ let count = 0;
301
+ for (let i = 0; i < digits; i++) {
302
+ let [startDigit, stopDigit] = zipped[i];
303
+ if (startDigit === stopDigit) {
304
+ pattern += startDigit;
305
+ } else if (startDigit !== "0" || stopDigit !== "9") {
306
+ pattern += toCharacterClass(startDigit, stopDigit);
307
+ } else {
308
+ count++;
309
+ }
310
+ }
311
+ if (count) {
312
+ pattern += options.shorthand === true ? "\\d" : "[0-9]";
313
+ }
314
+ return {
315
+ pattern,
316
+ count: [
317
+ count
318
+ ],
319
+ digits
320
+ };
321
+ }
322
+ __name(rangeToPattern, "rangeToPattern");
323
+ function splitToPatterns(min, max, tok, options) {
324
+ let ranges = splitToRanges(min, max);
325
+ let tokens = [];
326
+ let start = min;
327
+ let prev;
328
+ for (let i = 0; i < ranges.length; i++) {
329
+ let max2 = ranges[i];
330
+ let obj = rangeToPattern(String(start), String(max2), options);
331
+ let zeros = "";
332
+ if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
333
+ if (prev.count.length > 1) {
334
+ prev.count.pop();
335
+ }
336
+ prev.count.push(obj.count[0]);
337
+ prev.string = prev.pattern + toQuantifier(prev.count);
338
+ start = max2 + 1;
339
+ continue;
340
+ }
341
+ if (tok.isPadded) {
342
+ zeros = padZeros(max2, tok, options);
343
+ }
344
+ obj.string = zeros + obj.pattern + toQuantifier(obj.count);
345
+ tokens.push(obj);
346
+ start = max2 + 1;
347
+ prev = obj;
348
+ }
349
+ return tokens;
350
+ }
351
+ __name(splitToPatterns, "splitToPatterns");
352
+ function filterPatterns(arr, comparison, prefix, intersection, options) {
353
+ let result = [];
354
+ for (let ele of arr) {
355
+ let { string } = ele;
356
+ if (!intersection && !contains(comparison, "string", string)) {
357
+ result.push(prefix + string);
358
+ }
359
+ if (intersection && contains(comparison, "string", string)) {
360
+ result.push(prefix + string);
361
+ }
362
+ }
363
+ return result;
364
+ }
365
+ __name(filterPatterns, "filterPatterns");
366
+ function zip(a, b) {
367
+ let arr = [];
368
+ for (let i = 0; i < a.length; i++) arr.push([
369
+ a[i],
370
+ b[i]
371
+ ]);
372
+ return arr;
373
+ }
374
+ __name(zip, "zip");
375
+ function compare(a, b) {
376
+ return a > b ? 1 : b > a ? -1 : 0;
377
+ }
378
+ __name(compare, "compare");
379
+ function contains(arr, key, val) {
380
+ return arr.some((ele) => ele[key] === val);
381
+ }
382
+ __name(contains, "contains");
383
+ function countNines(min, len) {
384
+ return Number(String(min).slice(0, -len) + "9".repeat(len));
385
+ }
386
+ __name(countNines, "countNines");
387
+ function countZeros(integer, zeros) {
388
+ return integer - integer % Math.pow(10, zeros);
389
+ }
390
+ __name(countZeros, "countZeros");
391
+ function toQuantifier(digits) {
392
+ let [start = 0, stop = ""] = digits;
393
+ if (stop || start > 1) {
394
+ return `{${start + (stop ? "," + stop : "")}}`;
395
+ }
396
+ return "";
397
+ }
398
+ __name(toQuantifier, "toQuantifier");
399
+ function toCharacterClass(a, b, options) {
400
+ return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
401
+ }
402
+ __name(toCharacterClass, "toCharacterClass");
403
+ function hasPadding(str) {
404
+ return /^-?(0+)\d/.test(str);
405
+ }
406
+ __name(hasPadding, "hasPadding");
407
+ function padZeros(value, tok, options) {
408
+ if (!tok.isPadded) {
409
+ return value;
410
+ }
411
+ let diff = Math.abs(tok.maxLen - String(value).length);
412
+ let relax = options.relaxZeros !== false;
413
+ switch (diff) {
414
+ case 0:
415
+ return "";
416
+ case 1:
417
+ return relax ? "0?" : "0";
418
+ case 2:
419
+ return relax ? "0{0,2}" : "00";
420
+ default: {
421
+ return relax ? `0{0,${diff}}` : `0{${diff}}`;
422
+ }
423
+ }
424
+ }
425
+ __name(padZeros, "padZeros");
426
+ toRegexRange.cache = {};
427
+ toRegexRange.clearCache = () => toRegexRange.cache = {};
428
+ module.exports = toRegexRange;
429
+ }
430
+ });
431
+
432
+ // ../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js
433
+ var require_fill_range = __commonJS({
434
+ "../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js"(exports$1, module) {
435
+ init_cjs_shims();
436
+ var util = __require("util");
437
+ var toRegexRange = require_to_regex_range();
438
+ var isObject2 = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object" && !Array.isArray(val), "isObject");
439
+ var transform = /* @__PURE__ */ __name((toNumber) => {
440
+ return (value) => toNumber === true ? Number(value) : String(value);
441
+ }, "transform");
442
+ var isValidValue = /* @__PURE__ */ __name((value) => {
443
+ return typeof value === "number" || typeof value === "string" && value !== "";
444
+ }, "isValidValue");
445
+ var isNumber = /* @__PURE__ */ __name((num) => Number.isInteger(+num), "isNumber");
446
+ var zeros = /* @__PURE__ */ __name((input) => {
447
+ let value = `${input}`;
448
+ let index = -1;
449
+ if (value[0] === "-") value = value.slice(1);
450
+ if (value === "0") return false;
451
+ while (value[++index] === "0") ;
452
+ return index > 0;
453
+ }, "zeros");
454
+ var stringify = /* @__PURE__ */ __name((start, end, options) => {
455
+ if (typeof start === "string" || typeof end === "string") {
456
+ return true;
457
+ }
458
+ return options.stringify === true;
459
+ }, "stringify");
460
+ var pad = /* @__PURE__ */ __name((input, maxLength, toNumber) => {
461
+ if (maxLength > 0) {
462
+ let dash = input[0] === "-" ? "-" : "";
463
+ if (dash) input = input.slice(1);
464
+ input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
465
+ }
466
+ if (toNumber === false) {
467
+ return String(input);
468
+ }
469
+ return input;
470
+ }, "pad");
471
+ var toMaxLen = /* @__PURE__ */ __name((input, maxLength) => {
472
+ let negative = input[0] === "-" ? "-" : "";
473
+ if (negative) {
474
+ input = input.slice(1);
475
+ maxLength--;
476
+ }
477
+ while (input.length < maxLength) input = "0" + input;
478
+ return negative ? "-" + input : input;
479
+ }, "toMaxLen");
480
+ var toSequence = /* @__PURE__ */ __name((parts, options, maxLen) => {
481
+ parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
482
+ parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
483
+ let prefix = options.capture ? "" : "?:";
484
+ let positives = "";
485
+ let negatives = "";
486
+ let result;
487
+ if (parts.positives.length) {
488
+ positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|");
489
+ }
490
+ if (parts.negatives.length) {
491
+ negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`;
492
+ }
493
+ if (positives && negatives) {
494
+ result = `${positives}|${negatives}`;
495
+ } else {
496
+ result = positives || negatives;
497
+ }
498
+ if (options.wrap) {
499
+ return `(${prefix}${result})`;
500
+ }
501
+ return result;
502
+ }, "toSequence");
503
+ var toRange = /* @__PURE__ */ __name((a, b, isNumbers, options) => {
504
+ if (isNumbers) {
505
+ return toRegexRange(a, b, {
506
+ wrap: false,
507
+ ...options
508
+ });
509
+ }
510
+ let start = String.fromCharCode(a);
511
+ if (a === b) return start;
512
+ let stop = String.fromCharCode(b);
513
+ return `[${start}-${stop}]`;
514
+ }, "toRange");
515
+ var toRegex = /* @__PURE__ */ __name((start, end, options) => {
516
+ if (Array.isArray(start)) {
517
+ let wrap = options.wrap === true;
518
+ let prefix = options.capture ? "" : "?:";
519
+ return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
520
+ }
521
+ return toRegexRange(start, end, options);
522
+ }, "toRegex");
523
+ var rangeError = /* @__PURE__ */ __name((...args) => {
524
+ return new RangeError("Invalid range arguments: " + util.inspect(...args));
525
+ }, "rangeError");
526
+ var invalidRange = /* @__PURE__ */ __name((start, end, options) => {
527
+ if (options.strictRanges === true) throw rangeError([
528
+ start,
529
+ end
530
+ ]);
531
+ return [];
532
+ }, "invalidRange");
533
+ var invalidStep = /* @__PURE__ */ __name((step, options) => {
534
+ if (options.strictRanges === true) {
535
+ throw new TypeError(`Expected step "${step}" to be a number`);
536
+ }
537
+ return [];
538
+ }, "invalidStep");
539
+ var fillNumbers = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
540
+ let a = Number(start);
541
+ let b = Number(end);
542
+ if (!Number.isInteger(a) || !Number.isInteger(b)) {
543
+ if (options.strictRanges === true) throw rangeError([
544
+ start,
545
+ end
546
+ ]);
547
+ return [];
548
+ }
549
+ if (a === 0) a = 0;
550
+ if (b === 0) b = 0;
551
+ let descending = a > b;
552
+ let startString = String(start);
553
+ let endString = String(end);
554
+ let stepString = String(step);
555
+ step = Math.max(Math.abs(step), 1);
556
+ let padded = zeros(startString) || zeros(endString) || zeros(stepString);
557
+ let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
558
+ let toNumber = padded === false && stringify(start, end, options) === false;
559
+ let format = options.transform || transform(toNumber);
560
+ if (options.toRegex && step === 1) {
561
+ return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
562
+ }
563
+ let parts = {
564
+ negatives: [],
565
+ positives: []
566
+ };
567
+ let push = /* @__PURE__ */ __name((num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)), "push");
568
+ let range = [];
569
+ let index = 0;
570
+ while (descending ? a >= b : a <= b) {
571
+ if (options.toRegex === true && step > 1) {
572
+ push(a);
573
+ } else {
574
+ range.push(pad(format(a, index), maxLen, toNumber));
575
+ }
576
+ a = descending ? a - step : a + step;
577
+ index++;
578
+ }
579
+ if (options.toRegex === true) {
580
+ return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, {
581
+ wrap: false,
582
+ ...options
583
+ });
584
+ }
585
+ return range;
586
+ }, "fillNumbers");
587
+ var fillLetters = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
588
+ if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
589
+ return invalidRange(start, end, options);
590
+ }
591
+ let format = options.transform || ((val) => String.fromCharCode(val));
592
+ let a = `${start}`.charCodeAt(0);
593
+ let b = `${end}`.charCodeAt(0);
594
+ let descending = a > b;
595
+ let min = Math.min(a, b);
596
+ let max = Math.max(a, b);
597
+ if (options.toRegex && step === 1) {
598
+ return toRange(min, max, false, options);
599
+ }
600
+ let range = [];
601
+ let index = 0;
602
+ while (descending ? a >= b : a <= b) {
603
+ range.push(format(a, index));
604
+ a = descending ? a - step : a + step;
605
+ index++;
606
+ }
607
+ if (options.toRegex === true) {
608
+ return toRegex(range, null, {
609
+ wrap: false,
610
+ options
611
+ });
612
+ }
613
+ return range;
614
+ }, "fillLetters");
615
+ var fill = /* @__PURE__ */ __name((start, end, step, options = {}) => {
616
+ if (end == null && isValidValue(start)) {
617
+ return [
618
+ start
619
+ ];
620
+ }
621
+ if (!isValidValue(start) || !isValidValue(end)) {
622
+ return invalidRange(start, end, options);
623
+ }
624
+ if (typeof step === "function") {
625
+ return fill(start, end, 1, {
626
+ transform: step
627
+ });
628
+ }
629
+ if (isObject2(step)) {
630
+ return fill(start, end, 0, step);
631
+ }
632
+ let opts = {
633
+ ...options
634
+ };
635
+ if (opts.capture === true) opts.wrap = true;
636
+ step = step || opts.step || 1;
637
+ if (!isNumber(step)) {
638
+ if (step != null && !isObject2(step)) return invalidStep(step, opts);
639
+ return fill(start, end, 1, step);
640
+ }
641
+ if (isNumber(start) && isNumber(end)) {
642
+ return fillNumbers(start, end, step, opts);
643
+ }
644
+ return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
645
+ }, "fill");
646
+ module.exports = fill;
647
+ }
648
+ });
649
+
650
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js
651
+ var require_compile = __commonJS({
652
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js"(exports$1, module) {
653
+ init_cjs_shims();
654
+ var fill = require_fill_range();
655
+ var utils = require_utils();
656
+ var compile = /* @__PURE__ */ __name((ast, options = {}) => {
657
+ const walk = /* @__PURE__ */ __name((node, parent = {}) => {
658
+ const invalidBlock = utils.isInvalidBrace(parent);
659
+ const invalidNode = node.invalid === true && options.escapeInvalid === true;
660
+ const invalid = invalidBlock === true || invalidNode === true;
661
+ const prefix = options.escapeInvalid === true ? "\\" : "";
662
+ let output = "";
663
+ if (node.isOpen === true) {
664
+ return prefix + node.value;
665
+ }
666
+ if (node.isClose === true) {
667
+ console.log("node.isClose", prefix, node.value);
668
+ return prefix + node.value;
669
+ }
670
+ if (node.type === "open") {
671
+ return invalid ? prefix + node.value : "(";
672
+ }
673
+ if (node.type === "close") {
674
+ return invalid ? prefix + node.value : ")";
675
+ }
676
+ if (node.type === "comma") {
677
+ return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
678
+ }
679
+ if (node.value) {
680
+ return node.value;
681
+ }
682
+ if (node.nodes && node.ranges > 0) {
683
+ const args = utils.reduce(node.nodes);
684
+ const range = fill(...args, {
685
+ ...options,
686
+ wrap: false,
687
+ toRegex: true,
688
+ strictZeros: true
689
+ });
690
+ if (range.length !== 0) {
691
+ return args.length > 1 && range.length > 1 ? `(${range})` : range;
692
+ }
693
+ }
694
+ if (node.nodes) {
695
+ for (const child of node.nodes) {
696
+ output += walk(child, node);
697
+ }
698
+ }
699
+ return output;
700
+ }, "walk");
701
+ return walk(ast);
702
+ }, "compile");
703
+ module.exports = compile;
704
+ }
705
+ });
706
+
707
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js
708
+ var require_expand = __commonJS({
709
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js"(exports$1, module) {
710
+ init_cjs_shims();
711
+ var fill = require_fill_range();
712
+ var stringify = require_stringify();
713
+ var utils = require_utils();
714
+ var append = /* @__PURE__ */ __name((queue = "", stash = "", enclose = false) => {
715
+ const result = [];
716
+ queue = [].concat(queue);
717
+ stash = [].concat(stash);
718
+ if (!stash.length) return queue;
719
+ if (!queue.length) {
720
+ return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
721
+ }
722
+ for (const item of queue) {
723
+ if (Array.isArray(item)) {
724
+ for (const value of item) {
725
+ result.push(append(value, stash, enclose));
726
+ }
727
+ } else {
728
+ for (let ele of stash) {
729
+ if (enclose === true && typeof ele === "string") ele = `{${ele}}`;
730
+ result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
731
+ }
732
+ }
733
+ }
734
+ return utils.flatten(result);
735
+ }, "append");
736
+ var expand = /* @__PURE__ */ __name((ast, options = {}) => {
737
+ const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
738
+ const walk = /* @__PURE__ */ __name((node, parent = {}) => {
739
+ node.queue = [];
740
+ let p = parent;
741
+ let q = parent.queue;
742
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
743
+ p = p.parent;
744
+ q = p.queue;
745
+ }
746
+ if (node.invalid || node.dollar) {
747
+ q.push(append(q.pop(), stringify(node, options)));
748
+ return;
749
+ }
750
+ if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
751
+ q.push(append(q.pop(), [
752
+ "{}"
753
+ ]));
754
+ return;
755
+ }
756
+ if (node.nodes && node.ranges > 0) {
757
+ const args = utils.reduce(node.nodes);
758
+ if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
759
+ throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
760
+ }
761
+ let range = fill(...args, options);
762
+ if (range.length === 0) {
763
+ range = stringify(node, options);
764
+ }
765
+ q.push(append(q.pop(), range));
766
+ node.nodes = [];
767
+ return;
768
+ }
769
+ const enclose = utils.encloseBrace(node);
770
+ let queue = node.queue;
771
+ let block = node;
772
+ while (block.type !== "brace" && block.type !== "root" && block.parent) {
773
+ block = block.parent;
774
+ queue = block.queue;
775
+ }
776
+ for (let i = 0; i < node.nodes.length; i++) {
777
+ const child = node.nodes[i];
778
+ if (child.type === "comma" && node.type === "brace") {
779
+ if (i === 1) queue.push("");
780
+ queue.push("");
781
+ continue;
782
+ }
783
+ if (child.type === "close") {
784
+ q.push(append(q.pop(), queue, enclose));
785
+ continue;
786
+ }
787
+ if (child.value && child.type !== "open") {
788
+ queue.push(append(queue.pop(), child.value));
789
+ continue;
790
+ }
791
+ if (child.nodes) {
792
+ walk(child, node);
793
+ }
794
+ }
795
+ return queue;
796
+ }, "walk");
797
+ return utils.flatten(walk(ast));
798
+ }, "expand");
799
+ module.exports = expand;
800
+ }
801
+ });
802
+
803
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js
804
+ var require_constants = __commonJS({
805
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js"(exports$1, module) {
806
+ init_cjs_shims();
807
+ module.exports = {
808
+ MAX_LENGTH: 1e4,
809
+ // Digits
810
+ CHAR_0: "0",
811
+ /* 0 */
812
+ CHAR_9: "9",
813
+ /* 9 */
814
+ // Alphabet chars.
815
+ CHAR_UPPERCASE_A: "A",
816
+ /* A */
817
+ CHAR_LOWERCASE_A: "a",
818
+ /* a */
819
+ CHAR_UPPERCASE_Z: "Z",
820
+ /* Z */
821
+ CHAR_LOWERCASE_Z: "z",
822
+ /* z */
823
+ CHAR_LEFT_PARENTHESES: "(",
824
+ /* ( */
825
+ CHAR_RIGHT_PARENTHESES: ")",
826
+ /* ) */
827
+ CHAR_ASTERISK: "*",
828
+ /* * */
829
+ // Non-alphabetic chars.
830
+ CHAR_AMPERSAND: "&",
831
+ /* & */
832
+ CHAR_AT: "@",
833
+ /* @ */
834
+ CHAR_BACKSLASH: "\\",
835
+ /* \ */
836
+ CHAR_BACKTICK: "`",
837
+ /* ` */
838
+ CHAR_CARRIAGE_RETURN: "\r",
839
+ /* \r */
840
+ CHAR_CIRCUMFLEX_ACCENT: "^",
841
+ /* ^ */
842
+ CHAR_COLON: ":",
843
+ /* : */
844
+ CHAR_COMMA: ",",
845
+ /* , */
846
+ CHAR_DOLLAR: "$",
847
+ /* . */
848
+ CHAR_DOT: ".",
849
+ /* . */
850
+ CHAR_DOUBLE_QUOTE: '"',
851
+ /* " */
852
+ CHAR_EQUAL: "=",
853
+ /* = */
854
+ CHAR_EXCLAMATION_MARK: "!",
855
+ /* ! */
856
+ CHAR_FORM_FEED: "\f",
857
+ /* \f */
858
+ CHAR_FORWARD_SLASH: "/",
859
+ /* / */
860
+ CHAR_HASH: "#",
861
+ /* # */
862
+ CHAR_HYPHEN_MINUS: "-",
863
+ /* - */
864
+ CHAR_LEFT_ANGLE_BRACKET: "<",
865
+ /* < */
866
+ CHAR_LEFT_CURLY_BRACE: "{",
867
+ /* { */
868
+ CHAR_LEFT_SQUARE_BRACKET: "[",
869
+ /* [ */
870
+ CHAR_LINE_FEED: "\n",
871
+ /* \n */
872
+ CHAR_NO_BREAK_SPACE: "\xA0",
873
+ /* \u00A0 */
874
+ CHAR_PERCENT: "%",
875
+ /* % */
876
+ CHAR_PLUS: "+",
877
+ /* + */
878
+ CHAR_QUESTION_MARK: "?",
879
+ /* ? */
880
+ CHAR_RIGHT_ANGLE_BRACKET: ">",
881
+ /* > */
882
+ CHAR_RIGHT_CURLY_BRACE: "}",
883
+ /* } */
884
+ CHAR_RIGHT_SQUARE_BRACKET: "]",
885
+ /* ] */
886
+ CHAR_SEMICOLON: ";",
887
+ /* ; */
888
+ CHAR_SINGLE_QUOTE: "'",
889
+ /* ' */
890
+ CHAR_SPACE: " ",
891
+ /* */
892
+ CHAR_TAB: " ",
893
+ /* \t */
894
+ CHAR_UNDERSCORE: "_",
895
+ /* _ */
896
+ CHAR_VERTICAL_LINE: "|",
897
+ /* | */
898
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
899
+ /* \uFEFF */
900
+ };
901
+ }
902
+ });
903
+
904
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js
905
+ var require_parse = __commonJS({
906
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js"(exports$1, module) {
907
+ init_cjs_shims();
908
+ var stringify = require_stringify();
909
+ var {
910
+ MAX_LENGTH,
911
+ CHAR_BACKSLASH,
912
+ /* \ */
913
+ CHAR_BACKTICK,
914
+ /* ` */
915
+ CHAR_COMMA,
916
+ /* , */
917
+ CHAR_DOT,
918
+ /* . */
919
+ CHAR_LEFT_PARENTHESES,
920
+ /* ( */
921
+ CHAR_RIGHT_PARENTHESES,
922
+ /* ) */
923
+ CHAR_LEFT_CURLY_BRACE,
924
+ /* { */
925
+ CHAR_RIGHT_CURLY_BRACE,
926
+ /* } */
927
+ CHAR_LEFT_SQUARE_BRACKET,
928
+ /* [ */
929
+ CHAR_RIGHT_SQUARE_BRACKET,
930
+ /* ] */
931
+ CHAR_DOUBLE_QUOTE,
932
+ /* " */
933
+ CHAR_SINGLE_QUOTE,
934
+ /* ' */
935
+ CHAR_NO_BREAK_SPACE,
936
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE
937
+ } = require_constants();
938
+ var parse = /* @__PURE__ */ __name((input, options = {}) => {
939
+ if (typeof input !== "string") {
940
+ throw new TypeError("Expected a string");
941
+ }
942
+ const opts = options || {};
943
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
944
+ if (input.length > max) {
945
+ throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
946
+ }
947
+ const ast = {
948
+ type: "root",
949
+ input,
950
+ nodes: []
951
+ };
952
+ const stack = [
953
+ ast
954
+ ];
955
+ let block = ast;
956
+ let prev = ast;
957
+ let brackets = 0;
958
+ const length = input.length;
959
+ let index = 0;
960
+ let depth = 0;
961
+ let value;
962
+ const advance = /* @__PURE__ */ __name(() => input[index++], "advance");
963
+ const push = /* @__PURE__ */ __name((node) => {
964
+ if (node.type === "text" && prev.type === "dot") {
965
+ prev.type = "text";
966
+ }
967
+ if (prev && prev.type === "text" && node.type === "text") {
968
+ prev.value += node.value;
969
+ return;
970
+ }
971
+ block.nodes.push(node);
972
+ node.parent = block;
973
+ node.prev = prev;
974
+ prev = node;
975
+ return node;
976
+ }, "push");
977
+ push({
978
+ type: "bos"
979
+ });
980
+ while (index < length) {
981
+ block = stack[stack.length - 1];
982
+ value = advance();
983
+ if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
984
+ continue;
985
+ }
986
+ if (value === CHAR_BACKSLASH) {
987
+ push({
988
+ type: "text",
989
+ value: (options.keepEscaping ? value : "") + advance()
990
+ });
991
+ continue;
992
+ }
993
+ if (value === CHAR_RIGHT_SQUARE_BRACKET) {
994
+ push({
995
+ type: "text",
996
+ value: "\\" + value
997
+ });
998
+ continue;
999
+ }
1000
+ if (value === CHAR_LEFT_SQUARE_BRACKET) {
1001
+ brackets++;
1002
+ let next;
1003
+ while (index < length && (next = advance())) {
1004
+ value += next;
1005
+ if (next === CHAR_LEFT_SQUARE_BRACKET) {
1006
+ brackets++;
1007
+ continue;
1008
+ }
1009
+ if (next === CHAR_BACKSLASH) {
1010
+ value += advance();
1011
+ continue;
1012
+ }
1013
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
1014
+ brackets--;
1015
+ if (brackets === 0) {
1016
+ break;
1017
+ }
1018
+ }
1019
+ }
1020
+ push({
1021
+ type: "text",
1022
+ value
1023
+ });
1024
+ continue;
1025
+ }
1026
+ if (value === CHAR_LEFT_PARENTHESES) {
1027
+ block = push({
1028
+ type: "paren",
1029
+ nodes: []
1030
+ });
1031
+ stack.push(block);
1032
+ push({
1033
+ type: "text",
1034
+ value
1035
+ });
1036
+ continue;
1037
+ }
1038
+ if (value === CHAR_RIGHT_PARENTHESES) {
1039
+ if (block.type !== "paren") {
1040
+ push({
1041
+ type: "text",
1042
+ value
1043
+ });
1044
+ continue;
1045
+ }
1046
+ block = stack.pop();
1047
+ push({
1048
+ type: "text",
1049
+ value
1050
+ });
1051
+ block = stack[stack.length - 1];
1052
+ continue;
1053
+ }
1054
+ if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
1055
+ const open = value;
1056
+ let next;
1057
+ if (options.keepQuotes !== true) {
1058
+ value = "";
1059
+ }
1060
+ while (index < length && (next = advance())) {
1061
+ if (next === CHAR_BACKSLASH) {
1062
+ value += next + advance();
1063
+ continue;
1064
+ }
1065
+ if (next === open) {
1066
+ if (options.keepQuotes === true) value += next;
1067
+ break;
1068
+ }
1069
+ value += next;
1070
+ }
1071
+ push({
1072
+ type: "text",
1073
+ value
1074
+ });
1075
+ continue;
1076
+ }
1077
+ if (value === CHAR_LEFT_CURLY_BRACE) {
1078
+ depth++;
1079
+ const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
1080
+ const brace = {
1081
+ type: "brace",
1082
+ open: true,
1083
+ close: false,
1084
+ dollar,
1085
+ depth,
1086
+ commas: 0,
1087
+ ranges: 0,
1088
+ nodes: []
1089
+ };
1090
+ block = push(brace);
1091
+ stack.push(block);
1092
+ push({
1093
+ type: "open",
1094
+ value
1095
+ });
1096
+ continue;
1097
+ }
1098
+ if (value === CHAR_RIGHT_CURLY_BRACE) {
1099
+ if (block.type !== "brace") {
1100
+ push({
1101
+ type: "text",
1102
+ value
1103
+ });
1104
+ continue;
1105
+ }
1106
+ const type = "close";
1107
+ block = stack.pop();
1108
+ block.close = true;
1109
+ push({
1110
+ type,
1111
+ value
1112
+ });
1113
+ depth--;
1114
+ block = stack[stack.length - 1];
1115
+ continue;
1116
+ }
1117
+ if (value === CHAR_COMMA && depth > 0) {
1118
+ if (block.ranges > 0) {
1119
+ block.ranges = 0;
1120
+ const open = block.nodes.shift();
1121
+ block.nodes = [
1122
+ open,
1123
+ {
1124
+ type: "text",
1125
+ value: stringify(block)
1126
+ }
1127
+ ];
1128
+ }
1129
+ push({
1130
+ type: "comma",
1131
+ value
1132
+ });
1133
+ block.commas++;
1134
+ continue;
1135
+ }
1136
+ if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
1137
+ const siblings = block.nodes;
1138
+ if (depth === 0 || siblings.length === 0) {
1139
+ push({
1140
+ type: "text",
1141
+ value
1142
+ });
1143
+ continue;
1144
+ }
1145
+ if (prev.type === "dot") {
1146
+ block.range = [];
1147
+ prev.value += value;
1148
+ prev.type = "range";
1149
+ if (block.nodes.length !== 3 && block.nodes.length !== 5) {
1150
+ block.invalid = true;
1151
+ block.ranges = 0;
1152
+ prev.type = "text";
1153
+ continue;
1154
+ }
1155
+ block.ranges++;
1156
+ block.args = [];
1157
+ continue;
1158
+ }
1159
+ if (prev.type === "range") {
1160
+ siblings.pop();
1161
+ const before = siblings[siblings.length - 1];
1162
+ before.value += prev.value + value;
1163
+ prev = before;
1164
+ block.ranges--;
1165
+ continue;
1166
+ }
1167
+ push({
1168
+ type: "dot",
1169
+ value
1170
+ });
1171
+ continue;
1172
+ }
1173
+ push({
1174
+ type: "text",
1175
+ value
1176
+ });
1177
+ }
1178
+ do {
1179
+ block = stack.pop();
1180
+ if (block.type !== "root") {
1181
+ block.nodes.forEach((node) => {
1182
+ if (!node.nodes) {
1183
+ if (node.type === "open") node.isOpen = true;
1184
+ if (node.type === "close") node.isClose = true;
1185
+ if (!node.nodes) node.type = "text";
1186
+ node.invalid = true;
1187
+ }
1188
+ });
1189
+ const parent = stack[stack.length - 1];
1190
+ const index2 = parent.nodes.indexOf(block);
1191
+ parent.nodes.splice(index2, 1, ...block.nodes);
1192
+ }
1193
+ } while (stack.length > 0);
1194
+ push({
1195
+ type: "eos"
1196
+ });
1197
+ return ast;
1198
+ }, "parse");
1199
+ module.exports = parse;
1200
+ }
1201
+ });
1202
+
1203
+ // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js
1204
+ var require_braces = __commonJS({
1205
+ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js"(exports$1, module) {
1206
+ init_cjs_shims();
1207
+ var stringify = require_stringify();
1208
+ var compile = require_compile();
1209
+ var expand = require_expand();
1210
+ var parse = require_parse();
1211
+ var braces = /* @__PURE__ */ __name((input, options = {}) => {
1212
+ let output = [];
1213
+ if (Array.isArray(input)) {
1214
+ for (const pattern of input) {
1215
+ const result = braces.create(pattern, options);
1216
+ if (Array.isArray(result)) {
1217
+ output.push(...result);
1218
+ } else {
1219
+ output.push(result);
1220
+ }
1221
+ }
1222
+ } else {
1223
+ output = [].concat(braces.create(input, options));
1224
+ }
1225
+ if (options && options.expand === true && options.nodupes === true) {
1226
+ output = [
1227
+ ...new Set(output)
1228
+ ];
1229
+ }
1230
+ return output;
1231
+ }, "braces");
1232
+ braces.parse = (input, options = {}) => parse(input, options);
1233
+ braces.stringify = (input, options = {}) => {
1234
+ if (typeof input === "string") {
1235
+ return stringify(braces.parse(input, options), options);
1236
+ }
1237
+ return stringify(input, options);
1238
+ };
1239
+ braces.compile = (input, options = {}) => {
1240
+ if (typeof input === "string") {
1241
+ input = braces.parse(input, options);
1242
+ }
1243
+ return compile(input, options);
1244
+ };
1245
+ braces.expand = (input, options = {}) => {
1246
+ if (typeof input === "string") {
1247
+ input = braces.parse(input, options);
1248
+ }
1249
+ let result = expand(input, options);
1250
+ if (options.noempty === true) {
1251
+ result = result.filter(Boolean);
1252
+ }
1253
+ if (options.nodupes === true) {
1254
+ result = [
1255
+ ...new Set(result)
1256
+ ];
1257
+ }
1258
+ return result;
1259
+ };
1260
+ braces.create = (input, options = {}) => {
1261
+ if (input === "" || input.length < 3) {
1262
+ return [
1263
+ input
1264
+ ];
1265
+ }
1266
+ return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
1267
+ };
1268
+ module.exports = braces;
1269
+ }
1270
+ });
1271
+
1272
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
1273
+ var require_constants2 = __commonJS({
1274
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports$1, module) {
1275
+ init_cjs_shims();
1276
+ var path = __require("path");
1277
+ var WIN_SLASH = "\\\\/";
1278
+ var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1279
+ var DOT_LITERAL = "\\.";
1280
+ var PLUS_LITERAL = "\\+";
1281
+ var QMARK_LITERAL = "\\?";
1282
+ var SLASH_LITERAL = "\\/";
1283
+ var ONE_CHAR = "(?=.)";
1284
+ var QMARK = "[^/]";
1285
+ var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
1286
+ var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
1287
+ var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
1288
+ var NO_DOT = `(?!${DOT_LITERAL})`;
1289
+ var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
1290
+ var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
1291
+ var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
1292
+ var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
1293
+ var STAR = `${QMARK}*?`;
1294
+ var POSIX_CHARS = {
1295
+ DOT_LITERAL,
1296
+ PLUS_LITERAL,
1297
+ QMARK_LITERAL,
1298
+ SLASH_LITERAL,
1299
+ ONE_CHAR,
1300
+ QMARK,
1301
+ END_ANCHOR,
1302
+ DOTS_SLASH,
1303
+ NO_DOT,
1304
+ NO_DOTS,
1305
+ NO_DOT_SLASH,
1306
+ NO_DOTS_SLASH,
1307
+ QMARK_NO_DOT,
1308
+ STAR,
1309
+ START_ANCHOR
1310
+ };
1311
+ var WINDOWS_CHARS = {
1312
+ ...POSIX_CHARS,
1313
+ SLASH_LITERAL: `[${WIN_SLASH}]`,
1314
+ QMARK: WIN_NO_SLASH,
1315
+ STAR: `${WIN_NO_SLASH}*?`,
1316
+ DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
1317
+ NO_DOT: `(?!${DOT_LITERAL})`,
1318
+ NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
1319
+ NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
1320
+ NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
1321
+ QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
1322
+ START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
1323
+ END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
1324
+ };
1325
+ var POSIX_REGEX_SOURCE = {
1326
+ alnum: "a-zA-Z0-9",
1327
+ alpha: "a-zA-Z",
1328
+ ascii: "\\x00-\\x7F",
1329
+ blank: " \\t",
1330
+ cntrl: "\\x00-\\x1F\\x7F",
1331
+ digit: "0-9",
1332
+ graph: "\\x21-\\x7E",
1333
+ lower: "a-z",
1334
+ print: "\\x20-\\x7E ",
1335
+ punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
1336
+ space: " \\t\\r\\n\\v\\f",
1337
+ upper: "A-Z",
1338
+ word: "A-Za-z0-9_",
1339
+ xdigit: "A-Fa-f0-9"
1340
+ };
1341
+ module.exports = {
1342
+ MAX_LENGTH: 1024 * 64,
1343
+ POSIX_REGEX_SOURCE,
1344
+ // regular expressions
1345
+ REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
1346
+ REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
1347
+ REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
1348
+ REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
1349
+ REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
1350
+ REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
1351
+ // Replace globs with equivalent patterns to reduce parsing time.
1352
+ REPLACEMENTS: {
1353
+ "***": "*",
1354
+ "**/**": "**",
1355
+ "**/**/**": "**"
1356
+ },
1357
+ // Digits
1358
+ CHAR_0: 48,
1359
+ /* 0 */
1360
+ CHAR_9: 57,
1361
+ /* 9 */
1362
+ // Alphabet chars.
1363
+ CHAR_UPPERCASE_A: 65,
1364
+ /* A */
1365
+ CHAR_LOWERCASE_A: 97,
1366
+ /* a */
1367
+ CHAR_UPPERCASE_Z: 90,
1368
+ /* Z */
1369
+ CHAR_LOWERCASE_Z: 122,
1370
+ /* z */
1371
+ CHAR_LEFT_PARENTHESES: 40,
1372
+ /* ( */
1373
+ CHAR_RIGHT_PARENTHESES: 41,
1374
+ /* ) */
1375
+ CHAR_ASTERISK: 42,
1376
+ /* * */
1377
+ // Non-alphabetic chars.
1378
+ CHAR_AMPERSAND: 38,
1379
+ /* & */
1380
+ CHAR_AT: 64,
1381
+ /* @ */
1382
+ CHAR_BACKWARD_SLASH: 92,
1383
+ /* \ */
1384
+ CHAR_CARRIAGE_RETURN: 13,
1385
+ /* \r */
1386
+ CHAR_CIRCUMFLEX_ACCENT: 94,
1387
+ /* ^ */
1388
+ CHAR_COLON: 58,
1389
+ /* : */
1390
+ CHAR_COMMA: 44,
1391
+ /* , */
1392
+ CHAR_DOT: 46,
1393
+ /* . */
1394
+ CHAR_DOUBLE_QUOTE: 34,
1395
+ /* " */
1396
+ CHAR_EQUAL: 61,
1397
+ /* = */
1398
+ CHAR_EXCLAMATION_MARK: 33,
1399
+ /* ! */
1400
+ CHAR_FORM_FEED: 12,
1401
+ /* \f */
1402
+ CHAR_FORWARD_SLASH: 47,
1403
+ /* / */
1404
+ CHAR_GRAVE_ACCENT: 96,
1405
+ /* ` */
1406
+ CHAR_HASH: 35,
1407
+ /* # */
1408
+ CHAR_HYPHEN_MINUS: 45,
1409
+ /* - */
1410
+ CHAR_LEFT_ANGLE_BRACKET: 60,
1411
+ /* < */
1412
+ CHAR_LEFT_CURLY_BRACE: 123,
1413
+ /* { */
1414
+ CHAR_LEFT_SQUARE_BRACKET: 91,
1415
+ /* [ */
1416
+ CHAR_LINE_FEED: 10,
1417
+ /* \n */
1418
+ CHAR_NO_BREAK_SPACE: 160,
1419
+ /* \u00A0 */
1420
+ CHAR_PERCENT: 37,
1421
+ /* % */
1422
+ CHAR_PLUS: 43,
1423
+ /* + */
1424
+ CHAR_QUESTION_MARK: 63,
1425
+ /* ? */
1426
+ CHAR_RIGHT_ANGLE_BRACKET: 62,
1427
+ /* > */
1428
+ CHAR_RIGHT_CURLY_BRACE: 125,
1429
+ /* } */
1430
+ CHAR_RIGHT_SQUARE_BRACKET: 93,
1431
+ /* ] */
1432
+ CHAR_SEMICOLON: 59,
1433
+ /* ; */
1434
+ CHAR_SINGLE_QUOTE: 39,
1435
+ /* ' */
1436
+ CHAR_SPACE: 32,
1437
+ /* */
1438
+ CHAR_TAB: 9,
1439
+ /* \t */
1440
+ CHAR_UNDERSCORE: 95,
1441
+ /* _ */
1442
+ CHAR_VERTICAL_LINE: 124,
1443
+ /* | */
1444
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
1445
+ /* \uFEFF */
1446
+ SEP: path.sep,
1447
+ /**
1448
+ * Create EXTGLOB_CHARS
1449
+ */
1450
+ extglobChars(chars) {
1451
+ return {
1452
+ "!": {
1453
+ type: "negate",
1454
+ open: "(?:(?!(?:",
1455
+ close: `))${chars.STAR})`
1456
+ },
1457
+ "?": {
1458
+ type: "qmark",
1459
+ open: "(?:",
1460
+ close: ")?"
1461
+ },
1462
+ "+": {
1463
+ type: "plus",
1464
+ open: "(?:",
1465
+ close: ")+"
1466
+ },
1467
+ "*": {
1468
+ type: "star",
1469
+ open: "(?:",
1470
+ close: ")*"
1471
+ },
1472
+ "@": {
1473
+ type: "at",
1474
+ open: "(?:",
1475
+ close: ")"
1476
+ }
1477
+ };
1478
+ },
1479
+ /**
1480
+ * Create GLOB_CHARS
1481
+ */
1482
+ globChars(win32) {
1483
+ return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
1484
+ }
1485
+ };
1486
+ }
1487
+ });
1488
+
1489
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
1490
+ var require_utils2 = __commonJS({
1491
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"(exports$1) {
1492
+ init_cjs_shims();
1493
+ var path = __require("path");
1494
+ var win32 = process.platform === "win32";
1495
+ var { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants2();
1496
+ exports$1.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
1497
+ exports$1.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
1498
+ exports$1.isRegexChar = (str) => str.length === 1 && exports$1.hasRegexChars(str);
1499
+ exports$1.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
1500
+ exports$1.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
1501
+ exports$1.removeBackslashes = (str) => {
1502
+ return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
1503
+ return match === "\\" ? "" : match;
1504
+ });
1505
+ };
1506
+ exports$1.supportsLookbehinds = () => {
1507
+ const segs = process.version.slice(1).split(".").map(Number);
1508
+ if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
1509
+ return true;
1510
+ }
1511
+ return false;
1512
+ };
1513
+ exports$1.isWindows = (options) => {
1514
+ if (options && typeof options.windows === "boolean") {
1515
+ return options.windows;
1516
+ }
1517
+ return win32 === true || path.sep === "\\";
1518
+ };
1519
+ exports$1.escapeLast = (input, char, lastIdx) => {
1520
+ const idx = input.lastIndexOf(char, lastIdx);
1521
+ if (idx === -1) return input;
1522
+ if (input[idx - 1] === "\\") return exports$1.escapeLast(input, char, idx - 1);
1523
+ return `${input.slice(0, idx)}\\${input.slice(idx)}`;
1524
+ };
1525
+ exports$1.removePrefix = (input, state = {}) => {
1526
+ let output = input;
1527
+ if (output.startsWith("./")) {
1528
+ output = output.slice(2);
1529
+ state.prefix = "./";
1530
+ }
1531
+ return output;
1532
+ };
1533
+ exports$1.wrapOutput = (input, state = {}, options = {}) => {
1534
+ const prepend = options.contains ? "" : "^";
1535
+ const append = options.contains ? "" : "$";
1536
+ let output = `${prepend}(?:${input})${append}`;
1537
+ if (state.negated === true) {
1538
+ output = `(?:^(?!${output}).*$)`;
1539
+ }
1540
+ return output;
1541
+ };
1542
+ }
1543
+ });
1544
+
1545
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js
1546
+ var require_scan = __commonJS({
1547
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js"(exports$1, module) {
1548
+ init_cjs_shims();
1549
+ var utils = require_utils2();
1550
+ var {
1551
+ CHAR_ASTERISK,
1552
+ /* * */
1553
+ CHAR_AT,
1554
+ /* @ */
1555
+ CHAR_BACKWARD_SLASH,
1556
+ /* \ */
1557
+ CHAR_COMMA,
1558
+ /* , */
1559
+ CHAR_DOT,
1560
+ /* . */
1561
+ CHAR_EXCLAMATION_MARK,
1562
+ /* ! */
1563
+ CHAR_FORWARD_SLASH,
1564
+ /* / */
1565
+ CHAR_LEFT_CURLY_BRACE,
1566
+ /* { */
1567
+ CHAR_LEFT_PARENTHESES,
1568
+ /* ( */
1569
+ CHAR_LEFT_SQUARE_BRACKET,
1570
+ /* [ */
1571
+ CHAR_PLUS,
1572
+ /* + */
1573
+ CHAR_QUESTION_MARK,
1574
+ /* ? */
1575
+ CHAR_RIGHT_CURLY_BRACE,
1576
+ /* } */
1577
+ CHAR_RIGHT_PARENTHESES,
1578
+ /* ) */
1579
+ CHAR_RIGHT_SQUARE_BRACKET
1580
+ /* ] */
1581
+ } = require_constants2();
1582
+ var isPathSeparator = /* @__PURE__ */ __name((code) => {
1583
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
1584
+ }, "isPathSeparator");
1585
+ var depth = /* @__PURE__ */ __name((token) => {
1586
+ if (token.isPrefix !== true) {
1587
+ token.depth = token.isGlobstar ? Infinity : 1;
1588
+ }
1589
+ }, "depth");
1590
+ var scan = /* @__PURE__ */ __name((input, options) => {
1591
+ const opts = options || {};
1592
+ const length = input.length - 1;
1593
+ const scanToEnd = opts.parts === true || opts.scanToEnd === true;
1594
+ const slashes = [];
1595
+ const tokens = [];
1596
+ const parts = [];
1597
+ let str = input;
1598
+ let index = -1;
1599
+ let start = 0;
1600
+ let lastIndex = 0;
1601
+ let isBrace = false;
1602
+ let isBracket = false;
1603
+ let isGlob = false;
1604
+ let isExtglob = false;
1605
+ let isGlobstar = false;
1606
+ let braceEscaped = false;
1607
+ let backslashes = false;
1608
+ let negated = false;
1609
+ let negatedExtglob = false;
1610
+ let finished = false;
1611
+ let braces = 0;
1612
+ let prev;
1613
+ let code;
1614
+ let token = {
1615
+ value: "",
1616
+ depth: 0,
1617
+ isGlob: false
1618
+ };
1619
+ const eos = /* @__PURE__ */ __name(() => index >= length, "eos");
1620
+ const peek = /* @__PURE__ */ __name(() => str.charCodeAt(index + 1), "peek");
1621
+ const advance = /* @__PURE__ */ __name(() => {
1622
+ prev = code;
1623
+ return str.charCodeAt(++index);
1624
+ }, "advance");
1625
+ while (index < length) {
1626
+ code = advance();
1627
+ let next;
1628
+ if (code === CHAR_BACKWARD_SLASH) {
1629
+ backslashes = token.backslashes = true;
1630
+ code = advance();
1631
+ if (code === CHAR_LEFT_CURLY_BRACE) {
1632
+ braceEscaped = true;
1633
+ }
1634
+ continue;
1635
+ }
1636
+ if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
1637
+ braces++;
1638
+ while (eos() !== true && (code = advance())) {
1639
+ if (code === CHAR_BACKWARD_SLASH) {
1640
+ backslashes = token.backslashes = true;
1641
+ advance();
1642
+ continue;
1643
+ }
1644
+ if (code === CHAR_LEFT_CURLY_BRACE) {
1645
+ braces++;
1646
+ continue;
1647
+ }
1648
+ if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
1649
+ isBrace = token.isBrace = true;
1650
+ isGlob = token.isGlob = true;
1651
+ finished = true;
1652
+ if (scanToEnd === true) {
1653
+ continue;
1654
+ }
1655
+ break;
1656
+ }
1657
+ if (braceEscaped !== true && code === CHAR_COMMA) {
1658
+ isBrace = token.isBrace = true;
1659
+ isGlob = token.isGlob = true;
1660
+ finished = true;
1661
+ if (scanToEnd === true) {
1662
+ continue;
1663
+ }
1664
+ break;
1665
+ }
1666
+ if (code === CHAR_RIGHT_CURLY_BRACE) {
1667
+ braces--;
1668
+ if (braces === 0) {
1669
+ braceEscaped = false;
1670
+ isBrace = token.isBrace = true;
1671
+ finished = true;
1672
+ break;
1673
+ }
1674
+ }
1675
+ }
1676
+ if (scanToEnd === true) {
1677
+ continue;
1678
+ }
1679
+ break;
1680
+ }
1681
+ if (code === CHAR_FORWARD_SLASH) {
1682
+ slashes.push(index);
1683
+ tokens.push(token);
1684
+ token = {
1685
+ value: "",
1686
+ depth: 0,
1687
+ isGlob: false
1688
+ };
1689
+ if (finished === true) continue;
1690
+ if (prev === CHAR_DOT && index === start + 1) {
1691
+ start += 2;
1692
+ continue;
1693
+ }
1694
+ lastIndex = index + 1;
1695
+ continue;
1696
+ }
1697
+ if (opts.noext !== true) {
1698
+ const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
1699
+ if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
1700
+ isGlob = token.isGlob = true;
1701
+ isExtglob = token.isExtglob = true;
1702
+ finished = true;
1703
+ if (code === CHAR_EXCLAMATION_MARK && index === start) {
1704
+ negatedExtglob = true;
1705
+ }
1706
+ if (scanToEnd === true) {
1707
+ while (eos() !== true && (code = advance())) {
1708
+ if (code === CHAR_BACKWARD_SLASH) {
1709
+ backslashes = token.backslashes = true;
1710
+ code = advance();
1711
+ continue;
1712
+ }
1713
+ if (code === CHAR_RIGHT_PARENTHESES) {
1714
+ isGlob = token.isGlob = true;
1715
+ finished = true;
1716
+ break;
1717
+ }
1718
+ }
1719
+ continue;
1720
+ }
1721
+ break;
1722
+ }
1723
+ }
1724
+ if (code === CHAR_ASTERISK) {
1725
+ if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
1726
+ isGlob = token.isGlob = true;
1727
+ finished = true;
1728
+ if (scanToEnd === true) {
1729
+ continue;
1730
+ }
1731
+ break;
1732
+ }
1733
+ if (code === CHAR_QUESTION_MARK) {
1734
+ isGlob = token.isGlob = true;
1735
+ finished = true;
1736
+ if (scanToEnd === true) {
1737
+ continue;
1738
+ }
1739
+ break;
1740
+ }
1741
+ if (code === CHAR_LEFT_SQUARE_BRACKET) {
1742
+ while (eos() !== true && (next = advance())) {
1743
+ if (next === CHAR_BACKWARD_SLASH) {
1744
+ backslashes = token.backslashes = true;
1745
+ advance();
1746
+ continue;
1747
+ }
1748
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
1749
+ isBracket = token.isBracket = true;
1750
+ isGlob = token.isGlob = true;
1751
+ finished = true;
1752
+ break;
1753
+ }
1754
+ }
1755
+ if (scanToEnd === true) {
1756
+ continue;
1757
+ }
1758
+ break;
1759
+ }
1760
+ if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
1761
+ negated = token.negated = true;
1762
+ start++;
1763
+ continue;
1764
+ }
1765
+ if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
1766
+ isGlob = token.isGlob = true;
1767
+ if (scanToEnd === true) {
1768
+ while (eos() !== true && (code = advance())) {
1769
+ if (code === CHAR_LEFT_PARENTHESES) {
1770
+ backslashes = token.backslashes = true;
1771
+ code = advance();
1772
+ continue;
1773
+ }
1774
+ if (code === CHAR_RIGHT_PARENTHESES) {
1775
+ finished = true;
1776
+ break;
1777
+ }
1778
+ }
1779
+ continue;
1780
+ }
1781
+ break;
1782
+ }
1783
+ if (isGlob === true) {
1784
+ finished = true;
1785
+ if (scanToEnd === true) {
1786
+ continue;
1787
+ }
1788
+ break;
1789
+ }
1790
+ }
1791
+ if (opts.noext === true) {
1792
+ isExtglob = false;
1793
+ isGlob = false;
1794
+ }
1795
+ let base = str;
1796
+ let prefix = "";
1797
+ let glob = "";
1798
+ if (start > 0) {
1799
+ prefix = str.slice(0, start);
1800
+ str = str.slice(start);
1801
+ lastIndex -= start;
1802
+ }
1803
+ if (base && isGlob === true && lastIndex > 0) {
1804
+ base = str.slice(0, lastIndex);
1805
+ glob = str.slice(lastIndex);
1806
+ } else if (isGlob === true) {
1807
+ base = "";
1808
+ glob = str;
1809
+ } else {
1810
+ base = str;
1811
+ }
1812
+ if (base && base !== "" && base !== "/" && base !== str) {
1813
+ if (isPathSeparator(base.charCodeAt(base.length - 1))) {
1814
+ base = base.slice(0, -1);
1815
+ }
1816
+ }
1817
+ if (opts.unescape === true) {
1818
+ if (glob) glob = utils.removeBackslashes(glob);
1819
+ if (base && backslashes === true) {
1820
+ base = utils.removeBackslashes(base);
1821
+ }
1822
+ }
1823
+ const state = {
1824
+ prefix,
1825
+ input,
1826
+ start,
1827
+ base,
1828
+ glob,
1829
+ isBrace,
1830
+ isBracket,
1831
+ isGlob,
1832
+ isExtglob,
1833
+ isGlobstar,
1834
+ negated,
1835
+ negatedExtglob
1836
+ };
1837
+ if (opts.tokens === true) {
1838
+ state.maxDepth = 0;
1839
+ if (!isPathSeparator(code)) {
1840
+ tokens.push(token);
1841
+ }
1842
+ state.tokens = tokens;
1843
+ }
1844
+ if (opts.parts === true || opts.tokens === true) {
1845
+ let prevIndex;
1846
+ for (let idx = 0; idx < slashes.length; idx++) {
1847
+ const n = prevIndex ? prevIndex + 1 : start;
1848
+ const i = slashes[idx];
1849
+ const value = input.slice(n, i);
1850
+ if (opts.tokens) {
1851
+ if (idx === 0 && start !== 0) {
1852
+ tokens[idx].isPrefix = true;
1853
+ tokens[idx].value = prefix;
1854
+ } else {
1855
+ tokens[idx].value = value;
1856
+ }
1857
+ depth(tokens[idx]);
1858
+ state.maxDepth += tokens[idx].depth;
1859
+ }
1860
+ if (idx !== 0 || value !== "") {
1861
+ parts.push(value);
1862
+ }
1863
+ prevIndex = i;
1864
+ }
1865
+ if (prevIndex && prevIndex + 1 < input.length) {
1866
+ const value = input.slice(prevIndex + 1);
1867
+ parts.push(value);
1868
+ if (opts.tokens) {
1869
+ tokens[tokens.length - 1].value = value;
1870
+ depth(tokens[tokens.length - 1]);
1871
+ state.maxDepth += tokens[tokens.length - 1].depth;
1872
+ }
1873
+ }
1874
+ state.slashes = slashes;
1875
+ state.parts = parts;
1876
+ }
1877
+ return state;
1878
+ }, "scan");
1879
+ module.exports = scan;
1880
+ }
1881
+ });
1882
+
1883
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js
1884
+ var require_parse2 = __commonJS({
1885
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js"(exports$1, module) {
1886
+ init_cjs_shims();
1887
+ var constants = require_constants2();
1888
+ var utils = require_utils2();
1889
+ var { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
1890
+ var expandRange = /* @__PURE__ */ __name((args, options) => {
1891
+ if (typeof options.expandRange === "function") {
1892
+ return options.expandRange(...args, options);
1893
+ }
1894
+ args.sort();
1895
+ const value = `[${args.join("-")}]`;
1896
+ try {
1897
+ new RegExp(value);
1898
+ } catch (ex) {
1899
+ return args.map((v) => utils.escapeRegex(v)).join("..");
1900
+ }
1901
+ return value;
1902
+ }, "expandRange");
1903
+ var syntaxError = /* @__PURE__ */ __name((type, char) => {
1904
+ return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
1905
+ }, "syntaxError");
1906
+ var parse = /* @__PURE__ */ __name((input, options) => {
1907
+ if (typeof input !== "string") {
1908
+ throw new TypeError("Expected a string");
1909
+ }
1910
+ input = REPLACEMENTS[input] || input;
1911
+ const opts = {
1912
+ ...options
1913
+ };
1914
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1915
+ let len = input.length;
1916
+ if (len > max) {
1917
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1918
+ }
1919
+ const bos = {
1920
+ type: "bos",
1921
+ value: "",
1922
+ output: opts.prepend || ""
1923
+ };
1924
+ const tokens = [
1925
+ bos
1926
+ ];
1927
+ const capture = opts.capture ? "" : "?:";
1928
+ const win32 = utils.isWindows(options);
1929
+ const PLATFORM_CHARS = constants.globChars(win32);
1930
+ const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
1931
+ const { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS;
1932
+ const globstar = /* @__PURE__ */ __name((opts2) => {
1933
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1934
+ }, "globstar");
1935
+ const nodot = opts.dot ? "" : NO_DOT;
1936
+ const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
1937
+ let star = opts.bash === true ? globstar(opts) : STAR;
1938
+ if (opts.capture) {
1939
+ star = `(${star})`;
1940
+ }
1941
+ if (typeof opts.noext === "boolean") {
1942
+ opts.noextglob = opts.noext;
1943
+ }
1944
+ const state = {
1945
+ input,
1946
+ index: -1,
1947
+ start: 0,
1948
+ dot: opts.dot === true,
1949
+ consumed: "",
1950
+ output: "",
1951
+ prefix: "",
1952
+ backtrack: false,
1953
+ negated: false,
1954
+ brackets: 0,
1955
+ braces: 0,
1956
+ parens: 0,
1957
+ quotes: 0,
1958
+ globstar: false,
1959
+ tokens
1960
+ };
1961
+ input = utils.removePrefix(input, state);
1962
+ len = input.length;
1963
+ const extglobs = [];
1964
+ const braces = [];
1965
+ const stack = [];
1966
+ let prev = bos;
1967
+ let value;
1968
+ const eos = /* @__PURE__ */ __name(() => state.index === len - 1, "eos");
1969
+ const peek = state.peek = (n = 1) => input[state.index + n];
1970
+ const advance = state.advance = () => input[++state.index] || "";
1971
+ const remaining = /* @__PURE__ */ __name(() => input.slice(state.index + 1), "remaining");
1972
+ const consume = /* @__PURE__ */ __name((value2 = "", num = 0) => {
1973
+ state.consumed += value2;
1974
+ state.index += num;
1975
+ }, "consume");
1976
+ const append = /* @__PURE__ */ __name((token) => {
1977
+ state.output += token.output != null ? token.output : token.value;
1978
+ consume(token.value);
1979
+ }, "append");
1980
+ const negate = /* @__PURE__ */ __name(() => {
1981
+ let count = 1;
1982
+ while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
1983
+ advance();
1984
+ state.start++;
1985
+ count++;
1986
+ }
1987
+ if (count % 2 === 0) {
1988
+ return false;
1989
+ }
1990
+ state.negated = true;
1991
+ state.start++;
1992
+ return true;
1993
+ }, "negate");
1994
+ const increment = /* @__PURE__ */ __name((type) => {
1995
+ state[type]++;
1996
+ stack.push(type);
1997
+ }, "increment");
1998
+ const decrement = /* @__PURE__ */ __name((type) => {
1999
+ state[type]--;
2000
+ stack.pop();
2001
+ }, "decrement");
2002
+ const push = /* @__PURE__ */ __name((tok) => {
2003
+ if (prev.type === "globstar") {
2004
+ const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
2005
+ const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
2006
+ if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
2007
+ state.output = state.output.slice(0, -prev.output.length);
2008
+ prev.type = "star";
2009
+ prev.value = "*";
2010
+ prev.output = star;
2011
+ state.output += prev.output;
2012
+ }
2013
+ }
2014
+ if (extglobs.length && tok.type !== "paren") {
2015
+ extglobs[extglobs.length - 1].inner += tok.value;
2016
+ }
2017
+ if (tok.value || tok.output) append(tok);
2018
+ if (prev && prev.type === "text" && tok.type === "text") {
2019
+ prev.value += tok.value;
2020
+ prev.output = (prev.output || "") + tok.value;
2021
+ return;
2022
+ }
2023
+ tok.prev = prev;
2024
+ tokens.push(tok);
2025
+ prev = tok;
2026
+ }, "push");
2027
+ const extglobOpen = /* @__PURE__ */ __name((type, value2) => {
2028
+ const token = {
2029
+ ...EXTGLOB_CHARS[value2],
2030
+ conditions: 1,
2031
+ inner: ""
2032
+ };
2033
+ token.prev = prev;
2034
+ token.parens = state.parens;
2035
+ token.output = state.output;
2036
+ const output = (opts.capture ? "(" : "") + token.open;
2037
+ increment("parens");
2038
+ push({
2039
+ type,
2040
+ value: value2,
2041
+ output: state.output ? "" : ONE_CHAR
2042
+ });
2043
+ push({
2044
+ type: "paren",
2045
+ extglob: true,
2046
+ value: advance(),
2047
+ output
2048
+ });
2049
+ extglobs.push(token);
2050
+ }, "extglobOpen");
2051
+ const extglobClose = /* @__PURE__ */ __name((token) => {
2052
+ let output = token.close + (opts.capture ? ")" : "");
2053
+ let rest;
2054
+ if (token.type === "negate") {
2055
+ let extglobStar = star;
2056
+ if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
2057
+ extglobStar = globstar(opts);
2058
+ }
2059
+ if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
2060
+ output = token.close = `)$))${extglobStar}`;
2061
+ }
2062
+ if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
2063
+ const expression = parse(rest, {
2064
+ ...options,
2065
+ fastpaths: false
2066
+ }).output;
2067
+ output = token.close = `)${expression})${extglobStar})`;
2068
+ }
2069
+ if (token.prev.type === "bos") {
2070
+ state.negatedExtglob = true;
2071
+ }
2072
+ }
2073
+ push({
2074
+ type: "paren",
2075
+ extglob: true,
2076
+ value,
2077
+ output
2078
+ });
2079
+ decrement("parens");
2080
+ }, "extglobClose");
2081
+ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
2082
+ let backslashes = false;
2083
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
2084
+ if (first === "\\") {
2085
+ backslashes = true;
2086
+ return m;
2087
+ }
2088
+ if (first === "?") {
2089
+ if (esc) {
2090
+ return esc + first + (rest ? QMARK.repeat(rest.length) : "");
2091
+ }
2092
+ if (index === 0) {
2093
+ return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
2094
+ }
2095
+ return QMARK.repeat(chars.length);
2096
+ }
2097
+ if (first === ".") {
2098
+ return DOT_LITERAL.repeat(chars.length);
2099
+ }
2100
+ if (first === "*") {
2101
+ if (esc) {
2102
+ return esc + first + (rest ? star : "");
2103
+ }
2104
+ return star;
2105
+ }
2106
+ return esc ? m : `\\${m}`;
2107
+ });
2108
+ if (backslashes === true) {
2109
+ if (opts.unescape === true) {
2110
+ output = output.replace(/\\/g, "");
2111
+ } else {
2112
+ output = output.replace(/\\+/g, (m) => {
2113
+ return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
2114
+ });
2115
+ }
2116
+ }
2117
+ if (output === input && opts.contains === true) {
2118
+ state.output = input;
2119
+ return state;
2120
+ }
2121
+ state.output = utils.wrapOutput(output, state, options);
2122
+ return state;
2123
+ }
2124
+ while (!eos()) {
2125
+ value = advance();
2126
+ if (value === "\0") {
2127
+ continue;
2128
+ }
2129
+ if (value === "\\") {
2130
+ const next = peek();
2131
+ if (next === "/" && opts.bash !== true) {
2132
+ continue;
2133
+ }
2134
+ if (next === "." || next === ";") {
2135
+ continue;
2136
+ }
2137
+ if (!next) {
2138
+ value += "\\";
2139
+ push({
2140
+ type: "text",
2141
+ value
2142
+ });
2143
+ continue;
2144
+ }
2145
+ const match = /^\\+/.exec(remaining());
2146
+ let slashes = 0;
2147
+ if (match && match[0].length > 2) {
2148
+ slashes = match[0].length;
2149
+ state.index += slashes;
2150
+ if (slashes % 2 !== 0) {
2151
+ value += "\\";
2152
+ }
2153
+ }
2154
+ if (opts.unescape === true) {
2155
+ value = advance();
2156
+ } else {
2157
+ value += advance();
2158
+ }
2159
+ if (state.brackets === 0) {
2160
+ push({
2161
+ type: "text",
2162
+ value
2163
+ });
2164
+ continue;
2165
+ }
2166
+ }
2167
+ if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
2168
+ if (opts.posix !== false && value === ":") {
2169
+ const inner = prev.value.slice(1);
2170
+ if (inner.includes("[")) {
2171
+ prev.posix = true;
2172
+ if (inner.includes(":")) {
2173
+ const idx = prev.value.lastIndexOf("[");
2174
+ const pre = prev.value.slice(0, idx);
2175
+ const rest2 = prev.value.slice(idx + 2);
2176
+ const posix = POSIX_REGEX_SOURCE[rest2];
2177
+ if (posix) {
2178
+ prev.value = pre + posix;
2179
+ state.backtrack = true;
2180
+ advance();
2181
+ if (!bos.output && tokens.indexOf(prev) === 1) {
2182
+ bos.output = ONE_CHAR;
2183
+ }
2184
+ continue;
2185
+ }
2186
+ }
2187
+ }
2188
+ }
2189
+ if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
2190
+ value = `\\${value}`;
2191
+ }
2192
+ if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
2193
+ value = `\\${value}`;
2194
+ }
2195
+ if (opts.posix === true && value === "!" && prev.value === "[") {
2196
+ value = "^";
2197
+ }
2198
+ prev.value += value;
2199
+ append({
2200
+ value
2201
+ });
2202
+ continue;
2203
+ }
2204
+ if (state.quotes === 1 && value !== '"') {
2205
+ value = utils.escapeRegex(value);
2206
+ prev.value += value;
2207
+ append({
2208
+ value
2209
+ });
2210
+ continue;
2211
+ }
2212
+ if (value === '"') {
2213
+ state.quotes = state.quotes === 1 ? 0 : 1;
2214
+ if (opts.keepQuotes === true) {
2215
+ push({
2216
+ type: "text",
2217
+ value
2218
+ });
2219
+ }
2220
+ continue;
2221
+ }
2222
+ if (value === "(") {
2223
+ increment("parens");
2224
+ push({
2225
+ type: "paren",
2226
+ value
2227
+ });
2228
+ continue;
2229
+ }
2230
+ if (value === ")") {
2231
+ if (state.parens === 0 && opts.strictBrackets === true) {
2232
+ throw new SyntaxError(syntaxError("opening", "("));
2233
+ }
2234
+ const extglob = extglobs[extglobs.length - 1];
2235
+ if (extglob && state.parens === extglob.parens + 1) {
2236
+ extglobClose(extglobs.pop());
2237
+ continue;
2238
+ }
2239
+ push({
2240
+ type: "paren",
2241
+ value,
2242
+ output: state.parens ? ")" : "\\)"
2243
+ });
2244
+ decrement("parens");
2245
+ continue;
2246
+ }
2247
+ if (value === "[") {
2248
+ if (opts.nobracket === true || !remaining().includes("]")) {
2249
+ if (opts.nobracket !== true && opts.strictBrackets === true) {
2250
+ throw new SyntaxError(syntaxError("closing", "]"));
2251
+ }
2252
+ value = `\\${value}`;
2253
+ } else {
2254
+ increment("brackets");
2255
+ }
2256
+ push({
2257
+ type: "bracket",
2258
+ value
2259
+ });
2260
+ continue;
2261
+ }
2262
+ if (value === "]") {
2263
+ if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
2264
+ push({
2265
+ type: "text",
2266
+ value,
2267
+ output: `\\${value}`
2268
+ });
2269
+ continue;
2270
+ }
2271
+ if (state.brackets === 0) {
2272
+ if (opts.strictBrackets === true) {
2273
+ throw new SyntaxError(syntaxError("opening", "["));
2274
+ }
2275
+ push({
2276
+ type: "text",
2277
+ value,
2278
+ output: `\\${value}`
2279
+ });
2280
+ continue;
2281
+ }
2282
+ decrement("brackets");
2283
+ const prevValue = prev.value.slice(1);
2284
+ if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
2285
+ value = `/${value}`;
2286
+ }
2287
+ prev.value += value;
2288
+ append({
2289
+ value
2290
+ });
2291
+ if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
2292
+ continue;
2293
+ }
2294
+ const escaped = utils.escapeRegex(prev.value);
2295
+ state.output = state.output.slice(0, -prev.value.length);
2296
+ if (opts.literalBrackets === true) {
2297
+ state.output += escaped;
2298
+ prev.value = escaped;
2299
+ continue;
2300
+ }
2301
+ prev.value = `(${capture}${escaped}|${prev.value})`;
2302
+ state.output += prev.value;
2303
+ continue;
2304
+ }
2305
+ if (value === "{" && opts.nobrace !== true) {
2306
+ increment("braces");
2307
+ const open = {
2308
+ type: "brace",
2309
+ value,
2310
+ output: "(",
2311
+ outputIndex: state.output.length,
2312
+ tokensIndex: state.tokens.length
2313
+ };
2314
+ braces.push(open);
2315
+ push(open);
2316
+ continue;
2317
+ }
2318
+ if (value === "}") {
2319
+ const brace = braces[braces.length - 1];
2320
+ if (opts.nobrace === true || !brace) {
2321
+ push({
2322
+ type: "text",
2323
+ value,
2324
+ output: value
2325
+ });
2326
+ continue;
2327
+ }
2328
+ let output = ")";
2329
+ if (brace.dots === true) {
2330
+ const arr = tokens.slice();
2331
+ const range = [];
2332
+ for (let i = arr.length - 1; i >= 0; i--) {
2333
+ tokens.pop();
2334
+ if (arr[i].type === "brace") {
2335
+ break;
2336
+ }
2337
+ if (arr[i].type !== "dots") {
2338
+ range.unshift(arr[i].value);
2339
+ }
2340
+ }
2341
+ output = expandRange(range, opts);
2342
+ state.backtrack = true;
2343
+ }
2344
+ if (brace.comma !== true && brace.dots !== true) {
2345
+ const out = state.output.slice(0, brace.outputIndex);
2346
+ const toks = state.tokens.slice(brace.tokensIndex);
2347
+ brace.value = brace.output = "\\{";
2348
+ value = output = "\\}";
2349
+ state.output = out;
2350
+ for (const t of toks) {
2351
+ state.output += t.output || t.value;
2352
+ }
2353
+ }
2354
+ push({
2355
+ type: "brace",
2356
+ value,
2357
+ output
2358
+ });
2359
+ decrement("braces");
2360
+ braces.pop();
2361
+ continue;
2362
+ }
2363
+ if (value === "|") {
2364
+ if (extglobs.length > 0) {
2365
+ extglobs[extglobs.length - 1].conditions++;
2366
+ }
2367
+ push({
2368
+ type: "text",
2369
+ value
2370
+ });
2371
+ continue;
2372
+ }
2373
+ if (value === ",") {
2374
+ let output = value;
2375
+ const brace = braces[braces.length - 1];
2376
+ if (brace && stack[stack.length - 1] === "braces") {
2377
+ brace.comma = true;
2378
+ output = "|";
2379
+ }
2380
+ push({
2381
+ type: "comma",
2382
+ value,
2383
+ output
2384
+ });
2385
+ continue;
2386
+ }
2387
+ if (value === "/") {
2388
+ if (prev.type === "dot" && state.index === state.start + 1) {
2389
+ state.start = state.index + 1;
2390
+ state.consumed = "";
2391
+ state.output = "";
2392
+ tokens.pop();
2393
+ prev = bos;
2394
+ continue;
2395
+ }
2396
+ push({
2397
+ type: "slash",
2398
+ value,
2399
+ output: SLASH_LITERAL
2400
+ });
2401
+ continue;
2402
+ }
2403
+ if (value === ".") {
2404
+ if (state.braces > 0 && prev.type === "dot") {
2405
+ if (prev.value === ".") prev.output = DOT_LITERAL;
2406
+ const brace = braces[braces.length - 1];
2407
+ prev.type = "dots";
2408
+ prev.output += value;
2409
+ prev.value += value;
2410
+ brace.dots = true;
2411
+ continue;
2412
+ }
2413
+ if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
2414
+ push({
2415
+ type: "text",
2416
+ value,
2417
+ output: DOT_LITERAL
2418
+ });
2419
+ continue;
2420
+ }
2421
+ push({
2422
+ type: "dot",
2423
+ value,
2424
+ output: DOT_LITERAL
2425
+ });
2426
+ continue;
2427
+ }
2428
+ if (value === "?") {
2429
+ const isGroup = prev && prev.value === "(";
2430
+ if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
2431
+ extglobOpen("qmark", value);
2432
+ continue;
2433
+ }
2434
+ if (prev && prev.type === "paren") {
2435
+ const next = peek();
2436
+ let output = value;
2437
+ if (next === "<" && !utils.supportsLookbehinds()) {
2438
+ throw new Error("Node.js v10 or higher is required for regex lookbehinds");
2439
+ }
2440
+ if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
2441
+ output = `\\${value}`;
2442
+ }
2443
+ push({
2444
+ type: "text",
2445
+ value,
2446
+ output
2447
+ });
2448
+ continue;
2449
+ }
2450
+ if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
2451
+ push({
2452
+ type: "qmark",
2453
+ value,
2454
+ output: QMARK_NO_DOT
2455
+ });
2456
+ continue;
2457
+ }
2458
+ push({
2459
+ type: "qmark",
2460
+ value,
2461
+ output: QMARK
2462
+ });
2463
+ continue;
2464
+ }
2465
+ if (value === "!") {
2466
+ if (opts.noextglob !== true && peek() === "(") {
2467
+ if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
2468
+ extglobOpen("negate", value);
2469
+ continue;
2470
+ }
2471
+ }
2472
+ if (opts.nonegate !== true && state.index === 0) {
2473
+ negate();
2474
+ continue;
2475
+ }
2476
+ }
2477
+ if (value === "+") {
2478
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
2479
+ extglobOpen("plus", value);
2480
+ continue;
2481
+ }
2482
+ if (prev && prev.value === "(" || opts.regex === false) {
2483
+ push({
2484
+ type: "plus",
2485
+ value,
2486
+ output: PLUS_LITERAL
2487
+ });
2488
+ continue;
2489
+ }
2490
+ if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
2491
+ push({
2492
+ type: "plus",
2493
+ value
2494
+ });
2495
+ continue;
2496
+ }
2497
+ push({
2498
+ type: "plus",
2499
+ value: PLUS_LITERAL
2500
+ });
2501
+ continue;
2502
+ }
2503
+ if (value === "@") {
2504
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
2505
+ push({
2506
+ type: "at",
2507
+ extglob: true,
2508
+ value,
2509
+ output: ""
2510
+ });
2511
+ continue;
2512
+ }
2513
+ push({
2514
+ type: "text",
2515
+ value
2516
+ });
2517
+ continue;
2518
+ }
2519
+ if (value !== "*") {
2520
+ if (value === "$" || value === "^") {
2521
+ value = `\\${value}`;
2522
+ }
2523
+ const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
2524
+ if (match) {
2525
+ value += match[0];
2526
+ state.index += match[0].length;
2527
+ }
2528
+ push({
2529
+ type: "text",
2530
+ value
2531
+ });
2532
+ continue;
2533
+ }
2534
+ if (prev && (prev.type === "globstar" || prev.star === true)) {
2535
+ prev.type = "star";
2536
+ prev.star = true;
2537
+ prev.value += value;
2538
+ prev.output = star;
2539
+ state.backtrack = true;
2540
+ state.globstar = true;
2541
+ consume(value);
2542
+ continue;
2543
+ }
2544
+ let rest = remaining();
2545
+ if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
2546
+ extglobOpen("star", value);
2547
+ continue;
2548
+ }
2549
+ if (prev.type === "star") {
2550
+ if (opts.noglobstar === true) {
2551
+ consume(value);
2552
+ continue;
2553
+ }
2554
+ const prior = prev.prev;
2555
+ const before = prior.prev;
2556
+ const isStart = prior.type === "slash" || prior.type === "bos";
2557
+ const afterStar = before && (before.type === "star" || before.type === "globstar");
2558
+ if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
2559
+ push({
2560
+ type: "star",
2561
+ value,
2562
+ output: ""
2563
+ });
2564
+ continue;
2565
+ }
2566
+ const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
2567
+ const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
2568
+ if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
2569
+ push({
2570
+ type: "star",
2571
+ value,
2572
+ output: ""
2573
+ });
2574
+ continue;
2575
+ }
2576
+ while (rest.slice(0, 3) === "/**") {
2577
+ const after = input[state.index + 4];
2578
+ if (after && after !== "/") {
2579
+ break;
2580
+ }
2581
+ rest = rest.slice(3);
2582
+ consume("/**", 3);
2583
+ }
2584
+ if (prior.type === "bos" && eos()) {
2585
+ prev.type = "globstar";
2586
+ prev.value += value;
2587
+ prev.output = globstar(opts);
2588
+ state.output = prev.output;
2589
+ state.globstar = true;
2590
+ consume(value);
2591
+ continue;
2592
+ }
2593
+ if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
2594
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
2595
+ prior.output = `(?:${prior.output}`;
2596
+ prev.type = "globstar";
2597
+ prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
2598
+ prev.value += value;
2599
+ state.globstar = true;
2600
+ state.output += prior.output + prev.output;
2601
+ consume(value);
2602
+ continue;
2603
+ }
2604
+ if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
2605
+ const end = rest[1] !== void 0 ? "|$" : "";
2606
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
2607
+ prior.output = `(?:${prior.output}`;
2608
+ prev.type = "globstar";
2609
+ prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
2610
+ prev.value += value;
2611
+ state.output += prior.output + prev.output;
2612
+ state.globstar = true;
2613
+ consume(value + advance());
2614
+ push({
2615
+ type: "slash",
2616
+ value: "/",
2617
+ output: ""
2618
+ });
2619
+ continue;
2620
+ }
2621
+ if (prior.type === "bos" && rest[0] === "/") {
2622
+ prev.type = "globstar";
2623
+ prev.value += value;
2624
+ prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
2625
+ state.output = prev.output;
2626
+ state.globstar = true;
2627
+ consume(value + advance());
2628
+ push({
2629
+ type: "slash",
2630
+ value: "/",
2631
+ output: ""
2632
+ });
2633
+ continue;
2634
+ }
2635
+ state.output = state.output.slice(0, -prev.output.length);
2636
+ prev.type = "globstar";
2637
+ prev.output = globstar(opts);
2638
+ prev.value += value;
2639
+ state.output += prev.output;
2640
+ state.globstar = true;
2641
+ consume(value);
2642
+ continue;
2643
+ }
2644
+ const token = {
2645
+ type: "star",
2646
+ value,
2647
+ output: star
2648
+ };
2649
+ if (opts.bash === true) {
2650
+ token.output = ".*?";
2651
+ if (prev.type === "bos" || prev.type === "slash") {
2652
+ token.output = nodot + token.output;
2653
+ }
2654
+ push(token);
2655
+ continue;
2656
+ }
2657
+ if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
2658
+ token.output = value;
2659
+ push(token);
2660
+ continue;
2661
+ }
2662
+ if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
2663
+ if (prev.type === "dot") {
2664
+ state.output += NO_DOT_SLASH;
2665
+ prev.output += NO_DOT_SLASH;
2666
+ } else if (opts.dot === true) {
2667
+ state.output += NO_DOTS_SLASH;
2668
+ prev.output += NO_DOTS_SLASH;
2669
+ } else {
2670
+ state.output += nodot;
2671
+ prev.output += nodot;
2672
+ }
2673
+ if (peek() !== "*") {
2674
+ state.output += ONE_CHAR;
2675
+ prev.output += ONE_CHAR;
2676
+ }
2677
+ }
2678
+ push(token);
2679
+ }
2680
+ while (state.brackets > 0) {
2681
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
2682
+ state.output = utils.escapeLast(state.output, "[");
2683
+ decrement("brackets");
2684
+ }
2685
+ while (state.parens > 0) {
2686
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
2687
+ state.output = utils.escapeLast(state.output, "(");
2688
+ decrement("parens");
2689
+ }
2690
+ while (state.braces > 0) {
2691
+ if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
2692
+ state.output = utils.escapeLast(state.output, "{");
2693
+ decrement("braces");
2694
+ }
2695
+ if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
2696
+ push({
2697
+ type: "maybe_slash",
2698
+ value: "",
2699
+ output: `${SLASH_LITERAL}?`
2700
+ });
2701
+ }
2702
+ if (state.backtrack === true) {
2703
+ state.output = "";
2704
+ for (const token of state.tokens) {
2705
+ state.output += token.output != null ? token.output : token.value;
2706
+ if (token.suffix) {
2707
+ state.output += token.suffix;
2708
+ }
2709
+ }
2710
+ }
2711
+ return state;
2712
+ }, "parse");
2713
+ parse.fastpaths = (input, options) => {
2714
+ const opts = {
2715
+ ...options
2716
+ };
2717
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
2718
+ const len = input.length;
2719
+ if (len > max) {
2720
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
2721
+ }
2722
+ input = REPLACEMENTS[input] || input;
2723
+ const win32 = utils.isWindows(options);
2724
+ const { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(win32);
2725
+ const nodot = opts.dot ? NO_DOTS : NO_DOT;
2726
+ const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
2727
+ const capture = opts.capture ? "" : "?:";
2728
+ const state = {
2729
+ negated: false,
2730
+ prefix: ""
2731
+ };
2732
+ let star = opts.bash === true ? ".*?" : STAR;
2733
+ if (opts.capture) {
2734
+ star = `(${star})`;
2735
+ }
2736
+ const globstar = /* @__PURE__ */ __name((opts2) => {
2737
+ if (opts2.noglobstar === true) return star;
2738
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
2739
+ }, "globstar");
2740
+ const create = /* @__PURE__ */ __name((str) => {
2741
+ switch (str) {
2742
+ case "*":
2743
+ return `${nodot}${ONE_CHAR}${star}`;
2744
+ case ".*":
2745
+ return `${DOT_LITERAL}${ONE_CHAR}${star}`;
2746
+ case "*.*":
2747
+ return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
2748
+ case "*/*":
2749
+ return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
2750
+ case "**":
2751
+ return nodot + globstar(opts);
2752
+ case "**/*":
2753
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
2754
+ case "**/*.*":
2755
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
2756
+ case "**/.*":
2757
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
2758
+ default: {
2759
+ const match = /^(.*?)\.(\w+)$/.exec(str);
2760
+ if (!match) return;
2761
+ const source2 = create(match[1]);
2762
+ if (!source2) return;
2763
+ return source2 + DOT_LITERAL + match[2];
2764
+ }
2765
+ }
2766
+ }, "create");
2767
+ const output = utils.removePrefix(input, state);
2768
+ let source = create(output);
2769
+ if (source && opts.strictSlashes !== true) {
2770
+ source += `${SLASH_LITERAL}?`;
2771
+ }
2772
+ return source;
2773
+ };
2774
+ module.exports = parse;
2775
+ }
2776
+ });
2777
+
2778
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js
2779
+ var require_picomatch = __commonJS({
2780
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js"(exports$1, module) {
2781
+ init_cjs_shims();
2782
+ var path = __require("path");
2783
+ var scan = require_scan();
2784
+ var parse = require_parse2();
2785
+ var utils = require_utils2();
2786
+ var constants = require_constants2();
2787
+ var isObject2 = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject");
2788
+ var picomatch = /* @__PURE__ */ __name((glob, options, returnState = false) => {
2789
+ if (Array.isArray(glob)) {
2790
+ const fns = glob.map((input) => picomatch(input, options, returnState));
2791
+ const arrayMatcher = /* @__PURE__ */ __name((str) => {
2792
+ for (const isMatch of fns) {
2793
+ const state2 = isMatch(str);
2794
+ if (state2) return state2;
2795
+ }
2796
+ return false;
2797
+ }, "arrayMatcher");
2798
+ return arrayMatcher;
2799
+ }
2800
+ const isState = isObject2(glob) && glob.tokens && glob.input;
2801
+ if (glob === "" || typeof glob !== "string" && !isState) {
2802
+ throw new TypeError("Expected pattern to be a non-empty string");
2803
+ }
2804
+ const opts = options || {};
2805
+ const posix = utils.isWindows(options);
2806
+ const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
2807
+ const state = regex.state;
2808
+ delete regex.state;
2809
+ let isIgnored = /* @__PURE__ */ __name(() => false, "isIgnored");
2810
+ if (opts.ignore) {
2811
+ const ignoreOpts = {
2812
+ ...options,
2813
+ ignore: null,
2814
+ onMatch: null,
2815
+ onResult: null
2816
+ };
2817
+ isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
2818
+ }
2819
+ const matcher = /* @__PURE__ */ __name((input, returnObject = false) => {
2820
+ const { isMatch, match, output } = picomatch.test(input, regex, options, {
2821
+ glob,
2822
+ posix
2823
+ });
2824
+ const result = {
2825
+ glob,
2826
+ state,
2827
+ regex,
2828
+ posix,
2829
+ input,
2830
+ output,
2831
+ match,
2832
+ isMatch
2833
+ };
2834
+ if (typeof opts.onResult === "function") {
2835
+ opts.onResult(result);
2836
+ }
2837
+ if (isMatch === false) {
2838
+ result.isMatch = false;
2839
+ return returnObject ? result : false;
2840
+ }
2841
+ if (isIgnored(input)) {
2842
+ if (typeof opts.onIgnore === "function") {
2843
+ opts.onIgnore(result);
2844
+ }
2845
+ result.isMatch = false;
2846
+ return returnObject ? result : false;
2847
+ }
2848
+ if (typeof opts.onMatch === "function") {
2849
+ opts.onMatch(result);
2850
+ }
2851
+ return returnObject ? result : true;
2852
+ }, "matcher");
2853
+ if (returnState) {
2854
+ matcher.state = state;
2855
+ }
2856
+ return matcher;
2857
+ }, "picomatch");
2858
+ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
2859
+ if (typeof input !== "string") {
2860
+ throw new TypeError("Expected input to be a string");
2861
+ }
2862
+ if (input === "") {
2863
+ return {
2864
+ isMatch: false,
2865
+ output: ""
2866
+ };
2867
+ }
2868
+ const opts = options || {};
2869
+ const format = opts.format || (posix ? utils.toPosixSlashes : null);
2870
+ let match = input === glob;
2871
+ let output = match && format ? format(input) : input;
2872
+ if (match === false) {
2873
+ output = format ? format(input) : input;
2874
+ match = output === glob;
2875
+ }
2876
+ if (match === false || opts.capture === true) {
2877
+ if (opts.matchBase === true || opts.basename === true) {
2878
+ match = picomatch.matchBase(input, regex, options, posix);
2879
+ } else {
2880
+ match = regex.exec(output);
2881
+ }
2882
+ }
2883
+ return {
2884
+ isMatch: Boolean(match),
2885
+ match,
2886
+ output
2887
+ };
2888
+ };
2889
+ picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
2890
+ const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
2891
+ return regex.test(path.basename(input));
2892
+ };
2893
+ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
2894
+ picomatch.parse = (pattern, options) => {
2895
+ if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
2896
+ return parse(pattern, {
2897
+ ...options,
2898
+ fastpaths: false
2899
+ });
2900
+ };
2901
+ picomatch.scan = (input, options) => scan(input, options);
2902
+ picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
2903
+ if (returnOutput === true) {
2904
+ return state.output;
2905
+ }
2906
+ const opts = options || {};
2907
+ const prepend = opts.contains ? "" : "^";
2908
+ const append = opts.contains ? "" : "$";
2909
+ let source = `${prepend}(?:${state.output})${append}`;
2910
+ if (state && state.negated === true) {
2911
+ source = `^(?!${source}).*$`;
2912
+ }
2913
+ const regex = picomatch.toRegex(source, options);
2914
+ if (returnState === true) {
2915
+ regex.state = state;
2916
+ }
2917
+ return regex;
2918
+ };
2919
+ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
2920
+ if (!input || typeof input !== "string") {
2921
+ throw new TypeError("Expected a non-empty string");
2922
+ }
2923
+ let parsed = {
2924
+ negated: false,
2925
+ fastpaths: true
2926
+ };
2927
+ if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
2928
+ parsed.output = parse.fastpaths(input, options);
2929
+ }
2930
+ if (!parsed.output) {
2931
+ parsed = parse(input, options);
2932
+ }
2933
+ return picomatch.compileRe(parsed, options, returnOutput, returnState);
2934
+ };
2935
+ picomatch.toRegex = (source, options) => {
2936
+ try {
2937
+ const opts = options || {};
2938
+ return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
2939
+ } catch (err) {
2940
+ if (options && options.debug === true) throw err;
2941
+ return /$^/;
2942
+ }
2943
+ };
2944
+ picomatch.constants = constants;
2945
+ module.exports = picomatch;
2946
+ }
2947
+ });
2948
+
2949
+ // ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js
2950
+ var require_picomatch2 = __commonJS({
2951
+ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js"(exports$1, module) {
2952
+ init_cjs_shims();
2953
+ module.exports = require_picomatch();
2954
+ }
2955
+ });
2956
+
2957
+ // ../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js
2958
+ var require_micromatch = __commonJS({
2959
+ "../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js"(exports$1, module) {
2960
+ init_cjs_shims();
2961
+ var util = __require("util");
2962
+ var braces = require_braces();
2963
+ var picomatch = require_picomatch2();
2964
+ var utils = require_utils2();
2965
+ var isEmptyString = /* @__PURE__ */ __name((v) => v === "" || v === "./", "isEmptyString");
2966
+ var hasBraces = /* @__PURE__ */ __name((v) => {
2967
+ const index = v.indexOf("{");
2968
+ return index > -1 && v.indexOf("}", index) > -1;
2969
+ }, "hasBraces");
2970
+ var micromatch2 = /* @__PURE__ */ __name((list, patterns, options) => {
2971
+ patterns = [].concat(patterns);
2972
+ list = [].concat(list);
2973
+ let omit = /* @__PURE__ */ new Set();
2974
+ let keep = /* @__PURE__ */ new Set();
2975
+ let items = /* @__PURE__ */ new Set();
2976
+ let negatives = 0;
2977
+ let onResult = /* @__PURE__ */ __name((state) => {
2978
+ items.add(state.output);
2979
+ if (options && options.onResult) {
2980
+ options.onResult(state);
2981
+ }
2982
+ }, "onResult");
2983
+ for (let i = 0; i < patterns.length; i++) {
2984
+ let isMatch = picomatch(String(patterns[i]), {
2985
+ ...options,
2986
+ onResult
2987
+ }, true);
2988
+ let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
2989
+ if (negated) negatives++;
2990
+ for (let item of list) {
2991
+ let matched = isMatch(item, true);
2992
+ let match = negated ? !matched.isMatch : matched.isMatch;
2993
+ if (!match) continue;
2994
+ if (negated) {
2995
+ omit.add(matched.output);
2996
+ } else {
2997
+ omit.delete(matched.output);
2998
+ keep.add(matched.output);
2999
+ }
3000
+ }
3001
+ }
3002
+ let result = negatives === patterns.length ? [
3003
+ ...items
3004
+ ] : [
3005
+ ...keep
3006
+ ];
3007
+ let matches = result.filter((item) => !omit.has(item));
3008
+ if (options && matches.length === 0) {
3009
+ if (options.failglob === true) {
3010
+ throw new Error(`No matches found for "${patterns.join(", ")}"`);
3011
+ }
3012
+ if (options.nonull === true || options.nullglob === true) {
3013
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
3014
+ }
3015
+ }
3016
+ return matches;
3017
+ }, "micromatch");
3018
+ micromatch2.match = micromatch2;
3019
+ micromatch2.matcher = (pattern, options) => picomatch(pattern, options);
3020
+ micromatch2.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
3021
+ micromatch2.any = micromatch2.isMatch;
3022
+ micromatch2.not = (list, patterns, options = {}) => {
3023
+ patterns = [].concat(patterns).map(String);
3024
+ let result = /* @__PURE__ */ new Set();
3025
+ let items = [];
3026
+ let onResult = /* @__PURE__ */ __name((state) => {
3027
+ if (options.onResult) options.onResult(state);
3028
+ items.push(state.output);
3029
+ }, "onResult");
3030
+ let matches = new Set(micromatch2(list, patterns, {
3031
+ ...options,
3032
+ onResult
3033
+ }));
3034
+ for (let item of items) {
3035
+ if (!matches.has(item)) {
3036
+ result.add(item);
3037
+ }
3038
+ }
3039
+ return [
3040
+ ...result
3041
+ ];
3042
+ };
3043
+ micromatch2.contains = (str, pattern, options) => {
3044
+ if (typeof str !== "string") {
3045
+ throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
3046
+ }
3047
+ if (Array.isArray(pattern)) {
3048
+ return pattern.some((p) => micromatch2.contains(str, p, options));
3049
+ }
3050
+ if (typeof pattern === "string") {
3051
+ if (isEmptyString(str) || isEmptyString(pattern)) {
3052
+ return false;
3053
+ }
3054
+ if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
3055
+ return true;
3056
+ }
3057
+ }
3058
+ return micromatch2.isMatch(str, pattern, {
3059
+ ...options,
3060
+ contains: true
3061
+ });
3062
+ };
3063
+ micromatch2.matchKeys = (obj, patterns, options) => {
3064
+ if (!utils.isObject(obj)) {
3065
+ throw new TypeError("Expected the first argument to be an object");
3066
+ }
3067
+ let keys = micromatch2(Object.keys(obj), patterns, options);
3068
+ let res = {};
3069
+ for (let key of keys) res[key] = obj[key];
3070
+ return res;
3071
+ };
3072
+ micromatch2.some = (list, patterns, options) => {
3073
+ let items = [].concat(list);
3074
+ for (let pattern of [].concat(patterns)) {
3075
+ let isMatch = picomatch(String(pattern), options);
3076
+ if (items.some((item) => isMatch(item))) {
3077
+ return true;
3078
+ }
3079
+ }
3080
+ return false;
3081
+ };
3082
+ micromatch2.every = (list, patterns, options) => {
3083
+ let items = [].concat(list);
3084
+ for (let pattern of [].concat(patterns)) {
3085
+ let isMatch = picomatch(String(pattern), options);
3086
+ if (!items.every((item) => isMatch(item))) {
3087
+ return false;
3088
+ }
3089
+ }
3090
+ return true;
3091
+ };
3092
+ micromatch2.all = (str, patterns, options) => {
3093
+ if (typeof str !== "string") {
3094
+ throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
3095
+ }
3096
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
3097
+ };
3098
+ micromatch2.capture = (glob, input, options) => {
3099
+ let posix = utils.isWindows(options);
3100
+ let regex = picomatch.makeRe(String(glob), {
3101
+ ...options,
3102
+ capture: true
3103
+ });
3104
+ let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
3105
+ if (match) {
3106
+ return match.slice(1).map((v) => v === void 0 ? "" : v);
3107
+ }
3108
+ };
3109
+ micromatch2.makeRe = (...args) => picomatch.makeRe(...args);
3110
+ micromatch2.scan = (...args) => picomatch.scan(...args);
3111
+ micromatch2.parse = (patterns, options) => {
3112
+ let res = [];
3113
+ for (let pattern of [].concat(patterns || [])) {
3114
+ for (let str of braces(String(pattern), options)) {
3115
+ res.push(picomatch.parse(str, options));
3116
+ }
3117
+ }
3118
+ return res;
3119
+ };
3120
+ micromatch2.braces = (pattern, options) => {
3121
+ if (typeof pattern !== "string") throw new TypeError("Expected a string");
3122
+ if (options && options.nobrace === true || !hasBraces(pattern)) {
3123
+ return [
3124
+ pattern
3125
+ ];
3126
+ }
3127
+ return braces(pattern, options);
3128
+ };
3129
+ micromatch2.braceExpand = (pattern, options) => {
3130
+ if (typeof pattern !== "string") throw new TypeError("Expected a string");
3131
+ return micromatch2.braces(pattern, {
3132
+ ...options,
3133
+ expand: true
3134
+ });
3135
+ };
3136
+ micromatch2.hasBraces = hasBraces;
3137
+ module.exports = micromatch2;
3138
+ }
3139
+ });
3140
+
3141
+ // ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_ef8b874d406bec4900e1fddc1ea375be/node_modules/@deepkit/type-compiler/dist/esm/src/config.js
3142
+ init_cjs_shims();
3143
+
3144
+ // ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_ef8b874d406bec4900e1fddc1ea375be/node_modules/@deepkit/type-compiler/dist/esm/src/debug.js
3145
+ init_cjs_shims();
3146
+ function isDebug(level = 1) {
3147
+ const expected = "deepkit" + (level > 1 ? "+".repeat(level - 1) : "");
3148
+ return "undefined" !== typeof process && "string" === typeof process.env.DEBUG && process.env.DEBUG.includes(expected);
3149
+ }
3150
+ __name(isDebug, "isDebug");
3151
+ function debug(...message) {
3152
+ if (isDebug(1)) {
3153
+ console.debug(...message);
3154
+ }
3155
+ }
3156
+ __name(debug, "debug");
3157
+ function debug2(...message) {
3158
+ if (isDebug(2)) {
3159
+ console.debug(...message);
3160
+ }
3161
+ }
3162
+ __name(debug2, "debug2");
3163
+
3164
+ // ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_ef8b874d406bec4900e1fddc1ea375be/node_modules/@deepkit/type-compiler/dist/esm/src/resolver.js
3165
+ init_cjs_shims();
3166
+ var import_micromatch = __toESM(require_micromatch());
3167
+ var { createSourceFile, resolveModuleName, isStringLiteral, JSDocParsingMode, ScriptTarget } = ts2__default.default;
3168
+ function patternMatch(path, patterns, base) {
3169
+ const include = patterns.filter((pattern) => pattern[0] !== "!");
3170
+ const exclude = patterns.filter((pattern) => pattern[0] === "!").map((pattern) => pattern.substring(1));
3171
+ return import_micromatch.default.isMatch(path, include, {
3172
+ ignore: exclude
3173
+ });
3174
+ }
3175
+ __name(patternMatch, "patternMatch");
3176
+ var Resolver = class {
3177
+ static {
3178
+ __name(this, "Resolver");
3179
+ }
3180
+ constructor(compilerOptions, host, sourceFiles) {
3181
+ this.compilerOptions = compilerOptions;
3182
+ this.host = host;
3183
+ this.sourceFiles = sourceFiles;
3184
+ }
3185
+ resolve(from, importOrExportNode) {
3186
+ const moduleSpecifier = importOrExportNode.moduleSpecifier;
3187
+ if (!moduleSpecifier) return;
3188
+ if (!isStringLiteral(moduleSpecifier)) return;
3189
+ return this.resolveSourceFile(from, moduleSpecifier);
3190
+ }
3191
+ resolveImpl(modulePath, sourceFile) {
3192
+ if (this.host.resolveModuleNameLiterals !== void 0) {
3193
+ const results = this.host.resolveModuleNameLiterals(
3194
+ [
3195
+ modulePath
3196
+ ],
3197
+ sourceFile.fileName,
3198
+ /*reusedNames*/
3199
+ void 0,
3200
+ this.compilerOptions,
3201
+ sourceFile,
3202
+ void 0
3203
+ );
3204
+ if (results[0]) return results[0].resolvedModule;
3205
+ return;
3206
+ }
3207
+ if (this.host.resolveModuleNames !== void 0) {
3208
+ return this.host.resolveModuleNames(
3209
+ [
3210
+ modulePath.text
3211
+ ],
3212
+ sourceFile.fileName,
3213
+ /*reusedNames*/
3214
+ void 0,
3215
+ /*redirectedReference*/
3216
+ void 0,
3217
+ this.compilerOptions
3218
+ )[0];
3219
+ }
3220
+ const result = resolveModuleName(modulePath.text, sourceFile.fileName, this.compilerOptions, this.host);
3221
+ return result.resolvedModule;
3222
+ }
3223
+ /**
3224
+ * Tries to resolve the .ts/d.ts file path for a given module path.
3225
+ * Scans relative paths. Looks into package.json "types" and "exports" (with new 4.7 support)
3226
+ *
3227
+ * @param sourceFile the SourceFile of the file that contains the import. modulePath is relative to that.
3228
+ * @param modulePath the x in 'from x'.
3229
+ */
3230
+ resolveSourceFile(sourceFile, modulePath) {
3231
+ const result = this.resolveImpl(modulePath, sourceFile);
3232
+ if (!result) return;
3233
+ if (!result.resolvedFileName.endsWith(".ts") && !result.resolvedFileName.endsWith(".tsx") && !result.resolvedFileName.endsWith(".d.ts")) {
3234
+ return;
3235
+ }
3236
+ const fileName = result.resolvedFileName;
3237
+ if (this.sourceFiles[fileName]) return this.sourceFiles[fileName];
3238
+ const source = this.host.readFile(result.resolvedFileName);
3239
+ if (!source) return;
3240
+ const moduleSourceFile = this.sourceFiles[fileName] = createSourceFile(fileName, source, {
3241
+ languageVersion: this.compilerOptions.target || ScriptTarget.ES2018,
3242
+ // JSDocParsingMode is not available in TS < 5.3
3243
+ jsDocParsingMode: JSDocParsingMode ? JSDocParsingMode.ParseNone : void 0
3244
+ }, true);
3245
+ this.sourceFiles[fileName] = moduleSourceFile;
3246
+ ts2__default.default.bindSourceFile(moduleSourceFile, this.compilerOptions);
3247
+ return moduleSourceFile;
3248
+ }
3249
+ };
3250
+
3251
+ // ../../node_modules/.pnpm/@deepkit+type-compiler@1.0.5_patch_hash=88e8267ac73f46799c551ae3696181dc1f272895f490f8c_ef8b874d406bec4900e1fddc1ea375be/node_modules/@deepkit/type-compiler/dist/esm/src/config.js
3252
+ var reflectionModes = [
3253
+ "default",
3254
+ "explicit",
3255
+ "never"
3256
+ ];
3257
+ function isObject(obj) {
3258
+ if (!obj) {
3259
+ return false;
3260
+ }
3261
+ return typeof obj === "object" && !Array.isArray(obj);
3262
+ }
3263
+ __name(isObject, "isObject");
3264
+ var defaultMergeStrategy = "merge";
3265
+ var reflectionLevel = [
3266
+ "minimal",
3267
+ "normal",
3268
+ "verbose"
3269
+ ];
3270
+ function readTsConfig(parseConfigHost, path$1) {
3271
+ const configFile = ts2__default.default.readConfigFile(path$1, (path2) => parseConfigHost.readFile(path2));
3272
+ if (configFile.error) {
3273
+ debug(`Failed to read tsconfig ${path$1}: ${configFile.error.messageText}`);
3274
+ return;
3275
+ }
3276
+ const parsed = ts2__default.default.parseJsonConfigFileContent(configFile.config, parseConfigHost, path.dirname(path$1));
3277
+ const ignoredErrors = [
3278
+ 18003
3279
+ // No inputs were found in config file.
3280
+ ];
3281
+ const softErrors = [
3282
+ 18e3
3283
+ // Circularity detected while resolving configuration
3284
+ ];
3285
+ const errors = parsed.errors.filter((v) => !ignoredErrors.includes(v.code));
3286
+ if (errors.length) {
3287
+ debug(`Failed to parse tsconfig ${path$1}: ${parsed.errors.map((v) => v.messageText).join(", ")}`);
3288
+ }
3289
+ const hardErrors = errors.filter((v) => !softErrors.includes(v.code));
3290
+ if (hardErrors.length) {
3291
+ return;
3292
+ }
3293
+ const json = fs.readFileSync(path$1, "utf8");
3294
+ const tsconfig = JSON.parse(json);
3295
+ return Object.assign(configFile.config, {
3296
+ compilerOptions: parsed.options,
3297
+ reflectionLevel: tsconfig.reflectionLevel ? String(tsconfig.reflectionLevel) : void 0
3298
+ });
3299
+ }
3300
+ __name(readTsConfig, "readTsConfig");
3301
+ function reflectionModeMatcher(config, filePath) {
3302
+ if (Array.isArray(config.exclude)) {
3303
+ if (patternMatch(filePath, config.exclude)) return "never";
3304
+ }
3305
+ if (Array.isArray(config.reflection)) {
3306
+ return patternMatch(filePath, config.reflection) ? "default" : "never";
3307
+ }
3308
+ if (config.reflection === "default" || config.reflection === "explicit") return config.reflection;
3309
+ return "never";
3310
+ }
3311
+ __name(reflectionModeMatcher, "reflectionModeMatcher");
3312
+ function ensureStringArray(value) {
3313
+ if (Array.isArray(value)) return value.map((v) => "" + v);
3314
+ if ("string" === typeof value) return [
3315
+ value
3316
+ ];
3317
+ return [];
3318
+ }
3319
+ __name(ensureStringArray, "ensureStringArray");
3320
+ function parseRawMode(mode) {
3321
+ if ("boolean" === typeof mode) return mode ? "default" : "never";
3322
+ if (mode === "default" || mode === "explicit") return mode;
3323
+ return ensureStringArray(mode);
3324
+ }
3325
+ __name(parseRawMode, "parseRawMode");
3326
+ function resolvePaths(baseDir, paths) {
3327
+ if (!paths || !Array.isArray(paths)) return;
3328
+ for (let i = 0; i < paths.length; i++) {
3329
+ if ("string" !== typeof paths[i]) continue;
3330
+ if (path.isAbsolute(paths[i])) continue;
3331
+ let path$1 = paths[i];
3332
+ let exclude = false;
3333
+ if (path$1.startsWith("!")) {
3334
+ exclude = true;
3335
+ path$1 = path$1.substring(1);
3336
+ }
3337
+ if (path$1.startsWith("./") || path$1.includes("/")) {
3338
+ path$1 = path.join(baseDir, path$1);
3339
+ }
3340
+ path$1 = path$1.replace(/\\/g, "/");
3341
+ if (exclude) path$1 = "!" + path$1;
3342
+ paths[i] = path$1;
3343
+ }
3344
+ }
3345
+ __name(resolvePaths, "resolvePaths");
3346
+ function appendPaths(strategy = defaultMergeStrategy, parent, existing) {
3347
+ if (strategy === "replace") {
3348
+ return [
3349
+ ...existing || parent
3350
+ ];
3351
+ }
3352
+ if (!existing) return [
3353
+ ...parent
3354
+ ];
3355
+ return [
3356
+ ...parent,
3357
+ ...existing
3358
+ ];
3359
+ }
3360
+ __name(appendPaths, "appendPaths");
3361
+ function applyConfigValues(existing, parent, baseDir) {
3362
+ const parentReflection = isObject(parent.deepkitCompilerOptions) ? parent.deepkitCompilerOptions?.reflection : parent.reflection;
3363
+ const parentReflectionLevel = parent.deepkitCompilerOptions?.reflectionLevel || parent.reflectionLevel || parent.compilerOptions?.reflectionLevel;
3364
+ if (isObject(parent.deepkitCompilerOptions) && "undefined" === typeof existing.mergeStrategy) {
3365
+ existing.mergeStrategy = parent.deepkitCompilerOptions.mergeStrategy;
3366
+ }
3367
+ if ("undefined" !== typeof parentReflection) {
3368
+ const next = parseRawMode(parentReflection);
3369
+ if ("undefined" === typeof existing.reflection) {
3370
+ existing.reflection = next;
3371
+ } else if ("string" === typeof existing.reflection) ; else if (Array.isArray(next) && Array.isArray(existing.reflection)) {
3372
+ existing.reflection = appendPaths(existing.mergeStrategy, next, existing.reflection);
3373
+ } else if ("string" === typeof next && Array.isArray(existing.reflection)) ;
3374
+ }
3375
+ if ("undefined" !== typeof parentReflectionLevel) {
3376
+ if ("undefined" === typeof existing.reflectionLevel) {
3377
+ existing.reflectionLevel = parentReflectionLevel;
3378
+ }
3379
+ }
3380
+ if (isObject(parent.deepkitCompilerOptions)) {
3381
+ if (`undefined` !== typeof parent.deepkitCompilerOptions.exclude) {
3382
+ const next = ensureStringArray(parent.deepkitCompilerOptions.exclude);
3383
+ existing.exclude = appendPaths(existing.mergeStrategy, next, existing.exclude);
3384
+ }
3385
+ }
3386
+ resolvePaths(baseDir, existing.reflection);
3387
+ resolvePaths(baseDir, existing.exclude);
3388
+ if (parent.compilerOptions) {
3389
+ if (Object.keys(existing.compilerOptions).length === 0) {
3390
+ Object.assign(existing.compilerOptions, parent.compilerOptions);
3391
+ }
3392
+ }
3393
+ existing.extends = parent.extends;
3394
+ }
3395
+ __name(applyConfigValues, "applyConfigValues");
3396
+ var defaultExcluded = [
3397
+ "lib.dom*.d.ts",
3398
+ "*typedarrays.d.ts",
3399
+ "lib.webworker*.d.ts",
3400
+ "lib.decorator*.d.ts",
3401
+ "lib.es2015.proxy.d.ts",
3402
+ "lib.es2020.sharedmemory.d.ts",
3403
+ "lib.es2015.core.d.ts"
3404
+ ];
3405
+ function getConfigResolver(cache, host, compilerOptions, sourceFile, tsConfigPath = "") {
3406
+ let config = {
3407
+ // We use the parameter `compilerOptions` only for compilerOptions.configFilePath.
3408
+ // We load the compilerOptions manually since transformers don't get the full picture
3409
+ // (path aliases are missing for example).
3410
+ // It's important to load compilerOptions manually if there is compilerOptions.configFilePath
3411
+ // since not all build tools provide the full compilerOptions.
3412
+ compilerOptions: {}
3413
+ };
3414
+ tsConfigPath = tsConfigPath || ("string" === typeof compilerOptions.configFilePath ? compilerOptions.configFilePath : "");
3415
+ if (tsConfigPath) {
3416
+ if (cache[tsConfigPath]) {
3417
+ return cache[tsConfigPath];
3418
+ }
3419
+ const configFile = readTsConfig(host, tsConfigPath);
3420
+ if (configFile) applyConfigValues(config, configFile, path.dirname(tsConfigPath));
3421
+ } else {
3422
+ if (!tsConfigPath && sourceFile) {
3423
+ const baseDir = path.dirname(sourceFile.fileName);
3424
+ const configPath = ts2__default.default.findConfigFile(baseDir, (path$1) => {
3425
+ path$1 = path.isAbsolute(path$1) ? path$1 : path.join(baseDir, path$1);
3426
+ return host.fileExists(path$1);
3427
+ });
3428
+ debug2(`No tsConfigPath|compilerOptions.configFilePath provided. Manually searching for tsconfig.json in ${baseDir} returned ${configPath}`);
3429
+ if (configPath) {
3430
+ tsConfigPath = path.isAbsolute(configPath) ? configPath : path.join(baseDir, configPath);
3431
+ }
3432
+ }
3433
+ if (tsConfigPath) {
3434
+ if (cache[tsConfigPath]) return cache[tsConfigPath];
3435
+ const configFile = readTsConfig(host, tsConfigPath);
3436
+ if (configFile) applyConfigValues(config, configFile, path.dirname(tsConfigPath));
3437
+ }
3438
+ }
3439
+ if (tsConfigPath) {
3440
+ let basePath = path.dirname(tsConfigPath);
3441
+ let currentConfig = config;
3442
+ const seen = /* @__PURE__ */ new Set();
3443
+ seen.add(tsConfigPath);
3444
+ while (currentConfig.extends) {
3445
+ const path$1 = path.join(basePath, currentConfig.extends);
3446
+ if (seen.has(path$1)) break;
3447
+ seen.add(path$1);
3448
+ const nextConfig = ts2__default.default.readConfigFile(path$1, (path2) => host.readFile(path2));
3449
+ if (!nextConfig) break;
3450
+ basePath = path.dirname(path$1);
3451
+ applyConfigValues(currentConfig, nextConfig.config, basePath);
3452
+ }
3453
+ } else {
3454
+ throw new Error(`No tsconfig found for ${sourceFile?.fileName}, that is weird. Either provide a tsconfig or compilerOptions.configFilePath`);
3455
+ }
3456
+ config.exclude = config.exclude ? [
3457
+ ...defaultExcluded,
3458
+ ...config.exclude
3459
+ ] : [
3460
+ ...defaultExcluded
3461
+ ];
3462
+ config.compilerOptions.configFilePath = tsConfigPath;
3463
+ const resolvedConfig = {
3464
+ path: tsConfigPath,
3465
+ // we want to maintain options passed from tsc API (transpile, Program)
3466
+ compilerOptions: Object.assign(config.compilerOptions, compilerOptions),
3467
+ exclude: config.exclude,
3468
+ reflection: config.reflection,
3469
+ reflectionLevel: config.reflectionLevel || (config.compilerOptions?.reflectionLevel ? String(config.compilerOptions?.reflectionLevel) : void 0) || "normal",
3470
+ mergeStrategy: config.mergeStrategy || defaultMergeStrategy
3471
+ };
3472
+ if (isDebug()) {
3473
+ debug(`Found config ${resolvedConfig.path}:
3474
+ reflection:`, resolvedConfig.reflection, `
3475
+ exclude:`, resolvedConfig.exclude, `
3476
+ paths:`, resolvedConfig.compilerOptions.paths);
3477
+ }
3478
+ const match = /* @__PURE__ */ __name((path) => {
3479
+ const mode = reflectionModeMatcher(config, path);
3480
+ return {
3481
+ mode,
3482
+ tsConfigPath,
3483
+ level: resolvedConfig.reflectionLevel
3484
+ };
3485
+ }, "match");
3486
+ return cache[tsConfigPath] = {
3487
+ config: resolvedConfig,
3488
+ match
3489
+ };
3490
+ }
3491
+ __name(getConfigResolver, "getConfigResolver");
3492
+ /*! Bundled license information:
3493
+
3494
+ is-number/index.js:
3495
+ (*!
3496
+ * is-number <https://github.com/jonschlinkert/is-number>
3497
+ *
3498
+ * Copyright (c) 2014-present, Jon Schlinkert.
3499
+ * Released under the MIT License.
3500
+ *)
3501
+
3502
+ to-regex-range/index.js:
3503
+ (*!
3504
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
3505
+ *
3506
+ * Copyright (c) 2015-present, Jon Schlinkert.
3507
+ * Released under the MIT License.
3508
+ *)
3509
+
3510
+ fill-range/index.js:
3511
+ (*!
3512
+ * fill-range <https://github.com/jonschlinkert/fill-range>
3513
+ *
3514
+ * Copyright (c) 2014-present, Jon Schlinkert.
3515
+ * Licensed under the MIT License.
3516
+ *)
3517
+ */
3518
+
3519
+ exports.Resolver = Resolver;
3520
+ exports.__name = __name;
3521
+ exports.__require = __require;
3522
+ exports.debug = debug;
3523
+ exports.debug2 = debug2;
3524
+ exports.defaultExcluded = defaultExcluded;
3525
+ exports.getConfigResolver = getConfigResolver;
3526
+ exports.init_cjs_shims = init_cjs_shims;
3527
+ exports.isObject = isObject;
3528
+ exports.parseRawMode = parseRawMode;
3529
+ exports.reflectionLevel = reflectionLevel;
3530
+ exports.reflectionModeMatcher = reflectionModeMatcher;
3531
+ exports.reflectionModes = reflectionModes;