UNPKG

501 kBJavaScriptView Raw
1"use strict";
2var __getOwnPropNames = Object.getOwnPropertyNames;
3var __commonJS = (cb, mod) => function __require() {
4 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
5};
6
7// node_modules/core-js/internals/global.js
8var require_global = __commonJS({
9 "node_modules/core-js/internals/global.js"(exports2, module2) {
10 var check = function(it) {
11 return it && it.Math == Math && it;
12 };
13 module2.exports = check(typeof globalThis == "object" && globalThis) || check(typeof window == "object" && window) || check(typeof self == "object" && self) || check(typeof global == "object" && global) || function() {
14 return this;
15 }() || Function("return this")();
16 }
17});
18
19// node_modules/core-js/internals/fails.js
20var require_fails = __commonJS({
21 "node_modules/core-js/internals/fails.js"(exports2, module2) {
22 module2.exports = function(exec) {
23 try {
24 return !!exec();
25 } catch (error) {
26 return true;
27 }
28 };
29 }
30});
31
32// node_modules/core-js/internals/descriptors.js
33var require_descriptors = __commonJS({
34 "node_modules/core-js/internals/descriptors.js"(exports2, module2) {
35 var fails = require_fails();
36 module2.exports = !fails(function() {
37 return Object.defineProperty({}, 1, { get: function() {
38 return 7;
39 } })[1] != 7;
40 });
41 }
42});
43
44// node_modules/core-js/internals/function-bind-native.js
45var require_function_bind_native = __commonJS({
46 "node_modules/core-js/internals/function-bind-native.js"(exports2, module2) {
47 var fails = require_fails();
48 module2.exports = !fails(function() {
49 var test = function() {
50 }.bind();
51 return typeof test != "function" || test.hasOwnProperty("prototype");
52 });
53 }
54});
55
56// node_modules/core-js/internals/function-call.js
57var require_function_call = __commonJS({
58 "node_modules/core-js/internals/function-call.js"(exports2, module2) {
59 var NATIVE_BIND = require_function_bind_native();
60 var call = Function.prototype.call;
61 module2.exports = NATIVE_BIND ? call.bind(call) : function() {
62 return call.apply(call, arguments);
63 };
64 }
65});
66
67// node_modules/core-js/internals/object-property-is-enumerable.js
68var require_object_property_is_enumerable = __commonJS({
69 "node_modules/core-js/internals/object-property-is-enumerable.js"(exports2) {
70 "use strict";
71 var $propertyIsEnumerable = {}.propertyIsEnumerable;
72 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
73 var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
74 exports2.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
75 var descriptor = getOwnPropertyDescriptor(this, V);
76 return !!descriptor && descriptor.enumerable;
77 } : $propertyIsEnumerable;
78 }
79});
80
81// node_modules/core-js/internals/create-property-descriptor.js
82var require_create_property_descriptor = __commonJS({
83 "node_modules/core-js/internals/create-property-descriptor.js"(exports2, module2) {
84 module2.exports = function(bitmap, value) {
85 return {
86 enumerable: !(bitmap & 1),
87 configurable: !(bitmap & 2),
88 writable: !(bitmap & 4),
89 value
90 };
91 };
92 }
93});
94
95// node_modules/core-js/internals/function-uncurry-this.js
96var require_function_uncurry_this = __commonJS({
97 "node_modules/core-js/internals/function-uncurry-this.js"(exports2, module2) {
98 var NATIVE_BIND = require_function_bind_native();
99 var FunctionPrototype = Function.prototype;
100 var bind = FunctionPrototype.bind;
101 var call = FunctionPrototype.call;
102 var uncurryThis = NATIVE_BIND && bind.bind(call, call);
103 module2.exports = NATIVE_BIND ? function(fn) {
104 return fn && uncurryThis(fn);
105 } : function(fn) {
106 return fn && function() {
107 return call.apply(fn, arguments);
108 };
109 };
110 }
111});
112
113// node_modules/core-js/internals/classof-raw.js
114var require_classof_raw = __commonJS({
115 "node_modules/core-js/internals/classof-raw.js"(exports2, module2) {
116 var uncurryThis = require_function_uncurry_this();
117 var toString = uncurryThis({}.toString);
118 var stringSlice = uncurryThis("".slice);
119 module2.exports = function(it) {
120 return stringSlice(toString(it), 8, -1);
121 };
122 }
123});
124
125// node_modules/core-js/internals/indexed-object.js
126var require_indexed_object = __commonJS({
127 "node_modules/core-js/internals/indexed-object.js"(exports2, module2) {
128 var global2 = require_global();
129 var uncurryThis = require_function_uncurry_this();
130 var fails = require_fails();
131 var classof = require_classof_raw();
132 var Object2 = global2.Object;
133 var split = uncurryThis("".split);
134 module2.exports = fails(function() {
135 return !Object2("z").propertyIsEnumerable(0);
136 }) ? function(it) {
137 return classof(it) == "String" ? split(it, "") : Object2(it);
138 } : Object2;
139 }
140});
141
142// node_modules/core-js/internals/require-object-coercible.js
143var require_require_object_coercible = __commonJS({
144 "node_modules/core-js/internals/require-object-coercible.js"(exports2, module2) {
145 var global2 = require_global();
146 var TypeError2 = global2.TypeError;
147 module2.exports = function(it) {
148 if (it == void 0)
149 throw TypeError2("Can't call method on " + it);
150 return it;
151 };
152 }
153});
154
155// node_modules/core-js/internals/to-indexed-object.js
156var require_to_indexed_object = __commonJS({
157 "node_modules/core-js/internals/to-indexed-object.js"(exports2, module2) {
158 var IndexedObject = require_indexed_object();
159 var requireObjectCoercible = require_require_object_coercible();
160 module2.exports = function(it) {
161 return IndexedObject(requireObjectCoercible(it));
162 };
163 }
164});
165
166// node_modules/core-js/internals/is-callable.js
167var require_is_callable = __commonJS({
168 "node_modules/core-js/internals/is-callable.js"(exports2, module2) {
169 module2.exports = function(argument) {
170 return typeof argument == "function";
171 };
172 }
173});
174
175// node_modules/core-js/internals/is-object.js
176var require_is_object = __commonJS({
177 "node_modules/core-js/internals/is-object.js"(exports2, module2) {
178 var isCallable = require_is_callable();
179 module2.exports = function(it) {
180 return typeof it == "object" ? it !== null : isCallable(it);
181 };
182 }
183});
184
185// node_modules/core-js/internals/get-built-in.js
186var require_get_built_in = __commonJS({
187 "node_modules/core-js/internals/get-built-in.js"(exports2, module2) {
188 var global2 = require_global();
189 var isCallable = require_is_callable();
190 var aFunction = function(argument) {
191 return isCallable(argument) ? argument : void 0;
192 };
193 module2.exports = function(namespace, method) {
194 return arguments.length < 2 ? aFunction(global2[namespace]) : global2[namespace] && global2[namespace][method];
195 };
196 }
197});
198
199// node_modules/core-js/internals/object-is-prototype-of.js
200var require_object_is_prototype_of = __commonJS({
201 "node_modules/core-js/internals/object-is-prototype-of.js"(exports2, module2) {
202 var uncurryThis = require_function_uncurry_this();
203 module2.exports = uncurryThis({}.isPrototypeOf);
204 }
205});
206
207// node_modules/core-js/internals/engine-user-agent.js
208var require_engine_user_agent = __commonJS({
209 "node_modules/core-js/internals/engine-user-agent.js"(exports2, module2) {
210 var getBuiltIn = require_get_built_in();
211 module2.exports = getBuiltIn("navigator", "userAgent") || "";
212 }
213});
214
215// node_modules/core-js/internals/engine-v8-version.js
216var require_engine_v8_version = __commonJS({
217 "node_modules/core-js/internals/engine-v8-version.js"(exports2, module2) {
218 var global2 = require_global();
219 var userAgent = require_engine_user_agent();
220 var process2 = global2.process;
221 var Deno = global2.Deno;
222 var versions = process2 && process2.versions || Deno && Deno.version;
223 var v8 = versions && versions.v8;
224 var match;
225 var version;
226 if (v8) {
227 match = v8.split(".");
228 version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
229 }
230 if (!version && userAgent) {
231 match = userAgent.match(/Edge\/(\d+)/);
232 if (!match || match[1] >= 74) {
233 match = userAgent.match(/Chrome\/(\d+)/);
234 if (match)
235 version = +match[1];
236 }
237 }
238 module2.exports = version;
239 }
240});
241
242// node_modules/core-js/internals/native-symbol.js
243var require_native_symbol = __commonJS({
244 "node_modules/core-js/internals/native-symbol.js"(exports2, module2) {
245 var V8_VERSION = require_engine_v8_version();
246 var fails = require_fails();
247 module2.exports = !!Object.getOwnPropertySymbols && !fails(function() {
248 var symbol = Symbol();
249 return !String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION && V8_VERSION < 41;
250 });
251 }
252});
253
254// node_modules/core-js/internals/use-symbol-as-uid.js
255var require_use_symbol_as_uid = __commonJS({
256 "node_modules/core-js/internals/use-symbol-as-uid.js"(exports2, module2) {
257 var NATIVE_SYMBOL = require_native_symbol();
258 module2.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol";
259 }
260});
261
262// node_modules/core-js/internals/is-symbol.js
263var require_is_symbol = __commonJS({
264 "node_modules/core-js/internals/is-symbol.js"(exports2, module2) {
265 var global2 = require_global();
266 var getBuiltIn = require_get_built_in();
267 var isCallable = require_is_callable();
268 var isPrototypeOf = require_object_is_prototype_of();
269 var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
270 var Object2 = global2.Object;
271 module2.exports = USE_SYMBOL_AS_UID ? function(it) {
272 return typeof it == "symbol";
273 } : function(it) {
274 var $Symbol = getBuiltIn("Symbol");
275 return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object2(it));
276 };
277 }
278});
279
280// node_modules/core-js/internals/try-to-string.js
281var require_try_to_string = __commonJS({
282 "node_modules/core-js/internals/try-to-string.js"(exports2, module2) {
283 var global2 = require_global();
284 var String2 = global2.String;
285 module2.exports = function(argument) {
286 try {
287 return String2(argument);
288 } catch (error) {
289 return "Object";
290 }
291 };
292 }
293});
294
295// node_modules/core-js/internals/a-callable.js
296var require_a_callable = __commonJS({
297 "node_modules/core-js/internals/a-callable.js"(exports2, module2) {
298 var global2 = require_global();
299 var isCallable = require_is_callable();
300 var tryToString = require_try_to_string();
301 var TypeError2 = global2.TypeError;
302 module2.exports = function(argument) {
303 if (isCallable(argument))
304 return argument;
305 throw TypeError2(tryToString(argument) + " is not a function");
306 };
307 }
308});
309
310// node_modules/core-js/internals/get-method.js
311var require_get_method = __commonJS({
312 "node_modules/core-js/internals/get-method.js"(exports2, module2) {
313 var aCallable = require_a_callable();
314 module2.exports = function(V, P) {
315 var func = V[P];
316 return func == null ? void 0 : aCallable(func);
317 };
318 }
319});
320
321// node_modules/core-js/internals/ordinary-to-primitive.js
322var require_ordinary_to_primitive = __commonJS({
323 "node_modules/core-js/internals/ordinary-to-primitive.js"(exports2, module2) {
324 var global2 = require_global();
325 var call = require_function_call();
326 var isCallable = require_is_callable();
327 var isObject = require_is_object();
328 var TypeError2 = global2.TypeError;
329 module2.exports = function(input, pref) {
330 var fn, val;
331 if (pref === "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
332 return val;
333 if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input)))
334 return val;
335 if (pref !== "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
336 return val;
337 throw TypeError2("Can't convert object to primitive value");
338 };
339 }
340});
341
342// node_modules/core-js/internals/is-pure.js
343var require_is_pure = __commonJS({
344 "node_modules/core-js/internals/is-pure.js"(exports2, module2) {
345 module2.exports = false;
346 }
347});
348
349// node_modules/core-js/internals/set-global.js
350var require_set_global = __commonJS({
351 "node_modules/core-js/internals/set-global.js"(exports2, module2) {
352 var global2 = require_global();
353 var defineProperty = Object.defineProperty;
354 module2.exports = function(key, value) {
355 try {
356 defineProperty(global2, key, { value, configurable: true, writable: true });
357 } catch (error) {
358 global2[key] = value;
359 }
360 return value;
361 };
362 }
363});
364
365// node_modules/core-js/internals/shared-store.js
366var require_shared_store = __commonJS({
367 "node_modules/core-js/internals/shared-store.js"(exports2, module2) {
368 var global2 = require_global();
369 var setGlobal = require_set_global();
370 var SHARED = "__core-js_shared__";
371 var store = global2[SHARED] || setGlobal(SHARED, {});
372 module2.exports = store;
373 }
374});
375
376// node_modules/core-js/internals/shared.js
377var require_shared = __commonJS({
378 "node_modules/core-js/internals/shared.js"(exports2, module2) {
379 var IS_PURE = require_is_pure();
380 var store = require_shared_store();
381 (module2.exports = function(key, value) {
382 return store[key] || (store[key] = value !== void 0 ? value : {});
383 })("versions", []).push({
384 version: "3.22.2",
385 mode: IS_PURE ? "pure" : "global",
386 copyright: "\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",
387 license: "https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE",
388 source: "https://github.com/zloirock/core-js"
389 });
390 }
391});
392
393// node_modules/core-js/internals/to-object.js
394var require_to_object = __commonJS({
395 "node_modules/core-js/internals/to-object.js"(exports2, module2) {
396 var global2 = require_global();
397 var requireObjectCoercible = require_require_object_coercible();
398 var Object2 = global2.Object;
399 module2.exports = function(argument) {
400 return Object2(requireObjectCoercible(argument));
401 };
402 }
403});
404
405// node_modules/core-js/internals/has-own-property.js
406var require_has_own_property = __commonJS({
407 "node_modules/core-js/internals/has-own-property.js"(exports2, module2) {
408 var uncurryThis = require_function_uncurry_this();
409 var toObject = require_to_object();
410 var hasOwnProperty = uncurryThis({}.hasOwnProperty);
411 module2.exports = Object.hasOwn || function hasOwn(it, key) {
412 return hasOwnProperty(toObject(it), key);
413 };
414 }
415});
416
417// node_modules/core-js/internals/uid.js
418var require_uid = __commonJS({
419 "node_modules/core-js/internals/uid.js"(exports2, module2) {
420 var uncurryThis = require_function_uncurry_this();
421 var id = 0;
422 var postfix = Math.random();
423 var toString = uncurryThis(1 .toString);
424 module2.exports = function(key) {
425 return "Symbol(" + (key === void 0 ? "" : key) + ")_" + toString(++id + postfix, 36);
426 };
427 }
428});
429
430// node_modules/core-js/internals/well-known-symbol.js
431var require_well_known_symbol = __commonJS({
432 "node_modules/core-js/internals/well-known-symbol.js"(exports2, module2) {
433 var global2 = require_global();
434 var shared = require_shared();
435 var hasOwn = require_has_own_property();
436 var uid = require_uid();
437 var NATIVE_SYMBOL = require_native_symbol();
438 var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
439 var WellKnownSymbolsStore = shared("wks");
440 var Symbol2 = global2.Symbol;
441 var symbolFor = Symbol2 && Symbol2["for"];
442 var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
443 module2.exports = function(name) {
444 if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == "string")) {
445 var description = "Symbol." + name;
446 if (NATIVE_SYMBOL && hasOwn(Symbol2, name)) {
447 WellKnownSymbolsStore[name] = Symbol2[name];
448 } else if (USE_SYMBOL_AS_UID && symbolFor) {
449 WellKnownSymbolsStore[name] = symbolFor(description);
450 } else {
451 WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
452 }
453 }
454 return WellKnownSymbolsStore[name];
455 };
456 }
457});
458
459// node_modules/core-js/internals/to-primitive.js
460var require_to_primitive = __commonJS({
461 "node_modules/core-js/internals/to-primitive.js"(exports2, module2) {
462 var global2 = require_global();
463 var call = require_function_call();
464 var isObject = require_is_object();
465 var isSymbol = require_is_symbol();
466 var getMethod = require_get_method();
467 var ordinaryToPrimitive = require_ordinary_to_primitive();
468 var wellKnownSymbol = require_well_known_symbol();
469 var TypeError2 = global2.TypeError;
470 var TO_PRIMITIVE = wellKnownSymbol("toPrimitive");
471 module2.exports = function(input, pref) {
472 if (!isObject(input) || isSymbol(input))
473 return input;
474 var exoticToPrim = getMethod(input, TO_PRIMITIVE);
475 var result;
476 if (exoticToPrim) {
477 if (pref === void 0)
478 pref = "default";
479 result = call(exoticToPrim, input, pref);
480 if (!isObject(result) || isSymbol(result))
481 return result;
482 throw TypeError2("Can't convert object to primitive value");
483 }
484 if (pref === void 0)
485 pref = "number";
486 return ordinaryToPrimitive(input, pref);
487 };
488 }
489});
490
491// node_modules/core-js/internals/to-property-key.js
492var require_to_property_key = __commonJS({
493 "node_modules/core-js/internals/to-property-key.js"(exports2, module2) {
494 var toPrimitive = require_to_primitive();
495 var isSymbol = require_is_symbol();
496 module2.exports = function(argument) {
497 var key = toPrimitive(argument, "string");
498 return isSymbol(key) ? key : key + "";
499 };
500 }
501});
502
503// node_modules/core-js/internals/document-create-element.js
504var require_document_create_element = __commonJS({
505 "node_modules/core-js/internals/document-create-element.js"(exports2, module2) {
506 var global2 = require_global();
507 var isObject = require_is_object();
508 var document = global2.document;
509 var EXISTS = isObject(document) && isObject(document.createElement);
510 module2.exports = function(it) {
511 return EXISTS ? document.createElement(it) : {};
512 };
513 }
514});
515
516// node_modules/core-js/internals/ie8-dom-define.js
517var require_ie8_dom_define = __commonJS({
518 "node_modules/core-js/internals/ie8-dom-define.js"(exports2, module2) {
519 var DESCRIPTORS = require_descriptors();
520 var fails = require_fails();
521 var createElement = require_document_create_element();
522 module2.exports = !DESCRIPTORS && !fails(function() {
523 return Object.defineProperty(createElement("div"), "a", {
524 get: function() {
525 return 7;
526 }
527 }).a != 7;
528 });
529 }
530});
531
532// node_modules/core-js/internals/object-get-own-property-descriptor.js
533var require_object_get_own_property_descriptor = __commonJS({
534 "node_modules/core-js/internals/object-get-own-property-descriptor.js"(exports2) {
535 var DESCRIPTORS = require_descriptors();
536 var call = require_function_call();
537 var propertyIsEnumerableModule = require_object_property_is_enumerable();
538 var createPropertyDescriptor = require_create_property_descriptor();
539 var toIndexedObject = require_to_indexed_object();
540 var toPropertyKey = require_to_property_key();
541 var hasOwn = require_has_own_property();
542 var IE8_DOM_DEFINE = require_ie8_dom_define();
543 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
544 exports2.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
545 O = toIndexedObject(O);
546 P = toPropertyKey(P);
547 if (IE8_DOM_DEFINE)
548 try {
549 return $getOwnPropertyDescriptor(O, P);
550 } catch (error) {
551 }
552 if (hasOwn(O, P))
553 return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
554 };
555 }
556});
557
558// node_modules/core-js/internals/v8-prototype-define-bug.js
559var require_v8_prototype_define_bug = __commonJS({
560 "node_modules/core-js/internals/v8-prototype-define-bug.js"(exports2, module2) {
561 var DESCRIPTORS = require_descriptors();
562 var fails = require_fails();
563 module2.exports = DESCRIPTORS && fails(function() {
564 return Object.defineProperty(function() {
565 }, "prototype", {
566 value: 42,
567 writable: false
568 }).prototype != 42;
569 });
570 }
571});
572
573// node_modules/core-js/internals/an-object.js
574var require_an_object = __commonJS({
575 "node_modules/core-js/internals/an-object.js"(exports2, module2) {
576 var global2 = require_global();
577 var isObject = require_is_object();
578 var String2 = global2.String;
579 var TypeError2 = global2.TypeError;
580 module2.exports = function(argument) {
581 if (isObject(argument))
582 return argument;
583 throw TypeError2(String2(argument) + " is not an object");
584 };
585 }
586});
587
588// node_modules/core-js/internals/object-define-property.js
589var require_object_define_property = __commonJS({
590 "node_modules/core-js/internals/object-define-property.js"(exports2) {
591 var global2 = require_global();
592 var DESCRIPTORS = require_descriptors();
593 var IE8_DOM_DEFINE = require_ie8_dom_define();
594 var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
595 var anObject = require_an_object();
596 var toPropertyKey = require_to_property_key();
597 var TypeError2 = global2.TypeError;
598 var $defineProperty = Object.defineProperty;
599 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
600 var ENUMERABLE = "enumerable";
601 var CONFIGURABLE = "configurable";
602 var WRITABLE = "writable";
603 exports2.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
604 anObject(O);
605 P = toPropertyKey(P);
606 anObject(Attributes);
607 if (typeof O === "function" && P === "prototype" && "value" in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
608 var current = $getOwnPropertyDescriptor(O, P);
609 if (current && current[WRITABLE]) {
610 O[P] = Attributes.value;
611 Attributes = {
612 configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
613 enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
614 writable: false
615 };
616 }
617 }
618 return $defineProperty(O, P, Attributes);
619 } : $defineProperty : function defineProperty(O, P, Attributes) {
620 anObject(O);
621 P = toPropertyKey(P);
622 anObject(Attributes);
623 if (IE8_DOM_DEFINE)
624 try {
625 return $defineProperty(O, P, Attributes);
626 } catch (error) {
627 }
628 if ("get" in Attributes || "set" in Attributes)
629 throw TypeError2("Accessors not supported");
630 if ("value" in Attributes)
631 O[P] = Attributes.value;
632 return O;
633 };
634 }
635});
636
637// node_modules/core-js/internals/create-non-enumerable-property.js
638var require_create_non_enumerable_property = __commonJS({
639 "node_modules/core-js/internals/create-non-enumerable-property.js"(exports2, module2) {
640 var DESCRIPTORS = require_descriptors();
641 var definePropertyModule = require_object_define_property();
642 var createPropertyDescriptor = require_create_property_descriptor();
643 module2.exports = DESCRIPTORS ? function(object, key, value) {
644 return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
645 } : function(object, key, value) {
646 object[key] = value;
647 return object;
648 };
649 }
650});
651
652// node_modules/core-js/internals/inspect-source.js
653var require_inspect_source = __commonJS({
654 "node_modules/core-js/internals/inspect-source.js"(exports2, module2) {
655 var uncurryThis = require_function_uncurry_this();
656 var isCallable = require_is_callable();
657 var store = require_shared_store();
658 var functionToString = uncurryThis(Function.toString);
659 if (!isCallable(store.inspectSource)) {
660 store.inspectSource = function(it) {
661 return functionToString(it);
662 };
663 }
664 module2.exports = store.inspectSource;
665 }
666});
667
668// node_modules/core-js/internals/native-weak-map.js
669var require_native_weak_map = __commonJS({
670 "node_modules/core-js/internals/native-weak-map.js"(exports2, module2) {
671 var global2 = require_global();
672 var isCallable = require_is_callable();
673 var inspectSource = require_inspect_source();
674 var WeakMap2 = global2.WeakMap;
675 module2.exports = isCallable(WeakMap2) && /native code/.test(inspectSource(WeakMap2));
676 }
677});
678
679// node_modules/core-js/internals/shared-key.js
680var require_shared_key = __commonJS({
681 "node_modules/core-js/internals/shared-key.js"(exports2, module2) {
682 var shared = require_shared();
683 var uid = require_uid();
684 var keys = shared("keys");
685 module2.exports = function(key) {
686 return keys[key] || (keys[key] = uid(key));
687 };
688 }
689});
690
691// node_modules/core-js/internals/hidden-keys.js
692var require_hidden_keys = __commonJS({
693 "node_modules/core-js/internals/hidden-keys.js"(exports2, module2) {
694 module2.exports = {};
695 }
696});
697
698// node_modules/core-js/internals/internal-state.js
699var require_internal_state = __commonJS({
700 "node_modules/core-js/internals/internal-state.js"(exports2, module2) {
701 var NATIVE_WEAK_MAP = require_native_weak_map();
702 var global2 = require_global();
703 var uncurryThis = require_function_uncurry_this();
704 var isObject = require_is_object();
705 var createNonEnumerableProperty = require_create_non_enumerable_property();
706 var hasOwn = require_has_own_property();
707 var shared = require_shared_store();
708 var sharedKey = require_shared_key();
709 var hiddenKeys = require_hidden_keys();
710 var OBJECT_ALREADY_INITIALIZED = "Object already initialized";
711 var TypeError2 = global2.TypeError;
712 var WeakMap2 = global2.WeakMap;
713 var set;
714 var get;
715 var has;
716 var enforce = function(it) {
717 return has(it) ? get(it) : set(it, {});
718 };
719 var getterFor = function(TYPE) {
720 return function(it) {
721 var state;
722 if (!isObject(it) || (state = get(it)).type !== TYPE) {
723 throw TypeError2("Incompatible receiver, " + TYPE + " required");
724 }
725 return state;
726 };
727 };
728 if (NATIVE_WEAK_MAP || shared.state) {
729 store = shared.state || (shared.state = new WeakMap2());
730 wmget = uncurryThis(store.get);
731 wmhas = uncurryThis(store.has);
732 wmset = uncurryThis(store.set);
733 set = function(it, metadata) {
734 if (wmhas(store, it))
735 throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
736 metadata.facade = it;
737 wmset(store, it, metadata);
738 return metadata;
739 };
740 get = function(it) {
741 return wmget(store, it) || {};
742 };
743 has = function(it) {
744 return wmhas(store, it);
745 };
746 } else {
747 STATE = sharedKey("state");
748 hiddenKeys[STATE] = true;
749 set = function(it, metadata) {
750 if (hasOwn(it, STATE))
751 throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
752 metadata.facade = it;
753 createNonEnumerableProperty(it, STATE, metadata);
754 return metadata;
755 };
756 get = function(it) {
757 return hasOwn(it, STATE) ? it[STATE] : {};
758 };
759 has = function(it) {
760 return hasOwn(it, STATE);
761 };
762 }
763 var store;
764 var wmget;
765 var wmhas;
766 var wmset;
767 var STATE;
768 module2.exports = {
769 set,
770 get,
771 has,
772 enforce,
773 getterFor
774 };
775 }
776});
777
778// node_modules/core-js/internals/function-name.js
779var require_function_name = __commonJS({
780 "node_modules/core-js/internals/function-name.js"(exports2, module2) {
781 var DESCRIPTORS = require_descriptors();
782 var hasOwn = require_has_own_property();
783 var FunctionPrototype = Function.prototype;
784 var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
785 var EXISTS = hasOwn(FunctionPrototype, "name");
786 var PROPER = EXISTS && function something() {
787 }.name === "something";
788 var CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, "name").configurable);
789 module2.exports = {
790 EXISTS,
791 PROPER,
792 CONFIGURABLE
793 };
794 }
795});
796
797// node_modules/core-js/internals/redefine.js
798var require_redefine = __commonJS({
799 "node_modules/core-js/internals/redefine.js"(exports2, module2) {
800 var global2 = require_global();
801 var isCallable = require_is_callable();
802 var hasOwn = require_has_own_property();
803 var createNonEnumerableProperty = require_create_non_enumerable_property();
804 var setGlobal = require_set_global();
805 var inspectSource = require_inspect_source();
806 var InternalStateModule = require_internal_state();
807 var CONFIGURABLE_FUNCTION_NAME = require_function_name().CONFIGURABLE;
808 var getInternalState = InternalStateModule.get;
809 var enforceInternalState = InternalStateModule.enforce;
810 var TEMPLATE = String(String).split("String");
811 (module2.exports = function(O, key, value, options) {
812 var unsafe = options ? !!options.unsafe : false;
813 var simple = options ? !!options.enumerable : false;
814 var noTargetGet = options ? !!options.noTargetGet : false;
815 var name = options && options.name !== void 0 ? options.name : key;
816 var state;
817 if (isCallable(value)) {
818 if (String(name).slice(0, 7) === "Symbol(") {
819 name = "[" + String(name).replace(/^Symbol\(([^)]*)\)/, "$1") + "]";
820 }
821 if (!hasOwn(value, "name") || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
822 createNonEnumerableProperty(value, "name", name);
823 }
824 state = enforceInternalState(value);
825 if (!state.source) {
826 state.source = TEMPLATE.join(typeof name == "string" ? name : "");
827 }
828 }
829 if (O === global2) {
830 if (simple)
831 O[key] = value;
832 else
833 setGlobal(key, value);
834 return;
835 } else if (!unsafe) {
836 delete O[key];
837 } else if (!noTargetGet && O[key]) {
838 simple = true;
839 }
840 if (simple)
841 O[key] = value;
842 else
843 createNonEnumerableProperty(O, key, value);
844 })(Function.prototype, "toString", function toString() {
845 return isCallable(this) && getInternalState(this).source || inspectSource(this);
846 });
847 }
848});
849
850// node_modules/core-js/internals/to-integer-or-infinity.js
851var require_to_integer_or_infinity = __commonJS({
852 "node_modules/core-js/internals/to-integer-or-infinity.js"(exports2, module2) {
853 var ceil = Math.ceil;
854 var floor = Math.floor;
855 module2.exports = function(argument) {
856 var number = +argument;
857 return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
858 };
859 }
860});
861
862// node_modules/core-js/internals/to-absolute-index.js
863var require_to_absolute_index = __commonJS({
864 "node_modules/core-js/internals/to-absolute-index.js"(exports2, module2) {
865 var toIntegerOrInfinity = require_to_integer_or_infinity();
866 var max = Math.max;
867 var min = Math.min;
868 module2.exports = function(index, length) {
869 var integer = toIntegerOrInfinity(index);
870 return integer < 0 ? max(integer + length, 0) : min(integer, length);
871 };
872 }
873});
874
875// node_modules/core-js/internals/to-length.js
876var require_to_length = __commonJS({
877 "node_modules/core-js/internals/to-length.js"(exports2, module2) {
878 var toIntegerOrInfinity = require_to_integer_or_infinity();
879 var min = Math.min;
880 module2.exports = function(argument) {
881 return argument > 0 ? min(toIntegerOrInfinity(argument), 9007199254740991) : 0;
882 };
883 }
884});
885
886// node_modules/core-js/internals/length-of-array-like.js
887var require_length_of_array_like = __commonJS({
888 "node_modules/core-js/internals/length-of-array-like.js"(exports2, module2) {
889 var toLength = require_to_length();
890 module2.exports = function(obj) {
891 return toLength(obj.length);
892 };
893 }
894});
895
896// node_modules/core-js/internals/array-includes.js
897var require_array_includes = __commonJS({
898 "node_modules/core-js/internals/array-includes.js"(exports2, module2) {
899 var toIndexedObject = require_to_indexed_object();
900 var toAbsoluteIndex = require_to_absolute_index();
901 var lengthOfArrayLike = require_length_of_array_like();
902 var createMethod = function(IS_INCLUDES) {
903 return function($this, el, fromIndex) {
904 var O = toIndexedObject($this);
905 var length = lengthOfArrayLike(O);
906 var index = toAbsoluteIndex(fromIndex, length);
907 var value;
908 if (IS_INCLUDES && el != el)
909 while (length > index) {
910 value = O[index++];
911 if (value != value)
912 return true;
913 }
914 else
915 for (; length > index; index++) {
916 if ((IS_INCLUDES || index in O) && O[index] === el)
917 return IS_INCLUDES || index || 0;
918 }
919 return !IS_INCLUDES && -1;
920 };
921 };
922 module2.exports = {
923 includes: createMethod(true),
924 indexOf: createMethod(false)
925 };
926 }
927});
928
929// node_modules/core-js/internals/object-keys-internal.js
930var require_object_keys_internal = __commonJS({
931 "node_modules/core-js/internals/object-keys-internal.js"(exports2, module2) {
932 var uncurryThis = require_function_uncurry_this();
933 var hasOwn = require_has_own_property();
934 var toIndexedObject = require_to_indexed_object();
935 var indexOf = require_array_includes().indexOf;
936 var hiddenKeys = require_hidden_keys();
937 var push = uncurryThis([].push);
938 module2.exports = function(object, names) {
939 var O = toIndexedObject(object);
940 var i = 0;
941 var result = [];
942 var key;
943 for (key in O)
944 !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
945 while (names.length > i)
946 if (hasOwn(O, key = names[i++])) {
947 ~indexOf(result, key) || push(result, key);
948 }
949 return result;
950 };
951 }
952});
953
954// node_modules/core-js/internals/enum-bug-keys.js
955var require_enum_bug_keys = __commonJS({
956 "node_modules/core-js/internals/enum-bug-keys.js"(exports2, module2) {
957 module2.exports = [
958 "constructor",
959 "hasOwnProperty",
960 "isPrototypeOf",
961 "propertyIsEnumerable",
962 "toLocaleString",
963 "toString",
964 "valueOf"
965 ];
966 }
967});
968
969// node_modules/core-js/internals/object-get-own-property-names.js
970var require_object_get_own_property_names = __commonJS({
971 "node_modules/core-js/internals/object-get-own-property-names.js"(exports2) {
972 var internalObjectKeys = require_object_keys_internal();
973 var enumBugKeys = require_enum_bug_keys();
974 var hiddenKeys = enumBugKeys.concat("length", "prototype");
975 exports2.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
976 return internalObjectKeys(O, hiddenKeys);
977 };
978 }
979});
980
981// node_modules/core-js/internals/object-get-own-property-symbols.js
982var require_object_get_own_property_symbols = __commonJS({
983 "node_modules/core-js/internals/object-get-own-property-symbols.js"(exports2) {
984 exports2.f = Object.getOwnPropertySymbols;
985 }
986});
987
988// node_modules/core-js/internals/own-keys.js
989var require_own_keys = __commonJS({
990 "node_modules/core-js/internals/own-keys.js"(exports2, module2) {
991 var getBuiltIn = require_get_built_in();
992 var uncurryThis = require_function_uncurry_this();
993 var getOwnPropertyNamesModule = require_object_get_own_property_names();
994 var getOwnPropertySymbolsModule = require_object_get_own_property_symbols();
995 var anObject = require_an_object();
996 var concat = uncurryThis([].concat);
997 module2.exports = getBuiltIn("Reflect", "ownKeys") || function ownKeys(it) {
998 var keys = getOwnPropertyNamesModule.f(anObject(it));
999 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1000 return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
1001 };
1002 }
1003});
1004
1005// node_modules/core-js/internals/copy-constructor-properties.js
1006var require_copy_constructor_properties = __commonJS({
1007 "node_modules/core-js/internals/copy-constructor-properties.js"(exports2, module2) {
1008 var hasOwn = require_has_own_property();
1009 var ownKeys = require_own_keys();
1010 var getOwnPropertyDescriptorModule = require_object_get_own_property_descriptor();
1011 var definePropertyModule = require_object_define_property();
1012 module2.exports = function(target, source, exceptions) {
1013 var keys = ownKeys(source);
1014 var defineProperty = definePropertyModule.f;
1015 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1016 for (var i = 0; i < keys.length; i++) {
1017 var key = keys[i];
1018 if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
1019 defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1020 }
1021 }
1022 };
1023 }
1024});
1025
1026// node_modules/core-js/internals/is-forced.js
1027var require_is_forced = __commonJS({
1028 "node_modules/core-js/internals/is-forced.js"(exports2, module2) {
1029 var fails = require_fails();
1030 var isCallable = require_is_callable();
1031 var replacement = /#|\.prototype\./;
1032 var isForced = function(feature, detection) {
1033 var value = data[normalize(feature)];
1034 return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
1035 };
1036 var normalize = isForced.normalize = function(string) {
1037 return String(string).replace(replacement, ".").toLowerCase();
1038 };
1039 var data = isForced.data = {};
1040 var NATIVE = isForced.NATIVE = "N";
1041 var POLYFILL = isForced.POLYFILL = "P";
1042 module2.exports = isForced;
1043 }
1044});
1045
1046// node_modules/core-js/internals/export.js
1047var require_export = __commonJS({
1048 "node_modules/core-js/internals/export.js"(exports2, module2) {
1049 var global2 = require_global();
1050 var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
1051 var createNonEnumerableProperty = require_create_non_enumerable_property();
1052 var redefine = require_redefine();
1053 var setGlobal = require_set_global();
1054 var copyConstructorProperties = require_copy_constructor_properties();
1055 var isForced = require_is_forced();
1056 module2.exports = function(options, source) {
1057 var TARGET = options.target;
1058 var GLOBAL = options.global;
1059 var STATIC = options.stat;
1060 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1061 if (GLOBAL) {
1062 target = global2;
1063 } else if (STATIC) {
1064 target = global2[TARGET] || setGlobal(TARGET, {});
1065 } else {
1066 target = (global2[TARGET] || {}).prototype;
1067 }
1068 if (target)
1069 for (key in source) {
1070 sourceProperty = source[key];
1071 if (options.noTargetGet) {
1072 descriptor = getOwnPropertyDescriptor(target, key);
1073 targetProperty = descriptor && descriptor.value;
1074 } else
1075 targetProperty = target[key];
1076 FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced);
1077 if (!FORCED && targetProperty !== void 0) {
1078 if (typeof sourceProperty == typeof targetProperty)
1079 continue;
1080 copyConstructorProperties(sourceProperty, targetProperty);
1081 }
1082 if (options.sham || targetProperty && targetProperty.sham) {
1083 createNonEnumerableProperty(sourceProperty, "sham", true);
1084 }
1085 redefine(target, key, sourceProperty, options);
1086 }
1087 };
1088 }
1089});
1090
1091// node_modules/core-js/internals/function-bind-context.js
1092var require_function_bind_context = __commonJS({
1093 "node_modules/core-js/internals/function-bind-context.js"(exports2, module2) {
1094 var uncurryThis = require_function_uncurry_this();
1095 var aCallable = require_a_callable();
1096 var NATIVE_BIND = require_function_bind_native();
1097 var bind = uncurryThis(uncurryThis.bind);
1098 module2.exports = function(fn, that) {
1099 aCallable(fn);
1100 return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function() {
1101 return fn.apply(that, arguments);
1102 };
1103 };
1104 }
1105});
1106
1107// node_modules/core-js/internals/iterators.js
1108var require_iterators = __commonJS({
1109 "node_modules/core-js/internals/iterators.js"(exports2, module2) {
1110 module2.exports = {};
1111 }
1112});
1113
1114// node_modules/core-js/internals/is-array-iterator-method.js
1115var require_is_array_iterator_method = __commonJS({
1116 "node_modules/core-js/internals/is-array-iterator-method.js"(exports2, module2) {
1117 var wellKnownSymbol = require_well_known_symbol();
1118 var Iterators = require_iterators();
1119 var ITERATOR = wellKnownSymbol("iterator");
1120 var ArrayPrototype = Array.prototype;
1121 module2.exports = function(it) {
1122 return it !== void 0 && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
1123 };
1124 }
1125});
1126
1127// node_modules/core-js/internals/to-string-tag-support.js
1128var require_to_string_tag_support = __commonJS({
1129 "node_modules/core-js/internals/to-string-tag-support.js"(exports2, module2) {
1130 var wellKnownSymbol = require_well_known_symbol();
1131 var TO_STRING_TAG = wellKnownSymbol("toStringTag");
1132 var test = {};
1133 test[TO_STRING_TAG] = "z";
1134 module2.exports = String(test) === "[object z]";
1135 }
1136});
1137
1138// node_modules/core-js/internals/classof.js
1139var require_classof = __commonJS({
1140 "node_modules/core-js/internals/classof.js"(exports2, module2) {
1141 var global2 = require_global();
1142 var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
1143 var isCallable = require_is_callable();
1144 var classofRaw = require_classof_raw();
1145 var wellKnownSymbol = require_well_known_symbol();
1146 var TO_STRING_TAG = wellKnownSymbol("toStringTag");
1147 var Object2 = global2.Object;
1148 var CORRECT_ARGUMENTS = classofRaw(function() {
1149 return arguments;
1150 }()) == "Arguments";
1151 var tryGet = function(it, key) {
1152 try {
1153 return it[key];
1154 } catch (error) {
1155 }
1156 };
1157 module2.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
1158 var O, tag, result;
1159 return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (tag = tryGet(O = Object2(it), TO_STRING_TAG)) == "string" ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) == "Object" && isCallable(O.callee) ? "Arguments" : result;
1160 };
1161 }
1162});
1163
1164// node_modules/core-js/internals/get-iterator-method.js
1165var require_get_iterator_method = __commonJS({
1166 "node_modules/core-js/internals/get-iterator-method.js"(exports2, module2) {
1167 var classof = require_classof();
1168 var getMethod = require_get_method();
1169 var Iterators = require_iterators();
1170 var wellKnownSymbol = require_well_known_symbol();
1171 var ITERATOR = wellKnownSymbol("iterator");
1172 module2.exports = function(it) {
1173 if (it != void 0)
1174 return getMethod(it, ITERATOR) || getMethod(it, "@@iterator") || Iterators[classof(it)];
1175 };
1176 }
1177});
1178
1179// node_modules/core-js/internals/get-iterator.js
1180var require_get_iterator = __commonJS({
1181 "node_modules/core-js/internals/get-iterator.js"(exports2, module2) {
1182 var global2 = require_global();
1183 var call = require_function_call();
1184 var aCallable = require_a_callable();
1185 var anObject = require_an_object();
1186 var tryToString = require_try_to_string();
1187 var getIteratorMethod = require_get_iterator_method();
1188 var TypeError2 = global2.TypeError;
1189 module2.exports = function(argument, usingIterator) {
1190 var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
1191 if (aCallable(iteratorMethod))
1192 return anObject(call(iteratorMethod, argument));
1193 throw TypeError2(tryToString(argument) + " is not iterable");
1194 };
1195 }
1196});
1197
1198// node_modules/core-js/internals/iterator-close.js
1199var require_iterator_close = __commonJS({
1200 "node_modules/core-js/internals/iterator-close.js"(exports2, module2) {
1201 var call = require_function_call();
1202 var anObject = require_an_object();
1203 var getMethod = require_get_method();
1204 module2.exports = function(iterator, kind, value) {
1205 var innerResult, innerError;
1206 anObject(iterator);
1207 try {
1208 innerResult = getMethod(iterator, "return");
1209 if (!innerResult) {
1210 if (kind === "throw")
1211 throw value;
1212 return value;
1213 }
1214 innerResult = call(innerResult, iterator);
1215 } catch (error) {
1216 innerError = true;
1217 innerResult = error;
1218 }
1219 if (kind === "throw")
1220 throw value;
1221 if (innerError)
1222 throw innerResult;
1223 anObject(innerResult);
1224 return value;
1225 };
1226 }
1227});
1228
1229// node_modules/core-js/internals/iterate.js
1230var require_iterate = __commonJS({
1231 "node_modules/core-js/internals/iterate.js"(exports2, module2) {
1232 var global2 = require_global();
1233 var bind = require_function_bind_context();
1234 var call = require_function_call();
1235 var anObject = require_an_object();
1236 var tryToString = require_try_to_string();
1237 var isArrayIteratorMethod = require_is_array_iterator_method();
1238 var lengthOfArrayLike = require_length_of_array_like();
1239 var isPrototypeOf = require_object_is_prototype_of();
1240 var getIterator = require_get_iterator();
1241 var getIteratorMethod = require_get_iterator_method();
1242 var iteratorClose = require_iterator_close();
1243 var TypeError2 = global2.TypeError;
1244 var Result = function(stopped, result) {
1245 this.stopped = stopped;
1246 this.result = result;
1247 };
1248 var ResultPrototype = Result.prototype;
1249 module2.exports = function(iterable, unboundFunction, options) {
1250 var that = options && options.that;
1251 var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1252 var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1253 var INTERRUPTED = !!(options && options.INTERRUPTED);
1254 var fn = bind(unboundFunction, that);
1255 var iterator, iterFn, index, length, result, next, step;
1256 var stop = function(condition) {
1257 if (iterator)
1258 iteratorClose(iterator, "normal", condition);
1259 return new Result(true, condition);
1260 };
1261 var callFn = function(value) {
1262 if (AS_ENTRIES) {
1263 anObject(value);
1264 return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
1265 }
1266 return INTERRUPTED ? fn(value, stop) : fn(value);
1267 };
1268 if (IS_ITERATOR) {
1269 iterator = iterable;
1270 } else {
1271 iterFn = getIteratorMethod(iterable);
1272 if (!iterFn)
1273 throw TypeError2(tryToString(iterable) + " is not iterable");
1274 if (isArrayIteratorMethod(iterFn)) {
1275 for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
1276 result = callFn(iterable[index]);
1277 if (result && isPrototypeOf(ResultPrototype, result))
1278 return result;
1279 }
1280 return new Result(false);
1281 }
1282 iterator = getIterator(iterable, iterFn);
1283 }
1284 next = iterator.next;
1285 while (!(step = call(next, iterator)).done) {
1286 try {
1287 result = callFn(step.value);
1288 } catch (error) {
1289 iteratorClose(iterator, "throw", error);
1290 }
1291 if (typeof result == "object" && result && isPrototypeOf(ResultPrototype, result))
1292 return result;
1293 }
1294 return new Result(false);
1295 };
1296 }
1297});
1298
1299// node_modules/core-js/internals/create-property.js
1300var require_create_property = __commonJS({
1301 "node_modules/core-js/internals/create-property.js"(exports2, module2) {
1302 "use strict";
1303 var toPropertyKey = require_to_property_key();
1304 var definePropertyModule = require_object_define_property();
1305 var createPropertyDescriptor = require_create_property_descriptor();
1306 module2.exports = function(object, key, value) {
1307 var propertyKey = toPropertyKey(key);
1308 if (propertyKey in object)
1309 definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
1310 else
1311 object[propertyKey] = value;
1312 };
1313 }
1314});
1315
1316// node_modules/core-js/modules/es.object.from-entries.js
1317var require_es_object_from_entries = __commonJS({
1318 "node_modules/core-js/modules/es.object.from-entries.js"() {
1319 var $ = require_export();
1320 var iterate = require_iterate();
1321 var createProperty = require_create_property();
1322 $({ target: "Object", stat: true }, {
1323 fromEntries: function fromEntries(iterable) {
1324 var obj = {};
1325 iterate(iterable, function(k, v) {
1326 createProperty(obj, k, v);
1327 }, { AS_ENTRIES: true });
1328 return obj;
1329 }
1330 });
1331 }
1332});
1333
1334// node_modules/core-js/internals/is-array.js
1335var require_is_array = __commonJS({
1336 "node_modules/core-js/internals/is-array.js"(exports2, module2) {
1337 var classof = require_classof_raw();
1338 module2.exports = Array.isArray || function isArray(argument) {
1339 return classof(argument) == "Array";
1340 };
1341 }
1342});
1343
1344// node_modules/core-js/internals/flatten-into-array.js
1345var require_flatten_into_array = __commonJS({
1346 "node_modules/core-js/internals/flatten-into-array.js"(exports2, module2) {
1347 "use strict";
1348 var global2 = require_global();
1349 var isArray = require_is_array();
1350 var lengthOfArrayLike = require_length_of_array_like();
1351 var bind = require_function_bind_context();
1352 var TypeError2 = global2.TypeError;
1353 var flattenIntoArray = function(target, original, source, sourceLen, start, depth, mapper, thisArg) {
1354 var targetIndex = start;
1355 var sourceIndex = 0;
1356 var mapFn = mapper ? bind(mapper, thisArg) : false;
1357 var element, elementLen;
1358 while (sourceIndex < sourceLen) {
1359 if (sourceIndex in source) {
1360 element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
1361 if (depth > 0 && isArray(element)) {
1362 elementLen = lengthOfArrayLike(element);
1363 targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;
1364 } else {
1365 if (targetIndex >= 9007199254740991)
1366 throw TypeError2("Exceed the acceptable array length");
1367 target[targetIndex] = element;
1368 }
1369 targetIndex++;
1370 }
1371 sourceIndex++;
1372 }
1373 return targetIndex;
1374 };
1375 module2.exports = flattenIntoArray;
1376 }
1377});
1378
1379// node_modules/core-js/internals/is-constructor.js
1380var require_is_constructor = __commonJS({
1381 "node_modules/core-js/internals/is-constructor.js"(exports2, module2) {
1382 var uncurryThis = require_function_uncurry_this();
1383 var fails = require_fails();
1384 var isCallable = require_is_callable();
1385 var classof = require_classof();
1386 var getBuiltIn = require_get_built_in();
1387 var inspectSource = require_inspect_source();
1388 var noop = function() {
1389 };
1390 var empty = [];
1391 var construct = getBuiltIn("Reflect", "construct");
1392 var constructorRegExp = /^\s*(?:class|function)\b/;
1393 var exec = uncurryThis(constructorRegExp.exec);
1394 var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1395 var isConstructorModern = function isConstructor(argument) {
1396 if (!isCallable(argument))
1397 return false;
1398 try {
1399 construct(noop, empty, argument);
1400 return true;
1401 } catch (error) {
1402 return false;
1403 }
1404 };
1405 var isConstructorLegacy = function isConstructor(argument) {
1406 if (!isCallable(argument))
1407 return false;
1408 switch (classof(argument)) {
1409 case "AsyncFunction":
1410 case "GeneratorFunction":
1411 case "AsyncGeneratorFunction":
1412 return false;
1413 }
1414 try {
1415 return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
1416 } catch (error) {
1417 return true;
1418 }
1419 };
1420 isConstructorLegacy.sham = true;
1421 module2.exports = !construct || fails(function() {
1422 var called;
1423 return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
1424 called = true;
1425 }) || called;
1426 }) ? isConstructorLegacy : isConstructorModern;
1427 }
1428});
1429
1430// node_modules/core-js/internals/array-species-constructor.js
1431var require_array_species_constructor = __commonJS({
1432 "node_modules/core-js/internals/array-species-constructor.js"(exports2, module2) {
1433 var global2 = require_global();
1434 var isArray = require_is_array();
1435 var isConstructor = require_is_constructor();
1436 var isObject = require_is_object();
1437 var wellKnownSymbol = require_well_known_symbol();
1438 var SPECIES = wellKnownSymbol("species");
1439 var Array2 = global2.Array;
1440 module2.exports = function(originalArray) {
1441 var C;
1442 if (isArray(originalArray)) {
1443 C = originalArray.constructor;
1444 if (isConstructor(C) && (C === Array2 || isArray(C.prototype)))
1445 C = void 0;
1446 else if (isObject(C)) {
1447 C = C[SPECIES];
1448 if (C === null)
1449 C = void 0;
1450 }
1451 }
1452 return C === void 0 ? Array2 : C;
1453 };
1454 }
1455});
1456
1457// node_modules/core-js/internals/array-species-create.js
1458var require_array_species_create = __commonJS({
1459 "node_modules/core-js/internals/array-species-create.js"(exports2, module2) {
1460 var arraySpeciesConstructor = require_array_species_constructor();
1461 module2.exports = function(originalArray, length) {
1462 return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
1463 };
1464 }
1465});
1466
1467// node_modules/core-js/modules/es.array.flat-map.js
1468var require_es_array_flat_map = __commonJS({
1469 "node_modules/core-js/modules/es.array.flat-map.js"() {
1470 "use strict";
1471 var $ = require_export();
1472 var flattenIntoArray = require_flatten_into_array();
1473 var aCallable = require_a_callable();
1474 var toObject = require_to_object();
1475 var lengthOfArrayLike = require_length_of_array_like();
1476 var arraySpeciesCreate = require_array_species_create();
1477 $({ target: "Array", proto: true }, {
1478 flatMap: function flatMap(callbackfn) {
1479 var O = toObject(this);
1480 var sourceLen = lengthOfArrayLike(O);
1481 var A;
1482 aCallable(callbackfn);
1483 A = arraySpeciesCreate(O, 0);
1484 A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : void 0);
1485 return A;
1486 }
1487 });
1488 }
1489});
1490
1491// node_modules/core-js/modules/es.array.flat.js
1492var require_es_array_flat = __commonJS({
1493 "node_modules/core-js/modules/es.array.flat.js"() {
1494 "use strict";
1495 var $ = require_export();
1496 var flattenIntoArray = require_flatten_into_array();
1497 var toObject = require_to_object();
1498 var lengthOfArrayLike = require_length_of_array_like();
1499 var toIntegerOrInfinity = require_to_integer_or_infinity();
1500 var arraySpeciesCreate = require_array_species_create();
1501 $({ target: "Array", proto: true }, {
1502 flat: function flat() {
1503 var depthArg = arguments.length ? arguments[0] : void 0;
1504 var O = toObject(this);
1505 var sourceLen = lengthOfArrayLike(O);
1506 var A = arraySpeciesCreate(O, 0);
1507 A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === void 0 ? 1 : toIntegerOrInfinity(depthArg));
1508 return A;
1509 }
1510 });
1511 }
1512});
1513
1514// dist/_cli.js.cjs.js
1515require_es_object_from_entries();
1516require_es_array_flat_map();
1517require_es_array_flat();
1518var __create = Object.create;
1519var __defProp = Object.defineProperty;
1520var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
1521var __getOwnPropNames2 = Object.getOwnPropertyNames;
1522var __getProtoOf = Object.getPrototypeOf;
1523var __hasOwnProp = Object.prototype.hasOwnProperty;
1524var __esm = (fn, res) => function __init() {
1525 return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
1526};
1527var __commonJS2 = (cb, mod) => function __require() {
1528 return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = {
1529 exports: {}
1530 }).exports, mod), mod.exports;
1531};
1532var __export = (target, all) => {
1533 for (var name in all)
1534 __defProp(target, name, {
1535 get: all[name],
1536 enumerable: true
1537 });
1538};
1539var __copyProps = (to, from, except, desc) => {
1540 if (from && typeof from === "object" || typeof from === "function") {
1541 for (let key of __getOwnPropNames2(from))
1542 if (!__hasOwnProp.call(to, key) && key !== except)
1543 __defProp(to, key, {
1544 get: () => from[key],
1545 enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
1546 });
1547 }
1548 return to;
1549};
1550var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
1551 value: mod,
1552 enumerable: true
1553}) : target, mod));
1554var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
1555 value: true
1556}), mod);
1557var require_fast_json_stable_stringify = __commonJS2({
1558 "node_modules/fast-json-stable-stringify/index.js"(exports2, module2) {
1559 "use strict";
1560 module2.exports = function(data, opts) {
1561 if (!opts)
1562 opts = {};
1563 if (typeof opts === "function")
1564 opts = {
1565 cmp: opts
1566 };
1567 var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false;
1568 var cmp = opts.cmp && function(f) {
1569 return function(node) {
1570 return function(a, b) {
1571 var aobj = {
1572 key: a,
1573 value: node[a]
1574 };
1575 var bobj = {
1576 key: b,
1577 value: node[b]
1578 };
1579 return f(aobj, bobj);
1580 };
1581 };
1582 }(opts.cmp);
1583 var seen = [];
1584 return function stringify2(node) {
1585 if (node && node.toJSON && typeof node.toJSON === "function") {
1586 node = node.toJSON();
1587 }
1588 if (node === void 0)
1589 return;
1590 if (typeof node == "number")
1591 return isFinite(node) ? "" + node : "null";
1592 if (typeof node !== "object")
1593 return JSON.stringify(node);
1594 var i, out;
1595 if (Array.isArray(node)) {
1596 out = "[";
1597 for (i = 0; i < node.length; i++) {
1598 if (i)
1599 out += ",";
1600 out += stringify2(node[i]) || "null";
1601 }
1602 return out + "]";
1603 }
1604 if (node === null)
1605 return "null";
1606 if (seen.indexOf(node) !== -1) {
1607 if (cycles)
1608 return JSON.stringify("__cycle__");
1609 throw new TypeError("Converting circular structure to JSON");
1610 }
1611 var seenIndex = seen.push(node) - 1;
1612 var keys = Object.keys(node).sort(cmp && cmp(node));
1613 out = "";
1614 for (i = 0; i < keys.length; i++) {
1615 var key = keys[i];
1616 var value = stringify2(node[key]);
1617 if (!value)
1618 continue;
1619 if (out)
1620 out += ",";
1621 out += JSON.stringify(key) + ":" + value;
1622 }
1623 seen.splice(seenIndex, 1);
1624 return "{" + out + "}";
1625 }(data);
1626 };
1627 }
1628});
1629var require_clone = __commonJS2({
1630 "node_modules/clone/clone.js"(exports2, module2) {
1631 var clone = function() {
1632 "use strict";
1633 function clone2(parent, circular, depth, prototype) {
1634 var filter;
1635 if (typeof circular === "object") {
1636 depth = circular.depth;
1637 prototype = circular.prototype;
1638 filter = circular.filter;
1639 circular = circular.circular;
1640 }
1641 var allParents = [];
1642 var allChildren = [];
1643 var useBuffer = typeof Buffer != "undefined";
1644 if (typeof circular == "undefined")
1645 circular = true;
1646 if (typeof depth == "undefined")
1647 depth = Infinity;
1648 function _clone(parent2, depth2) {
1649 if (parent2 === null)
1650 return null;
1651 if (depth2 == 0)
1652 return parent2;
1653 var child;
1654 var proto2;
1655 if (typeof parent2 != "object") {
1656 return parent2;
1657 }
1658 if (clone2.__isArray(parent2)) {
1659 child = [];
1660 } else if (clone2.__isRegExp(parent2)) {
1661 child = new RegExp(parent2.source, __getRegExpFlags(parent2));
1662 if (parent2.lastIndex)
1663 child.lastIndex = parent2.lastIndex;
1664 } else if (clone2.__isDate(parent2)) {
1665 child = new Date(parent2.getTime());
1666 } else if (useBuffer && Buffer.isBuffer(parent2)) {
1667 if (Buffer.allocUnsafe) {
1668 child = Buffer.allocUnsafe(parent2.length);
1669 } else {
1670 child = new Buffer(parent2.length);
1671 }
1672 parent2.copy(child);
1673 return child;
1674 } else {
1675 if (typeof prototype == "undefined") {
1676 proto2 = Object.getPrototypeOf(parent2);
1677 child = Object.create(proto2);
1678 } else {
1679 child = Object.create(prototype);
1680 proto2 = prototype;
1681 }
1682 }
1683 if (circular) {
1684 var index = allParents.indexOf(parent2);
1685 if (index != -1) {
1686 return allChildren[index];
1687 }
1688 allParents.push(parent2);
1689 allChildren.push(child);
1690 }
1691 for (var i in parent2) {
1692 var attrs;
1693 if (proto2) {
1694 attrs = Object.getOwnPropertyDescriptor(proto2, i);
1695 }
1696 if (attrs && attrs.set == null) {
1697 continue;
1698 }
1699 child[i] = _clone(parent2[i], depth2 - 1);
1700 }
1701 return child;
1702 }
1703 return _clone(parent, depth);
1704 }
1705 clone2.clonePrototype = function clonePrototype(parent) {
1706 if (parent === null)
1707 return null;
1708 var c = function() {
1709 };
1710 c.prototype = parent;
1711 return new c();
1712 };
1713 function __objToStr(o) {
1714 return Object.prototype.toString.call(o);
1715 }
1716 ;
1717 clone2.__objToStr = __objToStr;
1718 function __isDate(o) {
1719 return typeof o === "object" && __objToStr(o) === "[object Date]";
1720 }
1721 ;
1722 clone2.__isDate = __isDate;
1723 function __isArray(o) {
1724 return typeof o === "object" && __objToStr(o) === "[object Array]";
1725 }
1726 ;
1727 clone2.__isArray = __isArray;
1728 function __isRegExp(o) {
1729 return typeof o === "object" && __objToStr(o) === "[object RegExp]";
1730 }
1731 ;
1732 clone2.__isRegExp = __isRegExp;
1733 function __getRegExpFlags(re) {
1734 var flags = "";
1735 if (re.global)
1736 flags += "g";
1737 if (re.ignoreCase)
1738 flags += "i";
1739 if (re.multiline)
1740 flags += "m";
1741 return flags;
1742 }
1743 ;
1744 clone2.__getRegExpFlags = __getRegExpFlags;
1745 return clone2;
1746 }();
1747 if (typeof module2 === "object" && module2.exports) {
1748 module2.exports = clone;
1749 }
1750 }
1751});
1752var require_defaults = __commonJS2({
1753 "node_modules/defaults/index.js"(exports2, module2) {
1754 var clone = require_clone();
1755 module2.exports = function(options, defaults) {
1756 options = options || {};
1757 Object.keys(defaults).forEach(function(key) {
1758 if (typeof options[key] === "undefined") {
1759 options[key] = clone(defaults[key]);
1760 }
1761 });
1762 return options;
1763 };
1764 }
1765});
1766var require_combining = __commonJS2({
1767 "node_modules/wcwidth/combining.js"(exports2, module2) {
1768 module2.exports = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531], [68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]];
1769 }
1770});
1771var require_wcwidth = __commonJS2({
1772 "node_modules/wcwidth/index.js"(exports2, module2) {
1773 "use strict";
1774 var defaults = require_defaults();
1775 var combining = require_combining();
1776 var DEFAULTS = {
1777 nul: 0,
1778 control: 0
1779 };
1780 module2.exports = function wcwidth2(str) {
1781 return wcswidth(str, DEFAULTS);
1782 };
1783 module2.exports.config = function(opts) {
1784 opts = defaults(opts || {}, DEFAULTS);
1785 return function wcwidth2(str) {
1786 return wcswidth(str, opts);
1787 };
1788 };
1789 function wcswidth(str, opts) {
1790 if (typeof str !== "string")
1791 return wcwidth(str, opts);
1792 var s = 0;
1793 for (var i = 0; i < str.length; i++) {
1794 var n = wcwidth(str.charCodeAt(i), opts);
1795 if (n < 0)
1796 return -1;
1797 s += n;
1798 }
1799 return s;
1800 }
1801 function wcwidth(ucs, opts) {
1802 if (ucs === 0)
1803 return opts.nul;
1804 if (ucs < 32 || ucs >= 127 && ucs < 160)
1805 return opts.control;
1806 if (bisearch(ucs))
1807 return 0;
1808 return 1 + (ucs >= 4352 && (ucs <= 4447 || ucs == 9001 || ucs == 9002 || ucs >= 11904 && ucs <= 42191 && ucs != 12351 || ucs >= 44032 && ucs <= 55203 || ucs >= 63744 && ucs <= 64255 || ucs >= 65040 && ucs <= 65049 || ucs >= 65072 && ucs <= 65135 || ucs >= 65280 && ucs <= 65376 || ucs >= 65504 && ucs <= 65510 || ucs >= 131072 && ucs <= 196605 || ucs >= 196608 && ucs <= 262141));
1809 }
1810 function bisearch(ucs) {
1811 var min = 0;
1812 var max = combining.length - 1;
1813 var mid;
1814 if (ucs < combining[0][0] || ucs > combining[max][1])
1815 return false;
1816 while (max >= min) {
1817 mid = Math.floor((min + max) / 2);
1818 if (ucs > combining[mid][1])
1819 min = mid + 1;
1820 else if (ucs < combining[mid][0])
1821 max = mid - 1;
1822 else
1823 return true;
1824 }
1825 return false;
1826 }
1827 }
1828});
1829function ansiRegex({
1830 onlyFirst = false
1831} = {}) {
1832 const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
1833 return new RegExp(pattern, onlyFirst ? void 0 : "g");
1834}
1835var init_ansi_regex = __esm({
1836 "node_modules/strip-ansi/node_modules/ansi-regex/index.js"() {
1837 }
1838});
1839var strip_ansi_exports = {};
1840__export(strip_ansi_exports, {
1841 default: () => stripAnsi
1842});
1843function stripAnsi(string) {
1844 if (typeof string !== "string") {
1845 throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
1846 }
1847 return string.replace(ansiRegex(), "");
1848}
1849var init_strip_ansi = __esm({
1850 "node_modules/strip-ansi/index.js"() {
1851 init_ansi_regex();
1852 }
1853});
1854function assembleStyles() {
1855 const codes = /* @__PURE__ */ new Map();
1856 const styles2 = {
1857 modifier: {
1858 reset: [0, 0],
1859 bold: [1, 22],
1860 dim: [2, 22],
1861 italic: [3, 23],
1862 underline: [4, 24],
1863 overline: [53, 55],
1864 inverse: [7, 27],
1865 hidden: [8, 28],
1866 strikethrough: [9, 29]
1867 },
1868 color: {
1869 black: [30, 39],
1870 red: [31, 39],
1871 green: [32, 39],
1872 yellow: [33, 39],
1873 blue: [34, 39],
1874 magenta: [35, 39],
1875 cyan: [36, 39],
1876 white: [37, 39],
1877 blackBright: [90, 39],
1878 redBright: [91, 39],
1879 greenBright: [92, 39],
1880 yellowBright: [93, 39],
1881 blueBright: [94, 39],
1882 magentaBright: [95, 39],
1883 cyanBright: [96, 39],
1884 whiteBright: [97, 39]
1885 },
1886 bgColor: {
1887 bgBlack: [40, 49],
1888 bgRed: [41, 49],
1889 bgGreen: [42, 49],
1890 bgYellow: [43, 49],
1891 bgBlue: [44, 49],
1892 bgMagenta: [45, 49],
1893 bgCyan: [46, 49],
1894 bgWhite: [47, 49],
1895 bgBlackBright: [100, 49],
1896 bgRedBright: [101, 49],
1897 bgGreenBright: [102, 49],
1898 bgYellowBright: [103, 49],
1899 bgBlueBright: [104, 49],
1900 bgMagentaBright: [105, 49],
1901 bgCyanBright: [106, 49],
1902 bgWhiteBright: [107, 49]
1903 }
1904 };
1905 styles2.color.gray = styles2.color.blackBright;
1906 styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
1907 styles2.color.grey = styles2.color.blackBright;
1908 styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
1909 for (const [groupName, group] of Object.entries(styles2)) {
1910 for (const [styleName, style] of Object.entries(group)) {
1911 styles2[styleName] = {
1912 open: `\x1B[${style[0]}m`,
1913 close: `\x1B[${style[1]}m`
1914 };
1915 group[styleName] = styles2[styleName];
1916 codes.set(style[0], style[1]);
1917 }
1918 Object.defineProperty(styles2, groupName, {
1919 value: group,
1920 enumerable: false
1921 });
1922 }
1923 Object.defineProperty(styles2, "codes", {
1924 value: codes,
1925 enumerable: false
1926 });
1927 styles2.color.close = "\x1B[39m";
1928 styles2.bgColor.close = "\x1B[49m";
1929 styles2.color.ansi = wrapAnsi16();
1930 styles2.color.ansi256 = wrapAnsi256();
1931 styles2.color.ansi16m = wrapAnsi16m();
1932 styles2.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
1933 styles2.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
1934 styles2.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
1935 Object.defineProperties(styles2, {
1936 rgbToAnsi256: {
1937 value: (red, green, blue) => {
1938 if (red === green && green === blue) {
1939 if (red < 8) {
1940 return 16;
1941 }
1942 if (red > 248) {
1943 return 231;
1944 }
1945 return Math.round((red - 8) / 247 * 24) + 232;
1946 }
1947 return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1948 },
1949 enumerable: false
1950 },
1951 hexToRgb: {
1952 value: (hex) => {
1953 const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
1954 if (!matches) {
1955 return [0, 0, 0];
1956 }
1957 let {
1958 colorString
1959 } = matches.groups;
1960 if (colorString.length === 3) {
1961 colorString = [...colorString].map((character) => character + character).join("");
1962 }
1963 const integer = Number.parseInt(colorString, 16);
1964 return [integer >> 16 & 255, integer >> 8 & 255, integer & 255];
1965 },
1966 enumerable: false
1967 },
1968 hexToAnsi256: {
1969 value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
1970 enumerable: false
1971 },
1972 ansi256ToAnsi: {
1973 value: (code) => {
1974 if (code < 8) {
1975 return 30 + code;
1976 }
1977 if (code < 16) {
1978 return 90 + (code - 8);
1979 }
1980 let red;
1981 let green;
1982 let blue;
1983 if (code >= 232) {
1984 red = ((code - 232) * 10 + 8) / 255;
1985 green = red;
1986 blue = red;
1987 } else {
1988 code -= 16;
1989 const remainder = code % 36;
1990 red = Math.floor(code / 36) / 5;
1991 green = Math.floor(remainder / 6) / 5;
1992 blue = remainder % 6 / 5;
1993 }
1994 const value = Math.max(red, green, blue) * 2;
1995 if (value === 0) {
1996 return 30;
1997 }
1998 let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
1999 if (value === 2) {
2000 result += 60;
2001 }
2002 return result;
2003 },
2004 enumerable: false
2005 },
2006 rgbToAnsi: {
2007 value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
2008 enumerable: false
2009 },
2010 hexToAnsi: {
2011 value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
2012 enumerable: false
2013 }
2014 });
2015 return styles2;
2016}
2017var ANSI_BACKGROUND_OFFSET;
2018var wrapAnsi16;
2019var wrapAnsi256;
2020var wrapAnsi16m;
2021var ansiStyles;
2022var ansi_styles_default;
2023var init_ansi_styles = __esm({
2024 "node_modules/chalk/source/vendor/ansi-styles/index.js"() {
2025 ANSI_BACKGROUND_OFFSET = 10;
2026 wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
2027 wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
2028 wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
2029 ansiStyles = assembleStyles();
2030 ansi_styles_default = ansiStyles;
2031 }
2032});
2033function hasFlag(flag, argv = import_node_process.default.argv) {
2034 const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
2035 const position = argv.indexOf(prefix + flag);
2036 const terminatorPosition = argv.indexOf("--");
2037 return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
2038}
2039function envForceColor() {
2040 if ("FORCE_COLOR" in env) {
2041 if (env.FORCE_COLOR === "true") {
2042 return 1;
2043 }
2044 if (env.FORCE_COLOR === "false") {
2045 return 0;
2046 }
2047 return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
2048 }
2049}
2050function translateLevel(level) {
2051 if (level === 0) {
2052 return false;
2053 }
2054 return {
2055 level,
2056 hasBasic: true,
2057 has256: level >= 2,
2058 has16m: level >= 3
2059 };
2060}
2061function _supportsColor(haveStream, {
2062 streamIsTTY,
2063 sniffFlags = true
2064} = {}) {
2065 const noFlagForceColor = envForceColor();
2066 if (noFlagForceColor !== void 0) {
2067 flagForceColor = noFlagForceColor;
2068 }
2069 const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
2070 if (forceColor === 0) {
2071 return 0;
2072 }
2073 if (sniffFlags) {
2074 if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
2075 return 3;
2076 }
2077 if (hasFlag("color=256")) {
2078 return 2;
2079 }
2080 }
2081 if (haveStream && !streamIsTTY && forceColor === void 0) {
2082 return 0;
2083 }
2084 const min = forceColor || 0;
2085 if (env.TERM === "dumb") {
2086 return min;
2087 }
2088 if (import_node_process.default.platform === "win32") {
2089 const osRelease = import_node_os.default.release().split(".");
2090 if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
2091 return Number(osRelease[2]) >= 14931 ? 3 : 2;
2092 }
2093 return 1;
2094 }
2095 if ("CI" in env) {
2096 if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
2097 return 1;
2098 }
2099 return min;
2100 }
2101 if ("TEAMCITY_VERSION" in env) {
2102 return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
2103 }
2104 if ("TF_BUILD" in env && "AGENT_NAME" in env) {
2105 return 1;
2106 }
2107 if (env.COLORTERM === "truecolor") {
2108 return 3;
2109 }
2110 if ("TERM_PROGRAM" in env) {
2111 const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
2112 switch (env.TERM_PROGRAM) {
2113 case "iTerm.app":
2114 return version >= 3 ? 3 : 2;
2115 case "Apple_Terminal":
2116 return 2;
2117 }
2118 }
2119 if (/-256(color)?$/i.test(env.TERM)) {
2120 return 2;
2121 }
2122 if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
2123 return 1;
2124 }
2125 if ("COLORTERM" in env) {
2126 return 1;
2127 }
2128 return min;
2129}
2130function createSupportsColor(stream, options = {}) {
2131 const level = _supportsColor(stream, Object.assign({
2132 streamIsTTY: stream && stream.isTTY
2133 }, options));
2134 return translateLevel(level);
2135}
2136var import_node_process;
2137var import_node_os;
2138var import_node_tty;
2139var env;
2140var flagForceColor;
2141var supportsColor;
2142var supports_color_default;
2143var init_supports_color = __esm({
2144 "node_modules/chalk/source/vendor/supports-color/index.js"() {
2145 import_node_process = __toESM(require("process"), 1);
2146 import_node_os = __toESM(require("os"), 1);
2147 import_node_tty = __toESM(require("tty"), 1);
2148 ({
2149 env
2150 } = import_node_process.default);
2151 if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
2152 flagForceColor = 0;
2153 } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
2154 flagForceColor = 1;
2155 }
2156 supportsColor = {
2157 stdout: createSupportsColor({
2158 isTTY: import_node_tty.default.isatty(1)
2159 }),
2160 stderr: createSupportsColor({
2161 isTTY: import_node_tty.default.isatty(2)
2162 })
2163 };
2164 supports_color_default = supportsColor;
2165 }
2166});
2167function stringReplaceAll(string, substring, replacer) {
2168 let index = string.indexOf(substring);
2169 if (index === -1) {
2170 return string;
2171 }
2172 const substringLength = substring.length;
2173 let endIndex = 0;
2174 let returnValue = "";
2175 do {
2176 returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
2177 endIndex = index + substringLength;
2178 index = string.indexOf(substring, endIndex);
2179 } while (index !== -1);
2180 returnValue += string.slice(endIndex);
2181 return returnValue;
2182}
2183function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
2184 let endIndex = 0;
2185 let returnValue = "";
2186 do {
2187 const gotCR = string[index - 1] === "\r";
2188 returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
2189 endIndex = index + 1;
2190 index = string.indexOf("\n", endIndex);
2191 } while (index !== -1);
2192 returnValue += string.slice(endIndex);
2193 return returnValue;
2194}
2195var init_utilities = __esm({
2196 "node_modules/chalk/source/utilities.js"() {
2197 }
2198});
2199var source_exports = {};
2200__export(source_exports, {
2201 Chalk: () => Chalk,
2202 chalkStderr: () => chalkStderr,
2203 default: () => source_default,
2204 supportsColor: () => stdoutColor,
2205 supportsColorStderr: () => stderrColor
2206});
2207function createChalk(options) {
2208 return chalkFactory(options);
2209}
2210var stdoutColor;
2211var stderrColor;
2212var GENERATOR;
2213var STYLER;
2214var IS_EMPTY;
2215var levelMapping;
2216var styles;
2217var applyOptions;
2218var Chalk;
2219var chalkFactory;
2220var getModelAnsi;
2221var usedModels;
2222var proto;
2223var createStyler;
2224var createBuilder;
2225var applyStyle;
2226var chalk;
2227var chalkStderr;
2228var source_default;
2229var init_source = __esm({
2230 "node_modules/chalk/source/index.js"() {
2231 init_ansi_styles();
2232 init_supports_color();
2233 init_utilities();
2234 ({
2235 stdout: stdoutColor,
2236 stderr: stderrColor
2237 } = supports_color_default);
2238 GENERATOR = Symbol("GENERATOR");
2239 STYLER = Symbol("STYLER");
2240 IS_EMPTY = Symbol("IS_EMPTY");
2241 levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
2242 styles = /* @__PURE__ */ Object.create(null);
2243 applyOptions = (object, options = {}) => {
2244 if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
2245 throw new Error("The `level` option should be an integer from 0 to 3");
2246 }
2247 const colorLevel = stdoutColor ? stdoutColor.level : 0;
2248 object.level = options.level === void 0 ? colorLevel : options.level;
2249 };
2250 Chalk = class {
2251 constructor(options) {
2252 return chalkFactory(options);
2253 }
2254 };
2255 chalkFactory = (options) => {
2256 const chalk2 = (...strings) => strings.join(" ");
2257 applyOptions(chalk2, options);
2258 Object.setPrototypeOf(chalk2, createChalk.prototype);
2259 return chalk2;
2260 };
2261 Object.setPrototypeOf(createChalk.prototype, Function.prototype);
2262 for (const [styleName, style] of Object.entries(ansi_styles_default)) {
2263 styles[styleName] = {
2264 get() {
2265 const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
2266 Object.defineProperty(this, styleName, {
2267 value: builder
2268 });
2269 return builder;
2270 }
2271 };
2272 }
2273 styles.visible = {
2274 get() {
2275 const builder = createBuilder(this, this[STYLER], true);
2276 Object.defineProperty(this, "visible", {
2277 value: builder
2278 });
2279 return builder;
2280 }
2281 };
2282 getModelAnsi = (model, level, type, ...arguments_) => {
2283 if (model === "rgb") {
2284 if (level === "ansi16m") {
2285 return ansi_styles_default[type].ansi16m(...arguments_);
2286 }
2287 if (level === "ansi256") {
2288 return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
2289 }
2290 return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
2291 }
2292 if (model === "hex") {
2293 return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
2294 }
2295 return ansi_styles_default[type][model](...arguments_);
2296 };
2297 usedModels = ["rgb", "hex", "ansi256"];
2298 for (const model of usedModels) {
2299 styles[model] = {
2300 get() {
2301 const {
2302 level
2303 } = this;
2304 return function(...arguments_) {
2305 const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
2306 return createBuilder(this, styler, this[IS_EMPTY]);
2307 };
2308 }
2309 };
2310 const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
2311 styles[bgModel] = {
2312 get() {
2313 const {
2314 level
2315 } = this;
2316 return function(...arguments_) {
2317 const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
2318 return createBuilder(this, styler, this[IS_EMPTY]);
2319 };
2320 }
2321 };
2322 }
2323 proto = Object.defineProperties(() => {
2324 }, Object.assign(Object.assign({}, styles), {}, {
2325 level: {
2326 enumerable: true,
2327 get() {
2328 return this[GENERATOR].level;
2329 },
2330 set(level) {
2331 this[GENERATOR].level = level;
2332 }
2333 }
2334 }));
2335 createStyler = (open, close, parent) => {
2336 let openAll;
2337 let closeAll;
2338 if (parent === void 0) {
2339 openAll = open;
2340 closeAll = close;
2341 } else {
2342 openAll = parent.openAll + open;
2343 closeAll = close + parent.closeAll;
2344 }
2345 return {
2346 open,
2347 close,
2348 openAll,
2349 closeAll,
2350 parent
2351 };
2352 };
2353 createBuilder = (self2, _styler, _isEmpty) => {
2354 const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
2355 Object.setPrototypeOf(builder, proto);
2356 builder[GENERATOR] = self2;
2357 builder[STYLER] = _styler;
2358 builder[IS_EMPTY] = _isEmpty;
2359 return builder;
2360 };
2361 applyStyle = (self2, string) => {
2362 if (self2.level <= 0 || !string) {
2363 return self2[IS_EMPTY] ? "" : string;
2364 }
2365 let styler = self2[STYLER];
2366 if (styler === void 0) {
2367 return string;
2368 }
2369 const {
2370 openAll,
2371 closeAll
2372 } = styler;
2373 if (string.includes("\x1B")) {
2374 while (styler !== void 0) {
2375 string = stringReplaceAll(string, styler.close, styler.open);
2376 styler = styler.parent;
2377 }
2378 }
2379 const lfIndex = string.indexOf("\n");
2380 if (lfIndex !== -1) {
2381 string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
2382 }
2383 return openAll + string + closeAll;
2384 };
2385 Object.defineProperties(createChalk.prototype, styles);
2386 chalk = createChalk();
2387 chalkStderr = createChalk({
2388 level: stderrColor ? stderrColor.level : 0
2389 });
2390 source_default = chalk;
2391 }
2392});
2393var require_logger = __commonJS2({
2394 "src/cli/logger.js"(exports2, module2) {
2395 "use strict";
2396 var readline = require("readline");
2397 var wcwidth = require_wcwidth();
2398 var {
2399 default: stripAnsi2
2400 } = (init_strip_ansi(), __toCommonJS(strip_ansi_exports));
2401 var {
2402 default: chalk2,
2403 chalkStderr: chalkStderr2
2404 } = (init_source(), __toCommonJS(source_exports));
2405 var countLines = (stream, text) => {
2406 const columns = stream.columns || 80;
2407 let lineCount = 0;
2408 for (const line of stripAnsi2(text).split("\n")) {
2409 lineCount += Math.max(1, Math.ceil(wcwidth(line) / columns));
2410 }
2411 return lineCount;
2412 };
2413 var clear = (stream, text) => () => {
2414 const lineCount = countLines(stream, text);
2415 for (let line = 0; line < lineCount; line++) {
2416 if (line > 0) {
2417 readline.moveCursor(stream, 0, -1);
2418 }
2419 readline.clearLine(stream, 0);
2420 readline.cursorTo(stream, 0);
2421 }
2422 };
2423 var emptyLogResult = {
2424 clear() {
2425 }
2426 };
2427 function createLogger2(logLevel = "log") {
2428 return {
2429 logLevel,
2430 warn: createLogFunc("warn", "yellow"),
2431 error: createLogFunc("error", "red"),
2432 debug: createLogFunc("debug", "blue"),
2433 log: createLogFunc("log")
2434 };
2435 function createLogFunc(loggerName, color) {
2436 if (!shouldLog(loggerName)) {
2437 return () => emptyLogResult;
2438 }
2439 const stream = process[loggerName === "log" ? "stdout" : "stderr"];
2440 const chalkInstance = loggerName === "log" ? chalk2 : chalkStderr2;
2441 const prefix = color ? `[${chalkInstance[color](loggerName)}] ` : "";
2442 return (message, options) => {
2443 options = Object.assign({
2444 newline: true,
2445 clearable: false
2446 }, options);
2447 message = message.replace(/^/gm, prefix) + (options.newline ? "\n" : "");
2448 stream.write(message);
2449 if (options.clearable) {
2450 return {
2451 clear: clear(stream, message)
2452 };
2453 }
2454 };
2455 }
2456 function shouldLog(loggerName) {
2457 switch (logLevel) {
2458 case "silent":
2459 return false;
2460 case "debug":
2461 if (loggerName === "debug") {
2462 return true;
2463 }
2464 case "log":
2465 if (loggerName === "log") {
2466 return true;
2467 }
2468 case "warn":
2469 if (loggerName === "warn") {
2470 return true;
2471 }
2472 case "error":
2473 return loggerName === "error";
2474 }
2475 }
2476 }
2477 module2.exports = createLogger2;
2478 }
2479});
2480var require_prettier_internal = __commonJS2({
2481 "src/cli/prettier-internal.js"(exports2, module2) {
2482 "use strict";
2483 module2.exports = require("./index.js").__internal;
2484 }
2485});
2486var require_lib = __commonJS2({
2487 "node_modules/outdent/lib/index.js"(exports2, module2) {
2488 "use strict";
2489 Object.defineProperty(exports2, "__esModule", {
2490 value: true
2491 });
2492 exports2.outdent = void 0;
2493 function noop() {
2494 var args = [];
2495 for (var _i = 0; _i < arguments.length; _i++) {
2496 args[_i] = arguments[_i];
2497 }
2498 }
2499 function createWeakMap() {
2500 if (typeof WeakMap !== "undefined") {
2501 return /* @__PURE__ */ new WeakMap();
2502 } else {
2503 return fakeSetOrMap();
2504 }
2505 }
2506 function fakeSetOrMap() {
2507 return {
2508 add: noop,
2509 delete: noop,
2510 get: noop,
2511 set: noop,
2512 has: function(k) {
2513 return false;
2514 }
2515 };
2516 }
2517 var hop = Object.prototype.hasOwnProperty;
2518 var has = function(obj, prop) {
2519 return hop.call(obj, prop);
2520 };
2521 function extend(target, source) {
2522 for (var prop in source) {
2523 if (has(source, prop)) {
2524 target[prop] = source[prop];
2525 }
2526 }
2527 return target;
2528 }
2529 var reLeadingNewline = /^[ \t]*(?:\r\n|\r|\n)/;
2530 var reTrailingNewline = /(?:\r\n|\r|\n)[ \t]*$/;
2531 var reStartsWithNewlineOrIsEmpty = /^(?:[\r\n]|$)/;
2532 var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
2533 var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
2534 function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
2535 var indentationLevel = 0;
2536 var match = strings[0].match(reDetectIndentation);
2537 if (match) {
2538 indentationLevel = match[1].length;
2539 }
2540 var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
2541 var reMatchIndent = new RegExp(reSource, "g");
2542 if (firstInterpolatedValueSetsIndentationLevel) {
2543 strings = strings.slice(1);
2544 }
2545 var newline = options.newline, trimLeadingNewline = options.trimLeadingNewline, trimTrailingNewline = options.trimTrailingNewline;
2546 var normalizeNewlines = typeof newline === "string";
2547 var l = strings.length;
2548 var outdentedStrings = strings.map(function(v, i) {
2549 v = v.replace(reMatchIndent, "$1");
2550 if (i === 0 && trimLeadingNewline) {
2551 v = v.replace(reLeadingNewline, "");
2552 }
2553 if (i === l - 1 && trimTrailingNewline) {
2554 v = v.replace(reTrailingNewline, "");
2555 }
2556 if (normalizeNewlines) {
2557 v = v.replace(/\r\n|\n|\r/g, function(_) {
2558 return newline;
2559 });
2560 }
2561 return v;
2562 });
2563 return outdentedStrings;
2564 }
2565 function concatStringsAndValues(strings, values) {
2566 var ret = "";
2567 for (var i = 0, l = strings.length; i < l; i++) {
2568 ret += strings[i];
2569 if (i < l - 1) {
2570 ret += values[i];
2571 }
2572 }
2573 return ret;
2574 }
2575 function isTemplateStringsArray(v) {
2576 return has(v, "raw") && has(v, "length");
2577 }
2578 function createInstance(options) {
2579 var arrayAutoIndentCache = createWeakMap();
2580 var arrayFirstInterpSetsIndentCache = createWeakMap();
2581 function outdent(stringsOrOptions) {
2582 var values = [];
2583 for (var _i = 1; _i < arguments.length; _i++) {
2584 values[_i - 1] = arguments[_i];
2585 }
2586 if (isTemplateStringsArray(stringsOrOptions)) {
2587 var strings = stringsOrOptions;
2588 var firstInterpolatedValueSetsIndentationLevel = (values[0] === outdent || values[0] === defaultOutdent) && reOnlyWhitespaceWithAtLeastOneNewline.test(strings[0]) && reStartsWithNewlineOrIsEmpty.test(strings[1]);
2589 var cache = firstInterpolatedValueSetsIndentationLevel ? arrayFirstInterpSetsIndentCache : arrayAutoIndentCache;
2590 var renderedArray = cache.get(strings);
2591 if (!renderedArray) {
2592 renderedArray = _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options);
2593 cache.set(strings, renderedArray);
2594 }
2595 if (values.length === 0) {
2596 return renderedArray[0];
2597 }
2598 var rendered = concatStringsAndValues(renderedArray, firstInterpolatedValueSetsIndentationLevel ? values.slice(1) : values);
2599 return rendered;
2600 } else {
2601 return createInstance(extend(extend({}, options), stringsOrOptions || {}));
2602 }
2603 }
2604 var fullOutdent = extend(outdent, {
2605 string: function(str) {
2606 return _outdentArray([str], false, options)[0];
2607 }
2608 });
2609 return fullOutdent;
2610 }
2611 var defaultOutdent = createInstance({
2612 trimLeadingNewline: true,
2613 trimTrailingNewline: true
2614 });
2615 exports2.outdent = defaultOutdent;
2616 exports2.default = defaultOutdent;
2617 if (typeof module2 !== "undefined") {
2618 try {
2619 module2.exports = defaultOutdent;
2620 Object.defineProperty(defaultOutdent, "__esModule", {
2621 value: true
2622 });
2623 defaultOutdent.default = defaultOutdent;
2624 defaultOutdent.outdent = defaultOutdent;
2625 } catch (e) {
2626 }
2627 }
2628 }
2629});
2630var require_constant = __commonJS2({
2631 "src/cli/constant.js"(exports2, module2) {
2632 "use strict";
2633 var {
2634 outdent
2635 } = require_lib();
2636 var {
2637 coreOptions
2638 } = require_prettier_internal();
2639 var categoryOrder = [coreOptions.CATEGORY_OUTPUT, coreOptions.CATEGORY_FORMAT, coreOptions.CATEGORY_CONFIG, coreOptions.CATEGORY_EDITOR, coreOptions.CATEGORY_OTHER];
2640 var options = {
2641 cache: {
2642 default: false,
2643 description: "Only format changed files. Cannot use with --stdin-filepath.",
2644 type: "boolean"
2645 },
2646 "cache-location": {
2647 description: "Path to the cache file.",
2648 type: "path"
2649 },
2650 "cache-strategy": {
2651 choices: [{
2652 description: "Use the file metadata such as timestamps as cache keys",
2653 value: "metadata"
2654 }, {
2655 description: "Use the file content as cache keys",
2656 value: "content"
2657 }],
2658 description: "Strategy for the cache to use for detecting changed files.",
2659 type: "choice"
2660 },
2661 check: {
2662 alias: "c",
2663 category: coreOptions.CATEGORY_OUTPUT,
2664 description: outdent`
2665 Check if the given files are formatted, print a human-friendly summary
2666 message and paths to unformatted files (see also --list-different).
2667 `,
2668 type: "boolean"
2669 },
2670 color: {
2671 default: true,
2672 description: "Colorize error messages.",
2673 oppositeDescription: "Do not colorize error messages.",
2674 type: "boolean"
2675 },
2676 config: {
2677 category: coreOptions.CATEGORY_CONFIG,
2678 description: "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).",
2679 exception: (value) => value === false,
2680 oppositeDescription: "Do not look for a configuration file.",
2681 type: "path"
2682 },
2683 "config-precedence": {
2684 category: coreOptions.CATEGORY_CONFIG,
2685 choices: [{
2686 description: "CLI options take precedence over config file",
2687 value: "cli-override"
2688 }, {
2689 description: "Config file take precedence over CLI options",
2690 value: "file-override"
2691 }, {
2692 description: outdent`
2693 If a config file is found will evaluate it and ignore other CLI options.
2694 If no config file is found CLI options will evaluate as normal.
2695 `,
2696 value: "prefer-file"
2697 }],
2698 default: "cli-override",
2699 description: "Define in which order config files and CLI options should be evaluated.",
2700 type: "choice"
2701 },
2702 "debug-benchmark": {
2703 type: "boolean"
2704 },
2705 "debug-check": {
2706 type: "boolean"
2707 },
2708 "debug-print-ast": {
2709 type: "boolean"
2710 },
2711 "debug-print-comments": {
2712 type: "boolean"
2713 },
2714 "debug-print-doc": {
2715 type: "boolean"
2716 },
2717 "debug-repeat": {
2718 default: 0,
2719 type: "int"
2720 },
2721 editorconfig: {
2722 category: coreOptions.CATEGORY_CONFIG,
2723 default: true,
2724 description: "Take .editorconfig into account when parsing configuration.",
2725 oppositeDescription: "Don't take .editorconfig into account when parsing configuration.",
2726 type: "boolean"
2727 },
2728 "error-on-unmatched-pattern": {
2729 oppositeDescription: "Prevent errors when pattern is unmatched.",
2730 type: "boolean"
2731 },
2732 "file-info": {
2733 description: outdent`
2734 Extract the following info (as JSON) for a given file path. Reported fields:
2735 * ignored (boolean) - true if file path is filtered by --ignore-path
2736 * inferredParser (string | null) - name of parser inferred from file path
2737 `,
2738 type: "path"
2739 },
2740 "find-config-path": {
2741 category: coreOptions.CATEGORY_CONFIG,
2742 description: "Find and print the path to a configuration file for the given input file.",
2743 type: "path"
2744 },
2745 help: {
2746 alias: "h",
2747 description: outdent`
2748 Show CLI usage, or details about the given flag.
2749 Example: --help write
2750 `,
2751 exception: (value) => value === "",
2752 type: "flag"
2753 },
2754 "ignore-path": {
2755 category: coreOptions.CATEGORY_CONFIG,
2756 default: ".prettierignore",
2757 description: "Path to a file with patterns describing files to ignore.",
2758 type: "path"
2759 },
2760 "ignore-unknown": {
2761 alias: "u",
2762 description: "Ignore unknown files.",
2763 type: "boolean"
2764 },
2765 "list-different": {
2766 alias: "l",
2767 category: coreOptions.CATEGORY_OUTPUT,
2768 description: "Print the names of files that are different from Prettier's formatting (see also --check).",
2769 type: "boolean"
2770 },
2771 loglevel: {
2772 choices: ["silent", "error", "warn", "log", "debug"],
2773 default: "log",
2774 description: "What level of logs to report.",
2775 type: "choice"
2776 },
2777 "plugin-search": {
2778 oppositeDescription: "Disable plugin autoloading.",
2779 type: "boolean"
2780 },
2781 "support-info": {
2782 description: "Print support information as JSON.",
2783 type: "boolean"
2784 },
2785 version: {
2786 alias: "v",
2787 description: "Print Prettier version.",
2788 type: "boolean"
2789 },
2790 "with-node-modules": {
2791 category: coreOptions.CATEGORY_CONFIG,
2792 description: "Process files inside 'node_modules' directory.",
2793 type: "boolean"
2794 },
2795 write: {
2796 alias: "w",
2797 category: coreOptions.CATEGORY_OUTPUT,
2798 description: "Edit files in-place. (Beware!)",
2799 type: "boolean"
2800 }
2801 };
2802 var usageSummary = outdent`
2803 Usage: prettier [options] [file/dir/glob ...]
2804
2805 By default, output is written to stdout.
2806 Stdin is read if it is piped to Prettier and no files are given.
2807`;
2808 module2.exports = {
2809 categoryOrder,
2810 options,
2811 usageSummary
2812 };
2813 }
2814});
2815var require_dashify = __commonJS2({
2816 "node_modules/dashify/index.js"(exports2, module2) {
2817 "use strict";
2818 module2.exports = (str, options) => {
2819 if (typeof str !== "string")
2820 throw new TypeError("expected a string");
2821 return str.trim().replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\W/g, (m) => /[À-ž]/.test(m) ? m : "-").replace(/^-+|-+$/g, "").replace(/-{2,}/g, (m) => options && options.condense ? "-" : m).toLowerCase();
2822 };
2823 }
2824});
2825var require_option_map = __commonJS2({
2826 "src/cli/options/option-map.js"(exports2, module2) {
2827 "use strict";
2828 var dashify = require_dashify();
2829 var {
2830 coreOptions
2831 } = require_prettier_internal();
2832 function normalizeDetailedOption(name, option) {
2833 return Object.assign(Object.assign({
2834 category: coreOptions.CATEGORY_OTHER
2835 }, option), {}, {
2836 choices: option.choices && option.choices.map((choice) => {
2837 const newChoice = Object.assign({
2838 description: "",
2839 deprecated: false
2840 }, typeof choice === "object" ? choice : {
2841 value: choice
2842 });
2843 if (newChoice.value === true) {
2844 newChoice.value = "";
2845 }
2846 return newChoice;
2847 })
2848 });
2849 }
2850 function normalizeDetailedOptionMap(detailedOptionMap) {
2851 return Object.fromEntries(Object.entries(detailedOptionMap).sort(([leftName], [rightName]) => leftName.localeCompare(rightName)).map(([name, option]) => [name, normalizeDetailedOption(name, option)]));
2852 }
2853 function createDetailedOptionMap(supportOptions) {
2854 return Object.fromEntries(supportOptions.map((option) => {
2855 const newOption = Object.assign(Object.assign({}, option), {}, {
2856 name: option.cliName || dashify(option.name),
2857 description: option.cliDescription || option.description,
2858 category: option.cliCategory || coreOptions.CATEGORY_FORMAT,
2859 forwardToApi: option.name
2860 });
2861 if (option.deprecated) {
2862 delete newOption.forwardToApi;
2863 delete newOption.description;
2864 delete newOption.oppositeDescription;
2865 newOption.deprecated = true;
2866 }
2867 return [newOption.name, newOption];
2868 }));
2869 }
2870 module2.exports = {
2871 normalizeDetailedOptionMap,
2872 createDetailedOptionMap
2873 };
2874 }
2875});
2876var require_get_context_options = __commonJS2({
2877 "src/cli/options/get-context-options.js"(exports2, module2) {
2878 "use strict";
2879 var prettier2 = require("./index.js");
2880 var {
2881 optionsModule,
2882 utils: {
2883 arrayify
2884 }
2885 } = require_prettier_internal();
2886 var constant = require_constant();
2887 var {
2888 normalizeDetailedOptionMap,
2889 createDetailedOptionMap
2890 } = require_option_map();
2891 function getContextOptions(plugins, pluginSearchDirs) {
2892 const {
2893 options: supportOptions,
2894 languages
2895 } = prettier2.getSupportInfo({
2896 showDeprecated: true,
2897 showUnreleased: true,
2898 showInternal: true,
2899 plugins,
2900 pluginSearchDirs
2901 });
2902 const detailedOptionMap = normalizeDetailedOptionMap(Object.assign(Object.assign({}, createDetailedOptionMap(supportOptions)), constant.options));
2903 const detailedOptions = arrayify(detailedOptionMap, "name");
2904 const apiDefaultOptions = Object.assign(Object.assign({}, optionsModule.hiddenDefaults), Object.fromEntries(supportOptions.filter(({
2905 deprecated
2906 }) => !deprecated).map((option) => [option.name, option.default])));
2907 return {
2908 supportOptions,
2909 detailedOptions,
2910 detailedOptionMap,
2911 apiDefaultOptions,
2912 languages
2913 };
2914 }
2915 module2.exports = getContextOptions;
2916 }
2917});
2918var require_camelcase = __commonJS2({
2919 "node_modules/camelcase/index.js"(exports2, module2) {
2920 "use strict";
2921 var UPPERCASE = /[\p{Lu}]/u;
2922 var LOWERCASE = /[\p{Ll}]/u;
2923 var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
2924 var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
2925 var SEPARATORS = /[_.\- ]+/;
2926 var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
2927 var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
2928 var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
2929 var preserveCamelCase = (string, toLowerCase, toUpperCase) => {
2930 let isLastCharLower = false;
2931 let isLastCharUpper = false;
2932 let isLastLastCharUpper = false;
2933 for (let i = 0; i < string.length; i++) {
2934 const character = string[i];
2935 if (isLastCharLower && UPPERCASE.test(character)) {
2936 string = string.slice(0, i) + "-" + string.slice(i);
2937 isLastCharLower = false;
2938 isLastLastCharUpper = isLastCharUpper;
2939 isLastCharUpper = true;
2940 i++;
2941 } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
2942 string = string.slice(0, i - 1) + "-" + string.slice(i - 1);
2943 isLastLastCharUpper = isLastCharUpper;
2944 isLastCharUpper = false;
2945 isLastCharLower = true;
2946 } else {
2947 isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
2948 isLastLastCharUpper = isLastCharUpper;
2949 isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
2950 }
2951 }
2952 return string;
2953 };
2954 var preserveConsecutiveUppercase = (input, toLowerCase) => {
2955 LEADING_CAPITAL.lastIndex = 0;
2956 return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
2957 };
2958 var postProcess = (input, toUpperCase) => {
2959 SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
2960 NUMBERS_AND_IDENTIFIER.lastIndex = 0;
2961 return input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
2962 };
2963 var camelCase = (input, options) => {
2964 if (!(typeof input === "string" || Array.isArray(input))) {
2965 throw new TypeError("Expected the input to be `string | string[]`");
2966 }
2967 options = Object.assign({
2968 pascalCase: false,
2969 preserveConsecutiveUppercase: false
2970 }, options);
2971 if (Array.isArray(input)) {
2972 input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
2973 } else {
2974 input = input.trim();
2975 }
2976 if (input.length === 0) {
2977 return "";
2978 }
2979 const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
2980 const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
2981 if (input.length === 1) {
2982 return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
2983 }
2984 const hasUpperCase = input !== toLowerCase(input);
2985 if (hasUpperCase) {
2986 input = preserveCamelCase(input, toLowerCase, toUpperCase);
2987 }
2988 input = input.replace(LEADING_SEPARATORS, "");
2989 if (options.preserveConsecutiveUppercase) {
2990 input = preserveConsecutiveUppercase(input, toLowerCase);
2991 } else {
2992 input = toLowerCase(input);
2993 }
2994 if (options.pascalCase) {
2995 input = toUpperCase(input.charAt(0)) + input.slice(1);
2996 }
2997 return postProcess(input, toUpperCase);
2998 };
2999 module2.exports = camelCase;
3000 module2.exports.default = camelCase;
3001 }
3002});
3003var sdbm_exports = {};
3004__export(sdbm_exports, {
3005 default: () => sdbm
3006});
3007function sdbm(string) {
3008 let hash = 0;
3009 for (let i = 0; i < string.length; i++) {
3010 hash = string.charCodeAt(i) + (hash << 6) + (hash << 16) - hash;
3011 }
3012 return hash >>> 0;
3013}
3014var init_sdbm = __esm({
3015 "node_modules/sdbm/index.js"() {
3016 }
3017});
3018var require_utils = __commonJS2({
3019 "src/cli/utils.js"(exports2, module2) {
3020 "use strict";
3021 var {
3022 promises: fs
3023 } = require("fs");
3024 var {
3025 default: sdbm2
3026 } = (init_sdbm(), __toCommonJS(sdbm_exports));
3027 var printToScreen2 = console.log.bind(console);
3028 function groupBy(array2, iteratee) {
3029 const result = /* @__PURE__ */ Object.create(null);
3030 for (const value of array2) {
3031 const key = iteratee(value);
3032 if (Array.isArray(result[key])) {
3033 result[key].push(value);
3034 } else {
3035 result[key] = [value];
3036 }
3037 }
3038 return result;
3039 }
3040 function pick(object, keys) {
3041 const entries = keys.map((key) => [key, object[key]]);
3042 return Object.fromEntries(entries);
3043 }
3044 function createHash(source) {
3045 return String(sdbm2(source));
3046 }
3047 async function statSafe(filePath) {
3048 try {
3049 return await fs.stat(filePath);
3050 } catch (error) {
3051 if (error.code !== "ENOENT") {
3052 throw error;
3053 }
3054 }
3055 }
3056 function isJson(value) {
3057 try {
3058 JSON.parse(value);
3059 return true;
3060 } catch {
3061 return false;
3062 }
3063 }
3064 module2.exports = {
3065 printToScreen: printToScreen2,
3066 groupBy,
3067 pick,
3068 createHash,
3069 statSafe,
3070 isJson
3071 };
3072 }
3073});
3074var require_minimist = __commonJS2({
3075 "node_modules/minimist/index.js"(exports2, module2) {
3076 module2.exports = function(args, opts) {
3077 if (!opts)
3078 opts = {};
3079 var flags = {
3080 bools: {},
3081 strings: {},
3082 unknownFn: null
3083 };
3084 if (typeof opts["unknown"] === "function") {
3085 flags.unknownFn = opts["unknown"];
3086 }
3087 if (typeof opts["boolean"] === "boolean" && opts["boolean"]) {
3088 flags.allBools = true;
3089 } else {
3090 [].concat(opts["boolean"]).filter(Boolean).forEach(function(key2) {
3091 flags.bools[key2] = true;
3092 });
3093 }
3094 var aliases = {};
3095 Object.keys(opts.alias || {}).forEach(function(key2) {
3096 aliases[key2] = [].concat(opts.alias[key2]);
3097 aliases[key2].forEach(function(x) {
3098 aliases[x] = [key2].concat(aliases[key2].filter(function(y) {
3099 return x !== y;
3100 }));
3101 });
3102 });
3103 [].concat(opts.string).filter(Boolean).forEach(function(key2) {
3104 flags.strings[key2] = true;
3105 if (aliases[key2]) {
3106 flags.strings[aliases[key2]] = true;
3107 }
3108 });
3109 var defaults = opts["default"] || {};
3110 var argv = {
3111 _: []
3112 };
3113 Object.keys(flags.bools).forEach(function(key2) {
3114 setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]);
3115 });
3116 var notFlags = [];
3117 if (args.indexOf("--") !== -1) {
3118 notFlags = args.slice(args.indexOf("--") + 1);
3119 args = args.slice(0, args.indexOf("--"));
3120 }
3121 function argDefined(key2, arg2) {
3122 return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2];
3123 }
3124 function setArg(key2, val, arg2) {
3125 if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) {
3126 if (flags.unknownFn(arg2) === false)
3127 return;
3128 }
3129 var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val;
3130 setKey(argv, key2.split("."), value2);
3131 (aliases[key2] || []).forEach(function(x) {
3132 setKey(argv, x.split("."), value2);
3133 });
3134 }
3135 function setKey(obj, keys, value2) {
3136 var o = obj;
3137 for (var i2 = 0; i2 < keys.length - 1; i2++) {
3138 var key2 = keys[i2];
3139 if (isConstructorOrProto(o, key2))
3140 return;
3141 if (o[key2] === void 0)
3142 o[key2] = {};
3143 if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype)
3144 o[key2] = {};
3145 if (o[key2] === Array.prototype)
3146 o[key2] = [];
3147 o = o[key2];
3148 }
3149 var key2 = keys[keys.length - 1];
3150 if (isConstructorOrProto(o, key2))
3151 return;
3152 if (o === Object.prototype || o === Number.prototype || o === String.prototype)
3153 o = {};
3154 if (o === Array.prototype)
3155 o = [];
3156 if (o[key2] === void 0 || flags.bools[key2] || typeof o[key2] === "boolean") {
3157 o[key2] = value2;
3158 } else if (Array.isArray(o[key2])) {
3159 o[key2].push(value2);
3160 } else {
3161 o[key2] = [o[key2], value2];
3162 }
3163 }
3164 function aliasIsBoolean(key2) {
3165 return aliases[key2].some(function(x) {
3166 return flags.bools[x];
3167 });
3168 }
3169 for (var i = 0; i < args.length; i++) {
3170 var arg = args[i];
3171 if (/^--.+=/.test(arg)) {
3172 var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
3173 var key = m[1];
3174 var value = m[2];
3175 if (flags.bools[key]) {
3176 value = value !== "false";
3177 }
3178 setArg(key, value, arg);
3179 } else if (/^--no-.+/.test(arg)) {
3180 var key = arg.match(/^--no-(.+)/)[1];
3181 setArg(key, false, arg);
3182 } else if (/^--.+/.test(arg)) {
3183 var key = arg.match(/^--(.+)/)[1];
3184 var next = args[i + 1];
3185 if (next !== void 0 && !/^-/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) {
3186 setArg(key, next, arg);
3187 i++;
3188 } else if (/^(true|false)$/.test(next)) {
3189 setArg(key, next === "true", arg);
3190 i++;
3191 } else {
3192 setArg(key, flags.strings[key] ? "" : true, arg);
3193 }
3194 } else if (/^-[^-]+/.test(arg)) {
3195 var letters = arg.slice(1, -1).split("");
3196 var broken = false;
3197 for (var j = 0; j < letters.length; j++) {
3198 var next = arg.slice(j + 2);
3199 if (next === "-") {
3200 setArg(letters[j], next, arg);
3201 continue;
3202 }
3203 if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
3204 setArg(letters[j], next.split("=")[1], arg);
3205 broken = true;
3206 break;
3207 }
3208 if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
3209 setArg(letters[j], next, arg);
3210 broken = true;
3211 break;
3212 }
3213 if (letters[j + 1] && letters[j + 1].match(/\W/)) {
3214 setArg(letters[j], arg.slice(j + 2), arg);
3215 broken = true;
3216 break;
3217 } else {
3218 setArg(letters[j], flags.strings[letters[j]] ? "" : true, arg);
3219 }
3220 }
3221 var key = arg.slice(-1)[0];
3222 if (!broken && key !== "-") {
3223 if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
3224 setArg(key, args[i + 1], arg);
3225 i++;
3226 } else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
3227 setArg(key, args[i + 1] === "true", arg);
3228 i++;
3229 } else {
3230 setArg(key, flags.strings[key] ? "" : true, arg);
3231 }
3232 }
3233 } else {
3234 if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
3235 argv._.push(flags.strings["_"] || !isNumber(arg) ? arg : Number(arg));
3236 }
3237 if (opts.stopEarly) {
3238 argv._.push.apply(argv._, args.slice(i + 1));
3239 break;
3240 }
3241 }
3242 }
3243 Object.keys(defaults).forEach(function(key2) {
3244 if (!hasKey(argv, key2.split("."))) {
3245 setKey(argv, key2.split("."), defaults[key2]);
3246 (aliases[key2] || []).forEach(function(x) {
3247 setKey(argv, x.split("."), defaults[key2]);
3248 });
3249 }
3250 });
3251 if (opts["--"]) {
3252 argv["--"] = new Array();
3253 notFlags.forEach(function(key2) {
3254 argv["--"].push(key2);
3255 });
3256 } else {
3257 notFlags.forEach(function(key2) {
3258 argv._.push(key2);
3259 });
3260 }
3261 return argv;
3262 };
3263 function hasKey(obj, keys) {
3264 var o = obj;
3265 keys.slice(0, -1).forEach(function(key2) {
3266 o = o[key2] || {};
3267 });
3268 var key = keys[keys.length - 1];
3269 return key in o;
3270 }
3271 function isNumber(x) {
3272 if (typeof x === "number")
3273 return true;
3274 if (/^0x[0-9a-f]+$/i.test(x))
3275 return true;
3276 return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
3277 }
3278 function isConstructorOrProto(obj, key) {
3279 return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
3280 }
3281 }
3282});
3283var require_minimist2 = __commonJS2({
3284 "src/cli/options/minimist.js"(exports2, module2) {
3285 "use strict";
3286 var minimist = require_minimist();
3287 var PLACEHOLDER = null;
3288 module2.exports = function(args, options) {
3289 const boolean = options.boolean || [];
3290 const defaults = options.default || {};
3291 const booleanWithoutDefault = boolean.filter((key) => !(key in defaults));
3292 const newDefaults = Object.assign(Object.assign({}, defaults), Object.fromEntries(booleanWithoutDefault.map((key) => [key, PLACEHOLDER])));
3293 const parsed = minimist(args, Object.assign(Object.assign({}, options), {}, {
3294 default: newDefaults
3295 }));
3296 return Object.fromEntries(Object.entries(parsed).filter(([, value]) => value !== PLACEHOLDER));
3297 };
3298 }
3299});
3300var require_create_minimist_options = __commonJS2({
3301 "src/cli/options/create-minimist-options.js"(exports2, module2) {
3302 "use strict";
3303 var {
3304 utils: {
3305 partition
3306 }
3307 } = require_prettier_internal();
3308 module2.exports = function createMinimistOptions(detailedOptions) {
3309 const [boolean, string] = partition(detailedOptions, ({
3310 type
3311 }) => type === "boolean").map((detailedOptions2) => detailedOptions2.flatMap(({
3312 name,
3313 alias
3314 }) => alias ? [name, alias] : [name]));
3315 const defaults = Object.fromEntries(detailedOptions.filter((option) => !option.deprecated && (!option.forwardToApi || option.name === "plugin" || option.name === "plugin-search-dir") && option.default !== void 0).map((option) => [option.name, option.default]));
3316 return {
3317 alias: {},
3318 boolean,
3319 string,
3320 default: defaults
3321 };
3322 };
3323 }
3324});
3325var leven_exports = {};
3326__export(leven_exports, {
3327 default: () => leven
3328});
3329function leven(first, second) {
3330 if (first === second) {
3331 return 0;
3332 }
3333 const swap = first;
3334 if (first.length > second.length) {
3335 first = second;
3336 second = swap;
3337 }
3338 let firstLength = first.length;
3339 let secondLength = second.length;
3340 while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) {
3341 firstLength--;
3342 secondLength--;
3343 }
3344 let start = 0;
3345 while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) {
3346 start++;
3347 }
3348 firstLength -= start;
3349 secondLength -= start;
3350 if (firstLength === 0) {
3351 return secondLength;
3352 }
3353 let bCharacterCode;
3354 let result;
3355 let temporary;
3356 let temporary2;
3357 let index = 0;
3358 let index2 = 0;
3359 while (index < firstLength) {
3360 characterCodeCache[index] = first.charCodeAt(start + index);
3361 array[index] = ++index;
3362 }
3363 while (index2 < secondLength) {
3364 bCharacterCode = second.charCodeAt(start + index2);
3365 temporary = index2++;
3366 result = index2;
3367 for (index = 0; index < firstLength; index++) {
3368 temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1;
3369 temporary = array[index];
3370 result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2;
3371 }
3372 }
3373 return result;
3374}
3375var array;
3376var characterCodeCache;
3377var init_leven = __esm({
3378 "node_modules/leven/index.js"() {
3379 array = [];
3380 characterCodeCache = [];
3381 }
3382});
3383var require_normalize_cli_options = __commonJS2({
3384 "src/cli/options/normalize-cli-options.js"(exports2, module2) {
3385 "use strict";
3386 var {
3387 default: chalk2
3388 } = (init_source(), __toCommonJS(source_exports));
3389 var {
3390 default: leven2
3391 } = (init_leven(), __toCommonJS(leven_exports));
3392 var {
3393 optionsNormalizer
3394 } = require_prettier_internal();
3395 function normalizeCliOptions(options, optionInfos, opts) {
3396 return optionsNormalizer.normalizeCliOptions(options, optionInfos, Object.assign({
3397 colorsModule: chalk2,
3398 levenshteinDistance: leven2
3399 }, opts));
3400 }
3401 module2.exports = normalizeCliOptions;
3402 }
3403});
3404var require_parse_cli_arguments = __commonJS2({
3405 "src/cli/options/parse-cli-arguments.js"(exports2, module2) {
3406 "use strict";
3407 var camelCase = require_camelcase();
3408 var {
3409 pick
3410 } = require_utils();
3411 var getContextOptions = require_get_context_options();
3412 var minimist = require_minimist2();
3413 var createMinimistOptions = require_create_minimist_options();
3414 var normalizeCliOptions = require_normalize_cli_options();
3415 function parseArgv(rawArguments, detailedOptions, logger, keys) {
3416 const minimistOptions = createMinimistOptions(detailedOptions);
3417 let argv = minimist(rawArguments, minimistOptions);
3418 if (keys) {
3419 if (keys.includes("plugin-search-dir") && !keys.includes("plugin-search")) {
3420 keys.push("plugin-search");
3421 }
3422 detailedOptions = detailedOptions.filter((option) => keys.includes(option.name));
3423 argv = pick(argv, keys);
3424 }
3425 const normalized = normalizeCliOptions(argv, detailedOptions, {
3426 logger
3427 });
3428 return Object.assign(Object.assign({}, Object.fromEntries(Object.entries(normalized).map(([key, value]) => {
3429 const option = detailedOptions.find(({
3430 name
3431 }) => name === key) || {};
3432 return [option.forwardToApi || camelCase(key), value];
3433 }))), {}, {
3434 get __raw() {
3435 return argv;
3436 }
3437 });
3438 }
3439 var detailedOptionsWithoutPlugins = getContextOptions([], false).detailedOptions;
3440 function parseArgvWithoutPlugins2(rawArguments, logger, keys) {
3441 return parseArgv(rawArguments, detailedOptionsWithoutPlugins, logger, typeof keys === "string" ? [keys] : keys);
3442 }
3443 module2.exports = {
3444 parseArgv,
3445 parseArgvWithoutPlugins: parseArgvWithoutPlugins2
3446 };
3447 }
3448});
3449var require_context = __commonJS2({
3450 "src/cli/context.js"(exports2, module2) {
3451 "use strict";
3452 var {
3453 utils: {
3454 getLast
3455 }
3456 } = require_prettier_internal();
3457 var getContextOptions = require_get_context_options();
3458 var {
3459 parseArgv,
3460 parseArgvWithoutPlugins: parseArgvWithoutPlugins2
3461 } = require_parse_cli_arguments();
3462 var Context2 = class {
3463 constructor({
3464 rawArguments,
3465 logger
3466 }) {
3467 this.rawArguments = rawArguments;
3468 this.logger = logger;
3469 this.stack = [];
3470 const {
3471 plugins,
3472 pluginSearchDirs
3473 } = parseArgvWithoutPlugins2(rawArguments, logger, ["plugin", "plugin-search-dir"]);
3474 this.pushContextPlugins(plugins, pluginSearchDirs);
3475 const argv = parseArgv(rawArguments, this.detailedOptions, logger);
3476 this.argv = argv;
3477 this.filePatterns = argv._.map(String);
3478 }
3479 pushContextPlugins(plugins, pluginSearchDirs) {
3480 const options = getContextOptions(plugins, pluginSearchDirs);
3481 this.stack.push(options);
3482 Object.assign(this, options);
3483 }
3484 popContextPlugins() {
3485 this.stack.pop();
3486 Object.assign(this, getLast(this.stack));
3487 }
3488 get performanceTestFlag() {
3489 const {
3490 debugBenchmark,
3491 debugRepeat
3492 } = this.argv;
3493 if (debugBenchmark) {
3494 return {
3495 name: "--debug-benchmark",
3496 debugBenchmark: true
3497 };
3498 }
3499 if (debugRepeat > 0) {
3500 return {
3501 name: "--debug-repeat",
3502 debugRepeat
3503 };
3504 }
3505 const {
3506 PRETTIER_PERF_REPEAT
3507 } = process.env;
3508 if (PRETTIER_PERF_REPEAT && /^\d+$/.test(PRETTIER_PERF_REPEAT)) {
3509 return {
3510 name: "PRETTIER_PERF_REPEAT (environment variable)",
3511 debugRepeat: Number(PRETTIER_PERF_REPEAT)
3512 };
3513 }
3514 }
3515 };
3516 module2.exports = Context2;
3517 }
3518});
3519var require_usage = __commonJS2({
3520 "src/cli/usage.js"(exports2, module2) {
3521 "use strict";
3522 var camelCase = require_camelcase();
3523 var constant = require_constant();
3524 var {
3525 groupBy
3526 } = require_utils();
3527 var OPTION_USAGE_THRESHOLD = 25;
3528 var CHOICE_USAGE_MARGIN = 3;
3529 var CHOICE_USAGE_INDENTATION = 2;
3530 function indent(str, spaces) {
3531 return str.replace(/^/gm, " ".repeat(spaces));
3532 }
3533 function createDefaultValueDisplay(value) {
3534 return Array.isArray(value) ? `[${value.map(createDefaultValueDisplay).join(", ")}]` : value;
3535 }
3536 function getOptionDefaultValue(context, optionName) {
3537 if (!(optionName in context.detailedOptionMap)) {
3538 return;
3539 }
3540 const option = context.detailedOptionMap[optionName];
3541 if (option.default !== void 0) {
3542 return option.default;
3543 }
3544 const optionCamelName = camelCase(optionName);
3545 if (optionCamelName in context.apiDefaultOptions) {
3546 return context.apiDefaultOptions[optionCamelName];
3547 }
3548 }
3549 function createOptionUsageHeader(option) {
3550 const name = `--${option.name}`;
3551 const alias = option.alias ? `-${option.alias},` : null;
3552 const type = createOptionUsageType(option);
3553 return [alias, name, type].filter(Boolean).join(" ");
3554 }
3555 function createOptionUsageRow(header, content, threshold) {
3556 const separator = header.length >= threshold ? `
3557${" ".repeat(threshold)}` : " ".repeat(threshold - header.length);
3558 const description = content.replace(/\n/g, `
3559${" ".repeat(threshold)}`);
3560 return `${header}${separator}${description}`;
3561 }
3562 function createOptionUsageType(option) {
3563 switch (option.type) {
3564 case "boolean":
3565 return null;
3566 case "choice":
3567 return `<${option.choices.filter((choice) => !choice.deprecated && choice.since !== null).map((choice) => choice.value).join("|")}>`;
3568 default:
3569 return `<${option.type}>`;
3570 }
3571 }
3572 function createChoiceUsages(choices, margin, indentation) {
3573 const activeChoices = choices.filter((choice) => !choice.deprecated && choice.since !== null);
3574 const threshold = Math.max(0, ...activeChoices.map((choice) => choice.value.length)) + margin;
3575 return activeChoices.map((choice) => indent(createOptionUsageRow(choice.value, choice.description, threshold), indentation));
3576 }
3577 function createOptionUsage(context, option, threshold) {
3578 const header = createOptionUsageHeader(option);
3579 const optionDefaultValue = getOptionDefaultValue(context, option.name);
3580 return createOptionUsageRow(header, `${option.description}${optionDefaultValue === void 0 ? "" : `
3581Defaults to ${createDefaultValueDisplay(optionDefaultValue)}.`}`, threshold);
3582 }
3583 function getOptionsWithOpposites(options) {
3584 const optionsWithOpposites = options.map((option) => [option.description ? option : null, option.oppositeDescription ? Object.assign(Object.assign({}, option), {}, {
3585 name: `no-${option.name}`,
3586 type: "boolean",
3587 description: option.oppositeDescription
3588 }) : null]);
3589 return optionsWithOpposites.flat().filter(Boolean);
3590 }
3591 function createUsage2(context) {
3592 const options = getOptionsWithOpposites(context.detailedOptions).filter((option) => !(option.type === "boolean" && option.oppositeDescription && !option.name.startsWith("no-")));
3593 const groupedOptions = groupBy(options, (option) => option.category);
3594 const firstCategories = constant.categoryOrder.slice(0, -1);
3595 const lastCategories = constant.categoryOrder.slice(-1);
3596 const restCategories = Object.keys(groupedOptions).filter((category) => !constant.categoryOrder.includes(category));
3597 const allCategories = [...firstCategories, ...restCategories, ...lastCategories];
3598 const optionsUsage = allCategories.map((category) => {
3599 const categoryOptions = groupedOptions[category].map((option) => createOptionUsage(context, option, OPTION_USAGE_THRESHOLD)).join("\n");
3600 return `${category} options:
3601
3602${indent(categoryOptions, 2)}`;
3603 });
3604 return [constant.usageSummary, ...optionsUsage, ""].join("\n\n");
3605 }
3606 function createDetailedUsage2(context, flag) {
3607 const option = getOptionsWithOpposites(context.detailedOptions).find((option2) => option2.name === flag || option2.alias === flag);
3608 const header = createOptionUsageHeader(option);
3609 const description = `
3610
3611${indent(option.description, 2)}`;
3612 const choices = option.type !== "choice" ? "" : `
3613
3614Valid options:
3615
3616${createChoiceUsages(option.choices, CHOICE_USAGE_MARGIN, CHOICE_USAGE_INDENTATION).join("\n")}`;
3617 const optionDefaultValue = getOptionDefaultValue(context, option.name);
3618 const defaults = optionDefaultValue !== void 0 ? `
3619
3620Default: ${createDefaultValueDisplay(optionDefaultValue)}` : "";
3621 const pluginDefaults = option.pluginDefaults && Object.keys(option.pluginDefaults).length > 0 ? `
3622Plugin defaults:${Object.entries(option.pluginDefaults).map(([key, value]) => `
3623* ${key}: ${createDefaultValueDisplay(value)}`)}` : "";
3624 return `${header}${description}${choices}${defaults}${pluginDefaults}`;
3625 }
3626 module2.exports = {
3627 createUsage: createUsage2,
3628 createDetailedUsage: createDetailedUsage2
3629 };
3630 }
3631});
3632var require_array = __commonJS2({
3633 "node_modules/fast-glob/out/utils/array.js"(exports2) {
3634 "use strict";
3635 Object.defineProperty(exports2, "__esModule", {
3636 value: true
3637 });
3638 exports2.splitWhen = exports2.flatten = void 0;
3639 function flatten(items) {
3640 return items.reduce((collection, item) => [].concat(collection, item), []);
3641 }
3642 exports2.flatten = flatten;
3643 function splitWhen(items, predicate) {
3644 const result = [[]];
3645 let groupIndex = 0;
3646 for (const item of items) {
3647 if (predicate(item)) {
3648 groupIndex++;
3649 result[groupIndex] = [];
3650 } else {
3651 result[groupIndex].push(item);
3652 }
3653 }
3654 return result;
3655 }
3656 exports2.splitWhen = splitWhen;
3657 }
3658});
3659var require_errno = __commonJS2({
3660 "node_modules/fast-glob/out/utils/errno.js"(exports2) {
3661 "use strict";
3662 Object.defineProperty(exports2, "__esModule", {
3663 value: true
3664 });
3665 exports2.isEnoentCodeError = void 0;
3666 function isEnoentCodeError(error) {
3667 return error.code === "ENOENT";
3668 }
3669 exports2.isEnoentCodeError = isEnoentCodeError;
3670 }
3671});
3672var require_fs = __commonJS2({
3673 "node_modules/fast-glob/out/utils/fs.js"(exports2) {
3674 "use strict";
3675 Object.defineProperty(exports2, "__esModule", {
3676 value: true
3677 });
3678 exports2.createDirentFromStats = void 0;
3679 var DirentFromStats = class {
3680 constructor(name, stats) {
3681 this.name = name;
3682 this.isBlockDevice = stats.isBlockDevice.bind(stats);
3683 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
3684 this.isDirectory = stats.isDirectory.bind(stats);
3685 this.isFIFO = stats.isFIFO.bind(stats);
3686 this.isFile = stats.isFile.bind(stats);
3687 this.isSocket = stats.isSocket.bind(stats);
3688 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
3689 }
3690 };
3691 function createDirentFromStats(name, stats) {
3692 return new DirentFromStats(name, stats);
3693 }
3694 exports2.createDirentFromStats = createDirentFromStats;
3695 }
3696});
3697var require_path = __commonJS2({
3698 "node_modules/fast-glob/out/utils/path.js"(exports2) {
3699 "use strict";
3700 Object.defineProperty(exports2, "__esModule", {
3701 value: true
3702 });
3703 exports2.removeLeadingDotSegment = exports2.escape = exports2.makeAbsolute = exports2.unixify = void 0;
3704 var path = require("path");
3705 var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
3706 var UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
3707 function unixify(filepath) {
3708 return filepath.replace(/\\/g, "/");
3709 }
3710 exports2.unixify = unixify;
3711 function makeAbsolute(cwd, filepath) {
3712 return path.resolve(cwd, filepath);
3713 }
3714 exports2.makeAbsolute = makeAbsolute;
3715 function escape(pattern) {
3716 return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
3717 }
3718 exports2.escape = escape;
3719 function removeLeadingDotSegment(entry) {
3720 if (entry.charAt(0) === ".") {
3721 const secondCharactery = entry.charAt(1);
3722 if (secondCharactery === "/" || secondCharactery === "\\") {
3723 return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
3724 }
3725 }
3726 return entry;
3727 }
3728 exports2.removeLeadingDotSegment = removeLeadingDotSegment;
3729 }
3730});
3731var require_is_extglob = __commonJS2({
3732 "node_modules/is-extglob/index.js"(exports2, module2) {
3733 module2.exports = function isExtglob(str) {
3734 if (typeof str !== "string" || str === "") {
3735 return false;
3736 }
3737 var match;
3738 while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {
3739 if (match[2])
3740 return true;
3741 str = str.slice(match.index + match[0].length);
3742 }
3743 return false;
3744 };
3745 }
3746});
3747var require_is_glob = __commonJS2({
3748 "node_modules/is-glob/index.js"(exports2, module2) {
3749 var isExtglob = require_is_extglob();
3750 var chars = {
3751 "{": "}",
3752 "(": ")",
3753 "[": "]"
3754 };
3755 var strictCheck = function(str) {
3756 if (str[0] === "!") {
3757 return true;
3758 }
3759 var index = 0;
3760 var pipeIndex = -2;
3761 var closeSquareIndex = -2;
3762 var closeCurlyIndex = -2;
3763 var closeParenIndex = -2;
3764 var backSlashIndex = -2;
3765 while (index < str.length) {
3766 if (str[index] === "*") {
3767 return true;
3768 }
3769 if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) {
3770 return true;
3771 }
3772 if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") {
3773 if (closeSquareIndex < index) {
3774 closeSquareIndex = str.indexOf("]", index);
3775 }
3776 if (closeSquareIndex > index) {
3777 if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
3778 return true;
3779 }
3780 backSlashIndex = str.indexOf("\\", index);
3781 if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
3782 return true;
3783 }
3784 }
3785 }
3786 if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") {
3787 closeCurlyIndex = str.indexOf("}", index);
3788 if (closeCurlyIndex > index) {
3789 backSlashIndex = str.indexOf("\\", index);
3790 if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
3791 return true;
3792 }
3793 }
3794 }
3795 if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") {
3796 closeParenIndex = str.indexOf(")", index);
3797 if (closeParenIndex > index) {
3798 backSlashIndex = str.indexOf("\\", index);
3799 if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
3800 return true;
3801 }
3802 }
3803 }
3804 if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") {
3805 if (pipeIndex < index) {
3806 pipeIndex = str.indexOf("|", index);
3807 }
3808 if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {
3809 closeParenIndex = str.indexOf(")", pipeIndex);
3810 if (closeParenIndex > pipeIndex) {
3811 backSlashIndex = str.indexOf("\\", pipeIndex);
3812 if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
3813 return true;
3814 }
3815 }
3816 }
3817 }
3818 if (str[index] === "\\") {
3819 var open = str[index + 1];
3820 index += 2;
3821 var close = chars[open];
3822 if (close) {
3823 var n = str.indexOf(close, index);
3824 if (n !== -1) {
3825 index = n + 1;
3826 }
3827 }
3828 if (str[index] === "!") {
3829 return true;
3830 }
3831 } else {
3832 index++;
3833 }
3834 }
3835 return false;
3836 };
3837 var relaxedCheck = function(str) {
3838 if (str[0] === "!") {
3839 return true;
3840 }
3841 var index = 0;
3842 while (index < str.length) {
3843 if (/[*?{}()[\]]/.test(str[index])) {
3844 return true;
3845 }
3846 if (str[index] === "\\") {
3847 var open = str[index + 1];
3848 index += 2;
3849 var close = chars[open];
3850 if (close) {
3851 var n = str.indexOf(close, index);
3852 if (n !== -1) {
3853 index = n + 1;
3854 }
3855 }
3856 if (str[index] === "!") {
3857 return true;
3858 }
3859 } else {
3860 index++;
3861 }
3862 }
3863 return false;
3864 };
3865 module2.exports = function isGlob(str, options) {
3866 if (typeof str !== "string" || str === "") {
3867 return false;
3868 }
3869 if (isExtglob(str)) {
3870 return true;
3871 }
3872 var check = strictCheck;
3873 if (options && options.strict === false) {
3874 check = relaxedCheck;
3875 }
3876 return check(str);
3877 };
3878 }
3879});
3880var require_glob_parent = __commonJS2({
3881 "node_modules/glob-parent/index.js"(exports2, module2) {
3882 "use strict";
3883 var isGlob = require_is_glob();
3884 var pathPosixDirname = require("path").posix.dirname;
3885 var isWin32 = require("os").platform() === "win32";
3886 var slash = "/";
3887 var backslash = /\\/g;
3888 var enclosure = /[\{\[].*[\}\]]$/;
3889 var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
3890 var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
3891 module2.exports = function globParent(str, opts) {
3892 var options = Object.assign({
3893 flipBackslashes: true
3894 }, opts);
3895 if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
3896 str = str.replace(backslash, slash);
3897 }
3898 if (enclosure.test(str)) {
3899 str += slash;
3900 }
3901 str += "a";
3902 do {
3903 str = pathPosixDirname(str);
3904 } while (isGlob(str) || globby.test(str));
3905 return str.replace(escaped, "$1");
3906 };
3907 }
3908});
3909var require_utils2 = __commonJS2({
3910 "node_modules/braces/lib/utils.js"(exports2) {
3911 "use strict";
3912 exports2.isInteger = (num) => {
3913 if (typeof num === "number") {
3914 return Number.isInteger(num);
3915 }
3916 if (typeof num === "string" && num.trim() !== "") {
3917 return Number.isInteger(Number(num));
3918 }
3919 return false;
3920 };
3921 exports2.find = (node, type) => node.nodes.find((node2) => node2.type === type);
3922 exports2.exceedsLimit = (min, max, step = 1, limit) => {
3923 if (limit === false)
3924 return false;
3925 if (!exports2.isInteger(min) || !exports2.isInteger(max))
3926 return false;
3927 return (Number(max) - Number(min)) / Number(step) >= limit;
3928 };
3929 exports2.escapeNode = (block, n = 0, type) => {
3930 let node = block.nodes[n];
3931 if (!node)
3932 return;
3933 if (type && node.type === type || node.type === "open" || node.type === "close") {
3934 if (node.escaped !== true) {
3935 node.value = "\\" + node.value;
3936 node.escaped = true;
3937 }
3938 }
3939 };
3940 exports2.encloseBrace = (node) => {
3941 if (node.type !== "brace")
3942 return false;
3943 if (node.commas >> 0 + node.ranges >> 0 === 0) {
3944 node.invalid = true;
3945 return true;
3946 }
3947 return false;
3948 };
3949 exports2.isInvalidBrace = (block) => {
3950 if (block.type !== "brace")
3951 return false;
3952 if (block.invalid === true || block.dollar)
3953 return true;
3954 if (block.commas >> 0 + block.ranges >> 0 === 0) {
3955 block.invalid = true;
3956 return true;
3957 }
3958 if (block.open !== true || block.close !== true) {
3959 block.invalid = true;
3960 return true;
3961 }
3962 return false;
3963 };
3964 exports2.isOpenOrClose = (node) => {
3965 if (node.type === "open" || node.type === "close") {
3966 return true;
3967 }
3968 return node.open === true || node.close === true;
3969 };
3970 exports2.reduce = (nodes) => nodes.reduce((acc, node) => {
3971 if (node.type === "text")
3972 acc.push(node.value);
3973 if (node.type === "range")
3974 node.type = "text";
3975 return acc;
3976 }, []);
3977 exports2.flatten = (...args) => {
3978 const result = [];
3979 const flat = (arr) => {
3980 for (let i = 0; i < arr.length; i++) {
3981 let ele = arr[i];
3982 Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
3983 }
3984 return result;
3985 };
3986 flat(args);
3987 return result;
3988 };
3989 }
3990});
3991var require_stringify = __commonJS2({
3992 "node_modules/braces/lib/stringify.js"(exports2, module2) {
3993 "use strict";
3994 var utils = require_utils2();
3995 module2.exports = (ast, options = {}) => {
3996 let stringify2 = (node, parent = {}) => {
3997 let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
3998 let invalidNode = node.invalid === true && options.escapeInvalid === true;
3999 let output = "";
4000 if (node.value) {
4001 if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
4002 return "\\" + node.value;
4003 }
4004 return node.value;
4005 }
4006 if (node.value) {
4007 return node.value;
4008 }
4009 if (node.nodes) {
4010 for (let child of node.nodes) {
4011 output += stringify2(child);
4012 }
4013 }
4014 return output;
4015 };
4016 return stringify2(ast);
4017 };
4018 }
4019});
4020var require_is_number = __commonJS2({
4021 "node_modules/is-number/index.js"(exports2, module2) {
4022 "use strict";
4023 module2.exports = function(num) {
4024 if (typeof num === "number") {
4025 return num - num === 0;
4026 }
4027 if (typeof num === "string" && num.trim() !== "") {
4028 return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
4029 }
4030 return false;
4031 };
4032 }
4033});
4034var require_to_regex_range = __commonJS2({
4035 "node_modules/to-regex-range/index.js"(exports2, module2) {
4036 "use strict";
4037 var isNumber = require_is_number();
4038 var toRegexRange = (min, max, options) => {
4039 if (isNumber(min) === false) {
4040 throw new TypeError("toRegexRange: expected the first argument to be a number");
4041 }
4042 if (max === void 0 || min === max) {
4043 return String(min);
4044 }
4045 if (isNumber(max) === false) {
4046 throw new TypeError("toRegexRange: expected the second argument to be a number.");
4047 }
4048 let opts = Object.assign({
4049 relaxZeros: true
4050 }, options);
4051 if (typeof opts.strictZeros === "boolean") {
4052 opts.relaxZeros = opts.strictZeros === false;
4053 }
4054 let relax = String(opts.relaxZeros);
4055 let shorthand = String(opts.shorthand);
4056 let capture = String(opts.capture);
4057 let wrap = String(opts.wrap);
4058 let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
4059 if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
4060 return toRegexRange.cache[cacheKey].result;
4061 }
4062 let a = Math.min(min, max);
4063 let b = Math.max(min, max);
4064 if (Math.abs(a - b) === 1) {
4065 let result = min + "|" + max;
4066 if (opts.capture) {
4067 return `(${result})`;
4068 }
4069 if (opts.wrap === false) {
4070 return result;
4071 }
4072 return `(?:${result})`;
4073 }
4074 let isPadded = hasPadding(min) || hasPadding(max);
4075 let state = {
4076 min,
4077 max,
4078 a,
4079 b
4080 };
4081 let positives = [];
4082 let negatives = [];
4083 if (isPadded) {
4084 state.isPadded = isPadded;
4085 state.maxLen = String(state.max).length;
4086 }
4087 if (a < 0) {
4088 let newMin = b < 0 ? Math.abs(b) : 1;
4089 negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
4090 a = state.a = 0;
4091 }
4092 if (b >= 0) {
4093 positives = splitToPatterns(a, b, state, opts);
4094 }
4095 state.negatives = negatives;
4096 state.positives = positives;
4097 state.result = collatePatterns(negatives, positives, opts);
4098 if (opts.capture === true) {
4099 state.result = `(${state.result})`;
4100 } else if (opts.wrap !== false && positives.length + negatives.length > 1) {
4101 state.result = `(?:${state.result})`;
4102 }
4103 toRegexRange.cache[cacheKey] = state;
4104 return state.result;
4105 };
4106 function collatePatterns(neg, pos, options) {
4107 let onlyNegative = filterPatterns(neg, pos, "-", false, options) || [];
4108 let onlyPositive = filterPatterns(pos, neg, "", false, options) || [];
4109 let intersected = filterPatterns(neg, pos, "-?", true, options) || [];
4110 let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
4111 return subpatterns.join("|");
4112 }
4113 function splitToRanges(min, max) {
4114 let nines = 1;
4115 let zeros = 1;
4116 let stop = countNines(min, nines);
4117 let stops = /* @__PURE__ */ new Set([max]);
4118 while (min <= stop && stop <= max) {
4119 stops.add(stop);
4120 nines += 1;
4121 stop = countNines(min, nines);
4122 }
4123 stop = countZeros(max + 1, zeros) - 1;
4124 while (min < stop && stop <= max) {
4125 stops.add(stop);
4126 zeros += 1;
4127 stop = countZeros(max + 1, zeros) - 1;
4128 }
4129 stops = [...stops];
4130 stops.sort(compare);
4131 return stops;
4132 }
4133 function rangeToPattern(start, stop, options) {
4134 if (start === stop) {
4135 return {
4136 pattern: start,
4137 count: [],
4138 digits: 0
4139 };
4140 }
4141 let zipped = zip(start, stop);
4142 let digits = zipped.length;
4143 let pattern = "";
4144 let count = 0;
4145 for (let i = 0; i < digits; i++) {
4146 let [startDigit, stopDigit] = zipped[i];
4147 if (startDigit === stopDigit) {
4148 pattern += startDigit;
4149 } else if (startDigit !== "0" || stopDigit !== "9") {
4150 pattern += toCharacterClass(startDigit, stopDigit, options);
4151 } else {
4152 count++;
4153 }
4154 }
4155 if (count) {
4156 pattern += options.shorthand === true ? "\\d" : "[0-9]";
4157 }
4158 return {
4159 pattern,
4160 count: [count],
4161 digits
4162 };
4163 }
4164 function splitToPatterns(min, max, tok, options) {
4165 let ranges = splitToRanges(min, max);
4166 let tokens = [];
4167 let start = min;
4168 let prev;
4169 for (let i = 0; i < ranges.length; i++) {
4170 let max2 = ranges[i];
4171 let obj = rangeToPattern(String(start), String(max2), options);
4172 let zeros = "";
4173 if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
4174 if (prev.count.length > 1) {
4175 prev.count.pop();
4176 }
4177 prev.count.push(obj.count[0]);
4178 prev.string = prev.pattern + toQuantifier(prev.count);
4179 start = max2 + 1;
4180 continue;
4181 }
4182 if (tok.isPadded) {
4183 zeros = padZeros(max2, tok, options);
4184 }
4185 obj.string = zeros + obj.pattern + toQuantifier(obj.count);
4186 tokens.push(obj);
4187 start = max2 + 1;
4188 prev = obj;
4189 }
4190 return tokens;
4191 }
4192 function filterPatterns(arr, comparison, prefix, intersection, options) {
4193 let result = [];
4194 for (let ele of arr) {
4195 let {
4196 string
4197 } = ele;
4198 if (!intersection && !contains(comparison, "string", string)) {
4199 result.push(prefix + string);
4200 }
4201 if (intersection && contains(comparison, "string", string)) {
4202 result.push(prefix + string);
4203 }
4204 }
4205 return result;
4206 }
4207 function zip(a, b) {
4208 let arr = [];
4209 for (let i = 0; i < a.length; i++)
4210 arr.push([a[i], b[i]]);
4211 return arr;
4212 }
4213 function compare(a, b) {
4214 return a > b ? 1 : b > a ? -1 : 0;
4215 }
4216 function contains(arr, key, val) {
4217 return arr.some((ele) => ele[key] === val);
4218 }
4219 function countNines(min, len) {
4220 return Number(String(min).slice(0, -len) + "9".repeat(len));
4221 }
4222 function countZeros(integer, zeros) {
4223 return integer - integer % Math.pow(10, zeros);
4224 }
4225 function toQuantifier(digits) {
4226 let [start = 0, stop = ""] = digits;
4227 if (stop || start > 1) {
4228 return `{${start + (stop ? "," + stop : "")}}`;
4229 }
4230 return "";
4231 }
4232 function toCharacterClass(a, b, options) {
4233 return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
4234 }
4235 function hasPadding(str) {
4236 return /^-?(0+)\d/.test(str);
4237 }
4238 function padZeros(value, tok, options) {
4239 if (!tok.isPadded) {
4240 return value;
4241 }
4242 let diff = Math.abs(tok.maxLen - String(value).length);
4243 let relax = options.relaxZeros !== false;
4244 switch (diff) {
4245 case 0:
4246 return "";
4247 case 1:
4248 return relax ? "0?" : "0";
4249 case 2:
4250 return relax ? "0{0,2}" : "00";
4251 default: {
4252 return relax ? `0{0,${diff}}` : `0{${diff}}`;
4253 }
4254 }
4255 }
4256 toRegexRange.cache = {};
4257 toRegexRange.clearCache = () => toRegexRange.cache = {};
4258 module2.exports = toRegexRange;
4259 }
4260});
4261var require_fill_range = __commonJS2({
4262 "node_modules/fill-range/index.js"(exports2, module2) {
4263 "use strict";
4264 var util = require("util");
4265 var toRegexRange = require_to_regex_range();
4266 var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
4267 var transform = (toNumber) => {
4268 return (value) => toNumber === true ? Number(value) : String(value);
4269 };
4270 var isValidValue = (value) => {
4271 return typeof value === "number" || typeof value === "string" && value !== "";
4272 };
4273 var isNumber = (num) => Number.isInteger(+num);
4274 var zeros = (input) => {
4275 let value = `${input}`;
4276 let index = -1;
4277 if (value[0] === "-")
4278 value = value.slice(1);
4279 if (value === "0")
4280 return false;
4281 while (value[++index] === "0")
4282 ;
4283 return index > 0;
4284 };
4285 var stringify2 = (start, end, options) => {
4286 if (typeof start === "string" || typeof end === "string") {
4287 return true;
4288 }
4289 return options.stringify === true;
4290 };
4291 var pad = (input, maxLength, toNumber) => {
4292 if (maxLength > 0) {
4293 let dash = input[0] === "-" ? "-" : "";
4294 if (dash)
4295 input = input.slice(1);
4296 input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
4297 }
4298 if (toNumber === false) {
4299 return String(input);
4300 }
4301 return input;
4302 };
4303 var toMaxLen = (input, maxLength) => {
4304 let negative = input[0] === "-" ? "-" : "";
4305 if (negative) {
4306 input = input.slice(1);
4307 maxLength--;
4308 }
4309 while (input.length < maxLength)
4310 input = "0" + input;
4311 return negative ? "-" + input : input;
4312 };
4313 var toSequence = (parts, options) => {
4314 parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
4315 parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
4316 let prefix = options.capture ? "" : "?:";
4317 let positives = "";
4318 let negatives = "";
4319 let result;
4320 if (parts.positives.length) {
4321 positives = parts.positives.join("|");
4322 }
4323 if (parts.negatives.length) {
4324 negatives = `-(${prefix}${parts.negatives.join("|")})`;
4325 }
4326 if (positives && negatives) {
4327 result = `${positives}|${negatives}`;
4328 } else {
4329 result = positives || negatives;
4330 }
4331 if (options.wrap) {
4332 return `(${prefix}${result})`;
4333 }
4334 return result;
4335 };
4336 var toRange = (a, b, isNumbers, options) => {
4337 if (isNumbers) {
4338 return toRegexRange(a, b, Object.assign({
4339 wrap: false
4340 }, options));
4341 }
4342 let start = String.fromCharCode(a);
4343 if (a === b)
4344 return start;
4345 let stop = String.fromCharCode(b);
4346 return `[${start}-${stop}]`;
4347 };
4348 var toRegex = (start, end, options) => {
4349 if (Array.isArray(start)) {
4350 let wrap = options.wrap === true;
4351 let prefix = options.capture ? "" : "?:";
4352 return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
4353 }
4354 return toRegexRange(start, end, options);
4355 };
4356 var rangeError = (...args) => {
4357 return new RangeError("Invalid range arguments: " + util.inspect(...args));
4358 };
4359 var invalidRange = (start, end, options) => {
4360 if (options.strictRanges === true)
4361 throw rangeError([start, end]);
4362 return [];
4363 };
4364 var invalidStep = (step, options) => {
4365 if (options.strictRanges === true) {
4366 throw new TypeError(`Expected step "${step}" to be a number`);
4367 }
4368 return [];
4369 };
4370 var fillNumbers = (start, end, step = 1, options = {}) => {
4371 let a = Number(start);
4372 let b = Number(end);
4373 if (!Number.isInteger(a) || !Number.isInteger(b)) {
4374 if (options.strictRanges === true)
4375 throw rangeError([start, end]);
4376 return [];
4377 }
4378 if (a === 0)
4379 a = 0;
4380 if (b === 0)
4381 b = 0;
4382 let descending = a > b;
4383 let startString = String(start);
4384 let endString = String(end);
4385 let stepString = String(step);
4386 step = Math.max(Math.abs(step), 1);
4387 let padded = zeros(startString) || zeros(endString) || zeros(stepString);
4388 let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
4389 let toNumber = padded === false && stringify2(start, end, options) === false;
4390 let format = options.transform || transform(toNumber);
4391 if (options.toRegex && step === 1) {
4392 return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
4393 }
4394 let parts = {
4395 negatives: [],
4396 positives: []
4397 };
4398 let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
4399 let range = [];
4400 let index = 0;
4401 while (descending ? a >= b : a <= b) {
4402 if (options.toRegex === true && step > 1) {
4403 push(a);
4404 } else {
4405 range.push(pad(format(a, index), maxLen, toNumber));
4406 }
4407 a = descending ? a - step : a + step;
4408 index++;
4409 }
4410 if (options.toRegex === true) {
4411 return step > 1 ? toSequence(parts, options) : toRegex(range, null, Object.assign({
4412 wrap: false
4413 }, options));
4414 }
4415 return range;
4416 };
4417 var fillLetters = (start, end, step = 1, options = {}) => {
4418 if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
4419 return invalidRange(start, end, options);
4420 }
4421 let format = options.transform || ((val) => String.fromCharCode(val));
4422 let a = `${start}`.charCodeAt(0);
4423 let b = `${end}`.charCodeAt(0);
4424 let descending = a > b;
4425 let min = Math.min(a, b);
4426 let max = Math.max(a, b);
4427 if (options.toRegex && step === 1) {
4428 return toRange(min, max, false, options);
4429 }
4430 let range = [];
4431 let index = 0;
4432 while (descending ? a >= b : a <= b) {
4433 range.push(format(a, index));
4434 a = descending ? a - step : a + step;
4435 index++;
4436 }
4437 if (options.toRegex === true) {
4438 return toRegex(range, null, {
4439 wrap: false,
4440 options
4441 });
4442 }
4443 return range;
4444 };
4445 var fill = (start, end, step, options = {}) => {
4446 if (end == null && isValidValue(start)) {
4447 return [start];
4448 }
4449 if (!isValidValue(start) || !isValidValue(end)) {
4450 return invalidRange(start, end, options);
4451 }
4452 if (typeof step === "function") {
4453 return fill(start, end, 1, {
4454 transform: step
4455 });
4456 }
4457 if (isObject(step)) {
4458 return fill(start, end, 0, step);
4459 }
4460 let opts = Object.assign({}, options);
4461 if (opts.capture === true)
4462 opts.wrap = true;
4463 step = step || opts.step || 1;
4464 if (!isNumber(step)) {
4465 if (step != null && !isObject(step))
4466 return invalidStep(step, opts);
4467 return fill(start, end, 1, step);
4468 }
4469 if (isNumber(start) && isNumber(end)) {
4470 return fillNumbers(start, end, step, opts);
4471 }
4472 return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
4473 };
4474 module2.exports = fill;
4475 }
4476});
4477var require_compile = __commonJS2({
4478 "node_modules/braces/lib/compile.js"(exports2, module2) {
4479 "use strict";
4480 var fill = require_fill_range();
4481 var utils = require_utils2();
4482 var compile = (ast, options = {}) => {
4483 let walk = (node, parent = {}) => {
4484 let invalidBlock = utils.isInvalidBrace(parent);
4485 let invalidNode = node.invalid === true && options.escapeInvalid === true;
4486 let invalid = invalidBlock === true || invalidNode === true;
4487 let prefix = options.escapeInvalid === true ? "\\" : "";
4488 let output = "";
4489 if (node.isOpen === true) {
4490 return prefix + node.value;
4491 }
4492 if (node.isClose === true) {
4493 return prefix + node.value;
4494 }
4495 if (node.type === "open") {
4496 return invalid ? prefix + node.value : "(";
4497 }
4498 if (node.type === "close") {
4499 return invalid ? prefix + node.value : ")";
4500 }
4501 if (node.type === "comma") {
4502 return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
4503 }
4504 if (node.value) {
4505 return node.value;
4506 }
4507 if (node.nodes && node.ranges > 0) {
4508 let args = utils.reduce(node.nodes);
4509 let range = fill(...args, Object.assign(Object.assign({}, options), {}, {
4510 wrap: false,
4511 toRegex: true
4512 }));
4513 if (range.length !== 0) {
4514 return args.length > 1 && range.length > 1 ? `(${range})` : range;
4515 }
4516 }
4517 if (node.nodes) {
4518 for (let child of node.nodes) {
4519 output += walk(child, node);
4520 }
4521 }
4522 return output;
4523 };
4524 return walk(ast);
4525 };
4526 module2.exports = compile;
4527 }
4528});
4529var require_expand = __commonJS2({
4530 "node_modules/braces/lib/expand.js"(exports2, module2) {
4531 "use strict";
4532 var fill = require_fill_range();
4533 var stringify2 = require_stringify();
4534 var utils = require_utils2();
4535 var append = (queue = "", stash = "", enclose = false) => {
4536 let result = [];
4537 queue = [].concat(queue);
4538 stash = [].concat(stash);
4539 if (!stash.length)
4540 return queue;
4541 if (!queue.length) {
4542 return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
4543 }
4544 for (let item of queue) {
4545 if (Array.isArray(item)) {
4546 for (let value of item) {
4547 result.push(append(value, stash, enclose));
4548 }
4549 } else {
4550 for (let ele of stash) {
4551 if (enclose === true && typeof ele === "string")
4552 ele = `{${ele}}`;
4553 result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
4554 }
4555 }
4556 }
4557 return utils.flatten(result);
4558 };
4559 var expand = (ast, options = {}) => {
4560 let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
4561 let walk = (node, parent = {}) => {
4562 node.queue = [];
4563 let p = parent;
4564 let q = parent.queue;
4565 while (p.type !== "brace" && p.type !== "root" && p.parent) {
4566 p = p.parent;
4567 q = p.queue;
4568 }
4569 if (node.invalid || node.dollar) {
4570 q.push(append(q.pop(), stringify2(node, options)));
4571 return;
4572 }
4573 if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
4574 q.push(append(q.pop(), ["{}"]));
4575 return;
4576 }
4577 if (node.nodes && node.ranges > 0) {
4578 let args = utils.reduce(node.nodes);
4579 if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
4580 throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
4581 }
4582 let range = fill(...args, options);
4583 if (range.length === 0) {
4584 range = stringify2(node, options);
4585 }
4586 q.push(append(q.pop(), range));
4587 node.nodes = [];
4588 return;
4589 }
4590 let enclose = utils.encloseBrace(node);
4591 let queue = node.queue;
4592 let block = node;
4593 while (block.type !== "brace" && block.type !== "root" && block.parent) {
4594 block = block.parent;
4595 queue = block.queue;
4596 }
4597 for (let i = 0; i < node.nodes.length; i++) {
4598 let child = node.nodes[i];
4599 if (child.type === "comma" && node.type === "brace") {
4600 if (i === 1)
4601 queue.push("");
4602 queue.push("");
4603 continue;
4604 }
4605 if (child.type === "close") {
4606 q.push(append(q.pop(), queue, enclose));
4607 continue;
4608 }
4609 if (child.value && child.type !== "open") {
4610 queue.push(append(queue.pop(), child.value));
4611 continue;
4612 }
4613 if (child.nodes) {
4614 walk(child, node);
4615 }
4616 }
4617 return queue;
4618 };
4619 return utils.flatten(walk(ast));
4620 };
4621 module2.exports = expand;
4622 }
4623});
4624var require_constants = __commonJS2({
4625 "node_modules/braces/lib/constants.js"(exports2, module2) {
4626 "use strict";
4627 module2.exports = {
4628 MAX_LENGTH: 1024 * 64,
4629 CHAR_0: "0",
4630 CHAR_9: "9",
4631 CHAR_UPPERCASE_A: "A",
4632 CHAR_LOWERCASE_A: "a",
4633 CHAR_UPPERCASE_Z: "Z",
4634 CHAR_LOWERCASE_Z: "z",
4635 CHAR_LEFT_PARENTHESES: "(",
4636 CHAR_RIGHT_PARENTHESES: ")",
4637 CHAR_ASTERISK: "*",
4638 CHAR_AMPERSAND: "&",
4639 CHAR_AT: "@",
4640 CHAR_BACKSLASH: "\\",
4641 CHAR_BACKTICK: "`",
4642 CHAR_CARRIAGE_RETURN: "\r",
4643 CHAR_CIRCUMFLEX_ACCENT: "^",
4644 CHAR_COLON: ":",
4645 CHAR_COMMA: ",",
4646 CHAR_DOLLAR: "$",
4647 CHAR_DOT: ".",
4648 CHAR_DOUBLE_QUOTE: '"',
4649 CHAR_EQUAL: "=",
4650 CHAR_EXCLAMATION_MARK: "!",
4651 CHAR_FORM_FEED: "\f",
4652 CHAR_FORWARD_SLASH: "/",
4653 CHAR_HASH: "#",
4654 CHAR_HYPHEN_MINUS: "-",
4655 CHAR_LEFT_ANGLE_BRACKET: "<",
4656 CHAR_LEFT_CURLY_BRACE: "{",
4657 CHAR_LEFT_SQUARE_BRACKET: "[",
4658 CHAR_LINE_FEED: "\n",
4659 CHAR_NO_BREAK_SPACE: "\xA0",
4660 CHAR_PERCENT: "%",
4661 CHAR_PLUS: "+",
4662 CHAR_QUESTION_MARK: "?",
4663 CHAR_RIGHT_ANGLE_BRACKET: ">",
4664 CHAR_RIGHT_CURLY_BRACE: "}",
4665 CHAR_RIGHT_SQUARE_BRACKET: "]",
4666 CHAR_SEMICOLON: ";",
4667 CHAR_SINGLE_QUOTE: "'",
4668 CHAR_SPACE: " ",
4669 CHAR_TAB: " ",
4670 CHAR_UNDERSCORE: "_",
4671 CHAR_VERTICAL_LINE: "|",
4672 CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
4673 };
4674 }
4675});
4676var require_parse = __commonJS2({
4677 "node_modules/braces/lib/parse.js"(exports2, module2) {
4678 "use strict";
4679 var stringify2 = require_stringify();
4680 var {
4681 MAX_LENGTH,
4682 CHAR_BACKSLASH,
4683 CHAR_BACKTICK,
4684 CHAR_COMMA,
4685 CHAR_DOT,
4686 CHAR_LEFT_PARENTHESES,
4687 CHAR_RIGHT_PARENTHESES,
4688 CHAR_LEFT_CURLY_BRACE,
4689 CHAR_RIGHT_CURLY_BRACE,
4690 CHAR_LEFT_SQUARE_BRACKET,
4691 CHAR_RIGHT_SQUARE_BRACKET,
4692 CHAR_DOUBLE_QUOTE,
4693 CHAR_SINGLE_QUOTE,
4694 CHAR_NO_BREAK_SPACE,
4695 CHAR_ZERO_WIDTH_NOBREAK_SPACE
4696 } = require_constants();
4697 var parse = (input, options = {}) => {
4698 if (typeof input !== "string") {
4699 throw new TypeError("Expected a string");
4700 }
4701 let opts = options || {};
4702 let max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
4703 if (input.length > max) {
4704 throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
4705 }
4706 let ast = {
4707 type: "root",
4708 input,
4709 nodes: []
4710 };
4711 let stack = [ast];
4712 let block = ast;
4713 let prev = ast;
4714 let brackets = 0;
4715 let length = input.length;
4716 let index = 0;
4717 let depth = 0;
4718 let value;
4719 let memo = {};
4720 const advance = () => input[index++];
4721 const push = (node) => {
4722 if (node.type === "text" && prev.type === "dot") {
4723 prev.type = "text";
4724 }
4725 if (prev && prev.type === "text" && node.type === "text") {
4726 prev.value += node.value;
4727 return;
4728 }
4729 block.nodes.push(node);
4730 node.parent = block;
4731 node.prev = prev;
4732 prev = node;
4733 return node;
4734 };
4735 push({
4736 type: "bos"
4737 });
4738 while (index < length) {
4739 block = stack[stack.length - 1];
4740 value = advance();
4741 if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
4742 continue;
4743 }
4744 if (value === CHAR_BACKSLASH) {
4745 push({
4746 type: "text",
4747 value: (options.keepEscaping ? value : "") + advance()
4748 });
4749 continue;
4750 }
4751 if (value === CHAR_RIGHT_SQUARE_BRACKET) {
4752 push({
4753 type: "text",
4754 value: "\\" + value
4755 });
4756 continue;
4757 }
4758 if (value === CHAR_LEFT_SQUARE_BRACKET) {
4759 brackets++;
4760 let closed = true;
4761 let next;
4762 while (index < length && (next = advance())) {
4763 value += next;
4764 if (next === CHAR_LEFT_SQUARE_BRACKET) {
4765 brackets++;
4766 continue;
4767 }
4768 if (next === CHAR_BACKSLASH) {
4769 value += advance();
4770 continue;
4771 }
4772 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
4773 brackets--;
4774 if (brackets === 0) {
4775 break;
4776 }
4777 }
4778 }
4779 push({
4780 type: "text",
4781 value
4782 });
4783 continue;
4784 }
4785 if (value === CHAR_LEFT_PARENTHESES) {
4786 block = push({
4787 type: "paren",
4788 nodes: []
4789 });
4790 stack.push(block);
4791 push({
4792 type: "text",
4793 value
4794 });
4795 continue;
4796 }
4797 if (value === CHAR_RIGHT_PARENTHESES) {
4798 if (block.type !== "paren") {
4799 push({
4800 type: "text",
4801 value
4802 });
4803 continue;
4804 }
4805 block = stack.pop();
4806 push({
4807 type: "text",
4808 value
4809 });
4810 block = stack[stack.length - 1];
4811 continue;
4812 }
4813 if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
4814 let open = value;
4815 let next;
4816 if (options.keepQuotes !== true) {
4817 value = "";
4818 }
4819 while (index < length && (next = advance())) {
4820 if (next === CHAR_BACKSLASH) {
4821 value += next + advance();
4822 continue;
4823 }
4824 if (next === open) {
4825 if (options.keepQuotes === true)
4826 value += next;
4827 break;
4828 }
4829 value += next;
4830 }
4831 push({
4832 type: "text",
4833 value
4834 });
4835 continue;
4836 }
4837 if (value === CHAR_LEFT_CURLY_BRACE) {
4838 depth++;
4839 let dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
4840 let brace = {
4841 type: "brace",
4842 open: true,
4843 close: false,
4844 dollar,
4845 depth,
4846 commas: 0,
4847 ranges: 0,
4848 nodes: []
4849 };
4850 block = push(brace);
4851 stack.push(block);
4852 push({
4853 type: "open",
4854 value
4855 });
4856 continue;
4857 }
4858 if (value === CHAR_RIGHT_CURLY_BRACE) {
4859 if (block.type !== "brace") {
4860 push({
4861 type: "text",
4862 value
4863 });
4864 continue;
4865 }
4866 let type = "close";
4867 block = stack.pop();
4868 block.close = true;
4869 push({
4870 type,
4871 value
4872 });
4873 depth--;
4874 block = stack[stack.length - 1];
4875 continue;
4876 }
4877 if (value === CHAR_COMMA && depth > 0) {
4878 if (block.ranges > 0) {
4879 block.ranges = 0;
4880 let open = block.nodes.shift();
4881 block.nodes = [open, {
4882 type: "text",
4883 value: stringify2(block)
4884 }];
4885 }
4886 push({
4887 type: "comma",
4888 value
4889 });
4890 block.commas++;
4891 continue;
4892 }
4893 if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
4894 let siblings = block.nodes;
4895 if (depth === 0 || siblings.length === 0) {
4896 push({
4897 type: "text",
4898 value
4899 });
4900 continue;
4901 }
4902 if (prev.type === "dot") {
4903 block.range = [];
4904 prev.value += value;
4905 prev.type = "range";
4906 if (block.nodes.length !== 3 && block.nodes.length !== 5) {
4907 block.invalid = true;
4908 block.ranges = 0;
4909 prev.type = "text";
4910 continue;
4911 }
4912 block.ranges++;
4913 block.args = [];
4914 continue;
4915 }
4916 if (prev.type === "range") {
4917 siblings.pop();
4918 let before = siblings[siblings.length - 1];
4919 before.value += prev.value + value;
4920 prev = before;
4921 block.ranges--;
4922 continue;
4923 }
4924 push({
4925 type: "dot",
4926 value
4927 });
4928 continue;
4929 }
4930 push({
4931 type: "text",
4932 value
4933 });
4934 }
4935 do {
4936 block = stack.pop();
4937 if (block.type !== "root") {
4938 block.nodes.forEach((node) => {
4939 if (!node.nodes) {
4940 if (node.type === "open")
4941 node.isOpen = true;
4942 if (node.type === "close")
4943 node.isClose = true;
4944 if (!node.nodes)
4945 node.type = "text";
4946 node.invalid = true;
4947 }
4948 });
4949 let parent = stack[stack.length - 1];
4950 let index2 = parent.nodes.indexOf(block);
4951 parent.nodes.splice(index2, 1, ...block.nodes);
4952 }
4953 } while (stack.length > 0);
4954 push({
4955 type: "eos"
4956 });
4957 return ast;
4958 };
4959 module2.exports = parse;
4960 }
4961});
4962var require_braces = __commonJS2({
4963 "node_modules/braces/index.js"(exports2, module2) {
4964 "use strict";
4965 var stringify2 = require_stringify();
4966 var compile = require_compile();
4967 var expand = require_expand();
4968 var parse = require_parse();
4969 var braces = (input, options = {}) => {
4970 let output = [];
4971 if (Array.isArray(input)) {
4972 for (let pattern of input) {
4973 let result = braces.create(pattern, options);
4974 if (Array.isArray(result)) {
4975 output.push(...result);
4976 } else {
4977 output.push(result);
4978 }
4979 }
4980 } else {
4981 output = [].concat(braces.create(input, options));
4982 }
4983 if (options && options.expand === true && options.nodupes === true) {
4984 output = [...new Set(output)];
4985 }
4986 return output;
4987 };
4988 braces.parse = (input, options = {}) => parse(input, options);
4989 braces.stringify = (input, options = {}) => {
4990 if (typeof input === "string") {
4991 return stringify2(braces.parse(input, options), options);
4992 }
4993 return stringify2(input, options);
4994 };
4995 braces.compile = (input, options = {}) => {
4996 if (typeof input === "string") {
4997 input = braces.parse(input, options);
4998 }
4999 return compile(input, options);
5000 };
5001 braces.expand = (input, options = {}) => {
5002 if (typeof input === "string") {
5003 input = braces.parse(input, options);
5004 }
5005 let result = expand(input, options);
5006 if (options.noempty === true) {
5007 result = result.filter(Boolean);
5008 }
5009 if (options.nodupes === true) {
5010 result = [...new Set(result)];
5011 }
5012 return result;
5013 };
5014 braces.create = (input, options = {}) => {
5015 if (input === "" || input.length < 3) {
5016 return [input];
5017 }
5018 return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
5019 };
5020 module2.exports = braces;
5021 }
5022});
5023var require_constants2 = __commonJS2({
5024 "node_modules/picomatch/lib/constants.js"(exports2, module2) {
5025 "use strict";
5026 var path = require("path");
5027 var WIN_SLASH = "\\\\/";
5028 var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
5029 var DOT_LITERAL = "\\.";
5030 var PLUS_LITERAL = "\\+";
5031 var QMARK_LITERAL = "\\?";
5032 var SLASH_LITERAL = "\\/";
5033 var ONE_CHAR = "(?=.)";
5034 var QMARK = "[^/]";
5035 var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
5036 var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
5037 var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
5038 var NO_DOT = `(?!${DOT_LITERAL})`;
5039 var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
5040 var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
5041 var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
5042 var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
5043 var STAR = `${QMARK}*?`;
5044 var POSIX_CHARS = {
5045 DOT_LITERAL,
5046 PLUS_LITERAL,
5047 QMARK_LITERAL,
5048 SLASH_LITERAL,
5049 ONE_CHAR,
5050 QMARK,
5051 END_ANCHOR,
5052 DOTS_SLASH,
5053 NO_DOT,
5054 NO_DOTS,
5055 NO_DOT_SLASH,
5056 NO_DOTS_SLASH,
5057 QMARK_NO_DOT,
5058 STAR,
5059 START_ANCHOR
5060 };
5061 var WINDOWS_CHARS = Object.assign(Object.assign({}, POSIX_CHARS), {}, {
5062 SLASH_LITERAL: `[${WIN_SLASH}]`,
5063 QMARK: WIN_NO_SLASH,
5064 STAR: `${WIN_NO_SLASH}*?`,
5065 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
5066 NO_DOT: `(?!${DOT_LITERAL})`,
5067 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
5068 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
5069 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
5070 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
5071 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
5072 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
5073 });
5074 var POSIX_REGEX_SOURCE = {
5075 alnum: "a-zA-Z0-9",
5076 alpha: "a-zA-Z",
5077 ascii: "\\x00-\\x7F",
5078 blank: " \\t",
5079 cntrl: "\\x00-\\x1F\\x7F",
5080 digit: "0-9",
5081 graph: "\\x21-\\x7E",
5082 lower: "a-z",
5083 print: "\\x20-\\x7E ",
5084 punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
5085 space: " \\t\\r\\n\\v\\f",
5086 upper: "A-Z",
5087 word: "A-Za-z0-9_",
5088 xdigit: "A-Fa-f0-9"
5089 };
5090 module2.exports = {
5091 MAX_LENGTH: 1024 * 64,
5092 POSIX_REGEX_SOURCE,
5093 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
5094 REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
5095 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
5096 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
5097 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
5098 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
5099 REPLACEMENTS: {
5100 "***": "*",
5101 "**/**": "**",
5102 "**/**/**": "**"
5103 },
5104 CHAR_0: 48,
5105 CHAR_9: 57,
5106 CHAR_UPPERCASE_A: 65,
5107 CHAR_LOWERCASE_A: 97,
5108 CHAR_UPPERCASE_Z: 90,
5109 CHAR_LOWERCASE_Z: 122,
5110 CHAR_LEFT_PARENTHESES: 40,
5111 CHAR_RIGHT_PARENTHESES: 41,
5112 CHAR_ASTERISK: 42,
5113 CHAR_AMPERSAND: 38,
5114 CHAR_AT: 64,
5115 CHAR_BACKWARD_SLASH: 92,
5116 CHAR_CARRIAGE_RETURN: 13,
5117 CHAR_CIRCUMFLEX_ACCENT: 94,
5118 CHAR_COLON: 58,
5119 CHAR_COMMA: 44,
5120 CHAR_DOT: 46,
5121 CHAR_DOUBLE_QUOTE: 34,
5122 CHAR_EQUAL: 61,
5123 CHAR_EXCLAMATION_MARK: 33,
5124 CHAR_FORM_FEED: 12,
5125 CHAR_FORWARD_SLASH: 47,
5126 CHAR_GRAVE_ACCENT: 96,
5127 CHAR_HASH: 35,
5128 CHAR_HYPHEN_MINUS: 45,
5129 CHAR_LEFT_ANGLE_BRACKET: 60,
5130 CHAR_LEFT_CURLY_BRACE: 123,
5131 CHAR_LEFT_SQUARE_BRACKET: 91,
5132 CHAR_LINE_FEED: 10,
5133 CHAR_NO_BREAK_SPACE: 160,
5134 CHAR_PERCENT: 37,
5135 CHAR_PLUS: 43,
5136 CHAR_QUESTION_MARK: 63,
5137 CHAR_RIGHT_ANGLE_BRACKET: 62,
5138 CHAR_RIGHT_CURLY_BRACE: 125,
5139 CHAR_RIGHT_SQUARE_BRACKET: 93,
5140 CHAR_SEMICOLON: 59,
5141 CHAR_SINGLE_QUOTE: 39,
5142 CHAR_SPACE: 32,
5143 CHAR_TAB: 9,
5144 CHAR_UNDERSCORE: 95,
5145 CHAR_VERTICAL_LINE: 124,
5146 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
5147 SEP: path.sep,
5148 extglobChars(chars) {
5149 return {
5150 "!": {
5151 type: "negate",
5152 open: "(?:(?!(?:",
5153 close: `))${chars.STAR})`
5154 },
5155 "?": {
5156 type: "qmark",
5157 open: "(?:",
5158 close: ")?"
5159 },
5160 "+": {
5161 type: "plus",
5162 open: "(?:",
5163 close: ")+"
5164 },
5165 "*": {
5166 type: "star",
5167 open: "(?:",
5168 close: ")*"
5169 },
5170 "@": {
5171 type: "at",
5172 open: "(?:",
5173 close: ")"
5174 }
5175 };
5176 },
5177 globChars(win32) {
5178 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
5179 }
5180 };
5181 }
5182});
5183var require_utils3 = __commonJS2({
5184 "node_modules/picomatch/lib/utils.js"(exports2) {
5185 "use strict";
5186 var path = require("path");
5187 var win32 = process.platform === "win32";
5188 var {
5189 REGEX_BACKSLASH,
5190 REGEX_REMOVE_BACKSLASH,
5191 REGEX_SPECIAL_CHARS,
5192 REGEX_SPECIAL_CHARS_GLOBAL
5193 } = require_constants2();
5194 exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
5195 exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
5196 exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str);
5197 exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
5198 exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
5199 exports2.removeBackslashes = (str) => {
5200 return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
5201 return match === "\\" ? "" : match;
5202 });
5203 };
5204 exports2.supportsLookbehinds = () => {
5205 const segs = process.version.slice(1).split(".").map(Number);
5206 if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
5207 return true;
5208 }
5209 return false;
5210 };
5211 exports2.isWindows = (options) => {
5212 if (options && typeof options.windows === "boolean") {
5213 return options.windows;
5214 }
5215 return win32 === true || path.sep === "\\";
5216 };
5217 exports2.escapeLast = (input, char, lastIdx) => {
5218 const idx = input.lastIndexOf(char, lastIdx);
5219 if (idx === -1)
5220 return input;
5221 if (input[idx - 1] === "\\")
5222 return exports2.escapeLast(input, char, idx - 1);
5223 return `${input.slice(0, idx)}\\${input.slice(idx)}`;
5224 };
5225 exports2.removePrefix = (input, state = {}) => {
5226 let output = input;
5227 if (output.startsWith("./")) {
5228 output = output.slice(2);
5229 state.prefix = "./";
5230 }
5231 return output;
5232 };
5233 exports2.wrapOutput = (input, state = {}, options = {}) => {
5234 const prepend = options.contains ? "" : "^";
5235 const append = options.contains ? "" : "$";
5236 let output = `${prepend}(?:${input})${append}`;
5237 if (state.negated === true) {
5238 output = `(?:^(?!${output}).*$)`;
5239 }
5240 return output;
5241 };
5242 }
5243});
5244var require_scan = __commonJS2({
5245 "node_modules/picomatch/lib/scan.js"(exports2, module2) {
5246 "use strict";
5247 var utils = require_utils3();
5248 var {
5249 CHAR_ASTERISK,
5250 CHAR_AT,
5251 CHAR_BACKWARD_SLASH,
5252 CHAR_COMMA,
5253 CHAR_DOT,
5254 CHAR_EXCLAMATION_MARK,
5255 CHAR_FORWARD_SLASH,
5256 CHAR_LEFT_CURLY_BRACE,
5257 CHAR_LEFT_PARENTHESES,
5258 CHAR_LEFT_SQUARE_BRACKET,
5259 CHAR_PLUS,
5260 CHAR_QUESTION_MARK,
5261 CHAR_RIGHT_CURLY_BRACE,
5262 CHAR_RIGHT_PARENTHESES,
5263 CHAR_RIGHT_SQUARE_BRACKET
5264 } = require_constants2();
5265 var isPathSeparator = (code) => {
5266 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
5267 };
5268 var depth = (token) => {
5269 if (token.isPrefix !== true) {
5270 token.depth = token.isGlobstar ? Infinity : 1;
5271 }
5272 };
5273 var scan = (input, options) => {
5274 const opts = options || {};
5275 const length = input.length - 1;
5276 const scanToEnd = opts.parts === true || opts.scanToEnd === true;
5277 const slashes = [];
5278 const tokens = [];
5279 const parts = [];
5280 let str = input;
5281 let index = -1;
5282 let start = 0;
5283 let lastIndex = 0;
5284 let isBrace = false;
5285 let isBracket = false;
5286 let isGlob = false;
5287 let isExtglob = false;
5288 let isGlobstar = false;
5289 let braceEscaped = false;
5290 let backslashes = false;
5291 let negated = false;
5292 let negatedExtglob = false;
5293 let finished = false;
5294 let braces = 0;
5295 let prev;
5296 let code;
5297 let token = {
5298 value: "",
5299 depth: 0,
5300 isGlob: false
5301 };
5302 const eos = () => index >= length;
5303 const peek = () => str.charCodeAt(index + 1);
5304 const advance = () => {
5305 prev = code;
5306 return str.charCodeAt(++index);
5307 };
5308 while (index < length) {
5309 code = advance();
5310 let next;
5311 if (code === CHAR_BACKWARD_SLASH) {
5312 backslashes = token.backslashes = true;
5313 code = advance();
5314 if (code === CHAR_LEFT_CURLY_BRACE) {
5315 braceEscaped = true;
5316 }
5317 continue;
5318 }
5319 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
5320 braces++;
5321 while (eos() !== true && (code = advance())) {
5322 if (code === CHAR_BACKWARD_SLASH) {
5323 backslashes = token.backslashes = true;
5324 advance();
5325 continue;
5326 }
5327 if (code === CHAR_LEFT_CURLY_BRACE) {
5328 braces++;
5329 continue;
5330 }
5331 if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
5332 isBrace = token.isBrace = true;
5333 isGlob = token.isGlob = true;
5334 finished = true;
5335 if (scanToEnd === true) {
5336 continue;
5337 }
5338 break;
5339 }
5340 if (braceEscaped !== true && code === CHAR_COMMA) {
5341 isBrace = token.isBrace = true;
5342 isGlob = token.isGlob = true;
5343 finished = true;
5344 if (scanToEnd === true) {
5345 continue;
5346 }
5347 break;
5348 }
5349 if (code === CHAR_RIGHT_CURLY_BRACE) {
5350 braces--;
5351 if (braces === 0) {
5352 braceEscaped = false;
5353 isBrace = token.isBrace = true;
5354 finished = true;
5355 break;
5356 }
5357 }
5358 }
5359 if (scanToEnd === true) {
5360 continue;
5361 }
5362 break;
5363 }
5364 if (code === CHAR_FORWARD_SLASH) {
5365 slashes.push(index);
5366 tokens.push(token);
5367 token = {
5368 value: "",
5369 depth: 0,
5370 isGlob: false
5371 };
5372 if (finished === true)
5373 continue;
5374 if (prev === CHAR_DOT && index === start + 1) {
5375 start += 2;
5376 continue;
5377 }
5378 lastIndex = index + 1;
5379 continue;
5380 }
5381 if (opts.noext !== true) {
5382 const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
5383 if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
5384 isGlob = token.isGlob = true;
5385 isExtglob = token.isExtglob = true;
5386 finished = true;
5387 if (code === CHAR_EXCLAMATION_MARK && index === start) {
5388 negatedExtglob = true;
5389 }
5390 if (scanToEnd === true) {
5391 while (eos() !== true && (code = advance())) {
5392 if (code === CHAR_BACKWARD_SLASH) {
5393 backslashes = token.backslashes = true;
5394 code = advance();
5395 continue;
5396 }
5397 if (code === CHAR_RIGHT_PARENTHESES) {
5398 isGlob = token.isGlob = true;
5399 finished = true;
5400 break;
5401 }
5402 }
5403 continue;
5404 }
5405 break;
5406 }
5407 }
5408 if (code === CHAR_ASTERISK) {
5409 if (prev === CHAR_ASTERISK)
5410 isGlobstar = token.isGlobstar = true;
5411 isGlob = token.isGlob = true;
5412 finished = true;
5413 if (scanToEnd === true) {
5414 continue;
5415 }
5416 break;
5417 }
5418 if (code === CHAR_QUESTION_MARK) {
5419 isGlob = token.isGlob = true;
5420 finished = true;
5421 if (scanToEnd === true) {
5422 continue;
5423 }
5424 break;
5425 }
5426 if (code === CHAR_LEFT_SQUARE_BRACKET) {
5427 while (eos() !== true && (next = advance())) {
5428 if (next === CHAR_BACKWARD_SLASH) {
5429 backslashes = token.backslashes = true;
5430 advance();
5431 continue;
5432 }
5433 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
5434 isBracket = token.isBracket = true;
5435 isGlob = token.isGlob = true;
5436 finished = true;
5437 break;
5438 }
5439 }
5440 if (scanToEnd === true) {
5441 continue;
5442 }
5443 break;
5444 }
5445 if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
5446 negated = token.negated = true;
5447 start++;
5448 continue;
5449 }
5450 if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
5451 isGlob = token.isGlob = true;
5452 if (scanToEnd === true) {
5453 while (eos() !== true && (code = advance())) {
5454 if (code === CHAR_LEFT_PARENTHESES) {
5455 backslashes = token.backslashes = true;
5456 code = advance();
5457 continue;
5458 }
5459 if (code === CHAR_RIGHT_PARENTHESES) {
5460 finished = true;
5461 break;
5462 }
5463 }
5464 continue;
5465 }
5466 break;
5467 }
5468 if (isGlob === true) {
5469 finished = true;
5470 if (scanToEnd === true) {
5471 continue;
5472 }
5473 break;
5474 }
5475 }
5476 if (opts.noext === true) {
5477 isExtglob = false;
5478 isGlob = false;
5479 }
5480 let base = str;
5481 let prefix = "";
5482 let glob = "";
5483 if (start > 0) {
5484 prefix = str.slice(0, start);
5485 str = str.slice(start);
5486 lastIndex -= start;
5487 }
5488 if (base && isGlob === true && lastIndex > 0) {
5489 base = str.slice(0, lastIndex);
5490 glob = str.slice(lastIndex);
5491 } else if (isGlob === true) {
5492 base = "";
5493 glob = str;
5494 } else {
5495 base = str;
5496 }
5497 if (base && base !== "" && base !== "/" && base !== str) {
5498 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
5499 base = base.slice(0, -1);
5500 }
5501 }
5502 if (opts.unescape === true) {
5503 if (glob)
5504 glob = utils.removeBackslashes(glob);
5505 if (base && backslashes === true) {
5506 base = utils.removeBackslashes(base);
5507 }
5508 }
5509 const state = {
5510 prefix,
5511 input,
5512 start,
5513 base,
5514 glob,
5515 isBrace,
5516 isBracket,
5517 isGlob,
5518 isExtglob,
5519 isGlobstar,
5520 negated,
5521 negatedExtglob
5522 };
5523 if (opts.tokens === true) {
5524 state.maxDepth = 0;
5525 if (!isPathSeparator(code)) {
5526 tokens.push(token);
5527 }
5528 state.tokens = tokens;
5529 }
5530 if (opts.parts === true || opts.tokens === true) {
5531 let prevIndex;
5532 for (let idx = 0; idx < slashes.length; idx++) {
5533 const n = prevIndex ? prevIndex + 1 : start;
5534 const i = slashes[idx];
5535 const value = input.slice(n, i);
5536 if (opts.tokens) {
5537 if (idx === 0 && start !== 0) {
5538 tokens[idx].isPrefix = true;
5539 tokens[idx].value = prefix;
5540 } else {
5541 tokens[idx].value = value;
5542 }
5543 depth(tokens[idx]);
5544 state.maxDepth += tokens[idx].depth;
5545 }
5546 if (idx !== 0 || value !== "") {
5547 parts.push(value);
5548 }
5549 prevIndex = i;
5550 }
5551 if (prevIndex && prevIndex + 1 < input.length) {
5552 const value = input.slice(prevIndex + 1);
5553 parts.push(value);
5554 if (opts.tokens) {
5555 tokens[tokens.length - 1].value = value;
5556 depth(tokens[tokens.length - 1]);
5557 state.maxDepth += tokens[tokens.length - 1].depth;
5558 }
5559 }
5560 state.slashes = slashes;
5561 state.parts = parts;
5562 }
5563 return state;
5564 };
5565 module2.exports = scan;
5566 }
5567});
5568var require_parse2 = __commonJS2({
5569 "node_modules/picomatch/lib/parse.js"(exports2, module2) {
5570 "use strict";
5571 var constants = require_constants2();
5572 var utils = require_utils3();
5573 var {
5574 MAX_LENGTH,
5575 POSIX_REGEX_SOURCE,
5576 REGEX_NON_SPECIAL_CHARS,
5577 REGEX_SPECIAL_CHARS_BACKREF,
5578 REPLACEMENTS
5579 } = constants;
5580 var expandRange = (args, options) => {
5581 if (typeof options.expandRange === "function") {
5582 return options.expandRange(...args, options);
5583 }
5584 args.sort();
5585 const value = `[${args.join("-")}]`;
5586 try {
5587 new RegExp(value);
5588 } catch (ex) {
5589 return args.map((v) => utils.escapeRegex(v)).join("..");
5590 }
5591 return value;
5592 };
5593 var syntaxError = (type, char) => {
5594 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
5595 };
5596 var parse = (input, options) => {
5597 if (typeof input !== "string") {
5598 throw new TypeError("Expected a string");
5599 }
5600 input = REPLACEMENTS[input] || input;
5601 const opts = Object.assign({}, options);
5602 const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
5603 let len = input.length;
5604 if (len > max) {
5605 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
5606 }
5607 const bos = {
5608 type: "bos",
5609 value: "",
5610 output: opts.prepend || ""
5611 };
5612 const tokens = [bos];
5613 const capture = opts.capture ? "" : "?:";
5614 const win32 = utils.isWindows(options);
5615 const PLATFORM_CHARS = constants.globChars(win32);
5616 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
5617 const {
5618 DOT_LITERAL,
5619 PLUS_LITERAL,
5620 SLASH_LITERAL,
5621 ONE_CHAR,
5622 DOTS_SLASH,
5623 NO_DOT,
5624 NO_DOT_SLASH,
5625 NO_DOTS_SLASH,
5626 QMARK,
5627 QMARK_NO_DOT,
5628 STAR,
5629 START_ANCHOR
5630 } = PLATFORM_CHARS;
5631 const globstar = (opts2) => {
5632 return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
5633 };
5634 const nodot = opts.dot ? "" : NO_DOT;
5635 const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
5636 let star = opts.bash === true ? globstar(opts) : STAR;
5637 if (opts.capture) {
5638 star = `(${star})`;
5639 }
5640 if (typeof opts.noext === "boolean") {
5641 opts.noextglob = opts.noext;
5642 }
5643 const state = {
5644 input,
5645 index: -1,
5646 start: 0,
5647 dot: opts.dot === true,
5648 consumed: "",
5649 output: "",
5650 prefix: "",
5651 backtrack: false,
5652 negated: false,
5653 brackets: 0,
5654 braces: 0,
5655 parens: 0,
5656 quotes: 0,
5657 globstar: false,
5658 tokens
5659 };
5660 input = utils.removePrefix(input, state);
5661 len = input.length;
5662 const extglobs = [];
5663 const braces = [];
5664 const stack = [];
5665 let prev = bos;
5666 let value;
5667 const eos = () => state.index === len - 1;
5668 const peek = state.peek = (n = 1) => input[state.index + n];
5669 const advance = state.advance = () => input[++state.index] || "";
5670 const remaining = () => input.slice(state.index + 1);
5671 const consume = (value2 = "", num = 0) => {
5672 state.consumed += value2;
5673 state.index += num;
5674 };
5675 const append = (token) => {
5676 state.output += token.output != null ? token.output : token.value;
5677 consume(token.value);
5678 };
5679 const negate = () => {
5680 let count = 1;
5681 while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
5682 advance();
5683 state.start++;
5684 count++;
5685 }
5686 if (count % 2 === 0) {
5687 return false;
5688 }
5689 state.negated = true;
5690 state.start++;
5691 return true;
5692 };
5693 const increment = (type) => {
5694 state[type]++;
5695 stack.push(type);
5696 };
5697 const decrement = (type) => {
5698 state[type]--;
5699 stack.pop();
5700 };
5701 const push = (tok) => {
5702 if (prev.type === "globstar") {
5703 const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
5704 const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
5705 if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
5706 state.output = state.output.slice(0, -prev.output.length);
5707 prev.type = "star";
5708 prev.value = "*";
5709 prev.output = star;
5710 state.output += prev.output;
5711 }
5712 }
5713 if (extglobs.length && tok.type !== "paren") {
5714 extglobs[extglobs.length - 1].inner += tok.value;
5715 }
5716 if (tok.value || tok.output)
5717 append(tok);
5718 if (prev && prev.type === "text" && tok.type === "text") {
5719 prev.value += tok.value;
5720 prev.output = (prev.output || "") + tok.value;
5721 return;
5722 }
5723 tok.prev = prev;
5724 tokens.push(tok);
5725 prev = tok;
5726 };
5727 const extglobOpen = (type, value2) => {
5728 const token = Object.assign(Object.assign({}, EXTGLOB_CHARS[value2]), {}, {
5729 conditions: 1,
5730 inner: ""
5731 });
5732 token.prev = prev;
5733 token.parens = state.parens;
5734 token.output = state.output;
5735 const output = (opts.capture ? "(" : "") + token.open;
5736 increment("parens");
5737 push({
5738 type,
5739 value: value2,
5740 output: state.output ? "" : ONE_CHAR
5741 });
5742 push({
5743 type: "paren",
5744 extglob: true,
5745 value: advance(),
5746 output
5747 });
5748 extglobs.push(token);
5749 };
5750 const extglobClose = (token) => {
5751 let output = token.close + (opts.capture ? ")" : "");
5752 let rest;
5753 if (token.type === "negate") {
5754 let extglobStar = star;
5755 if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
5756 extglobStar = globstar(opts);
5757 }
5758 if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
5759 output = token.close = `)$))${extglobStar}`;
5760 }
5761 if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
5762 const expression = parse(rest, Object.assign(Object.assign({}, options), {}, {
5763 fastpaths: false
5764 })).output;
5765 output = token.close = `)${expression})${extglobStar})`;
5766 }
5767 if (token.prev.type === "bos") {
5768 state.negatedExtglob = true;
5769 }
5770 }
5771 push({
5772 type: "paren",
5773 extglob: true,
5774 value,
5775 output
5776 });
5777 decrement("parens");
5778 };
5779 if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
5780 let backslashes = false;
5781 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
5782 if (first === "\\") {
5783 backslashes = true;
5784 return m;
5785 }
5786 if (first === "?") {
5787 if (esc) {
5788 return esc + first + (rest ? QMARK.repeat(rest.length) : "");
5789 }
5790 if (index === 0) {
5791 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
5792 }
5793 return QMARK.repeat(chars.length);
5794 }
5795 if (first === ".") {
5796 return DOT_LITERAL.repeat(chars.length);
5797 }
5798 if (first === "*") {
5799 if (esc) {
5800 return esc + first + (rest ? star : "");
5801 }
5802 return star;
5803 }
5804 return esc ? m : `\\${m}`;
5805 });
5806 if (backslashes === true) {
5807 if (opts.unescape === true) {
5808 output = output.replace(/\\/g, "");
5809 } else {
5810 output = output.replace(/\\+/g, (m) => {
5811 return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
5812 });
5813 }
5814 }
5815 if (output === input && opts.contains === true) {
5816 state.output = input;
5817 return state;
5818 }
5819 state.output = utils.wrapOutput(output, state, options);
5820 return state;
5821 }
5822 while (!eos()) {
5823 value = advance();
5824 if (value === "\0") {
5825 continue;
5826 }
5827 if (value === "\\") {
5828 const next = peek();
5829 if (next === "/" && opts.bash !== true) {
5830 continue;
5831 }
5832 if (next === "." || next === ";") {
5833 continue;
5834 }
5835 if (!next) {
5836 value += "\\";
5837 push({
5838 type: "text",
5839 value
5840 });
5841 continue;
5842 }
5843 const match = /^\\+/.exec(remaining());
5844 let slashes = 0;
5845 if (match && match[0].length > 2) {
5846 slashes = match[0].length;
5847 state.index += slashes;
5848 if (slashes % 2 !== 0) {
5849 value += "\\";
5850 }
5851 }
5852 if (opts.unescape === true) {
5853 value = advance();
5854 } else {
5855 value += advance();
5856 }
5857 if (state.brackets === 0) {
5858 push({
5859 type: "text",
5860 value
5861 });
5862 continue;
5863 }
5864 }
5865 if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
5866 if (opts.posix !== false && value === ":") {
5867 const inner = prev.value.slice(1);
5868 if (inner.includes("[")) {
5869 prev.posix = true;
5870 if (inner.includes(":")) {
5871 const idx = prev.value.lastIndexOf("[");
5872 const pre = prev.value.slice(0, idx);
5873 const rest2 = prev.value.slice(idx + 2);
5874 const posix = POSIX_REGEX_SOURCE[rest2];
5875 if (posix) {
5876 prev.value = pre + posix;
5877 state.backtrack = true;
5878 advance();
5879 if (!bos.output && tokens.indexOf(prev) === 1) {
5880 bos.output = ONE_CHAR;
5881 }
5882 continue;
5883 }
5884 }
5885 }
5886 }
5887 if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
5888 value = `\\${value}`;
5889 }
5890 if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
5891 value = `\\${value}`;
5892 }
5893 if (opts.posix === true && value === "!" && prev.value === "[") {
5894 value = "^";
5895 }
5896 prev.value += value;
5897 append({
5898 value
5899 });
5900 continue;
5901 }
5902 if (state.quotes === 1 && value !== '"') {
5903 value = utils.escapeRegex(value);
5904 prev.value += value;
5905 append({
5906 value
5907 });
5908 continue;
5909 }
5910 if (value === '"') {
5911 state.quotes = state.quotes === 1 ? 0 : 1;
5912 if (opts.keepQuotes === true) {
5913 push({
5914 type: "text",
5915 value
5916 });
5917 }
5918 continue;
5919 }
5920 if (value === "(") {
5921 increment("parens");
5922 push({
5923 type: "paren",
5924 value
5925 });
5926 continue;
5927 }
5928 if (value === ")") {
5929 if (state.parens === 0 && opts.strictBrackets === true) {
5930 throw new SyntaxError(syntaxError("opening", "("));
5931 }
5932 const extglob = extglobs[extglobs.length - 1];
5933 if (extglob && state.parens === extglob.parens + 1) {
5934 extglobClose(extglobs.pop());
5935 continue;
5936 }
5937 push({
5938 type: "paren",
5939 value,
5940 output: state.parens ? ")" : "\\)"
5941 });
5942 decrement("parens");
5943 continue;
5944 }
5945 if (value === "[") {
5946 if (opts.nobracket === true || !remaining().includes("]")) {
5947 if (opts.nobracket !== true && opts.strictBrackets === true) {
5948 throw new SyntaxError(syntaxError("closing", "]"));
5949 }
5950 value = `\\${value}`;
5951 } else {
5952 increment("brackets");
5953 }
5954 push({
5955 type: "bracket",
5956 value
5957 });
5958 continue;
5959 }
5960 if (value === "]") {
5961 if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
5962 push({
5963 type: "text",
5964 value,
5965 output: `\\${value}`
5966 });
5967 continue;
5968 }
5969 if (state.brackets === 0) {
5970 if (opts.strictBrackets === true) {
5971 throw new SyntaxError(syntaxError("opening", "["));
5972 }
5973 push({
5974 type: "text",
5975 value,
5976 output: `\\${value}`
5977 });
5978 continue;
5979 }
5980 decrement("brackets");
5981 const prevValue = prev.value.slice(1);
5982 if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
5983 value = `/${value}`;
5984 }
5985 prev.value += value;
5986 append({
5987 value
5988 });
5989 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
5990 continue;
5991 }
5992 const escaped = utils.escapeRegex(prev.value);
5993 state.output = state.output.slice(0, -prev.value.length);
5994 if (opts.literalBrackets === true) {
5995 state.output += escaped;
5996 prev.value = escaped;
5997 continue;
5998 }
5999 prev.value = `(${capture}${escaped}|${prev.value})`;
6000 state.output += prev.value;
6001 continue;
6002 }
6003 if (value === "{" && opts.nobrace !== true) {
6004 increment("braces");
6005 const open = {
6006 type: "brace",
6007 value,
6008 output: "(",
6009 outputIndex: state.output.length,
6010 tokensIndex: state.tokens.length
6011 };
6012 braces.push(open);
6013 push(open);
6014 continue;
6015 }
6016 if (value === "}") {
6017 const brace = braces[braces.length - 1];
6018 if (opts.nobrace === true || !brace) {
6019 push({
6020 type: "text",
6021 value,
6022 output: value
6023 });
6024 continue;
6025 }
6026 let output = ")";
6027 if (brace.dots === true) {
6028 const arr = tokens.slice();
6029 const range = [];
6030 for (let i = arr.length - 1; i >= 0; i--) {
6031 tokens.pop();
6032 if (arr[i].type === "brace") {
6033 break;
6034 }
6035 if (arr[i].type !== "dots") {
6036 range.unshift(arr[i].value);
6037 }
6038 }
6039 output = expandRange(range, opts);
6040 state.backtrack = true;
6041 }
6042 if (brace.comma !== true && brace.dots !== true) {
6043 const out = state.output.slice(0, brace.outputIndex);
6044 const toks = state.tokens.slice(brace.tokensIndex);
6045 brace.value = brace.output = "\\{";
6046 value = output = "\\}";
6047 state.output = out;
6048 for (const t of toks) {
6049 state.output += t.output || t.value;
6050 }
6051 }
6052 push({
6053 type: "brace",
6054 value,
6055 output
6056 });
6057 decrement("braces");
6058 braces.pop();
6059 continue;
6060 }
6061 if (value === "|") {
6062 if (extglobs.length > 0) {
6063 extglobs[extglobs.length - 1].conditions++;
6064 }
6065 push({
6066 type: "text",
6067 value
6068 });
6069 continue;
6070 }
6071 if (value === ",") {
6072 let output = value;
6073 const brace = braces[braces.length - 1];
6074 if (brace && stack[stack.length - 1] === "braces") {
6075 brace.comma = true;
6076 output = "|";
6077 }
6078 push({
6079 type: "comma",
6080 value,
6081 output
6082 });
6083 continue;
6084 }
6085 if (value === "/") {
6086 if (prev.type === "dot" && state.index === state.start + 1) {
6087 state.start = state.index + 1;
6088 state.consumed = "";
6089 state.output = "";
6090 tokens.pop();
6091 prev = bos;
6092 continue;
6093 }
6094 push({
6095 type: "slash",
6096 value,
6097 output: SLASH_LITERAL
6098 });
6099 continue;
6100 }
6101 if (value === ".") {
6102 if (state.braces > 0 && prev.type === "dot") {
6103 if (prev.value === ".")
6104 prev.output = DOT_LITERAL;
6105 const brace = braces[braces.length - 1];
6106 prev.type = "dots";
6107 prev.output += value;
6108 prev.value += value;
6109 brace.dots = true;
6110 continue;
6111 }
6112 if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
6113 push({
6114 type: "text",
6115 value,
6116 output: DOT_LITERAL
6117 });
6118 continue;
6119 }
6120 push({
6121 type: "dot",
6122 value,
6123 output: DOT_LITERAL
6124 });
6125 continue;
6126 }
6127 if (value === "?") {
6128 const isGroup = prev && prev.value === "(";
6129 if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
6130 extglobOpen("qmark", value);
6131 continue;
6132 }
6133 if (prev && prev.type === "paren") {
6134 const next = peek();
6135 let output = value;
6136 if (next === "<" && !utils.supportsLookbehinds()) {
6137 throw new Error("Node.js v10 or higher is required for regex lookbehinds");
6138 }
6139 if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
6140 output = `\\${value}`;
6141 }
6142 push({
6143 type: "text",
6144 value,
6145 output
6146 });
6147 continue;
6148 }
6149 if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
6150 push({
6151 type: "qmark",
6152 value,
6153 output: QMARK_NO_DOT
6154 });
6155 continue;
6156 }
6157 push({
6158 type: "qmark",
6159 value,
6160 output: QMARK
6161 });
6162 continue;
6163 }
6164 if (value === "!") {
6165 if (opts.noextglob !== true && peek() === "(") {
6166 if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
6167 extglobOpen("negate", value);
6168 continue;
6169 }
6170 }
6171 if (opts.nonegate !== true && state.index === 0) {
6172 negate();
6173 continue;
6174 }
6175 }
6176 if (value === "+") {
6177 if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
6178 extglobOpen("plus", value);
6179 continue;
6180 }
6181 if (prev && prev.value === "(" || opts.regex === false) {
6182 push({
6183 type: "plus",
6184 value,
6185 output: PLUS_LITERAL
6186 });
6187 continue;
6188 }
6189 if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
6190 push({
6191 type: "plus",
6192 value
6193 });
6194 continue;
6195 }
6196 push({
6197 type: "plus",
6198 value: PLUS_LITERAL
6199 });
6200 continue;
6201 }
6202 if (value === "@") {
6203 if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
6204 push({
6205 type: "at",
6206 extglob: true,
6207 value,
6208 output: ""
6209 });
6210 continue;
6211 }
6212 push({
6213 type: "text",
6214 value
6215 });
6216 continue;
6217 }
6218 if (value !== "*") {
6219 if (value === "$" || value === "^") {
6220 value = `\\${value}`;
6221 }
6222 const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
6223 if (match) {
6224 value += match[0];
6225 state.index += match[0].length;
6226 }
6227 push({
6228 type: "text",
6229 value
6230 });
6231 continue;
6232 }
6233 if (prev && (prev.type === "globstar" || prev.star === true)) {
6234 prev.type = "star";
6235 prev.star = true;
6236 prev.value += value;
6237 prev.output = star;
6238 state.backtrack = true;
6239 state.globstar = true;
6240 consume(value);
6241 continue;
6242 }
6243 let rest = remaining();
6244 if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
6245 extglobOpen("star", value);
6246 continue;
6247 }
6248 if (prev.type === "star") {
6249 if (opts.noglobstar === true) {
6250 consume(value);
6251 continue;
6252 }
6253 const prior = prev.prev;
6254 const before = prior.prev;
6255 const isStart = prior.type === "slash" || prior.type === "bos";
6256 const afterStar = before && (before.type === "star" || before.type === "globstar");
6257 if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
6258 push({
6259 type: "star",
6260 value,
6261 output: ""
6262 });
6263 continue;
6264 }
6265 const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
6266 const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
6267 if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
6268 push({
6269 type: "star",
6270 value,
6271 output: ""
6272 });
6273 continue;
6274 }
6275 while (rest.slice(0, 3) === "/**") {
6276 const after = input[state.index + 4];
6277 if (after && after !== "/") {
6278 break;
6279 }
6280 rest = rest.slice(3);
6281 consume("/**", 3);
6282 }
6283 if (prior.type === "bos" && eos()) {
6284 prev.type = "globstar";
6285 prev.value += value;
6286 prev.output = globstar(opts);
6287 state.output = prev.output;
6288 state.globstar = true;
6289 consume(value);
6290 continue;
6291 }
6292 if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
6293 state.output = state.output.slice(0, -(prior.output + prev.output).length);
6294 prior.output = `(?:${prior.output}`;
6295 prev.type = "globstar";
6296 prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
6297 prev.value += value;
6298 state.globstar = true;
6299 state.output += prior.output + prev.output;
6300 consume(value);
6301 continue;
6302 }
6303 if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
6304 const end = rest[1] !== void 0 ? "|$" : "";
6305 state.output = state.output.slice(0, -(prior.output + prev.output).length);
6306 prior.output = `(?:${prior.output}`;
6307 prev.type = "globstar";
6308 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
6309 prev.value += value;
6310 state.output += prior.output + prev.output;
6311 state.globstar = true;
6312 consume(value + advance());
6313 push({
6314 type: "slash",
6315 value: "/",
6316 output: ""
6317 });
6318 continue;
6319 }
6320 if (prior.type === "bos" && rest[0] === "/") {
6321 prev.type = "globstar";
6322 prev.value += value;
6323 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
6324 state.output = prev.output;
6325 state.globstar = true;
6326 consume(value + advance());
6327 push({
6328 type: "slash",
6329 value: "/",
6330 output: ""
6331 });
6332 continue;
6333 }
6334 state.output = state.output.slice(0, -prev.output.length);
6335 prev.type = "globstar";
6336 prev.output = globstar(opts);
6337 prev.value += value;
6338 state.output += prev.output;
6339 state.globstar = true;
6340 consume(value);
6341 continue;
6342 }
6343 const token = {
6344 type: "star",
6345 value,
6346 output: star
6347 };
6348 if (opts.bash === true) {
6349 token.output = ".*?";
6350 if (prev.type === "bos" || prev.type === "slash") {
6351 token.output = nodot + token.output;
6352 }
6353 push(token);
6354 continue;
6355 }
6356 if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
6357 token.output = value;
6358 push(token);
6359 continue;
6360 }
6361 if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
6362 if (prev.type === "dot") {
6363 state.output += NO_DOT_SLASH;
6364 prev.output += NO_DOT_SLASH;
6365 } else if (opts.dot === true) {
6366 state.output += NO_DOTS_SLASH;
6367 prev.output += NO_DOTS_SLASH;
6368 } else {
6369 state.output += nodot;
6370 prev.output += nodot;
6371 }
6372 if (peek() !== "*") {
6373 state.output += ONE_CHAR;
6374 prev.output += ONE_CHAR;
6375 }
6376 }
6377 push(token);
6378 }
6379 while (state.brackets > 0) {
6380 if (opts.strictBrackets === true)
6381 throw new SyntaxError(syntaxError("closing", "]"));
6382 state.output = utils.escapeLast(state.output, "[");
6383 decrement("brackets");
6384 }
6385 while (state.parens > 0) {
6386 if (opts.strictBrackets === true)
6387 throw new SyntaxError(syntaxError("closing", ")"));
6388 state.output = utils.escapeLast(state.output, "(");
6389 decrement("parens");
6390 }
6391 while (state.braces > 0) {
6392 if (opts.strictBrackets === true)
6393 throw new SyntaxError(syntaxError("closing", "}"));
6394 state.output = utils.escapeLast(state.output, "{");
6395 decrement("braces");
6396 }
6397 if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
6398 push({
6399 type: "maybe_slash",
6400 value: "",
6401 output: `${SLASH_LITERAL}?`
6402 });
6403 }
6404 if (state.backtrack === true) {
6405 state.output = "";
6406 for (const token of state.tokens) {
6407 state.output += token.output != null ? token.output : token.value;
6408 if (token.suffix) {
6409 state.output += token.suffix;
6410 }
6411 }
6412 }
6413 return state;
6414 };
6415 parse.fastpaths = (input, options) => {
6416 const opts = Object.assign({}, options);
6417 const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
6418 const len = input.length;
6419 if (len > max) {
6420 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
6421 }
6422 input = REPLACEMENTS[input] || input;
6423 const win32 = utils.isWindows(options);
6424 const {
6425 DOT_LITERAL,
6426 SLASH_LITERAL,
6427 ONE_CHAR,
6428 DOTS_SLASH,
6429 NO_DOT,
6430 NO_DOTS,
6431 NO_DOTS_SLASH,
6432 STAR,
6433 START_ANCHOR
6434 } = constants.globChars(win32);
6435 const nodot = opts.dot ? NO_DOTS : NO_DOT;
6436 const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
6437 const capture = opts.capture ? "" : "?:";
6438 const state = {
6439 negated: false,
6440 prefix: ""
6441 };
6442 let star = opts.bash === true ? ".*?" : STAR;
6443 if (opts.capture) {
6444 star = `(${star})`;
6445 }
6446 const globstar = (opts2) => {
6447 if (opts2.noglobstar === true)
6448 return star;
6449 return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
6450 };
6451 const create = (str) => {
6452 switch (str) {
6453 case "*":
6454 return `${nodot}${ONE_CHAR}${star}`;
6455 case ".*":
6456 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
6457 case "*.*":
6458 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
6459 case "*/*":
6460 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
6461 case "**":
6462 return nodot + globstar(opts);
6463 case "**/*":
6464 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
6465 case "**/*.*":
6466 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
6467 case "**/.*":
6468 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
6469 default: {
6470 const match = /^(.*?)\.(\w+)$/.exec(str);
6471 if (!match)
6472 return;
6473 const source2 = create(match[1]);
6474 if (!source2)
6475 return;
6476 return source2 + DOT_LITERAL + match[2];
6477 }
6478 }
6479 };
6480 const output = utils.removePrefix(input, state);
6481 let source = create(output);
6482 if (source && opts.strictSlashes !== true) {
6483 source += `${SLASH_LITERAL}?`;
6484 }
6485 return source;
6486 };
6487 module2.exports = parse;
6488 }
6489});
6490var require_picomatch = __commonJS2({
6491 "node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
6492 "use strict";
6493 var path = require("path");
6494 var scan = require_scan();
6495 var parse = require_parse2();
6496 var utils = require_utils3();
6497 var constants = require_constants2();
6498 var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
6499 var picomatch = (glob, options, returnState = false) => {
6500 if (Array.isArray(glob)) {
6501 const fns = glob.map((input) => picomatch(input, options, returnState));
6502 const arrayMatcher = (str) => {
6503 for (const isMatch of fns) {
6504 const state2 = isMatch(str);
6505 if (state2)
6506 return state2;
6507 }
6508 return false;
6509 };
6510 return arrayMatcher;
6511 }
6512 const isState = isObject(glob) && glob.tokens && glob.input;
6513 if (glob === "" || typeof glob !== "string" && !isState) {
6514 throw new TypeError("Expected pattern to be a non-empty string");
6515 }
6516 const opts = options || {};
6517 const posix = utils.isWindows(options);
6518 const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
6519 const state = regex.state;
6520 delete regex.state;
6521 let isIgnored = () => false;
6522 if (opts.ignore) {
6523 const ignoreOpts = Object.assign(Object.assign({}, options), {}, {
6524 ignore: null,
6525 onMatch: null,
6526 onResult: null
6527 });
6528 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
6529 }
6530 const matcher = (input, returnObject = false) => {
6531 const {
6532 isMatch,
6533 match,
6534 output
6535 } = picomatch.test(input, regex, options, {
6536 glob,
6537 posix
6538 });
6539 const result = {
6540 glob,
6541 state,
6542 regex,
6543 posix,
6544 input,
6545 output,
6546 match,
6547 isMatch
6548 };
6549 if (typeof opts.onResult === "function") {
6550 opts.onResult(result);
6551 }
6552 if (isMatch === false) {
6553 result.isMatch = false;
6554 return returnObject ? result : false;
6555 }
6556 if (isIgnored(input)) {
6557 if (typeof opts.onIgnore === "function") {
6558 opts.onIgnore(result);
6559 }
6560 result.isMatch = false;
6561 return returnObject ? result : false;
6562 }
6563 if (typeof opts.onMatch === "function") {
6564 opts.onMatch(result);
6565 }
6566 return returnObject ? result : true;
6567 };
6568 if (returnState) {
6569 matcher.state = state;
6570 }
6571 return matcher;
6572 };
6573 picomatch.test = (input, regex, options, {
6574 glob,
6575 posix
6576 } = {}) => {
6577 if (typeof input !== "string") {
6578 throw new TypeError("Expected input to be a string");
6579 }
6580 if (input === "") {
6581 return {
6582 isMatch: false,
6583 output: ""
6584 };
6585 }
6586 const opts = options || {};
6587 const format = opts.format || (posix ? utils.toPosixSlashes : null);
6588 let match = input === glob;
6589 let output = match && format ? format(input) : input;
6590 if (match === false) {
6591 output = format ? format(input) : input;
6592 match = output === glob;
6593 }
6594 if (match === false || opts.capture === true) {
6595 if (opts.matchBase === true || opts.basename === true) {
6596 match = picomatch.matchBase(input, regex, options, posix);
6597 } else {
6598 match = regex.exec(output);
6599 }
6600 }
6601 return {
6602 isMatch: Boolean(match),
6603 match,
6604 output
6605 };
6606 };
6607 picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
6608 const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
6609 return regex.test(path.basename(input));
6610 };
6611 picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
6612 picomatch.parse = (pattern, options) => {
6613 if (Array.isArray(pattern))
6614 return pattern.map((p) => picomatch.parse(p, options));
6615 return parse(pattern, Object.assign(Object.assign({}, options), {}, {
6616 fastpaths: false
6617 }));
6618 };
6619 picomatch.scan = (input, options) => scan(input, options);
6620 picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
6621 if (returnOutput === true) {
6622 return state.output;
6623 }
6624 const opts = options || {};
6625 const prepend = opts.contains ? "" : "^";
6626 const append = opts.contains ? "" : "$";
6627 let source = `${prepend}(?:${state.output})${append}`;
6628 if (state && state.negated === true) {
6629 source = `^(?!${source}).*$`;
6630 }
6631 const regex = picomatch.toRegex(source, options);
6632 if (returnState === true) {
6633 regex.state = state;
6634 }
6635 return regex;
6636 };
6637 picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
6638 if (!input || typeof input !== "string") {
6639 throw new TypeError("Expected a non-empty string");
6640 }
6641 let parsed = {
6642 negated: false,
6643 fastpaths: true
6644 };
6645 if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
6646 parsed.output = parse.fastpaths(input, options);
6647 }
6648 if (!parsed.output) {
6649 parsed = parse(input, options);
6650 }
6651 return picomatch.compileRe(parsed, options, returnOutput, returnState);
6652 };
6653 picomatch.toRegex = (source, options) => {
6654 try {
6655 const opts = options || {};
6656 return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
6657 } catch (err) {
6658 if (options && options.debug === true)
6659 throw err;
6660 return /$^/;
6661 }
6662 };
6663 picomatch.constants = constants;
6664 module2.exports = picomatch;
6665 }
6666});
6667var require_picomatch2 = __commonJS2({
6668 "node_modules/picomatch/index.js"(exports2, module2) {
6669 "use strict";
6670 module2.exports = require_picomatch();
6671 }
6672});
6673var require_micromatch = __commonJS2({
6674 "node_modules/micromatch/index.js"(exports2, module2) {
6675 "use strict";
6676 var util = require("util");
6677 var braces = require_braces();
6678 var picomatch = require_picomatch2();
6679 var utils = require_utils3();
6680 var isEmptyString = (val) => val === "" || val === "./";
6681 var micromatch = (list, patterns, options) => {
6682 patterns = [].concat(patterns);
6683 list = [].concat(list);
6684 let omit = /* @__PURE__ */ new Set();
6685 let keep = /* @__PURE__ */ new Set();
6686 let items = /* @__PURE__ */ new Set();
6687 let negatives = 0;
6688 let onResult = (state) => {
6689 items.add(state.output);
6690 if (options && options.onResult) {
6691 options.onResult(state);
6692 }
6693 };
6694 for (let i = 0; i < patterns.length; i++) {
6695 let isMatch = picomatch(String(patterns[i]), Object.assign(Object.assign({}, options), {}, {
6696 onResult
6697 }), true);
6698 let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
6699 if (negated)
6700 negatives++;
6701 for (let item of list) {
6702 let matched = isMatch(item, true);
6703 let match = negated ? !matched.isMatch : matched.isMatch;
6704 if (!match)
6705 continue;
6706 if (negated) {
6707 omit.add(matched.output);
6708 } else {
6709 omit.delete(matched.output);
6710 keep.add(matched.output);
6711 }
6712 }
6713 }
6714 let result = negatives === patterns.length ? [...items] : [...keep];
6715 let matches = result.filter((item) => !omit.has(item));
6716 if (options && matches.length === 0) {
6717 if (options.failglob === true) {
6718 throw new Error(`No matches found for "${patterns.join(", ")}"`);
6719 }
6720 if (options.nonull === true || options.nullglob === true) {
6721 return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
6722 }
6723 }
6724 return matches;
6725 };
6726 micromatch.match = micromatch;
6727 micromatch.matcher = (pattern, options) => picomatch(pattern, options);
6728 micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
6729 micromatch.any = micromatch.isMatch;
6730 micromatch.not = (list, patterns, options = {}) => {
6731 patterns = [].concat(patterns).map(String);
6732 let result = /* @__PURE__ */ new Set();
6733 let items = [];
6734 let onResult = (state) => {
6735 if (options.onResult)
6736 options.onResult(state);
6737 items.push(state.output);
6738 };
6739 let matches = new Set(micromatch(list, patterns, Object.assign(Object.assign({}, options), {}, {
6740 onResult
6741 })));
6742 for (let item of items) {
6743 if (!matches.has(item)) {
6744 result.add(item);
6745 }
6746 }
6747 return [...result];
6748 };
6749 micromatch.contains = (str, pattern, options) => {
6750 if (typeof str !== "string") {
6751 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
6752 }
6753 if (Array.isArray(pattern)) {
6754 return pattern.some((p) => micromatch.contains(str, p, options));
6755 }
6756 if (typeof pattern === "string") {
6757 if (isEmptyString(str) || isEmptyString(pattern)) {
6758 return false;
6759 }
6760 if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
6761 return true;
6762 }
6763 }
6764 return micromatch.isMatch(str, pattern, Object.assign(Object.assign({}, options), {}, {
6765 contains: true
6766 }));
6767 };
6768 micromatch.matchKeys = (obj, patterns, options) => {
6769 if (!utils.isObject(obj)) {
6770 throw new TypeError("Expected the first argument to be an object");
6771 }
6772 let keys = micromatch(Object.keys(obj), patterns, options);
6773 let res = {};
6774 for (let key of keys)
6775 res[key] = obj[key];
6776 return res;
6777 };
6778 micromatch.some = (list, patterns, options) => {
6779 let items = [].concat(list);
6780 for (let pattern of [].concat(patterns)) {
6781 let isMatch = picomatch(String(pattern), options);
6782 if (items.some((item) => isMatch(item))) {
6783 return true;
6784 }
6785 }
6786 return false;
6787 };
6788 micromatch.every = (list, patterns, options) => {
6789 let items = [].concat(list);
6790 for (let pattern of [].concat(patterns)) {
6791 let isMatch = picomatch(String(pattern), options);
6792 if (!items.every((item) => isMatch(item))) {
6793 return false;
6794 }
6795 }
6796 return true;
6797 };
6798 micromatch.all = (str, patterns, options) => {
6799 if (typeof str !== "string") {
6800 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
6801 }
6802 return [].concat(patterns).every((p) => picomatch(p, options)(str));
6803 };
6804 micromatch.capture = (glob, input, options) => {
6805 let posix = utils.isWindows(options);
6806 let regex = picomatch.makeRe(String(glob), Object.assign(Object.assign({}, options), {}, {
6807 capture: true
6808 }));
6809 let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
6810 if (match) {
6811 return match.slice(1).map((v) => v === void 0 ? "" : v);
6812 }
6813 };
6814 micromatch.makeRe = (...args) => picomatch.makeRe(...args);
6815 micromatch.scan = (...args) => picomatch.scan(...args);
6816 micromatch.parse = (patterns, options) => {
6817 let res = [];
6818 for (let pattern of [].concat(patterns || [])) {
6819 for (let str of braces(String(pattern), options)) {
6820 res.push(picomatch.parse(str, options));
6821 }
6822 }
6823 return res;
6824 };
6825 micromatch.braces = (pattern, options) => {
6826 if (typeof pattern !== "string")
6827 throw new TypeError("Expected a string");
6828 if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) {
6829 return [pattern];
6830 }
6831 return braces(pattern, options);
6832 };
6833 micromatch.braceExpand = (pattern, options) => {
6834 if (typeof pattern !== "string")
6835 throw new TypeError("Expected a string");
6836 return micromatch.braces(pattern, Object.assign(Object.assign({}, options), {}, {
6837 expand: true
6838 }));
6839 };
6840 module2.exports = micromatch;
6841 }
6842});
6843var require_pattern = __commonJS2({
6844 "node_modules/fast-glob/out/utils/pattern.js"(exports2) {
6845 "use strict";
6846 Object.defineProperty(exports2, "__esModule", {
6847 value: true
6848 });
6849 exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
6850 var path = require("path");
6851 var globParent = require_glob_parent();
6852 var micromatch = require_micromatch();
6853 var GLOBSTAR = "**";
6854 var ESCAPE_SYMBOL = "\\";
6855 var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
6856 var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
6857 var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
6858 var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
6859 var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
6860 function isStaticPattern(pattern, options = {}) {
6861 return !isDynamicPattern(pattern, options);
6862 }
6863 exports2.isStaticPattern = isStaticPattern;
6864 function isDynamicPattern(pattern, options = {}) {
6865 if (pattern === "") {
6866 return false;
6867 }
6868 if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
6869 return true;
6870 }
6871 if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
6872 return true;
6873 }
6874 if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
6875 return true;
6876 }
6877 if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {
6878 return true;
6879 }
6880 return false;
6881 }
6882 exports2.isDynamicPattern = isDynamicPattern;
6883 function hasBraceExpansion(pattern) {
6884 const openingBraceIndex = pattern.indexOf("{");
6885 if (openingBraceIndex === -1) {
6886 return false;
6887 }
6888 const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1);
6889 if (closingBraceIndex === -1) {
6890 return false;
6891 }
6892 const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
6893 return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
6894 }
6895 function convertToPositivePattern(pattern) {
6896 return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
6897 }
6898 exports2.convertToPositivePattern = convertToPositivePattern;
6899 function convertToNegativePattern(pattern) {
6900 return "!" + pattern;
6901 }
6902 exports2.convertToNegativePattern = convertToNegativePattern;
6903 function isNegativePattern(pattern) {
6904 return pattern.startsWith("!") && pattern[1] !== "(";
6905 }
6906 exports2.isNegativePattern = isNegativePattern;
6907 function isPositivePattern(pattern) {
6908 return !isNegativePattern(pattern);
6909 }
6910 exports2.isPositivePattern = isPositivePattern;
6911 function getNegativePatterns(patterns) {
6912 return patterns.filter(isNegativePattern);
6913 }
6914 exports2.getNegativePatterns = getNegativePatterns;
6915 function getPositivePatterns(patterns) {
6916 return patterns.filter(isPositivePattern);
6917 }
6918 exports2.getPositivePatterns = getPositivePatterns;
6919 function getPatternsInsideCurrentDirectory(patterns) {
6920 return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
6921 }
6922 exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
6923 function getPatternsOutsideCurrentDirectory(patterns) {
6924 return patterns.filter(isPatternRelatedToParentDirectory);
6925 }
6926 exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
6927 function isPatternRelatedToParentDirectory(pattern) {
6928 return pattern.startsWith("..") || pattern.startsWith("./..");
6929 }
6930 exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
6931 function getBaseDirectory(pattern) {
6932 return globParent(pattern, {
6933 flipBackslashes: false
6934 });
6935 }
6936 exports2.getBaseDirectory = getBaseDirectory;
6937 function hasGlobStar(pattern) {
6938 return pattern.includes(GLOBSTAR);
6939 }
6940 exports2.hasGlobStar = hasGlobStar;
6941 function endsWithSlashGlobStar(pattern) {
6942 return pattern.endsWith("/" + GLOBSTAR);
6943 }
6944 exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
6945 function isAffectDepthOfReadingPattern(pattern) {
6946 const basename = path.basename(pattern);
6947 return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
6948 }
6949 exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
6950 function expandPatternsWithBraceExpansion(patterns) {
6951 return patterns.reduce((collection, pattern) => {
6952 return collection.concat(expandBraceExpansion(pattern));
6953 }, []);
6954 }
6955 exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
6956 function expandBraceExpansion(pattern) {
6957 return micromatch.braces(pattern, {
6958 expand: true,
6959 nodupes: true
6960 });
6961 }
6962 exports2.expandBraceExpansion = expandBraceExpansion;
6963 function getPatternParts(pattern, options) {
6964 let {
6965 parts
6966 } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), {
6967 parts: true
6968 }));
6969 if (parts.length === 0) {
6970 parts = [pattern];
6971 }
6972 if (parts[0].startsWith("/")) {
6973 parts[0] = parts[0].slice(1);
6974 parts.unshift("");
6975 }
6976 return parts;
6977 }
6978 exports2.getPatternParts = getPatternParts;
6979 function makeRe(pattern, options) {
6980 return micromatch.makeRe(pattern, options);
6981 }
6982 exports2.makeRe = makeRe;
6983 function convertPatternsToRe(patterns, options) {
6984 return patterns.map((pattern) => makeRe(pattern, options));
6985 }
6986 exports2.convertPatternsToRe = convertPatternsToRe;
6987 function matchAny(entry, patternsRe) {
6988 return patternsRe.some((patternRe) => patternRe.test(entry));
6989 }
6990 exports2.matchAny = matchAny;
6991 }
6992});
6993var require_merge2 = __commonJS2({
6994 "node_modules/merge2/index.js"(exports2, module2) {
6995 "use strict";
6996 var Stream = require("stream");
6997 var PassThrough = Stream.PassThrough;
6998 var slice = Array.prototype.slice;
6999 module2.exports = merge2;
7000 function merge2() {
7001 const streamsQueue = [];
7002 const args = slice.call(arguments);
7003 let merging = false;
7004 let options = args[args.length - 1];
7005 if (options && !Array.isArray(options) && options.pipe == null) {
7006 args.pop();
7007 } else {
7008 options = {};
7009 }
7010 const doEnd = options.end !== false;
7011 const doPipeError = options.pipeError === true;
7012 if (options.objectMode == null) {
7013 options.objectMode = true;
7014 }
7015 if (options.highWaterMark == null) {
7016 options.highWaterMark = 64 * 1024;
7017 }
7018 const mergedStream = PassThrough(options);
7019 function addStream() {
7020 for (let i = 0, len = arguments.length; i < len; i++) {
7021 streamsQueue.push(pauseStreams(arguments[i], options));
7022 }
7023 mergeStream();
7024 return this;
7025 }
7026 function mergeStream() {
7027 if (merging) {
7028 return;
7029 }
7030 merging = true;
7031 let streams = streamsQueue.shift();
7032 if (!streams) {
7033 process.nextTick(endStream);
7034 return;
7035 }
7036 if (!Array.isArray(streams)) {
7037 streams = [streams];
7038 }
7039 let pipesCount = streams.length + 1;
7040 function next() {
7041 if (--pipesCount > 0) {
7042 return;
7043 }
7044 merging = false;
7045 mergeStream();
7046 }
7047 function pipe(stream) {
7048 function onend() {
7049 stream.removeListener("merge2UnpipeEnd", onend);
7050 stream.removeListener("end", onend);
7051 if (doPipeError) {
7052 stream.removeListener("error", onerror);
7053 }
7054 next();
7055 }
7056 function onerror(err) {
7057 mergedStream.emit("error", err);
7058 }
7059 if (stream._readableState.endEmitted) {
7060 return next();
7061 }
7062 stream.on("merge2UnpipeEnd", onend);
7063 stream.on("end", onend);
7064 if (doPipeError) {
7065 stream.on("error", onerror);
7066 }
7067 stream.pipe(mergedStream, {
7068 end: false
7069 });
7070 stream.resume();
7071 }
7072 for (let i = 0; i < streams.length; i++) {
7073 pipe(streams[i]);
7074 }
7075 next();
7076 }
7077 function endStream() {
7078 merging = false;
7079 mergedStream.emit("queueDrain");
7080 if (doEnd) {
7081 mergedStream.end();
7082 }
7083 }
7084 mergedStream.setMaxListeners(0);
7085 mergedStream.add = addStream;
7086 mergedStream.on("unpipe", function(stream) {
7087 stream.emit("merge2UnpipeEnd");
7088 });
7089 if (args.length) {
7090 addStream.apply(null, args);
7091 }
7092 return mergedStream;
7093 }
7094 function pauseStreams(streams, options) {
7095 if (!Array.isArray(streams)) {
7096 if (!streams._readableState && streams.pipe) {
7097 streams = streams.pipe(PassThrough(options));
7098 }
7099 if (!streams._readableState || !streams.pause || !streams.pipe) {
7100 throw new Error("Only readable stream can be merged.");
7101 }
7102 streams.pause();
7103 } else {
7104 for (let i = 0, len = streams.length; i < len; i++) {
7105 streams[i] = pauseStreams(streams[i], options);
7106 }
7107 }
7108 return streams;
7109 }
7110 }
7111});
7112var require_stream = __commonJS2({
7113 "node_modules/fast-glob/out/utils/stream.js"(exports2) {
7114 "use strict";
7115 Object.defineProperty(exports2, "__esModule", {
7116 value: true
7117 });
7118 exports2.merge = void 0;
7119 var merge2 = require_merge2();
7120 function merge(streams) {
7121 const mergedStream = merge2(streams);
7122 streams.forEach((stream) => {
7123 stream.once("error", (error) => mergedStream.emit("error", error));
7124 });
7125 mergedStream.once("close", () => propagateCloseEventToSources(streams));
7126 mergedStream.once("end", () => propagateCloseEventToSources(streams));
7127 return mergedStream;
7128 }
7129 exports2.merge = merge;
7130 function propagateCloseEventToSources(streams) {
7131 streams.forEach((stream) => stream.emit("close"));
7132 }
7133 }
7134});
7135var require_string = __commonJS2({
7136 "node_modules/fast-glob/out/utils/string.js"(exports2) {
7137 "use strict";
7138 Object.defineProperty(exports2, "__esModule", {
7139 value: true
7140 });
7141 exports2.isEmpty = exports2.isString = void 0;
7142 function isString(input) {
7143 return typeof input === "string";
7144 }
7145 exports2.isString = isString;
7146 function isEmpty(input) {
7147 return input === "";
7148 }
7149 exports2.isEmpty = isEmpty;
7150 }
7151});
7152var require_utils4 = __commonJS2({
7153 "node_modules/fast-glob/out/utils/index.js"(exports2) {
7154 "use strict";
7155 Object.defineProperty(exports2, "__esModule", {
7156 value: true
7157 });
7158 exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0;
7159 var array2 = require_array();
7160 exports2.array = array2;
7161 var errno = require_errno();
7162 exports2.errno = errno;
7163 var fs = require_fs();
7164 exports2.fs = fs;
7165 var path = require_path();
7166 exports2.path = path;
7167 var pattern = require_pattern();
7168 exports2.pattern = pattern;
7169 var stream = require_stream();
7170 exports2.stream = stream;
7171 var string = require_string();
7172 exports2.string = string;
7173 }
7174});
7175var require_tasks = __commonJS2({
7176 "node_modules/fast-glob/out/managers/tasks.js"(exports2) {
7177 "use strict";
7178 Object.defineProperty(exports2, "__esModule", {
7179 value: true
7180 });
7181 exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0;
7182 var utils = require_utils4();
7183 function generate(patterns, settings) {
7184 const positivePatterns = getPositivePatterns(patterns);
7185 const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
7186 const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
7187 const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
7188 const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false);
7189 const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true);
7190 return staticTasks.concat(dynamicTasks);
7191 }
7192 exports2.generate = generate;
7193 function convertPatternsToTasks(positive, negative, dynamic) {
7194 const tasks = [];
7195 const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
7196 const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive);
7197 const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
7198 const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
7199 tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
7200 if ("." in insideCurrentDirectoryGroup) {
7201 tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic));
7202 } else {
7203 tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
7204 }
7205 return tasks;
7206 }
7207 exports2.convertPatternsToTasks = convertPatternsToTasks;
7208 function getPositivePatterns(patterns) {
7209 return utils.pattern.getPositivePatterns(patterns);
7210 }
7211 exports2.getPositivePatterns = getPositivePatterns;
7212 function getNegativePatternsAsPositive(patterns, ignore) {
7213 const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
7214 const positive = negative.map(utils.pattern.convertToPositivePattern);
7215 return positive;
7216 }
7217 exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
7218 function groupPatternsByBaseDirectory(patterns) {
7219 const group = {};
7220 return patterns.reduce((collection, pattern) => {
7221 const base = utils.pattern.getBaseDirectory(pattern);
7222 if (base in collection) {
7223 collection[base].push(pattern);
7224 } else {
7225 collection[base] = [pattern];
7226 }
7227 return collection;
7228 }, group);
7229 }
7230 exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
7231 function convertPatternGroupsToTasks(positive, negative, dynamic) {
7232 return Object.keys(positive).map((base) => {
7233 return convertPatternGroupToTask(base, positive[base], negative, dynamic);
7234 });
7235 }
7236 exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
7237 function convertPatternGroupToTask(base, positive, negative, dynamic) {
7238 return {
7239 dynamic,
7240 positive,
7241 negative,
7242 base,
7243 patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
7244 };
7245 }
7246 exports2.convertPatternGroupToTask = convertPatternGroupToTask;
7247 }
7248});
7249var require_patterns = __commonJS2({
7250 "node_modules/fast-glob/out/managers/patterns.js"(exports2) {
7251 "use strict";
7252 Object.defineProperty(exports2, "__esModule", {
7253 value: true
7254 });
7255 exports2.removeDuplicateSlashes = exports2.transform = void 0;
7256 var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
7257 function transform(patterns) {
7258 return patterns.map((pattern) => removeDuplicateSlashes(pattern));
7259 }
7260 exports2.transform = transform;
7261 function removeDuplicateSlashes(pattern) {
7262 return pattern.replace(DOUBLE_SLASH_RE, "/");
7263 }
7264 exports2.removeDuplicateSlashes = removeDuplicateSlashes;
7265 }
7266});
7267var require_async = __commonJS2({
7268 "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) {
7269 "use strict";
7270 Object.defineProperty(exports2, "__esModule", {
7271 value: true
7272 });
7273 exports2.read = void 0;
7274 function read(path, settings, callback) {
7275 settings.fs.lstat(path, (lstatError, lstat) => {
7276 if (lstatError !== null) {
7277 callFailureCallback(callback, lstatError);
7278 return;
7279 }
7280 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
7281 callSuccessCallback(callback, lstat);
7282 return;
7283 }
7284 settings.fs.stat(path, (statError, stat) => {
7285 if (statError !== null) {
7286 if (settings.throwErrorOnBrokenSymbolicLink) {
7287 callFailureCallback(callback, statError);
7288 return;
7289 }
7290 callSuccessCallback(callback, lstat);
7291 return;
7292 }
7293 if (settings.markSymbolicLink) {
7294 stat.isSymbolicLink = () => true;
7295 }
7296 callSuccessCallback(callback, stat);
7297 });
7298 });
7299 }
7300 exports2.read = read;
7301 function callFailureCallback(callback, error) {
7302 callback(error);
7303 }
7304 function callSuccessCallback(callback, result) {
7305 callback(null, result);
7306 }
7307 }
7308});
7309var require_sync = __commonJS2({
7310 "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) {
7311 "use strict";
7312 Object.defineProperty(exports2, "__esModule", {
7313 value: true
7314 });
7315 exports2.read = void 0;
7316 function read(path, settings) {
7317 const lstat = settings.fs.lstatSync(path);
7318 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
7319 return lstat;
7320 }
7321 try {
7322 const stat = settings.fs.statSync(path);
7323 if (settings.markSymbolicLink) {
7324 stat.isSymbolicLink = () => true;
7325 }
7326 return stat;
7327 } catch (error) {
7328 if (!settings.throwErrorOnBrokenSymbolicLink) {
7329 return lstat;
7330 }
7331 throw error;
7332 }
7333 }
7334 exports2.read = read;
7335 }
7336});
7337var require_fs2 = __commonJS2({
7338 "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) {
7339 "use strict";
7340 Object.defineProperty(exports2, "__esModule", {
7341 value: true
7342 });
7343 exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
7344 var fs = require("fs");
7345 exports2.FILE_SYSTEM_ADAPTER = {
7346 lstat: fs.lstat,
7347 stat: fs.stat,
7348 lstatSync: fs.lstatSync,
7349 statSync: fs.statSync
7350 };
7351 function createFileSystemAdapter(fsMethods) {
7352 if (fsMethods === void 0) {
7353 return exports2.FILE_SYSTEM_ADAPTER;
7354 }
7355 return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
7356 }
7357 exports2.createFileSystemAdapter = createFileSystemAdapter;
7358 }
7359});
7360var require_settings = __commonJS2({
7361 "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
7362 "use strict";
7363 Object.defineProperty(exports2, "__esModule", {
7364 value: true
7365 });
7366 var fs = require_fs2();
7367 var Settings = class {
7368 constructor(_options = {}) {
7369 this._options = _options;
7370 this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
7371 this.fs = fs.createFileSystemAdapter(this._options.fs);
7372 this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
7373 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
7374 }
7375 _getValue(option, value) {
7376 return option !== null && option !== void 0 ? option : value;
7377 }
7378 };
7379 exports2.default = Settings;
7380 }
7381});
7382var require_out = __commonJS2({
7383 "node_modules/@nodelib/fs.stat/out/index.js"(exports2) {
7384 "use strict";
7385 Object.defineProperty(exports2, "__esModule", {
7386 value: true
7387 });
7388 exports2.statSync = exports2.stat = exports2.Settings = void 0;
7389 var async = require_async();
7390 var sync = require_sync();
7391 var settings_1 = require_settings();
7392 exports2.Settings = settings_1.default;
7393 function stat(path, optionsOrSettingsOrCallback, callback) {
7394 if (typeof optionsOrSettingsOrCallback === "function") {
7395 async.read(path, getSettings(), optionsOrSettingsOrCallback);
7396 return;
7397 }
7398 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
7399 }
7400 exports2.stat = stat;
7401 function statSync(path, optionsOrSettings) {
7402 const settings = getSettings(optionsOrSettings);
7403 return sync.read(path, settings);
7404 }
7405 exports2.statSync = statSync;
7406 function getSettings(settingsOrOptions = {}) {
7407 if (settingsOrOptions instanceof settings_1.default) {
7408 return settingsOrOptions;
7409 }
7410 return new settings_1.default(settingsOrOptions);
7411 }
7412 }
7413});
7414var require_queue_microtask = __commonJS2({
7415 "node_modules/queue-microtask/index.js"(exports2, module2) {
7416 var promise;
7417 module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => {
7418 throw err;
7419 }, 0));
7420 }
7421});
7422var require_run_parallel = __commonJS2({
7423 "node_modules/run-parallel/index.js"(exports2, module2) {
7424 module2.exports = runParallel;
7425 var queueMicrotask2 = require_queue_microtask();
7426 function runParallel(tasks, cb) {
7427 let results, pending, keys;
7428 let isSync = true;
7429 if (Array.isArray(tasks)) {
7430 results = [];
7431 pending = tasks.length;
7432 } else {
7433 keys = Object.keys(tasks);
7434 results = {};
7435 pending = keys.length;
7436 }
7437 function done(err) {
7438 function end() {
7439 if (cb)
7440 cb(err, results);
7441 cb = null;
7442 }
7443 if (isSync)
7444 queueMicrotask2(end);
7445 else
7446 end();
7447 }
7448 function each(i, err, result) {
7449 results[i] = result;
7450 if (--pending === 0 || err) {
7451 done(err);
7452 }
7453 }
7454 if (!pending) {
7455 done(null);
7456 } else if (keys) {
7457 keys.forEach(function(key) {
7458 tasks[key](function(err, result) {
7459 each(key, err, result);
7460 });
7461 });
7462 } else {
7463 tasks.forEach(function(task, i) {
7464 task(function(err, result) {
7465 each(i, err, result);
7466 });
7467 });
7468 }
7469 isSync = false;
7470 }
7471 }
7472});
7473var require_constants3 = __commonJS2({
7474 "node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) {
7475 "use strict";
7476 Object.defineProperty(exports2, "__esModule", {
7477 value: true
7478 });
7479 exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
7480 var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
7481 if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) {
7482 throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
7483 }
7484 var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
7485 var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
7486 var SUPPORTED_MAJOR_VERSION = 10;
7487 var SUPPORTED_MINOR_VERSION = 10;
7488 var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
7489 var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
7490 exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
7491 }
7492});
7493var require_fs3 = __commonJS2({
7494 "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) {
7495 "use strict";
7496 Object.defineProperty(exports2, "__esModule", {
7497 value: true
7498 });
7499 exports2.createDirentFromStats = void 0;
7500 var DirentFromStats = class {
7501 constructor(name, stats) {
7502 this.name = name;
7503 this.isBlockDevice = stats.isBlockDevice.bind(stats);
7504 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
7505 this.isDirectory = stats.isDirectory.bind(stats);
7506 this.isFIFO = stats.isFIFO.bind(stats);
7507 this.isFile = stats.isFile.bind(stats);
7508 this.isSocket = stats.isSocket.bind(stats);
7509 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
7510 }
7511 };
7512 function createDirentFromStats(name, stats) {
7513 return new DirentFromStats(name, stats);
7514 }
7515 exports2.createDirentFromStats = createDirentFromStats;
7516 }
7517});
7518var require_utils5 = __commonJS2({
7519 "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) {
7520 "use strict";
7521 Object.defineProperty(exports2, "__esModule", {
7522 value: true
7523 });
7524 exports2.fs = void 0;
7525 var fs = require_fs3();
7526 exports2.fs = fs;
7527 }
7528});
7529var require_common = __commonJS2({
7530 "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) {
7531 "use strict";
7532 Object.defineProperty(exports2, "__esModule", {
7533 value: true
7534 });
7535 exports2.joinPathSegments = void 0;
7536 function joinPathSegments(a, b, separator) {
7537 if (a.endsWith(separator)) {
7538 return a + b;
7539 }
7540 return a + separator + b;
7541 }
7542 exports2.joinPathSegments = joinPathSegments;
7543 }
7544});
7545var require_async2 = __commonJS2({
7546 "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) {
7547 "use strict";
7548 Object.defineProperty(exports2, "__esModule", {
7549 value: true
7550 });
7551 exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
7552 var fsStat = require_out();
7553 var rpl = require_run_parallel();
7554 var constants_1 = require_constants3();
7555 var utils = require_utils5();
7556 var common = require_common();
7557 function read(directory, settings, callback) {
7558 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
7559 readdirWithFileTypes(directory, settings, callback);
7560 return;
7561 }
7562 readdir(directory, settings, callback);
7563 }
7564 exports2.read = read;
7565 function readdirWithFileTypes(directory, settings, callback) {
7566 settings.fs.readdir(directory, {
7567 withFileTypes: true
7568 }, (readdirError, dirents) => {
7569 if (readdirError !== null) {
7570 callFailureCallback(callback, readdirError);
7571 return;
7572 }
7573 const entries = dirents.map((dirent) => ({
7574 dirent,
7575 name: dirent.name,
7576 path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
7577 }));
7578 if (!settings.followSymbolicLinks) {
7579 callSuccessCallback(callback, entries);
7580 return;
7581 }
7582 const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
7583 rpl(tasks, (rplError, rplEntries) => {
7584 if (rplError !== null) {
7585 callFailureCallback(callback, rplError);
7586 return;
7587 }
7588 callSuccessCallback(callback, rplEntries);
7589 });
7590 });
7591 }
7592 exports2.readdirWithFileTypes = readdirWithFileTypes;
7593 function makeRplTaskEntry(entry, settings) {
7594 return (done) => {
7595 if (!entry.dirent.isSymbolicLink()) {
7596 done(null, entry);
7597 return;
7598 }
7599 settings.fs.stat(entry.path, (statError, stats) => {
7600 if (statError !== null) {
7601 if (settings.throwErrorOnBrokenSymbolicLink) {
7602 done(statError);
7603 return;
7604 }
7605 done(null, entry);
7606 return;
7607 }
7608 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
7609 done(null, entry);
7610 });
7611 };
7612 }
7613 function readdir(directory, settings, callback) {
7614 settings.fs.readdir(directory, (readdirError, names) => {
7615 if (readdirError !== null) {
7616 callFailureCallback(callback, readdirError);
7617 return;
7618 }
7619 const tasks = names.map((name) => {
7620 const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
7621 return (done) => {
7622 fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
7623 if (error !== null) {
7624 done(error);
7625 return;
7626 }
7627 const entry = {
7628 name,
7629 path,
7630 dirent: utils.fs.createDirentFromStats(name, stats)
7631 };
7632 if (settings.stats) {
7633 entry.stats = stats;
7634 }
7635 done(null, entry);
7636 });
7637 };
7638 });
7639 rpl(tasks, (rplError, entries) => {
7640 if (rplError !== null) {
7641 callFailureCallback(callback, rplError);
7642 return;
7643 }
7644 callSuccessCallback(callback, entries);
7645 });
7646 });
7647 }
7648 exports2.readdir = readdir;
7649 function callFailureCallback(callback, error) {
7650 callback(error);
7651 }
7652 function callSuccessCallback(callback, result) {
7653 callback(null, result);
7654 }
7655 }
7656});
7657var require_sync2 = __commonJS2({
7658 "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) {
7659 "use strict";
7660 Object.defineProperty(exports2, "__esModule", {
7661 value: true
7662 });
7663 exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
7664 var fsStat = require_out();
7665 var constants_1 = require_constants3();
7666 var utils = require_utils5();
7667 var common = require_common();
7668 function read(directory, settings) {
7669 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
7670 return readdirWithFileTypes(directory, settings);
7671 }
7672 return readdir(directory, settings);
7673 }
7674 exports2.read = read;
7675 function readdirWithFileTypes(directory, settings) {
7676 const dirents = settings.fs.readdirSync(directory, {
7677 withFileTypes: true
7678 });
7679 return dirents.map((dirent) => {
7680 const entry = {
7681 dirent,
7682 name: dirent.name,
7683 path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
7684 };
7685 if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
7686 try {
7687 const stats = settings.fs.statSync(entry.path);
7688 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
7689 } catch (error) {
7690 if (settings.throwErrorOnBrokenSymbolicLink) {
7691 throw error;
7692 }
7693 }
7694 }
7695 return entry;
7696 });
7697 }
7698 exports2.readdirWithFileTypes = readdirWithFileTypes;
7699 function readdir(directory, settings) {
7700 const names = settings.fs.readdirSync(directory);
7701 return names.map((name) => {
7702 const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
7703 const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
7704 const entry = {
7705 name,
7706 path: entryPath,
7707 dirent: utils.fs.createDirentFromStats(name, stats)
7708 };
7709 if (settings.stats) {
7710 entry.stats = stats;
7711 }
7712 return entry;
7713 });
7714 }
7715 exports2.readdir = readdir;
7716 }
7717});
7718var require_fs4 = __commonJS2({
7719 "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) {
7720 "use strict";
7721 Object.defineProperty(exports2, "__esModule", {
7722 value: true
7723 });
7724 exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
7725 var fs = require("fs");
7726 exports2.FILE_SYSTEM_ADAPTER = {
7727 lstat: fs.lstat,
7728 stat: fs.stat,
7729 lstatSync: fs.lstatSync,
7730 statSync: fs.statSync,
7731 readdir: fs.readdir,
7732 readdirSync: fs.readdirSync
7733 };
7734 function createFileSystemAdapter(fsMethods) {
7735 if (fsMethods === void 0) {
7736 return exports2.FILE_SYSTEM_ADAPTER;
7737 }
7738 return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
7739 }
7740 exports2.createFileSystemAdapter = createFileSystemAdapter;
7741 }
7742});
7743var require_settings2 = __commonJS2({
7744 "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
7745 "use strict";
7746 Object.defineProperty(exports2, "__esModule", {
7747 value: true
7748 });
7749 var path = require("path");
7750 var fsStat = require_out();
7751 var fs = require_fs4();
7752 var Settings = class {
7753 constructor(_options = {}) {
7754 this._options = _options;
7755 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
7756 this.fs = fs.createFileSystemAdapter(this._options.fs);
7757 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
7758 this.stats = this._getValue(this._options.stats, false);
7759 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
7760 this.fsStatSettings = new fsStat.Settings({
7761 followSymbolicLink: this.followSymbolicLinks,
7762 fs: this.fs,
7763 throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
7764 });
7765 }
7766 _getValue(option, value) {
7767 return option !== null && option !== void 0 ? option : value;
7768 }
7769 };
7770 exports2.default = Settings;
7771 }
7772});
7773var require_out2 = __commonJS2({
7774 "node_modules/@nodelib/fs.scandir/out/index.js"(exports2) {
7775 "use strict";
7776 Object.defineProperty(exports2, "__esModule", {
7777 value: true
7778 });
7779 exports2.Settings = exports2.scandirSync = exports2.scandir = void 0;
7780 var async = require_async2();
7781 var sync = require_sync2();
7782 var settings_1 = require_settings2();
7783 exports2.Settings = settings_1.default;
7784 function scandir(path, optionsOrSettingsOrCallback, callback) {
7785 if (typeof optionsOrSettingsOrCallback === "function") {
7786 async.read(path, getSettings(), optionsOrSettingsOrCallback);
7787 return;
7788 }
7789 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
7790 }
7791 exports2.scandir = scandir;
7792 function scandirSync(path, optionsOrSettings) {
7793 const settings = getSettings(optionsOrSettings);
7794 return sync.read(path, settings);
7795 }
7796 exports2.scandirSync = scandirSync;
7797 function getSettings(settingsOrOptions = {}) {
7798 if (settingsOrOptions instanceof settings_1.default) {
7799 return settingsOrOptions;
7800 }
7801 return new settings_1.default(settingsOrOptions);
7802 }
7803 }
7804});
7805var require_reusify = __commonJS2({
7806 "node_modules/reusify/reusify.js"(exports2, module2) {
7807 "use strict";
7808 function reusify(Constructor) {
7809 var head = new Constructor();
7810 var tail = head;
7811 function get() {
7812 var current = head;
7813 if (current.next) {
7814 head = current.next;
7815 } else {
7816 head = new Constructor();
7817 tail = head;
7818 }
7819 current.next = null;
7820 return current;
7821 }
7822 function release(obj) {
7823 tail.next = obj;
7824 tail = obj;
7825 }
7826 return {
7827 get,
7828 release
7829 };
7830 }
7831 module2.exports = reusify;
7832 }
7833});
7834var require_queue = __commonJS2({
7835 "node_modules/fastq/queue.js"(exports2, module2) {
7836 "use strict";
7837 var reusify = require_reusify();
7838 function fastqueue(context, worker, concurrency) {
7839 if (typeof context === "function") {
7840 concurrency = worker;
7841 worker = context;
7842 context = null;
7843 }
7844 if (concurrency < 1) {
7845 throw new Error("fastqueue concurrency must be greater than 1");
7846 }
7847 var cache = reusify(Task);
7848 var queueHead = null;
7849 var queueTail = null;
7850 var _running = 0;
7851 var errorHandler = null;
7852 var self2 = {
7853 push,
7854 drain: noop,
7855 saturated: noop,
7856 pause,
7857 paused: false,
7858 concurrency,
7859 running,
7860 resume,
7861 idle,
7862 length,
7863 getQueue,
7864 unshift,
7865 empty: noop,
7866 kill,
7867 killAndDrain,
7868 error
7869 };
7870 return self2;
7871 function running() {
7872 return _running;
7873 }
7874 function pause() {
7875 self2.paused = true;
7876 }
7877 function length() {
7878 var current = queueHead;
7879 var counter = 0;
7880 while (current) {
7881 current = current.next;
7882 counter++;
7883 }
7884 return counter;
7885 }
7886 function getQueue() {
7887 var current = queueHead;
7888 var tasks = [];
7889 while (current) {
7890 tasks.push(current.value);
7891 current = current.next;
7892 }
7893 return tasks;
7894 }
7895 function resume() {
7896 if (!self2.paused)
7897 return;
7898 self2.paused = false;
7899 for (var i = 0; i < self2.concurrency; i++) {
7900 _running++;
7901 release();
7902 }
7903 }
7904 function idle() {
7905 return _running === 0 && self2.length() === 0;
7906 }
7907 function push(value, done) {
7908 var current = cache.get();
7909 current.context = context;
7910 current.release = release;
7911 current.value = value;
7912 current.callback = done || noop;
7913 current.errorHandler = errorHandler;
7914 if (_running === self2.concurrency || self2.paused) {
7915 if (queueTail) {
7916 queueTail.next = current;
7917 queueTail = current;
7918 } else {
7919 queueHead = current;
7920 queueTail = current;
7921 self2.saturated();
7922 }
7923 } else {
7924 _running++;
7925 worker.call(context, current.value, current.worked);
7926 }
7927 }
7928 function unshift(value, done) {
7929 var current = cache.get();
7930 current.context = context;
7931 current.release = release;
7932 current.value = value;
7933 current.callback = done || noop;
7934 if (_running === self2.concurrency || self2.paused) {
7935 if (queueHead) {
7936 current.next = queueHead;
7937 queueHead = current;
7938 } else {
7939 queueHead = current;
7940 queueTail = current;
7941 self2.saturated();
7942 }
7943 } else {
7944 _running++;
7945 worker.call(context, current.value, current.worked);
7946 }
7947 }
7948 function release(holder) {
7949 if (holder) {
7950 cache.release(holder);
7951 }
7952 var next = queueHead;
7953 if (next) {
7954 if (!self2.paused) {
7955 if (queueTail === queueHead) {
7956 queueTail = null;
7957 }
7958 queueHead = next.next;
7959 next.next = null;
7960 worker.call(context, next.value, next.worked);
7961 if (queueTail === null) {
7962 self2.empty();
7963 }
7964 } else {
7965 _running--;
7966 }
7967 } else if (--_running === 0) {
7968 self2.drain();
7969 }
7970 }
7971 function kill() {
7972 queueHead = null;
7973 queueTail = null;
7974 self2.drain = noop;
7975 }
7976 function killAndDrain() {
7977 queueHead = null;
7978 queueTail = null;
7979 self2.drain();
7980 self2.drain = noop;
7981 }
7982 function error(handler) {
7983 errorHandler = handler;
7984 }
7985 }
7986 function noop() {
7987 }
7988 function Task() {
7989 this.value = null;
7990 this.callback = noop;
7991 this.next = null;
7992 this.release = noop;
7993 this.context = null;
7994 this.errorHandler = null;
7995 var self2 = this;
7996 this.worked = function worked(err, result) {
7997 var callback = self2.callback;
7998 var errorHandler = self2.errorHandler;
7999 var val = self2.value;
8000 self2.value = null;
8001 self2.callback = noop;
8002 if (self2.errorHandler) {
8003 errorHandler(err, val);
8004 }
8005 callback.call(self2.context, err, result);
8006 self2.release(self2);
8007 };
8008 }
8009 function queueAsPromised(context, worker, concurrency) {
8010 if (typeof context === "function") {
8011 concurrency = worker;
8012 worker = context;
8013 context = null;
8014 }
8015 function asyncWrapper(arg, cb) {
8016 worker.call(this, arg).then(function(res) {
8017 cb(null, res);
8018 }, cb);
8019 }
8020 var queue = fastqueue(context, asyncWrapper, concurrency);
8021 var pushCb = queue.push;
8022 var unshiftCb = queue.unshift;
8023 queue.push = push;
8024 queue.unshift = unshift;
8025 queue.drained = drained;
8026 return queue;
8027 function push(value) {
8028 var p = new Promise(function(resolve, reject) {
8029 pushCb(value, function(err, result) {
8030 if (err) {
8031 reject(err);
8032 return;
8033 }
8034 resolve(result);
8035 });
8036 });
8037 p.catch(noop);
8038 return p;
8039 }
8040 function unshift(value) {
8041 var p = new Promise(function(resolve, reject) {
8042 unshiftCb(value, function(err, result) {
8043 if (err) {
8044 reject(err);
8045 return;
8046 }
8047 resolve(result);
8048 });
8049 });
8050 p.catch(noop);
8051 return p;
8052 }
8053 function drained() {
8054 var previousDrain = queue.drain;
8055 var p = new Promise(function(resolve) {
8056 queue.drain = function() {
8057 previousDrain();
8058 resolve();
8059 };
8060 });
8061 return p;
8062 }
8063 }
8064 module2.exports = fastqueue;
8065 module2.exports.promise = queueAsPromised;
8066 }
8067});
8068var require_common2 = __commonJS2({
8069 "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) {
8070 "use strict";
8071 Object.defineProperty(exports2, "__esModule", {
8072 value: true
8073 });
8074 exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0;
8075 function isFatalError(settings, error) {
8076 if (settings.errorFilter === null) {
8077 return true;
8078 }
8079 return !settings.errorFilter(error);
8080 }
8081 exports2.isFatalError = isFatalError;
8082 function isAppliedFilter(filter, value) {
8083 return filter === null || filter(value);
8084 }
8085 exports2.isAppliedFilter = isAppliedFilter;
8086 function replacePathSegmentSeparator(filepath, separator) {
8087 return filepath.split(/[/\\]/).join(separator);
8088 }
8089 exports2.replacePathSegmentSeparator = replacePathSegmentSeparator;
8090 function joinPathSegments(a, b, separator) {
8091 if (a === "") {
8092 return b;
8093 }
8094 if (a.endsWith(separator)) {
8095 return a + b;
8096 }
8097 return a + separator + b;
8098 }
8099 exports2.joinPathSegments = joinPathSegments;
8100 }
8101});
8102var require_reader = __commonJS2({
8103 "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) {
8104 "use strict";
8105 Object.defineProperty(exports2, "__esModule", {
8106 value: true
8107 });
8108 var common = require_common2();
8109 var Reader = class {
8110 constructor(_root, _settings) {
8111 this._root = _root;
8112 this._settings = _settings;
8113 this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
8114 }
8115 };
8116 exports2.default = Reader;
8117 }
8118});
8119var require_async3 = __commonJS2({
8120 "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) {
8121 "use strict";
8122 Object.defineProperty(exports2, "__esModule", {
8123 value: true
8124 });
8125 var events_1 = require("events");
8126 var fsScandir = require_out2();
8127 var fastq = require_queue();
8128 var common = require_common2();
8129 var reader_1 = require_reader();
8130 var AsyncReader = class extends reader_1.default {
8131 constructor(_root, _settings) {
8132 super(_root, _settings);
8133 this._settings = _settings;
8134 this._scandir = fsScandir.scandir;
8135 this._emitter = new events_1.EventEmitter();
8136 this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
8137 this._isFatalError = false;
8138 this._isDestroyed = false;
8139 this._queue.drain = () => {
8140 if (!this._isFatalError) {
8141 this._emitter.emit("end");
8142 }
8143 };
8144 }
8145 read() {
8146 this._isFatalError = false;
8147 this._isDestroyed = false;
8148 setImmediate(() => {
8149 this._pushToQueue(this._root, this._settings.basePath);
8150 });
8151 return this._emitter;
8152 }
8153 get isDestroyed() {
8154 return this._isDestroyed;
8155 }
8156 destroy() {
8157 if (this._isDestroyed) {
8158 throw new Error("The reader is already destroyed");
8159 }
8160 this._isDestroyed = true;
8161 this._queue.killAndDrain();
8162 }
8163 onEntry(callback) {
8164 this._emitter.on("entry", callback);
8165 }
8166 onError(callback) {
8167 this._emitter.once("error", callback);
8168 }
8169 onEnd(callback) {
8170 this._emitter.once("end", callback);
8171 }
8172 _pushToQueue(directory, base) {
8173 const queueItem = {
8174 directory,
8175 base
8176 };
8177 this._queue.push(queueItem, (error) => {
8178 if (error !== null) {
8179 this._handleError(error);
8180 }
8181 });
8182 }
8183 _worker(item, done) {
8184 this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
8185 if (error !== null) {
8186 done(error, void 0);
8187 return;
8188 }
8189 for (const entry of entries) {
8190 this._handleEntry(entry, item.base);
8191 }
8192 done(null, void 0);
8193 });
8194 }
8195 _handleError(error) {
8196 if (this._isDestroyed || !common.isFatalError(this._settings, error)) {
8197 return;
8198 }
8199 this._isFatalError = true;
8200 this._isDestroyed = true;
8201 this._emitter.emit("error", error);
8202 }
8203 _handleEntry(entry, base) {
8204 if (this._isDestroyed || this._isFatalError) {
8205 return;
8206 }
8207 const fullpath = entry.path;
8208 if (base !== void 0) {
8209 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
8210 }
8211 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
8212 this._emitEntry(entry);
8213 }
8214 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
8215 this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
8216 }
8217 }
8218 _emitEntry(entry) {
8219 this._emitter.emit("entry", entry);
8220 }
8221 };
8222 exports2.default = AsyncReader;
8223 }
8224});
8225var require_async4 = __commonJS2({
8226 "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) {
8227 "use strict";
8228 Object.defineProperty(exports2, "__esModule", {
8229 value: true
8230 });
8231 var async_1 = require_async3();
8232 var AsyncProvider = class {
8233 constructor(_root, _settings) {
8234 this._root = _root;
8235 this._settings = _settings;
8236 this._reader = new async_1.default(this._root, this._settings);
8237 this._storage = [];
8238 }
8239 read(callback) {
8240 this._reader.onError((error) => {
8241 callFailureCallback(callback, error);
8242 });
8243 this._reader.onEntry((entry) => {
8244 this._storage.push(entry);
8245 });
8246 this._reader.onEnd(() => {
8247 callSuccessCallback(callback, this._storage);
8248 });
8249 this._reader.read();
8250 }
8251 };
8252 exports2.default = AsyncProvider;
8253 function callFailureCallback(callback, error) {
8254 callback(error);
8255 }
8256 function callSuccessCallback(callback, entries) {
8257 callback(null, entries);
8258 }
8259 }
8260});
8261var require_stream2 = __commonJS2({
8262 "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) {
8263 "use strict";
8264 Object.defineProperty(exports2, "__esModule", {
8265 value: true
8266 });
8267 var stream_1 = require("stream");
8268 var async_1 = require_async3();
8269 var StreamProvider = class {
8270 constructor(_root, _settings) {
8271 this._root = _root;
8272 this._settings = _settings;
8273 this._reader = new async_1.default(this._root, this._settings);
8274 this._stream = new stream_1.Readable({
8275 objectMode: true,
8276 read: () => {
8277 },
8278 destroy: () => {
8279 if (!this._reader.isDestroyed) {
8280 this._reader.destroy();
8281 }
8282 }
8283 });
8284 }
8285 read() {
8286 this._reader.onError((error) => {
8287 this._stream.emit("error", error);
8288 });
8289 this._reader.onEntry((entry) => {
8290 this._stream.push(entry);
8291 });
8292 this._reader.onEnd(() => {
8293 this._stream.push(null);
8294 });
8295 this._reader.read();
8296 return this._stream;
8297 }
8298 };
8299 exports2.default = StreamProvider;
8300 }
8301});
8302var require_sync3 = __commonJS2({
8303 "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) {
8304 "use strict";
8305 Object.defineProperty(exports2, "__esModule", {
8306 value: true
8307 });
8308 var fsScandir = require_out2();
8309 var common = require_common2();
8310 var reader_1 = require_reader();
8311 var SyncReader = class extends reader_1.default {
8312 constructor() {
8313 super(...arguments);
8314 this._scandir = fsScandir.scandirSync;
8315 this._storage = [];
8316 this._queue = /* @__PURE__ */ new Set();
8317 }
8318 read() {
8319 this._pushToQueue(this._root, this._settings.basePath);
8320 this._handleQueue();
8321 return this._storage;
8322 }
8323 _pushToQueue(directory, base) {
8324 this._queue.add({
8325 directory,
8326 base
8327 });
8328 }
8329 _handleQueue() {
8330 for (const item of this._queue.values()) {
8331 this._handleDirectory(item.directory, item.base);
8332 }
8333 }
8334 _handleDirectory(directory, base) {
8335 try {
8336 const entries = this._scandir(directory, this._settings.fsScandirSettings);
8337 for (const entry of entries) {
8338 this._handleEntry(entry, base);
8339 }
8340 } catch (error) {
8341 this._handleError(error);
8342 }
8343 }
8344 _handleError(error) {
8345 if (!common.isFatalError(this._settings, error)) {
8346 return;
8347 }
8348 throw error;
8349 }
8350 _handleEntry(entry, base) {
8351 const fullpath = entry.path;
8352 if (base !== void 0) {
8353 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
8354 }
8355 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
8356 this._pushToStorage(entry);
8357 }
8358 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
8359 this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
8360 }
8361 }
8362 _pushToStorage(entry) {
8363 this._storage.push(entry);
8364 }
8365 };
8366 exports2.default = SyncReader;
8367 }
8368});
8369var require_sync4 = __commonJS2({
8370 "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) {
8371 "use strict";
8372 Object.defineProperty(exports2, "__esModule", {
8373 value: true
8374 });
8375 var sync_1 = require_sync3();
8376 var SyncProvider = class {
8377 constructor(_root, _settings) {
8378 this._root = _root;
8379 this._settings = _settings;
8380 this._reader = new sync_1.default(this._root, this._settings);
8381 }
8382 read() {
8383 return this._reader.read();
8384 }
8385 };
8386 exports2.default = SyncProvider;
8387 }
8388});
8389var require_settings3 = __commonJS2({
8390 "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
8391 "use strict";
8392 Object.defineProperty(exports2, "__esModule", {
8393 value: true
8394 });
8395 var path = require("path");
8396 var fsScandir = require_out2();
8397 var Settings = class {
8398 constructor(_options = {}) {
8399 this._options = _options;
8400 this.basePath = this._getValue(this._options.basePath, void 0);
8401 this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);
8402 this.deepFilter = this._getValue(this._options.deepFilter, null);
8403 this.entryFilter = this._getValue(this._options.entryFilter, null);
8404 this.errorFilter = this._getValue(this._options.errorFilter, null);
8405 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
8406 this.fsScandirSettings = new fsScandir.Settings({
8407 followSymbolicLinks: this._options.followSymbolicLinks,
8408 fs: this._options.fs,
8409 pathSegmentSeparator: this._options.pathSegmentSeparator,
8410 stats: this._options.stats,
8411 throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
8412 });
8413 }
8414 _getValue(option, value) {
8415 return option !== null && option !== void 0 ? option : value;
8416 }
8417 };
8418 exports2.default = Settings;
8419 }
8420});
8421var require_out3 = __commonJS2({
8422 "node_modules/@nodelib/fs.walk/out/index.js"(exports2) {
8423 "use strict";
8424 Object.defineProperty(exports2, "__esModule", {
8425 value: true
8426 });
8427 exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0;
8428 var async_1 = require_async4();
8429 var stream_1 = require_stream2();
8430 var sync_1 = require_sync4();
8431 var settings_1 = require_settings3();
8432 exports2.Settings = settings_1.default;
8433 function walk(directory, optionsOrSettingsOrCallback, callback) {
8434 if (typeof optionsOrSettingsOrCallback === "function") {
8435 new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
8436 return;
8437 }
8438 new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
8439 }
8440 exports2.walk = walk;
8441 function walkSync(directory, optionsOrSettings) {
8442 const settings = getSettings(optionsOrSettings);
8443 const provider = new sync_1.default(directory, settings);
8444 return provider.read();
8445 }
8446 exports2.walkSync = walkSync;
8447 function walkStream(directory, optionsOrSettings) {
8448 const settings = getSettings(optionsOrSettings);
8449 const provider = new stream_1.default(directory, settings);
8450 return provider.read();
8451 }
8452 exports2.walkStream = walkStream;
8453 function getSettings(settingsOrOptions = {}) {
8454 if (settingsOrOptions instanceof settings_1.default) {
8455 return settingsOrOptions;
8456 }
8457 return new settings_1.default(settingsOrOptions);
8458 }
8459 }
8460});
8461var require_reader2 = __commonJS2({
8462 "node_modules/fast-glob/out/readers/reader.js"(exports2) {
8463 "use strict";
8464 Object.defineProperty(exports2, "__esModule", {
8465 value: true
8466 });
8467 var path = require("path");
8468 var fsStat = require_out();
8469 var utils = require_utils4();
8470 var Reader = class {
8471 constructor(_settings) {
8472 this._settings = _settings;
8473 this._fsStatSettings = new fsStat.Settings({
8474 followSymbolicLink: this._settings.followSymbolicLinks,
8475 fs: this._settings.fs,
8476 throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
8477 });
8478 }
8479 _getFullEntryPath(filepath) {
8480 return path.resolve(this._settings.cwd, filepath);
8481 }
8482 _makeEntry(stats, pattern) {
8483 const entry = {
8484 name: pattern,
8485 path: pattern,
8486 dirent: utils.fs.createDirentFromStats(pattern, stats)
8487 };
8488 if (this._settings.stats) {
8489 entry.stats = stats;
8490 }
8491 return entry;
8492 }
8493 _isFatalError(error) {
8494 return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
8495 }
8496 };
8497 exports2.default = Reader;
8498 }
8499});
8500var require_stream3 = __commonJS2({
8501 "node_modules/fast-glob/out/readers/stream.js"(exports2) {
8502 "use strict";
8503 Object.defineProperty(exports2, "__esModule", {
8504 value: true
8505 });
8506 var stream_1 = require("stream");
8507 var fsStat = require_out();
8508 var fsWalk = require_out3();
8509 var reader_1 = require_reader2();
8510 var ReaderStream = class extends reader_1.default {
8511 constructor() {
8512 super(...arguments);
8513 this._walkStream = fsWalk.walkStream;
8514 this._stat = fsStat.stat;
8515 }
8516 dynamic(root, options) {
8517 return this._walkStream(root, options);
8518 }
8519 static(patterns, options) {
8520 const filepaths = patterns.map(this._getFullEntryPath, this);
8521 const stream = new stream_1.PassThrough({
8522 objectMode: true
8523 });
8524 stream._write = (index, _enc, done) => {
8525 return this._getEntry(filepaths[index], patterns[index], options).then((entry) => {
8526 if (entry !== null && options.entryFilter(entry)) {
8527 stream.push(entry);
8528 }
8529 if (index === filepaths.length - 1) {
8530 stream.end();
8531 }
8532 done();
8533 }).catch(done);
8534 };
8535 for (let i = 0; i < filepaths.length; i++) {
8536 stream.write(i);
8537 }
8538 return stream;
8539 }
8540 _getEntry(filepath, pattern, options) {
8541 return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => {
8542 if (options.errorFilter(error)) {
8543 return null;
8544 }
8545 throw error;
8546 });
8547 }
8548 _getStat(filepath) {
8549 return new Promise((resolve, reject) => {
8550 this._stat(filepath, this._fsStatSettings, (error, stats) => {
8551 return error === null ? resolve(stats) : reject(error);
8552 });
8553 });
8554 }
8555 };
8556 exports2.default = ReaderStream;
8557 }
8558});
8559var require_matcher = __commonJS2({
8560 "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) {
8561 "use strict";
8562 Object.defineProperty(exports2, "__esModule", {
8563 value: true
8564 });
8565 var utils = require_utils4();
8566 var Matcher = class {
8567 constructor(_patterns, _settings, _micromatchOptions) {
8568 this._patterns = _patterns;
8569 this._settings = _settings;
8570 this._micromatchOptions = _micromatchOptions;
8571 this._storage = [];
8572 this._fillStorage();
8573 }
8574 _fillStorage() {
8575 const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns);
8576 for (const pattern of patterns) {
8577 const segments = this._getPatternSegments(pattern);
8578 const sections = this._splitSegmentsIntoSections(segments);
8579 this._storage.push({
8580 complete: sections.length <= 1,
8581 pattern,
8582 segments,
8583 sections
8584 });
8585 }
8586 }
8587 _getPatternSegments(pattern) {
8588 const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);
8589 return parts.map((part) => {
8590 const dynamic = utils.pattern.isDynamicPattern(part, this._settings);
8591 if (!dynamic) {
8592 return {
8593 dynamic: false,
8594 pattern: part
8595 };
8596 }
8597 return {
8598 dynamic: true,
8599 pattern: part,
8600 patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
8601 };
8602 });
8603 }
8604 _splitSegmentsIntoSections(segments) {
8605 return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
8606 }
8607 };
8608 exports2.default = Matcher;
8609 }
8610});
8611var require_partial = __commonJS2({
8612 "node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) {
8613 "use strict";
8614 Object.defineProperty(exports2, "__esModule", {
8615 value: true
8616 });
8617 var matcher_1 = require_matcher();
8618 var PartialMatcher = class extends matcher_1.default {
8619 match(filepath) {
8620 const parts = filepath.split("/");
8621 const levels = parts.length;
8622 const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
8623 for (const pattern of patterns) {
8624 const section = pattern.sections[0];
8625 if (!pattern.complete && levels > section.length) {
8626 return true;
8627 }
8628 const match = parts.every((part, index) => {
8629 const segment = pattern.segments[index];
8630 if (segment.dynamic && segment.patternRe.test(part)) {
8631 return true;
8632 }
8633 if (!segment.dynamic && segment.pattern === part) {
8634 return true;
8635 }
8636 return false;
8637 });
8638 if (match) {
8639 return true;
8640 }
8641 }
8642 return false;
8643 }
8644 };
8645 exports2.default = PartialMatcher;
8646 }
8647});
8648var require_deep = __commonJS2({
8649 "node_modules/fast-glob/out/providers/filters/deep.js"(exports2) {
8650 "use strict";
8651 Object.defineProperty(exports2, "__esModule", {
8652 value: true
8653 });
8654 var utils = require_utils4();
8655 var partial_1 = require_partial();
8656 var DeepFilter = class {
8657 constructor(_settings, _micromatchOptions) {
8658 this._settings = _settings;
8659 this._micromatchOptions = _micromatchOptions;
8660 }
8661 getFilter(basePath, positive, negative) {
8662 const matcher = this._getMatcher(positive);
8663 const negativeRe = this._getNegativePatternsRe(negative);
8664 return (entry) => this._filter(basePath, entry, matcher, negativeRe);
8665 }
8666 _getMatcher(patterns) {
8667 return new partial_1.default(patterns, this._settings, this._micromatchOptions);
8668 }
8669 _getNegativePatternsRe(patterns) {
8670 const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
8671 return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
8672 }
8673 _filter(basePath, entry, matcher, negativeRe) {
8674 if (this._isSkippedByDeep(basePath, entry.path)) {
8675 return false;
8676 }
8677 if (this._isSkippedSymbolicLink(entry)) {
8678 return false;
8679 }
8680 const filepath = utils.path.removeLeadingDotSegment(entry.path);
8681 if (this._isSkippedByPositivePatterns(filepath, matcher)) {
8682 return false;
8683 }
8684 return this._isSkippedByNegativePatterns(filepath, negativeRe);
8685 }
8686 _isSkippedByDeep(basePath, entryPath) {
8687 if (this._settings.deep === Infinity) {
8688 return false;
8689 }
8690 return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
8691 }
8692 _getEntryLevel(basePath, entryPath) {
8693 const entryPathDepth = entryPath.split("/").length;
8694 if (basePath === "") {
8695 return entryPathDepth;
8696 }
8697 const basePathDepth = basePath.split("/").length;
8698 return entryPathDepth - basePathDepth;
8699 }
8700 _isSkippedSymbolicLink(entry) {
8701 return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
8702 }
8703 _isSkippedByPositivePatterns(entryPath, matcher) {
8704 return !this._settings.baseNameMatch && !matcher.match(entryPath);
8705 }
8706 _isSkippedByNegativePatterns(entryPath, patternsRe) {
8707 return !utils.pattern.matchAny(entryPath, patternsRe);
8708 }
8709 };
8710 exports2.default = DeepFilter;
8711 }
8712});
8713var require_entry = __commonJS2({
8714 "node_modules/fast-glob/out/providers/filters/entry.js"(exports2) {
8715 "use strict";
8716 Object.defineProperty(exports2, "__esModule", {
8717 value: true
8718 });
8719 var utils = require_utils4();
8720 var EntryFilter = class {
8721 constructor(_settings, _micromatchOptions) {
8722 this._settings = _settings;
8723 this._micromatchOptions = _micromatchOptions;
8724 this.index = /* @__PURE__ */ new Map();
8725 }
8726 getFilter(positive, negative) {
8727 const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
8728 const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
8729 return (entry) => this._filter(entry, positiveRe, negativeRe);
8730 }
8731 _filter(entry, positiveRe, negativeRe) {
8732 if (this._settings.unique && this._isDuplicateEntry(entry)) {
8733 return false;
8734 }
8735 if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
8736 return false;
8737 }
8738 if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) {
8739 return false;
8740 }
8741 const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
8742 const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
8743 if (this._settings.unique && isMatched) {
8744 this._createIndexRecord(entry);
8745 }
8746 return isMatched;
8747 }
8748 _isDuplicateEntry(entry) {
8749 return this.index.has(entry.path);
8750 }
8751 _createIndexRecord(entry) {
8752 this.index.set(entry.path, void 0);
8753 }
8754 _onlyFileFilter(entry) {
8755 return this._settings.onlyFiles && !entry.dirent.isFile();
8756 }
8757 _onlyDirectoryFilter(entry) {
8758 return this._settings.onlyDirectories && !entry.dirent.isDirectory();
8759 }
8760 _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
8761 if (!this._settings.absolute) {
8762 return false;
8763 }
8764 const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
8765 return utils.pattern.matchAny(fullpath, patternsRe);
8766 }
8767 _isMatchToPatterns(entryPath, patternsRe) {
8768 const filepath = utils.path.removeLeadingDotSegment(entryPath);
8769 return utils.pattern.matchAny(filepath, patternsRe) || utils.pattern.matchAny(filepath + "/", patternsRe);
8770 }
8771 };
8772 exports2.default = EntryFilter;
8773 }
8774});
8775var require_error = __commonJS2({
8776 "node_modules/fast-glob/out/providers/filters/error.js"(exports2) {
8777 "use strict";
8778 Object.defineProperty(exports2, "__esModule", {
8779 value: true
8780 });
8781 var utils = require_utils4();
8782 var ErrorFilter = class {
8783 constructor(_settings) {
8784 this._settings = _settings;
8785 }
8786 getFilter() {
8787 return (error) => this._isNonFatalError(error);
8788 }
8789 _isNonFatalError(error) {
8790 return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
8791 }
8792 };
8793 exports2.default = ErrorFilter;
8794 }
8795});
8796var require_entry2 = __commonJS2({
8797 "node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) {
8798 "use strict";
8799 Object.defineProperty(exports2, "__esModule", {
8800 value: true
8801 });
8802 var utils = require_utils4();
8803 var EntryTransformer = class {
8804 constructor(_settings) {
8805 this._settings = _settings;
8806 }
8807 getTransformer() {
8808 return (entry) => this._transform(entry);
8809 }
8810 _transform(entry) {
8811 let filepath = entry.path;
8812 if (this._settings.absolute) {
8813 filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
8814 filepath = utils.path.unixify(filepath);
8815 }
8816 if (this._settings.markDirectories && entry.dirent.isDirectory()) {
8817 filepath += "/";
8818 }
8819 if (!this._settings.objectMode) {
8820 return filepath;
8821 }
8822 return Object.assign(Object.assign({}, entry), {
8823 path: filepath
8824 });
8825 }
8826 };
8827 exports2.default = EntryTransformer;
8828 }
8829});
8830var require_provider = __commonJS2({
8831 "node_modules/fast-glob/out/providers/provider.js"(exports2) {
8832 "use strict";
8833 Object.defineProperty(exports2, "__esModule", {
8834 value: true
8835 });
8836 var path = require("path");
8837 var deep_1 = require_deep();
8838 var entry_1 = require_entry();
8839 var error_1 = require_error();
8840 var entry_2 = require_entry2();
8841 var Provider = class {
8842 constructor(_settings) {
8843 this._settings = _settings;
8844 this.errorFilter = new error_1.default(this._settings);
8845 this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
8846 this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
8847 this.entryTransformer = new entry_2.default(this._settings);
8848 }
8849 _getRootDirectory(task) {
8850 return path.resolve(this._settings.cwd, task.base);
8851 }
8852 _getReaderOptions(task) {
8853 const basePath = task.base === "." ? "" : task.base;
8854 return {
8855 basePath,
8856 pathSegmentSeparator: "/",
8857 concurrency: this._settings.concurrency,
8858 deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
8859 entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
8860 errorFilter: this.errorFilter.getFilter(),
8861 followSymbolicLinks: this._settings.followSymbolicLinks,
8862 fs: this._settings.fs,
8863 stats: this._settings.stats,
8864 throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
8865 transform: this.entryTransformer.getTransformer()
8866 };
8867 }
8868 _getMicromatchOptions() {
8869 return {
8870 dot: this._settings.dot,
8871 matchBase: this._settings.baseNameMatch,
8872 nobrace: !this._settings.braceExpansion,
8873 nocase: !this._settings.caseSensitiveMatch,
8874 noext: !this._settings.extglob,
8875 noglobstar: !this._settings.globstar,
8876 posix: true,
8877 strictSlashes: false
8878 };
8879 }
8880 };
8881 exports2.default = Provider;
8882 }
8883});
8884var require_async5 = __commonJS2({
8885 "node_modules/fast-glob/out/providers/async.js"(exports2) {
8886 "use strict";
8887 Object.defineProperty(exports2, "__esModule", {
8888 value: true
8889 });
8890 var stream_1 = require_stream3();
8891 var provider_1 = require_provider();
8892 var ProviderAsync = class extends provider_1.default {
8893 constructor() {
8894 super(...arguments);
8895 this._reader = new stream_1.default(this._settings);
8896 }
8897 read(task) {
8898 const root = this._getRootDirectory(task);
8899 const options = this._getReaderOptions(task);
8900 const entries = [];
8901 return new Promise((resolve, reject) => {
8902 const stream = this.api(root, task, options);
8903 stream.once("error", reject);
8904 stream.on("data", (entry) => entries.push(options.transform(entry)));
8905 stream.once("end", () => resolve(entries));
8906 });
8907 }
8908 api(root, task, options) {
8909 if (task.dynamic) {
8910 return this._reader.dynamic(root, options);
8911 }
8912 return this._reader.static(task.patterns, options);
8913 }
8914 };
8915 exports2.default = ProviderAsync;
8916 }
8917});
8918var require_stream4 = __commonJS2({
8919 "node_modules/fast-glob/out/providers/stream.js"(exports2) {
8920 "use strict";
8921 Object.defineProperty(exports2, "__esModule", {
8922 value: true
8923 });
8924 var stream_1 = require("stream");
8925 var stream_2 = require_stream3();
8926 var provider_1 = require_provider();
8927 var ProviderStream = class extends provider_1.default {
8928 constructor() {
8929 super(...arguments);
8930 this._reader = new stream_2.default(this._settings);
8931 }
8932 read(task) {
8933 const root = this._getRootDirectory(task);
8934 const options = this._getReaderOptions(task);
8935 const source = this.api(root, task, options);
8936 const destination = new stream_1.Readable({
8937 objectMode: true,
8938 read: () => {
8939 }
8940 });
8941 source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end"));
8942 destination.once("close", () => source.destroy());
8943 return destination;
8944 }
8945 api(root, task, options) {
8946 if (task.dynamic) {
8947 return this._reader.dynamic(root, options);
8948 }
8949 return this._reader.static(task.patterns, options);
8950 }
8951 };
8952 exports2.default = ProviderStream;
8953 }
8954});
8955var require_sync5 = __commonJS2({
8956 "node_modules/fast-glob/out/readers/sync.js"(exports2) {
8957 "use strict";
8958 Object.defineProperty(exports2, "__esModule", {
8959 value: true
8960 });
8961 var fsStat = require_out();
8962 var fsWalk = require_out3();
8963 var reader_1 = require_reader2();
8964 var ReaderSync = class extends reader_1.default {
8965 constructor() {
8966 super(...arguments);
8967 this._walkSync = fsWalk.walkSync;
8968 this._statSync = fsStat.statSync;
8969 }
8970 dynamic(root, options) {
8971 return this._walkSync(root, options);
8972 }
8973 static(patterns, options) {
8974 const entries = [];
8975 for (const pattern of patterns) {
8976 const filepath = this._getFullEntryPath(pattern);
8977 const entry = this._getEntry(filepath, pattern, options);
8978 if (entry === null || !options.entryFilter(entry)) {
8979 continue;
8980 }
8981 entries.push(entry);
8982 }
8983 return entries;
8984 }
8985 _getEntry(filepath, pattern, options) {
8986 try {
8987 const stats = this._getStat(filepath);
8988 return this._makeEntry(stats, pattern);
8989 } catch (error) {
8990 if (options.errorFilter(error)) {
8991 return null;
8992 }
8993 throw error;
8994 }
8995 }
8996 _getStat(filepath) {
8997 return this._statSync(filepath, this._fsStatSettings);
8998 }
8999 };
9000 exports2.default = ReaderSync;
9001 }
9002});
9003var require_sync6 = __commonJS2({
9004 "node_modules/fast-glob/out/providers/sync.js"(exports2) {
9005 "use strict";
9006 Object.defineProperty(exports2, "__esModule", {
9007 value: true
9008 });
9009 var sync_1 = require_sync5();
9010 var provider_1 = require_provider();
9011 var ProviderSync = class extends provider_1.default {
9012 constructor() {
9013 super(...arguments);
9014 this._reader = new sync_1.default(this._settings);
9015 }
9016 read(task) {
9017 const root = this._getRootDirectory(task);
9018 const options = this._getReaderOptions(task);
9019 const entries = this.api(root, task, options);
9020 return entries.map(options.transform);
9021 }
9022 api(root, task, options) {
9023 if (task.dynamic) {
9024 return this._reader.dynamic(root, options);
9025 }
9026 return this._reader.static(task.patterns, options);
9027 }
9028 };
9029 exports2.default = ProviderSync;
9030 }
9031});
9032var require_settings4 = __commonJS2({
9033 "node_modules/fast-glob/out/settings.js"(exports2) {
9034 "use strict";
9035 Object.defineProperty(exports2, "__esModule", {
9036 value: true
9037 });
9038 exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
9039 var fs = require("fs");
9040 var os2 = require("os");
9041 var CPU_COUNT = Math.max(os2.cpus().length, 1);
9042 exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
9043 lstat: fs.lstat,
9044 lstatSync: fs.lstatSync,
9045 stat: fs.stat,
9046 statSync: fs.statSync,
9047 readdir: fs.readdir,
9048 readdirSync: fs.readdirSync
9049 };
9050 var Settings = class {
9051 constructor(_options = {}) {
9052 this._options = _options;
9053 this.absolute = this._getValue(this._options.absolute, false);
9054 this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
9055 this.braceExpansion = this._getValue(this._options.braceExpansion, true);
9056 this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
9057 this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
9058 this.cwd = this._getValue(this._options.cwd, process.cwd());
9059 this.deep = this._getValue(this._options.deep, Infinity);
9060 this.dot = this._getValue(this._options.dot, false);
9061 this.extglob = this._getValue(this._options.extglob, true);
9062 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
9063 this.fs = this._getFileSystemMethods(this._options.fs);
9064 this.globstar = this._getValue(this._options.globstar, true);
9065 this.ignore = this._getValue(this._options.ignore, []);
9066 this.markDirectories = this._getValue(this._options.markDirectories, false);
9067 this.objectMode = this._getValue(this._options.objectMode, false);
9068 this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
9069 this.onlyFiles = this._getValue(this._options.onlyFiles, true);
9070 this.stats = this._getValue(this._options.stats, false);
9071 this.suppressErrors = this._getValue(this._options.suppressErrors, false);
9072 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
9073 this.unique = this._getValue(this._options.unique, true);
9074 if (this.onlyDirectories) {
9075 this.onlyFiles = false;
9076 }
9077 if (this.stats) {
9078 this.objectMode = true;
9079 }
9080 }
9081 _getValue(option, value) {
9082 return option === void 0 ? value : option;
9083 }
9084 _getFileSystemMethods(methods = {}) {
9085 return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
9086 }
9087 };
9088 exports2.default = Settings;
9089 }
9090});
9091var require_out4 = __commonJS2({
9092 "node_modules/fast-glob/out/index.js"(exports2, module2) {
9093 "use strict";
9094 var taskManager = require_tasks();
9095 var patternManager = require_patterns();
9096 var async_1 = require_async5();
9097 var stream_1 = require_stream4();
9098 var sync_1 = require_sync6();
9099 var settings_1 = require_settings4();
9100 var utils = require_utils4();
9101 async function FastGlob(source, options) {
9102 assertPatternsInput(source);
9103 const works = getWorks(source, async_1.default, options);
9104 const result = await Promise.all(works);
9105 return utils.array.flatten(result);
9106 }
9107 (function(FastGlob2) {
9108 function sync(source, options) {
9109 assertPatternsInput(source);
9110 const works = getWorks(source, sync_1.default, options);
9111 return utils.array.flatten(works);
9112 }
9113 FastGlob2.sync = sync;
9114 function stream(source, options) {
9115 assertPatternsInput(source);
9116 const works = getWorks(source, stream_1.default, options);
9117 return utils.stream.merge(works);
9118 }
9119 FastGlob2.stream = stream;
9120 function generateTasks(source, options) {
9121 assertPatternsInput(source);
9122 const patterns = patternManager.transform([].concat(source));
9123 const settings = new settings_1.default(options);
9124 return taskManager.generate(patterns, settings);
9125 }
9126 FastGlob2.generateTasks = generateTasks;
9127 function isDynamicPattern(source, options) {
9128 assertPatternsInput(source);
9129 const settings = new settings_1.default(options);
9130 return utils.pattern.isDynamicPattern(source, settings);
9131 }
9132 FastGlob2.isDynamicPattern = isDynamicPattern;
9133 function escapePath(source) {
9134 assertPatternsInput(source);
9135 return utils.path.escape(source);
9136 }
9137 FastGlob2.escapePath = escapePath;
9138 })(FastGlob || (FastGlob = {}));
9139 function getWorks(source, _Provider, options) {
9140 const patterns = patternManager.transform([].concat(source));
9141 const settings = new settings_1.default(options);
9142 const tasks = taskManager.generate(patterns, settings);
9143 const provider = new _Provider(settings);
9144 return tasks.map(provider.read, provider);
9145 }
9146 function assertPatternsInput(input) {
9147 const source = [].concat(input);
9148 const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
9149 if (!isValidSource) {
9150 throw new TypeError("Patterns must be a string (non empty) or an array of strings");
9151 }
9152 }
9153 module2.exports = FastGlob;
9154 }
9155});
9156var require_expand_patterns = __commonJS2({
9157 "src/cli/expand-patterns.js"(exports2, module2) {
9158 "use strict";
9159 var path = require("path");
9160 var fastGlob = require_out4();
9161 var {
9162 statSafe
9163 } = require_utils();
9164 async function* expandPatterns(context) {
9165 const cwd = process.cwd();
9166 const seen = /* @__PURE__ */ new Set();
9167 let noResults = true;
9168 for await (const pathOrError of expandPatternsInternal(context)) {
9169 noResults = false;
9170 if (typeof pathOrError !== "string") {
9171 yield pathOrError;
9172 continue;
9173 }
9174 const relativePath = path.relative(cwd, pathOrError);
9175 if (seen.has(relativePath)) {
9176 continue;
9177 }
9178 seen.add(relativePath);
9179 yield relativePath;
9180 }
9181 if (noResults && context.argv.errorOnUnmatchedPattern !== false) {
9182 yield {
9183 error: `No matching files. Patterns: ${context.filePatterns.join(" ")}`
9184 };
9185 }
9186 }
9187 async function* expandPatternsInternal(context) {
9188 const silentlyIgnoredDirs = [".git", ".svn", ".hg"];
9189 if (context.argv.withNodeModules !== true) {
9190 silentlyIgnoredDirs.push("node_modules");
9191 }
9192 const globOptions = {
9193 dot: true,
9194 ignore: silentlyIgnoredDirs.map((dir) => "**/" + dir)
9195 };
9196 let supportedFilesGlob;
9197 const cwd = process.cwd();
9198 const entries = [];
9199 for (const pattern of context.filePatterns) {
9200 const absolutePath = path.resolve(cwd, pattern);
9201 if (containsIgnoredPathSegment(absolutePath, cwd, silentlyIgnoredDirs)) {
9202 continue;
9203 }
9204 const stat = await statSafe(absolutePath);
9205 if (stat) {
9206 if (stat.isFile()) {
9207 entries.push({
9208 type: "file",
9209 glob: escapePathForGlob(fixWindowsSlashes(pattern)),
9210 input: pattern
9211 });
9212 } else if (stat.isDirectory()) {
9213 const relativePath = path.relative(cwd, absolutePath) || ".";
9214 entries.push({
9215 type: "dir",
9216 glob: escapePathForGlob(fixWindowsSlashes(relativePath)) + "/" + getSupportedFilesGlob(),
9217 input: pattern
9218 });
9219 }
9220 } else if (pattern[0] === "!") {
9221 globOptions.ignore.push(fixWindowsSlashes(pattern.slice(1)));
9222 } else {
9223 entries.push({
9224 type: "glob",
9225 glob: fixWindowsSlashes(pattern),
9226 input: pattern
9227 });
9228 }
9229 }
9230 for (const {
9231 type,
9232 glob,
9233 input
9234 } of entries) {
9235 let result;
9236 try {
9237 result = await fastGlob(glob, globOptions);
9238 } catch ({
9239 message
9240 }) {
9241 yield {
9242 error: `${errorMessages.globError[type]}: ${input}
9243${message}`
9244 };
9245 continue;
9246 }
9247 if (result.length === 0) {
9248 if (context.argv.errorOnUnmatchedPattern !== false) {
9249 yield {
9250 error: `${errorMessages.emptyResults[type]}: "${input}".`
9251 };
9252 }
9253 } else {
9254 yield* sortPaths(result);
9255 }
9256 }
9257 function getSupportedFilesGlob() {
9258 if (!supportedFilesGlob) {
9259 const extensions = context.languages.flatMap((lang) => lang.extensions || []);
9260 const filenames = context.languages.flatMap((lang) => lang.filenames || []);
9261 supportedFilesGlob = `**/{${[...extensions.map((ext) => "*" + (ext[0] === "." ? ext : "." + ext)), ...filenames]}}`;
9262 }
9263 return supportedFilesGlob;
9264 }
9265 }
9266 var errorMessages = {
9267 globError: {
9268 file: "Unable to resolve file",
9269 dir: "Unable to expand directory",
9270 glob: "Unable to expand glob pattern"
9271 },
9272 emptyResults: {
9273 file: "Explicitly specified file was ignored due to negative glob patterns",
9274 dir: "No supported files were found in the directory",
9275 glob: "No files matching the pattern were found"
9276 }
9277 };
9278 function containsIgnoredPathSegment(absolutePath, cwd, ignoredDirectories) {
9279 return path.relative(cwd, absolutePath).split(path.sep).some((dir) => ignoredDirectories.includes(dir));
9280 }
9281 function sortPaths(paths) {
9282 return paths.sort((a, b) => a.localeCompare(b));
9283 }
9284 function escapePathForGlob(path2) {
9285 return fastGlob.escapePath(path2.replace(/\\/g, "\0")).replace(/\\!/g, "@(!)").replace(/\0/g, "@(\\\\)");
9286 }
9287 var isWindows = path.sep === "\\";
9288 function fixWindowsSlashes(pattern) {
9289 return isWindows ? pattern.replace(/\\/g, "/") : pattern;
9290 }
9291 module2.exports = {
9292 expandPatterns,
9293 fixWindowsSlashes
9294 };
9295 }
9296});
9297var require_get_options_for_file = __commonJS2({
9298 "src/cli/options/get-options-for-file.js"(exports2, module2) {
9299 "use strict";
9300 var dashify = require_dashify();
9301 var prettier2 = require("./index.js");
9302 var {
9303 optionsNormalizer
9304 } = require_prettier_internal();
9305 var minimist = require_minimist2();
9306 var createMinimistOptions = require_create_minimist_options();
9307 var normalizeCliOptions = require_normalize_cli_options();
9308 function getOptions(argv, detailedOptions) {
9309 return Object.fromEntries(detailedOptions.filter(({
9310 forwardToApi
9311 }) => forwardToApi).map(({
9312 forwardToApi,
9313 name
9314 }) => [forwardToApi, argv[name]]));
9315 }
9316 function cliifyOptions(object, apiDetailedOptionMap) {
9317 return Object.fromEntries(Object.entries(object || {}).map(([key, value]) => {
9318 const apiOption = apiDetailedOptionMap[key];
9319 const cliKey = apiOption ? apiOption.name : key;
9320 return [dashify(cliKey), value];
9321 }));
9322 }
9323 function createApiDetailedOptionMap(detailedOptions) {
9324 return Object.fromEntries(detailedOptions.filter((option) => option.forwardToApi && option.forwardToApi !== option.name).map((option) => [option.forwardToApi, option]));
9325 }
9326 function parseArgsToOptions(context, overrideDefaults) {
9327 const minimistOptions = createMinimistOptions(context.detailedOptions);
9328 const apiDetailedOptionMap = createApiDetailedOptionMap(context.detailedOptions);
9329 return getOptions(normalizeCliOptions(minimist(context.rawArguments, {
9330 string: minimistOptions.string,
9331 boolean: minimistOptions.boolean,
9332 default: cliifyOptions(overrideDefaults, apiDetailedOptionMap)
9333 }), context.detailedOptions, {
9334 logger: false
9335 }), context.detailedOptions);
9336 }
9337 async function getOptionsOrDie(context, filePath) {
9338 try {
9339 if (context.argv.config === false) {
9340 context.logger.debug("'--no-config' option found, skip loading config file.");
9341 return null;
9342 }
9343 context.logger.debug(context.argv.config ? `load config file from '${context.argv.config}'` : `resolve config from '${filePath}'`);
9344 const options = await prettier2.resolveConfig(filePath, {
9345 editorconfig: context.argv.editorconfig,
9346 config: context.argv.config
9347 });
9348 context.logger.debug("loaded options `" + JSON.stringify(options) + "`");
9349 return options;
9350 } catch (error) {
9351 context.logger.error(`Invalid configuration file \`${filePath}\`: ` + error.message);
9352 process.exit(2);
9353 }
9354 }
9355 function applyConfigPrecedence(context, options) {
9356 try {
9357 switch (context.argv.configPrecedence) {
9358 case "cli-override":
9359 return parseArgsToOptions(context, options);
9360 case "file-override":
9361 return Object.assign(Object.assign({}, parseArgsToOptions(context)), options);
9362 case "prefer-file":
9363 return options || parseArgsToOptions(context);
9364 }
9365 } catch (error) {
9366 context.logger.error(error.toString());
9367 process.exit(2);
9368 }
9369 }
9370 async function getOptionsForFile(context, filepath) {
9371 const options = await getOptionsOrDie(context, filepath);
9372 const hasPlugins = options && options.plugins;
9373 if (hasPlugins) {
9374 context.pushContextPlugins(options.plugins);
9375 }
9376 const appliedOptions = Object.assign({
9377 filepath
9378 }, applyConfigPrecedence(context, options && optionsNormalizer.normalizeApiOptions(options, context.supportOptions, {
9379 logger: context.logger
9380 })));
9381 context.logger.debug(`applied config-precedence (${context.argv.configPrecedence}): ${JSON.stringify(appliedOptions)}`);
9382 if (hasPlugins) {
9383 context.popContextPlugins();
9384 }
9385 return appliedOptions;
9386 }
9387 module2.exports = getOptionsForFile;
9388 }
9389});
9390var require_is_tty = __commonJS2({
9391 "src/cli/is-tty.js"(exports2, module2) {
9392 "use strict";
9393 var {
9394 isCI
9395 } = require("./third-party.js");
9396 module2.exports = function isTTY() {
9397 return process.stdout.isTTY && !isCI();
9398 };
9399 }
9400});
9401var require_commondir = __commonJS2({
9402 "node_modules/commondir/index.js"(exports2, module2) {
9403 var path = require("path");
9404 module2.exports = function(basedir, relfiles) {
9405 if (relfiles) {
9406 var files = relfiles.map(function(r) {
9407 return path.resolve(basedir, r);
9408 });
9409 } else {
9410 var files = basedir;
9411 }
9412 var res = files.slice(1).reduce(function(ps, file) {
9413 if (!file.match(/^([A-Za-z]:)?\/|\\/)) {
9414 throw new Error("relative path without a basedir");
9415 }
9416 var xs = file.split(/\/+|\\+/);
9417 for (var i = 0; ps[i] === xs[i] && i < Math.min(ps.length, xs.length); i++)
9418 ;
9419 return ps.slice(0, i);
9420 }, files[0].split(/\/+|\\+/));
9421 return res.length > 1 ? res.join("/") : "/";
9422 };
9423 }
9424});
9425var require_p_try = __commonJS2({
9426 "node_modules/pkg-dir/node_modules/p-try/index.js"(exports2, module2) {
9427 "use strict";
9428 var pTry = (fn, ...arguments_) => new Promise((resolve) => {
9429 resolve(fn(...arguments_));
9430 });
9431 module2.exports = pTry;
9432 module2.exports.default = pTry;
9433 }
9434});
9435var require_p_limit = __commonJS2({
9436 "node_modules/pkg-dir/node_modules/p-limit/index.js"(exports2, module2) {
9437 "use strict";
9438 var pTry = require_p_try();
9439 var pLimit = (concurrency) => {
9440 if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
9441 return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));
9442 }
9443 const queue = [];
9444 let activeCount = 0;
9445 const next = () => {
9446 activeCount--;
9447 if (queue.length > 0) {
9448 queue.shift()();
9449 }
9450 };
9451 const run2 = (fn, resolve, ...args) => {
9452 activeCount++;
9453 const result = pTry(fn, ...args);
9454 resolve(result);
9455 result.then(next, next);
9456 };
9457 const enqueue = (fn, resolve, ...args) => {
9458 if (activeCount < concurrency) {
9459 run2(fn, resolve, ...args);
9460 } else {
9461 queue.push(run2.bind(null, fn, resolve, ...args));
9462 }
9463 };
9464 const generator = (fn, ...args) => new Promise((resolve) => enqueue(fn, resolve, ...args));
9465 Object.defineProperties(generator, {
9466 activeCount: {
9467 get: () => activeCount
9468 },
9469 pendingCount: {
9470 get: () => queue.length
9471 },
9472 clearQueue: {
9473 value: () => {
9474 queue.length = 0;
9475 }
9476 }
9477 });
9478 return generator;
9479 };
9480 module2.exports = pLimit;
9481 module2.exports.default = pLimit;
9482 }
9483});
9484var require_p_locate = __commonJS2({
9485 "node_modules/pkg-dir/node_modules/p-locate/index.js"(exports2, module2) {
9486 "use strict";
9487 var pLimit = require_p_limit();
9488 var EndError = class extends Error {
9489 constructor(value) {
9490 super();
9491 this.value = value;
9492 }
9493 };
9494 var testElement = async (element, tester) => tester(await element);
9495 var finder = async (element) => {
9496 const values = await Promise.all(element);
9497 if (values[1] === true) {
9498 throw new EndError(values[0]);
9499 }
9500 return false;
9501 };
9502 var pLocate = async (iterable, tester, options) => {
9503 options = Object.assign({
9504 concurrency: Infinity,
9505 preserveOrder: true
9506 }, options);
9507 const limit = pLimit(options.concurrency);
9508 const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]);
9509 const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity);
9510 try {
9511 await Promise.all(items.map((element) => checkLimit(finder, element)));
9512 } catch (error) {
9513 if (error instanceof EndError) {
9514 return error.value;
9515 }
9516 throw error;
9517 }
9518 };
9519 module2.exports = pLocate;
9520 module2.exports.default = pLocate;
9521 }
9522});
9523var require_locate_path = __commonJS2({
9524 "node_modules/pkg-dir/node_modules/locate-path/index.js"(exports2, module2) {
9525 "use strict";
9526 var path = require("path");
9527 var fs = require("fs");
9528 var {
9529 promisify
9530 } = require("util");
9531 var pLocate = require_p_locate();
9532 var fsStat = promisify(fs.stat);
9533 var fsLStat = promisify(fs.lstat);
9534 var typeMappings = {
9535 directory: "isDirectory",
9536 file: "isFile"
9537 };
9538 function checkType({
9539 type
9540 }) {
9541 if (type in typeMappings) {
9542 return;
9543 }
9544 throw new Error(`Invalid type specified: ${type}`);
9545 }
9546 var matchType = (type, stat) => type === void 0 || stat[typeMappings[type]]();
9547 module2.exports = async (paths, options) => {
9548 options = Object.assign({
9549 cwd: process.cwd(),
9550 type: "file",
9551 allowSymlinks: true
9552 }, options);
9553 checkType(options);
9554 const statFn = options.allowSymlinks ? fsStat : fsLStat;
9555 return pLocate(paths, async (path_) => {
9556 try {
9557 const stat = await statFn(path.resolve(options.cwd, path_));
9558 return matchType(options.type, stat);
9559 } catch (_) {
9560 return false;
9561 }
9562 }, options);
9563 };
9564 module2.exports.sync = (paths, options) => {
9565 options = Object.assign({
9566 cwd: process.cwd(),
9567 allowSymlinks: true,
9568 type: "file"
9569 }, options);
9570 checkType(options);
9571 const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync;
9572 for (const path_ of paths) {
9573 try {
9574 const stat = statFn(path.resolve(options.cwd, path_));
9575 if (matchType(options.type, stat)) {
9576 return path_;
9577 }
9578 } catch (_) {
9579 }
9580 }
9581 };
9582 }
9583});
9584var require_path_exists = __commonJS2({
9585 "node_modules/path-exists/index.js"(exports2, module2) {
9586 "use strict";
9587 var fs = require("fs");
9588 var {
9589 promisify
9590 } = require("util");
9591 var pAccess = promisify(fs.access);
9592 module2.exports = async (path) => {
9593 try {
9594 await pAccess(path);
9595 return true;
9596 } catch (_) {
9597 return false;
9598 }
9599 };
9600 module2.exports.sync = (path) => {
9601 try {
9602 fs.accessSync(path);
9603 return true;
9604 } catch (_) {
9605 return false;
9606 }
9607 };
9608 }
9609});
9610var require_find_up = __commonJS2({
9611 "node_modules/pkg-dir/node_modules/find-up/index.js"(exports2, module2) {
9612 "use strict";
9613 var path = require("path");
9614 var locatePath = require_locate_path();
9615 var pathExists = require_path_exists();
9616 var stop = Symbol("findUp.stop");
9617 module2.exports = async (name, options = {}) => {
9618 let directory = path.resolve(options.cwd || "");
9619 const {
9620 root
9621 } = path.parse(directory);
9622 const paths = [].concat(name);
9623 const runMatcher = async (locateOptions) => {
9624 if (typeof name !== "function") {
9625 return locatePath(paths, locateOptions);
9626 }
9627 const foundPath = await name(locateOptions.cwd);
9628 if (typeof foundPath === "string") {
9629 return locatePath([foundPath], locateOptions);
9630 }
9631 return foundPath;
9632 };
9633 while (true) {
9634 const foundPath = await runMatcher(Object.assign(Object.assign({}, options), {}, {
9635 cwd: directory
9636 }));
9637 if (foundPath === stop) {
9638 return;
9639 }
9640 if (foundPath) {
9641 return path.resolve(directory, foundPath);
9642 }
9643 if (directory === root) {
9644 return;
9645 }
9646 directory = path.dirname(directory);
9647 }
9648 };
9649 module2.exports.sync = (name, options = {}) => {
9650 let directory = path.resolve(options.cwd || "");
9651 const {
9652 root
9653 } = path.parse(directory);
9654 const paths = [].concat(name);
9655 const runMatcher = (locateOptions) => {
9656 if (typeof name !== "function") {
9657 return locatePath.sync(paths, locateOptions);
9658 }
9659 const foundPath = name(locateOptions.cwd);
9660 if (typeof foundPath === "string") {
9661 return locatePath.sync([foundPath], locateOptions);
9662 }
9663 return foundPath;
9664 };
9665 while (true) {
9666 const foundPath = runMatcher(Object.assign(Object.assign({}, options), {}, {
9667 cwd: directory
9668 }));
9669 if (foundPath === stop) {
9670 return;
9671 }
9672 if (foundPath) {
9673 return path.resolve(directory, foundPath);
9674 }
9675 if (directory === root) {
9676 return;
9677 }
9678 directory = path.dirname(directory);
9679 }
9680 };
9681 module2.exports.exists = pathExists;
9682 module2.exports.sync.exists = pathExists.sync;
9683 module2.exports.stop = stop;
9684 }
9685});
9686var require_pkg_dir = __commonJS2({
9687 "node_modules/pkg-dir/index.js"(exports2, module2) {
9688 "use strict";
9689 var path = require("path");
9690 var findUp = require_find_up();
9691 var pkgDir = async (cwd) => {
9692 const filePath = await findUp("package.json", {
9693 cwd
9694 });
9695 return filePath && path.dirname(filePath);
9696 };
9697 module2.exports = pkgDir;
9698 module2.exports.default = pkgDir;
9699 module2.exports.sync = (cwd) => {
9700 const filePath = findUp.sync("package.json", {
9701 cwd
9702 });
9703 return filePath && path.dirname(filePath);
9704 };
9705 }
9706});
9707var require_semver = __commonJS2({
9708 "node_modules/make-dir/node_modules/semver/semver.js"(exports2, module2) {
9709 exports2 = module2.exports = SemVer;
9710 var debug;
9711 if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
9712 debug = function() {
9713 var args = Array.prototype.slice.call(arguments, 0);
9714 args.unshift("SEMVER");
9715 console.log.apply(console, args);
9716 };
9717 } else {
9718 debug = function() {
9719 };
9720 }
9721 exports2.SEMVER_SPEC_VERSION = "2.0.0";
9722 var MAX_LENGTH = 256;
9723 var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
9724 var MAX_SAFE_COMPONENT_LENGTH = 16;
9725 var re = exports2.re = [];
9726 var src = exports2.src = [];
9727 var t = exports2.tokens = {};
9728 var R = 0;
9729 function tok(n) {
9730 t[n] = R++;
9731 }
9732 tok("NUMERICIDENTIFIER");
9733 src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*";
9734 tok("NUMERICIDENTIFIERLOOSE");
9735 src[t.NUMERICIDENTIFIERLOOSE] = "[0-9]+";
9736 tok("NONNUMERICIDENTIFIER");
9737 src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
9738 tok("MAINVERSION");
9739 src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")";
9740 tok("MAINVERSIONLOOSE");
9741 src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")";
9742 tok("PRERELEASEIDENTIFIER");
9743 src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")";
9744 tok("PRERELEASEIDENTIFIERLOOSE");
9745 src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")";
9746 tok("PRERELEASE");
9747 src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))";
9748 tok("PRERELEASELOOSE");
9749 src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))";
9750 tok("BUILDIDENTIFIER");
9751 src[t.BUILDIDENTIFIER] = "[0-9A-Za-z-]+";
9752 tok("BUILD");
9753 src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))";
9754 tok("FULL");
9755 tok("FULLPLAIN");
9756 src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?";
9757 src[t.FULL] = "^" + src[t.FULLPLAIN] + "$";
9758 tok("LOOSEPLAIN");
9759 src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?";
9760 tok("LOOSE");
9761 src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$";
9762 tok("GTLT");
9763 src[t.GTLT] = "((?:<|>)?=?)";
9764 tok("XRANGEIDENTIFIERLOOSE");
9765 src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*";
9766 tok("XRANGEIDENTIFIER");
9767 src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*";
9768 tok("XRANGEPLAIN");
9769 src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?";
9770 tok("XRANGEPLAINLOOSE");
9771 src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?";
9772 tok("XRANGE");
9773 src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$";
9774 tok("XRANGELOOSE");
9775 src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$";
9776 tok("COERCE");
9777 src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])";
9778 tok("COERCERTL");
9779 re[t.COERCERTL] = new RegExp(src[t.COERCE], "g");
9780 tok("LONETILDE");
9781 src[t.LONETILDE] = "(?:~>?)";
9782 tok("TILDETRIM");
9783 src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+";
9784 re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g");
9785 var tildeTrimReplace = "$1~";
9786 tok("TILDE");
9787 src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$";
9788 tok("TILDELOOSE");
9789 src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$";
9790 tok("LONECARET");
9791 src[t.LONECARET] = "(?:\\^)";
9792 tok("CARETTRIM");
9793 src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+";
9794 re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g");
9795 var caretTrimReplace = "$1^";
9796 tok("CARET");
9797 src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$";
9798 tok("CARETLOOSE");
9799 src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$";
9800 tok("COMPARATORLOOSE");
9801 src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$";
9802 tok("COMPARATOR");
9803 src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$";
9804 tok("COMPARATORTRIM");
9805 src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")";
9806 re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g");
9807 var comparatorTrimReplace = "$1$2$3";
9808 tok("HYPHENRANGE");
9809 src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$";
9810 tok("HYPHENRANGELOOSE");
9811 src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$";
9812 tok("STAR");
9813 src[t.STAR] = "(<|>)?=?\\s*\\*";
9814 for (i = 0; i < R; i++) {
9815 debug(i, src[i]);
9816 if (!re[i]) {
9817 re[i] = new RegExp(src[i]);
9818 }
9819 }
9820 var i;
9821 exports2.parse = parse;
9822 function parse(version, options) {
9823 if (!options || typeof options !== "object") {
9824 options = {
9825 loose: !!options,
9826 includePrerelease: false
9827 };
9828 }
9829 if (version instanceof SemVer) {
9830 return version;
9831 }
9832 if (typeof version !== "string") {
9833 return null;
9834 }
9835 if (version.length > MAX_LENGTH) {
9836 return null;
9837 }
9838 var r = options.loose ? re[t.LOOSE] : re[t.FULL];
9839 if (!r.test(version)) {
9840 return null;
9841 }
9842 try {
9843 return new SemVer(version, options);
9844 } catch (er) {
9845 return null;
9846 }
9847 }
9848 exports2.valid = valid;
9849 function valid(version, options) {
9850 var v = parse(version, options);
9851 return v ? v.version : null;
9852 }
9853 exports2.clean = clean;
9854 function clean(version, options) {
9855 var s = parse(version.trim().replace(/^[=v]+/, ""), options);
9856 return s ? s.version : null;
9857 }
9858 exports2.SemVer = SemVer;
9859 function SemVer(version, options) {
9860 if (!options || typeof options !== "object") {
9861 options = {
9862 loose: !!options,
9863 includePrerelease: false
9864 };
9865 }
9866 if (version instanceof SemVer) {
9867 if (version.loose === options.loose) {
9868 return version;
9869 } else {
9870 version = version.version;
9871 }
9872 } else if (typeof version !== "string") {
9873 throw new TypeError("Invalid Version: " + version);
9874 }
9875 if (version.length > MAX_LENGTH) {
9876 throw new TypeError("version is longer than " + MAX_LENGTH + " characters");
9877 }
9878 if (!(this instanceof SemVer)) {
9879 return new SemVer(version, options);
9880 }
9881 debug("SemVer", version, options);
9882 this.options = options;
9883 this.loose = !!options.loose;
9884 var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
9885 if (!m) {
9886 throw new TypeError("Invalid Version: " + version);
9887 }
9888 this.raw = version;
9889 this.major = +m[1];
9890 this.minor = +m[2];
9891 this.patch = +m[3];
9892 if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
9893 throw new TypeError("Invalid major version");
9894 }
9895 if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
9896 throw new TypeError("Invalid minor version");
9897 }
9898 if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
9899 throw new TypeError("Invalid patch version");
9900 }
9901 if (!m[4]) {
9902 this.prerelease = [];
9903 } else {
9904 this.prerelease = m[4].split(".").map(function(id) {
9905 if (/^[0-9]+$/.test(id)) {
9906 var num = +id;
9907 if (num >= 0 && num < MAX_SAFE_INTEGER) {
9908 return num;
9909 }
9910 }
9911 return id;
9912 });
9913 }
9914 this.build = m[5] ? m[5].split(".") : [];
9915 this.format();
9916 }
9917 SemVer.prototype.format = function() {
9918 this.version = this.major + "." + this.minor + "." + this.patch;
9919 if (this.prerelease.length) {
9920 this.version += "-" + this.prerelease.join(".");
9921 }
9922 return this.version;
9923 };
9924 SemVer.prototype.toString = function() {
9925 return this.version;
9926 };
9927 SemVer.prototype.compare = function(other) {
9928 debug("SemVer.compare", this.version, this.options, other);
9929 if (!(other instanceof SemVer)) {
9930 other = new SemVer(other, this.options);
9931 }
9932 return this.compareMain(other) || this.comparePre(other);
9933 };
9934 SemVer.prototype.compareMain = function(other) {
9935 if (!(other instanceof SemVer)) {
9936 other = new SemVer(other, this.options);
9937 }
9938 return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
9939 };
9940 SemVer.prototype.comparePre = function(other) {
9941 if (!(other instanceof SemVer)) {
9942 other = new SemVer(other, this.options);
9943 }
9944 if (this.prerelease.length && !other.prerelease.length) {
9945 return -1;
9946 } else if (!this.prerelease.length && other.prerelease.length) {
9947 return 1;
9948 } else if (!this.prerelease.length && !other.prerelease.length) {
9949 return 0;
9950 }
9951 var i2 = 0;
9952 do {
9953 var a = this.prerelease[i2];
9954 var b = other.prerelease[i2];
9955 debug("prerelease compare", i2, a, b);
9956 if (a === void 0 && b === void 0) {
9957 return 0;
9958 } else if (b === void 0) {
9959 return 1;
9960 } else if (a === void 0) {
9961 return -1;
9962 } else if (a === b) {
9963 continue;
9964 } else {
9965 return compareIdentifiers(a, b);
9966 }
9967 } while (++i2);
9968 };
9969 SemVer.prototype.compareBuild = function(other) {
9970 if (!(other instanceof SemVer)) {
9971 other = new SemVer(other, this.options);
9972 }
9973 var i2 = 0;
9974 do {
9975 var a = this.build[i2];
9976 var b = other.build[i2];
9977 debug("prerelease compare", i2, a, b);
9978 if (a === void 0 && b === void 0) {
9979 return 0;
9980 } else if (b === void 0) {
9981 return 1;
9982 } else if (a === void 0) {
9983 return -1;
9984 } else if (a === b) {
9985 continue;
9986 } else {
9987 return compareIdentifiers(a, b);
9988 }
9989 } while (++i2);
9990 };
9991 SemVer.prototype.inc = function(release, identifier) {
9992 switch (release) {
9993 case "premajor":
9994 this.prerelease.length = 0;
9995 this.patch = 0;
9996 this.minor = 0;
9997 this.major++;
9998 this.inc("pre", identifier);
9999 break;
10000 case "preminor":
10001 this.prerelease.length = 0;
10002 this.patch = 0;
10003 this.minor++;
10004 this.inc("pre", identifier);
10005 break;
10006 case "prepatch":
10007 this.prerelease.length = 0;
10008 this.inc("patch", identifier);
10009 this.inc("pre", identifier);
10010 break;
10011 case "prerelease":
10012 if (this.prerelease.length === 0) {
10013 this.inc("patch", identifier);
10014 }
10015 this.inc("pre", identifier);
10016 break;
10017 case "major":
10018 if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
10019 this.major++;
10020 }
10021 this.minor = 0;
10022 this.patch = 0;
10023 this.prerelease = [];
10024 break;
10025 case "minor":
10026 if (this.patch !== 0 || this.prerelease.length === 0) {
10027 this.minor++;
10028 }
10029 this.patch = 0;
10030 this.prerelease = [];
10031 break;
10032 case "patch":
10033 if (this.prerelease.length === 0) {
10034 this.patch++;
10035 }
10036 this.prerelease = [];
10037 break;
10038 case "pre":
10039 if (this.prerelease.length === 0) {
10040 this.prerelease = [0];
10041 } else {
10042 var i2 = this.prerelease.length;
10043 while (--i2 >= 0) {
10044 if (typeof this.prerelease[i2] === "number") {
10045 this.prerelease[i2]++;
10046 i2 = -2;
10047 }
10048 }
10049 if (i2 === -1) {
10050 this.prerelease.push(0);
10051 }
10052 }
10053 if (identifier) {
10054 if (this.prerelease[0] === identifier) {
10055 if (isNaN(this.prerelease[1])) {
10056 this.prerelease = [identifier, 0];
10057 }
10058 } else {
10059 this.prerelease = [identifier, 0];
10060 }
10061 }
10062 break;
10063 default:
10064 throw new Error("invalid increment argument: " + release);
10065 }
10066 this.format();
10067 this.raw = this.version;
10068 return this;
10069 };
10070 exports2.inc = inc;
10071 function inc(version, release, loose, identifier) {
10072 if (typeof loose === "string") {
10073 identifier = loose;
10074 loose = void 0;
10075 }
10076 try {
10077 return new SemVer(version, loose).inc(release, identifier).version;
10078 } catch (er) {
10079 return null;
10080 }
10081 }
10082 exports2.diff = diff;
10083 function diff(version1, version2) {
10084 if (eq(version1, version2)) {
10085 return null;
10086 } else {
10087 var v1 = parse(version1);
10088 var v2 = parse(version2);
10089 var prefix = "";
10090 if (v1.prerelease.length || v2.prerelease.length) {
10091 prefix = "pre";
10092 var defaultResult = "prerelease";
10093 }
10094 for (var key in v1) {
10095 if (key === "major" || key === "minor" || key === "patch") {
10096 if (v1[key] !== v2[key]) {
10097 return prefix + key;
10098 }
10099 }
10100 }
10101 return defaultResult;
10102 }
10103 }
10104 exports2.compareIdentifiers = compareIdentifiers;
10105 var numeric = /^[0-9]+$/;
10106 function compareIdentifiers(a, b) {
10107 var anum = numeric.test(a);
10108 var bnum = numeric.test(b);
10109 if (anum && bnum) {
10110 a = +a;
10111 b = +b;
10112 }
10113 return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
10114 }
10115 exports2.rcompareIdentifiers = rcompareIdentifiers;
10116 function rcompareIdentifiers(a, b) {
10117 return compareIdentifiers(b, a);
10118 }
10119 exports2.major = major;
10120 function major(a, loose) {
10121 return new SemVer(a, loose).major;
10122 }
10123 exports2.minor = minor;
10124 function minor(a, loose) {
10125 return new SemVer(a, loose).minor;
10126 }
10127 exports2.patch = patch;
10128 function patch(a, loose) {
10129 return new SemVer(a, loose).patch;
10130 }
10131 exports2.compare = compare;
10132 function compare(a, b, loose) {
10133 return new SemVer(a, loose).compare(new SemVer(b, loose));
10134 }
10135 exports2.compareLoose = compareLoose;
10136 function compareLoose(a, b) {
10137 return compare(a, b, true);
10138 }
10139 exports2.compareBuild = compareBuild;
10140 function compareBuild(a, b, loose) {
10141 var versionA = new SemVer(a, loose);
10142 var versionB = new SemVer(b, loose);
10143 return versionA.compare(versionB) || versionA.compareBuild(versionB);
10144 }
10145 exports2.rcompare = rcompare;
10146 function rcompare(a, b, loose) {
10147 return compare(b, a, loose);
10148 }
10149 exports2.sort = sort;
10150 function sort(list, loose) {
10151 return list.sort(function(a, b) {
10152 return exports2.compareBuild(a, b, loose);
10153 });
10154 }
10155 exports2.rsort = rsort;
10156 function rsort(list, loose) {
10157 return list.sort(function(a, b) {
10158 return exports2.compareBuild(b, a, loose);
10159 });
10160 }
10161 exports2.gt = gt;
10162 function gt(a, b, loose) {
10163 return compare(a, b, loose) > 0;
10164 }
10165 exports2.lt = lt;
10166 function lt(a, b, loose) {
10167 return compare(a, b, loose) < 0;
10168 }
10169 exports2.eq = eq;
10170 function eq(a, b, loose) {
10171 return compare(a, b, loose) === 0;
10172 }
10173 exports2.neq = neq;
10174 function neq(a, b, loose) {
10175 return compare(a, b, loose) !== 0;
10176 }
10177 exports2.gte = gte;
10178 function gte(a, b, loose) {
10179 return compare(a, b, loose) >= 0;
10180 }
10181 exports2.lte = lte;
10182 function lte(a, b, loose) {
10183 return compare(a, b, loose) <= 0;
10184 }
10185 exports2.cmp = cmp;
10186 function cmp(a, op, b, loose) {
10187 switch (op) {
10188 case "===":
10189 if (typeof a === "object")
10190 a = a.version;
10191 if (typeof b === "object")
10192 b = b.version;
10193 return a === b;
10194 case "!==":
10195 if (typeof a === "object")
10196 a = a.version;
10197 if (typeof b === "object")
10198 b = b.version;
10199 return a !== b;
10200 case "":
10201 case "=":
10202 case "==":
10203 return eq(a, b, loose);
10204 case "!=":
10205 return neq(a, b, loose);
10206 case ">":
10207 return gt(a, b, loose);
10208 case ">=":
10209 return gte(a, b, loose);
10210 case "<":
10211 return lt(a, b, loose);
10212 case "<=":
10213 return lte(a, b, loose);
10214 default:
10215 throw new TypeError("Invalid operator: " + op);
10216 }
10217 }
10218 exports2.Comparator = Comparator;
10219 function Comparator(comp, options) {
10220 if (!options || typeof options !== "object") {
10221 options = {
10222 loose: !!options,
10223 includePrerelease: false
10224 };
10225 }
10226 if (comp instanceof Comparator) {
10227 if (comp.loose === !!options.loose) {
10228 return comp;
10229 } else {
10230 comp = comp.value;
10231 }
10232 }
10233 if (!(this instanceof Comparator)) {
10234 return new Comparator(comp, options);
10235 }
10236 debug("comparator", comp, options);
10237 this.options = options;
10238 this.loose = !!options.loose;
10239 this.parse(comp);
10240 if (this.semver === ANY) {
10241 this.value = "";
10242 } else {
10243 this.value = this.operator + this.semver.version;
10244 }
10245 debug("comp", this);
10246 }
10247 var ANY = {};
10248 Comparator.prototype.parse = function(comp) {
10249 var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
10250 var m = comp.match(r);
10251 if (!m) {
10252 throw new TypeError("Invalid comparator: " + comp);
10253 }
10254 this.operator = m[1] !== void 0 ? m[1] : "";
10255 if (this.operator === "=") {
10256 this.operator = "";
10257 }
10258 if (!m[2]) {
10259 this.semver = ANY;
10260 } else {
10261 this.semver = new SemVer(m[2], this.options.loose);
10262 }
10263 };
10264 Comparator.prototype.toString = function() {
10265 return this.value;
10266 };
10267 Comparator.prototype.test = function(version) {
10268 debug("Comparator.test", version, this.options.loose);
10269 if (this.semver === ANY || version === ANY) {
10270 return true;
10271 }
10272 if (typeof version === "string") {
10273 try {
10274 version = new SemVer(version, this.options);
10275 } catch (er) {
10276 return false;
10277 }
10278 }
10279 return cmp(version, this.operator, this.semver, this.options);
10280 };
10281 Comparator.prototype.intersects = function(comp, options) {
10282 if (!(comp instanceof Comparator)) {
10283 throw new TypeError("a Comparator is required");
10284 }
10285 if (!options || typeof options !== "object") {
10286 options = {
10287 loose: !!options,
10288 includePrerelease: false
10289 };
10290 }
10291 var rangeTmp;
10292 if (this.operator === "") {
10293 if (this.value === "") {
10294 return true;
10295 }
10296 rangeTmp = new Range(comp.value, options);
10297 return satisfies(this.value, rangeTmp, options);
10298 } else if (comp.operator === "") {
10299 if (comp.value === "") {
10300 return true;
10301 }
10302 rangeTmp = new Range(this.value, options);
10303 return satisfies(comp.semver, rangeTmp, options);
10304 }
10305 var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
10306 var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
10307 var sameSemVer = this.semver.version === comp.semver.version;
10308 var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
10309 var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<");
10310 var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">");
10311 return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
10312 };
10313 exports2.Range = Range;
10314 function Range(range, options) {
10315 if (!options || typeof options !== "object") {
10316 options = {
10317 loose: !!options,
10318 includePrerelease: false
10319 };
10320 }
10321 if (range instanceof Range) {
10322 if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
10323 return range;
10324 } else {
10325 return new Range(range.raw, options);
10326 }
10327 }
10328 if (range instanceof Comparator) {
10329 return new Range(range.value, options);
10330 }
10331 if (!(this instanceof Range)) {
10332 return new Range(range, options);
10333 }
10334 this.options = options;
10335 this.loose = !!options.loose;
10336 this.includePrerelease = !!options.includePrerelease;
10337 this.raw = range;
10338 this.set = range.split(/\s*\|\|\s*/).map(function(range2) {
10339 return this.parseRange(range2.trim());
10340 }, this).filter(function(c) {
10341 return c.length;
10342 });
10343 if (!this.set.length) {
10344 throw new TypeError("Invalid SemVer Range: " + range);
10345 }
10346 this.format();
10347 }
10348 Range.prototype.format = function() {
10349 this.range = this.set.map(function(comps) {
10350 return comps.join(" ").trim();
10351 }).join("||").trim();
10352 return this.range;
10353 };
10354 Range.prototype.toString = function() {
10355 return this.range;
10356 };
10357 Range.prototype.parseRange = function(range) {
10358 var loose = this.options.loose;
10359 range = range.trim();
10360 var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
10361 range = range.replace(hr, hyphenReplace);
10362 debug("hyphen replace", range);
10363 range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
10364 debug("comparator trim", range, re[t.COMPARATORTRIM]);
10365 range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
10366 range = range.replace(re[t.CARETTRIM], caretTrimReplace);
10367 range = range.split(/\s+/).join(" ");
10368 var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
10369 var set = range.split(" ").map(function(comp) {
10370 return parseComparator(comp, this.options);
10371 }, this).join(" ").split(/\s+/);
10372 if (this.options.loose) {
10373 set = set.filter(function(comp) {
10374 return !!comp.match(compRe);
10375 });
10376 }
10377 set = set.map(function(comp) {
10378 return new Comparator(comp, this.options);
10379 }, this);
10380 return set;
10381 };
10382 Range.prototype.intersects = function(range, options) {
10383 if (!(range instanceof Range)) {
10384 throw new TypeError("a Range is required");
10385 }
10386 return this.set.some(function(thisComparators) {
10387 return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) {
10388 return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) {
10389 return rangeComparators.every(function(rangeComparator) {
10390 return thisComparator.intersects(rangeComparator, options);
10391 });
10392 });
10393 });
10394 });
10395 };
10396 function isSatisfiable(comparators, options) {
10397 var result = true;
10398 var remainingComparators = comparators.slice();
10399 var testComparator = remainingComparators.pop();
10400 while (result && remainingComparators.length) {
10401 result = remainingComparators.every(function(otherComparator) {
10402 return testComparator.intersects(otherComparator, options);
10403 });
10404 testComparator = remainingComparators.pop();
10405 }
10406 return result;
10407 }
10408 exports2.toComparators = toComparators;
10409 function toComparators(range, options) {
10410 return new Range(range, options).set.map(function(comp) {
10411 return comp.map(function(c) {
10412 return c.value;
10413 }).join(" ").trim().split(" ");
10414 });
10415 }
10416 function parseComparator(comp, options) {
10417 debug("comp", comp, options);
10418 comp = replaceCarets(comp, options);
10419 debug("caret", comp);
10420 comp = replaceTildes(comp, options);
10421 debug("tildes", comp);
10422 comp = replaceXRanges(comp, options);
10423 debug("xrange", comp);
10424 comp = replaceStars(comp, options);
10425 debug("stars", comp);
10426 return comp;
10427 }
10428 function isX(id) {
10429 return !id || id.toLowerCase() === "x" || id === "*";
10430 }
10431 function replaceTildes(comp, options) {
10432 return comp.trim().split(/\s+/).map(function(comp2) {
10433 return replaceTilde(comp2, options);
10434 }).join(" ");
10435 }
10436 function replaceTilde(comp, options) {
10437 var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
10438 return comp.replace(r, function(_, M, m, p, pr) {
10439 debug("tilde", comp, _, M, m, p, pr);
10440 var ret;
10441 if (isX(M)) {
10442 ret = "";
10443 } else if (isX(m)) {
10444 ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
10445 } else if (isX(p)) {
10446 ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
10447 } else if (pr) {
10448 debug("replaceTilde pr", pr);
10449 ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
10450 } else {
10451 ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
10452 }
10453 debug("tilde return", ret);
10454 return ret;
10455 });
10456 }
10457 function replaceCarets(comp, options) {
10458 return comp.trim().split(/\s+/).map(function(comp2) {
10459 return replaceCaret(comp2, options);
10460 }).join(" ");
10461 }
10462 function replaceCaret(comp, options) {
10463 debug("caret", comp, options);
10464 var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
10465 return comp.replace(r, function(_, M, m, p, pr) {
10466 debug("caret", comp, _, M, m, p, pr);
10467 var ret;
10468 if (isX(M)) {
10469 ret = "";
10470 } else if (isX(m)) {
10471 ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
10472 } else if (isX(p)) {
10473 if (M === "0") {
10474 ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
10475 } else {
10476 ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0";
10477 }
10478 } else if (pr) {
10479 debug("replaceCaret pr", pr);
10480 if (M === "0") {
10481 if (m === "0") {
10482 ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1);
10483 } else {
10484 ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
10485 }
10486 } else {
10487 ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0";
10488 }
10489 } else {
10490 debug("no pr");
10491 if (M === "0") {
10492 if (m === "0") {
10493 ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1);
10494 } else {
10495 ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
10496 }
10497 } else {
10498 ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0";
10499 }
10500 }
10501 debug("caret return", ret);
10502 return ret;
10503 });
10504 }
10505 function replaceXRanges(comp, options) {
10506 debug("replaceXRanges", comp, options);
10507 return comp.split(/\s+/).map(function(comp2) {
10508 return replaceXRange(comp2, options);
10509 }).join(" ");
10510 }
10511 function replaceXRange(comp, options) {
10512 comp = comp.trim();
10513 var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
10514 return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
10515 debug("xRange", comp, ret, gtlt, M, m, p, pr);
10516 var xM = isX(M);
10517 var xm = xM || isX(m);
10518 var xp = xm || isX(p);
10519 var anyX = xp;
10520 if (gtlt === "=" && anyX) {
10521 gtlt = "";
10522 }
10523 pr = options.includePrerelease ? "-0" : "";
10524 if (xM) {
10525 if (gtlt === ">" || gtlt === "<") {
10526 ret = "<0.0.0-0";
10527 } else {
10528 ret = "*";
10529 }
10530 } else if (gtlt && anyX) {
10531 if (xm) {
10532 m = 0;
10533 }
10534 p = 0;
10535 if (gtlt === ">") {
10536 gtlt = ">=";
10537 if (xm) {
10538 M = +M + 1;
10539 m = 0;
10540 p = 0;
10541 } else {
10542 m = +m + 1;
10543 p = 0;
10544 }
10545 } else if (gtlt === "<=") {
10546 gtlt = "<";
10547 if (xm) {
10548 M = +M + 1;
10549 } else {
10550 m = +m + 1;
10551 }
10552 }
10553 ret = gtlt + M + "." + m + "." + p + pr;
10554 } else if (xm) {
10555 ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr;
10556 } else if (xp) {
10557 ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr;
10558 }
10559 debug("xRange return", ret);
10560 return ret;
10561 });
10562 }
10563 function replaceStars(comp, options) {
10564 debug("replaceStars", comp, options);
10565 return comp.trim().replace(re[t.STAR], "");
10566 }
10567 function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
10568 if (isX(fM)) {
10569 from = "";
10570 } else if (isX(fm)) {
10571 from = ">=" + fM + ".0.0";
10572 } else if (isX(fp)) {
10573 from = ">=" + fM + "." + fm + ".0";
10574 } else {
10575 from = ">=" + from;
10576 }
10577 if (isX(tM)) {
10578 to = "";
10579 } else if (isX(tm)) {
10580 to = "<" + (+tM + 1) + ".0.0";
10581 } else if (isX(tp)) {
10582 to = "<" + tM + "." + (+tm + 1) + ".0";
10583 } else if (tpr) {
10584 to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
10585 } else {
10586 to = "<=" + to;
10587 }
10588 return (from + " " + to).trim();
10589 }
10590 Range.prototype.test = function(version) {
10591 if (!version) {
10592 return false;
10593 }
10594 if (typeof version === "string") {
10595 try {
10596 version = new SemVer(version, this.options);
10597 } catch (er) {
10598 return false;
10599 }
10600 }
10601 for (var i2 = 0; i2 < this.set.length; i2++) {
10602 if (testSet(this.set[i2], version, this.options)) {
10603 return true;
10604 }
10605 }
10606 return false;
10607 };
10608 function testSet(set, version, options) {
10609 for (var i2 = 0; i2 < set.length; i2++) {
10610 if (!set[i2].test(version)) {
10611 return false;
10612 }
10613 }
10614 if (version.prerelease.length && !options.includePrerelease) {
10615 for (i2 = 0; i2 < set.length; i2++) {
10616 debug(set[i2].semver);
10617 if (set[i2].semver === ANY) {
10618 continue;
10619 }
10620 if (set[i2].semver.prerelease.length > 0) {
10621 var allowed = set[i2].semver;
10622 if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
10623 return true;
10624 }
10625 }
10626 }
10627 return false;
10628 }
10629 return true;
10630 }
10631 exports2.satisfies = satisfies;
10632 function satisfies(version, range, options) {
10633 try {
10634 range = new Range(range, options);
10635 } catch (er) {
10636 return false;
10637 }
10638 return range.test(version);
10639 }
10640 exports2.maxSatisfying = maxSatisfying;
10641 function maxSatisfying(versions, range, options) {
10642 var max = null;
10643 var maxSV = null;
10644 try {
10645 var rangeObj = new Range(range, options);
10646 } catch (er) {
10647 return null;
10648 }
10649 versions.forEach(function(v) {
10650 if (rangeObj.test(v)) {
10651 if (!max || maxSV.compare(v) === -1) {
10652 max = v;
10653 maxSV = new SemVer(max, options);
10654 }
10655 }
10656 });
10657 return max;
10658 }
10659 exports2.minSatisfying = minSatisfying;
10660 function minSatisfying(versions, range, options) {
10661 var min = null;
10662 var minSV = null;
10663 try {
10664 var rangeObj = new Range(range, options);
10665 } catch (er) {
10666 return null;
10667 }
10668 versions.forEach(function(v) {
10669 if (rangeObj.test(v)) {
10670 if (!min || minSV.compare(v) === 1) {
10671 min = v;
10672 minSV = new SemVer(min, options);
10673 }
10674 }
10675 });
10676 return min;
10677 }
10678 exports2.minVersion = minVersion;
10679 function minVersion(range, loose) {
10680 range = new Range(range, loose);
10681 var minver = new SemVer("0.0.0");
10682 if (range.test(minver)) {
10683 return minver;
10684 }
10685 minver = new SemVer("0.0.0-0");
10686 if (range.test(minver)) {
10687 return minver;
10688 }
10689 minver = null;
10690 for (var i2 = 0; i2 < range.set.length; ++i2) {
10691 var comparators = range.set[i2];
10692 comparators.forEach(function(comparator) {
10693 var compver = new SemVer(comparator.semver.version);
10694 switch (comparator.operator) {
10695 case ">":
10696 if (compver.prerelease.length === 0) {
10697 compver.patch++;
10698 } else {
10699 compver.prerelease.push(0);
10700 }
10701 compver.raw = compver.format();
10702 case "":
10703 case ">=":
10704 if (!minver || gt(minver, compver)) {
10705 minver = compver;
10706 }
10707 break;
10708 case "<":
10709 case "<=":
10710 break;
10711 default:
10712 throw new Error("Unexpected operation: " + comparator.operator);
10713 }
10714 });
10715 }
10716 if (minver && range.test(minver)) {
10717 return minver;
10718 }
10719 return null;
10720 }
10721 exports2.validRange = validRange;
10722 function validRange(range, options) {
10723 try {
10724 return new Range(range, options).range || "*";
10725 } catch (er) {
10726 return null;
10727 }
10728 }
10729 exports2.ltr = ltr;
10730 function ltr(version, range, options) {
10731 return outside(version, range, "<", options);
10732 }
10733 exports2.gtr = gtr;
10734 function gtr(version, range, options) {
10735 return outside(version, range, ">", options);
10736 }
10737 exports2.outside = outside;
10738 function outside(version, range, hilo, options) {
10739 version = new SemVer(version, options);
10740 range = new Range(range, options);
10741 var gtfn, ltefn, ltfn, comp, ecomp;
10742 switch (hilo) {
10743 case ">":
10744 gtfn = gt;
10745 ltefn = lte;
10746 ltfn = lt;
10747 comp = ">";
10748 ecomp = ">=";
10749 break;
10750 case "<":
10751 gtfn = lt;
10752 ltefn = gte;
10753 ltfn = gt;
10754 comp = "<";
10755 ecomp = "<=";
10756 break;
10757 default:
10758 throw new TypeError('Must provide a hilo val of "<" or ">"');
10759 }
10760 if (satisfies(version, range, options)) {
10761 return false;
10762 }
10763 for (var i2 = 0; i2 < range.set.length; ++i2) {
10764 var comparators = range.set[i2];
10765 var high = null;
10766 var low = null;
10767 comparators.forEach(function(comparator) {
10768 if (comparator.semver === ANY) {
10769 comparator = new Comparator(">=0.0.0");
10770 }
10771 high = high || comparator;
10772 low = low || comparator;
10773 if (gtfn(comparator.semver, high.semver, options)) {
10774 high = comparator;
10775 } else if (ltfn(comparator.semver, low.semver, options)) {
10776 low = comparator;
10777 }
10778 });
10779 if (high.operator === comp || high.operator === ecomp) {
10780 return false;
10781 }
10782 if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
10783 return false;
10784 } else if (low.operator === ecomp && ltfn(version, low.semver)) {
10785 return false;
10786 }
10787 }
10788 return true;
10789 }
10790 exports2.prerelease = prerelease;
10791 function prerelease(version, options) {
10792 var parsed = parse(version, options);
10793 return parsed && parsed.prerelease.length ? parsed.prerelease : null;
10794 }
10795 exports2.intersects = intersects;
10796 function intersects(r1, r2, options) {
10797 r1 = new Range(r1, options);
10798 r2 = new Range(r2, options);
10799 return r1.intersects(r2);
10800 }
10801 exports2.coerce = coerce;
10802 function coerce(version, options) {
10803 if (version instanceof SemVer) {
10804 return version;
10805 }
10806 if (typeof version === "number") {
10807 version = String(version);
10808 }
10809 if (typeof version !== "string") {
10810 return null;
10811 }
10812 options = options || {};
10813 var match = null;
10814 if (!options.rtl) {
10815 match = version.match(re[t.COERCE]);
10816 } else {
10817 var next;
10818 while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
10819 if (!match || next.index + next[0].length !== match.index + match[0].length) {
10820 match = next;
10821 }
10822 re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
10823 }
10824 re[t.COERCERTL].lastIndex = -1;
10825 }
10826 if (match === null) {
10827 return null;
10828 }
10829 return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options);
10830 }
10831 }
10832});
10833var require_make_dir = __commonJS2({
10834 "node_modules/make-dir/index.js"(exports2, module2) {
10835 "use strict";
10836 var fs = require("fs");
10837 var path = require("path");
10838 var {
10839 promisify
10840 } = require("util");
10841 var semver = require_semver();
10842 var useNativeRecursiveOption = semver.satisfies(process.version, ">=10.12.0");
10843 var checkPath = (pth) => {
10844 if (process.platform === "win32") {
10845 const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ""));
10846 if (pathHasInvalidWinCharacters) {
10847 const error = new Error(`Path contains invalid characters: ${pth}`);
10848 error.code = "EINVAL";
10849 throw error;
10850 }
10851 }
10852 };
10853 var processOptions = (options) => {
10854 const defaults = {
10855 mode: 511,
10856 fs
10857 };
10858 return Object.assign(Object.assign({}, defaults), options);
10859 };
10860 var permissionError = (pth) => {
10861 const error = new Error(`operation not permitted, mkdir '${pth}'`);
10862 error.code = "EPERM";
10863 error.errno = -4048;
10864 error.path = pth;
10865 error.syscall = "mkdir";
10866 return error;
10867 };
10868 var makeDir = async (input, options) => {
10869 checkPath(input);
10870 options = processOptions(options);
10871 const mkdir = promisify(options.fs.mkdir);
10872 const stat = promisify(options.fs.stat);
10873 if (useNativeRecursiveOption && options.fs.mkdir === fs.mkdir) {
10874 const pth = path.resolve(input);
10875 await mkdir(pth, {
10876 mode: options.mode,
10877 recursive: true
10878 });
10879 return pth;
10880 }
10881 const make = async (pth) => {
10882 try {
10883 await mkdir(pth, options.mode);
10884 return pth;
10885 } catch (error) {
10886 if (error.code === "EPERM") {
10887 throw error;
10888 }
10889 if (error.code === "ENOENT") {
10890 if (path.dirname(pth) === pth) {
10891 throw permissionError(pth);
10892 }
10893 if (error.message.includes("null bytes")) {
10894 throw error;
10895 }
10896 await make(path.dirname(pth));
10897 return make(pth);
10898 }
10899 try {
10900 const stats = await stat(pth);
10901 if (!stats.isDirectory()) {
10902 throw new Error("The path is not a directory");
10903 }
10904 } catch (_) {
10905 throw error;
10906 }
10907 return pth;
10908 }
10909 };
10910 return make(path.resolve(input));
10911 };
10912 module2.exports = makeDir;
10913 module2.exports.sync = (input, options) => {
10914 checkPath(input);
10915 options = processOptions(options);
10916 if (useNativeRecursiveOption && options.fs.mkdirSync === fs.mkdirSync) {
10917 const pth = path.resolve(input);
10918 fs.mkdirSync(pth, {
10919 mode: options.mode,
10920 recursive: true
10921 });
10922 return pth;
10923 }
10924 const make = (pth) => {
10925 try {
10926 options.fs.mkdirSync(pth, options.mode);
10927 } catch (error) {
10928 if (error.code === "EPERM") {
10929 throw error;
10930 }
10931 if (error.code === "ENOENT") {
10932 if (path.dirname(pth) === pth) {
10933 throw permissionError(pth);
10934 }
10935 if (error.message.includes("null bytes")) {
10936 throw error;
10937 }
10938 make(path.dirname(pth));
10939 return make(pth);
10940 }
10941 try {
10942 if (!options.fs.statSync(pth).isDirectory()) {
10943 throw new Error("The path is not a directory");
10944 }
10945 } catch (_) {
10946 throw error;
10947 }
10948 }
10949 return pth;
10950 };
10951 return make(path.resolve(input));
10952 };
10953 }
10954});
10955var require_find_cache_dir = __commonJS2({
10956 "node_modules/find-cache-dir/index.js"(exports2, module2) {
10957 "use strict";
10958 var path = require("path");
10959 var fs = require("fs");
10960 var commonDir = require_commondir();
10961 var pkgDir = require_pkg_dir();
10962 var makeDir = require_make_dir();
10963 var {
10964 env: env2,
10965 cwd
10966 } = process;
10967 var isWritable = (path2) => {
10968 try {
10969 fs.accessSync(path2, fs.constants.W_OK);
10970 return true;
10971 } catch (_) {
10972 return false;
10973 }
10974 };
10975 function useDirectory(directory, options) {
10976 if (options.create) {
10977 makeDir.sync(directory);
10978 }
10979 if (options.thunk) {
10980 return (...arguments_) => path.join(directory, ...arguments_);
10981 }
10982 return directory;
10983 }
10984 function getNodeModuleDirectory(directory) {
10985 const nodeModules = path.join(directory, "node_modules");
10986 if (!isWritable(nodeModules) && (fs.existsSync(nodeModules) || !isWritable(path.join(directory)))) {
10987 return;
10988 }
10989 return nodeModules;
10990 }
10991 module2.exports = (options = {}) => {
10992 if (env2.CACHE_DIR && !["true", "false", "1", "0"].includes(env2.CACHE_DIR)) {
10993 return useDirectory(path.join(env2.CACHE_DIR, options.name), options);
10994 }
10995 let {
10996 cwd: directory = cwd()
10997 } = options;
10998 if (options.files) {
10999 directory = commonDir(directory, options.files);
11000 }
11001 directory = pkgDir.sync(directory);
11002 if (!directory) {
11003 return;
11004 }
11005 const nodeModules = getNodeModuleDirectory(directory);
11006 if (!nodeModules) {
11007 return void 0;
11008 }
11009 return useDirectory(path.join(directory, "node_modules", ".cache", options.name), options);
11010 };
11011 }
11012});
11013var require_find_cache_file = __commonJS2({
11014 "src/cli/find-cache-file.js"(exports2, module2) {
11015 "use strict";
11016 var fs = require("fs").promises;
11017 var os2 = require("os");
11018 var path = require("path");
11019 var findCacheDir = require_find_cache_dir();
11020 var {
11021 statSafe,
11022 isJson
11023 } = require_utils();
11024 function findDefaultCacheFile() {
11025 const cacheDir = findCacheDir({
11026 name: "prettier",
11027 create: true
11028 }) || os2.tmpdir();
11029 const cacheFilePath = path.join(cacheDir, ".prettier-cache");
11030 return cacheFilePath;
11031 }
11032 async function findCacheFileFromOption(cacheLocation) {
11033 const cacheFile = path.resolve(cacheLocation);
11034 const stat = await statSafe(cacheFile);
11035 if (stat) {
11036 if (stat.isDirectory()) {
11037 throw new Error(`Resolved --cache-location '${cacheFile}' is a directory`);
11038 }
11039 const data = await fs.readFile(cacheFile, "utf8");
11040 if (!isJson(data)) {
11041 throw new Error(`'${cacheFile}' isn't a valid JSON file`);
11042 }
11043 }
11044 return cacheFile;
11045 }
11046 async function findCacheFile(cacheLocation) {
11047 if (!cacheLocation) {
11048 return findDefaultCacheFile();
11049 }
11050 const cacheFile = await findCacheFileFromOption(cacheLocation);
11051 return cacheFile;
11052 }
11053 module2.exports = findCacheFile;
11054 }
11055});
11056var require_cjs = __commonJS2({
11057 "node_modules/flatted/cjs/index.js"(exports2) {
11058 "use strict";
11059 var {
11060 parse: $parse,
11061 stringify: $stringify
11062 } = JSON;
11063 var {
11064 keys
11065 } = Object;
11066 var Primitive = String;
11067 var primitive = "string";
11068 var ignore = {};
11069 var object = "object";
11070 var noop = (_, value) => value;
11071 var primitives = (value) => value instanceof Primitive ? Primitive(value) : value;
11072 var Primitives = (_, value) => typeof value === primitive ? new Primitive(value) : value;
11073 var revive = (input, parsed, output, $) => {
11074 const lazy = [];
11075 for (let ke = keys(output), {
11076 length
11077 } = ke, y = 0; y < length; y++) {
11078 const k = ke[y];
11079 const value = output[k];
11080 if (value instanceof Primitive) {
11081 const tmp = input[value];
11082 if (typeof tmp === object && !parsed.has(tmp)) {
11083 parsed.add(tmp);
11084 output[k] = ignore;
11085 lazy.push({
11086 k,
11087 a: [input, parsed, tmp, $]
11088 });
11089 } else
11090 output[k] = $.call(output, k, tmp);
11091 } else if (output[k] !== ignore)
11092 output[k] = $.call(output, k, value);
11093 }
11094 for (let {
11095 length
11096 } = lazy, i = 0; i < length; i++) {
11097 const {
11098 k,
11099 a
11100 } = lazy[i];
11101 output[k] = $.call(output, k, revive.apply(null, a));
11102 }
11103 return output;
11104 };
11105 var set = (known, input, value) => {
11106 const index = Primitive(input.push(value) - 1);
11107 known.set(value, index);
11108 return index;
11109 };
11110 var parse = (text, reviver) => {
11111 const input = $parse(text, Primitives).map(primitives);
11112 const value = input[0];
11113 const $ = reviver || noop;
11114 const tmp = typeof value === object && value ? revive(input, /* @__PURE__ */ new Set(), value, $) : value;
11115 return $.call({
11116 "": tmp
11117 }, "", tmp);
11118 };
11119 exports2.parse = parse;
11120 var stringify2 = (value, replacer, space) => {
11121 const $ = replacer && typeof replacer === object ? (k, v) => k === "" || -1 < replacer.indexOf(k) ? v : void 0 : replacer || noop;
11122 const known = /* @__PURE__ */ new Map();
11123 const input = [];
11124 const output = [];
11125 let i = +set(known, input, $.call({
11126 "": value
11127 }, "", value));
11128 let firstRun = !i;
11129 while (i < input.length) {
11130 firstRun = true;
11131 output[i] = $stringify(input[i++], replace, space);
11132 }
11133 return "[" + output.join(",") + "]";
11134 function replace(key, value2) {
11135 if (firstRun) {
11136 firstRun = !firstRun;
11137 return value2;
11138 }
11139 const after = $.call(this, key, value2);
11140 switch (typeof after) {
11141 case object:
11142 if (after === null)
11143 return after;
11144 case primitive:
11145 return known.get(after) || set(known, input, after);
11146 }
11147 return after;
11148 }
11149 };
11150 exports2.stringify = stringify2;
11151 var toJSON = (any) => $parse(stringify2(any));
11152 exports2.toJSON = toJSON;
11153 var fromJSON = (any) => parse($stringify(any));
11154 exports2.fromJSON = fromJSON;
11155 }
11156});
11157var require_utils6 = __commonJS2({
11158 "node_modules/flat-cache/src/utils.js"(exports2, module2) {
11159 var fs = require("fs");
11160 var path = require("path");
11161 var flatted = require_cjs();
11162 module2.exports = {
11163 tryParse: function(filePath, defaultValue) {
11164 var result;
11165 try {
11166 result = this.readJSON(filePath);
11167 } catch (ex) {
11168 result = defaultValue;
11169 }
11170 return result;
11171 },
11172 readJSON: function(filePath) {
11173 return flatted.parse(fs.readFileSync(filePath, {
11174 encoding: "utf8"
11175 }));
11176 },
11177 writeJSON: function(filePath, data) {
11178 fs.mkdirSync(path.dirname(filePath), {
11179 recursive: true
11180 });
11181 fs.writeFileSync(filePath, flatted.stringify(data));
11182 }
11183 };
11184 }
11185});
11186var require_old = __commonJS2({
11187 "node_modules/fs.realpath/old.js"(exports2) {
11188 var pathModule = require("path");
11189 var isWindows = process.platform === "win32";
11190 var fs = require("fs");
11191 var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
11192 function rethrow() {
11193 var callback;
11194 if (DEBUG) {
11195 var backtrace = new Error();
11196 callback = debugCallback;
11197 } else
11198 callback = missingCallback;
11199 return callback;
11200 function debugCallback(err) {
11201 if (err) {
11202 backtrace.message = err.message;
11203 err = backtrace;
11204 missingCallback(err);
11205 }
11206 }
11207 function missingCallback(err) {
11208 if (err) {
11209 if (process.throwDeprecation)
11210 throw err;
11211 else if (!process.noDeprecation) {
11212 var msg = "fs: missing callback " + (err.stack || err.message);
11213 if (process.traceDeprecation)
11214 console.trace(msg);
11215 else
11216 console.error(msg);
11217 }
11218 }
11219 }
11220 }
11221 function maybeCallback(cb) {
11222 return typeof cb === "function" ? cb : rethrow();
11223 }
11224 var normalize = pathModule.normalize;
11225 if (isWindows) {
11226 nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
11227 } else {
11228 nextPartRe = /(.*?)(?:[\/]+|$)/g;
11229 }
11230 var nextPartRe;
11231 if (isWindows) {
11232 splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
11233 } else {
11234 splitRootRe = /^[\/]*/;
11235 }
11236 var splitRootRe;
11237 exports2.realpathSync = function realpathSync(p, cache) {
11238 p = pathModule.resolve(p);
11239 if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
11240 return cache[p];
11241 }
11242 var original = p, seenLinks = {}, knownHard = {};
11243 var pos;
11244 var current;
11245 var base;
11246 var previous;
11247 start();
11248 function start() {
11249 var m = splitRootRe.exec(p);
11250 pos = m[0].length;
11251 current = m[0];
11252 base = m[0];
11253 previous = "";
11254 if (isWindows && !knownHard[base]) {
11255 fs.lstatSync(base);
11256 knownHard[base] = true;
11257 }
11258 }
11259 while (pos < p.length) {
11260 nextPartRe.lastIndex = pos;
11261 var result = nextPartRe.exec(p);
11262 previous = current;
11263 current += result[0];
11264 base = previous + result[1];
11265 pos = nextPartRe.lastIndex;
11266 if (knownHard[base] || cache && cache[base] === base) {
11267 continue;
11268 }
11269 var resolvedLink;
11270 if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
11271 resolvedLink = cache[base];
11272 } else {
11273 var stat = fs.lstatSync(base);
11274 if (!stat.isSymbolicLink()) {
11275 knownHard[base] = true;
11276 if (cache)
11277 cache[base] = base;
11278 continue;
11279 }
11280 var linkTarget = null;
11281 if (!isWindows) {
11282 var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
11283 if (seenLinks.hasOwnProperty(id)) {
11284 linkTarget = seenLinks[id];
11285 }
11286 }
11287 if (linkTarget === null) {
11288 fs.statSync(base);
11289 linkTarget = fs.readlinkSync(base);
11290 }
11291 resolvedLink = pathModule.resolve(previous, linkTarget);
11292 if (cache)
11293 cache[base] = resolvedLink;
11294 if (!isWindows)
11295 seenLinks[id] = linkTarget;
11296 }
11297 p = pathModule.resolve(resolvedLink, p.slice(pos));
11298 start();
11299 }
11300 if (cache)
11301 cache[original] = p;
11302 return p;
11303 };
11304 exports2.realpath = function realpath(p, cache, cb) {
11305 if (typeof cb !== "function") {
11306 cb = maybeCallback(cache);
11307 cache = null;
11308 }
11309 p = pathModule.resolve(p);
11310 if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
11311 return process.nextTick(cb.bind(null, null, cache[p]));
11312 }
11313 var original = p, seenLinks = {}, knownHard = {};
11314 var pos;
11315 var current;
11316 var base;
11317 var previous;
11318 start();
11319 function start() {
11320 var m = splitRootRe.exec(p);
11321 pos = m[0].length;
11322 current = m[0];
11323 base = m[0];
11324 previous = "";
11325 if (isWindows && !knownHard[base]) {
11326 fs.lstat(base, function(err) {
11327 if (err)
11328 return cb(err);
11329 knownHard[base] = true;
11330 LOOP();
11331 });
11332 } else {
11333 process.nextTick(LOOP);
11334 }
11335 }
11336 function LOOP() {
11337 if (pos >= p.length) {
11338 if (cache)
11339 cache[original] = p;
11340 return cb(null, p);
11341 }
11342 nextPartRe.lastIndex = pos;
11343 var result = nextPartRe.exec(p);
11344 previous = current;
11345 current += result[0];
11346 base = previous + result[1];
11347 pos = nextPartRe.lastIndex;
11348 if (knownHard[base] || cache && cache[base] === base) {
11349 return process.nextTick(LOOP);
11350 }
11351 if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
11352 return gotResolvedLink(cache[base]);
11353 }
11354 return fs.lstat(base, gotStat);
11355 }
11356 function gotStat(err, stat) {
11357 if (err)
11358 return cb(err);
11359 if (!stat.isSymbolicLink()) {
11360 knownHard[base] = true;
11361 if (cache)
11362 cache[base] = base;
11363 return process.nextTick(LOOP);
11364 }
11365 if (!isWindows) {
11366 var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
11367 if (seenLinks.hasOwnProperty(id)) {
11368 return gotTarget(null, seenLinks[id], base);
11369 }
11370 }
11371 fs.stat(base, function(err2) {
11372 if (err2)
11373 return cb(err2);
11374 fs.readlink(base, function(err3, target) {
11375 if (!isWindows)
11376 seenLinks[id] = target;
11377 gotTarget(err3, target);
11378 });
11379 });
11380 }
11381 function gotTarget(err, target, base2) {
11382 if (err)
11383 return cb(err);
11384 var resolvedLink = pathModule.resolve(previous, target);
11385 if (cache)
11386 cache[base2] = resolvedLink;
11387 gotResolvedLink(resolvedLink);
11388 }
11389 function gotResolvedLink(resolvedLink) {
11390 p = pathModule.resolve(resolvedLink, p.slice(pos));
11391 start();
11392 }
11393 };
11394 }
11395});
11396var require_fs5 = __commonJS2({
11397 "node_modules/fs.realpath/index.js"(exports2, module2) {
11398 module2.exports = realpath;
11399 realpath.realpath = realpath;
11400 realpath.sync = realpathSync;
11401 realpath.realpathSync = realpathSync;
11402 realpath.monkeypatch = monkeypatch;
11403 realpath.unmonkeypatch = unmonkeypatch;
11404 var fs = require("fs");
11405 var origRealpath = fs.realpath;
11406 var origRealpathSync = fs.realpathSync;
11407 var version = process.version;
11408 var ok = /^v[0-5]\./.test(version);
11409 var old = require_old();
11410 function newError(er) {
11411 return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
11412 }
11413 function realpath(p, cache, cb) {
11414 if (ok) {
11415 return origRealpath(p, cache, cb);
11416 }
11417 if (typeof cache === "function") {
11418 cb = cache;
11419 cache = null;
11420 }
11421 origRealpath(p, cache, function(er, result) {
11422 if (newError(er)) {
11423 old.realpath(p, cache, cb);
11424 } else {
11425 cb(er, result);
11426 }
11427 });
11428 }
11429 function realpathSync(p, cache) {
11430 if (ok) {
11431 return origRealpathSync(p, cache);
11432 }
11433 try {
11434 return origRealpathSync(p, cache);
11435 } catch (er) {
11436 if (newError(er)) {
11437 return old.realpathSync(p, cache);
11438 } else {
11439 throw er;
11440 }
11441 }
11442 }
11443 function monkeypatch() {
11444 fs.realpath = realpath;
11445 fs.realpathSync = realpathSync;
11446 }
11447 function unmonkeypatch() {
11448 fs.realpath = origRealpath;
11449 fs.realpathSync = origRealpathSync;
11450 }
11451 }
11452});
11453var require_concat_map = __commonJS2({
11454 "node_modules/concat-map/index.js"(exports2, module2) {
11455 module2.exports = function(xs, fn) {
11456 var res = [];
11457 for (var i = 0; i < xs.length; i++) {
11458 var x = fn(xs[i], i);
11459 if (isArray(x))
11460 res.push.apply(res, x);
11461 else
11462 res.push(x);
11463 }
11464 return res;
11465 };
11466 var isArray = Array.isArray || function(xs) {
11467 return Object.prototype.toString.call(xs) === "[object Array]";
11468 };
11469 }
11470});
11471var require_balanced_match = __commonJS2({
11472 "node_modules/balanced-match/index.js"(exports2, module2) {
11473 "use strict";
11474 module2.exports = balanced;
11475 function balanced(a, b, str) {
11476 if (a instanceof RegExp)
11477 a = maybeMatch(a, str);
11478 if (b instanceof RegExp)
11479 b = maybeMatch(b, str);
11480 var r = range(a, b, str);
11481 return r && {
11482 start: r[0],
11483 end: r[1],
11484 pre: str.slice(0, r[0]),
11485 body: str.slice(r[0] + a.length, r[1]),
11486 post: str.slice(r[1] + b.length)
11487 };
11488 }
11489 function maybeMatch(reg, str) {
11490 var m = str.match(reg);
11491 return m ? m[0] : null;
11492 }
11493 balanced.range = range;
11494 function range(a, b, str) {
11495 var begs, beg, left, right, result;
11496 var ai = str.indexOf(a);
11497 var bi = str.indexOf(b, ai + 1);
11498 var i = ai;
11499 if (ai >= 0 && bi > 0) {
11500 if (a === b) {
11501 return [ai, bi];
11502 }
11503 begs = [];
11504 left = str.length;
11505 while (i >= 0 && !result) {
11506 if (i == ai) {
11507 begs.push(i);
11508 ai = str.indexOf(a, i + 1);
11509 } else if (begs.length == 1) {
11510 result = [begs.pop(), bi];
11511 } else {
11512 beg = begs.pop();
11513 if (beg < left) {
11514 left = beg;
11515 right = bi;
11516 }
11517 bi = str.indexOf(b, i + 1);
11518 }
11519 i = ai < bi && ai >= 0 ? ai : bi;
11520 }
11521 if (begs.length) {
11522 result = [left, right];
11523 }
11524 }
11525 return result;
11526 }
11527 }
11528});
11529var require_brace_expansion = __commonJS2({
11530 "node_modules/brace-expansion/index.js"(exports2, module2) {
11531 var concatMap = require_concat_map();
11532 var balanced = require_balanced_match();
11533 module2.exports = expandTop;
11534 var escSlash = "\0SLASH" + Math.random() + "\0";
11535 var escOpen = "\0OPEN" + Math.random() + "\0";
11536 var escClose = "\0CLOSE" + Math.random() + "\0";
11537 var escComma = "\0COMMA" + Math.random() + "\0";
11538 var escPeriod = "\0PERIOD" + Math.random() + "\0";
11539 function numeric(str) {
11540 return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
11541 }
11542 function escapeBraces(str) {
11543 return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
11544 }
11545 function unescapeBraces(str) {
11546 return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
11547 }
11548 function parseCommaParts(str) {
11549 if (!str)
11550 return [""];
11551 var parts = [];
11552 var m = balanced("{", "}", str);
11553 if (!m)
11554 return str.split(",");
11555 var pre = m.pre;
11556 var body = m.body;
11557 var post = m.post;
11558 var p = pre.split(",");
11559 p[p.length - 1] += "{" + body + "}";
11560 var postParts = parseCommaParts(post);
11561 if (post.length) {
11562 p[p.length - 1] += postParts.shift();
11563 p.push.apply(p, postParts);
11564 }
11565 parts.push.apply(parts, p);
11566 return parts;
11567 }
11568 function expandTop(str) {
11569 if (!str)
11570 return [];
11571 if (str.substr(0, 2) === "{}") {
11572 str = "\\{\\}" + str.substr(2);
11573 }
11574 return expand(escapeBraces(str), true).map(unescapeBraces);
11575 }
11576 function embrace(str) {
11577 return "{" + str + "}";
11578 }
11579 function isPadded(el) {
11580 return /^-?0\d/.test(el);
11581 }
11582 function lte(i, y) {
11583 return i <= y;
11584 }
11585 function gte(i, y) {
11586 return i >= y;
11587 }
11588 function expand(str, isTop) {
11589 var expansions = [];
11590 var m = balanced("{", "}", str);
11591 if (!m || /\$$/.test(m.pre))
11592 return [str];
11593 var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
11594 var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
11595 var isSequence = isNumericSequence || isAlphaSequence;
11596 var isOptions = m.body.indexOf(",") >= 0;
11597 if (!isSequence && !isOptions) {
11598 if (m.post.match(/,.*\}/)) {
11599 str = m.pre + "{" + m.body + escClose + m.post;
11600 return expand(str);
11601 }
11602 return [str];
11603 }
11604 var n;
11605 if (isSequence) {
11606 n = m.body.split(/\.\./);
11607 } else {
11608 n = parseCommaParts(m.body);
11609 if (n.length === 1) {
11610 n = expand(n[0], false).map(embrace);
11611 if (n.length === 1) {
11612 var post = m.post.length ? expand(m.post, false) : [""];
11613 return post.map(function(p) {
11614 return m.pre + n[0] + p;
11615 });
11616 }
11617 }
11618 }
11619 var pre = m.pre;
11620 var post = m.post.length ? expand(m.post, false) : [""];
11621 var N;
11622 if (isSequence) {
11623 var x = numeric(n[0]);
11624 var y = numeric(n[1]);
11625 var width = Math.max(n[0].length, n[1].length);
11626 var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
11627 var test = lte;
11628 var reverse = y < x;
11629 if (reverse) {
11630 incr *= -1;
11631 test = gte;
11632 }
11633 var pad = n.some(isPadded);
11634 N = [];
11635 for (var i = x; test(i, y); i += incr) {
11636 var c;
11637 if (isAlphaSequence) {
11638 c = String.fromCharCode(i);
11639 if (c === "\\")
11640 c = "";
11641 } else {
11642 c = String(i);
11643 if (pad) {
11644 var need = width - c.length;
11645 if (need > 0) {
11646 var z = new Array(need + 1).join("0");
11647 if (i < 0)
11648 c = "-" + z + c.slice(1);
11649 else
11650 c = z + c;
11651 }
11652 }
11653 }
11654 N.push(c);
11655 }
11656 } else {
11657 N = concatMap(n, function(el) {
11658 return expand(el, false);
11659 });
11660 }
11661 for (var j = 0; j < N.length; j++) {
11662 for (var k = 0; k < post.length; k++) {
11663 var expansion = pre + N[j] + post[k];
11664 if (!isTop || isSequence || expansion)
11665 expansions.push(expansion);
11666 }
11667 }
11668 return expansions;
11669 }
11670 }
11671});
11672var require_minimatch = __commonJS2({
11673 "node_modules/minimatch/minimatch.js"(exports2, module2) {
11674 module2.exports = minimatch;
11675 minimatch.Minimatch = Minimatch;
11676 var path = function() {
11677 try {
11678 return require("path");
11679 } catch (e) {
11680 }
11681 }() || {
11682 sep: "/"
11683 };
11684 minimatch.sep = path.sep;
11685 var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
11686 var expand = require_brace_expansion();
11687 var plTypes = {
11688 "!": {
11689 open: "(?:(?!(?:",
11690 close: "))[^/]*?)"
11691 },
11692 "?": {
11693 open: "(?:",
11694 close: ")?"
11695 },
11696 "+": {
11697 open: "(?:",
11698 close: ")+"
11699 },
11700 "*": {
11701 open: "(?:",
11702 close: ")*"
11703 },
11704 "@": {
11705 open: "(?:",
11706 close: ")"
11707 }
11708 };
11709 var qmark = "[^/]";
11710 var star = qmark + "*?";
11711 var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
11712 var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
11713 var reSpecials = charSet("().*{}+?[]^$\\!");
11714 function charSet(s) {
11715 return s.split("").reduce(function(set, c) {
11716 set[c] = true;
11717 return set;
11718 }, {});
11719 }
11720 var slashSplit = /\/+/;
11721 minimatch.filter = filter;
11722 function filter(pattern, options) {
11723 options = options || {};
11724 return function(p, i, list) {
11725 return minimatch(p, pattern, options);
11726 };
11727 }
11728 function ext(a, b) {
11729 b = b || {};
11730 var t = {};
11731 Object.keys(a).forEach(function(k) {
11732 t[k] = a[k];
11733 });
11734 Object.keys(b).forEach(function(k) {
11735 t[k] = b[k];
11736 });
11737 return t;
11738 }
11739 minimatch.defaults = function(def) {
11740 if (!def || typeof def !== "object" || !Object.keys(def).length) {
11741 return minimatch;
11742 }
11743 var orig = minimatch;
11744 var m = function minimatch2(p, pattern, options) {
11745 return orig(p, pattern, ext(def, options));
11746 };
11747 m.Minimatch = function Minimatch2(pattern, options) {
11748 return new orig.Minimatch(pattern, ext(def, options));
11749 };
11750 m.Minimatch.defaults = function defaults(options) {
11751 return orig.defaults(ext(def, options)).Minimatch;
11752 };
11753 m.filter = function filter2(pattern, options) {
11754 return orig.filter(pattern, ext(def, options));
11755 };
11756 m.defaults = function defaults(options) {
11757 return orig.defaults(ext(def, options));
11758 };
11759 m.makeRe = function makeRe2(pattern, options) {
11760 return orig.makeRe(pattern, ext(def, options));
11761 };
11762 m.braceExpand = function braceExpand2(pattern, options) {
11763 return orig.braceExpand(pattern, ext(def, options));
11764 };
11765 m.match = function(list, pattern, options) {
11766 return orig.match(list, pattern, ext(def, options));
11767 };
11768 return m;
11769 };
11770 Minimatch.defaults = function(def) {
11771 return minimatch.defaults(def).Minimatch;
11772 };
11773 function minimatch(p, pattern, options) {
11774 assertValidPattern(pattern);
11775 if (!options)
11776 options = {};
11777 if (!options.nocomment && pattern.charAt(0) === "#") {
11778 return false;
11779 }
11780 return new Minimatch(pattern, options).match(p);
11781 }
11782 function Minimatch(pattern, options) {
11783 if (!(this instanceof Minimatch)) {
11784 return new Minimatch(pattern, options);
11785 }
11786 assertValidPattern(pattern);
11787 if (!options)
11788 options = {};
11789 pattern = pattern.trim();
11790 if (!options.allowWindowsEscape && path.sep !== "/") {
11791 pattern = pattern.split(path.sep).join("/");
11792 }
11793 this.options = options;
11794 this.set = [];
11795 this.pattern = pattern;
11796 this.regexp = null;
11797 this.negate = false;
11798 this.comment = false;
11799 this.empty = false;
11800 this.partial = !!options.partial;
11801 this.make();
11802 }
11803 Minimatch.prototype.debug = function() {
11804 };
11805 Minimatch.prototype.make = make;
11806 function make() {
11807 var pattern = this.pattern;
11808 var options = this.options;
11809 if (!options.nocomment && pattern.charAt(0) === "#") {
11810 this.comment = true;
11811 return;
11812 }
11813 if (!pattern) {
11814 this.empty = true;
11815 return;
11816 }
11817 this.parseNegate();
11818 var set = this.globSet = this.braceExpand();
11819 if (options.debug)
11820 this.debug = function debug() {
11821 console.error.apply(console, arguments);
11822 };
11823 this.debug(this.pattern, set);
11824 set = this.globParts = set.map(function(s) {
11825 return s.split(slashSplit);
11826 });
11827 this.debug(this.pattern, set);
11828 set = set.map(function(s, si, set2) {
11829 return s.map(this.parse, this);
11830 }, this);
11831 this.debug(this.pattern, set);
11832 set = set.filter(function(s) {
11833 return s.indexOf(false) === -1;
11834 });
11835 this.debug(this.pattern, set);
11836 this.set = set;
11837 }
11838 Minimatch.prototype.parseNegate = parseNegate;
11839 function parseNegate() {
11840 var pattern = this.pattern;
11841 var negate = false;
11842 var options = this.options;
11843 var negateOffset = 0;
11844 if (options.nonegate)
11845 return;
11846 for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) {
11847 negate = !negate;
11848 negateOffset++;
11849 }
11850 if (negateOffset)
11851 this.pattern = pattern.substr(negateOffset);
11852 this.negate = negate;
11853 }
11854 minimatch.braceExpand = function(pattern, options) {
11855 return braceExpand(pattern, options);
11856 };
11857 Minimatch.prototype.braceExpand = braceExpand;
11858 function braceExpand(pattern, options) {
11859 if (!options) {
11860 if (this instanceof Minimatch) {
11861 options = this.options;
11862 } else {
11863 options = {};
11864 }
11865 }
11866 pattern = typeof pattern === "undefined" ? this.pattern : pattern;
11867 assertValidPattern(pattern);
11868 if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
11869 return [pattern];
11870 }
11871 return expand(pattern);
11872 }
11873 var MAX_PATTERN_LENGTH = 1024 * 64;
11874 var assertValidPattern = function(pattern) {
11875 if (typeof pattern !== "string") {
11876 throw new TypeError("invalid pattern");
11877 }
11878 if (pattern.length > MAX_PATTERN_LENGTH) {
11879 throw new TypeError("pattern is too long");
11880 }
11881 };
11882 Minimatch.prototype.parse = parse;
11883 var SUBPARSE = {};
11884 function parse(pattern, isSub) {
11885 assertValidPattern(pattern);
11886 var options = this.options;
11887 if (pattern === "**") {
11888 if (!options.noglobstar)
11889 return GLOBSTAR;
11890 else
11891 pattern = "*";
11892 }
11893 if (pattern === "")
11894 return "";
11895 var re = "";
11896 var hasMagic = !!options.nocase;
11897 var escaping = false;
11898 var patternListStack = [];
11899 var negativeLists = [];
11900 var stateChar;
11901 var inClass = false;
11902 var reClassStart = -1;
11903 var classStart = -1;
11904 var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
11905 var self2 = this;
11906 function clearStateChar() {
11907 if (stateChar) {
11908 switch (stateChar) {
11909 case "*":
11910 re += star;
11911 hasMagic = true;
11912 break;
11913 case "?":
11914 re += qmark;
11915 hasMagic = true;
11916 break;
11917 default:
11918 re += "\\" + stateChar;
11919 break;
11920 }
11921 self2.debug("clearStateChar %j %j", stateChar, re);
11922 stateChar = false;
11923 }
11924 }
11925 for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) {
11926 this.debug("%s %s %s %j", pattern, i, re, c);
11927 if (escaping && reSpecials[c]) {
11928 re += "\\" + c;
11929 escaping = false;
11930 continue;
11931 }
11932 switch (c) {
11933 case "/": {
11934 return false;
11935 }
11936 case "\\":
11937 clearStateChar();
11938 escaping = true;
11939 continue;
11940 case "?":
11941 case "*":
11942 case "+":
11943 case "@":
11944 case "!":
11945 this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c);
11946 if (inClass) {
11947 this.debug(" in class");
11948 if (c === "!" && i === classStart + 1)
11949 c = "^";
11950 re += c;
11951 continue;
11952 }
11953 self2.debug("call clearStateChar %j", stateChar);
11954 clearStateChar();
11955 stateChar = c;
11956 if (options.noext)
11957 clearStateChar();
11958 continue;
11959 case "(":
11960 if (inClass) {
11961 re += "(";
11962 continue;
11963 }
11964 if (!stateChar) {
11965 re += "\\(";
11966 continue;
11967 }
11968 patternListStack.push({
11969 type: stateChar,
11970 start: i - 1,
11971 reStart: re.length,
11972 open: plTypes[stateChar].open,
11973 close: plTypes[stateChar].close
11974 });
11975 re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
11976 this.debug("plType %j %j", stateChar, re);
11977 stateChar = false;
11978 continue;
11979 case ")":
11980 if (inClass || !patternListStack.length) {
11981 re += "\\)";
11982 continue;
11983 }
11984 clearStateChar();
11985 hasMagic = true;
11986 var pl = patternListStack.pop();
11987 re += pl.close;
11988 if (pl.type === "!") {
11989 negativeLists.push(pl);
11990 }
11991 pl.reEnd = re.length;
11992 continue;
11993 case "|":
11994 if (inClass || !patternListStack.length || escaping) {
11995 re += "\\|";
11996 escaping = false;
11997 continue;
11998 }
11999 clearStateChar();
12000 re += "|";
12001 continue;
12002 case "[":
12003 clearStateChar();
12004 if (inClass) {
12005 re += "\\" + c;
12006 continue;
12007 }
12008 inClass = true;
12009 classStart = i;
12010 reClassStart = re.length;
12011 re += c;
12012 continue;
12013 case "]":
12014 if (i === classStart + 1 || !inClass) {
12015 re += "\\" + c;
12016 escaping = false;
12017 continue;
12018 }
12019 var cs = pattern.substring(classStart + 1, i);
12020 try {
12021 RegExp("[" + cs + "]");
12022 } catch (er) {
12023 var sp = this.parse(cs, SUBPARSE);
12024 re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
12025 hasMagic = hasMagic || sp[1];
12026 inClass = false;
12027 continue;
12028 }
12029 hasMagic = true;
12030 inClass = false;
12031 re += c;
12032 continue;
12033 default:
12034 clearStateChar();
12035 if (escaping) {
12036 escaping = false;
12037 } else if (reSpecials[c] && !(c === "^" && inClass)) {
12038 re += "\\";
12039 }
12040 re += c;
12041 }
12042 }
12043 if (inClass) {
12044 cs = pattern.substr(classStart + 1);
12045 sp = this.parse(cs, SUBPARSE);
12046 re = re.substr(0, reClassStart) + "\\[" + sp[0];
12047 hasMagic = hasMagic || sp[1];
12048 }
12049 for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
12050 var tail = re.slice(pl.reStart + pl.open.length);
12051 this.debug("setting tail", re, pl);
12052 tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) {
12053 if (!$2) {
12054 $2 = "\\";
12055 }
12056 return $1 + $1 + $2 + "|";
12057 });
12058 this.debug("tail=%j\n %s", tail, tail, pl, re);
12059 var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
12060 hasMagic = true;
12061 re = re.slice(0, pl.reStart) + t + "\\(" + tail;
12062 }
12063 clearStateChar();
12064 if (escaping) {
12065 re += "\\\\";
12066 }
12067 var addPatternStart = false;
12068 switch (re.charAt(0)) {
12069 case "[":
12070 case ".":
12071 case "(":
12072 addPatternStart = true;
12073 }
12074 for (var n = negativeLists.length - 1; n > -1; n--) {
12075 var nl = negativeLists[n];
12076 var nlBefore = re.slice(0, nl.reStart);
12077 var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
12078 var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
12079 var nlAfter = re.slice(nl.reEnd);
12080 nlLast += nlAfter;
12081 var openParensBefore = nlBefore.split("(").length - 1;
12082 var cleanAfter = nlAfter;
12083 for (i = 0; i < openParensBefore; i++) {
12084 cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
12085 }
12086 nlAfter = cleanAfter;
12087 var dollar = "";
12088 if (nlAfter === "" && isSub !== SUBPARSE) {
12089 dollar = "$";
12090 }
12091 var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
12092 re = newRe;
12093 }
12094 if (re !== "" && hasMagic) {
12095 re = "(?=.)" + re;
12096 }
12097 if (addPatternStart) {
12098 re = patternStart + re;
12099 }
12100 if (isSub === SUBPARSE) {
12101 return [re, hasMagic];
12102 }
12103 if (!hasMagic) {
12104 return globUnescape(pattern);
12105 }
12106 var flags = options.nocase ? "i" : "";
12107 try {
12108 var regExp = new RegExp("^" + re + "$", flags);
12109 } catch (er) {
12110 return new RegExp("$.");
12111 }
12112 regExp._glob = pattern;
12113 regExp._src = re;
12114 return regExp;
12115 }
12116 minimatch.makeRe = function(pattern, options) {
12117 return new Minimatch(pattern, options || {}).makeRe();
12118 };
12119 Minimatch.prototype.makeRe = makeRe;
12120 function makeRe() {
12121 if (this.regexp || this.regexp === false)
12122 return this.regexp;
12123 var set = this.set;
12124 if (!set.length) {
12125 this.regexp = false;
12126 return this.regexp;
12127 }
12128 var options = this.options;
12129 var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
12130 var flags = options.nocase ? "i" : "";
12131 var re = set.map(function(pattern) {
12132 return pattern.map(function(p) {
12133 return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src;
12134 }).join("\\/");
12135 }).join("|");
12136 re = "^(?:" + re + ")$";
12137 if (this.negate)
12138 re = "^(?!" + re + ").*$";
12139 try {
12140 this.regexp = new RegExp(re, flags);
12141 } catch (ex) {
12142 this.regexp = false;
12143 }
12144 return this.regexp;
12145 }
12146 minimatch.match = function(list, pattern, options) {
12147 options = options || {};
12148 var mm = new Minimatch(pattern, options);
12149 list = list.filter(function(f) {
12150 return mm.match(f);
12151 });
12152 if (mm.options.nonull && !list.length) {
12153 list.push(pattern);
12154 }
12155 return list;
12156 };
12157 Minimatch.prototype.match = function match(f, partial) {
12158 if (typeof partial === "undefined")
12159 partial = this.partial;
12160 this.debug("match", f, this.pattern);
12161 if (this.comment)
12162 return false;
12163 if (this.empty)
12164 return f === "";
12165 if (f === "/" && partial)
12166 return true;
12167 var options = this.options;
12168 if (path.sep !== "/") {
12169 f = f.split(path.sep).join("/");
12170 }
12171 f = f.split(slashSplit);
12172 this.debug(this.pattern, "split", f);
12173 var set = this.set;
12174 this.debug(this.pattern, "set", set);
12175 var filename;
12176 var i;
12177 for (i = f.length - 1; i >= 0; i--) {
12178 filename = f[i];
12179 if (filename)
12180 break;
12181 }
12182 for (i = 0; i < set.length; i++) {
12183 var pattern = set[i];
12184 var file = f;
12185 if (options.matchBase && pattern.length === 1) {
12186 file = [filename];
12187 }
12188 var hit = this.matchOne(file, pattern, partial);
12189 if (hit) {
12190 if (options.flipNegate)
12191 return true;
12192 return !this.negate;
12193 }
12194 }
12195 if (options.flipNegate)
12196 return false;
12197 return this.negate;
12198 };
12199 Minimatch.prototype.matchOne = function(file, pattern, partial) {
12200 var options = this.options;
12201 this.debug("matchOne", {
12202 "this": this,
12203 file,
12204 pattern
12205 });
12206 this.debug("matchOne", file.length, pattern.length);
12207 for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
12208 this.debug("matchOne loop");
12209 var p = pattern[pi];
12210 var f = file[fi];
12211 this.debug(pattern, p, f);
12212 if (p === false)
12213 return false;
12214 if (p === GLOBSTAR) {
12215 this.debug("GLOBSTAR", [pattern, p, f]);
12216 var fr = fi;
12217 var pr = pi + 1;
12218 if (pr === pl) {
12219 this.debug("** at the end");
12220 for (; fi < fl; fi++) {
12221 if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
12222 return false;
12223 }
12224 return true;
12225 }
12226 while (fr < fl) {
12227 var swallowee = file[fr];
12228 this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
12229 if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
12230 this.debug("globstar found match!", fr, fl, swallowee);
12231 return true;
12232 } else {
12233 if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
12234 this.debug("dot detected!", file, fr, pattern, pr);
12235 break;
12236 }
12237 this.debug("globstar swallow a segment, and continue");
12238 fr++;
12239 }
12240 }
12241 if (partial) {
12242 this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
12243 if (fr === fl)
12244 return true;
12245 }
12246 return false;
12247 }
12248 var hit;
12249 if (typeof p === "string") {
12250 hit = f === p;
12251 this.debug("string match", p, f, hit);
12252 } else {
12253 hit = f.match(p);
12254 this.debug("pattern match", p, f, hit);
12255 }
12256 if (!hit)
12257 return false;
12258 }
12259 if (fi === fl && pi === pl) {
12260 return true;
12261 } else if (fi === fl) {
12262 return partial;
12263 } else if (pi === pl) {
12264 return fi === fl - 1 && file[fi] === "";
12265 }
12266 throw new Error("wtf?");
12267 };
12268 function globUnescape(s) {
12269 return s.replace(/\\(.)/g, "$1");
12270 }
12271 function regExpEscape(s) {
12272 return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
12273 }
12274 }
12275});
12276var require_inherits_browser = __commonJS2({
12277 "node_modules/inherits/inherits_browser.js"(exports2, module2) {
12278 if (typeof Object.create === "function") {
12279 module2.exports = function inherits(ctor, superCtor) {
12280 if (superCtor) {
12281 ctor.super_ = superCtor;
12282 ctor.prototype = Object.create(superCtor.prototype, {
12283 constructor: {
12284 value: ctor,
12285 enumerable: false,
12286 writable: true,
12287 configurable: true
12288 }
12289 });
12290 }
12291 };
12292 } else {
12293 module2.exports = function inherits(ctor, superCtor) {
12294 if (superCtor) {
12295 ctor.super_ = superCtor;
12296 var TempCtor = function() {
12297 };
12298 TempCtor.prototype = superCtor.prototype;
12299 ctor.prototype = new TempCtor();
12300 ctor.prototype.constructor = ctor;
12301 }
12302 };
12303 }
12304 }
12305});
12306var require_inherits = __commonJS2({
12307 "node_modules/inherits/inherits.js"(exports2, module2) {
12308 try {
12309 util = require("util");
12310 if (typeof util.inherits !== "function")
12311 throw "";
12312 module2.exports = util.inherits;
12313 } catch (e) {
12314 module2.exports = require_inherits_browser();
12315 }
12316 var util;
12317 }
12318});
12319var require_path_is_absolute = __commonJS2({
12320 "node_modules/path-is-absolute/index.js"(exports2, module2) {
12321 "use strict";
12322 function posix(path) {
12323 return path.charAt(0) === "/";
12324 }
12325 function win32(path) {
12326 var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
12327 var result = splitDeviceRe.exec(path);
12328 var device = result[1] || "";
12329 var isUnc = Boolean(device && device.charAt(1) !== ":");
12330 return Boolean(result[2] || isUnc);
12331 }
12332 module2.exports = process.platform === "win32" ? win32 : posix;
12333 module2.exports.posix = posix;
12334 module2.exports.win32 = win32;
12335 }
12336});
12337var require_common3 = __commonJS2({
12338 "node_modules/glob/common.js"(exports2) {
12339 exports2.setopts = setopts;
12340 exports2.ownProp = ownProp;
12341 exports2.makeAbs = makeAbs;
12342 exports2.finish = finish;
12343 exports2.mark = mark;
12344 exports2.isIgnored = isIgnored;
12345 exports2.childrenIgnored = childrenIgnored;
12346 function ownProp(obj, field) {
12347 return Object.prototype.hasOwnProperty.call(obj, field);
12348 }
12349 var fs = require("fs");
12350 var path = require("path");
12351 var minimatch = require_minimatch();
12352 var isAbsolute = require_path_is_absolute();
12353 var Minimatch = minimatch.Minimatch;
12354 function alphasort(a, b) {
12355 return a.localeCompare(b, "en");
12356 }
12357 function setupIgnores(self2, options) {
12358 self2.ignore = options.ignore || [];
12359 if (!Array.isArray(self2.ignore))
12360 self2.ignore = [self2.ignore];
12361 if (self2.ignore.length) {
12362 self2.ignore = self2.ignore.map(ignoreMap);
12363 }
12364 }
12365 function ignoreMap(pattern) {
12366 var gmatcher = null;
12367 if (pattern.slice(-3) === "/**") {
12368 var gpattern = pattern.replace(/(\/\*\*)+$/, "");
12369 gmatcher = new Minimatch(gpattern, {
12370 dot: true
12371 });
12372 }
12373 return {
12374 matcher: new Minimatch(pattern, {
12375 dot: true
12376 }),
12377 gmatcher
12378 };
12379 }
12380 function setopts(self2, pattern, options) {
12381 if (!options)
12382 options = {};
12383 if (options.matchBase && pattern.indexOf("/") === -1) {
12384 if (options.noglobstar) {
12385 throw new Error("base matching requires globstar");
12386 }
12387 pattern = "**/" + pattern;
12388 }
12389 self2.silent = !!options.silent;
12390 self2.pattern = pattern;
12391 self2.strict = options.strict !== false;
12392 self2.realpath = !!options.realpath;
12393 self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null);
12394 self2.follow = !!options.follow;
12395 self2.dot = !!options.dot;
12396 self2.mark = !!options.mark;
12397 self2.nodir = !!options.nodir;
12398 if (self2.nodir)
12399 self2.mark = true;
12400 self2.sync = !!options.sync;
12401 self2.nounique = !!options.nounique;
12402 self2.nonull = !!options.nonull;
12403 self2.nosort = !!options.nosort;
12404 self2.nocase = !!options.nocase;
12405 self2.stat = !!options.stat;
12406 self2.noprocess = !!options.noprocess;
12407 self2.absolute = !!options.absolute;
12408 self2.fs = options.fs || fs;
12409 self2.maxLength = options.maxLength || Infinity;
12410 self2.cache = options.cache || /* @__PURE__ */ Object.create(null);
12411 self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
12412 self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null);
12413 setupIgnores(self2, options);
12414 self2.changedCwd = false;
12415 var cwd = process.cwd();
12416 if (!ownProp(options, "cwd"))
12417 self2.cwd = cwd;
12418 else {
12419 self2.cwd = path.resolve(options.cwd);
12420 self2.changedCwd = self2.cwd !== cwd;
12421 }
12422 self2.root = options.root || path.resolve(self2.cwd, "/");
12423 self2.root = path.resolve(self2.root);
12424 if (process.platform === "win32")
12425 self2.root = self2.root.replace(/\\/g, "/");
12426 self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
12427 if (process.platform === "win32")
12428 self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/");
12429 self2.nomount = !!options.nomount;
12430 options.nonegate = true;
12431 options.nocomment = true;
12432 self2.minimatch = new Minimatch(pattern, options);
12433 self2.options = self2.minimatch.options;
12434 }
12435 function finish(self2) {
12436 var nou = self2.nounique;
12437 var all = nou ? [] : /* @__PURE__ */ Object.create(null);
12438 for (var i = 0, l = self2.matches.length; i < l; i++) {
12439 var matches = self2.matches[i];
12440 if (!matches || Object.keys(matches).length === 0) {
12441 if (self2.nonull) {
12442 var literal = self2.minimatch.globSet[i];
12443 if (nou)
12444 all.push(literal);
12445 else
12446 all[literal] = true;
12447 }
12448 } else {
12449 var m = Object.keys(matches);
12450 if (nou)
12451 all.push.apply(all, m);
12452 else
12453 m.forEach(function(m2) {
12454 all[m2] = true;
12455 });
12456 }
12457 }
12458 if (!nou)
12459 all = Object.keys(all);
12460 if (!self2.nosort)
12461 all = all.sort(alphasort);
12462 if (self2.mark) {
12463 for (var i = 0; i < all.length; i++) {
12464 all[i] = self2._mark(all[i]);
12465 }
12466 if (self2.nodir) {
12467 all = all.filter(function(e) {
12468 var notDir = !/\/$/.test(e);
12469 var c = self2.cache[e] || self2.cache[makeAbs(self2, e)];
12470 if (notDir && c)
12471 notDir = c !== "DIR" && !Array.isArray(c);
12472 return notDir;
12473 });
12474 }
12475 }
12476 if (self2.ignore.length)
12477 all = all.filter(function(m2) {
12478 return !isIgnored(self2, m2);
12479 });
12480 self2.found = all;
12481 }
12482 function mark(self2, p) {
12483 var abs = makeAbs(self2, p);
12484 var c = self2.cache[abs];
12485 var m = p;
12486 if (c) {
12487 var isDir = c === "DIR" || Array.isArray(c);
12488 var slash = p.slice(-1) === "/";
12489 if (isDir && !slash)
12490 m += "/";
12491 else if (!isDir && slash)
12492 m = m.slice(0, -1);
12493 if (m !== p) {
12494 var mabs = makeAbs(self2, m);
12495 self2.statCache[mabs] = self2.statCache[abs];
12496 self2.cache[mabs] = self2.cache[abs];
12497 }
12498 }
12499 return m;
12500 }
12501 function makeAbs(self2, f) {
12502 var abs = f;
12503 if (f.charAt(0) === "/") {
12504 abs = path.join(self2.root, f);
12505 } else if (isAbsolute(f) || f === "") {
12506 abs = f;
12507 } else if (self2.changedCwd) {
12508 abs = path.resolve(self2.cwd, f);
12509 } else {
12510 abs = path.resolve(f);
12511 }
12512 if (process.platform === "win32")
12513 abs = abs.replace(/\\/g, "/");
12514 return abs;
12515 }
12516 function isIgnored(self2, path2) {
12517 if (!self2.ignore.length)
12518 return false;
12519 return self2.ignore.some(function(item) {
12520 return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2));
12521 });
12522 }
12523 function childrenIgnored(self2, path2) {
12524 if (!self2.ignore.length)
12525 return false;
12526 return self2.ignore.some(function(item) {
12527 return !!(item.gmatcher && item.gmatcher.match(path2));
12528 });
12529 }
12530 }
12531});
12532var require_sync7 = __commonJS2({
12533 "node_modules/glob/sync.js"(exports2, module2) {
12534 module2.exports = globSync;
12535 globSync.GlobSync = GlobSync;
12536 var rp = require_fs5();
12537 var minimatch = require_minimatch();
12538 var Minimatch = minimatch.Minimatch;
12539 var Glob = require_glob().Glob;
12540 var util = require("util");
12541 var path = require("path");
12542 var assert = require("assert");
12543 var isAbsolute = require_path_is_absolute();
12544 var common = require_common3();
12545 var setopts = common.setopts;
12546 var ownProp = common.ownProp;
12547 var childrenIgnored = common.childrenIgnored;
12548 var isIgnored = common.isIgnored;
12549 function globSync(pattern, options) {
12550 if (typeof options === "function" || arguments.length === 3)
12551 throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
12552 return new GlobSync(pattern, options).found;
12553 }
12554 function GlobSync(pattern, options) {
12555 if (!pattern)
12556 throw new Error("must provide pattern");
12557 if (typeof options === "function" || arguments.length === 3)
12558 throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
12559 if (!(this instanceof GlobSync))
12560 return new GlobSync(pattern, options);
12561 setopts(this, pattern, options);
12562 if (this.noprocess)
12563 return this;
12564 var n = this.minimatch.set.length;
12565 this.matches = new Array(n);
12566 for (var i = 0; i < n; i++) {
12567 this._process(this.minimatch.set[i], i, false);
12568 }
12569 this._finish();
12570 }
12571 GlobSync.prototype._finish = function() {
12572 assert(this instanceof GlobSync);
12573 if (this.realpath) {
12574 var self2 = this;
12575 this.matches.forEach(function(matchset, index) {
12576 var set = self2.matches[index] = /* @__PURE__ */ Object.create(null);
12577 for (var p in matchset) {
12578 try {
12579 p = self2._makeAbs(p);
12580 var real = rp.realpathSync(p, self2.realpathCache);
12581 set[real] = true;
12582 } catch (er) {
12583 if (er.syscall === "stat")
12584 set[self2._makeAbs(p)] = true;
12585 else
12586 throw er;
12587 }
12588 }
12589 });
12590 }
12591 common.finish(this);
12592 };
12593 GlobSync.prototype._process = function(pattern, index, inGlobStar) {
12594 assert(this instanceof GlobSync);
12595 var n = 0;
12596 while (typeof pattern[n] === "string") {
12597 n++;
12598 }
12599 var prefix;
12600 switch (n) {
12601 case pattern.length:
12602 this._processSimple(pattern.join("/"), index);
12603 return;
12604 case 0:
12605 prefix = null;
12606 break;
12607 default:
12608 prefix = pattern.slice(0, n).join("/");
12609 break;
12610 }
12611 var remain = pattern.slice(n);
12612 var read;
12613 if (prefix === null)
12614 read = ".";
12615 else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
12616 if (!prefix || !isAbsolute(prefix))
12617 prefix = "/" + prefix;
12618 read = prefix;
12619 } else
12620 read = prefix;
12621 var abs = this._makeAbs(read);
12622 if (childrenIgnored(this, read))
12623 return;
12624 var isGlobStar = remain[0] === minimatch.GLOBSTAR;
12625 if (isGlobStar)
12626 this._processGlobStar(prefix, read, abs, remain, index, inGlobStar);
12627 else
12628 this._processReaddir(prefix, read, abs, remain, index, inGlobStar);
12629 };
12630 GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) {
12631 var entries = this._readdir(abs, inGlobStar);
12632 if (!entries)
12633 return;
12634 var pn = remain[0];
12635 var negate = !!this.minimatch.negate;
12636 var rawGlob = pn._glob;
12637 var dotOk = this.dot || rawGlob.charAt(0) === ".";
12638 var matchedEntries = [];
12639 for (var i = 0; i < entries.length; i++) {
12640 var e = entries[i];
12641 if (e.charAt(0) !== "." || dotOk) {
12642 var m;
12643 if (negate && !prefix) {
12644 m = !e.match(pn);
12645 } else {
12646 m = e.match(pn);
12647 }
12648 if (m)
12649 matchedEntries.push(e);
12650 }
12651 }
12652 var len = matchedEntries.length;
12653 if (len === 0)
12654 return;
12655 if (remain.length === 1 && !this.mark && !this.stat) {
12656 if (!this.matches[index])
12657 this.matches[index] = /* @__PURE__ */ Object.create(null);
12658 for (var i = 0; i < len; i++) {
12659 var e = matchedEntries[i];
12660 if (prefix) {
12661 if (prefix.slice(-1) !== "/")
12662 e = prefix + "/" + e;
12663 else
12664 e = prefix + e;
12665 }
12666 if (e.charAt(0) === "/" && !this.nomount) {
12667 e = path.join(this.root, e);
12668 }
12669 this._emitMatch(index, e);
12670 }
12671 return;
12672 }
12673 remain.shift();
12674 for (var i = 0; i < len; i++) {
12675 var e = matchedEntries[i];
12676 var newPattern;
12677 if (prefix)
12678 newPattern = [prefix, e];
12679 else
12680 newPattern = [e];
12681 this._process(newPattern.concat(remain), index, inGlobStar);
12682 }
12683 };
12684 GlobSync.prototype._emitMatch = function(index, e) {
12685 if (isIgnored(this, e))
12686 return;
12687 var abs = this._makeAbs(e);
12688 if (this.mark)
12689 e = this._mark(e);
12690 if (this.absolute) {
12691 e = abs;
12692 }
12693 if (this.matches[index][e])
12694 return;
12695 if (this.nodir) {
12696 var c = this.cache[abs];
12697 if (c === "DIR" || Array.isArray(c))
12698 return;
12699 }
12700 this.matches[index][e] = true;
12701 if (this.stat)
12702 this._stat(e);
12703 };
12704 GlobSync.prototype._readdirInGlobStar = function(abs) {
12705 if (this.follow)
12706 return this._readdir(abs, false);
12707 var entries;
12708 var lstat;
12709 var stat;
12710 try {
12711 lstat = this.fs.lstatSync(abs);
12712 } catch (er) {
12713 if (er.code === "ENOENT") {
12714 return null;
12715 }
12716 }
12717 var isSym = lstat && lstat.isSymbolicLink();
12718 this.symlinks[abs] = isSym;
12719 if (!isSym && lstat && !lstat.isDirectory())
12720 this.cache[abs] = "FILE";
12721 else
12722 entries = this._readdir(abs, false);
12723 return entries;
12724 };
12725 GlobSync.prototype._readdir = function(abs, inGlobStar) {
12726 var entries;
12727 if (inGlobStar && !ownProp(this.symlinks, abs))
12728 return this._readdirInGlobStar(abs);
12729 if (ownProp(this.cache, abs)) {
12730 var c = this.cache[abs];
12731 if (!c || c === "FILE")
12732 return null;
12733 if (Array.isArray(c))
12734 return c;
12735 }
12736 try {
12737 return this._readdirEntries(abs, this.fs.readdirSync(abs));
12738 } catch (er) {
12739 this._readdirError(abs, er);
12740 return null;
12741 }
12742 };
12743 GlobSync.prototype._readdirEntries = function(abs, entries) {
12744 if (!this.mark && !this.stat) {
12745 for (var i = 0; i < entries.length; i++) {
12746 var e = entries[i];
12747 if (abs === "/")
12748 e = abs + e;
12749 else
12750 e = abs + "/" + e;
12751 this.cache[e] = true;
12752 }
12753 }
12754 this.cache[abs] = entries;
12755 return entries;
12756 };
12757 GlobSync.prototype._readdirError = function(f, er) {
12758 switch (er.code) {
12759 case "ENOTSUP":
12760 case "ENOTDIR":
12761 var abs = this._makeAbs(f);
12762 this.cache[abs] = "FILE";
12763 if (abs === this.cwdAbs) {
12764 var error = new Error(er.code + " invalid cwd " + this.cwd);
12765 error.path = this.cwd;
12766 error.code = er.code;
12767 throw error;
12768 }
12769 break;
12770 case "ENOENT":
12771 case "ELOOP":
12772 case "ENAMETOOLONG":
12773 case "UNKNOWN":
12774 this.cache[this._makeAbs(f)] = false;
12775 break;
12776 default:
12777 this.cache[this._makeAbs(f)] = false;
12778 if (this.strict)
12779 throw er;
12780 if (!this.silent)
12781 console.error("glob error", er);
12782 break;
12783 }
12784 };
12785 GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) {
12786 var entries = this._readdir(abs, inGlobStar);
12787 if (!entries)
12788 return;
12789 var remainWithoutGlobStar = remain.slice(1);
12790 var gspref = prefix ? [prefix] : [];
12791 var noGlobStar = gspref.concat(remainWithoutGlobStar);
12792 this._process(noGlobStar, index, false);
12793 var len = entries.length;
12794 var isSym = this.symlinks[abs];
12795 if (isSym && inGlobStar)
12796 return;
12797 for (var i = 0; i < len; i++) {
12798 var e = entries[i];
12799 if (e.charAt(0) === "." && !this.dot)
12800 continue;
12801 var instead = gspref.concat(entries[i], remainWithoutGlobStar);
12802 this._process(instead, index, true);
12803 var below = gspref.concat(entries[i], remain);
12804 this._process(below, index, true);
12805 }
12806 };
12807 GlobSync.prototype._processSimple = function(prefix, index) {
12808 var exists = this._stat(prefix);
12809 if (!this.matches[index])
12810 this.matches[index] = /* @__PURE__ */ Object.create(null);
12811 if (!exists)
12812 return;
12813 if (prefix && isAbsolute(prefix) && !this.nomount) {
12814 var trail = /[\/\\]$/.test(prefix);
12815 if (prefix.charAt(0) === "/") {
12816 prefix = path.join(this.root, prefix);
12817 } else {
12818 prefix = path.resolve(this.root, prefix);
12819 if (trail)
12820 prefix += "/";
12821 }
12822 }
12823 if (process.platform === "win32")
12824 prefix = prefix.replace(/\\/g, "/");
12825 this._emitMatch(index, prefix);
12826 };
12827 GlobSync.prototype._stat = function(f) {
12828 var abs = this._makeAbs(f);
12829 var needDir = f.slice(-1) === "/";
12830 if (f.length > this.maxLength)
12831 return false;
12832 if (!this.stat && ownProp(this.cache, abs)) {
12833 var c = this.cache[abs];
12834 if (Array.isArray(c))
12835 c = "DIR";
12836 if (!needDir || c === "DIR")
12837 return c;
12838 if (needDir && c === "FILE")
12839 return false;
12840 }
12841 var exists;
12842 var stat = this.statCache[abs];
12843 if (!stat) {
12844 var lstat;
12845 try {
12846 lstat = this.fs.lstatSync(abs);
12847 } catch (er) {
12848 if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
12849 this.statCache[abs] = false;
12850 return false;
12851 }
12852 }
12853 if (lstat && lstat.isSymbolicLink()) {
12854 try {
12855 stat = this.fs.statSync(abs);
12856 } catch (er) {
12857 stat = lstat;
12858 }
12859 } else {
12860 stat = lstat;
12861 }
12862 }
12863 this.statCache[abs] = stat;
12864 var c = true;
12865 if (stat)
12866 c = stat.isDirectory() ? "DIR" : "FILE";
12867 this.cache[abs] = this.cache[abs] || c;
12868 if (needDir && c === "FILE")
12869 return false;
12870 return c;
12871 };
12872 GlobSync.prototype._mark = function(p) {
12873 return common.mark(this, p);
12874 };
12875 GlobSync.prototype._makeAbs = function(f) {
12876 return common.makeAbs(this, f);
12877 };
12878 }
12879});
12880var require_wrappy = __commonJS2({
12881 "node_modules/wrappy/wrappy.js"(exports2, module2) {
12882 module2.exports = wrappy;
12883 function wrappy(fn, cb) {
12884 if (fn && cb)
12885 return wrappy(fn)(cb);
12886 if (typeof fn !== "function")
12887 throw new TypeError("need wrapper function");
12888 Object.keys(fn).forEach(function(k) {
12889 wrapper[k] = fn[k];
12890 });
12891 return wrapper;
12892 function wrapper() {
12893 var args = new Array(arguments.length);
12894 for (var i = 0; i < args.length; i++) {
12895 args[i] = arguments[i];
12896 }
12897 var ret = fn.apply(this, args);
12898 var cb2 = args[args.length - 1];
12899 if (typeof ret === "function" && ret !== cb2) {
12900 Object.keys(cb2).forEach(function(k) {
12901 ret[k] = cb2[k];
12902 });
12903 }
12904 return ret;
12905 }
12906 }
12907 }
12908});
12909var require_once = __commonJS2({
12910 "node_modules/once/once.js"(exports2, module2) {
12911 var wrappy = require_wrappy();
12912 module2.exports = wrappy(once);
12913 module2.exports.strict = wrappy(onceStrict);
12914 once.proto = once(function() {
12915 Object.defineProperty(Function.prototype, "once", {
12916 value: function() {
12917 return once(this);
12918 },
12919 configurable: true
12920 });
12921 Object.defineProperty(Function.prototype, "onceStrict", {
12922 value: function() {
12923 return onceStrict(this);
12924 },
12925 configurable: true
12926 });
12927 });
12928 function once(fn) {
12929 var f = function() {
12930 if (f.called)
12931 return f.value;
12932 f.called = true;
12933 return f.value = fn.apply(this, arguments);
12934 };
12935 f.called = false;
12936 return f;
12937 }
12938 function onceStrict(fn) {
12939 var f = function() {
12940 if (f.called)
12941 throw new Error(f.onceError);
12942 f.called = true;
12943 return f.value = fn.apply(this, arguments);
12944 };
12945 var name = fn.name || "Function wrapped with `once`";
12946 f.onceError = name + " shouldn't be called more than once";
12947 f.called = false;
12948 return f;
12949 }
12950 }
12951});
12952var require_inflight = __commonJS2({
12953 "node_modules/inflight/inflight.js"(exports2, module2) {
12954 var wrappy = require_wrappy();
12955 var reqs = /* @__PURE__ */ Object.create(null);
12956 var once = require_once();
12957 module2.exports = wrappy(inflight);
12958 function inflight(key, cb) {
12959 if (reqs[key]) {
12960 reqs[key].push(cb);
12961 return null;
12962 } else {
12963 reqs[key] = [cb];
12964 return makeres(key);
12965 }
12966 }
12967 function makeres(key) {
12968 return once(function RES() {
12969 var cbs = reqs[key];
12970 var len = cbs.length;
12971 var args = slice(arguments);
12972 try {
12973 for (var i = 0; i < len; i++) {
12974 cbs[i].apply(null, args);
12975 }
12976 } finally {
12977 if (cbs.length > len) {
12978 cbs.splice(0, len);
12979 process.nextTick(function() {
12980 RES.apply(null, args);
12981 });
12982 } else {
12983 delete reqs[key];
12984 }
12985 }
12986 });
12987 }
12988 function slice(args) {
12989 var length = args.length;
12990 var array2 = [];
12991 for (var i = 0; i < length; i++)
12992 array2[i] = args[i];
12993 return array2;
12994 }
12995 }
12996});
12997var require_glob = __commonJS2({
12998 "node_modules/glob/glob.js"(exports2, module2) {
12999 module2.exports = glob;
13000 var rp = require_fs5();
13001 var minimatch = require_minimatch();
13002 var Minimatch = minimatch.Minimatch;
13003 var inherits = require_inherits();
13004 var EE = require("events").EventEmitter;
13005 var path = require("path");
13006 var assert = require("assert");
13007 var isAbsolute = require_path_is_absolute();
13008 var globSync = require_sync7();
13009 var common = require_common3();
13010 var setopts = common.setopts;
13011 var ownProp = common.ownProp;
13012 var inflight = require_inflight();
13013 var util = require("util");
13014 var childrenIgnored = common.childrenIgnored;
13015 var isIgnored = common.isIgnored;
13016 var once = require_once();
13017 function glob(pattern, options, cb) {
13018 if (typeof options === "function")
13019 cb = options, options = {};
13020 if (!options)
13021 options = {};
13022 if (options.sync) {
13023 if (cb)
13024 throw new TypeError("callback provided to sync glob");
13025 return globSync(pattern, options);
13026 }
13027 return new Glob(pattern, options, cb);
13028 }
13029 glob.sync = globSync;
13030 var GlobSync = glob.GlobSync = globSync.GlobSync;
13031 glob.glob = glob;
13032 function extend(origin, add) {
13033 if (add === null || typeof add !== "object") {
13034 return origin;
13035 }
13036 var keys = Object.keys(add);
13037 var i = keys.length;
13038 while (i--) {
13039 origin[keys[i]] = add[keys[i]];
13040 }
13041 return origin;
13042 }
13043 glob.hasMagic = function(pattern, options_) {
13044 var options = extend({}, options_);
13045 options.noprocess = true;
13046 var g = new Glob(pattern, options);
13047 var set = g.minimatch.set;
13048 if (!pattern)
13049 return false;
13050 if (set.length > 1)
13051 return true;
13052 for (var j = 0; j < set[0].length; j++) {
13053 if (typeof set[0][j] !== "string")
13054 return true;
13055 }
13056 return false;
13057 };
13058 glob.Glob = Glob;
13059 inherits(Glob, EE);
13060 function Glob(pattern, options, cb) {
13061 if (typeof options === "function") {
13062 cb = options;
13063 options = null;
13064 }
13065 if (options && options.sync) {
13066 if (cb)
13067 throw new TypeError("callback provided to sync glob");
13068 return new GlobSync(pattern, options);
13069 }
13070 if (!(this instanceof Glob))
13071 return new Glob(pattern, options, cb);
13072 setopts(this, pattern, options);
13073 this._didRealPath = false;
13074 var n = this.minimatch.set.length;
13075 this.matches = new Array(n);
13076 if (typeof cb === "function") {
13077 cb = once(cb);
13078 this.on("error", cb);
13079 this.on("end", function(matches) {
13080 cb(null, matches);
13081 });
13082 }
13083 var self2 = this;
13084 this._processing = 0;
13085 this._emitQueue = [];
13086 this._processQueue = [];
13087 this.paused = false;
13088 if (this.noprocess)
13089 return this;
13090 if (n === 0)
13091 return done();
13092 var sync = true;
13093 for (var i = 0; i < n; i++) {
13094 this._process(this.minimatch.set[i], i, false, done);
13095 }
13096 sync = false;
13097 function done() {
13098 --self2._processing;
13099 if (self2._processing <= 0) {
13100 if (sync) {
13101 process.nextTick(function() {
13102 self2._finish();
13103 });
13104 } else {
13105 self2._finish();
13106 }
13107 }
13108 }
13109 }
13110 Glob.prototype._finish = function() {
13111 assert(this instanceof Glob);
13112 if (this.aborted)
13113 return;
13114 if (this.realpath && !this._didRealpath)
13115 return this._realpath();
13116 common.finish(this);
13117 this.emit("end", this.found);
13118 };
13119 Glob.prototype._realpath = function() {
13120 if (this._didRealpath)
13121 return;
13122 this._didRealpath = true;
13123 var n = this.matches.length;
13124 if (n === 0)
13125 return this._finish();
13126 var self2 = this;
13127 for (var i = 0; i < this.matches.length; i++)
13128 this._realpathSet(i, next);
13129 function next() {
13130 if (--n === 0)
13131 self2._finish();
13132 }
13133 };
13134 Glob.prototype._realpathSet = function(index, cb) {
13135 var matchset = this.matches[index];
13136 if (!matchset)
13137 return cb();
13138 var found = Object.keys(matchset);
13139 var self2 = this;
13140 var n = found.length;
13141 if (n === 0)
13142 return cb();
13143 var set = this.matches[index] = /* @__PURE__ */ Object.create(null);
13144 found.forEach(function(p, i) {
13145 p = self2._makeAbs(p);
13146 rp.realpath(p, self2.realpathCache, function(er, real) {
13147 if (!er)
13148 set[real] = true;
13149 else if (er.syscall === "stat")
13150 set[p] = true;
13151 else
13152 self2.emit("error", er);
13153 if (--n === 0) {
13154 self2.matches[index] = set;
13155 cb();
13156 }
13157 });
13158 });
13159 };
13160 Glob.prototype._mark = function(p) {
13161 return common.mark(this, p);
13162 };
13163 Glob.prototype._makeAbs = function(f) {
13164 return common.makeAbs(this, f);
13165 };
13166 Glob.prototype.abort = function() {
13167 this.aborted = true;
13168 this.emit("abort");
13169 };
13170 Glob.prototype.pause = function() {
13171 if (!this.paused) {
13172 this.paused = true;
13173 this.emit("pause");
13174 }
13175 };
13176 Glob.prototype.resume = function() {
13177 if (this.paused) {
13178 this.emit("resume");
13179 this.paused = false;
13180 if (this._emitQueue.length) {
13181 var eq = this._emitQueue.slice(0);
13182 this._emitQueue.length = 0;
13183 for (var i = 0; i < eq.length; i++) {
13184 var e = eq[i];
13185 this._emitMatch(e[0], e[1]);
13186 }
13187 }
13188 if (this._processQueue.length) {
13189 var pq = this._processQueue.slice(0);
13190 this._processQueue.length = 0;
13191 for (var i = 0; i < pq.length; i++) {
13192 var p = pq[i];
13193 this._processing--;
13194 this._process(p[0], p[1], p[2], p[3]);
13195 }
13196 }
13197 }
13198 };
13199 Glob.prototype._process = function(pattern, index, inGlobStar, cb) {
13200 assert(this instanceof Glob);
13201 assert(typeof cb === "function");
13202 if (this.aborted)
13203 return;
13204 this._processing++;
13205 if (this.paused) {
13206 this._processQueue.push([pattern, index, inGlobStar, cb]);
13207 return;
13208 }
13209 var n = 0;
13210 while (typeof pattern[n] === "string") {
13211 n++;
13212 }
13213 var prefix;
13214 switch (n) {
13215 case pattern.length:
13216 this._processSimple(pattern.join("/"), index, cb);
13217 return;
13218 case 0:
13219 prefix = null;
13220 break;
13221 default:
13222 prefix = pattern.slice(0, n).join("/");
13223 break;
13224 }
13225 var remain = pattern.slice(n);
13226 var read;
13227 if (prefix === null)
13228 read = ".";
13229 else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
13230 if (!prefix || !isAbsolute(prefix))
13231 prefix = "/" + prefix;
13232 read = prefix;
13233 } else
13234 read = prefix;
13235 var abs = this._makeAbs(read);
13236 if (childrenIgnored(this, read))
13237 return cb();
13238 var isGlobStar = remain[0] === minimatch.GLOBSTAR;
13239 if (isGlobStar)
13240 this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb);
13241 else
13242 this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb);
13243 };
13244 Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) {
13245 var self2 = this;
13246 this._readdir(abs, inGlobStar, function(er, entries) {
13247 return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
13248 });
13249 };
13250 Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) {
13251 if (!entries)
13252 return cb();
13253 var pn = remain[0];
13254 var negate = !!this.minimatch.negate;
13255 var rawGlob = pn._glob;
13256 var dotOk = this.dot || rawGlob.charAt(0) === ".";
13257 var matchedEntries = [];
13258 for (var i = 0; i < entries.length; i++) {
13259 var e = entries[i];
13260 if (e.charAt(0) !== "." || dotOk) {
13261 var m;
13262 if (negate && !prefix) {
13263 m = !e.match(pn);
13264 } else {
13265 m = e.match(pn);
13266 }
13267 if (m)
13268 matchedEntries.push(e);
13269 }
13270 }
13271 var len = matchedEntries.length;
13272 if (len === 0)
13273 return cb();
13274 if (remain.length === 1 && !this.mark && !this.stat) {
13275 if (!this.matches[index])
13276 this.matches[index] = /* @__PURE__ */ Object.create(null);
13277 for (var i = 0; i < len; i++) {
13278 var e = matchedEntries[i];
13279 if (prefix) {
13280 if (prefix !== "/")
13281 e = prefix + "/" + e;
13282 else
13283 e = prefix + e;
13284 }
13285 if (e.charAt(0) === "/" && !this.nomount) {
13286 e = path.join(this.root, e);
13287 }
13288 this._emitMatch(index, e);
13289 }
13290 return cb();
13291 }
13292 remain.shift();
13293 for (var i = 0; i < len; i++) {
13294 var e = matchedEntries[i];
13295 var newPattern;
13296 if (prefix) {
13297 if (prefix !== "/")
13298 e = prefix + "/" + e;
13299 else
13300 e = prefix + e;
13301 }
13302 this._process([e].concat(remain), index, inGlobStar, cb);
13303 }
13304 cb();
13305 };
13306 Glob.prototype._emitMatch = function(index, e) {
13307 if (this.aborted)
13308 return;
13309 if (isIgnored(this, e))
13310 return;
13311 if (this.paused) {
13312 this._emitQueue.push([index, e]);
13313 return;
13314 }
13315 var abs = isAbsolute(e) ? e : this._makeAbs(e);
13316 if (this.mark)
13317 e = this._mark(e);
13318 if (this.absolute)
13319 e = abs;
13320 if (this.matches[index][e])
13321 return;
13322 if (this.nodir) {
13323 var c = this.cache[abs];
13324 if (c === "DIR" || Array.isArray(c))
13325 return;
13326 }
13327 this.matches[index][e] = true;
13328 var st = this.statCache[abs];
13329 if (st)
13330 this.emit("stat", e, st);
13331 this.emit("match", e);
13332 };
13333 Glob.prototype._readdirInGlobStar = function(abs, cb) {
13334 if (this.aborted)
13335 return;
13336 if (this.follow)
13337 return this._readdir(abs, false, cb);
13338 var lstatkey = "lstat\0" + abs;
13339 var self2 = this;
13340 var lstatcb = inflight(lstatkey, lstatcb_);
13341 if (lstatcb)
13342 self2.fs.lstat(abs, lstatcb);
13343 function lstatcb_(er, lstat) {
13344 if (er && er.code === "ENOENT")
13345 return cb();
13346 var isSym = lstat && lstat.isSymbolicLink();
13347 self2.symlinks[abs] = isSym;
13348 if (!isSym && lstat && !lstat.isDirectory()) {
13349 self2.cache[abs] = "FILE";
13350 cb();
13351 } else
13352 self2._readdir(abs, false, cb);
13353 }
13354 };
13355 Glob.prototype._readdir = function(abs, inGlobStar, cb) {
13356 if (this.aborted)
13357 return;
13358 cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb);
13359 if (!cb)
13360 return;
13361 if (inGlobStar && !ownProp(this.symlinks, abs))
13362 return this._readdirInGlobStar(abs, cb);
13363 if (ownProp(this.cache, abs)) {
13364 var c = this.cache[abs];
13365 if (!c || c === "FILE")
13366 return cb();
13367 if (Array.isArray(c))
13368 return cb(null, c);
13369 }
13370 var self2 = this;
13371 self2.fs.readdir(abs, readdirCb(this, abs, cb));
13372 };
13373 function readdirCb(self2, abs, cb) {
13374 return function(er, entries) {
13375 if (er)
13376 self2._readdirError(abs, er, cb);
13377 else
13378 self2._readdirEntries(abs, entries, cb);
13379 };
13380 }
13381 Glob.prototype._readdirEntries = function(abs, entries, cb) {
13382 if (this.aborted)
13383 return;
13384 if (!this.mark && !this.stat) {
13385 for (var i = 0; i < entries.length; i++) {
13386 var e = entries[i];
13387 if (abs === "/")
13388 e = abs + e;
13389 else
13390 e = abs + "/" + e;
13391 this.cache[e] = true;
13392 }
13393 }
13394 this.cache[abs] = entries;
13395 return cb(null, entries);
13396 };
13397 Glob.prototype._readdirError = function(f, er, cb) {
13398 if (this.aborted)
13399 return;
13400 switch (er.code) {
13401 case "ENOTSUP":
13402 case "ENOTDIR":
13403 var abs = this._makeAbs(f);
13404 this.cache[abs] = "FILE";
13405 if (abs === this.cwdAbs) {
13406 var error = new Error(er.code + " invalid cwd " + this.cwd);
13407 error.path = this.cwd;
13408 error.code = er.code;
13409 this.emit("error", error);
13410 this.abort();
13411 }
13412 break;
13413 case "ENOENT":
13414 case "ELOOP":
13415 case "ENAMETOOLONG":
13416 case "UNKNOWN":
13417 this.cache[this._makeAbs(f)] = false;
13418 break;
13419 default:
13420 this.cache[this._makeAbs(f)] = false;
13421 if (this.strict) {
13422 this.emit("error", er);
13423 this.abort();
13424 }
13425 if (!this.silent)
13426 console.error("glob error", er);
13427 break;
13428 }
13429 return cb();
13430 };
13431 Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) {
13432 var self2 = this;
13433 this._readdir(abs, inGlobStar, function(er, entries) {
13434 self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
13435 });
13436 };
13437 Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) {
13438 if (!entries)
13439 return cb();
13440 var remainWithoutGlobStar = remain.slice(1);
13441 var gspref = prefix ? [prefix] : [];
13442 var noGlobStar = gspref.concat(remainWithoutGlobStar);
13443 this._process(noGlobStar, index, false, cb);
13444 var isSym = this.symlinks[abs];
13445 var len = entries.length;
13446 if (isSym && inGlobStar)
13447 return cb();
13448 for (var i = 0; i < len; i++) {
13449 var e = entries[i];
13450 if (e.charAt(0) === "." && !this.dot)
13451 continue;
13452 var instead = gspref.concat(entries[i], remainWithoutGlobStar);
13453 this._process(instead, index, true, cb);
13454 var below = gspref.concat(entries[i], remain);
13455 this._process(below, index, true, cb);
13456 }
13457 cb();
13458 };
13459 Glob.prototype._processSimple = function(prefix, index, cb) {
13460 var self2 = this;
13461 this._stat(prefix, function(er, exists) {
13462 self2._processSimple2(prefix, index, er, exists, cb);
13463 });
13464 };
13465 Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) {
13466 if (!this.matches[index])
13467 this.matches[index] = /* @__PURE__ */ Object.create(null);
13468 if (!exists)
13469 return cb();
13470 if (prefix && isAbsolute(prefix) && !this.nomount) {
13471 var trail = /[\/\\]$/.test(prefix);
13472 if (prefix.charAt(0) === "/") {
13473 prefix = path.join(this.root, prefix);
13474 } else {
13475 prefix = path.resolve(this.root, prefix);
13476 if (trail)
13477 prefix += "/";
13478 }
13479 }
13480 if (process.platform === "win32")
13481 prefix = prefix.replace(/\\/g, "/");
13482 this._emitMatch(index, prefix);
13483 cb();
13484 };
13485 Glob.prototype._stat = function(f, cb) {
13486 var abs = this._makeAbs(f);
13487 var needDir = f.slice(-1) === "/";
13488 if (f.length > this.maxLength)
13489 return cb();
13490 if (!this.stat && ownProp(this.cache, abs)) {
13491 var c = this.cache[abs];
13492 if (Array.isArray(c))
13493 c = "DIR";
13494 if (!needDir || c === "DIR")
13495 return cb(null, c);
13496 if (needDir && c === "FILE")
13497 return cb();
13498 }
13499 var exists;
13500 var stat = this.statCache[abs];
13501 if (stat !== void 0) {
13502 if (stat === false)
13503 return cb(null, stat);
13504 else {
13505 var type = stat.isDirectory() ? "DIR" : "FILE";
13506 if (needDir && type === "FILE")
13507 return cb();
13508 else
13509 return cb(null, type, stat);
13510 }
13511 }
13512 var self2 = this;
13513 var statcb = inflight("stat\0" + abs, lstatcb_);
13514 if (statcb)
13515 self2.fs.lstat(abs, statcb);
13516 function lstatcb_(er, lstat) {
13517 if (lstat && lstat.isSymbolicLink()) {
13518 return self2.fs.stat(abs, function(er2, stat2) {
13519 if (er2)
13520 self2._stat2(f, abs, null, lstat, cb);
13521 else
13522 self2._stat2(f, abs, er2, stat2, cb);
13523 });
13524 } else {
13525 self2._stat2(f, abs, er, lstat, cb);
13526 }
13527 }
13528 };
13529 Glob.prototype._stat2 = function(f, abs, er, stat, cb) {
13530 if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
13531 this.statCache[abs] = false;
13532 return cb();
13533 }
13534 var needDir = f.slice(-1) === "/";
13535 this.statCache[abs] = stat;
13536 if (abs.slice(-1) === "/" && stat && !stat.isDirectory())
13537 return cb(null, false, stat);
13538 var c = true;
13539 if (stat)
13540 c = stat.isDirectory() ? "DIR" : "FILE";
13541 this.cache[abs] = this.cache[abs] || c;
13542 if (needDir && c === "FILE")
13543 return cb();
13544 return cb(null, c, stat);
13545 };
13546 }
13547});
13548var require_rimraf = __commonJS2({
13549 "node_modules/rimraf/rimraf.js"(exports2, module2) {
13550 var assert = require("assert");
13551 var path = require("path");
13552 var fs = require("fs");
13553 var glob = void 0;
13554 try {
13555 glob = require_glob();
13556 } catch (_err) {
13557 }
13558 var defaultGlobOpts = {
13559 nosort: true,
13560 silent: true
13561 };
13562 var timeout = 0;
13563 var isWindows = process.platform === "win32";
13564 var defaults = (options) => {
13565 const methods = ["unlink", "chmod", "stat", "lstat", "rmdir", "readdir"];
13566 methods.forEach((m) => {
13567 options[m] = options[m] || fs[m];
13568 m = m + "Sync";
13569 options[m] = options[m] || fs[m];
13570 });
13571 options.maxBusyTries = options.maxBusyTries || 3;
13572 options.emfileWait = options.emfileWait || 1e3;
13573 if (options.glob === false) {
13574 options.disableGlob = true;
13575 }
13576 if (options.disableGlob !== true && glob === void 0) {
13577 throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");
13578 }
13579 options.disableGlob = options.disableGlob || false;
13580 options.glob = options.glob || defaultGlobOpts;
13581 };
13582 var rimraf = (p, options, cb) => {
13583 if (typeof options === "function") {
13584 cb = options;
13585 options = {};
13586 }
13587 assert(p, "rimraf: missing path");
13588 assert.equal(typeof p, "string", "rimraf: path should be a string");
13589 assert.equal(typeof cb, "function", "rimraf: callback function required");
13590 assert(options, "rimraf: invalid options argument provided");
13591 assert.equal(typeof options, "object", "rimraf: options should be object");
13592 defaults(options);
13593 let busyTries = 0;
13594 let errState = null;
13595 let n = 0;
13596 const next = (er) => {
13597 errState = errState || er;
13598 if (--n === 0)
13599 cb(errState);
13600 };
13601 const afterGlob = (er, results) => {
13602 if (er)
13603 return cb(er);
13604 n = results.length;
13605 if (n === 0)
13606 return cb();
13607 results.forEach((p2) => {
13608 const CB = (er2) => {
13609 if (er2) {
13610 if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) {
13611 busyTries++;
13612 return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100);
13613 }
13614 if (er2.code === "EMFILE" && timeout < options.emfileWait) {
13615 return setTimeout(() => rimraf_(p2, options, CB), timeout++);
13616 }
13617 if (er2.code === "ENOENT")
13618 er2 = null;
13619 }
13620 timeout = 0;
13621 next(er2);
13622 };
13623 rimraf_(p2, options, CB);
13624 });
13625 };
13626 if (options.disableGlob || !glob.hasMagic(p))
13627 return afterGlob(null, [p]);
13628 options.lstat(p, (er, stat) => {
13629 if (!er)
13630 return afterGlob(null, [p]);
13631 glob(p, options.glob, afterGlob);
13632 });
13633 };
13634 var rimraf_ = (p, options, cb) => {
13635 assert(p);
13636 assert(options);
13637 assert(typeof cb === "function");
13638 options.lstat(p, (er, st) => {
13639 if (er && er.code === "ENOENT")
13640 return cb(null);
13641 if (er && er.code === "EPERM" && isWindows)
13642 fixWinEPERM(p, options, er, cb);
13643 if (st && st.isDirectory())
13644 return rmdir(p, options, er, cb);
13645 options.unlink(p, (er2) => {
13646 if (er2) {
13647 if (er2.code === "ENOENT")
13648 return cb(null);
13649 if (er2.code === "EPERM")
13650 return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb);
13651 if (er2.code === "EISDIR")
13652 return rmdir(p, options, er2, cb);
13653 }
13654 return cb(er2);
13655 });
13656 });
13657 };
13658 var fixWinEPERM = (p, options, er, cb) => {
13659 assert(p);
13660 assert(options);
13661 assert(typeof cb === "function");
13662 options.chmod(p, 438, (er2) => {
13663 if (er2)
13664 cb(er2.code === "ENOENT" ? null : er);
13665 else
13666 options.stat(p, (er3, stats) => {
13667 if (er3)
13668 cb(er3.code === "ENOENT" ? null : er);
13669 else if (stats.isDirectory())
13670 rmdir(p, options, er, cb);
13671 else
13672 options.unlink(p, cb);
13673 });
13674 });
13675 };
13676 var fixWinEPERMSync = (p, options, er) => {
13677 assert(p);
13678 assert(options);
13679 try {
13680 options.chmodSync(p, 438);
13681 } catch (er2) {
13682 if (er2.code === "ENOENT")
13683 return;
13684 else
13685 throw er;
13686 }
13687 let stats;
13688 try {
13689 stats = options.statSync(p);
13690 } catch (er3) {
13691 if (er3.code === "ENOENT")
13692 return;
13693 else
13694 throw er;
13695 }
13696 if (stats.isDirectory())
13697 rmdirSync(p, options, er);
13698 else
13699 options.unlinkSync(p);
13700 };
13701 var rmdir = (p, options, originalEr, cb) => {
13702 assert(p);
13703 assert(options);
13704 assert(typeof cb === "function");
13705 options.rmdir(p, (er) => {
13706 if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
13707 rmkids(p, options, cb);
13708 else if (er && er.code === "ENOTDIR")
13709 cb(originalEr);
13710 else
13711 cb(er);
13712 });
13713 };
13714 var rmkids = (p, options, cb) => {
13715 assert(p);
13716 assert(options);
13717 assert(typeof cb === "function");
13718 options.readdir(p, (er, files) => {
13719 if (er)
13720 return cb(er);
13721 let n = files.length;
13722 if (n === 0)
13723 return options.rmdir(p, cb);
13724 let errState;
13725 files.forEach((f) => {
13726 rimraf(path.join(p, f), options, (er2) => {
13727 if (errState)
13728 return;
13729 if (er2)
13730 return cb(errState = er2);
13731 if (--n === 0)
13732 options.rmdir(p, cb);
13733 });
13734 });
13735 });
13736 };
13737 var rimrafSync = (p, options) => {
13738 options = options || {};
13739 defaults(options);
13740 assert(p, "rimraf: missing path");
13741 assert.equal(typeof p, "string", "rimraf: path should be a string");
13742 assert(options, "rimraf: missing options");
13743 assert.equal(typeof options, "object", "rimraf: options should be object");
13744 let results;
13745 if (options.disableGlob || !glob.hasMagic(p)) {
13746 results = [p];
13747 } else {
13748 try {
13749 options.lstatSync(p);
13750 results = [p];
13751 } catch (er) {
13752 results = glob.sync(p, options.glob);
13753 }
13754 }
13755 if (!results.length)
13756 return;
13757 for (let i = 0; i < results.length; i++) {
13758 const p2 = results[i];
13759 let st;
13760 try {
13761 st = options.lstatSync(p2);
13762 } catch (er) {
13763 if (er.code === "ENOENT")
13764 return;
13765 if (er.code === "EPERM" && isWindows)
13766 fixWinEPERMSync(p2, options, er);
13767 }
13768 try {
13769 if (st && st.isDirectory())
13770 rmdirSync(p2, options, null);
13771 else
13772 options.unlinkSync(p2);
13773 } catch (er) {
13774 if (er.code === "ENOENT")
13775 return;
13776 if (er.code === "EPERM")
13777 return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er);
13778 if (er.code !== "EISDIR")
13779 throw er;
13780 rmdirSync(p2, options, er);
13781 }
13782 }
13783 };
13784 var rmdirSync = (p, options, originalEr) => {
13785 assert(p);
13786 assert(options);
13787 try {
13788 options.rmdirSync(p);
13789 } catch (er) {
13790 if (er.code === "ENOENT")
13791 return;
13792 if (er.code === "ENOTDIR")
13793 throw originalEr;
13794 if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
13795 rmkidsSync(p, options);
13796 }
13797 };
13798 var rmkidsSync = (p, options) => {
13799 assert(p);
13800 assert(options);
13801 options.readdirSync(p).forEach((f) => rimrafSync(path.join(p, f), options));
13802 const retries = isWindows ? 100 : 1;
13803 let i = 0;
13804 do {
13805 let threw = true;
13806 try {
13807 const ret = options.rmdirSync(p, options);
13808 threw = false;
13809 return ret;
13810 } finally {
13811 if (++i < retries && threw)
13812 continue;
13813 }
13814 } while (true);
13815 };
13816 module2.exports = rimraf;
13817 rimraf.sync = rimrafSync;
13818 }
13819});
13820var require_del = __commonJS2({
13821 "node_modules/flat-cache/src/del.js"(exports2, module2) {
13822 var rimraf = require_rimraf().sync;
13823 var fs = require("fs");
13824 module2.exports = function del(file) {
13825 if (fs.existsSync(file)) {
13826 rimraf(file, {
13827 glob: false
13828 });
13829 return true;
13830 }
13831 return false;
13832 };
13833 }
13834});
13835var require_cache = __commonJS2({
13836 "node_modules/flat-cache/src/cache.js"(exports2, module2) {
13837 var path = require("path");
13838 var fs = require("fs");
13839 var utils = require_utils6();
13840 var del = require_del();
13841 var writeJSON = utils.writeJSON;
13842 var cache = {
13843 load: function(docId, cacheDir) {
13844 var me = this;
13845 me._visited = {};
13846 me._persisted = {};
13847 me._pathToFile = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, "../.cache/", docId);
13848 if (fs.existsSync(me._pathToFile)) {
13849 me._persisted = utils.tryParse(me._pathToFile, {});
13850 }
13851 },
13852 loadFile: function(pathToFile) {
13853 var me = this;
13854 var dir = path.dirname(pathToFile);
13855 var fName = path.basename(pathToFile);
13856 me.load(fName, dir);
13857 },
13858 all: function() {
13859 return this._persisted;
13860 },
13861 keys: function() {
13862 return Object.keys(this._persisted);
13863 },
13864 setKey: function(key, value) {
13865 this._visited[key] = true;
13866 this._persisted[key] = value;
13867 },
13868 removeKey: function(key) {
13869 delete this._visited[key];
13870 delete this._persisted[key];
13871 },
13872 getKey: function(key) {
13873 this._visited[key] = true;
13874 return this._persisted[key];
13875 },
13876 _prune: function() {
13877 var me = this;
13878 var obj = {};
13879 var keys = Object.keys(me._visited);
13880 if (keys.length === 0) {
13881 return;
13882 }
13883 keys.forEach(function(key) {
13884 obj[key] = me._persisted[key];
13885 });
13886 me._visited = {};
13887 me._persisted = obj;
13888 },
13889 save: function(noPrune) {
13890 var me = this;
13891 !noPrune && me._prune();
13892 writeJSON(me._pathToFile, me._persisted);
13893 },
13894 removeCacheFile: function() {
13895 return del(this._pathToFile);
13896 },
13897 destroy: function() {
13898 var me = this;
13899 me._visited = {};
13900 me._persisted = {};
13901 me.removeCacheFile();
13902 }
13903 };
13904 module2.exports = {
13905 load: function(docId, cacheDir) {
13906 return this.create(docId, cacheDir);
13907 },
13908 create: function(docId, cacheDir) {
13909 var obj = Object.create(cache);
13910 obj.load(docId, cacheDir);
13911 return obj;
13912 },
13913 createFromFile: function(filePath) {
13914 var obj = Object.create(cache);
13915 obj.loadFile(filePath);
13916 return obj;
13917 },
13918 clearCacheById: function(docId, cacheDir) {
13919 var filePath = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, "../.cache/", docId);
13920 return del(filePath);
13921 },
13922 clearAll: function(cacheDir) {
13923 var filePath = cacheDir ? path.resolve(cacheDir) : path.resolve(__dirname, "../.cache/");
13924 return del(filePath);
13925 }
13926 };
13927 }
13928});
13929var require_cache2 = __commonJS2({
13930 "node_modules/file-entry-cache/cache.js"(exports2, module2) {
13931 var path = require("path");
13932 var crypto = require("crypto");
13933 module2.exports = {
13934 createFromFile: function(filePath, useChecksum) {
13935 var fname = path.basename(filePath);
13936 var dir = path.dirname(filePath);
13937 return this.create(fname, dir, useChecksum);
13938 },
13939 create: function(cacheId, _path, useChecksum) {
13940 var fs = require("fs");
13941 var flatCache = require_cache();
13942 var cache = flatCache.load(cacheId, _path);
13943 var normalizedEntries = {};
13944 var removeNotFoundFiles = function removeNotFoundFiles2() {
13945 const cachedEntries = cache.keys();
13946 cachedEntries.forEach(function remover(fPath) {
13947 try {
13948 fs.statSync(fPath);
13949 } catch (err) {
13950 if (err.code === "ENOENT") {
13951 cache.removeKey(fPath);
13952 }
13953 }
13954 });
13955 };
13956 removeNotFoundFiles();
13957 return {
13958 cache,
13959 getHash: function(buffer) {
13960 return crypto.createHash("md5").update(buffer).digest("hex");
13961 },
13962 hasFileChanged: function(file) {
13963 return this.getFileDescriptor(file).changed;
13964 },
13965 analyzeFiles: function(files) {
13966 var me = this;
13967 files = files || [];
13968 var res = {
13969 changedFiles: [],
13970 notFoundFiles: [],
13971 notChangedFiles: []
13972 };
13973 me.normalizeEntries(files).forEach(function(entry) {
13974 if (entry.changed) {
13975 res.changedFiles.push(entry.key);
13976 return;
13977 }
13978 if (entry.notFound) {
13979 res.notFoundFiles.push(entry.key);
13980 return;
13981 }
13982 res.notChangedFiles.push(entry.key);
13983 });
13984 return res;
13985 },
13986 getFileDescriptor: function(file) {
13987 var fstat;
13988 try {
13989 fstat = fs.statSync(file);
13990 } catch (ex) {
13991 this.removeEntry(file);
13992 return {
13993 key: file,
13994 notFound: true,
13995 err: ex
13996 };
13997 }
13998 if (useChecksum) {
13999 return this._getFileDescriptorUsingChecksum(file);
14000 }
14001 return this._getFileDescriptorUsingMtimeAndSize(file, fstat);
14002 },
14003 _getFileDescriptorUsingMtimeAndSize: function(file, fstat) {
14004 var meta = cache.getKey(file);
14005 var cacheExists = !!meta;
14006 var cSize = fstat.size;
14007 var cTime = fstat.mtime.getTime();
14008 var isDifferentDate;
14009 var isDifferentSize;
14010 if (!meta) {
14011 meta = {
14012 size: cSize,
14013 mtime: cTime
14014 };
14015 } else {
14016 isDifferentDate = cTime !== meta.mtime;
14017 isDifferentSize = cSize !== meta.size;
14018 }
14019 var nEntry = normalizedEntries[file] = {
14020 key: file,
14021 changed: !cacheExists || isDifferentDate || isDifferentSize,
14022 meta
14023 };
14024 return nEntry;
14025 },
14026 _getFileDescriptorUsingChecksum: function(file) {
14027 var meta = cache.getKey(file);
14028 var cacheExists = !!meta;
14029 var contentBuffer;
14030 try {
14031 contentBuffer = fs.readFileSync(file);
14032 } catch (ex) {
14033 contentBuffer = "";
14034 }
14035 var isDifferent = true;
14036 var hash = this.getHash(contentBuffer);
14037 if (!meta) {
14038 meta = {
14039 hash
14040 };
14041 } else {
14042 isDifferent = hash !== meta.hash;
14043 }
14044 var nEntry = normalizedEntries[file] = {
14045 key: file,
14046 changed: !cacheExists || isDifferent,
14047 meta
14048 };
14049 return nEntry;
14050 },
14051 getUpdatedFiles: function(files) {
14052 var me = this;
14053 files = files || [];
14054 return me.normalizeEntries(files).filter(function(entry) {
14055 return entry.changed;
14056 }).map(function(entry) {
14057 return entry.key;
14058 });
14059 },
14060 normalizeEntries: function(files) {
14061 files = files || [];
14062 var me = this;
14063 var nEntries = files.map(function(file) {
14064 return me.getFileDescriptor(file);
14065 });
14066 return nEntries;
14067 },
14068 removeEntry: function(entryName) {
14069 delete normalizedEntries[entryName];
14070 cache.removeKey(entryName);
14071 },
14072 deleteCacheFile: function() {
14073 cache.removeCacheFile();
14074 },
14075 destroy: function() {
14076 normalizedEntries = {};
14077 cache.destroy();
14078 },
14079 _getMetaForFileUsingCheckSum: function(cacheEntry) {
14080 var contentBuffer = fs.readFileSync(cacheEntry.key);
14081 var hash = this.getHash(contentBuffer);
14082 var meta = Object.assign(cacheEntry.meta, {
14083 hash
14084 });
14085 delete meta.size;
14086 delete meta.mtime;
14087 return meta;
14088 },
14089 _getMetaForFileUsingMtimeAndSize: function(cacheEntry) {
14090 var stat = fs.statSync(cacheEntry.key);
14091 var meta = Object.assign(cacheEntry.meta, {
14092 size: stat.size,
14093 mtime: stat.mtime.getTime()
14094 });
14095 delete meta.hash;
14096 return meta;
14097 },
14098 reconcile: function(noPrune) {
14099 removeNotFoundFiles();
14100 noPrune = typeof noPrune === "undefined" ? true : noPrune;
14101 var entries = normalizedEntries;
14102 var keys = Object.keys(entries);
14103 if (keys.length === 0) {
14104 return;
14105 }
14106 var me = this;
14107 keys.forEach(function(entryName) {
14108 var cacheEntry = entries[entryName];
14109 try {
14110 var meta = useChecksum ? me._getMetaForFileUsingCheckSum(cacheEntry) : me._getMetaForFileUsingMtimeAndSize(cacheEntry);
14111 cache.setKey(entryName, meta);
14112 } catch (err) {
14113 if (err.code !== "ENOENT") {
14114 throw err;
14115 }
14116 }
14117 });
14118 cache.save(noPrune);
14119 }
14120 };
14121 }
14122 };
14123 }
14124});
14125var require_format_results_cache = __commonJS2({
14126 "src/cli/format-results-cache.js"(exports2, module2) {
14127 "use strict";
14128 var fileEntryCache = require_cache2();
14129 var stringify2 = require_fast_json_stable_stringify();
14130 var {
14131 version: prettierVersion
14132 } = require("./index.js");
14133 var {
14134 createHash
14135 } = require_utils();
14136 var optionsHashCache = /* @__PURE__ */ new WeakMap();
14137 var nodeVersion = process && process.version;
14138 function getHashOfOptions(options) {
14139 if (optionsHashCache.has(options)) {
14140 return optionsHashCache.get(options);
14141 }
14142 const hash = createHash(`${prettierVersion}_${nodeVersion}_${stringify2(options)}`);
14143 optionsHashCache.set(options, hash);
14144 return hash;
14145 }
14146 function getMetadataFromFileDescriptor(fileDescriptor) {
14147 return fileDescriptor.meta;
14148 }
14149 var FormatResultsCache = class {
14150 constructor(cacheFileLocation, cacheStrategy) {
14151 const useChecksum = cacheStrategy === "content";
14152 this.cacheFileLocation = cacheFileLocation;
14153 this.fileEntryCache = fileEntryCache.create(cacheFileLocation, void 0, useChecksum);
14154 }
14155 existsAvailableFormatResultsCache(filePath, options) {
14156 const fileDescriptor = this.fileEntryCache.getFileDescriptor(filePath);
14157 if (fileDescriptor.notFound) {
14158 return false;
14159 }
14160 const hashOfOptions = getHashOfOptions(options);
14161 const meta = getMetadataFromFileDescriptor(fileDescriptor);
14162 const changed = fileDescriptor.changed || meta.hashOfOptions !== hashOfOptions;
14163 return !changed;
14164 }
14165 setFormatResultsCache(filePath, options) {
14166 const fileDescriptor = this.fileEntryCache.getFileDescriptor(filePath);
14167 const meta = getMetadataFromFileDescriptor(fileDescriptor);
14168 if (fileDescriptor && !fileDescriptor.notFound) {
14169 meta.hashOfOptions = getHashOfOptions(options);
14170 }
14171 }
14172 removeFormatResultsCache(filePath) {
14173 this.fileEntryCache.removeEntry(filePath);
14174 }
14175 reconcile() {
14176 this.fileEntryCache.reconcile();
14177 }
14178 };
14179 module2.exports = FormatResultsCache;
14180 }
14181});
14182var require_base = __commonJS2({
14183 "node_modules/diff/lib/diff/base.js"(exports2) {
14184 "use strict";
14185 Object.defineProperty(exports2, "__esModule", {
14186 value: true
14187 });
14188 exports2["default"] = Diff;
14189 function Diff() {
14190 }
14191 Diff.prototype = {
14192 diff: function diff(oldString, newString) {
14193 var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
14194 var callback = options.callback;
14195 if (typeof options === "function") {
14196 callback = options;
14197 options = {};
14198 }
14199 this.options = options;
14200 var self2 = this;
14201 function done(value) {
14202 if (callback) {
14203 setTimeout(function() {
14204 callback(void 0, value);
14205 }, 0);
14206 return true;
14207 } else {
14208 return value;
14209 }
14210 }
14211 oldString = this.castInput(oldString);
14212 newString = this.castInput(newString);
14213 oldString = this.removeEmpty(this.tokenize(oldString));
14214 newString = this.removeEmpty(this.tokenize(newString));
14215 var newLen = newString.length, oldLen = oldString.length;
14216 var editLength = 1;
14217 var maxEditLength = newLen + oldLen;
14218 var bestPath = [{
14219 newPos: -1,
14220 components: []
14221 }];
14222 var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
14223 if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
14224 return done([{
14225 value: this.join(newString),
14226 count: newString.length
14227 }]);
14228 }
14229 function execEditLength() {
14230 for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
14231 var basePath = void 0;
14232 var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
14233 if (addPath) {
14234 bestPath[diagonalPath - 1] = void 0;
14235 }
14236 var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
14237 if (!canAdd && !canRemove) {
14238 bestPath[diagonalPath] = void 0;
14239 continue;
14240 }
14241 if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
14242 basePath = clonePath(removePath);
14243 self2.pushComponent(basePath.components, void 0, true);
14244 } else {
14245 basePath = addPath;
14246 basePath.newPos++;
14247 self2.pushComponent(basePath.components, true, void 0);
14248 }
14249 _oldPos = self2.extractCommon(basePath, newString, oldString, diagonalPath);
14250 if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
14251 return done(buildValues(self2, basePath.components, newString, oldString, self2.useLongestToken));
14252 } else {
14253 bestPath[diagonalPath] = basePath;
14254 }
14255 }
14256 editLength++;
14257 }
14258 if (callback) {
14259 (function exec() {
14260 setTimeout(function() {
14261 if (editLength > maxEditLength) {
14262 return callback();
14263 }
14264 if (!execEditLength()) {
14265 exec();
14266 }
14267 }, 0);
14268 })();
14269 } else {
14270 while (editLength <= maxEditLength) {
14271 var ret = execEditLength();
14272 if (ret) {
14273 return ret;
14274 }
14275 }
14276 }
14277 },
14278 pushComponent: function pushComponent(components, added, removed) {
14279 var last = components[components.length - 1];
14280 if (last && last.added === added && last.removed === removed) {
14281 components[components.length - 1] = {
14282 count: last.count + 1,
14283 added,
14284 removed
14285 };
14286 } else {
14287 components.push({
14288 count: 1,
14289 added,
14290 removed
14291 });
14292 }
14293 },
14294 extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
14295 var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0;
14296 while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
14297 newPos++;
14298 oldPos++;
14299 commonCount++;
14300 }
14301 if (commonCount) {
14302 basePath.components.push({
14303 count: commonCount
14304 });
14305 }
14306 basePath.newPos = newPos;
14307 return oldPos;
14308 },
14309 equals: function equals(left, right) {
14310 if (this.options.comparator) {
14311 return this.options.comparator(left, right);
14312 } else {
14313 return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
14314 }
14315 },
14316 removeEmpty: function removeEmpty(array2) {
14317 var ret = [];
14318 for (var i = 0; i < array2.length; i++) {
14319 if (array2[i]) {
14320 ret.push(array2[i]);
14321 }
14322 }
14323 return ret;
14324 },
14325 castInput: function castInput(value) {
14326 return value;
14327 },
14328 tokenize: function tokenize(value) {
14329 return value.split("");
14330 },
14331 join: function join(chars) {
14332 return chars.join("");
14333 }
14334 };
14335 function buildValues(diff, components, newString, oldString, useLongestToken) {
14336 var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0;
14337 for (; componentPos < componentLen; componentPos++) {
14338 var component = components[componentPos];
14339 if (!component.removed) {
14340 if (!component.added && useLongestToken) {
14341 var value = newString.slice(newPos, newPos + component.count);
14342 value = value.map(function(value2, i) {
14343 var oldValue = oldString[oldPos + i];
14344 return oldValue.length > value2.length ? oldValue : value2;
14345 });
14346 component.value = diff.join(value);
14347 } else {
14348 component.value = diff.join(newString.slice(newPos, newPos + component.count));
14349 }
14350 newPos += component.count;
14351 if (!component.added) {
14352 oldPos += component.count;
14353 }
14354 } else {
14355 component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
14356 oldPos += component.count;
14357 if (componentPos && components[componentPos - 1].added) {
14358 var tmp = components[componentPos - 1];
14359 components[componentPos - 1] = components[componentPos];
14360 components[componentPos] = tmp;
14361 }
14362 }
14363 }
14364 var lastComponent = components[componentLen - 1];
14365 if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff.equals("", lastComponent.value)) {
14366 components[componentLen - 2].value += lastComponent.value;
14367 components.pop();
14368 }
14369 return components;
14370 }
14371 function clonePath(path) {
14372 return {
14373 newPos: path.newPos,
14374 components: path.components.slice(0)
14375 };
14376 }
14377 }
14378});
14379var require_params = __commonJS2({
14380 "node_modules/diff/lib/util/params.js"(exports2) {
14381 "use strict";
14382 Object.defineProperty(exports2, "__esModule", {
14383 value: true
14384 });
14385 exports2.generateOptions = generateOptions;
14386 function generateOptions(options, defaults) {
14387 if (typeof options === "function") {
14388 defaults.callback = options;
14389 } else if (options) {
14390 for (var name in options) {
14391 if (options.hasOwnProperty(name)) {
14392 defaults[name] = options[name];
14393 }
14394 }
14395 }
14396 return defaults;
14397 }
14398 }
14399});
14400var require_line = __commonJS2({
14401 "node_modules/diff/lib/diff/line.js"(exports2) {
14402 "use strict";
14403 Object.defineProperty(exports2, "__esModule", {
14404 value: true
14405 });
14406 exports2.diffLines = diffLines;
14407 exports2.diffTrimmedLines = diffTrimmedLines;
14408 exports2.lineDiff = void 0;
14409 var _base = _interopRequireDefault(require_base());
14410 var _params = require_params();
14411 function _interopRequireDefault(obj) {
14412 return obj && obj.__esModule ? obj : {
14413 "default": obj
14414 };
14415 }
14416 var lineDiff = new _base["default"]();
14417 exports2.lineDiff = lineDiff;
14418 lineDiff.tokenize = function(value) {
14419 var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/);
14420 if (!linesAndNewlines[linesAndNewlines.length - 1]) {
14421 linesAndNewlines.pop();
14422 }
14423 for (var i = 0; i < linesAndNewlines.length; i++) {
14424 var line = linesAndNewlines[i];
14425 if (i % 2 && !this.options.newlineIsToken) {
14426 retLines[retLines.length - 1] += line;
14427 } else {
14428 if (this.options.ignoreWhitespace) {
14429 line = line.trim();
14430 }
14431 retLines.push(line);
14432 }
14433 }
14434 return retLines;
14435 };
14436 function diffLines(oldStr, newStr, callback) {
14437 return lineDiff.diff(oldStr, newStr, callback);
14438 }
14439 function diffTrimmedLines(oldStr, newStr, callback) {
14440 var options = (0, _params.generateOptions)(callback, {
14441 ignoreWhitespace: true
14442 });
14443 return lineDiff.diff(oldStr, newStr, options);
14444 }
14445 }
14446});
14447var require_create = __commonJS2({
14448 "node_modules/diff/lib/patch/create.js"(exports2) {
14449 "use strict";
14450 Object.defineProperty(exports2, "__esModule", {
14451 value: true
14452 });
14453 exports2.structuredPatch = structuredPatch;
14454 exports2.formatPatch = formatPatch;
14455 exports2.createTwoFilesPatch = createTwoFilesPatch;
14456 exports2.createPatch = createPatch;
14457 var _line = require_line();
14458 function _toConsumableArray(arr) {
14459 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
14460 }
14461 function _nonIterableSpread() {
14462 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14463 }
14464 function _unsupportedIterableToArray(o, minLen) {
14465 if (!o)
14466 return;
14467 if (typeof o === "string")
14468 return _arrayLikeToArray(o, minLen);
14469 var n = Object.prototype.toString.call(o).slice(8, -1);
14470 if (n === "Object" && o.constructor)
14471 n = o.constructor.name;
14472 if (n === "Map" || n === "Set")
14473 return Array.from(o);
14474 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
14475 return _arrayLikeToArray(o, minLen);
14476 }
14477 function _iterableToArray(iter) {
14478 if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter))
14479 return Array.from(iter);
14480 }
14481 function _arrayWithoutHoles(arr) {
14482 if (Array.isArray(arr))
14483 return _arrayLikeToArray(arr);
14484 }
14485 function _arrayLikeToArray(arr, len) {
14486 if (len == null || len > arr.length)
14487 len = arr.length;
14488 for (var i = 0, arr2 = new Array(len); i < len; i++) {
14489 arr2[i] = arr[i];
14490 }
14491 return arr2;
14492 }
14493 function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
14494 if (!options) {
14495 options = {};
14496 }
14497 if (typeof options.context === "undefined") {
14498 options.context = 4;
14499 }
14500 var diff = (0, _line.diffLines)(oldStr, newStr, options);
14501 diff.push({
14502 value: "",
14503 lines: []
14504 });
14505 function contextLines(lines) {
14506 return lines.map(function(entry) {
14507 return " " + entry;
14508 });
14509 }
14510 var hunks = [];
14511 var oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1;
14512 var _loop = function _loop2(i2) {
14513 var current = diff[i2], lines = current.lines || current.value.replace(/\n$/, "").split("\n");
14514 current.lines = lines;
14515 if (current.added || current.removed) {
14516 var _curRange;
14517 if (!oldRangeStart) {
14518 var prev = diff[i2 - 1];
14519 oldRangeStart = oldLine;
14520 newRangeStart = newLine;
14521 if (prev) {
14522 curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
14523 oldRangeStart -= curRange.length;
14524 newRangeStart -= curRange.length;
14525 }
14526 }
14527 (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function(entry) {
14528 return (current.added ? "+" : "-") + entry;
14529 })));
14530 if (current.added) {
14531 newLine += lines.length;
14532 } else {
14533 oldLine += lines.length;
14534 }
14535 } else {
14536 if (oldRangeStart) {
14537 if (lines.length <= options.context * 2 && i2 < diff.length - 2) {
14538 var _curRange2;
14539 (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
14540 } else {
14541 var _curRange3;
14542 var contextSize = Math.min(lines.length, options.context);
14543 (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
14544 var hunk = {
14545 oldStart: oldRangeStart,
14546 oldLines: oldLine - oldRangeStart + contextSize,
14547 newStart: newRangeStart,
14548 newLines: newLine - newRangeStart + contextSize,
14549 lines: curRange
14550 };
14551 if (i2 >= diff.length - 2 && lines.length <= options.context) {
14552 var oldEOFNewline = /\n$/.test(oldStr);
14553 var newEOFNewline = /\n$/.test(newStr);
14554 var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
14555 if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
14556 curRange.splice(hunk.oldLines, 0, "\\ No newline at end of file");
14557 }
14558 if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
14559 curRange.push("\\ No newline at end of file");
14560 }
14561 }
14562 hunks.push(hunk);
14563 oldRangeStart = 0;
14564 newRangeStart = 0;
14565 curRange = [];
14566 }
14567 }
14568 oldLine += lines.length;
14569 newLine += lines.length;
14570 }
14571 };
14572 for (var i = 0; i < diff.length; i++) {
14573 _loop(i);
14574 }
14575 return {
14576 oldFileName,
14577 newFileName,
14578 oldHeader,
14579 newHeader,
14580 hunks
14581 };
14582 }
14583 function formatPatch(diff) {
14584 var ret = [];
14585 if (diff.oldFileName == diff.newFileName) {
14586 ret.push("Index: " + diff.oldFileName);
14587 }
14588 ret.push("===================================================================");
14589 ret.push("--- " + diff.oldFileName + (typeof diff.oldHeader === "undefined" ? "" : " " + diff.oldHeader));
14590 ret.push("+++ " + diff.newFileName + (typeof diff.newHeader === "undefined" ? "" : " " + diff.newHeader));
14591 for (var i = 0; i < diff.hunks.length; i++) {
14592 var hunk = diff.hunks[i];
14593 if (hunk.oldLines === 0) {
14594 hunk.oldStart -= 1;
14595 }
14596 if (hunk.newLines === 0) {
14597 hunk.newStart -= 1;
14598 }
14599 ret.push("@@ -" + hunk.oldStart + "," + hunk.oldLines + " +" + hunk.newStart + "," + hunk.newLines + " @@");
14600 ret.push.apply(ret, hunk.lines);
14601 }
14602 return ret.join("\n") + "\n";
14603 }
14604 function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
14605 return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
14606 }
14607 function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
14608 return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
14609 }
14610 }
14611});
14612var require_format = __commonJS2({
14613 "src/cli/format.js"(exports2, module2) {
14614 "use strict";
14615 var {
14616 promises: fs
14617 } = require("fs");
14618 var path = require("path");
14619 var {
14620 default: chalk2
14621 } = (init_source(), __toCommonJS(source_exports));
14622 var prettier2 = require("./index.js");
14623 var {
14624 getStdin
14625 } = require("./third-party.js");
14626 var {
14627 createIgnorer,
14628 errors
14629 } = require_prettier_internal();
14630 var {
14631 expandPatterns,
14632 fixWindowsSlashes
14633 } = require_expand_patterns();
14634 var getOptionsForFile = require_get_options_for_file();
14635 var isTTY = require_is_tty();
14636 var findCacheFile = require_find_cache_file();
14637 var FormatResultsCache = require_format_results_cache();
14638 var {
14639 statSafe
14640 } = require_utils();
14641 function diff(a, b) {
14642 return require_create().createTwoFilesPatch("", "", a, b, "", "", {
14643 context: 2
14644 });
14645 }
14646 function handleError(context, filename, error, printedFilename) {
14647 if (error instanceof errors.UndefinedParserError) {
14648 if ((context.argv.write || context.argv.ignoreUnknown) && printedFilename) {
14649 printedFilename.clear();
14650 }
14651 if (context.argv.ignoreUnknown) {
14652 return;
14653 }
14654 if (!context.argv.check && !context.argv.listDifferent) {
14655 process.exitCode = 2;
14656 }
14657 context.logger.error(error.message);
14658 return;
14659 }
14660 if (context.argv.write) {
14661 process.stdout.write("\n");
14662 }
14663 const isParseError = Boolean(error && error.loc);
14664 const isValidationError = /^Invalid \S+ value\./.test(error && error.message);
14665 if (isParseError) {
14666 context.logger.error(`${filename}: ${String(error)}`);
14667 } else if (isValidationError || error instanceof errors.ConfigError) {
14668 context.logger.error(error.message);
14669 process.exit(1);
14670 } else if (error instanceof errors.DebugError) {
14671 context.logger.error(`${filename}: ${error.message}`);
14672 } else {
14673 context.logger.error(filename + ": " + (error.stack || error));
14674 }
14675 process.exitCode = 2;
14676 }
14677 function writeOutput(context, result, options) {
14678 process.stdout.write(context.argv.debugCheck ? result.filepath : result.formatted);
14679 if (options && options.cursorOffset >= 0) {
14680 process.stderr.write(result.cursorOffset + "\n");
14681 }
14682 }
14683 function listDifferent(context, input, options, filename) {
14684 if (!context.argv.check && !context.argv.listDifferent) {
14685 return;
14686 }
14687 try {
14688 if (!options.filepath && !options.parser) {
14689 throw new errors.UndefinedParserError("No parser and no file path given, couldn't infer a parser.");
14690 }
14691 if (!prettier2.check(input, options)) {
14692 if (!context.argv.write) {
14693 context.logger.log(filename);
14694 process.exitCode = 1;
14695 }
14696 }
14697 } catch (error) {
14698 context.logger.error(error.message);
14699 }
14700 return true;
14701 }
14702 function format(context, input, opt) {
14703 if (!opt.parser && !opt.filepath) {
14704 throw new errors.UndefinedParserError("No parser and no file path given, couldn't infer a parser.");
14705 }
14706 if (context.argv.debugPrintDoc) {
14707 const doc = prettier2.__debug.printToDoc(input, opt);
14708 return {
14709 formatted: prettier2.__debug.formatDoc(doc) + "\n"
14710 };
14711 }
14712 if (context.argv.debugPrintComments) {
14713 return {
14714 formatted: prettier2.format(JSON.stringify(prettier2.formatWithCursor(input, opt).comments || []), {
14715 parser: "json"
14716 })
14717 };
14718 }
14719 if (context.argv.debugPrintAst) {
14720 const {
14721 ast
14722 } = prettier2.__debug.parse(input, opt);
14723 return {
14724 formatted: JSON.stringify(ast)
14725 };
14726 }
14727 if (context.argv.debugCheck) {
14728 const pp = prettier2.format(input, opt);
14729 const pppp = prettier2.format(pp, opt);
14730 if (pp !== pppp) {
14731 throw new errors.DebugError("prettier(input) !== prettier(prettier(input))\n" + diff(pp, pppp));
14732 } else {
14733 const stringify2 = (obj) => JSON.stringify(obj, null, 2);
14734 const ast = stringify2(prettier2.__debug.parse(input, opt, true).ast);
14735 const past = stringify2(prettier2.__debug.parse(pp, opt, true).ast);
14736 if (ast !== past) {
14737 const MAX_AST_SIZE = 2097152;
14738 const astDiff = ast.length > MAX_AST_SIZE || past.length > MAX_AST_SIZE ? "AST diff too large to render" : diff(ast, past);
14739 throw new errors.DebugError("ast(input) !== ast(prettier(input))\n" + astDiff + "\n" + diff(input, pp));
14740 }
14741 }
14742 return {
14743 formatted: pp,
14744 filepath: opt.filepath || "(stdin)\n"
14745 };
14746 }
14747 const {
14748 performanceTestFlag
14749 } = context;
14750 if (performanceTestFlag !== null && performanceTestFlag !== void 0 && performanceTestFlag.debugBenchmark) {
14751 let benchmark;
14752 try {
14753 benchmark = require("benchmark");
14754 } catch {
14755 context.logger.debug("'--debug-benchmark' requires the 'benchmark' package to be installed.");
14756 process.exit(2);
14757 }
14758 context.logger.debug("'--debug-benchmark' option found, measuring formatWithCursor with 'benchmark' module.");
14759 const suite = new benchmark.Suite();
14760 suite.add("format", () => {
14761 prettier2.formatWithCursor(input, opt);
14762 }).on("cycle", (event) => {
14763 const results = {
14764 benchmark: String(event.target),
14765 hz: event.target.hz,
14766 ms: event.target.times.cycle * 1e3
14767 };
14768 context.logger.debug("'--debug-benchmark' measurements for formatWithCursor: " + JSON.stringify(results, null, 2));
14769 }).run({
14770 async: false
14771 });
14772 } else if (performanceTestFlag !== null && performanceTestFlag !== void 0 && performanceTestFlag.debugRepeat) {
14773 const repeat = context.argv.debugRepeat;
14774 context.logger.debug("'--debug-repeat' option found, running formatWithCursor " + repeat + " times.");
14775 let totalMs = 0;
14776 for (let i = 0; i < repeat; ++i) {
14777 const startMs = Date.now();
14778 prettier2.formatWithCursor(input, opt);
14779 totalMs += Date.now() - startMs;
14780 }
14781 const averageMs = totalMs / repeat;
14782 const results = {
14783 repeat,
14784 hz: 1e3 / averageMs,
14785 ms: averageMs
14786 };
14787 context.logger.debug("'--debug-repeat' measurements for formatWithCursor: " + JSON.stringify(results, null, 2));
14788 }
14789 return prettier2.formatWithCursor(input, opt);
14790 }
14791 async function createIgnorerFromContextOrDie(context) {
14792 try {
14793 return await createIgnorer(context.argv.ignorePath, context.argv.withNodeModules);
14794 } catch (e) {
14795 context.logger.error(e.message);
14796 process.exit(2);
14797 }
14798 }
14799 async function formatStdin2(context) {
14800 const filepath = context.argv.filepath ? path.resolve(process.cwd(), context.argv.filepath) : process.cwd();
14801 const ignorer = await createIgnorerFromContextOrDie(context);
14802 const relativeFilepath = context.argv.ignorePath ? path.relative(path.dirname(context.argv.ignorePath), filepath) : path.relative(process.cwd(), filepath);
14803 try {
14804 const input = await getStdin();
14805 if (relativeFilepath && ignorer.ignores(fixWindowsSlashes(relativeFilepath))) {
14806 writeOutput(context, {
14807 formatted: input
14808 });
14809 return;
14810 }
14811 const options = await getOptionsForFile(context, filepath);
14812 if (listDifferent(context, input, options, "(stdin)")) {
14813 return;
14814 }
14815 const formatted = format(context, input, options);
14816 const {
14817 performanceTestFlag
14818 } = context;
14819 if (performanceTestFlag) {
14820 context.logger.log(`'${performanceTestFlag.name}' option found, skipped print code to screen.`);
14821 return;
14822 }
14823 writeOutput(context, formatted, options);
14824 } catch (error) {
14825 handleError(context, relativeFilepath || "stdin", error);
14826 }
14827 }
14828 async function formatFiles2(context) {
14829 var _formatResultsCache4;
14830 const ignorer = await createIgnorerFromContextOrDie(context);
14831 let numberOfUnformattedFilesFound = 0;
14832 const {
14833 performanceTestFlag
14834 } = context;
14835 if (context.argv.check && !performanceTestFlag) {
14836 context.logger.log("Checking formatting...");
14837 }
14838 let formatResultsCache;
14839 const cacheFilePath = await findCacheFile(context.argv.cacheLocation);
14840 if (context.argv.cache) {
14841 formatResultsCache = new FormatResultsCache(cacheFilePath, context.argv.cacheStrategy || "content");
14842 } else {
14843 if (context.argv.cacheStrategy) {
14844 context.logger.error("`--cache-strategy` cannot be used without `--cache`.");
14845 process.exit(2);
14846 }
14847 if (!context.argv.cacheLocation) {
14848 const stat = await statSafe(cacheFilePath);
14849 if (stat) {
14850 await fs.unlink(cacheFilePath);
14851 }
14852 }
14853 }
14854 for await (const pathOrError of expandPatterns(context)) {
14855 var _formatResultsCache;
14856 if (typeof pathOrError === "object") {
14857 context.logger.error(pathOrError.error);
14858 process.exitCode = 2;
14859 continue;
14860 }
14861 const filename = pathOrError;
14862 const ignoreFilename = context.argv.ignorePath ? path.relative(path.dirname(context.argv.ignorePath), filename) : filename;
14863 const fileIgnored = ignorer.ignores(fixWindowsSlashes(ignoreFilename));
14864 if (fileIgnored && (context.argv.debugCheck || context.argv.write || context.argv.check || context.argv.listDifferent)) {
14865 continue;
14866 }
14867 const options = Object.assign(Object.assign({}, await getOptionsForFile(context, filename)), {}, {
14868 filepath: filename
14869 });
14870 let printedFilename;
14871 if (isTTY()) {
14872 printedFilename = context.logger.log(filename, {
14873 newline: false,
14874 clearable: true
14875 });
14876 }
14877 let input;
14878 try {
14879 input = await fs.readFile(filename, "utf8");
14880 } catch (error) {
14881 context.logger.log("");
14882 context.logger.error(`Unable to read file: ${filename}
14883${error.message}`);
14884 process.exitCode = 2;
14885 continue;
14886 }
14887 if (fileIgnored) {
14888 writeOutput(context, {
14889 formatted: input
14890 }, options);
14891 continue;
14892 }
14893 const start = Date.now();
14894 const isCacheExists = (_formatResultsCache = formatResultsCache) === null || _formatResultsCache === void 0 ? void 0 : _formatResultsCache.existsAvailableFormatResultsCache(filename, options);
14895 let result;
14896 let output;
14897 try {
14898 if (isCacheExists) {
14899 result = {
14900 formatted: input
14901 };
14902 } else {
14903 result = format(context, input, options);
14904 }
14905 output = result.formatted;
14906 } catch (error) {
14907 handleError(context, filename, error, printedFilename);
14908 continue;
14909 }
14910 const isDifferent = output !== input;
14911 let shouldSetCache = !isDifferent;
14912 if (printedFilename) {
14913 printedFilename.clear();
14914 }
14915 if (performanceTestFlag) {
14916 context.logger.log(`'${performanceTestFlag.name}' option found, skipped print code or write files.`);
14917 return;
14918 }
14919 if (context.argv.write) {
14920 if (isDifferent) {
14921 if (!context.argv.check && !context.argv.listDifferent) {
14922 context.logger.log(`${filename} ${Date.now() - start}ms`);
14923 }
14924 try {
14925 await fs.writeFile(filename, output, "utf8");
14926 shouldSetCache = true;
14927 } catch (error) {
14928 context.logger.error(`Unable to write file: ${filename}
14929${error.message}`);
14930 process.exitCode = 2;
14931 }
14932 } else if (!context.argv.check && !context.argv.listDifferent) {
14933 const message = `${chalk2.grey(filename)} ${Date.now() - start}ms`;
14934 if (isCacheExists) {
14935 context.logger.log(`${message} (cached)`);
14936 } else {
14937 context.logger.log(message);
14938 }
14939 }
14940 } else if (context.argv.debugCheck) {
14941 if (result.filepath) {
14942 context.logger.log(result.filepath);
14943 } else {
14944 process.exitCode = 2;
14945 }
14946 } else if (!context.argv.check && !context.argv.listDifferent) {
14947 writeOutput(context, result, options);
14948 }
14949 if (shouldSetCache) {
14950 var _formatResultsCache2;
14951 (_formatResultsCache2 = formatResultsCache) === null || _formatResultsCache2 === void 0 ? void 0 : _formatResultsCache2.setFormatResultsCache(filename, options);
14952 } else {
14953 var _formatResultsCache3;
14954 (_formatResultsCache3 = formatResultsCache) === null || _formatResultsCache3 === void 0 ? void 0 : _formatResultsCache3.removeFormatResultsCache(filename);
14955 }
14956 if (isDifferent) {
14957 if (context.argv.check) {
14958 context.logger.warn(filename);
14959 } else if (context.argv.listDifferent) {
14960 context.logger.log(filename);
14961 }
14962 numberOfUnformattedFilesFound += 1;
14963 }
14964 }
14965 (_formatResultsCache4 = formatResultsCache) === null || _formatResultsCache4 === void 0 ? void 0 : _formatResultsCache4.reconcile();
14966 if (context.argv.check) {
14967 if (numberOfUnformattedFilesFound === 0) {
14968 context.logger.log("All matched files use Prettier code style!");
14969 } else if (numberOfUnformattedFilesFound === 1) {
14970 context.logger.warn(context.argv.write ? "Code style issues fixed in the above file." : "Code style issues found in the above file. Forgot to run Prettier?");
14971 } else {
14972 context.logger.warn(context.argv.write ? "Code style issues found in " + numberOfUnformattedFilesFound + " files." : "Code style issues found in " + numberOfUnformattedFilesFound + " files. Forgot to run Prettier?");
14973 }
14974 }
14975 if ((context.argv.check || context.argv.listDifferent) && numberOfUnformattedFilesFound > 0 && !process.exitCode && !context.argv.write) {
14976 process.exitCode = 1;
14977 }
14978 }
14979 module2.exports = {
14980 formatStdin: formatStdin2,
14981 formatFiles: formatFiles2
14982 };
14983 }
14984});
14985var require_file_info = __commonJS2({
14986 "src/cli/file-info.js"(exports2, module2) {
14987 "use strict";
14988 var stringify2 = require_fast_json_stable_stringify();
14989 var prettier2 = require("./index.js");
14990 var {
14991 printToScreen: printToScreen2
14992 } = require_utils();
14993 async function logFileInfoOrDie2(context) {
14994 const {
14995 fileInfo: file,
14996 ignorePath,
14997 withNodeModules,
14998 plugins,
14999 pluginSearchDirs,
15000 config
15001 } = context.argv;
15002 const fileInfo = await prettier2.getFileInfo(file, {
15003 ignorePath,
15004 withNodeModules,
15005 plugins,
15006 pluginSearchDirs,
15007 resolveConfig: config !== false
15008 });
15009 printToScreen2(prettier2.format(stringify2(fileInfo), {
15010 parser: "json"
15011 }));
15012 }
15013 module2.exports = logFileInfoOrDie2;
15014 }
15015});
15016var require_find_config_path = __commonJS2({
15017 "src/cli/find-config-path.js"(exports2, module2) {
15018 "use strict";
15019 var path = require("path");
15020 var prettier2 = require("./index.js");
15021 var {
15022 printToScreen: printToScreen2
15023 } = require_utils();
15024 async function logResolvedConfigPathOrDie2(context) {
15025 const file = context.argv.findConfigPath;
15026 const configFile = await prettier2.resolveConfigFile(file);
15027 if (configFile) {
15028 printToScreen2(path.relative(process.cwd(), configFile));
15029 } else {
15030 throw new Error(`Can not find configure file for "${file}"`);
15031 }
15032 }
15033 module2.exports = logResolvedConfigPathOrDie2;
15034 }
15035});
15036var stringify = require_fast_json_stable_stringify();
15037var prettier = require("./index.js");
15038var createLogger = require_logger();
15039var Context = require_context();
15040var {
15041 parseArgvWithoutPlugins
15042} = require_parse_cli_arguments();
15043var {
15044 createDetailedUsage,
15045 createUsage
15046} = require_usage();
15047var {
15048 formatStdin,
15049 formatFiles
15050} = require_format();
15051var logFileInfoOrDie = require_file_info();
15052var logResolvedConfigPathOrDie = require_find_config_path();
15053var {
15054 utils: {
15055 isNonEmptyArray
15056 }
15057} = require_prettier_internal();
15058var {
15059 printToScreen
15060} = require_utils();
15061async function run(rawArguments) {
15062 let logger = createLogger();
15063 try {
15064 const logLevel = parseArgvWithoutPlugins(rawArguments, logger, "loglevel").loglevel;
15065 if (logLevel !== logger.logLevel) {
15066 logger = createLogger(logLevel);
15067 }
15068 const context = new Context({
15069 rawArguments,
15070 logger
15071 });
15072 if (logger.logLevel !== "debug" && context.performanceTestFlag) {
15073 context.logger = createLogger("debug");
15074 }
15075 await main(context);
15076 } catch (error) {
15077 logger.error(error.message);
15078 process.exitCode = 1;
15079 }
15080}
15081async function main(context) {
15082 context.logger.debug(`normalized argv: ${JSON.stringify(context.argv)}`);
15083 if (context.argv.pluginSearch === false) {
15084 const rawPluginSearchDirs = context.argv.__raw["plugin-search-dir"];
15085 if (typeof rawPluginSearchDirs === "string" || isNonEmptyArray(rawPluginSearchDirs)) {
15086 throw new Error("Cannot use --no-plugin-search and --plugin-search-dir together.");
15087 }
15088 }
15089 if (context.argv.check && context.argv.listDifferent) {
15090 throw new Error("Cannot use --check and --list-different together.");
15091 }
15092 if (context.argv.write && context.argv.debugCheck) {
15093 throw new Error("Cannot use --write and --debug-check together.");
15094 }
15095 if (context.argv.findConfigPath && context.filePatterns.length > 0) {
15096 throw new Error("Cannot use --find-config-path with multiple files");
15097 }
15098 if (context.argv.fileInfo && context.filePatterns.length > 0) {
15099 throw new Error("Cannot use --file-info with multiple files");
15100 }
15101 if (context.argv.version) {
15102 printToScreen(prettier.version);
15103 return;
15104 }
15105 if (context.argv.help !== void 0) {
15106 printToScreen(typeof context.argv.help === "string" && context.argv.help !== "" ? createDetailedUsage(context, context.argv.help) : createUsage(context));
15107 return;
15108 }
15109 if (context.argv.supportInfo) {
15110 printToScreen(prettier.format(stringify(prettier.getSupportInfo()), {
15111 parser: "json"
15112 }));
15113 return;
15114 }
15115 const hasFilePatterns = context.filePatterns.length > 0;
15116 const useStdin = !hasFilePatterns && (!process.stdin.isTTY || context.argv.filePath);
15117 if (context.argv.findConfigPath) {
15118 await logResolvedConfigPathOrDie(context);
15119 } else if (context.argv.fileInfo) {
15120 await logFileInfoOrDie(context);
15121 } else if (useStdin) {
15122 if (context.argv.cache) {
15123 context.logger.error("`--cache` cannot be used with stdin.");
15124 process.exit(2);
15125 }
15126 await formatStdin(context);
15127 } else if (hasFilePatterns) {
15128 await formatFiles(context);
15129 } else {
15130 process.exitCode = 1;
15131 printToScreen(createUsage(context));
15132 }
15133}
15134module.exports = {
15135 run
15136};