(https://github.com/ikatyang)
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy
+> of this software and associated documentation files (the "Software"), to deal
+> in the Software without restriction, including without limitation the rights
+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+> copies of the Software, and to permit persons to whom the Software is
+> furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all
+> copies or substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+> SOFTWARE.
diff --git a/node_modules/prettier/README.md b/node_modules/prettier/README.md
new file mode 100644
index 0000000..4076b3a
--- /dev/null
+++ b/node_modules/prettier/README.md
@@ -0,0 +1,109 @@
+
+
+Opinionated Code Formatter
+
+
+
+ JavaScript
+ · TypeScript
+ · Flow
+ · JSX
+ · JSON
+
+
+
+ CSS
+ · SCSS
+ · Less
+
+
+
+ HTML
+ · Vue
+ · Angular
+
+
+
+ GraphQL
+ · Markdown
+ · YAML
+
+
+
+
+ Your favorite language?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Intro
+
+Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
+
+### Input
+
+
+```js
+foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());
+```
+
+### Output
+
+```js
+foo(
+ reallyLongArg(),
+ omgSoManyParameters(),
+ IShouldRefactorThis(),
+ isThereSeriouslyAnotherOne()
+);
+```
+
+Prettier can be run [in your editor](https://prettier.io/docs/en/editors.html) on-save, in a [pre-commit hook](https://prettier.io/docs/en/precommit.html), or in [CI environments](https://prettier.io/docs/en/cli.html#list-different) to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again!
+
+---
+
+**[Documentation](https://prettier.io/docs/en/)**
+
+
+[Install](https://prettier.io/docs/en/install.html) ·
+[Options](https://prettier.io/docs/en/options.html) ·
+[CLI](https://prettier.io/docs/en/cli.html) ·
+[API](https://prettier.io/docs/en/api.html)
+
+**[Playground](https://prettier.io/playground/)**
+
+---
+
+## Badge
+
+Show the world you're using _Prettier_ → [](https://github.com/prettier/prettier)
+
+```md
+[](https://github.com/prettier/prettier)
+```
+
+## Contributing
+
+See [CONTRIBUTING.md](CONTRIBUTING.md).
diff --git a/node_modules/prettier/bin-prettier.js b/node_modules/prettier/bin-prettier.js
new file mode 100755
index 0000000..2fe860c
--- /dev/null
+++ b/node_modules/prettier/bin-prettier.js
@@ -0,0 +1,64 @@
+#!/usr/bin/env node
+"use strict";
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __commonJS = function(cb, mod) {
+ return function __require() {
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+ };
+};
+
+// node_modules/semver-compare/index.js
+var require_semver_compare = __commonJS({
+ "node_modules/semver-compare/index.js": function(exports2, module2) {
+ module2.exports = function cmp(a, b) {
+ var pa = a.split(".");
+ var pb = b.split(".");
+ for (var i = 0; i < 3; i++) {
+ var na = Number(pa[i]);
+ var nb = Number(pb[i]);
+ if (na > nb)
+ return 1;
+ if (nb > na)
+ return -1;
+ if (!isNaN(na) && isNaN(nb))
+ return 1;
+ if (isNaN(na) && !isNaN(nb))
+ return -1;
+ }
+ return 0;
+ };
+ }
+});
+
+// node_modules/please-upgrade-node/index.js
+var require_please_upgrade_node = __commonJS({
+ "node_modules/please-upgrade-node/index.js": function(exports2, module2) {
+ var semverCompare = require_semver_compare();
+ module2.exports = function pleaseUpgradeNode2(pkg, opts) {
+ var opts = opts || {};
+ var requiredVersion = pkg.engines.node.replace(">=", "");
+ var currentVersion = process.version.replace("v", "");
+ if (semverCompare(currentVersion, requiredVersion) === -1) {
+ if (opts.message) {
+ console.error(opts.message(requiredVersion));
+ } else {
+ console.error(
+ pkg.name + " requires at least version " + requiredVersion + " of Node, please upgrade"
+ );
+ }
+ if (opts.hasOwnProperty("exitCode")) {
+ process.exit(opts.exitCode);
+ } else {
+ process.exit(1);
+ }
+ }
+ };
+ }
+});
+
+// bin/prettier.js
+var pleaseUpgradeNode = require_please_upgrade_node();
+var packageJson = require("./package.json");
+pleaseUpgradeNode(packageJson);
+var cli = require("./cli.js");
+module.exports = cli.run(process.argv.slice(2));
diff --git a/node_modules/prettier/cli.js b/node_modules/prettier/cli.js
new file mode 100644
index 0000000..8812763
--- /dev/null
+++ b/node_modules/prettier/cli.js
@@ -0,0 +1,15364 @@
+"use strict";
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __commonJS = (cb, mod) => function __require() {
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+
+// node_modules/core-js/internals/global.js
+var require_global = __commonJS({
+ "node_modules/core-js/internals/global.js"(exports2, module2) {
+ var check = function(it) {
+ return it && it.Math == Math && it;
+ };
+ module2.exports = check(typeof globalThis == "object" && globalThis) || check(typeof window == "object" && window) || check(typeof self == "object" && self) || check(typeof global == "object" && global) || function() {
+ return this;
+ }() || Function("return this")();
+ }
+});
+
+// node_modules/core-js/internals/fails.js
+var require_fails = __commonJS({
+ "node_modules/core-js/internals/fails.js"(exports2, module2) {
+ module2.exports = function(exec) {
+ try {
+ return !!exec();
+ } catch (error) {
+ return true;
+ }
+ };
+ }
+});
+
+// node_modules/core-js/internals/descriptors.js
+var require_descriptors = __commonJS({
+ "node_modules/core-js/internals/descriptors.js"(exports2, module2) {
+ var fails = require_fails();
+ module2.exports = !fails(function() {
+ return Object.defineProperty({}, 1, { get: function() {
+ return 7;
+ } })[1] != 7;
+ });
+ }
+});
+
+// node_modules/core-js/internals/function-bind-native.js
+var require_function_bind_native = __commonJS({
+ "node_modules/core-js/internals/function-bind-native.js"(exports2, module2) {
+ var fails = require_fails();
+ module2.exports = !fails(function() {
+ var test = function() {
+ }.bind();
+ return typeof test != "function" || test.hasOwnProperty("prototype");
+ });
+ }
+});
+
+// node_modules/core-js/internals/function-call.js
+var require_function_call = __commonJS({
+ "node_modules/core-js/internals/function-call.js"(exports2, module2) {
+ var NATIVE_BIND = require_function_bind_native();
+ var call = Function.prototype.call;
+ module2.exports = NATIVE_BIND ? call.bind(call) : function() {
+ return call.apply(call, arguments);
+ };
+ }
+});
+
+// node_modules/core-js/internals/object-property-is-enumerable.js
+var require_object_property_is_enumerable = __commonJS({
+ "node_modules/core-js/internals/object-property-is-enumerable.js"(exports2) {
+ "use strict";
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+ var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
+ exports2.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
+ var descriptor = getOwnPropertyDescriptor(this, V);
+ return !!descriptor && descriptor.enumerable;
+ } : $propertyIsEnumerable;
+ }
+});
+
+// node_modules/core-js/internals/create-property-descriptor.js
+var require_create_property_descriptor = __commonJS({
+ "node_modules/core-js/internals/create-property-descriptor.js"(exports2, module2) {
+ module2.exports = function(bitmap, value) {
+ return {
+ enumerable: !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable: !(bitmap & 4),
+ value
+ };
+ };
+ }
+});
+
+// node_modules/core-js/internals/function-uncurry-this.js
+var require_function_uncurry_this = __commonJS({
+ "node_modules/core-js/internals/function-uncurry-this.js"(exports2, module2) {
+ var NATIVE_BIND = require_function_bind_native();
+ var FunctionPrototype = Function.prototype;
+ var call = FunctionPrototype.call;
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
+ module2.exports = NATIVE_BIND ? uncurryThisWithBind : function(fn) {
+ return function() {
+ return call.apply(fn, arguments);
+ };
+ };
+ }
+});
+
+// node_modules/core-js/internals/classof-raw.js
+var require_classof_raw = __commonJS({
+ "node_modules/core-js/internals/classof-raw.js"(exports2, module2) {
+ var uncurryThis = require_function_uncurry_this();
+ var toString = uncurryThis({}.toString);
+ var stringSlice = uncurryThis("".slice);
+ module2.exports = function(it) {
+ return stringSlice(toString(it), 8, -1);
+ };
+ }
+});
+
+// node_modules/core-js/internals/indexed-object.js
+var require_indexed_object = __commonJS({
+ "node_modules/core-js/internals/indexed-object.js"(exports2, module2) {
+ var uncurryThis = require_function_uncurry_this();
+ var fails = require_fails();
+ var classof = require_classof_raw();
+ var $Object = Object;
+ var split = uncurryThis("".split);
+ module2.exports = fails(function() {
+ return !$Object("z").propertyIsEnumerable(0);
+ }) ? function(it) {
+ return classof(it) == "String" ? split(it, "") : $Object(it);
+ } : $Object;
+ }
+});
+
+// node_modules/core-js/internals/is-null-or-undefined.js
+var require_is_null_or_undefined = __commonJS({
+ "node_modules/core-js/internals/is-null-or-undefined.js"(exports2, module2) {
+ module2.exports = function(it) {
+ return it === null || it === void 0;
+ };
+ }
+});
+
+// node_modules/core-js/internals/require-object-coercible.js
+var require_require_object_coercible = __commonJS({
+ "node_modules/core-js/internals/require-object-coercible.js"(exports2, module2) {
+ var isNullOrUndefined = require_is_null_or_undefined();
+ var $TypeError = TypeError;
+ module2.exports = function(it) {
+ if (isNullOrUndefined(it))
+ throw $TypeError("Can't call method on " + it);
+ return it;
+ };
+ }
+});
+
+// node_modules/core-js/internals/to-indexed-object.js
+var require_to_indexed_object = __commonJS({
+ "node_modules/core-js/internals/to-indexed-object.js"(exports2, module2) {
+ var IndexedObject = require_indexed_object();
+ var requireObjectCoercible = require_require_object_coercible();
+ module2.exports = function(it) {
+ return IndexedObject(requireObjectCoercible(it));
+ };
+ }
+});
+
+// node_modules/core-js/internals/document-all.js
+var require_document_all = __commonJS({
+ "node_modules/core-js/internals/document-all.js"(exports2, module2) {
+ var documentAll = typeof document == "object" && document.all;
+ var IS_HTMLDDA = typeof documentAll == "undefined" && documentAll !== void 0;
+ module2.exports = {
+ all: documentAll,
+ IS_HTMLDDA
+ };
+ }
+});
+
+// node_modules/core-js/internals/is-callable.js
+var require_is_callable = __commonJS({
+ "node_modules/core-js/internals/is-callable.js"(exports2, module2) {
+ var $documentAll = require_document_all();
+ var documentAll = $documentAll.all;
+ module2.exports = $documentAll.IS_HTMLDDA ? function(argument) {
+ return typeof argument == "function" || argument === documentAll;
+ } : function(argument) {
+ return typeof argument == "function";
+ };
+ }
+});
+
+// node_modules/core-js/internals/is-object.js
+var require_is_object = __commonJS({
+ "node_modules/core-js/internals/is-object.js"(exports2, module2) {
+ var isCallable = require_is_callable();
+ var $documentAll = require_document_all();
+ var documentAll = $documentAll.all;
+ module2.exports = $documentAll.IS_HTMLDDA ? function(it) {
+ return typeof it == "object" ? it !== null : isCallable(it) || it === documentAll;
+ } : function(it) {
+ return typeof it == "object" ? it !== null : isCallable(it);
+ };
+ }
+});
+
+// node_modules/core-js/internals/get-built-in.js
+var require_get_built_in = __commonJS({
+ "node_modules/core-js/internals/get-built-in.js"(exports2, module2) {
+ var global2 = require_global();
+ var isCallable = require_is_callable();
+ var aFunction = function(argument) {
+ return isCallable(argument) ? argument : void 0;
+ };
+ module2.exports = function(namespace, method) {
+ return arguments.length < 2 ? aFunction(global2[namespace]) : global2[namespace] && global2[namespace][method];
+ };
+ }
+});
+
+// node_modules/core-js/internals/object-is-prototype-of.js
+var require_object_is_prototype_of = __commonJS({
+ "node_modules/core-js/internals/object-is-prototype-of.js"(exports2, module2) {
+ var uncurryThis = require_function_uncurry_this();
+ module2.exports = uncurryThis({}.isPrototypeOf);
+ }
+});
+
+// node_modules/core-js/internals/engine-user-agent.js
+var require_engine_user_agent = __commonJS({
+ "node_modules/core-js/internals/engine-user-agent.js"(exports2, module2) {
+ var getBuiltIn = require_get_built_in();
+ module2.exports = getBuiltIn("navigator", "userAgent") || "";
+ }
+});
+
+// node_modules/core-js/internals/engine-v8-version.js
+var require_engine_v8_version = __commonJS({
+ "node_modules/core-js/internals/engine-v8-version.js"(exports2, module2) {
+ var global2 = require_global();
+ var userAgent = require_engine_user_agent();
+ var process2 = global2.process;
+ var Deno = global2.Deno;
+ var versions = process2 && process2.versions || Deno && Deno.version;
+ var v8 = versions && versions.v8;
+ var match;
+ var version;
+ if (v8) {
+ match = v8.split(".");
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
+ }
+ if (!version && userAgent) {
+ match = userAgent.match(/Edge\/(\d+)/);
+ if (!match || match[1] >= 74) {
+ match = userAgent.match(/Chrome\/(\d+)/);
+ if (match)
+ version = +match[1];
+ }
+ }
+ module2.exports = version;
+ }
+});
+
+// node_modules/core-js/internals/symbol-constructor-detection.js
+var require_symbol_constructor_detection = __commonJS({
+ "node_modules/core-js/internals/symbol-constructor-detection.js"(exports2, module2) {
+ var V8_VERSION = require_engine_v8_version();
+ var fails = require_fails();
+ module2.exports = !!Object.getOwnPropertySymbols && !fails(function() {
+ var symbol = Symbol();
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION && V8_VERSION < 41;
+ });
+ }
+});
+
+// node_modules/core-js/internals/use-symbol-as-uid.js
+var require_use_symbol_as_uid = __commonJS({
+ "node_modules/core-js/internals/use-symbol-as-uid.js"(exports2, module2) {
+ var NATIVE_SYMBOL = require_symbol_constructor_detection();
+ module2.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol";
+ }
+});
+
+// node_modules/core-js/internals/is-symbol.js
+var require_is_symbol = __commonJS({
+ "node_modules/core-js/internals/is-symbol.js"(exports2, module2) {
+ var getBuiltIn = require_get_built_in();
+ var isCallable = require_is_callable();
+ var isPrototypeOf = require_object_is_prototype_of();
+ var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
+ var $Object = Object;
+ module2.exports = USE_SYMBOL_AS_UID ? function(it) {
+ return typeof it == "symbol";
+ } : function(it) {
+ var $Symbol = getBuiltIn("Symbol");
+ return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
+ };
+ }
+});
+
+// node_modules/core-js/internals/try-to-string.js
+var require_try_to_string = __commonJS({
+ "node_modules/core-js/internals/try-to-string.js"(exports2, module2) {
+ var $String = String;
+ module2.exports = function(argument) {
+ try {
+ return $String(argument);
+ } catch (error) {
+ return "Object";
+ }
+ };
+ }
+});
+
+// node_modules/core-js/internals/a-callable.js
+var require_a_callable = __commonJS({
+ "node_modules/core-js/internals/a-callable.js"(exports2, module2) {
+ var isCallable = require_is_callable();
+ var tryToString = require_try_to_string();
+ var $TypeError = TypeError;
+ module2.exports = function(argument) {
+ if (isCallable(argument))
+ return argument;
+ throw $TypeError(tryToString(argument) + " is not a function");
+ };
+ }
+});
+
+// node_modules/core-js/internals/get-method.js
+var require_get_method = __commonJS({
+ "node_modules/core-js/internals/get-method.js"(exports2, module2) {
+ var aCallable = require_a_callable();
+ var isNullOrUndefined = require_is_null_or_undefined();
+ module2.exports = function(V, P) {
+ var func = V[P];
+ return isNullOrUndefined(func) ? void 0 : aCallable(func);
+ };
+ }
+});
+
+// node_modules/core-js/internals/ordinary-to-primitive.js
+var require_ordinary_to_primitive = __commonJS({
+ "node_modules/core-js/internals/ordinary-to-primitive.js"(exports2, module2) {
+ var call = require_function_call();
+ var isCallable = require_is_callable();
+ var isObject = require_is_object();
+ var $TypeError = TypeError;
+ module2.exports = function(input, pref) {
+ var fn, val;
+ if (pref === "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
+ return val;
+ if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input)))
+ return val;
+ if (pref !== "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
+ return val;
+ throw $TypeError("Can't convert object to primitive value");
+ };
+ }
+});
+
+// node_modules/core-js/internals/is-pure.js
+var require_is_pure = __commonJS({
+ "node_modules/core-js/internals/is-pure.js"(exports2, module2) {
+ module2.exports = false;
+ }
+});
+
+// node_modules/core-js/internals/define-global-property.js
+var require_define_global_property = __commonJS({
+ "node_modules/core-js/internals/define-global-property.js"(exports2, module2) {
+ var global2 = require_global();
+ var defineProperty = Object.defineProperty;
+ module2.exports = function(key, value) {
+ try {
+ defineProperty(global2, key, { value, configurable: true, writable: true });
+ } catch (error) {
+ global2[key] = value;
+ }
+ return value;
+ };
+ }
+});
+
+// node_modules/core-js/internals/shared-store.js
+var require_shared_store = __commonJS({
+ "node_modules/core-js/internals/shared-store.js"(exports2, module2) {
+ var global2 = require_global();
+ var defineGlobalProperty = require_define_global_property();
+ var SHARED = "__core-js_shared__";
+ var store = global2[SHARED] || defineGlobalProperty(SHARED, {});
+ module2.exports = store;
+ }
+});
+
+// node_modules/core-js/internals/shared.js
+var require_shared = __commonJS({
+ "node_modules/core-js/internals/shared.js"(exports2, module2) {
+ var IS_PURE = require_is_pure();
+ var store = require_shared_store();
+ (module2.exports = function(key, value) {
+ return store[key] || (store[key] = value !== void 0 ? value : {});
+ })("versions", []).push({
+ version: "3.26.1",
+ mode: IS_PURE ? "pure" : "global",
+ copyright: "\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",
+ license: "https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",
+ source: "https://github.com/zloirock/core-js"
+ });
+ }
+});
+
+// node_modules/core-js/internals/to-object.js
+var require_to_object = __commonJS({
+ "node_modules/core-js/internals/to-object.js"(exports2, module2) {
+ var requireObjectCoercible = require_require_object_coercible();
+ var $Object = Object;
+ module2.exports = function(argument) {
+ return $Object(requireObjectCoercible(argument));
+ };
+ }
+});
+
+// node_modules/core-js/internals/has-own-property.js
+var require_has_own_property = __commonJS({
+ "node_modules/core-js/internals/has-own-property.js"(exports2, module2) {
+ var uncurryThis = require_function_uncurry_this();
+ var toObject = require_to_object();
+ var hasOwnProperty = uncurryThis({}.hasOwnProperty);
+ module2.exports = Object.hasOwn || function hasOwn(it, key) {
+ return hasOwnProperty(toObject(it), key);
+ };
+ }
+});
+
+// node_modules/core-js/internals/uid.js
+var require_uid = __commonJS({
+ "node_modules/core-js/internals/uid.js"(exports2, module2) {
+ var uncurryThis = require_function_uncurry_this();
+ var id = 0;
+ var postfix = Math.random();
+ var toString = uncurryThis(1 .toString);
+ module2.exports = function(key) {
+ return "Symbol(" + (key === void 0 ? "" : key) + ")_" + toString(++id + postfix, 36);
+ };
+ }
+});
+
+// node_modules/core-js/internals/well-known-symbol.js
+var require_well_known_symbol = __commonJS({
+ "node_modules/core-js/internals/well-known-symbol.js"(exports2, module2) {
+ var global2 = require_global();
+ var shared = require_shared();
+ var hasOwn = require_has_own_property();
+ var uid = require_uid();
+ var NATIVE_SYMBOL = require_symbol_constructor_detection();
+ var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
+ var WellKnownSymbolsStore = shared("wks");
+ var Symbol2 = global2.Symbol;
+ var symbolFor = Symbol2 && Symbol2["for"];
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
+ module2.exports = function(name) {
+ if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == "string")) {
+ var description = "Symbol." + name;
+ if (NATIVE_SYMBOL && hasOwn(Symbol2, name)) {
+ WellKnownSymbolsStore[name] = Symbol2[name];
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
+ WellKnownSymbolsStore[name] = symbolFor(description);
+ } else {
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
+ }
+ }
+ return WellKnownSymbolsStore[name];
+ };
+ }
+});
+
+// node_modules/core-js/internals/to-primitive.js
+var require_to_primitive = __commonJS({
+ "node_modules/core-js/internals/to-primitive.js"(exports2, module2) {
+ var call = require_function_call();
+ var isObject = require_is_object();
+ var isSymbol = require_is_symbol();
+ var getMethod = require_get_method();
+ var ordinaryToPrimitive = require_ordinary_to_primitive();
+ var wellKnownSymbol = require_well_known_symbol();
+ var $TypeError = TypeError;
+ var TO_PRIMITIVE = wellKnownSymbol("toPrimitive");
+ module2.exports = function(input, pref) {
+ if (!isObject(input) || isSymbol(input))
+ return input;
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
+ var result;
+ if (exoticToPrim) {
+ if (pref === void 0)
+ pref = "default";
+ result = call(exoticToPrim, input, pref);
+ if (!isObject(result) || isSymbol(result))
+ return result;
+ throw $TypeError("Can't convert object to primitive value");
+ }
+ if (pref === void 0)
+ pref = "number";
+ return ordinaryToPrimitive(input, pref);
+ };
+ }
+});
+
+// node_modules/core-js/internals/to-property-key.js
+var require_to_property_key = __commonJS({
+ "node_modules/core-js/internals/to-property-key.js"(exports2, module2) {
+ var toPrimitive = require_to_primitive();
+ var isSymbol = require_is_symbol();
+ module2.exports = function(argument) {
+ var key = toPrimitive(argument, "string");
+ return isSymbol(key) ? key : key + "";
+ };
+ }
+});
+
+// node_modules/core-js/internals/document-create-element.js
+var require_document_create_element = __commonJS({
+ "node_modules/core-js/internals/document-create-element.js"(exports2, module2) {
+ var global2 = require_global();
+ var isObject = require_is_object();
+ var document2 = global2.document;
+ var EXISTS = isObject(document2) && isObject(document2.createElement);
+ module2.exports = function(it) {
+ return EXISTS ? document2.createElement(it) : {};
+ };
+ }
+});
+
+// node_modules/core-js/internals/ie8-dom-define.js
+var require_ie8_dom_define = __commonJS({
+ "node_modules/core-js/internals/ie8-dom-define.js"(exports2, module2) {
+ var DESCRIPTORS = require_descriptors();
+ var fails = require_fails();
+ var createElement = require_document_create_element();
+ module2.exports = !DESCRIPTORS && !fails(function() {
+ return Object.defineProperty(createElement("div"), "a", {
+ get: function() {
+ return 7;
+ }
+ }).a != 7;
+ });
+ }
+});
+
+// node_modules/core-js/internals/object-get-own-property-descriptor.js
+var require_object_get_own_property_descriptor = __commonJS({
+ "node_modules/core-js/internals/object-get-own-property-descriptor.js"(exports2) {
+ var DESCRIPTORS = require_descriptors();
+ var call = require_function_call();
+ var propertyIsEnumerableModule = require_object_property_is_enumerable();
+ var createPropertyDescriptor = require_create_property_descriptor();
+ var toIndexedObject = require_to_indexed_object();
+ var toPropertyKey = require_to_property_key();
+ var hasOwn = require_has_own_property();
+ var IE8_DOM_DEFINE = require_ie8_dom_define();
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+ exports2.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
+ O = toIndexedObject(O);
+ P = toPropertyKey(P);
+ if (IE8_DOM_DEFINE)
+ try {
+ return $getOwnPropertyDescriptor(O, P);
+ } catch (error) {
+ }
+ if (hasOwn(O, P))
+ return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
+ };
+ }
+});
+
+// node_modules/core-js/internals/v8-prototype-define-bug.js
+var require_v8_prototype_define_bug = __commonJS({
+ "node_modules/core-js/internals/v8-prototype-define-bug.js"(exports2, module2) {
+ var DESCRIPTORS = require_descriptors();
+ var fails = require_fails();
+ module2.exports = DESCRIPTORS && fails(function() {
+ return Object.defineProperty(function() {
+ }, "prototype", {
+ value: 42,
+ writable: false
+ }).prototype != 42;
+ });
+ }
+});
+
+// node_modules/core-js/internals/an-object.js
+var require_an_object = __commonJS({
+ "node_modules/core-js/internals/an-object.js"(exports2, module2) {
+ var isObject = require_is_object();
+ var $String = String;
+ var $TypeError = TypeError;
+ module2.exports = function(argument) {
+ if (isObject(argument))
+ return argument;
+ throw $TypeError($String(argument) + " is not an object");
+ };
+ }
+});
+
+// node_modules/core-js/internals/object-define-property.js
+var require_object_define_property = __commonJS({
+ "node_modules/core-js/internals/object-define-property.js"(exports2) {
+ var DESCRIPTORS = require_descriptors();
+ var IE8_DOM_DEFINE = require_ie8_dom_define();
+ var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
+ var anObject = require_an_object();
+ var toPropertyKey = require_to_property_key();
+ var $TypeError = TypeError;
+ var $defineProperty = Object.defineProperty;
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+ var ENUMERABLE = "enumerable";
+ var CONFIGURABLE = "configurable";
+ var WRITABLE = "writable";
+ exports2.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
+ anObject(O);
+ P = toPropertyKey(P);
+ anObject(Attributes);
+ if (typeof O === "function" && P === "prototype" && "value" in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
+ var current = $getOwnPropertyDescriptor(O, P);
+ if (current && current[WRITABLE]) {
+ O[P] = Attributes.value;
+ Attributes = {
+ configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
+ writable: false
+ };
+ }
+ }
+ return $defineProperty(O, P, Attributes);
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
+ anObject(O);
+ P = toPropertyKey(P);
+ anObject(Attributes);
+ if (IE8_DOM_DEFINE)
+ try {
+ return $defineProperty(O, P, Attributes);
+ } catch (error) {
+ }
+ if ("get" in Attributes || "set" in Attributes)
+ throw $TypeError("Accessors not supported");
+ if ("value" in Attributes)
+ O[P] = Attributes.value;
+ return O;
+ };
+ }
+});
+
+// node_modules/core-js/internals/create-non-enumerable-property.js
+var require_create_non_enumerable_property = __commonJS({
+ "node_modules/core-js/internals/create-non-enumerable-property.js"(exports2, module2) {
+ var DESCRIPTORS = require_descriptors();
+ var definePropertyModule = require_object_define_property();
+ var createPropertyDescriptor = require_create_property_descriptor();
+ module2.exports = DESCRIPTORS ? function(object, key, value) {
+ return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
+ } : function(object, key, value) {
+ object[key] = value;
+ return object;
+ };
+ }
+});
+
+// node_modules/core-js/internals/function-name.js
+var require_function_name = __commonJS({
+ "node_modules/core-js/internals/function-name.js"(exports2, module2) {
+ var DESCRIPTORS = require_descriptors();
+ var hasOwn = require_has_own_property();
+ var FunctionPrototype = Function.prototype;
+ var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
+ var EXISTS = hasOwn(FunctionPrototype, "name");
+ var PROPER = EXISTS && function something() {
+ }.name === "something";
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, "name").configurable);
+ module2.exports = {
+ EXISTS,
+ PROPER,
+ CONFIGURABLE
+ };
+ }
+});
+
+// node_modules/core-js/internals/inspect-source.js
+var require_inspect_source = __commonJS({
+ "node_modules/core-js/internals/inspect-source.js"(exports2, module2) {
+ var uncurryThis = require_function_uncurry_this();
+ var isCallable = require_is_callable();
+ var store = require_shared_store();
+ var functionToString = uncurryThis(Function.toString);
+ if (!isCallable(store.inspectSource)) {
+ store.inspectSource = function(it) {
+ return functionToString(it);
+ };
+ }
+ module2.exports = store.inspectSource;
+ }
+});
+
+// node_modules/core-js/internals/weak-map-basic-detection.js
+var require_weak_map_basic_detection = __commonJS({
+ "node_modules/core-js/internals/weak-map-basic-detection.js"(exports2, module2) {
+ var global2 = require_global();
+ var isCallable = require_is_callable();
+ var WeakMap2 = global2.WeakMap;
+ module2.exports = isCallable(WeakMap2) && /native code/.test(String(WeakMap2));
+ }
+});
+
+// node_modules/core-js/internals/shared-key.js
+var require_shared_key = __commonJS({
+ "node_modules/core-js/internals/shared-key.js"(exports2, module2) {
+ var shared = require_shared();
+ var uid = require_uid();
+ var keys = shared("keys");
+ module2.exports = function(key) {
+ return keys[key] || (keys[key] = uid(key));
+ };
+ }
+});
+
+// node_modules/core-js/internals/hidden-keys.js
+var require_hidden_keys = __commonJS({
+ "node_modules/core-js/internals/hidden-keys.js"(exports2, module2) {
+ module2.exports = {};
+ }
+});
+
+// node_modules/core-js/internals/internal-state.js
+var require_internal_state = __commonJS({
+ "node_modules/core-js/internals/internal-state.js"(exports2, module2) {
+ var NATIVE_WEAK_MAP = require_weak_map_basic_detection();
+ var global2 = require_global();
+ var isObject = require_is_object();
+ var createNonEnumerableProperty = require_create_non_enumerable_property();
+ var hasOwn = require_has_own_property();
+ var shared = require_shared_store();
+ var sharedKey = require_shared_key();
+ var hiddenKeys = require_hidden_keys();
+ var OBJECT_ALREADY_INITIALIZED = "Object already initialized";
+ var TypeError2 = global2.TypeError;
+ var WeakMap2 = global2.WeakMap;
+ var set;
+ var get;
+ var has;
+ var enforce = function(it) {
+ return has(it) ? get(it) : set(it, {});
+ };
+ var getterFor = function(TYPE) {
+ return function(it) {
+ var state;
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
+ throw TypeError2("Incompatible receiver, " + TYPE + " required");
+ }
+ return state;
+ };
+ };
+ if (NATIVE_WEAK_MAP || shared.state) {
+ store = shared.state || (shared.state = new WeakMap2());
+ store.get = store.get;
+ store.has = store.has;
+ store.set = store.set;
+ set = function(it, metadata) {
+ if (store.has(it))
+ throw TypeError2(OBJECT_ALREADY_INITIALIZED);
+ metadata.facade = it;
+ store.set(it, metadata);
+ return metadata;
+ };
+ get = function(it) {
+ return store.get(it) || {};
+ };
+ has = function(it) {
+ return store.has(it);
+ };
+ } else {
+ STATE = sharedKey("state");
+ hiddenKeys[STATE] = true;
+ set = function(it, metadata) {
+ if (hasOwn(it, STATE))
+ throw TypeError2(OBJECT_ALREADY_INITIALIZED);
+ metadata.facade = it;
+ createNonEnumerableProperty(it, STATE, metadata);
+ return metadata;
+ };
+ get = function(it) {
+ return hasOwn(it, STATE) ? it[STATE] : {};
+ };
+ has = function(it) {
+ return hasOwn(it, STATE);
+ };
+ }
+ var store;
+ var STATE;
+ module2.exports = {
+ set,
+ get,
+ has,
+ enforce,
+ getterFor
+ };
+ }
+});
+
+// node_modules/core-js/internals/make-built-in.js
+var require_make_built_in = __commonJS({
+ "node_modules/core-js/internals/make-built-in.js"(exports2, module2) {
+ var fails = require_fails();
+ var isCallable = require_is_callable();
+ var hasOwn = require_has_own_property();
+ var DESCRIPTORS = require_descriptors();
+ var CONFIGURABLE_FUNCTION_NAME = require_function_name().CONFIGURABLE;
+ var inspectSource = require_inspect_source();
+ var InternalStateModule = require_internal_state();
+ var enforceInternalState = InternalStateModule.enforce;
+ var getInternalState = InternalStateModule.get;
+ var defineProperty = Object.defineProperty;
+ var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function() {
+ return defineProperty(function() {
+ }, "length", { value: 8 }).length !== 8;
+ });
+ var TEMPLATE = String(String).split("String");
+ var makeBuiltIn = module2.exports = function(value, name, options) {
+ if (String(name).slice(0, 7) === "Symbol(") {
+ name = "[" + String(name).replace(/^Symbol\(([^)]*)\)/, "$1") + "]";
+ }
+ if (options && options.getter)
+ name = "get " + name;
+ if (options && options.setter)
+ name = "set " + name;
+ if (!hasOwn(value, "name") || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
+ if (DESCRIPTORS)
+ defineProperty(value, "name", { value: name, configurable: true });
+ else
+ value.name = name;
+ }
+ if (CONFIGURABLE_LENGTH && options && hasOwn(options, "arity") && value.length !== options.arity) {
+ defineProperty(value, "length", { value: options.arity });
+ }
+ try {
+ if (options && hasOwn(options, "constructor") && options.constructor) {
+ if (DESCRIPTORS)
+ defineProperty(value, "prototype", { writable: false });
+ } else if (value.prototype)
+ value.prototype = void 0;
+ } catch (error) {
+ }
+ var state = enforceInternalState(value);
+ if (!hasOwn(state, "source")) {
+ state.source = TEMPLATE.join(typeof name == "string" ? name : "");
+ }
+ return value;
+ };
+ Function.prototype.toString = makeBuiltIn(function toString() {
+ return isCallable(this) && getInternalState(this).source || inspectSource(this);
+ }, "toString");
+ }
+});
+
+// node_modules/core-js/internals/define-built-in.js
+var require_define_built_in = __commonJS({
+ "node_modules/core-js/internals/define-built-in.js"(exports2, module2) {
+ var isCallable = require_is_callable();
+ var definePropertyModule = require_object_define_property();
+ var makeBuiltIn = require_make_built_in();
+ var defineGlobalProperty = require_define_global_property();
+ module2.exports = function(O, key, value, options) {
+ if (!options)
+ options = {};
+ var simple = options.enumerable;
+ var name = options.name !== void 0 ? options.name : key;
+ if (isCallable(value))
+ makeBuiltIn(value, name, options);
+ if (options.global) {
+ if (simple)
+ O[key] = value;
+ else
+ defineGlobalProperty(key, value);
+ } else {
+ try {
+ if (!options.unsafe)
+ delete O[key];
+ else if (O[key])
+ simple = true;
+ } catch (error) {
+ }
+ if (simple)
+ O[key] = value;
+ else
+ definePropertyModule.f(O, key, {
+ value,
+ enumerable: false,
+ configurable: !options.nonConfigurable,
+ writable: !options.nonWritable
+ });
+ }
+ return O;
+ };
+ }
+});
+
+// node_modules/core-js/internals/math-trunc.js
+var require_math_trunc = __commonJS({
+ "node_modules/core-js/internals/math-trunc.js"(exports2, module2) {
+ var ceil = Math.ceil;
+ var floor = Math.floor;
+ module2.exports = Math.trunc || function trunc(x) {
+ var n = +x;
+ return (n > 0 ? floor : ceil)(n);
+ };
+ }
+});
+
+// node_modules/core-js/internals/to-integer-or-infinity.js
+var require_to_integer_or_infinity = __commonJS({
+ "node_modules/core-js/internals/to-integer-or-infinity.js"(exports2, module2) {
+ var trunc = require_math_trunc();
+ module2.exports = function(argument) {
+ var number = +argument;
+ return number !== number || number === 0 ? 0 : trunc(number);
+ };
+ }
+});
+
+// node_modules/core-js/internals/to-absolute-index.js
+var require_to_absolute_index = __commonJS({
+ "node_modules/core-js/internals/to-absolute-index.js"(exports2, module2) {
+ var toIntegerOrInfinity = require_to_integer_or_infinity();
+ var max = Math.max;
+ var min = Math.min;
+ module2.exports = function(index, length) {
+ var integer = toIntegerOrInfinity(index);
+ return integer < 0 ? max(integer + length, 0) : min(integer, length);
+ };
+ }
+});
+
+// node_modules/core-js/internals/to-length.js
+var require_to_length = __commonJS({
+ "node_modules/core-js/internals/to-length.js"(exports2, module2) {
+ var toIntegerOrInfinity = require_to_integer_or_infinity();
+ var min = Math.min;
+ module2.exports = function(argument) {
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 9007199254740991) : 0;
+ };
+ }
+});
+
+// node_modules/core-js/internals/length-of-array-like.js
+var require_length_of_array_like = __commonJS({
+ "node_modules/core-js/internals/length-of-array-like.js"(exports2, module2) {
+ var toLength = require_to_length();
+ module2.exports = function(obj) {
+ return toLength(obj.length);
+ };
+ }
+});
+
+// node_modules/core-js/internals/array-includes.js
+var require_array_includes = __commonJS({
+ "node_modules/core-js/internals/array-includes.js"(exports2, module2) {
+ var toIndexedObject = require_to_indexed_object();
+ var toAbsoluteIndex = require_to_absolute_index();
+ var lengthOfArrayLike = require_length_of_array_like();
+ var createMethod = function(IS_INCLUDES) {
+ return function($this, el, fromIndex) {
+ var O = toIndexedObject($this);
+ var length = lengthOfArrayLike(O);
+ var index = toAbsoluteIndex(fromIndex, length);
+ var value;
+ if (IS_INCLUDES && el != el)
+ while (length > index) {
+ value = O[index++];
+ if (value != value)
+ return true;
+ }
+ else
+ for (; length > index; index++) {
+ if ((IS_INCLUDES || index in O) && O[index] === el)
+ return IS_INCLUDES || index || 0;
+ }
+ return !IS_INCLUDES && -1;
+ };
+ };
+ module2.exports = {
+ includes: createMethod(true),
+ indexOf: createMethod(false)
+ };
+ }
+});
+
+// node_modules/core-js/internals/object-keys-internal.js
+var require_object_keys_internal = __commonJS({
+ "node_modules/core-js/internals/object-keys-internal.js"(exports2, module2) {
+ var uncurryThis = require_function_uncurry_this();
+ var hasOwn = require_has_own_property();
+ var toIndexedObject = require_to_indexed_object();
+ var indexOf = require_array_includes().indexOf;
+ var hiddenKeys = require_hidden_keys();
+ var push = uncurryThis([].push);
+ module2.exports = function(object, names) {
+ var O = toIndexedObject(object);
+ var i = 0;
+ var result = [];
+ var key;
+ for (key in O)
+ !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
+ while (names.length > i)
+ if (hasOwn(O, key = names[i++])) {
+ ~indexOf(result, key) || push(result, key);
+ }
+ return result;
+ };
+ }
+});
+
+// node_modules/core-js/internals/enum-bug-keys.js
+var require_enum_bug_keys = __commonJS({
+ "node_modules/core-js/internals/enum-bug-keys.js"(exports2, module2) {
+ module2.exports = [
+ "constructor",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "toLocaleString",
+ "toString",
+ "valueOf"
+ ];
+ }
+});
+
+// node_modules/core-js/internals/object-get-own-property-names.js
+var require_object_get_own_property_names = __commonJS({
+ "node_modules/core-js/internals/object-get-own-property-names.js"(exports2) {
+ var internalObjectKeys = require_object_keys_internal();
+ var enumBugKeys = require_enum_bug_keys();
+ var hiddenKeys = enumBugKeys.concat("length", "prototype");
+ exports2.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
+ return internalObjectKeys(O, hiddenKeys);
+ };
+ }
+});
+
+// node_modules/core-js/internals/object-get-own-property-symbols.js
+var require_object_get_own_property_symbols = __commonJS({
+ "node_modules/core-js/internals/object-get-own-property-symbols.js"(exports2) {
+ exports2.f = Object.getOwnPropertySymbols;
+ }
+});
+
+// node_modules/core-js/internals/own-keys.js
+var require_own_keys = __commonJS({
+ "node_modules/core-js/internals/own-keys.js"(exports2, module2) {
+ var getBuiltIn = require_get_built_in();
+ var uncurryThis = require_function_uncurry_this();
+ var getOwnPropertyNamesModule = require_object_get_own_property_names();
+ var getOwnPropertySymbolsModule = require_object_get_own_property_symbols();
+ var anObject = require_an_object();
+ var concat = uncurryThis([].concat);
+ module2.exports = getBuiltIn("Reflect", "ownKeys") || function ownKeys(it) {
+ var keys = getOwnPropertyNamesModule.f(anObject(it));
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
+ return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
+ };
+ }
+});
+
+// node_modules/core-js/internals/copy-constructor-properties.js
+var require_copy_constructor_properties = __commonJS({
+ "node_modules/core-js/internals/copy-constructor-properties.js"(exports2, module2) {
+ var hasOwn = require_has_own_property();
+ var ownKeys = require_own_keys();
+ var getOwnPropertyDescriptorModule = require_object_get_own_property_descriptor();
+ var definePropertyModule = require_object_define_property();
+ module2.exports = function(target, source, exceptions) {
+ var keys = ownKeys(source);
+ var defineProperty = definePropertyModule.f;
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
+ }
+ }
+ };
+ }
+});
+
+// node_modules/core-js/internals/is-forced.js
+var require_is_forced = __commonJS({
+ "node_modules/core-js/internals/is-forced.js"(exports2, module2) {
+ var fails = require_fails();
+ var isCallable = require_is_callable();
+ var replacement = /#|\.prototype\./;
+ var isForced = function(feature, detection) {
+ var value = data[normalize(feature)];
+ return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
+ };
+ var normalize = isForced.normalize = function(string) {
+ return String(string).replace(replacement, ".").toLowerCase();
+ };
+ var data = isForced.data = {};
+ var NATIVE = isForced.NATIVE = "N";
+ var POLYFILL = isForced.POLYFILL = "P";
+ module2.exports = isForced;
+ }
+});
+
+// node_modules/core-js/internals/export.js
+var require_export = __commonJS({
+ "node_modules/core-js/internals/export.js"(exports2, module2) {
+ var global2 = require_global();
+ var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
+ var createNonEnumerableProperty = require_create_non_enumerable_property();
+ var defineBuiltIn = require_define_built_in();
+ var defineGlobalProperty = require_define_global_property();
+ var copyConstructorProperties = require_copy_constructor_properties();
+ var isForced = require_is_forced();
+ module2.exports = function(options, source) {
+ var TARGET = options.target;
+ var GLOBAL = options.global;
+ var STATIC = options.stat;
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
+ if (GLOBAL) {
+ target = global2;
+ } else if (STATIC) {
+ target = global2[TARGET] || defineGlobalProperty(TARGET, {});
+ } else {
+ target = (global2[TARGET] || {}).prototype;
+ }
+ if (target)
+ for (key in source) {
+ sourceProperty = source[key];
+ if (options.dontCallGetSet) {
+ descriptor = getOwnPropertyDescriptor(target, key);
+ targetProperty = descriptor && descriptor.value;
+ } else
+ targetProperty = target[key];
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced);
+ if (!FORCED && targetProperty !== void 0) {
+ if (typeof sourceProperty == typeof targetProperty)
+ continue;
+ copyConstructorProperties(sourceProperty, targetProperty);
+ }
+ if (options.sham || targetProperty && targetProperty.sham) {
+ createNonEnumerableProperty(sourceProperty, "sham", true);
+ }
+ defineBuiltIn(target, key, sourceProperty, options);
+ }
+ };
+ }
+});
+
+// node_modules/core-js/internals/function-uncurry-this-clause.js
+var require_function_uncurry_this_clause = __commonJS({
+ "node_modules/core-js/internals/function-uncurry-this-clause.js"(exports2, module2) {
+ var classofRaw = require_classof_raw();
+ var uncurryThis = require_function_uncurry_this();
+ module2.exports = function(fn) {
+ if (classofRaw(fn) === "Function")
+ return uncurryThis(fn);
+ };
+ }
+});
+
+// node_modules/core-js/internals/function-bind-context.js
+var require_function_bind_context = __commonJS({
+ "node_modules/core-js/internals/function-bind-context.js"(exports2, module2) {
+ var uncurryThis = require_function_uncurry_this_clause();
+ var aCallable = require_a_callable();
+ var NATIVE_BIND = require_function_bind_native();
+ var bind = uncurryThis(uncurryThis.bind);
+ module2.exports = function(fn, that) {
+ aCallable(fn);
+ return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function() {
+ return fn.apply(that, arguments);
+ };
+ };
+ }
+});
+
+// node_modules/core-js/internals/iterators.js
+var require_iterators = __commonJS({
+ "node_modules/core-js/internals/iterators.js"(exports2, module2) {
+ module2.exports = {};
+ }
+});
+
+// node_modules/core-js/internals/is-array-iterator-method.js
+var require_is_array_iterator_method = __commonJS({
+ "node_modules/core-js/internals/is-array-iterator-method.js"(exports2, module2) {
+ var wellKnownSymbol = require_well_known_symbol();
+ var Iterators = require_iterators();
+ var ITERATOR = wellKnownSymbol("iterator");
+ var ArrayPrototype = Array.prototype;
+ module2.exports = function(it) {
+ return it !== void 0 && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
+ };
+ }
+});
+
+// node_modules/core-js/internals/to-string-tag-support.js
+var require_to_string_tag_support = __commonJS({
+ "node_modules/core-js/internals/to-string-tag-support.js"(exports2, module2) {
+ var wellKnownSymbol = require_well_known_symbol();
+ var TO_STRING_TAG = wellKnownSymbol("toStringTag");
+ var test = {};
+ test[TO_STRING_TAG] = "z";
+ module2.exports = String(test) === "[object z]";
+ }
+});
+
+// node_modules/core-js/internals/classof.js
+var require_classof = __commonJS({
+ "node_modules/core-js/internals/classof.js"(exports2, module2) {
+ var TO_STRING_TAG_SUPPORT = require_to_string_tag_support();
+ var isCallable = require_is_callable();
+ var classofRaw = require_classof_raw();
+ var wellKnownSymbol = require_well_known_symbol();
+ var TO_STRING_TAG = wellKnownSymbol("toStringTag");
+ var $Object = Object;
+ var CORRECT_ARGUMENTS = classofRaw(function() {
+ return arguments;
+ }()) == "Arguments";
+ var tryGet = function(it, key) {
+ try {
+ return it[key];
+ } catch (error) {
+ }
+ };
+ module2.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {
+ var O, tag, result;
+ return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == "string" ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) == "Object" && isCallable(O.callee) ? "Arguments" : result;
+ };
+ }
+});
+
+// node_modules/core-js/internals/get-iterator-method.js
+var require_get_iterator_method = __commonJS({
+ "node_modules/core-js/internals/get-iterator-method.js"(exports2, module2) {
+ var classof = require_classof();
+ var getMethod = require_get_method();
+ var isNullOrUndefined = require_is_null_or_undefined();
+ var Iterators = require_iterators();
+ var wellKnownSymbol = require_well_known_symbol();
+ var ITERATOR = wellKnownSymbol("iterator");
+ module2.exports = function(it) {
+ if (!isNullOrUndefined(it))
+ return getMethod(it, ITERATOR) || getMethod(it, "@@iterator") || Iterators[classof(it)];
+ };
+ }
+});
+
+// node_modules/core-js/internals/get-iterator.js
+var require_get_iterator = __commonJS({
+ "node_modules/core-js/internals/get-iterator.js"(exports2, module2) {
+ var call = require_function_call();
+ var aCallable = require_a_callable();
+ var anObject = require_an_object();
+ var tryToString = require_try_to_string();
+ var getIteratorMethod = require_get_iterator_method();
+ var $TypeError = TypeError;
+ module2.exports = function(argument, usingIterator) {
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
+ if (aCallable(iteratorMethod))
+ return anObject(call(iteratorMethod, argument));
+ throw $TypeError(tryToString(argument) + " is not iterable");
+ };
+ }
+});
+
+// node_modules/core-js/internals/iterator-close.js
+var require_iterator_close = __commonJS({
+ "node_modules/core-js/internals/iterator-close.js"(exports2, module2) {
+ var call = require_function_call();
+ var anObject = require_an_object();
+ var getMethod = require_get_method();
+ module2.exports = function(iterator, kind, value) {
+ var innerResult, innerError;
+ anObject(iterator);
+ try {
+ innerResult = getMethod(iterator, "return");
+ if (!innerResult) {
+ if (kind === "throw")
+ throw value;
+ return value;
+ }
+ innerResult = call(innerResult, iterator);
+ } catch (error) {
+ innerError = true;
+ innerResult = error;
+ }
+ if (kind === "throw")
+ throw value;
+ if (innerError)
+ throw innerResult;
+ anObject(innerResult);
+ return value;
+ };
+ }
+});
+
+// node_modules/core-js/internals/iterate.js
+var require_iterate = __commonJS({
+ "node_modules/core-js/internals/iterate.js"(exports2, module2) {
+ var bind = require_function_bind_context();
+ var call = require_function_call();
+ var anObject = require_an_object();
+ var tryToString = require_try_to_string();
+ var isArrayIteratorMethod = require_is_array_iterator_method();
+ var lengthOfArrayLike = require_length_of_array_like();
+ var isPrototypeOf = require_object_is_prototype_of();
+ var getIterator = require_get_iterator();
+ var getIteratorMethod = require_get_iterator_method();
+ var iteratorClose = require_iterator_close();
+ var $TypeError = TypeError;
+ var Result = function(stopped, result) {
+ this.stopped = stopped;
+ this.result = result;
+ };
+ var ResultPrototype = Result.prototype;
+ module2.exports = function(iterable, unboundFunction, options) {
+ var that = options && options.that;
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
+ var IS_RECORD = !!(options && options.IS_RECORD);
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
+ var fn = bind(unboundFunction, that);
+ var iterator, iterFn, index, length, result, next, step;
+ var stop = function(condition) {
+ if (iterator)
+ iteratorClose(iterator, "normal", condition);
+ return new Result(true, condition);
+ };
+ var callFn = function(value) {
+ if (AS_ENTRIES) {
+ anObject(value);
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
+ }
+ return INTERRUPTED ? fn(value, stop) : fn(value);
+ };
+ if (IS_RECORD) {
+ iterator = iterable.iterator;
+ } else if (IS_ITERATOR) {
+ iterator = iterable;
+ } else {
+ iterFn = getIteratorMethod(iterable);
+ if (!iterFn)
+ throw $TypeError(tryToString(iterable) + " is not iterable");
+ if (isArrayIteratorMethod(iterFn)) {
+ for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
+ result = callFn(iterable[index]);
+ if (result && isPrototypeOf(ResultPrototype, result))
+ return result;
+ }
+ return new Result(false);
+ }
+ iterator = getIterator(iterable, iterFn);
+ }
+ next = IS_RECORD ? iterable.next : iterator.next;
+ while (!(step = call(next, iterator)).done) {
+ try {
+ result = callFn(step.value);
+ } catch (error) {
+ iteratorClose(iterator, "throw", error);
+ }
+ if (typeof result == "object" && result && isPrototypeOf(ResultPrototype, result))
+ return result;
+ }
+ return new Result(false);
+ };
+ }
+});
+
+// node_modules/core-js/internals/create-property.js
+var require_create_property = __commonJS({
+ "node_modules/core-js/internals/create-property.js"(exports2, module2) {
+ "use strict";
+ var toPropertyKey = require_to_property_key();
+ var definePropertyModule = require_object_define_property();
+ var createPropertyDescriptor = require_create_property_descriptor();
+ module2.exports = function(object, key, value) {
+ var propertyKey = toPropertyKey(key);
+ if (propertyKey in object)
+ definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
+ else
+ object[propertyKey] = value;
+ };
+ }
+});
+
+// node_modules/core-js/modules/es.object.from-entries.js
+var require_es_object_from_entries = __commonJS({
+ "node_modules/core-js/modules/es.object.from-entries.js"() {
+ var $ = require_export();
+ var iterate = require_iterate();
+ var createProperty = require_create_property();
+ $({ target: "Object", stat: true }, {
+ fromEntries: function fromEntries(iterable) {
+ var obj = {};
+ iterate(iterable, function(k, v) {
+ createProperty(obj, k, v);
+ }, { AS_ENTRIES: true });
+ return obj;
+ }
+ });
+ }
+});
+
+// node_modules/core-js/internals/is-array.js
+var require_is_array = __commonJS({
+ "node_modules/core-js/internals/is-array.js"(exports2, module2) {
+ var classof = require_classof_raw();
+ module2.exports = Array.isArray || function isArray(argument) {
+ return classof(argument) == "Array";
+ };
+ }
+});
+
+// node_modules/core-js/internals/does-not-exceed-safe-integer.js
+var require_does_not_exceed_safe_integer = __commonJS({
+ "node_modules/core-js/internals/does-not-exceed-safe-integer.js"(exports2, module2) {
+ var $TypeError = TypeError;
+ var MAX_SAFE_INTEGER = 9007199254740991;
+ module2.exports = function(it) {
+ if (it > MAX_SAFE_INTEGER)
+ throw $TypeError("Maximum allowed index exceeded");
+ return it;
+ };
+ }
+});
+
+// node_modules/core-js/internals/flatten-into-array.js
+var require_flatten_into_array = __commonJS({
+ "node_modules/core-js/internals/flatten-into-array.js"(exports2, module2) {
+ "use strict";
+ var isArray = require_is_array();
+ var lengthOfArrayLike = require_length_of_array_like();
+ var doesNotExceedSafeInteger = require_does_not_exceed_safe_integer();
+ var bind = require_function_bind_context();
+ var flattenIntoArray = function(target, original, source, sourceLen, start, depth, mapper, thisArg) {
+ var targetIndex = start;
+ var sourceIndex = 0;
+ var mapFn = mapper ? bind(mapper, thisArg) : false;
+ var element, elementLen;
+ while (sourceIndex < sourceLen) {
+ if (sourceIndex in source) {
+ element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
+ if (depth > 0 && isArray(element)) {
+ elementLen = lengthOfArrayLike(element);
+ targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;
+ } else {
+ doesNotExceedSafeInteger(targetIndex + 1);
+ target[targetIndex] = element;
+ }
+ targetIndex++;
+ }
+ sourceIndex++;
+ }
+ return targetIndex;
+ };
+ module2.exports = flattenIntoArray;
+ }
+});
+
+// node_modules/core-js/internals/is-constructor.js
+var require_is_constructor = __commonJS({
+ "node_modules/core-js/internals/is-constructor.js"(exports2, module2) {
+ var uncurryThis = require_function_uncurry_this();
+ var fails = require_fails();
+ var isCallable = require_is_callable();
+ var classof = require_classof();
+ var getBuiltIn = require_get_built_in();
+ var inspectSource = require_inspect_source();
+ var noop = function() {
+ };
+ var empty = [];
+ var construct = getBuiltIn("Reflect", "construct");
+ var constructorRegExp = /^\s*(?:class|function)\b/;
+ var exec = uncurryThis(constructorRegExp.exec);
+ var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
+ var isConstructorModern = function isConstructor(argument) {
+ if (!isCallable(argument))
+ return false;
+ try {
+ construct(noop, empty, argument);
+ return true;
+ } catch (error) {
+ return false;
+ }
+ };
+ var isConstructorLegacy = function isConstructor(argument) {
+ if (!isCallable(argument))
+ return false;
+ switch (classof(argument)) {
+ case "AsyncFunction":
+ case "GeneratorFunction":
+ case "AsyncGeneratorFunction":
+ return false;
+ }
+ try {
+ return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
+ } catch (error) {
+ return true;
+ }
+ };
+ isConstructorLegacy.sham = true;
+ module2.exports = !construct || fails(function() {
+ var called;
+ return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function() {
+ called = true;
+ }) || called;
+ }) ? isConstructorLegacy : isConstructorModern;
+ }
+});
+
+// node_modules/core-js/internals/array-species-constructor.js
+var require_array_species_constructor = __commonJS({
+ "node_modules/core-js/internals/array-species-constructor.js"(exports2, module2) {
+ var isArray = require_is_array();
+ var isConstructor = require_is_constructor();
+ var isObject = require_is_object();
+ var wellKnownSymbol = require_well_known_symbol();
+ var SPECIES = wellKnownSymbol("species");
+ var $Array = Array;
+ module2.exports = function(originalArray) {
+ var C;
+ if (isArray(originalArray)) {
+ C = originalArray.constructor;
+ if (isConstructor(C) && (C === $Array || isArray(C.prototype)))
+ C = void 0;
+ else if (isObject(C)) {
+ C = C[SPECIES];
+ if (C === null)
+ C = void 0;
+ }
+ }
+ return C === void 0 ? $Array : C;
+ };
+ }
+});
+
+// node_modules/core-js/internals/array-species-create.js
+var require_array_species_create = __commonJS({
+ "node_modules/core-js/internals/array-species-create.js"(exports2, module2) {
+ var arraySpeciesConstructor = require_array_species_constructor();
+ module2.exports = function(originalArray, length) {
+ return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
+ };
+ }
+});
+
+// node_modules/core-js/modules/es.array.flat-map.js
+var require_es_array_flat_map = __commonJS({
+ "node_modules/core-js/modules/es.array.flat-map.js"() {
+ "use strict";
+ var $ = require_export();
+ var flattenIntoArray = require_flatten_into_array();
+ var aCallable = require_a_callable();
+ var toObject = require_to_object();
+ var lengthOfArrayLike = require_length_of_array_like();
+ var arraySpeciesCreate = require_array_species_create();
+ $({ target: "Array", proto: true }, {
+ flatMap: function flatMap(callbackfn) {
+ var O = toObject(this);
+ var sourceLen = lengthOfArrayLike(O);
+ var A;
+ aCallable(callbackfn);
+ A = arraySpeciesCreate(O, 0);
+ A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : void 0);
+ return A;
+ }
+ });
+ }
+});
+
+// node_modules/core-js/modules/es.array.flat.js
+var require_es_array_flat = __commonJS({
+ "node_modules/core-js/modules/es.array.flat.js"() {
+ "use strict";
+ var $ = require_export();
+ var flattenIntoArray = require_flatten_into_array();
+ var toObject = require_to_object();
+ var lengthOfArrayLike = require_length_of_array_like();
+ var toIntegerOrInfinity = require_to_integer_or_infinity();
+ var arraySpeciesCreate = require_array_species_create();
+ $({ target: "Array", proto: true }, {
+ flat: function flat() {
+ var depthArg = arguments.length ? arguments[0] : void 0;
+ var O = toObject(this);
+ var sourceLen = lengthOfArrayLike(O);
+ var A = arraySpeciesCreate(O, 0);
+ A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === void 0 ? 1 : toIntegerOrInfinity(depthArg));
+ return A;
+ }
+ });
+ }
+});
+
+// node_modules/core-js/internals/define-built-in-accessor.js
+var require_define_built_in_accessor = __commonJS({
+ "node_modules/core-js/internals/define-built-in-accessor.js"(exports2, module2) {
+ var makeBuiltIn = require_make_built_in();
+ var defineProperty = require_object_define_property();
+ module2.exports = function(target, name, descriptor) {
+ if (descriptor.get)
+ makeBuiltIn(descriptor.get, name, { getter: true });
+ if (descriptor.set)
+ makeBuiltIn(descriptor.set, name, { setter: true });
+ return defineProperty.f(target, name, descriptor);
+ };
+ }
+});
+
+// node_modules/core-js/internals/regexp-flags.js
+var require_regexp_flags = __commonJS({
+ "node_modules/core-js/internals/regexp-flags.js"(exports2, module2) {
+ "use strict";
+ var anObject = require_an_object();
+ module2.exports = function() {
+ var that = anObject(this);
+ var result = "";
+ if (that.hasIndices)
+ result += "d";
+ if (that.global)
+ result += "g";
+ if (that.ignoreCase)
+ result += "i";
+ if (that.multiline)
+ result += "m";
+ if (that.dotAll)
+ result += "s";
+ if (that.unicode)
+ result += "u";
+ if (that.unicodeSets)
+ result += "v";
+ if (that.sticky)
+ result += "y";
+ return result;
+ };
+ }
+});
+
+// node_modules/core-js/modules/es.regexp.flags.js
+var require_es_regexp_flags = __commonJS({
+ "node_modules/core-js/modules/es.regexp.flags.js"() {
+ var global2 = require_global();
+ var DESCRIPTORS = require_descriptors();
+ var defineBuiltInAccessor = require_define_built_in_accessor();
+ var regExpFlags = require_regexp_flags();
+ var fails = require_fails();
+ var RegExp2 = global2.RegExp;
+ var RegExpPrototype = RegExp2.prototype;
+ var FORCED = DESCRIPTORS && fails(function() {
+ var INDICES_SUPPORT = true;
+ try {
+ RegExp2(".", "d");
+ } catch (error) {
+ INDICES_SUPPORT = false;
+ }
+ var O = {};
+ var calls = "";
+ var expected = INDICES_SUPPORT ? "dgimsy" : "gimsy";
+ var addGetter = function(key2, chr) {
+ Object.defineProperty(O, key2, { get: function() {
+ calls += chr;
+ return true;
+ } });
+ };
+ var pairs = {
+ dotAll: "s",
+ global: "g",
+ ignoreCase: "i",
+ multiline: "m",
+ sticky: "y"
+ };
+ if (INDICES_SUPPORT)
+ pairs.hasIndices = "d";
+ for (var key in pairs)
+ addGetter(key, pairs[key]);
+ var result = Object.getOwnPropertyDescriptor(RegExpPrototype, "flags").get.call(O);
+ return result !== expected || calls !== expected;
+ });
+ if (FORCED)
+ defineBuiltInAccessor(RegExpPrototype, "flags", {
+ configurable: true,
+ get: regExpFlags
+ });
+ }
+});
+
+// dist/_cli.js.cjs.js
+require_es_object_from_entries();
+require_es_array_flat_map();
+require_es_array_flat();
+require_es_regexp_flags();
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames2 = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __esm = (fn, res) => function __init() {
+ return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
+};
+var __commonJS2 = (cb, mod) => function __require() {
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = {
+ exports: {}
+ }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, {
+ get: all[name],
+ enumerable: true
+ });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, {
+ get: () => from[key],
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
+ });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
+ value: mod,
+ enumerable: true
+}) : target, mod));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
+ value: true
+}), mod);
+var require_fast_json_stable_stringify = __commonJS2({
+ "node_modules/fast-json-stable-stringify/index.js"(exports2, module2) {
+ "use strict";
+ module2.exports = function(data, opts) {
+ if (!opts)
+ opts = {};
+ if (typeof opts === "function")
+ opts = {
+ cmp: opts
+ };
+ var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false;
+ var cmp = opts.cmp && function(f) {
+ return function(node) {
+ return function(a, b) {
+ var aobj = {
+ key: a,
+ value: node[a]
+ };
+ var bobj = {
+ key: b,
+ value: node[b]
+ };
+ return f(aobj, bobj);
+ };
+ };
+ }(opts.cmp);
+ var seen = [];
+ return function stringify2(node) {
+ if (node && node.toJSON && typeof node.toJSON === "function") {
+ node = node.toJSON();
+ }
+ if (node === void 0)
+ return;
+ if (typeof node == "number")
+ return isFinite(node) ? "" + node : "null";
+ if (typeof node !== "object")
+ return JSON.stringify(node);
+ var i, out;
+ if (Array.isArray(node)) {
+ out = "[";
+ for (i = 0; i < node.length; i++) {
+ if (i)
+ out += ",";
+ out += stringify2(node[i]) || "null";
+ }
+ return out + "]";
+ }
+ if (node === null)
+ return "null";
+ if (seen.indexOf(node) !== -1) {
+ if (cycles)
+ return JSON.stringify("__cycle__");
+ throw new TypeError("Converting circular structure to JSON");
+ }
+ var seenIndex = seen.push(node) - 1;
+ var keys = Object.keys(node).sort(cmp && cmp(node));
+ out = "";
+ for (i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = stringify2(node[key]);
+ if (!value)
+ continue;
+ if (out)
+ out += ",";
+ out += JSON.stringify(key) + ":" + value;
+ }
+ seen.splice(seenIndex, 1);
+ return "{" + out + "}";
+ }(data);
+ };
+ }
+});
+var require_clone = __commonJS2({
+ "node_modules/clone/clone.js"(exports2, module2) {
+ var clone = function() {
+ "use strict";
+ function clone2(parent, circular, depth, prototype) {
+ var filter;
+ if (typeof circular === "object") {
+ depth = circular.depth;
+ prototype = circular.prototype;
+ filter = circular.filter;
+ circular = circular.circular;
+ }
+ var allParents = [];
+ var allChildren = [];
+ var useBuffer = typeof Buffer != "undefined";
+ if (typeof circular == "undefined")
+ circular = true;
+ if (typeof depth == "undefined")
+ depth = Infinity;
+ function _clone(parent2, depth2) {
+ if (parent2 === null)
+ return null;
+ if (depth2 == 0)
+ return parent2;
+ var child;
+ var proto2;
+ if (typeof parent2 != "object") {
+ return parent2;
+ }
+ if (clone2.__isArray(parent2)) {
+ child = [];
+ } else if (clone2.__isRegExp(parent2)) {
+ child = new RegExp(parent2.source, __getRegExpFlags(parent2));
+ if (parent2.lastIndex)
+ child.lastIndex = parent2.lastIndex;
+ } else if (clone2.__isDate(parent2)) {
+ child = new Date(parent2.getTime());
+ } else if (useBuffer && Buffer.isBuffer(parent2)) {
+ if (Buffer.allocUnsafe) {
+ child = Buffer.allocUnsafe(parent2.length);
+ } else {
+ child = new Buffer(parent2.length);
+ }
+ parent2.copy(child);
+ return child;
+ } else {
+ if (typeof prototype == "undefined") {
+ proto2 = Object.getPrototypeOf(parent2);
+ child = Object.create(proto2);
+ } else {
+ child = Object.create(prototype);
+ proto2 = prototype;
+ }
+ }
+ if (circular) {
+ var index = allParents.indexOf(parent2);
+ if (index != -1) {
+ return allChildren[index];
+ }
+ allParents.push(parent2);
+ allChildren.push(child);
+ }
+ for (var i in parent2) {
+ var attrs;
+ if (proto2) {
+ attrs = Object.getOwnPropertyDescriptor(proto2, i);
+ }
+ if (attrs && attrs.set == null) {
+ continue;
+ }
+ child[i] = _clone(parent2[i], depth2 - 1);
+ }
+ return child;
+ }
+ return _clone(parent, depth);
+ }
+ clone2.clonePrototype = function clonePrototype(parent) {
+ if (parent === null)
+ return null;
+ var c = function() {
+ };
+ c.prototype = parent;
+ return new c();
+ };
+ function __objToStr(o) {
+ return Object.prototype.toString.call(o);
+ }
+ ;
+ clone2.__objToStr = __objToStr;
+ function __isDate(o) {
+ return typeof o === "object" && __objToStr(o) === "[object Date]";
+ }
+ ;
+ clone2.__isDate = __isDate;
+ function __isArray(o) {
+ return typeof o === "object" && __objToStr(o) === "[object Array]";
+ }
+ ;
+ clone2.__isArray = __isArray;
+ function __isRegExp(o) {
+ return typeof o === "object" && __objToStr(o) === "[object RegExp]";
+ }
+ ;
+ clone2.__isRegExp = __isRegExp;
+ function __getRegExpFlags(re) {
+ var flags = "";
+ if (re.global)
+ flags += "g";
+ if (re.ignoreCase)
+ flags += "i";
+ if (re.multiline)
+ flags += "m";
+ return flags;
+ }
+ ;
+ clone2.__getRegExpFlags = __getRegExpFlags;
+ return clone2;
+ }();
+ if (typeof module2 === "object" && module2.exports) {
+ module2.exports = clone;
+ }
+ }
+});
+var require_defaults = __commonJS2({
+ "node_modules/defaults/index.js"(exports2, module2) {
+ var clone = require_clone();
+ module2.exports = function(options, defaults) {
+ options = options || {};
+ Object.keys(defaults).forEach(function(key) {
+ if (typeof options[key] === "undefined") {
+ options[key] = clone(defaults[key]);
+ }
+ });
+ return options;
+ };
+ }
+});
+var require_combining = __commonJS2({
+ "node_modules/wcwidth/combining.js"(exports2, module2) {
+ 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]];
+ }
+});
+var require_wcwidth = __commonJS2({
+ "node_modules/wcwidth/index.js"(exports2, module2) {
+ "use strict";
+ var defaults = require_defaults();
+ var combining = require_combining();
+ var DEFAULTS = {
+ nul: 0,
+ control: 0
+ };
+ module2.exports = function wcwidth2(str) {
+ return wcswidth(str, DEFAULTS);
+ };
+ module2.exports.config = function(opts) {
+ opts = defaults(opts || {}, DEFAULTS);
+ return function wcwidth2(str) {
+ return wcswidth(str, opts);
+ };
+ };
+ function wcswidth(str, opts) {
+ if (typeof str !== "string")
+ return wcwidth(str, opts);
+ var s = 0;
+ for (var i = 0; i < str.length; i++) {
+ var n = wcwidth(str.charCodeAt(i), opts);
+ if (n < 0)
+ return -1;
+ s += n;
+ }
+ return s;
+ }
+ function wcwidth(ucs, opts) {
+ if (ucs === 0)
+ return opts.nul;
+ if (ucs < 32 || ucs >= 127 && ucs < 160)
+ return opts.control;
+ if (bisearch(ucs))
+ return 0;
+ 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));
+ }
+ function bisearch(ucs) {
+ var min = 0;
+ var max = combining.length - 1;
+ var mid;
+ if (ucs < combining[0][0] || ucs > combining[max][1])
+ return false;
+ while (max >= min) {
+ mid = Math.floor((min + max) / 2);
+ if (ucs > combining[mid][1])
+ min = mid + 1;
+ else if (ucs < combining[mid][0])
+ max = mid - 1;
+ else
+ return true;
+ }
+ return false;
+ }
+ }
+});
+function ansiRegex({
+ onlyFirst = false
+} = {}) {
+ 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("|");
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
+}
+var init_ansi_regex = __esm({
+ "node_modules/strip-ansi/node_modules/ansi-regex/index.js"() {
+ }
+});
+var strip_ansi_exports = {};
+__export(strip_ansi_exports, {
+ default: () => stripAnsi
+});
+function stripAnsi(string) {
+ if (typeof string !== "string") {
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
+ }
+ return string.replace(ansiRegex(), "");
+}
+var init_strip_ansi = __esm({
+ "node_modules/strip-ansi/index.js"() {
+ init_ansi_regex();
+ }
+});
+function assembleStyles() {
+ const codes = /* @__PURE__ */ new Map();
+ const styles2 = {
+ modifier: {
+ reset: [0, 0],
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ overline: [53, 55],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29]
+ },
+ color: {
+ black: [30, 39],
+ red: [31, 39],
+ green: [32, 39],
+ yellow: [33, 39],
+ blue: [34, 39],
+ magenta: [35, 39],
+ cyan: [36, 39],
+ white: [37, 39],
+ blackBright: [90, 39],
+ redBright: [91, 39],
+ greenBright: [92, 39],
+ yellowBright: [93, 39],
+ blueBright: [94, 39],
+ magentaBright: [95, 39],
+ cyanBright: [96, 39],
+ whiteBright: [97, 39]
+ },
+ bgColor: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+ bgBlackBright: [100, 49],
+ bgRedBright: [101, 49],
+ bgGreenBright: [102, 49],
+ bgYellowBright: [103, 49],
+ bgBlueBright: [104, 49],
+ bgMagentaBright: [105, 49],
+ bgCyanBright: [106, 49],
+ bgWhiteBright: [107, 49]
+ }
+ };
+ styles2.color.gray = styles2.color.blackBright;
+ styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
+ styles2.color.grey = styles2.color.blackBright;
+ styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
+ for (const [groupName, group] of Object.entries(styles2)) {
+ for (const [styleName, style] of Object.entries(group)) {
+ styles2[styleName] = {
+ open: `\x1B[${style[0]}m`,
+ close: `\x1B[${style[1]}m`
+ };
+ group[styleName] = styles2[styleName];
+ codes.set(style[0], style[1]);
+ }
+ Object.defineProperty(styles2, groupName, {
+ value: group,
+ enumerable: false
+ });
+ }
+ Object.defineProperty(styles2, "codes", {
+ value: codes,
+ enumerable: false
+ });
+ styles2.color.close = "\x1B[39m";
+ styles2.bgColor.close = "\x1B[49m";
+ styles2.color.ansi = wrapAnsi16();
+ styles2.color.ansi256 = wrapAnsi256();
+ styles2.color.ansi16m = wrapAnsi16m();
+ styles2.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
+ styles2.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
+ styles2.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
+ Object.defineProperties(styles2, {
+ rgbToAnsi256: {
+ value: (red, green, blue) => {
+ if (red === green && green === blue) {
+ if (red < 8) {
+ return 16;
+ }
+ if (red > 248) {
+ return 231;
+ }
+ return Math.round((red - 8) / 247 * 24) + 232;
+ }
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
+ },
+ enumerable: false
+ },
+ hexToRgb: {
+ value: (hex) => {
+ const matches = /(?[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
+ if (!matches) {
+ return [0, 0, 0];
+ }
+ let {
+ colorString
+ } = matches.groups;
+ if (colorString.length === 3) {
+ colorString = [...colorString].map((character) => character + character).join("");
+ }
+ const integer = Number.parseInt(colorString, 16);
+ return [integer >> 16 & 255, integer >> 8 & 255, integer & 255];
+ },
+ enumerable: false
+ },
+ hexToAnsi256: {
+ value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
+ enumerable: false
+ },
+ ansi256ToAnsi: {
+ value: (code) => {
+ if (code < 8) {
+ return 30 + code;
+ }
+ if (code < 16) {
+ return 90 + (code - 8);
+ }
+ let red;
+ let green;
+ let blue;
+ if (code >= 232) {
+ red = ((code - 232) * 10 + 8) / 255;
+ green = red;
+ blue = red;
+ } else {
+ code -= 16;
+ const remainder = code % 36;
+ red = Math.floor(code / 36) / 5;
+ green = Math.floor(remainder / 6) / 5;
+ blue = remainder % 6 / 5;
+ }
+ const value = Math.max(red, green, blue) * 2;
+ if (value === 0) {
+ return 30;
+ }
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
+ if (value === 2) {
+ result += 60;
+ }
+ return result;
+ },
+ enumerable: false
+ },
+ rgbToAnsi: {
+ value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
+ enumerable: false
+ },
+ hexToAnsi: {
+ value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
+ enumerable: false
+ }
+ });
+ return styles2;
+}
+var ANSI_BACKGROUND_OFFSET;
+var wrapAnsi16;
+var wrapAnsi256;
+var wrapAnsi16m;
+var ansiStyles;
+var ansi_styles_default;
+var init_ansi_styles = __esm({
+ "node_modules/chalk/source/vendor/ansi-styles/index.js"() {
+ ANSI_BACKGROUND_OFFSET = 10;
+ wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
+ wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
+ wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
+ ansiStyles = assembleStyles();
+ ansi_styles_default = ansiStyles;
+ }
+});
+function hasFlag(flag, argv = import_node_process.default.argv) {
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
+ const position = argv.indexOf(prefix + flag);
+ const terminatorPosition = argv.indexOf("--");
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
+}
+function envForceColor() {
+ if ("FORCE_COLOR" in env) {
+ if (env.FORCE_COLOR === "true") {
+ return 1;
+ }
+ if (env.FORCE_COLOR === "false") {
+ return 0;
+ }
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
+ }
+}
+function translateLevel(level) {
+ if (level === 0) {
+ return false;
+ }
+ return {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3
+ };
+}
+function _supportsColor(haveStream, {
+ streamIsTTY,
+ sniffFlags = true
+} = {}) {
+ const noFlagForceColor = envForceColor();
+ if (noFlagForceColor !== void 0) {
+ flagForceColor = noFlagForceColor;
+ }
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
+ if (forceColor === 0) {
+ return 0;
+ }
+ if (sniffFlags) {
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
+ return 3;
+ }
+ if (hasFlag("color=256")) {
+ return 2;
+ }
+ }
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
+ return 0;
+ }
+ const min = forceColor || 0;
+ if (env.TERM === "dumb") {
+ return min;
+ }
+ if (import_node_process.default.platform === "win32") {
+ const osRelease = import_node_os.default.release().split(".");
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
+ }
+ return 1;
+ }
+ if ("CI" in env) {
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
+ return 1;
+ }
+ return min;
+ }
+ if ("TEAMCITY_VERSION" in env) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ }
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
+ return 1;
+ }
+ if (env.COLORTERM === "truecolor") {
+ return 3;
+ }
+ if ("TERM_PROGRAM" in env) {
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
+ switch (env.TERM_PROGRAM) {
+ case "iTerm.app":
+ return version >= 3 ? 3 : 2;
+ case "Apple_Terminal":
+ return 2;
+ }
+ }
+ if (/-256(color)?$/i.test(env.TERM)) {
+ return 2;
+ }
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ return 1;
+ }
+ if ("COLORTERM" in env) {
+ return 1;
+ }
+ return min;
+}
+function createSupportsColor(stream, options = {}) {
+ const level = _supportsColor(stream, Object.assign({
+ streamIsTTY: stream && stream.isTTY
+ }, options));
+ return translateLevel(level);
+}
+var import_node_process;
+var import_node_os;
+var import_node_tty;
+var env;
+var flagForceColor;
+var supportsColor;
+var supports_color_default;
+var init_supports_color = __esm({
+ "node_modules/chalk/source/vendor/supports-color/index.js"() {
+ import_node_process = __toESM(require("process"), 1);
+ import_node_os = __toESM(require("os"), 1);
+ import_node_tty = __toESM(require("tty"), 1);
+ ({
+ env
+ } = import_node_process.default);
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
+ flagForceColor = 0;
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
+ flagForceColor = 1;
+ }
+ supportsColor = {
+ stdout: createSupportsColor({
+ isTTY: import_node_tty.default.isatty(1)
+ }),
+ stderr: createSupportsColor({
+ isTTY: import_node_tty.default.isatty(2)
+ })
+ };
+ supports_color_default = supportsColor;
+ }
+});
+function stringReplaceAll(string, substring, replacer) {
+ let index = string.indexOf(substring);
+ if (index === -1) {
+ return string;
+ }
+ const substringLength = substring.length;
+ let endIndex = 0;
+ let returnValue = "";
+ do {
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
+ endIndex = index + substringLength;
+ index = string.indexOf(substring, endIndex);
+ } while (index !== -1);
+ returnValue += string.slice(endIndex);
+ return returnValue;
+}
+function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
+ let endIndex = 0;
+ let returnValue = "";
+ do {
+ const gotCR = string[index - 1] === "\r";
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
+ endIndex = index + 1;
+ index = string.indexOf("\n", endIndex);
+ } while (index !== -1);
+ returnValue += string.slice(endIndex);
+ return returnValue;
+}
+var init_utilities = __esm({
+ "node_modules/chalk/source/utilities.js"() {
+ }
+});
+var source_exports = {};
+__export(source_exports, {
+ Chalk: () => Chalk,
+ chalkStderr: () => chalkStderr,
+ default: () => source_default,
+ supportsColor: () => stdoutColor,
+ supportsColorStderr: () => stderrColor
+});
+function createChalk(options) {
+ return chalkFactory(options);
+}
+var stdoutColor;
+var stderrColor;
+var GENERATOR;
+var STYLER;
+var IS_EMPTY;
+var levelMapping;
+var styles;
+var applyOptions;
+var Chalk;
+var chalkFactory;
+var getModelAnsi;
+var usedModels;
+var proto;
+var createStyler;
+var createBuilder;
+var applyStyle;
+var chalk;
+var chalkStderr;
+var source_default;
+var init_source = __esm({
+ "node_modules/chalk/source/index.js"() {
+ init_ansi_styles();
+ init_supports_color();
+ init_utilities();
+ ({
+ stdout: stdoutColor,
+ stderr: stderrColor
+ } = supports_color_default);
+ GENERATOR = Symbol("GENERATOR");
+ STYLER = Symbol("STYLER");
+ IS_EMPTY = Symbol("IS_EMPTY");
+ levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
+ styles = /* @__PURE__ */ Object.create(null);
+ applyOptions = (object, options = {}) => {
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
+ throw new Error("The `level` option should be an integer from 0 to 3");
+ }
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
+ object.level = options.level === void 0 ? colorLevel : options.level;
+ };
+ Chalk = class {
+ constructor(options) {
+ return chalkFactory(options);
+ }
+ };
+ chalkFactory = (options) => {
+ const chalk2 = (...strings) => strings.join(" ");
+ applyOptions(chalk2, options);
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
+ return chalk2;
+ };
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
+ styles[styleName] = {
+ get() {
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
+ Object.defineProperty(this, styleName, {
+ value: builder
+ });
+ return builder;
+ }
+ };
+ }
+ styles.visible = {
+ get() {
+ const builder = createBuilder(this, this[STYLER], true);
+ Object.defineProperty(this, "visible", {
+ value: builder
+ });
+ return builder;
+ }
+ };
+ getModelAnsi = (model, level, type, ...arguments_) => {
+ if (model === "rgb") {
+ if (level === "ansi16m") {
+ return ansi_styles_default[type].ansi16m(...arguments_);
+ }
+ if (level === "ansi256") {
+ return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
+ }
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
+ }
+ if (model === "hex") {
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
+ }
+ return ansi_styles_default[type][model](...arguments_);
+ };
+ usedModels = ["rgb", "hex", "ansi256"];
+ for (const model of usedModels) {
+ styles[model] = {
+ get() {
+ const {
+ level
+ } = this;
+ return function(...arguments_) {
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
+ return createBuilder(this, styler, this[IS_EMPTY]);
+ };
+ }
+ };
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
+ styles[bgModel] = {
+ get() {
+ const {
+ level
+ } = this;
+ return function(...arguments_) {
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
+ return createBuilder(this, styler, this[IS_EMPTY]);
+ };
+ }
+ };
+ }
+ proto = Object.defineProperties(() => {
+ }, Object.assign(Object.assign({}, styles), {}, {
+ level: {
+ enumerable: true,
+ get() {
+ return this[GENERATOR].level;
+ },
+ set(level) {
+ this[GENERATOR].level = level;
+ }
+ }
+ }));
+ createStyler = (open, close, parent) => {
+ let openAll;
+ let closeAll;
+ if (parent === void 0) {
+ openAll = open;
+ closeAll = close;
+ } else {
+ openAll = parent.openAll + open;
+ closeAll = close + parent.closeAll;
+ }
+ return {
+ open,
+ close,
+ openAll,
+ closeAll,
+ parent
+ };
+ };
+ createBuilder = (self2, _styler, _isEmpty) => {
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
+ Object.setPrototypeOf(builder, proto);
+ builder[GENERATOR] = self2;
+ builder[STYLER] = _styler;
+ builder[IS_EMPTY] = _isEmpty;
+ return builder;
+ };
+ applyStyle = (self2, string) => {
+ if (self2.level <= 0 || !string) {
+ return self2[IS_EMPTY] ? "" : string;
+ }
+ let styler = self2[STYLER];
+ if (styler === void 0) {
+ return string;
+ }
+ const {
+ openAll,
+ closeAll
+ } = styler;
+ if (string.includes("\x1B")) {
+ while (styler !== void 0) {
+ string = stringReplaceAll(string, styler.close, styler.open);
+ styler = styler.parent;
+ }
+ }
+ const lfIndex = string.indexOf("\n");
+ if (lfIndex !== -1) {
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
+ }
+ return openAll + string + closeAll;
+ };
+ Object.defineProperties(createChalk.prototype, styles);
+ chalk = createChalk();
+ chalkStderr = createChalk({
+ level: stderrColor ? stderrColor.level : 0
+ });
+ source_default = chalk;
+ }
+});
+var require_logger = __commonJS2({
+ "src/cli/logger.js"(exports2, module2) {
+ "use strict";
+ var readline = require("readline");
+ var wcwidth = require_wcwidth();
+ var {
+ default: stripAnsi2
+ } = (init_strip_ansi(), __toCommonJS(strip_ansi_exports));
+ var {
+ default: chalk2,
+ chalkStderr: chalkStderr2
+ } = (init_source(), __toCommonJS(source_exports));
+ var countLines = (stream, text) => {
+ const columns = stream.columns || 80;
+ let lineCount = 0;
+ for (const line of stripAnsi2(text).split("\n")) {
+ lineCount += Math.max(1, Math.ceil(wcwidth(line) / columns));
+ }
+ return lineCount;
+ };
+ var clear = (stream, text) => () => {
+ const lineCount = countLines(stream, text);
+ for (let line = 0; line < lineCount; line++) {
+ if (line > 0) {
+ readline.moveCursor(stream, 0, -1);
+ }
+ readline.clearLine(stream, 0);
+ readline.cursorTo(stream, 0);
+ }
+ };
+ var emptyLogResult = {
+ clear() {
+ }
+ };
+ function createLogger2(logLevel = "log") {
+ return {
+ logLevel,
+ warn: createLogFunc("warn", "yellow"),
+ error: createLogFunc("error", "red"),
+ debug: createLogFunc("debug", "blue"),
+ log: createLogFunc("log")
+ };
+ function createLogFunc(loggerName, color) {
+ if (!shouldLog(loggerName)) {
+ return () => emptyLogResult;
+ }
+ const stream = process[loggerName === "log" ? "stdout" : "stderr"];
+ const chalkInstance = loggerName === "log" ? chalk2 : chalkStderr2;
+ const prefix = color ? `[${chalkInstance[color](loggerName)}] ` : "";
+ return (message, options) => {
+ options = Object.assign({
+ newline: true,
+ clearable: false
+ }, options);
+ message = message.replace(/^/gm, prefix) + (options.newline ? "\n" : "");
+ stream.write(message);
+ if (options.clearable) {
+ return {
+ clear: clear(stream, message)
+ };
+ }
+ };
+ }
+ function shouldLog(loggerName) {
+ switch (logLevel) {
+ case "silent":
+ return false;
+ case "debug":
+ if (loggerName === "debug") {
+ return true;
+ }
+ case "log":
+ if (loggerName === "log") {
+ return true;
+ }
+ case "warn":
+ if (loggerName === "warn") {
+ return true;
+ }
+ case "error":
+ return loggerName === "error";
+ }
+ }
+ }
+ module2.exports = createLogger2;
+ }
+});
+var require_prettier_internal = __commonJS2({
+ "src/cli/prettier-internal.js"(exports2, module2) {
+ "use strict";
+ module2.exports = require("./index.js").__internal;
+ }
+});
+var require_lib = __commonJS2({
+ "node_modules/outdent/lib/index.js"(exports2, module2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.outdent = void 0;
+ function noop() {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ }
+ function createWeakMap() {
+ if (typeof WeakMap !== "undefined") {
+ return /* @__PURE__ */ new WeakMap();
+ } else {
+ return fakeSetOrMap();
+ }
+ }
+ function fakeSetOrMap() {
+ return {
+ add: noop,
+ delete: noop,
+ get: noop,
+ set: noop,
+ has: function(k) {
+ return false;
+ }
+ };
+ }
+ var hop = Object.prototype.hasOwnProperty;
+ var has = function(obj, prop) {
+ return hop.call(obj, prop);
+ };
+ function extend(target, source) {
+ for (var prop in source) {
+ if (has(source, prop)) {
+ target[prop] = source[prop];
+ }
+ }
+ return target;
+ }
+ var reLeadingNewline = /^[ \t]*(?:\r\n|\r|\n)/;
+ var reTrailingNewline = /(?:\r\n|\r|\n)[ \t]*$/;
+ var reStartsWithNewlineOrIsEmpty = /^(?:[\r\n]|$)/;
+ var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
+ var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
+ function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
+ var indentationLevel = 0;
+ var match = strings[0].match(reDetectIndentation);
+ if (match) {
+ indentationLevel = match[1].length;
+ }
+ var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
+ var reMatchIndent = new RegExp(reSource, "g");
+ if (firstInterpolatedValueSetsIndentationLevel) {
+ strings = strings.slice(1);
+ }
+ var newline = options.newline, trimLeadingNewline = options.trimLeadingNewline, trimTrailingNewline = options.trimTrailingNewline;
+ var normalizeNewlines = typeof newline === "string";
+ var l = strings.length;
+ var outdentedStrings = strings.map(function(v, i) {
+ v = v.replace(reMatchIndent, "$1");
+ if (i === 0 && trimLeadingNewline) {
+ v = v.replace(reLeadingNewline, "");
+ }
+ if (i === l - 1 && trimTrailingNewline) {
+ v = v.replace(reTrailingNewline, "");
+ }
+ if (normalizeNewlines) {
+ v = v.replace(/\r\n|\n|\r/g, function(_) {
+ return newline;
+ });
+ }
+ return v;
+ });
+ return outdentedStrings;
+ }
+ function concatStringsAndValues(strings, values) {
+ var ret = "";
+ for (var i = 0, l = strings.length; i < l; i++) {
+ ret += strings[i];
+ if (i < l - 1) {
+ ret += values[i];
+ }
+ }
+ return ret;
+ }
+ function isTemplateStringsArray(v) {
+ return has(v, "raw") && has(v, "length");
+ }
+ function createInstance(options) {
+ var arrayAutoIndentCache = createWeakMap();
+ var arrayFirstInterpSetsIndentCache = createWeakMap();
+ function outdent(stringsOrOptions) {
+ var values = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ values[_i - 1] = arguments[_i];
+ }
+ if (isTemplateStringsArray(stringsOrOptions)) {
+ var strings = stringsOrOptions;
+ var firstInterpolatedValueSetsIndentationLevel = (values[0] === outdent || values[0] === defaultOutdent) && reOnlyWhitespaceWithAtLeastOneNewline.test(strings[0]) && reStartsWithNewlineOrIsEmpty.test(strings[1]);
+ var cache = firstInterpolatedValueSetsIndentationLevel ? arrayFirstInterpSetsIndentCache : arrayAutoIndentCache;
+ var renderedArray = cache.get(strings);
+ if (!renderedArray) {
+ renderedArray = _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options);
+ cache.set(strings, renderedArray);
+ }
+ if (values.length === 0) {
+ return renderedArray[0];
+ }
+ var rendered = concatStringsAndValues(renderedArray, firstInterpolatedValueSetsIndentationLevel ? values.slice(1) : values);
+ return rendered;
+ } else {
+ return createInstance(extend(extend({}, options), stringsOrOptions || {}));
+ }
+ }
+ var fullOutdent = extend(outdent, {
+ string: function(str) {
+ return _outdentArray([str], false, options)[0];
+ }
+ });
+ return fullOutdent;
+ }
+ var defaultOutdent = createInstance({
+ trimLeadingNewline: true,
+ trimTrailingNewline: true
+ });
+ exports2.outdent = defaultOutdent;
+ exports2.default = defaultOutdent;
+ if (typeof module2 !== "undefined") {
+ try {
+ module2.exports = defaultOutdent;
+ Object.defineProperty(defaultOutdent, "__esModule", {
+ value: true
+ });
+ defaultOutdent.default = defaultOutdent;
+ defaultOutdent.outdent = defaultOutdent;
+ } catch (e) {
+ }
+ }
+ }
+});
+var require_constant = __commonJS2({
+ "src/cli/constant.js"(exports2, module2) {
+ "use strict";
+ var {
+ outdent
+ } = require_lib();
+ var {
+ coreOptions
+ } = require_prettier_internal();
+ var categoryOrder = [coreOptions.CATEGORY_OUTPUT, coreOptions.CATEGORY_FORMAT, coreOptions.CATEGORY_CONFIG, coreOptions.CATEGORY_EDITOR, coreOptions.CATEGORY_OTHER];
+ var options = {
+ cache: {
+ default: false,
+ description: "Only format changed files. Cannot use with --stdin-filepath.",
+ type: "boolean"
+ },
+ "cache-location": {
+ description: "Path to the cache file.",
+ type: "path"
+ },
+ "cache-strategy": {
+ choices: [{
+ description: "Use the file metadata such as timestamps as cache keys",
+ value: "metadata"
+ }, {
+ description: "Use the file content as cache keys",
+ value: "content"
+ }],
+ description: "Strategy for the cache to use for detecting changed files.",
+ type: "choice"
+ },
+ check: {
+ alias: "c",
+ category: coreOptions.CATEGORY_OUTPUT,
+ description: outdent`
+ Check if the given files are formatted, print a human-friendly summary
+ message and paths to unformatted files (see also --list-different).
+ `,
+ type: "boolean"
+ },
+ color: {
+ default: true,
+ description: "Colorize error messages.",
+ oppositeDescription: "Do not colorize error messages.",
+ type: "boolean"
+ },
+ config: {
+ category: coreOptions.CATEGORY_CONFIG,
+ description: "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).",
+ exception: (value) => value === false,
+ oppositeDescription: "Do not look for a configuration file.",
+ type: "path"
+ },
+ "config-precedence": {
+ category: coreOptions.CATEGORY_CONFIG,
+ choices: [{
+ description: "CLI options take precedence over config file",
+ value: "cli-override"
+ }, {
+ description: "Config file take precedence over CLI options",
+ value: "file-override"
+ }, {
+ description: outdent`
+ If a config file is found will evaluate it and ignore other CLI options.
+ If no config file is found CLI options will evaluate as normal.
+ `,
+ value: "prefer-file"
+ }],
+ default: "cli-override",
+ description: "Define in which order config files and CLI options should be evaluated.",
+ type: "choice"
+ },
+ "debug-benchmark": {
+ type: "boolean"
+ },
+ "debug-check": {
+ type: "boolean"
+ },
+ "debug-print-ast": {
+ type: "boolean"
+ },
+ "debug-print-comments": {
+ type: "boolean"
+ },
+ "debug-print-doc": {
+ type: "boolean"
+ },
+ "debug-repeat": {
+ default: 0,
+ type: "int"
+ },
+ editorconfig: {
+ category: coreOptions.CATEGORY_CONFIG,
+ default: true,
+ description: "Take .editorconfig into account when parsing configuration.",
+ oppositeDescription: "Don't take .editorconfig into account when parsing configuration.",
+ type: "boolean"
+ },
+ "error-on-unmatched-pattern": {
+ oppositeDescription: "Prevent errors when pattern is unmatched.",
+ type: "boolean"
+ },
+ "file-info": {
+ description: outdent`
+ Extract the following info (as JSON) for a given file path. Reported fields:
+ * ignored (boolean) - true if file path is filtered by --ignore-path
+ * inferredParser (string | null) - name of parser inferred from file path
+ `,
+ type: "path"
+ },
+ "find-config-path": {
+ category: coreOptions.CATEGORY_CONFIG,
+ description: "Find and print the path to a configuration file for the given input file.",
+ type: "path"
+ },
+ help: {
+ alias: "h",
+ description: outdent`
+ Show CLI usage, or details about the given flag.
+ Example: --help write
+ `,
+ exception: (value) => value === "",
+ type: "flag"
+ },
+ "ignore-path": {
+ category: coreOptions.CATEGORY_CONFIG,
+ default: ".prettierignore",
+ description: "Path to a file with patterns describing files to ignore.",
+ type: "path"
+ },
+ "ignore-unknown": {
+ alias: "u",
+ description: "Ignore unknown files.",
+ type: "boolean"
+ },
+ "list-different": {
+ alias: "l",
+ category: coreOptions.CATEGORY_OUTPUT,
+ description: "Print the names of files that are different from Prettier's formatting (see also --check).",
+ type: "boolean"
+ },
+ loglevel: {
+ choices: ["silent", "error", "warn", "log", "debug"],
+ default: "log",
+ description: "What level of logs to report.",
+ type: "choice"
+ },
+ "plugin-search": {
+ oppositeDescription: "Disable plugin autoloading.",
+ type: "boolean"
+ },
+ "support-info": {
+ description: "Print support information as JSON.",
+ type: "boolean"
+ },
+ version: {
+ alias: "v",
+ description: "Print Prettier version.",
+ type: "boolean"
+ },
+ "with-node-modules": {
+ category: coreOptions.CATEGORY_CONFIG,
+ description: "Process files inside 'node_modules' directory.",
+ type: "boolean"
+ },
+ write: {
+ alias: "w",
+ category: coreOptions.CATEGORY_OUTPUT,
+ description: "Edit files in-place. (Beware!)",
+ type: "boolean"
+ }
+ };
+ var usageSummary = outdent`
+ Usage: prettier [options] [file/dir/glob ...]
+
+ By default, output is written to stdout.
+ Stdin is read if it is piped to Prettier and no files are given.
+`;
+ module2.exports = {
+ categoryOrder,
+ options,
+ usageSummary
+ };
+ }
+});
+var require_dashify = __commonJS2({
+ "node_modules/dashify/index.js"(exports2, module2) {
+ "use strict";
+ module2.exports = (str, options) => {
+ if (typeof str !== "string")
+ throw new TypeError("expected a string");
+ 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();
+ };
+ }
+});
+var require_option_map = __commonJS2({
+ "src/cli/options/option-map.js"(exports2, module2) {
+ "use strict";
+ var dashify = require_dashify();
+ var {
+ coreOptions
+ } = require_prettier_internal();
+ function normalizeDetailedOption(name, option) {
+ return Object.assign(Object.assign({
+ category: coreOptions.CATEGORY_OTHER
+ }, option), {}, {
+ choices: option.choices && option.choices.map((choice) => {
+ const newChoice = Object.assign({
+ description: "",
+ deprecated: false
+ }, typeof choice === "object" ? choice : {
+ value: choice
+ });
+ if (newChoice.value === true) {
+ newChoice.value = "";
+ }
+ return newChoice;
+ })
+ });
+ }
+ function normalizeDetailedOptionMap(detailedOptionMap) {
+ return Object.fromEntries(Object.entries(detailedOptionMap).sort(([leftName], [rightName]) => leftName.localeCompare(rightName)).map(([name, option]) => [name, normalizeDetailedOption(name, option)]));
+ }
+ function createDetailedOptionMap(supportOptions) {
+ return Object.fromEntries(supportOptions.map((option) => {
+ const newOption = Object.assign(Object.assign({}, option), {}, {
+ name: option.cliName || dashify(option.name),
+ description: option.cliDescription || option.description,
+ category: option.cliCategory || coreOptions.CATEGORY_FORMAT,
+ forwardToApi: option.name
+ });
+ if (option.deprecated) {
+ delete newOption.forwardToApi;
+ delete newOption.description;
+ delete newOption.oppositeDescription;
+ newOption.deprecated = true;
+ }
+ return [newOption.name, newOption];
+ }));
+ }
+ module2.exports = {
+ normalizeDetailedOptionMap,
+ createDetailedOptionMap
+ };
+ }
+});
+var require_get_context_options = __commonJS2({
+ "src/cli/options/get-context-options.js"(exports2, module2) {
+ "use strict";
+ var prettier2 = require("./index.js");
+ var {
+ optionsModule,
+ utils: {
+ arrayify
+ }
+ } = require_prettier_internal();
+ var constant = require_constant();
+ var {
+ normalizeDetailedOptionMap,
+ createDetailedOptionMap
+ } = require_option_map();
+ function getContextOptions(plugins, pluginSearchDirs) {
+ const {
+ options: supportOptions,
+ languages
+ } = prettier2.getSupportInfo({
+ showDeprecated: true,
+ showUnreleased: true,
+ showInternal: true,
+ plugins,
+ pluginSearchDirs
+ });
+ const detailedOptionMap = normalizeDetailedOptionMap(Object.assign(Object.assign({}, createDetailedOptionMap(supportOptions)), constant.options));
+ const detailedOptions = arrayify(detailedOptionMap, "name");
+ const apiDefaultOptions = Object.assign(Object.assign({}, optionsModule.hiddenDefaults), Object.fromEntries(supportOptions.filter(({
+ deprecated
+ }) => !deprecated).map((option) => [option.name, option.default])));
+ return {
+ supportOptions,
+ detailedOptions,
+ detailedOptionMap,
+ apiDefaultOptions,
+ languages
+ };
+ }
+ module2.exports = getContextOptions;
+ }
+});
+var require_camelcase = __commonJS2({
+ "node_modules/camelcase/index.js"(exports2, module2) {
+ "use strict";
+ var UPPERCASE = /[\p{Lu}]/u;
+ var LOWERCASE = /[\p{Ll}]/u;
+ var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
+ var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
+ var SEPARATORS = /[_.\- ]+/;
+ var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
+ var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
+ var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
+ var preserveCamelCase = (string, toLowerCase, toUpperCase) => {
+ let isLastCharLower = false;
+ let isLastCharUpper = false;
+ let isLastLastCharUpper = false;
+ for (let i = 0; i < string.length; i++) {
+ const character = string[i];
+ if (isLastCharLower && UPPERCASE.test(character)) {
+ string = string.slice(0, i) + "-" + string.slice(i);
+ isLastCharLower = false;
+ isLastLastCharUpper = isLastCharUpper;
+ isLastCharUpper = true;
+ i++;
+ } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
+ string = string.slice(0, i - 1) + "-" + string.slice(i - 1);
+ isLastLastCharUpper = isLastCharUpper;
+ isLastCharUpper = false;
+ isLastCharLower = true;
+ } else {
+ isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
+ isLastLastCharUpper = isLastCharUpper;
+ isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
+ }
+ }
+ return string;
+ };
+ var preserveConsecutiveUppercase = (input, toLowerCase) => {
+ LEADING_CAPITAL.lastIndex = 0;
+ return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
+ };
+ var postProcess = (input, toUpperCase) => {
+ SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
+ NUMBERS_AND_IDENTIFIER.lastIndex = 0;
+ return input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m) => toUpperCase(m));
+ };
+ var camelCase = (input, options) => {
+ if (!(typeof input === "string" || Array.isArray(input))) {
+ throw new TypeError("Expected the input to be `string | string[]`");
+ }
+ options = Object.assign({
+ pascalCase: false,
+ preserveConsecutiveUppercase: false
+ }, options);
+ if (Array.isArray(input)) {
+ input = input.map((x) => x.trim()).filter((x) => x.length).join("-");
+ } else {
+ input = input.trim();
+ }
+ if (input.length === 0) {
+ return "";
+ }
+ const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale);
+ const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale);
+ if (input.length === 1) {
+ return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
+ }
+ const hasUpperCase = input !== toLowerCase(input);
+ if (hasUpperCase) {
+ input = preserveCamelCase(input, toLowerCase, toUpperCase);
+ }
+ input = input.replace(LEADING_SEPARATORS, "");
+ if (options.preserveConsecutiveUppercase) {
+ input = preserveConsecutiveUppercase(input, toLowerCase);
+ } else {
+ input = toLowerCase(input);
+ }
+ if (options.pascalCase) {
+ input = toUpperCase(input.charAt(0)) + input.slice(1);
+ }
+ return postProcess(input, toUpperCase);
+ };
+ module2.exports = camelCase;
+ module2.exports.default = camelCase;
+ }
+});
+var sdbm_exports = {};
+__export(sdbm_exports, {
+ default: () => sdbm
+});
+function sdbm(string) {
+ let hash = 0;
+ for (let i = 0; i < string.length; i++) {
+ hash = string.charCodeAt(i) + (hash << 6) + (hash << 16) - hash;
+ }
+ return hash >>> 0;
+}
+var init_sdbm = __esm({
+ "node_modules/sdbm/index.js"() {
+ }
+});
+var require_utils = __commonJS2({
+ "src/cli/utils.js"(exports2, module2) {
+ "use strict";
+ var {
+ promises: fs
+ } = require("fs");
+ var {
+ default: sdbm2
+ } = (init_sdbm(), __toCommonJS(sdbm_exports));
+ var printToScreen2 = console.log.bind(console);
+ function groupBy(array2, iteratee) {
+ const result = /* @__PURE__ */ Object.create(null);
+ for (const value of array2) {
+ const key = iteratee(value);
+ if (Array.isArray(result[key])) {
+ result[key].push(value);
+ } else {
+ result[key] = [value];
+ }
+ }
+ return result;
+ }
+ function pick(object, keys) {
+ const entries = keys.map((key) => [key, object[key]]);
+ return Object.fromEntries(entries);
+ }
+ function createHash(source) {
+ return String(sdbm2(source));
+ }
+ async function statSafe(filePath) {
+ try {
+ return await fs.stat(filePath);
+ } catch (error) {
+ if (error.code !== "ENOENT") {
+ throw error;
+ }
+ }
+ }
+ function isJson(value) {
+ try {
+ JSON.parse(value);
+ return true;
+ } catch {
+ return false;
+ }
+ }
+ module2.exports = {
+ printToScreen: printToScreen2,
+ groupBy,
+ pick,
+ createHash,
+ statSafe,
+ isJson
+ };
+ }
+});
+var require_minimist = __commonJS2({
+ "node_modules/minimist/index.js"(exports2, module2) {
+ module2.exports = function(args, opts) {
+ if (!opts)
+ opts = {};
+ var flags = {
+ bools: {},
+ strings: {},
+ unknownFn: null
+ };
+ if (typeof opts["unknown"] === "function") {
+ flags.unknownFn = opts["unknown"];
+ }
+ if (typeof opts["boolean"] === "boolean" && opts["boolean"]) {
+ flags.allBools = true;
+ } else {
+ [].concat(opts["boolean"]).filter(Boolean).forEach(function(key2) {
+ flags.bools[key2] = true;
+ });
+ }
+ var aliases = {};
+ Object.keys(opts.alias || {}).forEach(function(key2) {
+ aliases[key2] = [].concat(opts.alias[key2]);
+ aliases[key2].forEach(function(x) {
+ aliases[x] = [key2].concat(aliases[key2].filter(function(y) {
+ return x !== y;
+ }));
+ });
+ });
+ [].concat(opts.string).filter(Boolean).forEach(function(key2) {
+ flags.strings[key2] = true;
+ if (aliases[key2]) {
+ flags.strings[aliases[key2]] = true;
+ }
+ });
+ var defaults = opts["default"] || {};
+ var argv = {
+ _: []
+ };
+ Object.keys(flags.bools).forEach(function(key2) {
+ setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]);
+ });
+ var notFlags = [];
+ if (args.indexOf("--") !== -1) {
+ notFlags = args.slice(args.indexOf("--") + 1);
+ args = args.slice(0, args.indexOf("--"));
+ }
+ function argDefined(key2, arg2) {
+ return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2];
+ }
+ function setArg(key2, val, arg2) {
+ if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) {
+ if (flags.unknownFn(arg2) === false)
+ return;
+ }
+ var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val;
+ setKey(argv, key2.split("."), value2);
+ (aliases[key2] || []).forEach(function(x) {
+ setKey(argv, x.split("."), value2);
+ });
+ }
+ function setKey(obj, keys, value2) {
+ var o = obj;
+ for (var i2 = 0; i2 < keys.length - 1; i2++) {
+ var key2 = keys[i2];
+ if (isConstructorOrProto(o, key2))
+ return;
+ if (o[key2] === void 0)
+ o[key2] = {};
+ if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype)
+ o[key2] = {};
+ if (o[key2] === Array.prototype)
+ o[key2] = [];
+ o = o[key2];
+ }
+ var key2 = keys[keys.length - 1];
+ if (isConstructorOrProto(o, key2))
+ return;
+ if (o === Object.prototype || o === Number.prototype || o === String.prototype)
+ o = {};
+ if (o === Array.prototype)
+ o = [];
+ if (o[key2] === void 0 || flags.bools[key2] || typeof o[key2] === "boolean") {
+ o[key2] = value2;
+ } else if (Array.isArray(o[key2])) {
+ o[key2].push(value2);
+ } else {
+ o[key2] = [o[key2], value2];
+ }
+ }
+ function aliasIsBoolean(key2) {
+ return aliases[key2].some(function(x) {
+ return flags.bools[x];
+ });
+ }
+ for (var i = 0; i < args.length; i++) {
+ var arg = args[i];
+ if (/^--.+=/.test(arg)) {
+ var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
+ var key = m[1];
+ var value = m[2];
+ if (flags.bools[key]) {
+ value = value !== "false";
+ }
+ setArg(key, value, arg);
+ } else if (/^--no-.+/.test(arg)) {
+ var key = arg.match(/^--no-(.+)/)[1];
+ setArg(key, false, arg);
+ } else if (/^--.+/.test(arg)) {
+ var key = arg.match(/^--(.+)/)[1];
+ var next = args[i + 1];
+ if (next !== void 0 && !/^-/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) {
+ setArg(key, next, arg);
+ i++;
+ } else if (/^(true|false)$/.test(next)) {
+ setArg(key, next === "true", arg);
+ i++;
+ } else {
+ setArg(key, flags.strings[key] ? "" : true, arg);
+ }
+ } else if (/^-[^-]+/.test(arg)) {
+ var letters = arg.slice(1, -1).split("");
+ var broken = false;
+ for (var j = 0; j < letters.length; j++) {
+ var next = arg.slice(j + 2);
+ if (next === "-") {
+ setArg(letters[j], next, arg);
+ continue;
+ }
+ if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
+ setArg(letters[j], next.split("=")[1], arg);
+ broken = true;
+ break;
+ }
+ if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
+ setArg(letters[j], next, arg);
+ broken = true;
+ break;
+ }
+ if (letters[j + 1] && letters[j + 1].match(/\W/)) {
+ setArg(letters[j], arg.slice(j + 2), arg);
+ broken = true;
+ break;
+ } else {
+ setArg(letters[j], flags.strings[letters[j]] ? "" : true, arg);
+ }
+ }
+ var key = arg.slice(-1)[0];
+ if (!broken && key !== "-") {
+ if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
+ setArg(key, args[i + 1], arg);
+ i++;
+ } else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
+ setArg(key, args[i + 1] === "true", arg);
+ i++;
+ } else {
+ setArg(key, flags.strings[key] ? "" : true, arg);
+ }
+ }
+ } else {
+ if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
+ argv._.push(flags.strings["_"] || !isNumber(arg) ? arg : Number(arg));
+ }
+ if (opts.stopEarly) {
+ argv._.push.apply(argv._, args.slice(i + 1));
+ break;
+ }
+ }
+ }
+ Object.keys(defaults).forEach(function(key2) {
+ if (!hasKey(argv, key2.split("."))) {
+ setKey(argv, key2.split("."), defaults[key2]);
+ (aliases[key2] || []).forEach(function(x) {
+ setKey(argv, x.split("."), defaults[key2]);
+ });
+ }
+ });
+ if (opts["--"]) {
+ argv["--"] = new Array();
+ notFlags.forEach(function(key2) {
+ argv["--"].push(key2);
+ });
+ } else {
+ notFlags.forEach(function(key2) {
+ argv._.push(key2);
+ });
+ }
+ return argv;
+ };
+ function hasKey(obj, keys) {
+ var o = obj;
+ keys.slice(0, -1).forEach(function(key2) {
+ o = o[key2] || {};
+ });
+ var key = keys[keys.length - 1];
+ return key in o;
+ }
+ function isNumber(x) {
+ if (typeof x === "number")
+ return true;
+ if (/^0x[0-9a-f]+$/i.test(x))
+ return true;
+ return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
+ }
+ function isConstructorOrProto(obj, key) {
+ return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
+ }
+ }
+});
+var require_minimist2 = __commonJS2({
+ "src/cli/options/minimist.js"(exports2, module2) {
+ "use strict";
+ var minimist = require_minimist();
+ var PLACEHOLDER = null;
+ module2.exports = function(args, options) {
+ const boolean = options.boolean || [];
+ const defaults = options.default || {};
+ const booleanWithoutDefault = boolean.filter((key) => !(key in defaults));
+ const newDefaults = Object.assign(Object.assign({}, defaults), Object.fromEntries(booleanWithoutDefault.map((key) => [key, PLACEHOLDER])));
+ const parsed = minimist(args, Object.assign(Object.assign({}, options), {}, {
+ default: newDefaults
+ }));
+ return Object.fromEntries(Object.entries(parsed).filter(([, value]) => value !== PLACEHOLDER));
+ };
+ }
+});
+var require_create_minimist_options = __commonJS2({
+ "src/cli/options/create-minimist-options.js"(exports2, module2) {
+ "use strict";
+ var {
+ utils: {
+ partition
+ }
+ } = require_prettier_internal();
+ module2.exports = function createMinimistOptions(detailedOptions) {
+ const [boolean, string] = partition(detailedOptions, ({
+ type
+ }) => type === "boolean").map((detailedOptions2) => detailedOptions2.flatMap(({
+ name,
+ alias
+ }) => alias ? [name, alias] : [name]));
+ 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]));
+ return {
+ alias: {},
+ boolean,
+ string,
+ default: defaults
+ };
+ };
+ }
+});
+var leven_exports = {};
+__export(leven_exports, {
+ default: () => leven
+});
+function leven(first, second) {
+ if (first === second) {
+ return 0;
+ }
+ const swap = first;
+ if (first.length > second.length) {
+ first = second;
+ second = swap;
+ }
+ let firstLength = first.length;
+ let secondLength = second.length;
+ while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) {
+ firstLength--;
+ secondLength--;
+ }
+ let start = 0;
+ while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) {
+ start++;
+ }
+ firstLength -= start;
+ secondLength -= start;
+ if (firstLength === 0) {
+ return secondLength;
+ }
+ let bCharacterCode;
+ let result;
+ let temporary;
+ let temporary2;
+ let index = 0;
+ let index2 = 0;
+ while (index < firstLength) {
+ characterCodeCache[index] = first.charCodeAt(start + index);
+ array[index] = ++index;
+ }
+ while (index2 < secondLength) {
+ bCharacterCode = second.charCodeAt(start + index2);
+ temporary = index2++;
+ result = index2;
+ for (index = 0; index < firstLength; index++) {
+ temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1;
+ temporary = array[index];
+ result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2;
+ }
+ }
+ return result;
+}
+var array;
+var characterCodeCache;
+var init_leven = __esm({
+ "node_modules/leven/index.js"() {
+ array = [];
+ characterCodeCache = [];
+ }
+});
+var require_normalize_cli_options = __commonJS2({
+ "src/cli/options/normalize-cli-options.js"(exports2, module2) {
+ "use strict";
+ var {
+ default: chalk2
+ } = (init_source(), __toCommonJS(source_exports));
+ var {
+ default: leven2
+ } = (init_leven(), __toCommonJS(leven_exports));
+ var {
+ optionsNormalizer
+ } = require_prettier_internal();
+ function normalizeCliOptions(options, optionInfos, opts) {
+ return optionsNormalizer.normalizeCliOptions(options, optionInfos, Object.assign({
+ colorsModule: chalk2,
+ levenshteinDistance: leven2
+ }, opts));
+ }
+ module2.exports = normalizeCliOptions;
+ }
+});
+var require_parse_cli_arguments = __commonJS2({
+ "src/cli/options/parse-cli-arguments.js"(exports2, module2) {
+ "use strict";
+ var camelCase = require_camelcase();
+ var {
+ pick
+ } = require_utils();
+ var getContextOptions = require_get_context_options();
+ var minimist = require_minimist2();
+ var createMinimistOptions = require_create_minimist_options();
+ var normalizeCliOptions = require_normalize_cli_options();
+ function parseArgv(rawArguments, detailedOptions, logger, keys) {
+ const minimistOptions = createMinimistOptions(detailedOptions);
+ let argv = minimist(rawArguments, minimistOptions);
+ if (keys) {
+ if (keys.includes("plugin-search-dir") && !keys.includes("plugin-search")) {
+ keys.push("plugin-search");
+ }
+ detailedOptions = detailedOptions.filter((option) => keys.includes(option.name));
+ argv = pick(argv, keys);
+ }
+ const normalized = normalizeCliOptions(argv, detailedOptions, {
+ logger
+ });
+ return Object.assign(Object.assign({}, Object.fromEntries(Object.entries(normalized).map(([key, value]) => {
+ const option = detailedOptions.find(({
+ name
+ }) => name === key) || {};
+ return [option.forwardToApi || camelCase(key), value];
+ }))), {}, {
+ get __raw() {
+ return argv;
+ }
+ });
+ }
+ var detailedOptionsWithoutPlugins = getContextOptions([], false).detailedOptions;
+ function parseArgvWithoutPlugins2(rawArguments, logger, keys) {
+ return parseArgv(rawArguments, detailedOptionsWithoutPlugins, logger, typeof keys === "string" ? [keys] : keys);
+ }
+ module2.exports = {
+ parseArgv,
+ parseArgvWithoutPlugins: parseArgvWithoutPlugins2
+ };
+ }
+});
+var require_context = __commonJS2({
+ "src/cli/context.js"(exports2, module2) {
+ "use strict";
+ var {
+ utils: {
+ getLast
+ }
+ } = require_prettier_internal();
+ var getContextOptions = require_get_context_options();
+ var {
+ parseArgv,
+ parseArgvWithoutPlugins: parseArgvWithoutPlugins2
+ } = require_parse_cli_arguments();
+ var Context2 = class {
+ constructor({
+ rawArguments,
+ logger
+ }) {
+ this.rawArguments = rawArguments;
+ this.logger = logger;
+ this.stack = [];
+ const {
+ plugins,
+ pluginSearchDirs
+ } = parseArgvWithoutPlugins2(rawArguments, logger, ["plugin", "plugin-search-dir"]);
+ this.pushContextPlugins(plugins, pluginSearchDirs);
+ const argv = parseArgv(rawArguments, this.detailedOptions, logger);
+ this.argv = argv;
+ this.filePatterns = argv._.map(String);
+ }
+ pushContextPlugins(plugins, pluginSearchDirs) {
+ const options = getContextOptions(plugins, pluginSearchDirs);
+ this.stack.push(options);
+ Object.assign(this, options);
+ }
+ popContextPlugins() {
+ this.stack.pop();
+ Object.assign(this, getLast(this.stack));
+ }
+ get performanceTestFlag() {
+ const {
+ debugBenchmark,
+ debugRepeat
+ } = this.argv;
+ if (debugBenchmark) {
+ return {
+ name: "--debug-benchmark",
+ debugBenchmark: true
+ };
+ }
+ if (debugRepeat > 0) {
+ return {
+ name: "--debug-repeat",
+ debugRepeat
+ };
+ }
+ const {
+ PRETTIER_PERF_REPEAT
+ } = process.env;
+ if (PRETTIER_PERF_REPEAT && /^\d+$/.test(PRETTIER_PERF_REPEAT)) {
+ return {
+ name: "PRETTIER_PERF_REPEAT (environment variable)",
+ debugRepeat: Number(PRETTIER_PERF_REPEAT)
+ };
+ }
+ }
+ };
+ module2.exports = Context2;
+ }
+});
+var require_usage = __commonJS2({
+ "src/cli/usage.js"(exports2, module2) {
+ "use strict";
+ var camelCase = require_camelcase();
+ var constant = require_constant();
+ var {
+ groupBy
+ } = require_utils();
+ var OPTION_USAGE_THRESHOLD = 25;
+ var CHOICE_USAGE_MARGIN = 3;
+ var CHOICE_USAGE_INDENTATION = 2;
+ function indent(str, spaces) {
+ return str.replace(/^/gm, " ".repeat(spaces));
+ }
+ function createDefaultValueDisplay(value) {
+ return Array.isArray(value) ? `[${value.map(createDefaultValueDisplay).join(", ")}]` : value;
+ }
+ function getOptionDefaultValue(context, optionName) {
+ if (!(optionName in context.detailedOptionMap)) {
+ return;
+ }
+ const option = context.detailedOptionMap[optionName];
+ if (option.default !== void 0) {
+ return option.default;
+ }
+ const optionCamelName = camelCase(optionName);
+ if (optionCamelName in context.apiDefaultOptions) {
+ return context.apiDefaultOptions[optionCamelName];
+ }
+ }
+ function createOptionUsageHeader(option) {
+ const name = `--${option.name}`;
+ const alias = option.alias ? `-${option.alias},` : null;
+ const type = createOptionUsageType(option);
+ return [alias, name, type].filter(Boolean).join(" ");
+ }
+ function createOptionUsageRow(header, content, threshold) {
+ const separator = header.length >= threshold ? `
+${" ".repeat(threshold)}` : " ".repeat(threshold - header.length);
+ const description = content.replace(/\n/g, `
+${" ".repeat(threshold)}`);
+ return `${header}${separator}${description}`;
+ }
+ function createOptionUsageType(option) {
+ switch (option.type) {
+ case "boolean":
+ return null;
+ case "choice":
+ return `<${option.choices.filter((choice) => !choice.deprecated && choice.since !== null).map((choice) => choice.value).join("|")}>`;
+ default:
+ return `<${option.type}>`;
+ }
+ }
+ function createChoiceUsages(choices, margin, indentation) {
+ const activeChoices = choices.filter((choice) => !choice.deprecated && choice.since !== null);
+ const threshold = Math.max(0, ...activeChoices.map((choice) => choice.value.length)) + margin;
+ return activeChoices.map((choice) => indent(createOptionUsageRow(choice.value, choice.description, threshold), indentation));
+ }
+ function createOptionUsage(context, option, threshold) {
+ const header = createOptionUsageHeader(option);
+ const optionDefaultValue = getOptionDefaultValue(context, option.name);
+ return createOptionUsageRow(header, `${option.description}${optionDefaultValue === void 0 ? "" : `
+Defaults to ${createDefaultValueDisplay(optionDefaultValue)}.`}`, threshold);
+ }
+ function getOptionsWithOpposites(options) {
+ const optionsWithOpposites = options.map((option) => [option.description ? option : null, option.oppositeDescription ? Object.assign(Object.assign({}, option), {}, {
+ name: `no-${option.name}`,
+ type: "boolean",
+ description: option.oppositeDescription
+ }) : null]);
+ return optionsWithOpposites.flat().filter(Boolean);
+ }
+ function createUsage2(context) {
+ const options = getOptionsWithOpposites(context.detailedOptions).filter((option) => !(option.type === "boolean" && option.oppositeDescription && !option.name.startsWith("no-")));
+ const groupedOptions = groupBy(options, (option) => option.category);
+ const firstCategories = constant.categoryOrder.slice(0, -1);
+ const lastCategories = constant.categoryOrder.slice(-1);
+ const restCategories = Object.keys(groupedOptions).filter((category) => !constant.categoryOrder.includes(category));
+ const allCategories = [...firstCategories, ...restCategories, ...lastCategories];
+ const optionsUsage = allCategories.map((category) => {
+ const categoryOptions = groupedOptions[category].map((option) => createOptionUsage(context, option, OPTION_USAGE_THRESHOLD)).join("\n");
+ return `${category} options:
+
+${indent(categoryOptions, 2)}`;
+ });
+ return [constant.usageSummary, ...optionsUsage, ""].join("\n\n");
+ }
+ function createDetailedUsage2(context, flag) {
+ const option = getOptionsWithOpposites(context.detailedOptions).find((option2) => option2.name === flag || option2.alias === flag);
+ const header = createOptionUsageHeader(option);
+ const description = `
+
+${indent(option.description, 2)}`;
+ const choices = option.type !== "choice" ? "" : `
+
+Valid options:
+
+${createChoiceUsages(option.choices, CHOICE_USAGE_MARGIN, CHOICE_USAGE_INDENTATION).join("\n")}`;
+ const optionDefaultValue = getOptionDefaultValue(context, option.name);
+ const defaults = optionDefaultValue !== void 0 ? `
+
+Default: ${createDefaultValueDisplay(optionDefaultValue)}` : "";
+ const pluginDefaults = option.pluginDefaults && Object.keys(option.pluginDefaults).length > 0 ? `
+Plugin defaults:${Object.entries(option.pluginDefaults).map(([key, value]) => `
+* ${key}: ${createDefaultValueDisplay(value)}`)}` : "";
+ return `${header}${description}${choices}${defaults}${pluginDefaults}`;
+ }
+ module2.exports = {
+ createUsage: createUsage2,
+ createDetailedUsage: createDetailedUsage2
+ };
+ }
+});
+var require_array = __commonJS2({
+ "node_modules/fast-glob/out/utils/array.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.splitWhen = exports2.flatten = void 0;
+ function flatten(items) {
+ return items.reduce((collection, item) => [].concat(collection, item), []);
+ }
+ exports2.flatten = flatten;
+ function splitWhen(items, predicate) {
+ const result = [[]];
+ let groupIndex = 0;
+ for (const item of items) {
+ if (predicate(item)) {
+ groupIndex++;
+ result[groupIndex] = [];
+ } else {
+ result[groupIndex].push(item);
+ }
+ }
+ return result;
+ }
+ exports2.splitWhen = splitWhen;
+ }
+});
+var require_errno = __commonJS2({
+ "node_modules/fast-glob/out/utils/errno.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.isEnoentCodeError = void 0;
+ function isEnoentCodeError(error) {
+ return error.code === "ENOENT";
+ }
+ exports2.isEnoentCodeError = isEnoentCodeError;
+ }
+});
+var require_fs = __commonJS2({
+ "node_modules/fast-glob/out/utils/fs.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.createDirentFromStats = void 0;
+ var DirentFromStats = class {
+ constructor(name, stats) {
+ this.name = name;
+ this.isBlockDevice = stats.isBlockDevice.bind(stats);
+ this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
+ this.isDirectory = stats.isDirectory.bind(stats);
+ this.isFIFO = stats.isFIFO.bind(stats);
+ this.isFile = stats.isFile.bind(stats);
+ this.isSocket = stats.isSocket.bind(stats);
+ this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
+ }
+ };
+ function createDirentFromStats(name, stats) {
+ return new DirentFromStats(name, stats);
+ }
+ exports2.createDirentFromStats = createDirentFromStats;
+ }
+});
+var require_path = __commonJS2({
+ "node_modules/fast-glob/out/utils/path.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.removeLeadingDotSegment = exports2.escape = exports2.makeAbsolute = exports2.unixify = void 0;
+ var path = require("path");
+ var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
+ var UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
+ function unixify(filepath) {
+ return filepath.replace(/\\/g, "/");
+ }
+ exports2.unixify = unixify;
+ function makeAbsolute(cwd, filepath) {
+ return path.resolve(cwd, filepath);
+ }
+ exports2.makeAbsolute = makeAbsolute;
+ function escape(pattern) {
+ return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
+ }
+ exports2.escape = escape;
+ function removeLeadingDotSegment(entry) {
+ if (entry.charAt(0) === ".") {
+ const secondCharactery = entry.charAt(1);
+ if (secondCharactery === "/" || secondCharactery === "\\") {
+ return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
+ }
+ }
+ return entry;
+ }
+ exports2.removeLeadingDotSegment = removeLeadingDotSegment;
+ }
+});
+var require_is_extglob = __commonJS2({
+ "node_modules/is-extglob/index.js"(exports2, module2) {
+ module2.exports = function isExtglob(str) {
+ if (typeof str !== "string" || str === "") {
+ return false;
+ }
+ var match;
+ while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {
+ if (match[2])
+ return true;
+ str = str.slice(match.index + match[0].length);
+ }
+ return false;
+ };
+ }
+});
+var require_is_glob = __commonJS2({
+ "node_modules/is-glob/index.js"(exports2, module2) {
+ var isExtglob = require_is_extglob();
+ var chars = {
+ "{": "}",
+ "(": ")",
+ "[": "]"
+ };
+ var strictCheck = function(str) {
+ if (str[0] === "!") {
+ return true;
+ }
+ var index = 0;
+ var pipeIndex = -2;
+ var closeSquareIndex = -2;
+ var closeCurlyIndex = -2;
+ var closeParenIndex = -2;
+ var backSlashIndex = -2;
+ while (index < str.length) {
+ if (str[index] === "*") {
+ return true;
+ }
+ if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) {
+ return true;
+ }
+ if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") {
+ if (closeSquareIndex < index) {
+ closeSquareIndex = str.indexOf("]", index);
+ }
+ if (closeSquareIndex > index) {
+ if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
+ return true;
+ }
+ backSlashIndex = str.indexOf("\\", index);
+ if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
+ return true;
+ }
+ }
+ }
+ if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") {
+ closeCurlyIndex = str.indexOf("}", index);
+ if (closeCurlyIndex > index) {
+ backSlashIndex = str.indexOf("\\", index);
+ if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
+ return true;
+ }
+ }
+ }
+ if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") {
+ closeParenIndex = str.indexOf(")", index);
+ if (closeParenIndex > index) {
+ backSlashIndex = str.indexOf("\\", index);
+ if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
+ return true;
+ }
+ }
+ }
+ if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") {
+ if (pipeIndex < index) {
+ pipeIndex = str.indexOf("|", index);
+ }
+ if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {
+ closeParenIndex = str.indexOf(")", pipeIndex);
+ if (closeParenIndex > pipeIndex) {
+ backSlashIndex = str.indexOf("\\", pipeIndex);
+ if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
+ return true;
+ }
+ }
+ }
+ }
+ if (str[index] === "\\") {
+ var open = str[index + 1];
+ index += 2;
+ var close = chars[open];
+ if (close) {
+ var n = str.indexOf(close, index);
+ if (n !== -1) {
+ index = n + 1;
+ }
+ }
+ if (str[index] === "!") {
+ return true;
+ }
+ } else {
+ index++;
+ }
+ }
+ return false;
+ };
+ var relaxedCheck = function(str) {
+ if (str[0] === "!") {
+ return true;
+ }
+ var index = 0;
+ while (index < str.length) {
+ if (/[*?{}()[\]]/.test(str[index])) {
+ return true;
+ }
+ if (str[index] === "\\") {
+ var open = str[index + 1];
+ index += 2;
+ var close = chars[open];
+ if (close) {
+ var n = str.indexOf(close, index);
+ if (n !== -1) {
+ index = n + 1;
+ }
+ }
+ if (str[index] === "!") {
+ return true;
+ }
+ } else {
+ index++;
+ }
+ }
+ return false;
+ };
+ module2.exports = function isGlob(str, options) {
+ if (typeof str !== "string" || str === "") {
+ return false;
+ }
+ if (isExtglob(str)) {
+ return true;
+ }
+ var check = strictCheck;
+ if (options && options.strict === false) {
+ check = relaxedCheck;
+ }
+ return check(str);
+ };
+ }
+});
+var require_glob_parent = __commonJS2({
+ "node_modules/glob-parent/index.js"(exports2, module2) {
+ "use strict";
+ var isGlob = require_is_glob();
+ var pathPosixDirname = require("path").posix.dirname;
+ var isWin32 = require("os").platform() === "win32";
+ var slash = "/";
+ var backslash = /\\/g;
+ var enclosure = /[\{\[].*[\}\]]$/;
+ var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
+ var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
+ module2.exports = function globParent(str, opts) {
+ var options = Object.assign({
+ flipBackslashes: true
+ }, opts);
+ if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
+ str = str.replace(backslash, slash);
+ }
+ if (enclosure.test(str)) {
+ str += slash;
+ }
+ str += "a";
+ do {
+ str = pathPosixDirname(str);
+ } while (isGlob(str) || globby.test(str));
+ return str.replace(escaped, "$1");
+ };
+ }
+});
+var require_utils2 = __commonJS2({
+ "node_modules/braces/lib/utils.js"(exports2) {
+ "use strict";
+ exports2.isInteger = (num) => {
+ if (typeof num === "number") {
+ return Number.isInteger(num);
+ }
+ if (typeof num === "string" && num.trim() !== "") {
+ return Number.isInteger(Number(num));
+ }
+ return false;
+ };
+ exports2.find = (node, type) => node.nodes.find((node2) => node2.type === type);
+ exports2.exceedsLimit = (min, max, step = 1, limit) => {
+ if (limit === false)
+ return false;
+ if (!exports2.isInteger(min) || !exports2.isInteger(max))
+ return false;
+ return (Number(max) - Number(min)) / Number(step) >= limit;
+ };
+ exports2.escapeNode = (block, n = 0, type) => {
+ let node = block.nodes[n];
+ if (!node)
+ return;
+ if (type && node.type === type || node.type === "open" || node.type === "close") {
+ if (node.escaped !== true) {
+ node.value = "\\" + node.value;
+ node.escaped = true;
+ }
+ }
+ };
+ exports2.encloseBrace = (node) => {
+ if (node.type !== "brace")
+ return false;
+ if (node.commas >> 0 + node.ranges >> 0 === 0) {
+ node.invalid = true;
+ return true;
+ }
+ return false;
+ };
+ exports2.isInvalidBrace = (block) => {
+ if (block.type !== "brace")
+ return false;
+ if (block.invalid === true || block.dollar)
+ return true;
+ if (block.commas >> 0 + block.ranges >> 0 === 0) {
+ block.invalid = true;
+ return true;
+ }
+ if (block.open !== true || block.close !== true) {
+ block.invalid = true;
+ return true;
+ }
+ return false;
+ };
+ exports2.isOpenOrClose = (node) => {
+ if (node.type === "open" || node.type === "close") {
+ return true;
+ }
+ return node.open === true || node.close === true;
+ };
+ exports2.reduce = (nodes) => nodes.reduce((acc, node) => {
+ if (node.type === "text")
+ acc.push(node.value);
+ if (node.type === "range")
+ node.type = "text";
+ return acc;
+ }, []);
+ exports2.flatten = (...args) => {
+ const result = [];
+ const flat = (arr) => {
+ for (let i = 0; i < arr.length; i++) {
+ let ele = arr[i];
+ Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
+ }
+ return result;
+ };
+ flat(args);
+ return result;
+ };
+ }
+});
+var require_stringify = __commonJS2({
+ "node_modules/braces/lib/stringify.js"(exports2, module2) {
+ "use strict";
+ var utils = require_utils2();
+ module2.exports = (ast, options = {}) => {
+ let stringify2 = (node, parent = {}) => {
+ let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
+ let invalidNode = node.invalid === true && options.escapeInvalid === true;
+ let output = "";
+ if (node.value) {
+ if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
+ return "\\" + node.value;
+ }
+ return node.value;
+ }
+ if (node.value) {
+ return node.value;
+ }
+ if (node.nodes) {
+ for (let child of node.nodes) {
+ output += stringify2(child);
+ }
+ }
+ return output;
+ };
+ return stringify2(ast);
+ };
+ }
+});
+var require_is_number = __commonJS2({
+ "node_modules/is-number/index.js"(exports2, module2) {
+ "use strict";
+ module2.exports = function(num) {
+ if (typeof num === "number") {
+ return num - num === 0;
+ }
+ if (typeof num === "string" && num.trim() !== "") {
+ return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
+ }
+ return false;
+ };
+ }
+});
+var require_to_regex_range = __commonJS2({
+ "node_modules/to-regex-range/index.js"(exports2, module2) {
+ "use strict";
+ var isNumber = require_is_number();
+ var toRegexRange = (min, max, options) => {
+ if (isNumber(min) === false) {
+ throw new TypeError("toRegexRange: expected the first argument to be a number");
+ }
+ if (max === void 0 || min === max) {
+ return String(min);
+ }
+ if (isNumber(max) === false) {
+ throw new TypeError("toRegexRange: expected the second argument to be a number.");
+ }
+ let opts = Object.assign({
+ relaxZeros: true
+ }, options);
+ if (typeof opts.strictZeros === "boolean") {
+ opts.relaxZeros = opts.strictZeros === false;
+ }
+ let relax = String(opts.relaxZeros);
+ let shorthand = String(opts.shorthand);
+ let capture = String(opts.capture);
+ let wrap = String(opts.wrap);
+ let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
+ if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
+ return toRegexRange.cache[cacheKey].result;
+ }
+ let a = Math.min(min, max);
+ let b = Math.max(min, max);
+ if (Math.abs(a - b) === 1) {
+ let result = min + "|" + max;
+ if (opts.capture) {
+ return `(${result})`;
+ }
+ if (opts.wrap === false) {
+ return result;
+ }
+ return `(?:${result})`;
+ }
+ let isPadded = hasPadding(min) || hasPadding(max);
+ let state = {
+ min,
+ max,
+ a,
+ b
+ };
+ let positives = [];
+ let negatives = [];
+ if (isPadded) {
+ state.isPadded = isPadded;
+ state.maxLen = String(state.max).length;
+ }
+ if (a < 0) {
+ let newMin = b < 0 ? Math.abs(b) : 1;
+ negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
+ a = state.a = 0;
+ }
+ if (b >= 0) {
+ positives = splitToPatterns(a, b, state, opts);
+ }
+ state.negatives = negatives;
+ state.positives = positives;
+ state.result = collatePatterns(negatives, positives, opts);
+ if (opts.capture === true) {
+ state.result = `(${state.result})`;
+ } else if (opts.wrap !== false && positives.length + negatives.length > 1) {
+ state.result = `(?:${state.result})`;
+ }
+ toRegexRange.cache[cacheKey] = state;
+ return state.result;
+ };
+ function collatePatterns(neg, pos, options) {
+ let onlyNegative = filterPatterns(neg, pos, "-", false, options) || [];
+ let onlyPositive = filterPatterns(pos, neg, "", false, options) || [];
+ let intersected = filterPatterns(neg, pos, "-?", true, options) || [];
+ let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
+ return subpatterns.join("|");
+ }
+ function splitToRanges(min, max) {
+ let nines = 1;
+ let zeros = 1;
+ let stop = countNines(min, nines);
+ let stops = /* @__PURE__ */ new Set([max]);
+ while (min <= stop && stop <= max) {
+ stops.add(stop);
+ nines += 1;
+ stop = countNines(min, nines);
+ }
+ stop = countZeros(max + 1, zeros) - 1;
+ while (min < stop && stop <= max) {
+ stops.add(stop);
+ zeros += 1;
+ stop = countZeros(max + 1, zeros) - 1;
+ }
+ stops = [...stops];
+ stops.sort(compare);
+ return stops;
+ }
+ function rangeToPattern(start, stop, options) {
+ if (start === stop) {
+ return {
+ pattern: start,
+ count: [],
+ digits: 0
+ };
+ }
+ let zipped = zip(start, stop);
+ let digits = zipped.length;
+ let pattern = "";
+ let count = 0;
+ for (let i = 0; i < digits; i++) {
+ let [startDigit, stopDigit] = zipped[i];
+ if (startDigit === stopDigit) {
+ pattern += startDigit;
+ } else if (startDigit !== "0" || stopDigit !== "9") {
+ pattern += toCharacterClass(startDigit, stopDigit, options);
+ } else {
+ count++;
+ }
+ }
+ if (count) {
+ pattern += options.shorthand === true ? "\\d" : "[0-9]";
+ }
+ return {
+ pattern,
+ count: [count],
+ digits
+ };
+ }
+ function splitToPatterns(min, max, tok, options) {
+ let ranges = splitToRanges(min, max);
+ let tokens = [];
+ let start = min;
+ let prev;
+ for (let i = 0; i < ranges.length; i++) {
+ let max2 = ranges[i];
+ let obj = rangeToPattern(String(start), String(max2), options);
+ let zeros = "";
+ if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
+ if (prev.count.length > 1) {
+ prev.count.pop();
+ }
+ prev.count.push(obj.count[0]);
+ prev.string = prev.pattern + toQuantifier(prev.count);
+ start = max2 + 1;
+ continue;
+ }
+ if (tok.isPadded) {
+ zeros = padZeros(max2, tok, options);
+ }
+ obj.string = zeros + obj.pattern + toQuantifier(obj.count);
+ tokens.push(obj);
+ start = max2 + 1;
+ prev = obj;
+ }
+ return tokens;
+ }
+ function filterPatterns(arr, comparison, prefix, intersection, options) {
+ let result = [];
+ for (let ele of arr) {
+ let {
+ string
+ } = ele;
+ if (!intersection && !contains(comparison, "string", string)) {
+ result.push(prefix + string);
+ }
+ if (intersection && contains(comparison, "string", string)) {
+ result.push(prefix + string);
+ }
+ }
+ return result;
+ }
+ function zip(a, b) {
+ let arr = [];
+ for (let i = 0; i < a.length; i++)
+ arr.push([a[i], b[i]]);
+ return arr;
+ }
+ function compare(a, b) {
+ return a > b ? 1 : b > a ? -1 : 0;
+ }
+ function contains(arr, key, val) {
+ return arr.some((ele) => ele[key] === val);
+ }
+ function countNines(min, len) {
+ return Number(String(min).slice(0, -len) + "9".repeat(len));
+ }
+ function countZeros(integer, zeros) {
+ return integer - integer % Math.pow(10, zeros);
+ }
+ function toQuantifier(digits) {
+ let [start = 0, stop = ""] = digits;
+ if (stop || start > 1) {
+ return `{${start + (stop ? "," + stop : "")}}`;
+ }
+ return "";
+ }
+ function toCharacterClass(a, b, options) {
+ return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
+ }
+ function hasPadding(str) {
+ return /^-?(0+)\d/.test(str);
+ }
+ function padZeros(value, tok, options) {
+ if (!tok.isPadded) {
+ return value;
+ }
+ let diff = Math.abs(tok.maxLen - String(value).length);
+ let relax = options.relaxZeros !== false;
+ switch (diff) {
+ case 0:
+ return "";
+ case 1:
+ return relax ? "0?" : "0";
+ case 2:
+ return relax ? "0{0,2}" : "00";
+ default: {
+ return relax ? `0{0,${diff}}` : `0{${diff}}`;
+ }
+ }
+ }
+ toRegexRange.cache = {};
+ toRegexRange.clearCache = () => toRegexRange.cache = {};
+ module2.exports = toRegexRange;
+ }
+});
+var require_fill_range = __commonJS2({
+ "node_modules/fill-range/index.js"(exports2, module2) {
+ "use strict";
+ var util = require("util");
+ var toRegexRange = require_to_regex_range();
+ var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
+ var transform = (toNumber) => {
+ return (value) => toNumber === true ? Number(value) : String(value);
+ };
+ var isValidValue = (value) => {
+ return typeof value === "number" || typeof value === "string" && value !== "";
+ };
+ var isNumber = (num) => Number.isInteger(+num);
+ var zeros = (input) => {
+ let value = `${input}`;
+ let index = -1;
+ if (value[0] === "-")
+ value = value.slice(1);
+ if (value === "0")
+ return false;
+ while (value[++index] === "0")
+ ;
+ return index > 0;
+ };
+ var stringify2 = (start, end, options) => {
+ if (typeof start === "string" || typeof end === "string") {
+ return true;
+ }
+ return options.stringify === true;
+ };
+ var pad = (input, maxLength, toNumber) => {
+ if (maxLength > 0) {
+ let dash = input[0] === "-" ? "-" : "";
+ if (dash)
+ input = input.slice(1);
+ input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
+ }
+ if (toNumber === false) {
+ return String(input);
+ }
+ return input;
+ };
+ var toMaxLen = (input, maxLength) => {
+ let negative = input[0] === "-" ? "-" : "";
+ if (negative) {
+ input = input.slice(1);
+ maxLength--;
+ }
+ while (input.length < maxLength)
+ input = "0" + input;
+ return negative ? "-" + input : input;
+ };
+ var toSequence = (parts, options) => {
+ parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
+ parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
+ let prefix = options.capture ? "" : "?:";
+ let positives = "";
+ let negatives = "";
+ let result;
+ if (parts.positives.length) {
+ positives = parts.positives.join("|");
+ }
+ if (parts.negatives.length) {
+ negatives = `-(${prefix}${parts.negatives.join("|")})`;
+ }
+ if (positives && negatives) {
+ result = `${positives}|${negatives}`;
+ } else {
+ result = positives || negatives;
+ }
+ if (options.wrap) {
+ return `(${prefix}${result})`;
+ }
+ return result;
+ };
+ var toRange = (a, b, isNumbers, options) => {
+ if (isNumbers) {
+ return toRegexRange(a, b, Object.assign({
+ wrap: false
+ }, options));
+ }
+ let start = String.fromCharCode(a);
+ if (a === b)
+ return start;
+ let stop = String.fromCharCode(b);
+ return `[${start}-${stop}]`;
+ };
+ var toRegex = (start, end, options) => {
+ if (Array.isArray(start)) {
+ let wrap = options.wrap === true;
+ let prefix = options.capture ? "" : "?:";
+ return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
+ }
+ return toRegexRange(start, end, options);
+ };
+ var rangeError = (...args) => {
+ return new RangeError("Invalid range arguments: " + util.inspect(...args));
+ };
+ var invalidRange = (start, end, options) => {
+ if (options.strictRanges === true)
+ throw rangeError([start, end]);
+ return [];
+ };
+ var invalidStep = (step, options) => {
+ if (options.strictRanges === true) {
+ throw new TypeError(`Expected step "${step}" to be a number`);
+ }
+ return [];
+ };
+ var fillNumbers = (start, end, step = 1, options = {}) => {
+ let a = Number(start);
+ let b = Number(end);
+ if (!Number.isInteger(a) || !Number.isInteger(b)) {
+ if (options.strictRanges === true)
+ throw rangeError([start, end]);
+ return [];
+ }
+ if (a === 0)
+ a = 0;
+ if (b === 0)
+ b = 0;
+ let descending = a > b;
+ let startString = String(start);
+ let endString = String(end);
+ let stepString = String(step);
+ step = Math.max(Math.abs(step), 1);
+ let padded = zeros(startString) || zeros(endString) || zeros(stepString);
+ let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
+ let toNumber = padded === false && stringify2(start, end, options) === false;
+ let format = options.transform || transform(toNumber);
+ if (options.toRegex && step === 1) {
+ return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
+ }
+ let parts = {
+ negatives: [],
+ positives: []
+ };
+ let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
+ let range = [];
+ let index = 0;
+ while (descending ? a >= b : a <= b) {
+ if (options.toRegex === true && step > 1) {
+ push(a);
+ } else {
+ range.push(pad(format(a, index), maxLen, toNumber));
+ }
+ a = descending ? a - step : a + step;
+ index++;
+ }
+ if (options.toRegex === true) {
+ return step > 1 ? toSequence(parts, options) : toRegex(range, null, Object.assign({
+ wrap: false
+ }, options));
+ }
+ return range;
+ };
+ var fillLetters = (start, end, step = 1, options = {}) => {
+ if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
+ return invalidRange(start, end, options);
+ }
+ let format = options.transform || ((val) => String.fromCharCode(val));
+ let a = `${start}`.charCodeAt(0);
+ let b = `${end}`.charCodeAt(0);
+ let descending = a > b;
+ let min = Math.min(a, b);
+ let max = Math.max(a, b);
+ if (options.toRegex && step === 1) {
+ return toRange(min, max, false, options);
+ }
+ let range = [];
+ let index = 0;
+ while (descending ? a >= b : a <= b) {
+ range.push(format(a, index));
+ a = descending ? a - step : a + step;
+ index++;
+ }
+ if (options.toRegex === true) {
+ return toRegex(range, null, {
+ wrap: false,
+ options
+ });
+ }
+ return range;
+ };
+ var fill = (start, end, step, options = {}) => {
+ if (end == null && isValidValue(start)) {
+ return [start];
+ }
+ if (!isValidValue(start) || !isValidValue(end)) {
+ return invalidRange(start, end, options);
+ }
+ if (typeof step === "function") {
+ return fill(start, end, 1, {
+ transform: step
+ });
+ }
+ if (isObject(step)) {
+ return fill(start, end, 0, step);
+ }
+ let opts = Object.assign({}, options);
+ if (opts.capture === true)
+ opts.wrap = true;
+ step = step || opts.step || 1;
+ if (!isNumber(step)) {
+ if (step != null && !isObject(step))
+ return invalidStep(step, opts);
+ return fill(start, end, 1, step);
+ }
+ if (isNumber(start) && isNumber(end)) {
+ return fillNumbers(start, end, step, opts);
+ }
+ return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
+ };
+ module2.exports = fill;
+ }
+});
+var require_compile = __commonJS2({
+ "node_modules/braces/lib/compile.js"(exports2, module2) {
+ "use strict";
+ var fill = require_fill_range();
+ var utils = require_utils2();
+ var compile = (ast, options = {}) => {
+ let walk = (node, parent = {}) => {
+ let invalidBlock = utils.isInvalidBrace(parent);
+ let invalidNode = node.invalid === true && options.escapeInvalid === true;
+ let invalid = invalidBlock === true || invalidNode === true;
+ let prefix = options.escapeInvalid === true ? "\\" : "";
+ let output = "";
+ if (node.isOpen === true) {
+ return prefix + node.value;
+ }
+ if (node.isClose === true) {
+ return prefix + node.value;
+ }
+ if (node.type === "open") {
+ return invalid ? prefix + node.value : "(";
+ }
+ if (node.type === "close") {
+ return invalid ? prefix + node.value : ")";
+ }
+ if (node.type === "comma") {
+ return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
+ }
+ if (node.value) {
+ return node.value;
+ }
+ if (node.nodes && node.ranges > 0) {
+ let args = utils.reduce(node.nodes);
+ let range = fill(...args, Object.assign(Object.assign({}, options), {}, {
+ wrap: false,
+ toRegex: true
+ }));
+ if (range.length !== 0) {
+ return args.length > 1 && range.length > 1 ? `(${range})` : range;
+ }
+ }
+ if (node.nodes) {
+ for (let child of node.nodes) {
+ output += walk(child, node);
+ }
+ }
+ return output;
+ };
+ return walk(ast);
+ };
+ module2.exports = compile;
+ }
+});
+var require_expand = __commonJS2({
+ "node_modules/braces/lib/expand.js"(exports2, module2) {
+ "use strict";
+ var fill = require_fill_range();
+ var stringify2 = require_stringify();
+ var utils = require_utils2();
+ var append = (queue = "", stash = "", enclose = false) => {
+ let result = [];
+ queue = [].concat(queue);
+ stash = [].concat(stash);
+ if (!stash.length)
+ return queue;
+ if (!queue.length) {
+ return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
+ }
+ for (let item of queue) {
+ if (Array.isArray(item)) {
+ for (let value of item) {
+ result.push(append(value, stash, enclose));
+ }
+ } else {
+ for (let ele of stash) {
+ if (enclose === true && typeof ele === "string")
+ ele = `{${ele}}`;
+ result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
+ }
+ }
+ }
+ return utils.flatten(result);
+ };
+ var expand = (ast, options = {}) => {
+ let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
+ let walk = (node, parent = {}) => {
+ node.queue = [];
+ let p = parent;
+ let q = parent.queue;
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
+ p = p.parent;
+ q = p.queue;
+ }
+ if (node.invalid || node.dollar) {
+ q.push(append(q.pop(), stringify2(node, options)));
+ return;
+ }
+ if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
+ q.push(append(q.pop(), ["{}"]));
+ return;
+ }
+ if (node.nodes && node.ranges > 0) {
+ let args = utils.reduce(node.nodes);
+ if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
+ throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
+ }
+ let range = fill(...args, options);
+ if (range.length === 0) {
+ range = stringify2(node, options);
+ }
+ q.push(append(q.pop(), range));
+ node.nodes = [];
+ return;
+ }
+ let enclose = utils.encloseBrace(node);
+ let queue = node.queue;
+ let block = node;
+ while (block.type !== "brace" && block.type !== "root" && block.parent) {
+ block = block.parent;
+ queue = block.queue;
+ }
+ for (let i = 0; i < node.nodes.length; i++) {
+ let child = node.nodes[i];
+ if (child.type === "comma" && node.type === "brace") {
+ if (i === 1)
+ queue.push("");
+ queue.push("");
+ continue;
+ }
+ if (child.type === "close") {
+ q.push(append(q.pop(), queue, enclose));
+ continue;
+ }
+ if (child.value && child.type !== "open") {
+ queue.push(append(queue.pop(), child.value));
+ continue;
+ }
+ if (child.nodes) {
+ walk(child, node);
+ }
+ }
+ return queue;
+ };
+ return utils.flatten(walk(ast));
+ };
+ module2.exports = expand;
+ }
+});
+var require_constants = __commonJS2({
+ "node_modules/braces/lib/constants.js"(exports2, module2) {
+ "use strict";
+ module2.exports = {
+ MAX_LENGTH: 1024 * 64,
+ CHAR_0: "0",
+ CHAR_9: "9",
+ CHAR_UPPERCASE_A: "A",
+ CHAR_LOWERCASE_A: "a",
+ CHAR_UPPERCASE_Z: "Z",
+ CHAR_LOWERCASE_Z: "z",
+ CHAR_LEFT_PARENTHESES: "(",
+ CHAR_RIGHT_PARENTHESES: ")",
+ CHAR_ASTERISK: "*",
+ CHAR_AMPERSAND: "&",
+ CHAR_AT: "@",
+ CHAR_BACKSLASH: "\\",
+ CHAR_BACKTICK: "`",
+ CHAR_CARRIAGE_RETURN: "\r",
+ CHAR_CIRCUMFLEX_ACCENT: "^",
+ CHAR_COLON: ":",
+ CHAR_COMMA: ",",
+ CHAR_DOLLAR: "$",
+ CHAR_DOT: ".",
+ CHAR_DOUBLE_QUOTE: '"',
+ CHAR_EQUAL: "=",
+ CHAR_EXCLAMATION_MARK: "!",
+ CHAR_FORM_FEED: "\f",
+ CHAR_FORWARD_SLASH: "/",
+ CHAR_HASH: "#",
+ CHAR_HYPHEN_MINUS: "-",
+ CHAR_LEFT_ANGLE_BRACKET: "<",
+ CHAR_LEFT_CURLY_BRACE: "{",
+ CHAR_LEFT_SQUARE_BRACKET: "[",
+ CHAR_LINE_FEED: "\n",
+ CHAR_NO_BREAK_SPACE: "\xA0",
+ CHAR_PERCENT: "%",
+ CHAR_PLUS: "+",
+ CHAR_QUESTION_MARK: "?",
+ CHAR_RIGHT_ANGLE_BRACKET: ">",
+ CHAR_RIGHT_CURLY_BRACE: "}",
+ CHAR_RIGHT_SQUARE_BRACKET: "]",
+ CHAR_SEMICOLON: ";",
+ CHAR_SINGLE_QUOTE: "'",
+ CHAR_SPACE: " ",
+ CHAR_TAB: " ",
+ CHAR_UNDERSCORE: "_",
+ CHAR_VERTICAL_LINE: "|",
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
+ };
+ }
+});
+var require_parse = __commonJS2({
+ "node_modules/braces/lib/parse.js"(exports2, module2) {
+ "use strict";
+ var stringify2 = require_stringify();
+ var {
+ MAX_LENGTH,
+ CHAR_BACKSLASH,
+ CHAR_BACKTICK,
+ CHAR_COMMA,
+ CHAR_DOT,
+ CHAR_LEFT_PARENTHESES,
+ CHAR_RIGHT_PARENTHESES,
+ CHAR_LEFT_CURLY_BRACE,
+ CHAR_RIGHT_CURLY_BRACE,
+ CHAR_LEFT_SQUARE_BRACKET,
+ CHAR_RIGHT_SQUARE_BRACKET,
+ CHAR_DOUBLE_QUOTE,
+ CHAR_SINGLE_QUOTE,
+ CHAR_NO_BREAK_SPACE,
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE
+ } = require_constants();
+ var parse = (input, options = {}) => {
+ if (typeof input !== "string") {
+ throw new TypeError("Expected a string");
+ }
+ let opts = options || {};
+ let max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+ if (input.length > max) {
+ throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
+ }
+ let ast = {
+ type: "root",
+ input,
+ nodes: []
+ };
+ let stack = [ast];
+ let block = ast;
+ let prev = ast;
+ let brackets = 0;
+ let length = input.length;
+ let index = 0;
+ let depth = 0;
+ let value;
+ let memo = {};
+ const advance = () => input[index++];
+ const push = (node) => {
+ if (node.type === "text" && prev.type === "dot") {
+ prev.type = "text";
+ }
+ if (prev && prev.type === "text" && node.type === "text") {
+ prev.value += node.value;
+ return;
+ }
+ block.nodes.push(node);
+ node.parent = block;
+ node.prev = prev;
+ prev = node;
+ return node;
+ };
+ push({
+ type: "bos"
+ });
+ while (index < length) {
+ block = stack[stack.length - 1];
+ value = advance();
+ if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
+ continue;
+ }
+ if (value === CHAR_BACKSLASH) {
+ push({
+ type: "text",
+ value: (options.keepEscaping ? value : "") + advance()
+ });
+ continue;
+ }
+ if (value === CHAR_RIGHT_SQUARE_BRACKET) {
+ push({
+ type: "text",
+ value: "\\" + value
+ });
+ continue;
+ }
+ if (value === CHAR_LEFT_SQUARE_BRACKET) {
+ brackets++;
+ let closed = true;
+ let next;
+ while (index < length && (next = advance())) {
+ value += next;
+ if (next === CHAR_LEFT_SQUARE_BRACKET) {
+ brackets++;
+ continue;
+ }
+ if (next === CHAR_BACKSLASH) {
+ value += advance();
+ continue;
+ }
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
+ brackets--;
+ if (brackets === 0) {
+ break;
+ }
+ }
+ }
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ if (value === CHAR_LEFT_PARENTHESES) {
+ block = push({
+ type: "paren",
+ nodes: []
+ });
+ stack.push(block);
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ if (value === CHAR_RIGHT_PARENTHESES) {
+ if (block.type !== "paren") {
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ block = stack.pop();
+ push({
+ type: "text",
+ value
+ });
+ block = stack[stack.length - 1];
+ continue;
+ }
+ if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
+ let open = value;
+ let next;
+ if (options.keepQuotes !== true) {
+ value = "";
+ }
+ while (index < length && (next = advance())) {
+ if (next === CHAR_BACKSLASH) {
+ value += next + advance();
+ continue;
+ }
+ if (next === open) {
+ if (options.keepQuotes === true)
+ value += next;
+ break;
+ }
+ value += next;
+ }
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ if (value === CHAR_LEFT_CURLY_BRACE) {
+ depth++;
+ let dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
+ let brace = {
+ type: "brace",
+ open: true,
+ close: false,
+ dollar,
+ depth,
+ commas: 0,
+ ranges: 0,
+ nodes: []
+ };
+ block = push(brace);
+ stack.push(block);
+ push({
+ type: "open",
+ value
+ });
+ continue;
+ }
+ if (value === CHAR_RIGHT_CURLY_BRACE) {
+ if (block.type !== "brace") {
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ let type = "close";
+ block = stack.pop();
+ block.close = true;
+ push({
+ type,
+ value
+ });
+ depth--;
+ block = stack[stack.length - 1];
+ continue;
+ }
+ if (value === CHAR_COMMA && depth > 0) {
+ if (block.ranges > 0) {
+ block.ranges = 0;
+ let open = block.nodes.shift();
+ block.nodes = [open, {
+ type: "text",
+ value: stringify2(block)
+ }];
+ }
+ push({
+ type: "comma",
+ value
+ });
+ block.commas++;
+ continue;
+ }
+ if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
+ let siblings = block.nodes;
+ if (depth === 0 || siblings.length === 0) {
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ if (prev.type === "dot") {
+ block.range = [];
+ prev.value += value;
+ prev.type = "range";
+ if (block.nodes.length !== 3 && block.nodes.length !== 5) {
+ block.invalid = true;
+ block.ranges = 0;
+ prev.type = "text";
+ continue;
+ }
+ block.ranges++;
+ block.args = [];
+ continue;
+ }
+ if (prev.type === "range") {
+ siblings.pop();
+ let before = siblings[siblings.length - 1];
+ before.value += prev.value + value;
+ prev = before;
+ block.ranges--;
+ continue;
+ }
+ push({
+ type: "dot",
+ value
+ });
+ continue;
+ }
+ push({
+ type: "text",
+ value
+ });
+ }
+ do {
+ block = stack.pop();
+ if (block.type !== "root") {
+ block.nodes.forEach((node) => {
+ if (!node.nodes) {
+ if (node.type === "open")
+ node.isOpen = true;
+ if (node.type === "close")
+ node.isClose = true;
+ if (!node.nodes)
+ node.type = "text";
+ node.invalid = true;
+ }
+ });
+ let parent = stack[stack.length - 1];
+ let index2 = parent.nodes.indexOf(block);
+ parent.nodes.splice(index2, 1, ...block.nodes);
+ }
+ } while (stack.length > 0);
+ push({
+ type: "eos"
+ });
+ return ast;
+ };
+ module2.exports = parse;
+ }
+});
+var require_braces = __commonJS2({
+ "node_modules/braces/index.js"(exports2, module2) {
+ "use strict";
+ var stringify2 = require_stringify();
+ var compile = require_compile();
+ var expand = require_expand();
+ var parse = require_parse();
+ var braces = (input, options = {}) => {
+ let output = [];
+ if (Array.isArray(input)) {
+ for (let pattern of input) {
+ let result = braces.create(pattern, options);
+ if (Array.isArray(result)) {
+ output.push(...result);
+ } else {
+ output.push(result);
+ }
+ }
+ } else {
+ output = [].concat(braces.create(input, options));
+ }
+ if (options && options.expand === true && options.nodupes === true) {
+ output = [...new Set(output)];
+ }
+ return output;
+ };
+ braces.parse = (input, options = {}) => parse(input, options);
+ braces.stringify = (input, options = {}) => {
+ if (typeof input === "string") {
+ return stringify2(braces.parse(input, options), options);
+ }
+ return stringify2(input, options);
+ };
+ braces.compile = (input, options = {}) => {
+ if (typeof input === "string") {
+ input = braces.parse(input, options);
+ }
+ return compile(input, options);
+ };
+ braces.expand = (input, options = {}) => {
+ if (typeof input === "string") {
+ input = braces.parse(input, options);
+ }
+ let result = expand(input, options);
+ if (options.noempty === true) {
+ result = result.filter(Boolean);
+ }
+ if (options.nodupes === true) {
+ result = [...new Set(result)];
+ }
+ return result;
+ };
+ braces.create = (input, options = {}) => {
+ if (input === "" || input.length < 3) {
+ return [input];
+ }
+ return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
+ };
+ module2.exports = braces;
+ }
+});
+var require_constants2 = __commonJS2({
+ "node_modules/picomatch/lib/constants.js"(exports2, module2) {
+ "use strict";
+ var path = require("path");
+ var WIN_SLASH = "\\\\/";
+ var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
+ var DOT_LITERAL = "\\.";
+ var PLUS_LITERAL = "\\+";
+ var QMARK_LITERAL = "\\?";
+ var SLASH_LITERAL = "\\/";
+ var ONE_CHAR = "(?=.)";
+ var QMARK = "[^/]";
+ var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
+ var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
+ var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
+ var NO_DOT = `(?!${DOT_LITERAL})`;
+ var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
+ var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
+ var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
+ var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
+ var STAR = `${QMARK}*?`;
+ var POSIX_CHARS = {
+ DOT_LITERAL,
+ PLUS_LITERAL,
+ QMARK_LITERAL,
+ SLASH_LITERAL,
+ ONE_CHAR,
+ QMARK,
+ END_ANCHOR,
+ DOTS_SLASH,
+ NO_DOT,
+ NO_DOTS,
+ NO_DOT_SLASH,
+ NO_DOTS_SLASH,
+ QMARK_NO_DOT,
+ STAR,
+ START_ANCHOR
+ };
+ var WINDOWS_CHARS = Object.assign(Object.assign({}, POSIX_CHARS), {}, {
+ SLASH_LITERAL: `[${WIN_SLASH}]`,
+ QMARK: WIN_NO_SLASH,
+ STAR: `${WIN_NO_SLASH}*?`,
+ DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
+ NO_DOT: `(?!${DOT_LITERAL})`,
+ NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
+ NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
+ NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
+ QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
+ START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
+ END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
+ });
+ var POSIX_REGEX_SOURCE = {
+ alnum: "a-zA-Z0-9",
+ alpha: "a-zA-Z",
+ ascii: "\\x00-\\x7F",
+ blank: " \\t",
+ cntrl: "\\x00-\\x1F\\x7F",
+ digit: "0-9",
+ graph: "\\x21-\\x7E",
+ lower: "a-z",
+ print: "\\x20-\\x7E ",
+ punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
+ space: " \\t\\r\\n\\v\\f",
+ upper: "A-Z",
+ word: "A-Za-z0-9_",
+ xdigit: "A-Fa-f0-9"
+ };
+ module2.exports = {
+ MAX_LENGTH: 1024 * 64,
+ POSIX_REGEX_SOURCE,
+ REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
+ REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
+ REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
+ REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
+ REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
+ REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
+ REPLACEMENTS: {
+ "***": "*",
+ "**/**": "**",
+ "**/**/**": "**"
+ },
+ CHAR_0: 48,
+ CHAR_9: 57,
+ CHAR_UPPERCASE_A: 65,
+ CHAR_LOWERCASE_A: 97,
+ CHAR_UPPERCASE_Z: 90,
+ CHAR_LOWERCASE_Z: 122,
+ CHAR_LEFT_PARENTHESES: 40,
+ CHAR_RIGHT_PARENTHESES: 41,
+ CHAR_ASTERISK: 42,
+ CHAR_AMPERSAND: 38,
+ CHAR_AT: 64,
+ CHAR_BACKWARD_SLASH: 92,
+ CHAR_CARRIAGE_RETURN: 13,
+ CHAR_CIRCUMFLEX_ACCENT: 94,
+ CHAR_COLON: 58,
+ CHAR_COMMA: 44,
+ CHAR_DOT: 46,
+ CHAR_DOUBLE_QUOTE: 34,
+ CHAR_EQUAL: 61,
+ CHAR_EXCLAMATION_MARK: 33,
+ CHAR_FORM_FEED: 12,
+ CHAR_FORWARD_SLASH: 47,
+ CHAR_GRAVE_ACCENT: 96,
+ CHAR_HASH: 35,
+ CHAR_HYPHEN_MINUS: 45,
+ CHAR_LEFT_ANGLE_BRACKET: 60,
+ CHAR_LEFT_CURLY_BRACE: 123,
+ CHAR_LEFT_SQUARE_BRACKET: 91,
+ CHAR_LINE_FEED: 10,
+ CHAR_NO_BREAK_SPACE: 160,
+ CHAR_PERCENT: 37,
+ CHAR_PLUS: 43,
+ CHAR_QUESTION_MARK: 63,
+ CHAR_RIGHT_ANGLE_BRACKET: 62,
+ CHAR_RIGHT_CURLY_BRACE: 125,
+ CHAR_RIGHT_SQUARE_BRACKET: 93,
+ CHAR_SEMICOLON: 59,
+ CHAR_SINGLE_QUOTE: 39,
+ CHAR_SPACE: 32,
+ CHAR_TAB: 9,
+ CHAR_UNDERSCORE: 95,
+ CHAR_VERTICAL_LINE: 124,
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
+ SEP: path.sep,
+ extglobChars(chars) {
+ return {
+ "!": {
+ type: "negate",
+ open: "(?:(?!(?:",
+ close: `))${chars.STAR})`
+ },
+ "?": {
+ type: "qmark",
+ open: "(?:",
+ close: ")?"
+ },
+ "+": {
+ type: "plus",
+ open: "(?:",
+ close: ")+"
+ },
+ "*": {
+ type: "star",
+ open: "(?:",
+ close: ")*"
+ },
+ "@": {
+ type: "at",
+ open: "(?:",
+ close: ")"
+ }
+ };
+ },
+ globChars(win32) {
+ return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
+ }
+ };
+ }
+});
+var require_utils3 = __commonJS2({
+ "node_modules/picomatch/lib/utils.js"(exports2) {
+ "use strict";
+ var path = require("path");
+ var win32 = process.platform === "win32";
+ var {
+ REGEX_BACKSLASH,
+ REGEX_REMOVE_BACKSLASH,
+ REGEX_SPECIAL_CHARS,
+ REGEX_SPECIAL_CHARS_GLOBAL
+ } = require_constants2();
+ exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
+ exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
+ exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str);
+ exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
+ exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
+ exports2.removeBackslashes = (str) => {
+ return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
+ return match === "\\" ? "" : match;
+ });
+ };
+ exports2.supportsLookbehinds = () => {
+ const segs = process.version.slice(1).split(".").map(Number);
+ if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
+ return true;
+ }
+ return false;
+ };
+ exports2.isWindows = (options) => {
+ if (options && typeof options.windows === "boolean") {
+ return options.windows;
+ }
+ return win32 === true || path.sep === "\\";
+ };
+ exports2.escapeLast = (input, char, lastIdx) => {
+ const idx = input.lastIndexOf(char, lastIdx);
+ if (idx === -1)
+ return input;
+ if (input[idx - 1] === "\\")
+ return exports2.escapeLast(input, char, idx - 1);
+ return `${input.slice(0, idx)}\\${input.slice(idx)}`;
+ };
+ exports2.removePrefix = (input, state = {}) => {
+ let output = input;
+ if (output.startsWith("./")) {
+ output = output.slice(2);
+ state.prefix = "./";
+ }
+ return output;
+ };
+ exports2.wrapOutput = (input, state = {}, options = {}) => {
+ const prepend = options.contains ? "" : "^";
+ const append = options.contains ? "" : "$";
+ let output = `${prepend}(?:${input})${append}`;
+ if (state.negated === true) {
+ output = `(?:^(?!${output}).*$)`;
+ }
+ return output;
+ };
+ }
+});
+var require_scan = __commonJS2({
+ "node_modules/picomatch/lib/scan.js"(exports2, module2) {
+ "use strict";
+ var utils = require_utils3();
+ var {
+ CHAR_ASTERISK,
+ CHAR_AT,
+ CHAR_BACKWARD_SLASH,
+ CHAR_COMMA,
+ CHAR_DOT,
+ CHAR_EXCLAMATION_MARK,
+ CHAR_FORWARD_SLASH,
+ CHAR_LEFT_CURLY_BRACE,
+ CHAR_LEFT_PARENTHESES,
+ CHAR_LEFT_SQUARE_BRACKET,
+ CHAR_PLUS,
+ CHAR_QUESTION_MARK,
+ CHAR_RIGHT_CURLY_BRACE,
+ CHAR_RIGHT_PARENTHESES,
+ CHAR_RIGHT_SQUARE_BRACKET
+ } = require_constants2();
+ var isPathSeparator = (code) => {
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
+ };
+ var depth = (token) => {
+ if (token.isPrefix !== true) {
+ token.depth = token.isGlobstar ? Infinity : 1;
+ }
+ };
+ var scan = (input, options) => {
+ const opts = options || {};
+ const length = input.length - 1;
+ const scanToEnd = opts.parts === true || opts.scanToEnd === true;
+ const slashes = [];
+ const tokens = [];
+ const parts = [];
+ let str = input;
+ let index = -1;
+ let start = 0;
+ let lastIndex = 0;
+ let isBrace = false;
+ let isBracket = false;
+ let isGlob = false;
+ let isExtglob = false;
+ let isGlobstar = false;
+ let braceEscaped = false;
+ let backslashes = false;
+ let negated = false;
+ let negatedExtglob = false;
+ let finished = false;
+ let braces = 0;
+ let prev;
+ let code;
+ let token = {
+ value: "",
+ depth: 0,
+ isGlob: false
+ };
+ const eos = () => index >= length;
+ const peek = () => str.charCodeAt(index + 1);
+ const advance = () => {
+ prev = code;
+ return str.charCodeAt(++index);
+ };
+ while (index < length) {
+ code = advance();
+ let next;
+ if (code === CHAR_BACKWARD_SLASH) {
+ backslashes = token.backslashes = true;
+ code = advance();
+ if (code === CHAR_LEFT_CURLY_BRACE) {
+ braceEscaped = true;
+ }
+ continue;
+ }
+ if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
+ braces++;
+ while (eos() !== true && (code = advance())) {
+ if (code === CHAR_BACKWARD_SLASH) {
+ backslashes = token.backslashes = true;
+ advance();
+ continue;
+ }
+ if (code === CHAR_LEFT_CURLY_BRACE) {
+ braces++;
+ continue;
+ }
+ if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
+ isBrace = token.isBrace = true;
+ isGlob = token.isGlob = true;
+ finished = true;
+ if (scanToEnd === true) {
+ continue;
+ }
+ break;
+ }
+ if (braceEscaped !== true && code === CHAR_COMMA) {
+ isBrace = token.isBrace = true;
+ isGlob = token.isGlob = true;
+ finished = true;
+ if (scanToEnd === true) {
+ continue;
+ }
+ break;
+ }
+ if (code === CHAR_RIGHT_CURLY_BRACE) {
+ braces--;
+ if (braces === 0) {
+ braceEscaped = false;
+ isBrace = token.isBrace = true;
+ finished = true;
+ break;
+ }
+ }
+ }
+ if (scanToEnd === true) {
+ continue;
+ }
+ break;
+ }
+ if (code === CHAR_FORWARD_SLASH) {
+ slashes.push(index);
+ tokens.push(token);
+ token = {
+ value: "",
+ depth: 0,
+ isGlob: false
+ };
+ if (finished === true)
+ continue;
+ if (prev === CHAR_DOT && index === start + 1) {
+ start += 2;
+ continue;
+ }
+ lastIndex = index + 1;
+ continue;
+ }
+ if (opts.noext !== true) {
+ const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
+ if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
+ isGlob = token.isGlob = true;
+ isExtglob = token.isExtglob = true;
+ finished = true;
+ if (code === CHAR_EXCLAMATION_MARK && index === start) {
+ negatedExtglob = true;
+ }
+ if (scanToEnd === true) {
+ while (eos() !== true && (code = advance())) {
+ if (code === CHAR_BACKWARD_SLASH) {
+ backslashes = token.backslashes = true;
+ code = advance();
+ continue;
+ }
+ if (code === CHAR_RIGHT_PARENTHESES) {
+ isGlob = token.isGlob = true;
+ finished = true;
+ break;
+ }
+ }
+ continue;
+ }
+ break;
+ }
+ }
+ if (code === CHAR_ASTERISK) {
+ if (prev === CHAR_ASTERISK)
+ isGlobstar = token.isGlobstar = true;
+ isGlob = token.isGlob = true;
+ finished = true;
+ if (scanToEnd === true) {
+ continue;
+ }
+ break;
+ }
+ if (code === CHAR_QUESTION_MARK) {
+ isGlob = token.isGlob = true;
+ finished = true;
+ if (scanToEnd === true) {
+ continue;
+ }
+ break;
+ }
+ if (code === CHAR_LEFT_SQUARE_BRACKET) {
+ while (eos() !== true && (next = advance())) {
+ if (next === CHAR_BACKWARD_SLASH) {
+ backslashes = token.backslashes = true;
+ advance();
+ continue;
+ }
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
+ isBracket = token.isBracket = true;
+ isGlob = token.isGlob = true;
+ finished = true;
+ break;
+ }
+ }
+ if (scanToEnd === true) {
+ continue;
+ }
+ break;
+ }
+ if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
+ negated = token.negated = true;
+ start++;
+ continue;
+ }
+ if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
+ isGlob = token.isGlob = true;
+ if (scanToEnd === true) {
+ while (eos() !== true && (code = advance())) {
+ if (code === CHAR_LEFT_PARENTHESES) {
+ backslashes = token.backslashes = true;
+ code = advance();
+ continue;
+ }
+ if (code === CHAR_RIGHT_PARENTHESES) {
+ finished = true;
+ break;
+ }
+ }
+ continue;
+ }
+ break;
+ }
+ if (isGlob === true) {
+ finished = true;
+ if (scanToEnd === true) {
+ continue;
+ }
+ break;
+ }
+ }
+ if (opts.noext === true) {
+ isExtglob = false;
+ isGlob = false;
+ }
+ let base = str;
+ let prefix = "";
+ let glob = "";
+ if (start > 0) {
+ prefix = str.slice(0, start);
+ str = str.slice(start);
+ lastIndex -= start;
+ }
+ if (base && isGlob === true && lastIndex > 0) {
+ base = str.slice(0, lastIndex);
+ glob = str.slice(lastIndex);
+ } else if (isGlob === true) {
+ base = "";
+ glob = str;
+ } else {
+ base = str;
+ }
+ if (base && base !== "" && base !== "/" && base !== str) {
+ if (isPathSeparator(base.charCodeAt(base.length - 1))) {
+ base = base.slice(0, -1);
+ }
+ }
+ if (opts.unescape === true) {
+ if (glob)
+ glob = utils.removeBackslashes(glob);
+ if (base && backslashes === true) {
+ base = utils.removeBackslashes(base);
+ }
+ }
+ const state = {
+ prefix,
+ input,
+ start,
+ base,
+ glob,
+ isBrace,
+ isBracket,
+ isGlob,
+ isExtglob,
+ isGlobstar,
+ negated,
+ negatedExtglob
+ };
+ if (opts.tokens === true) {
+ state.maxDepth = 0;
+ if (!isPathSeparator(code)) {
+ tokens.push(token);
+ }
+ state.tokens = tokens;
+ }
+ if (opts.parts === true || opts.tokens === true) {
+ let prevIndex;
+ for (let idx = 0; idx < slashes.length; idx++) {
+ const n = prevIndex ? prevIndex + 1 : start;
+ const i = slashes[idx];
+ const value = input.slice(n, i);
+ if (opts.tokens) {
+ if (idx === 0 && start !== 0) {
+ tokens[idx].isPrefix = true;
+ tokens[idx].value = prefix;
+ } else {
+ tokens[idx].value = value;
+ }
+ depth(tokens[idx]);
+ state.maxDepth += tokens[idx].depth;
+ }
+ if (idx !== 0 || value !== "") {
+ parts.push(value);
+ }
+ prevIndex = i;
+ }
+ if (prevIndex && prevIndex + 1 < input.length) {
+ const value = input.slice(prevIndex + 1);
+ parts.push(value);
+ if (opts.tokens) {
+ tokens[tokens.length - 1].value = value;
+ depth(tokens[tokens.length - 1]);
+ state.maxDepth += tokens[tokens.length - 1].depth;
+ }
+ }
+ state.slashes = slashes;
+ state.parts = parts;
+ }
+ return state;
+ };
+ module2.exports = scan;
+ }
+});
+var require_parse2 = __commonJS2({
+ "node_modules/picomatch/lib/parse.js"(exports2, module2) {
+ "use strict";
+ var constants = require_constants2();
+ var utils = require_utils3();
+ var {
+ MAX_LENGTH,
+ POSIX_REGEX_SOURCE,
+ REGEX_NON_SPECIAL_CHARS,
+ REGEX_SPECIAL_CHARS_BACKREF,
+ REPLACEMENTS
+ } = constants;
+ var expandRange = (args, options) => {
+ if (typeof options.expandRange === "function") {
+ return options.expandRange(...args, options);
+ }
+ args.sort();
+ const value = `[${args.join("-")}]`;
+ try {
+ new RegExp(value);
+ } catch (ex) {
+ return args.map((v) => utils.escapeRegex(v)).join("..");
+ }
+ return value;
+ };
+ var syntaxError = (type, char) => {
+ return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
+ };
+ var parse = (input, options) => {
+ if (typeof input !== "string") {
+ throw new TypeError("Expected a string");
+ }
+ input = REPLACEMENTS[input] || input;
+ const opts = Object.assign({}, options);
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+ let len = input.length;
+ if (len > max) {
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
+ }
+ const bos = {
+ type: "bos",
+ value: "",
+ output: opts.prepend || ""
+ };
+ const tokens = [bos];
+ const capture = opts.capture ? "" : "?:";
+ const win32 = utils.isWindows(options);
+ const PLATFORM_CHARS = constants.globChars(win32);
+ const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
+ const {
+ DOT_LITERAL,
+ PLUS_LITERAL,
+ SLASH_LITERAL,
+ ONE_CHAR,
+ DOTS_SLASH,
+ NO_DOT,
+ NO_DOT_SLASH,
+ NO_DOTS_SLASH,
+ QMARK,
+ QMARK_NO_DOT,
+ STAR,
+ START_ANCHOR
+ } = PLATFORM_CHARS;
+ const globstar = (opts2) => {
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
+ };
+ const nodot = opts.dot ? "" : NO_DOT;
+ const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
+ let star = opts.bash === true ? globstar(opts) : STAR;
+ if (opts.capture) {
+ star = `(${star})`;
+ }
+ if (typeof opts.noext === "boolean") {
+ opts.noextglob = opts.noext;
+ }
+ const state = {
+ input,
+ index: -1,
+ start: 0,
+ dot: opts.dot === true,
+ consumed: "",
+ output: "",
+ prefix: "",
+ backtrack: false,
+ negated: false,
+ brackets: 0,
+ braces: 0,
+ parens: 0,
+ quotes: 0,
+ globstar: false,
+ tokens
+ };
+ input = utils.removePrefix(input, state);
+ len = input.length;
+ const extglobs = [];
+ const braces = [];
+ const stack = [];
+ let prev = bos;
+ let value;
+ const eos = () => state.index === len - 1;
+ const peek = state.peek = (n = 1) => input[state.index + n];
+ const advance = state.advance = () => input[++state.index] || "";
+ const remaining = () => input.slice(state.index + 1);
+ const consume = (value2 = "", num = 0) => {
+ state.consumed += value2;
+ state.index += num;
+ };
+ const append = (token) => {
+ state.output += token.output != null ? token.output : token.value;
+ consume(token.value);
+ };
+ const negate = () => {
+ let count = 1;
+ while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
+ advance();
+ state.start++;
+ count++;
+ }
+ if (count % 2 === 0) {
+ return false;
+ }
+ state.negated = true;
+ state.start++;
+ return true;
+ };
+ const increment = (type) => {
+ state[type]++;
+ stack.push(type);
+ };
+ const decrement = (type) => {
+ state[type]--;
+ stack.pop();
+ };
+ const push = (tok) => {
+ if (prev.type === "globstar") {
+ const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
+ const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
+ if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
+ state.output = state.output.slice(0, -prev.output.length);
+ prev.type = "star";
+ prev.value = "*";
+ prev.output = star;
+ state.output += prev.output;
+ }
+ }
+ if (extglobs.length && tok.type !== "paren") {
+ extglobs[extglobs.length - 1].inner += tok.value;
+ }
+ if (tok.value || tok.output)
+ append(tok);
+ if (prev && prev.type === "text" && tok.type === "text") {
+ prev.value += tok.value;
+ prev.output = (prev.output || "") + tok.value;
+ return;
+ }
+ tok.prev = prev;
+ tokens.push(tok);
+ prev = tok;
+ };
+ const extglobOpen = (type, value2) => {
+ const token = Object.assign(Object.assign({}, EXTGLOB_CHARS[value2]), {}, {
+ conditions: 1,
+ inner: ""
+ });
+ token.prev = prev;
+ token.parens = state.parens;
+ token.output = state.output;
+ const output = (opts.capture ? "(" : "") + token.open;
+ increment("parens");
+ push({
+ type,
+ value: value2,
+ output: state.output ? "" : ONE_CHAR
+ });
+ push({
+ type: "paren",
+ extglob: true,
+ value: advance(),
+ output
+ });
+ extglobs.push(token);
+ };
+ const extglobClose = (token) => {
+ let output = token.close + (opts.capture ? ")" : "");
+ let rest;
+ if (token.type === "negate") {
+ let extglobStar = star;
+ if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
+ extglobStar = globstar(opts);
+ }
+ if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
+ output = token.close = `)$))${extglobStar}`;
+ }
+ if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
+ const expression = parse(rest, Object.assign(Object.assign({}, options), {}, {
+ fastpaths: false
+ })).output;
+ output = token.close = `)${expression})${extglobStar})`;
+ }
+ if (token.prev.type === "bos") {
+ state.negatedExtglob = true;
+ }
+ }
+ push({
+ type: "paren",
+ extglob: true,
+ value,
+ output
+ });
+ decrement("parens");
+ };
+ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
+ let backslashes = false;
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
+ if (first === "\\") {
+ backslashes = true;
+ return m;
+ }
+ if (first === "?") {
+ if (esc) {
+ return esc + first + (rest ? QMARK.repeat(rest.length) : "");
+ }
+ if (index === 0) {
+ return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
+ }
+ return QMARK.repeat(chars.length);
+ }
+ if (first === ".") {
+ return DOT_LITERAL.repeat(chars.length);
+ }
+ if (first === "*") {
+ if (esc) {
+ return esc + first + (rest ? star : "");
+ }
+ return star;
+ }
+ return esc ? m : `\\${m}`;
+ });
+ if (backslashes === true) {
+ if (opts.unescape === true) {
+ output = output.replace(/\\/g, "");
+ } else {
+ output = output.replace(/\\+/g, (m) => {
+ return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
+ });
+ }
+ }
+ if (output === input && opts.contains === true) {
+ state.output = input;
+ return state;
+ }
+ state.output = utils.wrapOutput(output, state, options);
+ return state;
+ }
+ while (!eos()) {
+ value = advance();
+ if (value === "\0") {
+ continue;
+ }
+ if (value === "\\") {
+ const next = peek();
+ if (next === "/" && opts.bash !== true) {
+ continue;
+ }
+ if (next === "." || next === ";") {
+ continue;
+ }
+ if (!next) {
+ value += "\\";
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ const match = /^\\+/.exec(remaining());
+ let slashes = 0;
+ if (match && match[0].length > 2) {
+ slashes = match[0].length;
+ state.index += slashes;
+ if (slashes % 2 !== 0) {
+ value += "\\";
+ }
+ }
+ if (opts.unescape === true) {
+ value = advance();
+ } else {
+ value += advance();
+ }
+ if (state.brackets === 0) {
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ }
+ if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
+ if (opts.posix !== false && value === ":") {
+ const inner = prev.value.slice(1);
+ if (inner.includes("[")) {
+ prev.posix = true;
+ if (inner.includes(":")) {
+ const idx = prev.value.lastIndexOf("[");
+ const pre = prev.value.slice(0, idx);
+ const rest2 = prev.value.slice(idx + 2);
+ const posix = POSIX_REGEX_SOURCE[rest2];
+ if (posix) {
+ prev.value = pre + posix;
+ state.backtrack = true;
+ advance();
+ if (!bos.output && tokens.indexOf(prev) === 1) {
+ bos.output = ONE_CHAR;
+ }
+ continue;
+ }
+ }
+ }
+ }
+ if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
+ value = `\\${value}`;
+ }
+ if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
+ value = `\\${value}`;
+ }
+ if (opts.posix === true && value === "!" && prev.value === "[") {
+ value = "^";
+ }
+ prev.value += value;
+ append({
+ value
+ });
+ continue;
+ }
+ if (state.quotes === 1 && value !== '"') {
+ value = utils.escapeRegex(value);
+ prev.value += value;
+ append({
+ value
+ });
+ continue;
+ }
+ if (value === '"') {
+ state.quotes = state.quotes === 1 ? 0 : 1;
+ if (opts.keepQuotes === true) {
+ push({
+ type: "text",
+ value
+ });
+ }
+ continue;
+ }
+ if (value === "(") {
+ increment("parens");
+ push({
+ type: "paren",
+ value
+ });
+ continue;
+ }
+ if (value === ")") {
+ if (state.parens === 0 && opts.strictBrackets === true) {
+ throw new SyntaxError(syntaxError("opening", "("));
+ }
+ const extglob = extglobs[extglobs.length - 1];
+ if (extglob && state.parens === extglob.parens + 1) {
+ extglobClose(extglobs.pop());
+ continue;
+ }
+ push({
+ type: "paren",
+ value,
+ output: state.parens ? ")" : "\\)"
+ });
+ decrement("parens");
+ continue;
+ }
+ if (value === "[") {
+ if (opts.nobracket === true || !remaining().includes("]")) {
+ if (opts.nobracket !== true && opts.strictBrackets === true) {
+ throw new SyntaxError(syntaxError("closing", "]"));
+ }
+ value = `\\${value}`;
+ } else {
+ increment("brackets");
+ }
+ push({
+ type: "bracket",
+ value
+ });
+ continue;
+ }
+ if (value === "]") {
+ if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
+ push({
+ type: "text",
+ value,
+ output: `\\${value}`
+ });
+ continue;
+ }
+ if (state.brackets === 0) {
+ if (opts.strictBrackets === true) {
+ throw new SyntaxError(syntaxError("opening", "["));
+ }
+ push({
+ type: "text",
+ value,
+ output: `\\${value}`
+ });
+ continue;
+ }
+ decrement("brackets");
+ const prevValue = prev.value.slice(1);
+ if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
+ value = `/${value}`;
+ }
+ prev.value += value;
+ append({
+ value
+ });
+ if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
+ continue;
+ }
+ const escaped = utils.escapeRegex(prev.value);
+ state.output = state.output.slice(0, -prev.value.length);
+ if (opts.literalBrackets === true) {
+ state.output += escaped;
+ prev.value = escaped;
+ continue;
+ }
+ prev.value = `(${capture}${escaped}|${prev.value})`;
+ state.output += prev.value;
+ continue;
+ }
+ if (value === "{" && opts.nobrace !== true) {
+ increment("braces");
+ const open = {
+ type: "brace",
+ value,
+ output: "(",
+ outputIndex: state.output.length,
+ tokensIndex: state.tokens.length
+ };
+ braces.push(open);
+ push(open);
+ continue;
+ }
+ if (value === "}") {
+ const brace = braces[braces.length - 1];
+ if (opts.nobrace === true || !brace) {
+ push({
+ type: "text",
+ value,
+ output: value
+ });
+ continue;
+ }
+ let output = ")";
+ if (brace.dots === true) {
+ const arr = tokens.slice();
+ const range = [];
+ for (let i = arr.length - 1; i >= 0; i--) {
+ tokens.pop();
+ if (arr[i].type === "brace") {
+ break;
+ }
+ if (arr[i].type !== "dots") {
+ range.unshift(arr[i].value);
+ }
+ }
+ output = expandRange(range, opts);
+ state.backtrack = true;
+ }
+ if (brace.comma !== true && brace.dots !== true) {
+ const out = state.output.slice(0, brace.outputIndex);
+ const toks = state.tokens.slice(brace.tokensIndex);
+ brace.value = brace.output = "\\{";
+ value = output = "\\}";
+ state.output = out;
+ for (const t of toks) {
+ state.output += t.output || t.value;
+ }
+ }
+ push({
+ type: "brace",
+ value,
+ output
+ });
+ decrement("braces");
+ braces.pop();
+ continue;
+ }
+ if (value === "|") {
+ if (extglobs.length > 0) {
+ extglobs[extglobs.length - 1].conditions++;
+ }
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ if (value === ",") {
+ let output = value;
+ const brace = braces[braces.length - 1];
+ if (brace && stack[stack.length - 1] === "braces") {
+ brace.comma = true;
+ output = "|";
+ }
+ push({
+ type: "comma",
+ value,
+ output
+ });
+ continue;
+ }
+ if (value === "/") {
+ if (prev.type === "dot" && state.index === state.start + 1) {
+ state.start = state.index + 1;
+ state.consumed = "";
+ state.output = "";
+ tokens.pop();
+ prev = bos;
+ continue;
+ }
+ push({
+ type: "slash",
+ value,
+ output: SLASH_LITERAL
+ });
+ continue;
+ }
+ if (value === ".") {
+ if (state.braces > 0 && prev.type === "dot") {
+ if (prev.value === ".")
+ prev.output = DOT_LITERAL;
+ const brace = braces[braces.length - 1];
+ prev.type = "dots";
+ prev.output += value;
+ prev.value += value;
+ brace.dots = true;
+ continue;
+ }
+ if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
+ push({
+ type: "text",
+ value,
+ output: DOT_LITERAL
+ });
+ continue;
+ }
+ push({
+ type: "dot",
+ value,
+ output: DOT_LITERAL
+ });
+ continue;
+ }
+ if (value === "?") {
+ const isGroup = prev && prev.value === "(";
+ if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
+ extglobOpen("qmark", value);
+ continue;
+ }
+ if (prev && prev.type === "paren") {
+ const next = peek();
+ let output = value;
+ if (next === "<" && !utils.supportsLookbehinds()) {
+ throw new Error("Node.js v10 or higher is required for regex lookbehinds");
+ }
+ if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
+ output = `\\${value}`;
+ }
+ push({
+ type: "text",
+ value,
+ output
+ });
+ continue;
+ }
+ if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
+ push({
+ type: "qmark",
+ value,
+ output: QMARK_NO_DOT
+ });
+ continue;
+ }
+ push({
+ type: "qmark",
+ value,
+ output: QMARK
+ });
+ continue;
+ }
+ if (value === "!") {
+ if (opts.noextglob !== true && peek() === "(") {
+ if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
+ extglobOpen("negate", value);
+ continue;
+ }
+ }
+ if (opts.nonegate !== true && state.index === 0) {
+ negate();
+ continue;
+ }
+ }
+ if (value === "+") {
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
+ extglobOpen("plus", value);
+ continue;
+ }
+ if (prev && prev.value === "(" || opts.regex === false) {
+ push({
+ type: "plus",
+ value,
+ output: PLUS_LITERAL
+ });
+ continue;
+ }
+ if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
+ push({
+ type: "plus",
+ value
+ });
+ continue;
+ }
+ push({
+ type: "plus",
+ value: PLUS_LITERAL
+ });
+ continue;
+ }
+ if (value === "@") {
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
+ push({
+ type: "at",
+ extglob: true,
+ value,
+ output: ""
+ });
+ continue;
+ }
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ if (value !== "*") {
+ if (value === "$" || value === "^") {
+ value = `\\${value}`;
+ }
+ const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
+ if (match) {
+ value += match[0];
+ state.index += match[0].length;
+ }
+ push({
+ type: "text",
+ value
+ });
+ continue;
+ }
+ if (prev && (prev.type === "globstar" || prev.star === true)) {
+ prev.type = "star";
+ prev.star = true;
+ prev.value += value;
+ prev.output = star;
+ state.backtrack = true;
+ state.globstar = true;
+ consume(value);
+ continue;
+ }
+ let rest = remaining();
+ if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
+ extglobOpen("star", value);
+ continue;
+ }
+ if (prev.type === "star") {
+ if (opts.noglobstar === true) {
+ consume(value);
+ continue;
+ }
+ const prior = prev.prev;
+ const before = prior.prev;
+ const isStart = prior.type === "slash" || prior.type === "bos";
+ const afterStar = before && (before.type === "star" || before.type === "globstar");
+ if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
+ push({
+ type: "star",
+ value,
+ output: ""
+ });
+ continue;
+ }
+ const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
+ const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
+ if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
+ push({
+ type: "star",
+ value,
+ output: ""
+ });
+ continue;
+ }
+ while (rest.slice(0, 3) === "/**") {
+ const after = input[state.index + 4];
+ if (after && after !== "/") {
+ break;
+ }
+ rest = rest.slice(3);
+ consume("/**", 3);
+ }
+ if (prior.type === "bos" && eos()) {
+ prev.type = "globstar";
+ prev.value += value;
+ prev.output = globstar(opts);
+ state.output = prev.output;
+ state.globstar = true;
+ consume(value);
+ continue;
+ }
+ if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
+ prior.output = `(?:${prior.output}`;
+ prev.type = "globstar";
+ prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
+ prev.value += value;
+ state.globstar = true;
+ state.output += prior.output + prev.output;
+ consume(value);
+ continue;
+ }
+ if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
+ const end = rest[1] !== void 0 ? "|$" : "";
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
+ prior.output = `(?:${prior.output}`;
+ prev.type = "globstar";
+ prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
+ prev.value += value;
+ state.output += prior.output + prev.output;
+ state.globstar = true;
+ consume(value + advance());
+ push({
+ type: "slash",
+ value: "/",
+ output: ""
+ });
+ continue;
+ }
+ if (prior.type === "bos" && rest[0] === "/") {
+ prev.type = "globstar";
+ prev.value += value;
+ prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
+ state.output = prev.output;
+ state.globstar = true;
+ consume(value + advance());
+ push({
+ type: "slash",
+ value: "/",
+ output: ""
+ });
+ continue;
+ }
+ state.output = state.output.slice(0, -prev.output.length);
+ prev.type = "globstar";
+ prev.output = globstar(opts);
+ prev.value += value;
+ state.output += prev.output;
+ state.globstar = true;
+ consume(value);
+ continue;
+ }
+ const token = {
+ type: "star",
+ value,
+ output: star
+ };
+ if (opts.bash === true) {
+ token.output = ".*?";
+ if (prev.type === "bos" || prev.type === "slash") {
+ token.output = nodot + token.output;
+ }
+ push(token);
+ continue;
+ }
+ if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
+ token.output = value;
+ push(token);
+ continue;
+ }
+ if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
+ if (prev.type === "dot") {
+ state.output += NO_DOT_SLASH;
+ prev.output += NO_DOT_SLASH;
+ } else if (opts.dot === true) {
+ state.output += NO_DOTS_SLASH;
+ prev.output += NO_DOTS_SLASH;
+ } else {
+ state.output += nodot;
+ prev.output += nodot;
+ }
+ if (peek() !== "*") {
+ state.output += ONE_CHAR;
+ prev.output += ONE_CHAR;
+ }
+ }
+ push(token);
+ }
+ while (state.brackets > 0) {
+ if (opts.strictBrackets === true)
+ throw new SyntaxError(syntaxError("closing", "]"));
+ state.output = utils.escapeLast(state.output, "[");
+ decrement("brackets");
+ }
+ while (state.parens > 0) {
+ if (opts.strictBrackets === true)
+ throw new SyntaxError(syntaxError("closing", ")"));
+ state.output = utils.escapeLast(state.output, "(");
+ decrement("parens");
+ }
+ while (state.braces > 0) {
+ if (opts.strictBrackets === true)
+ throw new SyntaxError(syntaxError("closing", "}"));
+ state.output = utils.escapeLast(state.output, "{");
+ decrement("braces");
+ }
+ if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
+ push({
+ type: "maybe_slash",
+ value: "",
+ output: `${SLASH_LITERAL}?`
+ });
+ }
+ if (state.backtrack === true) {
+ state.output = "";
+ for (const token of state.tokens) {
+ state.output += token.output != null ? token.output : token.value;
+ if (token.suffix) {
+ state.output += token.suffix;
+ }
+ }
+ }
+ return state;
+ };
+ parse.fastpaths = (input, options) => {
+ const opts = Object.assign({}, options);
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
+ const len = input.length;
+ if (len > max) {
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
+ }
+ input = REPLACEMENTS[input] || input;
+ const win32 = utils.isWindows(options);
+ const {
+ DOT_LITERAL,
+ SLASH_LITERAL,
+ ONE_CHAR,
+ DOTS_SLASH,
+ NO_DOT,
+ NO_DOTS,
+ NO_DOTS_SLASH,
+ STAR,
+ START_ANCHOR
+ } = constants.globChars(win32);
+ const nodot = opts.dot ? NO_DOTS : NO_DOT;
+ const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
+ const capture = opts.capture ? "" : "?:";
+ const state = {
+ negated: false,
+ prefix: ""
+ };
+ let star = opts.bash === true ? ".*?" : STAR;
+ if (opts.capture) {
+ star = `(${star})`;
+ }
+ const globstar = (opts2) => {
+ if (opts2.noglobstar === true)
+ return star;
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
+ };
+ const create = (str) => {
+ switch (str) {
+ case "*":
+ return `${nodot}${ONE_CHAR}${star}`;
+ case ".*":
+ return `${DOT_LITERAL}${ONE_CHAR}${star}`;
+ case "*.*":
+ return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
+ case "*/*":
+ return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
+ case "**":
+ return nodot + globstar(opts);
+ case "**/*":
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
+ case "**/*.*":
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
+ case "**/.*":
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
+ default: {
+ const match = /^(.*?)\.(\w+)$/.exec(str);
+ if (!match)
+ return;
+ const source2 = create(match[1]);
+ if (!source2)
+ return;
+ return source2 + DOT_LITERAL + match[2];
+ }
+ }
+ };
+ const output = utils.removePrefix(input, state);
+ let source = create(output);
+ if (source && opts.strictSlashes !== true) {
+ source += `${SLASH_LITERAL}?`;
+ }
+ return source;
+ };
+ module2.exports = parse;
+ }
+});
+var require_picomatch = __commonJS2({
+ "node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
+ "use strict";
+ var path = require("path");
+ var scan = require_scan();
+ var parse = require_parse2();
+ var utils = require_utils3();
+ var constants = require_constants2();
+ var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
+ var picomatch = (glob, options, returnState = false) => {
+ if (Array.isArray(glob)) {
+ const fns = glob.map((input) => picomatch(input, options, returnState));
+ const arrayMatcher = (str) => {
+ for (const isMatch of fns) {
+ const state2 = isMatch(str);
+ if (state2)
+ return state2;
+ }
+ return false;
+ };
+ return arrayMatcher;
+ }
+ const isState = isObject(glob) && glob.tokens && glob.input;
+ if (glob === "" || typeof glob !== "string" && !isState) {
+ throw new TypeError("Expected pattern to be a non-empty string");
+ }
+ const opts = options || {};
+ const posix = utils.isWindows(options);
+ const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
+ const state = regex.state;
+ delete regex.state;
+ let isIgnored = () => false;
+ if (opts.ignore) {
+ const ignoreOpts = Object.assign(Object.assign({}, options), {}, {
+ ignore: null,
+ onMatch: null,
+ onResult: null
+ });
+ isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
+ }
+ const matcher = (input, returnObject = false) => {
+ const {
+ isMatch,
+ match,
+ output
+ } = picomatch.test(input, regex, options, {
+ glob,
+ posix
+ });
+ const result = {
+ glob,
+ state,
+ regex,
+ posix,
+ input,
+ output,
+ match,
+ isMatch
+ };
+ if (typeof opts.onResult === "function") {
+ opts.onResult(result);
+ }
+ if (isMatch === false) {
+ result.isMatch = false;
+ return returnObject ? result : false;
+ }
+ if (isIgnored(input)) {
+ if (typeof opts.onIgnore === "function") {
+ opts.onIgnore(result);
+ }
+ result.isMatch = false;
+ return returnObject ? result : false;
+ }
+ if (typeof opts.onMatch === "function") {
+ opts.onMatch(result);
+ }
+ return returnObject ? result : true;
+ };
+ if (returnState) {
+ matcher.state = state;
+ }
+ return matcher;
+ };
+ picomatch.test = (input, regex, options, {
+ glob,
+ posix
+ } = {}) => {
+ if (typeof input !== "string") {
+ throw new TypeError("Expected input to be a string");
+ }
+ if (input === "") {
+ return {
+ isMatch: false,
+ output: ""
+ };
+ }
+ const opts = options || {};
+ const format = opts.format || (posix ? utils.toPosixSlashes : null);
+ let match = input === glob;
+ let output = match && format ? format(input) : input;
+ if (match === false) {
+ output = format ? format(input) : input;
+ match = output === glob;
+ }
+ if (match === false || opts.capture === true) {
+ if (opts.matchBase === true || opts.basename === true) {
+ match = picomatch.matchBase(input, regex, options, posix);
+ } else {
+ match = regex.exec(output);
+ }
+ }
+ return {
+ isMatch: Boolean(match),
+ match,
+ output
+ };
+ };
+ picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
+ const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
+ return regex.test(path.basename(input));
+ };
+ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
+ picomatch.parse = (pattern, options) => {
+ if (Array.isArray(pattern))
+ return pattern.map((p) => picomatch.parse(p, options));
+ return parse(pattern, Object.assign(Object.assign({}, options), {}, {
+ fastpaths: false
+ }));
+ };
+ picomatch.scan = (input, options) => scan(input, options);
+ picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
+ if (returnOutput === true) {
+ return state.output;
+ }
+ const opts = options || {};
+ const prepend = opts.contains ? "" : "^";
+ const append = opts.contains ? "" : "$";
+ let source = `${prepend}(?:${state.output})${append}`;
+ if (state && state.negated === true) {
+ source = `^(?!${source}).*$`;
+ }
+ const regex = picomatch.toRegex(source, options);
+ if (returnState === true) {
+ regex.state = state;
+ }
+ return regex;
+ };
+ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
+ if (!input || typeof input !== "string") {
+ throw new TypeError("Expected a non-empty string");
+ }
+ let parsed = {
+ negated: false,
+ fastpaths: true
+ };
+ if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
+ parsed.output = parse.fastpaths(input, options);
+ }
+ if (!parsed.output) {
+ parsed = parse(input, options);
+ }
+ return picomatch.compileRe(parsed, options, returnOutput, returnState);
+ };
+ picomatch.toRegex = (source, options) => {
+ try {
+ const opts = options || {};
+ return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
+ } catch (err) {
+ if (options && options.debug === true)
+ throw err;
+ return /$^/;
+ }
+ };
+ picomatch.constants = constants;
+ module2.exports = picomatch;
+ }
+});
+var require_picomatch2 = __commonJS2({
+ "node_modules/picomatch/index.js"(exports2, module2) {
+ "use strict";
+ module2.exports = require_picomatch();
+ }
+});
+var require_micromatch = __commonJS2({
+ "node_modules/micromatch/index.js"(exports2, module2) {
+ "use strict";
+ var util = require("util");
+ var braces = require_braces();
+ var picomatch = require_picomatch2();
+ var utils = require_utils3();
+ var isEmptyString = (val) => val === "" || val === "./";
+ var micromatch = (list, patterns, options) => {
+ patterns = [].concat(patterns);
+ list = [].concat(list);
+ let omit = /* @__PURE__ */ new Set();
+ let keep = /* @__PURE__ */ new Set();
+ let items = /* @__PURE__ */ new Set();
+ let negatives = 0;
+ let onResult = (state) => {
+ items.add(state.output);
+ if (options && options.onResult) {
+ options.onResult(state);
+ }
+ };
+ for (let i = 0; i < patterns.length; i++) {
+ let isMatch = picomatch(String(patterns[i]), Object.assign(Object.assign({}, options), {}, {
+ onResult
+ }), true);
+ let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
+ if (negated)
+ negatives++;
+ for (let item of list) {
+ let matched = isMatch(item, true);
+ let match = negated ? !matched.isMatch : matched.isMatch;
+ if (!match)
+ continue;
+ if (negated) {
+ omit.add(matched.output);
+ } else {
+ omit.delete(matched.output);
+ keep.add(matched.output);
+ }
+ }
+ }
+ let result = negatives === patterns.length ? [...items] : [...keep];
+ let matches = result.filter((item) => !omit.has(item));
+ if (options && matches.length === 0) {
+ if (options.failglob === true) {
+ throw new Error(`No matches found for "${patterns.join(", ")}"`);
+ }
+ if (options.nonull === true || options.nullglob === true) {
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
+ }
+ }
+ return matches;
+ };
+ micromatch.match = micromatch;
+ micromatch.matcher = (pattern, options) => picomatch(pattern, options);
+ micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
+ micromatch.any = micromatch.isMatch;
+ micromatch.not = (list, patterns, options = {}) => {
+ patterns = [].concat(patterns).map(String);
+ let result = /* @__PURE__ */ new Set();
+ let items = [];
+ let onResult = (state) => {
+ if (options.onResult)
+ options.onResult(state);
+ items.push(state.output);
+ };
+ let matches = new Set(micromatch(list, patterns, Object.assign(Object.assign({}, options), {}, {
+ onResult
+ })));
+ for (let item of items) {
+ if (!matches.has(item)) {
+ result.add(item);
+ }
+ }
+ return [...result];
+ };
+ micromatch.contains = (str, pattern, options) => {
+ if (typeof str !== "string") {
+ throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
+ }
+ if (Array.isArray(pattern)) {
+ return pattern.some((p) => micromatch.contains(str, p, options));
+ }
+ if (typeof pattern === "string") {
+ if (isEmptyString(str) || isEmptyString(pattern)) {
+ return false;
+ }
+ if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
+ return true;
+ }
+ }
+ return micromatch.isMatch(str, pattern, Object.assign(Object.assign({}, options), {}, {
+ contains: true
+ }));
+ };
+ micromatch.matchKeys = (obj, patterns, options) => {
+ if (!utils.isObject(obj)) {
+ throw new TypeError("Expected the first argument to be an object");
+ }
+ let keys = micromatch(Object.keys(obj), patterns, options);
+ let res = {};
+ for (let key of keys)
+ res[key] = obj[key];
+ return res;
+ };
+ micromatch.some = (list, patterns, options) => {
+ let items = [].concat(list);
+ for (let pattern of [].concat(patterns)) {
+ let isMatch = picomatch(String(pattern), options);
+ if (items.some((item) => isMatch(item))) {
+ return true;
+ }
+ }
+ return false;
+ };
+ micromatch.every = (list, patterns, options) => {
+ let items = [].concat(list);
+ for (let pattern of [].concat(patterns)) {
+ let isMatch = picomatch(String(pattern), options);
+ if (!items.every((item) => isMatch(item))) {
+ return false;
+ }
+ }
+ return true;
+ };
+ micromatch.all = (str, patterns, options) => {
+ if (typeof str !== "string") {
+ throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
+ }
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
+ };
+ micromatch.capture = (glob, input, options) => {
+ let posix = utils.isWindows(options);
+ let regex = picomatch.makeRe(String(glob), Object.assign(Object.assign({}, options), {}, {
+ capture: true
+ }));
+ let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
+ if (match) {
+ return match.slice(1).map((v) => v === void 0 ? "" : v);
+ }
+ };
+ micromatch.makeRe = (...args) => picomatch.makeRe(...args);
+ micromatch.scan = (...args) => picomatch.scan(...args);
+ micromatch.parse = (patterns, options) => {
+ let res = [];
+ for (let pattern of [].concat(patterns || [])) {
+ for (let str of braces(String(pattern), options)) {
+ res.push(picomatch.parse(str, options));
+ }
+ }
+ return res;
+ };
+ micromatch.braces = (pattern, options) => {
+ if (typeof pattern !== "string")
+ throw new TypeError("Expected a string");
+ if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) {
+ return [pattern];
+ }
+ return braces(pattern, options);
+ };
+ micromatch.braceExpand = (pattern, options) => {
+ if (typeof pattern !== "string")
+ throw new TypeError("Expected a string");
+ return micromatch.braces(pattern, Object.assign(Object.assign({}, options), {}, {
+ expand: true
+ }));
+ };
+ module2.exports = micromatch;
+ }
+});
+var require_pattern = __commonJS2({
+ "node_modules/fast-glob/out/utils/pattern.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ 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;
+ var path = require("path");
+ var globParent = require_glob_parent();
+ var micromatch = require_micromatch();
+ var GLOBSTAR = "**";
+ var ESCAPE_SYMBOL = "\\";
+ var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
+ var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
+ var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
+ var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
+ var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
+ function isStaticPattern(pattern, options = {}) {
+ return !isDynamicPattern(pattern, options);
+ }
+ exports2.isStaticPattern = isStaticPattern;
+ function isDynamicPattern(pattern, options = {}) {
+ if (pattern === "") {
+ return false;
+ }
+ if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
+ return true;
+ }
+ if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
+ return true;
+ }
+ if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
+ return true;
+ }
+ if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {
+ return true;
+ }
+ return false;
+ }
+ exports2.isDynamicPattern = isDynamicPattern;
+ function hasBraceExpansion(pattern) {
+ const openingBraceIndex = pattern.indexOf("{");
+ if (openingBraceIndex === -1) {
+ return false;
+ }
+ const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1);
+ if (closingBraceIndex === -1) {
+ return false;
+ }
+ const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
+ return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
+ }
+ function convertToPositivePattern(pattern) {
+ return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
+ }
+ exports2.convertToPositivePattern = convertToPositivePattern;
+ function convertToNegativePattern(pattern) {
+ return "!" + pattern;
+ }
+ exports2.convertToNegativePattern = convertToNegativePattern;
+ function isNegativePattern(pattern) {
+ return pattern.startsWith("!") && pattern[1] !== "(";
+ }
+ exports2.isNegativePattern = isNegativePattern;
+ function isPositivePattern(pattern) {
+ return !isNegativePattern(pattern);
+ }
+ exports2.isPositivePattern = isPositivePattern;
+ function getNegativePatterns(patterns) {
+ return patterns.filter(isNegativePattern);
+ }
+ exports2.getNegativePatterns = getNegativePatterns;
+ function getPositivePatterns(patterns) {
+ return patterns.filter(isPositivePattern);
+ }
+ exports2.getPositivePatterns = getPositivePatterns;
+ function getPatternsInsideCurrentDirectory(patterns) {
+ return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
+ }
+ exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
+ function getPatternsOutsideCurrentDirectory(patterns) {
+ return patterns.filter(isPatternRelatedToParentDirectory);
+ }
+ exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
+ function isPatternRelatedToParentDirectory(pattern) {
+ return pattern.startsWith("..") || pattern.startsWith("./..");
+ }
+ exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
+ function getBaseDirectory(pattern) {
+ return globParent(pattern, {
+ flipBackslashes: false
+ });
+ }
+ exports2.getBaseDirectory = getBaseDirectory;
+ function hasGlobStar(pattern) {
+ return pattern.includes(GLOBSTAR);
+ }
+ exports2.hasGlobStar = hasGlobStar;
+ function endsWithSlashGlobStar(pattern) {
+ return pattern.endsWith("/" + GLOBSTAR);
+ }
+ exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
+ function isAffectDepthOfReadingPattern(pattern) {
+ const basename = path.basename(pattern);
+ return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
+ }
+ exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
+ function expandPatternsWithBraceExpansion(patterns) {
+ return patterns.reduce((collection, pattern) => {
+ return collection.concat(expandBraceExpansion(pattern));
+ }, []);
+ }
+ exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
+ function expandBraceExpansion(pattern) {
+ return micromatch.braces(pattern, {
+ expand: true,
+ nodupes: true
+ });
+ }
+ exports2.expandBraceExpansion = expandBraceExpansion;
+ function getPatternParts(pattern, options) {
+ let {
+ parts
+ } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), {
+ parts: true
+ }));
+ if (parts.length === 0) {
+ parts = [pattern];
+ }
+ if (parts[0].startsWith("/")) {
+ parts[0] = parts[0].slice(1);
+ parts.unshift("");
+ }
+ return parts;
+ }
+ exports2.getPatternParts = getPatternParts;
+ function makeRe(pattern, options) {
+ return micromatch.makeRe(pattern, options);
+ }
+ exports2.makeRe = makeRe;
+ function convertPatternsToRe(patterns, options) {
+ return patterns.map((pattern) => makeRe(pattern, options));
+ }
+ exports2.convertPatternsToRe = convertPatternsToRe;
+ function matchAny(entry, patternsRe) {
+ return patternsRe.some((patternRe) => patternRe.test(entry));
+ }
+ exports2.matchAny = matchAny;
+ }
+});
+var require_merge2 = __commonJS2({
+ "node_modules/merge2/index.js"(exports2, module2) {
+ "use strict";
+ var Stream = require("stream");
+ var PassThrough = Stream.PassThrough;
+ var slice = Array.prototype.slice;
+ module2.exports = merge2;
+ function merge2() {
+ const streamsQueue = [];
+ const args = slice.call(arguments);
+ let merging = false;
+ let options = args[args.length - 1];
+ if (options && !Array.isArray(options) && options.pipe == null) {
+ args.pop();
+ } else {
+ options = {};
+ }
+ const doEnd = options.end !== false;
+ const doPipeError = options.pipeError === true;
+ if (options.objectMode == null) {
+ options.objectMode = true;
+ }
+ if (options.highWaterMark == null) {
+ options.highWaterMark = 64 * 1024;
+ }
+ const mergedStream = PassThrough(options);
+ function addStream() {
+ for (let i = 0, len = arguments.length; i < len; i++) {
+ streamsQueue.push(pauseStreams(arguments[i], options));
+ }
+ mergeStream();
+ return this;
+ }
+ function mergeStream() {
+ if (merging) {
+ return;
+ }
+ merging = true;
+ let streams = streamsQueue.shift();
+ if (!streams) {
+ process.nextTick(endStream);
+ return;
+ }
+ if (!Array.isArray(streams)) {
+ streams = [streams];
+ }
+ let pipesCount = streams.length + 1;
+ function next() {
+ if (--pipesCount > 0) {
+ return;
+ }
+ merging = false;
+ mergeStream();
+ }
+ function pipe(stream) {
+ function onend() {
+ stream.removeListener("merge2UnpipeEnd", onend);
+ stream.removeListener("end", onend);
+ if (doPipeError) {
+ stream.removeListener("error", onerror);
+ }
+ next();
+ }
+ function onerror(err) {
+ mergedStream.emit("error", err);
+ }
+ if (stream._readableState.endEmitted) {
+ return next();
+ }
+ stream.on("merge2UnpipeEnd", onend);
+ stream.on("end", onend);
+ if (doPipeError) {
+ stream.on("error", onerror);
+ }
+ stream.pipe(mergedStream, {
+ end: false
+ });
+ stream.resume();
+ }
+ for (let i = 0; i < streams.length; i++) {
+ pipe(streams[i]);
+ }
+ next();
+ }
+ function endStream() {
+ merging = false;
+ mergedStream.emit("queueDrain");
+ if (doEnd) {
+ mergedStream.end();
+ }
+ }
+ mergedStream.setMaxListeners(0);
+ mergedStream.add = addStream;
+ mergedStream.on("unpipe", function(stream) {
+ stream.emit("merge2UnpipeEnd");
+ });
+ if (args.length) {
+ addStream.apply(null, args);
+ }
+ return mergedStream;
+ }
+ function pauseStreams(streams, options) {
+ if (!Array.isArray(streams)) {
+ if (!streams._readableState && streams.pipe) {
+ streams = streams.pipe(PassThrough(options));
+ }
+ if (!streams._readableState || !streams.pause || !streams.pipe) {
+ throw new Error("Only readable stream can be merged.");
+ }
+ streams.pause();
+ } else {
+ for (let i = 0, len = streams.length; i < len; i++) {
+ streams[i] = pauseStreams(streams[i], options);
+ }
+ }
+ return streams;
+ }
+ }
+});
+var require_stream = __commonJS2({
+ "node_modules/fast-glob/out/utils/stream.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.merge = void 0;
+ var merge2 = require_merge2();
+ function merge(streams) {
+ const mergedStream = merge2(streams);
+ streams.forEach((stream) => {
+ stream.once("error", (error) => mergedStream.emit("error", error));
+ });
+ mergedStream.once("close", () => propagateCloseEventToSources(streams));
+ mergedStream.once("end", () => propagateCloseEventToSources(streams));
+ return mergedStream;
+ }
+ exports2.merge = merge;
+ function propagateCloseEventToSources(streams) {
+ streams.forEach((stream) => stream.emit("close"));
+ }
+ }
+});
+var require_string = __commonJS2({
+ "node_modules/fast-glob/out/utils/string.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.isEmpty = exports2.isString = void 0;
+ function isString(input) {
+ return typeof input === "string";
+ }
+ exports2.isString = isString;
+ function isEmpty(input) {
+ return input === "";
+ }
+ exports2.isEmpty = isEmpty;
+ }
+});
+var require_utils4 = __commonJS2({
+ "node_modules/fast-glob/out/utils/index.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0;
+ var array2 = require_array();
+ exports2.array = array2;
+ var errno = require_errno();
+ exports2.errno = errno;
+ var fs = require_fs();
+ exports2.fs = fs;
+ var path = require_path();
+ exports2.path = path;
+ var pattern = require_pattern();
+ exports2.pattern = pattern;
+ var stream = require_stream();
+ exports2.stream = stream;
+ var string = require_string();
+ exports2.string = string;
+ }
+});
+var require_tasks = __commonJS2({
+ "node_modules/fast-glob/out/managers/tasks.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0;
+ var utils = require_utils4();
+ function generate(patterns, settings) {
+ const positivePatterns = getPositivePatterns(patterns);
+ const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
+ const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
+ const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false);
+ const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true);
+ return staticTasks.concat(dynamicTasks);
+ }
+ exports2.generate = generate;
+ function convertPatternsToTasks(positive, negative, dynamic) {
+ const tasks = [];
+ const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
+ const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive);
+ const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
+ const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
+ tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
+ if ("." in insideCurrentDirectoryGroup) {
+ tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic));
+ } else {
+ tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
+ }
+ return tasks;
+ }
+ exports2.convertPatternsToTasks = convertPatternsToTasks;
+ function getPositivePatterns(patterns) {
+ return utils.pattern.getPositivePatterns(patterns);
+ }
+ exports2.getPositivePatterns = getPositivePatterns;
+ function getNegativePatternsAsPositive(patterns, ignore) {
+ const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
+ const positive = negative.map(utils.pattern.convertToPositivePattern);
+ return positive;
+ }
+ exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
+ function groupPatternsByBaseDirectory(patterns) {
+ const group = {};
+ return patterns.reduce((collection, pattern) => {
+ const base = utils.pattern.getBaseDirectory(pattern);
+ if (base in collection) {
+ collection[base].push(pattern);
+ } else {
+ collection[base] = [pattern];
+ }
+ return collection;
+ }, group);
+ }
+ exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
+ function convertPatternGroupsToTasks(positive, negative, dynamic) {
+ return Object.keys(positive).map((base) => {
+ return convertPatternGroupToTask(base, positive[base], negative, dynamic);
+ });
+ }
+ exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
+ function convertPatternGroupToTask(base, positive, negative, dynamic) {
+ return {
+ dynamic,
+ positive,
+ negative,
+ base,
+ patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
+ };
+ }
+ exports2.convertPatternGroupToTask = convertPatternGroupToTask;
+ }
+});
+var require_patterns = __commonJS2({
+ "node_modules/fast-glob/out/managers/patterns.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.removeDuplicateSlashes = exports2.transform = void 0;
+ var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
+ function transform(patterns) {
+ return patterns.map((pattern) => removeDuplicateSlashes(pattern));
+ }
+ exports2.transform = transform;
+ function removeDuplicateSlashes(pattern) {
+ return pattern.replace(DOUBLE_SLASH_RE, "/");
+ }
+ exports2.removeDuplicateSlashes = removeDuplicateSlashes;
+ }
+});
+var require_async = __commonJS2({
+ "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.read = void 0;
+ function read(path, settings, callback) {
+ settings.fs.lstat(path, (lstatError, lstat) => {
+ if (lstatError !== null) {
+ callFailureCallback(callback, lstatError);
+ return;
+ }
+ if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
+ callSuccessCallback(callback, lstat);
+ return;
+ }
+ settings.fs.stat(path, (statError, stat) => {
+ if (statError !== null) {
+ if (settings.throwErrorOnBrokenSymbolicLink) {
+ callFailureCallback(callback, statError);
+ return;
+ }
+ callSuccessCallback(callback, lstat);
+ return;
+ }
+ if (settings.markSymbolicLink) {
+ stat.isSymbolicLink = () => true;
+ }
+ callSuccessCallback(callback, stat);
+ });
+ });
+ }
+ exports2.read = read;
+ function callFailureCallback(callback, error) {
+ callback(error);
+ }
+ function callSuccessCallback(callback, result) {
+ callback(null, result);
+ }
+ }
+});
+var require_sync = __commonJS2({
+ "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.read = void 0;
+ function read(path, settings) {
+ const lstat = settings.fs.lstatSync(path);
+ if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
+ return lstat;
+ }
+ try {
+ const stat = settings.fs.statSync(path);
+ if (settings.markSymbolicLink) {
+ stat.isSymbolicLink = () => true;
+ }
+ return stat;
+ } catch (error) {
+ if (!settings.throwErrorOnBrokenSymbolicLink) {
+ return lstat;
+ }
+ throw error;
+ }
+ }
+ exports2.read = read;
+ }
+});
+var require_fs2 = __commonJS2({
+ "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
+ var fs = require("fs");
+ exports2.FILE_SYSTEM_ADAPTER = {
+ lstat: fs.lstat,
+ stat: fs.stat,
+ lstatSync: fs.lstatSync,
+ statSync: fs.statSync
+ };
+ function createFileSystemAdapter(fsMethods) {
+ if (fsMethods === void 0) {
+ return exports2.FILE_SYSTEM_ADAPTER;
+ }
+ return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
+ }
+ exports2.createFileSystemAdapter = createFileSystemAdapter;
+ }
+});
+var require_settings = __commonJS2({
+ "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var fs = require_fs2();
+ var Settings = class {
+ constructor(_options = {}) {
+ this._options = _options;
+ this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
+ this.fs = fs.createFileSystemAdapter(this._options.fs);
+ this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
+ this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
+ }
+ _getValue(option, value) {
+ return option !== null && option !== void 0 ? option : value;
+ }
+ };
+ exports2.default = Settings;
+ }
+});
+var require_out = __commonJS2({
+ "node_modules/@nodelib/fs.stat/out/index.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.statSync = exports2.stat = exports2.Settings = void 0;
+ var async = require_async();
+ var sync = require_sync();
+ var settings_1 = require_settings();
+ exports2.Settings = settings_1.default;
+ function stat(path, optionsOrSettingsOrCallback, callback) {
+ if (typeof optionsOrSettingsOrCallback === "function") {
+ async.read(path, getSettings(), optionsOrSettingsOrCallback);
+ return;
+ }
+ async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
+ }
+ exports2.stat = stat;
+ function statSync(path, optionsOrSettings) {
+ const settings = getSettings(optionsOrSettings);
+ return sync.read(path, settings);
+ }
+ exports2.statSync = statSync;
+ function getSettings(settingsOrOptions = {}) {
+ if (settingsOrOptions instanceof settings_1.default) {
+ return settingsOrOptions;
+ }
+ return new settings_1.default(settingsOrOptions);
+ }
+ }
+});
+var require_queue_microtask = __commonJS2({
+ "node_modules/queue-microtask/index.js"(exports2, module2) {
+ var promise;
+ module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => {
+ throw err;
+ }, 0));
+ }
+});
+var require_run_parallel = __commonJS2({
+ "node_modules/run-parallel/index.js"(exports2, module2) {
+ module2.exports = runParallel;
+ var queueMicrotask2 = require_queue_microtask();
+ function runParallel(tasks, cb) {
+ let results, pending, keys;
+ let isSync = true;
+ if (Array.isArray(tasks)) {
+ results = [];
+ pending = tasks.length;
+ } else {
+ keys = Object.keys(tasks);
+ results = {};
+ pending = keys.length;
+ }
+ function done(err) {
+ function end() {
+ if (cb)
+ cb(err, results);
+ cb = null;
+ }
+ if (isSync)
+ queueMicrotask2(end);
+ else
+ end();
+ }
+ function each(i, err, result) {
+ results[i] = result;
+ if (--pending === 0 || err) {
+ done(err);
+ }
+ }
+ if (!pending) {
+ done(null);
+ } else if (keys) {
+ keys.forEach(function(key) {
+ tasks[key](function(err, result) {
+ each(key, err, result);
+ });
+ });
+ } else {
+ tasks.forEach(function(task, i) {
+ task(function(err, result) {
+ each(i, err, result);
+ });
+ });
+ }
+ isSync = false;
+ }
+ }
+});
+var require_constants3 = __commonJS2({
+ "node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
+ var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
+ if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) {
+ throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
+ }
+ var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
+ var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
+ var SUPPORTED_MAJOR_VERSION = 10;
+ var SUPPORTED_MINOR_VERSION = 10;
+ var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
+ var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
+ exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
+ }
+});
+var require_fs3 = __commonJS2({
+ "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.createDirentFromStats = void 0;
+ var DirentFromStats = class {
+ constructor(name, stats) {
+ this.name = name;
+ this.isBlockDevice = stats.isBlockDevice.bind(stats);
+ this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
+ this.isDirectory = stats.isDirectory.bind(stats);
+ this.isFIFO = stats.isFIFO.bind(stats);
+ this.isFile = stats.isFile.bind(stats);
+ this.isSocket = stats.isSocket.bind(stats);
+ this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
+ }
+ };
+ function createDirentFromStats(name, stats) {
+ return new DirentFromStats(name, stats);
+ }
+ exports2.createDirentFromStats = createDirentFromStats;
+ }
+});
+var require_utils5 = __commonJS2({
+ "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.fs = void 0;
+ var fs = require_fs3();
+ exports2.fs = fs;
+ }
+});
+var require_common = __commonJS2({
+ "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.joinPathSegments = void 0;
+ function joinPathSegments(a, b, separator) {
+ if (a.endsWith(separator)) {
+ return a + b;
+ }
+ return a + separator + b;
+ }
+ exports2.joinPathSegments = joinPathSegments;
+ }
+});
+var require_async2 = __commonJS2({
+ "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
+ var fsStat = require_out();
+ var rpl = require_run_parallel();
+ var constants_1 = require_constants3();
+ var utils = require_utils5();
+ var common = require_common();
+ function read(directory, settings, callback) {
+ if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
+ readdirWithFileTypes(directory, settings, callback);
+ return;
+ }
+ readdir(directory, settings, callback);
+ }
+ exports2.read = read;
+ function readdirWithFileTypes(directory, settings, callback) {
+ settings.fs.readdir(directory, {
+ withFileTypes: true
+ }, (readdirError, dirents) => {
+ if (readdirError !== null) {
+ callFailureCallback(callback, readdirError);
+ return;
+ }
+ const entries = dirents.map((dirent) => ({
+ dirent,
+ name: dirent.name,
+ path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
+ }));
+ if (!settings.followSymbolicLinks) {
+ callSuccessCallback(callback, entries);
+ return;
+ }
+ const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
+ rpl(tasks, (rplError, rplEntries) => {
+ if (rplError !== null) {
+ callFailureCallback(callback, rplError);
+ return;
+ }
+ callSuccessCallback(callback, rplEntries);
+ });
+ });
+ }
+ exports2.readdirWithFileTypes = readdirWithFileTypes;
+ function makeRplTaskEntry(entry, settings) {
+ return (done) => {
+ if (!entry.dirent.isSymbolicLink()) {
+ done(null, entry);
+ return;
+ }
+ settings.fs.stat(entry.path, (statError, stats) => {
+ if (statError !== null) {
+ if (settings.throwErrorOnBrokenSymbolicLink) {
+ done(statError);
+ return;
+ }
+ done(null, entry);
+ return;
+ }
+ entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
+ done(null, entry);
+ });
+ };
+ }
+ function readdir(directory, settings, callback) {
+ settings.fs.readdir(directory, (readdirError, names) => {
+ if (readdirError !== null) {
+ callFailureCallback(callback, readdirError);
+ return;
+ }
+ const tasks = names.map((name) => {
+ const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
+ return (done) => {
+ fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
+ if (error !== null) {
+ done(error);
+ return;
+ }
+ const entry = {
+ name,
+ path,
+ dirent: utils.fs.createDirentFromStats(name, stats)
+ };
+ if (settings.stats) {
+ entry.stats = stats;
+ }
+ done(null, entry);
+ });
+ };
+ });
+ rpl(tasks, (rplError, entries) => {
+ if (rplError !== null) {
+ callFailureCallback(callback, rplError);
+ return;
+ }
+ callSuccessCallback(callback, entries);
+ });
+ });
+ }
+ exports2.readdir = readdir;
+ function callFailureCallback(callback, error) {
+ callback(error);
+ }
+ function callSuccessCallback(callback, result) {
+ callback(null, result);
+ }
+ }
+});
+var require_sync2 = __commonJS2({
+ "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
+ var fsStat = require_out();
+ var constants_1 = require_constants3();
+ var utils = require_utils5();
+ var common = require_common();
+ function read(directory, settings) {
+ if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
+ return readdirWithFileTypes(directory, settings);
+ }
+ return readdir(directory, settings);
+ }
+ exports2.read = read;
+ function readdirWithFileTypes(directory, settings) {
+ const dirents = settings.fs.readdirSync(directory, {
+ withFileTypes: true
+ });
+ return dirents.map((dirent) => {
+ const entry = {
+ dirent,
+ name: dirent.name,
+ path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
+ };
+ if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
+ try {
+ const stats = settings.fs.statSync(entry.path);
+ entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
+ } catch (error) {
+ if (settings.throwErrorOnBrokenSymbolicLink) {
+ throw error;
+ }
+ }
+ }
+ return entry;
+ });
+ }
+ exports2.readdirWithFileTypes = readdirWithFileTypes;
+ function readdir(directory, settings) {
+ const names = settings.fs.readdirSync(directory);
+ return names.map((name) => {
+ const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
+ const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
+ const entry = {
+ name,
+ path: entryPath,
+ dirent: utils.fs.createDirentFromStats(name, stats)
+ };
+ if (settings.stats) {
+ entry.stats = stats;
+ }
+ return entry;
+ });
+ }
+ exports2.readdir = readdir;
+ }
+});
+var require_fs4 = __commonJS2({
+ "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
+ var fs = require("fs");
+ exports2.FILE_SYSTEM_ADAPTER = {
+ lstat: fs.lstat,
+ stat: fs.stat,
+ lstatSync: fs.lstatSync,
+ statSync: fs.statSync,
+ readdir: fs.readdir,
+ readdirSync: fs.readdirSync
+ };
+ function createFileSystemAdapter(fsMethods) {
+ if (fsMethods === void 0) {
+ return exports2.FILE_SYSTEM_ADAPTER;
+ }
+ return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods);
+ }
+ exports2.createFileSystemAdapter = createFileSystemAdapter;
+ }
+});
+var require_settings2 = __commonJS2({
+ "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var path = require("path");
+ var fsStat = require_out();
+ var fs = require_fs4();
+ var Settings = class {
+ constructor(_options = {}) {
+ this._options = _options;
+ this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
+ this.fs = fs.createFileSystemAdapter(this._options.fs);
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
+ this.stats = this._getValue(this._options.stats, false);
+ this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
+ this.fsStatSettings = new fsStat.Settings({
+ followSymbolicLink: this.followSymbolicLinks,
+ fs: this.fs,
+ throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
+ });
+ }
+ _getValue(option, value) {
+ return option !== null && option !== void 0 ? option : value;
+ }
+ };
+ exports2.default = Settings;
+ }
+});
+var require_out2 = __commonJS2({
+ "node_modules/@nodelib/fs.scandir/out/index.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.Settings = exports2.scandirSync = exports2.scandir = void 0;
+ var async = require_async2();
+ var sync = require_sync2();
+ var settings_1 = require_settings2();
+ exports2.Settings = settings_1.default;
+ function scandir(path, optionsOrSettingsOrCallback, callback) {
+ if (typeof optionsOrSettingsOrCallback === "function") {
+ async.read(path, getSettings(), optionsOrSettingsOrCallback);
+ return;
+ }
+ async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
+ }
+ exports2.scandir = scandir;
+ function scandirSync(path, optionsOrSettings) {
+ const settings = getSettings(optionsOrSettings);
+ return sync.read(path, settings);
+ }
+ exports2.scandirSync = scandirSync;
+ function getSettings(settingsOrOptions = {}) {
+ if (settingsOrOptions instanceof settings_1.default) {
+ return settingsOrOptions;
+ }
+ return new settings_1.default(settingsOrOptions);
+ }
+ }
+});
+var require_reusify = __commonJS2({
+ "node_modules/reusify/reusify.js"(exports2, module2) {
+ "use strict";
+ function reusify(Constructor) {
+ var head = new Constructor();
+ var tail = head;
+ function get() {
+ var current = head;
+ if (current.next) {
+ head = current.next;
+ } else {
+ head = new Constructor();
+ tail = head;
+ }
+ current.next = null;
+ return current;
+ }
+ function release(obj) {
+ tail.next = obj;
+ tail = obj;
+ }
+ return {
+ get,
+ release
+ };
+ }
+ module2.exports = reusify;
+ }
+});
+var require_queue = __commonJS2({
+ "node_modules/fastq/queue.js"(exports2, module2) {
+ "use strict";
+ var reusify = require_reusify();
+ function fastqueue(context, worker, concurrency) {
+ if (typeof context === "function") {
+ concurrency = worker;
+ worker = context;
+ context = null;
+ }
+ if (concurrency < 1) {
+ throw new Error("fastqueue concurrency must be greater than 1");
+ }
+ var cache = reusify(Task);
+ var queueHead = null;
+ var queueTail = null;
+ var _running = 0;
+ var errorHandler = null;
+ var self2 = {
+ push,
+ drain: noop,
+ saturated: noop,
+ pause,
+ paused: false,
+ concurrency,
+ running,
+ resume,
+ idle,
+ length,
+ getQueue,
+ unshift,
+ empty: noop,
+ kill,
+ killAndDrain,
+ error
+ };
+ return self2;
+ function running() {
+ return _running;
+ }
+ function pause() {
+ self2.paused = true;
+ }
+ function length() {
+ var current = queueHead;
+ var counter = 0;
+ while (current) {
+ current = current.next;
+ counter++;
+ }
+ return counter;
+ }
+ function getQueue() {
+ var current = queueHead;
+ var tasks = [];
+ while (current) {
+ tasks.push(current.value);
+ current = current.next;
+ }
+ return tasks;
+ }
+ function resume() {
+ if (!self2.paused)
+ return;
+ self2.paused = false;
+ for (var i = 0; i < self2.concurrency; i++) {
+ _running++;
+ release();
+ }
+ }
+ function idle() {
+ return _running === 0 && self2.length() === 0;
+ }
+ function push(value, done) {
+ var current = cache.get();
+ current.context = context;
+ current.release = release;
+ current.value = value;
+ current.callback = done || noop;
+ current.errorHandler = errorHandler;
+ if (_running === self2.concurrency || self2.paused) {
+ if (queueTail) {
+ queueTail.next = current;
+ queueTail = current;
+ } else {
+ queueHead = current;
+ queueTail = current;
+ self2.saturated();
+ }
+ } else {
+ _running++;
+ worker.call(context, current.value, current.worked);
+ }
+ }
+ function unshift(value, done) {
+ var current = cache.get();
+ current.context = context;
+ current.release = release;
+ current.value = value;
+ current.callback = done || noop;
+ if (_running === self2.concurrency || self2.paused) {
+ if (queueHead) {
+ current.next = queueHead;
+ queueHead = current;
+ } else {
+ queueHead = current;
+ queueTail = current;
+ self2.saturated();
+ }
+ } else {
+ _running++;
+ worker.call(context, current.value, current.worked);
+ }
+ }
+ function release(holder) {
+ if (holder) {
+ cache.release(holder);
+ }
+ var next = queueHead;
+ if (next) {
+ if (!self2.paused) {
+ if (queueTail === queueHead) {
+ queueTail = null;
+ }
+ queueHead = next.next;
+ next.next = null;
+ worker.call(context, next.value, next.worked);
+ if (queueTail === null) {
+ self2.empty();
+ }
+ } else {
+ _running--;
+ }
+ } else if (--_running === 0) {
+ self2.drain();
+ }
+ }
+ function kill() {
+ queueHead = null;
+ queueTail = null;
+ self2.drain = noop;
+ }
+ function killAndDrain() {
+ queueHead = null;
+ queueTail = null;
+ self2.drain();
+ self2.drain = noop;
+ }
+ function error(handler) {
+ errorHandler = handler;
+ }
+ }
+ function noop() {
+ }
+ function Task() {
+ this.value = null;
+ this.callback = noop;
+ this.next = null;
+ this.release = noop;
+ this.context = null;
+ this.errorHandler = null;
+ var self2 = this;
+ this.worked = function worked(err, result) {
+ var callback = self2.callback;
+ var errorHandler = self2.errorHandler;
+ var val = self2.value;
+ self2.value = null;
+ self2.callback = noop;
+ if (self2.errorHandler) {
+ errorHandler(err, val);
+ }
+ callback.call(self2.context, err, result);
+ self2.release(self2);
+ };
+ }
+ function queueAsPromised(context, worker, concurrency) {
+ if (typeof context === "function") {
+ concurrency = worker;
+ worker = context;
+ context = null;
+ }
+ function asyncWrapper(arg, cb) {
+ worker.call(this, arg).then(function(res) {
+ cb(null, res);
+ }, cb);
+ }
+ var queue = fastqueue(context, asyncWrapper, concurrency);
+ var pushCb = queue.push;
+ var unshiftCb = queue.unshift;
+ queue.push = push;
+ queue.unshift = unshift;
+ queue.drained = drained;
+ return queue;
+ function push(value) {
+ var p = new Promise(function(resolve, reject) {
+ pushCb(value, function(err, result) {
+ if (err) {
+ reject(err);
+ return;
+ }
+ resolve(result);
+ });
+ });
+ p.catch(noop);
+ return p;
+ }
+ function unshift(value) {
+ var p = new Promise(function(resolve, reject) {
+ unshiftCb(value, function(err, result) {
+ if (err) {
+ reject(err);
+ return;
+ }
+ resolve(result);
+ });
+ });
+ p.catch(noop);
+ return p;
+ }
+ function drained() {
+ var previousDrain = queue.drain;
+ var p = new Promise(function(resolve) {
+ queue.drain = function() {
+ previousDrain();
+ resolve();
+ };
+ });
+ return p;
+ }
+ }
+ module2.exports = fastqueue;
+ module2.exports.promise = queueAsPromised;
+ }
+});
+var require_common2 = __commonJS2({
+ "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0;
+ function isFatalError(settings, error) {
+ if (settings.errorFilter === null) {
+ return true;
+ }
+ return !settings.errorFilter(error);
+ }
+ exports2.isFatalError = isFatalError;
+ function isAppliedFilter(filter, value) {
+ return filter === null || filter(value);
+ }
+ exports2.isAppliedFilter = isAppliedFilter;
+ function replacePathSegmentSeparator(filepath, separator) {
+ return filepath.split(/[/\\]/).join(separator);
+ }
+ exports2.replacePathSegmentSeparator = replacePathSegmentSeparator;
+ function joinPathSegments(a, b, separator) {
+ if (a === "") {
+ return b;
+ }
+ if (a.endsWith(separator)) {
+ return a + b;
+ }
+ return a + separator + b;
+ }
+ exports2.joinPathSegments = joinPathSegments;
+ }
+});
+var require_reader = __commonJS2({
+ "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var common = require_common2();
+ var Reader = class {
+ constructor(_root, _settings) {
+ this._root = _root;
+ this._settings = _settings;
+ this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
+ }
+ };
+ exports2.default = Reader;
+ }
+});
+var require_async3 = __commonJS2({
+ "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var events_1 = require("events");
+ var fsScandir = require_out2();
+ var fastq = require_queue();
+ var common = require_common2();
+ var reader_1 = require_reader();
+ var AsyncReader = class extends reader_1.default {
+ constructor(_root, _settings) {
+ super(_root, _settings);
+ this._settings = _settings;
+ this._scandir = fsScandir.scandir;
+ this._emitter = new events_1.EventEmitter();
+ this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
+ this._isFatalError = false;
+ this._isDestroyed = false;
+ this._queue.drain = () => {
+ if (!this._isFatalError) {
+ this._emitter.emit("end");
+ }
+ };
+ }
+ read() {
+ this._isFatalError = false;
+ this._isDestroyed = false;
+ setImmediate(() => {
+ this._pushToQueue(this._root, this._settings.basePath);
+ });
+ return this._emitter;
+ }
+ get isDestroyed() {
+ return this._isDestroyed;
+ }
+ destroy() {
+ if (this._isDestroyed) {
+ throw new Error("The reader is already destroyed");
+ }
+ this._isDestroyed = true;
+ this._queue.killAndDrain();
+ }
+ onEntry(callback) {
+ this._emitter.on("entry", callback);
+ }
+ onError(callback) {
+ this._emitter.once("error", callback);
+ }
+ onEnd(callback) {
+ this._emitter.once("end", callback);
+ }
+ _pushToQueue(directory, base) {
+ const queueItem = {
+ directory,
+ base
+ };
+ this._queue.push(queueItem, (error) => {
+ if (error !== null) {
+ this._handleError(error);
+ }
+ });
+ }
+ _worker(item, done) {
+ this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
+ if (error !== null) {
+ done(error, void 0);
+ return;
+ }
+ for (const entry of entries) {
+ this._handleEntry(entry, item.base);
+ }
+ done(null, void 0);
+ });
+ }
+ _handleError(error) {
+ if (this._isDestroyed || !common.isFatalError(this._settings, error)) {
+ return;
+ }
+ this._isFatalError = true;
+ this._isDestroyed = true;
+ this._emitter.emit("error", error);
+ }
+ _handleEntry(entry, base) {
+ if (this._isDestroyed || this._isFatalError) {
+ return;
+ }
+ const fullpath = entry.path;
+ if (base !== void 0) {
+ entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
+ }
+ if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
+ this._emitEntry(entry);
+ }
+ if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
+ this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
+ }
+ }
+ _emitEntry(entry) {
+ this._emitter.emit("entry", entry);
+ }
+ };
+ exports2.default = AsyncReader;
+ }
+});
+var require_async4 = __commonJS2({
+ "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var async_1 = require_async3();
+ var AsyncProvider = class {
+ constructor(_root, _settings) {
+ this._root = _root;
+ this._settings = _settings;
+ this._reader = new async_1.default(this._root, this._settings);
+ this._storage = [];
+ }
+ read(callback) {
+ this._reader.onError((error) => {
+ callFailureCallback(callback, error);
+ });
+ this._reader.onEntry((entry) => {
+ this._storage.push(entry);
+ });
+ this._reader.onEnd(() => {
+ callSuccessCallback(callback, this._storage);
+ });
+ this._reader.read();
+ }
+ };
+ exports2.default = AsyncProvider;
+ function callFailureCallback(callback, error) {
+ callback(error);
+ }
+ function callSuccessCallback(callback, entries) {
+ callback(null, entries);
+ }
+ }
+});
+var require_stream2 = __commonJS2({
+ "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var stream_1 = require("stream");
+ var async_1 = require_async3();
+ var StreamProvider = class {
+ constructor(_root, _settings) {
+ this._root = _root;
+ this._settings = _settings;
+ this._reader = new async_1.default(this._root, this._settings);
+ this._stream = new stream_1.Readable({
+ objectMode: true,
+ read: () => {
+ },
+ destroy: () => {
+ if (!this._reader.isDestroyed) {
+ this._reader.destroy();
+ }
+ }
+ });
+ }
+ read() {
+ this._reader.onError((error) => {
+ this._stream.emit("error", error);
+ });
+ this._reader.onEntry((entry) => {
+ this._stream.push(entry);
+ });
+ this._reader.onEnd(() => {
+ this._stream.push(null);
+ });
+ this._reader.read();
+ return this._stream;
+ }
+ };
+ exports2.default = StreamProvider;
+ }
+});
+var require_sync3 = __commonJS2({
+ "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var fsScandir = require_out2();
+ var common = require_common2();
+ var reader_1 = require_reader();
+ var SyncReader = class extends reader_1.default {
+ constructor() {
+ super(...arguments);
+ this._scandir = fsScandir.scandirSync;
+ this._storage = [];
+ this._queue = /* @__PURE__ */ new Set();
+ }
+ read() {
+ this._pushToQueue(this._root, this._settings.basePath);
+ this._handleQueue();
+ return this._storage;
+ }
+ _pushToQueue(directory, base) {
+ this._queue.add({
+ directory,
+ base
+ });
+ }
+ _handleQueue() {
+ for (const item of this._queue.values()) {
+ this._handleDirectory(item.directory, item.base);
+ }
+ }
+ _handleDirectory(directory, base) {
+ try {
+ const entries = this._scandir(directory, this._settings.fsScandirSettings);
+ for (const entry of entries) {
+ this._handleEntry(entry, base);
+ }
+ } catch (error) {
+ this._handleError(error);
+ }
+ }
+ _handleError(error) {
+ if (!common.isFatalError(this._settings, error)) {
+ return;
+ }
+ throw error;
+ }
+ _handleEntry(entry, base) {
+ const fullpath = entry.path;
+ if (base !== void 0) {
+ entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
+ }
+ if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
+ this._pushToStorage(entry);
+ }
+ if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
+ this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path);
+ }
+ }
+ _pushToStorage(entry) {
+ this._storage.push(entry);
+ }
+ };
+ exports2.default = SyncReader;
+ }
+});
+var require_sync4 = __commonJS2({
+ "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var sync_1 = require_sync3();
+ var SyncProvider = class {
+ constructor(_root, _settings) {
+ this._root = _root;
+ this._settings = _settings;
+ this._reader = new sync_1.default(this._root, this._settings);
+ }
+ read() {
+ return this._reader.read();
+ }
+ };
+ exports2.default = SyncProvider;
+ }
+});
+var require_settings3 = __commonJS2({
+ "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var path = require("path");
+ var fsScandir = require_out2();
+ var Settings = class {
+ constructor(_options = {}) {
+ this._options = _options;
+ this.basePath = this._getValue(this._options.basePath, void 0);
+ this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);
+ this.deepFilter = this._getValue(this._options.deepFilter, null);
+ this.entryFilter = this._getValue(this._options.entryFilter, null);
+ this.errorFilter = this._getValue(this._options.errorFilter, null);
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
+ this.fsScandirSettings = new fsScandir.Settings({
+ followSymbolicLinks: this._options.followSymbolicLinks,
+ fs: this._options.fs,
+ pathSegmentSeparator: this._options.pathSegmentSeparator,
+ stats: this._options.stats,
+ throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
+ });
+ }
+ _getValue(option, value) {
+ return option !== null && option !== void 0 ? option : value;
+ }
+ };
+ exports2.default = Settings;
+ }
+});
+var require_out3 = __commonJS2({
+ "node_modules/@nodelib/fs.walk/out/index.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0;
+ var async_1 = require_async4();
+ var stream_1 = require_stream2();
+ var sync_1 = require_sync4();
+ var settings_1 = require_settings3();
+ exports2.Settings = settings_1.default;
+ function walk(directory, optionsOrSettingsOrCallback, callback) {
+ if (typeof optionsOrSettingsOrCallback === "function") {
+ new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
+ return;
+ }
+ new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
+ }
+ exports2.walk = walk;
+ function walkSync(directory, optionsOrSettings) {
+ const settings = getSettings(optionsOrSettings);
+ const provider = new sync_1.default(directory, settings);
+ return provider.read();
+ }
+ exports2.walkSync = walkSync;
+ function walkStream(directory, optionsOrSettings) {
+ const settings = getSettings(optionsOrSettings);
+ const provider = new stream_1.default(directory, settings);
+ return provider.read();
+ }
+ exports2.walkStream = walkStream;
+ function getSettings(settingsOrOptions = {}) {
+ if (settingsOrOptions instanceof settings_1.default) {
+ return settingsOrOptions;
+ }
+ return new settings_1.default(settingsOrOptions);
+ }
+ }
+});
+var require_reader2 = __commonJS2({
+ "node_modules/fast-glob/out/readers/reader.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var path = require("path");
+ var fsStat = require_out();
+ var utils = require_utils4();
+ var Reader = class {
+ constructor(_settings) {
+ this._settings = _settings;
+ this._fsStatSettings = new fsStat.Settings({
+ followSymbolicLink: this._settings.followSymbolicLinks,
+ fs: this._settings.fs,
+ throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
+ });
+ }
+ _getFullEntryPath(filepath) {
+ return path.resolve(this._settings.cwd, filepath);
+ }
+ _makeEntry(stats, pattern) {
+ const entry = {
+ name: pattern,
+ path: pattern,
+ dirent: utils.fs.createDirentFromStats(pattern, stats)
+ };
+ if (this._settings.stats) {
+ entry.stats = stats;
+ }
+ return entry;
+ }
+ _isFatalError(error) {
+ return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
+ }
+ };
+ exports2.default = Reader;
+ }
+});
+var require_stream3 = __commonJS2({
+ "node_modules/fast-glob/out/readers/stream.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var stream_1 = require("stream");
+ var fsStat = require_out();
+ var fsWalk = require_out3();
+ var reader_1 = require_reader2();
+ var ReaderStream = class extends reader_1.default {
+ constructor() {
+ super(...arguments);
+ this._walkStream = fsWalk.walkStream;
+ this._stat = fsStat.stat;
+ }
+ dynamic(root, options) {
+ return this._walkStream(root, options);
+ }
+ static(patterns, options) {
+ const filepaths = patterns.map(this._getFullEntryPath, this);
+ const stream = new stream_1.PassThrough({
+ objectMode: true
+ });
+ stream._write = (index, _enc, done) => {
+ return this._getEntry(filepaths[index], patterns[index], options).then((entry) => {
+ if (entry !== null && options.entryFilter(entry)) {
+ stream.push(entry);
+ }
+ if (index === filepaths.length - 1) {
+ stream.end();
+ }
+ done();
+ }).catch(done);
+ };
+ for (let i = 0; i < filepaths.length; i++) {
+ stream.write(i);
+ }
+ return stream;
+ }
+ _getEntry(filepath, pattern, options) {
+ return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => {
+ if (options.errorFilter(error)) {
+ return null;
+ }
+ throw error;
+ });
+ }
+ _getStat(filepath) {
+ return new Promise((resolve, reject) => {
+ this._stat(filepath, this._fsStatSettings, (error, stats) => {
+ return error === null ? resolve(stats) : reject(error);
+ });
+ });
+ }
+ };
+ exports2.default = ReaderStream;
+ }
+});
+var require_async5 = __commonJS2({
+ "node_modules/fast-glob/out/readers/async.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var fsWalk = require_out3();
+ var reader_1 = require_reader2();
+ var stream_1 = require_stream3();
+ var ReaderAsync = class extends reader_1.default {
+ constructor() {
+ super(...arguments);
+ this._walkAsync = fsWalk.walk;
+ this._readerStream = new stream_1.default(this._settings);
+ }
+ dynamic(root, options) {
+ return new Promise((resolve, reject) => {
+ this._walkAsync(root, options, (error, entries) => {
+ if (error === null) {
+ resolve(entries);
+ } else {
+ reject(error);
+ }
+ });
+ });
+ }
+ async static(patterns, options) {
+ const entries = [];
+ const stream = this._readerStream.static(patterns, options);
+ return new Promise((resolve, reject) => {
+ stream.once("error", reject);
+ stream.on("data", (entry) => entries.push(entry));
+ stream.once("end", () => resolve(entries));
+ });
+ }
+ };
+ exports2.default = ReaderAsync;
+ }
+});
+var require_matcher = __commonJS2({
+ "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var utils = require_utils4();
+ var Matcher = class {
+ constructor(_patterns, _settings, _micromatchOptions) {
+ this._patterns = _patterns;
+ this._settings = _settings;
+ this._micromatchOptions = _micromatchOptions;
+ this._storage = [];
+ this._fillStorage();
+ }
+ _fillStorage() {
+ const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns);
+ for (const pattern of patterns) {
+ const segments = this._getPatternSegments(pattern);
+ const sections = this._splitSegmentsIntoSections(segments);
+ this._storage.push({
+ complete: sections.length <= 1,
+ pattern,
+ segments,
+ sections
+ });
+ }
+ }
+ _getPatternSegments(pattern) {
+ const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);
+ return parts.map((part) => {
+ const dynamic = utils.pattern.isDynamicPattern(part, this._settings);
+ if (!dynamic) {
+ return {
+ dynamic: false,
+ pattern: part
+ };
+ }
+ return {
+ dynamic: true,
+ pattern: part,
+ patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
+ };
+ });
+ }
+ _splitSegmentsIntoSections(segments) {
+ return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
+ }
+ };
+ exports2.default = Matcher;
+ }
+});
+var require_partial = __commonJS2({
+ "node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var matcher_1 = require_matcher();
+ var PartialMatcher = class extends matcher_1.default {
+ match(filepath) {
+ const parts = filepath.split("/");
+ const levels = parts.length;
+ const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
+ for (const pattern of patterns) {
+ const section = pattern.sections[0];
+ if (!pattern.complete && levels > section.length) {
+ return true;
+ }
+ const match = parts.every((part, index) => {
+ const segment = pattern.segments[index];
+ if (segment.dynamic && segment.patternRe.test(part)) {
+ return true;
+ }
+ if (!segment.dynamic && segment.pattern === part) {
+ return true;
+ }
+ return false;
+ });
+ if (match) {
+ return true;
+ }
+ }
+ return false;
+ }
+ };
+ exports2.default = PartialMatcher;
+ }
+});
+var require_deep = __commonJS2({
+ "node_modules/fast-glob/out/providers/filters/deep.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var utils = require_utils4();
+ var partial_1 = require_partial();
+ var DeepFilter = class {
+ constructor(_settings, _micromatchOptions) {
+ this._settings = _settings;
+ this._micromatchOptions = _micromatchOptions;
+ }
+ getFilter(basePath, positive, negative) {
+ const matcher = this._getMatcher(positive);
+ const negativeRe = this._getNegativePatternsRe(negative);
+ return (entry) => this._filter(basePath, entry, matcher, negativeRe);
+ }
+ _getMatcher(patterns) {
+ return new partial_1.default(patterns, this._settings, this._micromatchOptions);
+ }
+ _getNegativePatternsRe(patterns) {
+ const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
+ return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
+ }
+ _filter(basePath, entry, matcher, negativeRe) {
+ if (this._isSkippedByDeep(basePath, entry.path)) {
+ return false;
+ }
+ if (this._isSkippedSymbolicLink(entry)) {
+ return false;
+ }
+ const filepath = utils.path.removeLeadingDotSegment(entry.path);
+ if (this._isSkippedByPositivePatterns(filepath, matcher)) {
+ return false;
+ }
+ return this._isSkippedByNegativePatterns(filepath, negativeRe);
+ }
+ _isSkippedByDeep(basePath, entryPath) {
+ if (this._settings.deep === Infinity) {
+ return false;
+ }
+ return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
+ }
+ _getEntryLevel(basePath, entryPath) {
+ const entryPathDepth = entryPath.split("/").length;
+ if (basePath === "") {
+ return entryPathDepth;
+ }
+ const basePathDepth = basePath.split("/").length;
+ return entryPathDepth - basePathDepth;
+ }
+ _isSkippedSymbolicLink(entry) {
+ return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
+ }
+ _isSkippedByPositivePatterns(entryPath, matcher) {
+ return !this._settings.baseNameMatch && !matcher.match(entryPath);
+ }
+ _isSkippedByNegativePatterns(entryPath, patternsRe) {
+ return !utils.pattern.matchAny(entryPath, patternsRe);
+ }
+ };
+ exports2.default = DeepFilter;
+ }
+});
+var require_entry = __commonJS2({
+ "node_modules/fast-glob/out/providers/filters/entry.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var utils = require_utils4();
+ var EntryFilter = class {
+ constructor(_settings, _micromatchOptions) {
+ this._settings = _settings;
+ this._micromatchOptions = _micromatchOptions;
+ this.index = /* @__PURE__ */ new Map();
+ }
+ getFilter(positive, negative) {
+ const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
+ const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
+ return (entry) => this._filter(entry, positiveRe, negativeRe);
+ }
+ _filter(entry, positiveRe, negativeRe) {
+ if (this._settings.unique && this._isDuplicateEntry(entry)) {
+ return false;
+ }
+ if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
+ return false;
+ }
+ if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) {
+ return false;
+ }
+ const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
+ const isDirectory = entry.dirent.isDirectory();
+ const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(entry.path, negativeRe, isDirectory);
+ if (this._settings.unique && isMatched) {
+ this._createIndexRecord(entry);
+ }
+ return isMatched;
+ }
+ _isDuplicateEntry(entry) {
+ return this.index.has(entry.path);
+ }
+ _createIndexRecord(entry) {
+ this.index.set(entry.path, void 0);
+ }
+ _onlyFileFilter(entry) {
+ return this._settings.onlyFiles && !entry.dirent.isFile();
+ }
+ _onlyDirectoryFilter(entry) {
+ return this._settings.onlyDirectories && !entry.dirent.isDirectory();
+ }
+ _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
+ if (!this._settings.absolute) {
+ return false;
+ }
+ const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
+ return utils.pattern.matchAny(fullpath, patternsRe);
+ }
+ _isMatchToPatterns(entryPath, patternsRe, isDirectory) {
+ const filepath = utils.path.removeLeadingDotSegment(entryPath);
+ const isMatched = utils.pattern.matchAny(filepath, patternsRe);
+ if (!isMatched && isDirectory) {
+ return utils.pattern.matchAny(filepath + "/", patternsRe);
+ }
+ return isMatched;
+ }
+ };
+ exports2.default = EntryFilter;
+ }
+});
+var require_error = __commonJS2({
+ "node_modules/fast-glob/out/providers/filters/error.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var utils = require_utils4();
+ var ErrorFilter = class {
+ constructor(_settings) {
+ this._settings = _settings;
+ }
+ getFilter() {
+ return (error) => this._isNonFatalError(error);
+ }
+ _isNonFatalError(error) {
+ return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
+ }
+ };
+ exports2.default = ErrorFilter;
+ }
+});
+var require_entry2 = __commonJS2({
+ "node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var utils = require_utils4();
+ var EntryTransformer = class {
+ constructor(_settings) {
+ this._settings = _settings;
+ }
+ getTransformer() {
+ return (entry) => this._transform(entry);
+ }
+ _transform(entry) {
+ let filepath = entry.path;
+ if (this._settings.absolute) {
+ filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
+ filepath = utils.path.unixify(filepath);
+ }
+ if (this._settings.markDirectories && entry.dirent.isDirectory()) {
+ filepath += "/";
+ }
+ if (!this._settings.objectMode) {
+ return filepath;
+ }
+ return Object.assign(Object.assign({}, entry), {
+ path: filepath
+ });
+ }
+ };
+ exports2.default = EntryTransformer;
+ }
+});
+var require_provider = __commonJS2({
+ "node_modules/fast-glob/out/providers/provider.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var path = require("path");
+ var deep_1 = require_deep();
+ var entry_1 = require_entry();
+ var error_1 = require_error();
+ var entry_2 = require_entry2();
+ var Provider = class {
+ constructor(_settings) {
+ this._settings = _settings;
+ this.errorFilter = new error_1.default(this._settings);
+ this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
+ this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
+ this.entryTransformer = new entry_2.default(this._settings);
+ }
+ _getRootDirectory(task) {
+ return path.resolve(this._settings.cwd, task.base);
+ }
+ _getReaderOptions(task) {
+ const basePath = task.base === "." ? "" : task.base;
+ return {
+ basePath,
+ pathSegmentSeparator: "/",
+ concurrency: this._settings.concurrency,
+ deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
+ entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
+ errorFilter: this.errorFilter.getFilter(),
+ followSymbolicLinks: this._settings.followSymbolicLinks,
+ fs: this._settings.fs,
+ stats: this._settings.stats,
+ throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
+ transform: this.entryTransformer.getTransformer()
+ };
+ }
+ _getMicromatchOptions() {
+ return {
+ dot: this._settings.dot,
+ matchBase: this._settings.baseNameMatch,
+ nobrace: !this._settings.braceExpansion,
+ nocase: !this._settings.caseSensitiveMatch,
+ noext: !this._settings.extglob,
+ noglobstar: !this._settings.globstar,
+ posix: true,
+ strictSlashes: false
+ };
+ }
+ };
+ exports2.default = Provider;
+ }
+});
+var require_async6 = __commonJS2({
+ "node_modules/fast-glob/out/providers/async.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var async_1 = require_async5();
+ var provider_1 = require_provider();
+ var ProviderAsync = class extends provider_1.default {
+ constructor() {
+ super(...arguments);
+ this._reader = new async_1.default(this._settings);
+ }
+ async read(task) {
+ const root = this._getRootDirectory(task);
+ const options = this._getReaderOptions(task);
+ const entries = await this.api(root, task, options);
+ return entries.map((entry) => options.transform(entry));
+ }
+ api(root, task, options) {
+ if (task.dynamic) {
+ return this._reader.dynamic(root, options);
+ }
+ return this._reader.static(task.patterns, options);
+ }
+ };
+ exports2.default = ProviderAsync;
+ }
+});
+var require_stream4 = __commonJS2({
+ "node_modules/fast-glob/out/providers/stream.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var stream_1 = require("stream");
+ var stream_2 = require_stream3();
+ var provider_1 = require_provider();
+ var ProviderStream = class extends provider_1.default {
+ constructor() {
+ super(...arguments);
+ this._reader = new stream_2.default(this._settings);
+ }
+ read(task) {
+ const root = this._getRootDirectory(task);
+ const options = this._getReaderOptions(task);
+ const source = this.api(root, task, options);
+ const destination = new stream_1.Readable({
+ objectMode: true,
+ read: () => {
+ }
+ });
+ source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end"));
+ destination.once("close", () => source.destroy());
+ return destination;
+ }
+ api(root, task, options) {
+ if (task.dynamic) {
+ return this._reader.dynamic(root, options);
+ }
+ return this._reader.static(task.patterns, options);
+ }
+ };
+ exports2.default = ProviderStream;
+ }
+});
+var require_sync5 = __commonJS2({
+ "node_modules/fast-glob/out/readers/sync.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var fsStat = require_out();
+ var fsWalk = require_out3();
+ var reader_1 = require_reader2();
+ var ReaderSync = class extends reader_1.default {
+ constructor() {
+ super(...arguments);
+ this._walkSync = fsWalk.walkSync;
+ this._statSync = fsStat.statSync;
+ }
+ dynamic(root, options) {
+ return this._walkSync(root, options);
+ }
+ static(patterns, options) {
+ const entries = [];
+ for (const pattern of patterns) {
+ const filepath = this._getFullEntryPath(pattern);
+ const entry = this._getEntry(filepath, pattern, options);
+ if (entry === null || !options.entryFilter(entry)) {
+ continue;
+ }
+ entries.push(entry);
+ }
+ return entries;
+ }
+ _getEntry(filepath, pattern, options) {
+ try {
+ const stats = this._getStat(filepath);
+ return this._makeEntry(stats, pattern);
+ } catch (error) {
+ if (options.errorFilter(error)) {
+ return null;
+ }
+ throw error;
+ }
+ }
+ _getStat(filepath) {
+ return this._statSync(filepath, this._fsStatSettings);
+ }
+ };
+ exports2.default = ReaderSync;
+ }
+});
+var require_sync6 = __commonJS2({
+ "node_modules/fast-glob/out/providers/sync.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ var sync_1 = require_sync5();
+ var provider_1 = require_provider();
+ var ProviderSync = class extends provider_1.default {
+ constructor() {
+ super(...arguments);
+ this._reader = new sync_1.default(this._settings);
+ }
+ read(task) {
+ const root = this._getRootDirectory(task);
+ const options = this._getReaderOptions(task);
+ const entries = this.api(root, task, options);
+ return entries.map(options.transform);
+ }
+ api(root, task, options) {
+ if (task.dynamic) {
+ return this._reader.dynamic(root, options);
+ }
+ return this._reader.static(task.patterns, options);
+ }
+ };
+ exports2.default = ProviderSync;
+ }
+});
+var require_settings4 = __commonJS2({
+ "node_modules/fast-glob/out/settings.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
+ var fs = require("fs");
+ var os2 = require("os");
+ var CPU_COUNT = Math.max(os2.cpus().length, 1);
+ exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
+ lstat: fs.lstat,
+ lstatSync: fs.lstatSync,
+ stat: fs.stat,
+ statSync: fs.statSync,
+ readdir: fs.readdir,
+ readdirSync: fs.readdirSync
+ };
+ var Settings = class {
+ constructor(_options = {}) {
+ this._options = _options;
+ this.absolute = this._getValue(this._options.absolute, false);
+ this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
+ this.braceExpansion = this._getValue(this._options.braceExpansion, true);
+ this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
+ this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
+ this.cwd = this._getValue(this._options.cwd, process.cwd());
+ this.deep = this._getValue(this._options.deep, Infinity);
+ this.dot = this._getValue(this._options.dot, false);
+ this.extglob = this._getValue(this._options.extglob, true);
+ this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
+ this.fs = this._getFileSystemMethods(this._options.fs);
+ this.globstar = this._getValue(this._options.globstar, true);
+ this.ignore = this._getValue(this._options.ignore, []);
+ this.markDirectories = this._getValue(this._options.markDirectories, false);
+ this.objectMode = this._getValue(this._options.objectMode, false);
+ this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
+ this.onlyFiles = this._getValue(this._options.onlyFiles, true);
+ this.stats = this._getValue(this._options.stats, false);
+ this.suppressErrors = this._getValue(this._options.suppressErrors, false);
+ this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
+ this.unique = this._getValue(this._options.unique, true);
+ if (this.onlyDirectories) {
+ this.onlyFiles = false;
+ }
+ if (this.stats) {
+ this.objectMode = true;
+ }
+ }
+ _getValue(option, value) {
+ return option === void 0 ? value : option;
+ }
+ _getFileSystemMethods(methods = {}) {
+ return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
+ }
+ };
+ exports2.default = Settings;
+ }
+});
+var require_out4 = __commonJS2({
+ "node_modules/fast-glob/out/index.js"(exports2, module2) {
+ "use strict";
+ var taskManager = require_tasks();
+ var patternManager = require_patterns();
+ var async_1 = require_async6();
+ var stream_1 = require_stream4();
+ var sync_1 = require_sync6();
+ var settings_1 = require_settings4();
+ var utils = require_utils4();
+ async function FastGlob(source, options) {
+ assertPatternsInput(source);
+ const works = getWorks(source, async_1.default, options);
+ const result = await Promise.all(works);
+ return utils.array.flatten(result);
+ }
+ (function(FastGlob2) {
+ function sync(source, options) {
+ assertPatternsInput(source);
+ const works = getWorks(source, sync_1.default, options);
+ return utils.array.flatten(works);
+ }
+ FastGlob2.sync = sync;
+ function stream(source, options) {
+ assertPatternsInput(source);
+ const works = getWorks(source, stream_1.default, options);
+ return utils.stream.merge(works);
+ }
+ FastGlob2.stream = stream;
+ function generateTasks(source, options) {
+ assertPatternsInput(source);
+ const patterns = patternManager.transform([].concat(source));
+ const settings = new settings_1.default(options);
+ return taskManager.generate(patterns, settings);
+ }
+ FastGlob2.generateTasks = generateTasks;
+ function isDynamicPattern(source, options) {
+ assertPatternsInput(source);
+ const settings = new settings_1.default(options);
+ return utils.pattern.isDynamicPattern(source, settings);
+ }
+ FastGlob2.isDynamicPattern = isDynamicPattern;
+ function escapePath(source) {
+ assertPatternsInput(source);
+ return utils.path.escape(source);
+ }
+ FastGlob2.escapePath = escapePath;
+ })(FastGlob || (FastGlob = {}));
+ function getWorks(source, _Provider, options) {
+ const patterns = patternManager.transform([].concat(source));
+ const settings = new settings_1.default(options);
+ const tasks = taskManager.generate(patterns, settings);
+ const provider = new _Provider(settings);
+ return tasks.map(provider.read, provider);
+ }
+ function assertPatternsInput(input) {
+ const source = [].concat(input);
+ const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
+ if (!isValidSource) {
+ throw new TypeError("Patterns must be a string (non empty) or an array of strings");
+ }
+ }
+ module2.exports = FastGlob;
+ }
+});
+var require_expand_patterns = __commonJS2({
+ "src/cli/expand-patterns.js"(exports2, module2) {
+ "use strict";
+ var path = require("path");
+ var fastGlob = require_out4();
+ var {
+ statSafe
+ } = require_utils();
+ async function* expandPatterns(context) {
+ const cwd = process.cwd();
+ const seen = /* @__PURE__ */ new Set();
+ let noResults = true;
+ for await (const pathOrError of expandPatternsInternal(context)) {
+ noResults = false;
+ if (typeof pathOrError !== "string") {
+ yield pathOrError;
+ continue;
+ }
+ const relativePath = path.relative(cwd, pathOrError);
+ if (seen.has(relativePath)) {
+ continue;
+ }
+ seen.add(relativePath);
+ yield relativePath;
+ }
+ if (noResults && context.argv.errorOnUnmatchedPattern !== false) {
+ yield {
+ error: `No matching files. Patterns: ${context.filePatterns.join(" ")}`
+ };
+ }
+ }
+ async function* expandPatternsInternal(context) {
+ const silentlyIgnoredDirs = [".git", ".sl", ".svn", ".hg"];
+ if (context.argv.withNodeModules !== true) {
+ silentlyIgnoredDirs.push("node_modules");
+ }
+ const globOptions = {
+ dot: true,
+ ignore: silentlyIgnoredDirs.map((dir) => "**/" + dir)
+ };
+ let supportedFilesGlob;
+ const cwd = process.cwd();
+ const entries = [];
+ for (const pattern of context.filePatterns) {
+ const absolutePath = path.resolve(cwd, pattern);
+ if (containsIgnoredPathSegment(absolutePath, cwd, silentlyIgnoredDirs)) {
+ continue;
+ }
+ const stat = await statSafe(absolutePath);
+ if (stat) {
+ if (stat.isFile()) {
+ entries.push({
+ type: "file",
+ glob: escapePathForGlob(fixWindowsSlashes(pattern)),
+ input: pattern
+ });
+ } else if (stat.isDirectory()) {
+ const relativePath = path.relative(cwd, absolutePath) || ".";
+ entries.push({
+ type: "dir",
+ glob: escapePathForGlob(fixWindowsSlashes(relativePath)) + "/" + getSupportedFilesGlob(),
+ input: pattern
+ });
+ }
+ } else if (pattern[0] === "!") {
+ globOptions.ignore.push(fixWindowsSlashes(pattern.slice(1)));
+ } else {
+ entries.push({
+ type: "glob",
+ glob: fixWindowsSlashes(pattern),
+ input: pattern
+ });
+ }
+ }
+ for (const {
+ type,
+ glob,
+ input
+ } of entries) {
+ let result;
+ try {
+ result = await fastGlob(glob, globOptions);
+ } catch ({
+ message
+ }) {
+ yield {
+ error: `${errorMessages.globError[type]}: ${input}
+${message}`
+ };
+ continue;
+ }
+ if (result.length === 0) {
+ if (context.argv.errorOnUnmatchedPattern !== false) {
+ yield {
+ error: `${errorMessages.emptyResults[type]}: "${input}".`
+ };
+ }
+ } else {
+ yield* sortPaths(result);
+ }
+ }
+ function getSupportedFilesGlob() {
+ if (!supportedFilesGlob) {
+ const extensions = context.languages.flatMap((lang) => lang.extensions || []);
+ const filenames = context.languages.flatMap((lang) => lang.filenames || []);
+ supportedFilesGlob = `**/{${[...extensions.map((ext) => "*" + (ext[0] === "." ? ext : "." + ext)), ...filenames]}}`;
+ }
+ return supportedFilesGlob;
+ }
+ }
+ var errorMessages = {
+ globError: {
+ file: "Unable to resolve file",
+ dir: "Unable to expand directory",
+ glob: "Unable to expand glob pattern"
+ },
+ emptyResults: {
+ file: "Explicitly specified file was ignored due to negative glob patterns",
+ dir: "No supported files were found in the directory",
+ glob: "No files matching the pattern were found"
+ }
+ };
+ function containsIgnoredPathSegment(absolutePath, cwd, ignoredDirectories) {
+ return path.relative(cwd, absolutePath).split(path.sep).some((dir) => ignoredDirectories.includes(dir));
+ }
+ function sortPaths(paths) {
+ return paths.sort((a, b) => a.localeCompare(b));
+ }
+ function escapePathForGlob(path2) {
+ return fastGlob.escapePath(path2.replace(/\\/g, "\0")).replace(/\\!/g, "@(!)").replace(/\0/g, "@(\\\\)");
+ }
+ var isWindows = path.sep === "\\";
+ function fixWindowsSlashes(pattern) {
+ return isWindows ? pattern.replace(/\\/g, "/") : pattern;
+ }
+ module2.exports = {
+ expandPatterns,
+ fixWindowsSlashes
+ };
+ }
+});
+var require_get_options_for_file = __commonJS2({
+ "src/cli/options/get-options-for-file.js"(exports2, module2) {
+ "use strict";
+ var dashify = require_dashify();
+ var prettier2 = require("./index.js");
+ var {
+ optionsNormalizer
+ } = require_prettier_internal();
+ var minimist = require_minimist2();
+ var createMinimistOptions = require_create_minimist_options();
+ var normalizeCliOptions = require_normalize_cli_options();
+ function getOptions(argv, detailedOptions) {
+ return Object.fromEntries(detailedOptions.filter(({
+ forwardToApi
+ }) => forwardToApi).map(({
+ forwardToApi,
+ name
+ }) => [forwardToApi, argv[name]]));
+ }
+ function cliifyOptions(object, apiDetailedOptionMap) {
+ return Object.fromEntries(Object.entries(object || {}).map(([key, value]) => {
+ const apiOption = apiDetailedOptionMap[key];
+ const cliKey = apiOption ? apiOption.name : key;
+ return [dashify(cliKey), value];
+ }));
+ }
+ function createApiDetailedOptionMap(detailedOptions) {
+ return Object.fromEntries(detailedOptions.filter((option) => option.forwardToApi && option.forwardToApi !== option.name).map((option) => [option.forwardToApi, option]));
+ }
+ function parseArgsToOptions(context, overrideDefaults) {
+ const minimistOptions = createMinimistOptions(context.detailedOptions);
+ const apiDetailedOptionMap = createApiDetailedOptionMap(context.detailedOptions);
+ return getOptions(normalizeCliOptions(minimist(context.rawArguments, {
+ string: minimistOptions.string,
+ boolean: minimistOptions.boolean,
+ default: cliifyOptions(overrideDefaults, apiDetailedOptionMap)
+ }), context.detailedOptions, {
+ logger: false
+ }), context.detailedOptions);
+ }
+ async function getOptionsOrDie(context, filePath) {
+ try {
+ if (context.argv.config === false) {
+ context.logger.debug("'--no-config' option found, skip loading config file.");
+ return null;
+ }
+ context.logger.debug(context.argv.config ? `load config file from '${context.argv.config}'` : `resolve config from '${filePath}'`);
+ const options = await prettier2.resolveConfig(filePath, {
+ editorconfig: context.argv.editorconfig,
+ config: context.argv.config
+ });
+ context.logger.debug("loaded options `" + JSON.stringify(options) + "`");
+ return options;
+ } catch (error) {
+ context.logger.error(`Invalid configuration file \`${filePath}\`: ` + error.message);
+ process.exit(2);
+ }
+ }
+ function applyConfigPrecedence(context, options) {
+ try {
+ switch (context.argv.configPrecedence) {
+ case "cli-override":
+ return parseArgsToOptions(context, options);
+ case "file-override":
+ return Object.assign(Object.assign({}, parseArgsToOptions(context)), options);
+ case "prefer-file":
+ return options || parseArgsToOptions(context);
+ }
+ } catch (error) {
+ context.logger.error(error.toString());
+ process.exit(2);
+ }
+ }
+ async function getOptionsForFile(context, filepath) {
+ const options = await getOptionsOrDie(context, filepath);
+ const hasPlugins = options && options.plugins;
+ if (hasPlugins) {
+ context.pushContextPlugins(options.plugins);
+ }
+ const appliedOptions = Object.assign({
+ filepath
+ }, applyConfigPrecedence(context, options && optionsNormalizer.normalizeApiOptions(options, context.supportOptions, {
+ logger: context.logger
+ })));
+ context.logger.debug(`applied config-precedence (${context.argv.configPrecedence}): ${JSON.stringify(appliedOptions)}`);
+ if (hasPlugins) {
+ context.popContextPlugins();
+ }
+ return appliedOptions;
+ }
+ module2.exports = getOptionsForFile;
+ }
+});
+var require_is_tty = __commonJS2({
+ "src/cli/is-tty.js"(exports2, module2) {
+ "use strict";
+ var {
+ isCI
+ } = require("./third-party.js");
+ module2.exports = function isTTY() {
+ return process.stdout.isTTY && !isCI();
+ };
+ }
+});
+var require_commondir = __commonJS2({
+ "node_modules/commondir/index.js"(exports2, module2) {
+ var path = require("path");
+ module2.exports = function(basedir, relfiles) {
+ if (relfiles) {
+ var files = relfiles.map(function(r) {
+ return path.resolve(basedir, r);
+ });
+ } else {
+ var files = basedir;
+ }
+ var res = files.slice(1).reduce(function(ps, file) {
+ if (!file.match(/^([A-Za-z]:)?\/|\\/)) {
+ throw new Error("relative path without a basedir");
+ }
+ var xs = file.split(/\/+|\\+/);
+ for (var i = 0; ps[i] === xs[i] && i < Math.min(ps.length, xs.length); i++)
+ ;
+ return ps.slice(0, i);
+ }, files[0].split(/\/+|\\+/));
+ return res.length > 1 ? res.join("/") : "/";
+ };
+ }
+});
+var require_p_try = __commonJS2({
+ "node_modules/p-try/index.js"(exports2, module2) {
+ "use strict";
+ var pTry = (fn, ...arguments_) => new Promise((resolve) => {
+ resolve(fn(...arguments_));
+ });
+ module2.exports = pTry;
+ module2.exports.default = pTry;
+ }
+});
+var require_p_limit = __commonJS2({
+ "node_modules/pkg-dir/node_modules/p-limit/index.js"(exports2, module2) {
+ "use strict";
+ var pTry = require_p_try();
+ var pLimit = (concurrency) => {
+ if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
+ return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));
+ }
+ const queue = [];
+ let activeCount = 0;
+ const next = () => {
+ activeCount--;
+ if (queue.length > 0) {
+ queue.shift()();
+ }
+ };
+ const run2 = (fn, resolve, ...args) => {
+ activeCount++;
+ const result = pTry(fn, ...args);
+ resolve(result);
+ result.then(next, next);
+ };
+ const enqueue = (fn, resolve, ...args) => {
+ if (activeCount < concurrency) {
+ run2(fn, resolve, ...args);
+ } else {
+ queue.push(run2.bind(null, fn, resolve, ...args));
+ }
+ };
+ const generator = (fn, ...args) => new Promise((resolve) => enqueue(fn, resolve, ...args));
+ Object.defineProperties(generator, {
+ activeCount: {
+ get: () => activeCount
+ },
+ pendingCount: {
+ get: () => queue.length
+ },
+ clearQueue: {
+ value: () => {
+ queue.length = 0;
+ }
+ }
+ });
+ return generator;
+ };
+ module2.exports = pLimit;
+ module2.exports.default = pLimit;
+ }
+});
+var require_p_locate = __commonJS2({
+ "node_modules/pkg-dir/node_modules/p-locate/index.js"(exports2, module2) {
+ "use strict";
+ var pLimit = require_p_limit();
+ var EndError = class extends Error {
+ constructor(value) {
+ super();
+ this.value = value;
+ }
+ };
+ var testElement = async (element, tester) => tester(await element);
+ var finder = async (element) => {
+ const values = await Promise.all(element);
+ if (values[1] === true) {
+ throw new EndError(values[0]);
+ }
+ return false;
+ };
+ var pLocate = async (iterable, tester, options) => {
+ options = Object.assign({
+ concurrency: Infinity,
+ preserveOrder: true
+ }, options);
+ const limit = pLimit(options.concurrency);
+ const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]);
+ const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity);
+ try {
+ await Promise.all(items.map((element) => checkLimit(finder, element)));
+ } catch (error) {
+ if (error instanceof EndError) {
+ return error.value;
+ }
+ throw error;
+ }
+ };
+ module2.exports = pLocate;
+ module2.exports.default = pLocate;
+ }
+});
+var require_locate_path = __commonJS2({
+ "node_modules/pkg-dir/node_modules/locate-path/index.js"(exports2, module2) {
+ "use strict";
+ var path = require("path");
+ var fs = require("fs");
+ var {
+ promisify
+ } = require("util");
+ var pLocate = require_p_locate();
+ var fsStat = promisify(fs.stat);
+ var fsLStat = promisify(fs.lstat);
+ var typeMappings = {
+ directory: "isDirectory",
+ file: "isFile"
+ };
+ function checkType({
+ type
+ }) {
+ if (type in typeMappings) {
+ return;
+ }
+ throw new Error(`Invalid type specified: ${type}`);
+ }
+ var matchType = (type, stat) => type === void 0 || stat[typeMappings[type]]();
+ module2.exports = async (paths, options) => {
+ options = Object.assign({
+ cwd: process.cwd(),
+ type: "file",
+ allowSymlinks: true
+ }, options);
+ checkType(options);
+ const statFn = options.allowSymlinks ? fsStat : fsLStat;
+ return pLocate(paths, async (path_) => {
+ try {
+ const stat = await statFn(path.resolve(options.cwd, path_));
+ return matchType(options.type, stat);
+ } catch (_) {
+ return false;
+ }
+ }, options);
+ };
+ module2.exports.sync = (paths, options) => {
+ options = Object.assign({
+ cwd: process.cwd(),
+ allowSymlinks: true,
+ type: "file"
+ }, options);
+ checkType(options);
+ const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync;
+ for (const path_ of paths) {
+ try {
+ const stat = statFn(path.resolve(options.cwd, path_));
+ if (matchType(options.type, stat)) {
+ return path_;
+ }
+ } catch (_) {
+ }
+ }
+ };
+ }
+});
+var require_path_exists = __commonJS2({
+ "node_modules/path-exists/index.js"(exports2, module2) {
+ "use strict";
+ var fs = require("fs");
+ var {
+ promisify
+ } = require("util");
+ var pAccess = promisify(fs.access);
+ module2.exports = async (path) => {
+ try {
+ await pAccess(path);
+ return true;
+ } catch (_) {
+ return false;
+ }
+ };
+ module2.exports.sync = (path) => {
+ try {
+ fs.accessSync(path);
+ return true;
+ } catch (_) {
+ return false;
+ }
+ };
+ }
+});
+var require_find_up = __commonJS2({
+ "node_modules/pkg-dir/node_modules/find-up/index.js"(exports2, module2) {
+ "use strict";
+ var path = require("path");
+ var locatePath = require_locate_path();
+ var pathExists = require_path_exists();
+ var stop = Symbol("findUp.stop");
+ module2.exports = async (name, options = {}) => {
+ let directory = path.resolve(options.cwd || "");
+ const {
+ root
+ } = path.parse(directory);
+ const paths = [].concat(name);
+ const runMatcher = async (locateOptions) => {
+ if (typeof name !== "function") {
+ return locatePath(paths, locateOptions);
+ }
+ const foundPath = await name(locateOptions.cwd);
+ if (typeof foundPath === "string") {
+ return locatePath([foundPath], locateOptions);
+ }
+ return foundPath;
+ };
+ while (true) {
+ const foundPath = await runMatcher(Object.assign(Object.assign({}, options), {}, {
+ cwd: directory
+ }));
+ if (foundPath === stop) {
+ return;
+ }
+ if (foundPath) {
+ return path.resolve(directory, foundPath);
+ }
+ if (directory === root) {
+ return;
+ }
+ directory = path.dirname(directory);
+ }
+ };
+ module2.exports.sync = (name, options = {}) => {
+ let directory = path.resolve(options.cwd || "");
+ const {
+ root
+ } = path.parse(directory);
+ const paths = [].concat(name);
+ const runMatcher = (locateOptions) => {
+ if (typeof name !== "function") {
+ return locatePath.sync(paths, locateOptions);
+ }
+ const foundPath = name(locateOptions.cwd);
+ if (typeof foundPath === "string") {
+ return locatePath.sync([foundPath], locateOptions);
+ }
+ return foundPath;
+ };
+ while (true) {
+ const foundPath = runMatcher(Object.assign(Object.assign({}, options), {}, {
+ cwd: directory
+ }));
+ if (foundPath === stop) {
+ return;
+ }
+ if (foundPath) {
+ return path.resolve(directory, foundPath);
+ }
+ if (directory === root) {
+ return;
+ }
+ directory = path.dirname(directory);
+ }
+ };
+ module2.exports.exists = pathExists;
+ module2.exports.sync.exists = pathExists.sync;
+ module2.exports.stop = stop;
+ }
+});
+var require_pkg_dir = __commonJS2({
+ "node_modules/pkg-dir/index.js"(exports2, module2) {
+ "use strict";
+ var path = require("path");
+ var findUp = require_find_up();
+ var pkgDir = async (cwd) => {
+ const filePath = await findUp("package.json", {
+ cwd
+ });
+ return filePath && path.dirname(filePath);
+ };
+ module2.exports = pkgDir;
+ module2.exports.default = pkgDir;
+ module2.exports.sync = (cwd) => {
+ const filePath = findUp.sync("package.json", {
+ cwd
+ });
+ return filePath && path.dirname(filePath);
+ };
+ }
+});
+var require_semver = __commonJS2({
+ "node_modules/make-dir/node_modules/semver/semver.js"(exports2, module2) {
+ exports2 = module2.exports = SemVer;
+ var debug;
+ if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
+ debug = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift("SEMVER");
+ console.log.apply(console, args);
+ };
+ } else {
+ debug = function() {
+ };
+ }
+ exports2.SEMVER_SPEC_VERSION = "2.0.0";
+ var MAX_LENGTH = 256;
+ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
+ var MAX_SAFE_COMPONENT_LENGTH = 16;
+ var re = exports2.re = [];
+ var src = exports2.src = [];
+ var t = exports2.tokens = {};
+ var R = 0;
+ function tok(n) {
+ t[n] = R++;
+ }
+ tok("NUMERICIDENTIFIER");
+ src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*";
+ tok("NUMERICIDENTIFIERLOOSE");
+ src[t.NUMERICIDENTIFIERLOOSE] = "[0-9]+";
+ tok("NONNUMERICIDENTIFIER");
+ src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
+ tok("MAINVERSION");
+ src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")";
+ tok("MAINVERSIONLOOSE");
+ src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")";
+ tok("PRERELEASEIDENTIFIER");
+ src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")";
+ tok("PRERELEASEIDENTIFIERLOOSE");
+ src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")";
+ tok("PRERELEASE");
+ src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))";
+ tok("PRERELEASELOOSE");
+ src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))";
+ tok("BUILDIDENTIFIER");
+ src[t.BUILDIDENTIFIER] = "[0-9A-Za-z-]+";
+ tok("BUILD");
+ src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))";
+ tok("FULL");
+ tok("FULLPLAIN");
+ src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?";
+ src[t.FULL] = "^" + src[t.FULLPLAIN] + "$";
+ tok("LOOSEPLAIN");
+ src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?";
+ tok("LOOSE");
+ src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$";
+ tok("GTLT");
+ src[t.GTLT] = "((?:<|>)?=?)";
+ tok("XRANGEIDENTIFIERLOOSE");
+ src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*";
+ tok("XRANGEIDENTIFIER");
+ src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*";
+ tok("XRANGEPLAIN");
+ src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?";
+ tok("XRANGEPLAINLOOSE");
+ src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?";
+ tok("XRANGE");
+ src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$";
+ tok("XRANGELOOSE");
+ src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$";
+ tok("COERCE");
+ src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])";
+ tok("COERCERTL");
+ re[t.COERCERTL] = new RegExp(src[t.COERCE], "g");
+ tok("LONETILDE");
+ src[t.LONETILDE] = "(?:~>?)";
+ tok("TILDETRIM");
+ src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+";
+ re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g");
+ var tildeTrimReplace = "$1~";
+ tok("TILDE");
+ src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$";
+ tok("TILDELOOSE");
+ src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$";
+ tok("LONECARET");
+ src[t.LONECARET] = "(?:\\^)";
+ tok("CARETTRIM");
+ src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+";
+ re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g");
+ var caretTrimReplace = "$1^";
+ tok("CARET");
+ src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$";
+ tok("CARETLOOSE");
+ src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$";
+ tok("COMPARATORLOOSE");
+ src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$";
+ tok("COMPARATOR");
+ src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$";
+ tok("COMPARATORTRIM");
+ src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")";
+ re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g");
+ var comparatorTrimReplace = "$1$2$3";
+ tok("HYPHENRANGE");
+ src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$";
+ tok("HYPHENRANGELOOSE");
+ src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$";
+ tok("STAR");
+ src[t.STAR] = "(<|>)?=?\\s*\\*";
+ for (i = 0; i < R; i++) {
+ debug(i, src[i]);
+ if (!re[i]) {
+ re[i] = new RegExp(src[i]);
+ }
+ }
+ var i;
+ exports2.parse = parse;
+ function parse(version, options) {
+ if (!options || typeof options !== "object") {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
+ }
+ if (version instanceof SemVer) {
+ return version;
+ }
+ if (typeof version !== "string") {
+ return null;
+ }
+ if (version.length > MAX_LENGTH) {
+ return null;
+ }
+ var r = options.loose ? re[t.LOOSE] : re[t.FULL];
+ if (!r.test(version)) {
+ return null;
+ }
+ try {
+ return new SemVer(version, options);
+ } catch (er) {
+ return null;
+ }
+ }
+ exports2.valid = valid;
+ function valid(version, options) {
+ var v = parse(version, options);
+ return v ? v.version : null;
+ }
+ exports2.clean = clean;
+ function clean(version, options) {
+ var s = parse(version.trim().replace(/^[=v]+/, ""), options);
+ return s ? s.version : null;
+ }
+ exports2.SemVer = SemVer;
+ function SemVer(version, options) {
+ if (!options || typeof options !== "object") {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
+ }
+ if (version instanceof SemVer) {
+ if (version.loose === options.loose) {
+ return version;
+ } else {
+ version = version.version;
+ }
+ } else if (typeof version !== "string") {
+ throw new TypeError("Invalid Version: " + version);
+ }
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError("version is longer than " + MAX_LENGTH + " characters");
+ }
+ if (!(this instanceof SemVer)) {
+ return new SemVer(version, options);
+ }
+ debug("SemVer", version, options);
+ this.options = options;
+ this.loose = !!options.loose;
+ var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
+ if (!m) {
+ throw new TypeError("Invalid Version: " + version);
+ }
+ this.raw = version;
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError("Invalid major version");
+ }
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError("Invalid minor version");
+ }
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError("Invalid patch version");
+ }
+ if (!m[4]) {
+ this.prerelease = [];
+ } else {
+ this.prerelease = m[4].split(".").map(function(id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id;
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num;
+ }
+ }
+ return id;
+ });
+ }
+ this.build = m[5] ? m[5].split(".") : [];
+ this.format();
+ }
+ SemVer.prototype.format = function() {
+ this.version = this.major + "." + this.minor + "." + this.patch;
+ if (this.prerelease.length) {
+ this.version += "-" + this.prerelease.join(".");
+ }
+ return this.version;
+ };
+ SemVer.prototype.toString = function() {
+ return this.version;
+ };
+ SemVer.prototype.compare = function(other) {
+ debug("SemVer.compare", this.version, this.options, other);
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ }
+ return this.compareMain(other) || this.comparePre(other);
+ };
+ SemVer.prototype.compareMain = function(other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ }
+ return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
+ };
+ SemVer.prototype.comparePre = function(other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ }
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1;
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1;
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0;
+ }
+ var i2 = 0;
+ do {
+ var a = this.prerelease[i2];
+ var b = other.prerelease[i2];
+ debug("prerelease compare", i2, a, b);
+ if (a === void 0 && b === void 0) {
+ return 0;
+ } else if (b === void 0) {
+ return 1;
+ } else if (a === void 0) {
+ return -1;
+ } else if (a === b) {
+ continue;
+ } else {
+ return compareIdentifiers(a, b);
+ }
+ } while (++i2);
+ };
+ SemVer.prototype.compareBuild = function(other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ }
+ var i2 = 0;
+ do {
+ var a = this.build[i2];
+ var b = other.build[i2];
+ debug("prerelease compare", i2, a, b);
+ if (a === void 0 && b === void 0) {
+ return 0;
+ } else if (b === void 0) {
+ return 1;
+ } else if (a === void 0) {
+ return -1;
+ } else if (a === b) {
+ continue;
+ } else {
+ return compareIdentifiers(a, b);
+ }
+ } while (++i2);
+ };
+ SemVer.prototype.inc = function(release, identifier) {
+ switch (release) {
+ case "premajor":
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor = 0;
+ this.major++;
+ this.inc("pre", identifier);
+ break;
+ case "preminor":
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor++;
+ this.inc("pre", identifier);
+ break;
+ case "prepatch":
+ this.prerelease.length = 0;
+ this.inc("patch", identifier);
+ this.inc("pre", identifier);
+ break;
+ case "prerelease":
+ if (this.prerelease.length === 0) {
+ this.inc("patch", identifier);
+ }
+ this.inc("pre", identifier);
+ break;
+ case "major":
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
+ this.major++;
+ }
+ this.minor = 0;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case "minor":
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++;
+ }
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+ case "patch":
+ if (this.prerelease.length === 0) {
+ this.patch++;
+ }
+ this.prerelease = [];
+ break;
+ case "pre":
+ if (this.prerelease.length === 0) {
+ this.prerelease = [0];
+ } else {
+ var i2 = this.prerelease.length;
+ while (--i2 >= 0) {
+ if (typeof this.prerelease[i2] === "number") {
+ this.prerelease[i2]++;
+ i2 = -2;
+ }
+ }
+ if (i2 === -1) {
+ this.prerelease.push(0);
+ }
+ }
+ if (identifier) {
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = [identifier, 0];
+ }
+ } else {
+ this.prerelease = [identifier, 0];
+ }
+ }
+ break;
+ default:
+ throw new Error("invalid increment argument: " + release);
+ }
+ this.format();
+ this.raw = this.version;
+ return this;
+ };
+ exports2.inc = inc;
+ function inc(version, release, loose, identifier) {
+ if (typeof loose === "string") {
+ identifier = loose;
+ loose = void 0;
+ }
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version;
+ } catch (er) {
+ return null;
+ }
+ }
+ exports2.diff = diff;
+ function diff(version1, version2) {
+ if (eq(version1, version2)) {
+ return null;
+ } else {
+ var v1 = parse(version1);
+ var v2 = parse(version2);
+ var prefix = "";
+ if (v1.prerelease.length || v2.prerelease.length) {
+ prefix = "pre";
+ var defaultResult = "prerelease";
+ }
+ for (var key in v1) {
+ if (key === "major" || key === "minor" || key === "patch") {
+ if (v1[key] !== v2[key]) {
+ return prefix + key;
+ }
+ }
+ }
+ return defaultResult;
+ }
+ }
+ exports2.compareIdentifiers = compareIdentifiers;
+ var numeric = /^[0-9]+$/;
+ function compareIdentifiers(a, b) {
+ var anum = numeric.test(a);
+ var bnum = numeric.test(b);
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
+ }
+ exports2.rcompareIdentifiers = rcompareIdentifiers;
+ function rcompareIdentifiers(a, b) {
+ return compareIdentifiers(b, a);
+ }
+ exports2.major = major;
+ function major(a, loose) {
+ return new SemVer(a, loose).major;
+ }
+ exports2.minor = minor;
+ function minor(a, loose) {
+ return new SemVer(a, loose).minor;
+ }
+ exports2.patch = patch;
+ function patch(a, loose) {
+ return new SemVer(a, loose).patch;
+ }
+ exports2.compare = compare;
+ function compare(a, b, loose) {
+ return new SemVer(a, loose).compare(new SemVer(b, loose));
+ }
+ exports2.compareLoose = compareLoose;
+ function compareLoose(a, b) {
+ return compare(a, b, true);
+ }
+ exports2.compareBuild = compareBuild;
+ function compareBuild(a, b, loose) {
+ var versionA = new SemVer(a, loose);
+ var versionB = new SemVer(b, loose);
+ return versionA.compare(versionB) || versionA.compareBuild(versionB);
+ }
+ exports2.rcompare = rcompare;
+ function rcompare(a, b, loose) {
+ return compare(b, a, loose);
+ }
+ exports2.sort = sort;
+ function sort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports2.compareBuild(a, b, loose);
+ });
+ }
+ exports2.rsort = rsort;
+ function rsort(list, loose) {
+ return list.sort(function(a, b) {
+ return exports2.compareBuild(b, a, loose);
+ });
+ }
+ exports2.gt = gt;
+ function gt(a, b, loose) {
+ return compare(a, b, loose) > 0;
+ }
+ exports2.lt = lt;
+ function lt(a, b, loose) {
+ return compare(a, b, loose) < 0;
+ }
+ exports2.eq = eq;
+ function eq(a, b, loose) {
+ return compare(a, b, loose) === 0;
+ }
+ exports2.neq = neq;
+ function neq(a, b, loose) {
+ return compare(a, b, loose) !== 0;
+ }
+ exports2.gte = gte;
+ function gte(a, b, loose) {
+ return compare(a, b, loose) >= 0;
+ }
+ exports2.lte = lte;
+ function lte(a, b, loose) {
+ return compare(a, b, loose) <= 0;
+ }
+ exports2.cmp = cmp;
+ function cmp(a, op, b, loose) {
+ switch (op) {
+ case "===":
+ if (typeof a === "object")
+ a = a.version;
+ if (typeof b === "object")
+ b = b.version;
+ return a === b;
+ case "!==":
+ if (typeof a === "object")
+ a = a.version;
+ if (typeof b === "object")
+ b = b.version;
+ return a !== b;
+ case "":
+ case "=":
+ case "==":
+ return eq(a, b, loose);
+ case "!=":
+ return neq(a, b, loose);
+ case ">":
+ return gt(a, b, loose);
+ case ">=":
+ return gte(a, b, loose);
+ case "<":
+ return lt(a, b, loose);
+ case "<=":
+ return lte(a, b, loose);
+ default:
+ throw new TypeError("Invalid operator: " + op);
+ }
+ }
+ exports2.Comparator = Comparator;
+ function Comparator(comp, options) {
+ if (!options || typeof options !== "object") {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
+ }
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp;
+ } else {
+ comp = comp.value;
+ }
+ }
+ if (!(this instanceof Comparator)) {
+ return new Comparator(comp, options);
+ }
+ debug("comparator", comp, options);
+ this.options = options;
+ this.loose = !!options.loose;
+ this.parse(comp);
+ if (this.semver === ANY) {
+ this.value = "";
+ } else {
+ this.value = this.operator + this.semver.version;
+ }
+ debug("comp", this);
+ }
+ var ANY = {};
+ Comparator.prototype.parse = function(comp) {
+ var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
+ var m = comp.match(r);
+ if (!m) {
+ throw new TypeError("Invalid comparator: " + comp);
+ }
+ this.operator = m[1] !== void 0 ? m[1] : "";
+ if (this.operator === "=") {
+ this.operator = "";
+ }
+ if (!m[2]) {
+ this.semver = ANY;
+ } else {
+ this.semver = new SemVer(m[2], this.options.loose);
+ }
+ };
+ Comparator.prototype.toString = function() {
+ return this.value;
+ };
+ Comparator.prototype.test = function(version) {
+ debug("Comparator.test", version, this.options.loose);
+ if (this.semver === ANY || version === ANY) {
+ return true;
+ }
+ if (typeof version === "string") {
+ try {
+ version = new SemVer(version, this.options);
+ } catch (er) {
+ return false;
+ }
+ }
+ return cmp(version, this.operator, this.semver, this.options);
+ };
+ Comparator.prototype.intersects = function(comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError("a Comparator is required");
+ }
+ if (!options || typeof options !== "object") {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
+ }
+ var rangeTmp;
+ if (this.operator === "") {
+ if (this.value === "") {
+ return true;
+ }
+ rangeTmp = new Range(comp.value, options);
+ return satisfies(this.value, rangeTmp, options);
+ } else if (comp.operator === "") {
+ if (comp.value === "") {
+ return true;
+ }
+ rangeTmp = new Range(this.value, options);
+ return satisfies(comp.semver, rangeTmp, options);
+ }
+ var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
+ var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
+ var sameSemVer = this.semver.version === comp.semver.version;
+ var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
+ var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<");
+ var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">");
+ return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
+ };
+ exports2.Range = Range;
+ function Range(range, options) {
+ if (!options || typeof options !== "object") {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
+ }
+ if (range instanceof Range) {
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
+ return range;
+ } else {
+ return new Range(range.raw, options);
+ }
+ }
+ if (range instanceof Comparator) {
+ return new Range(range.value, options);
+ }
+ if (!(this instanceof Range)) {
+ return new Range(range, options);
+ }
+ this.options = options;
+ this.loose = !!options.loose;
+ this.includePrerelease = !!options.includePrerelease;
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(function(range2) {
+ return this.parseRange(range2.trim());
+ }, this).filter(function(c) {
+ return c.length;
+ });
+ if (!this.set.length) {
+ throw new TypeError("Invalid SemVer Range: " + range);
+ }
+ this.format();
+ }
+ Range.prototype.format = function() {
+ this.range = this.set.map(function(comps) {
+ return comps.join(" ").trim();
+ }).join("||").trim();
+ return this.range;
+ };
+ Range.prototype.toString = function() {
+ return this.range;
+ };
+ Range.prototype.parseRange = function(range) {
+ var loose = this.options.loose;
+ range = range.trim();
+ var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace);
+ debug("hyphen replace", range);
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
+ debug("comparator trim", range, re[t.COMPARATORTRIM]);
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
+ range = range.split(/\s+/).join(" ");
+ var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
+ var set = range.split(" ").map(function(comp) {
+ return parseComparator(comp, this.options);
+ }, this).join(" ").split(/\s+/);
+ if (this.options.loose) {
+ set = set.filter(function(comp) {
+ return !!comp.match(compRe);
+ });
+ }
+ set = set.map(function(comp) {
+ return new Comparator(comp, this.options);
+ }, this);
+ return set;
+ };
+ Range.prototype.intersects = function(range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError("a Range is required");
+ }
+ return this.set.some(function(thisComparators) {
+ return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) {
+ return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) {
+ return rangeComparators.every(function(rangeComparator) {
+ return thisComparator.intersects(rangeComparator, options);
+ });
+ });
+ });
+ });
+ };
+ function isSatisfiable(comparators, options) {
+ var result = true;
+ var remainingComparators = comparators.slice();
+ var testComparator = remainingComparators.pop();
+ while (result && remainingComparators.length) {
+ result = remainingComparators.every(function(otherComparator) {
+ return testComparator.intersects(otherComparator, options);
+ });
+ testComparator = remainingComparators.pop();
+ }
+ return result;
+ }
+ exports2.toComparators = toComparators;
+ function toComparators(range, options) {
+ return new Range(range, options).set.map(function(comp) {
+ return comp.map(function(c) {
+ return c.value;
+ }).join(" ").trim().split(" ");
+ });
+ }
+ function parseComparator(comp, options) {
+ debug("comp", comp, options);
+ comp = replaceCarets(comp, options);
+ debug("caret", comp);
+ comp = replaceTildes(comp, options);
+ debug("tildes", comp);
+ comp = replaceXRanges(comp, options);
+ debug("xrange", comp);
+ comp = replaceStars(comp, options);
+ debug("stars", comp);
+ return comp;
+ }
+ function isX(id) {
+ return !id || id.toLowerCase() === "x" || id === "*";
+ }
+ function replaceTildes(comp, options) {
+ return comp.trim().split(/\s+/).map(function(comp2) {
+ return replaceTilde(comp2, options);
+ }).join(" ");
+ }
+ function replaceTilde(comp, options) {
+ var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug("tilde", comp, _, M, m, p, pr);
+ var ret;
+ if (isX(M)) {
+ ret = "";
+ } else if (isX(m)) {
+ ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
+ } else if (isX(p)) {
+ ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
+ } else if (pr) {
+ debug("replaceTilde pr", pr);
+ ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
+ } else {
+ ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
+ }
+ debug("tilde return", ret);
+ return ret;
+ });
+ }
+ function replaceCarets(comp, options) {
+ return comp.trim().split(/\s+/).map(function(comp2) {
+ return replaceCaret(comp2, options);
+ }).join(" ");
+ }
+ function replaceCaret(comp, options) {
+ debug("caret", comp, options);
+ var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
+ return comp.replace(r, function(_, M, m, p, pr) {
+ debug("caret", comp, _, M, m, p, pr);
+ var ret;
+ if (isX(M)) {
+ ret = "";
+ } else if (isX(m)) {
+ ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
+ } else if (isX(p)) {
+ if (M === "0") {
+ ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
+ } else {
+ ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0";
+ }
+ } else if (pr) {
+ debug("replaceCaret pr", pr);
+ if (M === "0") {
+ if (m === "0") {
+ ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1);
+ } else {
+ ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
+ }
+ } else {
+ ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0";
+ }
+ } else {
+ debug("no pr");
+ if (M === "0") {
+ if (m === "0") {
+ ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1);
+ } else {
+ ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
+ }
+ } else {
+ ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0";
+ }
+ }
+ debug("caret return", ret);
+ return ret;
+ });
+ }
+ function replaceXRanges(comp, options) {
+ debug("replaceXRanges", comp, options);
+ return comp.split(/\s+/).map(function(comp2) {
+ return replaceXRange(comp2, options);
+ }).join(" ");
+ }
+ function replaceXRange(comp, options) {
+ comp = comp.trim();
+ var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
+ return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
+ debug("xRange", comp, ret, gtlt, M, m, p, pr);
+ var xM = isX(M);
+ var xm = xM || isX(m);
+ var xp = xm || isX(p);
+ var anyX = xp;
+ if (gtlt === "=" && anyX) {
+ gtlt = "";
+ }
+ pr = options.includePrerelease ? "-0" : "";
+ if (xM) {
+ if (gtlt === ">" || gtlt === "<") {
+ ret = "<0.0.0-0";
+ } else {
+ ret = "*";
+ }
+ } else if (gtlt && anyX) {
+ if (xm) {
+ m = 0;
+ }
+ p = 0;
+ if (gtlt === ">") {
+ gtlt = ">=";
+ if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else {
+ m = +m + 1;
+ p = 0;
+ }
+ } else if (gtlt === "<=") {
+ gtlt = "<";
+ if (xm) {
+ M = +M + 1;
+ } else {
+ m = +m + 1;
+ }
+ }
+ ret = gtlt + M + "." + m + "." + p + pr;
+ } else if (xm) {
+ ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr;
+ } else if (xp) {
+ ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr;
+ }
+ debug("xRange return", ret);
+ return ret;
+ });
+ }
+ function replaceStars(comp, options) {
+ debug("replaceStars", comp, options);
+ return comp.trim().replace(re[t.STAR], "");
+ }
+ function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
+ if (isX(fM)) {
+ from = "";
+ } else if (isX(fm)) {
+ from = ">=" + fM + ".0.0";
+ } else if (isX(fp)) {
+ from = ">=" + fM + "." + fm + ".0";
+ } else {
+ from = ">=" + from;
+ }
+ if (isX(tM)) {
+ to = "";
+ } else if (isX(tm)) {
+ to = "<" + (+tM + 1) + ".0.0";
+ } else if (isX(tp)) {
+ to = "<" + tM + "." + (+tm + 1) + ".0";
+ } else if (tpr) {
+ to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
+ } else {
+ to = "<=" + to;
+ }
+ return (from + " " + to).trim();
+ }
+ Range.prototype.test = function(version) {
+ if (!version) {
+ return false;
+ }
+ if (typeof version === "string") {
+ try {
+ version = new SemVer(version, this.options);
+ } catch (er) {
+ return false;
+ }
+ }
+ for (var i2 = 0; i2 < this.set.length; i2++) {
+ if (testSet(this.set[i2], version, this.options)) {
+ return true;
+ }
+ }
+ return false;
+ };
+ function testSet(set, version, options) {
+ for (var i2 = 0; i2 < set.length; i2++) {
+ if (!set[i2].test(version)) {
+ return false;
+ }
+ }
+ if (version.prerelease.length && !options.includePrerelease) {
+ for (i2 = 0; i2 < set.length; i2++) {
+ debug(set[i2].semver);
+ if (set[i2].semver === ANY) {
+ continue;
+ }
+ if (set[i2].semver.prerelease.length > 0) {
+ var allowed = set[i2].semver;
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ return true;
+ }
+ exports2.satisfies = satisfies;
+ function satisfies(version, range, options) {
+ try {
+ range = new Range(range, options);
+ } catch (er) {
+ return false;
+ }
+ return range.test(version);
+ }
+ exports2.maxSatisfying = maxSatisfying;
+ function maxSatisfying(versions, range, options) {
+ var max = null;
+ var maxSV = null;
+ try {
+ var rangeObj = new Range(range, options);
+ } catch (er) {
+ return null;
+ }
+ versions.forEach(function(v) {
+ if (rangeObj.test(v)) {
+ if (!max || maxSV.compare(v) === -1) {
+ max = v;
+ maxSV = new SemVer(max, options);
+ }
+ }
+ });
+ return max;
+ }
+ exports2.minSatisfying = minSatisfying;
+ function minSatisfying(versions, range, options) {
+ var min = null;
+ var minSV = null;
+ try {
+ var rangeObj = new Range(range, options);
+ } catch (er) {
+ return null;
+ }
+ versions.forEach(function(v) {
+ if (rangeObj.test(v)) {
+ if (!min || minSV.compare(v) === 1) {
+ min = v;
+ minSV = new SemVer(min, options);
+ }
+ }
+ });
+ return min;
+ }
+ exports2.minVersion = minVersion;
+ function minVersion(range, loose) {
+ range = new Range(range, loose);
+ var minver = new SemVer("0.0.0");
+ if (range.test(minver)) {
+ return minver;
+ }
+ minver = new SemVer("0.0.0-0");
+ if (range.test(minver)) {
+ return minver;
+ }
+ minver = null;
+ for (var i2 = 0; i2 < range.set.length; ++i2) {
+ var comparators = range.set[i2];
+ comparators.forEach(function(comparator) {
+ var compver = new SemVer(comparator.semver.version);
+ switch (comparator.operator) {
+ case ">":
+ if (compver.prerelease.length === 0) {
+ compver.patch++;
+ } else {
+ compver.prerelease.push(0);
+ }
+ compver.raw = compver.format();
+ case "":
+ case ">=":
+ if (!minver || gt(minver, compver)) {
+ minver = compver;
+ }
+ break;
+ case "<":
+ case "<=":
+ break;
+ default:
+ throw new Error("Unexpected operation: " + comparator.operator);
+ }
+ });
+ }
+ if (minver && range.test(minver)) {
+ return minver;
+ }
+ return null;
+ }
+ exports2.validRange = validRange;
+ function validRange(range, options) {
+ try {
+ return new Range(range, options).range || "*";
+ } catch (er) {
+ return null;
+ }
+ }
+ exports2.ltr = ltr;
+ function ltr(version, range, options) {
+ return outside(version, range, "<", options);
+ }
+ exports2.gtr = gtr;
+ function gtr(version, range, options) {
+ return outside(version, range, ">", options);
+ }
+ exports2.outside = outside;
+ function outside(version, range, hilo, options) {
+ version = new SemVer(version, options);
+ range = new Range(range, options);
+ var gtfn, ltefn, ltfn, comp, ecomp;
+ switch (hilo) {
+ case ">":
+ gtfn = gt;
+ ltefn = lte;
+ ltfn = lt;
+ comp = ">";
+ ecomp = ">=";
+ break;
+ case "<":
+ gtfn = lt;
+ ltefn = gte;
+ ltfn = gt;
+ comp = "<";
+ ecomp = "<=";
+ break;
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
+ }
+ if (satisfies(version, range, options)) {
+ return false;
+ }
+ for (var i2 = 0; i2 < range.set.length; ++i2) {
+ var comparators = range.set[i2];
+ var high = null;
+ var low = null;
+ comparators.forEach(function(comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator(">=0.0.0");
+ }
+ high = high || comparator;
+ low = low || comparator;
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator;
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator;
+ }
+ });
+ if (high.operator === comp || high.operator === ecomp) {
+ return false;
+ }
+ if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
+ return false;
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ exports2.prerelease = prerelease;
+ function prerelease(version, options) {
+ var parsed = parse(version, options);
+ return parsed && parsed.prerelease.length ? parsed.prerelease : null;
+ }
+ exports2.intersects = intersects;
+ function intersects(r1, r2, options) {
+ r1 = new Range(r1, options);
+ r2 = new Range(r2, options);
+ return r1.intersects(r2);
+ }
+ exports2.coerce = coerce;
+ function coerce(version, options) {
+ if (version instanceof SemVer) {
+ return version;
+ }
+ if (typeof version === "number") {
+ version = String(version);
+ }
+ if (typeof version !== "string") {
+ return null;
+ }
+ options = options || {};
+ var match = null;
+ if (!options.rtl) {
+ match = version.match(re[t.COERCE]);
+ } else {
+ var next;
+ while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
+ if (!match || next.index + next[0].length !== match.index + match[0].length) {
+ match = next;
+ }
+ re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
+ }
+ re[t.COERCERTL].lastIndex = -1;
+ }
+ if (match === null) {
+ return null;
+ }
+ return parse(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options);
+ }
+ }
+});
+var require_make_dir = __commonJS2({
+ "node_modules/make-dir/index.js"(exports2, module2) {
+ "use strict";
+ var fs = require("fs");
+ var path = require("path");
+ var {
+ promisify
+ } = require("util");
+ var semver = require_semver();
+ var useNativeRecursiveOption = semver.satisfies(process.version, ">=10.12.0");
+ var checkPath = (pth) => {
+ if (process.platform === "win32") {
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ""));
+ if (pathHasInvalidWinCharacters) {
+ const error = new Error(`Path contains invalid characters: ${pth}`);
+ error.code = "EINVAL";
+ throw error;
+ }
+ }
+ };
+ var processOptions = (options) => {
+ const defaults = {
+ mode: 511,
+ fs
+ };
+ return Object.assign(Object.assign({}, defaults), options);
+ };
+ var permissionError = (pth) => {
+ const error = new Error(`operation not permitted, mkdir '${pth}'`);
+ error.code = "EPERM";
+ error.errno = -4048;
+ error.path = pth;
+ error.syscall = "mkdir";
+ return error;
+ };
+ var makeDir = async (input, options) => {
+ checkPath(input);
+ options = processOptions(options);
+ const mkdir = promisify(options.fs.mkdir);
+ const stat = promisify(options.fs.stat);
+ if (useNativeRecursiveOption && options.fs.mkdir === fs.mkdir) {
+ const pth = path.resolve(input);
+ await mkdir(pth, {
+ mode: options.mode,
+ recursive: true
+ });
+ return pth;
+ }
+ const make = async (pth) => {
+ try {
+ await mkdir(pth, options.mode);
+ return pth;
+ } catch (error) {
+ if (error.code === "EPERM") {
+ throw error;
+ }
+ if (error.code === "ENOENT") {
+ if (path.dirname(pth) === pth) {
+ throw permissionError(pth);
+ }
+ if (error.message.includes("null bytes")) {
+ throw error;
+ }
+ await make(path.dirname(pth));
+ return make(pth);
+ }
+ try {
+ const stats = await stat(pth);
+ if (!stats.isDirectory()) {
+ throw new Error("The path is not a directory");
+ }
+ } catch (_) {
+ throw error;
+ }
+ return pth;
+ }
+ };
+ return make(path.resolve(input));
+ };
+ module2.exports = makeDir;
+ module2.exports.sync = (input, options) => {
+ checkPath(input);
+ options = processOptions(options);
+ if (useNativeRecursiveOption && options.fs.mkdirSync === fs.mkdirSync) {
+ const pth = path.resolve(input);
+ fs.mkdirSync(pth, {
+ mode: options.mode,
+ recursive: true
+ });
+ return pth;
+ }
+ const make = (pth) => {
+ try {
+ options.fs.mkdirSync(pth, options.mode);
+ } catch (error) {
+ if (error.code === "EPERM") {
+ throw error;
+ }
+ if (error.code === "ENOENT") {
+ if (path.dirname(pth) === pth) {
+ throw permissionError(pth);
+ }
+ if (error.message.includes("null bytes")) {
+ throw error;
+ }
+ make(path.dirname(pth));
+ return make(pth);
+ }
+ try {
+ if (!options.fs.statSync(pth).isDirectory()) {
+ throw new Error("The path is not a directory");
+ }
+ } catch (_) {
+ throw error;
+ }
+ }
+ return pth;
+ };
+ return make(path.resolve(input));
+ };
+ }
+});
+var require_find_cache_dir = __commonJS2({
+ "node_modules/find-cache-dir/index.js"(exports2, module2) {
+ "use strict";
+ var path = require("path");
+ var fs = require("fs");
+ var commonDir = require_commondir();
+ var pkgDir = require_pkg_dir();
+ var makeDir = require_make_dir();
+ var {
+ env: env2,
+ cwd
+ } = process;
+ var isWritable = (path2) => {
+ try {
+ fs.accessSync(path2, fs.constants.W_OK);
+ return true;
+ } catch (_) {
+ return false;
+ }
+ };
+ function useDirectory(directory, options) {
+ if (options.create) {
+ makeDir.sync(directory);
+ }
+ if (options.thunk) {
+ return (...arguments_) => path.join(directory, ...arguments_);
+ }
+ return directory;
+ }
+ function getNodeModuleDirectory(directory) {
+ const nodeModules = path.join(directory, "node_modules");
+ if (!isWritable(nodeModules) && (fs.existsSync(nodeModules) || !isWritable(path.join(directory)))) {
+ return;
+ }
+ return nodeModules;
+ }
+ module2.exports = (options = {}) => {
+ if (env2.CACHE_DIR && !["true", "false", "1", "0"].includes(env2.CACHE_DIR)) {
+ return useDirectory(path.join(env2.CACHE_DIR, options.name), options);
+ }
+ let {
+ cwd: directory = cwd()
+ } = options;
+ if (options.files) {
+ directory = commonDir(directory, options.files);
+ }
+ directory = pkgDir.sync(directory);
+ if (!directory) {
+ return;
+ }
+ const nodeModules = getNodeModuleDirectory(directory);
+ if (!nodeModules) {
+ return void 0;
+ }
+ return useDirectory(path.join(directory, "node_modules", ".cache", options.name), options);
+ };
+ }
+});
+var require_find_cache_file = __commonJS2({
+ "src/cli/find-cache-file.js"(exports2, module2) {
+ "use strict";
+ var fs = require("fs").promises;
+ var os2 = require("os");
+ var path = require("path");
+ var findCacheDir = require_find_cache_dir();
+ var {
+ statSafe,
+ isJson
+ } = require_utils();
+ function findDefaultCacheFile() {
+ const cacheDir = findCacheDir({
+ name: "prettier",
+ create: true
+ }) || os2.tmpdir();
+ const cacheFilePath = path.join(cacheDir, ".prettier-cache");
+ return cacheFilePath;
+ }
+ async function findCacheFileFromOption(cacheLocation) {
+ const cacheFile = path.resolve(cacheLocation);
+ const stat = await statSafe(cacheFile);
+ if (stat) {
+ if (stat.isDirectory()) {
+ throw new Error(`Resolved --cache-location '${cacheFile}' is a directory`);
+ }
+ const data = await fs.readFile(cacheFile, "utf8");
+ if (!isJson(data)) {
+ throw new Error(`'${cacheFile}' isn't a valid JSON file`);
+ }
+ }
+ return cacheFile;
+ }
+ async function findCacheFile(cacheLocation) {
+ if (!cacheLocation) {
+ return findDefaultCacheFile();
+ }
+ const cacheFile = await findCacheFileFromOption(cacheLocation);
+ return cacheFile;
+ }
+ module2.exports = findCacheFile;
+ }
+});
+var require_cjs = __commonJS2({
+ "node_modules/flatted/cjs/index.js"(exports2) {
+ "use strict";
+ var {
+ parse: $parse,
+ stringify: $stringify
+ } = JSON;
+ var {
+ keys
+ } = Object;
+ var Primitive = String;
+ var primitive = "string";
+ var ignore = {};
+ var object = "object";
+ var noop = (_, value) => value;
+ var primitives = (value) => value instanceof Primitive ? Primitive(value) : value;
+ var Primitives = (_, value) => typeof value === primitive ? new Primitive(value) : value;
+ var revive = (input, parsed, output, $) => {
+ const lazy = [];
+ for (let ke = keys(output), {
+ length
+ } = ke, y = 0; y < length; y++) {
+ const k = ke[y];
+ const value = output[k];
+ if (value instanceof Primitive) {
+ const tmp = input[value];
+ if (typeof tmp === object && !parsed.has(tmp)) {
+ parsed.add(tmp);
+ output[k] = ignore;
+ lazy.push({
+ k,
+ a: [input, parsed, tmp, $]
+ });
+ } else
+ output[k] = $.call(output, k, tmp);
+ } else if (output[k] !== ignore)
+ output[k] = $.call(output, k, value);
+ }
+ for (let {
+ length
+ } = lazy, i = 0; i < length; i++) {
+ const {
+ k,
+ a
+ } = lazy[i];
+ output[k] = $.call(output, k, revive.apply(null, a));
+ }
+ return output;
+ };
+ var set = (known, input, value) => {
+ const index = Primitive(input.push(value) - 1);
+ known.set(value, index);
+ return index;
+ };
+ var parse = (text, reviver) => {
+ const input = $parse(text, Primitives).map(primitives);
+ const value = input[0];
+ const $ = reviver || noop;
+ const tmp = typeof value === object && value ? revive(input, /* @__PURE__ */ new Set(), value, $) : value;
+ return $.call({
+ "": tmp
+ }, "", tmp);
+ };
+ exports2.parse = parse;
+ var stringify2 = (value, replacer, space) => {
+ const $ = replacer && typeof replacer === object ? (k, v) => k === "" || -1 < replacer.indexOf(k) ? v : void 0 : replacer || noop;
+ const known = /* @__PURE__ */ new Map();
+ const input = [];
+ const output = [];
+ let i = +set(known, input, $.call({
+ "": value
+ }, "", value));
+ let firstRun = !i;
+ while (i < input.length) {
+ firstRun = true;
+ output[i] = $stringify(input[i++], replace, space);
+ }
+ return "[" + output.join(",") + "]";
+ function replace(key, value2) {
+ if (firstRun) {
+ firstRun = !firstRun;
+ return value2;
+ }
+ const after = $.call(this, key, value2);
+ switch (typeof after) {
+ case object:
+ if (after === null)
+ return after;
+ case primitive:
+ return known.get(after) || set(known, input, after);
+ }
+ return after;
+ }
+ };
+ exports2.stringify = stringify2;
+ var toJSON = (any) => $parse(stringify2(any));
+ exports2.toJSON = toJSON;
+ var fromJSON = (any) => parse($stringify(any));
+ exports2.fromJSON = fromJSON;
+ }
+});
+var require_utils6 = __commonJS2({
+ "node_modules/flat-cache/src/utils.js"(exports2, module2) {
+ var fs = require("fs");
+ var path = require("path");
+ var flatted = require_cjs();
+ module2.exports = {
+ tryParse: function(filePath, defaultValue) {
+ var result;
+ try {
+ result = this.readJSON(filePath);
+ } catch (ex) {
+ result = defaultValue;
+ }
+ return result;
+ },
+ readJSON: function(filePath) {
+ return flatted.parse(fs.readFileSync(filePath, {
+ encoding: "utf8"
+ }));
+ },
+ writeJSON: function(filePath, data) {
+ fs.mkdirSync(path.dirname(filePath), {
+ recursive: true
+ });
+ fs.writeFileSync(filePath, flatted.stringify(data));
+ }
+ };
+ }
+});
+var require_old = __commonJS2({
+ "node_modules/fs.realpath/old.js"(exports2) {
+ var pathModule = require("path");
+ var isWindows = process.platform === "win32";
+ var fs = require("fs");
+ var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
+ function rethrow() {
+ var callback;
+ if (DEBUG) {
+ var backtrace = new Error();
+ callback = debugCallback;
+ } else
+ callback = missingCallback;
+ return callback;
+ function debugCallback(err) {
+ if (err) {
+ backtrace.message = err.message;
+ err = backtrace;
+ missingCallback(err);
+ }
+ }
+ function missingCallback(err) {
+ if (err) {
+ if (process.throwDeprecation)
+ throw err;
+ else if (!process.noDeprecation) {
+ var msg = "fs: missing callback " + (err.stack || err.message);
+ if (process.traceDeprecation)
+ console.trace(msg);
+ else
+ console.error(msg);
+ }
+ }
+ }
+ }
+ function maybeCallback(cb) {
+ return typeof cb === "function" ? cb : rethrow();
+ }
+ var normalize = pathModule.normalize;
+ if (isWindows) {
+ nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
+ } else {
+ nextPartRe = /(.*?)(?:[\/]+|$)/g;
+ }
+ var nextPartRe;
+ if (isWindows) {
+ splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
+ } else {
+ splitRootRe = /^[\/]*/;
+ }
+ var splitRootRe;
+ exports2.realpathSync = function realpathSync(p, cache) {
+ p = pathModule.resolve(p);
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
+ return cache[p];
+ }
+ var original = p, seenLinks = {}, knownHard = {};
+ var pos;
+ var current;
+ var base;
+ var previous;
+ start();
+ function start() {
+ var m = splitRootRe.exec(p);
+ pos = m[0].length;
+ current = m[0];
+ base = m[0];
+ previous = "";
+ if (isWindows && !knownHard[base]) {
+ fs.lstatSync(base);
+ knownHard[base] = true;
+ }
+ }
+ while (pos < p.length) {
+ nextPartRe.lastIndex = pos;
+ var result = nextPartRe.exec(p);
+ previous = current;
+ current += result[0];
+ base = previous + result[1];
+ pos = nextPartRe.lastIndex;
+ if (knownHard[base] || cache && cache[base] === base) {
+ continue;
+ }
+ var resolvedLink;
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
+ resolvedLink = cache[base];
+ } else {
+ var stat = fs.lstatSync(base);
+ if (!stat.isSymbolicLink()) {
+ knownHard[base] = true;
+ if (cache)
+ cache[base] = base;
+ continue;
+ }
+ var linkTarget = null;
+ if (!isWindows) {
+ var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
+ if (seenLinks.hasOwnProperty(id)) {
+ linkTarget = seenLinks[id];
+ }
+ }
+ if (linkTarget === null) {
+ fs.statSync(base);
+ linkTarget = fs.readlinkSync(base);
+ }
+ resolvedLink = pathModule.resolve(previous, linkTarget);
+ if (cache)
+ cache[base] = resolvedLink;
+ if (!isWindows)
+ seenLinks[id] = linkTarget;
+ }
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
+ start();
+ }
+ if (cache)
+ cache[original] = p;
+ return p;
+ };
+ exports2.realpath = function realpath(p, cache, cb) {
+ if (typeof cb !== "function") {
+ cb = maybeCallback(cache);
+ cache = null;
+ }
+ p = pathModule.resolve(p);
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
+ return process.nextTick(cb.bind(null, null, cache[p]));
+ }
+ var original = p, seenLinks = {}, knownHard = {};
+ var pos;
+ var current;
+ var base;
+ var previous;
+ start();
+ function start() {
+ var m = splitRootRe.exec(p);
+ pos = m[0].length;
+ current = m[0];
+ base = m[0];
+ previous = "";
+ if (isWindows && !knownHard[base]) {
+ fs.lstat(base, function(err) {
+ if (err)
+ return cb(err);
+ knownHard[base] = true;
+ LOOP();
+ });
+ } else {
+ process.nextTick(LOOP);
+ }
+ }
+ function LOOP() {
+ if (pos >= p.length) {
+ if (cache)
+ cache[original] = p;
+ return cb(null, p);
+ }
+ nextPartRe.lastIndex = pos;
+ var result = nextPartRe.exec(p);
+ previous = current;
+ current += result[0];
+ base = previous + result[1];
+ pos = nextPartRe.lastIndex;
+ if (knownHard[base] || cache && cache[base] === base) {
+ return process.nextTick(LOOP);
+ }
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
+ return gotResolvedLink(cache[base]);
+ }
+ return fs.lstat(base, gotStat);
+ }
+ function gotStat(err, stat) {
+ if (err)
+ return cb(err);
+ if (!stat.isSymbolicLink()) {
+ knownHard[base] = true;
+ if (cache)
+ cache[base] = base;
+ return process.nextTick(LOOP);
+ }
+ if (!isWindows) {
+ var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
+ if (seenLinks.hasOwnProperty(id)) {
+ return gotTarget(null, seenLinks[id], base);
+ }
+ }
+ fs.stat(base, function(err2) {
+ if (err2)
+ return cb(err2);
+ fs.readlink(base, function(err3, target) {
+ if (!isWindows)
+ seenLinks[id] = target;
+ gotTarget(err3, target);
+ });
+ });
+ }
+ function gotTarget(err, target, base2) {
+ if (err)
+ return cb(err);
+ var resolvedLink = pathModule.resolve(previous, target);
+ if (cache)
+ cache[base2] = resolvedLink;
+ gotResolvedLink(resolvedLink);
+ }
+ function gotResolvedLink(resolvedLink) {
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
+ start();
+ }
+ };
+ }
+});
+var require_fs5 = __commonJS2({
+ "node_modules/fs.realpath/index.js"(exports2, module2) {
+ module2.exports = realpath;
+ realpath.realpath = realpath;
+ realpath.sync = realpathSync;
+ realpath.realpathSync = realpathSync;
+ realpath.monkeypatch = monkeypatch;
+ realpath.unmonkeypatch = unmonkeypatch;
+ var fs = require("fs");
+ var origRealpath = fs.realpath;
+ var origRealpathSync = fs.realpathSync;
+ var version = process.version;
+ var ok = /^v[0-5]\./.test(version);
+ var old = require_old();
+ function newError(er) {
+ return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG");
+ }
+ function realpath(p, cache, cb) {
+ if (ok) {
+ return origRealpath(p, cache, cb);
+ }
+ if (typeof cache === "function") {
+ cb = cache;
+ cache = null;
+ }
+ origRealpath(p, cache, function(er, result) {
+ if (newError(er)) {
+ old.realpath(p, cache, cb);
+ } else {
+ cb(er, result);
+ }
+ });
+ }
+ function realpathSync(p, cache) {
+ if (ok) {
+ return origRealpathSync(p, cache);
+ }
+ try {
+ return origRealpathSync(p, cache);
+ } catch (er) {
+ if (newError(er)) {
+ return old.realpathSync(p, cache);
+ } else {
+ throw er;
+ }
+ }
+ }
+ function monkeypatch() {
+ fs.realpath = realpath;
+ fs.realpathSync = realpathSync;
+ }
+ function unmonkeypatch() {
+ fs.realpath = origRealpath;
+ fs.realpathSync = origRealpathSync;
+ }
+ }
+});
+var require_concat_map = __commonJS2({
+ "node_modules/concat-map/index.js"(exports2, module2) {
+ module2.exports = function(xs, fn) {
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ var x = fn(xs[i], i);
+ if (isArray(x))
+ res.push.apply(res, x);
+ else
+ res.push(x);
+ }
+ return res;
+ };
+ var isArray = Array.isArray || function(xs) {
+ return Object.prototype.toString.call(xs) === "[object Array]";
+ };
+ }
+});
+var require_balanced_match = __commonJS2({
+ "node_modules/balanced-match/index.js"(exports2, module2) {
+ "use strict";
+ module2.exports = balanced;
+ function balanced(a, b, str) {
+ if (a instanceof RegExp)
+ a = maybeMatch(a, str);
+ if (b instanceof RegExp)
+ b = maybeMatch(b, str);
+ var r = range(a, b, str);
+ return r && {
+ start: r[0],
+ end: r[1],
+ pre: str.slice(0, r[0]),
+ body: str.slice(r[0] + a.length, r[1]),
+ post: str.slice(r[1] + b.length)
+ };
+ }
+ function maybeMatch(reg, str) {
+ var m = str.match(reg);
+ return m ? m[0] : null;
+ }
+ balanced.range = range;
+ function range(a, b, str) {
+ var begs, beg, left, right, result;
+ var ai = str.indexOf(a);
+ var bi = str.indexOf(b, ai + 1);
+ var i = ai;
+ if (ai >= 0 && bi > 0) {
+ if (a === b) {
+ return [ai, bi];
+ }
+ begs = [];
+ left = str.length;
+ while (i >= 0 && !result) {
+ if (i == ai) {
+ begs.push(i);
+ ai = str.indexOf(a, i + 1);
+ } else if (begs.length == 1) {
+ result = [begs.pop(), bi];
+ } else {
+ beg = begs.pop();
+ if (beg < left) {
+ left = beg;
+ right = bi;
+ }
+ bi = str.indexOf(b, i + 1);
+ }
+ i = ai < bi && ai >= 0 ? ai : bi;
+ }
+ if (begs.length) {
+ result = [left, right];
+ }
+ }
+ return result;
+ }
+ }
+});
+var require_brace_expansion = __commonJS2({
+ "node_modules/brace-expansion/index.js"(exports2, module2) {
+ var concatMap = require_concat_map();
+ var balanced = require_balanced_match();
+ module2.exports = expandTop;
+ var escSlash = "\0SLASH" + Math.random() + "\0";
+ var escOpen = "\0OPEN" + Math.random() + "\0";
+ var escClose = "\0CLOSE" + Math.random() + "\0";
+ var escComma = "\0COMMA" + Math.random() + "\0";
+ var escPeriod = "\0PERIOD" + Math.random() + "\0";
+ function numeric(str) {
+ return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
+ }
+ function escapeBraces(str) {
+ return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
+ }
+ function unescapeBraces(str) {
+ return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
+ }
+ function parseCommaParts(str) {
+ if (!str)
+ return [""];
+ var parts = [];
+ var m = balanced("{", "}", str);
+ if (!m)
+ return str.split(",");
+ var pre = m.pre;
+ var body = m.body;
+ var post = m.post;
+ var p = pre.split(",");
+ p[p.length - 1] += "{" + body + "}";
+ var postParts = parseCommaParts(post);
+ if (post.length) {
+ p[p.length - 1] += postParts.shift();
+ p.push.apply(p, postParts);
+ }
+ parts.push.apply(parts, p);
+ return parts;
+ }
+ function expandTop(str) {
+ if (!str)
+ return [];
+ if (str.substr(0, 2) === "{}") {
+ str = "\\{\\}" + str.substr(2);
+ }
+ return expand(escapeBraces(str), true).map(unescapeBraces);
+ }
+ function embrace(str) {
+ return "{" + str + "}";
+ }
+ function isPadded(el) {
+ return /^-?0\d/.test(el);
+ }
+ function lte(i, y) {
+ return i <= y;
+ }
+ function gte(i, y) {
+ return i >= y;
+ }
+ function expand(str, isTop) {
+ var expansions = [];
+ var m = balanced("{", "}", str);
+ if (!m || /\$$/.test(m.pre))
+ return [str];
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
+ var isSequence = isNumericSequence || isAlphaSequence;
+ var isOptions = m.body.indexOf(",") >= 0;
+ if (!isSequence && !isOptions) {
+ if (m.post.match(/,.*\}/)) {
+ str = m.pre + "{" + m.body + escClose + m.post;
+ return expand(str);
+ }
+ return [str];
+ }
+ var n;
+ if (isSequence) {
+ n = m.body.split(/\.\./);
+ } else {
+ n = parseCommaParts(m.body);
+ if (n.length === 1) {
+ n = expand(n[0], false).map(embrace);
+ if (n.length === 1) {
+ var post = m.post.length ? expand(m.post, false) : [""];
+ return post.map(function(p) {
+ return m.pre + n[0] + p;
+ });
+ }
+ }
+ }
+ var pre = m.pre;
+ var post = m.post.length ? expand(m.post, false) : [""];
+ var N;
+ if (isSequence) {
+ var x = numeric(n[0]);
+ var y = numeric(n[1]);
+ var width = Math.max(n[0].length, n[1].length);
+ var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
+ var test = lte;
+ var reverse = y < x;
+ if (reverse) {
+ incr *= -1;
+ test = gte;
+ }
+ var pad = n.some(isPadded);
+ N = [];
+ for (var i = x; test(i, y); i += incr) {
+ var c;
+ if (isAlphaSequence) {
+ c = String.fromCharCode(i);
+ if (c === "\\")
+ c = "";
+ } else {
+ c = String(i);
+ if (pad) {
+ var need = width - c.length;
+ if (need > 0) {
+ var z = new Array(need + 1).join("0");
+ if (i < 0)
+ c = "-" + z + c.slice(1);
+ else
+ c = z + c;
+ }
+ }
+ }
+ N.push(c);
+ }
+ } else {
+ N = concatMap(n, function(el) {
+ return expand(el, false);
+ });
+ }
+ for (var j = 0; j < N.length; j++) {
+ for (var k = 0; k < post.length; k++) {
+ var expansion = pre + N[j] + post[k];
+ if (!isTop || isSequence || expansion)
+ expansions.push(expansion);
+ }
+ }
+ return expansions;
+ }
+ }
+});
+var require_minimatch = __commonJS2({
+ "node_modules/minimatch/minimatch.js"(exports2, module2) {
+ module2.exports = minimatch;
+ minimatch.Minimatch = Minimatch;
+ var path = function() {
+ try {
+ return require("path");
+ } catch (e) {
+ }
+ }() || {
+ sep: "/"
+ };
+ minimatch.sep = path.sep;
+ var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
+ var expand = require_brace_expansion();
+ var plTypes = {
+ "!": {
+ open: "(?:(?!(?:",
+ close: "))[^/]*?)"
+ },
+ "?": {
+ open: "(?:",
+ close: ")?"
+ },
+ "+": {
+ open: "(?:",
+ close: ")+"
+ },
+ "*": {
+ open: "(?:",
+ close: ")*"
+ },
+ "@": {
+ open: "(?:",
+ close: ")"
+ }
+ };
+ var qmark = "[^/]";
+ var star = qmark + "*?";
+ var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
+ var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
+ var reSpecials = charSet("().*{}+?[]^$\\!");
+ function charSet(s) {
+ return s.split("").reduce(function(set, c) {
+ set[c] = true;
+ return set;
+ }, {});
+ }
+ var slashSplit = /\/+/;
+ minimatch.filter = filter;
+ function filter(pattern, options) {
+ options = options || {};
+ return function(p, i, list) {
+ return minimatch(p, pattern, options);
+ };
+ }
+ function ext(a, b) {
+ b = b || {};
+ var t = {};
+ Object.keys(a).forEach(function(k) {
+ t[k] = a[k];
+ });
+ Object.keys(b).forEach(function(k) {
+ t[k] = b[k];
+ });
+ return t;
+ }
+ minimatch.defaults = function(def) {
+ if (!def || typeof def !== "object" || !Object.keys(def).length) {
+ return minimatch;
+ }
+ var orig = minimatch;
+ var m = function minimatch2(p, pattern, options) {
+ return orig(p, pattern, ext(def, options));
+ };
+ m.Minimatch = function Minimatch2(pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options));
+ };
+ m.Minimatch.defaults = function defaults(options) {
+ return orig.defaults(ext(def, options)).Minimatch;
+ };
+ m.filter = function filter2(pattern, options) {
+ return orig.filter(pattern, ext(def, options));
+ };
+ m.defaults = function defaults(options) {
+ return orig.defaults(ext(def, options));
+ };
+ m.makeRe = function makeRe2(pattern, options) {
+ return orig.makeRe(pattern, ext(def, options));
+ };
+ m.braceExpand = function braceExpand2(pattern, options) {
+ return orig.braceExpand(pattern, ext(def, options));
+ };
+ m.match = function(list, pattern, options) {
+ return orig.match(list, pattern, ext(def, options));
+ };
+ return m;
+ };
+ Minimatch.defaults = function(def) {
+ return minimatch.defaults(def).Minimatch;
+ };
+ function minimatch(p, pattern, options) {
+ assertValidPattern(pattern);
+ if (!options)
+ options = {};
+ if (!options.nocomment && pattern.charAt(0) === "#") {
+ return false;
+ }
+ return new Minimatch(pattern, options).match(p);
+ }
+ function Minimatch(pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options);
+ }
+ assertValidPattern(pattern);
+ if (!options)
+ options = {};
+ pattern = pattern.trim();
+ if (!options.allowWindowsEscape && path.sep !== "/") {
+ pattern = pattern.split(path.sep).join("/");
+ }
+ this.options = options;
+ this.set = [];
+ this.pattern = pattern;
+ this.regexp = null;
+ this.negate = false;
+ this.comment = false;
+ this.empty = false;
+ this.partial = !!options.partial;
+ this.make();
+ }
+ Minimatch.prototype.debug = function() {
+ };
+ Minimatch.prototype.make = make;
+ function make() {
+ var pattern = this.pattern;
+ var options = this.options;
+ if (!options.nocomment && pattern.charAt(0) === "#") {
+ this.comment = true;
+ return;
+ }
+ if (!pattern) {
+ this.empty = true;
+ return;
+ }
+ this.parseNegate();
+ var set = this.globSet = this.braceExpand();
+ if (options.debug)
+ this.debug = function debug() {
+ console.error.apply(console, arguments);
+ };
+ this.debug(this.pattern, set);
+ set = this.globParts = set.map(function(s) {
+ return s.split(slashSplit);
+ });
+ this.debug(this.pattern, set);
+ set = set.map(function(s, si, set2) {
+ return s.map(this.parse, this);
+ }, this);
+ this.debug(this.pattern, set);
+ set = set.filter(function(s) {
+ return s.indexOf(false) === -1;
+ });
+ this.debug(this.pattern, set);
+ this.set = set;
+ }
+ Minimatch.prototype.parseNegate = parseNegate;
+ function parseNegate() {
+ var pattern = this.pattern;
+ var negate = false;
+ var options = this.options;
+ var negateOffset = 0;
+ if (options.nonegate)
+ return;
+ for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) {
+ negate = !negate;
+ negateOffset++;
+ }
+ if (negateOffset)
+ this.pattern = pattern.substr(negateOffset);
+ this.negate = negate;
+ }
+ minimatch.braceExpand = function(pattern, options) {
+ return braceExpand(pattern, options);
+ };
+ Minimatch.prototype.braceExpand = braceExpand;
+ function braceExpand(pattern, options) {
+ if (!options) {
+ if (this instanceof Minimatch) {
+ options = this.options;
+ } else {
+ options = {};
+ }
+ }
+ pattern = typeof pattern === "undefined" ? this.pattern : pattern;
+ assertValidPattern(pattern);
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
+ return [pattern];
+ }
+ return expand(pattern);
+ }
+ var MAX_PATTERN_LENGTH = 1024 * 64;
+ var assertValidPattern = function(pattern) {
+ if (typeof pattern !== "string") {
+ throw new TypeError("invalid pattern");
+ }
+ if (pattern.length > MAX_PATTERN_LENGTH) {
+ throw new TypeError("pattern is too long");
+ }
+ };
+ Minimatch.prototype.parse = parse;
+ var SUBPARSE = {};
+ function parse(pattern, isSub) {
+ assertValidPattern(pattern);
+ var options = this.options;
+ if (pattern === "**") {
+ if (!options.noglobstar)
+ return GLOBSTAR;
+ else
+ pattern = "*";
+ }
+ if (pattern === "")
+ return "";
+ var re = "";
+ var hasMagic = !!options.nocase;
+ var escaping = false;
+ var patternListStack = [];
+ var negativeLists = [];
+ var stateChar;
+ var inClass = false;
+ var reClassStart = -1;
+ var classStart = -1;
+ var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
+ var self2 = this;
+ function clearStateChar() {
+ if (stateChar) {
+ switch (stateChar) {
+ case "*":
+ re += star;
+ hasMagic = true;
+ break;
+ case "?":
+ re += qmark;
+ hasMagic = true;
+ break;
+ default:
+ re += "\\" + stateChar;
+ break;
+ }
+ self2.debug("clearStateChar %j %j", stateChar, re);
+ stateChar = false;
+ }
+ }
+ for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) {
+ this.debug("%s %s %s %j", pattern, i, re, c);
+ if (escaping && reSpecials[c]) {
+ re += "\\" + c;
+ escaping = false;
+ continue;
+ }
+ switch (c) {
+ case "/": {
+ return false;
+ }
+ case "\\":
+ clearStateChar();
+ escaping = true;
+ continue;
+ case "?":
+ case "*":
+ case "+":
+ case "@":
+ case "!":
+ this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c);
+ if (inClass) {
+ this.debug(" in class");
+ if (c === "!" && i === classStart + 1)
+ c = "^";
+ re += c;
+ continue;
+ }
+ self2.debug("call clearStateChar %j", stateChar);
+ clearStateChar();
+ stateChar = c;
+ if (options.noext)
+ clearStateChar();
+ continue;
+ case "(":
+ if (inClass) {
+ re += "(";
+ continue;
+ }
+ if (!stateChar) {
+ re += "\\(";
+ continue;
+ }
+ patternListStack.push({
+ type: stateChar,
+ start: i - 1,
+ reStart: re.length,
+ open: plTypes[stateChar].open,
+ close: plTypes[stateChar].close
+ });
+ re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
+ this.debug("plType %j %j", stateChar, re);
+ stateChar = false;
+ continue;
+ case ")":
+ if (inClass || !patternListStack.length) {
+ re += "\\)";
+ continue;
+ }
+ clearStateChar();
+ hasMagic = true;
+ var pl = patternListStack.pop();
+ re += pl.close;
+ if (pl.type === "!") {
+ negativeLists.push(pl);
+ }
+ pl.reEnd = re.length;
+ continue;
+ case "|":
+ if (inClass || !patternListStack.length || escaping) {
+ re += "\\|";
+ escaping = false;
+ continue;
+ }
+ clearStateChar();
+ re += "|";
+ continue;
+ case "[":
+ clearStateChar();
+ if (inClass) {
+ re += "\\" + c;
+ continue;
+ }
+ inClass = true;
+ classStart = i;
+ reClassStart = re.length;
+ re += c;
+ continue;
+ case "]":
+ if (i === classStart + 1 || !inClass) {
+ re += "\\" + c;
+ escaping = false;
+ continue;
+ }
+ var cs = pattern.substring(classStart + 1, i);
+ try {
+ RegExp("[" + cs + "]");
+ } catch (er) {
+ var sp = this.parse(cs, SUBPARSE);
+ re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
+ hasMagic = hasMagic || sp[1];
+ inClass = false;
+ continue;
+ }
+ hasMagic = true;
+ inClass = false;
+ re += c;
+ continue;
+ default:
+ clearStateChar();
+ if (escaping) {
+ escaping = false;
+ } else if (reSpecials[c] && !(c === "^" && inClass)) {
+ re += "\\";
+ }
+ re += c;
+ }
+ }
+ if (inClass) {
+ cs = pattern.substr(classStart + 1);
+ sp = this.parse(cs, SUBPARSE);
+ re = re.substr(0, reClassStart) + "\\[" + sp[0];
+ hasMagic = hasMagic || sp[1];
+ }
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + pl.open.length);
+ this.debug("setting tail", re, pl);
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) {
+ if (!$2) {
+ $2 = "\\";
+ }
+ return $1 + $1 + $2 + "|";
+ });
+ this.debug("tail=%j\n %s", tail, tail, pl, re);
+ var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
+ hasMagic = true;
+ re = re.slice(0, pl.reStart) + t + "\\(" + tail;
+ }
+ clearStateChar();
+ if (escaping) {
+ re += "\\\\";
+ }
+ var addPatternStart = false;
+ switch (re.charAt(0)) {
+ case "[":
+ case ".":
+ case "(":
+ addPatternStart = true;
+ }
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n];
+ var nlBefore = re.slice(0, nl.reStart);
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
+ var nlAfter = re.slice(nl.reEnd);
+ nlLast += nlAfter;
+ var openParensBefore = nlBefore.split("(").length - 1;
+ var cleanAfter = nlAfter;
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
+ }
+ nlAfter = cleanAfter;
+ var dollar = "";
+ if (nlAfter === "" && isSub !== SUBPARSE) {
+ dollar = "$";
+ }
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
+ re = newRe;
+ }
+ if (re !== "" && hasMagic) {
+ re = "(?=.)" + re;
+ }
+ if (addPatternStart) {
+ re = patternStart + re;
+ }
+ if (isSub === SUBPARSE) {
+ return [re, hasMagic];
+ }
+ if (!hasMagic) {
+ return globUnescape(pattern);
+ }
+ var flags = options.nocase ? "i" : "";
+ try {
+ var regExp = new RegExp("^" + re + "$", flags);
+ } catch (er) {
+ return new RegExp("$.");
+ }
+ regExp._glob = pattern;
+ regExp._src = re;
+ return regExp;
+ }
+ minimatch.makeRe = function(pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe();
+ };
+ Minimatch.prototype.makeRe = makeRe;
+ function makeRe() {
+ if (this.regexp || this.regexp === false)
+ return this.regexp;
+ var set = this.set;
+ if (!set.length) {
+ this.regexp = false;
+ return this.regexp;
+ }
+ var options = this.options;
+ var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
+ var flags = options.nocase ? "i" : "";
+ var re = set.map(function(pattern) {
+ return pattern.map(function(p) {
+ return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src;
+ }).join("\\/");
+ }).join("|");
+ re = "^(?:" + re + ")$";
+ if (this.negate)
+ re = "^(?!" + re + ").*$";
+ try {
+ this.regexp = new RegExp(re, flags);
+ } catch (ex) {
+ this.regexp = false;
+ }
+ return this.regexp;
+ }
+ minimatch.match = function(list, pattern, options) {
+ options = options || {};
+ var mm = new Minimatch(pattern, options);
+ list = list.filter(function(f) {
+ return mm.match(f);
+ });
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern);
+ }
+ return list;
+ };
+ Minimatch.prototype.match = function match(f, partial) {
+ if (typeof partial === "undefined")
+ partial = this.partial;
+ this.debug("match", f, this.pattern);
+ if (this.comment)
+ return false;
+ if (this.empty)
+ return f === "";
+ if (f === "/" && partial)
+ return true;
+ var options = this.options;
+ if (path.sep !== "/") {
+ f = f.split(path.sep).join("/");
+ }
+ f = f.split(slashSplit);
+ this.debug(this.pattern, "split", f);
+ var set = this.set;
+ this.debug(this.pattern, "set", set);
+ var filename;
+ var i;
+ for (i = f.length - 1; i >= 0; i--) {
+ filename = f[i];
+ if (filename)
+ break;
+ }
+ for (i = 0; i < set.length; i++) {
+ var pattern = set[i];
+ var file = f;
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename];
+ }
+ var hit = this.matchOne(file, pattern, partial);
+ if (hit) {
+ if (options.flipNegate)
+ return true;
+ return !this.negate;
+ }
+ }
+ if (options.flipNegate)
+ return false;
+ return this.negate;
+ };
+ Minimatch.prototype.matchOne = function(file, pattern, partial) {
+ var options = this.options;
+ this.debug("matchOne", {
+ "this": this,
+ file,
+ pattern
+ });
+ this.debug("matchOne", file.length, pattern.length);
+ for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+ this.debug("matchOne loop");
+ var p = pattern[pi];
+ var f = file[fi];
+ this.debug(pattern, p, f);
+ if (p === false)
+ return false;
+ if (p === GLOBSTAR) {
+ this.debug("GLOBSTAR", [pattern, p, f]);
+ var fr = fi;
+ var pr = pi + 1;
+ if (pr === pl) {
+ this.debug("** at the end");
+ for (; fi < fl; fi++) {
+ if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
+ return false;
+ }
+ return true;
+ }
+ while (fr < fl) {
+ var swallowee = file[fr];
+ this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug("globstar found match!", fr, fl, swallowee);
+ return true;
+ } else {
+ if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
+ this.debug("dot detected!", file, fr, pattern, pr);
+ break;
+ }
+ this.debug("globstar swallow a segment, and continue");
+ fr++;
+ }
+ }
+ if (partial) {
+ this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
+ if (fr === fl)
+ return true;
+ }
+ return false;
+ }
+ var hit;
+ if (typeof p === "string") {
+ hit = f === p;
+ this.debug("string match", p, f, hit);
+ } else {
+ hit = f.match(p);
+ this.debug("pattern match", p, f, hit);
+ }
+ if (!hit)
+ return false;
+ }
+ if (fi === fl && pi === pl) {
+ return true;
+ } else if (fi === fl) {
+ return partial;
+ } else if (pi === pl) {
+ return fi === fl - 1 && file[fi] === "";
+ }
+ throw new Error("wtf?");
+ };
+ function globUnescape(s) {
+ return s.replace(/\\(.)/g, "$1");
+ }
+ function regExpEscape(s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+ }
+ }
+});
+var require_inherits_browser = __commonJS2({
+ "node_modules/inherits/inherits_browser.js"(exports2, module2) {
+ if (typeof Object.create === "function") {
+ module2.exports = function inherits(ctor, superCtor) {
+ if (superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ }
+ };
+ } else {
+ module2.exports = function inherits(ctor, superCtor) {
+ if (superCtor) {
+ ctor.super_ = superCtor;
+ var TempCtor = function() {
+ };
+ TempCtor.prototype = superCtor.prototype;
+ ctor.prototype = new TempCtor();
+ ctor.prototype.constructor = ctor;
+ }
+ };
+ }
+ }
+});
+var require_inherits = __commonJS2({
+ "node_modules/inherits/inherits.js"(exports2, module2) {
+ try {
+ util = require("util");
+ if (typeof util.inherits !== "function")
+ throw "";
+ module2.exports = util.inherits;
+ } catch (e) {
+ module2.exports = require_inherits_browser();
+ }
+ var util;
+ }
+});
+var require_path_is_absolute = __commonJS2({
+ "node_modules/path-is-absolute/index.js"(exports2, module2) {
+ "use strict";
+ function posix(path) {
+ return path.charAt(0) === "/";
+ }
+ function win32(path) {
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
+ var result = splitDeviceRe.exec(path);
+ var device = result[1] || "";
+ var isUnc = Boolean(device && device.charAt(1) !== ":");
+ return Boolean(result[2] || isUnc);
+ }
+ module2.exports = process.platform === "win32" ? win32 : posix;
+ module2.exports.posix = posix;
+ module2.exports.win32 = win32;
+ }
+});
+var require_common3 = __commonJS2({
+ "node_modules/glob/common.js"(exports2) {
+ exports2.setopts = setopts;
+ exports2.ownProp = ownProp;
+ exports2.makeAbs = makeAbs;
+ exports2.finish = finish;
+ exports2.mark = mark;
+ exports2.isIgnored = isIgnored;
+ exports2.childrenIgnored = childrenIgnored;
+ function ownProp(obj, field) {
+ return Object.prototype.hasOwnProperty.call(obj, field);
+ }
+ var fs = require("fs");
+ var path = require("path");
+ var minimatch = require_minimatch();
+ var isAbsolute = require_path_is_absolute();
+ var Minimatch = minimatch.Minimatch;
+ function alphasort(a, b) {
+ return a.localeCompare(b, "en");
+ }
+ function setupIgnores(self2, options) {
+ self2.ignore = options.ignore || [];
+ if (!Array.isArray(self2.ignore))
+ self2.ignore = [self2.ignore];
+ if (self2.ignore.length) {
+ self2.ignore = self2.ignore.map(ignoreMap);
+ }
+ }
+ function ignoreMap(pattern) {
+ var gmatcher = null;
+ if (pattern.slice(-3) === "/**") {
+ var gpattern = pattern.replace(/(\/\*\*)+$/, "");
+ gmatcher = new Minimatch(gpattern, {
+ dot: true
+ });
+ }
+ return {
+ matcher: new Minimatch(pattern, {
+ dot: true
+ }),
+ gmatcher
+ };
+ }
+ function setopts(self2, pattern, options) {
+ if (!options)
+ options = {};
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
+ if (options.noglobstar) {
+ throw new Error("base matching requires globstar");
+ }
+ pattern = "**/" + pattern;
+ }
+ self2.silent = !!options.silent;
+ self2.pattern = pattern;
+ self2.strict = options.strict !== false;
+ self2.realpath = !!options.realpath;
+ self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null);
+ self2.follow = !!options.follow;
+ self2.dot = !!options.dot;
+ self2.mark = !!options.mark;
+ self2.nodir = !!options.nodir;
+ if (self2.nodir)
+ self2.mark = true;
+ self2.sync = !!options.sync;
+ self2.nounique = !!options.nounique;
+ self2.nonull = !!options.nonull;
+ self2.nosort = !!options.nosort;
+ self2.nocase = !!options.nocase;
+ self2.stat = !!options.stat;
+ self2.noprocess = !!options.noprocess;
+ self2.absolute = !!options.absolute;
+ self2.fs = options.fs || fs;
+ self2.maxLength = options.maxLength || Infinity;
+ self2.cache = options.cache || /* @__PURE__ */ Object.create(null);
+ self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
+ self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null);
+ setupIgnores(self2, options);
+ self2.changedCwd = false;
+ var cwd = process.cwd();
+ if (!ownProp(options, "cwd"))
+ self2.cwd = cwd;
+ else {
+ self2.cwd = path.resolve(options.cwd);
+ self2.changedCwd = self2.cwd !== cwd;
+ }
+ self2.root = options.root || path.resolve(self2.cwd, "/");
+ self2.root = path.resolve(self2.root);
+ if (process.platform === "win32")
+ self2.root = self2.root.replace(/\\/g, "/");
+ self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
+ if (process.platform === "win32")
+ self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/");
+ self2.nomount = !!options.nomount;
+ options.nonegate = true;
+ options.nocomment = true;
+ options.allowWindowsEscape = false;
+ self2.minimatch = new Minimatch(pattern, options);
+ self2.options = self2.minimatch.options;
+ }
+ function finish(self2) {
+ var nou = self2.nounique;
+ var all = nou ? [] : /* @__PURE__ */ Object.create(null);
+ for (var i = 0, l = self2.matches.length; i < l; i++) {
+ var matches = self2.matches[i];
+ if (!matches || Object.keys(matches).length === 0) {
+ if (self2.nonull) {
+ var literal = self2.minimatch.globSet[i];
+ if (nou)
+ all.push(literal);
+ else
+ all[literal] = true;
+ }
+ } else {
+ var m = Object.keys(matches);
+ if (nou)
+ all.push.apply(all, m);
+ else
+ m.forEach(function(m2) {
+ all[m2] = true;
+ });
+ }
+ }
+ if (!nou)
+ all = Object.keys(all);
+ if (!self2.nosort)
+ all = all.sort(alphasort);
+ if (self2.mark) {
+ for (var i = 0; i < all.length; i++) {
+ all[i] = self2._mark(all[i]);
+ }
+ if (self2.nodir) {
+ all = all.filter(function(e) {
+ var notDir = !/\/$/.test(e);
+ var c = self2.cache[e] || self2.cache[makeAbs(self2, e)];
+ if (notDir && c)
+ notDir = c !== "DIR" && !Array.isArray(c);
+ return notDir;
+ });
+ }
+ }
+ if (self2.ignore.length)
+ all = all.filter(function(m2) {
+ return !isIgnored(self2, m2);
+ });
+ self2.found = all;
+ }
+ function mark(self2, p) {
+ var abs = makeAbs(self2, p);
+ var c = self2.cache[abs];
+ var m = p;
+ if (c) {
+ var isDir = c === "DIR" || Array.isArray(c);
+ var slash = p.slice(-1) === "/";
+ if (isDir && !slash)
+ m += "/";
+ else if (!isDir && slash)
+ m = m.slice(0, -1);
+ if (m !== p) {
+ var mabs = makeAbs(self2, m);
+ self2.statCache[mabs] = self2.statCache[abs];
+ self2.cache[mabs] = self2.cache[abs];
+ }
+ }
+ return m;
+ }
+ function makeAbs(self2, f) {
+ var abs = f;
+ if (f.charAt(0) === "/") {
+ abs = path.join(self2.root, f);
+ } else if (isAbsolute(f) || f === "") {
+ abs = f;
+ } else if (self2.changedCwd) {
+ abs = path.resolve(self2.cwd, f);
+ } else {
+ abs = path.resolve(f);
+ }
+ if (process.platform === "win32")
+ abs = abs.replace(/\\/g, "/");
+ return abs;
+ }
+ function isIgnored(self2, path2) {
+ if (!self2.ignore.length)
+ return false;
+ return self2.ignore.some(function(item) {
+ return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2));
+ });
+ }
+ function childrenIgnored(self2, path2) {
+ if (!self2.ignore.length)
+ return false;
+ return self2.ignore.some(function(item) {
+ return !!(item.gmatcher && item.gmatcher.match(path2));
+ });
+ }
+ }
+});
+var require_sync7 = __commonJS2({
+ "node_modules/glob/sync.js"(exports2, module2) {
+ module2.exports = globSync;
+ globSync.GlobSync = GlobSync;
+ var rp = require_fs5();
+ var minimatch = require_minimatch();
+ var Minimatch = minimatch.Minimatch;
+ var Glob = require_glob().Glob;
+ var util = require("util");
+ var path = require("path");
+ var assert = require("assert");
+ var isAbsolute = require_path_is_absolute();
+ var common = require_common3();
+ var setopts = common.setopts;
+ var ownProp = common.ownProp;
+ var childrenIgnored = common.childrenIgnored;
+ var isIgnored = common.isIgnored;
+ function globSync(pattern, options) {
+ if (typeof options === "function" || arguments.length === 3)
+ throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
+ return new GlobSync(pattern, options).found;
+ }
+ function GlobSync(pattern, options) {
+ if (!pattern)
+ throw new Error("must provide pattern");
+ if (typeof options === "function" || arguments.length === 3)
+ throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");
+ if (!(this instanceof GlobSync))
+ return new GlobSync(pattern, options);
+ setopts(this, pattern, options);
+ if (this.noprocess)
+ return this;
+ var n = this.minimatch.set.length;
+ this.matches = new Array(n);
+ for (var i = 0; i < n; i++) {
+ this._process(this.minimatch.set[i], i, false);
+ }
+ this._finish();
+ }
+ GlobSync.prototype._finish = function() {
+ assert.ok(this instanceof GlobSync);
+ if (this.realpath) {
+ var self2 = this;
+ this.matches.forEach(function(matchset, index) {
+ var set = self2.matches[index] = /* @__PURE__ */ Object.create(null);
+ for (var p in matchset) {
+ try {
+ p = self2._makeAbs(p);
+ var real = rp.realpathSync(p, self2.realpathCache);
+ set[real] = true;
+ } catch (er) {
+ if (er.syscall === "stat")
+ set[self2._makeAbs(p)] = true;
+ else
+ throw er;
+ }
+ }
+ });
+ }
+ common.finish(this);
+ };
+ GlobSync.prototype._process = function(pattern, index, inGlobStar) {
+ assert.ok(this instanceof GlobSync);
+ var n = 0;
+ while (typeof pattern[n] === "string") {
+ n++;
+ }
+ var prefix;
+ switch (n) {
+ case pattern.length:
+ this._processSimple(pattern.join("/"), index);
+ return;
+ case 0:
+ prefix = null;
+ break;
+ default:
+ prefix = pattern.slice(0, n).join("/");
+ break;
+ }
+ var remain = pattern.slice(n);
+ var read;
+ if (prefix === null)
+ read = ".";
+ else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) {
+ return typeof p === "string" ? p : "[*]";
+ }).join("/"))) {
+ if (!prefix || !isAbsolute(prefix))
+ prefix = "/" + prefix;
+ read = prefix;
+ } else
+ read = prefix;
+ var abs = this._makeAbs(read);
+ if (childrenIgnored(this, read))
+ return;
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR;
+ if (isGlobStar)
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar);
+ else
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar);
+ };
+ GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) {
+ var entries = this._readdir(abs, inGlobStar);
+ if (!entries)
+ return;
+ var pn = remain[0];
+ var negate = !!this.minimatch.negate;
+ var rawGlob = pn._glob;
+ var dotOk = this.dot || rawGlob.charAt(0) === ".";
+ var matchedEntries = [];
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i];
+ if (e.charAt(0) !== "." || dotOk) {
+ var m;
+ if (negate && !prefix) {
+ m = !e.match(pn);
+ } else {
+ m = e.match(pn);
+ }
+ if (m)
+ matchedEntries.push(e);
+ }
+ }
+ var len = matchedEntries.length;
+ if (len === 0)
+ return;
+ if (remain.length === 1 && !this.mark && !this.stat) {
+ if (!this.matches[index])
+ this.matches[index] = /* @__PURE__ */ Object.create(null);
+ for (var i = 0; i < len; i++) {
+ var e = matchedEntries[i];
+ if (prefix) {
+ if (prefix.slice(-1) !== "/")
+ e = prefix + "/" + e;
+ else
+ e = prefix + e;
+ }
+ if (e.charAt(0) === "/" && !this.nomount) {
+ e = path.join(this.root, e);
+ }
+ this._emitMatch(index, e);
+ }
+ return;
+ }
+ remain.shift();
+ for (var i = 0; i < len; i++) {
+ var e = matchedEntries[i];
+ var newPattern;
+ if (prefix)
+ newPattern = [prefix, e];
+ else
+ newPattern = [e];
+ this._process(newPattern.concat(remain), index, inGlobStar);
+ }
+ };
+ GlobSync.prototype._emitMatch = function(index, e) {
+ if (isIgnored(this, e))
+ return;
+ var abs = this._makeAbs(e);
+ if (this.mark)
+ e = this._mark(e);
+ if (this.absolute) {
+ e = abs;
+ }
+ if (this.matches[index][e])
+ return;
+ if (this.nodir) {
+ var c = this.cache[abs];
+ if (c === "DIR" || Array.isArray(c))
+ return;
+ }
+ this.matches[index][e] = true;
+ if (this.stat)
+ this._stat(e);
+ };
+ GlobSync.prototype._readdirInGlobStar = function(abs) {
+ if (this.follow)
+ return this._readdir(abs, false);
+ var entries;
+ var lstat;
+ var stat;
+ try {
+ lstat = this.fs.lstatSync(abs);
+ } catch (er) {
+ if (er.code === "ENOENT") {
+ return null;
+ }
+ }
+ var isSym = lstat && lstat.isSymbolicLink();
+ this.symlinks[abs] = isSym;
+ if (!isSym && lstat && !lstat.isDirectory())
+ this.cache[abs] = "FILE";
+ else
+ entries = this._readdir(abs, false);
+ return entries;
+ };
+ GlobSync.prototype._readdir = function(abs, inGlobStar) {
+ var entries;
+ if (inGlobStar && !ownProp(this.symlinks, abs))
+ return this._readdirInGlobStar(abs);
+ if (ownProp(this.cache, abs)) {
+ var c = this.cache[abs];
+ if (!c || c === "FILE")
+ return null;
+ if (Array.isArray(c))
+ return c;
+ }
+ try {
+ return this._readdirEntries(abs, this.fs.readdirSync(abs));
+ } catch (er) {
+ this._readdirError(abs, er);
+ return null;
+ }
+ };
+ GlobSync.prototype._readdirEntries = function(abs, entries) {
+ if (!this.mark && !this.stat) {
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i];
+ if (abs === "/")
+ e = abs + e;
+ else
+ e = abs + "/" + e;
+ this.cache[e] = true;
+ }
+ }
+ this.cache[abs] = entries;
+ return entries;
+ };
+ GlobSync.prototype._readdirError = function(f, er) {
+ switch (er.code) {
+ case "ENOTSUP":
+ case "ENOTDIR":
+ var abs = this._makeAbs(f);
+ this.cache[abs] = "FILE";
+ if (abs === this.cwdAbs) {
+ var error = new Error(er.code + " invalid cwd " + this.cwd);
+ error.path = this.cwd;
+ error.code = er.code;
+ throw error;
+ }
+ break;
+ case "ENOENT":
+ case "ELOOP":
+ case "ENAMETOOLONG":
+ case "UNKNOWN":
+ this.cache[this._makeAbs(f)] = false;
+ break;
+ default:
+ this.cache[this._makeAbs(f)] = false;
+ if (this.strict)
+ throw er;
+ if (!this.silent)
+ console.error("glob error", er);
+ break;
+ }
+ };
+ GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) {
+ var entries = this._readdir(abs, inGlobStar);
+ if (!entries)
+ return;
+ var remainWithoutGlobStar = remain.slice(1);
+ var gspref = prefix ? [prefix] : [];
+ var noGlobStar = gspref.concat(remainWithoutGlobStar);
+ this._process(noGlobStar, index, false);
+ var len = entries.length;
+ var isSym = this.symlinks[abs];
+ if (isSym && inGlobStar)
+ return;
+ for (var i = 0; i < len; i++) {
+ var e = entries[i];
+ if (e.charAt(0) === "." && !this.dot)
+ continue;
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar);
+ this._process(instead, index, true);
+ var below = gspref.concat(entries[i], remain);
+ this._process(below, index, true);
+ }
+ };
+ GlobSync.prototype._processSimple = function(prefix, index) {
+ var exists = this._stat(prefix);
+ if (!this.matches[index])
+ this.matches[index] = /* @__PURE__ */ Object.create(null);
+ if (!exists)
+ return;
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ var trail = /[\/\\]$/.test(prefix);
+ if (prefix.charAt(0) === "/") {
+ prefix = path.join(this.root, prefix);
+ } else {
+ prefix = path.resolve(this.root, prefix);
+ if (trail)
+ prefix += "/";
+ }
+ }
+ if (process.platform === "win32")
+ prefix = prefix.replace(/\\/g, "/");
+ this._emitMatch(index, prefix);
+ };
+ GlobSync.prototype._stat = function(f) {
+ var abs = this._makeAbs(f);
+ var needDir = f.slice(-1) === "/";
+ if (f.length > this.maxLength)
+ return false;
+ if (!this.stat && ownProp(this.cache, abs)) {
+ var c = this.cache[abs];
+ if (Array.isArray(c))
+ c = "DIR";
+ if (!needDir || c === "DIR")
+ return c;
+ if (needDir && c === "FILE")
+ return false;
+ }
+ var exists;
+ var stat = this.statCache[abs];
+ if (!stat) {
+ var lstat;
+ try {
+ lstat = this.fs.lstatSync(abs);
+ } catch (er) {
+ if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
+ this.statCache[abs] = false;
+ return false;
+ }
+ }
+ if (lstat && lstat.isSymbolicLink()) {
+ try {
+ stat = this.fs.statSync(abs);
+ } catch (er) {
+ stat = lstat;
+ }
+ } else {
+ stat = lstat;
+ }
+ }
+ this.statCache[abs] = stat;
+ var c = true;
+ if (stat)
+ c = stat.isDirectory() ? "DIR" : "FILE";
+ this.cache[abs] = this.cache[abs] || c;
+ if (needDir && c === "FILE")
+ return false;
+ return c;
+ };
+ GlobSync.prototype._mark = function(p) {
+ return common.mark(this, p);
+ };
+ GlobSync.prototype._makeAbs = function(f) {
+ return common.makeAbs(this, f);
+ };
+ }
+});
+var require_wrappy = __commonJS2({
+ "node_modules/wrappy/wrappy.js"(exports2, module2) {
+ module2.exports = wrappy;
+ function wrappy(fn, cb) {
+ if (fn && cb)
+ return wrappy(fn)(cb);
+ if (typeof fn !== "function")
+ throw new TypeError("need wrapper function");
+ Object.keys(fn).forEach(function(k) {
+ wrapper[k] = fn[k];
+ });
+ return wrapper;
+ function wrapper() {
+ var args = new Array(arguments.length);
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i];
+ }
+ var ret = fn.apply(this, args);
+ var cb2 = args[args.length - 1];
+ if (typeof ret === "function" && ret !== cb2) {
+ Object.keys(cb2).forEach(function(k) {
+ ret[k] = cb2[k];
+ });
+ }
+ return ret;
+ }
+ }
+ }
+});
+var require_once = __commonJS2({
+ "node_modules/once/once.js"(exports2, module2) {
+ var wrappy = require_wrappy();
+ module2.exports = wrappy(once);
+ module2.exports.strict = wrappy(onceStrict);
+ once.proto = once(function() {
+ Object.defineProperty(Function.prototype, "once", {
+ value: function() {
+ return once(this);
+ },
+ configurable: true
+ });
+ Object.defineProperty(Function.prototype, "onceStrict", {
+ value: function() {
+ return onceStrict(this);
+ },
+ configurable: true
+ });
+ });
+ function once(fn) {
+ var f = function() {
+ if (f.called)
+ return f.value;
+ f.called = true;
+ return f.value = fn.apply(this, arguments);
+ };
+ f.called = false;
+ return f;
+ }
+ function onceStrict(fn) {
+ var f = function() {
+ if (f.called)
+ throw new Error(f.onceError);
+ f.called = true;
+ return f.value = fn.apply(this, arguments);
+ };
+ var name = fn.name || "Function wrapped with `once`";
+ f.onceError = name + " shouldn't be called more than once";
+ f.called = false;
+ return f;
+ }
+ }
+});
+var require_inflight = __commonJS2({
+ "node_modules/inflight/inflight.js"(exports2, module2) {
+ var wrappy = require_wrappy();
+ var reqs = /* @__PURE__ */ Object.create(null);
+ var once = require_once();
+ module2.exports = wrappy(inflight);
+ function inflight(key, cb) {
+ if (reqs[key]) {
+ reqs[key].push(cb);
+ return null;
+ } else {
+ reqs[key] = [cb];
+ return makeres(key);
+ }
+ }
+ function makeres(key) {
+ return once(function RES() {
+ var cbs = reqs[key];
+ var len = cbs.length;
+ var args = slice(arguments);
+ try {
+ for (var i = 0; i < len; i++) {
+ cbs[i].apply(null, args);
+ }
+ } finally {
+ if (cbs.length > len) {
+ cbs.splice(0, len);
+ process.nextTick(function() {
+ RES.apply(null, args);
+ });
+ } else {
+ delete reqs[key];
+ }
+ }
+ });
+ }
+ function slice(args) {
+ var length = args.length;
+ var array2 = [];
+ for (var i = 0; i < length; i++)
+ array2[i] = args[i];
+ return array2;
+ }
+ }
+});
+var require_glob = __commonJS2({
+ "node_modules/glob/glob.js"(exports2, module2) {
+ module2.exports = glob;
+ var rp = require_fs5();
+ var minimatch = require_minimatch();
+ var Minimatch = minimatch.Minimatch;
+ var inherits = require_inherits();
+ var EE = require("events").EventEmitter;
+ var path = require("path");
+ var assert = require("assert");
+ var isAbsolute = require_path_is_absolute();
+ var globSync = require_sync7();
+ var common = require_common3();
+ var setopts = common.setopts;
+ var ownProp = common.ownProp;
+ var inflight = require_inflight();
+ var util = require("util");
+ var childrenIgnored = common.childrenIgnored;
+ var isIgnored = common.isIgnored;
+ var once = require_once();
+ function glob(pattern, options, cb) {
+ if (typeof options === "function")
+ cb = options, options = {};
+ if (!options)
+ options = {};
+ if (options.sync) {
+ if (cb)
+ throw new TypeError("callback provided to sync glob");
+ return globSync(pattern, options);
+ }
+ return new Glob(pattern, options, cb);
+ }
+ glob.sync = globSync;
+ var GlobSync = glob.GlobSync = globSync.GlobSync;
+ glob.glob = glob;
+ function extend(origin, add) {
+ if (add === null || typeof add !== "object") {
+ return origin;
+ }
+ var keys = Object.keys(add);
+ var i = keys.length;
+ while (i--) {
+ origin[keys[i]] = add[keys[i]];
+ }
+ return origin;
+ }
+ glob.hasMagic = function(pattern, options_) {
+ var options = extend({}, options_);
+ options.noprocess = true;
+ var g = new Glob(pattern, options);
+ var set = g.minimatch.set;
+ if (!pattern)
+ return false;
+ if (set.length > 1)
+ return true;
+ for (var j = 0; j < set[0].length; j++) {
+ if (typeof set[0][j] !== "string")
+ return true;
+ }
+ return false;
+ };
+ glob.Glob = Glob;
+ inherits(Glob, EE);
+ function Glob(pattern, options, cb) {
+ if (typeof options === "function") {
+ cb = options;
+ options = null;
+ }
+ if (options && options.sync) {
+ if (cb)
+ throw new TypeError("callback provided to sync glob");
+ return new GlobSync(pattern, options);
+ }
+ if (!(this instanceof Glob))
+ return new Glob(pattern, options, cb);
+ setopts(this, pattern, options);
+ this._didRealPath = false;
+ var n = this.minimatch.set.length;
+ this.matches = new Array(n);
+ if (typeof cb === "function") {
+ cb = once(cb);
+ this.on("error", cb);
+ this.on("end", function(matches) {
+ cb(null, matches);
+ });
+ }
+ var self2 = this;
+ this._processing = 0;
+ this._emitQueue = [];
+ this._processQueue = [];
+ this.paused = false;
+ if (this.noprocess)
+ return this;
+ if (n === 0)
+ return done();
+ var sync = true;
+ for (var i = 0; i < n; i++) {
+ this._process(this.minimatch.set[i], i, false, done);
+ }
+ sync = false;
+ function done() {
+ --self2._processing;
+ if (self2._processing <= 0) {
+ if (sync) {
+ process.nextTick(function() {
+ self2._finish();
+ });
+ } else {
+ self2._finish();
+ }
+ }
+ }
+ }
+ Glob.prototype._finish = function() {
+ assert(this instanceof Glob);
+ if (this.aborted)
+ return;
+ if (this.realpath && !this._didRealpath)
+ return this._realpath();
+ common.finish(this);
+ this.emit("end", this.found);
+ };
+ Glob.prototype._realpath = function() {
+ if (this._didRealpath)
+ return;
+ this._didRealpath = true;
+ var n = this.matches.length;
+ if (n === 0)
+ return this._finish();
+ var self2 = this;
+ for (var i = 0; i < this.matches.length; i++)
+ this._realpathSet(i, next);
+ function next() {
+ if (--n === 0)
+ self2._finish();
+ }
+ };
+ Glob.prototype._realpathSet = function(index, cb) {
+ var matchset = this.matches[index];
+ if (!matchset)
+ return cb();
+ var found = Object.keys(matchset);
+ var self2 = this;
+ var n = found.length;
+ if (n === 0)
+ return cb();
+ var set = this.matches[index] = /* @__PURE__ */ Object.create(null);
+ found.forEach(function(p, i) {
+ p = self2._makeAbs(p);
+ rp.realpath(p, self2.realpathCache, function(er, real) {
+ if (!er)
+ set[real] = true;
+ else if (er.syscall === "stat")
+ set[p] = true;
+ else
+ self2.emit("error", er);
+ if (--n === 0) {
+ self2.matches[index] = set;
+ cb();
+ }
+ });
+ });
+ };
+ Glob.prototype._mark = function(p) {
+ return common.mark(this, p);
+ };
+ Glob.prototype._makeAbs = function(f) {
+ return common.makeAbs(this, f);
+ };
+ Glob.prototype.abort = function() {
+ this.aborted = true;
+ this.emit("abort");
+ };
+ Glob.prototype.pause = function() {
+ if (!this.paused) {
+ this.paused = true;
+ this.emit("pause");
+ }
+ };
+ Glob.prototype.resume = function() {
+ if (this.paused) {
+ this.emit("resume");
+ this.paused = false;
+ if (this._emitQueue.length) {
+ var eq = this._emitQueue.slice(0);
+ this._emitQueue.length = 0;
+ for (var i = 0; i < eq.length; i++) {
+ var e = eq[i];
+ this._emitMatch(e[0], e[1]);
+ }
+ }
+ if (this._processQueue.length) {
+ var pq = this._processQueue.slice(0);
+ this._processQueue.length = 0;
+ for (var i = 0; i < pq.length; i++) {
+ var p = pq[i];
+ this._processing--;
+ this._process(p[0], p[1], p[2], p[3]);
+ }
+ }
+ }
+ };
+ Glob.prototype._process = function(pattern, index, inGlobStar, cb) {
+ assert(this instanceof Glob);
+ assert(typeof cb === "function");
+ if (this.aborted)
+ return;
+ this._processing++;
+ if (this.paused) {
+ this._processQueue.push([pattern, index, inGlobStar, cb]);
+ return;
+ }
+ var n = 0;
+ while (typeof pattern[n] === "string") {
+ n++;
+ }
+ var prefix;
+ switch (n) {
+ case pattern.length:
+ this._processSimple(pattern.join("/"), index, cb);
+ return;
+ case 0:
+ prefix = null;
+ break;
+ default:
+ prefix = pattern.slice(0, n).join("/");
+ break;
+ }
+ var remain = pattern.slice(n);
+ var read;
+ if (prefix === null)
+ read = ".";
+ else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) {
+ return typeof p === "string" ? p : "[*]";
+ }).join("/"))) {
+ if (!prefix || !isAbsolute(prefix))
+ prefix = "/" + prefix;
+ read = prefix;
+ } else
+ read = prefix;
+ var abs = this._makeAbs(read);
+ if (childrenIgnored(this, read))
+ return cb();
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR;
+ if (isGlobStar)
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb);
+ else
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb);
+ };
+ Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) {
+ var self2 = this;
+ this._readdir(abs, inGlobStar, function(er, entries) {
+ return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
+ });
+ };
+ Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) {
+ if (!entries)
+ return cb();
+ var pn = remain[0];
+ var negate = !!this.minimatch.negate;
+ var rawGlob = pn._glob;
+ var dotOk = this.dot || rawGlob.charAt(0) === ".";
+ var matchedEntries = [];
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i];
+ if (e.charAt(0) !== "." || dotOk) {
+ var m;
+ if (negate && !prefix) {
+ m = !e.match(pn);
+ } else {
+ m = e.match(pn);
+ }
+ if (m)
+ matchedEntries.push(e);
+ }
+ }
+ var len = matchedEntries.length;
+ if (len === 0)
+ return cb();
+ if (remain.length === 1 && !this.mark && !this.stat) {
+ if (!this.matches[index])
+ this.matches[index] = /* @__PURE__ */ Object.create(null);
+ for (var i = 0; i < len; i++) {
+ var e = matchedEntries[i];
+ if (prefix) {
+ if (prefix !== "/")
+ e = prefix + "/" + e;
+ else
+ e = prefix + e;
+ }
+ if (e.charAt(0) === "/" && !this.nomount) {
+ e = path.join(this.root, e);
+ }
+ this._emitMatch(index, e);
+ }
+ return cb();
+ }
+ remain.shift();
+ for (var i = 0; i < len; i++) {
+ var e = matchedEntries[i];
+ var newPattern;
+ if (prefix) {
+ if (prefix !== "/")
+ e = prefix + "/" + e;
+ else
+ e = prefix + e;
+ }
+ this._process([e].concat(remain), index, inGlobStar, cb);
+ }
+ cb();
+ };
+ Glob.prototype._emitMatch = function(index, e) {
+ if (this.aborted)
+ return;
+ if (isIgnored(this, e))
+ return;
+ if (this.paused) {
+ this._emitQueue.push([index, e]);
+ return;
+ }
+ var abs = isAbsolute(e) ? e : this._makeAbs(e);
+ if (this.mark)
+ e = this._mark(e);
+ if (this.absolute)
+ e = abs;
+ if (this.matches[index][e])
+ return;
+ if (this.nodir) {
+ var c = this.cache[abs];
+ if (c === "DIR" || Array.isArray(c))
+ return;
+ }
+ this.matches[index][e] = true;
+ var st = this.statCache[abs];
+ if (st)
+ this.emit("stat", e, st);
+ this.emit("match", e);
+ };
+ Glob.prototype._readdirInGlobStar = function(abs, cb) {
+ if (this.aborted)
+ return;
+ if (this.follow)
+ return this._readdir(abs, false, cb);
+ var lstatkey = "lstat\0" + abs;
+ var self2 = this;
+ var lstatcb = inflight(lstatkey, lstatcb_);
+ if (lstatcb)
+ self2.fs.lstat(abs, lstatcb);
+ function lstatcb_(er, lstat) {
+ if (er && er.code === "ENOENT")
+ return cb();
+ var isSym = lstat && lstat.isSymbolicLink();
+ self2.symlinks[abs] = isSym;
+ if (!isSym && lstat && !lstat.isDirectory()) {
+ self2.cache[abs] = "FILE";
+ cb();
+ } else
+ self2._readdir(abs, false, cb);
+ }
+ };
+ Glob.prototype._readdir = function(abs, inGlobStar, cb) {
+ if (this.aborted)
+ return;
+ cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb);
+ if (!cb)
+ return;
+ if (inGlobStar && !ownProp(this.symlinks, abs))
+ return this._readdirInGlobStar(abs, cb);
+ if (ownProp(this.cache, abs)) {
+ var c = this.cache[abs];
+ if (!c || c === "FILE")
+ return cb();
+ if (Array.isArray(c))
+ return cb(null, c);
+ }
+ var self2 = this;
+ self2.fs.readdir(abs, readdirCb(this, abs, cb));
+ };
+ function readdirCb(self2, abs, cb) {
+ return function(er, entries) {
+ if (er)
+ self2._readdirError(abs, er, cb);
+ else
+ self2._readdirEntries(abs, entries, cb);
+ };
+ }
+ Glob.prototype._readdirEntries = function(abs, entries, cb) {
+ if (this.aborted)
+ return;
+ if (!this.mark && !this.stat) {
+ for (var i = 0; i < entries.length; i++) {
+ var e = entries[i];
+ if (abs === "/")
+ e = abs + e;
+ else
+ e = abs + "/" + e;
+ this.cache[e] = true;
+ }
+ }
+ this.cache[abs] = entries;
+ return cb(null, entries);
+ };
+ Glob.prototype._readdirError = function(f, er, cb) {
+ if (this.aborted)
+ return;
+ switch (er.code) {
+ case "ENOTSUP":
+ case "ENOTDIR":
+ var abs = this._makeAbs(f);
+ this.cache[abs] = "FILE";
+ if (abs === this.cwdAbs) {
+ var error = new Error(er.code + " invalid cwd " + this.cwd);
+ error.path = this.cwd;
+ error.code = er.code;
+ this.emit("error", error);
+ this.abort();
+ }
+ break;
+ case "ENOENT":
+ case "ELOOP":
+ case "ENAMETOOLONG":
+ case "UNKNOWN":
+ this.cache[this._makeAbs(f)] = false;
+ break;
+ default:
+ this.cache[this._makeAbs(f)] = false;
+ if (this.strict) {
+ this.emit("error", er);
+ this.abort();
+ }
+ if (!this.silent)
+ console.error("glob error", er);
+ break;
+ }
+ return cb();
+ };
+ Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) {
+ var self2 = this;
+ this._readdir(abs, inGlobStar, function(er, entries) {
+ self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb);
+ });
+ };
+ Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) {
+ if (!entries)
+ return cb();
+ var remainWithoutGlobStar = remain.slice(1);
+ var gspref = prefix ? [prefix] : [];
+ var noGlobStar = gspref.concat(remainWithoutGlobStar);
+ this._process(noGlobStar, index, false, cb);
+ var isSym = this.symlinks[abs];
+ var len = entries.length;
+ if (isSym && inGlobStar)
+ return cb();
+ for (var i = 0; i < len; i++) {
+ var e = entries[i];
+ if (e.charAt(0) === "." && !this.dot)
+ continue;
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar);
+ this._process(instead, index, true, cb);
+ var below = gspref.concat(entries[i], remain);
+ this._process(below, index, true, cb);
+ }
+ cb();
+ };
+ Glob.prototype._processSimple = function(prefix, index, cb) {
+ var self2 = this;
+ this._stat(prefix, function(er, exists) {
+ self2._processSimple2(prefix, index, er, exists, cb);
+ });
+ };
+ Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) {
+ if (!this.matches[index])
+ this.matches[index] = /* @__PURE__ */ Object.create(null);
+ if (!exists)
+ return cb();
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ var trail = /[\/\\]$/.test(prefix);
+ if (prefix.charAt(0) === "/") {
+ prefix = path.join(this.root, prefix);
+ } else {
+ prefix = path.resolve(this.root, prefix);
+ if (trail)
+ prefix += "/";
+ }
+ }
+ if (process.platform === "win32")
+ prefix = prefix.replace(/\\/g, "/");
+ this._emitMatch(index, prefix);
+ cb();
+ };
+ Glob.prototype._stat = function(f, cb) {
+ var abs = this._makeAbs(f);
+ var needDir = f.slice(-1) === "/";
+ if (f.length > this.maxLength)
+ return cb();
+ if (!this.stat && ownProp(this.cache, abs)) {
+ var c = this.cache[abs];
+ if (Array.isArray(c))
+ c = "DIR";
+ if (!needDir || c === "DIR")
+ return cb(null, c);
+ if (needDir && c === "FILE")
+ return cb();
+ }
+ var exists;
+ var stat = this.statCache[abs];
+ if (stat !== void 0) {
+ if (stat === false)
+ return cb(null, stat);
+ else {
+ var type = stat.isDirectory() ? "DIR" : "FILE";
+ if (needDir && type === "FILE")
+ return cb();
+ else
+ return cb(null, type, stat);
+ }
+ }
+ var self2 = this;
+ var statcb = inflight("stat\0" + abs, lstatcb_);
+ if (statcb)
+ self2.fs.lstat(abs, statcb);
+ function lstatcb_(er, lstat) {
+ if (lstat && lstat.isSymbolicLink()) {
+ return self2.fs.stat(abs, function(er2, stat2) {
+ if (er2)
+ self2._stat2(f, abs, null, lstat, cb);
+ else
+ self2._stat2(f, abs, er2, stat2, cb);
+ });
+ } else {
+ self2._stat2(f, abs, er, lstat, cb);
+ }
+ }
+ };
+ Glob.prototype._stat2 = function(f, abs, er, stat, cb) {
+ if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) {
+ this.statCache[abs] = false;
+ return cb();
+ }
+ var needDir = f.slice(-1) === "/";
+ this.statCache[abs] = stat;
+ if (abs.slice(-1) === "/" && stat && !stat.isDirectory())
+ return cb(null, false, stat);
+ var c = true;
+ if (stat)
+ c = stat.isDirectory() ? "DIR" : "FILE";
+ this.cache[abs] = this.cache[abs] || c;
+ if (needDir && c === "FILE")
+ return cb();
+ return cb(null, c, stat);
+ };
+ }
+});
+var require_rimraf = __commonJS2({
+ "node_modules/rimraf/rimraf.js"(exports2, module2) {
+ var assert = require("assert");
+ var path = require("path");
+ var fs = require("fs");
+ var glob = void 0;
+ try {
+ glob = require_glob();
+ } catch (_err) {
+ }
+ var defaultGlobOpts = {
+ nosort: true,
+ silent: true
+ };
+ var timeout = 0;
+ var isWindows = process.platform === "win32";
+ var defaults = (options) => {
+ const methods = ["unlink", "chmod", "stat", "lstat", "rmdir", "readdir"];
+ methods.forEach((m) => {
+ options[m] = options[m] || fs[m];
+ m = m + "Sync";
+ options[m] = options[m] || fs[m];
+ });
+ options.maxBusyTries = options.maxBusyTries || 3;
+ options.emfileWait = options.emfileWait || 1e3;
+ if (options.glob === false) {
+ options.disableGlob = true;
+ }
+ if (options.disableGlob !== true && glob === void 0) {
+ throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");
+ }
+ options.disableGlob = options.disableGlob || false;
+ options.glob = options.glob || defaultGlobOpts;
+ };
+ var rimraf = (p, options, cb) => {
+ if (typeof options === "function") {
+ cb = options;
+ options = {};
+ }
+ assert(p, "rimraf: missing path");
+ assert.equal(typeof p, "string", "rimraf: path should be a string");
+ assert.equal(typeof cb, "function", "rimraf: callback function required");
+ assert(options, "rimraf: invalid options argument provided");
+ assert.equal(typeof options, "object", "rimraf: options should be object");
+ defaults(options);
+ let busyTries = 0;
+ let errState = null;
+ let n = 0;
+ const next = (er) => {
+ errState = errState || er;
+ if (--n === 0)
+ cb(errState);
+ };
+ const afterGlob = (er, results) => {
+ if (er)
+ return cb(er);
+ n = results.length;
+ if (n === 0)
+ return cb();
+ results.forEach((p2) => {
+ const CB = (er2) => {
+ if (er2) {
+ if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) {
+ busyTries++;
+ return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100);
+ }
+ if (er2.code === "EMFILE" && timeout < options.emfileWait) {
+ return setTimeout(() => rimraf_(p2, options, CB), timeout++);
+ }
+ if (er2.code === "ENOENT")
+ er2 = null;
+ }
+ timeout = 0;
+ next(er2);
+ };
+ rimraf_(p2, options, CB);
+ });
+ };
+ if (options.disableGlob || !glob.hasMagic(p))
+ return afterGlob(null, [p]);
+ options.lstat(p, (er, stat) => {
+ if (!er)
+ return afterGlob(null, [p]);
+ glob(p, options.glob, afterGlob);
+ });
+ };
+ var rimraf_ = (p, options, cb) => {
+ assert(p);
+ assert(options);
+ assert(typeof cb === "function");
+ options.lstat(p, (er, st) => {
+ if (er && er.code === "ENOENT")
+ return cb(null);
+ if (er && er.code === "EPERM" && isWindows)
+ fixWinEPERM(p, options, er, cb);
+ if (st && st.isDirectory())
+ return rmdir(p, options, er, cb);
+ options.unlink(p, (er2) => {
+ if (er2) {
+ if (er2.code === "ENOENT")
+ return cb(null);
+ if (er2.code === "EPERM")
+ return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb);
+ if (er2.code === "EISDIR")
+ return rmdir(p, options, er2, cb);
+ }
+ return cb(er2);
+ });
+ });
+ };
+ var fixWinEPERM = (p, options, er, cb) => {
+ assert(p);
+ assert(options);
+ assert(typeof cb === "function");
+ options.chmod(p, 438, (er2) => {
+ if (er2)
+ cb(er2.code === "ENOENT" ? null : er);
+ else
+ options.stat(p, (er3, stats) => {
+ if (er3)
+ cb(er3.code === "ENOENT" ? null : er);
+ else if (stats.isDirectory())
+ rmdir(p, options, er, cb);
+ else
+ options.unlink(p, cb);
+ });
+ });
+ };
+ var fixWinEPERMSync = (p, options, er) => {
+ assert(p);
+ assert(options);
+ try {
+ options.chmodSync(p, 438);
+ } catch (er2) {
+ if (er2.code === "ENOENT")
+ return;
+ else
+ throw er;
+ }
+ let stats;
+ try {
+ stats = options.statSync(p);
+ } catch (er3) {
+ if (er3.code === "ENOENT")
+ return;
+ else
+ throw er;
+ }
+ if (stats.isDirectory())
+ rmdirSync(p, options, er);
+ else
+ options.unlinkSync(p);
+ };
+ var rmdir = (p, options, originalEr, cb) => {
+ assert(p);
+ assert(options);
+ assert(typeof cb === "function");
+ options.rmdir(p, (er) => {
+ if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
+ rmkids(p, options, cb);
+ else if (er && er.code === "ENOTDIR")
+ cb(originalEr);
+ else
+ cb(er);
+ });
+ };
+ var rmkids = (p, options, cb) => {
+ assert(p);
+ assert(options);
+ assert(typeof cb === "function");
+ options.readdir(p, (er, files) => {
+ if (er)
+ return cb(er);
+ let n = files.length;
+ if (n === 0)
+ return options.rmdir(p, cb);
+ let errState;
+ files.forEach((f) => {
+ rimraf(path.join(p, f), options, (er2) => {
+ if (errState)
+ return;
+ if (er2)
+ return cb(errState = er2);
+ if (--n === 0)
+ options.rmdir(p, cb);
+ });
+ });
+ });
+ };
+ var rimrafSync = (p, options) => {
+ options = options || {};
+ defaults(options);
+ assert(p, "rimraf: missing path");
+ assert.equal(typeof p, "string", "rimraf: path should be a string");
+ assert(options, "rimraf: missing options");
+ assert.equal(typeof options, "object", "rimraf: options should be object");
+ let results;
+ if (options.disableGlob || !glob.hasMagic(p)) {
+ results = [p];
+ } else {
+ try {
+ options.lstatSync(p);
+ results = [p];
+ } catch (er) {
+ results = glob.sync(p, options.glob);
+ }
+ }
+ if (!results.length)
+ return;
+ for (let i = 0; i < results.length; i++) {
+ const p2 = results[i];
+ let st;
+ try {
+ st = options.lstatSync(p2);
+ } catch (er) {
+ if (er.code === "ENOENT")
+ return;
+ if (er.code === "EPERM" && isWindows)
+ fixWinEPERMSync(p2, options, er);
+ }
+ try {
+ if (st && st.isDirectory())
+ rmdirSync(p2, options, null);
+ else
+ options.unlinkSync(p2);
+ } catch (er) {
+ if (er.code === "ENOENT")
+ return;
+ if (er.code === "EPERM")
+ return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er);
+ if (er.code !== "EISDIR")
+ throw er;
+ rmdirSync(p2, options, er);
+ }
+ }
+ };
+ var rmdirSync = (p, options, originalEr) => {
+ assert(p);
+ assert(options);
+ try {
+ options.rmdirSync(p);
+ } catch (er) {
+ if (er.code === "ENOENT")
+ return;
+ if (er.code === "ENOTDIR")
+ throw originalEr;
+ if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
+ rmkidsSync(p, options);
+ }
+ };
+ var rmkidsSync = (p, options) => {
+ assert(p);
+ assert(options);
+ options.readdirSync(p).forEach((f) => rimrafSync(path.join(p, f), options));
+ const retries = isWindows ? 100 : 1;
+ let i = 0;
+ do {
+ let threw = true;
+ try {
+ const ret = options.rmdirSync(p, options);
+ threw = false;
+ return ret;
+ } finally {
+ if (++i < retries && threw)
+ continue;
+ }
+ } while (true);
+ };
+ module2.exports = rimraf;
+ rimraf.sync = rimrafSync;
+ }
+});
+var require_del = __commonJS2({
+ "node_modules/flat-cache/src/del.js"(exports2, module2) {
+ var rimraf = require_rimraf().sync;
+ var fs = require("fs");
+ module2.exports = function del(file) {
+ if (fs.existsSync(file)) {
+ rimraf(file, {
+ glob: false
+ });
+ return true;
+ }
+ return false;
+ };
+ }
+});
+var require_cache = __commonJS2({
+ "node_modules/flat-cache/src/cache.js"(exports2, module2) {
+ var path = require("path");
+ var fs = require("fs");
+ var utils = require_utils6();
+ var del = require_del();
+ var writeJSON = utils.writeJSON;
+ var cache = {
+ load: function(docId, cacheDir) {
+ var me = this;
+ me._visited = {};
+ me._persisted = {};
+ me._pathToFile = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, "../.cache/", docId);
+ if (fs.existsSync(me._pathToFile)) {
+ me._persisted = utils.tryParse(me._pathToFile, {});
+ }
+ },
+ loadFile: function(pathToFile) {
+ var me = this;
+ var dir = path.dirname(pathToFile);
+ var fName = path.basename(pathToFile);
+ me.load(fName, dir);
+ },
+ all: function() {
+ return this._persisted;
+ },
+ keys: function() {
+ return Object.keys(this._persisted);
+ },
+ setKey: function(key, value) {
+ this._visited[key] = true;
+ this._persisted[key] = value;
+ },
+ removeKey: function(key) {
+ delete this._visited[key];
+ delete this._persisted[key];
+ },
+ getKey: function(key) {
+ this._visited[key] = true;
+ return this._persisted[key];
+ },
+ _prune: function() {
+ var me = this;
+ var obj = {};
+ var keys = Object.keys(me._visited);
+ if (keys.length === 0) {
+ return;
+ }
+ keys.forEach(function(key) {
+ obj[key] = me._persisted[key];
+ });
+ me._visited = {};
+ me._persisted = obj;
+ },
+ save: function(noPrune) {
+ var me = this;
+ !noPrune && me._prune();
+ writeJSON(me._pathToFile, me._persisted);
+ },
+ removeCacheFile: function() {
+ return del(this._pathToFile);
+ },
+ destroy: function() {
+ var me = this;
+ me._visited = {};
+ me._persisted = {};
+ me.removeCacheFile();
+ }
+ };
+ module2.exports = {
+ load: function(docId, cacheDir) {
+ return this.create(docId, cacheDir);
+ },
+ create: function(docId, cacheDir) {
+ var obj = Object.create(cache);
+ obj.load(docId, cacheDir);
+ return obj;
+ },
+ createFromFile: function(filePath) {
+ var obj = Object.create(cache);
+ obj.loadFile(filePath);
+ return obj;
+ },
+ clearCacheById: function(docId, cacheDir) {
+ var filePath = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, "../.cache/", docId);
+ return del(filePath);
+ },
+ clearAll: function(cacheDir) {
+ var filePath = cacheDir ? path.resolve(cacheDir) : path.resolve(__dirname, "../.cache/");
+ return del(filePath);
+ }
+ };
+ }
+});
+var require_cache2 = __commonJS2({
+ "node_modules/file-entry-cache/cache.js"(exports2, module2) {
+ var path = require("path");
+ var crypto = require("crypto");
+ module2.exports = {
+ createFromFile: function(filePath, useChecksum) {
+ var fname = path.basename(filePath);
+ var dir = path.dirname(filePath);
+ return this.create(fname, dir, useChecksum);
+ },
+ create: function(cacheId, _path, useChecksum) {
+ var fs = require("fs");
+ var flatCache = require_cache();
+ var cache = flatCache.load(cacheId, _path);
+ var normalizedEntries = {};
+ var removeNotFoundFiles = function removeNotFoundFiles2() {
+ const cachedEntries = cache.keys();
+ cachedEntries.forEach(function remover(fPath) {
+ try {
+ fs.statSync(fPath);
+ } catch (err) {
+ if (err.code === "ENOENT") {
+ cache.removeKey(fPath);
+ }
+ }
+ });
+ };
+ removeNotFoundFiles();
+ return {
+ cache,
+ getHash: function(buffer) {
+ return crypto.createHash("md5").update(buffer).digest("hex");
+ },
+ hasFileChanged: function(file) {
+ return this.getFileDescriptor(file).changed;
+ },
+ analyzeFiles: function(files) {
+ var me = this;
+ files = files || [];
+ var res = {
+ changedFiles: [],
+ notFoundFiles: [],
+ notChangedFiles: []
+ };
+ me.normalizeEntries(files).forEach(function(entry) {
+ if (entry.changed) {
+ res.changedFiles.push(entry.key);
+ return;
+ }
+ if (entry.notFound) {
+ res.notFoundFiles.push(entry.key);
+ return;
+ }
+ res.notChangedFiles.push(entry.key);
+ });
+ return res;
+ },
+ getFileDescriptor: function(file) {
+ var fstat;
+ try {
+ fstat = fs.statSync(file);
+ } catch (ex) {
+ this.removeEntry(file);
+ return {
+ key: file,
+ notFound: true,
+ err: ex
+ };
+ }
+ if (useChecksum) {
+ return this._getFileDescriptorUsingChecksum(file);
+ }
+ return this._getFileDescriptorUsingMtimeAndSize(file, fstat);
+ },
+ _getFileDescriptorUsingMtimeAndSize: function(file, fstat) {
+ var meta = cache.getKey(file);
+ var cacheExists = !!meta;
+ var cSize = fstat.size;
+ var cTime = fstat.mtime.getTime();
+ var isDifferentDate;
+ var isDifferentSize;
+ if (!meta) {
+ meta = {
+ size: cSize,
+ mtime: cTime
+ };
+ } else {
+ isDifferentDate = cTime !== meta.mtime;
+ isDifferentSize = cSize !== meta.size;
+ }
+ var nEntry = normalizedEntries[file] = {
+ key: file,
+ changed: !cacheExists || isDifferentDate || isDifferentSize,
+ meta
+ };
+ return nEntry;
+ },
+ _getFileDescriptorUsingChecksum: function(file) {
+ var meta = cache.getKey(file);
+ var cacheExists = !!meta;
+ var contentBuffer;
+ try {
+ contentBuffer = fs.readFileSync(file);
+ } catch (ex) {
+ contentBuffer = "";
+ }
+ var isDifferent = true;
+ var hash = this.getHash(contentBuffer);
+ if (!meta) {
+ meta = {
+ hash
+ };
+ } else {
+ isDifferent = hash !== meta.hash;
+ }
+ var nEntry = normalizedEntries[file] = {
+ key: file,
+ changed: !cacheExists || isDifferent,
+ meta
+ };
+ return nEntry;
+ },
+ getUpdatedFiles: function(files) {
+ var me = this;
+ files = files || [];
+ return me.normalizeEntries(files).filter(function(entry) {
+ return entry.changed;
+ }).map(function(entry) {
+ return entry.key;
+ });
+ },
+ normalizeEntries: function(files) {
+ files = files || [];
+ var me = this;
+ var nEntries = files.map(function(file) {
+ return me.getFileDescriptor(file);
+ });
+ return nEntries;
+ },
+ removeEntry: function(entryName) {
+ delete normalizedEntries[entryName];
+ cache.removeKey(entryName);
+ },
+ deleteCacheFile: function() {
+ cache.removeCacheFile();
+ },
+ destroy: function() {
+ normalizedEntries = {};
+ cache.destroy();
+ },
+ _getMetaForFileUsingCheckSum: function(cacheEntry) {
+ var contentBuffer = fs.readFileSync(cacheEntry.key);
+ var hash = this.getHash(contentBuffer);
+ var meta = Object.assign(cacheEntry.meta, {
+ hash
+ });
+ delete meta.size;
+ delete meta.mtime;
+ return meta;
+ },
+ _getMetaForFileUsingMtimeAndSize: function(cacheEntry) {
+ var stat = fs.statSync(cacheEntry.key);
+ var meta = Object.assign(cacheEntry.meta, {
+ size: stat.size,
+ mtime: stat.mtime.getTime()
+ });
+ delete meta.hash;
+ return meta;
+ },
+ reconcile: function(noPrune) {
+ removeNotFoundFiles();
+ noPrune = typeof noPrune === "undefined" ? true : noPrune;
+ var entries = normalizedEntries;
+ var keys = Object.keys(entries);
+ if (keys.length === 0) {
+ return;
+ }
+ var me = this;
+ keys.forEach(function(entryName) {
+ var cacheEntry = entries[entryName];
+ try {
+ var meta = useChecksum ? me._getMetaForFileUsingCheckSum(cacheEntry) : me._getMetaForFileUsingMtimeAndSize(cacheEntry);
+ cache.setKey(entryName, meta);
+ } catch (err) {
+ if (err.code !== "ENOENT") {
+ throw err;
+ }
+ }
+ });
+ cache.save(noPrune);
+ }
+ };
+ }
+ };
+ }
+});
+var require_format_results_cache = __commonJS2({
+ "src/cli/format-results-cache.js"(exports2, module2) {
+ "use strict";
+ var fileEntryCache = require_cache2();
+ var stringify2 = require_fast_json_stable_stringify();
+ var {
+ version: prettierVersion
+ } = require("./index.js");
+ var {
+ createHash
+ } = require_utils();
+ var optionsHashCache = /* @__PURE__ */ new WeakMap();
+ var nodeVersion = process && process.version;
+ function getHashOfOptions(options) {
+ if (optionsHashCache.has(options)) {
+ return optionsHashCache.get(options);
+ }
+ const hash = createHash(`${prettierVersion}_${nodeVersion}_${stringify2(options)}`);
+ optionsHashCache.set(options, hash);
+ return hash;
+ }
+ function getMetadataFromFileDescriptor(fileDescriptor) {
+ return fileDescriptor.meta;
+ }
+ var FormatResultsCache = class {
+ constructor(cacheFileLocation, cacheStrategy) {
+ const useChecksum = cacheStrategy === "content";
+ this.cacheFileLocation = cacheFileLocation;
+ this.fileEntryCache = fileEntryCache.create(cacheFileLocation, void 0, useChecksum);
+ }
+ existsAvailableFormatResultsCache(filePath, options) {
+ const fileDescriptor = this.fileEntryCache.getFileDescriptor(filePath);
+ if (fileDescriptor.notFound) {
+ return false;
+ }
+ const hashOfOptions = getHashOfOptions(options);
+ const meta = getMetadataFromFileDescriptor(fileDescriptor);
+ const changed = fileDescriptor.changed || meta.hashOfOptions !== hashOfOptions;
+ return !changed;
+ }
+ setFormatResultsCache(filePath, options) {
+ const fileDescriptor = this.fileEntryCache.getFileDescriptor(filePath);
+ const meta = getMetadataFromFileDescriptor(fileDescriptor);
+ if (fileDescriptor && !fileDescriptor.notFound) {
+ meta.hashOfOptions = getHashOfOptions(options);
+ }
+ }
+ removeFormatResultsCache(filePath) {
+ this.fileEntryCache.removeEntry(filePath);
+ }
+ reconcile() {
+ this.fileEntryCache.reconcile();
+ }
+ };
+ module2.exports = FormatResultsCache;
+ }
+});
+var require_base = __commonJS2({
+ "node_modules/diff/lib/diff/base.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2["default"] = Diff;
+ function Diff() {
+ }
+ Diff.prototype = {
+ diff: function diff(oldString, newString) {
+ var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
+ var callback = options.callback;
+ if (typeof options === "function") {
+ callback = options;
+ options = {};
+ }
+ this.options = options;
+ var self2 = this;
+ function done(value) {
+ if (callback) {
+ setTimeout(function() {
+ callback(void 0, value);
+ }, 0);
+ return true;
+ } else {
+ return value;
+ }
+ }
+ oldString = this.castInput(oldString);
+ newString = this.castInput(newString);
+ oldString = this.removeEmpty(this.tokenize(oldString));
+ newString = this.removeEmpty(this.tokenize(newString));
+ var newLen = newString.length, oldLen = oldString.length;
+ var editLength = 1;
+ var maxEditLength = newLen + oldLen;
+ var bestPath = [{
+ newPos: -1,
+ components: []
+ }];
+ var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
+ if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
+ return done([{
+ value: this.join(newString),
+ count: newString.length
+ }]);
+ }
+ function execEditLength() {
+ for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
+ var basePath = void 0;
+ var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
+ if (addPath) {
+ bestPath[diagonalPath - 1] = void 0;
+ }
+ var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
+ if (!canAdd && !canRemove) {
+ bestPath[diagonalPath] = void 0;
+ continue;
+ }
+ if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
+ basePath = clonePath(removePath);
+ self2.pushComponent(basePath.components, void 0, true);
+ } else {
+ basePath = addPath;
+ basePath.newPos++;
+ self2.pushComponent(basePath.components, true, void 0);
+ }
+ _oldPos = self2.extractCommon(basePath, newString, oldString, diagonalPath);
+ if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
+ return done(buildValues(self2, basePath.components, newString, oldString, self2.useLongestToken));
+ } else {
+ bestPath[diagonalPath] = basePath;
+ }
+ }
+ editLength++;
+ }
+ if (callback) {
+ (function exec() {
+ setTimeout(function() {
+ if (editLength > maxEditLength) {
+ return callback();
+ }
+ if (!execEditLength()) {
+ exec();
+ }
+ }, 0);
+ })();
+ } else {
+ while (editLength <= maxEditLength) {
+ var ret = execEditLength();
+ if (ret) {
+ return ret;
+ }
+ }
+ }
+ },
+ pushComponent: function pushComponent(components, added, removed) {
+ var last = components[components.length - 1];
+ if (last && last.added === added && last.removed === removed) {
+ components[components.length - 1] = {
+ count: last.count + 1,
+ added,
+ removed
+ };
+ } else {
+ components.push({
+ count: 1,
+ added,
+ removed
+ });
+ }
+ },
+ extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
+ var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0;
+ while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
+ newPos++;
+ oldPos++;
+ commonCount++;
+ }
+ if (commonCount) {
+ basePath.components.push({
+ count: commonCount
+ });
+ }
+ basePath.newPos = newPos;
+ return oldPos;
+ },
+ equals: function equals(left, right) {
+ if (this.options.comparator) {
+ return this.options.comparator(left, right);
+ } else {
+ return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
+ }
+ },
+ removeEmpty: function removeEmpty(array2) {
+ var ret = [];
+ for (var i = 0; i < array2.length; i++) {
+ if (array2[i]) {
+ ret.push(array2[i]);
+ }
+ }
+ return ret;
+ },
+ castInput: function castInput(value) {
+ return value;
+ },
+ tokenize: function tokenize(value) {
+ return value.split("");
+ },
+ join: function join(chars) {
+ return chars.join("");
+ }
+ };
+ function buildValues(diff, components, newString, oldString, useLongestToken) {
+ var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0;
+ for (; componentPos < componentLen; componentPos++) {
+ var component = components[componentPos];
+ if (!component.removed) {
+ if (!component.added && useLongestToken) {
+ var value = newString.slice(newPos, newPos + component.count);
+ value = value.map(function(value2, i) {
+ var oldValue = oldString[oldPos + i];
+ return oldValue.length > value2.length ? oldValue : value2;
+ });
+ component.value = diff.join(value);
+ } else {
+ component.value = diff.join(newString.slice(newPos, newPos + component.count));
+ }
+ newPos += component.count;
+ if (!component.added) {
+ oldPos += component.count;
+ }
+ } else {
+ component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
+ oldPos += component.count;
+ if (componentPos && components[componentPos - 1].added) {
+ var tmp = components[componentPos - 1];
+ components[componentPos - 1] = components[componentPos];
+ components[componentPos] = tmp;
+ }
+ }
+ }
+ var lastComponent = components[componentLen - 1];
+ if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff.equals("", lastComponent.value)) {
+ components[componentLen - 2].value += lastComponent.value;
+ components.pop();
+ }
+ return components;
+ }
+ function clonePath(path) {
+ return {
+ newPos: path.newPos,
+ components: path.components.slice(0)
+ };
+ }
+ }
+});
+var require_params = __commonJS2({
+ "node_modules/diff/lib/util/params.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.generateOptions = generateOptions;
+ function generateOptions(options, defaults) {
+ if (typeof options === "function") {
+ defaults.callback = options;
+ } else if (options) {
+ for (var name in options) {
+ if (options.hasOwnProperty(name)) {
+ defaults[name] = options[name];
+ }
+ }
+ }
+ return defaults;
+ }
+ }
+});
+var require_line = __commonJS2({
+ "node_modules/diff/lib/diff/line.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.diffLines = diffLines;
+ exports2.diffTrimmedLines = diffTrimmedLines;
+ exports2.lineDiff = void 0;
+ var _base = _interopRequireDefault(require_base());
+ var _params = require_params();
+ function _interopRequireDefault(obj) {
+ return obj && obj.__esModule ? obj : {
+ "default": obj
+ };
+ }
+ var lineDiff = new _base["default"]();
+ exports2.lineDiff = lineDiff;
+ lineDiff.tokenize = function(value) {
+ var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/);
+ if (!linesAndNewlines[linesAndNewlines.length - 1]) {
+ linesAndNewlines.pop();
+ }
+ for (var i = 0; i < linesAndNewlines.length; i++) {
+ var line = linesAndNewlines[i];
+ if (i % 2 && !this.options.newlineIsToken) {
+ retLines[retLines.length - 1] += line;
+ } else {
+ if (this.options.ignoreWhitespace) {
+ line = line.trim();
+ }
+ retLines.push(line);
+ }
+ }
+ return retLines;
+ };
+ function diffLines(oldStr, newStr, callback) {
+ return lineDiff.diff(oldStr, newStr, callback);
+ }
+ function diffTrimmedLines(oldStr, newStr, callback) {
+ var options = (0, _params.generateOptions)(callback, {
+ ignoreWhitespace: true
+ });
+ return lineDiff.diff(oldStr, newStr, options);
+ }
+ }
+});
+var require_create = __commonJS2({
+ "node_modules/diff/lib/patch/create.js"(exports2) {
+ "use strict";
+ Object.defineProperty(exports2, "__esModule", {
+ value: true
+ });
+ exports2.structuredPatch = structuredPatch;
+ exports2.formatPatch = formatPatch;
+ exports2.createTwoFilesPatch = createTwoFilesPatch;
+ exports2.createPatch = createPatch;
+ var _line = require_line();
+ function _toConsumableArray(arr) {
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
+ }
+ function _nonIterableSpread() {
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+ function _unsupportedIterableToArray(o, minLen) {
+ if (!o)
+ return;
+ if (typeof o === "string")
+ return _arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor)
+ n = o.constructor.name;
+ if (n === "Map" || n === "Set")
+ return Array.from(o);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
+ return _arrayLikeToArray(o, minLen);
+ }
+ function _iterableToArray(iter) {
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter))
+ return Array.from(iter);
+ }
+ function _arrayWithoutHoles(arr) {
+ if (Array.isArray(arr))
+ return _arrayLikeToArray(arr);
+ }
+ function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length)
+ len = arr.length;
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
+ arr2[i] = arr[i];
+ }
+ return arr2;
+ }
+ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
+ if (!options) {
+ options = {};
+ }
+ if (typeof options.context === "undefined") {
+ options.context = 4;
+ }
+ var diff = (0, _line.diffLines)(oldStr, newStr, options);
+ diff.push({
+ value: "",
+ lines: []
+ });
+ function contextLines(lines) {
+ return lines.map(function(entry) {
+ return " " + entry;
+ });
+ }
+ var hunks = [];
+ var oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1;
+ var _loop = function _loop2(i2) {
+ var current = diff[i2], lines = current.lines || current.value.replace(/\n$/, "").split("\n");
+ current.lines = lines;
+ if (current.added || current.removed) {
+ var _curRange;
+ if (!oldRangeStart) {
+ var prev = diff[i2 - 1];
+ oldRangeStart = oldLine;
+ newRangeStart = newLine;
+ if (prev) {
+ curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
+ oldRangeStart -= curRange.length;
+ newRangeStart -= curRange.length;
+ }
+ }
+ (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function(entry) {
+ return (current.added ? "+" : "-") + entry;
+ })));
+ if (current.added) {
+ newLine += lines.length;
+ } else {
+ oldLine += lines.length;
+ }
+ } else {
+ if (oldRangeStart) {
+ if (lines.length <= options.context * 2 && i2 < diff.length - 2) {
+ var _curRange2;
+ (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
+ } else {
+ var _curRange3;
+ var contextSize = Math.min(lines.length, options.context);
+ (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
+ var hunk = {
+ oldStart: oldRangeStart,
+ oldLines: oldLine - oldRangeStart + contextSize,
+ newStart: newRangeStart,
+ newLines: newLine - newRangeStart + contextSize,
+ lines: curRange
+ };
+ if (i2 >= diff.length - 2 && lines.length <= options.context) {
+ var oldEOFNewline = /\n$/.test(oldStr);
+ var newEOFNewline = /\n$/.test(newStr);
+ var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
+ if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
+ curRange.splice(hunk.oldLines, 0, "\\ No newline at end of file");
+ }
+ if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
+ curRange.push("\\ No newline at end of file");
+ }
+ }
+ hunks.push(hunk);
+ oldRangeStart = 0;
+ newRangeStart = 0;
+ curRange = [];
+ }
+ }
+ oldLine += lines.length;
+ newLine += lines.length;
+ }
+ };
+ for (var i = 0; i < diff.length; i++) {
+ _loop(i);
+ }
+ return {
+ oldFileName,
+ newFileName,
+ oldHeader,
+ newHeader,
+ hunks
+ };
+ }
+ function formatPatch(diff) {
+ var ret = [];
+ if (diff.oldFileName == diff.newFileName) {
+ ret.push("Index: " + diff.oldFileName);
+ }
+ ret.push("===================================================================");
+ ret.push("--- " + diff.oldFileName + (typeof diff.oldHeader === "undefined" ? "" : " " + diff.oldHeader));
+ ret.push("+++ " + diff.newFileName + (typeof diff.newHeader === "undefined" ? "" : " " + diff.newHeader));
+ for (var i = 0; i < diff.hunks.length; i++) {
+ var hunk = diff.hunks[i];
+ if (hunk.oldLines === 0) {
+ hunk.oldStart -= 1;
+ }
+ if (hunk.newLines === 0) {
+ hunk.newStart -= 1;
+ }
+ ret.push("@@ -" + hunk.oldStart + "," + hunk.oldLines + " +" + hunk.newStart + "," + hunk.newLines + " @@");
+ ret.push.apply(ret, hunk.lines);
+ }
+ return ret.join("\n") + "\n";
+ }
+ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
+ return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
+ }
+ function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
+ return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
+ }
+ }
+});
+var require_format = __commonJS2({
+ "src/cli/format.js"(exports2, module2) {
+ "use strict";
+ var {
+ promises: fs
+ } = require("fs");
+ var path = require("path");
+ var {
+ default: chalk2
+ } = (init_source(), __toCommonJS(source_exports));
+ var prettier2 = require("./index.js");
+ var {
+ getStdin
+ } = require("./third-party.js");
+ var {
+ createIgnorer,
+ errors
+ } = require_prettier_internal();
+ var {
+ expandPatterns,
+ fixWindowsSlashes
+ } = require_expand_patterns();
+ var getOptionsForFile = require_get_options_for_file();
+ var isTTY = require_is_tty();
+ var findCacheFile = require_find_cache_file();
+ var FormatResultsCache = require_format_results_cache();
+ var {
+ statSafe
+ } = require_utils();
+ function diff(a, b) {
+ return require_create().createTwoFilesPatch("", "", a, b, "", "", {
+ context: 2
+ });
+ }
+ function handleError(context, filename, error, printedFilename) {
+ if (error instanceof errors.UndefinedParserError) {
+ if ((context.argv.write || context.argv.ignoreUnknown) && printedFilename) {
+ printedFilename.clear();
+ }
+ if (context.argv.ignoreUnknown) {
+ return;
+ }
+ if (!context.argv.check && !context.argv.listDifferent) {
+ process.exitCode = 2;
+ }
+ context.logger.error(error.message);
+ return;
+ }
+ if (context.argv.write) {
+ process.stdout.write("\n");
+ }
+ const isParseError = Boolean(error && error.loc);
+ const isValidationError = /^Invalid \S+ value\./.test(error && error.message);
+ if (isParseError) {
+ context.logger.error(`${filename}: ${String(error)}`);
+ } else if (isValidationError || error instanceof errors.ConfigError) {
+ context.logger.error(error.message);
+ process.exit(1);
+ } else if (error instanceof errors.DebugError) {
+ context.logger.error(`${filename}: ${error.message}`);
+ } else {
+ context.logger.error(filename + ": " + (error.stack || error));
+ }
+ process.exitCode = 2;
+ }
+ function writeOutput(context, result, options) {
+ process.stdout.write(context.argv.debugCheck ? result.filepath : result.formatted);
+ if (options && options.cursorOffset >= 0) {
+ process.stderr.write(result.cursorOffset + "\n");
+ }
+ }
+ function listDifferent(context, input, options, filename) {
+ if (!context.argv.check && !context.argv.listDifferent) {
+ return;
+ }
+ try {
+ if (!options.filepath && !options.parser) {
+ throw new errors.UndefinedParserError("No parser and no file path given, couldn't infer a parser.");
+ }
+ if (!prettier2.check(input, options)) {
+ if (!context.argv.write) {
+ context.logger.log(filename);
+ process.exitCode = 1;
+ }
+ }
+ } catch (error) {
+ context.logger.error(error.message);
+ }
+ return true;
+ }
+ function format(context, input, opt) {
+ if (!opt.parser && !opt.filepath) {
+ throw new errors.UndefinedParserError("No parser and no file path given, couldn't infer a parser.");
+ }
+ if (context.argv.debugPrintDoc) {
+ const doc = prettier2.__debug.printToDoc(input, opt);
+ return {
+ formatted: prettier2.__debug.formatDoc(doc) + "\n"
+ };
+ }
+ if (context.argv.debugPrintComments) {
+ return {
+ formatted: prettier2.format(JSON.stringify(prettier2.formatWithCursor(input, opt).comments || []), {
+ parser: "json"
+ })
+ };
+ }
+ if (context.argv.debugPrintAst) {
+ const {
+ ast
+ } = prettier2.__debug.parse(input, opt);
+ return {
+ formatted: JSON.stringify(ast)
+ };
+ }
+ if (context.argv.debugCheck) {
+ const pp = prettier2.format(input, opt);
+ const pppp = prettier2.format(pp, opt);
+ if (pp !== pppp) {
+ throw new errors.DebugError("prettier(input) !== prettier(prettier(input))\n" + diff(pp, pppp));
+ } else {
+ const stringify2 = (obj) => JSON.stringify(obj, null, 2);
+ const ast = stringify2(prettier2.__debug.parse(input, opt, true).ast);
+ const past = stringify2(prettier2.__debug.parse(pp, opt, true).ast);
+ if (ast !== past) {
+ const MAX_AST_SIZE = 2097152;
+ const astDiff = ast.length > MAX_AST_SIZE || past.length > MAX_AST_SIZE ? "AST diff too large to render" : diff(ast, past);
+ throw new errors.DebugError("ast(input) !== ast(prettier(input))\n" + astDiff + "\n" + diff(input, pp));
+ }
+ }
+ return {
+ formatted: pp,
+ filepath: opt.filepath || "(stdin)\n"
+ };
+ }
+ const {
+ performanceTestFlag
+ } = context;
+ if (performanceTestFlag !== null && performanceTestFlag !== void 0 && performanceTestFlag.debugBenchmark) {
+ let benchmark;
+ try {
+ benchmark = require("benchmark");
+ } catch {
+ context.logger.debug("'--debug-benchmark' requires the 'benchmark' package to be installed.");
+ process.exit(2);
+ }
+ context.logger.debug("'--debug-benchmark' option found, measuring formatWithCursor with 'benchmark' module.");
+ const suite = new benchmark.Suite();
+ suite.add("format", () => {
+ prettier2.formatWithCursor(input, opt);
+ }).on("cycle", (event) => {
+ const results = {
+ benchmark: String(event.target),
+ hz: event.target.hz,
+ ms: event.target.times.cycle * 1e3
+ };
+ context.logger.debug("'--debug-benchmark' measurements for formatWithCursor: " + JSON.stringify(results, null, 2));
+ }).run({
+ async: false
+ });
+ } else if (performanceTestFlag !== null && performanceTestFlag !== void 0 && performanceTestFlag.debugRepeat) {
+ const repeat = context.argv.debugRepeat;
+ context.logger.debug("'--debug-repeat' option found, running formatWithCursor " + repeat + " times.");
+ let totalMs = 0;
+ for (let i = 0; i < repeat; ++i) {
+ const startMs = Date.now();
+ prettier2.formatWithCursor(input, opt);
+ totalMs += Date.now() - startMs;
+ }
+ const averageMs = totalMs / repeat;
+ const results = {
+ repeat,
+ hz: 1e3 / averageMs,
+ ms: averageMs
+ };
+ context.logger.debug("'--debug-repeat' measurements for formatWithCursor: " + JSON.stringify(results, null, 2));
+ }
+ return prettier2.formatWithCursor(input, opt);
+ }
+ async function createIgnorerFromContextOrDie(context) {
+ try {
+ return await createIgnorer(context.argv.ignorePath, context.argv.withNodeModules);
+ } catch (e) {
+ context.logger.error(e.message);
+ process.exit(2);
+ }
+ }
+ async function formatStdin2(context) {
+ const filepath = context.argv.filepath ? path.resolve(process.cwd(), context.argv.filepath) : process.cwd();
+ const ignorer = await createIgnorerFromContextOrDie(context);
+ const relativeFilepath = context.argv.ignorePath ? path.relative(path.dirname(context.argv.ignorePath), filepath) : path.relative(process.cwd(), filepath);
+ try {
+ const input = await getStdin();
+ if (relativeFilepath && ignorer.ignores(fixWindowsSlashes(relativeFilepath))) {
+ writeOutput(context, {
+ formatted: input
+ });
+ return;
+ }
+ const options = await getOptionsForFile(context, filepath);
+ if (listDifferent(context, input, options, "(stdin)")) {
+ return;
+ }
+ const formatted = format(context, input, options);
+ const {
+ performanceTestFlag
+ } = context;
+ if (performanceTestFlag) {
+ context.logger.log(`'${performanceTestFlag.name}' option found, skipped print code to screen.`);
+ return;
+ }
+ writeOutput(context, formatted, options);
+ } catch (error) {
+ handleError(context, relativeFilepath || "stdin", error);
+ }
+ }
+ async function formatFiles2(context) {
+ var _formatResultsCache4;
+ const ignorer = await createIgnorerFromContextOrDie(context);
+ let numberOfUnformattedFilesFound = 0;
+ const {
+ performanceTestFlag
+ } = context;
+ if (context.argv.check && !performanceTestFlag) {
+ context.logger.log("Checking formatting...");
+ }
+ let formatResultsCache;
+ const cacheFilePath = await findCacheFile(context.argv.cacheLocation);
+ if (context.argv.cache) {
+ formatResultsCache = new FormatResultsCache(cacheFilePath, context.argv.cacheStrategy || "content");
+ } else {
+ if (context.argv.cacheStrategy) {
+ context.logger.error("`--cache-strategy` cannot be used without `--cache`.");
+ process.exit(2);
+ }
+ if (!context.argv.cacheLocation) {
+ const stat = await statSafe(cacheFilePath);
+ if (stat) {
+ await fs.unlink(cacheFilePath);
+ }
+ }
+ }
+ for await (const pathOrError of expandPatterns(context)) {
+ var _formatResultsCache;
+ if (typeof pathOrError === "object") {
+ context.logger.error(pathOrError.error);
+ process.exitCode = 2;
+ continue;
+ }
+ const filename = pathOrError;
+ const ignoreFilename = context.argv.ignorePath ? path.relative(path.dirname(context.argv.ignorePath), filename) : filename;
+ const fileIgnored = ignorer.ignores(fixWindowsSlashes(ignoreFilename));
+ if (fileIgnored && (context.argv.debugCheck || context.argv.write || context.argv.check || context.argv.listDifferent)) {
+ continue;
+ }
+ const options = Object.assign(Object.assign({}, await getOptionsForFile(context, filename)), {}, {
+ filepath: filename
+ });
+ let printedFilename;
+ if (isTTY()) {
+ printedFilename = context.logger.log(filename, {
+ newline: false,
+ clearable: true
+ });
+ }
+ let input;
+ try {
+ input = await fs.readFile(filename, "utf8");
+ } catch (error) {
+ context.logger.log("");
+ context.logger.error(`Unable to read file: ${filename}
+${error.message}`);
+ process.exitCode = 2;
+ continue;
+ }
+ if (fileIgnored) {
+ writeOutput(context, {
+ formatted: input
+ }, options);
+ continue;
+ }
+ const start = Date.now();
+ const isCacheExists = (_formatResultsCache = formatResultsCache) === null || _formatResultsCache === void 0 ? void 0 : _formatResultsCache.existsAvailableFormatResultsCache(filename, options);
+ let result;
+ let output;
+ try {
+ if (isCacheExists) {
+ result = {
+ formatted: input
+ };
+ } else {
+ result = format(context, input, options);
+ }
+ output = result.formatted;
+ } catch (error) {
+ handleError(context, filename, error, printedFilename);
+ continue;
+ }
+ const isDifferent = output !== input;
+ let shouldSetCache = !isDifferent;
+ if (printedFilename) {
+ printedFilename.clear();
+ }
+ if (performanceTestFlag) {
+ context.logger.log(`'${performanceTestFlag.name}' option found, skipped print code or write files.`);
+ return;
+ }
+ if (context.argv.write) {
+ if (isDifferent) {
+ if (!context.argv.check && !context.argv.listDifferent) {
+ context.logger.log(`${filename} ${Date.now() - start}ms`);
+ }
+ try {
+ await fs.writeFile(filename, output, "utf8");
+ shouldSetCache = true;
+ } catch (error) {
+ context.logger.error(`Unable to write file: ${filename}
+${error.message}`);
+ process.exitCode = 2;
+ }
+ } else if (!context.argv.check && !context.argv.listDifferent) {
+ const message = `${chalk2.grey(filename)} ${Date.now() - start}ms`;
+ if (isCacheExists) {
+ context.logger.log(`${message} (cached)`);
+ } else {
+ context.logger.log(message);
+ }
+ }
+ } else if (context.argv.debugCheck) {
+ if (result.filepath) {
+ context.logger.log(result.filepath);
+ } else {
+ process.exitCode = 2;
+ }
+ } else if (!context.argv.check && !context.argv.listDifferent) {
+ writeOutput(context, result, options);
+ }
+ if (shouldSetCache) {
+ var _formatResultsCache2;
+ (_formatResultsCache2 = formatResultsCache) === null || _formatResultsCache2 === void 0 ? void 0 : _formatResultsCache2.setFormatResultsCache(filename, options);
+ } else {
+ var _formatResultsCache3;
+ (_formatResultsCache3 = formatResultsCache) === null || _formatResultsCache3 === void 0 ? void 0 : _formatResultsCache3.removeFormatResultsCache(filename);
+ }
+ if (isDifferent) {
+ if (context.argv.check) {
+ context.logger.warn(filename);
+ } else if (context.argv.listDifferent) {
+ context.logger.log(filename);
+ }
+ numberOfUnformattedFilesFound += 1;
+ }
+ }
+ (_formatResultsCache4 = formatResultsCache) === null || _formatResultsCache4 === void 0 ? void 0 : _formatResultsCache4.reconcile();
+ if (context.argv.check) {
+ if (numberOfUnformattedFilesFound === 0) {
+ context.logger.log("All matched files use Prettier code style!");
+ } else if (numberOfUnformattedFilesFound === 1) {
+ 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?");
+ } else {
+ context.logger.warn(context.argv.write ? "Code style issues found in " + numberOfUnformattedFilesFound + " files." : "Code style issues found in " + numberOfUnformattedFilesFound + " files. Forgot to run Prettier?");
+ }
+ }
+ if ((context.argv.check || context.argv.listDifferent) && numberOfUnformattedFilesFound > 0 && !process.exitCode && !context.argv.write) {
+ process.exitCode = 1;
+ }
+ }
+ module2.exports = {
+ formatStdin: formatStdin2,
+ formatFiles: formatFiles2
+ };
+ }
+});
+var require_file_info = __commonJS2({
+ "src/cli/file-info.js"(exports2, module2) {
+ "use strict";
+ var stringify2 = require_fast_json_stable_stringify();
+ var prettier2 = require("./index.js");
+ var {
+ printToScreen: printToScreen2
+ } = require_utils();
+ async function logFileInfoOrDie2(context) {
+ const {
+ fileInfo: file,
+ ignorePath,
+ withNodeModules,
+ plugins,
+ pluginSearchDirs,
+ config
+ } = context.argv;
+ const fileInfo = await prettier2.getFileInfo(file, {
+ ignorePath,
+ withNodeModules,
+ plugins,
+ pluginSearchDirs,
+ resolveConfig: config !== false
+ });
+ printToScreen2(prettier2.format(stringify2(fileInfo), {
+ parser: "json"
+ }));
+ }
+ module2.exports = logFileInfoOrDie2;
+ }
+});
+var require_find_config_path = __commonJS2({
+ "src/cli/find-config-path.js"(exports2, module2) {
+ "use strict";
+ var path = require("path");
+ var prettier2 = require("./index.js");
+ var {
+ printToScreen: printToScreen2
+ } = require_utils();
+ async function logResolvedConfigPathOrDie2(context) {
+ const file = context.argv.findConfigPath;
+ const configFile = await prettier2.resolveConfigFile(file);
+ if (configFile) {
+ printToScreen2(path.relative(process.cwd(), configFile));
+ } else {
+ throw new Error(`Can not find configure file for "${file}"`);
+ }
+ }
+ module2.exports = logResolvedConfigPathOrDie2;
+ }
+});
+var stringify = require_fast_json_stable_stringify();
+var prettier = require("./index.js");
+var createLogger = require_logger();
+var Context = require_context();
+var {
+ parseArgvWithoutPlugins
+} = require_parse_cli_arguments();
+var {
+ createDetailedUsage,
+ createUsage
+} = require_usage();
+var {
+ formatStdin,
+ formatFiles
+} = require_format();
+var logFileInfoOrDie = require_file_info();
+var logResolvedConfigPathOrDie = require_find_config_path();
+var {
+ utils: {
+ isNonEmptyArray
+ }
+} = require_prettier_internal();
+var {
+ printToScreen
+} = require_utils();
+async function run(rawArguments) {
+ let logger = createLogger();
+ try {
+ const logLevel = parseArgvWithoutPlugins(rawArguments, logger, "loglevel").loglevel;
+ if (logLevel !== logger.logLevel) {
+ logger = createLogger(logLevel);
+ }
+ const context = new Context({
+ rawArguments,
+ logger
+ });
+ if (logger.logLevel !== "debug" && context.performanceTestFlag) {
+ context.logger = createLogger("debug");
+ }
+ await main(context);
+ } catch (error) {
+ logger.error(error.message);
+ process.exitCode = 1;
+ }
+}
+async function main(context) {
+ context.logger.debug(`normalized argv: ${JSON.stringify(context.argv)}`);
+ if (context.argv.pluginSearch === false) {
+ const rawPluginSearchDirs = context.argv.__raw["plugin-search-dir"];
+ if (typeof rawPluginSearchDirs === "string" || isNonEmptyArray(rawPluginSearchDirs)) {
+ throw new Error("Cannot use --no-plugin-search and --plugin-search-dir together.");
+ }
+ }
+ if (context.argv.check && context.argv.listDifferent) {
+ throw new Error("Cannot use --check and --list-different together.");
+ }
+ if (context.argv.write && context.argv.debugCheck) {
+ throw new Error("Cannot use --write and --debug-check together.");
+ }
+ if (context.argv.findConfigPath && context.filePatterns.length > 0) {
+ throw new Error("Cannot use --find-config-path with multiple files");
+ }
+ if (context.argv.fileInfo && context.filePatterns.length > 0) {
+ throw new Error("Cannot use --file-info with multiple files");
+ }
+ if (context.argv.version) {
+ printToScreen(prettier.version);
+ return;
+ }
+ if (context.argv.help !== void 0) {
+ printToScreen(typeof context.argv.help === "string" && context.argv.help !== "" ? createDetailedUsage(context, context.argv.help) : createUsage(context));
+ return;
+ }
+ if (context.argv.supportInfo) {
+ printToScreen(prettier.format(stringify(prettier.getSupportInfo()), {
+ parser: "json"
+ }));
+ return;
+ }
+ const hasFilePatterns = context.filePatterns.length > 0;
+ const useStdin = !hasFilePatterns && (!process.stdin.isTTY || context.argv.filePath);
+ if (context.argv.findConfigPath) {
+ await logResolvedConfigPathOrDie(context);
+ } else if (context.argv.fileInfo) {
+ await logFileInfoOrDie(context);
+ } else if (useStdin) {
+ if (context.argv.cache) {
+ context.logger.error("`--cache` cannot be used with stdin.");
+ process.exit(2);
+ }
+ await formatStdin(context);
+ } else if (hasFilePatterns) {
+ await formatFiles(context);
+ } else {
+ process.exitCode = 1;
+ printToScreen(createUsage(context));
+ }
+}
+module.exports = {
+ run
+};
diff --git a/node_modules/prettier/doc.js b/node_modules/prettier/doc.js
new file mode 100644
index 0000000..c80ecd4
--- /dev/null
+++ b/node_modules/prettier/doc.js
@@ -0,0 +1,1473 @@
+(function (factory) {
+ if (typeof exports === "object" && typeof module === "object") {
+ module.exports = factory();
+ } else if (typeof define === "function" && define.amd) {
+ define(factory);
+ } else {
+ var root =
+ typeof globalThis !== "undefined"
+ ? globalThis
+ : typeof global !== "undefined"
+ ? global
+ : typeof self !== "undefined"
+ ? self
+ : this || {};
+ root.doc = factory();
+ }
+})(function() {
+ "use strict";
+ var __getOwnPropNames = Object.getOwnPropertyNames;
+ var __commonJS = (cb, mod) => function __require() {
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+ };
+
+ // dist/_doc.js.umd.js
+ var require_doc_js_umd = __commonJS({
+ "dist/_doc.js.umd.js"(exports, module) {
+ var __create = Object.create;
+ var __defProp = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __getProtoOf = Object.getPrototypeOf;
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
+ var __esm = (fn, res) => function __init() {
+ return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
+ };
+ var __commonJS2 = (cb, mod) => function __require() {
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = {
+ exports: {}
+ }).exports, mod), mod.exports;
+ };
+ var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, {
+ get: all[name],
+ enumerable: true
+ });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, {
+ get: () => from[key],
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
+ });
+ }
+ return to;
+ };
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
+ value: mod,
+ enumerable: true
+ }) : target, mod));
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
+ value: true
+ }), mod);
+ var init_define_process = __esm({
+ ""() {
+ }
+ });
+ var require_doc_builders = __commonJS2({
+ "src/document/doc-builders.js"(exports2, module2) {
+ "use strict";
+ init_define_process();
+ function concat(parts) {
+ if (false) {
+ for (const part of parts) {
+ assertDoc(part);
+ }
+ }
+ return {
+ type: "concat",
+ parts
+ };
+ }
+ function indent(contents) {
+ if (false) {
+ assertDoc(contents);
+ }
+ return {
+ type: "indent",
+ contents
+ };
+ }
+ function align(widthOrString, contents) {
+ if (false) {
+ assertDoc(contents);
+ }
+ return {
+ type: "align",
+ contents,
+ n: widthOrString
+ };
+ }
+ function group(contents) {
+ let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
+ if (false) {
+ assertDoc(contents);
+ }
+ return {
+ type: "group",
+ id: opts.id,
+ contents,
+ break: Boolean(opts.shouldBreak),
+ expandedStates: opts.expandedStates
+ };
+ }
+ function dedentToRoot(contents) {
+ return align(Number.NEGATIVE_INFINITY, contents);
+ }
+ function markAsRoot(contents) {
+ return align({
+ type: "root"
+ }, contents);
+ }
+ function dedent(contents) {
+ return align(-1, contents);
+ }
+ function conditionalGroup(states, opts) {
+ return group(states[0], Object.assign(Object.assign({}, opts), {}, {
+ expandedStates: states
+ }));
+ }
+ function fill(parts) {
+ if (false) {
+ for (const part of parts) {
+ assertDoc(part);
+ }
+ }
+ return {
+ type: "fill",
+ parts
+ };
+ }
+ function ifBreak(breakContents, flatContents) {
+ let opts = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
+ if (false) {
+ if (breakContents) {
+ assertDoc(breakContents);
+ }
+ if (flatContents) {
+ assertDoc(flatContents);
+ }
+ }
+ return {
+ type: "if-break",
+ breakContents,
+ flatContents,
+ groupId: opts.groupId
+ };
+ }
+ function indentIfBreak(contents, opts) {
+ return {
+ type: "indent-if-break",
+ contents,
+ groupId: opts.groupId,
+ negate: opts.negate
+ };
+ }
+ function lineSuffix(contents) {
+ if (false) {
+ assertDoc(contents);
+ }
+ return {
+ type: "line-suffix",
+ contents
+ };
+ }
+ var lineSuffixBoundary = {
+ type: "line-suffix-boundary"
+ };
+ var breakParent = {
+ type: "break-parent"
+ };
+ var trim = {
+ type: "trim"
+ };
+ var hardlineWithoutBreakParent = {
+ type: "line",
+ hard: true
+ };
+ var literallineWithoutBreakParent = {
+ type: "line",
+ hard: true,
+ literal: true
+ };
+ var line = {
+ type: "line"
+ };
+ var softline = {
+ type: "line",
+ soft: true
+ };
+ var hardline = concat([hardlineWithoutBreakParent, breakParent]);
+ var literalline = concat([literallineWithoutBreakParent, breakParent]);
+ var cursor = {
+ type: "cursor",
+ placeholder: Symbol("cursor")
+ };
+ function join(sep, arr) {
+ const res = [];
+ for (let i = 0; i < arr.length; i++) {
+ if (i !== 0) {
+ res.push(sep);
+ }
+ res.push(arr[i]);
+ }
+ return concat(res);
+ }
+ function addAlignmentToDoc(doc, size, tabWidth) {
+ let aligned = doc;
+ if (size > 0) {
+ for (let i = 0; i < Math.floor(size / tabWidth); ++i) {
+ aligned = indent(aligned);
+ }
+ aligned = align(size % tabWidth, aligned);
+ aligned = align(Number.NEGATIVE_INFINITY, aligned);
+ }
+ return aligned;
+ }
+ function label(label2, contents) {
+ return {
+ type: "label",
+ label: label2,
+ contents
+ };
+ }
+ module2.exports = {
+ concat,
+ join,
+ line,
+ softline,
+ hardline,
+ literalline,
+ group,
+ conditionalGroup,
+ fill,
+ lineSuffix,
+ lineSuffixBoundary,
+ cursor,
+ breakParent,
+ ifBreak,
+ trim,
+ indent,
+ indentIfBreak,
+ align,
+ addAlignmentToDoc,
+ markAsRoot,
+ dedentToRoot,
+ dedent,
+ hardlineWithoutBreakParent,
+ literallineWithoutBreakParent,
+ label
+ };
+ }
+ });
+ var require_end_of_line = __commonJS2({
+ "src/common/end-of-line.js"(exports2, module2) {
+ "use strict";
+ init_define_process();
+ function guessEndOfLine(text) {
+ const index = text.indexOf("\r");
+ if (index >= 0) {
+ return text.charAt(index + 1) === "\n" ? "crlf" : "cr";
+ }
+ return "lf";
+ }
+ function convertEndOfLineToChars(value) {
+ switch (value) {
+ case "cr":
+ return "\r";
+ case "crlf":
+ return "\r\n";
+ default:
+ return "\n";
+ }
+ }
+ function countEndOfLineChars(text, eol) {
+ let regex;
+ switch (eol) {
+ case "\n":
+ regex = /\n/g;
+ break;
+ case "\r":
+ regex = /\r/g;
+ break;
+ case "\r\n":
+ regex = /\r\n/g;
+ break;
+ default:
+ throw new Error(`Unexpected "eol" ${JSON.stringify(eol)}.`);
+ }
+ const endOfLines = text.match(regex);
+ return endOfLines ? endOfLines.length : 0;
+ }
+ function normalizeEndOfLine(text) {
+ return text.replace(/\r\n?/g, "\n");
+ }
+ module2.exports = {
+ guessEndOfLine,
+ convertEndOfLineToChars,
+ countEndOfLineChars,
+ normalizeEndOfLine
+ };
+ }
+ });
+ var require_get_last = __commonJS2({
+ "src/utils/get-last.js"(exports2, module2) {
+ "use strict";
+ init_define_process();
+ var getLast = (arr) => arr[arr.length - 1];
+ module2.exports = getLast;
+ }
+ });
+ function ansiRegex() {
+ let {
+ onlyFirst = false
+ } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
+ 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("|");
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
+ }
+ var init_ansi_regex = __esm({
+ "node_modules/strip-ansi/node_modules/ansi-regex/index.js"() {
+ init_define_process();
+ }
+ });
+ function stripAnsi(string) {
+ if (typeof string !== "string") {
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
+ }
+ return string.replace(ansiRegex(), "");
+ }
+ var init_strip_ansi = __esm({
+ "node_modules/strip-ansi/index.js"() {
+ init_define_process();
+ init_ansi_regex();
+ }
+ });
+ function isFullwidthCodePoint(codePoint) {
+ if (!Number.isInteger(codePoint)) {
+ return false;
+ }
+ return codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141);
+ }
+ var init_is_fullwidth_code_point = __esm({
+ "node_modules/is-fullwidth-code-point/index.js"() {
+ init_define_process();
+ }
+ });
+ var require_emoji_regex = __commonJS2({
+ "node_modules/emoji-regex/index.js"(exports2, module2) {
+ "use strict";
+ init_define_process();
+ module2.exports = function() {
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
+ };
+ }
+ });
+ var string_width_exports = {};
+ __export(string_width_exports, {
+ default: () => stringWidth
+ });
+ function stringWidth(string) {
+ if (typeof string !== "string" || string.length === 0) {
+ return 0;
+ }
+ string = stripAnsi(string);
+ if (string.length === 0) {
+ return 0;
+ }
+ string = string.replace((0, import_emoji_regex.default)(), " ");
+ let width = 0;
+ for (let index = 0; index < string.length; index++) {
+ const codePoint = string.codePointAt(index);
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
+ continue;
+ }
+ if (codePoint >= 768 && codePoint <= 879) {
+ continue;
+ }
+ if (codePoint > 65535) {
+ index++;
+ }
+ width += isFullwidthCodePoint(codePoint) ? 2 : 1;
+ }
+ return width;
+ }
+ var import_emoji_regex;
+ var init_string_width = __esm({
+ "node_modules/string-width/index.js"() {
+ init_define_process();
+ init_strip_ansi();
+ init_is_fullwidth_code_point();
+ import_emoji_regex = __toESM(require_emoji_regex());
+ }
+ });
+ var require_get_string_width = __commonJS2({
+ "src/utils/get-string-width.js"(exports2, module2) {
+ "use strict";
+ init_define_process();
+ var stringWidth2 = (init_string_width(), __toCommonJS(string_width_exports)).default;
+ var notAsciiRegex = /[^\x20-\x7F]/;
+ function getStringWidth(text) {
+ if (!text) {
+ return 0;
+ }
+ if (!notAsciiRegex.test(text)) {
+ return text.length;
+ }
+ return stringWidth2(text);
+ }
+ module2.exports = getStringWidth;
+ }
+ });
+ var require_doc_utils = __commonJS2({
+ "src/document/doc-utils.js"(exports2, module2) {
+ "use strict";
+ init_define_process();
+ var getLast = require_get_last();
+ var {
+ literalline,
+ join
+ } = require_doc_builders();
+ var isConcat = (doc) => Array.isArray(doc) || doc && doc.type === "concat";
+ var getDocParts = (doc) => {
+ if (Array.isArray(doc)) {
+ return doc;
+ }
+ if (doc.type !== "concat" && doc.type !== "fill") {
+ throw new Error("Expect doc type to be `concat` or `fill`.");
+ }
+ return doc.parts;
+ };
+ var traverseDocOnExitStackMarker = {};
+ function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) {
+ const docsStack = [doc];
+ while (docsStack.length > 0) {
+ const doc2 = docsStack.pop();
+ if (doc2 === traverseDocOnExitStackMarker) {
+ onExit(docsStack.pop());
+ continue;
+ }
+ if (onExit) {
+ docsStack.push(doc2, traverseDocOnExitStackMarker);
+ }
+ if (!onEnter || onEnter(doc2) !== false) {
+ if (isConcat(doc2) || doc2.type === "fill") {
+ const parts = getDocParts(doc2);
+ for (let ic = parts.length, i = ic - 1; i >= 0; --i) {
+ docsStack.push(parts[i]);
+ }
+ } else if (doc2.type === "if-break") {
+ if (doc2.flatContents) {
+ docsStack.push(doc2.flatContents);
+ }
+ if (doc2.breakContents) {
+ docsStack.push(doc2.breakContents);
+ }
+ } else if (doc2.type === "group" && doc2.expandedStates) {
+ if (shouldTraverseConditionalGroups) {
+ for (let ic = doc2.expandedStates.length, i = ic - 1; i >= 0; --i) {
+ docsStack.push(doc2.expandedStates[i]);
+ }
+ } else {
+ docsStack.push(doc2.contents);
+ }
+ } else if (doc2.contents) {
+ docsStack.push(doc2.contents);
+ }
+ }
+ }
+ }
+ function mapDoc(doc, cb) {
+ const mapped = /* @__PURE__ */ new Map();
+ return rec(doc);
+ function rec(doc2) {
+ if (mapped.has(doc2)) {
+ return mapped.get(doc2);
+ }
+ const result = process2(doc2);
+ mapped.set(doc2, result);
+ return result;
+ }
+ function process2(doc2) {
+ if (Array.isArray(doc2)) {
+ return cb(doc2.map(rec));
+ }
+ if (doc2.type === "concat" || doc2.type === "fill") {
+ const parts = doc2.parts.map(rec);
+ return cb(Object.assign(Object.assign({}, doc2), {}, {
+ parts
+ }));
+ }
+ if (doc2.type === "if-break") {
+ const breakContents = doc2.breakContents && rec(doc2.breakContents);
+ const flatContents = doc2.flatContents && rec(doc2.flatContents);
+ return cb(Object.assign(Object.assign({}, doc2), {}, {
+ breakContents,
+ flatContents
+ }));
+ }
+ if (doc2.type === "group" && doc2.expandedStates) {
+ const expandedStates = doc2.expandedStates.map(rec);
+ const contents = expandedStates[0];
+ return cb(Object.assign(Object.assign({}, doc2), {}, {
+ contents,
+ expandedStates
+ }));
+ }
+ if (doc2.contents) {
+ const contents = rec(doc2.contents);
+ return cb(Object.assign(Object.assign({}, doc2), {}, {
+ contents
+ }));
+ }
+ return cb(doc2);
+ }
+ }
+ function findInDoc(doc, fn, defaultValue) {
+ let result = defaultValue;
+ let hasStopped = false;
+ function findInDocOnEnterFn(doc2) {
+ const maybeResult = fn(doc2);
+ if (maybeResult !== void 0) {
+ hasStopped = true;
+ result = maybeResult;
+ }
+ if (hasStopped) {
+ return false;
+ }
+ }
+ traverseDoc(doc, findInDocOnEnterFn);
+ return result;
+ }
+ function willBreakFn(doc) {
+ if (doc.type === "group" && doc.break) {
+ return true;
+ }
+ if (doc.type === "line" && doc.hard) {
+ return true;
+ }
+ if (doc.type === "break-parent") {
+ return true;
+ }
+ }
+ function willBreak(doc) {
+ return findInDoc(doc, willBreakFn, false);
+ }
+ function breakParentGroup(groupStack) {
+ if (groupStack.length > 0) {
+ const parentGroup = getLast(groupStack);
+ if (!parentGroup.expandedStates && !parentGroup.break) {
+ parentGroup.break = "propagated";
+ }
+ }
+ return null;
+ }
+ function propagateBreaks(doc) {
+ const alreadyVisitedSet = /* @__PURE__ */ new Set();
+ const groupStack = [];
+ function propagateBreaksOnEnterFn(doc2) {
+ if (doc2.type === "break-parent") {
+ breakParentGroup(groupStack);
+ }
+ if (doc2.type === "group") {
+ groupStack.push(doc2);
+ if (alreadyVisitedSet.has(doc2)) {
+ return false;
+ }
+ alreadyVisitedSet.add(doc2);
+ }
+ }
+ function propagateBreaksOnExitFn(doc2) {
+ if (doc2.type === "group") {
+ const group = groupStack.pop();
+ if (group.break) {
+ breakParentGroup(groupStack);
+ }
+ }
+ }
+ traverseDoc(doc, propagateBreaksOnEnterFn, propagateBreaksOnExitFn, true);
+ }
+ function removeLinesFn(doc) {
+ if (doc.type === "line" && !doc.hard) {
+ return doc.soft ? "" : " ";
+ }
+ if (doc.type === "if-break") {
+ return doc.flatContents || "";
+ }
+ return doc;
+ }
+ function removeLines(doc) {
+ return mapDoc(doc, removeLinesFn);
+ }
+ var isHardline = (doc, nextDoc) => doc && doc.type === "line" && doc.hard && nextDoc && nextDoc.type === "break-parent";
+ function stripDocTrailingHardlineFromDoc(doc) {
+ if (!doc) {
+ return doc;
+ }
+ if (isConcat(doc) || doc.type === "fill") {
+ const parts = getDocParts(doc);
+ while (parts.length > 1 && isHardline(...parts.slice(-2))) {
+ parts.length -= 2;
+ }
+ if (parts.length > 0) {
+ const lastPart = stripDocTrailingHardlineFromDoc(getLast(parts));
+ parts[parts.length - 1] = lastPart;
+ }
+ return Array.isArray(doc) ? parts : Object.assign(Object.assign({}, doc), {}, {
+ parts
+ });
+ }
+ switch (doc.type) {
+ case "align":
+ case "indent":
+ case "indent-if-break":
+ case "group":
+ case "line-suffix":
+ case "label": {
+ const contents = stripDocTrailingHardlineFromDoc(doc.contents);
+ return Object.assign(Object.assign({}, doc), {}, {
+ contents
+ });
+ }
+ case "if-break": {
+ const breakContents = stripDocTrailingHardlineFromDoc(doc.breakContents);
+ const flatContents = stripDocTrailingHardlineFromDoc(doc.flatContents);
+ return Object.assign(Object.assign({}, doc), {}, {
+ breakContents,
+ flatContents
+ });
+ }
+ }
+ return doc;
+ }
+ function stripTrailingHardline(doc) {
+ return stripDocTrailingHardlineFromDoc(cleanDoc(doc));
+ }
+ function cleanDocFn(doc) {
+ switch (doc.type) {
+ case "fill":
+ if (doc.parts.every((part) => part === "")) {
+ return "";
+ }
+ break;
+ case "group":
+ if (!doc.contents && !doc.id && !doc.break && !doc.expandedStates) {
+ return "";
+ }
+ if (doc.contents.type === "group" && doc.contents.id === doc.id && doc.contents.break === doc.break && doc.contents.expandedStates === doc.expandedStates) {
+ return doc.contents;
+ }
+ break;
+ case "align":
+ case "indent":
+ case "indent-if-break":
+ case "line-suffix":
+ if (!doc.contents) {
+ return "";
+ }
+ break;
+ case "if-break":
+ if (!doc.flatContents && !doc.breakContents) {
+ return "";
+ }
+ break;
+ }
+ if (!isConcat(doc)) {
+ return doc;
+ }
+ const parts = [];
+ for (const part of getDocParts(doc)) {
+ if (!part) {
+ continue;
+ }
+ const [currentPart, ...restParts] = isConcat(part) ? getDocParts(part) : [part];
+ if (typeof currentPart === "string" && typeof getLast(parts) === "string") {
+ parts[parts.length - 1] += currentPart;
+ } else {
+ parts.push(currentPart);
+ }
+ parts.push(...restParts);
+ }
+ if (parts.length === 0) {
+ return "";
+ }
+ if (parts.length === 1) {
+ return parts[0];
+ }
+ return Array.isArray(doc) ? parts : Object.assign(Object.assign({}, doc), {}, {
+ parts
+ });
+ }
+ function cleanDoc(doc) {
+ return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc));
+ }
+ function normalizeParts(parts) {
+ const newParts = [];
+ const restParts = parts.filter(Boolean);
+ while (restParts.length > 0) {
+ const part = restParts.shift();
+ if (!part) {
+ continue;
+ }
+ if (isConcat(part)) {
+ restParts.unshift(...getDocParts(part));
+ continue;
+ }
+ if (newParts.length > 0 && typeof getLast(newParts) === "string" && typeof part === "string") {
+ newParts[newParts.length - 1] += part;
+ continue;
+ }
+ newParts.push(part);
+ }
+ return newParts;
+ }
+ function normalizeDoc(doc) {
+ return mapDoc(doc, (currentDoc) => {
+ if (Array.isArray(currentDoc)) {
+ return normalizeParts(currentDoc);
+ }
+ if (!currentDoc.parts) {
+ return currentDoc;
+ }
+ return Object.assign(Object.assign({}, currentDoc), {}, {
+ parts: normalizeParts(currentDoc.parts)
+ });
+ });
+ }
+ function replaceEndOfLine(doc) {
+ return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" && currentDoc.includes("\n") ? replaceTextEndOfLine(currentDoc) : currentDoc);
+ }
+ function replaceTextEndOfLine(text) {
+ let replacement = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : literalline;
+ return join(replacement, text.split("\n")).parts;
+ }
+ function canBreakFn(doc) {
+ if (doc.type === "line") {
+ return true;
+ }
+ }
+ function canBreak(doc) {
+ return findInDoc(doc, canBreakFn, false);
+ }
+ module2.exports = {
+ isConcat,
+ getDocParts,
+ willBreak,
+ traverseDoc,
+ findInDoc,
+ mapDoc,
+ propagateBreaks,
+ removeLines,
+ stripTrailingHardline,
+ normalizeParts,
+ normalizeDoc,
+ cleanDoc,
+ replaceTextEndOfLine,
+ replaceEndOfLine,
+ canBreak
+ };
+ }
+ });
+ var require_doc_printer = __commonJS2({
+ "src/document/doc-printer.js"(exports2, module2) {
+ "use strict";
+ init_define_process();
+ var {
+ convertEndOfLineToChars
+ } = require_end_of_line();
+ var getLast = require_get_last();
+ var getStringWidth = require_get_string_width();
+ var {
+ fill,
+ cursor,
+ indent
+ } = require_doc_builders();
+ var {
+ isConcat,
+ getDocParts
+ } = require_doc_utils();
+ var groupModeMap;
+ var MODE_BREAK = 1;
+ var MODE_FLAT = 2;
+ function rootIndent() {
+ return {
+ value: "",
+ length: 0,
+ queue: []
+ };
+ }
+ function makeIndent(ind, options) {
+ return generateInd(ind, {
+ type: "indent"
+ }, options);
+ }
+ function makeAlign(indent2, widthOrDoc, options) {
+ if (widthOrDoc === Number.NEGATIVE_INFINITY) {
+ return indent2.root || rootIndent();
+ }
+ if (widthOrDoc < 0) {
+ return generateInd(indent2, {
+ type: "dedent"
+ }, options);
+ }
+ if (!widthOrDoc) {
+ return indent2;
+ }
+ if (widthOrDoc.type === "root") {
+ return Object.assign(Object.assign({}, indent2), {}, {
+ root: indent2
+ });
+ }
+ const alignType = typeof widthOrDoc === "string" ? "stringAlign" : "numberAlign";
+ return generateInd(indent2, {
+ type: alignType,
+ n: widthOrDoc
+ }, options);
+ }
+ function generateInd(ind, newPart, options) {
+ const queue = newPart.type === "dedent" ? ind.queue.slice(0, -1) : [...ind.queue, newPart];
+ let value = "";
+ let length = 0;
+ let lastTabs = 0;
+ let lastSpaces = 0;
+ for (const part of queue) {
+ switch (part.type) {
+ case "indent":
+ flush();
+ if (options.useTabs) {
+ addTabs(1);
+ } else {
+ addSpaces(options.tabWidth);
+ }
+ break;
+ case "stringAlign":
+ flush();
+ value += part.n;
+ length += part.n.length;
+ break;
+ case "numberAlign":
+ lastTabs += 1;
+ lastSpaces += part.n;
+ break;
+ default:
+ throw new Error(`Unexpected type '${part.type}'`);
+ }
+ }
+ flushSpaces();
+ return Object.assign(Object.assign({}, ind), {}, {
+ value,
+ length,
+ queue
+ });
+ function addTabs(count) {
+ value += " ".repeat(count);
+ length += options.tabWidth * count;
+ }
+ function addSpaces(count) {
+ value += " ".repeat(count);
+ length += count;
+ }
+ function flush() {
+ if (options.useTabs) {
+ flushTabs();
+ } else {
+ flushSpaces();
+ }
+ }
+ function flushTabs() {
+ if (lastTabs > 0) {
+ addTabs(lastTabs);
+ }
+ resetLast();
+ }
+ function flushSpaces() {
+ if (lastSpaces > 0) {
+ addSpaces(lastSpaces);
+ }
+ resetLast();
+ }
+ function resetLast() {
+ lastTabs = 0;
+ lastSpaces = 0;
+ }
+ }
+ function trim(out) {
+ if (out.length === 0) {
+ return 0;
+ }
+ let trimCount = 0;
+ while (out.length > 0 && typeof getLast(out) === "string" && /^[\t ]*$/.test(getLast(out))) {
+ trimCount += out.pop().length;
+ }
+ if (out.length > 0 && typeof getLast(out) === "string") {
+ const trimmed = getLast(out).replace(/[\t ]*$/, "");
+ trimCount += getLast(out).length - trimmed.length;
+ out[out.length - 1] = trimmed;
+ }
+ return trimCount;
+ }
+ function fits(next, restCommands, width, hasLineSuffix, mustBeFlat) {
+ let restIdx = restCommands.length;
+ const cmds = [next];
+ const out = [];
+ while (width >= 0) {
+ if (cmds.length === 0) {
+ if (restIdx === 0) {
+ return true;
+ }
+ cmds.push(restCommands[--restIdx]);
+ continue;
+ }
+ const {
+ mode,
+ doc
+ } = cmds.pop();
+ if (typeof doc === "string") {
+ out.push(doc);
+ width -= getStringWidth(doc);
+ } else if (isConcat(doc) || doc.type === "fill") {
+ const parts = getDocParts(doc);
+ for (let i = parts.length - 1; i >= 0; i--) {
+ cmds.push({
+ mode,
+ doc: parts[i]
+ });
+ }
+ } else {
+ switch (doc.type) {
+ case "indent":
+ case "align":
+ case "indent-if-break":
+ case "label":
+ cmds.push({
+ mode,
+ doc: doc.contents
+ });
+ break;
+ case "trim":
+ width += trim(out);
+ break;
+ case "group": {
+ if (mustBeFlat && doc.break) {
+ return false;
+ }
+ const groupMode = doc.break ? MODE_BREAK : mode;
+ const contents = doc.expandedStates && groupMode === MODE_BREAK ? getLast(doc.expandedStates) : doc.contents;
+ cmds.push({
+ mode: groupMode,
+ doc: contents
+ });
+ break;
+ }
+ case "if-break": {
+ const groupMode = doc.groupId ? groupModeMap[doc.groupId] || MODE_FLAT : mode;
+ const contents = groupMode === MODE_BREAK ? doc.breakContents : doc.flatContents;
+ if (contents) {
+ cmds.push({
+ mode,
+ doc: contents
+ });
+ }
+ break;
+ }
+ case "line":
+ if (mode === MODE_BREAK || doc.hard) {
+ return true;
+ }
+ if (!doc.soft) {
+ out.push(" ");
+ width--;
+ }
+ break;
+ case "line-suffix":
+ hasLineSuffix = true;
+ break;
+ case "line-suffix-boundary":
+ if (hasLineSuffix) {
+ return false;
+ }
+ break;
+ }
+ }
+ }
+ return false;
+ }
+ function printDocToString(doc, options) {
+ groupModeMap = {};
+ const width = options.printWidth;
+ const newLine = convertEndOfLineToChars(options.endOfLine);
+ let pos = 0;
+ const cmds = [{
+ ind: rootIndent(),
+ mode: MODE_BREAK,
+ doc
+ }];
+ const out = [];
+ let shouldRemeasure = false;
+ const lineSuffix = [];
+ while (cmds.length > 0) {
+ const {
+ ind,
+ mode,
+ doc: doc2
+ } = cmds.pop();
+ if (typeof doc2 === "string") {
+ const formatted = newLine !== "\n" ? doc2.replace(/\n/g, newLine) : doc2;
+ out.push(formatted);
+ pos += getStringWidth(formatted);
+ } else if (isConcat(doc2)) {
+ const parts = getDocParts(doc2);
+ for (let i = parts.length - 1; i >= 0; i--) {
+ cmds.push({
+ ind,
+ mode,
+ doc: parts[i]
+ });
+ }
+ } else {
+ switch (doc2.type) {
+ case "cursor":
+ out.push(cursor.placeholder);
+ break;
+ case "indent":
+ cmds.push({
+ ind: makeIndent(ind, options),
+ mode,
+ doc: doc2.contents
+ });
+ break;
+ case "align":
+ cmds.push({
+ ind: makeAlign(ind, doc2.n, options),
+ mode,
+ doc: doc2.contents
+ });
+ break;
+ case "trim":
+ pos -= trim(out);
+ break;
+ case "group":
+ switch (mode) {
+ case MODE_FLAT:
+ if (!shouldRemeasure) {
+ cmds.push({
+ ind,
+ mode: doc2.break ? MODE_BREAK : MODE_FLAT,
+ doc: doc2.contents
+ });
+ break;
+ }
+ case MODE_BREAK: {
+ shouldRemeasure = false;
+ const next = {
+ ind,
+ mode: MODE_FLAT,
+ doc: doc2.contents
+ };
+ const rem = width - pos;
+ const hasLineSuffix = lineSuffix.length > 0;
+ if (!doc2.break && fits(next, cmds, rem, hasLineSuffix)) {
+ cmds.push(next);
+ } else {
+ if (doc2.expandedStates) {
+ const mostExpanded = getLast(doc2.expandedStates);
+ if (doc2.break) {
+ cmds.push({
+ ind,
+ mode: MODE_BREAK,
+ doc: mostExpanded
+ });
+ break;
+ } else {
+ for (let i = 1; i < doc2.expandedStates.length + 1; i++) {
+ if (i >= doc2.expandedStates.length) {
+ cmds.push({
+ ind,
+ mode: MODE_BREAK,
+ doc: mostExpanded
+ });
+ break;
+ } else {
+ const state = doc2.expandedStates[i];
+ const cmd = {
+ ind,
+ mode: MODE_FLAT,
+ doc: state
+ };
+ if (fits(cmd, cmds, rem, hasLineSuffix)) {
+ cmds.push(cmd);
+ break;
+ }
+ }
+ }
+ }
+ } else {
+ cmds.push({
+ ind,
+ mode: MODE_BREAK,
+ doc: doc2.contents
+ });
+ }
+ }
+ break;
+ }
+ }
+ if (doc2.id) {
+ groupModeMap[doc2.id] = getLast(cmds).mode;
+ }
+ break;
+ case "fill": {
+ const rem = width - pos;
+ const {
+ parts
+ } = doc2;
+ if (parts.length === 0) {
+ break;
+ }
+ const [content, whitespace] = parts;
+ const contentFlatCmd = {
+ ind,
+ mode: MODE_FLAT,
+ doc: content
+ };
+ const contentBreakCmd = {
+ ind,
+ mode: MODE_BREAK,
+ doc: content
+ };
+ const contentFits = fits(contentFlatCmd, [], rem, lineSuffix.length > 0, true);
+ if (parts.length === 1) {
+ if (contentFits) {
+ cmds.push(contentFlatCmd);
+ } else {
+ cmds.push(contentBreakCmd);
+ }
+ break;
+ }
+ const whitespaceFlatCmd = {
+ ind,
+ mode: MODE_FLAT,
+ doc: whitespace
+ };
+ const whitespaceBreakCmd = {
+ ind,
+ mode: MODE_BREAK,
+ doc: whitespace
+ };
+ if (parts.length === 2) {
+ if (contentFits) {
+ cmds.push(whitespaceFlatCmd, contentFlatCmd);
+ } else {
+ cmds.push(whitespaceBreakCmd, contentBreakCmd);
+ }
+ break;
+ }
+ parts.splice(0, 2);
+ const remainingCmd = {
+ ind,
+ mode,
+ doc: fill(parts)
+ };
+ const secondContent = parts[0];
+ const firstAndSecondContentFlatCmd = {
+ ind,
+ mode: MODE_FLAT,
+ doc: [content, whitespace, secondContent]
+ };
+ const firstAndSecondContentFits = fits(firstAndSecondContentFlatCmd, [], rem, lineSuffix.length > 0, true);
+ if (firstAndSecondContentFits) {
+ cmds.push(remainingCmd, whitespaceFlatCmd, contentFlatCmd);
+ } else if (contentFits) {
+ cmds.push(remainingCmd, whitespaceBreakCmd, contentFlatCmd);
+ } else {
+ cmds.push(remainingCmd, whitespaceBreakCmd, contentBreakCmd);
+ }
+ break;
+ }
+ case "if-break":
+ case "indent-if-break": {
+ const groupMode = doc2.groupId ? groupModeMap[doc2.groupId] : mode;
+ if (groupMode === MODE_BREAK) {
+ const breakContents = doc2.type === "if-break" ? doc2.breakContents : doc2.negate ? doc2.contents : indent(doc2.contents);
+ if (breakContents) {
+ cmds.push({
+ ind,
+ mode,
+ doc: breakContents
+ });
+ }
+ }
+ if (groupMode === MODE_FLAT) {
+ const flatContents = doc2.type === "if-break" ? doc2.flatContents : doc2.negate ? indent(doc2.contents) : doc2.contents;
+ if (flatContents) {
+ cmds.push({
+ ind,
+ mode,
+ doc: flatContents
+ });
+ }
+ }
+ break;
+ }
+ case "line-suffix":
+ lineSuffix.push({
+ ind,
+ mode,
+ doc: doc2.contents
+ });
+ break;
+ case "line-suffix-boundary":
+ if (lineSuffix.length > 0) {
+ cmds.push({
+ ind,
+ mode,
+ doc: {
+ type: "line",
+ hard: true
+ }
+ });
+ }
+ break;
+ case "line":
+ switch (mode) {
+ case MODE_FLAT:
+ if (!doc2.hard) {
+ if (!doc2.soft) {
+ out.push(" ");
+ pos += 1;
+ }
+ break;
+ } else {
+ shouldRemeasure = true;
+ }
+ case MODE_BREAK:
+ if (lineSuffix.length > 0) {
+ cmds.push({
+ ind,
+ mode,
+ doc: doc2
+ }, ...lineSuffix.reverse());
+ lineSuffix.length = 0;
+ break;
+ }
+ if (doc2.literal) {
+ if (ind.root) {
+ out.push(newLine, ind.root.value);
+ pos = ind.root.length;
+ } else {
+ out.push(newLine);
+ pos = 0;
+ }
+ } else {
+ pos -= trim(out);
+ out.push(newLine + ind.value);
+ pos = ind.length;
+ }
+ break;
+ }
+ break;
+ case "label":
+ cmds.push({
+ ind,
+ mode,
+ doc: doc2.contents
+ });
+ break;
+ default:
+ }
+ }
+ if (cmds.length === 0 && lineSuffix.length > 0) {
+ cmds.push(...lineSuffix.reverse());
+ lineSuffix.length = 0;
+ }
+ }
+ const cursorPlaceholderIndex = out.indexOf(cursor.placeholder);
+ if (cursorPlaceholderIndex !== -1) {
+ const otherCursorPlaceholderIndex = out.indexOf(cursor.placeholder, cursorPlaceholderIndex + 1);
+ const beforeCursor = out.slice(0, cursorPlaceholderIndex).join("");
+ const aroundCursor = out.slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex).join("");
+ const afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join("");
+ return {
+ formatted: beforeCursor + aroundCursor + afterCursor,
+ cursorNodeStart: beforeCursor.length,
+ cursorNodeText: aroundCursor
+ };
+ }
+ return {
+ formatted: out.join("")
+ };
+ }
+ module2.exports = {
+ printDocToString
+ };
+ }
+ });
+ var require_doc_debug = __commonJS2({
+ "src/document/doc-debug.js"(exports2, module2) {
+ "use strict";
+ init_define_process();
+ var {
+ isConcat,
+ getDocParts
+ } = require_doc_utils();
+ function flattenDoc(doc) {
+ if (!doc) {
+ return "";
+ }
+ if (isConcat(doc)) {
+ const res = [];
+ for (const part of getDocParts(doc)) {
+ if (isConcat(part)) {
+ res.push(...flattenDoc(part).parts);
+ } else {
+ const flattened = flattenDoc(part);
+ if (flattened !== "") {
+ res.push(flattened);
+ }
+ }
+ }
+ return {
+ type: "concat",
+ parts: res
+ };
+ }
+ if (doc.type === "if-break") {
+ return Object.assign(Object.assign({}, doc), {}, {
+ breakContents: flattenDoc(doc.breakContents),
+ flatContents: flattenDoc(doc.flatContents)
+ });
+ }
+ if (doc.type === "group") {
+ return Object.assign(Object.assign({}, doc), {}, {
+ contents: flattenDoc(doc.contents),
+ expandedStates: doc.expandedStates && doc.expandedStates.map(flattenDoc)
+ });
+ }
+ if (doc.type === "fill") {
+ return {
+ type: "fill",
+ parts: doc.parts.map(flattenDoc)
+ };
+ }
+ if (doc.contents) {
+ return Object.assign(Object.assign({}, doc), {}, {
+ contents: flattenDoc(doc.contents)
+ });
+ }
+ return doc;
+ }
+ function printDocToDebug(doc) {
+ const printedSymbols = /* @__PURE__ */ Object.create(null);
+ const usedKeysForSymbols = /* @__PURE__ */ new Set();
+ return printDoc(flattenDoc(doc));
+ function printDoc(doc2, index, parentParts) {
+ if (typeof doc2 === "string") {
+ return JSON.stringify(doc2);
+ }
+ if (isConcat(doc2)) {
+ const printed = getDocParts(doc2).map(printDoc).filter(Boolean);
+ return printed.length === 1 ? printed[0] : `[${printed.join(", ")}]`;
+ }
+ if (doc2.type === "line") {
+ const withBreakParent = Array.isArray(parentParts) && parentParts[index + 1] && parentParts[index + 1].type === "break-parent";
+ if (doc2.literal) {
+ return withBreakParent ? "literalline" : "literallineWithoutBreakParent";
+ }
+ if (doc2.hard) {
+ return withBreakParent ? "hardline" : "hardlineWithoutBreakParent";
+ }
+ if (doc2.soft) {
+ return "softline";
+ }
+ return "line";
+ }
+ if (doc2.type === "break-parent") {
+ const afterHardline = Array.isArray(parentParts) && parentParts[index - 1] && parentParts[index - 1].type === "line" && parentParts[index - 1].hard;
+ return afterHardline ? void 0 : "breakParent";
+ }
+ if (doc2.type === "trim") {
+ return "trim";
+ }
+ if (doc2.type === "indent") {
+ return "indent(" + printDoc(doc2.contents) + ")";
+ }
+ if (doc2.type === "align") {
+ return doc2.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + printDoc(doc2.contents) + ")" : doc2.n < 0 ? "dedent(" + printDoc(doc2.contents) + ")" : doc2.n.type === "root" ? "markAsRoot(" + printDoc(doc2.contents) + ")" : "align(" + JSON.stringify(doc2.n) + ", " + printDoc(doc2.contents) + ")";
+ }
+ if (doc2.type === "if-break") {
+ return "ifBreak(" + printDoc(doc2.breakContents) + (doc2.flatContents ? ", " + printDoc(doc2.flatContents) : "") + (doc2.groupId ? (!doc2.flatContents ? ', ""' : "") + `, { groupId: ${printGroupId(doc2.groupId)} }` : "") + ")";
+ }
+ if (doc2.type === "indent-if-break") {
+ const optionsParts = [];
+ if (doc2.negate) {
+ optionsParts.push("negate: true");
+ }
+ if (doc2.groupId) {
+ optionsParts.push(`groupId: ${printGroupId(doc2.groupId)}`);
+ }
+ const options = optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : "";
+ return `indentIfBreak(${printDoc(doc2.contents)}${options})`;
+ }
+ if (doc2.type === "group") {
+ const optionsParts = [];
+ if (doc2.break && doc2.break !== "propagated") {
+ optionsParts.push("shouldBreak: true");
+ }
+ if (doc2.id) {
+ optionsParts.push(`id: ${printGroupId(doc2.id)}`);
+ }
+ const options = optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : "";
+ if (doc2.expandedStates) {
+ return `conditionalGroup([${doc2.expandedStates.map((part) => printDoc(part)).join(",")}]${options})`;
+ }
+ return `group(${printDoc(doc2.contents)}${options})`;
+ }
+ if (doc2.type === "fill") {
+ return `fill([${doc2.parts.map((part) => printDoc(part)).join(", ")}])`;
+ }
+ if (doc2.type === "line-suffix") {
+ return "lineSuffix(" + printDoc(doc2.contents) + ")";
+ }
+ if (doc2.type === "line-suffix-boundary") {
+ return "lineSuffixBoundary";
+ }
+ if (doc2.type === "label") {
+ return `label(${JSON.stringify(doc2.label)}, ${printDoc(doc2.contents)})`;
+ }
+ throw new Error("Unknown doc type " + doc2.type);
+ }
+ function printGroupId(id) {
+ if (typeof id !== "symbol") {
+ return JSON.stringify(String(id));
+ }
+ if (id in printedSymbols) {
+ return printedSymbols[id];
+ }
+ const prefix = String(id).slice(7, -1) || "symbol";
+ for (let counter = 0; ; counter++) {
+ const key = prefix + (counter > 0 ? ` #${counter}` : "");
+ if (!usedKeysForSymbols.has(key)) {
+ usedKeysForSymbols.add(key);
+ return printedSymbols[id] = `Symbol.for(${JSON.stringify(key)})`;
+ }
+ }
+ }
+ }
+ module2.exports = {
+ printDocToDebug
+ };
+ }
+ });
+ init_define_process();
+ module.exports = {
+ builders: require_doc_builders(),
+ printer: require_doc_printer(),
+ utils: require_doc_utils(),
+ debug: require_doc_debug()
+ };
+ }
+ });
+ return require_doc_js_umd();
+});
\ No newline at end of file
diff --git a/node_modules/prettier/esm/parser-angular.mjs b/node_modules/prettier/esm/parser-angular.mjs
new file mode 100644
index 0000000..e2f0881
--- /dev/null
+++ b/node_modules/prettier/esm/parser-angular.mjs
@@ -0,0 +1,2 @@
+var De=Object.defineProperty,ar=Object.getOwnPropertyDescriptor,ze=Object.getOwnPropertyNames,or=Object.prototype.hasOwnProperty,Y=(e,t)=>function(){return e&&(t=(0,e[ze(e)[0]])(e=0)),t},W=(e,t)=>function(){return t||(0,e[ze(e)[0]])((t={exports:{}}).exports,t),t.exports},He=(e,t)=>{for(var r in t)De(e,r,{get:t[r],enumerable:!0})},cr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ze(t))!or.call(e,s)&&s!==r&&De(e,s,{get:()=>t[s],enumerable:!(n=ar(t,s))||n.enumerable});return e},Ne=e=>cr(De({},"__esModule",{value:!0}),e),L=Y({""(){}}),ur=W({"src/utils/is-non-empty-array.js"(e,t){"use strict";L();function r(n){return Array.isArray(n)&&n.length>0}t.exports=r}}),lr=W({"src/language-js/loc.js"(e,t){"use strict";L();var r=ur();function n(l){var P,p;let x=l.range?l.range[0]:l.start,C=(P=(p=l.declaration)===null||p===void 0?void 0:p.decorators)!==null&&P!==void 0?P:l.decorators;return r(C)?Math.min(n(C[0]),x):x}function s(l){return l.range?l.range[1]:l.end}function a(l,P){let p=n(l);return Number.isInteger(p)&&p===n(P)}function i(l,P){let p=s(l);return Number.isInteger(p)&&p===s(P)}function h(l,P){return a(l,P)&&i(l,P)}t.exports={locStart:n,locEnd:s,hasSameLocStart:a,hasSameLoc:h}}}),hr=W({"node_modules/angular-estree-parser/node_modules/lines-and-columns/build/index.js"(e){"use strict";L(),e.__esModule=!0,e.LinesAndColumns=void 0;var t=`
+`,r="\r",n=function(){function s(a){this.string=a;for(var i=[0],h=0;hthis.string.length)return null;for(var i=0,h=this.offsets;h[i+1]<=a;)i++;var l=a-h[i];return{line:i,column:l}},s.prototype.indexForLocation=function(a){var i=a.line,h=a.column;return i<0||i>=this.offsets.length||h<0||h>this.lengthOfLine(i)?null:this.offsets[i]+h},s.prototype.lengthOfLine=function(a){var i=this.offsets[a],h=a===this.offsets.length-1?this.string.length:this.offsets[a+1];return h-i},s}();e.LinesAndColumns=n,e.default=n}}),pr=W({"node_modules/angular-estree-parser/lib/context.js"(e){"use strict";L(),Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0;var t=hr(),r=class{constructor(s){this.text=s,this.locator=new n(this.text)}};e.Context=r;var n=class{constructor(s){this._lineAndColumn=new t.default(s)}locationForIndex(s){let{line:a,column:i}=this._lineAndColumn.locationForIndex(s);return{line:a+1,column:i}}}}}),Xe={};He(Xe,{AST:()=>k,ASTWithName:()=>G,ASTWithSource:()=>V,AbsoluteSourceSpan:()=>U,AstMemoryEfficientTransformer:()=>Pt,AstTransformer:()=>wt,Binary:()=>B,BindingPipe:()=>fe,BoundElementProperty:()=>_t,Chain:()=>oe,Conditional:()=>ce,EmptyExpr:()=>K,ExpressionBinding:()=>Ye,FunctionCall:()=>Pe,ImplicitReceiver:()=>Oe,Interpolation:()=>me,KeyedRead:()=>he,KeyedWrite:()=>de,LiteralArray:()=>ge,LiteralMap:()=>ve,LiteralPrimitive:()=>$,MethodCall:()=>ye,NonNullAssert:()=>Se,ParseSpan:()=>q,ParsedEvent:()=>Et,ParsedProperty:()=>Ct,ParsedPropertyType:()=>se,ParsedVariable:()=>At,ParserError:()=>ae,PrefixNot:()=>xe,PropertyRead:()=>ne,PropertyWrite:()=>ue,Quote:()=>be,RecursiveAstVisitor:()=>Ze,SafeKeyedRead:()=>pe,SafeMethodCall:()=>we,SafePropertyRead:()=>le,ThisReceiver:()=>Je,Unary:()=>F,VariableBinding:()=>Le});var ae,q,k,G,be,K,Oe,Je,oe,ce,ne,ue,le,he,pe,de,fe,$,ge,ve,me,B,F,xe,Se,ye,we,Pe,U,V,Le,Ye,Ze,wt,Pt,Ct,se,Et,At,_t,et=Y({"node_modules/@angular/compiler/esm2015/src/expression_parser/ast.js"(){L(),ae=class{constructor(e,t,r,n){this.input=t,this.errLocation=r,this.ctxLocation=n,this.message=`Parser Error: ${e} ${r} [${t}] in ${n}`}},q=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new U(e+this.start,e+this.end)}},k=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},G=class extends k{constructor(e,t,r){super(e,t),this.nameSpan=r}},be=class extends k{constructor(e,t,r,n,s){super(e,t),this.prefix=r,this.uninterpretedExpression=n,this.location=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitQuote(this,t)}toString(){return"Quote"}},K=class extends k{visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null}},Oe=class extends k{visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitImplicitReceiver(this,t)}},Je=class extends Oe{visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;var r;return(r=e.visitThisReceiver)===null||r===void 0?void 0:r.call(e,this,t)}},oe=class extends k{constructor(e,t,r){super(e,t),this.expressions=r}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitChain(this,t)}},ce=class extends k{constructor(e,t,r,n,s){super(e,t),this.condition=r,this.trueExp=n,this.falseExp=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitConditional(this,t)}},ne=class extends G{constructor(e,t,r,n,s){super(e,t,r),this.receiver=n,this.name=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitPropertyRead(this,t)}},ue=class extends G{constructor(e,t,r,n,s,a){super(e,t,r),this.receiver=n,this.name=s,this.value=a}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitPropertyWrite(this,t)}},le=class extends G{constructor(e,t,r,n,s){super(e,t,r),this.receiver=n,this.name=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitSafePropertyRead(this,t)}},he=class extends k{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitKeyedRead(this,t)}},pe=class extends k{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitSafeKeyedRead(this,t)}},de=class extends k{constructor(e,t,r,n,s){super(e,t),this.receiver=r,this.key=n,this.value=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitKeyedWrite(this,t)}},fe=class extends G{constructor(e,t,r,n,s,a){super(e,t,a),this.exp=r,this.name=n,this.args=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitPipe(this,t)}},$=class extends k{constructor(e,t,r){super(e,t),this.value=r}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitLiteralPrimitive(this,t)}},ge=class extends k{constructor(e,t,r){super(e,t),this.expressions=r}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitLiteralArray(this,t)}},ve=class extends k{constructor(e,t,r,n){super(e,t),this.keys=r,this.values=n}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitLiteralMap(this,t)}},me=class extends k{constructor(e,t,r,n){super(e,t),this.strings=r,this.expressions=n}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitInterpolation(this,t)}},B=class extends k{constructor(e,t,r,n,s){super(e,t),this.operation=r,this.left=n,this.right=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitBinary(this,t)}},F=class extends B{constructor(e,t,r,n,s,a,i){super(e,t,s,a,i),this.operator=r,this.expr=n}static createMinus(e,t,r){return new F(e,t,"-",r,"-",new $(e,t,0),r)}static createPlus(e,t,r){return new F(e,t,"+",r,"-",r,new $(e,t,0))}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},xe=class extends k{constructor(e,t,r){super(e,t),this.expression=r}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitPrefixNot(this,t)}},Se=class extends k{constructor(e,t,r){super(e,t),this.expression=r}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitNonNullAssert(this,t)}},ye=class extends G{constructor(e,t,r,n,s,a,i){super(e,t,r),this.receiver=n,this.name=s,this.args=a,this.argumentSpan=i}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitMethodCall(this,t)}},we=class extends G{constructor(e,t,r,n,s,a,i){super(e,t,r),this.receiver=n,this.name=s,this.args=a,this.argumentSpan=i}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitSafeMethodCall(this,t)}},Pe=class extends k{constructor(e,t,r,n){super(e,t),this.target=r,this.args=n}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitFunctionCall(this,t)}},U=class{constructor(e,t){this.start=e,this.end=t}},V=class extends k{constructor(e,t,r,n,s){super(new q(0,t===null?0:t.length),new U(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=r,this.errors=s}visit(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},Le=class{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}},Ye=class{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}},Ze=class{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitFunctionCall(e,t){e.target&&this.visit(e.target,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeMethodCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitQuote(e,t){}visitAll(e,t){for(let r of e)this.visit(r,t)}},wt=class{visitImplicitReceiver(e,t){return e}visitThisReceiver(e,t){return e}visitInterpolation(e,t){return new me(e.span,e.sourceSpan,e.strings,this.visitAll(e.expressions))}visitLiteralPrimitive(e,t){return new $(e.span,e.sourceSpan,e.value)}visitPropertyRead(e,t){return new ne(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitPropertyWrite(e,t){return new ue(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,e.value.visit(this))}visitSafePropertyRead(e,t){return new le(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name)}visitMethodCall(e,t){return new ye(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitSafeMethodCall(e,t){return new we(e.span,e.sourceSpan,e.nameSpan,e.receiver.visit(this),e.name,this.visitAll(e.args),e.argumentSpan)}visitFunctionCall(e,t){return new Pe(e.span,e.sourceSpan,e.target.visit(this),this.visitAll(e.args))}visitLiteralArray(e,t){return new ge(e.span,e.sourceSpan,this.visitAll(e.expressions))}visitLiteralMap(e,t){return new ve(e.span,e.sourceSpan,e.keys,this.visitAll(e.values))}visitUnary(e,t){switch(e.operator){case"+":return F.createPlus(e.span,e.sourceSpan,e.expr.visit(this));case"-":return F.createMinus(e.span,e.sourceSpan,e.expr.visit(this));default:throw new Error(`Unknown unary operator ${e.operator}`)}}visitBinary(e,t){return new B(e.span,e.sourceSpan,e.operation,e.left.visit(this),e.right.visit(this))}visitPrefixNot(e,t){return new xe(e.span,e.sourceSpan,e.expression.visit(this))}visitNonNullAssert(e,t){return new Se(e.span,e.sourceSpan,e.expression.visit(this))}visitConditional(e,t){return new ce(e.span,e.sourceSpan,e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))}visitPipe(e,t){return new fe(e.span,e.sourceSpan,e.exp.visit(this),e.name,this.visitAll(e.args),e.nameSpan)}visitKeyedRead(e,t){return new he(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this))}visitKeyedWrite(e,t){return new de(e.span,e.sourceSpan,e.receiver.visit(this),e.key.visit(this),e.value.visit(this))}visitAll(e){let t=[];for(let r=0;r=tt&&e<=rt||e==pt}function Q(e){return Kt<=e&&e<=Mt}function fr(e){return e>=lt&&e<=ht||e>=ct&&e<=ut}function vt(e){return e===it||e===nt||e===Ht}var Ce,tt,It,Ot,kt,Nt,rt,bt,nt,Lt,st,Rt,Me,it,Ee,z,Tt,at,ee,ot,H,Re,X,te,$t,ie,Bt,je,Kt,Mt,ct,jt,ut,Ae,Ft,re,Ut,$e,lt,Wt,Gt,Vt,qt,Qt,Dt,zt,ht,Te,Fe,_e,pt,Ht,Xt=Y({"node_modules/@angular/compiler/esm2015/src/chars.js"(){L(),Ce=0,tt=9,It=10,Ot=11,kt=12,Nt=13,rt=32,bt=33,nt=34,Lt=35,st=36,Rt=37,Me=38,it=39,Ee=40,z=41,Tt=42,at=43,ee=44,ot=45,H=46,Re=47,X=58,te=59,$t=60,ie=61,Bt=62,je=63,Kt=48,Mt=57,ct=65,jt=69,ut=90,Ae=91,Ft=92,re=93,Ut=94,$e=95,lt=97,Wt=101,Gt=102,Vt=110,qt=114,Qt=116,Dt=117,zt=118,ht=122,Te=123,Fe=124,_e=125,pt=160,Ht=96}}),Jt={};He(Jt,{EOF:()=>Ie,Lexer:()=>Zt,Token:()=>M,TokenType:()=>S,isIdentifier:()=>Yt});function mt(e,t,r){return new M(e,t,S.Character,r,String.fromCharCode(r))}function gr(e,t,r){return new M(e,t,S.Identifier,0,r)}function vr(e,t,r){return new M(e,t,S.PrivateIdentifier,0,r)}function mr(e,t,r){return new M(e,t,S.Keyword,0,r)}function Be(e,t,r){return new M(e,t,S.Operator,0,r)}function xr(e,t,r){return new M(e,t,S.String,0,r)}function Sr(e,t,r){return new M(e,t,S.Number,r,"")}function yr(e,t,r){return new M(e,t,S.Error,0,r)}function Ue(e){return lt<=e&&e<=ht||ct<=e&&e<=ut||e==$e||e==st}function Yt(e){if(e.length==0)return!1;let t=new Ge(e);if(!Ue(t.peek))return!1;for(t.advance();t.peek!==Ce;){if(!We(t.peek))return!1;t.advance()}return!0}function We(e){return fr(e)||Q(e)||e==$e||e==st}function wr(e){return e==Wt||e==jt}function Pr(e){return e==ot||e==at}function Cr(e){switch(e){case Vt:return It;case Gt:return kt;case qt:return Nt;case Qt:return tt;case zt:return Ot;default:return e}}function Er(e){let t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}var S,xt,Zt,M,Ie,Ge,er=Y({"node_modules/@angular/compiler/esm2015/src/expression_parser/lexer.js"(){L(),Xt(),function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.PrivateIdentifier=2]="PrivateIdentifier",e[e.Keyword=3]="Keyword",e[e.String=4]="String",e[e.Operator=5]="Operator",e[e.Number=6]="Number",e[e.Error=7]="Error"}(S||(S={})),xt=["var","let","as","null","undefined","true","false","if","else","this"],Zt=class{tokenize(e){let t=new Ge(e),r=[],n=t.scanToken();for(;n!=null;)r.push(n),n=t.scanToken();return r}},M=class{constructor(e,t,r,n,s){this.index=e,this.end=t,this.type=r,this.numValue=n,this.strValue=s}isCharacter(e){return this.type==S.Character&&this.numValue==e}isNumber(){return this.type==S.Number}isString(){return this.type==S.String}isOperator(e){return this.type==S.Operator&&this.strValue==e}isIdentifier(){return this.type==S.Identifier}isPrivateIdentifier(){return this.type==S.PrivateIdentifier}isKeyword(){return this.type==S.Keyword}isKeywordLet(){return this.type==S.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==S.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==S.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==S.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==S.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==S.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==S.Keyword&&this.strValue=="this"}isError(){return this.type==S.Error}toNumber(){return this.type==S.Number?this.numValue:-1}toString(){switch(this.type){case S.Character:case S.Identifier:case S.Keyword:case S.Operator:case S.PrivateIdentifier:case S.String:case S.Error:return this.strValue;case S.Number:return this.numValue.toString();default:return null}}},Ie=new M(-1,-1,S.Character,0,""),Ge=class{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?Ce:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,t=this.length,r=this.peek,n=this.index;for(;r<=rt;)if(++n>=t){r=Ce;break}else r=e.charCodeAt(n);if(this.peek=r,this.index=n,n>=t)return null;if(Ue(r))return this.scanIdentifier();if(Q(r))return this.scanNumber(n);let s=n;switch(r){case H:return this.advance(),Q(this.peek)?this.scanNumber(s):mt(s,this.index,H);case Ee:case z:case Te:case _e:case Ae:case re:case ee:case X:case te:return this.scanCharacter(s,r);case it:case nt:return this.scanString();case Lt:return this.scanPrivateIdentifier();case at:case ot:case Tt:case Re:case Rt:case Ut:return this.scanOperator(s,String.fromCharCode(r));case je:return this.scanQuestion(s);case $t:case Bt:return this.scanComplexOperator(s,String.fromCharCode(r),ie,"=");case bt:case ie:return this.scanComplexOperator(s,String.fromCharCode(r),ie,"=",ie,"=");case Me:return this.scanComplexOperator(s,"&",Me,"&");case Fe:return this.scanComplexOperator(s,"|",Fe,"|");case pt:for(;dr(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(r)}]`,0)}scanCharacter(e,t){return this.advance(),mt(e,this.index,t)}scanOperator(e,t){return this.advance(),Be(e,this.index,t)}scanComplexOperator(e,t,r,n,s,a){this.advance();let i=t;return this.peek==r&&(this.advance(),i+=n),s!=null&&this.peek==s&&(this.advance(),i+=a),Be(e,this.index,i)}scanIdentifier(){let e=this.index;for(this.advance();We(this.peek);)this.advance();let t=this.input.substring(e,this.index);return xt.indexOf(t)>-1?mr(e,this.index,t):gr(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!Ue(this.peek))return this.error("Invalid character [#]",-1);for(;We(this.peek);)this.advance();let t=this.input.substring(e,this.index);return vr(e,this.index,t)}scanNumber(e){let t=this.index===e,r=!1;for(this.advance();;){if(!Q(this.peek))if(this.peek===$e){if(!Q(this.input.charCodeAt(this.index-1))||!Q(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);r=!0}else if(this.peek===H)t=!1;else if(wr(this.peek)){if(this.advance(),Pr(this.peek)&&this.advance(),!Q(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);r&&(n=n.replace(/_/g,""));let s=t?Er(n):parseFloat(n);return Sr(e,this.index,s)}scanString(){let e=this.index,t=this.peek;this.advance();let r="",n=this.index,s=this.input;for(;this.peek!=t;)if(this.peek==Ft){r+=s.substring(n,this.index),this.advance();let i;if(this.peek=this.peek,this.peek==Dt){let h=s.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(h))i=parseInt(h,16);else return this.error(`Invalid unicode escape [\\u${h}]`,0);for(let l=0;l<5;l++)this.advance()}else i=Cr(this.peek),this.advance();r+=String.fromCharCode(i),n=this.index}else{if(this.peek==Ce)return this.error("Unterminated quote",0);this.advance()}let a=s.substring(n,this.index);return this.advance(),xr(e,this.index,r+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===je||this.peek===H)&&(t+=this.peek===H?".":"?",this.advance()),Be(e,this.index,t)}error(e,t){let r=this.index+t;return yr(r,this.index,`Lexer Error: ${e} at column ${r} in expression [${this.input}]`)}}}});function Ar(e,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw new Error(`Expected '${e}' to be an array, [start, end].`);if(t!=null){let r=t[0],n=t[1];tr.forEach(s=>{if(s.test(r)||s.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var tr,_r=Y({"node_modules/@angular/compiler/esm2015/src/assertions.js"(){L(),tr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//]}}),Ke,J,Ir=Y({"node_modules/@angular/compiler/esm2015/src/ml_parser/interpolation_config.js"(){L(),_r(),Ke=class{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(Ar("interpolation",e),new Ke(e[0],e[1])):J}},J=new Ke("{{","}}")}}),rr={};He(rr,{IvyParser:()=>nr,Parser:()=>Qe,SplitInterpolation:()=>Ve,TemplateBindingParseResult:()=>qe,_ParseAST:()=>D});var Ve,qe,Qe,nr,Z,D,St,yt,Or=Y({"node_modules/@angular/compiler/esm2015/src/expression_parser/parser.js"(){L(),Xt(),Ir(),et(),er(),Ve=class{constructor(e,t,r){this.strings=e,this.expressions=t,this.offsets=r}},qe=class{constructor(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}},Qe=class{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=St}parseAction(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:J;this._checkNoInterpolation(e,t,n);let s=this._stripComments(e),a=this._lexer.tokenize(this._stripComments(e)),i=new D(e,t,r,a,s.length,!0,this.errors,e.length-s.length).parseChain();return new V(i,e,t,r,this.errors)}parseBinding(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:J,s=this._parseBindingAst(e,t,r,n);return new V(s,e,t,r,this.errors)}checkSimpleExpression(e){let t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:J,s=this._parseBindingAst(e,t,r,n),a=this.checkSimpleExpression(s);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new V(s,e,t,r,this.errors)}_reportError(e,t,r,n){this.errors.push(new ae(e,t,r,n))}_parseBindingAst(e,t,r,n){let s=this._parseQuote(e,t,r);if(s!=null)return s;this._checkNoInterpolation(e,t,n);let a=this._stripComments(e),i=this._lexer.tokenize(a);return new D(e,t,r,i,a.length,!1,this.errors,e.length-a.length).parseChain()}_parseQuote(e,t,r){if(e==null)return null;let n=e.indexOf(":");if(n==-1)return null;let s=e.substring(0,n).trim();if(!Yt(s))return null;let a=e.substring(n+1),i=new q(0,e.length);return new be(i,i.toAbsolute(r),s,a,t)}parseTemplateBindings(e,t,r,n,s){let a=this._lexer.tokenize(t);return new D(t,r,s,a,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new U(n,n+e.length)})}parseInterpolation(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:J,{strings:s,expressions:a,offsets:i}=this.splitInterpolation(e,t,n);if(a.length===0)return null;let h=[];for(let l=0;ll.text),h,e,t,r)}parseInterpolationExpression(e,t,r){let n=this._stripComments(e),s=this._lexer.tokenize(n),a=new D(e,t,r,s,n.length,!1,this.errors,0).parseChain(),i=["",""];return this.createInterpolationAst(i,[a],e,t,r)}createInterpolationAst(e,t,r,n,s){let a=new q(0,r.length),i=new me(a,a.toAbsolute(s),e,t);return new V(i,r,n,s,this.errors)}splitInterpolation(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J,n=[],s=[],a=[],i=0,h=!1,l=!1,{start:P,end:p}=r;for(;i-1)break;a>-1&&i>-1&&this._reportError(`Got interpolation (${n}${s}) where expression was expected`,e,`at column ${a} in`,t)}_getInterpolationEndIndex(e,t,r){for(let n of this._forEachUnquotedChar(e,r)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let r=null,n=0;for(let s=t;s=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let r=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(r=t),e>r){let n=r;r=e,e=n}return new q(e,r)}sourceSpan(e,t){let r=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(r)||this.sourceSpanCache.set(r,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(r)}advance(){this.index++}withContext(e,t){this.context|=e;let r=t();return this.context^=e,r}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error(`Missing expected ${String.fromCharCode(e)}`)}consumeOptionalOperator(e){return this.next.isOperator(e)?(this.advance(),!0):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Ie?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new B(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==S.Operator;){let r=this.next.strValue;switch(r){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new B(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==S.Operator;){let r=this.next.strValue;switch(r){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new B(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parsePrefix(){if(this.next.type==S.Operator){let e=this.inputIndex,t=this.next.strValue,r;switch(t){case"+":return this.advance(),r=this.parsePrefix(),F.createPlus(this.span(e),this.sourceSpan(e),r);case"-":return this.advance(),r=this.parsePrefix(),F.createMinus(this.span(e),this.sourceSpan(e),r);case"!":return this.advance(),r=this.parsePrefix(),new xe(this.span(e),this.sourceSpan(e),r)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(H))t=this.parseAccessMemberOrMethodCall(t,e,!1);else if(this.consumeOptionalOperator("?."))t=this.consumeOptionalCharacter(Ae)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMemberOrMethodCall(t,e,!0);else if(this.consumeOptionalCharacter(Ae))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(Ee)){this.rparensExpected++;let r=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(z),t=new Pe(this.span(e),this.sourceSpan(e),t,r)}else if(this.consumeOptionalOperator("!"))t=new Se(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(Ee)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(z),t}else{if(this.next.isKeywordNull())return this.advance(),new $(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new $(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new $(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new $(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Je(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(Ae)){this.rbracketsExpected++;let t=this.parseExpressionList(re);return this.rbracketsExpected--,this.expectCharacter(re),new ge(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(Te))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new Oe(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new $(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new $(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new K(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new K(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new K(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(ee));return t}parseLiteralMap(){let e=[],t=[],r=this.inputIndex;if(this.expectCharacter(Te),!this.consumeOptionalCharacter(_e)){this.rbracesExpected++;do{let n=this.inputIndex,s=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:s}),s)this.expectCharacter(X),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(X))t.push(this.parsePipe());else{let i=this.span(n),h=this.sourceSpan(n);t.push(new ne(i,h,h,new Oe(i,h),a))}}while(this.consumeOptionalCharacter(ee));this.rbracesExpected--,this.expectCharacter(_e)}return new ve(this.span(r),this.sourceSpan(r),e,t)}parseAccessMemberOrMethodCall(e,t,r){let n=this.inputIndex,s=this.withContext(Z.Writable,()=>{var i;let h=(i=this.expectIdentifierOrKeyword())!==null&&i!==void 0?i:"";return h.length===0&&this.error("Expected identifier for property access",e.span.end),h}),a=this.sourceSpan(n);if(this.consumeOptionalCharacter(Ee)){let i=this.inputIndex;this.rparensExpected++;let h=this.parseCallArguments(),l=this.span(i,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(z),this.rparensExpected--;let P=this.span(t),p=this.sourceSpan(t);return r?new we(P,p,a,e,s,h,l):new ye(P,p,a,e,s,h,l)}else{if(r)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new K(this.span(t),this.sourceSpan(t))):new le(this.span(t),this.sourceSpan(t),a,e,s);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new K(this.span(t),this.sourceSpan(t));let i=this.parseConditional();return new ue(this.span(t),this.sourceSpan(t),a,e,s,i)}else return new ne(this.span(t),this.sourceSpan(t),a,e,s)}}parseCallArguments(){if(this.next.isCharacter(z))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(ee));return e}expectTemplateBindingKey(){let e="",t=!1,r=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new U(r,r+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof K&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(re),this.consumeOptionalOperator("="))if(r)this.error("The '?.' operator cannot be used in the assignment");else{let s=this.parseConditional();return new de(this.span(t),this.sourceSpan(t),e,n,s)}else return r?new pe(this.span(t),this.sourceSpan(t),e,n):new he(this.span(t),this.sourceSpan(t),e,n);return new K(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(X);let r=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,s=this.parseAsBinding(e);s||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new U(e.span.start,n);return t.push(new Ye(a,e,r)),s&&t.push(s),t}getDirectiveBoundTarget(){if(this.next===Ie||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:r}=e.span,n=this.input.substring(t,r);return new V(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let r=new U(e.span.start,this.currentAbsoluteOffset);return new Le(r,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),r=null;this.consumeOptionalOperator("=")&&(r=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new U(e,this.currentAbsoluteOffset);return new Le(n,t,r)}consumeStatementTerminator(){this.consumeOptionalCharacter(te)||this.consumeOptionalCharacter(ee)}error(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.errors.push(new ae(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e==null&&(e=this.index),er.visit(this,t))}visitChain(e,t){}visitQuote(e,t){}visitSafeKeyedRead(e,t){}},yt=class extends Ze{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}}}),dt=W({"node_modules/angular-estree-parser/lib/utils.js"(e){"use strict";L(),Object.defineProperty(e,"__esModule",{value:!0}),e.getLast=e.toLowerCamelCase=e.findBackChar=e.findFrontChar=e.fitSpans=e.getNgType=e.parseNgInterpolation=e.parseNgTemplateBindings=e.parseNgAction=e.parseNgSimpleBinding=e.parseNgBinding=e.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX=void 0;var t=(et(),Ne(Xe)),r=(er(),Ne(Jt)),n=(Or(),Ne(rr)),s="angular-estree-parser";e.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX="NgEstreeParser";var a=0,i=[s,a];function h(){return new n.Parser(new r.Lexer)}function l(o,d){let y=h(),{astInput:E,comments:A}=T(o,y),{ast:I,errors:j}=d(E,y);return R(j),{ast:I,comments:A}}function P(o){return l(o,(d,y)=>y.parseBinding(d,...i))}e.parseNgBinding=P;function p(o){return l(o,(d,y)=>y.parseSimpleBinding(d,...i))}e.parseNgSimpleBinding=p;function x(o){return l(o,(d,y)=>y.parseAction(d,...i))}e.parseNgAction=x;function C(o){let d=h(),{templateBindings:y,errors:E}=d.parseTemplateBindings(e.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX,o,s,a,a);return R(E),y}e.parseNgTemplateBindings=C;function b(o){let d=h(),{astInput:y,comments:E}=T(o,d),A="{{",I="}}",{ast:j,errors:ir}=d.parseInterpolation(A+y+I,...i);R(ir);let ft=j.expressions[0],gt=new Set;return _(ft,ke=>{gt.has(ke)||(ke.start-=A.length,ke.end-=A.length,gt.add(ke))}),{ast:ft,comments:E}}e.parseNgInterpolation=b;function _(o,d){if(!(!o||typeof o!="object")){if(Array.isArray(o))return o.forEach(y=>_(y,d));for(let y of Object.keys(o)){let E=o[y];y==="span"?d(E):_(E,d)}}}function R(o){if(o.length!==0){let[{message:d}]=o;throw new SyntaxError(d.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function T(o,d){let y=d._commentStart(o);return y===null?{astInput:o,comments:[]}:{astInput:o.slice(0,y),comments:[{type:"Comment",value:o.slice(y+2),span:{start:y,end:o.length}}]}}function O(o){return t.Unary&&o instanceof t.Unary?"Unary":o instanceof t.Binary?"Binary":o instanceof t.BindingPipe?"BindingPipe":o instanceof t.Chain?"Chain":o instanceof t.Conditional?"Conditional":o instanceof t.EmptyExpr?"EmptyExpr":o instanceof t.FunctionCall?"FunctionCall":o instanceof t.ImplicitReceiver?"ImplicitReceiver":o instanceof t.KeyedRead?"KeyedRead":o instanceof t.KeyedWrite?"KeyedWrite":o instanceof t.LiteralArray?"LiteralArray":o instanceof t.LiteralMap?"LiteralMap":o instanceof t.LiteralPrimitive?"LiteralPrimitive":o instanceof t.MethodCall?"MethodCall":o instanceof t.NonNullAssert?"NonNullAssert":o instanceof t.PrefixNot?"PrefixNot":o instanceof t.PropertyRead?"PropertyRead":o instanceof t.PropertyWrite?"PropertyWrite":o instanceof t.Quote?"Quote":o instanceof t.SafeMethodCall?"SafeMethodCall":o instanceof t.SafePropertyRead?"SafePropertyRead":o.type}e.getNgType=O;function N(o,d){let{start:y,end:E}=o,A=y,I=E;for(;I!==A&&/\s/.test(d[I-1]);)I--;for(;A!==I&&/\s/.test(d[A]);)A++;return{start:A,end:I}}function c(o,d){let{start:y,end:E}=o,A=y,I=E;for(;I!==d.length&&/\s/.test(d[I]);)I++;for(;A!==0&&/\s/.test(d[A-1]);)A--;return{start:A,end:I}}function g(o,d){return d[o.start-1]==="("&&d[o.end]===")"?{start:o.start-1,end:o.end+1}:o}function u(o,d,y){let E=0,A={start:o.start,end:o.end};for(;;){let I=c(A,d),j=g(I,d);if(I.start===j.start&&I.end===j.end)break;A.start=j.start,A.end=j.end,E++}return{hasParens:(y?E-1:E)!==0,outerSpan:N(y?{start:A.start+1,end:A.end-1}:A,d),innerSpan:N(o,d)}}e.fitSpans=u;function v(o,d,y){let E=d;for(;!o.test(y[E]);)if(--E<0)throw new Error(`Cannot find front char ${o} from index ${d} in ${JSON.stringify(y)}`);return E}e.findFrontChar=v;function m(o,d,y){let E=d;for(;!o.test(y[E]);)if(++E>=y.length)throw new Error(`Cannot find back char ${o} from index ${d} in ${JSON.stringify(y)}`);return E}e.findBackChar=m;function f(o){return o.slice(0,1).toLowerCase()+o.slice(1)}e.toLowerCamelCase=f;function w(o){return o.length===0?void 0:o[o.length-1]}e.getLast=w}}),sr=W({"node_modules/angular-estree-parser/lib/transform.js"(e){"use strict";L(),Object.defineProperty(e,"__esModule",{value:!0}),e.transformSpan=e.transform=void 0;var t=dt(),r=function(s,a){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,h=t.getNgType(s);switch(h){case"Unary":{let{operator:c,expr:g}=s,u=l(g);return p("UnaryExpression",{prefix:!0,argument:u,operator:c},s.span,{hasParentParens:i})}case"Binary":{let{left:c,operation:g,right:u}=s,v=u.span.start===u.span.end,m=c.span.start===c.span.end;if(v||m){let o=c.span.start===c.span.end?l(u):l(c);return p("UnaryExpression",{prefix:!0,argument:o,operator:v?"+":"-"},{start:s.span.start,end:N(o)},{hasParentParens:i})}let f=l(c),w=l(u);return p(g==="&&"||g==="||"?"LogicalExpression":"BinaryExpression",{left:f,right:w,operator:g},{start:O(f),end:N(w)},{hasParentParens:i})}case"BindingPipe":{let{exp:c,name:g,args:u}=s,v=l(c),m=b(/\S/,b(/\|/,N(v))+1),f=p("Identifier",{name:g},{start:m,end:m+g.length}),w=u.map(l);return p("NGPipeExpression",{left:v,right:f,arguments:w},{start:O(v),end:N(w.length===0?f:t.getLast(w))},{hasParentParens:i})}case"Chain":{let{expressions:c}=s;return p("NGChainedExpression",{expressions:c.map(l)},s.span,{hasParentParens:i})}case"Comment":{let{value:c}=s;return p("CommentLine",{value:c},s.span,{processSpan:!1})}case"Conditional":{let{condition:c,trueExp:g,falseExp:u}=s,v=l(c),m=l(g),f=l(u);return p("ConditionalExpression",{test:v,consequent:m,alternate:f},{start:O(v),end:N(f)},{hasParentParens:i})}case"EmptyExpr":return p("NGEmptyExpression",{},s.span,{hasParentParens:i});case"FunctionCall":{let{target:c,args:g}=s,u=g.length===1?[P(g[0])]:g.map(l),v=l(c);return p("CallExpression",{callee:v,arguments:u},{start:O(v),end:s.span.end},{hasParentParens:i})}case"ImplicitReceiver":return p("ThisExpression",{},s.span,{hasParentParens:i});case"KeyedRead":{let{key:c}=s,g=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,u=l(c);return x(g,u,{computed:!0,optional:!1},{end:s.span.end,hasParentParens:i})}case"LiteralArray":{let{expressions:c}=s;return p("ArrayExpression",{elements:c.map(l)},s.span,{hasParentParens:i})}case"LiteralMap":{let{keys:c,values:g}=s,u=g.map(m=>l(m)),v=c.map((m,f)=>{let{key:w,quoted:o}=m,d=u[f],y=b(/\S/,f===0?s.span.start+1:b(/,/,N(u[f-1]))+1),E=C(/\S/,C(/:/,O(d)-1)-1)+1,A={start:y,end:E},I=o?p("StringLiteral",{value:w},A):p("Identifier",{name:w},A),j=I.end3&&arguments[3]!==void 0?arguments[3]:{},f=Object.assign(Object.assign({type:c},n(u,a,v,m)),g);switch(c){case"Identifier":{let w=f;w.loc.identifierName=w.name;break}case"NumericLiteral":{let w=f;w.extra=Object.assign(Object.assign({},w.extra),{raw:a.text.slice(w.start,w.end),rawValue:w.value});break}case"StringLiteral":{let w=f;w.extra=Object.assign(Object.assign({},w.extra),{raw:a.text.slice(w.start,w.end),rawValue:w.value});break}}return f}function x(c,g,u){let{end:v=N(g),hasParentParens:m=!1}=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(_(c)||c.span.start===g.start)return g;let f=l(c),w=R(f);return p(u.optional||w?"OptionalMemberExpression":"MemberExpression",Object.assign({object:f,property:g,computed:u.computed},u.optional?{optional:!0}:w?{optional:!1}:null),{start:O(f),end:v},{hasParentParens:m})}function C(c,g){return t.findFrontChar(c,g,a.text)}function b(c,g){return t.findBackChar(c,g,a.text)}function _(c){return c.span.start>=c.span.end||/^\s+$/.test(a.text.slice(c.span.start,c.span.end))}function R(c){return(c.type==="OptionalCallExpression"||c.type==="OptionalMemberExpression")&&!T(c)}function T(c){return c.extra&&c.extra.parenthesized}function O(c){return T(c)?c.extra.parenStart:c.start}function N(c){return T(c)?c.extra.parenEnd:c.end}};e.transform=r;function n(s,a){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!i){let{start:x,end:C}=s;return{start:x,end:C,loc:{start:a.locator.locationForIndex(x),end:a.locator.locationForIndex(C)}}}let{outerSpan:l,innerSpan:P,hasParens:p}=t.fitSpans(s,a.text,h);return Object.assign({start:P.start,end:P.end,loc:{start:a.locator.locationForIndex(P.start),end:a.locator.locationForIndex(P.end)}},p&&{extra:{parenthesized:!0,parenStart:l.start,parenEnd:l.end}})}e.transformSpan=n}}),kr=W({"node_modules/angular-estree-parser/lib/transform-microsyntax.js"(e){"use strict";L(),Object.defineProperty(e,"__esModule",{value:!0}),e.transformTemplateBindings=void 0;var t=(et(),Ne(Xe)),r=sr(),n=dt();function s(a,i){a.forEach(N);let[h]=a,{key:l}=h,P=i.text.slice(h.sourceSpan.start,h.sourceSpan.end).trim().length===0?a.slice(1):a,p=[],x=null;for(let u=0;uObject.assign(Object.assign({},d),r.transformSpan({start:d.start,end:y},i)),w=d=>Object.assign(Object.assign({},f(d,m.end)),{alias:m}),o=p.pop();if(o.type==="NGMicrosyntaxExpression")p.push(w(o));else if(o.type==="NGMicrosyntaxKeyedExpression"){let d=w(o.expression);p.push(f(Object.assign(Object.assign({},o),{expression:d}),d.end))}else throw new Error(`Unexpected type ${o.type}`)}else p.push(C(v,u));x=v}return _("NGMicrosyntax",{body:p},p.length===0?a[0].sourceSpan:{start:p[0].start,end:p[p.length-1].end});function C(u,v){if(T(u)){let{key:m,value:f}=u;return f?v===0?_("NGMicrosyntaxExpression",{expression:b(f.ast),alias:null},f.sourceSpan):_("NGMicrosyntaxKeyedExpression",{key:_("NGMicrosyntaxKey",{name:R(m.source)},m.span),expression:_("NGMicrosyntaxExpression",{expression:b(f.ast),alias:null},f.sourceSpan)},{start:m.span.start,end:f.sourceSpan.end}):_("NGMicrosyntaxKey",{name:R(m.source)},m.span)}else{let{key:m,sourceSpan:f}=u;if(/^let\s$/.test(i.text.slice(f.start,f.start+4))){let{value:o}=u;return _("NGMicrosyntaxLet",{key:_("NGMicrosyntaxKey",{name:m.source},m.span),value:o?_("NGMicrosyntaxKey",{name:o.source},o.span):null},{start:f.start,end:o?o.span.end:m.span.end})}else{let o=g(u);return _("NGMicrosyntaxAs",{key:_("NGMicrosyntaxKey",{name:o.source},o.span),alias:_("NGMicrosyntaxKey",{name:m.source},m.span)},{start:o.span.start,end:m.span.end})}}}function b(u){return r.transform(u,i)}function _(u,v,m){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Object.assign(Object.assign({type:u},r.transformSpan(m,i,f)),v)}function R(u){return n.toLowerCamelCase(u.slice(l.source.length))}function T(u){return u instanceof t.ExpressionBinding}function O(u){return u instanceof t.VariableBinding}function N(u){c(u.key.span),O(u)&&u.value&&c(u.value.span)}function c(u){if(i.text[u.start]!=='"'&&i.text[u.start]!=="'")return;let v=i.text[u.start],m=!1;for(let f=u.start+1;fr.transform(N,R),O=T(b);return O.comments=_.map(T),O}function i(x){return a(x,s.parseNgBinding)}e.parseBinding=i;function h(x){return a(x,s.parseNgSimpleBinding)}e.parseSimpleBinding=h;function l(x){return a(x,s.parseNgInterpolation)}e.parseInterpolation=l;function P(x){return a(x,s.parseNgAction)}e.parseAction=P;function p(x){return n.transformTemplateBindings(s.parseNgTemplateBindings(x),new t.Context(x))}e.parseTemplateBindings=p}}),br=W({"src/language-js/parse/angular.js"(e,t){L();var{locStart:r,locEnd:n}=lr();function s(a){return{astFormat:"estree",parse:(h,l,P)=>{let p=Nr(),x=a(h,p);return{type:"NGRoot",node:P.parser==="__ng_action"&&x.type!=="NGChainedExpression"?Object.assign(Object.assign({},x),{},{type:"NGChainedExpression",expressions:[x]}):x}},locStart:r,locEnd:n}}t.exports={parsers:{__ng_action:s((a,i)=>i.parseAction(a)),__ng_binding:s((a,i)=>i.parseBinding(a)),__ng_interpolation:s((a,i)=>i.parseInterpolation(a)),__ng_directive:s((a,i)=>i.parseTemplateBindings(a))}}}}),Lr=br();export{Lr as default};
diff --git a/node_modules/prettier/esm/parser-babel.mjs b/node_modules/prettier/esm/parser-babel.mjs
new file mode 100644
index 0000000..ba56127
--- /dev/null
+++ b/node_modules/prettier/esm/parser-babel.mjs
@@ -0,0 +1,29 @@
+var v=(l,h)=>()=>(h||l((h={exports:{}}).exports,h),h.exports);var de=v((Rf,ai)=>{var Dt=function(l){return l&&l.Math==Math&&l};ai.exports=Dt(typeof globalThis=="object"&&globalThis)||Dt(typeof window=="object"&&window)||Dt(typeof self=="object"&&self)||Dt(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var me=v((jf,ni)=>{ni.exports=function(l){try{return!!l()}catch{return!0}}});var Se=v((qf,oi)=>{var yh=me();oi.exports=!yh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Ft=v((Uf,li)=>{var xh=me();li.exports=!xh(function(){var l=function(){}.bind();return typeof l!="function"||l.hasOwnProperty("prototype")})});var Ot=v(($f,hi)=>{var gh=Ft(),Lt=Function.prototype.call;hi.exports=gh?Lt.bind(Lt):function(){return Lt.apply(Lt,arguments)}});var fi=v(pi=>{"use strict";var ui={}.propertyIsEnumerable,ci=Object.getOwnPropertyDescriptor,Ph=ci&&!ui.call({1:2},1);pi.f=Ph?function(h){var f=ci(this,h);return!!f&&f.enumerable}:ui});var Ps=v((zf,di)=>{di.exports=function(l,h){return{enumerable:!(l&1),configurable:!(l&2),writable:!(l&4),value:h}}});var ye=v((Vf,xi)=>{var mi=Ft(),yi=Function.prototype,As=yi.call,Ah=mi&&yi.bind.bind(As,As);xi.exports=mi?Ah:function(l){return function(){return As.apply(l,arguments)}}});var lt=v((Kf,Pi)=>{var gi=ye(),Th=gi({}.toString),vh=gi("".slice);Pi.exports=function(l){return vh(Th(l),8,-1)}});var Ti=v((Wf,Ai)=>{var Eh=ye(),bh=me(),Ch=lt(),Ts=Object,Sh=Eh("".split);Ai.exports=bh(function(){return!Ts("z").propertyIsEnumerable(0)})?function(l){return Ch(l)=="String"?Sh(l,""):Ts(l)}:Ts});var vs=v((Gf,vi)=>{vi.exports=function(l){return l==null}});var Es=v((Jf,Ei)=>{var wh=vs(),Ih=TypeError;Ei.exports=function(l){if(wh(l))throw Ih("Can't call method on "+l);return l}});var Bt=v((Xf,bi)=>{var Nh=Ti(),kh=Es();bi.exports=function(l){return Nh(kh(l))}});var Cs=v((Yf,Ci)=>{var bs=typeof document=="object"&&document.all,Dh=typeof bs>"u"&&bs!==void 0;Ci.exports={all:bs,IS_HTMLDDA:Dh}});var ue=v((Qf,wi)=>{var Si=Cs(),Fh=Si.all;wi.exports=Si.IS_HTMLDDA?function(l){return typeof l=="function"||l===Fh}:function(l){return typeof l=="function"}});var qe=v((Zf,ki)=>{var Ii=ue(),Ni=Cs(),Lh=Ni.all;ki.exports=Ni.IS_HTMLDDA?function(l){return typeof l=="object"?l!==null:Ii(l)||l===Lh}:function(l){return typeof l=="object"?l!==null:Ii(l)}});var ht=v((ed,Di)=>{var Ss=de(),Oh=ue(),Bh=function(l){return Oh(l)?l:void 0};Di.exports=function(l,h){return arguments.length<2?Bh(Ss[l]):Ss[l]&&Ss[l][h]}});var Li=v((td,Fi)=>{var Mh=ye();Fi.exports=Mh({}.isPrototypeOf)});var Bi=v((sd,Oi)=>{var _h=ht();Oi.exports=_h("navigator","userAgent")||""});var $i=v((rd,Ui)=>{var qi=de(),ws=Bi(),Mi=qi.process,_i=qi.Deno,Ri=Mi&&Mi.versions||_i&&_i.version,ji=Ri&&Ri.v8,xe,Mt;ji&&(xe=ji.split("."),Mt=xe[0]>0&&xe[0]<4?1:+(xe[0]+xe[1]));!Mt&&ws&&(xe=ws.match(/Edge\/(\d+)/),(!xe||xe[1]>=74)&&(xe=ws.match(/Chrome\/(\d+)/),xe&&(Mt=+xe[1])));Ui.exports=Mt});var Is=v((id,zi)=>{var Hi=$i(),Rh=me();zi.exports=!!Object.getOwnPropertySymbols&&!Rh(function(){var l=Symbol();return!String(l)||!(Object(l)instanceof Symbol)||!Symbol.sham&&Hi&&Hi<41})});var Ns=v((ad,Vi)=>{var jh=Is();Vi.exports=jh&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var ks=v((nd,Ki)=>{var qh=ht(),Uh=ue(),$h=Li(),Hh=Ns(),zh=Object;Ki.exports=Hh?function(l){return typeof l=="symbol"}:function(l){var h=qh("Symbol");return Uh(h)&&$h(h.prototype,zh(l))}});var Gi=v((od,Wi)=>{var Vh=String;Wi.exports=function(l){try{return Vh(l)}catch{return"Object"}}});var _t=v((ld,Ji)=>{var Kh=ue(),Wh=Gi(),Gh=TypeError;Ji.exports=function(l){if(Kh(l))return l;throw Gh(Wh(l)+" is not a function")}});var Yi=v((hd,Xi)=>{var Jh=_t(),Xh=vs();Xi.exports=function(l,h){var f=l[h];return Xh(f)?void 0:Jh(f)}});var Zi=v((ud,Qi)=>{var Ds=Ot(),Fs=ue(),Ls=qe(),Yh=TypeError;Qi.exports=function(l,h){var f,d;if(h==="string"&&Fs(f=l.toString)&&!Ls(d=Ds(f,l))||Fs(f=l.valueOf)&&!Ls(d=Ds(f,l))||h!=="string"&&Fs(f=l.toString)&&!Ls(d=Ds(f,l)))return d;throw Yh("Can't convert object to primitive value")}});var ta=v((cd,ea)=>{ea.exports=!1});var Rt=v((pd,ra)=>{var sa=de(),Qh=Object.defineProperty;ra.exports=function(l,h){try{Qh(sa,l,{value:h,configurable:!0,writable:!0})}catch{sa[l]=h}return h}});var jt=v((fd,aa)=>{var Zh=de(),eu=Rt(),ia="__core-js_shared__",tu=Zh[ia]||eu(ia,{});aa.exports=tu});var Os=v((dd,oa)=>{var su=ta(),na=jt();(oa.exports=function(l,h){return na[l]||(na[l]=h!==void 0?h:{})})("versions",[]).push({version:"3.26.1",mode:su?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})});var Bs=v((md,la)=>{var ru=Es(),iu=Object;la.exports=function(l){return iu(ru(l))}});var Le=v((yd,ha)=>{var au=ye(),nu=Bs(),ou=au({}.hasOwnProperty);ha.exports=Object.hasOwn||function(h,f){return ou(nu(h),f)}});var Ms=v((xd,ua)=>{var lu=ye(),hu=0,uu=Math.random(),cu=lu(1 .toString);ua.exports=function(l){return"Symbol("+(l===void 0?"":l)+")_"+cu(++hu+uu,36)}});var ut=v((gd,ma)=>{var pu=de(),fu=Os(),ca=Le(),du=Ms(),pa=Is(),da=Ns(),Qe=fu("wks"),Ue=pu.Symbol,fa=Ue&&Ue.for,mu=da?Ue:Ue&&Ue.withoutSetter||du;ma.exports=function(l){if(!ca(Qe,l)||!(pa||typeof Qe[l]=="string")){var h="Symbol."+l;pa&&ca(Ue,l)?Qe[l]=Ue[l]:da&&fa?Qe[l]=fa(h):Qe[l]=mu(h)}return Qe[l]}});var Pa=v((Pd,ga)=>{var yu=Ot(),ya=qe(),xa=ks(),xu=Yi(),gu=Zi(),Pu=ut(),Au=TypeError,Tu=Pu("toPrimitive");ga.exports=function(l,h){if(!ya(l)||xa(l))return l;var f=xu(l,Tu),d;if(f){if(h===void 0&&(h="default"),d=yu(f,l,h),!ya(d)||xa(d))return d;throw Au("Can't convert object to primitive value")}return h===void 0&&(h="number"),gu(l,h)}});var _s=v((Ad,Aa)=>{var vu=Pa(),Eu=ks();Aa.exports=function(l){var h=vu(l,"string");return Eu(h)?h:h+""}});var Ea=v((Td,va)=>{var bu=de(),Ta=qe(),Rs=bu.document,Cu=Ta(Rs)&&Ta(Rs.createElement);va.exports=function(l){return Cu?Rs.createElement(l):{}}});var js=v((vd,ba)=>{var Su=Se(),wu=me(),Iu=Ea();ba.exports=!Su&&!wu(function(){return Object.defineProperty(Iu("div"),"a",{get:function(){return 7}}).a!=7})});var qs=v(Sa=>{var Nu=Se(),ku=Ot(),Du=fi(),Fu=Ps(),Lu=Bt(),Ou=_s(),Bu=Le(),Mu=js(),Ca=Object.getOwnPropertyDescriptor;Sa.f=Nu?Ca:function(h,f){if(h=Lu(h),f=Ou(f),Mu)try{return Ca(h,f)}catch{}if(Bu(h,f))return Fu(!ku(Du.f,h,f),h[f])}});var Ia=v((bd,wa)=>{var _u=Se(),Ru=me();wa.exports=_u&&Ru(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var qt=v((Cd,Na)=>{var ju=qe(),qu=String,Uu=TypeError;Na.exports=function(l){if(ju(l))return l;throw Uu(qu(l)+" is not an object")}});var ct=v(Da=>{var $u=Se(),Hu=js(),zu=Ia(),Ut=qt(),ka=_s(),Vu=TypeError,Us=Object.defineProperty,Ku=Object.getOwnPropertyDescriptor,$s="enumerable",Hs="configurable",zs="writable";Da.f=$u?zu?function(h,f,d){if(Ut(h),f=ka(f),Ut(d),typeof h=="function"&&f==="prototype"&&"value"in d&&zs in d&&!d[zs]){var y=Ku(h,f);y&&y[zs]&&(h[f]=d.value,d={configurable:Hs in d?d[Hs]:y[Hs],enumerable:$s in d?d[$s]:y[$s],writable:!1})}return Us(h,f,d)}:Us:function(h,f,d){if(Ut(h),f=ka(f),Ut(d),Hu)try{return Us(h,f,d)}catch{}if("get"in d||"set"in d)throw Vu("Accessors not supported");return"value"in d&&(h[f]=d.value),h}});var Vs=v((wd,Fa)=>{var Wu=Se(),Gu=ct(),Ju=Ps();Fa.exports=Wu?function(l,h,f){return Gu.f(l,h,Ju(1,f))}:function(l,h,f){return l[h]=f,l}});var Ba=v((Id,Oa)=>{var Ks=Se(),Xu=Le(),La=Function.prototype,Yu=Ks&&Object.getOwnPropertyDescriptor,Ws=Xu(La,"name"),Qu=Ws&&function(){}.name==="something",Zu=Ws&&(!Ks||Ks&&Yu(La,"name").configurable);Oa.exports={EXISTS:Ws,PROPER:Qu,CONFIGURABLE:Zu}});var Js=v((Nd,Ma)=>{var ec=ye(),tc=ue(),Gs=jt(),sc=ec(Function.toString);tc(Gs.inspectSource)||(Gs.inspectSource=function(l){return sc(l)});Ma.exports=Gs.inspectSource});var ja=v((kd,Ra)=>{var rc=de(),ic=ue(),_a=rc.WeakMap;Ra.exports=ic(_a)&&/native code/.test(String(_a))});var $a=v((Dd,Ua)=>{var ac=Os(),nc=Ms(),qa=ac("keys");Ua.exports=function(l){return qa[l]||(qa[l]=nc(l))}});var Xs=v((Fd,Ha)=>{Ha.exports={}});var Wa=v((Ld,Ka)=>{var oc=ja(),Va=de(),lc=qe(),hc=Vs(),Ys=Le(),Qs=jt(),uc=$a(),cc=Xs(),za="Object already initialized",Zs=Va.TypeError,pc=Va.WeakMap,$t,pt,Ht,fc=function(l){return Ht(l)?pt(l):$t(l,{})},dc=function(l){return function(h){var f;if(!lc(h)||(f=pt(h)).type!==l)throw Zs("Incompatible receiver, "+l+" required");return f}};oc||Qs.state?(ge=Qs.state||(Qs.state=new pc),ge.get=ge.get,ge.has=ge.has,ge.set=ge.set,$t=function(l,h){if(ge.has(l))throw Zs(za);return h.facade=l,ge.set(l,h),h},pt=function(l){return ge.get(l)||{}},Ht=function(l){return ge.has(l)}):($e=uc("state"),cc[$e]=!0,$t=function(l,h){if(Ys(l,$e))throw Zs(za);return h.facade=l,hc(l,$e,h),h},pt=function(l){return Ys(l,$e)?l[$e]:{}},Ht=function(l){return Ys(l,$e)});var ge,$e;Ka.exports={set:$t,get:pt,has:Ht,enforce:fc,getterFor:dc}});var tr=v((Od,Ja)=>{var mc=me(),yc=ue(),zt=Le(),er=Se(),xc=Ba().CONFIGURABLE,gc=Js(),Ga=Wa(),Pc=Ga.enforce,Ac=Ga.get,Vt=Object.defineProperty,Tc=er&&!mc(function(){return Vt(function(){},"length",{value:8}).length!==8}),vc=String(String).split("String"),Ec=Ja.exports=function(l,h,f){String(h).slice(0,7)==="Symbol("&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),f&&f.getter&&(h="get "+h),f&&f.setter&&(h="set "+h),(!zt(l,"name")||xc&&l.name!==h)&&(er?Vt(l,"name",{value:h,configurable:!0}):l.name=h),Tc&&f&&zt(f,"arity")&&l.length!==f.arity&&Vt(l,"length",{value:f.arity});try{f&&zt(f,"constructor")&&f.constructor?er&&Vt(l,"prototype",{writable:!1}):l.prototype&&(l.prototype=void 0)}catch{}var d=Pc(l);return zt(d,"source")||(d.source=vc.join(typeof h=="string"?h:"")),l};Function.prototype.toString=Ec(function(){return yc(this)&&Ac(this).source||gc(this)},"toString")});var Ya=v((Bd,Xa)=>{var bc=ue(),Cc=ct(),Sc=tr(),wc=Rt();Xa.exports=function(l,h,f,d){d||(d={});var y=d.enumerable,g=d.name!==void 0?d.name:h;if(bc(f)&&Sc(f,g,d),d.global)y?l[h]=f:wc(h,f);else{try{d.unsafe?l[h]&&(y=!0):delete l[h]}catch{}y?l[h]=f:Cc.f(l,h,{value:f,enumerable:!1,configurable:!d.nonConfigurable,writable:!d.nonWritable})}return l}});var Za=v((Md,Qa)=>{var Ic=Math.ceil,Nc=Math.floor;Qa.exports=Math.trunc||function(h){var f=+h;return(f>0?Nc:Ic)(f)}});var sr=v((_d,en)=>{var kc=Za();en.exports=function(l){var h=+l;return h!==h||h===0?0:kc(h)}});var sn=v((Rd,tn)=>{var Dc=sr(),Fc=Math.max,Lc=Math.min;tn.exports=function(l,h){var f=Dc(l);return f<0?Fc(f+h,0):Lc(f,h)}});var an=v((jd,rn)=>{var Oc=sr(),Bc=Math.min;rn.exports=function(l){return l>0?Bc(Oc(l),9007199254740991):0}});var Kt=v((qd,nn)=>{var Mc=an();nn.exports=function(l){return Mc(l.length)}});var hn=v((Ud,ln)=>{var _c=Bt(),Rc=sn(),jc=Kt(),on=function(l){return function(h,f,d){var y=_c(h),g=jc(y),A=Rc(d,g),E;if(l&&f!=f){for(;g>A;)if(E=y[A++],E!=E)return!0}else for(;g>A;A++)if((l||A in y)&&y[A]===f)return l||A||0;return!l&&-1}};ln.exports={includes:on(!0),indexOf:on(!1)}});var pn=v(($d,cn)=>{var qc=ye(),rr=Le(),Uc=Bt(),$c=hn().indexOf,Hc=Xs(),un=qc([].push);cn.exports=function(l,h){var f=Uc(l),d=0,y=[],g;for(g in f)!rr(Hc,g)&&rr(f,g)&&un(y,g);for(;h.length>d;)rr(f,g=h[d++])&&(~$c(y,g)||un(y,g));return y}});var dn=v((Hd,fn)=>{fn.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var yn=v(mn=>{var zc=pn(),Vc=dn(),Kc=Vc.concat("length","prototype");mn.f=Object.getOwnPropertyNames||function(h){return zc(h,Kc)}});var gn=v(xn=>{xn.f=Object.getOwnPropertySymbols});var An=v((Kd,Pn)=>{var Wc=ht(),Gc=ye(),Jc=yn(),Xc=gn(),Yc=qt(),Qc=Gc([].concat);Pn.exports=Wc("Reflect","ownKeys")||function(h){var f=Jc.f(Yc(h)),d=Xc.f;return d?Qc(f,d(h)):f}});var En=v((Wd,vn)=>{var Tn=Le(),Zc=An(),ep=qs(),tp=ct();vn.exports=function(l,h,f){for(var d=Zc(h),y=tp.f,g=ep.f,A=0;A{var sp=me(),rp=ue(),ip=/#|\.prototype\./,ft=function(l,h){var f=np[ap(l)];return f==lp?!0:f==op?!1:rp(h)?sp(h):!!h},ap=ft.normalize=function(l){return String(l).replace(ip,".").toLowerCase()},np=ft.data={},op=ft.NATIVE="N",lp=ft.POLYFILL="P";bn.exports=ft});var ar=v((Jd,Sn)=>{var ir=de(),hp=qs().f,up=Vs(),cp=Ya(),pp=Rt(),fp=En(),dp=Cn();Sn.exports=function(l,h){var f=l.target,d=l.global,y=l.stat,g,A,E,S,L,I;if(d?A=ir:y?A=ir[f]||pp(f,{}):A=(ir[f]||{}).prototype,A)for(E in h){if(L=h[E],l.dontCallGetSet?(I=hp(A,E),S=I&&I.value):S=A[E],g=dp(d?E:f+(y?".":"#")+E,l.forced),!g&&S!==void 0){if(typeof L==typeof S)continue;fp(L,S)}(l.sham||S&&S.sham)&&up(L,"sham",!0),cp(A,E,L,l)}}});var wn=v(()=>{var mp=ar(),nr=de();mp({global:!0,forced:nr.globalThis!==nr},{globalThis:nr})});var kn=v((Qd,Nn)=>{var In=tr(),yp=ct();Nn.exports=function(l,h,f){return f.get&&In(f.get,h,{getter:!0}),f.set&&In(f.set,h,{setter:!0}),yp.f(l,h,f)}});var Fn=v((Zd,Dn)=>{"use strict";var xp=qt();Dn.exports=function(){var l=xp(this),h="";return l.hasIndices&&(h+="d"),l.global&&(h+="g"),l.ignoreCase&&(h+="i"),l.multiline&&(h+="m"),l.dotAll&&(h+="s"),l.unicode&&(h+="u"),l.unicodeSets&&(h+="v"),l.sticky&&(h+="y"),h}});var or=v((em,Bn)=>{var bp=lt();Bn.exports=Array.isArray||function(h){return bp(h)=="Array"}});var _n=v((tm,Mn)=>{var Cp=TypeError,Sp=9007199254740991;Mn.exports=function(l){if(l>Sp)throw Cp("Maximum allowed index exceeded");return l}});var jn=v((sm,Rn)=>{var wp=lt(),Ip=ye();Rn.exports=function(l){if(wp(l)==="Function")return Ip(l)}});var $n=v((rm,Un)=>{var qn=jn(),Np=_t(),kp=Ft(),Dp=qn(qn.bind);Un.exports=function(l,h){return Np(l),h===void 0?l:kp?Dp(l,h):function(){return l.apply(h,arguments)}}});var Vn=v((im,zn)=>{"use strict";var Fp=or(),Lp=Kt(),Op=_n(),Bp=$n(),Hn=function(l,h,f,d,y,g,A,E){for(var S=y,L=0,I=A?Bp(A,E):!1,C,O;L0&&Fp(C)?(O=Lp(C),S=Hn(l,h,C,O,S,g-1)-1):(Op(S+1),l[S]=C),S++),L++;return S};zn.exports=Hn});var Gn=v((am,Wn)=>{var Mp=ut(),_p=Mp("toStringTag"),Kn={};Kn[_p]="z";Wn.exports=String(Kn)==="[object z]"});var Xn=v((nm,Jn)=>{var Rp=Gn(),jp=ue(),Wt=lt(),qp=ut(),Up=qp("toStringTag"),$p=Object,Hp=Wt(function(){return arguments}())=="Arguments",zp=function(l,h){try{return l[h]}catch{}};Jn.exports=Rp?Wt:function(l){var h,f,d;return l===void 0?"Undefined":l===null?"Null":typeof(f=zp(h=$p(l),Up))=="string"?f:Hp?Wt(h):(d=Wt(h))=="Object"&&jp(h.callee)?"Arguments":d}});var so=v((om,to)=>{var Vp=ye(),Kp=me(),Yn=ue(),Wp=Xn(),Gp=ht(),Jp=Js(),Qn=function(){},Xp=[],Zn=Gp("Reflect","construct"),lr=/^\s*(?:class|function)\b/,Yp=Vp(lr.exec),Qp=!lr.exec(Qn),dt=function(h){if(!Yn(h))return!1;try{return Zn(Qn,Xp,h),!0}catch{return!1}},eo=function(h){if(!Yn(h))return!1;switch(Wp(h)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Qp||!!Yp(lr,Jp(h))}catch{return!0}};eo.sham=!0;to.exports=!Zn||Kp(function(){var l;return dt(dt.call)||!dt(Object)||!dt(function(){l=!0})||l})?eo:dt});var no=v((lm,ao)=>{var ro=or(),Zp=so(),ef=qe(),tf=ut(),sf=tf("species"),io=Array;ao.exports=function(l){var h;return ro(l)&&(h=l.constructor,Zp(h)&&(h===io||ro(h.prototype))?h=void 0:ef(h)&&(h=h[sf],h===null&&(h=void 0))),h===void 0?io:h}});var lo=v((hm,oo)=>{var rf=no();oo.exports=function(l,h){return new(rf(l))(h===0?0:h)}});wn();var gp=de(),Pp=Se(),Ap=kn(),Tp=Fn(),vp=me(),Ln=gp.RegExp,On=Ln.prototype,Ep=Pp&&vp(function(){var l=!0;try{Ln(".","d")}catch{l=!1}var h={},f="",d=l?"dgimsy":"gimsy",y=function(S,L){Object.defineProperty(h,S,{get:function(){return f+=L,!0}})},g={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};l&&(g.hasIndices="d");for(var A in g)y(A,g[A]);var E=Object.getOwnPropertyDescriptor(On,"flags").get.call(h);return E!==d||f!==d});Ep&&Ap(On,"flags",{configurable:!0,get:Tp});var af=ar(),nf=Vn(),of=_t(),lf=Bs(),hf=Kt(),uf=lo();af({target:"Array",proto:!0},{flatMap:function(h){var f=lf(this),d=hf(f),y;return of(h),y=uf(f,0),y.length=nf(y,f,f,d,0,1,h,arguments.length>1?arguments[1]:void 0),y}});var pr=Object.defineProperty,cf=Object.getOwnPropertyDescriptor,fr=Object.getOwnPropertyNames,pf=Object.prototype.hasOwnProperty,ho=(l,h)=>function(){return l&&(h=(0,l[fr(l)[0]])(l=0)),h},W=(l,h)=>function(){return h||(0,l[fr(l)[0]])((h={exports:{}}).exports,h),h.exports},ff=(l,h)=>{for(var f in h)pr(l,f,{get:h[f],enumerable:!0})},df=(l,h,f,d)=>{if(h&&typeof h=="object"||typeof h=="function")for(let y of fr(h))!pf.call(l,y)&&y!==f&&pr(l,y,{get:()=>h[y],enumerable:!(d=cf(h,y))||d.enumerable});return l},mf=l=>df(pr({},"__esModule",{value:!0}),l),K=ho({""(){}}),yf=W({"src/utils/try-combinations.js"(l,h){"use strict";K();function f(){let d;for(var y=arguments.length,g=new Array(y),A=0;A{let C=I&&I.backwards;if(L===!1)return!1;let{length:O}=S,R=L;for(;R>=0&&Rcr,arch:()=>Tf,cpus:()=>Ao,default:()=>Co,endianness:()=>fo,freemem:()=>go,getNetworkInterfaces:()=>bo,hostname:()=>mo,loadavg:()=>yo,networkInterfaces:()=>Eo,platform:()=>vf,release:()=>vo,tmpDir:()=>hr,tmpdir:()=>ur,totalmem:()=>Po,type:()=>To,uptime:()=>xo});function fo(){if(typeof Gt>"u"){var l=new ArrayBuffer(2),h=new Uint8Array(l),f=new Uint16Array(l);if(h[0]=1,h[1]=2,f[0]===258)Gt="BE";else if(f[0]===513)Gt="LE";else throw new Error("unable to figure out endianess")}return Gt}function mo(){return typeof globalThis.location<"u"?globalThis.location.hostname:""}function yo(){return[]}function xo(){return 0}function go(){return Number.MAX_VALUE}function Po(){return Number.MAX_VALUE}function Ao(){return[]}function To(){return"Browser"}function vo(){return typeof globalThis.navigator<"u"?globalThis.navigator.appVersion:""}function Eo(){}function bo(){}function Tf(){return"javascript"}function vf(){return"browser"}function hr(){return"/tmp"}var Gt,ur,cr,Co,Ef=ho({"node-modules-polyfills:os"(){K(),ur=hr,cr=`
+`,Co={EOL:cr,tmpdir:ur,tmpDir:hr,networkInterfaces:Eo,getNetworkInterfaces:bo,release:vo,type:To,cpus:Ao,totalmem:Po,freemem:go,uptime:xo,loadavg:yo,hostname:mo,endianness:fo}}}),bf=W({"node-modules-polyfills-commonjs:os"(l,h){K();var f=(Ef(),mf(po));if(f&&f.default){h.exports=f.default;for(let d in f)h.exports[d]=f[d]}else f&&(h.exports=f)}}),Cf=W({"node_modules/detect-newline/index.js"(l,h){"use strict";K();var f=d=>{if(typeof d!="string")throw new TypeError("Expected a string");let y=d.match(/(?:\r?\n)/g)||[];if(y.length===0)return;let g=y.filter(E=>E===`\r
+`).length,A=y.length-g;return g>A?`\r
+`:`
+`};h.exports=f,h.exports.graceful=d=>typeof d=="string"&&f(d)||`
+`}}),Sf=W({"node_modules/jest-docblock/build/index.js"(l){"use strict";K(),Object.defineProperty(l,"__esModule",{value:!0}),l.extract=R,l.parse=H,l.parseWithComments=J,l.print=D,l.strip=N;function h(){let u=bf();return h=function(){return u},u}function f(){let u=d(Cf());return f=function(){return u},u}function d(u){return u&&u.__esModule?u:{default:u}}var y=/\*\/$/,g=/^\/\*\*?/,A=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,E=/(^|\s+)\/\/([^\r\n]*)/g,S=/^(\r?\n)+/,L=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,I=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,C=/(\r?\n|^) *\* ?/g,O=[];function R(u){let X=u.match(A);return X?X[0].trimLeft():""}function N(u){let X=u.match(A);return X&&X[0]?u.substring(X[0].length):u}function H(u){return J(u).pragmas}function J(u){let X=(0,f().default)(u)||h().EOL;u=u.replace(g,"").replace(y,"").replace(C,"$1");let ne="";for(;ne!==u;)ne=u,u=u.replace(L,`${X}$1 $2${X}`);u=u.replace(S,"").trimRight();let Q=Object.create(null),we=u.replace(I,"").replace(S,"").trimRight(),ee;for(;ee=I.exec(u);){let U=ee[2].replace(E,"");typeof Q[ee[1]]=="string"||Array.isArray(Q[ee[1]])?Q[ee[1]]=O.concat(Q[ee[1]],U):Q[ee[1]]=U}return{comments:we,pragmas:Q}}function D(u){let{comments:X="",pragmas:ne={}}=u,Q=(0,f().default)(X)||h().EOL,we="/**",ee=" *",U=" */",B=Object.keys(ne),T=B.map(V=>_(V,ne[V])).reduce((V,Y)=>V.concat(Y),[]).map(V=>`${ee} ${V}${Q}`).join("");if(!X){if(B.length===0)return"";if(B.length===1&&!Array.isArray(ne[B[0]])){let V=ne[B[0]];return`${we} ${_(B[0],V)[0]}${U}`}}let Oe=X.split(Q).map(V=>`${ee} ${V}`).join(Q)+Q;return we+Q+(X?Oe:"")+(X&&B.length?ee+Q:"")+T+U}function _(u,X){return O.concat(X).map(ne=>`@${u} ${ne}`.trim())}}}),wf=W({"src/common/end-of-line.js"(l,h){"use strict";K();function f(A){let E=A.indexOf("\r");return E>=0?A.charAt(E+1)===`
+`?"crlf":"cr":"lf"}function d(A){switch(A){case"cr":return"\r";case"crlf":return`\r
+`;default:return`
+`}}function y(A,E){let S;switch(E){case`
+`:S=/\n/g;break;case"\r":S=/\r/g;break;case`\r
+`:S=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(E)}.`)}let L=A.match(S);return L?L.length:0}function g(A){return A.replace(/\r\n?/g,`
+`)}h.exports={guessEndOfLine:f,convertEndOfLineToChars:d,countEndOfLineChars:y,normalizeEndOfLine:g}}}),If=W({"src/language-js/pragma.js"(l,h){"use strict";K();var{parseWithComments:f,strip:d,extract:y,print:g}=Sf(),{normalizeEndOfLine:A}=wf(),E=uo();function S(C){let O=E(C);O&&(C=C.slice(O.length+1));let R=y(C),{pragmas:N,comments:H}=f(R);return{shebang:O,text:C,pragmas:N,comments:H}}function L(C){let O=Object.keys(S(C).pragmas);return O.includes("prettier")||O.includes("format")}function I(C){let{shebang:O,text:R,pragmas:N,comments:H}=S(C),J=d(R),D=g({pragmas:Object.assign({format:""},N),comments:H.trimStart()});return(O?`${O}
+`:"")+A(D)+(J.startsWith(`
+`)?`
+`:`
+
+`)+J}h.exports={hasPragma:L,insertPragma:I}}}),dr=W({"src/utils/is-non-empty-array.js"(l,h){"use strict";K();function f(d){return Array.isArray(d)&&d.length>0}h.exports=f}}),So=W({"src/language-js/loc.js"(l,h){"use strict";K();var f=dr();function d(S){var L,I;let C=S.range?S.range[0]:S.start,O=(L=(I=S.declaration)===null||I===void 0?void 0:I.decorators)!==null&&L!==void 0?L:S.decorators;return f(O)?Math.min(d(O[0]),C):C}function y(S){return S.range?S.range[1]:S.end}function g(S,L){let I=d(S);return Number.isInteger(I)&&I===d(L)}function A(S,L){let I=y(S);return Number.isInteger(I)&&I===y(L)}function E(S,L){return g(S,L)&&A(S,L)}h.exports={locStart:d,locEnd:y,hasSameLocStart:g,hasSameLoc:E}}}),wo=W({"src/language-js/parse/utils/create-parser.js"(l,h){"use strict";K();var{hasPragma:f}=If(),{locStart:d,locEnd:y}=So();function g(A){return A=typeof A=="function"?{parse:A}:A,Object.assign({astFormat:"estree",hasPragma:f,locStart:d,locEnd:y},A)}h.exports=g}}),mr=W({"src/common/parser-create-error.js"(l,h){"use strict";K();function f(d,y){let g=new SyntaxError(d+" ("+y.start.line+":"+y.start.column+")");return g.loc=y,g}h.exports=f}}),Io=W({"src/language-js/parse/utils/create-babel-parse-error.js"(l,h){"use strict";K();var f=mr();function d(y){let{message:g,loc:A}=y;return f(g.replace(/ \(.*\)/,""),{start:{line:A?A.line:0,column:A?A.column+1:0}})}h.exports=d}}),Nf=W({"src/language-js/utils/is-ts-keyword-type.js"(l,h){"use strict";K();function f(d){let{type:y}=d;return y.startsWith("TS")&&y.endsWith("Keyword")}h.exports=f}}),kf=W({"src/language-js/utils/is-block-comment.js"(l,h){"use strict";K();var f=new Set(["Block","CommentBlock","MultiLine"]),d=y=>f.has(y==null?void 0:y.type);h.exports=d}}),Df=W({"src/language-js/utils/is-type-cast-comment.js"(l,h){"use strict";K();var f=kf();function d(y){return f(y)&&y.value[0]==="*"&&/@(?:type|satisfies)\b/.test(y.value)}h.exports=d}}),Ff=W({"src/utils/get-last.js"(l,h){"use strict";K();var f=d=>d[d.length-1];h.exports=f}}),No=W({"src/language-js/parse/postprocess/visit-node.js"(l,h){"use strict";K();function f(d,y){if(Array.isArray(d)){for(let g=0;g{let{line:D,character:_}=R.getLineAndCharacterOfPosition(J);return{line:D+1,column:_}});y({loc:{start:N,end:H}},"Decorators are not valid here.")}function S(I,C){I.kind!==g.PropertyDeclaration||I.modifiers&&!I.modifiers.some(O=>O.kind===g.AbstractKeyword)||I.initializer&&C.value===null&&y(C,"Abstract property cannot have an initializer")}function L(I,C){let{esTreeNodeToTSNodeMap:O,tsNodeToESTreeNodeMap:R}=C.tsParseResult;d(I,N=>{let H=O.get(N);if(!H)return;let J=R.get(H);J===N&&(E(H),S(H,J))})}h.exports={throwErrorForInvalidNodes:L}}}),Of=W({"src/language-js/parse/postprocess/index.js"(l,h){"use strict";K();var{locStart:f,locEnd:d}=So(),y=Nf(),g=Df(),A=Ff(),E=No(),{throwErrorForInvalidNodes:S}=Lf(),L=ko();function I(N,H){if(H.parser==="typescript"&&/@|abstract/.test(H.originalText)&&S(N,H),H.parser!=="typescript"&&H.parser!=="flow"&&H.parser!=="acorn"&&H.parser!=="espree"&&H.parser!=="meriyah"){let D=new Set;N=E(N,_=>{_.leadingComments&&_.leadingComments.some(g)&&D.add(f(_))}),N=E(N,_=>{if(_.type==="ParenthesizedExpression"){let{expression:u}=_;if(u.type==="TypeCastExpression")return u.range=_.range,u;let X=f(_);if(!D.has(X))return u.extra=Object.assign(Object.assign({},u.extra),{},{parenthesized:!0}),u}})}return N=E(N,D=>{switch(D.type){case"ChainExpression":return C(D.expression);case"LogicalExpression":{if(O(D))return R(D);break}case"VariableDeclaration":{let _=A(D.declarations);_&&_.init&&J(D,_);break}case"TSParenthesizedType":return y(D.typeAnnotation)||D.typeAnnotation.type==="TSThisType"||(D.typeAnnotation.range=[f(D),d(D)]),D.typeAnnotation;case"TSTypeParameter":if(typeof D.name=="string"){let _=f(D);D.name={type:"Identifier",name:D.name,range:[_,_+D.name.length]}}break;case"ObjectExpression":if(H.parser==="typescript"){let _=D.properties.find(u=>u.type==="Property"&&u.value.type==="TSEmptyBodyFunctionExpression");_&&L(_.value,"Unexpected token.")}break;case"SequenceExpression":{let _=A(D.expressions);D.range=[f(D),Math.min(d(_),d(D))];break}case"TopicReference":H.__isUsingHackPipeline=!0;break;case"ExportAllDeclaration":{let{exported:_}=D;if(H.parser==="meriyah"&&_&&_.type==="Identifier"){let u=H.originalText.slice(f(_),d(_));(u.startsWith('"')||u.startsWith("'"))&&(D.exported=Object.assign(Object.assign({},D.exported),{},{type:"Literal",value:D.exported.name,raw:u}))}break}case"PropertyDefinition":if(H.parser==="meriyah"&&D.static&&!D.computed&&!D.key){let _="static",u=f(D);Object.assign(D,{static:!1,key:{type:"Identifier",name:_,range:[u,u+_.length]}})}break}}),N;function J(D,_){H.originalText[d(_)]!==";"&&(D.range=[f(D),d(_)])}}function C(N){switch(N.type){case"CallExpression":N.type="OptionalCallExpression",N.callee=C(N.callee);break;case"MemberExpression":N.type="OptionalMemberExpression",N.object=C(N.object);break;case"TSNonNullExpression":N.expression=C(N.expression);break}return N}function O(N){return N.type==="LogicalExpression"&&N.right.type==="LogicalExpression"&&N.operator===N.right.operator}function R(N){return O(N)?R({type:"LogicalExpression",operator:N.operator,left:R({type:"LogicalExpression",operator:N.operator,left:N.left,right:N.right.left,range:[f(N.left),d(N.right.left)]}),right:N.right.right,range:[f(N),d(N)]}):N}h.exports=I}}),Do=W({"node_modules/@babel/parser/lib/index.js"(l){"use strict";K(),Object.defineProperty(l,"__esModule",{value:!0});function h(t,r){if(t==null)return{};var e={},s=Object.keys(t),i,a;for(a=0;a=0)&&(e[i]=t[i]);return e}var f=class{constructor(t,r,e){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=r,this.index=e}},d=class{constructor(t,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=r}};function y(t,r){let{line:e,column:s,index:i}=t;return new f(e,s+r,i+r)}var g={SyntaxError:"BABEL_PARSER_SYNTAX_ERROR",SourceTypeModuleError:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"},A=function(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.length-1;return{get(){return t.reduce((e,s)=>e[s],this)},set(e){t.reduce((s,i,a)=>a===r?s[i]=e:s[i],this)}}},E=(t,r,e)=>Object.keys(e).map(s=>[s,e[s]]).filter(s=>{let[,i]=s;return!!i}).map(s=>{let[i,a]=s;return[i,typeof a=="function"?{value:a,enumerable:!1}:typeof a.reflect=="string"?Object.assign({},a,A(a.reflect.split("."))):a]}).reduce((s,i)=>{let[a,n]=i;return Object.defineProperty(s,a,Object.assign({configurable:!0},n))},Object.assign(new t,r)),S={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:g.SourceTypeModuleError},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:g.SourceTypeModuleError}},L={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},I=t=>{let{type:r,prefix:e}=t;return r==="UpdateExpression"?L.UpdateExpression[String(e)]:L[r]},C={AccessorIsGenerator:t=>{let{kind:r}=t;return`A ${r}ter cannot be a generator.`},ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:t=>{let{kind:r}=t;return`Missing initializer in ${r} declaration.`},DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:t=>{let{exportName:r}=t;return`\`${r}\` has already been exported. Exported identifiers must be unique.`},DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:t=>{let{localName:r,exportName:e}=t;return`A string literal cannot be used as an exported binding without \`from\`.
+- Did you mean \`export { '${r}' as '${e}' } from 'some-module'\`?`},ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:t=>{let{type:r}=t;return`'${r==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`},ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:t=>{let{type:r}=t;return`Unsyntactic ${r==="BreakStatement"?"break":"continue"}.`},IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:t=>{let{importName:r}=t;return`A string literal cannot be used as an imported binding.
+- Did you mean \`import { "${r}" as foo }\`?`},ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:t=>{let{maxArgumentCount:r}=t;return`\`import()\` requires exactly ${r===1?"one argument":"one or two arguments"}.`},ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:t=>{let{radix:r}=t;return`Expected number in radix ${r}.`},InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:t=>{let{reservedWord:r}=t;return`Escape sequence in keyword ${r}.`},InvalidIdentifier:t=>{let{identifierName:r}=t;return`Invalid identifier ${r}.`},InvalidLhs:t=>{let{ancestor:r}=t;return`Invalid left-hand side in ${I(r)}.`},InvalidLhsBinding:t=>{let{ancestor:r}=t;return`Binding invalid left-hand side in ${I(r)}.`},InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:t=>{let{unexpected:r}=t;return`Unexpected character '${r}'.`},InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:t=>{let{identifierName:r}=t;return`Private name #${r} is not defined.`},InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:t=>{let{labelName:r}=t;return`Label '${r}' is already declared.`},LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:t=>{let{missingPlugin:r}=t;return`This experimental syntax requires enabling the parser plugin: ${r.map(e=>JSON.stringify(e)).join(", ")}.`},MissingOneOfPlugins:t=>{let{missingPlugin:r}=t;return`This experimental syntax requires enabling one of the following parser plugin(s): ${r.map(e=>JSON.stringify(e)).join(", ")}.`},MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:t=>{let{key:r}=t;return`Duplicate key "${r}" is not allowed in module attributes.`},ModuleExportNameHasLoneSurrogate:t=>{let{surrogateCharCode:r}=t;return`An export name cannot include a lone surrogate, found '\\u${r.toString(16)}'.`},ModuleExportUndefined:t=>{let{localName:r}=t;return`Export '${r}' is not defined.`},MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:t=>{let{identifierName:r}=t;return`Private names are only allowed in property accesses (\`obj.#${r}\`) or in \`in\` expressions (\`#${r} in obj\`).`},PrivateNameRedeclaration:t=>{let{identifierName:r}=t;return`Duplicate private name #${r}.`},RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:t=>{let{keyword:r}=t;return`Unexpected keyword '${r}'.`},UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:t=>{let{reservedWord:r}=t;return`Unexpected reserved word '${r}'.`},UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:t=>{let{expected:r,unexpected:e}=t;return`Unexpected token${e?` '${e}'.`:""}${r?`, expected "${r}"`:""}`},UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:t=>{let{target:r,onlyValidPropertyName:e}=t;return`The only valid meta property for ${r} is ${r}.${e}.`},UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:t=>{let{identifierName:r}=t;return`Identifier '${r}' has already been declared.`},YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},O={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:t=>{let{referenceName:r}=t;return`Assigning to '${r}' in strict mode.`},StrictEvalArgumentsBinding:t=>{let{bindingName:r}=t;return`Binding '${r}' in strict mode.`},StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},R=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),N={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:t=>{let{token:r}=t;return`Invalid topic token ${r}. In order to use ${r} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${r}" }.`},PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:t=>{let{type:r}=t;return`Hack-style pipe body cannot be an unparenthesized ${I({type:r})}; please wrap it in parentheses.`},PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},H=["toMessage"],J=["message"];function D(t){let{toMessage:r}=t,e=h(t,H);return function s(i){let{loc:a,details:n}=i;return E(SyntaxError,Object.assign({},e,{loc:a}),{clone(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=o.loc||{};return s({loc:new f("line"in c?c.line:this.loc.line,"column"in c?c.column:this.loc.column,"index"in c?c.index:this.loc.index),details:Object.assign({},this.details,o.details)})},details:{value:n,enumerable:!1},message:{get(){return`${r(this.details)} (${this.loc.line}:${this.loc.column})`},set(o){Object.defineProperty(this,"message",{value:o})}},pos:{reflect:"loc.index",enumerable:!0},missingPlugin:"missingPlugin"in n&&{reflect:"details.missingPlugin",enumerable:!0}})}}function _(t,r){if(Array.isArray(t))return s=>_(s,t[0]);let e={};for(let s of Object.keys(t)){let i=t[s],a=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:n}=a,o=h(a,J),c=typeof n=="string"?()=>n:n;e[s]=D(Object.assign({code:g.SyntaxError,reasonCode:s,toMessage:c},r?{syntaxPlugin:r}:{},o))}return e}var u=Object.assign({},_(S),_(C),_(O),_`pipelineOperator`(N)),{defineProperty:X}=Object,ne=(t,r)=>X(t,r,{enumerable:!1,value:t[r]});function Q(t){return t.loc.start&&ne(t.loc.start,"index"),t.loc.end&&ne(t.loc.end,"index"),t}var we=t=>class extends t{parse(){let e=Q(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(Q)),e}parseRegExpLiteral(e){let{pattern:s,flags:i}=e,a=null;try{a=new RegExp(s,i)}catch{}let n=this.estreeParseLiteral(a);return n.regex={pattern:s,flags:i},n}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}let i=this.estreeParseLiteral(s);return i.bigint=String(i.value||e),i}parseDecimalLiteral(e){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||e),i}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;let i=e;return i.type="ExpressionStatement",i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,i,a,n){super.parseBlockBody(e,s,i,a,n);let o=e.directives.map(c=>this.directiveToStmt(c));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,i,a,n,o){this.parseMethod(s,i,a,n,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){let i=super.parseLiteral(e,s);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(e,s){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;super.parseFunctionBody(e,s,i),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,i,a,n,o){let c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,p=this.startNode();return p.kind=e.kind,p=super.parseMethod(p,s,i,a,n,o,c),p.type="FunctionExpression",delete p.kind,e.value=p,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(){let e=super.parseClassProperty(...arguments);return this.getPluginOption("estree","classFeatures")&&(e.type="PropertyDefinition"),e}parseClassPrivateProperty(){let e=super.parseClassPrivateProperty(...arguments);return this.getPluginOption("estree","classFeatures")&&(e.type="PropertyDefinition",e.computed=!1),e}parseObjectMethod(e,s,i,a,n){let o=super.parseObjectMethod(e,s,i,a,n);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,i,a){let n=super.parseObjectProperty(e,s,i,a);return n&&(n.kind="init",n.type="Property"),n}isValidLVal(e,s,i){return e==="Property"?"value":super.isValidLVal(e,s,i)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e!=null&&this.isObjectProperty(e)){let{key:i,value:a}=e;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(a,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,i){e.kind==="get"||e.kind==="set"?this.raise(u.PatternHasAccessor,{at:e.key}):e.method?this.raise(u.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,s,i)}finishCallExpression(e,s){let i=super.finishCallExpression(e,s);if(i.callee.type==="Import"){if(i.type="ImportExpression",i.source=i.arguments[0],this.hasPlugin("importAssertions")){var a;i.attributes=(a=i.arguments[1])!=null?a:null}delete i.arguments,delete i.callee}return i}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let i=this.state.lastTokStartLoc,a=super.parseExport(e,s);switch(a.type){case"ExportAllDeclaration":a.exported=null;break;case"ExportNamedDeclaration":a.specifiers.length===1&&a.specifiers[0].type==="ExportNamespaceSpecifier"&&(a.type="ExportAllDeclaration",a.exported=a.specifiers[0].exported,delete a.specifiers);case"ExportDefaultDeclaration":{var n;let{declaration:o}=a;(o==null?void 0:o.type)==="ClassDeclaration"&&((n=o.decorators)==null?void 0:n.length)>0&&o.start===a.start&&this.resetStartLocation(a,i)}break}return a}parseSubscript(e,s,i,a){let n=super.parseSubscript(e,s,i,a);if(a.optionalChainMember){if((n.type==="OptionalMemberExpression"||n.type==="OptionalCallExpression")&&(n.type=n.type.substring(8)),a.stop){let o=this.startNodeAtNode(n);return o.expression=n,this.finishNode(o,"ChainExpression")}}else(n.type==="MemberExpression"||n.type==="CallExpression")&&(n.optional=!1);return n}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isOptionalChain(e){return e.type==="ChainExpression"}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.method||e.kind==="get"||e.kind==="set"}finishNodeAt(e,s,i){return Q(super.finishNodeAt(e,s,i))}resetStartLocation(e,s){super.resetStartLocation(e,s),Q(e)}resetEndLocation(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state.lastTokEndLoc;super.resetEndLocation(e,s),Q(e)}},ee=class{constructor(t,r){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!r}},U={brace:new ee("{"),j_oTag:new ee("...",!0)};U.template=new ee("`",!0);var B=!0,T=!0,Oe=!0,V=!0,Y=!0,Pe=!0,ce=class{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}},oe=new Map;function j(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r.keyword=t;let e=k(t,r);return oe.set(t,e),e}function G(t,r){return k(t,{beforeExpr:B,binop:r})}var ae=-1,pe=[],He=[],Ze=[],fe=[],et=[],tt=[];function k(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var e,s,i,a;return++ae,He.push(t),Ze.push((e=r.binop)!=null?e:-1),fe.push((s=r.beforeExpr)!=null?s:!1),et.push((i=r.startsExpr)!=null?i:!1),tt.push((a=r.prefix)!=null?a:!1),pe.push(new ce(t,r)),ae}function $(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var e,s,i,a;return++ae,oe.set(t,ae),He.push(t),Ze.push((e=r.binop)!=null?e:-1),fe.push((s=r.beforeExpr)!=null?s:!1),et.push((i=r.startsExpr)!=null?i:!1),tt.push((a=r.prefix)!=null?a:!1),pe.push(new ce("name",r)),ae}var Fo={bracketL:k("[",{beforeExpr:B,startsExpr:T}),bracketHashL:k("#[",{beforeExpr:B,startsExpr:T}),bracketBarL:k("[|",{beforeExpr:B,startsExpr:T}),bracketR:k("]"),bracketBarR:k("|]"),braceL:k("{",{beforeExpr:B,startsExpr:T}),braceBarL:k("{|",{beforeExpr:B,startsExpr:T}),braceHashL:k("#{",{beforeExpr:B,startsExpr:T}),braceR:k("}"),braceBarR:k("|}"),parenL:k("(",{beforeExpr:B,startsExpr:T}),parenR:k(")"),comma:k(",",{beforeExpr:B}),semi:k(";",{beforeExpr:B}),colon:k(":",{beforeExpr:B}),doubleColon:k("::",{beforeExpr:B}),dot:k("."),question:k("?",{beforeExpr:B}),questionDot:k("?."),arrow:k("=>",{beforeExpr:B}),template:k("template"),ellipsis:k("...",{beforeExpr:B}),backQuote:k("`",{startsExpr:T}),dollarBraceL:k("${",{beforeExpr:B,startsExpr:T}),templateTail:k("...`",{startsExpr:T}),templateNonTail:k("...${",{beforeExpr:B,startsExpr:T}),at:k("@"),hash:k("#",{startsExpr:T}),interpreterDirective:k("#!..."),eq:k("=",{beforeExpr:B,isAssign:V}),assign:k("_=",{beforeExpr:B,isAssign:V}),slashAssign:k("_=",{beforeExpr:B,isAssign:V}),xorAssign:k("_=",{beforeExpr:B,isAssign:V}),moduloAssign:k("_=",{beforeExpr:B,isAssign:V}),incDec:k("++/--",{prefix:Y,postfix:Pe,startsExpr:T}),bang:k("!",{beforeExpr:B,prefix:Y,startsExpr:T}),tilde:k("~",{beforeExpr:B,prefix:Y,startsExpr:T}),doubleCaret:k("^^",{startsExpr:T}),doubleAt:k("@@",{startsExpr:T}),pipeline:G("|>",0),nullishCoalescing:G("??",1),logicalOR:G("||",1),logicalAND:G("&&",2),bitwiseOR:G("|",3),bitwiseXOR:G("^",4),bitwiseAND:G("&",5),equality:G("==/!=/===/!==",6),lt:G(">/<=/>=",7),gt:G(">/<=/>=",7),relational:G(">/<=/>=",7),bitShift:G("<>>/>>>",8),bitShiftL:G("<>>/>>>",8),bitShiftR:G("<>>/>>>",8),plusMin:k("+/-",{beforeExpr:B,binop:9,prefix:Y,startsExpr:T}),modulo:k("%",{binop:10,startsExpr:T}),star:k("*",{binop:10}),slash:G("/",10),exponent:k("**",{beforeExpr:B,binop:11,rightAssociative:!0}),_in:j("in",{beforeExpr:B,binop:7}),_instanceof:j("instanceof",{beforeExpr:B,binop:7}),_break:j("break"),_case:j("case",{beforeExpr:B}),_catch:j("catch"),_continue:j("continue"),_debugger:j("debugger"),_default:j("default",{beforeExpr:B}),_else:j("else",{beforeExpr:B}),_finally:j("finally"),_function:j("function",{startsExpr:T}),_if:j("if"),_return:j("return",{beforeExpr:B}),_switch:j("switch"),_throw:j("throw",{beforeExpr:B,prefix:Y,startsExpr:T}),_try:j("try"),_var:j("var"),_const:j("const"),_with:j("with"),_new:j("new",{beforeExpr:B,startsExpr:T}),_this:j("this",{startsExpr:T}),_super:j("super",{startsExpr:T}),_class:j("class",{startsExpr:T}),_extends:j("extends",{beforeExpr:B}),_export:j("export"),_import:j("import",{startsExpr:T}),_null:j("null",{startsExpr:T}),_true:j("true",{startsExpr:T}),_false:j("false",{startsExpr:T}),_typeof:j("typeof",{beforeExpr:B,prefix:Y,startsExpr:T}),_void:j("void",{beforeExpr:B,prefix:Y,startsExpr:T}),_delete:j("delete",{beforeExpr:B,prefix:Y,startsExpr:T}),_do:j("do",{isLoop:Oe,beforeExpr:B}),_for:j("for",{isLoop:Oe}),_while:j("while",{isLoop:Oe}),_as:$("as",{startsExpr:T}),_assert:$("assert",{startsExpr:T}),_async:$("async",{startsExpr:T}),_await:$("await",{startsExpr:T}),_from:$("from",{startsExpr:T}),_get:$("get",{startsExpr:T}),_let:$("let",{startsExpr:T}),_meta:$("meta",{startsExpr:T}),_of:$("of",{startsExpr:T}),_sent:$("sent",{startsExpr:T}),_set:$("set",{startsExpr:T}),_static:$("static",{startsExpr:T}),_using:$("using",{startsExpr:T}),_yield:$("yield",{startsExpr:T}),_asserts:$("asserts",{startsExpr:T}),_checks:$("checks",{startsExpr:T}),_exports:$("exports",{startsExpr:T}),_global:$("global",{startsExpr:T}),_implements:$("implements",{startsExpr:T}),_intrinsic:$("intrinsic",{startsExpr:T}),_infer:$("infer",{startsExpr:T}),_is:$("is",{startsExpr:T}),_mixins:$("mixins",{startsExpr:T}),_proto:$("proto",{startsExpr:T}),_require:$("require",{startsExpr:T}),_satisfies:$("satisfies",{startsExpr:T}),_keyof:$("keyof",{startsExpr:T}),_readonly:$("readonly",{startsExpr:T}),_unique:$("unique",{startsExpr:T}),_abstract:$("abstract",{startsExpr:T}),_declare:$("declare",{startsExpr:T}),_enum:$("enum",{startsExpr:T}),_module:$("module",{startsExpr:T}),_namespace:$("namespace",{startsExpr:T}),_interface:$("interface",{startsExpr:T}),_type:$("type",{startsExpr:T}),_opaque:$("opaque",{startsExpr:T}),name:k("name",{startsExpr:T}),string:k("string",{startsExpr:T}),num:k("num",{startsExpr:T}),bigint:k("bigint",{startsExpr:T}),decimal:k("decimal",{startsExpr:T}),regexp:k("regexp",{startsExpr:T}),privateName:k("#name",{startsExpr:T}),eof:k("eof"),jsxName:k("jsxName"),jsxText:k("jsxText",{beforeExpr:!0}),jsxTagStart:k("jsxTagStart",{startsExpr:!0}),jsxTagEnd:k("jsxTagEnd"),placeholder:k("%%",{startsExpr:!0})};function z(t){return t>=93&&t<=130}function Lo(t){return t<=92}function Ae(t){return t>=58&&t<=130}function yr(t){return t>=58&&t<=134}function Oo(t){return fe[t]}function Jt(t){return et[t]}function Bo(t){return t>=29&&t<=33}function xr(t){return t>=127&&t<=129}function Mo(t){return t>=90&&t<=92}function Xt(t){return t>=58&&t<=92}function _o(t){return t>=39&&t<=59}function Ro(t){return t===34}function jo(t){return tt[t]}function qo(t){return t>=119&&t<=121}function Uo(t){return t>=122&&t<=128}function Ie(t){return He[t]}function mt(t){return Ze[t]}function $o(t){return t===57}function yt(t){return t>=24&&t<=25}function Te(t){return pe[t]}pe[8].updateContext=t=>{t.pop()},pe[5].updateContext=pe[7].updateContext=pe[23].updateContext=t=>{t.push(U.brace)},pe[22].updateContext=t=>{t[t.length-1]===U.template?t.pop():t.push(U.template)},pe[140].updateContext=t=>{t.push(U.j_expr,U.j_oTag)};var Yt="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",gr="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F",Ho=new RegExp("["+Yt+"]"),zo=new RegExp("["+Yt+gr+"]");Yt=gr=null;var Pr=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],Vo=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Qt(t,r){let e=65536;for(let s=0,i=r.length;st)return!1;if(e+=r[s+1],e>=t)return!0}return!1}function ve(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Ho.test(String.fromCharCode(t)):Qt(t,Pr)}function ze(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&zo.test(String.fromCharCode(t)):Qt(t,Pr)||Qt(t,Vo)}var Zt={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Ko=new Set(Zt.keyword),Wo=new Set(Zt.strict),Go=new Set(Zt.strictBind);function Ar(t,r){return r&&t==="await"||t==="enum"}function Tr(t,r){return Ar(t,r)||Wo.has(t)}function vr(t){return Go.has(t)}function Er(t,r){return Tr(t,r)||vr(t)}function Jo(t){return Ko.has(t)}function Xo(t,r,e){return t===64&&r===64&&ve(e)}var Yo=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Qo(t){return Yo.has(t)}var Ve=0,Ke=1,Ee=2,es=4,br=8,xt=16,Cr=32,Be=64,gt=128,We=256,Pt=Ke|Ee|gt|We,be=1,Me=2,Sr=4,Ne=8,At=16,wr=64,Tt=128,ts=256,ss=512,rs=1024,is=2048,st=4096,Ir=be|Me|Ne|Tt,_e=be|0|Ne|0,vt=be|0|Sr|0,Nr=be|0|At|0,Zo=0|Me|0|Tt,el=0|Me|0|0,kr=be|Me|Ne|ts,Dr=0|rs,ke=0|wr,tl=be|0|0|wr,sl=kr|ss,rl=0|rs,Fr=0|Me|0|st,il=is,Et=4,as=2,ns=1,os=as|ns,al=as|Et,nl=ns|Et,ol=as,ll=ns,ls=0,hs=class{constructor(t){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=t}},us=class{constructor(t,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=r}get inTopLevel(){return(this.currentScope().flags&Ke)>0}get inFunction(){return(this.currentVarScopeFlags()&Ee)>0}get allowSuper(){return(this.currentThisScopeFlags()&xt)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&Cr)>0}get inClass(){return(this.currentThisScopeFlags()&Be)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&Be)>0&&(t&Ee)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r>)return!0;if(r&(Pt|Be))return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&Ee)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new hs(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&(Ee|gt)||!this.parser.inModule&&t.flags&Ke)}declareName(t,r,e){let s=this.currentScope();if(r&Ne||r&At)this.checkRedeclarationInScope(s,t,r,e),r&At?s.functions.add(t):s.lexical.add(t),r&Ne&&this.maybeExportDefined(s,t);else if(r&Sr)for(let i=this.scopeStack.length-1;i>=0&&(s=this.scopeStack[i],this.checkRedeclarationInScope(s,t,r,e),s.var.add(t),this.maybeExportDefined(s,t),!(s.flags&Pt));--i);this.parser.inModule&&s.flags&Ke&&this.undefinedExports.delete(t)}maybeExportDefined(t,r){this.parser.inModule&&t.flags&Ke&&this.undefinedExports.delete(r)}checkRedeclarationInScope(t,r,e,s){this.isRedeclaredInScope(t,r,e)&&this.parser.raise(u.VarRedeclaration,{at:s,identifierName:r})}isRedeclaredInScope(t,r,e){return e&be?e&Ne?t.lexical.has(r)||t.functions.has(r)||t.var.has(r):e&At?t.lexical.has(r)||!this.treatFunctionsAsVarInScope(t)&&t.var.has(r):t.lexical.has(r)&&!(t.flags&br&&t.lexical.values().next().value===r)||!this.treatFunctionsAsVarInScope(t)&&t.functions.has(r):!1}checkLocalExport(t){let{name:r}=t,e=this.scopeStack[0];!e.lexical.has(r)&&!e.var.has(r)&&!e.functions.has(r)&&this.undefinedExports.set(r,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&Pt)return r}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&(Pt|Be)&&!(r&es))return r}}},hl=class extends hs{constructor(){super(...arguments),this.declareFunctions=new Set}},ul=class extends us{createScope(t){return new hl(t)}declareName(t,r,e){let s=this.currentScope();if(r&is){this.checkRedeclarationInScope(s,t,r,e),this.maybeExportDefined(s,t),s.declareFunctions.add(t);return}super.declareName(t,r,e)}isRedeclaredInScope(t,r,e){return super.isRedeclaredInScope(t,r,e)?!0:e&is?!t.declareFunctions.has(r)&&(t.lexical.has(r)||t.functions.has(r)):!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},cl=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[r,e]=t;if(!this.hasPlugin(r))return!1;let s=this.plugins.get(r);for(let i of Object.keys(e))if((s==null?void 0:s[i])!==e[i])return!1;return!0}}getPluginOption(t,r){var e;return(e=this.plugins.get(t))==null?void 0:e[r]}};function Lr(t,r){t.trailingComments===void 0?t.trailingComments=r:t.trailingComments.unshift(...r)}function pl(t,r){t.leadingComments===void 0?t.leadingComments=r:t.leadingComments.unshift(...r)}function rt(t,r){t.innerComments===void 0?t.innerComments=r:t.innerComments.unshift(...r)}function it(t,r,e){let s=null,i=r.length;for(;s===null&&i>0;)s=r[--i];s===null||s.start>e.start?rt(t,e.comments):Lr(s,e.comments)}var fl=class extends cl{addComment(t){this.filename&&(t.loc.filename=this.filename),this.state.comments.push(t)}processComment(t){let{commentStack:r}=this.state,e=r.length;if(e===0)return;let s=e-1,i=r[s];i.start===t.end&&(i.leadingNode=t,s--);let{start:a}=t;for(;s>=0;s--){let n=r[s],o=n.end;if(o>a)n.containingNode=t,this.finalizeComment(n),r.splice(s,1);else{o===a&&(n.trailingNode=t);break}}}finalizeComment(t){let{comments:r}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&Lr(t.leadingNode,r),t.trailingNode!==null&&pl(t.trailingNode,r);else{let{containingNode:e,start:s}=t;if(this.input.charCodeAt(s-1)===44)switch(e.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":it(e,e.properties,t);break;case"CallExpression":case"OptionalCallExpression":it(e,e.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":it(e,e.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":it(e,e.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":it(e,e.specifiers,t);break;default:rt(e,r)}else rt(e,r)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let r=t.length-1;r>=0;r--)this.finalizeComment(t[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:r}=this.state,{length:e}=r;if(e===0)return;let s=r[e-1];s.leadingNode===t&&(s.leadingNode=null)}takeSurroundingComments(t,r,e){let{commentStack:s}=this.state,i=s.length;if(i===0)return;let a=i-1;for(;a>=0;a--){let n=s[a],o=n.end;if(n.start===e)n.leadingNode=t;else if(o===r)n.trailingNode=t;else if(o=48&&r<=57},Mr={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Ct={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function _r(t,r,e,s,i,a){let n=e,o=s,c=i,p="",m=null,x=e,{length:P}=r;for(;;){if(e>=P){a.unterminated(n,o,c),p+=r.slice(x,e);break}let b=r.charCodeAt(e);if(xl(t,b,r,e)){p+=r.slice(x,e);break}if(b===92){p+=r.slice(x,e);let M=gl(r,e,s,i,t==="template",a);M.ch===null&&!m?m={pos:e,lineStart:s,curLine:i}:p+=M.ch,{pos:e,lineStart:s,curLine:i}=M,x=e}else b===8232||b===8233?(++e,++i,s=e):b===10||b===13?t==="template"?(p+=r.slice(x,e)+`
+`,++e,b===13&&r.charCodeAt(e)===10&&++e,++i,x=s=e):a.unterminated(n,o,c):++e}return{pos:e,str:p,firstInvalidLoc:m,lineStart:s,curLine:i,containsInvalid:!!m}}function xl(t,r,e,s){return t==="template"?r===96||r===36&&e.charCodeAt(s+1)===123:r===(t==="double"?34:39)}function gl(t,r,e,s,i,a){let n=!i;r++;let o=p=>({pos:r,ch:p,lineStart:e,curLine:s}),c=t.charCodeAt(r++);switch(c){case 110:return o(`
+`);case 114:return o("\r");case 120:{let p;return{code:p,pos:r}=fs(t,r,e,s,2,!1,n,a),o(p===null?null:String.fromCharCode(p))}case 117:{let p;return{code:p,pos:r}=jr(t,r,e,s,n,a),o(p===null?null:String.fromCodePoint(p))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:t.charCodeAt(r)===10&&++r;case 10:e=r,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);a.strictNumericEscape(r-1,e,s);default:if(c>=48&&c<=55){let p=r-1,x=t.slice(p,r+2).match(/^[0-7]+/)[0],P=parseInt(x,8);P>255&&(x=x.slice(0,-1),P=parseInt(x,8)),r+=x.length-1;let b=t.charCodeAt(r);if(x!=="0"||b===56||b===57){if(i)return o(null);a.strictNumericEscape(p,e,s)}return o(String.fromCharCode(P))}return o(String.fromCharCode(c))}}function fs(t,r,e,s,i,a,n,o){let c=r,p;return{n:p,pos:r}=Rr(t,r,e,s,16,i,a,!1,o,!n),p===null&&(n?o.invalidEscapeSequence(c,e,s):r=c-1),{code:p,pos:r}}function Rr(t,r,e,s,i,a,n,o,c,p){let m=r,x=i===16?Mr.hex:Mr.decBinOct,P=i===16?Ct.hex:i===10?Ct.dec:i===8?Ct.oct:Ct.bin,b=!1,M=0;for(let q=0,te=a==null?1/0:a;q=97?Z=se-97+10:se>=65?Z=se-65+10:yl(se)?Z=se-48:Z=1/0,Z>=i){if(Z<=9&&p)return{n:null,pos:r};if(Z<=9&&c.invalidDigit(r,e,s,i))Z=0;else if(n)Z=0,b=!0;else break}++r,M=M*i+Z}return r===m||a!=null&&r-m!==a||b?{n:null,pos:r}:{n:M,pos:r}}function jr(t,r,e,s,i,a){let n=t.charCodeAt(r),o;if(n===123){if(++r,{code:o,pos:r}=fs(t,r,e,s,t.indexOf("}",r)-r,!0,i,a),++r,o!==null&&o>1114111)if(i)a.invalidCodePoint(r,e,s);else return{code:null,pos:r}}else({code:o,pos:r}=fs(t,r,e,s,4,!1,i,a));return{code:o,pos:r}}var Pl=["at"],Al=["at"];function nt(t,r,e){return new f(e,t-r,t)}var Tl=new Set([103,109,115,105,121,117,100,118]),De=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new d(t.startLoc,t.endLoc)}},vl=class extends fl{constructor(t,r){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,s,i,a)=>this.options.errorRecovery?(this.raise(u.InvalidDigit,{at:nt(e,s,i),radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(u.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(u.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(u.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(u.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,s,i)=>{this.recordStrictModeErrors(u.StrictNumericEscape,{at:nt(e,s,i)})},unterminated:(e,s,i)=>{throw this.raise(u.UnterminatedString,{at:nt(e-1,s,i)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(u.StrictNumericEscape),unterminated:(e,s,i)=>{throw this.raise(u.UnterminatedTemplate,{at:nt(e,s,i)})}}),this.state=new Br,this.state.init(t),this.input=r,this.length=r.length,this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new De(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let r=this.state;return this.state=t,r}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return ps.lastIndex=t,ps.test(this.input)?ps.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}codePointAtPos(t){let r=this.input.charCodeAt(t);if((r&64512)===55296&&++t{let[e,s]=r;return this.raise(e,{at:s})}),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(137);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let r;this.isLookahead||(r=this.state.curPosition());let e=this.state.pos,s=this.input.indexOf(t,e+2);if(s===-1)throw this.raise(u.UnterminatedComment,{at:this.state.curPosition()});for(this.state.pos=s+t.length,bt.lastIndex=e+2;bt.test(this.input)&&bt.lastIndex<=s;)++this.state.curLine,this.state.lineStart=bt.lastIndex;if(this.isLookahead)return;let i={type:"CommentBlock",value:this.input.slice(e+2,s),start:e,end:s+t.length,loc:new d(r,this.state.curPosition())};return this.options.tokens&&this.pushToken(i),i}skipLineComment(t){let r=this.state.pos,e;this.isLookahead||(e=this.state.curPosition());let s=this.input.charCodeAt(this.state.pos+=t);if(this.state.post)){let i=this.skipLineComment(3);i!==void 0&&(this.addComment(i),this.options.attachComment&&r.push(i))}else break e}else if(e===60&&!this.inModule){let s=this.state.pos;if(this.input.charCodeAt(s+1)===33&&this.input.charCodeAt(s+2)===45&&this.input.charCodeAt(s+3)===45){let i=this.skipLineComment(4);i!==void 0&&(this.addComment(i),this.options.attachComment&&r.push(i))}else break e}else break e}}if(r.length>0){let e=this.state.pos,s={start:t,end:e,comments:r,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(s)}}finishToken(t,r){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let e=this.state.type;this.state.type=t,this.state.value=r,this.isLookahead||this.updateContext(e)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,r=this.codePointAtPos(t);if(r>=48&&r<=57)throw this.raise(u.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(r===123||r===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(r===123?u.RecordExpressionHashIncorrectStartSyntaxType:u.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,r===123?this.finishToken(7):this.finishToken(1)}else ve(r)?(++this.state.pos,this.finishToken(136,this.readWord1(r))):r===92?(++this.state.pos,this.finishToken(136,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let r=this.state.pos;for(this.state.pos+=1;!at(t)&&++this.state.pos=48&&r<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(u.TupleExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(u.RecordExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let r=this.input.charCodeAt(this.state.pos+1);if(r===120||r===88){this.readRadixNumber(16);return}if(r===111||r===79){this.readRadixNumber(8);return}if(r===98||r===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(ve(t)){this.readWord(t);return}}throw this.raise(u.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(t)})}finishOp(t,r){let e=this.input.slice(this.state.pos,this.state.pos+r);this.state.pos+=r,this.finishToken(t,e)}readRegexp(){let t=this.state.startLoc,r=this.state.start+1,e,s,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(u.UnterminatedRegExp,{at:y(t,1)});let c=this.input.charCodeAt(i);if(at(c))throw this.raise(u.UnterminatedRegExp,{at:y(t,1)});if(e)e=!1;else{if(c===91)s=!0;else if(c===93&&s)s=!1;else if(c===47&&!s)break;e=c===92}}let a=this.input.slice(r,i);++i;let n="",o=()=>y(t,i+2-r);for(;i2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,{n:i,pos:a}=Rr(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,r,e,s,this.errorHandlers_readInt,!1);return this.state.pos=a,i}readRadixNumber(t){let r=this.state.curPosition(),e=!1;this.state.pos+=2;let s=this.readInt(t);s==null&&this.raise(u.InvalidDigit,{at:y(r,2),radix:t});let i=this.input.charCodeAt(this.state.pos);if(i===110)++this.state.pos,e=!0;else if(i===109)throw this.raise(u.InvalidDecimal,{at:r});if(ve(this.codePointAtPos(this.state.pos)))throw this.raise(u.NumberIdentifier,{at:this.state.curPosition()});if(e){let a=this.input.slice(r.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(133,a);return}this.finishToken(132,s)}readNumber(t){let r=this.state.pos,e=this.state.curPosition(),s=!1,i=!1,a=!1,n=!1,o=!1;!t&&this.readInt(10)===null&&this.raise(u.InvalidNumber,{at:this.state.curPosition()});let c=this.state.pos-r>=2&&this.input.charCodeAt(r)===48;if(c){let P=this.input.slice(r,this.state.pos);if(this.recordStrictModeErrors(u.StrictOctalLiteral,{at:e}),!this.state.strict){let b=P.indexOf("_");b>0&&this.raise(u.ZeroDigitNumericSeparator,{at:y(e,b)})}o=c&&!/[89]/.test(P)}let p=this.input.charCodeAt(this.state.pos);if(p===46&&!o&&(++this.state.pos,this.readInt(10),s=!0,p=this.input.charCodeAt(this.state.pos)),(p===69||p===101)&&!o&&(p=this.input.charCodeAt(++this.state.pos),(p===43||p===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(u.InvalidOrMissingExponent,{at:e}),s=!0,n=!0,p=this.input.charCodeAt(this.state.pos)),p===110&&((s||c)&&this.raise(u.InvalidBigIntLiteral,{at:e}),++this.state.pos,i=!0),p===109&&(this.expectPlugin("decimal",this.state.curPosition()),(n||c)&&this.raise(u.InvalidDecimal,{at:e}),++this.state.pos,a=!0),ve(this.codePointAtPos(this.state.pos)))throw this.raise(u.NumberIdentifier,{at:this.state.curPosition()});let m=this.input.slice(r,this.state.pos).replace(/[_mn]/g,"");if(i){this.finishToken(133,m);return}if(a){this.finishToken(134,m);return}let x=o?parseInt(m,8):parseFloat(m);this.finishToken(132,x)}readCodePoint(t){let{code:r,pos:e}=jr(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=e,r}readString(t){let{str:r,pos:e,curLine:s,lineStart:i}=_r(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=e+1,this.state.lineStart=i,this.state.curLine=s,this.finishToken(131,r)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:r,firstInvalidLoc:e,pos:s,curLine:i,lineStart:a}=_r("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=s+1,this.state.lineStart=a,this.state.curLine=i,e&&(this.state.firstInvalidTemplateEscapePos=new f(e.curLine,e.pos-e.lineStart,e.pos)),this.input.codePointAt(s)===96?this.finishToken(24,e?null:t+r+"`"):(this.state.pos++,this.finishToken(25,e?null:t+r+"${"))}recordStrictModeErrors(t,r){let{at:e}=r,s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,{at:e}):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let r="",e=this.state.pos,s=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos=0;o--){let c=n[o];if(c.loc.index===a)return n[o]=t({loc:i,details:s});if(c.loc.indexthis.hasPlugin(r)))throw this.raise(u.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:t})}errorBuilder(t){return(r,e,s)=>{this.raise(t,{at:nt(r,e,s)})}}},El=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},bl=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new El)}exit(){let t=this.stack.pop(),r=this.current();for(let[e,s]of Array.from(t.undefinedPrivateNames))r?r.undefinedPrivateNames.has(e)||r.undefinedPrivateNames.set(e,s):this.parser.raise(u.InvalidPrivateFieldResolution,{at:s,identifierName:e})}declarePrivateName(t,r,e){let{privateNames:s,loneAccessors:i,undefinedPrivateNames:a}=this.current(),n=s.has(t);if(r&os){let o=n&&i.get(t);if(o){let c=o&Et,p=r&Et,m=o&os,x=r&os;n=m===x||c!==p,n||i.delete(t)}else n||i.set(t,r)}n&&this.parser.raise(u.PrivateNameRedeclaration,{at:e,identifierName:t}),s.add(t),a.delete(t)}usePrivateName(t,r){let e;for(e of this.stack)if(e.privateNames.has(t))return;e?e.undefinedPrivateNames.set(t,r):this.parser.raise(u.InvalidPrivateFieldResolution,{at:r,identifierName:t})}},Cl=0,qr=1,ds=2,Ur=3,St=class{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Cl;this.type=void 0,this.type=t}canBeArrowParameterDeclaration(){return this.type===ds||this.type===qr}isCertainlyParameterDeclaration(){return this.type===Ur}},$r=class extends St{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,r){let{at:e}=r,s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},Sl=class{constructor(t){this.parser=void 0,this.stack=[new St],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,r){let{at:e}=r,s={at:e.loc.start},{stack:i}=this,a=i.length-1,n=i[a];for(;!n.isCertainlyParameterDeclaration();){if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(t,s);else return;n=i[--a]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,r){let{at:e}=r,{stack:s}=this,i=s[s.length-1],a={at:e.loc.start};if(i.isCertainlyParameterDeclaration())this.parser.raise(t,a);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(t,a);else return}recordAsyncArrowParametersError(t){let{at:r}=t,{stack:e}=this,s=e.length-1,i=e[s];for(;i.canBeArrowParameterDeclaration();)i.type===ds&&i.recordDeclarationError(u.AwaitBindingIdentifier,{at:r}),i=e[--s]}validateAsPattern(){let{stack:t}=this,r=t[t.length-1];r.canBeArrowParameterDeclaration()&&r.iterateErrors(e=>{let[s,i]=e;this.parser.raise(s,{at:i});let a=t.length-2,n=t[a];for(;n.canBeArrowParameterDeclaration();)n.clearDeclarationError(i.index),n=t[--a]})}};function wl(){return new St(Ur)}function Il(){return new $r(qr)}function Nl(){return new $r(ds)}function Hr(){return new St}var Ge=0,zr=1,wt=2,Vr=4,Je=8,kl=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&wt)>0}get hasYield(){return(this.currentFlags()&zr)>0}get hasReturn(){return(this.currentFlags()&Vr)>0}get hasIn(){return(this.currentFlags()&Je)>0}};function It(t,r){return(t?wt:0)|(r?zr:0)}var Dl=class extends vl{addExtra(t,r,e){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;if(!t)return;let i=t.extra=t.extra||{};s?i[r]=e:Object.defineProperty(i,r,{enumerable:s,value:e})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,r){let e=t+r.length;if(this.input.slice(t,e)===r){let s=this.input.charCodeAt(e);return!(ze(s)||(s&64512)===55296)}return!1}isLookaheadContextual(t){let r=this.nextTokenStart();return this.isUnparsedContextual(r,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,r){if(!this.eatContextual(t))throw r!=null?this.raise(r,{at:this.state.startLoc}):this.unexpected(null,t)}canInsertSemicolon(){return this.match(137)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return cs.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return Or.lastIndex=this.state.end,Or.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(){((arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isLineTerminator():this.eat(13))||this.raise(u.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(t,r){this.eat(t)||this.unexpected(r,t)}tryParse(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state.clone(),e={node:null};try{let s=t(function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;throw e.node=i,e});if(this.state.errors.length>r.errors.length){let i=this.state;return this.state=r,this.state.tokensLength=i.tokensLength,{node:s,error:i.errors[r.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:s,error:null,thrown:!1,aborted:!1,failState:null}}catch(s){let i=this.state;if(this.state=r,s instanceof SyntaxError)return{node:null,error:s,thrown:!0,aborted:!1,failState:i};if(s===e)return{node:e.node,error:null,thrown:!1,aborted:!0,failState:i};throw s}}checkExpressionErrors(t,r){if(!t)return!1;let{shorthandAssignLoc:e,doubleProtoLoc:s,privateKeyLoc:i,optionalParametersLoc:a}=t,n=!!e||!!s||!!a||!!i;if(!r)return n;e!=null&&this.raise(u.InvalidCoverInitializedName,{at:e}),s!=null&&this.raise(u.DuplicateProto,{at:s}),i!=null&&this.raise(u.UnexpectedPrivateField,{at:i}),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return yr(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isOptionalChain(t){return t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression"}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.sourceType==="module",r=this.state.labels;this.state.labels=[];let e=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let s=this.inModule;this.inModule=t;let i=this.scope,a=this.getScopeHandler();this.scope=new a(this,t);let n=this.prodParam;this.prodParam=new kl;let o=this.classScope;this.classScope=new bl(this);let c=this.expressionScope;return this.expressionScope=new Sl(this),()=>{this.state.labels=r,this.exportedIdentifiers=e,this.inModule=s,this.scope=i,this.prodParam=n,this.classScope=o,this.expressionScope=c}}enterInitialScopes(){let t=Ge;this.inModule&&(t|=wt),this.scope.enter(Ke),this.prodParam.enter(t)}checkDestructuringPrivate(t){let{privateKeyLoc:r}=t;r!==null&&this.expectPlugin("destructuringPrivate",r)}},Nt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},kt=class{constructor(t,r,e){this.type="",this.start=r,this.end=0,this.loc=new d(e),t!=null&&t.options.ranges&&(this.range=[r,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},ms=kt.prototype;ms.__clone=function(){let t=new kt(void 0,this.start,this.loc.start),r=Object.keys(this);for(let e=0,s=r.length;e1&&arguments[1]!==void 0?arguments[1]:this.state.lastTokEndLoc;t.end=r.index,t.loc.end=r,this.options.ranges&&(t.range[1]=r.index)}resetStartLocationFromNode(t,r){this.resetStartLocation(t,r.loc.start)}},Bl=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),F=_`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:t=>{let{reservedType:r}=t;return`Cannot overwrite reserved type ${r}.`},DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:t=>{let{memberName:r,enumName:e}=t;return`Boolean enum members need to be initialized. Use either \`${r} = true,\` or \`${r} = false,\` in enum \`${e}\`.`},EnumDuplicateMemberName:t=>{let{memberName:r,enumName:e}=t;return`Enum member names need to be unique, but the name \`${r}\` has already been used before in enum \`${e}\`.`},EnumInconsistentMemberValues:t=>{let{enumName:r}=t;return`Enum \`${r}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`},EnumInvalidExplicitType:t=>{let{invalidEnumType:r,enumName:e}=t;return`Enum type \`${r}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`},EnumInvalidExplicitTypeUnknownSupplied:t=>{let{enumName:r}=t;return`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${r}\`.`},EnumInvalidMemberInitializerPrimaryType:t=>{let{enumName:r,memberName:e,explicitType:s}=t;return`Enum \`${r}\` has type \`${s}\`, so the initializer of \`${e}\` needs to be a ${s} literal.`},EnumInvalidMemberInitializerSymbolType:t=>{let{enumName:r,memberName:e}=t;return`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${r}\`.`},EnumInvalidMemberInitializerUnknownType:t=>{let{enumName:r,memberName:e}=t;return`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${r}\`.`},EnumInvalidMemberName:t=>{let{enumName:r,memberName:e,suggestion:s}=t;return`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${s}\`, in enum \`${r}\`.`},EnumNumberMemberNotInitialized:t=>{let{enumName:r,memberName:e}=t;return`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${r}\`.`},EnumStringMemberInconsistentlyInitailized:t=>{let{enumName:r}=t;return`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${r}\`.`},GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:t=>{let{reservedType:r}=t;return`Unexpected reserved type ${r}.`},UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:t=>{let{unsupportedExportKind:r,suggestion:e}=t;return`\`declare export ${r}\` is not supported. Use \`${e}\` instead.`},UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Ml(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function ys(t){return t.importKind==="type"||t.importKind==="typeof"}function Kr(t){return Ae(t)&&t!==97}var _l={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Rl(t,r){let e=[],s=[];for(let i=0;iclass extends t{constructor(){super(...arguments),this.flowPragma=void 0}getScopeHandler(){return ul}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,s){return e!==131&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){let s=jl.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}return super.addComment(e)}flowParseTypeInitialiser(e){let s=this.state.inType;this.state.inType=!0,this.expect(e||14);let i=this.flowParseType();return this.state.inType=s,i}flowParsePredicate(){let e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(108),this.state.lastTokStart>s.index+1&&this.raise(F.UnexpectedSpaceBetweenModuloChecks,{at:s}),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,i=null;return this.match(54)?(this.state.inType=e,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let s=e.id=this.parseIdentifier(),i=this.startNode(),a=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let n=this.flowParseFunctionTypeParams();return i.params=n.params,i.rest=n.rest,i.this=n._this,this.expect(11),[i.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),a.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(a,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,il,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(125))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(F.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e));if(this.isContextual(128))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(129))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(127))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,vt,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(Ve),this.match(131)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let s=e.body=this.startNode(),i=s.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(128)&&!this.match(87)&&this.raise(F.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),super.parseImport(o)):(this.expectContextual(123,F.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),i.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let a=null,n=!1;return i.forEach(o=>{Ml(o)?(a==="CommonJS"&&this.raise(F.AmbiguousDeclareModuleKind,{at:o}),a="ES"):o.type==="DeclareModuleExports"&&(n&&this.raise(F.DuplicateDeclareModuleExports,{at:o}),a==="ES"&&this.raise(F.AmbiguousDeclareModuleKind,{at:o}),a="CommonJS",n=!0)}),e.kind=a||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(128)||this.isContextual(127))&&!s){let i=this.state.value;throw this.raise(F.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:i,suggestion:_l[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(129))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(127)||this.isContextual(128)||this.isContextual(129))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(109),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();let s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?Nr:_e,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.implements=[],e.mixins=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(this.isContextual(115)){this.next();do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12))}if(this.isContextual(111)){this.next();do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(F.UnexpectedReservedUnderscore,{at:this.state.startLoc})}checkReservedType(e,s,i){Bl.has(e)&&this.raise(i?F.AssignReservedType:F.UnexpectedReservedType,{at:s,reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,_e,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(128),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,_e,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,s=this.state.startLoc,i=this.startNode(),a=this.flowParseVariance(),n=this.flowParseTypeAnnotatableIdentifier();return i.name=n.name,i.variance=a,i.bound=n.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):e&&this.raise(F.MissingTypeParamDefault,{at:s}),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(140)?this.next():this.unexpected();let i=!1;do{let a=this.flowParseTypeParameter(i);s.params.push(a),a.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=i,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(127),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(132)||this.match(131)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,i){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=i,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){let i=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(i),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType(e){let{allowStatic:s,allowExact:i,allowSpread:a,allowProto:n,allowInexact:o}=e,c=this.state.inType;this.state.inType=!0;let p=this.startNode();p.callProperties=[],p.properties=[],p.indexers=[],p.internalSlots=[];let m,x,P=!1;for(i&&this.match(6)?(this.expect(6),m=9,x=!0):(this.expect(5),m=8,x=!1),p.exact=x;!this.match(m);){let M=!1,q=null,te=null,se=this.startNode();if(n&&this.isContextual(116)){let ie=this.lookahead();ie.type!==14&&ie.type!==17&&(this.next(),q=this.state.startLoc,s=!1)}if(s&&this.isContextual(104)){let ie=this.lookahead();ie.type!==14&&ie.type!==17&&(this.next(),M=!0)}let Z=this.flowParseVariance();if(this.eat(0))q!=null&&this.unexpected(q),this.eat(0)?(Z&&this.unexpected(Z.loc.start),p.internalSlots.push(this.flowParseObjectTypeInternalSlot(se,M))):p.indexers.push(this.flowParseObjectTypeIndexer(se,M,Z));else if(this.match(10)||this.match(47))q!=null&&this.unexpected(q),Z&&this.unexpected(Z.loc.start),p.callProperties.push(this.flowParseObjectTypeCallProperty(se,M));else{let ie="init";if(this.isContextual(98)||this.isContextual(103)){let mh=this.lookahead();yr(mh.type)&&(ie=this.state.value,this.next())}let Ye=this.flowParseObjectTypeProperty(se,M,q,Z,ie,a,o!=null?o:!x);Ye===null?(P=!0,te=this.state.lastTokStartLoc):p.properties.push(Ye)}this.flowObjectTypeSemicolon(),te&&!this.match(8)&&!this.match(9)&&this.raise(F.UnexpectedExplicitInexactInObject,{at:te})}this.expect(m),a&&(p.inexact=P);let b=this.finishNode(p,"ObjectTypeAnnotation");return this.state.inType=c,b}flowParseObjectTypeProperty(e,s,i,a,n,o,c){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?c||this.raise(F.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(F.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),a&&this.raise(F.InexactVariance,{at:a}),null):(o||this.raise(F.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),i!=null&&this.unexpected(i),a&&this.raise(F.SpreadVariance,{at:a}),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=i!=null,e.kind=n;let p=!1;return this.match(47)||this.match(10)?(e.method=!0,i!=null&&this.unexpected(i),a&&this.unexpected(a.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(n==="get"||n==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(F.ThisParamBannedInConstructor,{at:e.value.this})):(n!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(p=!0),e.value=this.flowParseTypeInitialiser(),e.variance=a),e.optional=p,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let s=e.kind==="get"?0:1,i=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?F.GetterMayNotHaveThisParam:F.SetterMayNotHaveThisParam,{at:e.value.this}),i!==s&&this.raise(e.kind==="get"?u.BadGetterArity:u.BadSetterArity,{at:e}),e.kind==="set"&&e.value.rest&&this.raise(u.BadSetterRestParameter,{at:e})}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var i;(i=e)!=null||(e=this.state.startLoc);let a=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let n=this.startNodeAt(e);n.qualification=a,n.id=this.flowParseRestrictedIdentifier(!0),a=this.finishNode(n,"QualifiedTypeIdentifier")}return a}flowParseGenericType(e,s){let i=this.startNodeAt(e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos0&&arguments[0]!==void 0?arguments[0]:[],s=null,i=null;for(this.match(78)&&(i=this.flowParseFunctionTypeParam(!0),i.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(s=this.flowParseFunctionTypeParam(!1)),{params:e,rest:s,_this:i}}flowIdentToTypeAnnotation(e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");case"symbol":return this.finishNode(s,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(e,i)}}flowParsePrimaryType(){let e=this.state.startLoc,s=this.startNode(),i,a,n=!1,o=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,a=this.flowParseTupleType(),this.state.noAnonFunctionType=o,a;case 47:return s.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),s.params=i.params,s.rest=i.rest,s.this=i._this,this.expect(11),this.expect(19),s.returnType=this.flowParseType(),this.finishNode(s,"FunctionTypeAnnotation");case 10:if(this.next(),!this.match(11)&&!this.match(21))if(z(this.state.type)||this.match(78)){let c=this.lookahead().type;n=c!==17&&c!==14}else n=!0;if(n){if(this.state.noAnonFunctionType=!1,a=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),a;this.eat(12)}return a?i=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(a)]):i=this.flowParseFunctionTypeParams(),s.params=i.params,s.rest=i.rest,s.this=i._this,this.expect(11),this.expect(19),s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation");case 131:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return s.value=this.match(85),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(132))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",s);if(this.match(133))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",s);throw this.raise(F.UnexpectedSubtractionOperand,{at:this.state.startLoc})}throw this.unexpected();case 132:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 133:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(s,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(Xt(this.state.type)){let c=Ie(this.state.type);return this.next(),super.createIdentifier(s,c)}else if(z(this.state.type))return this.isContextual(127)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,s,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,s=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let a=this.startNodeAt(e),n=this.eat(18);i=i||n,this.expect(0),!n&&this.match(3)?(a.elementType=s,this.next(),s=this.finishNode(a,"ArrayTypeAnnotation")):(a.objectType=s,a.indexType=this.flowParseType(),this.expect(3),i?(a.optional=n,s=this.finishNode(a,"OptionalIndexedAccessType")):s=this.finishNode(a,"IndexedAccessType"))}return s}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let s=this.startNodeAt(e.loc.start);return s.params=[this.reinterpretTypeAsFunctionTypeParam(e)],s.rest=null,s.this=null,s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let s=this.flowParseAnonFunctionWithoutParens();for(e.types=[s];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?s:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let s=this.flowParseIntersectionType();for(e.types=[s];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?s:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let s=this.flowParseUnionType();return this.state.inType=e,s}flowParseTypeOrImplicitInstantiation(){if(this.state.type===130&&this.state.value==="_"){let e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(e,s)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let s=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(s)),s}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value==="+"?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,s){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return s?this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,i)):super.parseFunctionBody(e,!1,i)}parseFunctionBodyAndFinish(e,s){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.match(14)){let a=this.startNode();[a.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=a.typeAnnotation?this.finishNode(a,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,i)}parseStatementLike(e){if(this.state.strict&&this.isContextual(127)){let i=this.lookahead();if(Ae(i.type)){let a=this.startNode();return this.next(),this.flowParseInterface(a)}}else if(this.shouldParseEnums()&&this.isContextual(124)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,i){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||z(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(z(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){let{type:e}=this.state;return xr(e)||this.shouldParseEnums()&&e===124?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return xr(e)||this.shouldParseEnums()&&e===124?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,i){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let P=this.lookaheadCharCode();if(P===44||P===61||P===58||P===41)return this.setOptionalParametersError(i),e}this.expect(17);let a=this.state.clone(),n=this.state.noArrowAt,o=this.startNodeAt(s),{consequent:c,failed:p}=this.tryParseConditionalConsequent(),[m,x]=this.getArrowLikeExpressions(c);if(p||x.length>0){let P=[...n];if(x.length>0){this.state=a,this.state.noArrowAt=P;for(let b=0;b1&&this.raise(F.AmbiguousConditionalArrow,{at:a.startLoc}),p&&m.length===1&&(this.state=a,P.push(m[0].start),this.state.noArrowAt=P,{consequent:c,failed:p}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(c,!0),this.state.noArrowAt=n,this.expect(14),o.test=e,o.consequent=c,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){let i=[e],a=[];for(;i.length!==0;){let n=i.pop();n.type==="ArrowFunctionExpression"?(n.typeParameters||!n.returnType?this.finishArrowValidation(n):a.push(n),i.push(n.body)):n.type==="ConditionalExpression"&&(i.push(n.consequent),i.push(n.alternate))}return s?(a.forEach(n=>this.finishArrowValidation(n)),[a,[]]):Rl(a,n=>n.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(Ee|es),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let i;return this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),i=s(),this.state.noArrowParamsConversionAt.pop()):i=s(),i}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExport(e,s){let i=super.parseExport(e,s);return(i.type==="ExportNamedDeclaration"||i.type==="ExportAllDeclaration")&&(i.exportKind=i.exportKind||"value"),i}parseExportDeclaration(e){if(this.isContextual(128)){e.exportKind="type";let s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(129)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(127)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.shouldParseEnums()&&this.isContextual(124)){e.exportKind="value";let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(128)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:s}=this.state,i=super.maybeParseExportNamespaceSpecifier(e);return i&&e.exportKind==="type"&&this.unexpected(s),i}parseClassId(e,s,i){super.parseClassId(e,s,i),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,i){let{startLoc:a}=this.state;if(this.isContextual(123)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,i),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(F.DeclareClassElement,{at:a}):s.value&&this.raise(F.DeclareClassFieldInitializer,{at:s.value}))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(u.InvalidIdentifier,{at:this.state.curPosition(),identifierName:s}),this.finishToken(130,s)}getTokenFromCode(e){let s=this.input.charCodeAt(this.state.pos+1);return e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):Xo(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,i){for(let a=0;a1||!s)&&this.raise(F.TypeCastInPattern,{at:n.typeAnnotation})}return e}parseArrayLike(e,s,i,a){let n=super.parseArrayLike(e,s,i,a);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(n.elements),n}isValidLVal(e,s,i){return e==="TypeCastExpression"||super.isValidLVal(e,s,i)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,i,a,n,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,i,a,n,o),s.params&&n){let c=s.params;c.length>0&&this.isThisParam(c[0])&&this.raise(F.ThisParamBannedInConstructor,{at:s})}else if(s.type==="MethodDefinition"&&n&&s.value.params){let c=s.value.params;c.length>0&&this.isThisParam(c[0])&&this.raise(F.ThisParamBannedInConstructor,{at:s})}}pushClassPrivateMethod(e,s,i,a){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,i,a)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(111)){this.next();let s=e.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let s=this.getObjectOrClassMethodParams(e);if(s.length>0){let i=s[0];this.isThisParam(i)&&e.kind==="get"?this.raise(F.GetterMayNotHaveThisParam,{at:i}):this.isThisParam(i)&&this.raise(F.SetterMayNotHaveThisParam,{at:i})}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,i,a,n,o,c){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let p;this.match(47)&&!o&&(p=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let m=super.parseObjPropValue(e,s,i,a,n,o,c);return p&&((m.value||m).typeParameters=p),m}parseAssignableListItemTypes(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(F.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(F.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(F.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(F.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.startsuper.parseMaybeAssign(e,s),a),!n.error)return n.node;let{context:p}=this.state,m=p[p.length-1];(m===U.j_oTag||m===U.j_expr)&&p.pop()}if((i=n)!=null&&i.error||this.match(47)){var o,c;a=a||this.state.clone();let p,m=this.tryParse(P=>{var b;p=this.flowParseTypeParameterDeclaration();let M=this.forwardNoArrowParamsConversionAt(p,()=>{let te=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(te,p),te});(b=M.extra)!=null&&b.parenthesized&&P();let q=this.maybeUnwrapTypeCastExpression(M);return q.type!=="ArrowFunctionExpression"&&P(),q.typeParameters=p,this.resetStartLocationFromNode(q,p),M},a),x=null;if(m.node&&this.maybeUnwrapTypeCastExpression(m.node).type==="ArrowFunctionExpression"){if(!m.error&&!m.aborted)return m.node.async&&this.raise(F.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:p}),m.node;x=m.node}if((o=n)!=null&&o.node)return this.state=n.failState,n.node;if(x)return this.state=m.failState,x;throw(c=n)!=null&&c.thrown?n.error:m.thrown?m.error:this.raise(F.UnexpectedTokenAfterTypeParameter,{at:p})}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let a=this.startNode();return[a.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),a});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;if(!(i&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1)){for(let n=0;n0&&this.raise(F.ThisParamMustBeFirst,{at:e.params[n]});return super.checkParams(e,s,i,a)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,s,i){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.indexOf(s.index)!==-1){this.next();let a=this.startNodeAt(s);a.callee=e,a.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(a,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let a=this.state.clone(),n=this.tryParse(c=>this.parseAsyncArrowWithTypeParameters(s)||c(),a);if(!n.error&&!n.aborted)return n.node;let o=this.tryParse(()=>super.parseSubscripts(e,s,i),a);if(o.node&&!o.error)return o.node;if(n.node)return this.state=n.failState,n.node;if(o.node)return this.state=o.failState,o.node;throw n.error||o.error}return super.parseSubscripts(e,s,i)}parseSubscript(e,s,i,a){if(this.match(18)&&this.isLookaheadToken_lt()){if(a.optionalChainMember=!0,i)return a.stop=!0,e;this.next();let n=this.startNodeAt(s);return n.callee=e,n.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),n.arguments=this.parseCallExpressionArguments(11,!1),n.optional=!0,this.finishCallExpression(n,!0)}else if(!i&&this.shouldParseTypes()&&this.match(47)){let n=this.startNodeAt(s);n.callee=e;let o=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(11,!1),a.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,a.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,i,a)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){let s=this.startNodeAt(e);if(this.parseFunctionParams(s),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){let i=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(F.UnterminatedFlowComment,{at:this.state.curPosition()}),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(F.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;let i=this.input.charCodeAt(s+e),a=this.input.charCodeAt(s+e+1);return i===58&&a===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:i===58&&a!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(u.UnterminatedComment,{at:this.state.curPosition()})}flowEnumErrorBooleanMemberNotInitialized(e,s){let{enumName:i,memberName:a}=s;this.raise(F.EnumBooleanMemberNotInitialized,{at:e,memberName:a,enumName:i})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?F.EnumInvalidMemberInitializerSymbolType:F.EnumInvalidMemberInitializerPrimaryType:F.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},s))}flowEnumErrorNumberMemberNotInitialized(e,s){let{enumName:i,memberName:a}=s;this.raise(F.EnumNumberMemberNotInitialized,{at:e,enumName:i,memberName:a})}flowEnumErrorStringMemberInconsistentlyInitailized(e,s){let{enumName:i}=s;this.raise(F.EnumStringMemberInconsistentlyInitailized,{at:e,enumName:i})}flowEnumMemberInit(){let e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 132:{let i=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 131:{let i=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,s=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:i}}flowEnumCheckExplicitTypeMismatch(e,s,i){let{explicitType:a}=s;a!==null&&a!==i&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers(e){let{enumName:s,explicitType:i}=e,a=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},o=!1;for(;!this.match(8);){if(this.eat(21)){o=!0;break}let c=this.startNode(),{id:p,init:m}=this.flowEnumMemberRaw(),x=p.name;if(x==="")continue;/^[a-z]/.test(x)&&this.raise(F.EnumInvalidMemberName,{at:p,memberName:x,suggestion:x[0].toUpperCase()+x.slice(1),enumName:s}),a.has(x)&&this.raise(F.EnumDuplicateMemberName,{at:p,memberName:x,enumName:s}),a.add(x);let P={enumName:s,explicitType:i,memberName:x};switch(c.id=p,m.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(m.loc,P,"boolean"),c.init=m.value,n.booleanMembers.push(this.finishNode(c,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(m.loc,P,"number"),c.init=m.value,n.numberMembers.push(this.finishNode(c,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(m.loc,P,"string"),c.init=m.value,n.stringMembers.push(this.finishNode(c,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(m.loc,P);case"none":switch(i){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(m.loc,P);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(m.loc,P);break;default:n.defaultedMembers.push(this.finishNode(c,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:o}}flowEnumStringMembers(e,s,i){let{enumName:a}=i;if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(let n of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(n,{enumName:a});return s}else{for(let n of s)this.flowEnumErrorStringMemberInconsistentlyInitailized(n,{enumName:a});return e}}flowEnumParseExplicitType(e){let{enumName:s}=e;if(!this.eatContextual(101))return null;if(!z(this.state.type))throw this.raise(F.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:s});let{value:i}=this.state;return this.next(),i!=="boolean"&&i!=="number"&&i!=="string"&&i!=="symbol"&&this.raise(F.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:s,invalidEnumType:i}),i}flowEnumBody(e,s){let i=s.name,a=s.loc.start,n=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:o,hasUnknownMembers:c}=this.flowEnumMembers({enumName:i,explicitType:n});switch(e.hasUnknownMembers=c,n){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let p=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let m=o.booleanMembers.length,x=o.numberMembers.length,P=o.stringMembers.length,b=o.defaultedMembers.length;if(!m&&!x&&!P&&!b)return p();if(!m&&!x)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!x&&!P&&m>=b){for(let M of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(M.loc.start,{enumName:i,memberName:M.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!m&&!P&&x>=b){for(let M of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(M.loc.start,{enumName:i,memberName:M.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(F.EnumInconsistentMemberValues,{at:a,enumName:i}),p()}}}flowParseEnumDeclaration(e){let s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},Ul={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Re=_`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:t=>{let{openingTagName:r}=t;return`Expected corresponding JSX closing tag for <${r}>.`},MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:t=>{let{unexpected:r,HTMLEntity:e}=t;return`Unexpected token \`${r}\`. Did you mean \`${e}\` or \`{'${r}'}\`?`},UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...>?"});function Fe(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function Xe(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return Xe(t.object)+"."+Xe(t.property);throw new Error("Node had unexpected type: "+t.type)}var $l=t=>class extends t{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Re.UnterminatedJsxContent,{at:this.state.startLoc});let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:return this.state.pos===this.state.start?i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(140)):super.getTokenFromCode(i):(e+=this.input.slice(s,this.state.pos),this.finishToken(139,e));case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:at(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let s=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=e?`
+`:`\r
+`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(u.UnterminatedString,{at:this.state.startLoc});let a=this.input.charCodeAt(this.state.pos);if(a===e)break;a===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):at(a)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}return s+=this.input.slice(i,this.state.pos++),this.finishToken(131,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos1){for(let s=0;s=0;s--){let i=this.scopeStack[s];if(i.types.has(r)||i.exportOnlyBindings.has(r))return}super.checkLocalExport(t)}},Vl=(t,r)=>Object.hasOwnProperty.call(t,r)&&t[r];function Kl(t){if(t==null)throw new Error(`Unexpected ${t} value.`);return t}function Wr(t){if(!t)throw new Error("Assert fail")}var w=_`typescript`({AbstractMethodHasImplementation:t=>{let{methodName:r}=t;return`Method '${r}' cannot have an implementation because it is marked abstract.`},AbstractPropertyHasInitializer:t=>{let{propertyName:r}=t;return`Property '${r}' cannot have an initializer because it is marked abstract.`},AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:t=>{let{kind:r}=t;return`'declare' is not allowed in ${r}ters.`},DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:t=>{let{modifier:r}=t;return"Accessibility modifier already seen."},DuplicateModifier:t=>{let{modifier:r}=t;return`Duplicate modifier: '${r}'.`},EmptyHeritageClauseType:t=>{let{token:r}=t;return`'${r}' list cannot be empty.`},EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:t=>{let{modifiers:r}=t;return`'${r[0]}' modifier cannot be used with '${r[1]}' modifier.`},IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:t=>{let{modifier:r}=t;return`Index signatures cannot have an accessibility modifier ('${r}').`},IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:t=>{let{modifier:r}=t;return`'${r}' modifier cannot appear on a type member.`},InvalidModifierOnTypeParameter:t=>{let{modifier:r}=t;return`'${r}' modifier cannot appear on a type parameter.`},InvalidModifierOnTypeParameterPositions:t=>{let{modifier:r}=t;return`'${r}' modifier can only appear on a type parameter of a class, interface or type alias.`},InvalidModifiersOrder:t=>{let{orderedModifiers:r}=t;return`'${r[0]}' modifier must precede '${r[1]}' modifier.`},InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:t=>{let{modifier:r}=t;return`Private elements cannot have an accessibility modifier ('${r}').`},ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:t=>{let{typeParameterName:r}=t;return`Single type parameter ${r} should have a trailing comma. Example usage: <${r},>.`},StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:t=>{let{type:r}=t;return`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`}});function Wl(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Gr(t){return t==="private"||t==="public"||t==="protected"}function Gl(t){return t==="in"||t==="out"}var Jl=t=>class extends t{getScopeHandler(){return zl}tsIsIdentifier(){return z(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(136)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,s){if(!z(this.state.type)&&this.state.type!==58)return;let i=this.state.value;if(e.indexOf(i)!==-1){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers(e){let{modified:s,allowedModifiers:i,disallowedModifiers:a,stopOnStartOfClassStaticBlock:n,errorTemplate:o=w.InvalidModifierOnTypeMember}=e,c=(m,x,P,b)=>{x===P&&s[b]&&this.raise(w.InvalidModifiersOrder,{at:m,orderedModifiers:[P,b]})},p=(m,x,P,b)=>{(s[P]&&x===b||s[b]&&x===P)&&this.raise(w.IncompatibleModifiers,{at:m,modifiers:[P,b]})};for(;;){let{startLoc:m}=this.state,x=this.tsParseModifier(i.concat(a!=null?a:[]),n);if(!x)break;Gr(x)?s.accessibility?this.raise(w.DuplicateAccessibilityModifier,{at:m,modifier:x}):(c(m,x,x,"override"),c(m,x,x,"static"),c(m,x,x,"readonly"),s.accessibility=x):Gl(x)?(s[x]&&this.raise(w.DuplicateModifier,{at:m,modifier:x}),s[x]=!0,c(m,x,"in","out")):(Object.hasOwnProperty.call(s,x)?this.raise(w.DuplicateModifier,{at:m,modifier:x}):(c(m,x,"static","readonly"),c(m,x,"static","override"),c(m,x,"override","readonly"),c(m,x,"abstract","override"),p(m,x,"declare","override"),p(m,x,"static","abstract")),s[x]=!0),a!=null&&a.includes(x)&&this.raise(o,{at:m,modifier:x})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}throw new Error("Unreachable")}tsParseList(e,s){let i=[];for(;!this.tsIsListTerminator(e);)i.push(s());return i}tsParseDelimitedList(e,s,i){return Kl(this.tsParseDelimitedListWorker(e,s,!0,i))}tsParseDelimitedListWorker(e,s,i,a){let n=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let c=s();if(c==null)return;if(n.push(c),this.eat(12)){o=this.state.lastTokStart;continue}if(this.tsIsListTerminator(e))break;i&&this.expect(12);return}return a&&(a.value=o),n}tsParseBracketedList(e,s,i,a,n){a||(i?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,s,n);return i?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(131)||this.raise(w.UnsupportedImportTypeArgument,{at:this.state.startLoc}),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=this.parseIdentifier(e);for(;this.eat(16);){let i=this.startNodeAtNode(s);i.left=s,i.right=this.parseIdentifier(e),s=this.finishNode(i,"TSQualifiedName")}return s}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseInOutModifiers(e){this.tsParseModifiers({modified:e,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:w.InvalidModifierOnTypeParameter})}tsParseNoneModifiers(e){this.tsParseModifiers({modified:e,allowedModifiers:[],disallowedModifiers:["in","out"],errorTemplate:w.InvalidModifierOnTypeParameterPositions})}tsParseTypeParameter(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.tsParseNoneModifiers.bind(this),s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let s=this.startNode();this.match(47)||this.match(140)?this.next():this.unexpected();let i={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,i),s.params.length===0&&this.raise(w.EmptyTypeParameters,{at:s}),i.value!==-1&&this.addExtra(s,"trailingComma",i.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){let i=e===19,a="parameters",n="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(),this.expect(10),s[a]=this.tsParseBindingListForSignature(),i?s[n]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[n]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){return super.parseBindingList(11,41).map(e=>(e.type!=="Identifier"&&e.type!=="RestElement"&&e.type!=="ObjectPattern"&&e.type!=="ArrayPattern"&&this.raise(w.UnsupportedSignatureParameterKind,{at:e,type:e.type}),e))}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),z(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];let i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);let i=e;if(this.match(10)||this.match(47)){s&&this.raise(w.ReadonlyForMethodSignature,{at:e});let a=i;a.kind&&this.match(47)&&this.raise(w.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()}),this.tsFillSignature(14,a),this.tsParseTypeMemberSemicolon();let n="parameters",o="typeAnnotation";if(a.kind==="get")a[n].length>0&&(this.raise(u.BadGetterArity,{at:this.state.curPosition()}),this.isThisParam(a[n][0])&&this.raise(w.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}));else if(a.kind==="set"){if(a[n].length!==1)this.raise(u.BadSetterArity,{at:this.state.curPosition()});else{let c=a[n][0];this.isThisParam(c)&&this.raise(w.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}),c.type==="Identifier"&&c.optional&&this.raise(w.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()}),c.type==="RestElement"&&this.raise(w.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}a[o]&&this.raise(w.SetAccesorCannotHaveReturnType,{at:a[o]})}else a.kind="method";return this.finishNode(a,"TSMethodSignature")}else{let a=i;s&&(a.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(a.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({modified:e,allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]});let s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(120):(this.isContextual(120)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(120)):this.eatContextual(120)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1,i=null;return e.elementTypes.forEach(a=>{var n;let{type:o}=a;s&&o!=="TSRestType"&&o!=="TSOptionalType"&&!(o==="TSNamedTupleMember"&&a.optional)&&this.raise(w.OptionalTypeBeforeRequired,{at:a}),s||(s=o==="TSNamedTupleMember"&&a.optional||o==="TSOptionalType");let c=o;o==="TSRestType"&&(a=a.typeAnnotation,c=a.type);let p=c==="TSNamedTupleMember";(n=i)!=null||(i=p),i!==p&&this.raise(w.MixedLabeledAndUnlabeledElements,{at:a})}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,s=this.eat(21),i=this.tsParseType(),a=this.eat(17);if(this.eat(14)){let o=this.startNodeAtNode(i);o.optional=a,i.type==="TSTypeReference"&&!i.typeParameters&&i.typeName.type==="Identifier"?o.label=i.typeName:(this.raise(w.InvalidTupleMemberLabel,{at:i}),o.label=i),o.elementType=this.tsParseType(),i=this.finishNode(o,"TSNamedTupleMember")}else if(a){let o=this.startNodeAtNode(i);o.typeAnnotation=i,i=this.finishNode(o,"TSOptionalType")}if(s){let o=this.startNodeAt(e);o.typeAnnotation=i,i=this.finishNode(o,"TSRestType")}return i}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){let i=this.startNode();return e==="TSConstructorType"&&(i.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,e)}tsParseLiteralTypeNode(){let e=this.startNode();return e.literal=(()=>{switch(this.state.type){case 132:case 133:case 131:case 85:case 86:return super.parseExprAtom();default:throw this.unexpected()}})(),this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(114)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 131:case 132:case 133:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),s=this.lookahead();if(s.type!==132&&s.type!==133)throw this.unexpected();return e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(z(e)||e===88||e===84){let s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":Wl(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,s)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{let s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(w.UnexpectedReadonly,{at:e})}}tsParseInferType(){let e=this.startNode();this.expectContextual(113);let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return qo(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(113)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,i){let a=this.startNode(),n=this.eat(i),o=[];do o.push(s());while(this.eat(i));return o.length===1&&!n?o[0]:(a.types=o,this.finishNode(a,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(z(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,!0),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let s=this.startNode();this.expect(e);let i=this.startNode(),a=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(a&&this.match(78)){let c=this.tsParseThisTypeOrThisTypePredicate();return c.type==="TSThisType"?(i.parameterName=c,i.asserts=!0,i.typeAnnotation=null,c=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(c,i),c.asserts=!0),s.typeAnnotation=c,this.finishNode(s,"TSTypeAnnotation")}let n=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!n)return a?(i.parameterName=this.parseIdentifier(),i.asserts=a,i.typeAnnotation=null,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);let o=this.tsParseTypeAnnotation(!1);return i.parameterName=n,i.typeAnnotation=o,i.asserts=a,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(14)?this.tsParseTypeOrTypePredicateAnnotation(14):void 0}tsTryParseTypeAnnotation(){return this.match(14)?this.tsParseTypeAnnotation():void 0}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(114)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==107)return!1;let e=this.state.containsEsc;return this.next(),!z(this.state.type)&&!this.match(78)?!1:(e&&this.raise(u.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.startNode();return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){Wr(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(122)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(w.ReservedTypeAssertion,{at:this.state.startLoc});let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let s=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let a=this.startNode();return a.expression=this.tsParseEntityName(),this.match(47)&&(a.typeParameters=this.tsParseTypeArguments()),this.finishNode(a,"TSExpressionWithTypeArguments")});return i.length||this.raise(w.EmptyHeritageClauseType,{at:s,token:e}),i}tsParseInterfaceDeclaration(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.hasFollowingLineBreak())return null;this.expectContextual(127),s.declare&&(e.declare=!0),z(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,Zo)):(e.id=null,this.raise(w.MissingInterfaceName,{at:this.state.startLoc})),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,el),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.expect(29),this.isContextual(112)&&this.lookahead().type!==16){let s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){let s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){return this.match(e)?this.tsNextThenParseType():void 0}tsExpectThenParseType(e){return this.tsDoThenParseType(()=>this.expect(e))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(e){return this.tsInType(()=>(e(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(131)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(124),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?sl:kr),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(Ve),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,rl),this.eat(16)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),e.body=i}else this.scope.enter(We),this.prodParam.enter(Ge),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(110)?(e.global=!0,e.id=this.parseIdentifier()):this.match(131)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(We),this.prodParam.enter(Ge),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s){e.isExport=s||!1,e.id=this.parseIdentifier(),this.checkIdentifier(e.id,st),this.expect(29);let i=this.tsParseModuleReference();return e.importKind==="type"&&i.type!=="TSExternalModuleReference"&&this.raise(w.ImportAliasHasImportType,{at:i}),e.moduleReference=i,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(117)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();if(this.expectContextual(117),this.expect(10),!this.match(131))throw this.unexpected();return e.expression=super.parseExprAtom(),this.expect(11),this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let s=this.state.clone(),i=e();return this.state=s,i}tsTryParseAndCatch(e){let s=this.tryParse(i=>e()||i());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){let s=this.state.clone(),i=e();if(i!==void 0&&i!==!1)return i;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,i;return this.isContextual(99)&&(s=74,i="let"),this.tsInAmbientContext(()=>{if(s===68)return e.declare=!0,super.parseFunctionStatement(e,!1,!1);if(s===80)return e.declare=!0,this.parseClass(e,!0,!1);if(s===124)return this.tsParseEnumDeclaration(e,{declare:!0});if(s===110)return this.tsParseAmbientExternalModuleDeclaration(e);if(s===75||s===74)return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));if(s===127){let a=this.tsParseInterfaceDeclaration(e,{declare:!0});if(a)return a}if(z(s))return this.tsParseDeclaration(e,this.state.value,!0,null)})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,i){switch(s.name){case"declare":{let a=this.tsTryParseDeclare(e);if(a)return a.declare=!0,a;break}case"global":if(this.match(5)){this.scope.enter(We),this.prodParam.enter(Ge);let a=e;return a.global=!0,a.id=s,a.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(a,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,i)}}tsParseDeclaration(e,s,i,a){switch(s){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||z(this.state.type)))return this.tsParseAbstractDeclaration(e,a);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(131))return this.tsParseAmbientExternalModuleDeclaration(e);if(z(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&z(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(i)&&z(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let i=this.tsTryParseAndCatch(()=>{let a=this.startNodeAt(e);return a.typeParameters=this.tsParseTypeParameters(),super.parseFunctionParams(a),a.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),a});if(this.state.maybeInArrowParameters=s,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0&&this.raise(w.EmptyTypeArguments,{at:e}),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Uo(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){let i=this.state.startLoc,a,n=!1,o=!1;if(e!==void 0){let m={};this.tsParseModifiers({modified:m,allowedModifiers:["public","private","protected","override","readonly"]}),a=m.accessibility,o=m.override,n=m.readonly,e===!1&&(a||n||o)&&this.raise(w.UnexpectedParameterModifier,{at:i})}let c=this.parseMaybeDefault();this.parseAssignableListItemTypes(c);let p=this.parseMaybeDefault(c.loc.start,c);if(a||n||o){let m=this.startNodeAt(i);return s.length&&(m.decorators=s),a&&(m.accessibility=a),n&&(m.readonly=n),o&&(m.override=o),p.type!=="Identifier"&&p.type!=="AssignmentPattern"&&this.raise(w.UnsupportedParameterPropertyKind,{at:m}),m.parameter=p,this.finishNode(m,"TSParameterProperty")}return s.length&&(c.decorators=s),p}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}parseFunctionBodyAndFinish(e,s){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let a=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return a&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,a):a==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(w.DeclareFunctionHasImplementation,{at:e}),e.declare)?super.parseFunctionBodyAndFinish(e,a,i):super.parseFunctionBodyAndFinish(e,s,i)}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,Dr):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(w.UnexpectedTypeAnnotation,{at:s.typeAnnotation})})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,i,a){let n=super.parseArrayLike(e,s,i,a);return n.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(e,s,i,a){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let n=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return a.stop=!0,e;a.optionalChainMember=n=!0,this.next()}if(this.match(47)||this.match(51)){let o,c=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(e)){let P=this.tsTryParseGenericAsyncArrowFunction(s);if(P)return P}let p=this.tsParseTypeArgumentsInExpression();if(!p)return;if(n&&!this.match(10)){o=this.state.curPosition();return}if(yt(this.state.type)){let P=super.parseTaggedTemplateExpression(e,s,a);return P.typeParameters=p,P}if(!i&&this.eat(10)){let P=this.startNodeAt(s);return P.callee=e,P.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(P.arguments),P.typeParameters=p,a.optionalChainMember&&(P.optional=n),this.finishCallExpression(P,a.optionalChainMember)}let m=this.state.type;if(m===48||m===52||m!==10&&Jt(m)&&!this.hasPrecedingLineBreak())return;let x=this.startNodeAt(s);return x.expression=e,x.typeParameters=p,this.finishNode(x,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),c)return c.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(w.InvalidPropertyAccessAfterInstantiationExpression,{at:this.state.startLoc}),c}return super.parseSubscript(e,s,i,a)}parseNewCallee(e){var s;super.parseNewCallee(e);let{callee:i}=e;i.type==="TSInstantiationExpression"&&!((s=i.extra)!=null&&s.parenthesized)&&(e.typeParameters=i.typeParameters,e.callee=i.expression)}parseExprOp(e,s,i){let a;if(mt(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(a=this.isContextual(118)))){let n=this.startNodeAt(s);return n.expression=e,n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(a&&this.raise(u.UnexpectedKeyword,{at:this.state.startLoc,keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(n,a?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(n,s,i)}return super.parseExprOp(e,s,i)}checkReservedWord(e,s,i,a){this.state.isAmbientContext||super.checkReservedWord(e,s,i,a)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(w.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}checkDuplicateExports(){}parseImport(e){if(e.importKind="value",z(this.state.type)||this.match(55)||this.match(5)){let i=this.lookahead();if(this.isContextual(128)&&i.type!==12&&i.type!==97&&i.type!==29&&(e.importKind="type",this.next(),i=this.lookahead()),z(this.state.type)&&i.type===29)return this.tsParseImportEqualsDeclaration(e)}let s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(w.TypeImportCannotSpecifyDefaultAndNamed,{at:s}),s}parseExport(e,s){if(this.match(83))return this.next(),this.isContextual(128)&&this.lookaheadCharCode()!==61?(e.importKind="type",this.next()):e.importKind="value",this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(29)){let i=e;return i.expression=super.parseExpression(),this.semicolon(),this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){let i=e;return this.expectContextual(126),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return this.isContextual(128)&&this.lookahead().type===5?(this.next(),e.exportKind="type"):e.exportKind="value",super.parseExport(e,s)}isAbstractClass(){return this.isContextual(122)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(127)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{isAmbientContext:a}=this.state,n=super.parseVarStatement(e,s,i||a);if(!a)return n;for(let{id:o,init:c}of n.declarations)c&&(s!=="const"||o.typeAnnotation?this.raise(w.InitializerNotAllowedInAmbientContext,{at:c}):c.type!=="StringLiteral"&&c.type!=="BooleanLiteral"&&c.type!=="NumericLiteral"&&c.type!=="BigIntLiteral"&&(c.type!=="TemplateLiteral"||c.expressions.length>0)&&!Xl(c)&&this.raise(w.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:c}));return n}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(124))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(127)){let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(i=>Gr(i)?e.accessibility===i:!!e[i])}tsIsStartOfStaticBlocks(){return this.isContextual(104)&&this.lookaheadCharCode()===123}parseClassMember(e,s,i){let a=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({modified:s,allowedModifiers:a,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:w.InvalidModifierOnTypeParameterPositions});let n=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,a)&&this.raise(w.StaticBlockCannotHaveModifier,{at:this.state.curPosition()}),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,i,!!s.static)};s.declare?this.tsInAmbientContext(n):n()}parseClassMemberWithIsStatic(e,s,i,a){let n=this.tsTryParseIndexSignature(s);if(n){e.body.push(n),s.abstract&&this.raise(w.IndexSignatureHasAbstract,{at:s}),s.accessibility&&this.raise(w.IndexSignatureHasAccessibility,{at:s,modifier:s.accessibility}),s.declare&&this.raise(w.IndexSignatureHasDeclare,{at:s}),s.override&&this.raise(w.IndexSignatureHasOverride,{at:s});return}!this.state.inAbstractClass&&s.abstract&&this.raise(w.NonAbstractClassHasAbstractMethod,{at:s}),s.override&&(i.hadSuperClass||this.raise(w.OverrideNotInSubClass,{at:s})),super.parseClassMemberWithIsStatic(e,s,i,a)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(w.ClassMethodHasReadonly,{at:e}),e.declare&&this.match(10)&&this.raise(w.ClassMethodHasDeclare,{at:e})}parseExpressionStatement(e,s,i){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,i):void 0)||super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,i);let a=this.tryParse(()=>super.parseConditional(e,s));return a.node?(a.error&&(this.state=a.failState),a.node):(a.error&&super.setOptionalParametersError(i,a.error),e)}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(123))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let s=this.state.startLoc,i=this.eatContextual(123);if(i&&(this.isContextual(123)||!this.shouldParseExportDeclaration()))throw this.raise(w.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc});let n=z(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?((n.type==="TSInterfaceDeclaration"||n.type==="TSTypeAliasDeclaration"||i)&&(e.exportKind="type"),i&&(this.resetStartLocation(n,s),n.declare=!0),n):null}parseClassId(e,s,i,a){if((!s||i)&&this.isContextual(111))return;super.parseClassId(e,s,i,e.declare?Dr:Ir);let n=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this));n&&(e.typeParameters=n)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(w.DeclareClassFieldHasInitializer,{at:this.state.startLoc}),e.abstract&&this.match(29)){let{key:s}=e;this.raise(w.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(w.PrivateElementHasAbstract,{at:e}),e.accessibility&&this.raise(w.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(w.AccessorCannotBeOptional,{at:e}),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,i,a,n,o){let c=this.tsTryParseTypeParameters();c&&n&&this.raise(w.ConstructorHasTypeParameters,{at:c});let{declare:p=!1,kind:m}=s;p&&(m==="get"||m==="set")&&this.raise(w.DeclareAccessor,{at:s,kind:m}),c&&(s.typeParameters=c),super.pushClassMethod(e,s,i,a,n,o)}pushClassPrivateMethod(e,s,i,a){let n=this.tsTryParseTypeParameters();n&&(s.typeParameters=n),super.pushClassPrivateMethod(e,s,i,a)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!e.value.body||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(111)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,i,a,n,o,c){let p=this.tsTryParseTypeParameters();return p&&(e.typeParameters=p),super.parseObjPropValue(e,s,i,a,n,o,c)}parseFunctionParams(e,s){let i=this.tsTryParseTypeParameters();i&&(e.typeParameters=i),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let i=this.tsTryParseTypeAnnotation();i&&(e.id.typeAnnotation=i,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var i,a,n,o,c,p,m;let x,P,b;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(x=this.state.clone(),P=this.tryParse(()=>super.parseMaybeAssign(e,s),x),!P.error)return P.node;let{context:te}=this.state,se=te[te.length-1];(se===U.j_oTag||se===U.j_expr)&&te.pop()}if(!((i=P)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!x||x===this.state)&&(x=this.state.clone());let M,q=this.tryParse(te=>{var se,Z;M=this.tsParseTypeParameters();let ie=super.parseMaybeAssign(e,s);return(ie.type!=="ArrowFunctionExpression"||(se=ie.extra)!=null&&se.parenthesized)&&te(),((Z=M)==null?void 0:Z.params.length)!==0&&this.resetStartLocationFromNode(ie,M),ie.typeParameters=M,ie},x);if(!q.error&&!q.aborted)return M&&this.reportReservedArrowTypeParam(M),q.node;if(!P&&(Wr(!this.hasPlugin("jsx")),b=this.tryParse(()=>super.parseMaybeAssign(e,s),x),!b.error))return b.node;if((a=P)!=null&&a.node)return this.state=P.failState,P.node;if(q.node)return this.state=q.failState,M&&this.reportReservedArrowTypeParam(M),q.node;if((n=b)!=null&&n.node)return this.state=b.failState,b.node;throw(o=P)!=null&&o.thrown?P.error:q.thrown?q.error:(c=b)!=null&&c.thrown?b.error:((p=P)==null?void 0:p.error)||q.error||((m=b)==null?void 0:m.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(w.ReservedArrowTypeParam,{at:e})}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(i=>{let a=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),a});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e){this.eat(17)&&(e.type!=="Identifier"&&!this.state.isAmbientContext&&!this.state.inType&&this.raise(w.PatternIsOptional,{at:e}),e.optional=!0);let s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(w.UnexpectedTypeCastInParameter,{at:e}):this.raise(w.UnexpectedTypeCastInParameter,{at:e}),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,i){return Vl({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(i!==ke||!s)&&["expression",!0],TSSatisfiesExpression:(i!==ke||!s)&&["expression",!0],TSTypeAssertion:(i!==ke||!s)&&["expression",!0]},e)||super.isValidLVal(e,s,i)}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(e);return i.typeParameters=s,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.startthis.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let s=super.getGetterSetterExpectedParamCount(e),a=this.getObjectOrClassMethodParams(e)[0];return a&&this.isThisParam(a)?s+1:s}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){let s=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=s}}parseClass(e,s,i){let a=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,i)}finally{this.state.inAbstractClass=a}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(127)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(w.NonClassMethodPropertyHasAbstractModifer,{at:e}),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,i,a,n,o,c){let p=super.parseMethod(e,s,i,a,n,o,c);if(p.abstract&&(this.hasPlugin("estree")?!!p.value.body:!!p.body)){let{key:x}=p;this.raise(w.AbstractMethodHasImplementation,{at:p,methodName:x.type==="Identifier"&&!p.computed?x.name:`[${this.input.slice(x.start,x.end)}]`})}return p}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,i,a){return!s&&a?(this.parseTypeOnlyImportExportSpecifier(e,!1,i),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,i,a))}parseImportSpecifier(e,s,i,a,n){return!s&&a?(this.parseTypeOnlyImportExportSpecifier(e,!0,i),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,i,a,i?Fr:st))}parseTypeOnlyImportExportSpecifier(e,s,i){let a=s?"imported":"local",n=s?"local":"exported",o=e[a],c,p=!1,m=!0,x=o.loc.start;if(this.isContextual(93)){let b=this.parseIdentifier();if(this.isContextual(93)){let M=this.parseIdentifier();Ae(this.state.type)?(p=!0,o=b,c=s?this.parseIdentifier():this.parseModuleExportName(),m=!1):(c=M,m=!1)}else Ae(this.state.type)?(m=!1,c=s?this.parseIdentifier():this.parseModuleExportName()):(p=!0,o=b)}else Ae(this.state.type)&&(p=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());p&&i&&this.raise(s?w.TypeModifierIsUsedInTypeImports:w.TypeModifierIsUsedInTypeExports,{at:x}),e[a]=o,e[n]=c;let P=s?"importKind":"exportKind";e[P]=p?"type":"value",m&&this.eatContextual(93)&&(e[n]=s?this.parseIdentifier():this.parseModuleExportName()),e[n]||(e[n]=Ce(e[a])),s&&this.checkIdentifier(e[n],p?Fr:st)}};function Xl(t){if(t.type!=="MemberExpression")return!1;let{computed:r,property:e}=t;return r&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:Jr(t.object)}function Jr(t){return t.type==="Identifier"?!0:t.type!=="MemberExpression"||t.computed?!1:Jr(t.object)}var Xr=_`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Yl=t=>class extends t{parsePlaceholder(e){if(this.match(142)){let s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(142),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){let i=!!(e.expectedNode&&e.type==="Placeholder");return e.expectedNode=s,i?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){return e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(142,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,i,a){e!==void 0&&super.checkReservedWord(e,s,i,a)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,i){return e==="Placeholder"||super.isValidLVal(e,s,i)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===142)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){if(s.type!=="Placeholder"||s.extra&&s.extra.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){let i=e;return i.label=this.finishPlaceholder(s,"Identifier"),this.next(),i.body=super.parseStatementOrFunctionDeclaration(!1),this.finishNode(i,"LabeledStatement")}return this.semicolon(),e.name=s.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,s,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,i)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,i){let a=s?"ClassDeclaration":"ClassExpression";this.next();let n=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(142)||this.match(5))e.id=o;else{if(i||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,a);throw this.raise(Xr.ClassNameIsRequired,{at:this.state.startLoc})}else this.parseClassId(e,s,i);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,n),this.finishNode(e,a)}parseExport(e,s){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(e,s);if(!this.isContextual(97)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=i,e.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(e,s)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(Ie(142),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e){return e.specifiers&&e.specifiers.length>0?!0:super.maybeParseExportDefaultSpecifier(e)}checkExport(e){let{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(i=>i.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(97)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let i=this.startNodeAtNode(s);return i.local=s,e.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(97),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(Xr.UnexpectedSpace,{at:this.state.lastTokEndLoc})}},Ql=t=>class extends t{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,s=this.startNode();if(this.next(),z(this.state.type)){let i=this.parseIdentifierName(),a=this.createIdentifier(s,i);if(a.type="V8IntrinsicIdentifier",this.match(10))return a}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};function re(t,r){let[e,s]=typeof r=="string"?[r,{}]:r,i=Object.keys(s),a=i.length===0;return t.some(n=>{if(typeof n=="string")return a&&n===e;{let[o,c]=n;if(o!==e)return!1;for(let p of i)if(c[p]!==s[p])return!1;return!0}})}function je(t,r,e){let s=t.find(i=>Array.isArray(i)?i[0]===r:i===r);return s&&Array.isArray(s)&&s.length>1?s[1][e]:null}var Yr=["minimal","fsharp","hack","smart"],Qr=["^^","@@","^","%","#"],Zr=["hash","bar"];function Zl(t){if(re(t,"decorators")){if(re(t,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let r=je(t,"decorators","decoratorsBeforeExport");if(r!=null&&typeof r!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean.");let e=je(t,"decorators","allowCallParenthesized");if(e!=null&&typeof e!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(re(t,"flow")&&re(t,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(re(t,"placeholders")&&re(t,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(re(t,"pipelineOperator")){let r=je(t,"pipelineOperator","proposal");if(!Yr.includes(r)){let s=Yr.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}let e=re(t,["recordAndTuple",{syntaxType:"hash"}]);if(r==="hack"){if(re(t,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(re(t,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let s=je(t,"pipelineOperator","topicToken");if(!Qr.includes(s)){let i=Qr.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(s==="#"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(r==="smart"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(re(t,"moduleAttributes")){if(re(t,"importAssertions"))throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");if(je(t,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(re(t,"recordAndTuple")&&je(t,"recordAndTuple","syntaxType")!=null&&!Zr.includes(je(t,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Zr.map(r=>`'${r}'`).join(", "));if(re(t,"asyncDoExpressions")&&!re(t,"doExpressions")){let r=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw r.missingPlugins="doExpressions",r}}var ei={estree:we,jsx:$l,flow:ql,typescript:Jl,v8intrinsic:Ql,placeholders:Yl},eh=Object.keys(ei),ti={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0};function th(t){let r={};for(let e of Object.keys(ti))r[e]=t&&t[e]!=null?t[e]:ti[e];return r}var sh=(t,r)=>Object.hasOwnProperty.call(t,r)&&t[r],si=t=>t.type==="ParenthesizedExpression"?si(t.expression):t,rh=class extends Ol{toAssignable(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var e,s;let i;switch((t.type==="ParenthesizedExpression"||(e=t.extra)!=null&&e.parenthesized)&&(i=si(t),r?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(u.InvalidParenthesizedAssignment,{at:t}):i.type!=="MemberExpression"&&this.raise(u.InvalidParenthesizedAssignment,{at:t}):this.raise(u.InvalidParenthesizedAssignment,{at:t})),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let n=0,o=t.properties.length,c=o-1;ns.type!=="ObjectMethod"&&(i===e||s.type!=="SpreadElement")&&this.isAssignable(s))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(e=>e===null||this.isAssignable(e));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!r;default:return!1}}toReferencedList(t,r){return t}toReferencedListDeep(t,r){this.toReferencedList(t,r);for(let e of t)(e==null?void 0:e.type)==="ArrayExpression"&&this.toReferencedListDeep(e.elements)}parseSpread(t){let r=this.startNode();return this.next(),r.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(r,"SpreadElement")}parseRestBinding(){let t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,!0),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,r,e,s){let i=[],a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(12),e&&this.match(12))i.push(null);else{if(this.eat(t))break;if(this.match(21)){if(i.push(this.parseAssignableListItemTypes(this.parseRestBinding())),!this.checkCommaAfterRest(r)){this.expect(t);break}}else{let n=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(u.UnsupportedParameterDecorator,{at:this.state.startLoc});this.match(26);)n.push(this.parseDecorator());i.push(this.parseAssignableListItem(s,n))}}return i}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let t=this.startNode(),{type:r,startLoc:e}=this.state;return r===21?this.parseBindingRestProperty(t):(r===136?(this.expectPlugin("destructuringPrivate",e),this.classScope.usePrivateName(this.state.value,e),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,e,!1,!1,!0,!1))}parseAssignableListItem(t,r){let e=this.parseMaybeDefault();this.parseAssignableListItemTypes(e);let s=this.parseMaybeDefault(e.loc.start,e);return r.length&&(e.decorators=r),s}parseAssignableListItemTypes(t){return t}parseMaybeDefault(t,r){var e,s;if((e=t)!=null||(t=this.state.startLoc),r=(s=r)!=null?s:this.parseBindingAtom(),!this.eat(29))return r;let i=this.startNodeAt(t);return i.left=r,i.right=this.parseMaybeAssignAllowIn(),this.finishNode(i,"AssignmentPattern")}isValidLVal(t,r,e){return sh({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},t)}checkLVal(t,r){let{in:e,binding:s=ke,checkClashes:i=!1,strictModeChanged:a=!1,allowingSloppyLetBinding:n=!(s&Ne),hasParenthesizedAncestor:o=!1}=r;var c;let p=t.type;if(this.isObjectMethod(t))return;if(p==="MemberExpression"){s!==ke&&this.raise(u.InvalidPropertyBindingPattern,{at:t});return}if(t.type==="Identifier"){this.checkIdentifier(t,s,a,n);let{name:M}=t;i&&(i.has(M)?this.raise(u.ParamDupe,{at:t}):i.add(M));return}let m=this.isValidLVal(t.type,!(o||(c=t.extra)!=null&&c.parenthesized)&&e.type==="AssignmentExpression",s);if(m===!0)return;if(m===!1){let M=s===ke?u.InvalidLhs:u.InvalidLhsBinding;this.raise(M,{at:t,ancestor:e.type==="UpdateExpression"?{type:"UpdateExpression",prefix:e.prefix}:{type:e.type}});return}let[x,P]=Array.isArray(m)?m:[m,p==="ParenthesizedExpression"],b=t.type==="ArrayPattern"||t.type==="ObjectPattern"||t.type==="ParenthesizedExpression"?t:e;for(let M of[].concat(t[x]))M&&this.checkLVal(M,{in:b,binding:s,checkClashes:i,allowingSloppyLetBinding:n,strictModeChanged:a,hasParenthesizedAncestor:P})}checkIdentifier(t,r){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!(r&Ne);this.state.strict&&(e?Er(t.name,this.inModule):vr(t.name))&&(r===ke?this.raise(u.StrictEvalArguments,{at:t,referenceName:t.name}):this.raise(u.StrictEvalArgumentsBinding,{at:t,bindingName:t.name})),!s&&t.name==="let"&&this.raise(u.LetInLexicalBinding,{at:t}),r&ke||this.declareNameFromIdentifier(t,r)}declareNameFromIdentifier(t,r){this.scope.declareName(t.name,r,t.loc.start)}checkToRestConversion(t,r){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,r);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(r)break;default:this.raise(u.InvalidRestAssignmentPattern,{at:t})}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?u.RestTrailingComma:u.ElementAfterRest,{at:this.state.startLoc}),!0):!1}},ih=class extends rh{checkProto(t,r,e,s){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;let i=t.key;if((i.type==="Identifier"?i.name:i.value)==="__proto__"){if(r){this.raise(u.RecordNoProto,{at:i});return}e.used&&(s?s.doubleProtoLoc===null&&(s.doubleProtoLoc=i.loc.start):this.raise(u.DuplicateProto,{at:i})),e.used=!0}}shouldExitDescending(t,r){return t.type==="ArrowFunctionExpression"&&t.start===r}getExpression(){this.enterInitialScopes(),this.nextToken();let t=this.parseExpression();return this.match(137)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.state.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,r){return t?this.disallowInAnd(()=>this.parseExpressionBase(r)):this.allowInAnd(()=>this.parseExpressionBase(r))}parseExpressionBase(t){let r=this.state.startLoc,e=this.parseMaybeAssign(t);if(this.match(12)){let s=this.startNodeAt(r);for(s.expressions=[e];this.eat(12);)s.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return e}parseMaybeAssignDisallowIn(t,r){return this.disallowInAnd(()=>this.parseMaybeAssign(t,r))}parseMaybeAssignAllowIn(t,r){return this.allowInAnd(()=>this.parseMaybeAssign(t,r))}setOptionalParametersError(t,r){var e;t.optionalParametersLoc=(e=r==null?void 0:r.loc)!=null?e:this.state.startLoc}parseMaybeAssign(t,r){let e=this.state.startLoc;if(this.isContextual(106)&&this.prodParam.hasYield){let n=this.parseYield();return r&&(n=r.call(this,n,e)),n}let s;t?s=!1:(t=new Nt,s=!0);let{type:i}=this.state;(i===10||z(i))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(t);if(r&&(a=r.call(this,a,e)),Bo(this.state.type)){let n=this.startNodeAt(e),o=this.state.value;if(n.operator=o,this.match(29)){this.toAssignable(a,!0),n.left=a;let c=e.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=c&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=c&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=c&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else n.left=a;return this.next(),n.right=this.parseMaybeAssign(),this.checkLVal(a,{in:this.finishNode(n,"AssignmentExpression")}),n}else s&&this.checkExpressionErrors(t,!0);return a}parseMaybeConditional(t){let r=this.state.startLoc,e=this.state.potentialArrowAt,s=this.parseExprOps(t);return this.shouldExitDescending(s,e)?s:this.parseConditional(s,r,t)}parseConditional(t,r,e){if(this.eat(17)){let s=this.startNodeAt(r);return s.test=t,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(136)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let r=this.state.startLoc,e=this.state.potentialArrowAt,s=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(s,e)?s:this.parseExprOp(s,r,-1)}parseExprOp(t,r,e){if(this.isPrivateName(t)){let i=this.getPrivateNameSV(t);(e>=mt(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(u.PrivateInExpectedIn,{at:t,identifierName:i}),this.classScope.usePrivateName(i,t.loc.start)}let s=this.state.type;if(_o(s)&&(this.prodParam.hasIn||!this.match(58))){let i=mt(s);if(i>e){if(s===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,r)}let a=this.startNodeAt(r);a.left=t,a.operator=this.state.value;let n=s===41||s===42,o=s===40;if(o&&(i=mt(42)),this.next(),s===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(u.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc});a.right=this.parseExprOpRightExpr(s,i);let c=this.finishNode(a,n||o?"LogicalExpression":"BinaryExpression"),p=this.state.type;if(o&&(p===41||p===42)||n&&p===40)throw this.raise(u.MixingCoalesceWithLogical,{at:this.state.startLoc});return this.parseExprOp(c,r,e)}}return t}parseExprOpRightExpr(t,r){let e=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(106))throw this.raise(u.PipeBodyIsTighter,{at:this.state.startLoc});return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,r),e)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(r))}default:return this.parseExprOpBaseRightExpr(t,r)}}parseExprOpBaseRightExpr(t,r){let e=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,$o(t)?r-1:r)}parseHackPipeBody(){var t;let{startLoc:r}=this.state,e=this.parseMaybeAssign();return R.has(e.type)&&!((t=e.extra)!=null&&t.parenthesized)&&this.raise(u.PipeUnparenthesizedBody,{at:r,type:e.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(u.PipeTopicUnused,{at:r}),e}checkExponentialAfterUnary(t){this.match(57)&&this.raise(u.UnexpectedTokenUnaryExponentiation,{at:t.argument})}parseMaybeUnary(t,r){let e=this.state.startLoc,s=this.isContextual(96);if(s&&this.isAwaitAllowed()){this.next();let o=this.parseAwait(e);return r||this.checkExponentialAfterUnary(o),o}let i=this.match(34),a=this.startNode();if(jo(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let o=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&o){let c=a.argument;c.type==="Identifier"?this.raise(u.StrictDelete,{at:a}):this.hasPropertyAsPrivateName(c)&&this.raise(u.DeletePrivateField,{at:a})}if(!i)return r||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let n=this.parseUpdate(a,i,t);if(s){let{type:o}=this.state;if((this.hasPlugin("v8intrinsic")?Jt(o):Jt(o)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(u.AwaitNotInAsyncContext,{at:e}),this.parseAwait(e)}return n}parseUpdate(t,r,e){if(r){let a=t;return this.checkLVal(a.argument,{in:this.finishNode(a,"UpdateExpression")}),t}let s=this.state.startLoc,i=this.parseExprSubscripts(e);if(this.checkExpressionErrors(e,!1))return i;for(;Ro(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(s);a.operator=this.state.value,a.prefix=!1,a.argument=i,this.next(),this.checkLVal(i,{in:i=this.finishNode(a,"UpdateExpression")})}return i}parseExprSubscripts(t){let r=this.state.startLoc,e=this.state.potentialArrowAt,s=this.parseExprAtom(t);return this.shouldExitDescending(s,e)?s:this.parseSubscripts(s,r)}parseSubscripts(t,r,e){let s={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,r,e,s),s.maybeAsyncArrow=!1;while(!s.stop);return t}parseSubscript(t,r,e,s){let{type:i}=this.state;if(!e&&i===15)return this.parseBind(t,r,e,s);if(yt(i))return this.parseTaggedTemplateExpression(t,r,s);let a=!1;if(i===18){if(e&&this.lookaheadCharCode()===40)return s.stop=!0,t;s.optionalChainMember=a=!0,this.next()}if(!e&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,r,s,a);{let n=this.eat(0);return n||a||this.eat(16)?this.parseMember(t,r,s,n,a):(s.stop=!0,t)}}parseMember(t,r,e,s,i){let a=this.startNodeAt(r);return a.object=t,a.computed=s,s?(a.property=this.parseExpression(),this.expect(3)):this.match(136)?(t.type==="Super"&&this.raise(u.SuperPrivateField,{at:r}),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),e.optionalChainMember?(a.optional=i,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,r,e,s){let i=this.startNodeAt(r);return i.object=t,this.next(),i.callee=this.parseNoCallExpr(),s.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),r,e)}parseCoverCallAndAsyncArrowHead(t,r,e,s){let i=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let n=this.startNodeAt(r);n.callee=t;let{maybeAsyncArrow:o,optionalChainMember:c}=e;o&&(this.expressionScope.enter(Nl()),a=new Nt),c&&(n.optional=s),s?n.arguments=this.parseCallExpressionArguments(11):n.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",n,a);let p=this.finishCallExpression(n,c);return o&&this.shouldParseAsyncArrow()&&!s?(e.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),p=this.parseAsyncArrowFromCallExpression(this.startNodeAt(r),p)):(o&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(p)),this.state.maybeInArrowParameters=i,p}toReferencedArguments(t,r){this.toReferencedListDeep(t.arguments,r)}parseTaggedTemplateExpression(t,r,e){let s=this.startNodeAt(r);return s.tag=t,s.quasi=this.parseTemplate(!0),e.optionalChainMember&&this.raise(u.OptionalChainingNoTemplate,{at:r}),this.finishNode(s,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}finishCallExpression(t,r){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectPlugin("importAssertions")),t.arguments.length===0||t.arguments.length>2)this.raise(u.ImportCallArity,{at:t,maxArgumentCount:this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let e of t.arguments)e.type==="SpreadElement"&&this.raise(u.ImportCallSpreadArgument,{at:e});return this.finishNode(t,r?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,r,e,s,i){let a=[],n=!0,o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(n)n=!1;else if(this.expect(12),this.match(t)){r&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(u.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc}),s&&this.addTrailingCommaExtraToNode(s),this.next();break}a.push(this.parseExprListItem(!1,i,e))}return this.state.inFSharpPipelineDirectBody=o,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,r){var e;return this.resetPreviousNodeTrailingComments(r),this.expect(19),this.parseArrowExpression(t,r.arguments,!0,(e=r.extra)==null?void 0:e.trailingCommaLoc),r.innerComments&&rt(t,r.innerComments),r.callee.trailingComments&&rt(t,r.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let r,e=null,{type:s}=this.state;switch(s){case 79:return this.parseSuper();case 83:return r=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(r):(this.match(10)||this.raise(u.UnsupportedImport,{at:this.state.lastTokStartLoc}),this.finishNode(r,"Import"));case 78:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 132:return this.parseNumericLiteral(this.state.value);case 133:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseDecimalLiteral(this.state.value);case 131:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let i=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(i)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:e=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(e,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{r=this.startNode(),this.next(),r.object=null;let i=r.callee=this.parseNoCallExpr();if(i.type==="MemberExpression")return this.finishNode(r,"BindExpression");throw this.raise(u.UnsupportedBind,{at:i})}case 136:return this.raise(u.PrivateInExpectedIn,{at:this.state.startLoc,identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.parseTopicReference(i);throw this.unexpected()}case 47:{let i=this.input.codePointAt(this.nextTokenStart());if(ve(i)||i===62){this.expectOnePlugin(["jsx","flow","typescript"]);break}else throw this.unexpected()}default:if(z(s)){if(this.isContextual(125)&&this.lookaheadCharCode()===123&&!this.hasFollowingLineBreak())return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,n=this.parseIdentifier();if(!a&&n.name==="async"&&!this.canInsertSemicolon()){let{type:o}=this.state;if(o===68)return this.resetPreviousNodeTrailingComments(n),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(n));if(z(o))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)):n;if(o===90)return this.resetPreviousNodeTrailingComments(n),this.parseDo(this.startNodeAtNode(n),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(n),[n],!1)):n}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(t,r){let e=this.getPluginOption("pipelineOperator","proposal");if(e)return this.state.type=t,this.state.value=r,this.state.pos--,this.state.end--,this.state.endLoc=y(this.state.endLoc,-1),this.parseTopicReference(e);throw this.unexpected()}parseTopicReference(t){let r=this.startNode(),e=this.state.startLoc,s=this.state.type;return this.next(),this.finishTopicReference(r,e,t,s)}finishTopicReference(t,r,e,s){if(this.testTopicReferenceConfiguration(e,r,s)){let i=e==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(e==="smart"?u.PrimaryTopicNotAllowed:u.PipeTopicUnbound,{at:r}),this.registerTopicReference(),this.finishNode(t,i)}else throw this.raise(u.PipeTopicUnconfiguredToken,{at:r,token:Ie(s)})}testTopicReferenceConfiguration(t,r,e){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ie(e)}]);case"smart":return e===27;default:throw this.raise(u.PipeTopicRequiresHackPipes,{at:r})}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(It(!0,this.prodParam.hasYield));let r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(u.LineTerminatorBeforeArrow,{at:this.state.curPosition()}),this.expect(19),this.parseArrowExpression(t,r,!0)}parseDo(t,r){this.expectPlugin("doExpressions"),r&&this.expectPlugin("asyncDoExpressions"),t.async=r,this.next();let e=this.state.labels;return this.state.labels=[],r?(this.prodParam.enter(wt),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=e,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(u.SuperNotAllowed,{at:t}):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(u.UnexpectedSuper,{at:t}),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(u.UnsupportedSuper,{at:t}),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),r=this.startNodeAt(y(this.state.startLoc,1)),e=this.state.value;return this.next(),t.id=this.createIdentifier(r,e),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(102)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,r,"sent")}return this.parseFunction(t)}parseMetaProperty(t,r,e){t.meta=r;let s=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==e||s)&&this.raise(u.UnsupportedMetaProperty,{at:t.property,target:r.name,onlyValidPropertyName:e}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){let r=this.createIdentifier(this.startNodeAtNode(t),"import");return this.next(),this.isContextual(100)&&(this.inModule||this.raise(u.ImportMetaOutsideModule,{at:r}),this.sawUnambiguousESM=!0),this.parseMetaProperty(t,r,"meta")}parseLiteralAtNode(t,r,e){return this.addExtra(e,"rawValue",t),this.addExtra(e,"raw",this.input.slice(e.start,this.state.end)),e.value=t,this.next(),this.finishNode(e,r)}parseLiteral(t,r){let e=this.startNode();return this.parseLiteralAtNode(t,r,e)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let r=this.parseLiteral(t.value,"RegExpLiteral");return r.pattern=t.pattern,r.flags=t.flags,r}parseBooleanLiteral(t){let r=this.startNode();return r.value=t,this.next(),this.finishNode(r,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let r=this.state.startLoc,e;this.next(),this.expressionScope.enter(Il());let s=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,n=[],o=new Nt,c=!0,p,m;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,o.optionalParametersLoc===null?null:o.optionalParametersLoc),this.match(11)){m=this.state.startLoc;break}if(this.match(21)){let b=this.state.startLoc;if(p=this.state.startLoc,n.push(this.parseParenItem(this.parseRestBinding(),b)),!this.checkCommaAfterRest(41))break}else n.push(this.parseMaybeAssignAllowIn(o,this.parseParenItem))}let x=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=s,this.state.inFSharpPipelineDirectBody=i;let P=this.startNodeAt(r);return t&&this.shouldParseArrow(n)&&(P=this.parseArrow(P))?(this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(P,n,!1),P):(this.expressionScope.exit(),n.length||this.unexpected(this.state.lastTokStartLoc),m&&this.unexpected(m),p&&this.unexpected(p),this.checkExpressionErrors(o,!0),this.toReferencedListDeep(n,!0),n.length>1?(e=this.startNodeAt(a),e.expressions=n,this.finishNode(e,"SequenceExpression"),this.resetEndLocation(e,x)):e=n[0],this.wrapParenthesis(r,e))}wrapParenthesis(t,r){if(!this.options.createParenthesizedExpressions)return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",t.index),this.takeSurroundingComments(r,t.index,this.state.lastTokEndLoc.index),r;let e=this.startNodeAt(t);return e.expression=r,this.finishNode(e,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,r){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let e=this.parseMetaProperty(t,r,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&this.raise(u.UnexpectedNewTarget,{at:e}),e}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let r=this.parseExprList(11);this.toReferencedList(r),t.arguments=r}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){t.callee=this.parseNoCallExpr(),t.callee.type==="Import"?this.raise(u.ImportCallNotNewExpression,{at:t.callee}):this.isOptionalChain(t.callee)?this.raise(u.OptionalChainingNoNew,{at:this.state.lastTokEndLoc}):this.eat(18)&&this.raise(u.OptionalChainingNoNew,{at:this.state.startLoc})}parseTemplateElement(t){let{start:r,startLoc:e,end:s,value:i}=this.state,a=r+1,n=this.startNodeAt(y(e,1));i===null&&(t||this.raise(u.InvalidEscapeSequenceTemplate,{at:y(this.state.firstInvalidTemplateEscapePos,1)}));let o=this.match(24),c=o?-1:-2,p=s+c;n.value={raw:this.input.slice(a,p).replace(/\r\n?/g,`
+`),cooked:i===null?null:i.slice(1,c)},n.tail=o,this.next();let m=this.finishNode(n,"TemplateElement");return this.resetEndLocation(m,y(this.state.lastTokEndLoc,c)),m}parseTemplate(t){let r=this.startNode();r.expressions=[];let e=this.parseTemplateElement(t);for(r.quasis=[e];!e.tail;)r.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.quasis.push(e=this.parseTemplateElement(t));return this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,r,e,s){e&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=Object.create(null),n=!0,o=this.startNode();for(o.properties=[],this.next();!this.match(t);){if(n)n=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(o);break}let p;r?p=this.parseBindingProperty():(p=this.parsePropertyDefinition(s),this.checkProto(p,e,a,s)),e&&!this.isObjectProperty(p)&&p.type!=="SpreadElement"&&this.raise(u.InvalidRecordProperty,{at:p}),p.shorthand&&this.addExtra(p,"shorthand",!0),o.properties.push(p)}this.next(),this.state.inFSharpPipelineDirectBody=i;let c="ObjectExpression";return r?c="ObjectPattern":e&&(c="RecordExpression"),this.finishNode(o,c)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStart),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(u.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)r.push(this.parseDecorator());let e=this.startNode(),s=!1,i=!1,a;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(e.decorators=r,r=[]),e.method=!1,t&&(a=this.state.startLoc);let n=this.eat(55);this.parsePropertyNamePrefixOperator(e);let o=this.state.containsEsc,c=this.parsePropertyName(e,t);if(!n&&!o&&this.maybeAsyncOrAccessorProp(e)){let p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(s=!0,this.resetPreviousNodeTrailingComments(c),n=this.eat(55),this.parsePropertyName(e)),(p==="get"||p==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(c),e.kind=p,this.match(55)&&(n=!0,this.raise(u.AccessorIsGenerator,{at:this.state.curPosition(),kind:p}),this.next()),this.parsePropertyName(e))}return this.parseObjPropValue(e,a,n,s,!1,i,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var r;let e=this.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t);s.length!==e&&this.raise(t.kind==="get"?u.BadGetterArity:u.BadSetterArity,{at:t}),t.kind==="set"&&((r=s[s.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(u.BadSetterRestParameter,{at:t})}parseObjectMethod(t,r,e,s,i){if(i){let a=this.parseMethod(t,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(e||r||this.match(10))return s&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,r,e,!1,!1,"ObjectMethod")}parseObjectProperty(t,r,e,s){if(t.shorthand=!1,this.eat(14))return t.value=e?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(s),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),e)t.value=this.parseMaybeDefault(r,Ce(t.key));else if(this.match(29)){let i=this.state.startLoc;s!=null?s.shorthandAssignLoc===null&&(s.shorthandAssignLoc=i):this.raise(u.InvalidCoverInitializedName,{at:i}),t.value=this.parseMaybeDefault(r,Ce(t.key))}else t.value=Ce(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,r,e,s,i,a,n){let o=this.parseObjectMethod(t,e,s,i,a)||this.parseObjectProperty(t,r,i,n);return o||this.unexpected(),o}parsePropertyName(t,r){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:e,value:s}=this.state,i;if(Ae(e))i=this.parseIdentifier(!0);else switch(e){case 132:i=this.parseNumericLiteral(s);break;case 131:i=this.parseStringLiteral(s);break;case 133:i=this.parseBigIntLiteral(s);break;case 134:i=this.parseDecimalLiteral(s);break;case 136:{let a=this.state.startLoc;r!=null?r.privateKeyLoc===null&&(r.privateKeyLoc=a):this.raise(u.UnexpectedPrivateField,{at:a}),i=this.parsePrivateName();break}default:throw this.unexpected()}t.key=i,e!==136&&(t.computed=!1)}return t.key}initFunction(t,r){t.id=null,t.generator=!1,t.async=r}parseMethod(t,r,e,s,i,a){let n=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1;this.initFunction(t,e),t.generator=r;let o=s;this.scope.enter(Ee|xt|(n?Be:0)|(i?Cr:0)),this.prodParam.enter(It(e,t.generator)),this.parseFunctionParams(t,o);let c=this.parseFunctionBodyAndFinish(t,a,!0);return this.prodParam.exit(),this.scope.exit(),c}parseArrayLike(t,r,e,s){e&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!e,s,a),this.state.inFSharpPipelineDirectBody=i,this.finishNode(a,e?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,r,e,s){this.scope.enter(Ee|es);let i=It(e,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=Je),this.prodParam.enter(i),this.initFunction(t,e);let a=this.state.maybeInArrowParameters;return r&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,r,s)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,r,e){this.toAssignableList(r,e,!1),t.params=r}parseFunctionBodyAndFinish(t,r){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.parseFunctionBody(t,!1,e),this.finishNode(t,r)}parseFunctionBody(t,r){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=r&&!this.match(5);if(this.expressionScope.enter(Hr()),s)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,r,!1);else{let i=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|Vr),t.body=this.parseBlock(!0,!1,n=>{let o=!this.isSimpleParamList(t.params);n&&o&&this.raise(u.IllegalLanguageModeDirective,{at:(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t});let c=!i&&this.state.strict;this.checkParams(t,!this.state.strict&&!r&&!e&&!o,r,c),this.state.strict&&t.id&&this.checkIdentifier(t.id,tl,c)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let r=0,e=t.length;r3&&arguments[3]!==void 0?arguments[3]:!0,i=!r&&new Set,a={type:"FormalParameters"};for(let n of t.params)this.checkLVal(n,{in:a,binding:vt,checkClashes:i,strictModeChanged:s})}parseExprList(t,r,e,s){let i=[],a=!0;for(;!this.eat(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){s&&this.addTrailingCommaExtraToNode(s),this.next();break}i.push(this.parseExprListItem(r,e))}return i}parseExprListItem(t,r,e){let s;if(this.match(12))t||this.raise(u.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),s=null;else if(this.match(21)){let i=this.state.startLoc;s=this.parseParenItem(this.parseSpread(r),i)}else if(this.match(17)){this.expectPlugin("partialApplication"),e||this.raise(u.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});let i=this.startNode();this.next(),s=this.finishNode(i,"ArgumentPlaceholder")}else s=this.parseMaybeAssignAllowIn(r,this.parseParenItem);return s}parseIdentifier(t){let r=this.startNode(),e=this.parseIdentifierName(t);return this.createIdentifier(r,e)}createIdentifier(t,r){return t.name=r,t.loc.identifierName=r,this.finishNode(t,"Identifier")}parseIdentifierName(t){let r,{startLoc:e,type:s}=this.state;if(Ae(s))r=this.state.value;else throw this.unexpected();let i=Lo(s);return t?i&&this.replaceToken(130):this.checkReservedWord(r,e,i,!1),this.next(),r}checkReservedWord(t,r,e,s){if(t.length>10||!Qo(t))return;if(t==="yield"){if(this.prodParam.hasYield){this.raise(u.YieldBindingIdentifier,{at:r});return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(u.AwaitBindingIdentifier,{at:r});return}if(this.scope.inStaticBlock){this.raise(u.AwaitBindingIdentifierInStaticBlock,{at:r});return}this.expressionScope.recordAsyncArrowParametersError({at:r})}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(u.ArgumentsInClass,{at:r});return}if(e&&Jo(t)){this.raise(u.UnexpectedKeyword,{at:r,keyword:t});return}(this.state.strict?s?Er:Tr:Ar)(t,this.inModule)&&this.raise(u.UnexpectedReservedWord,{at:r,reservedWord:t})}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(t){let r=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(u.AwaitExpressionFormalParameter,{at:r}),this.eat(55)&&this.raise(u.ObsoleteAwaitStar,{at:r}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||yt(t)||t===101&&!this.state.containsEsc||t===135||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(u.YieldInParameter,{at:t}),this.next();let r=!1,e=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 137:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:e=this.parseMaybeAssign()}return t.delegate=r,t.argument=e,this.finishNode(t,"YieldExpression")}checkPipelineAtInfixOperator(t,r){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(u.PipelineHeadSequenceExpression,{at:r})}parseSmartPipelineBodyInStyle(t,r){if(this.isSimpleReference(t)){let e=this.startNodeAt(r);return e.callee=t,this.finishNode(e,"PipelineBareFunction")}else{let e=this.startNodeAt(r);return this.checkSmartPipeTopicBodyEarlyErrors(r),e.expression=t,this.finishNode(e,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(u.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(u.PipelineTopicUnused,{at:t})}withTopicBindingContext(t){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=r}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=r}}else return t()}withSoloAwaitPermittingContext(t){let r=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=r}}allowInAnd(t){let r=this.prodParam.currentFlags();if(Je&~r){this.prodParam.enter(r|Je);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let r=this.prodParam.currentFlags();if(Je&r){this.prodParam.enter(r&~Je);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let e=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let s=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,t);return this.state.inFSharpPipelineDirectBody=e,s}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let r=this.startNodeAt(this.state.endLoc);this.next();let e=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(r,8,"module")}finally{e()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}},xs={kind:"loop"},ah={kind:"switch"},le={Expression:0,Declaration:1,HangingDeclaration:2,NullableId:4,Async:8},he={StatementOnly:0,AllowImportExport:1,AllowDeclaration:2,AllowFunctionDeclaration:4,AllowLabeledFunction:8},nh=/[\uD800-\uDFFF]/u,gs=/in(?:stanceof)?/y;function oh(t,r){for(let e=0;e1&&arguments[1]!==void 0?arguments[1]:137,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.options.sourceType;if(t.sourceType=e,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,r),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[i,a]of Array.from(this.scope.undefinedExports))this.raise(u.ModuleExportUndefined,{at:a,localName:i});let s;return r===137?s=this.finishNode(t,"Program"):s=this.finishNodeAt(t,"Program",y(this.state.startLoc,-1)),s}stmtToDirective(t){let r=t;r.type="Directive",r.value=r.expression,delete r.expression;let e=r.value,s=e.value,i=this.input.slice(e.start,e.end),a=e.value=i.slice(1,-1);return this.addExtra(e,"raw",i),this.addExtra(e,"rawValue",a),this.addExtra(e,"expressionValue",s),e.type="DirectiveLiteral",r}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(99)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,r){if(ve(t)){if(gs.lastIndex=r,gs.test(this.input)){let e=this.codePointAtPos(gs.lastIndex);if(!ze(e)&&e!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),r=this.codePointAtPos(t);return this.chStartsBindingPattern(r)||this.chStartsBindingIdentifier(r,t)}hasFollowingBindingIdentifier(){let t=this.nextTokenStart(),r=this.codePointAtPos(t);return this.chStartsBindingIdentifier(r,t)}startsUsingForOf(){let t=this.lookahead();return t.type===101&&!t.containsEsc?!1:(this.expectPlugin("explicitResourceManagement"),!0)}parseModuleItem(){return this.parseStatementLike(he.AllowImportExport|he.AllowDeclaration|he.AllowFunctionDeclaration|he.AllowLabeledFunction)}parseStatementListItem(){return this.parseStatementLike(he.AllowDeclaration|he.AllowFunctionDeclaration|he.AllowLabeledFunction)}parseStatementOrFunctionDeclaration(t){return this.parseStatementLike(he.AllowFunctionDeclaration|(t?0:he.AllowLabeledFunction))}parseStatement(){return this.parseStatementLike(he.StatementOnly)}parseStatementLike(t){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(t,r)}parseStatementContent(t,r){let e=this.state.type,s=this.startNode(),i=!!(t&he.AllowDeclaration),a=!!(t&he.AllowFunctionDeclaration),n=t&he.AllowImportExport;switch(e){case 60:return this.parseBreakContinueStatement(s,!0);case 63:return this.parseBreakContinueStatement(s,!1);case 64:return this.parseDebuggerStatement(s);case 90:return this.parseDoWhileStatement(s);case 91:return this.parseForStatement(s);case 68:if(this.lookaheadCharCode()===46)break;return i||(this.state.strict?this.raise(u.StrictFunction,{at:this.state.startLoc}):a||this.raise(u.SloppyFunction,{at:this.state.startLoc})),this.parseFunctionStatement(s,!1,!i&&a);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,s),!0);case 69:return this.parseIfStatement(s);case 70:return this.parseReturnStatement(s);case 71:return this.parseSwitchStatement(s);case 72:return this.parseThrowStatement(s);case 73:return this.parseTryStatement(s);case 105:if(this.hasFollowingLineBreak()||this.state.containsEsc||!this.hasFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(u.UnexpectedUsingDeclaration,{at:this.state.startLoc}):i||this.raise(u.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(s,"using");case 99:{if(this.state.containsEsc)break;let p=this.nextTokenStart(),m=this.codePointAtPos(p);if(m!==91&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(m,p)&&m!==123))break}case 75:i||this.raise(u.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{let p=this.state.value;return this.parseVarStatement(s,p)}case 92:return this.parseWhileStatement(s);case 76:return this.parseWithStatement(s);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(s);case 83:{let p=this.lookaheadCharCode();if(p===40||p===46)break}case 82:{!this.options.allowImportExportEverywhere&&!n&&this.raise(u.UnexpectedImportExport,{at:this.state.startLoc}),this.next();let p;return e===83?(p=this.parseImport(s),p.type==="ImportDeclaration"&&(!p.importKind||p.importKind==="value")&&(this.sawUnambiguousESM=!0)):(p=this.parseExport(s,r),(p.type==="ExportNamedDeclaration"&&(!p.exportKind||p.exportKind==="value")||p.type==="ExportAllDeclaration"&&(!p.exportKind||p.exportKind==="value")||p.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(p),p}default:if(this.isAsyncFunction())return i||this.raise(u.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(s,!0,!i&&a)}let o=this.state.value,c=this.parseExpression();return z(e)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(s,o,c,t):this.parseExpressionStatement(s,c,r)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(u.ImportOutsideModule,{at:t})}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&!!this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(t,r,e){return t&&(r.decorators=t,this.resetStartLocationFromNode(r,t[0]),e&&this.resetStartLocationFromNode(e,r)),r}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let r=[];do r.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(u.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(u.UnexpectedLeadingDecorator,{at:this.state.startLoc});return r}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let r=this.state.startLoc,e;if(this.match(10)){let s=this.state.startLoc;this.next(),e=this.parseExpression(),this.expect(11),e=this.wrapParenthesis(s,e);let i=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(e),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==e&&this.raise(u.DecoratorArgumentsOutsideParentheses,{at:i})}else{for(e=this.parseIdentifier(!1);this.eat(16);){let s=this.startNodeAt(r);s.object=e,this.match(136)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(e)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){let r=this.startNodeAtNode(t);return r.callee=t,r.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(r.arguments),this.finishNode(r,"CallExpression")}return t}parseBreakContinueStatement(t,r){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,r),this.finishNode(t,r?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,r){let e;for(e=0;ethis.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(xs);let r=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(r=this.state.lastTokStartLoc),this.scope.enter(Ve),this.expect(10),this.match(13))return r!==null&&this.unexpected(r),this.parseFor(t,null);let e=this.isContextual(99),s=this.isContextual(105)&&!this.hasFollowingLineBreak(),i=e&&this.hasFollowingBindingAtom()||s&&this.hasFollowingBindingIdentifier()&&this.startsUsingForOf();if(this.match(74)||this.match(75)||i){let p=this.startNode(),m=this.state.value;this.next(),this.parseVar(p,!0,m);let x=this.finishNode(p,"VariableDeclaration"),P=this.match(58);return P&&s&&this.raise(u.ForInUsing,{at:x}),(P||this.isContextual(101))&&x.declarations.length===1?this.parseForIn(t,x,r):(r!==null&&this.unexpected(r),this.parseFor(t,x))}let a=this.isContextual(95),n=new Nt,o=this.parseExpression(!0,n),c=this.isContextual(101);if(c&&(e&&this.raise(u.ForOfLet,{at:o}),r===null&&a&&o.type==="Identifier"&&this.raise(u.ForOfAsync,{at:o})),c||this.match(58)){this.checkDestructuringPrivate(n),this.toAssignable(o,!0);let p=c?"ForOfStatement":"ForInStatement";return this.checkLVal(o,{in:{type:p}}),this.parseForIn(t,o,r)}else this.checkExpressionErrors(n,!0);return r!==null&&this.unexpected(r),this.parseFor(t,o)}parseFunctionStatement(t,r,e){return this.next(),this.parseFunction(t,le.Declaration|(e?le.HangingDeclaration:0)|(r?le.Async:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrFunctionDeclaration(!0),t.alternate=this.eat(66)?this.parseStatementOrFunctionDeclaration(!0):null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(u.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let r=t.cases=[];this.expect(5),this.state.labels.push(ah),this.scope.enter(Ve);let e;for(let s;!this.match(8);)if(this.match(61)||this.match(65)){let i=this.match(61);e&&this.finishNode(e,"SwitchCase"),r.push(e=this.startNode()),e.consequent=[],this.next(),i?e.test=this.parseExpression():(s&&this.raise(u.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),s=!0,e.test=null),this.expect(14)}else e?e.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(u.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom(),r=t.type==="Identifier";return this.scope.enter(r?br:0),this.checkLVal(t,{in:{type:"CatchClause"},binding:_e,allowingSloppyLetBinding:!0}),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let r=this.startNode();this.next(),this.match(10)?(this.expect(10),r.param=this.parseCatchClauseParam(),this.expect(11)):(r.param=null,this.scope.enter(Ve)),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(r,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(u.NoCatchOrFinally,{at:t}),this.finishNode(t,"TryStatement")}parseVarStatement(t,r){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.next(),this.parseVar(t,!1,r,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(xs),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(u.StrictWith,{at:this.state.startLoc}),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,r,e,s){for(let a of this.state.labels)a.name===r&&this.raise(u.LabelRedeclaration,{at:e,labelName:r});let i=Mo(this.state.type)?"loop":this.match(71)?"switch":null;for(let a=this.state.labels.length-1;a>=0;a--){let n=this.state.labels[a];if(n.statementStart===t.start)n.statementStart=this.state.start,n.kind=i;else break}return this.state.labels.push({name:r,kind:i,statementStart:this.state.start}),t.body=s&he.AllowLabeledFunction?this.parseStatementOrFunctionDeclaration(!1):this.parseStatement(),this.state.labels.pop(),t.label=e,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,r,e){return t.expression=r,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,e=arguments.length>2?arguments[2]:void 0,s=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),r&&this.scope.enter(Ve),this.parseBlockBody(s,t,!1,8,e),r&&this.scope.exit(),this.finishNode(s,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,r,e,s,i){let a=t.body=[],n=t.directives=[];this.parseBlockOrModuleBlockBody(a,r?n:void 0,e,s,i)}parseBlockOrModuleBlockBody(t,r,e,s,i){let a=this.state.strict,n=!1,o=!1;for(;!this.match(s);){let c=e?this.parseModuleItem():this.parseStatementListItem();if(r&&!o){if(this.isValidDirective(c)){let p=this.stmtToDirective(c);r.push(p),!n&&p.value.value==="use strict"&&(n=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}t.push(c)}i&&i.call(this,n),a||this.setStrict(!1),this.next()}parseFor(t,r){return t.init=r,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,r,e){let s=this.match(58);return this.next(),s?e!==null&&this.unexpected(e):t.await=e!==null,r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!s||this.state.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(u.ForInOfLoopInitializer,{at:r,type:s?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(u.InvalidLhs,{at:r,ancestor:{type:"ForStatement"}}),t.left=r,t.right=s?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,s?"ForInStatement":"ForOfStatement")}parseVar(t,r,e){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=t.declarations=[];for(t.kind=e;;){let a=this.startNode();if(this.parseVarId(a,e),a.init=this.eat(29)?r?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!s&&(a.id.type!=="Identifier"&&!(r&&(this.match(58)||this.isContextual(101)))?this.raise(u.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"}):e==="const"&&!(this.match(58)||this.isContextual(101))&&this.raise(u.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"})),i.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,r){let e=this.parseBindingAtom();this.checkLVal(e,{in:{type:"VariableDeclarator"},binding:r==="var"?vt:_e}),t.id=e}parseAsyncFunctionExpression(t){return this.parseFunction(t,le.Async)}parseFunction(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:le.Expression,e=r&le.HangingDeclaration,s=!!(r&le.Declaration),i=s&&!(r&le.NullableId),a=!!(r&le.Async);this.initFunction(t,a),this.match(55)&&(e&&this.raise(u.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),t.generator=!0),s&&(t.id=this.parseFunctionId(i));let n=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(Ee),this.prodParam.enter(It(a,t.generator)),s||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,s?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),s&&!e&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=n,t}parseFunctionId(t){return t||z(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,r){this.expect(10),this.expressionScope.enter(wl()),t.params=this.parseBindingList(11,41,!1,r),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?vt:_e:Nr,t.id.loc.start)}parseClass(t,r,e){this.next();let s=this.state.strict;return this.state.strict=!0,this.parseClassId(t,r,e),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,s),this.finishNode(t,r?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(t){return!t.computed&&!t.static&&(t.key.name==="constructor"||t.key.value==="constructor")}parseClassBody(t,r){this.classScope.enter();let e={hadConstructor:!1,hadSuperClass:t},s=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(s.length>0)throw this.raise(u.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){s.push(this.parseDecorator());continue}let a=this.startNode();s.length&&(a.decorators=s,this.resetStartLocationFromNode(a,s[0]),s=[]),this.parseClassMember(i,a,e),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(u.DecoratorConstructor,{at:a})}}),this.state.strict=r,this.next(),s.length)throw this.raise(u.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(t,r){let e=this.parseIdentifier(!0);if(this.isClassMethod()){let s=r;return s.kind="method",s.computed=!1,s.key=e,s.static=!1,this.pushClassMethod(t,s,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let s=r;return s.computed=!1,s.key=e,s.static=!1,t.body.push(this.parseClassProperty(s)),!0}return this.resetPreviousNodeTrailingComments(e),!1}parseClassMember(t,r,e){let s=this.isContextual(104);if(s){if(this.parseClassMemberFromModifier(t,r))return;if(this.eat(5)){this.parseClassStaticBlock(t,r);return}}this.parseClassMemberWithIsStatic(t,r,e,s)}parseClassMemberWithIsStatic(t,r,e,s){let i=r,a=r,n=r,o=r,c=r,p=i,m=i;if(r.static=s,this.parsePropertyNamePrefixOperator(r),this.eat(55)){p.kind="method";let q=this.match(136);if(this.parseClassElementName(p),q){this.pushClassPrivateMethod(t,a,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(u.ConstructorIsGenerator,{at:i.key}),this.pushClassMethod(t,i,!0,!1,!1,!1);return}let x=z(this.state.type)&&!this.state.containsEsc,P=this.match(136),b=this.parseClassElementName(r),M=this.state.startLoc;if(this.parsePostMemberNameModifiers(m),this.isClassMethod()){if(p.kind="method",P){this.pushClassPrivateMethod(t,a,!1,!1);return}let q=this.isNonstaticConstructor(i),te=!1;q&&(i.kind="constructor",e.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(u.DuplicateConstructor,{at:b}),q&&this.hasPlugin("typescript")&&r.override&&this.raise(u.OverrideOnConstructor,{at:b}),e.hadConstructor=!0,te=e.hadSuperClass),this.pushClassMethod(t,i,!1,!1,q,te)}else if(this.isClassProperty())P?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n);else if(x&&b.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(b);let q=this.eat(55);m.optional&&this.unexpected(M),p.kind="method";let te=this.match(136);this.parseClassElementName(p),this.parsePostMemberNameModifiers(m),te?this.pushClassPrivateMethod(t,a,q,!0):(this.isNonstaticConstructor(i)&&this.raise(u.ConstructorIsAsync,{at:i.key}),this.pushClassMethod(t,i,q,!0,!1,!1))}else if(x&&(b.name==="get"||b.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(b),p.kind=b.name;let q=this.match(136);this.parseClassElementName(i),q?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(u.ConstructorIsAccessor,{at:i.key}),this.pushClassMethod(t,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(x&&b.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(b);let q=this.match(136);this.parseClassElementName(n),this.pushClassAccessorProperty(t,c,q)}else this.isLineTerminator()?P?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n):this.unexpected()}parseClassElementName(t){let{type:r,value:e}=this.state;if((r===130||r===131)&&t.static&&e==="prototype"&&this.raise(u.StaticPrototype,{at:this.state.startLoc}),r===136){e==="constructor"&&this.raise(u.ConstructorClassPrivateField,{at:this.state.startLoc});let s=this.parsePrivateName();return t.key=s,s}return this.parsePropertyName(t)}parseClassStaticBlock(t,r){var e;this.scope.enter(Be|gt|xt);let s=this.state.labels;this.state.labels=[],this.prodParam.enter(Ge);let i=r.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=s,t.body.push(this.finishNode(r,"StaticBlock")),(e=r.decorators)!=null&&e.length&&this.raise(u.DecoratorStaticBlock,{at:r})}pushClassProperty(t,r){!r.computed&&(r.key.name==="constructor"||r.key.value==="constructor")&&this.raise(u.ConstructorClassField,{at:r.key}),t.body.push(this.parseClassProperty(r))}pushClassPrivateProperty(t,r){let e=this.parseClassPrivateProperty(r);t.body.push(e),this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),ls,e.key.loc.start)}pushClassAccessorProperty(t,r,e){if(!e&&!r.computed){let i=r.key;(i.name==="constructor"||i.value==="constructor")&&this.raise(u.ConstructorClassField,{at:i})}let s=this.parseClassAccessorProperty(r);t.body.push(s),e&&this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),ls,s.key.loc.start)}pushClassMethod(t,r,e,s,i,a){t.body.push(this.parseMethod(r,e,s,i,a,"ClassMethod",!0))}pushClassPrivateMethod(t,r,e,s){let i=this.parseMethod(r,e,s,!1,!1,"ClassPrivateMethod",!0);t.body.push(i);let a=i.kind==="get"?i.static?al:ol:i.kind==="set"?i.static?nl:ll:ls;this.declareClassPrivateMethodInScope(i,a)}declareClassPrivateMethodInScope(t,r){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),r,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(Be|xt),this.expressionScope.enter(Hr()),this.prodParam.enter(Ge),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,r,e){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ir;if(z(this.state.type))t.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(t.id,s);else if(e||!r)t.id=null;else throw this.raise(u.MissingClassName,{at:this.state.startLoc})}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,r){let e=this.maybeParseExportDefaultSpecifier(t),s=!e||this.eat(12),i=s&&this.eatExportStar(t),a=i&&this.maybeParseExportNamespaceSpecifier(t),n=s&&(!a||this.eat(12)),o=e||i;if(i&&!a){if(e&&this.unexpected(),r)throw this.raise(u.UnsupportedDecoratorExport,{at:t});return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let c=this.maybeParseExportNamedSpecifiers(t);if(e&&s&&!i&&!c||a&&n&&!c)throw this.unexpected(null,5);let p;if(o||c){if(p=!1,r)throw this.raise(u.UnsupportedDecoratorExport,{at:t});this.parseExportFrom(t,o)}else p=this.maybeParseExportDeclaration(t);if(o||c||p){var m;let x=t;if(this.checkExport(x,!0,!1,!!x.source),((m=x.declaration)==null?void 0:m.type)==="ClassDeclaration")this.maybeTakeDecorators(r,x.declaration,x);else if(r)throw this.raise(u.UnsupportedDecoratorExport,{at:t});return this.finishNode(x,"ExportNamedDeclaration")}if(this.eat(65)){let x=t,P=this.parseExportDefaultExpression();if(x.declaration=P,P.type==="ClassDeclaration")this.maybeTakeDecorators(r,P,x);else if(r)throw this.raise(u.UnsupportedDecoratorExport,{at:t});return this.checkExport(x,!0,!0),this.finishNode(x,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");let r=this.startNode();return r.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){t.specifiers||(t.specifiers=[]);let r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(r,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){t.specifiers||(t.specifiers=[]);let r=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(r)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenStart();return!cs.test(this.input.slice(this.state.pos,t))&&this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,le.Declaration|le.NullableId);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,le.Declaration|le.NullableId|le.Async);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(u.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(u.UnsupportedDefaultExport,{at:this.state.startLoc});let r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(z(t)){if(t===95&&!this.state.containsEsc||t===99)return!1;if((t===128||t===127)&&!this.state.containsEsc){let{type:s}=this.lookahead();if(z(s)&&s!==97||s===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let r=this.nextTokenStart(),e=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||z(this.state.type)&&e)return!0;if(this.match(65)&&e){let s=this.input.charCodeAt(this.nextTokenStartSince(r+4));return s===34||s===39}return!1}parseExportFrom(t,r){if(this.eatContextual(97)){t.source=this.parseImportSource(),this.checkExport(t);let e=this.maybeParseImportAssertions();e&&(t.assertions=e,this.checkJSONModuleImport(t))}else r&&this.unexpected();this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;if(t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(this.getPluginOption("decorators","decoratorsBeforeExport"))throw this.raise(u.DecoratorBeforeExport,{at:this.state.startLoc});return!0}return t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,r,e,s){if(r){if(e){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var i;let a=t.declaration;a.type==="Identifier"&&a.name==="from"&&a.end-a.start===4&&!((i=a.extra)!=null&&i.parenthesized)&&this.raise(u.ExportDefaultFromAsIdentifier,{at:a})}}else if(t.specifiers&&t.specifiers.length)for(let a of t.specifiers){let{exported:n}=a,o=n.type==="Identifier"?n.name:n.value;if(this.checkDuplicateExports(a,o),!s&&a.local){let{local:c}=a;c.type!=="Identifier"?this.raise(u.ExportBindingIsString,{at:a,localName:c.value,exportName:o}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(t.declaration){if(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"){let a=t.declaration.id;if(!a)throw new Error("Assertion failure");this.checkDuplicateExports(t,a.name)}else if(t.declaration.type==="VariableDeclaration")for(let a of t.declaration.declarations)this.checkDeclaration(a.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let r of t.properties)this.checkDeclaration(r);else if(t.type==="ArrayPattern")for(let r of t.elements)r&&this.checkDeclaration(r);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,r){this.exportedIdentifiers.has(r)&&(r==="default"?this.raise(u.DuplicateDefaultExport,{at:t}):this.raise(u.DuplicateExport,{at:t,exportName:r})),this.exportedIdentifiers.add(r)}parseExportSpecifiers(t){let r=[],e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else if(this.expect(12),this.eat(8))break;let s=this.isContextual(128),i=this.match(131),a=this.startNode();a.local=this.parseModuleExportName(),r.push(this.parseExportSpecifier(a,i,t,s))}return r}parseExportSpecifier(t,r,e,s){return this.eatContextual(93)?t.exported=this.parseModuleExportName():r?t.exported=Ll(t.local):t.exported||(t.exported=Ce(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(131)){let t=this.parseStringLiteral(this.state.value),r=t.value.match(nh);return r&&this.raise(u.ModuleExportNameHasLoneSurrogate,{at:t,surrogateCharCode:r[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(r=>{let{key:e,value:s}=r;return s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")}):!1}checkImportReflection(t){if(t.module){var r;(t.specifiers.length!==1||t.specifiers[0].type!=="ImportDefaultSpecifier")&&this.raise(u.ImportReflectionNotBinding,{at:t.specifiers[0].loc.start}),((r=t.assertions)==null?void 0:r.length)>0&&this.raise(u.ImportReflectionHasAssertion,{at:t.specifiers[0].loc.start})}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:r}=t;if(r!=null){let e=r.find(s=>{let i;if(s.type==="ExportSpecifier"?i=s.local:s.type==="ImportSpecifier"&&(i=s.imported),i!==void 0)return i.type==="Identifier"?i.name!=="default":i.value!=="default"});e!==void 0&&this.raise(u.ImportJSONBindingNotDefault,{at:e.loc.start})}}}parseMaybeImportReflection(t){let r=!1;if(this.isContextual(125)){let e=this.lookahead(),s=e.type;z(s)?(s!==97||this.input.charCodeAt(this.nextTokenStartSince(e.end))===102)&&(r=!0):s!==12&&(r=!0)}r?(this.expectPlugin("importReflection"),this.next(),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1)}parseImport(t){if(t.specifiers=[],!this.match(131)){this.parseMaybeImportReflection(t);let s=!this.maybeParseDefaultImportSpecifier(t)||this.eat(12),i=s&&this.maybeParseStarImportSpecifier(t);s&&!i&&this.parseNamedImportSpecifiers(t),this.expectContextual(97)}t.source=this.parseImportSource();let r=this.maybeParseImportAssertions();if(r)t.assertions=r;else{let e=this.maybeParseModuleAttributes();e&&(t.attributes=e)}return this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(131)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(t){return z(this.state.type)}parseImportSpecifierLocal(t,r,e){r.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(r,e))}finishImportSpecifier(t,r){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_e;return this.checkLVal(t.local,{in:t,binding:e}),this.finishNode(t,r)}parseAssertEntries(){let t=[],r=new Set;do{if(this.match(8))break;let e=this.startNode(),s=this.state.value;if(r.has(s)&&this.raise(u.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:s}),r.add(s),this.match(131)?e.key=this.parseStringLiteral(s):e.key=this.parseIdentifier(!0),this.expect(14),!this.match(131))throw this.raise(u.ModuleAttributeInvalidValue,{at:this.state.startLoc});e.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(e,"ImportAttribute"))}while(this.eat(12));return t}maybeParseModuleAttributes(){if(this.match(76)&&!this.hasPrecedingLineBreak())this.expectPlugin("moduleAttributes"),this.next();else return this.hasPlugin("moduleAttributes")?[]:null;let t=[],r=new Set;do{let e=this.startNode();if(e.key=this.parseIdentifier(!0),e.key.name!=="type"&&this.raise(u.ModuleAttributeDifferentFromType,{at:e.key}),r.has(e.key.name)&&this.raise(u.ModuleAttributesWithDuplicateKeys,{at:e.key,key:e.key.name}),r.add(e.key.name),this.expect(14),!this.match(131))throw this.raise(u.ModuleAttributeInvalidValue,{at:this.state.startLoc});e.value=this.parseStringLiteral(this.state.value),this.finishNode(e,"ImportAttribute"),t.push(e)}while(this.eat(12));return t}maybeParseImportAssertions(){if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.expectPlugin("importAssertions"),this.next();else return this.hasPlugin("importAssertions")?[]:null;this.eat(5);let t=this.parseAssertEntries();return this.eat(8),t}maybeParseDefaultImportSpecifier(t){return this.shouldParseDefaultImport(t)?(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0):!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let r=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,r,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else{if(this.eat(14))throw this.raise(u.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let e=this.startNode(),s=this.match(131),i=this.isContextual(128);e.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(e,s,t.importKind==="type"||t.importKind==="typeof",i,void 0);t.specifiers.push(a)}}parseImportSpecifier(t,r,e,s,i){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:a}=t;if(r)throw this.raise(u.ImportBindingIsString,{at:t,importName:a.value});this.checkReservedWord(a.name,t.loc.start,!0,!0),t.local||(t.local=Ce(a))}return this.finishImportSpecifier(t,"ImportSpecifier",i)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},ri=class extends lh{constructor(t,r){t=th(t),super(t,r),this.options=t,this.initializeScopes(),this.plugins=hh(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return us}parse(){this.enterInitialScopes();let t=this.startNode(),r=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,r),t.errors=this.state.errors,t}};function hh(t){let r=new Map;for(let e of t){let[s,i]=Array.isArray(e)?e:[e,{}];r.has(s)||r.set(s,i||{})}return r}function uh(t,r){var e;if(((e=r)==null?void 0:e.sourceType)==="unambiguous"){r=Object.assign({},r);try{r.sourceType="module";let s=ot(r,t),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return r.sourceType="script",ot(r,t).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return r.sourceType="script",ot(r,t).parse()}catch{}throw s}}else return ot(r,t).parse()}function ch(t,r){let e=ot(r,t);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function ph(t){let r={};for(let e of Object.keys(t))r[e]=Te(t[e]);return r}var fh=ph(Fo);function ot(t,r){let e=ri;return t!=null&&t.plugins&&(Zl(t.plugins),e=dh(t.plugins)),new e(t,r)}var ii={};function dh(t){let r=eh.filter(i=>re(t,i)),e=r.join("/"),s=ii[e];if(!s){s=ri;for(let i of r)s=ei[i](s);ii[e]=s}return s}l.parse=uh,l.parseExpression=ch,l.tokTypes=fh}}),Bf=W({"src/language-js/parse/json.js"(l,h){"use strict";K();var f=dr(),d=mr(),y=wo(),g=Io();function A(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{allowComments:O=!0}=C;return function(N){let{parseExpression:H}=Do(),J;try{J=H(N,{tokens:!0,ranges:!0})}catch(D){throw g(D)}if(!O&&f(J.comments))throw E(J.comments[0],"Comment");return S(J),J}}function E(C,O){let[R,N]=[C.loc.start,C.loc.end].map(H=>{let{line:J,column:D}=H;return{line:J,column:D+1}});return d(`${O} is not allowed in JSON.`,{start:R,end:N})}function S(C){switch(C.type){case"ArrayExpression":for(let O of C.elements)O!==null&&S(O);return;case"ObjectExpression":for(let O of C.properties)S(O);return;case"ObjectProperty":if(C.computed)throw E(C.key,"Computed key");if(C.shorthand)throw E(C.key,"Shorthand property");C.key.type!=="Identifier"&&S(C.key),S(C.value);return;case"UnaryExpression":{let{operator:O,argument:R}=C;if(O!=="+"&&O!=="-")throw E(C,`Operator '${C.operator}'`);if(R.type==="NumericLiteral"||R.type==="Identifier"&&(R.name==="Infinity"||R.name==="NaN"))return;throw E(R,`Operator '${O}' before '${R.type}'`)}case"Identifier":if(C.name!=="Infinity"&&C.name!=="NaN"&&C.name!=="undefined")throw E(C,`Identifier '${C.name}'`);return;case"TemplateLiteral":if(f(C.expressions))throw E(C.expressions[0],"'TemplateLiteral' with expression");for(let O of C.quasis)S(O);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw E(C,`'${C.type}'`)}}var L=A(),I={json:y({parse:L,hasPragma(){return!0}}),json5:y(L),"json-stringify":y({parse:A({allowComments:!1}),astFormat:"estree-json"})};h.exports=I}}),Mf=W({"src/language-js/parse/babel.js"(l,h){K();var f=yf(),d=uo(),y=Af(),g=wo(),A=Io(),E=Of(),S=Bf(),L={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication",["decorators",{decoratorsBeforeExport:!1}],"importAssertions","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors"],tokens:!0,ranges:!0},I=["recordAndTuple",{syntaxType:"hash"}],C="v8intrinsic",O=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],R=function(V){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:L;return Object.assign(Object.assign({},Y),{},{plugins:[...Y.plugins,...V]})},N=/@(?:no)?flow\b/;function H(V,Y){if(Y.filepath&&Y.filepath.endsWith(".js.flow"))return!0;let Pe=d(V);Pe&&(V=V.slice(Pe.length));let ce=y(V,0);return ce!==!1&&(V=V.slice(0,ce)),N.test(V)}function J(V,Y,Pe){let ce=Do()[V],oe=ce(Y,Pe),j=oe.errors.find(G=>!ee.has(G.reasonCode));if(j)throw j;return oe}function D(V){for(var Y=arguments.length,Pe=new Array(Y>1?Y-1:0),ce=1;ce2&&arguments[2]!==void 0?arguments[2]:{};if((G.parser==="babel"||G.parser==="__babel_estree")&&H(oe,G))return G.parser="babel-flow",u(oe,j,G);let ae=Pe;G.__babelSourceType==="script"&&(ae=ae.map(fe=>Object.assign(Object.assign({},fe),{},{sourceType:"script"}))),/#[[{]/.test(oe)&&(ae=ae.map(fe=>R([I],fe)));let pe=/%[A-Z]/.test(oe);oe.includes("|>")?ae=(pe?[...O,C]:O).flatMap(et=>ae.map(tt=>R([et],tt))):pe&&(ae=ae.map(fe=>R([C],fe)));let{result:He,error:Ze}=f(...ae.map(fe=>()=>J(V,oe,fe)));if(!He)throw A(Ze);return G.originalText=oe,E(He,G)}}var _=D("parse",R(["jsx","flow"])),u=D("parse",R(["jsx",["flow",{all:!0,enums:!0}]])),X=D("parse",R(["jsx","typescript"]),R(["typescript"])),ne=D("parse",R(["jsx","flow","estree"])),Q=D("parseExpression",R(["jsx"])),we=D("parseExpression",R(["typescript"])),ee=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","UnexpectedParameterModifier","MixedLabeledAndUnlabeledElements","InvalidTupleMemberLabel","NonClassMethodPropertyHasAbstractModifer","ReadonlyForMethodSignature","ClassMethodHasDeclare","ClassMethodHasReadonly","InvalidModifierOnTypeMember","DuplicateAccessibilityModifier","IndexSignatureHasDeclare","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","UnsupportedPropertyDecorator","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),U=g(_),B=g(X),T=g(Q),Oe=g(we);h.exports={parsers:Object.assign(Object.assign({babel:U,"babel-flow":g(u),"babel-ts":B},S),{},{__js_expression:T,__vue_expression:T,__vue_ts_expression:Oe,__vue_event_binding:U,__vue_ts_event_binding:B,__babel_estree:g(ne)})}}}),Pm=Mf();export{Pm as default};
diff --git a/node_modules/prettier/esm/parser-espree.mjs b/node_modules/prettier/esm/parser-espree.mjs
new file mode 100644
index 0000000..ab2c36b
--- /dev/null
+++ b/node_modules/prettier/esm/parser-espree.mjs
@@ -0,0 +1,26 @@
+var b=(a,u)=>()=>(u||a((u={exports:{}}).exports,u),u.exports);var oe=b(($h,Wr)=>{var Ye=function(a){return a&&a.Math==Math&&a};Wr.exports=Ye(typeof globalThis=="object"&&globalThis)||Ye(typeof window=="object"&&window)||Ye(typeof self=="object"&&self)||Ye(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var me=b((Yh,Gr)=>{Gr.exports=function(a){try{return!!a()}catch{return!0}}});var xe=b((Zh,Hr)=>{var vn=me();Hr.exports=!vn(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var bt=b((el,Kr)=>{var gn=me();Kr.exports=!gn(function(){var a=function(){}.bind();return typeof a!="function"||a.hasOwnProperty("prototype")})});var et=b((tl,Xr)=>{var xn=bt(),Ze=Function.prototype.call;Xr.exports=xn?Ze.bind(Ze):function(){return Ze.apply(Ze,arguments)}});var Yr=b($r=>{"use strict";var Jr={}.propertyIsEnumerable,Qr=Object.getOwnPropertyDescriptor,yn=Qr&&!Jr.call({1:2},1);$r.f=yn?function(u){var o=Qr(this,u);return!!o&&o.enumerable}:Jr});var _t=b((il,Zr)=>{Zr.exports=function(a,u){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:u}}});var ye=b((sl,ri)=>{var ei=bt(),ti=Function.prototype,St=ti.call,An=ei&&ti.bind.bind(St,St);ri.exports=ei?An:function(a){return function(){return St.apply(a,arguments)}}});var ai=b((al,si)=>{var ii=ye(),Cn=ii({}.toString),En=ii("".slice);si.exports=function(a){return En(Cn(a),8,-1)}});var ui=b((nl,ni)=>{var bn=ye(),_n=me(),Sn=ai(),wt=Object,wn=bn("".split);ni.exports=_n(function(){return!wt("z").propertyIsEnumerable(0)})?function(a){return Sn(a)=="String"?wn(a,""):wt(a)}:wt});var kt=b((ul,oi)=>{oi.exports=function(a){return a==null}});var Ft=b((ol,hi)=>{var kn=kt(),Fn=TypeError;hi.exports=function(a){if(kn(a))throw Fn("Can't call method on "+a);return a}});var tt=b((hl,li)=>{var Bn=ui(),In=Ft();li.exports=function(a){return Bn(In(a))}});var It=b((ll,ci)=>{var Bt=typeof document=="object"&&document.all,Tn=typeof Bt>"u"&&Bt!==void 0;ci.exports={all:Bt,IS_HTMLDDA:Tn}});var le=b((cl,fi)=>{var pi=It(),Pn=pi.all;fi.exports=pi.IS_HTMLDDA?function(a){return typeof a=="function"||a===Pn}:function(a){return typeof a=="function"}});var Pe=b((pl,vi)=>{var di=le(),mi=It(),Dn=mi.all;vi.exports=mi.IS_HTMLDDA?function(a){return typeof a=="object"?a!==null:di(a)||a===Dn}:function(a){return typeof a=="object"?a!==null:di(a)}});var rt=b((fl,gi)=>{var Tt=oe(),Nn=le(),On=function(a){return Nn(a)?a:void 0};gi.exports=function(a,u){return arguments.length<2?On(Tt[a]):Tt[a]&&Tt[a][u]}});var yi=b((dl,xi)=>{var Ln=ye();xi.exports=Ln({}.isPrototypeOf)});var Ci=b((ml,Ai)=>{var Vn=rt();Ai.exports=Vn("navigator","userAgent")||""});var Fi=b((vl,ki)=>{var wi=oe(),Pt=Ci(),Ei=wi.process,bi=wi.Deno,_i=Ei&&Ei.versions||bi&&bi.version,Si=_i&&_i.v8,ce,it;Si&&(ce=Si.split("."),it=ce[0]>0&&ce[0]<4?1:+(ce[0]+ce[1]));!it&&Pt&&(ce=Pt.match(/Edge\/(\d+)/),(!ce||ce[1]>=74)&&(ce=Pt.match(/Chrome\/(\d+)/),ce&&(it=+ce[1])));ki.exports=it});var Dt=b((gl,Ii)=>{var Bi=Fi(),Rn=me();Ii.exports=!!Object.getOwnPropertySymbols&&!Rn(function(){var a=Symbol();return!String(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&Bi&&Bi<41})});var Nt=b((xl,Ti)=>{var jn=Dt();Ti.exports=jn&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Ot=b((yl,Pi)=>{var qn=rt(),Mn=le(),Un=yi(),zn=Nt(),Wn=Object;Pi.exports=zn?function(a){return typeof a=="symbol"}:function(a){var u=qn("Symbol");return Mn(u)&&Un(u.prototype,Wn(a))}});var Ni=b((Al,Di)=>{var Gn=String;Di.exports=function(a){try{return Gn(a)}catch{return"Object"}}});var Li=b((Cl,Oi)=>{var Hn=le(),Kn=Ni(),Xn=TypeError;Oi.exports=function(a){if(Hn(a))return a;throw Xn(Kn(a)+" is not a function")}});var Ri=b((El,Vi)=>{var Jn=Li(),Qn=kt();Vi.exports=function(a,u){var o=a[u];return Qn(o)?void 0:Jn(o)}});var qi=b((bl,ji)=>{var Lt=et(),Vt=le(),Rt=Pe(),$n=TypeError;ji.exports=function(a,u){var o,h;if(u==="string"&&Vt(o=a.toString)&&!Rt(h=Lt(o,a))||Vt(o=a.valueOf)&&!Rt(h=Lt(o,a))||u!=="string"&&Vt(o=a.toString)&&!Rt(h=Lt(o,a)))return h;throw $n("Can't convert object to primitive value")}});var Ui=b((_l,Mi)=>{Mi.exports=!1});var st=b((Sl,Wi)=>{var zi=oe(),Yn=Object.defineProperty;Wi.exports=function(a,u){try{Yn(zi,a,{value:u,configurable:!0,writable:!0})}catch{zi[a]=u}return u}});var at=b((wl,Hi)=>{var Zn=oe(),eu=st(),Gi="__core-js_shared__",tu=Zn[Gi]||eu(Gi,{});Hi.exports=tu});var jt=b((kl,Xi)=>{var ru=Ui(),Ki=at();(Xi.exports=function(a,u){return Ki[a]||(Ki[a]=u!==void 0?u:{})})("versions",[]).push({version:"3.26.1",mode:ru?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})});var Qi=b((Fl,Ji)=>{var iu=Ft(),su=Object;Ji.exports=function(a){return su(iu(a))}});var be=b((Bl,$i)=>{var au=ye(),nu=Qi(),uu=au({}.hasOwnProperty);$i.exports=Object.hasOwn||function(u,o){return uu(nu(u),o)}});var qt=b((Il,Yi)=>{var ou=ye(),hu=0,lu=Math.random(),cu=ou(1 .toString);Yi.exports=function(a){return"Symbol("+(a===void 0?"":a)+")_"+cu(++hu+lu,36)}});var ss=b((Tl,is)=>{var pu=oe(),fu=jt(),Zi=be(),du=qt(),es=Dt(),rs=Nt(),De=fu("wks"),we=pu.Symbol,ts=we&&we.for,mu=rs?we:we&&we.withoutSetter||du;is.exports=function(a){if(!Zi(De,a)||!(es||typeof De[a]=="string")){var u="Symbol."+a;es&&Zi(we,a)?De[a]=we[a]:rs&&ts?De[a]=ts(u):De[a]=mu(u)}return De[a]}});var os=b((Pl,us)=>{var vu=et(),as=Pe(),ns=Ot(),gu=Ri(),xu=qi(),yu=ss(),Au=TypeError,Cu=yu("toPrimitive");us.exports=function(a,u){if(!as(a)||ns(a))return a;var o=gu(a,Cu),h;if(o){if(u===void 0&&(u="default"),h=vu(o,a,u),!as(h)||ns(h))return h;throw Au("Can't convert object to primitive value")}return u===void 0&&(u="number"),xu(a,u)}});var Mt=b((Dl,hs)=>{var Eu=os(),bu=Ot();hs.exports=function(a){var u=Eu(a,"string");return bu(u)?u:u+""}});var ps=b((Nl,cs)=>{var _u=oe(),ls=Pe(),Ut=_u.document,Su=ls(Ut)&&ls(Ut.createElement);cs.exports=function(a){return Su?Ut.createElement(a):{}}});var zt=b((Ol,fs)=>{var wu=xe(),ku=me(),Fu=ps();fs.exports=!wu&&!ku(function(){return Object.defineProperty(Fu("div"),"a",{get:function(){return 7}}).a!=7})});var Wt=b(ms=>{var Bu=xe(),Iu=et(),Tu=Yr(),Pu=_t(),Du=tt(),Nu=Mt(),Ou=be(),Lu=zt(),ds=Object.getOwnPropertyDescriptor;ms.f=Bu?ds:function(u,o){if(u=Du(u),o=Nu(o),Lu)try{return ds(u,o)}catch{}if(Ou(u,o))return Pu(!Iu(Tu.f,u,o),u[o])}});var gs=b((Vl,vs)=>{var Vu=xe(),Ru=me();vs.exports=Vu&&Ru(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var nt=b((Rl,xs)=>{var ju=Pe(),qu=String,Mu=TypeError;xs.exports=function(a){if(ju(a))return a;throw Mu(qu(a)+" is not an object")}});var Me=b(As=>{var Uu=xe(),zu=zt(),Wu=gs(),ut=nt(),ys=Mt(),Gu=TypeError,Gt=Object.defineProperty,Hu=Object.getOwnPropertyDescriptor,Ht="enumerable",Kt="configurable",Xt="writable";As.f=Uu?Wu?function(u,o,h){if(ut(u),o=ys(o),ut(h),typeof u=="function"&&o==="prototype"&&"value"in h&&Xt in h&&!h[Xt]){var d=Hu(u,o);d&&d[Xt]&&(u[o]=h.value,h={configurable:Kt in h?h[Kt]:d[Kt],enumerable:Ht in h?h[Ht]:d[Ht],writable:!1})}return Gt(u,o,h)}:Gt:function(u,o,h){if(ut(u),o=ys(o),ut(h),zu)try{return Gt(u,o,h)}catch{}if("get"in h||"set"in h)throw Gu("Accessors not supported");return"value"in h&&(u[o]=h.value),u}});var Jt=b((ql,Cs)=>{var Ku=xe(),Xu=Me(),Ju=_t();Cs.exports=Ku?function(a,u,o){return Xu.f(a,u,Ju(1,o))}:function(a,u,o){return a[u]=o,a}});var _s=b((Ml,bs)=>{var Qt=xe(),Qu=be(),Es=Function.prototype,$u=Qt&&Object.getOwnPropertyDescriptor,$t=Qu(Es,"name"),Yu=$t&&function(){}.name==="something",Zu=$t&&(!Qt||Qt&&$u(Es,"name").configurable);bs.exports={EXISTS:$t,PROPER:Yu,CONFIGURABLE:Zu}});var ws=b((Ul,Ss)=>{var eo=ye(),to=le(),Yt=at(),ro=eo(Function.toString);to(Yt.inspectSource)||(Yt.inspectSource=function(a){return ro(a)});Ss.exports=Yt.inspectSource});var Bs=b((zl,Fs)=>{var io=oe(),so=le(),ks=io.WeakMap;Fs.exports=so(ks)&&/native code/.test(String(ks))});var Ps=b((Wl,Ts)=>{var ao=jt(),no=qt(),Is=ao("keys");Ts.exports=function(a){return Is[a]||(Is[a]=no(a))}});var Zt=b((Gl,Ds)=>{Ds.exports={}});var Vs=b((Hl,Ls)=>{var uo=Bs(),Os=oe(),oo=Pe(),ho=Jt(),er=be(),tr=at(),lo=Ps(),co=Zt(),Ns="Object already initialized",rr=Os.TypeError,po=Os.WeakMap,ot,Ue,ht,fo=function(a){return ht(a)?Ue(a):ot(a,{})},mo=function(a){return function(u){var o;if(!oo(u)||(o=Ue(u)).type!==a)throw rr("Incompatible receiver, "+a+" required");return o}};uo||tr.state?(pe=tr.state||(tr.state=new po),pe.get=pe.get,pe.has=pe.has,pe.set=pe.set,ot=function(a,u){if(pe.has(a))throw rr(Ns);return u.facade=a,pe.set(a,u),u},Ue=function(a){return pe.get(a)||{}},ht=function(a){return pe.has(a)}):(ke=lo("state"),co[ke]=!0,ot=function(a,u){if(er(a,ke))throw rr(Ns);return u.facade=a,ho(a,ke,u),u},Ue=function(a){return er(a,ke)?a[ke]:{}},ht=function(a){return er(a,ke)});var pe,ke;Ls.exports={set:ot,get:Ue,has:ht,enforce:fo,getterFor:mo}});var sr=b((Kl,js)=>{var vo=me(),go=le(),lt=be(),ir=xe(),xo=_s().CONFIGURABLE,yo=ws(),Rs=Vs(),Ao=Rs.enforce,Co=Rs.get,ct=Object.defineProperty,Eo=ir&&!vo(function(){return ct(function(){},"length",{value:8}).length!==8}),bo=String(String).split("String"),_o=js.exports=function(a,u,o){String(u).slice(0,7)==="Symbol("&&(u="["+String(u).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(u="get "+u),o&&o.setter&&(u="set "+u),(!lt(a,"name")||xo&&a.name!==u)&&(ir?ct(a,"name",{value:u,configurable:!0}):a.name=u),Eo&&o&<(o,"arity")&&a.length!==o.arity&&ct(a,"length",{value:o.arity});try{o&<(o,"constructor")&&o.constructor?ir&&ct(a,"prototype",{writable:!1}):a.prototype&&(a.prototype=void 0)}catch{}var h=Ao(a);return lt(h,"source")||(h.source=bo.join(typeof u=="string"?u:"")),a};Function.prototype.toString=_o(function(){return go(this)&&Co(this).source||yo(this)},"toString")});var Ms=b((Xl,qs)=>{var So=le(),wo=Me(),ko=sr(),Fo=st();qs.exports=function(a,u,o,h){h||(h={});var d=h.enumerable,C=h.name!==void 0?h.name:u;if(So(o)&&ko(o,C,h),h.global)d?a[u]=o:Fo(u,o);else{try{h.unsafe?a[u]&&(d=!0):delete a[u]}catch{}d?a[u]=o:wo.f(a,u,{value:o,enumerable:!1,configurable:!h.nonConfigurable,writable:!h.nonWritable})}return a}});var zs=b((Jl,Us)=>{var Bo=Math.ceil,Io=Math.floor;Us.exports=Math.trunc||function(u){var o=+u;return(o>0?Io:Bo)(o)}});var ar=b((Ql,Ws)=>{var To=zs();Ws.exports=function(a){var u=+a;return u!==u||u===0?0:To(u)}});var Hs=b(($l,Gs)=>{var Po=ar(),Do=Math.max,No=Math.min;Gs.exports=function(a,u){var o=Po(a);return o<0?Do(o+u,0):No(o,u)}});var Xs=b((Yl,Ks)=>{var Oo=ar(),Lo=Math.min;Ks.exports=function(a){return a>0?Lo(Oo(a),9007199254740991):0}});var Qs=b((Zl,Js)=>{var Vo=Xs();Js.exports=function(a){return Vo(a.length)}});var Zs=b((ec,Ys)=>{var Ro=tt(),jo=Hs(),qo=Qs(),$s=function(a){return function(u,o,h){var d=Ro(u),C=qo(d),x=jo(h,C),B;if(a&&o!=o){for(;C>x;)if(B=d[x++],B!=B)return!0}else for(;C>x;x++)if((a||x in d)&&d[x]===o)return a||x||0;return!a&&-1}};Ys.exports={includes:$s(!0),indexOf:$s(!1)}});var ra=b((tc,ta)=>{var Mo=ye(),nr=be(),Uo=tt(),zo=Zs().indexOf,Wo=Zt(),ea=Mo([].push);ta.exports=function(a,u){var o=Uo(a),h=0,d=[],C;for(C in o)!nr(Wo,C)&&nr(o,C)&&ea(d,C);for(;u.length>h;)nr(o,C=u[h++])&&(~zo(d,C)||ea(d,C));return d}});var sa=b((rc,ia)=>{ia.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var na=b(aa=>{var Go=ra(),Ho=sa(),Ko=Ho.concat("length","prototype");aa.f=Object.getOwnPropertyNames||function(u){return Go(u,Ko)}});var oa=b(ua=>{ua.f=Object.getOwnPropertySymbols});var la=b((ac,ha)=>{var Xo=rt(),Jo=ye(),Qo=na(),$o=oa(),Yo=nt(),Zo=Jo([].concat);ha.exports=Xo("Reflect","ownKeys")||function(u){var o=Qo.f(Yo(u)),h=$o.f;return h?Zo(o,h(u)):o}});var fa=b((nc,pa)=>{var ca=be(),eh=la(),th=Wt(),rh=Me();pa.exports=function(a,u,o){for(var h=eh(u),d=rh.f,C=th.f,x=0;x{var ih=me(),sh=le(),ah=/#|\.prototype\./,ze=function(a,u){var o=uh[nh(a)];return o==hh?!0:o==oh?!1:sh(u)?ih(u):!!u},nh=ze.normalize=function(a){return String(a).replace(ah,".").toLowerCase()},uh=ze.data={},oh=ze.NATIVE="N",hh=ze.POLYFILL="P";da.exports=ze});var ga=b((oc,va)=>{var ur=oe(),lh=Wt().f,ch=Jt(),ph=Ms(),fh=st(),dh=fa(),mh=ma();va.exports=function(a,u){var o=a.target,h=a.global,d=a.stat,C,x,B,P,g,D;if(h?x=ur:d?x=ur[o]||fh(o,{}):x=(ur[o]||{}).prototype,x)for(B in u){if(g=u[B],a.dontCallGetSet?(D=lh(x,B),P=D&&D.value):P=x[B],C=mh(h?B:o+(d?".":"#")+B,a.forced),!C&&P!==void 0){if(typeof g==typeof P)continue;dh(g,P)}(a.sham||P&&P.sham)&&ch(g,"sham",!0),ph(x,B,g,a)}}});var xa=b(()=>{var vh=ga(),or=oe();vh({global:!0,forced:or.globalThis!==or},{globalThis:or})});var Ca=b((cc,Aa)=>{var ya=sr(),gh=Me();Aa.exports=function(a,u,o){return o.get&&ya(o.get,u,{getter:!0}),o.set&&ya(o.set,u,{setter:!0}),gh.f(a,u,o)}});var ba=b((pc,Ea)=>{"use strict";var xh=nt();Ea.exports=function(){var a=xh(this),u="";return a.hasIndices&&(u+="d"),a.global&&(u+="g"),a.ignoreCase&&(u+="i"),a.multiline&&(u+="m"),a.dotAll&&(u+="s"),a.unicode&&(u+="u"),a.unicodeSets&&(u+="v"),a.sticky&&(u+="y"),u}});xa();var yh=oe(),Ah=xe(),Ch=Ca(),Eh=ba(),bh=me(),_a=yh.RegExp,Sa=_a.prototype,_h=Ah&&bh(function(){var a=!0;try{_a(".","d")}catch{a=!1}var u={},o="",h=a?"dgimsy":"gimsy",d=function(P,g){Object.defineProperty(u,P,{get:function(){return o+=g,!0}})},C={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};a&&(C.hasIndices="d");for(var x in C)d(x,C[x]);var B=Object.getOwnPropertyDescriptor(Sa,"flags").get.call(u);return B!==h||o!==h});_h&&Ch(Sa,"flags",{configurable:!0,get:Eh});var pr=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,fr=Object.getOwnPropertyNames,wh=Object.prototype.hasOwnProperty,wa=(a,u)=>function(){return a&&(u=(0,a[fr(a)[0]])(a=0)),u},Q=(a,u)=>function(){return u||(0,a[fr(a)[0]])((u={exports:{}}).exports,u),u.exports},kh=(a,u)=>{for(var o in u)pr(a,o,{get:u[o],enumerable:!0})},Fh=(a,u,o,h)=>{if(u&&typeof u=="object"||typeof u=="function")for(let d of fr(u))!wh.call(a,d)&&d!==o&&pr(a,d,{get:()=>u[d],enumerable:!(h=Sh(u,d))||h.enumerable});return a},Bh=a=>Fh(pr({},"__esModule",{value:!0}),a),J=wa({""(){}}),dr=Q({"src/common/parser-create-error.js"(a,u){"use strict";J();function o(h,d){let C=new SyntaxError(h+" ("+d.start.line+":"+d.start.column+")");return C.loc=d,C}u.exports=o}}),ka=Q({"src/utils/try-combinations.js"(a,u){"use strict";J();function o(){let h;for(var d=arguments.length,C=new Array(d),x=0;xcr,arch:()=>Ih,cpus:()=>Oa,default:()=>qa,endianness:()=>Ba,freemem:()=>Da,getNetworkInterfaces:()=>ja,hostname:()=>Ia,loadavg:()=>Ta,networkInterfaces:()=>Ra,platform:()=>Th,release:()=>Va,tmpDir:()=>hr,tmpdir:()=>lr,totalmem:()=>Na,type:()=>La,uptime:()=>Pa});function Ba(){if(typeof pt>"u"){var a=new ArrayBuffer(2),u=new Uint8Array(a),o=new Uint16Array(a);if(u[0]=1,u[1]=2,o[0]===258)pt="BE";else if(o[0]===513)pt="LE";else throw new Error("unable to figure out endianess")}return pt}function Ia(){return typeof globalThis.location<"u"?globalThis.location.hostname:""}function Ta(){return[]}function Pa(){return 0}function Da(){return Number.MAX_VALUE}function Na(){return Number.MAX_VALUE}function Oa(){return[]}function La(){return"Browser"}function Va(){return typeof globalThis.navigator<"u"?globalThis.navigator.appVersion:""}function Ra(){}function ja(){}function Ih(){return"javascript"}function Th(){return"browser"}function hr(){return"/tmp"}var pt,lr,cr,qa,Ph=wa({"node-modules-polyfills:os"(){J(),lr=hr,cr=`
+`,qa={EOL:cr,tmpdir:lr,tmpDir:hr,networkInterfaces:Ra,getNetworkInterfaces:ja,release:Va,type:La,cpus:Oa,totalmem:Na,freemem:Da,uptime:Pa,loadavg:Ta,hostname:Ia,endianness:Ba}}}),Dh=Q({"node-modules-polyfills-commonjs:os"(a,u){J();var o=(Ph(),Bh(Fa));if(o&&o.default){u.exports=o.default;for(let h in o)u.exports[h]=o[h]}else o&&(u.exports=o)}}),Nh=Q({"node_modules/detect-newline/index.js"(a,u){"use strict";J();var o=h=>{if(typeof h!="string")throw new TypeError("Expected a string");let d=h.match(/(?:\r?\n)/g)||[];if(d.length===0)return;let C=d.filter(B=>B===`\r
+`).length,x=d.length-C;return C>x?`\r
+`:`
+`};u.exports=o,u.exports.graceful=h=>typeof h=="string"&&o(h)||`
+`}}),Oh=Q({"node_modules/jest-docblock/build/index.js"(a){"use strict";J(),Object.defineProperty(a,"__esModule",{value:!0}),a.extract=N,a.parse=O,a.parseWithComments=S,a.print=_,a.strip=m;function u(){let A=Dh();return u=function(){return A},A}function o(){let A=h(Nh());return o=function(){return A},A}function h(A){return A&&A.__esModule?A:{default:A}}var d=/\*\/$/,C=/^\/\*\*?/,x=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,B=/(^|\s+)\/\/([^\r\n]*)/g,P=/^(\r?\n)+/,g=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,D=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,q=/(\r?\n|^) *\* ?/g,I=[];function N(A){let K=A.match(x);return K?K[0].trimLeft():""}function m(A){let K=A.match(x);return K&&K[0]?A.substring(K[0].length):A}function O(A){return S(A).pragmas}function S(A){let K=(0,o().default)(A)||u().EOL;A=A.replace(C,"").replace(d,"").replace(q,"$1");let R="";for(;R!==A;)R=A,A=A.replace(g,`${K}$1 $2${K}`);A=A.replace(P,"").trimRight();let i=Object.create(null),k=A.replace(D,"").replace(P,"").trimRight(),T;for(;T=D.exec(A);){let M=T[2].replace(B,"");typeof i[T[1]]=="string"||Array.isArray(i[T[1]])?i[T[1]]=I.concat(i[T[1]],M):i[T[1]]=M}return{comments:k,pragmas:i}}function _(A){let{comments:K="",pragmas:R={}}=A,i=(0,o().default)(K)||u().EOL,k="/**",T=" *",M=" */",Z=Object.keys(R),ne=Z.map(ie=>F(ie,R[ie])).reduce((ie,Ne)=>ie.concat(Ne),[]).map(ie=>`${T} ${ie}${i}`).join("");if(!K){if(Z.length===0)return"";if(Z.length===1&&!Array.isArray(R[Z[0]])){let ie=R[Z[0]];return`${k} ${F(Z[0],ie)[0]}${M}`}}let ee=K.split(i).map(ie=>`${T} ${ie}`).join(i)+i;return k+i+(K?ee:"")+(K&&Z.length?T+i:"")+ne+M}function F(A,K){return I.concat(K).map(R=>`@${A} ${R}`.trim())}}}),Lh=Q({"src/common/end-of-line.js"(a,u){"use strict";J();function o(x){let B=x.indexOf("\r");return B>=0?x.charAt(B+1)===`
+`?"crlf":"cr":"lf"}function h(x){switch(x){case"cr":return"\r";case"crlf":return`\r
+`;default:return`
+`}}function d(x,B){let P;switch(B){case`
+`:P=/\n/g;break;case"\r":P=/\r/g;break;case`\r
+`:P=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(B)}.`)}let g=x.match(P);return g?g.length:0}function C(x){return x.replace(/\r\n?/g,`
+`)}u.exports={guessEndOfLine:o,convertEndOfLineToChars:h,countEndOfLineChars:d,normalizeEndOfLine:C}}}),Vh=Q({"src/language-js/utils/get-shebang.js"(a,u){"use strict";J();function o(h){if(!h.startsWith("#!"))return"";let d=h.indexOf(`
+`);return d===-1?h:h.slice(0,d)}u.exports=o}}),Rh=Q({"src/language-js/pragma.js"(a,u){"use strict";J();var{parseWithComments:o,strip:h,extract:d,print:C}=Oh(),{normalizeEndOfLine:x}=Lh(),B=Vh();function P(q){let I=B(q);I&&(q=q.slice(I.length+1));let N=d(q),{pragmas:m,comments:O}=o(N);return{shebang:I,text:q,pragmas:m,comments:O}}function g(q){let I=Object.keys(P(q).pragmas);return I.includes("prettier")||I.includes("format")}function D(q){let{shebang:I,text:N,pragmas:m,comments:O}=P(q),S=h(N),_=C({pragmas:Object.assign({format:""},m),comments:O.trimStart()});return(I?`${I}
+`:"")+x(_)+(S.startsWith(`
+`)?`
+`:`
+
+`)+S}u.exports={hasPragma:g,insertPragma:D}}}),Ma=Q({"src/utils/is-non-empty-array.js"(a,u){"use strict";J();function o(h){return Array.isArray(h)&&h.length>0}u.exports=o}}),Ua=Q({"src/language-js/loc.js"(a,u){"use strict";J();var o=Ma();function h(P){var g,D;let q=P.range?P.range[0]:P.start,I=(g=(D=P.declaration)===null||D===void 0?void 0:D.decorators)!==null&&g!==void 0?g:P.decorators;return o(I)?Math.min(h(I[0]),q):q}function d(P){return P.range?P.range[1]:P.end}function C(P,g){let D=h(P);return Number.isInteger(D)&&D===h(g)}function x(P,g){let D=d(P);return Number.isInteger(D)&&D===d(g)}function B(P,g){return C(P,g)&&x(P,g)}u.exports={locStart:h,locEnd:d,hasSameLocStart:C,hasSameLoc:B}}}),za=Q({"src/language-js/parse/utils/create-parser.js"(a,u){"use strict";J();var{hasPragma:o}=Rh(),{locStart:h,locEnd:d}=Ua();function C(x){return x=typeof x=="function"?{parse:x}:x,Object.assign({astFormat:"estree",hasPragma:o,locStart:h,locEnd:d},x)}u.exports=C}}),jh=Q({"src/language-js/utils/is-ts-keyword-type.js"(a,u){"use strict";J();function o(h){let{type:d}=h;return d.startsWith("TS")&&d.endsWith("Keyword")}u.exports=o}}),qh=Q({"src/language-js/utils/is-block-comment.js"(a,u){"use strict";J();var o=new Set(["Block","CommentBlock","MultiLine"]),h=d=>o.has(d==null?void 0:d.type);u.exports=h}}),Mh=Q({"src/language-js/utils/is-type-cast-comment.js"(a,u){"use strict";J();var o=qh();function h(d){return o(d)&&d.value[0]==="*"&&/@(?:type|satisfies)\b/.test(d.value)}u.exports=h}}),Uh=Q({"src/utils/get-last.js"(a,u){"use strict";J();var o=h=>h[h.length-1];u.exports=o}}),Wa=Q({"src/language-js/parse/postprocess/visit-node.js"(a,u){"use strict";J();function o(h,d){if(Array.isArray(h)){for(let C=0;C{let{line:_,character:F}=N.getLineAndCharacterOfPosition(S);return{line:_+1,column:F}});d({loc:{start:m,end:O}},"Decorators are not valid here.")}function P(D,q){D.kind!==C.PropertyDeclaration||D.modifiers&&!D.modifiers.some(I=>I.kind===C.AbstractKeyword)||D.initializer&&q.value===null&&d(q,"Abstract property cannot have an initializer")}function g(D,q){let{esTreeNodeToTSNodeMap:I,tsNodeToESTreeNodeMap:N}=q.tsParseResult;h(D,m=>{let O=I.get(m);if(!O)return;let S=N.get(O);S===m&&(B(O),P(O,S))})}u.exports={throwErrorForInvalidNodes:g}}}),Ha=Q({"src/language-js/parse/postprocess/index.js"(a,u){"use strict";J();var{locStart:o,locEnd:h}=Ua(),d=jh(),C=Mh(),x=Uh(),B=Wa(),{throwErrorForInvalidNodes:P}=zh(),g=Ga();function D(m,O){if(O.parser==="typescript"&&/@|abstract/.test(O.originalText)&&P(m,O),O.parser!=="typescript"&&O.parser!=="flow"&&O.parser!=="acorn"&&O.parser!=="espree"&&O.parser!=="meriyah"){let _=new Set;m=B(m,F=>{F.leadingComments&&F.leadingComments.some(C)&&_.add(o(F))}),m=B(m,F=>{if(F.type==="ParenthesizedExpression"){let{expression:A}=F;if(A.type==="TypeCastExpression")return A.range=F.range,A;let K=o(F);if(!_.has(K))return A.extra=Object.assign(Object.assign({},A.extra),{},{parenthesized:!0}),A}})}return m=B(m,_=>{switch(_.type){case"ChainExpression":return q(_.expression);case"LogicalExpression":{if(I(_))return N(_);break}case"VariableDeclaration":{let F=x(_.declarations);F&&F.init&&S(_,F);break}case"TSParenthesizedType":return d(_.typeAnnotation)||_.typeAnnotation.type==="TSThisType"||(_.typeAnnotation.range=[o(_),h(_)]),_.typeAnnotation;case"TSTypeParameter":if(typeof _.name=="string"){let F=o(_);_.name={type:"Identifier",name:_.name,range:[F,F+_.name.length]}}break;case"ObjectExpression":if(O.parser==="typescript"){let F=_.properties.find(A=>A.type==="Property"&&A.value.type==="TSEmptyBodyFunctionExpression");F&&g(F.value,"Unexpected token.")}break;case"SequenceExpression":{let F=x(_.expressions);_.range=[o(_),Math.min(h(F),h(_))];break}case"TopicReference":O.__isUsingHackPipeline=!0;break;case"ExportAllDeclaration":{let{exported:F}=_;if(O.parser==="meriyah"&&F&&F.type==="Identifier"){let A=O.originalText.slice(o(F),h(F));(A.startsWith('"')||A.startsWith("'"))&&(_.exported=Object.assign(Object.assign({},_.exported),{},{type:"Literal",value:_.exported.name,raw:A}))}break}case"PropertyDefinition":if(O.parser==="meriyah"&&_.static&&!_.computed&&!_.key){let F="static",A=o(_);Object.assign(_,{static:!1,key:{type:"Identifier",name:F,range:[A,A+F.length]}})}break}}),m;function S(_,F){O.originalText[h(F)]!==";"&&(_.range=[o(_),h(F)])}}function q(m){switch(m.type){case"CallExpression":m.type="OptionalCallExpression",m.callee=q(m.callee);break;case"MemberExpression":m.type="OptionalMemberExpression",m.object=q(m.object);break;case"TSNonNullExpression":m.expression=q(m.expression);break}return m}function I(m){return m.type==="LogicalExpression"&&m.right.type==="LogicalExpression"&&m.operator===m.right.operator}function N(m){return I(m)?N({type:"LogicalExpression",operator:m.operator,left:N({type:"LogicalExpression",operator:m.operator,left:m.left,right:m.right.left,range:[o(m.left),h(m.right.left)]}),right:m.right.right,range:[o(m),h(m)]}):m}u.exports=D}}),ft=Q({"node_modules/acorn/dist/acorn.js"(a,u){J(),function(o,h){typeof a=="object"&&typeof u<"u"?h(a):typeof define=="function"&&define.amd?define(["exports"],h):(o=typeof globalThis<"u"?globalThis:o||self,h(o.acorn={}))}(a,function(o){"use strict";var h=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239],d=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938],C="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F",x="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",B={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},P="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",g={5:P,"5module":P+" export import",6:P+" const class extends export import super"},D=/^in(stanceof)?$/,q=new RegExp("["+x+"]"),I=new RegExp("["+x+C+"]");function N(e,t){for(var r=65536,s=0;se)return!1;if(r+=t[s+1],r>=e)return!0}}function m(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&q.test(String.fromCharCode(e)):t===!1?!1:N(e,d)}function O(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&I.test(String.fromCharCode(e)):t===!1?!1:N(e,d)||N(e,h)}var S=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function _(e,t){return new S(e,{beforeExpr:!0,binop:t})}var F={beforeExpr:!0},A={startsExpr:!0},K={};function R(e,t){return t===void 0&&(t={}),t.keyword=e,K[e]=new S(e,t)}var i={num:new S("num",A),regexp:new S("regexp",A),string:new S("string",A),name:new S("name",A),privateId:new S("privateId",A),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",F),semi:new S(";",F),colon:new S(":",F),dot:new S("."),question:new S("?",F),questionDot:new S("?."),arrow:new S("=>",F),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",F),backQuote:new S("`",A),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:_("||",1),logicalAND:_("&&",2),bitwiseOR:_("|",3),bitwiseXOR:_("^",4),bitwiseAND:_("&",5),equality:_("==/!=/===/!==",6),relational:_(">/<=/>=",7),bitShift:_("<>>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:_("%",10),star:_("*",10),slash:_("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:_("??",1),_break:R("break"),_case:R("case",F),_catch:R("catch"),_continue:R("continue"),_debugger:R("debugger"),_default:R("default",F),_do:R("do",{isLoop:!0,beforeExpr:!0}),_else:R("else",F),_finally:R("finally"),_for:R("for",{isLoop:!0}),_function:R("function",A),_if:R("if"),_return:R("return",F),_switch:R("switch"),_throw:R("throw",F),_try:R("try"),_var:R("var"),_const:R("const"),_while:R("while",{isLoop:!0}),_with:R("with"),_new:R("new",{beforeExpr:!0,startsExpr:!0}),_this:R("this",A),_super:R("super",A),_class:R("class",A),_extends:R("extends",F),_export:R("export"),_import:R("import",A),_null:R("null",A),_true:R("true",A),_false:R("false",A),_in:R("in",{beforeExpr:!0,binop:7}),_instanceof:R("instanceof",{beforeExpr:!0,binop:7}),_typeof:R("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:R("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:R("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},k=/\r\n?|\n|\u2028|\u2029/,T=new RegExp(k.source,"g");function M(e){return e===10||e===13||e===8232||e===8233}function Z(e,t,r){r===void 0&&(r=e.length);for(var s=t;s