diff --git a/.gitattributes b/.gitattributes index 6099603deb0129051811535ba703d574480dfb67..b40a274c2931b0c72cf2b070de0bd8df3ea0105d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -45,3 +45,4 @@ node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node filter=lfs d node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node filter=lfs diff=lfs merge=lfs -text node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node filter=lfs diff=lfs merge=lfs -text node_modules/@swc/core-linux-x64-musl/swc.linux-x64-musl.node filter=lfs diff=lfs merge=lfs -text +node_modules/@trivago/prettier-plugin-sort-imports/.yarn/install-state.gz filter=lfs diff=lfs merge=lfs -text diff --git a/node_modules/@swc/helpers/cjs/_create_class.cjs b/node_modules/@swc/helpers/cjs/_create_class.cjs new file mode 100644 index 0000000000000000000000000000000000000000..1c3fe74a53de887653482cc9801317f3b455fe75 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_create_class.cjs @@ -0,0 +1,20 @@ +"use strict"; + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + + if ("value" in descriptor) descriptor.writable = true; + + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function _create_class(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + + return Constructor; +} +exports._ = _create_class; diff --git a/node_modules/@swc/helpers/cjs/_create_for_of_iterator_helper_loose.cjs b/node_modules/@swc/helpers/cjs/_create_for_of_iterator_helper_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9a5042d3419ab752053858715c3b07dfda0d5225 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_create_for_of_iterator_helper_loose.cjs @@ -0,0 +1,24 @@ +"use strict"; + +var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs"); + +function _create_for_of_iterator_helper_loose(o, allowArrayLike) { + var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; + + if (it) return (it = it.call(o)).next.bind(it); + // Fallback for engines without symbol support + if (Array.isArray(o) || (it = _unsupported_iterable_to_array._(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + + var i = 0; + + return function() { + if (i >= o.length) return { done: true }; + + return { done: false, value: o[i++] }; + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +exports._ = _create_for_of_iterator_helper_loose; diff --git a/node_modules/@swc/helpers/cjs/_create_super.cjs b/node_modules/@swc/helpers/cjs/_create_super.cjs new file mode 100644 index 0000000000000000000000000000000000000000..dc7f3cbd6ed02332a120373ffb8acfbb677fdbef --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_create_super.cjs @@ -0,0 +1,23 @@ +"use strict"; + +var _get_prototype_of = require("./_get_prototype_of.cjs"); +var _is_native_reflect_construct = require("./_is_native_reflect_construct.cjs"); +var _possible_constructor_return = require("./_possible_constructor_return.cjs"); + +function _create_super(Derived) { + var hasNativeReflectConstruct = _is_native_reflect_construct._(); + + return function _createSuperInternal() { + var Super = _get_prototype_of._(Derived), result; + + if (hasNativeReflectConstruct) { + var NewTarget = _get_prototype_of._(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possible_constructor_return._(this, result); + }; +} +exports._ = _create_super; diff --git a/node_modules/@swc/helpers/cjs/_decorate.cjs b/node_modules/@swc/helpers/cjs/_decorate.cjs new file mode 100644 index 0000000000000000000000000000000000000000..13b171dacd19eb2db3e8c394510c3358c8a041f5 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_decorate.cjs @@ -0,0 +1,270 @@ +"use strict"; + +var _to_array = require("./_to_array.cjs"); +var _to_property_key = require("./_to_property_key.cjs"); +var _type_of = require("./_type_of.cjs"); + +function _decorate(decorators, factory, superClass) { + var r = factory(function initialize(O) { + _initializeInstanceElements(O, decorated.elements); + }, superClass); + var decorated = _decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators); + _initializeClassElements(r.F, decorated.elements); + + return _runClassFinishers(r.F, decorated.finishers); +} + +function _createElementDescriptor(def) { + var key = _to_property_key._(def.key); + var descriptor; + + if (def.kind === "method") { + descriptor = { value: def.value, writable: true, configurable: true, enumerable: false }; + Object.defineProperty(def.value, "name", { value: _type_of._(key) === "symbol" ? "" : key, configurable: true }); + } else if (def.kind === "get") descriptor = { get: def.value, configurable: true, enumerable: false }; + else if (def.kind === "set") descriptor = { set: def.value, configurable: true, enumerable: false }; + else if (def.kind === "field") descriptor = { configurable: true, writable: true, enumerable: true }; + + var element = { kind: def.kind === "field" ? "field" : "method", key: key, placement: def.static ? "static" : def.kind === "field" ? "own" : "prototype", descriptor: descriptor }; + + if (def.decorators) element.decorators = def.decorators; + + if (def.kind === "field") element.initializer = def.value; + + return element; +} +function _coalesceGetterSetter(element, other) { + if (element.descriptor.get !== undefined) other.descriptor.get = element.descriptor.get; + else other.descriptor.set = element.descriptor.set; +} +function _coalesceClassElements(elements) { + var newElements = []; + var isSameElement = function isSameElement(other) { + return other.kind === "method" && other.key === element.key && other.placement === element.placement; + }; + + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + var other; + + if (element.kind === "method" && (other = newElements.find(isSameElement))) { + if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) { + if (_hasDecorators(element) || _hasDecorators(other)) { + throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated."); + } + other.descriptor = element.descriptor; + } else { + if (_hasDecorators(element)) { + if (_hasDecorators(other)) { + throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ")."); + } + other.decorators = element.decorators; + } + _coalesceGetterSetter(element, other); + } + } else { + newElements.push(element); + } + } + + return newElements; +} +function _hasDecorators(element) { + return element.decorators && element.decorators.length; +} +function _isDataDescriptor(desc) { + return desc !== undefined && !(desc.value === undefined && desc.writable === undefined); +} +function _initializeClassElements(F, elements) { + var proto = F.prototype; + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element) { + var placement = element.placement; + if (element.kind === kind && (placement === "static" || placement === "prototype")) { + var receiver = placement === "static" ? F : proto; + _defineClassElement(receiver, element); + } + }); + }); +} +function _initializeInstanceElements(O, elements) { + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element) { + if (element.kind === kind && element.placement === "own") _defineClassElement(O, element); + }); + }); +} +function _defineClassElement(receiver, element) { + var descriptor = element.descriptor; + if (element.kind === "field") { + var initializer = element.initializer; + descriptor = { enumerable: descriptor.enumerable, writable: descriptor.writable, configurable: descriptor.configurable, value: initializer === void 0 ? void 0 : initializer.call(receiver) }; + } + Object.defineProperty(receiver, element.key, descriptor); +} +function _decorateClass(elements, decorators) { + var newElements = []; + var finishers = []; + var placements = { static: [], prototype: [], own: [] }; + elements.forEach(function(element) { + _addElementPlacement(element, placements); + }); + elements.forEach(function(element) { + if (!_hasDecorators(element)) return newElements.push(element); + var elementFinishersExtras = _decorateElement(element, placements); + newElements.push(elementFinishersExtras.element); + newElements.push.apply(newElements, elementFinishersExtras.extras); + finishers.push.apply(finishers, elementFinishersExtras.finishers); + }); + if (!decorators) return { elements: newElements, finishers: finishers }; + var result = _decorateConstructor(newElements, decorators); + finishers.push.apply(finishers, result.finishers); + result.finishers = finishers; + + return result; +} +function _addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + if (!silent && keys.indexOf(element.key) !== -1) throw new TypeError("Duplicated element (" + element.key + ")"); + keys.push(element.key); +} +function _decorateElement(element, placements) { + var extras = []; + var finishers = []; + for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) { + var keys = placements[element.placement]; + keys.splice(keys.indexOf(element.key), 1); + var elementObject = _fromElementDescriptor(element); + var elementFinisherExtras = _toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject); + element = elementFinisherExtras.element; + _addElementPlacement(element, placements); + if (elementFinisherExtras.finisher) finishers.push(elementFinisherExtras.finisher); + var newExtras = elementFinisherExtras.extras; + if (newExtras) { + for (var j = 0; j < newExtras.length; j++) _addElementPlacement(newExtras[j], placements); + extras.push.apply(extras, newExtras); + } + } + + return { element: element, finishers: finishers, extras: extras }; +} +function _decorateConstructor(elements, decorators) { + var finishers = []; + for (var i = decorators.length - 1; i >= 0; i--) { + var obj = _fromClassDescriptor(elements); + var elementsAndFinisher = _toClassDescriptor((0, decorators[i])(obj) || obj); + if (elementsAndFinisher.finisher !== undefined) finishers.push(elementsAndFinisher.finisher); + if (elementsAndFinisher.elements !== undefined) { + elements = elementsAndFinisher.elements; + for (var j = 0; j < elements.length - 1; j++) { + for (var k = j + 1; k < elements.length; k++) { + if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) { + throw new TypeError("Duplicated element (" + elements[j].key + ")"); + } + } + } + } + } + + return { elements: elements, finishers: finishers }; +} +function _fromElementDescriptor(element) { + var obj = { kind: element.kind, key: element.key, placement: element.placement, descriptor: element.descriptor }; + var desc = { value: "Descriptor", configurable: true }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + + return obj; +} +function _toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + + return _to_array._(elementObjects).map(function(elementObject) { + var element = _toElementDescriptor(elementObject); + _disallowProperty(elementObject, "finisher", "An element descriptor"); + _disallowProperty(elementObject, "extras", "An element descriptor"); + + return element; + }); +} +function _toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + if (kind !== "method" && kind !== "field") { + throw new TypeError("An element descriptor's .kind property must be either \"method\" or" + " \"field\", but a decorator created an element descriptor with" + " .kind \"" + kind + "\""); + } + var key = _to_property_key._(elementObject.key); + var placement = String(elementObject.placement); + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError( + "An element descriptor's .placement property must be one of \"static\"," + + " \"prototype\" or \"own\", but a decorator created an element descriptor" + + " with .placement \"" + + placement + + "\"" + ); + } + var descriptor = elementObject.descriptor; + _disallowProperty(elementObject, "elements", "An element descriptor"); + var element = { kind: kind, key: key, placement: placement, descriptor: Object.assign({}, descriptor) }; + if (kind !== "field") _disallowProperty(elementObject, "initializer", "A method descriptor"); + else { + _disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + _disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + _disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + element.initializer = elementObject.initializer; + } + + return element; +} +function _toElementFinisherExtras(elementObject) { + var element = _toElementDescriptor(elementObject); + var finisher = _optionalCallableProperty(elementObject, "finisher"); + var extras = _toElementDescriptors(elementObject.extras); + + return { element: element, finisher: finisher, extras: extras }; +} +function _fromClassDescriptor(elements) { + var obj = { kind: "class", elements: elements.map(_fromElementDescriptor) }; + var desc = { value: "Descriptor", configurable: true }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + + return obj; +} +function _toClassDescriptor(obj) { + var kind = String(obj.kind); + if (kind !== "class") { + throw new TypeError("A class descriptor's .kind property must be \"class\", but a decorator" + " created a class descriptor with .kind \"" + kind + "\""); + } + _disallowProperty(obj, "key", "A class descriptor"); + _disallowProperty(obj, "placement", "A class descriptor"); + _disallowProperty(obj, "descriptor", "A class descriptor"); + _disallowProperty(obj, "initializer", "A class descriptor"); + _disallowProperty(obj, "extras", "A class descriptor"); + var finisher = _optionalCallableProperty(obj, "finisher"); + var elements = _toElementDescriptors(obj.elements); + + return { elements: elements, finisher: finisher }; +} +function _disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) throw new TypeError(objectType + " can't have a ." + name + " property."); +} +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} +function _runClassFinishers(constructor, finishers) { + for (var i = 0; i < finishers.length; i++) { + var newConstructor = (0, finishers[i])(constructor); + if (newConstructor !== undefined) { + if (typeof newConstructor !== "function") throw new TypeError("Finishers must return a constructor."); + constructor = newConstructor; + } + } + + return constructor; +} +exports._ = _decorate; diff --git a/node_modules/@swc/helpers/cjs/_defaults.cjs b/node_modules/@swc/helpers/cjs/_defaults.cjs new file mode 100644 index 0000000000000000000000000000000000000000..eb832e9b24b118062ef36ab70a9011529bde1254 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_defaults.cjs @@ -0,0 +1,15 @@ +"use strict"; + +function _defaults(obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + + if (value && value.configurable && obj[key] === undefined) Object.defineProperty(obj, key, value); + } + + return obj; +} +exports._ = _defaults; diff --git a/node_modules/@swc/helpers/cjs/_define_enumerable_properties.cjs b/node_modules/@swc/helpers/cjs/_define_enumerable_properties.cjs new file mode 100644 index 0000000000000000000000000000000000000000..6c4c3343bde30f02f7703a8b4b42835bef67416e --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_define_enumerable_properties.cjs @@ -0,0 +1,26 @@ +"use strict"; + +function _define_enumerable_properties(obj, descs) { + for (var key in descs) { + var desc = descs[key]; + desc.configurable = desc.enumerable = true; + + if ("value" in desc) desc.writable = true; + + Object.defineProperty(obj, key, desc); + } + + if (Object.getOwnPropertySymbols) { + var objectSymbols = Object.getOwnPropertySymbols(descs); + for (var i = 0; i < objectSymbols.length; i++) { + var sym = objectSymbols[i]; + var desc = descs[sym]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + Object.defineProperty(obj, sym, desc); + } + } + + return obj; +} +exports._ = _define_enumerable_properties; diff --git a/node_modules/@swc/helpers/cjs/_define_property.cjs b/node_modules/@swc/helpers/cjs/_define_property.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9063d6e99599c50b49fc5826b0777ba93c896598 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_define_property.cjs @@ -0,0 +1,10 @@ +"use strict"; + +function _define_property(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); + } else obj[key] = value; + + return obj; +} +exports._ = _define_property; diff --git a/node_modules/@swc/helpers/cjs/_dispose.cjs b/node_modules/@swc/helpers/cjs/_dispose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..84ec384aaac7f9c9e681d46bee9acd42dd29cad6 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_dispose.cjs @@ -0,0 +1,43 @@ +"use strict"; + +/* @minVersion 7.22.0 */ +function dispose_SuppressedError(error, suppressed) { + if (typeof SuppressedError !== "undefined") { + // eslint-disable-next-line no-undef + dispose_SuppressedError = SuppressedError; + } else { + dispose_SuppressedError = function SuppressedError(error, suppressed) { + this.suppressed = suppressed; + this.error = error; + this.stack = new Error().stack; + }; + dispose_SuppressedError.prototype = Object.create(Error.prototype, { constructor: { value: dispose_SuppressedError, writable: true, configurable: true } }); + } + return new dispose_SuppressedError(error, suppressed); +} + +function _dispose(stack, error, hasError) { + function next() { + while (stack.length > 0) { + try { + var r = stack.pop(); + var p = r.d.call(r.v); + if (r.a) return Promise.resolve(p).then(next, err); + } catch (e) { + return err(e); + } + } + if (hasError) throw error; + } + + function err(e) { + error = hasError ? new dispose_SuppressedError(e, error) : e; + hasError = true; + + return next(); + } + + return next(); +} + +exports._ = _dispose; diff --git a/node_modules/@swc/helpers/cjs/_export_star.cjs b/node_modules/@swc/helpers/cjs/_export_star.cjs new file mode 100644 index 0000000000000000000000000000000000000000..51af20b9e994163af66aaf53cf58dfa7663e72f8 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_export_star.cjs @@ -0,0 +1,17 @@ +"use strict"; + +function _export_star(from, to) { + Object.keys(from).forEach(function(k) { + if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) { + Object.defineProperty(to, k, { + enumerable: true, + get: function() { + return from[k]; + } + }); + } + }); + + return from; +} +exports._ = _export_star; diff --git a/node_modules/@swc/helpers/cjs/_extends.cjs b/node_modules/@swc/helpers/cjs/_extends.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2bb159299b872f6e1a6dafa3e7ca18000a90c186 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_extends.cjs @@ -0,0 +1,15 @@ +"use strict"; + +function _extends() { + exports._ = _extends = Object.assign || function assign(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key]; + } + + return target; + }; + + return _extends.apply(this, arguments); +} +exports._ = _extends; diff --git a/node_modules/@swc/helpers/cjs/_get.cjs b/node_modules/@swc/helpers/cjs/_get.cjs new file mode 100644 index 0000000000000000000000000000000000000000..1c5bfcd0044b2c43c1ef7d45b7a292471453cc1f --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_get.cjs @@ -0,0 +1,23 @@ +"use strict"; + +var _super_prop_base = require("./_super_prop_base.cjs"); + +function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) exports._ = _get = Reflect.get; + else { + exports._ = _get = function get(target, property, receiver) { + var base = _super_prop_base._(target, property); + + if (!base) return; + + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) return desc.get.call(receiver || target); + + return desc.value; + }; + } + + return _get(target, property, receiver || target); +} +exports._ = _get; diff --git a/node_modules/@swc/helpers/cjs/_get_prototype_of.cjs b/node_modules/@swc/helpers/cjs/_get_prototype_of.cjs new file mode 100644 index 0000000000000000000000000000000000000000..6ef956a17db6a42b9af3afd266d8691a010ea7b0 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_get_prototype_of.cjs @@ -0,0 +1,10 @@ +"use strict"; + +function _get_prototype_of(o) { + exports._ = _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + + return _get_prototype_of(o); +} +exports._ = _get_prototype_of; diff --git a/node_modules/@swc/helpers/cjs/_identity.cjs b/node_modules/@swc/helpers/cjs/_identity.cjs new file mode 100644 index 0000000000000000000000000000000000000000..aab1b0da75eb0d834eb113a4c90d43932140d5c4 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_identity.cjs @@ -0,0 +1,7 @@ +"use strict"; + +function _identity(x) { + return x; +} + +exports._ = _identity; diff --git a/node_modules/@swc/helpers/cjs/_inherits.cjs b/node_modules/@swc/helpers/cjs/_inherits.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c803df5ff37af9225c61961cedaa1ef4dae77d22 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_inherits.cjs @@ -0,0 +1,14 @@ +"use strict"; + +var _set_prototype_of = require("./_set_prototype_of.cjs"); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); + + if (superClass) _set_prototype_of._(subClass, superClass); +} +exports._ = _inherits; diff --git a/node_modules/@swc/helpers/cjs/_inherits_loose.cjs b/node_modules/@swc/helpers/cjs/_inherits_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..30f35415852b0c2caf116ea045b2d882e4b0dda4 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_inherits_loose.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _inherits_loose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} +exports._ = _inherits_loose; diff --git a/node_modules/@swc/helpers/cjs/_initializer_define_property.cjs b/node_modules/@swc/helpers/cjs/_initializer_define_property.cjs new file mode 100644 index 0000000000000000000000000000000000000000..ac28e5d83ae73e680072ebbca9c061beb1975ab1 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_initializer_define_property.cjs @@ -0,0 +1,13 @@ +"use strict"; + +function _initializer_define_property(target, property, descriptor, context) { + if (!descriptor) return; + + Object.defineProperty(target, property, { + enumerable: descriptor.enumerable, + configurable: descriptor.configurable, + writable: descriptor.writable, + value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 + }); +} +exports._ = _initializer_define_property; diff --git a/node_modules/@swc/helpers/cjs/_initializer_warning_helper.cjs b/node_modules/@swc/helpers/cjs/_initializer_warning_helper.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2c333dbb3f7ec41ffb18ec14efc62452ddbabc2a --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_initializer_warning_helper.cjs @@ -0,0 +1,11 @@ +"use strict"; + +function _initializer_warning_helper(descriptor, context) { + throw new Error( + "Decorating class property failed. Please ensure that " + + "proposal-class-properties is enabled and set to use loose mode. " + + "To use proposal-class-properties in spec mode with decorators, wait for " + + "the next major version of decorators in stage 2." + ); +} +exports._ = _initializer_warning_helper; diff --git a/node_modules/@swc/helpers/cjs/_instanceof.cjs b/node_modules/@swc/helpers/cjs/_instanceof.cjs new file mode 100644 index 0000000000000000000000000000000000000000..d213ddfdee4572852255b6841efaa5f4681998a5 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_instanceof.cjs @@ -0,0 +1,10 @@ +"use strict"; + +function _instanceof(left, right) { + "@swc/helpers - instanceof"; + + if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { + return !!right[Symbol.hasInstance](left); + } else return left instanceof right; +} +exports._ = _instanceof; diff --git a/node_modules/@swc/helpers/cjs/_interop_require_default.cjs b/node_modules/@swc/helpers/cjs/_interop_require_default.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c9e5240c07c154593baef4918909858ab4bf3cb7 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_interop_require_default.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} +exports._ = _interop_require_default; diff --git a/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs b/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9c2abcded61a6653b41a2cfece1c1397fc336619 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs @@ -0,0 +1,38 @@ +"use strict"; + +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + + return (_getRequireWildcardCache = function(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interop_require_wildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) return obj; + if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj }; + + var cache = _getRequireWildcardCache(nodeInterop); + + if (cache && cache.has(obj)) return cache.get(obj); + + var newObj = { __proto__: null }; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + + for (var key in obj) { + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); + else newObj[key] = obj[key]; + } + } + + newObj.default = obj; + + if (cache) cache.set(obj, newObj); + + return newObj; +} +exports._ = _interop_require_wildcard; diff --git a/node_modules/@swc/helpers/cjs/_is_native_function.cjs b/node_modules/@swc/helpers/cjs/_is_native_function.cjs new file mode 100644 index 0000000000000000000000000000000000000000..920371163fef3dfac24eb5071a000fa851267055 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_is_native_function.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _is_native_function(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} +exports._ = _is_native_function; diff --git a/node_modules/@swc/helpers/cjs/_is_native_reflect_construct.cjs b/node_modules/@swc/helpers/cjs/_is_native_reflect_construct.cjs new file mode 100644 index 0000000000000000000000000000000000000000..42ea82f5a5b4f26255d6fdea9981943b2ae2e67b --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_is_native_reflect_construct.cjs @@ -0,0 +1,18 @@ +"use strict"; + +function _is_native_reflect_construct() { + // Since Reflect.construct can't be properly polyfilled, some + // implementations (e.g. core-js@2) don't set the correct internal slots. + // Those polyfills don't allow us to subclass built-ins, so we need to + // use our fallback implementation. + try { + // If the internal slots aren't set, this throws an error similar to + // TypeError: this is not a Boolean object. + var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); + } catch (_) {} + return (exports._ = _is_native_reflect_construct = function() { + return !!result; + })(); +} + +exports._ = _is_native_reflect_construct; diff --git a/node_modules/@swc/helpers/cjs/_iterable_to_array.cjs b/node_modules/@swc/helpers/cjs/_iterable_to_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..cc73cf5f044421344ca37d30819a69236e8b35a6 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_iterable_to_array.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _iterable_to_array(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) { + return Array.from(iter); + } +} +exports._ = _iterable_to_array; diff --git a/node_modules/@swc/helpers/cjs/_iterable_to_array_limit.cjs b/node_modules/@swc/helpers/cjs/_iterable_to_array_limit.cjs new file mode 100644 index 0000000000000000000000000000000000000000..634876bc7ab1d292ef58f75fd308f1cfc6d2d787 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_iterable_to_array_limit.cjs @@ -0,0 +1,31 @@ +"use strict"; + +function _iterable_to_array_limit(arr, i) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + + if (_i == null) return; + + var _arr = []; + var _n = true; + var _d = false; + var _s, _e; + + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} +exports._ = _iterable_to_array_limit; diff --git a/node_modules/@swc/helpers/cjs/_iterable_to_array_limit_loose.cjs b/node_modules/@swc/helpers/cjs/_iterable_to_array_limit_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..78ddf90baf79d65ddef6d78a39082ad9606b9e0a --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_iterable_to_array_limit_loose.cjs @@ -0,0 +1,17 @@ +"use strict"; + +function _iterable_to_array_limit_loose(arr, i) { + var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); + + if (_i == null) return; + + var _arr = []; + + for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) { + _arr.push(_step.value); + if (i && _arr.length === i) break; + } + + return _arr; +} +exports._ = _iterable_to_array_limit_loose; diff --git a/node_modules/@swc/helpers/cjs/_jsx.cjs b/node_modules/@swc/helpers/cjs/_jsx.cjs new file mode 100644 index 0000000000000000000000000000000000000000..bf1a20b0a75541350287eaca450da98bd317c6d1 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_jsx.cjs @@ -0,0 +1,28 @@ +"use strict"; + +var REACT_ELEMENT_TYPE; +function _jsx(type, props, key, children) { + if (!REACT_ELEMENT_TYPE) { + REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; + } + + var defaultProps = type && type.defaultProps; + var childrenLength = arguments.length - 3; + + if (!props && childrenLength !== 0) props = { children: void 0 }; + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) props[propName] = defaultProps[propName]; + else if (!props) props = defaultProps || {}; + } + } + if (childrenLength === 1) props.children = children; + else if (childrenLength > 1) { + var childArray = new Array(childrenLength); + for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 3]; + props.children = childArray; + } + + return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : "" + key, ref: null, props: props, _owner: null }; +} +exports._ = _jsx; diff --git a/node_modules/@swc/helpers/cjs/_new_arrow_check.cjs b/node_modules/@swc/helpers/cjs/_new_arrow_check.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2df59f9cfb0c08c8d75f3dc0e5eeab6218747c51 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_new_arrow_check.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _new_arrow_check(innerThis, boundThis) { + if (innerThis !== boundThis) throw new TypeError("Cannot instantiate an arrow function"); +} +exports._ = _new_arrow_check; diff --git a/node_modules/@swc/helpers/cjs/_non_iterable_rest.cjs b/node_modules/@swc/helpers/cjs/_non_iterable_rest.cjs new file mode 100644 index 0000000000000000000000000000000000000000..3baab4b6c8ccb85a52e1c619f14d549dbd75c0ea --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_non_iterable_rest.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _non_iterable_rest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +exports._ = _non_iterable_rest; diff --git a/node_modules/@swc/helpers/cjs/_non_iterable_spread.cjs b/node_modules/@swc/helpers/cjs/_non_iterable_spread.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c213de5586d0c8cf40f8f73edb7681c2f000ac2c --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_non_iterable_spread.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _non_iterable_spread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +exports._ = _non_iterable_spread; diff --git a/node_modules/@swc/helpers/cjs/_object_destructuring_empty.cjs b/node_modules/@swc/helpers/cjs/_object_destructuring_empty.cjs new file mode 100644 index 0000000000000000000000000000000000000000..c84fb6686f9dcdfde4af9c5a8837396badb00a9c --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_object_destructuring_empty.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _object_destructuring_empty(o) { + if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o); + + return o; +} +exports._ = _object_destructuring_empty; diff --git a/node_modules/@swc/helpers/cjs/_object_spread.cjs b/node_modules/@swc/helpers/cjs/_object_spread.cjs new file mode 100644 index 0000000000000000000000000000000000000000..45cec7105d36b48d0a9c80a6a9b27282496393fd --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_object_spread.cjs @@ -0,0 +1,25 @@ +"use strict"; + +var _define_property = require("./_define_property.cjs"); + +function _object_spread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + + if (typeof Object.getOwnPropertySymbols === "function") { + ownKeys = ownKeys.concat( + Object.getOwnPropertySymbols(source).filter(function(sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + }) + ); + } + + ownKeys.forEach(function(key) { + _define_property._(target, key, source[key]); + }); + } + + return target; +} +exports._ = _object_spread; diff --git a/node_modules/@swc/helpers/cjs/_object_spread_props.cjs b/node_modules/@swc/helpers/cjs/_object_spread_props.cjs new file mode 100644 index 0000000000000000000000000000000000000000..1c27f1c3a95d32f6ad730dc9889c63629a0b7377 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_object_spread_props.cjs @@ -0,0 +1,30 @@ +"use strict"; + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) { + symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + keys.push.apply(keys, symbols); + } + + return keys; +} +function _object_spread_props(target, source) { + source = source != null ? source : {}; + + if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + else { + ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + + return target; +} +exports._ = _object_spread_props; diff --git a/node_modules/@swc/helpers/cjs/_object_without_properties.cjs b/node_modules/@swc/helpers/cjs/_object_without_properties.cjs new file mode 100644 index 0000000000000000000000000000000000000000..6a801fd9df5351f5f3787d88500b82ead8f1e248 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_object_without_properties.cjs @@ -0,0 +1,35 @@ +"use strict"; + +var _object_without_properties_loose = require("./_object_without_properties_loose.cjs"); + +function _object_without_properties(source, excluded) { + if (source == null) return {}; + + var target = {}, sourceKeys, key, i; + if (typeof Reflect !== "undefined" && Reflect.ownKeys) { + sourceKeys = Reflect.ownKeys(Object(source)); + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + + return target; + } + + target = _object_without_properties_loose._(source, excluded); + if (Object.getOwnPropertySymbols) { + sourceKeys = Object.getOwnPropertySymbols(source); + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +exports._ = _object_without_properties; diff --git a/node_modules/@swc/helpers/cjs/_object_without_properties_loose.cjs b/node_modules/@swc/helpers/cjs/_object_without_properties_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..71ae3526d6f2486ca881d7ff12b11e0af87963b7 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_object_without_properties_loose.cjs @@ -0,0 +1,16 @@ +"use strict"; + +function _object_without_properties_loose(source, excluded) { + if (source == null) return {}; + + var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + + return target; +} +exports._ = _object_without_properties_loose; diff --git a/node_modules/@swc/helpers/cjs/_overload_yield.cjs b/node_modules/@swc/helpers/cjs/_overload_yield.cjs new file mode 100644 index 0000000000000000000000000000000000000000..13ed17e4dbb180aecbbb956723d08c4593b6d048 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_overload_yield.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _overload_yield(value, /** 0: await 1: delegate */ kind) { + this.v = value; + this.k = kind; +} + +exports._ = _overload_yield; diff --git a/node_modules/@swc/helpers/cjs/_possible_constructor_return.cjs b/node_modules/@swc/helpers/cjs/_possible_constructor_return.cjs new file mode 100644 index 0000000000000000000000000000000000000000..fa040185b3d5e4f00202c9f64c3817d18814fa8c --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_possible_constructor_return.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _assert_this_initialized = require("./_assert_this_initialized.cjs"); +var _type_of = require("./_type_of.cjs"); + +function _possible_constructor_return(self, call) { + if (call && (_type_of._(call) === "object" || typeof call === "function")) return call; + + return _assert_this_initialized._(self); +} +exports._ = _possible_constructor_return; diff --git a/node_modules/@swc/helpers/cjs/_read_only_error.cjs b/node_modules/@swc/helpers/cjs/_read_only_error.cjs new file mode 100644 index 0000000000000000000000000000000000000000..302cf5c70e53bd2a1fa71398c4e617afe8e9f5be --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_read_only_error.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _read_only_error(name) { + throw new TypeError("\"" + name + "\" is read-only"); +} +exports._ = _read_only_error; diff --git a/node_modules/@swc/helpers/cjs/_set.cjs b/node_modules/@swc/helpers/cjs/_set.cjs new file mode 100644 index 0000000000000000000000000000000000000000..adbf48487a1b1056c1927fb84d8ed741192ebdc8 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_set.cjs @@ -0,0 +1,44 @@ +"use strict"; + +var _define_property = require("./_define_property.cjs"); +var _super_prop_base = require("./_super_prop_base.cjs"); + +function set(target, property, value, receiver) { + if (typeof Reflect !== "undefined" && Reflect.set) set = Reflect.set; + else { + set = function set(target, property, value, receiver) { + var base = _super_prop_base._(target, property); + var desc; + if (base) { + desc = Object.getOwnPropertyDescriptor(base, property); + if (desc.set) { + desc.set.call(receiver, value); + + return true; + } else if (!desc.writable) { + return false; + } + } + desc = Object.getOwnPropertyDescriptor(receiver, property); + if (desc) { + if (!desc.writable) return false; + desc.value = value; + Object.defineProperty(receiver, property, desc); + } else { + _define_property._(receiver, property, value); + } + + return true; + }; + } + + return set(target, property, value, receiver); +} + +function _set(target, property, value, receiver, isStrict) { + var s = set(target, property, value, receiver || target); + if (!s && isStrict) throw new Error("failed to set property"); + + return value; +} +exports._ = _set; diff --git a/node_modules/@swc/helpers/cjs/_set_prototype_of.cjs b/node_modules/@swc/helpers/cjs/_set_prototype_of.cjs new file mode 100644 index 0000000000000000000000000000000000000000..acf501dbf761c21cee66cc5d60634d5b34264def --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_set_prototype_of.cjs @@ -0,0 +1,12 @@ +"use strict"; + +function _set_prototype_of(o, p) { + exports._ = _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) { + o.__proto__ = p; + + return o; + }; + + return _set_prototype_of(o, p); +} +exports._ = _set_prototype_of; diff --git a/node_modules/@swc/helpers/cjs/_skip_first_generator_next.cjs b/node_modules/@swc/helpers/cjs/_skip_first_generator_next.cjs new file mode 100644 index 0000000000000000000000000000000000000000..e4c42543aa287d14de80e24252a09280a0049273 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_skip_first_generator_next.cjs @@ -0,0 +1,11 @@ +"use strict"; + +function _skip_first_generator_next(fn) { + return function() { + var it = fn.apply(this, arguments); + it.next(); + + return it; + }; +} +exports._ = _skip_first_generator_next; diff --git a/node_modules/@swc/helpers/cjs/_sliced_to_array.cjs b/node_modules/@swc/helpers/cjs/_sliced_to_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..e9fe47e83cbee35010173c2569bb1585d11fdbe6 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_sliced_to_array.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _array_with_holes = require("./_array_with_holes.cjs"); +var _iterable_to_array_limit = require("./_iterable_to_array_limit.cjs"); +var _non_iterable_rest = require("./_non_iterable_rest.cjs"); +var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs"); + +function _sliced_to_array(arr, i) { + return _array_with_holes._(arr) || _iterable_to_array_limit._(arr, i) || _unsupported_iterable_to_array._(arr, i) || _non_iterable_rest._(); +} +exports._ = _sliced_to_array; diff --git a/node_modules/@swc/helpers/cjs/_sliced_to_array_loose.cjs b/node_modules/@swc/helpers/cjs/_sliced_to_array_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..562dcaf9d4453037ada352f07a94e0e997034988 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_sliced_to_array_loose.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _array_with_holes = require("./_array_with_holes.cjs"); +var _iterable_to_array_limit_loose = require("./_iterable_to_array_limit_loose.cjs"); +var _non_iterable_rest = require("./_non_iterable_rest.cjs"); +var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs"); + +function _sliced_to_array_loose(arr, i) { + return _array_with_holes._(arr) || _iterable_to_array_limit_loose._(arr, i) || _unsupported_iterable_to_array._(arr, i) || _non_iterable_rest._(); +} +exports._ = _sliced_to_array_loose; diff --git a/node_modules/@swc/helpers/cjs/_super_prop_base.cjs b/node_modules/@swc/helpers/cjs/_super_prop_base.cjs new file mode 100644 index 0000000000000000000000000000000000000000..eaf3199a890b9c58b19beba04a337f8cb4b1e926 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_super_prop_base.cjs @@ -0,0 +1,13 @@ +"use strict"; + +var _get_prototype_of = require("./_get_prototype_of.cjs"); + +function _super_prop_base(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _get_prototype_of._(object); + if (object === null) break; + } + + return object; +} +exports._ = _super_prop_base; diff --git a/node_modules/@swc/helpers/cjs/_tagged_template_literal.cjs b/node_modules/@swc/helpers/cjs/_tagged_template_literal.cjs new file mode 100644 index 0000000000000000000000000000000000000000..89a579de132c358b3f2fd58a71a2b9ff5f3063b2 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_tagged_template_literal.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _tagged_template_literal(strings, raw) { + if (!raw) raw = strings.slice(0); + + return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); +} +exports._ = _tagged_template_literal; diff --git a/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs b/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs new file mode 100644 index 0000000000000000000000000000000000000000..48db14d47462231e12f26d9254d52cd192415f95 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_tagged_template_literal_loose.cjs @@ -0,0 +1,10 @@ +"use strict"; + +function _tagged_template_literal_loose(strings, raw) { + if (!raw) raw = strings.slice(0); + + strings.raw = raw; + + return strings; +} +exports._ = _tagged_template_literal_loose; diff --git a/node_modules/@swc/helpers/cjs/_throw.cjs b/node_modules/@swc/helpers/cjs/_throw.cjs new file mode 100644 index 0000000000000000000000000000000000000000..26f2e2ba018d0cf0f2cdb52c0b251bda9fcd3dbd --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_throw.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _throw(e) { + throw e; +} +exports._ = _throw; diff --git a/node_modules/@swc/helpers/cjs/_to_array.cjs b/node_modules/@swc/helpers/cjs/_to_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..0887dd4060760cab0714488c9b987da826b0b2bd --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_to_array.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _array_with_holes = require("./_array_with_holes.cjs"); +var _iterable_to_array = require("./_iterable_to_array.cjs"); +var _non_iterable_rest = require("./_non_iterable_rest.cjs"); +var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs"); + +function _to_array(arr) { + return _array_with_holes._(arr) || _iterable_to_array._(arr) || _unsupported_iterable_to_array._(arr) || _non_iterable_rest._(); +} +exports._ = _to_array; diff --git a/node_modules/@swc/helpers/cjs/_to_consumable_array.cjs b/node_modules/@swc/helpers/cjs/_to_consumable_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..85d19126b38d4ff60683b506f49575ccd8bbf113 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_to_consumable_array.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _array_without_holes = require("./_array_without_holes.cjs"); +var _iterable_to_array = require("./_iterable_to_array.cjs"); +var _non_iterable_spread = require("./_non_iterable_spread.cjs"); +var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs"); + +function _to_consumable_array(arr) { + return _array_without_holes._(arr) || _iterable_to_array._(arr) || _unsupported_iterable_to_array._(arr) || _non_iterable_spread._(); +} +exports._ = _to_consumable_array; diff --git a/node_modules/@swc/helpers/cjs/_to_primitive.cjs b/node_modules/@swc/helpers/cjs/_to_primitive.cjs new file mode 100644 index 0000000000000000000000000000000000000000..da357948eb267720dd80b6bc6fc421bcfe83efe3 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_to_primitive.cjs @@ -0,0 +1,18 @@ +"use strict"; + +var _type_of = require("./_type_of.cjs"); + +function _to_primitive(input, hint) { + if (_type_of._(input) !== "object" || input === null) return input; + + var prim = input[Symbol.toPrimitive]; + + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (_type_of._(res) !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} +exports._ = _to_primitive; diff --git a/node_modules/@swc/helpers/cjs/_to_property_key.cjs b/node_modules/@swc/helpers/cjs/_to_property_key.cjs new file mode 100644 index 0000000000000000000000000000000000000000..86075ac1fe36b44caa437f7d25b2db9abad1b88c --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_to_property_key.cjs @@ -0,0 +1,11 @@ +"use strict"; + +var _to_primitive = require("./_to_primitive.cjs"); +var _type_of = require("./_type_of.cjs"); + +function _to_property_key(arg) { + var key = _to_primitive._(arg, "string"); + + return _type_of._(key) === "symbol" ? key : String(key); +} +exports._ = _to_property_key; diff --git a/node_modules/@swc/helpers/cjs/_ts_add_disposable_resource.cjs b/node_modules/@swc/helpers/cjs/_ts_add_disposable_resource.cjs new file mode 100644 index 0000000000000000000000000000000000000000..24848ca7cfea22633ec3539b67fb3d20390b7580 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_ts_add_disposable_resource.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__addDisposableResource; diff --git a/node_modules/@swc/helpers/cjs/_ts_decorate.cjs b/node_modules/@swc/helpers/cjs/_ts_decorate.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9abfbda567683316b489f3bee0e549f0d36ba0e1 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_ts_decorate.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__decorate; diff --git a/node_modules/@swc/helpers/cjs/_ts_dispose_resources.cjs b/node_modules/@swc/helpers/cjs/_ts_dispose_resources.cjs new file mode 100644 index 0000000000000000000000000000000000000000..4ad32f10d3b66719e8f0045b5d71ce7cacb07ee9 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_ts_dispose_resources.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__disposeResources; diff --git a/node_modules/@swc/helpers/cjs/_ts_generator.cjs b/node_modules/@swc/helpers/cjs/_ts_generator.cjs new file mode 100644 index 0000000000000000000000000000000000000000..ee376ab63783489a2d4626a55b8718a641171b9c --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_ts_generator.cjs @@ -0,0 +1,31 @@ +"use strict"; + +function _ts_generator(thisArg, body) { + var f, y, t, _ = { label: 0, sent: function () { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty; + return d(g, "next", { value: verb(0) }), d(g, "throw", { value: verb(1) }), d(g, "return", { value: verb(2) }), typeof Symbol === "function" && d(g, Symbol.iterator, { value: function () { return this; } }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +exports._ = _ts_generator; diff --git a/node_modules/@swc/helpers/cjs/_ts_metadata.cjs b/node_modules/@swc/helpers/cjs/_ts_metadata.cjs new file mode 100644 index 0000000000000000000000000000000000000000..d39e6e4142f75e71b49cac326ed3b56d042f8653 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_ts_metadata.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__metadata; diff --git a/node_modules/@swc/helpers/cjs/_ts_param.cjs b/node_modules/@swc/helpers/cjs/_ts_param.cjs new file mode 100644 index 0000000000000000000000000000000000000000..6e2dca6eb22386c3885055d133d141275b0290d4 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_ts_param.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__param; diff --git a/node_modules/@swc/helpers/cjs/_ts_rewrite_relative_import_extension.cjs b/node_modules/@swc/helpers/cjs/_ts_rewrite_relative_import_extension.cjs new file mode 100644 index 0000000000000000000000000000000000000000..ce42e88e323113ab1fb852c54428b105af5c8ae2 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_ts_rewrite_relative_import_extension.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__rewriteRelativeImportExtension; diff --git a/node_modules/@swc/helpers/cjs/_ts_values.cjs b/node_modules/@swc/helpers/cjs/_ts_values.cjs new file mode 100644 index 0000000000000000000000000000000000000000..0696a1f4c19ccc0e955f2ff1f7e935e0f7abc3ff --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_ts_values.cjs @@ -0,0 +1,3 @@ +"use strict"; + +exports._ = require("tslib").__values; diff --git a/node_modules/@swc/helpers/cjs/_type_of.cjs b/node_modules/@swc/helpers/cjs/_type_of.cjs new file mode 100644 index 0000000000000000000000000000000000000000..2749e8e747ac65d61b3c3f6c74a0f39eadf61d29 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_type_of.cjs @@ -0,0 +1,8 @@ +"use strict"; + +function _type_of(obj) { + "@swc/helpers - typeof"; + + return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; +} +exports._ = _type_of; diff --git a/node_modules/@swc/helpers/cjs/_unsupported_iterable_to_array.cjs b/node_modules/@swc/helpers/cjs/_unsupported_iterable_to_array.cjs new file mode 100644 index 0000000000000000000000000000000000000000..a1765e15272ba0e4ce695a8ed1c11bff0d69882c --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_unsupported_iterable_to_array.cjs @@ -0,0 +1,15 @@ +"use strict"; + +var _array_like_to_array = require("./_array_like_to_array.cjs"); + +function _unsupported_iterable_to_array(o, minLen) { + if (!o) return; + if (typeof o === "string") return _array_like_to_array._(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(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array._(o, minLen); +} +exports._ = _unsupported_iterable_to_array; diff --git a/node_modules/@swc/helpers/cjs/_update.cjs b/node_modules/@swc/helpers/cjs/_update.cjs new file mode 100644 index 0000000000000000000000000000000000000000..abb90f34e9ac6c366fba56351914941cec7ab440 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_update.cjs @@ -0,0 +1,16 @@ +"use strict"; + +var _get = require("./_get.cjs"); +var _set = require("./_set.cjs"); + +function _update(target, property, receiver, isStrict) { + return { + get _() { + return _get._(target, property, receiver); + }, + set _(value) { + _set._(target, property, value, receiver, isStrict); + } + }; +} +exports._ = _update; diff --git a/node_modules/@swc/helpers/cjs/_using.cjs b/node_modules/@swc/helpers/cjs/_using.cjs new file mode 100644 index 0000000000000000000000000000000000000000..903837e715d5e030bf36184d64da7db430667c1d --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_using.cjs @@ -0,0 +1,24 @@ +"use strict"; + +/* @minVersion 7.22.0 */ + +function _using(stack, value, isAwait) { + if (value === null || value === void 0) return value; + if (Object(value) !== value) { + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + } + // core-js-pure uses Symbol.for for polyfilling well-known symbols + if (isAwait) { + var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose === null || dispose === void 0) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ v: value, d: dispose, a: isAwait }); + return value; +} + +exports._ = _using; diff --git a/node_modules/@swc/helpers/cjs/_using_ctx.cjs b/node_modules/@swc/helpers/cjs/_using_ctx.cjs new file mode 100644 index 0000000000000000000000000000000000000000..9c8d3fb4756ef8a59f35c195bb1cbd569dcc41c1 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_using_ctx.cjs @@ -0,0 +1,75 @@ +"use strict"; + +function _using_ctx() { + var _disposeSuppressedError = typeof SuppressedError === "function" + // eslint-disable-next-line no-undef + ? SuppressedError + : (function(error, suppressed) { + var err = new Error(); + err.name = "SuppressedError"; + err.suppressed = suppressed; + err.error = error; + return err; + }), + empty = {}, + stack = []; + function using(isAwait, value) { + if (value != null) { + if (Object(value) !== value) { + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + } + // core-js-pure uses Symbol.for for polyfilling well-known symbols + if (isAwait) { + var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose == null) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ v: value, d: dispose, a: isAwait }); + } else if (isAwait) { + // provide the nullish `value` as `d` for minification gain + stack.push({ d: value, a: isAwait }); + } + return value; + } + return { + // error + e: empty, + // using + u: using.bind(null, false), + // await using + a: using.bind(null, true), + // dispose + d: function() { + var error = this.e; + + function next() { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + while ((resource = stack.pop())) { + try { + var resource, disposalResult = resource.d && resource.d.call(resource.v); + if (resource.a) { + return Promise.resolve(disposalResult).then(next, err); + } + } catch (e) { + return err(e); + } + } + if (error !== empty) throw error; + } + + function err(e) { + error = error !== empty ? new _disposeSuppressedError(e, error) : e; + + return next(); + } + + return next(); + } + }; +} + +exports._ = _using_ctx; diff --git a/node_modules/@swc/helpers/cjs/_wrap_async_generator.cjs b/node_modules/@swc/helpers/cjs/_wrap_async_generator.cjs new file mode 100644 index 0000000000000000000000000000000000000000..09adf255bb16cc5b98ded429e7bf649df8a45213 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_wrap_async_generator.cjs @@ -0,0 +1,10 @@ +"use strict"; + +var _async_generator = require("./_async_generator.cjs"); + +function _wrap_async_generator(fn) { + return function() { + return new _async_generator._(fn.apply(this, arguments)); + }; +} +exports._ = _wrap_async_generator; diff --git a/node_modules/@swc/helpers/cjs/_wrap_native_super.cjs b/node_modules/@swc/helpers/cjs/_wrap_native_super.cjs new file mode 100644 index 0000000000000000000000000000000000000000..6babaefdc47044ba97be92e16ac1b5b7828cc855 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_wrap_native_super.cjs @@ -0,0 +1,28 @@ +"use strict"; + +var _construct = require("./_construct.cjs"); +var _get_prototype_of = require("./_get_prototype_of.cjs"); +var _is_native_function = require("./_is_native_function.cjs"); +var _set_prototype_of = require("./_set_prototype_of.cjs"); + +function _wrap_native_super(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + exports._ = _wrap_native_super = function(Class) { + if (Class === null || !_is_native_function._(Class)) return Class; + if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function"); + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return _construct._(Class, arguments, _get_prototype_of._(this).constructor); + } + Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); + + return _set_prototype_of._(Wrapper, Class); + }; + + return _wrap_native_super(Class); +} +exports._ = _wrap_native_super; diff --git a/node_modules/@swc/helpers/cjs/_wrap_reg_exp.cjs b/node_modules/@swc/helpers/cjs/_wrap_reg_exp.cjs new file mode 100644 index 0000000000000000000000000000000000000000..75cd96e872c03cf6c3bf431c97c445e22168bf1f --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_wrap_reg_exp.cjs @@ -0,0 +1,84 @@ +"use strict"; + +var _inherits = require("./_inherits.cjs"); +var _set_prototype_of = require("./_set_prototype_of.cjs"); + +function _wrap_reg_exp(re, groups, source) { + exports._ = _wrap_reg_exp = function(re, groups, source) { + return new WrappedRegExp(re, undefined, groups, source); + }; + var _super = RegExp.prototype; + var _groups = new WeakMap(); + var _sources = new WeakMap(); + var _native_source = Object.getOwnPropertyDescriptor(_super, "source").get; + function WrappedRegExp(re, flags, groups, source) { + var _re = new RegExp(re, flags); + _groups.set(_re, groups || _groups.get(re)); + _sources.set(_re, source !== undefined ? source : _sources.get(re)); + return _set_prototype_of._(_re, WrappedRegExp.prototype); + } + _inherits._(WrappedRegExp, RegExp); + Object.defineProperty(WrappedRegExp.prototype, "source", { + configurable: true, + get: function() { + var source = _sources.get(this); + if (source !== undefined) { + try { + new RegExp(source, this.flags); + return source; + } catch (_) {} + } + return _native_source.call(this); + } + }); + WrappedRegExp.prototype.exec = function(str) { + var result = _super.exec.call(this, str); + if (result) { + result.groups = buildGroups(result, this); + var indices = result.indices; + if (indices) indices.groups = buildGroups(indices, this); + } + return result; + }; + WrappedRegExp.prototype[Symbol.replace] = function(str, substitution) { + if (typeof substitution === "string") { + var groups = _groups.get(this); + return _super[Symbol.replace].call( + this, + str, + substitution.replace(/\$<([^>]+)>/g, function(_, name) { + var group = groups ? groups[name] : undefined; + if (group === undefined) return ""; + return "$" + (Array.isArray(group) ? group.join("$") : group); + }) + ); + } + if (typeof substitution === "function") { + var _this = this; + return _super[Symbol.replace].call(this, str, function() { + var args = arguments; + if (typeof args[args.length - 1] !== "object") { + args = [].slice.call(args); + args.push(buildGroups(args, _this)); + } + return substitution.apply(this, args); + }); + } + return _super[Symbol.replace].call(this, str, substitution); + }; + function buildGroups(result, re) { + var g = _groups.get(re); + return Object.keys(g).reduce(function(groups, name) { + var i = g[name]; + if (typeof i === "number") groups[name] = result[i]; + else { + var k = 0; + while (result[i[k]] === undefined && k + 1 < i.length) k++; + groups[name] = result[i[k]]; + } + return groups; + }, Object.create(null)); + } + return _wrap_reg_exp.apply(this, arguments); +} +exports._ = _wrap_reg_exp; diff --git a/node_modules/@swc/helpers/cjs/_write_only_error.cjs b/node_modules/@swc/helpers/cjs/_write_only_error.cjs new file mode 100644 index 0000000000000000000000000000000000000000..799fc3a5851d975a4b5c42d8d61145597f63d476 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/_write_only_error.cjs @@ -0,0 +1,6 @@ +"use strict"; + +function _write_only_error(name) { + throw new TypeError("\"" + name + "\" is write-only"); +} +exports._ = _write_only_error; diff --git a/node_modules/@swc/helpers/cjs/index.cjs b/node_modules/@swc/helpers/cjs/index.cjs new file mode 100644 index 0000000000000000000000000000000000000000..f4dde29a7d50c9da75b5c2f28d20acfafbcf5db4 --- /dev/null +++ b/node_modules/@swc/helpers/cjs/index.cjs @@ -0,0 +1,439 @@ +"use strict"; + +/* This file is automatically generated and should not be manually edited. */ +/* To modify this file, please run the `npm run build` command instead. */ + +0 && (module.exports = { + /* @Annotate_start: the CommonJS named exports for ESM import in node */ + _apply_decorated_descriptor: null, + _apply_decs_2203_r: null, + _apply_decs_2311: null, + _array_like_to_array: null, + _array_with_holes: null, + _array_without_holes: null, + _assert_this_initialized: null, + _async_generator: null, + _async_generator_delegate: null, + _async_iterator: null, + _async_to_generator: null, + _await_async_generator: null, + _await_value: null, + _call_super: null, + _check_private_redeclaration: null, + _class_apply_descriptor_destructure: null, + _class_apply_descriptor_get: null, + _class_apply_descriptor_set: null, + _class_apply_descriptor_update: null, + _class_call_check: null, + _class_check_private_static_access: null, + _class_check_private_static_field_descriptor: null, + _class_extract_field_descriptor: null, + _class_name_tdz_error: null, + _class_private_field_destructure: null, + _class_private_field_get: null, + _class_private_field_init: null, + _class_private_field_loose_base: null, + _class_private_field_loose_key: null, + _class_private_field_set: null, + _class_private_field_update: null, + _class_private_method_get: null, + _class_private_method_init: null, + _class_private_method_set: null, + _class_static_private_field_destructure: null, + _class_static_private_field_spec_get: null, + _class_static_private_field_spec_set: null, + _class_static_private_field_update: null, + _class_static_private_method_get: null, + _construct: null, + _create_class: null, + _create_for_of_iterator_helper_loose: null, + _create_super: null, + _decorate: null, + _defaults: null, + _define_enumerable_properties: null, + _define_property: null, + _dispose: null, + _export_star: null, + _extends: null, + _get: null, + _get_prototype_of: null, + _identity: null, + _inherits: null, + _inherits_loose: null, + _initializer_define_property: null, + _initializer_warning_helper: null, + _instanceof: null, + _interop_require_default: null, + _interop_require_wildcard: null, + _is_native_function: null, + _is_native_reflect_construct: null, + _iterable_to_array: null, + _iterable_to_array_limit: null, + _iterable_to_array_limit_loose: null, + _jsx: null, + _new_arrow_check: null, + _non_iterable_rest: null, + _non_iterable_spread: null, + _object_destructuring_empty: null, + _object_spread: null, + _object_spread_props: null, + _object_without_properties: null, + _object_without_properties_loose: null, + _overload_yield: null, + _possible_constructor_return: null, + _read_only_error: null, + _set: null, + _set_prototype_of: null, + _skip_first_generator_next: null, + _sliced_to_array: null, + _sliced_to_array_loose: null, + _super_prop_base: null, + _tagged_template_literal: null, + _tagged_template_literal_loose: null, + _throw: null, + _to_array: null, + _to_consumable_array: null, + _to_primitive: null, + _to_property_key: null, + _ts_add_disposable_resource: null, + _ts_decorate: null, + _ts_dispose_resources: null, + _ts_generator: null, + _ts_metadata: null, + _ts_param: null, + _ts_rewrite_relative_import_extension: null, + _ts_values: null, + _type_of: null, + _unsupported_iterable_to_array: null, + _update: null, + _using: null, + _using_ctx: null, + _wrap_async_generator: null, + _wrap_native_super: null, + _wrap_reg_exp: null, + _write_only_error: null + /* @Annotate_end */ +}); +module.exports = { + get _apply_decorated_descriptor() { + return require("./_apply_decorated_descriptor.cjs")._; + }, + get _apply_decs_2203_r() { + return require("./_apply_decs_2203_r.cjs")._; + }, + get _apply_decs_2311() { + return require("./_apply_decs_2311.cjs")._; + }, + get _array_like_to_array() { + return require("./_array_like_to_array.cjs")._; + }, + get _array_with_holes() { + return require("./_array_with_holes.cjs")._; + }, + get _array_without_holes() { + return require("./_array_without_holes.cjs")._; + }, + get _assert_this_initialized() { + return require("./_assert_this_initialized.cjs")._; + }, + get _async_generator() { + return require("./_async_generator.cjs")._; + }, + get _async_generator_delegate() { + return require("./_async_generator_delegate.cjs")._; + }, + get _async_iterator() { + return require("./_async_iterator.cjs")._; + }, + get _async_to_generator() { + return require("./_async_to_generator.cjs")._; + }, + get _await_async_generator() { + return require("./_await_async_generator.cjs")._; + }, + get _await_value() { + return require("./_await_value.cjs")._; + }, + get _call_super() { + return require("./_call_super.cjs")._; + }, + get _check_private_redeclaration() { + return require("./_check_private_redeclaration.cjs")._; + }, + get _class_apply_descriptor_destructure() { + return require("./_class_apply_descriptor_destructure.cjs")._; + }, + get _class_apply_descriptor_get() { + return require("./_class_apply_descriptor_get.cjs")._; + }, + get _class_apply_descriptor_set() { + return require("./_class_apply_descriptor_set.cjs")._; + }, + get _class_apply_descriptor_update() { + return require("./_class_apply_descriptor_update.cjs")._; + }, + get _class_call_check() { + return require("./_class_call_check.cjs")._; + }, + get _class_check_private_static_access() { + return require("./_class_check_private_static_access.cjs")._; + }, + get _class_check_private_static_field_descriptor() { + return require("./_class_check_private_static_field_descriptor.cjs")._; + }, + get _class_extract_field_descriptor() { + return require("./_class_extract_field_descriptor.cjs")._; + }, + get _class_name_tdz_error() { + return require("./_class_name_tdz_error.cjs")._; + }, + get _class_private_field_destructure() { + return require("./_class_private_field_destructure.cjs")._; + }, + get _class_private_field_get() { + return require("./_class_private_field_get.cjs")._; + }, + get _class_private_field_init() { + return require("./_class_private_field_init.cjs")._; + }, + get _class_private_field_loose_base() { + return require("./_class_private_field_loose_base.cjs")._; + }, + get _class_private_field_loose_key() { + return require("./_class_private_field_loose_key.cjs")._; + }, + get _class_private_field_set() { + return require("./_class_private_field_set.cjs")._; + }, + get _class_private_field_update() { + return require("./_class_private_field_update.cjs")._; + }, + get _class_private_method_get() { + return require("./_class_private_method_get.cjs")._; + }, + get _class_private_method_init() { + return require("./_class_private_method_init.cjs")._; + }, + get _class_private_method_set() { + return require("./_class_private_method_set.cjs")._; + }, + get _class_static_private_field_destructure() { + return require("./_class_static_private_field_destructure.cjs")._; + }, + get _class_static_private_field_spec_get() { + return require("./_class_static_private_field_spec_get.cjs")._; + }, + get _class_static_private_field_spec_set() { + return require("./_class_static_private_field_spec_set.cjs")._; + }, + get _class_static_private_field_update() { + return require("./_class_static_private_field_update.cjs")._; + }, + get _class_static_private_method_get() { + return require("./_class_static_private_method_get.cjs")._; + }, + get _construct() { + return require("./_construct.cjs")._; + }, + get _create_class() { + return require("./_create_class.cjs")._; + }, + get _create_for_of_iterator_helper_loose() { + return require("./_create_for_of_iterator_helper_loose.cjs")._; + }, + get _create_super() { + return require("./_create_super.cjs")._; + }, + get _decorate() { + return require("./_decorate.cjs")._; + }, + get _defaults() { + return require("./_defaults.cjs")._; + }, + get _define_enumerable_properties() { + return require("./_define_enumerable_properties.cjs")._; + }, + get _define_property() { + return require("./_define_property.cjs")._; + }, + get _dispose() { + return require("./_dispose.cjs")._; + }, + get _export_star() { + return require("./_export_star.cjs")._; + }, + get _extends() { + return require("./_extends.cjs")._; + }, + get _get() { + return require("./_get.cjs")._; + }, + get _get_prototype_of() { + return require("./_get_prototype_of.cjs")._; + }, + get _identity() { + return require("./_identity.cjs")._; + }, + get _inherits() { + return require("./_inherits.cjs")._; + }, + get _inherits_loose() { + return require("./_inherits_loose.cjs")._; + }, + get _initializer_define_property() { + return require("./_initializer_define_property.cjs")._; + }, + get _initializer_warning_helper() { + return require("./_initializer_warning_helper.cjs")._; + }, + get _instanceof() { + return require("./_instanceof.cjs")._; + }, + get _interop_require_default() { + return require("./_interop_require_default.cjs")._; + }, + get _interop_require_wildcard() { + return require("./_interop_require_wildcard.cjs")._; + }, + get _is_native_function() { + return require("./_is_native_function.cjs")._; + }, + get _is_native_reflect_construct() { + return require("./_is_native_reflect_construct.cjs")._; + }, + get _iterable_to_array() { + return require("./_iterable_to_array.cjs")._; + }, + get _iterable_to_array_limit() { + return require("./_iterable_to_array_limit.cjs")._; + }, + get _iterable_to_array_limit_loose() { + return require("./_iterable_to_array_limit_loose.cjs")._; + }, + get _jsx() { + return require("./_jsx.cjs")._; + }, + get _new_arrow_check() { + return require("./_new_arrow_check.cjs")._; + }, + get _non_iterable_rest() { + return require("./_non_iterable_rest.cjs")._; + }, + get _non_iterable_spread() { + return require("./_non_iterable_spread.cjs")._; + }, + get _object_destructuring_empty() { + return require("./_object_destructuring_empty.cjs")._; + }, + get _object_spread() { + return require("./_object_spread.cjs")._; + }, + get _object_spread_props() { + return require("./_object_spread_props.cjs")._; + }, + get _object_without_properties() { + return require("./_object_without_properties.cjs")._; + }, + get _object_without_properties_loose() { + return require("./_object_without_properties_loose.cjs")._; + }, + get _overload_yield() { + return require("./_overload_yield.cjs")._; + }, + get _possible_constructor_return() { + return require("./_possible_constructor_return.cjs")._; + }, + get _read_only_error() { + return require("./_read_only_error.cjs")._; + }, + get _set() { + return require("./_set.cjs")._; + }, + get _set_prototype_of() { + return require("./_set_prototype_of.cjs")._; + }, + get _skip_first_generator_next() { + return require("./_skip_first_generator_next.cjs")._; + }, + get _sliced_to_array() { + return require("./_sliced_to_array.cjs")._; + }, + get _sliced_to_array_loose() { + return require("./_sliced_to_array_loose.cjs")._; + }, + get _super_prop_base() { + return require("./_super_prop_base.cjs")._; + }, + get _tagged_template_literal() { + return require("./_tagged_template_literal.cjs")._; + }, + get _tagged_template_literal_loose() { + return require("./_tagged_template_literal_loose.cjs")._; + }, + get _throw() { + return require("./_throw.cjs")._; + }, + get _to_array() { + return require("./_to_array.cjs")._; + }, + get _to_consumable_array() { + return require("./_to_consumable_array.cjs")._; + }, + get _to_primitive() { + return require("./_to_primitive.cjs")._; + }, + get _to_property_key() { + return require("./_to_property_key.cjs")._; + }, + get _ts_add_disposable_resource() { + return require("./_ts_add_disposable_resource.cjs")._; + }, + get _ts_decorate() { + return require("./_ts_decorate.cjs")._; + }, + get _ts_dispose_resources() { + return require("./_ts_dispose_resources.cjs")._; + }, + get _ts_generator() { + return require("./_ts_generator.cjs")._; + }, + get _ts_metadata() { + return require("./_ts_metadata.cjs")._; + }, + get _ts_param() { + return require("./_ts_param.cjs")._; + }, + get _ts_rewrite_relative_import_extension() { + return require("./_ts_rewrite_relative_import_extension.cjs")._; + }, + get _ts_values() { + return require("./_ts_values.cjs")._; + }, + get _type_of() { + return require("./_type_of.cjs")._; + }, + get _unsupported_iterable_to_array() { + return require("./_unsupported_iterable_to_array.cjs")._; + }, + get _update() { + return require("./_update.cjs")._; + }, + get _using() { + return require("./_using.cjs")._; + }, + get _using_ctx() { + return require("./_using_ctx.cjs")._; + }, + get _wrap_async_generator() { + return require("./_wrap_async_generator.cjs")._; + }, + get _wrap_native_super() { + return require("./_wrap_native_super.cjs")._; + }, + get _wrap_reg_exp() { + return require("./_wrap_reg_exp.cjs")._; + }, + get _write_only_error() { + return require("./_write_only_error.cjs")._; + } +}; diff --git a/node_modules/@swc/helpers/esm/_apply_decorated_descriptor.js b/node_modules/@swc/helpers/esm/_apply_decorated_descriptor.js new file mode 100644 index 0000000000000000000000000000000000000000..671db1fb9df3808f32f44503c358c08a304eecfc --- /dev/null +++ b/node_modules/@swc/helpers/esm/_apply_decorated_descriptor.js @@ -0,0 +1,33 @@ +function _apply_decorated_descriptor(target, property, decorators, descriptor, context) { + var desc = {}; + + Object["ke" + "ys"](descriptor).forEach(function(key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ("value" in desc || desc.initializer) desc.writable = true; + desc = decorators.slice().reverse().reduce(function(desc, decorator) { + return decorator ? decorator(target, property, desc) || desc : desc; + }, desc); + + var hasAccessor = Object.prototype.hasOwnProperty.call(desc, "get") || Object.prototype.hasOwnProperty.call(desc, "set"); + + if (context && desc.initializer !== void 0 && !hasAccessor) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + if (hasAccessor) { + delete desc.writable; + delete desc.initializer; + delete desc.value; + } + if (desc.initializer === void 0) { + Object["define" + "Property"](target, property, desc); + desc = null; + } + + return desc; +} +export { _apply_decorated_descriptor as _ }; diff --git a/node_modules/@swc/helpers/esm/_apply_decs_2203_r.js b/node_modules/@swc/helpers/esm/_apply_decs_2203_r.js new file mode 100644 index 0000000000000000000000000000000000000000..6b64002ae3d8534ab509e43dbb576ea4f6ce2213 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_apply_decs_2203_r.js @@ -0,0 +1,572 @@ +/* @minVersion 7.20.0 */ + +/** + Enums are used in this file, but not assigned to vars to avoid non-hoistable values + + CONSTRUCTOR = 0; + PUBLIC = 1; + PRIVATE = 2; + + FIELD = 0; + ACCESSOR = 1; + METHOD = 2; + GETTER = 3; + SETTER = 4; + + STATIC = 5; + + CLASS = 10; // only used in assertValidReturnValue +*/ + +function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) { + function createAddInitializerMethod(initializers, decoratorFinishedRef) { + return function addInitializer(initializer) { + assertNotFinished(decoratorFinishedRef, "addInitializer"); + assertCallable(initializer, "An initializer"); + initializers.push(initializer); + }; + } + + function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) { + var kindStr; + + switch (kind) { + case 1 /* ACCESSOR */: + kindStr = "accessor"; + break; + case 2 /* METHOD */: + kindStr = "method"; + break; + case 3 /* GETTER */: + kindStr = "getter"; + break; + case 4 /* SETTER */: + kindStr = "setter"; + break; + default: + kindStr = "field"; + } + + var ctx = { kind: kindStr, name: isPrivate ? "#" + name : name, static: isStatic, private: isPrivate, metadata: metadata }; + + var decoratorFinishedRef = { v: false }; + + ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef); + + var get, set; + if (kind === 0 /* FIELD */) { + if (isPrivate) { + get = desc.get; + set = desc.set; + } else { + get = function() { + return this[name]; + }; + set = function(v) { + this[name] = v; + }; + } + } else if (kind === 2 /* METHOD */) { + get = function() { + return desc.value; + }; + } else { + // replace with values that will go through the final getter and setter + if (kind === 1 /* ACCESSOR */ || kind === 3 /* GETTER */) { + get = function() { + return desc.get.call(this); + }; + } + + if (kind === 1 /* ACCESSOR */ || kind === 4 /* SETTER */) { + set = function(v) { + desc.set.call(this, v); + }; + } + } + + if (get) { + var originalGet = get; + get = function(target) { + if (arguments.length === 0) { + target = this; + } + return originalGet.call(target); + }; + } + + if (set) { + var originalSet = set; + set = function(target, value) { + if (arguments.length === 1) { + value = target; + target = this; + } + return originalSet.call(target, value); + }; + } + + if (isPrivate) { + ctx.access = get && set ? { get: get, set: set } : get ? { get: get } : { set: set }; + } else { + var has = function(target) { + return name in target; + }; + ctx.access = get && set ? { has: has, get: get, set: set } : get ? { has: has, get: get } : { has: has, set: set }; + } + + var newValue = dec(value, ctx); + decoratorFinishedRef.v = true; + return newValue; + } + + function assertNotFinished(decoratorFinishedRef, fnName) { + if (decoratorFinishedRef.v) { + throw new Error("attempted to call " + fnName + " after decoration was finished"); + } + } + + function assertCallable(fn, hint) { + if (typeof fn !== "function") { + throw new TypeError(hint + " must be a function"); + } + } + + function assertValidReturnValue(kind, value) { + var type = typeof value; + + if (kind === 1 /* ACCESSOR */) { + if (type !== "object" || value === null) { + throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); + } + if (value.get !== undefined) { + assertCallable(value.get, "accessor.get"); + } + if (value.set !== undefined) { + assertCallable(value.set, "accessor.set"); + } + if (value.init !== undefined) { + assertCallable(value.init, "accessor.init"); + } + } else if (type !== "function") { + var hint; + if (kind === 0 /* FIELD */) { + hint = "field"; + } else if (kind === 10 /* CLASS */) { + hint = "class"; + } else { + hint = "method"; + } + throw new TypeError(hint + " decorators must return a function or void 0"); + } + } + + function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) { + var decs = decInfo[0]; + + var desc, init, value; + + if (isPrivate) { + if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) { + desc = { get: decInfo[3], set: decInfo[4] }; + } else if (kind === 3 /* GETTER */) { + desc = { get: decInfo[3] }; + } else if (kind === 4 /* SETTER */) { + desc = { set: decInfo[3] }; + } else { + desc = { value: decInfo[3] }; + } + } else if (kind !== 0 /* FIELD */) { + desc = Object.getOwnPropertyDescriptor(base, name); + } + + if (kind === 1 /* ACCESSOR */) { + value = { get: desc.get, set: desc.set }; + } else if (kind === 2 /* METHOD */) { + value = desc.value; + } else if (kind === 3 /* GETTER */) { + value = desc.get; + } else if (kind === 4 /* SETTER */) { + value = desc.set; + } + + var newValue, get, set; + + if (typeof decs === "function") { + newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value); + + if (newValue !== void 0) { + assertValidReturnValue(kind, newValue); + + if (kind === 0 /* FIELD */) { + init = newValue; + } else if (kind === 1 /* ACCESSOR */) { + init = newValue.init; + get = newValue.get || value.get; + set = newValue.set || value.set; + + value = { get: get, set: set }; + } else { + value = newValue; + } + } + } else { + for (var i = decs.length - 1; i >= 0; i--) { + var dec = decs[i]; + + newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value); + + if (newValue !== void 0) { + assertValidReturnValue(kind, newValue); + var newInit; + + if (kind === 0 /* FIELD */) { + newInit = newValue; + } else if (kind === 1 /* ACCESSOR */) { + newInit = newValue.init; + get = newValue.get || value.get; + set = newValue.set || value.set; + + value = { get: get, set: set }; + } else { + value = newValue; + } + + if (newInit !== void 0) { + if (init === void 0) { + init = newInit; + } else if (typeof init === "function") { + init = [init, newInit]; + } else { + init.push(newInit); + } + } + } + } + } + + if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) { + if (init === void 0) { + // If the initializer was void 0, sub in a dummy initializer + init = function(instance, init) { + return init; + }; + } else if (typeof init !== "function") { + var ownInitializers = init; + + init = function(instance, init) { + var value = init; + + for (var i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); + + return value; + }; + } else { + var originalInitializer = init; + + init = function(instance, init) { + return originalInitializer.call(instance, init); + }; + } + + ret.push(init); + } + + if (kind !== 0 /* FIELD */) { + if (kind === 1 /* ACCESSOR */) { + desc.get = value.get; + desc.set = value.set; + } else if (kind === 2 /* METHOD */) { + desc.value = value; + } else if (kind === 3 /* GETTER */) { + desc.get = value; + } else if (kind === 4 /* SETTER */) { + desc.set = value; + } + + if (isPrivate) { + if (kind === 1 /* ACCESSOR */) { + ret.push(function(instance, args) { + return value.get.call(instance, args); + }); + ret.push(function(instance, args) { + return value.set.call(instance, args); + }); + } else if (kind === 2 /* METHOD */) { + ret.push(value); + } else { + ret.push(function(instance, args) { + return value.call(instance, args); + }); + } + } else { + Object.defineProperty(base, name, desc); + } + } + } + + function applyMemberDecs(Class, decInfos, metadata) { + var ret = []; + var protoInitializers; + var staticInitializers; + + var existingProtoNonFields = new Map(); + var existingStaticNonFields = new Map(); + + for (var i = 0; i < decInfos.length; i++) { + var decInfo = decInfos[i]; + + // skip computed property names + if (!Array.isArray(decInfo)) continue; + + var kind = decInfo[1]; + var name = decInfo[2]; + var isPrivate = decInfo.length > 3; + + var isStatic = kind >= 5; /* STATIC */ + var base; + var initializers; + + if (isStatic) { + base = Class; + kind = kind - 5 /* STATIC */; + // initialize staticInitializers when we see a non-field static member + staticInitializers = staticInitializers || []; + initializers = staticInitializers; + } else { + base = Class.prototype; + // initialize protoInitializers when we see a non-field member + protoInitializers = protoInitializers || []; + initializers = protoInitializers; + } + + if (kind !== 0 /* FIELD */ && !isPrivate) { + var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields; + + var existingKind = existingNonFields.get(name) || 0; + + if (existingKind === true || (existingKind === 3 /* GETTER */ && kind !== 4) /* SETTER */ || (existingKind === 4 /* SETTER */ && kind !== 3) /* GETTER */) { + throw new Error( + "Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + + name + ); + } else if (!existingKind && kind > 2 /* METHOD */) { + existingNonFields.set(name, kind); + } else { + existingNonFields.set(name, true); + } + } + + applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata); + } + + pushInitializers(ret, protoInitializers); + pushInitializers(ret, staticInitializers); + return ret; + } + + function pushInitializers(ret, initializers) { + if (initializers) { + ret.push(function(instance) { + for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); + return instance; + }); + } + } + + function applyClassDecs(targetClass, classDecs, metadata) { + if (classDecs.length > 0) { + var initializers = []; + var newClass = targetClass; + var name = targetClass.name; + + for (var i = classDecs.length - 1; i >= 0; i--) { + var decoratorFinishedRef = { v: false }; + + var nextNewClass = classDecs[i](newClass, { kind: "class", name: name, addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef), metadata }); + decoratorFinishedRef.v = true; + + if (nextNewClass !== undefined) { + assertValidReturnValue(10, /* CLASS */ nextNewClass); + newClass = nextNewClass; + } + } + + return [defineMetadata(newClass, metadata), function() { + for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); + }]; + } + // The transformer will not emit assignment when there are no class decorators, + // so we don't have to return an empty array here. + } + + function defineMetadata(Class, metadata) { + return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: true, enumerable: true, value: metadata }); + } + + /** + Basic usage: + + applyDecs( + Class, + [ + // member decorators + [ + dec, // dec or array of decs + 0, // kind of value being decorated + 'prop', // name of public prop on class containing the value being decorated, + '#p', // the name of the private property (if is private, void 0 otherwise), + ] + ], + [ + // class decorators + dec1, dec2 + ] + ) + ``` + + Fully transpiled example: + + ```js + @dec + class Class { + @dec + a = 123; + + @dec + #a = 123; + + @dec + @dec2 + accessor b = 123; + + @dec + accessor #b = 123; + + @dec + c() { console.log('c'); } + + @dec + #c() { console.log('privC'); } + + @dec + get d() { console.log('d'); } + + @dec + get #d() { console.log('privD'); } + + @dec + set e(v) { console.log('e'); } + + @dec + set #e(v) { console.log('privE'); } + } + + + // becomes + let initializeInstance; + let initializeClass; + + let initA; + let initPrivA; + + let initB; + let initPrivB, getPrivB, setPrivB; + + let privC; + let privD; + let privE; + + let Class; + class _Class { + static { + let ret = applyDecs( + this, + [ + [dec, 0, 'a'], + [dec, 0, 'a', (i) => i.#a, (i, v) => i.#a = v], + [[dec, dec2], 1, 'b'], + [dec, 1, 'b', (i) => i.#privBData, (i, v) => i.#privBData = v], + [dec, 2, 'c'], + [dec, 2, 'c', () => console.log('privC')], + [dec, 3, 'd'], + [dec, 3, 'd', () => console.log('privD')], + [dec, 4, 'e'], + [dec, 4, 'e', () => console.log('privE')], + ], + [ + dec + ] + ) + + initA = ret[0]; + + initPrivA = ret[1]; + + initB = ret[2]; + + initPrivB = ret[3]; + getPrivB = ret[4]; + setPrivB = ret[5]; + + privC = ret[6]; + + privD = ret[7]; + + privE = ret[8]; + + initializeInstance = ret[9]; + + Class = ret[10] + + initializeClass = ret[11]; + } + + a = (initializeInstance(this), initA(this, 123)); + + #a = initPrivA(this, 123); + + #bData = initB(this, 123); + get b() { return this.#bData } + set b(v) { this.#bData = v } + + #privBData = initPrivB(this, 123); + get #b() { return getPrivB(this); } + set #b(v) { setPrivB(this, v); } + + c() { console.log('c'); } + + #c(...args) { return privC(this, ...args) } + + get d() { console.log('d'); } + + get #d() { return privD(this); } + + set e(v) { console.log('e'); } + + set #e(v) { privE(this, v); } + } + + initializeClass(Class); + */ + + _apply_decs_2203_r = function(targetClass, memberDecs, classDecs, parentClass) { + if (parentClass !== void 0) { + var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")]; + } + var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata); + var e = applyMemberDecs(targetClass, memberDecs, metadata); + if (!classDecs.length) defineMetadata(targetClass, metadata); + return { + e: e, + // Lazily apply class decorations so that member init locals can be properly bound. + get c() { + return applyClassDecs(targetClass, classDecs, metadata); + } + }; + }; + + return _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass); +} + +export { _apply_decs_2203_r as _ }; diff --git a/node_modules/@swc/helpers/esm/_apply_decs_2311.js b/node_modules/@swc/helpers/esm/_apply_decs_2311.js new file mode 100644 index 0000000000000000000000000000000000000000..d1b0c80943cef54d68945c08f94dd47c4e6b9fe7 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_apply_decs_2311.js @@ -0,0 +1,344 @@ +/* @minVersion 7.24.0 */ + +function toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) { + return input; + } + + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") { + return res; + } + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} + +function toPropertyKey(arg) { + var key = toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); +} + +function checkInRHS(value) { + if (Object(value) !== value) { + throw TypeError("right-hand side of 'in' should be an object, got " + (value !== null ? typeof value : "null")); + } + + return value; +} + +function setFunctionName(fn, name, prefix) { + if (typeof name === "symbol") { + name = name.description; + name = name ? "[" + name + "]" : ""; + } + + try { + Object.defineProperty(fn, "name", { configurable: true, value: prefix ? prefix + " " + name : name }); + } catch (_) {} + + return fn; +} + +/** + kind bit layout + + FIELD = 0 + ACCESSOR = 1 + METHOD = 2 + GETTER = 3 + SETTER = 4 + CLASS = 5 + + STATIC = 8 + DECORATORS_HAVE_THIS = 16 +*/ +function _apply_decs_2311(targetClass, classDecs, memberDecs, classDecsHaveThis, instanceBrand, parentClass) { + var symbolMetadata = Symbol.metadata || Symbol.for("Symbol.metadata"); + var defineProperty = Object.defineProperty; + var create = Object.create; + var metadata; + var existingNonFields = [create(null), create(null)]; + var hasClassDecs = classDecs.length; + var _; + + function createRunInitializers(initializers, useStaticThis, hasValue) { + return function(thisArg, value) { + if (useStaticThis) { + value = thisArg; + thisArg = targetClass; + } + + for (var i = 0; i < initializers.length; i++) value = initializers[i].apply(thisArg, hasValue ? [value] : []); + + return hasValue ? value : thisArg; + }; + } + + function assertCallable(fn, hint1, hint2, throwUndefined) { + if (typeof fn !== "function") { + if (throwUndefined || fn !== void 0) { + throw new TypeError(hint1 + " must " + (hint2 || "be") + " a function" + (throwUndefined ? "" : " or undefined")); + } + } + + return fn; + } + + function applyDec(Class, decInfo, decoratorsHaveThis, name, kind, initializers, ret, isStatic, isPrivate, isField, hasPrivateBrand) { + function assertInstanceIfPrivate(target) { + if (!hasPrivateBrand(target)) { + throw new TypeError("Attempted to access private element on non-instance"); + } + } + + var decs = [].concat(decInfo[0]); + var decVal = decInfo[3]; + var isClass = !ret; + + var isAccessor = kind === 1; + var isGetter = kind === 3; + var isSetter = kind === 4; + var isMethod = kind === 2; + + function bindPropCall(name, useStaticThis, before) { + return function(_this, value) { + if (useStaticThis) { + value = _this; + _this = Class; + } + + if (before) { + before(_this); + } + + return desc[name].call(_this, value); + }; + } + + var desc = {}; + var init = []; + var key = isGetter ? "get" : isSetter || isAccessor ? "set" : "value"; + + if (!isClass) { + if (isPrivate) { + if (isField || isAccessor) { + desc = { + get: setFunctionName( + function() { + return decVal(this); + }, + name, + "get" + ), + set: function(value) { + decInfo[4](this, value); + } + }; + } else { + desc[key] = decVal; + } + + if (!isField) { + setFunctionName(desc[key], name, isMethod ? "" : key); + } + } else if (!isField) { + desc = Object.getOwnPropertyDescriptor(Class, name); + } + + if (!isField && !isPrivate) { + _ = existingNonFields[+isStatic][name]; + if (_ && (_ ^ kind) !== 7) { + throw new Error("Decorating two elements with the same name (" + desc[key].name + ") is not supported yet"); + } + + existingNonFields[+isStatic][name] = kind < 3 ? 1 : kind; + } + } + + var newValue = Class; + + for (var i = decs.length - 1; i >= 0; i -= decoratorsHaveThis ? 2 : 1) { + var dec = assertCallable(decs[i], "A decorator", "be", true); + var decThis = decoratorsHaveThis ? decs[i - 1] : void 0; + + var decoratorFinishedRef = {}; + var ctx = { + kind: ["field", "accessor", "method", "getter", "setter", "class"][kind], + name: name, + metadata: metadata, + addInitializer: function(decoratorFinishedRef, initializer) { + if (decoratorFinishedRef.v) { + throw new TypeError("attempted to call addInitializer after decoration was finished"); + } + assertCallable(initializer, "An initializer", "be", true); + initializers.push(initializer); + } + .bind(null, decoratorFinishedRef) + }; + + if (isClass) { + _ = dec.call(decThis, newValue, ctx); + decoratorFinishedRef.v = 1; + + if (assertCallable(_, "class decorators", "return")) { + newValue = _; + } + continue; + } + + ctx.static = isStatic; + ctx.private = isPrivate; + _ = ctx.access = { + has: isPrivate ? hasPrivateBrand.bind() : function(target) { + return name in target; + } + }; + + if (!isSetter) { + _.get = isPrivate + ? isMethod + ? function(_this) { + assertInstanceIfPrivate(_this); + return desc.value; + } + : bindPropCall("get", 0, assertInstanceIfPrivate) + : function(target) { + return target[name]; + }; + } + + if (!isMethod && !isGetter) { + _.set = isPrivate ? bindPropCall("set", 0, assertInstanceIfPrivate) : function(target, value) { + target[name] = value; + }; + } + + newValue = dec.call(decThis, isAccessor ? { get: desc.get, set: desc.set } : desc[key], ctx); + + decoratorFinishedRef.v = 1; + + if (isAccessor) { + if (typeof newValue === "object" && newValue) { + if ((_ = assertCallable(newValue.get, "accessor.get"))) { + desc.get = _; + } + if ((_ = assertCallable(newValue.set, "accessor.set"))) { + desc.set = _; + } + if ((_ = assertCallable(newValue.init, "accessor.init"))) { + init.unshift(_); + } + } else if (newValue !== void 0) { + throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined"); + } + } else if (assertCallable(newValue, (isField ? "field" : "method") + " decorators", "return")) { + if (isField) { + init.unshift(newValue); + } else { + desc[key] = newValue; + } + } + } + + if (kind < 2) { + ret.push(createRunInitializers(init, isStatic, 1), createRunInitializers(initializers, isStatic, 0)); + } + + if (!isField && !isClass) { + if (isPrivate) { + if (isAccessor) { + ret.splice(-1, 0, bindPropCall("get", isStatic), bindPropCall("set", isStatic)); + } else { + ret.push(isMethod ? desc[key] : assertCallable.call.bind(desc[key])); + } + } else { + defineProperty(Class, name, desc); + } + } + + return newValue; + } + + function applyMemberDecs() { + var ret = []; + var protoInitializers; + var staticInitializers; + + var pushInitializers = function(initializers) { + if (initializers) { + ret.push(createRunInitializers(initializers)); + } + }; + + var applyMemberDecsOfKind = function(isStatic, isField) { + for (var i = 0; i < memberDecs.length; i++) { + var decInfo = memberDecs[i]; + var kind = decInfo[1]; + var kindOnly = kind & 7; + + if ((kind & 8) == isStatic && !kindOnly == isField) { + var name = decInfo[2]; + var isPrivate = !!decInfo[3]; + var decoratorsHaveThis = kind & 16; + + applyDec( + isStatic ? targetClass : targetClass.prototype, + decInfo, + decoratorsHaveThis, + isPrivate ? "#" + name : toPropertyKey(name), + kindOnly, + kindOnly < 2 ? [] : isStatic ? (staticInitializers = staticInitializers || []) : (protoInitializers = protoInitializers || []), + ret, + !!isStatic, + isPrivate, + isField, + isStatic && isPrivate + ? function(_) { + return checkInRHS(_) === targetClass; + } + : instanceBrand + ); + } + } + }; + + applyMemberDecsOfKind(8, 0); + applyMemberDecsOfKind(0, 0); + applyMemberDecsOfKind(8, 1); + applyMemberDecsOfKind(0, 1); + + pushInitializers(protoInitializers); + pushInitializers(staticInitializers); + + return ret; + } + + function defineMetadata(Class) { + return defineProperty(Class, symbolMetadata, { configurable: true, enumerable: true, value: metadata }); + } + + if (parentClass !== undefined) { + metadata = parentClass[symbolMetadata]; + } + metadata = create(metadata == null ? null : metadata); + + _ = applyMemberDecs(); + + if (!hasClassDecs) { + defineMetadata(targetClass); + } + + return { + e: _, + get c() { + var initializers = []; + return (hasClassDecs && [defineMetadata(targetClass = applyDec(targetClass, [classDecs], classDecsHaveThis, targetClass.name, 5, initializers)), createRunInitializers(initializers, 1)]); + } + }; +} + +export { _apply_decs_2311 as _ }; diff --git a/node_modules/@swc/helpers/esm/_array_like_to_array.js b/node_modules/@swc/helpers/esm/_array_like_to_array.js new file mode 100644 index 0000000000000000000000000000000000000000..eb80534d6f49d7f019cf76feb156c14f6079a643 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_array_like_to_array.js @@ -0,0 +1,8 @@ +function _array_like_to_array(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; +} +export { _array_like_to_array as _ }; diff --git a/node_modules/@swc/helpers/esm/_array_with_holes.js b/node_modules/@swc/helpers/esm/_array_with_holes.js new file mode 100644 index 0000000000000000000000000000000000000000..2532c929d0f531129c8597f08933cf00faad8ed7 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_array_with_holes.js @@ -0,0 +1,4 @@ +function _array_with_holes(arr) { + if (Array.isArray(arr)) return arr; +} +export { _array_with_holes as _ }; diff --git a/node_modules/@swc/helpers/esm/_array_without_holes.js b/node_modules/@swc/helpers/esm/_array_without_holes.js new file mode 100644 index 0000000000000000000000000000000000000000..cbdbc3222af81004fc0340df98436b9c2e360b76 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_array_without_holes.js @@ -0,0 +1,6 @@ +import { _ as _array_like_to_array } from "./_array_like_to_array.js"; + +function _array_without_holes(arr) { + if (Array.isArray(arr)) return _array_like_to_array(arr); +} +export { _array_without_holes as _ }; diff --git a/node_modules/@swc/helpers/esm/_assert_this_initialized.js b/node_modules/@swc/helpers/esm/_assert_this_initialized.js new file mode 100644 index 0000000000000000000000000000000000000000..0e2830a3ff96ffd43fc14ca94de2f688ddbe468a --- /dev/null +++ b/node_modules/@swc/helpers/esm/_assert_this_initialized.js @@ -0,0 +1,6 @@ +function _assert_this_initialized(self) { + if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + + return self; +} +export { _assert_this_initialized as _ }; diff --git a/node_modules/@swc/helpers/esm/_async_generator.js b/node_modules/@swc/helpers/esm/_async_generator.js new file mode 100644 index 0000000000000000000000000000000000000000..6e90a55fad67c35b8fb5750f4186ec2467b2313a --- /dev/null +++ b/node_modules/@swc/helpers/esm/_async_generator.js @@ -0,0 +1,74 @@ +import { _ as _overload_yield } from "./_overload_yield.js"; + +function _async_generator(gen) { + var front, back; + + function send(key, arg) { + return new Promise(function(resolve, reject) { + var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null }; + if (back) back = back.next = request; + else { + front = back = request; + resume(key, arg); + } + }); + } + + function resume(key, arg) { + try { + var result = gen[key](arg); + var value = result.value; + var overloaded = value instanceof _overload_yield; + Promise.resolve(overloaded ? value.v : value).then(function(arg) { + if (overloaded) { + var nextKey = key === "return" ? "return" : "next"; + if (!value.k || arg.done) return resume(nextKey, arg); + else arg = gen[nextKey](arg).value; + } + settle(result.done ? "return" : "normal", arg); + }, function(err) { + resume("throw", err); + }); + } catch (err) { + settle("throw", err); + } + } + + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ value: value, done: true }); + break; + case "throw": + front.reject(value); + break; + default: + front.resolve({ value: value, done: false }); + break; + } + front = front.next; + if (front) resume(front.key, front.arg); + else back = null; + } + + this._invoke = send; + + if (typeof gen.return !== "function") this.return = undefined; +} + +_async_generator.prototype[(typeof Symbol === "function" && Symbol.asyncIterator) || "@@asyncIterator"] = function() { + return this; +}; + +_async_generator.prototype.next = function(arg) { + return this._invoke("next", arg); +}; + +_async_generator.prototype.throw = function(arg) { + return this._invoke("throw", arg); +}; + +_async_generator.prototype.return = function(arg) { + return this._invoke("return", arg); +}; +export { _async_generator as _ }; diff --git a/node_modules/@swc/helpers/esm/_async_generator_delegate.js b/node_modules/@swc/helpers/esm/_async_generator_delegate.js new file mode 100644 index 0000000000000000000000000000000000000000..eb19f8821b7fe83fe4625eb09ad5a22476d2cc0b --- /dev/null +++ b/node_modules/@swc/helpers/esm/_async_generator_delegate.js @@ -0,0 +1,51 @@ +import { _ as _overload_yield } from "./_overload_yield.js"; + +function _async_generator_delegate(inner) { + var iter = {}, waiting = false; + + function pump(key, value) { + waiting = true; + value = new Promise(function(resolve) { + resolve(inner[key](value)); + }); + + return { done: false, value: new _overload_yield(value, /* kind: delegate */ 1) }; + } + + iter[(typeof Symbol !== "undefined" && Symbol.iterator) || "@@iterator"] = function() { + return this; + }; + + iter.next = function(value) { + if (waiting) { + waiting = false; + + return value; + } + + return pump("next", value); + }; + + if (typeof inner.throw === "function") { + iter.throw = function(value) { + if (waiting) { + waiting = false; + throw value; + } + + return pump("throw", value); + }; + } + if (typeof inner.return === "function") { + iter.return = function(value) { + if (waiting) { + waiting = false; + return value; + } + return pump("return", value); + }; + } + + return iter; +} +export { _async_generator_delegate as _ }; diff --git a/node_modules/@swc/helpers/esm/_async_iterator.js b/node_modules/@swc/helpers/esm/_async_iterator.js new file mode 100644 index 0000000000000000000000000000000000000000..b7ffe4cc732a210d45532432bacd1ea059747e38 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_async_iterator.js @@ -0,0 +1,44 @@ +function _async_iterator(iterable) { + var method, async, sync, retry = 2; + for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { + if (async && null != (method = iterable[async])) return method.call(iterable); + if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); + async = "@@asyncIterator", sync = "@@iterator"; + } + throw new TypeError("Object is not async iterable"); +} +function AsyncFromSyncIterator(s) { + function AsyncFromSyncIteratorContinuation(r) { + if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); + + var done = r.done; + + return Promise.resolve(r.value).then(function(value) { + return { value: value, done: done }; + }); + } + + return AsyncFromSyncIterator = function(s) { + this.s = s, this.n = s.next; + }, + AsyncFromSyncIterator.prototype = { + s: null, + n: null, + + next: function() { + return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); + }, + return: function(value) { + var ret = this.s.return; + + return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); + }, + throw: function(value) { + var thr = this.s.return; + + return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); + } + }, + new AsyncFromSyncIterator(s); +} +export { _async_iterator as _ }; diff --git a/node_modules/@swc/helpers/esm/_async_to_generator.js b/node_modules/@swc/helpers/esm/_async_to_generator.js new file mode 100644 index 0000000000000000000000000000000000000000..2fcf6ee883d12b1de673cc0b820939b50ae1b63f --- /dev/null +++ b/node_modules/@swc/helpers/esm/_async_to_generator.js @@ -0,0 +1,31 @@ +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) resolve(value); + else Promise.resolve(value).then(_next, _throw); +} +function _async_to_generator(fn) { + return function() { + var self = this, args = arguments; + + return new Promise(function(resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} +export { _async_to_generator as _ }; diff --git a/node_modules/@swc/helpers/esm/_await_async_generator.js b/node_modules/@swc/helpers/esm/_await_async_generator.js new file mode 100644 index 0000000000000000000000000000000000000000..b72716cbdadafab0951dd3aa6e3dc28752ef3603 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_await_async_generator.js @@ -0,0 +1,6 @@ +import { _ as _overload_yield } from "./_overload_yield.js"; + +function _await_async_generator(value) { + return new _overload_yield(value, /* kind: await */ 0); +} +export { _await_async_generator as _ }; diff --git a/node_modules/@swc/helpers/esm/_await_value.js b/node_modules/@swc/helpers/esm/_await_value.js new file mode 100644 index 0000000000000000000000000000000000000000..33a09128522c1a6e3958375eb204fa2d509cb5b0 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_await_value.js @@ -0,0 +1,4 @@ +function _await_value(value) { + this.wrapped = value; +} +export { _await_value as _ }; diff --git a/node_modules/@swc/helpers/esm/_call_super.js b/node_modules/@swc/helpers/esm/_call_super.js new file mode 100644 index 0000000000000000000000000000000000000000..f569d6270c36acfc3c708752dfc2a43dd042257c --- /dev/null +++ b/node_modules/@swc/helpers/esm/_call_super.js @@ -0,0 +1,17 @@ +import { _ as _get_prototype_of } from "./_get_prototype_of.js"; +import { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; +import { _ as _possible_constructor_return } from "./_possible_constructor_return.js"; + +function _call_super(_this, derived, args) { + // Super + derived = _get_prototype_of(derived); + return _possible_constructor_return( + _this, + _is_native_reflect_construct() + // NOTE: This doesn't work if this.__proto__.constructor has been modified. + ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) + : derived.apply(_this, args) + ); +} + +export { _call_super as _ }; diff --git a/node_modules/@swc/helpers/esm/_check_private_redeclaration.js b/node_modules/@swc/helpers/esm/_check_private_redeclaration.js new file mode 100644 index 0000000000000000000000000000000000000000..21e96da1a44c80b3a68c708b89cfb54f6e70122f --- /dev/null +++ b/node_modules/@swc/helpers/esm/_check_private_redeclaration.js @@ -0,0 +1,6 @@ +function _check_private_redeclaration(obj, privateCollection) { + if (privateCollection.has(obj)) { + throw new TypeError("Cannot initialize the same private elements twice on an object"); + } +} +export { _check_private_redeclaration as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_apply_descriptor_destructure.js b/node_modules/@swc/helpers/esm/_class_apply_descriptor_destructure.js new file mode 100644 index 0000000000000000000000000000000000000000..9bf79ee8b0d5dd7b54930c1f3ac55b81fa337aaa --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_apply_descriptor_destructure.js @@ -0,0 +1,23 @@ +function _class_apply_descriptor_destructure(receiver, descriptor) { + if (descriptor.set) { + if (!("__destrObj" in descriptor)) { + descriptor.__destrObj = { + set value(v) { + descriptor.set.call(receiver, v); + } + }; + } + + return descriptor.__destrObj; + } else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + + return descriptor; + } +} +export { _class_apply_descriptor_destructure as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js b/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js new file mode 100644 index 0000000000000000000000000000000000000000..15c6f2389719bcfc77bb03e6ce48e7839a4dee02 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.js @@ -0,0 +1,6 @@ +function _class_apply_descriptor_get(receiver, descriptor) { + if (descriptor.get) return descriptor.get.call(receiver); + + return descriptor.value; +} +export { _class_apply_descriptor_get as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js b/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js new file mode 100644 index 0000000000000000000000000000000000000000..75091e1053bb95059ef1f3d92d58212f36b2fdd2 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.js @@ -0,0 +1,13 @@ +function _class_apply_descriptor_set(receiver, descriptor, value) { + if (descriptor.set) descriptor.set.call(receiver, value); + else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + descriptor.value = value; + } +} +export { _class_apply_descriptor_set as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_apply_descriptor_update.js b/node_modules/@swc/helpers/esm/_class_apply_descriptor_update.js new file mode 100644 index 0000000000000000000000000000000000000000..adf62fb73c159d106abe7e855d1be0a2cc345ae2 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_apply_descriptor_update.js @@ -0,0 +1,28 @@ +function _class_apply_descriptor_update(receiver, descriptor) { + if (descriptor.set) { + if (!descriptor.get) throw new TypeError("attempted to read set only private field"); + + if (!("__destrWrapper" in descriptor)) { + descriptor.__destrWrapper = { + set value(v) { + descriptor.set.call(receiver, v); + }, + get value() { + return descriptor.get.call(receiver); + } + }; + } + + return descriptor.__destrWrapper; + } else { + if (!descriptor.writable) { + // This should only throw in strict mode, but class bodies are + // always strict and private fields can only be used inside + // class bodies. + throw new TypeError("attempted to set read only private field"); + } + + return descriptor; + } +} +export { _class_apply_descriptor_update as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_call_check.js b/node_modules/@swc/helpers/esm/_class_call_check.js new file mode 100644 index 0000000000000000000000000000000000000000..f0caf9e3178dde12cddc511c13537fe05afe682c --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_call_check.js @@ -0,0 +1,4 @@ +function _class_call_check(instance, Constructor) { + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); +} +export { _class_call_check as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_check_private_static_access.js b/node_modules/@swc/helpers/esm/_class_check_private_static_access.js new file mode 100644 index 0000000000000000000000000000000000000000..380f1d9bcba22a0b884f110a649cd30ec5068355 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_check_private_static_access.js @@ -0,0 +1,4 @@ +function _class_check_private_static_access(receiver, classConstructor) { + if (receiver !== classConstructor) throw new TypeError("Private static access of wrong provenance"); +} +export { _class_check_private_static_access as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_check_private_static_field_descriptor.js b/node_modules/@swc/helpers/esm/_class_check_private_static_field_descriptor.js new file mode 100644 index 0000000000000000000000000000000000000000..a6a0a7fd6ae7894ddf48adfb1a332d87c96e3e7f --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_check_private_static_field_descriptor.js @@ -0,0 +1,6 @@ +function _class_check_private_static_field_descriptor(descriptor, action) { + if (descriptor === undefined) { + throw new TypeError("attempted to " + action + " private static field before its declaration"); + } +} +export { _class_check_private_static_field_descriptor as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js b/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js new file mode 100644 index 0000000000000000000000000000000000000000..44ca9e7fbc38b787afb195a10f92092a82b5efef --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.js @@ -0,0 +1,6 @@ +function _class_extract_field_descriptor(receiver, privateMap, action) { + if (!privateMap.has(receiver)) throw new TypeError("attempted to " + action + " private field on non-instance"); + + return privateMap.get(receiver); +} +export { _class_extract_field_descriptor as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_name_tdz_error.js b/node_modules/@swc/helpers/esm/_class_name_tdz_error.js new file mode 100644 index 0000000000000000000000000000000000000000..7014c58d99d313ac658e29f3e90944610643fb70 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_name_tdz_error.js @@ -0,0 +1,4 @@ +function _class_name_tdz_error(name) { + throw new ReferenceError("Class \"" + name + "\" cannot be referenced in computed property keys."); +} +export { _class_name_tdz_error as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_private_field_destructure.js b/node_modules/@swc/helpers/esm/_class_private_field_destructure.js new file mode 100644 index 0000000000000000000000000000000000000000..5c624330fee0a0c5eb73240498ae78bc019523e0 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_private_field_destructure.js @@ -0,0 +1,8 @@ +import { _ as _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; +import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; + +function _class_private_field_destructure(receiver, privateMap) { + var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set"); + return _class_apply_descriptor_destructure(receiver, descriptor); +} +export { _class_private_field_destructure as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_private_field_get.js b/node_modules/@swc/helpers/esm/_class_private_field_get.js new file mode 100644 index 0000000000000000000000000000000000000000..078d320a5e9674865ae0e385200a989b3f297752 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_private_field_get.js @@ -0,0 +1,8 @@ +import { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; +import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; + +function _class_private_field_get(receiver, privateMap) { + var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get"); + return _class_apply_descriptor_get(receiver, descriptor); +} +export { _class_private_field_get as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_private_field_init.js b/node_modules/@swc/helpers/esm/_class_private_field_init.js new file mode 100644 index 0000000000000000000000000000000000000000..3daa81a52643636429ac74afdb25093a01ad2d54 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_private_field_init.js @@ -0,0 +1,7 @@ +import { _ as _check_private_redeclaration } from "./_check_private_redeclaration.js"; + +function _class_private_field_init(obj, privateMap, value) { + _check_private_redeclaration(obj, privateMap); + privateMap.set(obj, value); +} +export { _class_private_field_init as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_private_field_loose_base.js b/node_modules/@swc/helpers/esm/_class_private_field_loose_base.js new file mode 100644 index 0000000000000000000000000000000000000000..92f4c0729615b45bd27a074830eccf8d9f03ebbd --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_private_field_loose_base.js @@ -0,0 +1,8 @@ +function _class_private_field_loose_base(receiver, privateKey) { + if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { + throw new TypeError("attempted to use private field on non-instance"); + } + + return receiver; +} +export { _class_private_field_loose_base as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_private_field_loose_key.js b/node_modules/@swc/helpers/esm/_class_private_field_loose_key.js new file mode 100644 index 0000000000000000000000000000000000000000..83e89e7d6e92587fd8d4bf89cc0c1bb67352b6da --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_private_field_loose_key.js @@ -0,0 +1,6 @@ +var id = 0; + +function _class_private_field_loose_key(name) { + return "__private_" + id++ + "_" + name; +} +export { _class_private_field_loose_key as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_private_field_set.js b/node_modules/@swc/helpers/esm/_class_private_field_set.js new file mode 100644 index 0000000000000000000000000000000000000000..7640b8ea6be6db74c9e0c17cb72084dfef20eeb1 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_private_field_set.js @@ -0,0 +1,9 @@ +import { _ as _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; +import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; + +function _class_private_field_set(receiver, privateMap, value) { + var descriptor = _class_extract_field_descriptor(receiver, privateMap, "set"); + _class_apply_descriptor_set(receiver, descriptor, value); + return value; +} +export { _class_private_field_set as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_private_field_update.js b/node_modules/@swc/helpers/esm/_class_private_field_update.js new file mode 100644 index 0000000000000000000000000000000000000000..d758a17e42e3a1340569bf21cb594578c44f511c --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_private_field_update.js @@ -0,0 +1,8 @@ +import { _ as _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; +import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; + +function _class_private_field_update(receiver, privateMap) { + var descriptor = _class_extract_field_descriptor(receiver, privateMap, "update"); + return _class_apply_descriptor_update(receiver, descriptor); +} +export { _class_private_field_update as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_private_method_get.js b/node_modules/@swc/helpers/esm/_class_private_method_get.js new file mode 100644 index 0000000000000000000000000000000000000000..c9d6946fcb2ff4ab321eb95d057f8e4024994ba4 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_private_method_get.js @@ -0,0 +1,6 @@ +function _class_private_method_get(receiver, privateSet, fn) { + if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance"); + + return fn; +} +export { _class_private_method_get as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_private_method_init.js b/node_modules/@swc/helpers/esm/_class_private_method_init.js new file mode 100644 index 0000000000000000000000000000000000000000..f2f4eda710b9f4144d0f17a0e82a5bf3a81ef781 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_private_method_init.js @@ -0,0 +1,7 @@ +import { _ as _check_private_redeclaration } from "./_check_private_redeclaration.js"; + +function _class_private_method_init(obj, privateSet) { + _check_private_redeclaration(obj, privateSet); + privateSet.add(obj); +} +export { _class_private_method_init as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_private_method_set.js b/node_modules/@swc/helpers/esm/_class_private_method_set.js new file mode 100644 index 0000000000000000000000000000000000000000..98e3be1ca2b2c09f1326800f4fd601de8943607c --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_private_method_set.js @@ -0,0 +1,4 @@ +function _class_private_method_set() { + throw new TypeError("attempted to reassign private method"); +} +export { _class_private_method_set as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_static_private_field_destructure.js b/node_modules/@swc/helpers/esm/_class_static_private_field_destructure.js new file mode 100644 index 0000000000000000000000000000000000000000..1aea463503a55d7f47263ff213febb507f8d0cf8 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_static_private_field_destructure.js @@ -0,0 +1,11 @@ +import { _ as _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; +import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; +import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; + +function _class_static_private_field_destructure(receiver, classConstructor, descriptor) { + _class_check_private_static_access(receiver, classConstructor); + _class_check_private_static_field_descriptor(descriptor, "set"); + + return _class_apply_descriptor_destructure(receiver, descriptor); +} +export { _class_static_private_field_destructure as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_static_private_field_spec_get.js b/node_modules/@swc/helpers/esm/_class_static_private_field_spec_get.js new file mode 100644 index 0000000000000000000000000000000000000000..128476cbabad2619fd9214acb1a473a24ce49e1a --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_static_private_field_spec_get.js @@ -0,0 +1,11 @@ +import { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; +import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; +import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; + +function _class_static_private_field_spec_get(receiver, classConstructor, descriptor) { + _class_check_private_static_access(receiver, classConstructor); + _class_check_private_static_field_descriptor(descriptor, "get"); + + return _class_apply_descriptor_get(receiver, descriptor); +} +export { _class_static_private_field_spec_get as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_static_private_field_spec_set.js b/node_modules/@swc/helpers/esm/_class_static_private_field_spec_set.js new file mode 100644 index 0000000000000000000000000000000000000000..0137ff7f88dc4d07c7b4fe69b81cc68794e9beec --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_static_private_field_spec_set.js @@ -0,0 +1,12 @@ +import { _ as _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; +import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; +import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; + +function _class_static_private_field_spec_set(receiver, classConstructor, descriptor, value) { + _class_check_private_static_access(receiver, classConstructor); + _class_check_private_static_field_descriptor(descriptor, "set"); + _class_apply_descriptor_set(receiver, descriptor, value); + + return value; +} +export { _class_static_private_field_spec_set as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_static_private_field_update.js b/node_modules/@swc/helpers/esm/_class_static_private_field_update.js new file mode 100644 index 0000000000000000000000000000000000000000..d53d66aed9f9a252d55c368884c552e3ca0fbe7d --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_static_private_field_update.js @@ -0,0 +1,11 @@ +import { _ as _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; +import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; +import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; + +function _class_static_private_field_update(receiver, classConstructor, descriptor) { + _class_check_private_static_access(receiver, classConstructor); + _class_check_private_static_field_descriptor(descriptor, "update"); + + return _class_apply_descriptor_update(receiver, descriptor); +} +export { _class_static_private_field_update as _ }; diff --git a/node_modules/@swc/helpers/esm/_class_static_private_method_get.js b/node_modules/@swc/helpers/esm/_class_static_private_method_get.js new file mode 100644 index 0000000000000000000000000000000000000000..d9309f4d9264e5fcad844d337131a2e861700744 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_class_static_private_method_get.js @@ -0,0 +1,8 @@ +import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; + +function _class_static_private_method_get(receiver, classConstructor, method) { + _class_check_private_static_access(receiver, classConstructor); + + return method; +} +export { _class_static_private_method_get as _ }; diff --git a/node_modules/@swc/helpers/esm/_construct.js b/node_modules/@swc/helpers/esm/_construct.js new file mode 100644 index 0000000000000000000000000000000000000000..affce786612fe47cebe9bca0e9ad2f9502fcb248 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_construct.js @@ -0,0 +1,20 @@ +import { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; +import { _ as _set_prototype_of } from "./_set_prototype_of.js"; +function _construct(Parent, args, Class) { + if (_is_native_reflect_construct()) _construct = Reflect.construct; + else { + _construct = function construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + + if (Class) _set_prototype_of(instance, Class.prototype); + + return instance; + }; + } + + return _construct.apply(null, arguments); +} +export { _construct as _ }; diff --git a/node_modules/@swc/helpers/esm/_create_class.js b/node_modules/@swc/helpers/esm/_create_class.js new file mode 100644 index 0000000000000000000000000000000000000000..f251d98bc64f6ccf67fe4e41876948f8209d1f21 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_create_class.js @@ -0,0 +1,18 @@ +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + + if ("value" in descriptor) descriptor.writable = true; + + Object.defineProperty(target, descriptor.key, descriptor); + } +} +function _create_class(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + + return Constructor; +} +export { _create_class as _ }; diff --git a/node_modules/@swc/helpers/esm/_create_for_of_iterator_helper_loose.js b/node_modules/@swc/helpers/esm/_create_for_of_iterator_helper_loose.js new file mode 100644 index 0000000000000000000000000000000000000000..d848f09d1e8144ded2502de2bbdbbf56c8e54af1 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_create_for_of_iterator_helper_loose.js @@ -0,0 +1,22 @@ +import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; + +function _create_for_of_iterator_helper_loose(o, allowArrayLike) { + var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; + + if (it) return (it = it.call(o)).next.bind(it); + // Fallback for engines without symbol support + if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + + var i = 0; + + return function() { + if (i >= o.length) return { done: true }; + + return { done: false, value: o[i++] }; + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +export { _create_for_of_iterator_helper_loose as _ }; diff --git a/node_modules/@swc/helpers/esm/_create_super.js b/node_modules/@swc/helpers/esm/_create_super.js new file mode 100644 index 0000000000000000000000000000000000000000..09b3ec024b965a715b7ede1f1b29f05d2ae1e655 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_create_super.js @@ -0,0 +1,21 @@ +import { _ as _get_prototype_of } from "./_get_prototype_of.js"; +import { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; +import { _ as _possible_constructor_return } from "./_possible_constructor_return.js"; + +function _create_super(Derived) { + var hasNativeReflectConstruct = _is_native_reflect_construct(); + + return function _createSuperInternal() { + var Super = _get_prototype_of(Derived), result; + + if (hasNativeReflectConstruct) { + var NewTarget = _get_prototype_of(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return _possible_constructor_return(this, result); + }; +} +export { _create_super as _ }; diff --git a/node_modules/@swc/helpers/esm/_decorate.js b/node_modules/@swc/helpers/esm/_decorate.js new file mode 100644 index 0000000000000000000000000000000000000000..7131a6dc1a9c73d3470e1ebab981da88731b74a3 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_decorate.js @@ -0,0 +1,268 @@ +import { _ as _to_array } from "./_to_array.js"; +import { _ as _to_property_key } from "./_to_property_key.js"; +import { _ as _type_of } from "./_type_of.js"; + +function _decorate(decorators, factory, superClass) { + var r = factory(function initialize(O) { + _initializeInstanceElements(O, decorated.elements); + }, superClass); + var decorated = _decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators); + _initializeClassElements(r.F, decorated.elements); + + return _runClassFinishers(r.F, decorated.finishers); +} + +function _createElementDescriptor(def) { + var key = _to_property_key(def.key); + var descriptor; + + if (def.kind === "method") { + descriptor = { value: def.value, writable: true, configurable: true, enumerable: false }; + Object.defineProperty(def.value, "name", { value: _type_of(key) === "symbol" ? "" : key, configurable: true }); + } else if (def.kind === "get") descriptor = { get: def.value, configurable: true, enumerable: false }; + else if (def.kind === "set") descriptor = { set: def.value, configurable: true, enumerable: false }; + else if (def.kind === "field") descriptor = { configurable: true, writable: true, enumerable: true }; + + var element = { kind: def.kind === "field" ? "field" : "method", key: key, placement: def.static ? "static" : def.kind === "field" ? "own" : "prototype", descriptor: descriptor }; + + if (def.decorators) element.decorators = def.decorators; + + if (def.kind === "field") element.initializer = def.value; + + return element; +} +function _coalesceGetterSetter(element, other) { + if (element.descriptor.get !== undefined) other.descriptor.get = element.descriptor.get; + else other.descriptor.set = element.descriptor.set; +} +function _coalesceClassElements(elements) { + var newElements = []; + var isSameElement = function isSameElement(other) { + return other.kind === "method" && other.key === element.key && other.placement === element.placement; + }; + + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + var other; + + if (element.kind === "method" && (other = newElements.find(isSameElement))) { + if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) { + if (_hasDecorators(element) || _hasDecorators(other)) { + throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated."); + } + other.descriptor = element.descriptor; + } else { + if (_hasDecorators(element)) { + if (_hasDecorators(other)) { + throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ")."); + } + other.decorators = element.decorators; + } + _coalesceGetterSetter(element, other); + } + } else { + newElements.push(element); + } + } + + return newElements; +} +function _hasDecorators(element) { + return element.decorators && element.decorators.length; +} +function _isDataDescriptor(desc) { + return desc !== undefined && !(desc.value === undefined && desc.writable === undefined); +} +function _initializeClassElements(F, elements) { + var proto = F.prototype; + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element) { + var placement = element.placement; + if (element.kind === kind && (placement === "static" || placement === "prototype")) { + var receiver = placement === "static" ? F : proto; + _defineClassElement(receiver, element); + } + }); + }); +} +function _initializeInstanceElements(O, elements) { + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element) { + if (element.kind === kind && element.placement === "own") _defineClassElement(O, element); + }); + }); +} +function _defineClassElement(receiver, element) { + var descriptor = element.descriptor; + if (element.kind === "field") { + var initializer = element.initializer; + descriptor = { enumerable: descriptor.enumerable, writable: descriptor.writable, configurable: descriptor.configurable, value: initializer === void 0 ? void 0 : initializer.call(receiver) }; + } + Object.defineProperty(receiver, element.key, descriptor); +} +function _decorateClass(elements, decorators) { + var newElements = []; + var finishers = []; + var placements = { static: [], prototype: [], own: [] }; + elements.forEach(function(element) { + _addElementPlacement(element, placements); + }); + elements.forEach(function(element) { + if (!_hasDecorators(element)) return newElements.push(element); + var elementFinishersExtras = _decorateElement(element, placements); + newElements.push(elementFinishersExtras.element); + newElements.push.apply(newElements, elementFinishersExtras.extras); + finishers.push.apply(finishers, elementFinishersExtras.finishers); + }); + if (!decorators) return { elements: newElements, finishers: finishers }; + var result = _decorateConstructor(newElements, decorators); + finishers.push.apply(finishers, result.finishers); + result.finishers = finishers; + + return result; +} +function _addElementPlacement(element, placements, silent) { + var keys = placements[element.placement]; + if (!silent && keys.indexOf(element.key) !== -1) throw new TypeError("Duplicated element (" + element.key + ")"); + keys.push(element.key); +} +function _decorateElement(element, placements) { + var extras = []; + var finishers = []; + for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) { + var keys = placements[element.placement]; + keys.splice(keys.indexOf(element.key), 1); + var elementObject = _fromElementDescriptor(element); + var elementFinisherExtras = _toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject); + element = elementFinisherExtras.element; + _addElementPlacement(element, placements); + if (elementFinisherExtras.finisher) finishers.push(elementFinisherExtras.finisher); + var newExtras = elementFinisherExtras.extras; + if (newExtras) { + for (var j = 0; j < newExtras.length; j++) _addElementPlacement(newExtras[j], placements); + extras.push.apply(extras, newExtras); + } + } + + return { element: element, finishers: finishers, extras: extras }; +} +function _decorateConstructor(elements, decorators) { + var finishers = []; + for (var i = decorators.length - 1; i >= 0; i--) { + var obj = _fromClassDescriptor(elements); + var elementsAndFinisher = _toClassDescriptor((0, decorators[i])(obj) || obj); + if (elementsAndFinisher.finisher !== undefined) finishers.push(elementsAndFinisher.finisher); + if (elementsAndFinisher.elements !== undefined) { + elements = elementsAndFinisher.elements; + for (var j = 0; j < elements.length - 1; j++) { + for (var k = j + 1; k < elements.length; k++) { + if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) { + throw new TypeError("Duplicated element (" + elements[j].key + ")"); + } + } + } + } + } + + return { elements: elements, finishers: finishers }; +} +function _fromElementDescriptor(element) { + var obj = { kind: element.kind, key: element.key, placement: element.placement, descriptor: element.descriptor }; + var desc = { value: "Descriptor", configurable: true }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + if (element.kind === "field") obj.initializer = element.initializer; + + return obj; +} +function _toElementDescriptors(elementObjects) { + if (elementObjects === undefined) return; + + return _to_array(elementObjects).map(function(elementObject) { + var element = _toElementDescriptor(elementObject); + _disallowProperty(elementObject, "finisher", "An element descriptor"); + _disallowProperty(elementObject, "extras", "An element descriptor"); + + return element; + }); +} +function _toElementDescriptor(elementObject) { + var kind = String(elementObject.kind); + if (kind !== "method" && kind !== "field") { + throw new TypeError("An element descriptor's .kind property must be either \"method\" or" + " \"field\", but a decorator created an element descriptor with" + " .kind \"" + kind + "\""); + } + var key = _to_property_key(elementObject.key); + var placement = String(elementObject.placement); + if (placement !== "static" && placement !== "prototype" && placement !== "own") { + throw new TypeError( + "An element descriptor's .placement property must be one of \"static\"," + + " \"prototype\" or \"own\", but a decorator created an element descriptor" + + " with .placement \"" + + placement + + "\"" + ); + } + var descriptor = elementObject.descriptor; + _disallowProperty(elementObject, "elements", "An element descriptor"); + var element = { kind: kind, key: key, placement: placement, descriptor: Object.assign({}, descriptor) }; + if (kind !== "field") _disallowProperty(elementObject, "initializer", "A method descriptor"); + else { + _disallowProperty(descriptor, "get", "The property descriptor of a field descriptor"); + _disallowProperty(descriptor, "set", "The property descriptor of a field descriptor"); + _disallowProperty(descriptor, "value", "The property descriptor of a field descriptor"); + element.initializer = elementObject.initializer; + } + + return element; +} +function _toElementFinisherExtras(elementObject) { + var element = _toElementDescriptor(elementObject); + var finisher = _optionalCallableProperty(elementObject, "finisher"); + var extras = _toElementDescriptors(elementObject.extras); + + return { element: element, finisher: finisher, extras: extras }; +} +function _fromClassDescriptor(elements) { + var obj = { kind: "class", elements: elements.map(_fromElementDescriptor) }; + var desc = { value: "Descriptor", configurable: true }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + + return obj; +} +function _toClassDescriptor(obj) { + var kind = String(obj.kind); + if (kind !== "class") { + throw new TypeError("A class descriptor's .kind property must be \"class\", but a decorator" + " created a class descriptor with .kind \"" + kind + "\""); + } + _disallowProperty(obj, "key", "A class descriptor"); + _disallowProperty(obj, "placement", "A class descriptor"); + _disallowProperty(obj, "descriptor", "A class descriptor"); + _disallowProperty(obj, "initializer", "A class descriptor"); + _disallowProperty(obj, "extras", "A class descriptor"); + var finisher = _optionalCallableProperty(obj, "finisher"); + var elements = _toElementDescriptors(obj.elements); + + return { elements: elements, finisher: finisher }; +} +function _disallowProperty(obj, name, objectType) { + if (obj[name] !== undefined) throw new TypeError(objectType + " can't have a ." + name + " property."); +} +function _optionalCallableProperty(obj, name) { + var value = obj[name]; + if (value !== undefined && typeof value !== "function") { + throw new TypeError("Expected '" + name + "' to be a function"); + } + + return value; +} +function _runClassFinishers(constructor, finishers) { + for (var i = 0; i < finishers.length; i++) { + var newConstructor = (0, finishers[i])(constructor); + if (newConstructor !== undefined) { + if (typeof newConstructor !== "function") throw new TypeError("Finishers must return a constructor."); + constructor = newConstructor; + } + } + + return constructor; +} +export { _decorate as _ }; diff --git a/node_modules/@swc/helpers/esm/_defaults.js b/node_modules/@swc/helpers/esm/_defaults.js new file mode 100644 index 0000000000000000000000000000000000000000..de0bc0cbce96200cb9709553d2a3e31198c9ee89 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_defaults.js @@ -0,0 +1,13 @@ +function _defaults(obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + + if (value && value.configurable && obj[key] === undefined) Object.defineProperty(obj, key, value); + } + + return obj; +} +export { _defaults as _ }; diff --git a/node_modules/@swc/helpers/esm/_define_enumerable_properties.js b/node_modules/@swc/helpers/esm/_define_enumerable_properties.js new file mode 100644 index 0000000000000000000000000000000000000000..7e184ef6973396c6beda4287bbb977d6ac59100c --- /dev/null +++ b/node_modules/@swc/helpers/esm/_define_enumerable_properties.js @@ -0,0 +1,24 @@ +function _define_enumerable_properties(obj, descs) { + for (var key in descs) { + var desc = descs[key]; + desc.configurable = desc.enumerable = true; + + if ("value" in desc) desc.writable = true; + + Object.defineProperty(obj, key, desc); + } + + if (Object.getOwnPropertySymbols) { + var objectSymbols = Object.getOwnPropertySymbols(descs); + for (var i = 0; i < objectSymbols.length; i++) { + var sym = objectSymbols[i]; + var desc = descs[sym]; + desc.configurable = desc.enumerable = true; + if ("value" in desc) desc.writable = true; + Object.defineProperty(obj, sym, desc); + } + } + + return obj; +} +export { _define_enumerable_properties as _ }; diff --git a/node_modules/@swc/helpers/esm/_define_property.js b/node_modules/@swc/helpers/esm/_define_property.js new file mode 100644 index 0000000000000000000000000000000000000000..fe259f2a5e3b088a56f02439f2a282e42da82231 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_define_property.js @@ -0,0 +1,8 @@ +function _define_property(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); + } else obj[key] = value; + + return obj; +} +export { _define_property as _ }; diff --git a/node_modules/@swc/helpers/esm/_dispose.js b/node_modules/@swc/helpers/esm/_dispose.js new file mode 100644 index 0000000000000000000000000000000000000000..97b816276baf80988d4e9a3dca27d539548f05c8 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_dispose.js @@ -0,0 +1,41 @@ +/* @minVersion 7.22.0 */ +function dispose_SuppressedError(error, suppressed) { + if (typeof SuppressedError !== "undefined") { + // eslint-disable-next-line no-undef + dispose_SuppressedError = SuppressedError; + } else { + dispose_SuppressedError = function SuppressedError(error, suppressed) { + this.suppressed = suppressed; + this.error = error; + this.stack = new Error().stack; + }; + dispose_SuppressedError.prototype = Object.create(Error.prototype, { constructor: { value: dispose_SuppressedError, writable: true, configurable: true } }); + } + return new dispose_SuppressedError(error, suppressed); +} + +function _dispose(stack, error, hasError) { + function next() { + while (stack.length > 0) { + try { + var r = stack.pop(); + var p = r.d.call(r.v); + if (r.a) return Promise.resolve(p).then(next, err); + } catch (e) { + return err(e); + } + } + if (hasError) throw error; + } + + function err(e) { + error = hasError ? new dispose_SuppressedError(e, error) : e; + hasError = true; + + return next(); + } + + return next(); +} + +export { _dispose as _ }; diff --git a/node_modules/@swc/helpers/esm/_export_star.js b/node_modules/@swc/helpers/esm/_export_star.js new file mode 100644 index 0000000000000000000000000000000000000000..98789f732c4d852ac6dc1d017dd07dba914066dc --- /dev/null +++ b/node_modules/@swc/helpers/esm/_export_star.js @@ -0,0 +1,15 @@ +function _export_star(from, to) { + Object.keys(from).forEach(function(k) { + if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) { + Object.defineProperty(to, k, { + enumerable: true, + get: function() { + return from[k]; + } + }); + } + }); + + return from; +} +export { _export_star as _ }; diff --git a/node_modules/@swc/helpers/esm/_extends.js b/node_modules/@swc/helpers/esm/_extends.js new file mode 100644 index 0000000000000000000000000000000000000000..7baa58ee45c735a305b73134cb4956795d17aef0 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_extends.js @@ -0,0 +1,13 @@ +function _extends() { + _extends = Object.assign || function assign(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key]; + } + + return target; + }; + + return _extends.apply(this, arguments); +} +export { _extends as _ }; diff --git a/node_modules/@swc/helpers/esm/_get.js b/node_modules/@swc/helpers/esm/_get.js new file mode 100644 index 0000000000000000000000000000000000000000..0d5fd28157c0ebc6df5276e1231e7b7d2cc3551f --- /dev/null +++ b/node_modules/@swc/helpers/esm/_get.js @@ -0,0 +1,21 @@ +import { _ as _super_prop_base } from "./_super_prop_base.js"; + +function _get(target, property, receiver) { + if (typeof Reflect !== "undefined" && Reflect.get) _get = Reflect.get; + else { + _get = function get(target, property, receiver) { + var base = _super_prop_base(target, property); + + if (!base) return; + + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) return desc.get.call(receiver || target); + + return desc.value; + }; + } + + return _get(target, property, receiver || target); +} +export { _get as _ }; diff --git a/node_modules/@swc/helpers/esm/_get_prototype_of.js b/node_modules/@swc/helpers/esm/_get_prototype_of.js new file mode 100644 index 0000000000000000000000000000000000000000..951dd01d2996418f5b143a4e1aa241368d68330f --- /dev/null +++ b/node_modules/@swc/helpers/esm/_get_prototype_of.js @@ -0,0 +1,8 @@ +function _get_prototype_of(o) { + _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + + return _get_prototype_of(o); +} +export { _get_prototype_of as _ }; diff --git a/node_modules/@swc/helpers/esm/_identity.js b/node_modules/@swc/helpers/esm/_identity.js new file mode 100644 index 0000000000000000000000000000000000000000..9af20108a23cc8e8a53ffd938abf2a503f8089ff --- /dev/null +++ b/node_modules/@swc/helpers/esm/_identity.js @@ -0,0 +1,5 @@ +function _identity(x) { + return x; +} + +export { _identity as _ }; diff --git a/node_modules/@swc/helpers/esm/_inherits.js b/node_modules/@swc/helpers/esm/_inherits.js new file mode 100644 index 0000000000000000000000000000000000000000..563d0d25fd705539ca9b6c21e993a4b1f9ec089b --- /dev/null +++ b/node_modules/@swc/helpers/esm/_inherits.js @@ -0,0 +1,12 @@ +import { _ as _set_prototype_of } from "./_set_prototype_of.js"; + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); + + if (superClass) _set_prototype_of(subClass, superClass); +} +export { _inherits as _ }; diff --git a/node_modules/@swc/helpers/esm/_inherits_loose.js b/node_modules/@swc/helpers/esm/_inherits_loose.js new file mode 100644 index 0000000000000000000000000000000000000000..d222f69fc6064fad2d216b37d6c5bfa1cab61db8 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_inherits_loose.js @@ -0,0 +1,6 @@ +function _inherits_loose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} +export { _inherits_loose as _ }; diff --git a/node_modules/@swc/helpers/esm/_initializer_define_property.js b/node_modules/@swc/helpers/esm/_initializer_define_property.js new file mode 100644 index 0000000000000000000000000000000000000000..396946028ea216baa1e8352d7eaf8ba8573eb0d4 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_initializer_define_property.js @@ -0,0 +1,11 @@ +function _initializer_define_property(target, property, descriptor, context) { + if (!descriptor) return; + + Object.defineProperty(target, property, { + enumerable: descriptor.enumerable, + configurable: descriptor.configurable, + writable: descriptor.writable, + value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 + }); +} +export { _initializer_define_property as _ }; diff --git a/node_modules/@swc/helpers/esm/_initializer_warning_helper.js b/node_modules/@swc/helpers/esm/_initializer_warning_helper.js new file mode 100644 index 0000000000000000000000000000000000000000..2590876ef35969021d554d06d0fa947a95842572 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_initializer_warning_helper.js @@ -0,0 +1,9 @@ +function _initializer_warning_helper(descriptor, context) { + throw new Error( + "Decorating class property failed. Please ensure that " + + "proposal-class-properties is enabled and set to use loose mode. " + + "To use proposal-class-properties in spec mode with decorators, wait for " + + "the next major version of decorators in stage 2." + ); +} +export { _initializer_warning_helper as _ }; diff --git a/node_modules/@swc/helpers/esm/_instanceof.js b/node_modules/@swc/helpers/esm/_instanceof.js new file mode 100644 index 0000000000000000000000000000000000000000..153d076f31de6ddac32318718925320fc1463835 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_instanceof.js @@ -0,0 +1,8 @@ +function _instanceof(left, right) { + "@swc/helpers - instanceof"; + + if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { + return !!right[Symbol.hasInstance](left); + } else return left instanceof right; +} +export { _instanceof as _ }; diff --git a/node_modules/@swc/helpers/esm/_interop_require_default.js b/node_modules/@swc/helpers/esm/_interop_require_default.js new file mode 100644 index 0000000000000000000000000000000000000000..12458929e47122d60e870bbe19af56522a3bf106 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_interop_require_default.js @@ -0,0 +1,4 @@ +function _interop_require_default(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} +export { _interop_require_default as _ }; diff --git a/node_modules/@swc/helpers/esm/_interop_require_wildcard.js b/node_modules/@swc/helpers/esm/_interop_require_wildcard.js new file mode 100644 index 0000000000000000000000000000000000000000..fd78233b3d31e0df33707646b175a74eddb872ec --- /dev/null +++ b/node_modules/@swc/helpers/esm/_interop_require_wildcard.js @@ -0,0 +1,36 @@ +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + + return (_getRequireWildcardCache = function(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interop_require_wildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) return obj; + if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj }; + + var cache = _getRequireWildcardCache(nodeInterop); + + if (cache && cache.has(obj)) return cache.get(obj); + + var newObj = { __proto__: null }; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + + for (var key in obj) { + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); + else newObj[key] = obj[key]; + } + } + + newObj.default = obj; + + if (cache) cache.set(obj, newObj); + + return newObj; +} +export { _interop_require_wildcard as _ }; diff --git a/node_modules/@swc/helpers/esm/_is_native_function.js b/node_modules/@swc/helpers/esm/_is_native_function.js new file mode 100644 index 0000000000000000000000000000000000000000..c7cf198731b57e5a3604e114f26e40acf9fda9f9 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_is_native_function.js @@ -0,0 +1,4 @@ +function _is_native_function(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} +export { _is_native_function as _ }; diff --git a/node_modules/@swc/helpers/esm/_is_native_reflect_construct.js b/node_modules/@swc/helpers/esm/_is_native_reflect_construct.js new file mode 100644 index 0000000000000000000000000000000000000000..af04603219bbe74a961e2d97e755121f504b5562 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_is_native_reflect_construct.js @@ -0,0 +1,16 @@ +function _is_native_reflect_construct() { + // Since Reflect.construct can't be properly polyfilled, some + // implementations (e.g. core-js@2) don't set the correct internal slots. + // Those polyfills don't allow us to subclass built-ins, so we need to + // use our fallback implementation. + try { + // If the internal slots aren't set, this throws an error similar to + // TypeError: this is not a Boolean object. + var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); + } catch (_) {} + return (_is_native_reflect_construct = function() { + return !!result; + })(); +} + +export { _is_native_reflect_construct as _ }; diff --git a/node_modules/@swc/helpers/esm/_iterable_to_array.js b/node_modules/@swc/helpers/esm/_iterable_to_array.js new file mode 100644 index 0000000000000000000000000000000000000000..e44dfb002305add6b2023deeae15bb9b6f9e6924 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_iterable_to_array.js @@ -0,0 +1,6 @@ +function _iterable_to_array(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) { + return Array.from(iter); + } +} +export { _iterable_to_array as _ }; diff --git a/node_modules/@swc/helpers/esm/_iterable_to_array_limit.js b/node_modules/@swc/helpers/esm/_iterable_to_array_limit.js new file mode 100644 index 0000000000000000000000000000000000000000..1ce2bc94b3654416919ceb097987202861b1fdd3 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_iterable_to_array_limit.js @@ -0,0 +1,29 @@ +function _iterable_to_array_limit(arr, i) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + + if (_i == null) return; + + var _arr = []; + var _n = true; + var _d = false; + var _s, _e; + + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} +export { _iterable_to_array_limit as _ }; diff --git a/node_modules/@swc/helpers/esm/_iterable_to_array_limit_loose.js b/node_modules/@swc/helpers/esm/_iterable_to_array_limit_loose.js new file mode 100644 index 0000000000000000000000000000000000000000..2369e8b6858d5703212d76599cc73c1b05cce98a --- /dev/null +++ b/node_modules/@swc/helpers/esm/_iterable_to_array_limit_loose.js @@ -0,0 +1,15 @@ +function _iterable_to_array_limit_loose(arr, i) { + var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); + + if (_i == null) return; + + var _arr = []; + + for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) { + _arr.push(_step.value); + if (i && _arr.length === i) break; + } + + return _arr; +} +export { _iterable_to_array_limit_loose as _ }; diff --git a/node_modules/@swc/helpers/esm/_jsx.js b/node_modules/@swc/helpers/esm/_jsx.js new file mode 100644 index 0000000000000000000000000000000000000000..0695535c02077402a4c60ee231de9730583886d4 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_jsx.js @@ -0,0 +1,26 @@ +var REACT_ELEMENT_TYPE; +function _jsx(type, props, key, children) { + if (!REACT_ELEMENT_TYPE) { + REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; + } + + var defaultProps = type && type.defaultProps; + var childrenLength = arguments.length - 3; + + if (!props && childrenLength !== 0) props = { children: void 0 }; + if (props && defaultProps) { + for (var propName in defaultProps) { + if (props[propName] === void 0) props[propName] = defaultProps[propName]; + else if (!props) props = defaultProps || {}; + } + } + if (childrenLength === 1) props.children = children; + else if (childrenLength > 1) { + var childArray = new Array(childrenLength); + for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 3]; + props.children = childArray; + } + + return { $$typeof: REACT_ELEMENT_TYPE, type: type, key: key === undefined ? null : "" + key, ref: null, props: props, _owner: null }; +} +export { _jsx as _ }; diff --git a/node_modules/@swc/helpers/esm/_new_arrow_check.js b/node_modules/@swc/helpers/esm/_new_arrow_check.js new file mode 100644 index 0000000000000000000000000000000000000000..0651b3c550d2d12e6855b84167015dd2b1d86e17 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_new_arrow_check.js @@ -0,0 +1,4 @@ +function _new_arrow_check(innerThis, boundThis) { + if (innerThis !== boundThis) throw new TypeError("Cannot instantiate an arrow function"); +} +export { _new_arrow_check as _ }; diff --git a/node_modules/@swc/helpers/esm/_non_iterable_rest.js b/node_modules/@swc/helpers/esm/_non_iterable_rest.js new file mode 100644 index 0000000000000000000000000000000000000000..b41d9c237199d2441241083fbacce824805d1e56 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_non_iterable_rest.js @@ -0,0 +1,4 @@ +function _non_iterable_rest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +export { _non_iterable_rest as _ }; diff --git a/node_modules/@swc/helpers/esm/_non_iterable_spread.js b/node_modules/@swc/helpers/esm/_non_iterable_spread.js new file mode 100644 index 0000000000000000000000000000000000000000..fd7b50e72a3e57ff9b44167297c23e36a1e181e4 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_non_iterable_spread.js @@ -0,0 +1,4 @@ +function _non_iterable_spread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +export { _non_iterable_spread as _ }; diff --git a/node_modules/@swc/helpers/esm/_object_destructuring_empty.js b/node_modules/@swc/helpers/esm/_object_destructuring_empty.js new file mode 100644 index 0000000000000000000000000000000000000000..97a6dd750cfd9e740dbd02ef5fb3a9158fb2cb4d --- /dev/null +++ b/node_modules/@swc/helpers/esm/_object_destructuring_empty.js @@ -0,0 +1,6 @@ +function _object_destructuring_empty(o) { + if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o); + + return o; +} +export { _object_destructuring_empty as _ }; diff --git a/node_modules/@swc/helpers/esm/_object_spread.js b/node_modules/@swc/helpers/esm/_object_spread.js new file mode 100644 index 0000000000000000000000000000000000000000..a71c747f5d857a1d7776c14469350fd2f6a30dc1 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_object_spread.js @@ -0,0 +1,23 @@ +import { _ as _define_property } from "./_define_property.js"; + +function _object_spread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + + if (typeof Object.getOwnPropertySymbols === "function") { + ownKeys = ownKeys.concat( + Object.getOwnPropertySymbols(source).filter(function(sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + }) + ); + } + + ownKeys.forEach(function(key) { + _define_property(target, key, source[key]); + }); + } + + return target; +} +export { _object_spread as _ }; diff --git a/node_modules/@swc/helpers/esm/_object_spread_props.js b/node_modules/@swc/helpers/esm/_object_spread_props.js new file mode 100644 index 0000000000000000000000000000000000000000..88593ee348d78afedbd90c5a69f79b5e668de247 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_object_spread_props.js @@ -0,0 +1,28 @@ +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) { + symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + keys.push.apply(keys, symbols); + } + + return keys; +} +function _object_spread_props(target, source) { + source = source != null ? source : {}; + + if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + else { + ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + + return target; +} +export { _object_spread_props as _ }; diff --git a/node_modules/@swc/helpers/esm/_object_without_properties.js b/node_modules/@swc/helpers/esm/_object_without_properties.js new file mode 100644 index 0000000000000000000000000000000000000000..0f22b51c230edb1b18a105824bc6f188f58fdf91 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_object_without_properties.js @@ -0,0 +1,33 @@ +import { _ as _object_without_properties_loose } from "./_object_without_properties_loose.js"; + +function _object_without_properties(source, excluded) { + if (source == null) return {}; + + var target = {}, sourceKeys, key, i; + if (typeof Reflect !== "undefined" && Reflect.ownKeys) { + sourceKeys = Reflect.ownKeys(Object(source)); + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + + return target; + } + + target = _object_without_properties_loose(source, excluded); + if (Object.getOwnPropertySymbols) { + sourceKeys = Object.getOwnPropertySymbols(source); + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +export { _object_without_properties as _ }; diff --git a/node_modules/@swc/helpers/esm/_object_without_properties_loose.js b/node_modules/@swc/helpers/esm/_object_without_properties_loose.js new file mode 100644 index 0000000000000000000000000000000000000000..1cf60718b407da785ad86d27036cf65e25ee1c57 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_object_without_properties_loose.js @@ -0,0 +1,14 @@ +function _object_without_properties_loose(source, excluded) { + if (source == null) return {}; + + var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + + return target; +} +export { _object_without_properties_loose as _ }; diff --git a/node_modules/@swc/helpers/esm/_overload_yield.js b/node_modules/@swc/helpers/esm/_overload_yield.js new file mode 100644 index 0000000000000000000000000000000000000000..17260d1559c053a8cd716dc02a2a848787d5ce0d --- /dev/null +++ b/node_modules/@swc/helpers/esm/_overload_yield.js @@ -0,0 +1,6 @@ +function _overload_yield(value, /** 0: await 1: delegate */ kind) { + this.v = value; + this.k = kind; +} + +export { _overload_yield as _ }; diff --git a/node_modules/@swc/helpers/esm/_possible_constructor_return.js b/node_modules/@swc/helpers/esm/_possible_constructor_return.js new file mode 100644 index 0000000000000000000000000000000000000000..b07f39070b46bc30a040454b5951fd9c11c7f06d --- /dev/null +++ b/node_modules/@swc/helpers/esm/_possible_constructor_return.js @@ -0,0 +1,9 @@ +import { _ as _assert_this_initialized } from "./_assert_this_initialized.js"; +import { _ as _type_of } from "./_type_of.js"; + +function _possible_constructor_return(self, call) { + if (call && (_type_of(call) === "object" || typeof call === "function")) return call; + + return _assert_this_initialized(self); +} +export { _possible_constructor_return as _ }; diff --git a/node_modules/@swc/helpers/esm/_read_only_error.js b/node_modules/@swc/helpers/esm/_read_only_error.js new file mode 100644 index 0000000000000000000000000000000000000000..4b63ee3ea3bd8ecd51b09a4e3c2a3694c8db01cd --- /dev/null +++ b/node_modules/@swc/helpers/esm/_read_only_error.js @@ -0,0 +1,4 @@ +function _read_only_error(name) { + throw new TypeError("\"" + name + "\" is read-only"); +} +export { _read_only_error as _ }; diff --git a/node_modules/@swc/helpers/esm/_set.js b/node_modules/@swc/helpers/esm/_set.js new file mode 100644 index 0000000000000000000000000000000000000000..15dc2f1b6eb0a05f8d15f7c5bfcda6cb12488c20 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_set.js @@ -0,0 +1,42 @@ +import { _ as _define_property } from "./_define_property.js"; +import { _ as _super_prop_base } from "./_super_prop_base.js"; + +function set(target, property, value, receiver) { + if (typeof Reflect !== "undefined" && Reflect.set) set = Reflect.set; + else { + set = function set(target, property, value, receiver) { + var base = _super_prop_base(target, property); + var desc; + if (base) { + desc = Object.getOwnPropertyDescriptor(base, property); + if (desc.set) { + desc.set.call(receiver, value); + + return true; + } else if (!desc.writable) { + return false; + } + } + desc = Object.getOwnPropertyDescriptor(receiver, property); + if (desc) { + if (!desc.writable) return false; + desc.value = value; + Object.defineProperty(receiver, property, desc); + } else { + _define_property(receiver, property, value); + } + + return true; + }; + } + + return set(target, property, value, receiver); +} + +function _set(target, property, value, receiver, isStrict) { + var s = set(target, property, value, receiver || target); + if (!s && isStrict) throw new Error("failed to set property"); + + return value; +} +export { _set as _ }; diff --git a/node_modules/@swc/helpers/esm/_set_prototype_of.js b/node_modules/@swc/helpers/esm/_set_prototype_of.js new file mode 100644 index 0000000000000000000000000000000000000000..6a1f4df4183e6be4c3108f86e7d49d39c702dd00 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_set_prototype_of.js @@ -0,0 +1,10 @@ +function _set_prototype_of(o, p) { + _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) { + o.__proto__ = p; + + return o; + }; + + return _set_prototype_of(o, p); +} +export { _set_prototype_of as _ }; diff --git a/node_modules/@swc/helpers/esm/_skip_first_generator_next.js b/node_modules/@swc/helpers/esm/_skip_first_generator_next.js new file mode 100644 index 0000000000000000000000000000000000000000..1ccf48901c343fff5e854081f5529af64d04a7ca --- /dev/null +++ b/node_modules/@swc/helpers/esm/_skip_first_generator_next.js @@ -0,0 +1,9 @@ +function _skip_first_generator_next(fn) { + return function() { + var it = fn.apply(this, arguments); + it.next(); + + return it; + }; +} +export { _skip_first_generator_next as _ }; diff --git a/node_modules/@swc/helpers/esm/_sliced_to_array.js b/node_modules/@swc/helpers/esm/_sliced_to_array.js new file mode 100644 index 0000000000000000000000000000000000000000..750c3019fb108e78759f797a64d9f1bc05d42aad --- /dev/null +++ b/node_modules/@swc/helpers/esm/_sliced_to_array.js @@ -0,0 +1,9 @@ +import { _ as _array_with_holes } from "./_array_with_holes.js"; +import { _ as _iterable_to_array_limit } from "./_iterable_to_array_limit.js"; +import { _ as _non_iterable_rest } from "./_non_iterable_rest.js"; +import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; + +function _sliced_to_array(arr, i) { + return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest(); +} +export { _sliced_to_array as _ }; diff --git a/node_modules/@swc/helpers/esm/_sliced_to_array_loose.js b/node_modules/@swc/helpers/esm/_sliced_to_array_loose.js new file mode 100644 index 0000000000000000000000000000000000000000..859de45d8cb2e470a81133baccf1e0b6eed59d7e --- /dev/null +++ b/node_modules/@swc/helpers/esm/_sliced_to_array_loose.js @@ -0,0 +1,9 @@ +import { _ as _array_with_holes } from "./_array_with_holes.js"; +import { _ as _iterable_to_array_limit_loose } from "./_iterable_to_array_limit_loose.js"; +import { _ as _non_iterable_rest } from "./_non_iterable_rest.js"; +import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; + +function _sliced_to_array_loose(arr, i) { + return _array_with_holes(arr) || _iterable_to_array_limit_loose(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest(); +} +export { _sliced_to_array_loose as _ }; diff --git a/node_modules/@swc/helpers/esm/_super_prop_base.js b/node_modules/@swc/helpers/esm/_super_prop_base.js new file mode 100644 index 0000000000000000000000000000000000000000..47dec411f2300277c10b3956bd491c09e0a3b260 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_super_prop_base.js @@ -0,0 +1,11 @@ +import { _ as _get_prototype_of } from "./_get_prototype_of.js"; + +function _super_prop_base(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = _get_prototype_of(object); + if (object === null) break; + } + + return object; +} +export { _super_prop_base as _ }; diff --git a/node_modules/@swc/helpers/esm/_tagged_template_literal.js b/node_modules/@swc/helpers/esm/_tagged_template_literal.js new file mode 100644 index 0000000000000000000000000000000000000000..429cc779826de902444fa7704b4cee9db070cb18 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_tagged_template_literal.js @@ -0,0 +1,6 @@ +function _tagged_template_literal(strings, raw) { + if (!raw) raw = strings.slice(0); + + return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); +} +export { _tagged_template_literal as _ }; diff --git a/node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js b/node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js new file mode 100644 index 0000000000000000000000000000000000000000..1fbb61e6dc1c253eff4d3b45ea9224c6493119c7 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_tagged_template_literal_loose.js @@ -0,0 +1,8 @@ +function _tagged_template_literal_loose(strings, raw) { + if (!raw) raw = strings.slice(0); + + strings.raw = raw; + + return strings; +} +export { _tagged_template_literal_loose as _ }; diff --git a/node_modules/@swc/helpers/esm/_throw.js b/node_modules/@swc/helpers/esm/_throw.js new file mode 100644 index 0000000000000000000000000000000000000000..5de41f16fcbea51c2873849ff26fb1d66c337fe9 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_throw.js @@ -0,0 +1,4 @@ +function _throw(e) { + throw e; +} +export { _throw as _ }; diff --git a/node_modules/@swc/helpers/esm/_to_array.js b/node_modules/@swc/helpers/esm/_to_array.js new file mode 100644 index 0000000000000000000000000000000000000000..7451fb2a14d5f123995b93f3183fdba27d2ae1eb --- /dev/null +++ b/node_modules/@swc/helpers/esm/_to_array.js @@ -0,0 +1,9 @@ +import { _ as _array_with_holes } from "./_array_with_holes.js"; +import { _ as _iterable_to_array } from "./_iterable_to_array.js"; +import { _ as _non_iterable_rest } from "./_non_iterable_rest.js"; +import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; + +function _to_array(arr) { + return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest(); +} +export { _to_array as _ }; diff --git a/node_modules/@swc/helpers/esm/_to_consumable_array.js b/node_modules/@swc/helpers/esm/_to_consumable_array.js new file mode 100644 index 0000000000000000000000000000000000000000..048ad6e25a2a1560535d380c0d2784a842e504b0 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_to_consumable_array.js @@ -0,0 +1,9 @@ +import { _ as _array_without_holes } from "./_array_without_holes.js"; +import { _ as _iterable_to_array } from "./_iterable_to_array.js"; +import { _ as _non_iterable_spread } from "./_non_iterable_spread.js"; +import { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; + +function _to_consumable_array(arr) { + return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread(); +} +export { _to_consumable_array as _ }; diff --git a/node_modules/@swc/helpers/esm/_to_primitive.js b/node_modules/@swc/helpers/esm/_to_primitive.js new file mode 100644 index 0000000000000000000000000000000000000000..7c8e4255c85a580cfbf8e0bea1c389bab23d3b04 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_to_primitive.js @@ -0,0 +1,16 @@ +import { _ as _type_of } from "./_type_of.js"; + +function _to_primitive(input, hint) { + if (_type_of(input) !== "object" || input === null) return input; + + var prim = input[Symbol.toPrimitive]; + + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (_type_of(res) !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + + return (hint === "string" ? String : Number)(input); +} +export { _to_primitive as _ }; diff --git a/node_modules/@swc/helpers/esm/_to_property_key.js b/node_modules/@swc/helpers/esm/_to_property_key.js new file mode 100644 index 0000000000000000000000000000000000000000..b6f8d38ee92fa467ea4cba14649cd500f7b57511 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_to_property_key.js @@ -0,0 +1,9 @@ +import { _ as _to_primitive } from "./_to_primitive.js"; +import { _ as _type_of } from "./_type_of.js"; + +function _to_property_key(arg) { + var key = _to_primitive(arg, "string"); + + return _type_of(key) === "symbol" ? key : String(key); +} +export { _to_property_key as _ }; diff --git a/node_modules/@swc/helpers/esm/_ts_add_disposable_resource.js b/node_modules/@swc/helpers/esm/_ts_add_disposable_resource.js new file mode 100644 index 0000000000000000000000000000000000000000..62fd1cb30bdc5fe7819b5a49f890ff45967a6ad1 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_ts_add_disposable_resource.js @@ -0,0 +1 @@ +export { __addDisposableResource as _ } from "tslib"; diff --git a/node_modules/@swc/helpers/esm/_ts_decorate.js b/node_modules/@swc/helpers/esm/_ts_decorate.js new file mode 100644 index 0000000000000000000000000000000000000000..8e0e46e62025ad7e6b49043d51ad9761007fff49 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_ts_decorate.js @@ -0,0 +1 @@ +export { __decorate as _ } from "tslib"; diff --git a/node_modules/@swc/helpers/esm/_ts_dispose_resources.js b/node_modules/@swc/helpers/esm/_ts_dispose_resources.js new file mode 100644 index 0000000000000000000000000000000000000000..5d06d4a5f87e34549d24dcba49041d6e3b75a7be --- /dev/null +++ b/node_modules/@swc/helpers/esm/_ts_dispose_resources.js @@ -0,0 +1 @@ +export { __disposeResources as _ } from "tslib"; diff --git a/node_modules/@swc/helpers/esm/_ts_generator.js b/node_modules/@swc/helpers/esm/_ts_generator.js new file mode 100644 index 0000000000000000000000000000000000000000..6b7741299b064f3584e97d9eb750a1a8003e92f8 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_ts_generator.js @@ -0,0 +1,29 @@ +function _ts_generator(thisArg, body) { + var f, y, t, _ = { label: 0, sent: function () { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty; + return d(g, "next", { value: verb(0) }), d(g, "throw", { value: verb(1) }), d(g, "return", { value: verb(2) }), typeof Symbol === "function" && d(g, Symbol.iterator, { value: function () { return this; } }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +export { _ts_generator as _ }; diff --git a/node_modules/@swc/helpers/esm/_ts_metadata.js b/node_modules/@swc/helpers/esm/_ts_metadata.js new file mode 100644 index 0000000000000000000000000000000000000000..0aa522ed4b456c69033b8e32497149c4fa944980 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_ts_metadata.js @@ -0,0 +1 @@ +export { __metadata as _ } from "tslib"; diff --git a/node_modules/@swc/helpers/esm/_ts_param.js b/node_modules/@swc/helpers/esm/_ts_param.js new file mode 100644 index 0000000000000000000000000000000000000000..f332a40307e16380c0e936f72ae0e44f68860fed --- /dev/null +++ b/node_modules/@swc/helpers/esm/_ts_param.js @@ -0,0 +1 @@ +export { __param as _ } from "tslib"; diff --git a/node_modules/@swc/helpers/esm/_ts_rewrite_relative_import_extension.js b/node_modules/@swc/helpers/esm/_ts_rewrite_relative_import_extension.js new file mode 100644 index 0000000000000000000000000000000000000000..0c7c5b80acd5aef2847d9639e228394a4ce57ade --- /dev/null +++ b/node_modules/@swc/helpers/esm/_ts_rewrite_relative_import_extension.js @@ -0,0 +1 @@ +export { __rewriteRelativeImportExtension as _ } from "tslib"; diff --git a/node_modules/@swc/helpers/esm/_ts_values.js b/node_modules/@swc/helpers/esm/_ts_values.js new file mode 100644 index 0000000000000000000000000000000000000000..298fd4b5929ff6f161fab818f0d246ed79fea4ea --- /dev/null +++ b/node_modules/@swc/helpers/esm/_ts_values.js @@ -0,0 +1 @@ +export { __values as _ } from "tslib"; diff --git a/node_modules/@swc/helpers/esm/_type_of.js b/node_modules/@swc/helpers/esm/_type_of.js new file mode 100644 index 0000000000000000000000000000000000000000..dc7b859bcc389d28a2188c50b0ee02b33c459008 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_type_of.js @@ -0,0 +1,6 @@ +function _type_of(obj) { + "@swc/helpers - typeof"; + + return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; +} +export { _type_of as _ }; diff --git a/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js b/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js new file mode 100644 index 0000000000000000000000000000000000000000..47ce85815c87f1d32e574ee7891adc765c5d9315 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js @@ -0,0 +1,13 @@ +import { _ as _array_like_to_array } from "./_array_like_to_array.js"; + +function _unsupported_iterable_to_array(o, minLen) { + if (!o) return; + if (typeof o === "string") return _array_like_to_array(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(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen); +} +export { _unsupported_iterable_to_array as _ }; diff --git a/node_modules/@swc/helpers/esm/_update.js b/node_modules/@swc/helpers/esm/_update.js new file mode 100644 index 0000000000000000000000000000000000000000..86a7d688bc8ebf6fa1195d501ef99aec0ceee12b --- /dev/null +++ b/node_modules/@swc/helpers/esm/_update.js @@ -0,0 +1,14 @@ +import { _ as _get } from "./_get.js"; +import { _ as _set } from "./_set.js"; + +function _update(target, property, receiver, isStrict) { + return { + get _() { + return _get(target, property, receiver); + }, + set _(value) { + _set(target, property, value, receiver, isStrict); + } + }; +} +export { _update as _ }; diff --git a/node_modules/@swc/helpers/esm/_using.js b/node_modules/@swc/helpers/esm/_using.js new file mode 100644 index 0000000000000000000000000000000000000000..b46fe691c4af6d882b4b0d0a587b8d2e00f31815 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_using.js @@ -0,0 +1,22 @@ +/* @minVersion 7.22.0 */ + +function _using(stack, value, isAwait) { + if (value === null || value === void 0) return value; + if (Object(value) !== value) { + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + } + // core-js-pure uses Symbol.for for polyfilling well-known symbols + if (isAwait) { + var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose === null || dispose === void 0) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ v: value, d: dispose, a: isAwait }); + return value; +} + +export { _using as _ }; diff --git a/node_modules/@swc/helpers/esm/_using_ctx.js b/node_modules/@swc/helpers/esm/_using_ctx.js new file mode 100644 index 0000000000000000000000000000000000000000..23c0d76d9ef0fb9c05d6ec48e2b523b9657edde2 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_using_ctx.js @@ -0,0 +1,73 @@ +function _using_ctx() { + var _disposeSuppressedError = typeof SuppressedError === "function" + // eslint-disable-next-line no-undef + ? SuppressedError + : (function(error, suppressed) { + var err = new Error(); + err.name = "SuppressedError"; + err.suppressed = suppressed; + err.error = error; + return err; + }), + empty = {}, + stack = []; + function using(isAwait, value) { + if (value != null) { + if (Object(value) !== value) { + throw new TypeError("using declarations can only be used with objects, functions, null, or undefined."); + } + // core-js-pure uses Symbol.for for polyfilling well-known symbols + if (isAwait) { + var dispose = value[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]; + } + if (dispose == null) { + dispose = value[Symbol.dispose || Symbol.for("Symbol.dispose")]; + } + if (typeof dispose !== "function") { + throw new TypeError(`Property [Symbol.dispose] is not a function.`); + } + stack.push({ v: value, d: dispose, a: isAwait }); + } else if (isAwait) { + // provide the nullish `value` as `d` for minification gain + stack.push({ d: value, a: isAwait }); + } + return value; + } + return { + // error + e: empty, + // using + u: using.bind(null, false), + // await using + a: using.bind(null, true), + // dispose + d: function() { + var error = this.e; + + function next() { + // eslint-disable-next-line @typescript-eslint/no-use-before-define + while ((resource = stack.pop())) { + try { + var resource, disposalResult = resource.d && resource.d.call(resource.v); + if (resource.a) { + return Promise.resolve(disposalResult).then(next, err); + } + } catch (e) { + return err(e); + } + } + if (error !== empty) throw error; + } + + function err(e) { + error = error !== empty ? new _disposeSuppressedError(e, error) : e; + + return next(); + } + + return next(); + } + }; +} + +export { _using_ctx as _ }; diff --git a/node_modules/@swc/helpers/esm/_wrap_async_generator.js b/node_modules/@swc/helpers/esm/_wrap_async_generator.js new file mode 100644 index 0000000000000000000000000000000000000000..b95574033fa3738d2d6d7c6888eee760c366a8b9 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_wrap_async_generator.js @@ -0,0 +1,8 @@ +import { _ as _async_generator } from "./_async_generator.js"; + +function _wrap_async_generator(fn) { + return function() { + return new _async_generator(fn.apply(this, arguments)); + }; +} +export { _wrap_async_generator as _ }; diff --git a/node_modules/@swc/helpers/esm/_wrap_native_super.js b/node_modules/@swc/helpers/esm/_wrap_native_super.js new file mode 100644 index 0000000000000000000000000000000000000000..e942eb5d67c7a65c254fabfcfbb9204a385970bc --- /dev/null +++ b/node_modules/@swc/helpers/esm/_wrap_native_super.js @@ -0,0 +1,26 @@ +import { _ as _construct } from "./_construct.js"; +import { _ as _get_prototype_of } from "./_get_prototype_of.js"; +import { _ as _is_native_function } from "./_is_native_function.js"; +import { _ as _set_prototype_of } from "./_set_prototype_of.js"; + +function _wrap_native_super(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + _wrap_native_super = function(Class) { + if (Class === null || !_is_native_function(Class)) return Class; + if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function"); + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return _construct(Class, arguments, _get_prototype_of(this).constructor); + } + Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); + + return _set_prototype_of(Wrapper, Class); + }; + + return _wrap_native_super(Class); +} +export { _wrap_native_super as _ }; diff --git a/node_modules/@swc/helpers/esm/_wrap_reg_exp.js b/node_modules/@swc/helpers/esm/_wrap_reg_exp.js new file mode 100644 index 0000000000000000000000000000000000000000..1cd0e2814b118e667dcf2b4a3f7de982e2b25fe2 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_wrap_reg_exp.js @@ -0,0 +1,82 @@ +import { _ as _inherits } from "./_inherits.js"; +import { _ as _set_prototype_of } from "./_set_prototype_of.js"; + +function _wrap_reg_exp(re, groups, source) { + _wrap_reg_exp = function(re, groups, source) { + return new WrappedRegExp(re, undefined, groups, source); + }; + var _super = RegExp.prototype; + var _groups = new WeakMap(); + var _sources = new WeakMap(); + var _native_source = Object.getOwnPropertyDescriptor(_super, "source").get; + function WrappedRegExp(re, flags, groups, source) { + var _re = new RegExp(re, flags); + _groups.set(_re, groups || _groups.get(re)); + _sources.set(_re, source !== undefined ? source : _sources.get(re)); + return _set_prototype_of(_re, WrappedRegExp.prototype); + } + _inherits(WrappedRegExp, RegExp); + Object.defineProperty(WrappedRegExp.prototype, "source", { + configurable: true, + get: function() { + var source = _sources.get(this); + if (source !== undefined) { + try { + new RegExp(source, this.flags); + return source; + } catch (_) {} + } + return _native_source.call(this); + } + }); + WrappedRegExp.prototype.exec = function(str) { + var result = _super.exec.call(this, str); + if (result) { + result.groups = buildGroups(result, this); + var indices = result.indices; + if (indices) indices.groups = buildGroups(indices, this); + } + return result; + }; + WrappedRegExp.prototype[Symbol.replace] = function(str, substitution) { + if (typeof substitution === "string") { + var groups = _groups.get(this); + return _super[Symbol.replace].call( + this, + str, + substitution.replace(/\$<([^>]+)>/g, function(_, name) { + var group = groups ? groups[name] : undefined; + if (group === undefined) return ""; + return "$" + (Array.isArray(group) ? group.join("$") : group); + }) + ); + } + if (typeof substitution === "function") { + var _this = this; + return _super[Symbol.replace].call(this, str, function() { + var args = arguments; + if (typeof args[args.length - 1] !== "object") { + args = [].slice.call(args); + args.push(buildGroups(args, _this)); + } + return substitution.apply(this, args); + }); + } + return _super[Symbol.replace].call(this, str, substitution); + }; + function buildGroups(result, re) { + var g = _groups.get(re); + return Object.keys(g).reduce(function(groups, name) { + var i = g[name]; + if (typeof i === "number") groups[name] = result[i]; + else { + var k = 0; + while (result[i[k]] === undefined && k + 1 < i.length) k++; + groups[name] = result[i[k]]; + } + return groups; + }, Object.create(null)); + } + return _wrap_reg_exp.apply(this, arguments); +} +export { _wrap_reg_exp as _ }; diff --git a/node_modules/@swc/helpers/esm/_write_only_error.js b/node_modules/@swc/helpers/esm/_write_only_error.js new file mode 100644 index 0000000000000000000000000000000000000000..87c24aa07782aa268c6cd6bddaab94113d8c4c74 --- /dev/null +++ b/node_modules/@swc/helpers/esm/_write_only_error.js @@ -0,0 +1,4 @@ +function _write_only_error(name) { + throw new TypeError("\"" + name + "\" is write-only"); +} +export { _write_only_error as _ }; diff --git a/node_modules/@swc/helpers/esm/index.js b/node_modules/@swc/helpers/esm/index.js new file mode 100644 index 0000000000000000000000000000000000000000..426a6fd854ec75bf99710f5716b0dfae16a8eb83 --- /dev/null +++ b/node_modules/@swc/helpers/esm/index.js @@ -0,0 +1,110 @@ +/* This file is automatically generated and should not be manually edited. */ +/* To modify this file, please run the `npm run build` command instead. */ + +export { _ as _apply_decorated_descriptor } from "./_apply_decorated_descriptor.js"; +export { _ as _apply_decs_2203_r } from "./_apply_decs_2203_r.js"; +export { _ as _apply_decs_2311 } from "./_apply_decs_2311.js"; +export { _ as _array_like_to_array } from "./_array_like_to_array.js"; +export { _ as _array_with_holes } from "./_array_with_holes.js"; +export { _ as _array_without_holes } from "./_array_without_holes.js"; +export { _ as _assert_this_initialized } from "./_assert_this_initialized.js"; +export { _ as _async_generator } from "./_async_generator.js"; +export { _ as _async_generator_delegate } from "./_async_generator_delegate.js"; +export { _ as _async_iterator } from "./_async_iterator.js"; +export { _ as _async_to_generator } from "./_async_to_generator.js"; +export { _ as _await_async_generator } from "./_await_async_generator.js"; +export { _ as _await_value } from "./_await_value.js"; +export { _ as _call_super } from "./_call_super.js"; +export { _ as _check_private_redeclaration } from "./_check_private_redeclaration.js"; +export { _ as _class_apply_descriptor_destructure } from "./_class_apply_descriptor_destructure.js"; +export { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js"; +export { _ as _class_apply_descriptor_set } from "./_class_apply_descriptor_set.js"; +export { _ as _class_apply_descriptor_update } from "./_class_apply_descriptor_update.js"; +export { _ as _class_call_check } from "./_class_call_check.js"; +export { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js"; +export { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js"; +export { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js"; +export { _ as _class_name_tdz_error } from "./_class_name_tdz_error.js"; +export { _ as _class_private_field_destructure } from "./_class_private_field_destructure.js"; +export { _ as _class_private_field_get } from "./_class_private_field_get.js"; +export { _ as _class_private_field_init } from "./_class_private_field_init.js"; +export { _ as _class_private_field_loose_base } from "./_class_private_field_loose_base.js"; +export { _ as _class_private_field_loose_key } from "./_class_private_field_loose_key.js"; +export { _ as _class_private_field_set } from "./_class_private_field_set.js"; +export { _ as _class_private_field_update } from "./_class_private_field_update.js"; +export { _ as _class_private_method_get } from "./_class_private_method_get.js"; +export { _ as _class_private_method_init } from "./_class_private_method_init.js"; +export { _ as _class_private_method_set } from "./_class_private_method_set.js"; +export { _ as _class_static_private_field_destructure } from "./_class_static_private_field_destructure.js"; +export { _ as _class_static_private_field_spec_get } from "./_class_static_private_field_spec_get.js"; +export { _ as _class_static_private_field_spec_set } from "./_class_static_private_field_spec_set.js"; +export { _ as _class_static_private_field_update } from "./_class_static_private_field_update.js"; +export { _ as _class_static_private_method_get } from "./_class_static_private_method_get.js"; +export { _ as _construct } from "./_construct.js"; +export { _ as _create_class } from "./_create_class.js"; +export { _ as _create_for_of_iterator_helper_loose } from "./_create_for_of_iterator_helper_loose.js"; +export { _ as _create_super } from "./_create_super.js"; +export { _ as _decorate } from "./_decorate.js"; +export { _ as _defaults } from "./_defaults.js"; +export { _ as _define_enumerable_properties } from "./_define_enumerable_properties.js"; +export { _ as _define_property } from "./_define_property.js"; +export { _ as _dispose } from "./_dispose.js"; +export { _ as _export_star } from "./_export_star.js"; +export { _ as _extends } from "./_extends.js"; +export { _ as _get } from "./_get.js"; +export { _ as _get_prototype_of } from "./_get_prototype_of.js"; +export { _ as _identity } from "./_identity.js"; +export { _ as _inherits } from "./_inherits.js"; +export { _ as _inherits_loose } from "./_inherits_loose.js"; +export { _ as _initializer_define_property } from "./_initializer_define_property.js"; +export { _ as _initializer_warning_helper } from "./_initializer_warning_helper.js"; +export { _ as _instanceof } from "./_instanceof.js"; +export { _ as _interop_require_default } from "./_interop_require_default.js"; +export { _ as _interop_require_wildcard } from "./_interop_require_wildcard.js"; +export { _ as _is_native_function } from "./_is_native_function.js"; +export { _ as _is_native_reflect_construct } from "./_is_native_reflect_construct.js"; +export { _ as _iterable_to_array } from "./_iterable_to_array.js"; +export { _ as _iterable_to_array_limit } from "./_iterable_to_array_limit.js"; +export { _ as _iterable_to_array_limit_loose } from "./_iterable_to_array_limit_loose.js"; +export { _ as _jsx } from "./_jsx.js"; +export { _ as _new_arrow_check } from "./_new_arrow_check.js"; +export { _ as _non_iterable_rest } from "./_non_iterable_rest.js"; +export { _ as _non_iterable_spread } from "./_non_iterable_spread.js"; +export { _ as _object_destructuring_empty } from "./_object_destructuring_empty.js"; +export { _ as _object_spread } from "./_object_spread.js"; +export { _ as _object_spread_props } from "./_object_spread_props.js"; +export { _ as _object_without_properties } from "./_object_without_properties.js"; +export { _ as _object_without_properties_loose } from "./_object_without_properties_loose.js"; +export { _ as _overload_yield } from "./_overload_yield.js"; +export { _ as _possible_constructor_return } from "./_possible_constructor_return.js"; +export { _ as _read_only_error } from "./_read_only_error.js"; +export { _ as _set } from "./_set.js"; +export { _ as _set_prototype_of } from "./_set_prototype_of.js"; +export { _ as _skip_first_generator_next } from "./_skip_first_generator_next.js"; +export { _ as _sliced_to_array } from "./_sliced_to_array.js"; +export { _ as _sliced_to_array_loose } from "./_sliced_to_array_loose.js"; +export { _ as _super_prop_base } from "./_super_prop_base.js"; +export { _ as _tagged_template_literal } from "./_tagged_template_literal.js"; +export { _ as _tagged_template_literal_loose } from "./_tagged_template_literal_loose.js"; +export { _ as _throw } from "./_throw.js"; +export { _ as _to_array } from "./_to_array.js"; +export { _ as _to_consumable_array } from "./_to_consumable_array.js"; +export { _ as _to_primitive } from "./_to_primitive.js"; +export { _ as _to_property_key } from "./_to_property_key.js"; +export { _ as _ts_add_disposable_resource } from "./_ts_add_disposable_resource.js"; +export { _ as _ts_decorate } from "./_ts_decorate.js"; +export { _ as _ts_dispose_resources } from "./_ts_dispose_resources.js"; +export { _ as _ts_generator } from "./_ts_generator.js"; +export { _ as _ts_metadata } from "./_ts_metadata.js"; +export { _ as _ts_param } from "./_ts_param.js"; +export { _ as _ts_rewrite_relative_import_extension } from "./_ts_rewrite_relative_import_extension.js"; +export { _ as _ts_values } from "./_ts_values.js"; +export { _ as _type_of } from "./_type_of.js"; +export { _ as _unsupported_iterable_to_array } from "./_unsupported_iterable_to_array.js"; +export { _ as _update } from "./_update.js"; +export { _ as _using } from "./_using.js"; +export { _ as _using_ctx } from "./_using_ctx.js"; +export { _ as _wrap_async_generator } from "./_wrap_async_generator.js"; +export { _ as _wrap_native_super } from "./_wrap_native_super.js"; +export { _ as _wrap_reg_exp } from "./_wrap_reg_exp.js"; +export { _ as _write_only_error } from "./_write_only_error.js"; diff --git a/node_modules/@swc/helpers/package.json b/node_modules/@swc/helpers/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4143eed153dfd37adac0d6ecc4c52d5619f2d92b --- /dev/null +++ b/node_modules/@swc/helpers/package.json @@ -0,0 +1,705 @@ +{ + "name": "@swc/helpers", + "version": "0.5.23", + "description": "External helpers for the swc project.", + "module": "esm/index.js", + "main": "cjs/index.cjs", + "sideEffects": false, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git", + "directory": "packages/helpers" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "keywords": [ + "swc", + "helpers" + ], + "author": "강동윤 ", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + }, + "homepage": "https://swc.rs", + "type": "module", + "devDependencies": { + "@ast-grep/napi": "^0.40.3", + "dprint": "^0.35.3", + "zx": "^7.2.1" + }, + "dependencies": { + "tslib": "^2.8.0" + }, + "exports": { + "./package.json": "./package.json", + "./esm/*": "./esm/*", + "./cjs/*": "./cjs/*", + "./src/*": "./src/*", + ".": { + "module-sync": "./esm/index.js", + "webpack": "./esm/index.js", + "import": "./esm/index.js", + "default": "./cjs/index.cjs" + }, + "./_": { + "module-sync": "./esm/index.js", + "webpack": "./esm/index.js", + "import": "./esm/index.js", + "default": "./cjs/index.cjs" + }, + "./_/_apply_decorated_descriptor": { + "module-sync": "./esm/_apply_decorated_descriptor.js", + "webpack": "./esm/_apply_decorated_descriptor.js", + "import": "./esm/_apply_decorated_descriptor.js", + "default": "./cjs/_apply_decorated_descriptor.cjs" + }, + "./_/_apply_decs_2203_r": { + "module-sync": "./esm/_apply_decs_2203_r.js", + "webpack": "./esm/_apply_decs_2203_r.js", + "import": "./esm/_apply_decs_2203_r.js", + "default": "./cjs/_apply_decs_2203_r.cjs" + }, + "./_/_apply_decs_2311": { + "module-sync": "./esm/_apply_decs_2311.js", + "webpack": "./esm/_apply_decs_2311.js", + "import": "./esm/_apply_decs_2311.js", + "default": "./cjs/_apply_decs_2311.cjs" + }, + "./_/_array_like_to_array": { + "module-sync": "./esm/_array_like_to_array.js", + "webpack": "./esm/_array_like_to_array.js", + "import": "./esm/_array_like_to_array.js", + "default": "./cjs/_array_like_to_array.cjs" + }, + "./_/_array_with_holes": { + "module-sync": "./esm/_array_with_holes.js", + "webpack": "./esm/_array_with_holes.js", + "import": "./esm/_array_with_holes.js", + "default": "./cjs/_array_with_holes.cjs" + }, + "./_/_array_without_holes": { + "module-sync": "./esm/_array_without_holes.js", + "webpack": "./esm/_array_without_holes.js", + "import": "./esm/_array_without_holes.js", + "default": "./cjs/_array_without_holes.cjs" + }, + "./_/_assert_this_initialized": { + "module-sync": "./esm/_assert_this_initialized.js", + "webpack": "./esm/_assert_this_initialized.js", + "import": "./esm/_assert_this_initialized.js", + "default": "./cjs/_assert_this_initialized.cjs" + }, + "./_/_async_generator": { + "module-sync": "./esm/_async_generator.js", + "webpack": "./esm/_async_generator.js", + "import": "./esm/_async_generator.js", + "default": "./cjs/_async_generator.cjs" + }, + "./_/_async_generator_delegate": { + "module-sync": "./esm/_async_generator_delegate.js", + "webpack": "./esm/_async_generator_delegate.js", + "import": "./esm/_async_generator_delegate.js", + "default": "./cjs/_async_generator_delegate.cjs" + }, + "./_/_async_iterator": { + "module-sync": "./esm/_async_iterator.js", + "webpack": "./esm/_async_iterator.js", + "import": "./esm/_async_iterator.js", + "default": "./cjs/_async_iterator.cjs" + }, + "./_/_async_to_generator": { + "module-sync": "./esm/_async_to_generator.js", + "webpack": "./esm/_async_to_generator.js", + "import": "./esm/_async_to_generator.js", + "default": "./cjs/_async_to_generator.cjs" + }, + "./_/_await_async_generator": { + "module-sync": "./esm/_await_async_generator.js", + "webpack": "./esm/_await_async_generator.js", + "import": "./esm/_await_async_generator.js", + "default": "./cjs/_await_async_generator.cjs" + }, + "./_/_await_value": { + "module-sync": "./esm/_await_value.js", + "webpack": "./esm/_await_value.js", + "import": "./esm/_await_value.js", + "default": "./cjs/_await_value.cjs" + }, + "./_/_call_super": { + "module-sync": "./esm/_call_super.js", + "webpack": "./esm/_call_super.js", + "import": "./esm/_call_super.js", + "default": "./cjs/_call_super.cjs" + }, + "./_/_check_private_redeclaration": { + "module-sync": "./esm/_check_private_redeclaration.js", + "webpack": "./esm/_check_private_redeclaration.js", + "import": "./esm/_check_private_redeclaration.js", + "default": "./cjs/_check_private_redeclaration.cjs" + }, + "./_/_class_apply_descriptor_destructure": { + "module-sync": "./esm/_class_apply_descriptor_destructure.js", + "webpack": "./esm/_class_apply_descriptor_destructure.js", + "import": "./esm/_class_apply_descriptor_destructure.js", + "default": "./cjs/_class_apply_descriptor_destructure.cjs" + }, + "./_/_class_apply_descriptor_get": { + "module-sync": "./esm/_class_apply_descriptor_get.js", + "webpack": "./esm/_class_apply_descriptor_get.js", + "import": "./esm/_class_apply_descriptor_get.js", + "default": "./cjs/_class_apply_descriptor_get.cjs" + }, + "./_/_class_apply_descriptor_set": { + "module-sync": "./esm/_class_apply_descriptor_set.js", + "webpack": "./esm/_class_apply_descriptor_set.js", + "import": "./esm/_class_apply_descriptor_set.js", + "default": "./cjs/_class_apply_descriptor_set.cjs" + }, + "./_/_class_apply_descriptor_update": { + "module-sync": "./esm/_class_apply_descriptor_update.js", + "webpack": "./esm/_class_apply_descriptor_update.js", + "import": "./esm/_class_apply_descriptor_update.js", + "default": "./cjs/_class_apply_descriptor_update.cjs" + }, + "./_/_class_call_check": { + "module-sync": "./esm/_class_call_check.js", + "webpack": "./esm/_class_call_check.js", + "import": "./esm/_class_call_check.js", + "default": "./cjs/_class_call_check.cjs" + }, + "./_/_class_check_private_static_access": { + "module-sync": "./esm/_class_check_private_static_access.js", + "webpack": "./esm/_class_check_private_static_access.js", + "import": "./esm/_class_check_private_static_access.js", + "default": "./cjs/_class_check_private_static_access.cjs" + }, + "./_/_class_check_private_static_field_descriptor": { + "module-sync": "./esm/_class_check_private_static_field_descriptor.js", + "webpack": "./esm/_class_check_private_static_field_descriptor.js", + "import": "./esm/_class_check_private_static_field_descriptor.js", + "default": "./cjs/_class_check_private_static_field_descriptor.cjs" + }, + "./_/_class_extract_field_descriptor": { + "module-sync": "./esm/_class_extract_field_descriptor.js", + "webpack": "./esm/_class_extract_field_descriptor.js", + "import": "./esm/_class_extract_field_descriptor.js", + "default": "./cjs/_class_extract_field_descriptor.cjs" + }, + "./_/_class_name_tdz_error": { + "module-sync": "./esm/_class_name_tdz_error.js", + "webpack": "./esm/_class_name_tdz_error.js", + "import": "./esm/_class_name_tdz_error.js", + "default": "./cjs/_class_name_tdz_error.cjs" + }, + "./_/_class_private_field_destructure": { + "module-sync": "./esm/_class_private_field_destructure.js", + "webpack": "./esm/_class_private_field_destructure.js", + "import": "./esm/_class_private_field_destructure.js", + "default": "./cjs/_class_private_field_destructure.cjs" + }, + "./_/_class_private_field_get": { + "module-sync": "./esm/_class_private_field_get.js", + "webpack": "./esm/_class_private_field_get.js", + "import": "./esm/_class_private_field_get.js", + "default": "./cjs/_class_private_field_get.cjs" + }, + "./_/_class_private_field_init": { + "module-sync": "./esm/_class_private_field_init.js", + "webpack": "./esm/_class_private_field_init.js", + "import": "./esm/_class_private_field_init.js", + "default": "./cjs/_class_private_field_init.cjs" + }, + "./_/_class_private_field_loose_base": { + "module-sync": "./esm/_class_private_field_loose_base.js", + "webpack": "./esm/_class_private_field_loose_base.js", + "import": "./esm/_class_private_field_loose_base.js", + "default": "./cjs/_class_private_field_loose_base.cjs" + }, + "./_/_class_private_field_loose_key": { + "module-sync": "./esm/_class_private_field_loose_key.js", + "webpack": "./esm/_class_private_field_loose_key.js", + "import": "./esm/_class_private_field_loose_key.js", + "default": "./cjs/_class_private_field_loose_key.cjs" + }, + "./_/_class_private_field_set": { + "module-sync": "./esm/_class_private_field_set.js", + "webpack": "./esm/_class_private_field_set.js", + "import": "./esm/_class_private_field_set.js", + "default": "./cjs/_class_private_field_set.cjs" + }, + "./_/_class_private_field_update": { + "module-sync": "./esm/_class_private_field_update.js", + "webpack": "./esm/_class_private_field_update.js", + "import": "./esm/_class_private_field_update.js", + "default": "./cjs/_class_private_field_update.cjs" + }, + "./_/_class_private_method_get": { + "module-sync": "./esm/_class_private_method_get.js", + "webpack": "./esm/_class_private_method_get.js", + "import": "./esm/_class_private_method_get.js", + "default": "./cjs/_class_private_method_get.cjs" + }, + "./_/_class_private_method_init": { + "module-sync": "./esm/_class_private_method_init.js", + "webpack": "./esm/_class_private_method_init.js", + "import": "./esm/_class_private_method_init.js", + "default": "./cjs/_class_private_method_init.cjs" + }, + "./_/_class_private_method_set": { + "module-sync": "./esm/_class_private_method_set.js", + "webpack": "./esm/_class_private_method_set.js", + "import": "./esm/_class_private_method_set.js", + "default": "./cjs/_class_private_method_set.cjs" + }, + "./_/_class_static_private_field_destructure": { + "module-sync": "./esm/_class_static_private_field_destructure.js", + "webpack": "./esm/_class_static_private_field_destructure.js", + "import": "./esm/_class_static_private_field_destructure.js", + "default": "./cjs/_class_static_private_field_destructure.cjs" + }, + "./_/_class_static_private_field_spec_get": { + "module-sync": "./esm/_class_static_private_field_spec_get.js", + "webpack": "./esm/_class_static_private_field_spec_get.js", + "import": "./esm/_class_static_private_field_spec_get.js", + "default": "./cjs/_class_static_private_field_spec_get.cjs" + }, + "./_/_class_static_private_field_spec_set": { + "module-sync": "./esm/_class_static_private_field_spec_set.js", + "webpack": "./esm/_class_static_private_field_spec_set.js", + "import": "./esm/_class_static_private_field_spec_set.js", + "default": "./cjs/_class_static_private_field_spec_set.cjs" + }, + "./_/_class_static_private_field_update": { + "module-sync": "./esm/_class_static_private_field_update.js", + "webpack": "./esm/_class_static_private_field_update.js", + "import": "./esm/_class_static_private_field_update.js", + "default": "./cjs/_class_static_private_field_update.cjs" + }, + "./_/_class_static_private_method_get": { + "module-sync": "./esm/_class_static_private_method_get.js", + "webpack": "./esm/_class_static_private_method_get.js", + "import": "./esm/_class_static_private_method_get.js", + "default": "./cjs/_class_static_private_method_get.cjs" + }, + "./_/_construct": { + "module-sync": "./esm/_construct.js", + "webpack": "./esm/_construct.js", + "import": "./esm/_construct.js", + "default": "./cjs/_construct.cjs" + }, + "./_/_create_class": { + "module-sync": "./esm/_create_class.js", + "webpack": "./esm/_create_class.js", + "import": "./esm/_create_class.js", + "default": "./cjs/_create_class.cjs" + }, + "./_/_create_for_of_iterator_helper_loose": { + "module-sync": "./esm/_create_for_of_iterator_helper_loose.js", + "webpack": "./esm/_create_for_of_iterator_helper_loose.js", + "import": "./esm/_create_for_of_iterator_helper_loose.js", + "default": "./cjs/_create_for_of_iterator_helper_loose.cjs" + }, + "./_/_create_super": { + "module-sync": "./esm/_create_super.js", + "webpack": "./esm/_create_super.js", + "import": "./esm/_create_super.js", + "default": "./cjs/_create_super.cjs" + }, + "./_/_decorate": { + "module-sync": "./esm/_decorate.js", + "webpack": "./esm/_decorate.js", + "import": "./esm/_decorate.js", + "default": "./cjs/_decorate.cjs" + }, + "./_/_defaults": { + "module-sync": "./esm/_defaults.js", + "webpack": "./esm/_defaults.js", + "import": "./esm/_defaults.js", + "default": "./cjs/_defaults.cjs" + }, + "./_/_define_enumerable_properties": { + "module-sync": "./esm/_define_enumerable_properties.js", + "webpack": "./esm/_define_enumerable_properties.js", + "import": "./esm/_define_enumerable_properties.js", + "default": "./cjs/_define_enumerable_properties.cjs" + }, + "./_/_define_property": { + "module-sync": "./esm/_define_property.js", + "webpack": "./esm/_define_property.js", + "import": "./esm/_define_property.js", + "default": "./cjs/_define_property.cjs" + }, + "./_/_dispose": { + "module-sync": "./esm/_dispose.js", + "webpack": "./esm/_dispose.js", + "import": "./esm/_dispose.js", + "default": "./cjs/_dispose.cjs" + }, + "./_/_export_star": { + "module-sync": "./esm/_export_star.js", + "webpack": "./esm/_export_star.js", + "import": "./esm/_export_star.js", + "default": "./cjs/_export_star.cjs" + }, + "./_/_extends": { + "module-sync": "./esm/_extends.js", + "webpack": "./esm/_extends.js", + "import": "./esm/_extends.js", + "default": "./cjs/_extends.cjs" + }, + "./_/_get": { + "module-sync": "./esm/_get.js", + "webpack": "./esm/_get.js", + "import": "./esm/_get.js", + "default": "./cjs/_get.cjs" + }, + "./_/_get_prototype_of": { + "module-sync": "./esm/_get_prototype_of.js", + "webpack": "./esm/_get_prototype_of.js", + "import": "./esm/_get_prototype_of.js", + "default": "./cjs/_get_prototype_of.cjs" + }, + "./_/_identity": { + "module-sync": "./esm/_identity.js", + "webpack": "./esm/_identity.js", + "import": "./esm/_identity.js", + "default": "./cjs/_identity.cjs" + }, + "./_/_inherits": { + "module-sync": "./esm/_inherits.js", + "webpack": "./esm/_inherits.js", + "import": "./esm/_inherits.js", + "default": "./cjs/_inherits.cjs" + }, + "./_/_inherits_loose": { + "module-sync": "./esm/_inherits_loose.js", + "webpack": "./esm/_inherits_loose.js", + "import": "./esm/_inherits_loose.js", + "default": "./cjs/_inherits_loose.cjs" + }, + "./_/_initializer_define_property": { + "module-sync": "./esm/_initializer_define_property.js", + "webpack": "./esm/_initializer_define_property.js", + "import": "./esm/_initializer_define_property.js", + "default": "./cjs/_initializer_define_property.cjs" + }, + "./_/_initializer_warning_helper": { + "module-sync": "./esm/_initializer_warning_helper.js", + "webpack": "./esm/_initializer_warning_helper.js", + "import": "./esm/_initializer_warning_helper.js", + "default": "./cjs/_initializer_warning_helper.cjs" + }, + "./_/_instanceof": { + "module-sync": "./esm/_instanceof.js", + "webpack": "./esm/_instanceof.js", + "import": "./esm/_instanceof.js", + "default": "./cjs/_instanceof.cjs" + }, + "./_/_interop_require_default": { + "module-sync": "./esm/_interop_require_default.js", + "webpack": "./esm/_interop_require_default.js", + "import": "./esm/_interop_require_default.js", + "default": "./cjs/_interop_require_default.cjs" + }, + "./_/_interop_require_wildcard": { + "module-sync": "./esm/_interop_require_wildcard.js", + "webpack": "./esm/_interop_require_wildcard.js", + "import": "./esm/_interop_require_wildcard.js", + "default": "./cjs/_interop_require_wildcard.cjs" + }, + "./_/_is_native_function": { + "module-sync": "./esm/_is_native_function.js", + "webpack": "./esm/_is_native_function.js", + "import": "./esm/_is_native_function.js", + "default": "./cjs/_is_native_function.cjs" + }, + "./_/_is_native_reflect_construct": { + "module-sync": "./esm/_is_native_reflect_construct.js", + "webpack": "./esm/_is_native_reflect_construct.js", + "import": "./esm/_is_native_reflect_construct.js", + "default": "./cjs/_is_native_reflect_construct.cjs" + }, + "./_/_iterable_to_array": { + "module-sync": "./esm/_iterable_to_array.js", + "webpack": "./esm/_iterable_to_array.js", + "import": "./esm/_iterable_to_array.js", + "default": "./cjs/_iterable_to_array.cjs" + }, + "./_/_iterable_to_array_limit": { + "module-sync": "./esm/_iterable_to_array_limit.js", + "webpack": "./esm/_iterable_to_array_limit.js", + "import": "./esm/_iterable_to_array_limit.js", + "default": "./cjs/_iterable_to_array_limit.cjs" + }, + "./_/_iterable_to_array_limit_loose": { + "module-sync": "./esm/_iterable_to_array_limit_loose.js", + "webpack": "./esm/_iterable_to_array_limit_loose.js", + "import": "./esm/_iterable_to_array_limit_loose.js", + "default": "./cjs/_iterable_to_array_limit_loose.cjs" + }, + "./_/_jsx": { + "module-sync": "./esm/_jsx.js", + "webpack": "./esm/_jsx.js", + "import": "./esm/_jsx.js", + "default": "./cjs/_jsx.cjs" + }, + "./_/_new_arrow_check": { + "module-sync": "./esm/_new_arrow_check.js", + "webpack": "./esm/_new_arrow_check.js", + "import": "./esm/_new_arrow_check.js", + "default": "./cjs/_new_arrow_check.cjs" + }, + "./_/_non_iterable_rest": { + "module-sync": "./esm/_non_iterable_rest.js", + "webpack": "./esm/_non_iterable_rest.js", + "import": "./esm/_non_iterable_rest.js", + "default": "./cjs/_non_iterable_rest.cjs" + }, + "./_/_non_iterable_spread": { + "module-sync": "./esm/_non_iterable_spread.js", + "webpack": "./esm/_non_iterable_spread.js", + "import": "./esm/_non_iterable_spread.js", + "default": "./cjs/_non_iterable_spread.cjs" + }, + "./_/_object_destructuring_empty": { + "module-sync": "./esm/_object_destructuring_empty.js", + "webpack": "./esm/_object_destructuring_empty.js", + "import": "./esm/_object_destructuring_empty.js", + "default": "./cjs/_object_destructuring_empty.cjs" + }, + "./_/_object_spread": { + "module-sync": "./esm/_object_spread.js", + "webpack": "./esm/_object_spread.js", + "import": "./esm/_object_spread.js", + "default": "./cjs/_object_spread.cjs" + }, + "./_/_object_spread_props": { + "module-sync": "./esm/_object_spread_props.js", + "webpack": "./esm/_object_spread_props.js", + "import": "./esm/_object_spread_props.js", + "default": "./cjs/_object_spread_props.cjs" + }, + "./_/_object_without_properties": { + "module-sync": "./esm/_object_without_properties.js", + "webpack": "./esm/_object_without_properties.js", + "import": "./esm/_object_without_properties.js", + "default": "./cjs/_object_without_properties.cjs" + }, + "./_/_object_without_properties_loose": { + "module-sync": "./esm/_object_without_properties_loose.js", + "webpack": "./esm/_object_without_properties_loose.js", + "import": "./esm/_object_without_properties_loose.js", + "default": "./cjs/_object_without_properties_loose.cjs" + }, + "./_/_overload_yield": { + "module-sync": "./esm/_overload_yield.js", + "webpack": "./esm/_overload_yield.js", + "import": "./esm/_overload_yield.js", + "default": "./cjs/_overload_yield.cjs" + }, + "./_/_possible_constructor_return": { + "module-sync": "./esm/_possible_constructor_return.js", + "webpack": "./esm/_possible_constructor_return.js", + "import": "./esm/_possible_constructor_return.js", + "default": "./cjs/_possible_constructor_return.cjs" + }, + "./_/_read_only_error": { + "module-sync": "./esm/_read_only_error.js", + "webpack": "./esm/_read_only_error.js", + "import": "./esm/_read_only_error.js", + "default": "./cjs/_read_only_error.cjs" + }, + "./_/_set": { + "module-sync": "./esm/_set.js", + "webpack": "./esm/_set.js", + "import": "./esm/_set.js", + "default": "./cjs/_set.cjs" + }, + "./_/_set_prototype_of": { + "module-sync": "./esm/_set_prototype_of.js", + "webpack": "./esm/_set_prototype_of.js", + "import": "./esm/_set_prototype_of.js", + "default": "./cjs/_set_prototype_of.cjs" + }, + "./_/_skip_first_generator_next": { + "module-sync": "./esm/_skip_first_generator_next.js", + "webpack": "./esm/_skip_first_generator_next.js", + "import": "./esm/_skip_first_generator_next.js", + "default": "./cjs/_skip_first_generator_next.cjs" + }, + "./_/_sliced_to_array": { + "module-sync": "./esm/_sliced_to_array.js", + "webpack": "./esm/_sliced_to_array.js", + "import": "./esm/_sliced_to_array.js", + "default": "./cjs/_sliced_to_array.cjs" + }, + "./_/_sliced_to_array_loose": { + "module-sync": "./esm/_sliced_to_array_loose.js", + "webpack": "./esm/_sliced_to_array_loose.js", + "import": "./esm/_sliced_to_array_loose.js", + "default": "./cjs/_sliced_to_array_loose.cjs" + }, + "./_/_super_prop_base": { + "module-sync": "./esm/_super_prop_base.js", + "webpack": "./esm/_super_prop_base.js", + "import": "./esm/_super_prop_base.js", + "default": "./cjs/_super_prop_base.cjs" + }, + "./_/_tagged_template_literal": { + "module-sync": "./esm/_tagged_template_literal.js", + "webpack": "./esm/_tagged_template_literal.js", + "import": "./esm/_tagged_template_literal.js", + "default": "./cjs/_tagged_template_literal.cjs" + }, + "./_/_tagged_template_literal_loose": { + "module-sync": "./esm/_tagged_template_literal_loose.js", + "webpack": "./esm/_tagged_template_literal_loose.js", + "import": "./esm/_tagged_template_literal_loose.js", + "default": "./cjs/_tagged_template_literal_loose.cjs" + }, + "./_/_throw": { + "module-sync": "./esm/_throw.js", + "webpack": "./esm/_throw.js", + "import": "./esm/_throw.js", + "default": "./cjs/_throw.cjs" + }, + "./_/_to_array": { + "module-sync": "./esm/_to_array.js", + "webpack": "./esm/_to_array.js", + "import": "./esm/_to_array.js", + "default": "./cjs/_to_array.cjs" + }, + "./_/_to_consumable_array": { + "module-sync": "./esm/_to_consumable_array.js", + "webpack": "./esm/_to_consumable_array.js", + "import": "./esm/_to_consumable_array.js", + "default": "./cjs/_to_consumable_array.cjs" + }, + "./_/_to_primitive": { + "module-sync": "./esm/_to_primitive.js", + "webpack": "./esm/_to_primitive.js", + "import": "./esm/_to_primitive.js", + "default": "./cjs/_to_primitive.cjs" + }, + "./_/_to_property_key": { + "module-sync": "./esm/_to_property_key.js", + "webpack": "./esm/_to_property_key.js", + "import": "./esm/_to_property_key.js", + "default": "./cjs/_to_property_key.cjs" + }, + "./_/_ts_add_disposable_resource": { + "module-sync": "./esm/_ts_add_disposable_resource.js", + "webpack": "./esm/_ts_add_disposable_resource.js", + "import": "./esm/_ts_add_disposable_resource.js", + "default": "./cjs/_ts_add_disposable_resource.cjs" + }, + "./_/_ts_decorate": { + "module-sync": "./esm/_ts_decorate.js", + "webpack": "./esm/_ts_decorate.js", + "import": "./esm/_ts_decorate.js", + "default": "./cjs/_ts_decorate.cjs" + }, + "./_/_ts_dispose_resources": { + "module-sync": "./esm/_ts_dispose_resources.js", + "webpack": "./esm/_ts_dispose_resources.js", + "import": "./esm/_ts_dispose_resources.js", + "default": "./cjs/_ts_dispose_resources.cjs" + }, + "./_/_ts_generator": { + "module-sync": "./esm/_ts_generator.js", + "webpack": "./esm/_ts_generator.js", + "import": "./esm/_ts_generator.js", + "default": "./cjs/_ts_generator.cjs" + }, + "./_/_ts_metadata": { + "module-sync": "./esm/_ts_metadata.js", + "webpack": "./esm/_ts_metadata.js", + "import": "./esm/_ts_metadata.js", + "default": "./cjs/_ts_metadata.cjs" + }, + "./_/_ts_param": { + "module-sync": "./esm/_ts_param.js", + "webpack": "./esm/_ts_param.js", + "import": "./esm/_ts_param.js", + "default": "./cjs/_ts_param.cjs" + }, + "./_/_ts_rewrite_relative_import_extension": { + "module-sync": "./esm/_ts_rewrite_relative_import_extension.js", + "webpack": "./esm/_ts_rewrite_relative_import_extension.js", + "import": "./esm/_ts_rewrite_relative_import_extension.js", + "default": "./cjs/_ts_rewrite_relative_import_extension.cjs" + }, + "./_/_ts_values": { + "module-sync": "./esm/_ts_values.js", + "webpack": "./esm/_ts_values.js", + "import": "./esm/_ts_values.js", + "default": "./cjs/_ts_values.cjs" + }, + "./_/_type_of": { + "module-sync": "./esm/_type_of.js", + "webpack": "./esm/_type_of.js", + "import": "./esm/_type_of.js", + "default": "./cjs/_type_of.cjs" + }, + "./_/_unsupported_iterable_to_array": { + "module-sync": "./esm/_unsupported_iterable_to_array.js", + "webpack": "./esm/_unsupported_iterable_to_array.js", + "import": "./esm/_unsupported_iterable_to_array.js", + "default": "./cjs/_unsupported_iterable_to_array.cjs" + }, + "./_/_update": { + "module-sync": "./esm/_update.js", + "webpack": "./esm/_update.js", + "import": "./esm/_update.js", + "default": "./cjs/_update.cjs" + }, + "./_/_using": { + "module-sync": "./esm/_using.js", + "webpack": "./esm/_using.js", + "import": "./esm/_using.js", + "default": "./cjs/_using.cjs" + }, + "./_/_using_ctx": { + "module-sync": "./esm/_using_ctx.js", + "webpack": "./esm/_using_ctx.js", + "import": "./esm/_using_ctx.js", + "default": "./cjs/_using_ctx.cjs" + }, + "./_/_wrap_async_generator": { + "module-sync": "./esm/_wrap_async_generator.js", + "webpack": "./esm/_wrap_async_generator.js", + "import": "./esm/_wrap_async_generator.js", + "default": "./cjs/_wrap_async_generator.cjs" + }, + "./_/_wrap_native_super": { + "module-sync": "./esm/_wrap_native_super.js", + "webpack": "./esm/_wrap_native_super.js", + "import": "./esm/_wrap_native_super.js", + "default": "./cjs/_wrap_native_super.cjs" + }, + "./_/_wrap_reg_exp": { + "module-sync": "./esm/_wrap_reg_exp.js", + "webpack": "./esm/_wrap_reg_exp.js", + "import": "./esm/_wrap_reg_exp.js", + "default": "./cjs/_wrap_reg_exp.cjs" + }, + "./_/_write_only_error": { + "module-sync": "./esm/_write_only_error.js", + "webpack": "./esm/_write_only_error.js", + "import": "./esm/_write_only_error.js", + "default": "./cjs/_write_only_error.cjs" + }, + "./_/index": { + "module-sync": "./esm/index.js", + "webpack": "./esm/index.js", + "import": "./esm/index.js", + "default": "./cjs/index.cjs" + } + }, + "scripts": { + "build": "zx ./scripts/build.js" + } +} \ No newline at end of file diff --git a/node_modules/@swc/helpers/scripts/ast_grep.js b/node_modules/@swc/helpers/scripts/ast_grep.js new file mode 100644 index 0000000000000000000000000000000000000000..a7fea0a7d1a7d81bd6f5a6a7faeedc9f03d67b78 --- /dev/null +++ b/node_modules/@swc/helpers/scripts/ast_grep.js @@ -0,0 +1,218 @@ +import { parseFiles } from "@ast-grep/napi"; +import { chalk, fs, path } from "zx"; +import { errors } from "./errors.js"; +import { root } from "./utils.js"; + +/** + * @typedef {import("@ast-grep/napi").SgNode} SgNode + */ + +/** + * Prepend text to a node + * @param {SgNode} node + * @param {string} text + * @returns {import("@ast-grep/napi").Edit} + */ +function prepend(node, text) { + const index = node.range().start.index; + return { + startPos: index, + endPos: index, + insertedText: text, + }; +} + +export function ast_grep() { + const task_queue = []; + + const task = parseFiles([root("esm")], (err, tree) => { + const filename = path.basename(tree.filename(), ".js"); + if (filename === "index") { + return; + } + + const root_node = tree.root(); + const edits = []; + + edits.push(prepend(root_node, `"use strict";\n\n`)); + + // We have forked _ts_generator from tslib + if (filename.startsWith("_ts") && filename !== "_ts_generator") { + const match = root_node.find(`export { $NAME as _ } from "tslib"`); + if (match) { + const name = match.getMatch("NAME").text(); + edits.push( + match.replace(`exports._ = require("tslib").${name};`), + ); + task_queue.push( + fs.writeFile(root("cjs", `${filename}.cjs`), root_node.commitEdits(edits), { + encoding: "utf-8", + }), + ); + } else { + report_noexport(tree.filename()); + } + return; + } + + // rewrite export named function + const match = root_node.find({ + rule: { + kind: "export_statement", + pattern: "export { $FUNC as _ }", + }, + }); + + if (match) { + const func = match.getMatch("FUNC"); + const func_name = func.text(); + if (func_name !== filename) { + report_export_mismatch(tree.filename(), match); + } + + edits.push( + match.replace(`exports._ = ${func_name};`), + ); + + // since we match the { export x as _ } pattern, + // we need to find the assignment expression from the root + root_node + .findAll({ + rule: { + pattern: func_name, + kind: "identifier", + inside: { kind: "assignment_expression", field: "left" }, + }, + }) + .forEach((node) => { + edits.push( + prepend(node, `exports._ = `), + ); + }); + } else { + report_noexport(tree.filename()); + } + + // rewrite import + root_node + .findAll({ rule: { pattern: `import { _ as $BINDING } from "$SOURCE"` } }) + .forEach((match) => { + const import_binding = match.getMatch("BINDING").text(); + const import_source = match.getMatch("SOURCE").text(); + + const import_basename = path.basename(import_source, ".js"); + + if (import_binding !== import_basename) { + report_import_mismatch(tree.filename(), match); + } + + edits.push( + match.replace(`var ${import_binding} = require("./${import_binding}.cjs");`), + ); + + root_node + .findAll({ + rule: { + pattern: import_binding, + kind: "identifier", + inside: { + not: { + kind: "import_specifier", + }, + }, + }, + }) + .forEach((node) => { + edits.push( + node.replace(`${node.text()}._`), + ); + }); + }); + + task_queue.push( + fs.writeFile(root("cjs", `${filename}.cjs`), root_node.commitEdits(edits), { + encoding: "utf-8", + }), + ); + }); + + task_queue.push(task); + + return task_queue; +} + +/** + * @param {string} filename + * @param {SgNode} match + */ +function report_export_mismatch(filename, match) { + const func = match.getMatch("FUNC"); + const func_range = func.range(); + + const text = match.text().split("\n"); + const offset = func_range.start.line - match.range().start.line; + + text.splice( + offset + 1, + text.length, + chalk.red( + [ + " ".repeat(func_range.start.column), + "^".repeat(func_range.end.column - func_range.start.column), + ] + .join(""), + ), + ); + + errors.push( + [ + `${chalk.bold.red("error")}: mismatch exported function name.`, + "", + `${chalk.blue("-->")} ${filename}:${func_range.start.line + 1}:${func_range.start.column + 1}`, + "", + ...text, + "", + `${chalk.bold("note:")} The exported name should be the same as the filename.`, + "", + ] + .join("\n"), + ); +} + +/** + * @param {string} filename + * @param {SgNode} match + */ +function report_import_mismatch(filename, match) { + const binding_range = match.getMatch("BINDING").range(); + const source_range = match.getMatch("SOURCE").range(); + + errors.push( + [ + `${chalk.bold.red("error")}: mismatch imported binding name.`, + "", + `${chalk.blue("-->")} ${filename}:${match.range().start.line + 1}`, + "", + match.text(), + [ + " ".repeat(binding_range.start.column), + chalk.red("^".repeat(binding_range.end.column - binding_range.start.column)), + " ".repeat(source_range.start.column - binding_range.end.column), + chalk.blue("-".repeat(source_range.end.column - source_range.start.column)), + ] + .join(""), + `${chalk.bold("note:")} The imported binding name should be the same as the import source basename.`, + "", + ] + .join("\n"), + ); +} + +/** + * @param {string} filename + */ +function report_noexport(filename) { + errors.push( + [`${chalk.bold.red("error")}: exported name not found`, `${chalk.blue("-->")} ${filename}`].join("\n"), + ); +} diff --git a/node_modules/@swc/helpers/scripts/build.js b/node_modules/@swc/helpers/scripts/build.js new file mode 100644 index 0000000000000000000000000000000000000000..32005a8331e8477509bc150e1b7ef136b8bd1e01 --- /dev/null +++ b/node_modules/@swc/helpers/scripts/build.js @@ -0,0 +1,133 @@ +#!/usr/bin/env zx + +import { $, fs, glob } from "zx"; +import { ast_grep } from "./ast_grep.js"; +import { errors } from "./errors.js"; +import { root } from "./utils.js"; + +// clear generated content +await Promise.all([ + fs.remove(root("cjs")), + fs.remove(root("_")), + fs.remove(root("src")), +]); + +let modules = await glob("*.js", { cwd: root("esm") }); + +const task_queue = []; + +const NO_MODIFY = [ + "/* This file is automatically generated and should not be manually edited. */", + "/* To modify this file, please run the `npm run build` command instead. */", +]; + +// generate index.js +const indexESM = [...NO_MODIFY, ""]; + +const indexCJS = [`"use strict";`, "", ...NO_MODIFY, ""]; + +const cjs_export_list = []; +const cjs_module_lexer = []; + +const main_package_json = fs.readJSONSync(root("package.json")); + +main_package_json.exports = { + "./package.json": "./package.json", + "./esm/*": "./esm/*", + "./cjs/*": "./cjs/*", + "./src/*": "./src/*", + ".": { + "module-sync": "./esm/index.js", + webpack: "./esm/index.js", + import: "./esm/index.js", + default: "./cjs/index.cjs", + }, + "./_": { + "module-sync": "./esm/index.js", + webpack: "./esm/index.js", + import: "./esm/index.js", + default: "./cjs/index.cjs", + }, +}; + +modules.forEach((p) => { + const importBinding = p.slice(0, -3); + + main_package_json.exports[`./_/${importBinding}`] = { + "module-sync": `./esm/${importBinding}.js`, + webpack: `./esm/${importBinding}.js`, + import: `./esm/${importBinding}.js`, + default: `./cjs/${importBinding}.cjs`, + }; + + const alias_package = { + main: `../../cjs/${importBinding}.cjs`, + module: `../../esm/${importBinding}.js`, + }; + task_queue.push( + fs.outputJSON(root("_", importBinding, "package.json"), alias_package, { + encoding: "utf-8", + spaces: 4, + }), + ); + + if (importBinding === "index") { + return; + } + + task_queue.push( + fs.outputFile(root("src", `${importBinding}.mjs`), re_export_esm(importBinding), { + encoding: "utf-8", + }), + ); + + indexESM.push(`export { _ as ${importBinding} } from "./${importBinding}.js";`); + + cjs_module_lexer.push(`${importBinding}: null,`); + cjs_export_list.push(`get ${importBinding}() { + return require("./${importBinding}.cjs")._; + },`); +}); + +indexCJS.push( + `0 && (module.exports = {`, + "/* @Annotate_start: the CommonJS named exports for ESM import in node */", + ...cjs_module_lexer, + "/* @Annotate_end */", + `});`, + `module.exports = {`, + ...cjs_export_list, + `};`, +); + +task_queue.push( + fs.outputJSON(root("package.json"), main_package_json, { spaces: 4 }), + fs.outputFile(root("esm", "index.js"), indexESM.join("\n") + "\n", { + encoding: "utf-8", + }), + fs.outputFile(root("cjs", "index.cjs"), indexCJS.join("\n") + "\n", { + encoding: "utf-8", + }), + fs.outputFile(root("src", "index.mjs"), `export * from "../esm/index.js"`, { + encoding: "utf-8", + }), +); + +task_queue.push(...ast_grep()); + +await Promise.all(task_queue); + +if (errors.length > 0) { + errors.forEach((e) => { + console.error(e); + }); + process.exitCode = 1; +} else { + $.cwd = root("."); + await $`dprint fmt`; + await $`dprint fmt "scripts/*.js" -c scripts/.dprint.json`; +} + +function re_export_esm(importBinding) { + return `export { _ as default } from "../esm/${importBinding}.js"`; +} diff --git a/node_modules/@swc/helpers/scripts/errors.js b/node_modules/@swc/helpers/scripts/errors.js new file mode 100644 index 0000000000000000000000000000000000000000..b5b3c15937ed8898692244cccea7240dcaae1ebb --- /dev/null +++ b/node_modules/@swc/helpers/scripts/errors.js @@ -0,0 +1 @@ +export const errors = []; diff --git a/node_modules/@swc/helpers/scripts/utils.js b/node_modules/@swc/helpers/scripts/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..479b100ce30bd88647aed1475be95fef2129e45f --- /dev/null +++ b/node_modules/@swc/helpers/scripts/utils.js @@ -0,0 +1,3 @@ +export function root(...p) { + return path.resolve(__dirname, "..", ...p); +} diff --git a/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs b/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e4839a154f839c83f9ad9e3caa3eb98acad12bc7 --- /dev/null +++ b/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_apply_decorated_descriptor.js"; diff --git a/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs b/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c10cb5619351b9460f740db5a4811f09b15cbdf2 --- /dev/null +++ b/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_apply_decs_2203_r.js"; diff --git a/node_modules/@swc/helpers/src/_apply_decs_2311.mjs b/node_modules/@swc/helpers/src/_apply_decs_2311.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b9aec565d3410891aa9af033c85a2907f4497c5f --- /dev/null +++ b/node_modules/@swc/helpers/src/_apply_decs_2311.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_apply_decs_2311.js"; diff --git a/node_modules/@swc/helpers/src/_array_like_to_array.mjs b/node_modules/@swc/helpers/src/_array_like_to_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7691b3201856cb14d8064c34ff6d4a356d79d972 --- /dev/null +++ b/node_modules/@swc/helpers/src/_array_like_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_array_like_to_array.js"; diff --git a/node_modules/@swc/helpers/src/_array_with_holes.mjs b/node_modules/@swc/helpers/src/_array_with_holes.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1a622996dd2107d07ccf6a97a3b46b21242c977d --- /dev/null +++ b/node_modules/@swc/helpers/src/_array_with_holes.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_array_with_holes.js"; diff --git a/node_modules/@swc/helpers/src/_array_without_holes.mjs b/node_modules/@swc/helpers/src/_array_without_holes.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ee2f265ee78d338cc2e4a42c5f766c3c6394323f --- /dev/null +++ b/node_modules/@swc/helpers/src/_array_without_holes.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_array_without_holes.js"; diff --git a/node_modules/@swc/helpers/src/_assert_this_initialized.mjs b/node_modules/@swc/helpers/src/_assert_this_initialized.mjs new file mode 100644 index 0000000000000000000000000000000000000000..36772535e42670f86bbb351b24ef5b402ef237de --- /dev/null +++ b/node_modules/@swc/helpers/src/_assert_this_initialized.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_assert_this_initialized.js"; diff --git a/node_modules/@swc/helpers/src/_async_generator.mjs b/node_modules/@swc/helpers/src/_async_generator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b3ced536baf839a663df32be644a3206c18c3bb8 --- /dev/null +++ b/node_modules/@swc/helpers/src/_async_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_generator.js"; diff --git a/node_modules/@swc/helpers/src/_async_generator_delegate.mjs b/node_modules/@swc/helpers/src/_async_generator_delegate.mjs new file mode 100644 index 0000000000000000000000000000000000000000..29dd8b2230e90da9b8560d9ba238b3b1d9a3a221 --- /dev/null +++ b/node_modules/@swc/helpers/src/_async_generator_delegate.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_generator_delegate.js"; diff --git a/node_modules/@swc/helpers/src/_async_iterator.mjs b/node_modules/@swc/helpers/src/_async_iterator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d1300321c17bb8934c7e6cc42a559721ecb1c01b --- /dev/null +++ b/node_modules/@swc/helpers/src/_async_iterator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_iterator.js"; diff --git a/node_modules/@swc/helpers/src/_async_to_generator.mjs b/node_modules/@swc/helpers/src/_async_to_generator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..18adef559169baa84723edc8f954b70489badd1d --- /dev/null +++ b/node_modules/@swc/helpers/src/_async_to_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_to_generator.js"; diff --git a/node_modules/@swc/helpers/src/_await_async_generator.mjs b/node_modules/@swc/helpers/src/_await_async_generator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..da13a9fbdaca80544dae905cc12b77935706768f --- /dev/null +++ b/node_modules/@swc/helpers/src/_await_async_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_await_async_generator.js"; diff --git a/node_modules/@swc/helpers/src/_await_value.mjs b/node_modules/@swc/helpers/src/_await_value.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3c2416176d572acbb144c717c5a4b0ed05c43b13 --- /dev/null +++ b/node_modules/@swc/helpers/src/_await_value.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_await_value.js"; diff --git a/node_modules/@swc/helpers/src/_call_super.mjs b/node_modules/@swc/helpers/src/_call_super.mjs new file mode 100644 index 0000000000000000000000000000000000000000..da6071660c392fe04dda61a1aead8f8763db20c3 --- /dev/null +++ b/node_modules/@swc/helpers/src/_call_super.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_call_super.js"; diff --git a/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs b/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7d78cfe173fc3eccb36c19126752a142c3ab046a --- /dev/null +++ b/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_check_private_redeclaration.js"; diff --git a/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs b/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b606b53792b91b99a02af6d63c7c42dc0d0dbe0b --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_destructure.js"; diff --git a/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs b/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f888b6bef005107aef6ece6b311b532cadb0e908 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_get.js"; diff --git a/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs b/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fb0067998aa7817f7e3701802a61e5e9f274d3dd --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_set.js"; diff --git a/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs b/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e7a9915b2f9d7b0671716834e1d76141580fa2fa --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_update.js"; diff --git a/node_modules/@swc/helpers/src/_class_call_check.mjs b/node_modules/@swc/helpers/src/_class_call_check.mjs new file mode 100644 index 0000000000000000000000000000000000000000..220c3c81f0ff4d3e955d0d2fa929f75dde407543 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_call_check.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_call_check.js"; diff --git a/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs b/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a52a4d8d6d109fba265e9e36a520532de81b1b67 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_check_private_static_access.js"; diff --git a/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs b/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cb8a623dc776747525ad601bd98ff874653eec18 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_check_private_static_field_descriptor.js"; diff --git a/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs b/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7586ce8211cd95b0da1acf472fcacb0409574472 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_extract_field_descriptor.js"; diff --git a/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs b/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c211d7fb5d51e41913d960f7bc689a032a3c595a --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_name_tdz_error.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs b/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b06b763f8bdc824e2ea0c24de0760201eb3dbb9e --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_destructure.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_get.mjs b/node_modules/@swc/helpers/src/_class_private_field_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1f8854a81cd2c9ecc4aac02e58498eb1a78e59cb --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_get.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_init.mjs b/node_modules/@swc/helpers/src/_class_private_field_init.mjs new file mode 100644 index 0000000000000000000000000000000000000000..48d4d17b93a515e39518a58f00adeca0c724fd58 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_init.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_init.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs b/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a10b033f37bb151dbaa031a375c1e9b72b816337 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_loose_base.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs b/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6e80fd9835d817043f1e7c7a8c44ba8ccdb7018b --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_loose_key.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_set.mjs b/node_modules/@swc/helpers/src/_class_private_field_set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cb54a1be34aebb9df26979d96db4980bb81f1ace --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_set.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_field_update.mjs b/node_modules/@swc/helpers/src/_class_private_field_update.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c5f0c633e0ee9d8b3cbe49fc51ed1be62b3551ad --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_field_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_update.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_method_get.mjs b/node_modules/@swc/helpers/src/_class_private_method_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9f5248a53d824b6f0fbf0b1c57b6cd46c89b05d6 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_method_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_method_get.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_method_init.mjs b/node_modules/@swc/helpers/src/_class_private_method_init.mjs new file mode 100644 index 0000000000000000000000000000000000000000..afce453b890ae1fd887e3920a5203507c6c28677 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_method_init.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_method_init.js"; diff --git a/node_modules/@swc/helpers/src/_class_private_method_set.mjs b/node_modules/@swc/helpers/src/_class_private_method_set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..327252dae17c7e4e2348081595b5af7ad9b41fca --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_private_method_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_method_set.js"; diff --git a/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs b/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c35376d2dc8eee18ddcb3b322d423734172a70dc --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_destructure.js"; diff --git a/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs b/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0cc7854d6e0a5e2d8d46b06a9213eec6652ecec2 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_spec_get.js"; diff --git a/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs b/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..208cf9730a3c2265dccf8e9c42a6feace7fa1fb6 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_spec_set.js"; diff --git a/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs b/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs new file mode 100644 index 0000000000000000000000000000000000000000..87e043817674aa712f46736b85e2c27fd8835908 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_update.js"; diff --git a/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs b/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2241a1a84a2863cbd974e94efd5647703bfa0bf9 --- /dev/null +++ b/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_method_get.js"; diff --git a/node_modules/@swc/helpers/src/_construct.mjs b/node_modules/@swc/helpers/src/_construct.mjs new file mode 100644 index 0000000000000000000000000000000000000000..54acb64d632828fb35c0273bdb7427262a79a9f5 --- /dev/null +++ b/node_modules/@swc/helpers/src/_construct.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_construct.js"; diff --git a/node_modules/@swc/helpers/src/_create_class.mjs b/node_modules/@swc/helpers/src/_create_class.mjs new file mode 100644 index 0000000000000000000000000000000000000000..78c2af2273b8198e611978bec75b3e27b9912f89 --- /dev/null +++ b/node_modules/@swc/helpers/src/_create_class.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_create_class.js"; diff --git a/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs b/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..303e056c5a26660873b4566d546bb02785207213 --- /dev/null +++ b/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_create_for_of_iterator_helper_loose.js"; diff --git a/node_modules/@swc/helpers/src/_create_super.mjs b/node_modules/@swc/helpers/src/_create_super.mjs new file mode 100644 index 0000000000000000000000000000000000000000..44a06bfe18eaa069c86c7b2c85d482a155f06a12 --- /dev/null +++ b/node_modules/@swc/helpers/src/_create_super.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_create_super.js"; diff --git a/node_modules/@swc/helpers/src/_decorate.mjs b/node_modules/@swc/helpers/src/_decorate.mjs new file mode 100644 index 0000000000000000000000000000000000000000..087899164b69fef93291302e293475dde067c99e --- /dev/null +++ b/node_modules/@swc/helpers/src/_decorate.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_decorate.js"; diff --git a/node_modules/@swc/helpers/src/_defaults.mjs b/node_modules/@swc/helpers/src/_defaults.mjs new file mode 100644 index 0000000000000000000000000000000000000000..624e68460fb3ea1e0fafae83db5dfc40a448ecf6 --- /dev/null +++ b/node_modules/@swc/helpers/src/_defaults.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_defaults.js"; diff --git a/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs b/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b6a87fc8db4d396bbf555c31fd319693b0e2f1ce --- /dev/null +++ b/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_define_enumerable_properties.js"; diff --git a/node_modules/@swc/helpers/src/_define_property.mjs b/node_modules/@swc/helpers/src/_define_property.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b60b2c824d6438cddd671ac08e21777adf1917ef --- /dev/null +++ b/node_modules/@swc/helpers/src/_define_property.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_define_property.js"; diff --git a/node_modules/@swc/helpers/src/_dispose.mjs b/node_modules/@swc/helpers/src/_dispose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2f217e87221b1bed86ef2014d60ca9cdd5f8f023 --- /dev/null +++ b/node_modules/@swc/helpers/src/_dispose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_dispose.js"; diff --git a/node_modules/@swc/helpers/src/_export_star.mjs b/node_modules/@swc/helpers/src/_export_star.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c7011c2f61a7f4173912a29a62bd7109cf089ca8 --- /dev/null +++ b/node_modules/@swc/helpers/src/_export_star.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_export_star.js"; diff --git a/node_modules/@swc/helpers/src/_extends.mjs b/node_modules/@swc/helpers/src/_extends.mjs new file mode 100644 index 0000000000000000000000000000000000000000..804a28bab3d1cd3e01dfc065af3afd40214ed08d --- /dev/null +++ b/node_modules/@swc/helpers/src/_extends.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_extends.js"; diff --git a/node_modules/@swc/helpers/src/_get.mjs b/node_modules/@swc/helpers/src/_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fae4b22b5279e24a7c15ae631a7f4b56fa759784 --- /dev/null +++ b/node_modules/@swc/helpers/src/_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_get.js"; diff --git a/node_modules/@swc/helpers/src/_get_prototype_of.mjs b/node_modules/@swc/helpers/src/_get_prototype_of.mjs new file mode 100644 index 0000000000000000000000000000000000000000..57e820cebb170ec6831f6c73dd137a7a10e4a783 --- /dev/null +++ b/node_modules/@swc/helpers/src/_get_prototype_of.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_get_prototype_of.js"; diff --git a/node_modules/@swc/helpers/src/_identity.mjs b/node_modules/@swc/helpers/src/_identity.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5ab4a08a7e7207e27cfcc921940a069757d73e8e --- /dev/null +++ b/node_modules/@swc/helpers/src/_identity.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_identity.js"; diff --git a/node_modules/@swc/helpers/src/_inherits.mjs b/node_modules/@swc/helpers/src/_inherits.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d5e3767700736ad2a5305d6138ca93d9bb704d2c --- /dev/null +++ b/node_modules/@swc/helpers/src/_inherits.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_inherits.js"; diff --git a/node_modules/@swc/helpers/src/_inherits_loose.mjs b/node_modules/@swc/helpers/src/_inherits_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4f5187d98db0c35363d36e5ffaaaf049ea04f673 --- /dev/null +++ b/node_modules/@swc/helpers/src/_inherits_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_inherits_loose.js"; diff --git a/node_modules/@swc/helpers/src/_initializer_define_property.mjs b/node_modules/@swc/helpers/src/_initializer_define_property.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fa0a3b8e2e1de0caef9b8d9f42e711a1b743ca89 --- /dev/null +++ b/node_modules/@swc/helpers/src/_initializer_define_property.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_initializer_define_property.js"; diff --git a/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs b/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f9251ab5bb30a1d403daf2c1297a065b22dd2bcb --- /dev/null +++ b/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_initializer_warning_helper.js"; diff --git a/node_modules/@swc/helpers/src/_instanceof.mjs b/node_modules/@swc/helpers/src/_instanceof.mjs new file mode 100644 index 0000000000000000000000000000000000000000..609f78692e0778dacf43f68178b5680800535ce5 --- /dev/null +++ b/node_modules/@swc/helpers/src/_instanceof.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_instanceof.js"; diff --git a/node_modules/@swc/helpers/src/_interop_require_default.mjs b/node_modules/@swc/helpers/src/_interop_require_default.mjs new file mode 100644 index 0000000000000000000000000000000000000000..454ce7154f35618f3d90529075a33705c1ec252c --- /dev/null +++ b/node_modules/@swc/helpers/src/_interop_require_default.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_interop_require_default.js"; diff --git a/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs b/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs new file mode 100644 index 0000000000000000000000000000000000000000..07f7a7ed50d966a913b170c51e2788fcd2303a3b --- /dev/null +++ b/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_interop_require_wildcard.js"; diff --git a/node_modules/@swc/helpers/src/_is_native_function.mjs b/node_modules/@swc/helpers/src/_is_native_function.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8bacb3ab51baf5b97c00041a13b8941f36398175 --- /dev/null +++ b/node_modules/@swc/helpers/src/_is_native_function.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_is_native_function.js"; diff --git a/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs b/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7c0394d9c46319c4cc90b44ac782f0eb40ce3a0c --- /dev/null +++ b/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_is_native_reflect_construct.js"; diff --git a/node_modules/@swc/helpers/src/_iterable_to_array.mjs b/node_modules/@swc/helpers/src/_iterable_to_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4baf94afb72d4e69c75859c799c435fa319380f4 --- /dev/null +++ b/node_modules/@swc/helpers/src/_iterable_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_iterable_to_array.js"; diff --git a/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs b/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs new file mode 100644 index 0000000000000000000000000000000000000000..45f70f503fdfc7a1b748ff477df426e697553a9c --- /dev/null +++ b/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_iterable_to_array_limit.js"; diff --git a/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs b/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..400a9e019fa62d55e697898982b8416fc4b8db80 --- /dev/null +++ b/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_iterable_to_array_limit_loose.js"; diff --git a/node_modules/@swc/helpers/src/_jsx.mjs b/node_modules/@swc/helpers/src/_jsx.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8b0646a0f85ffce214b69ddc1eabb738650aa99c --- /dev/null +++ b/node_modules/@swc/helpers/src/_jsx.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_jsx.js"; diff --git a/node_modules/@swc/helpers/src/_new_arrow_check.mjs b/node_modules/@swc/helpers/src/_new_arrow_check.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e694d150cf518a9a826c74be35233e907346d2e5 --- /dev/null +++ b/node_modules/@swc/helpers/src/_new_arrow_check.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_new_arrow_check.js"; diff --git a/node_modules/@swc/helpers/src/_non_iterable_rest.mjs b/node_modules/@swc/helpers/src/_non_iterable_rest.mjs new file mode 100644 index 0000000000000000000000000000000000000000..83218078cb83ac7ad740d4991143db7a5237074b --- /dev/null +++ b/node_modules/@swc/helpers/src/_non_iterable_rest.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_non_iterable_rest.js"; diff --git a/node_modules/@swc/helpers/src/_non_iterable_spread.mjs b/node_modules/@swc/helpers/src/_non_iterable_spread.mjs new file mode 100644 index 0000000000000000000000000000000000000000..12993f133d0d19cafe2279dc1dc30b43ecfcde7b --- /dev/null +++ b/node_modules/@swc/helpers/src/_non_iterable_spread.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_non_iterable_spread.js"; diff --git a/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs b/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b8aed9ce98d6933a22b9951013eab1315dd558d3 --- /dev/null +++ b/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_destructuring_empty.js"; diff --git a/node_modules/@swc/helpers/src/_object_spread.mjs b/node_modules/@swc/helpers/src/_object_spread.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9b536f58d64da93abc86b8d1050baabe8f79133d --- /dev/null +++ b/node_modules/@swc/helpers/src/_object_spread.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_spread.js"; diff --git a/node_modules/@swc/helpers/src/_object_spread_props.mjs b/node_modules/@swc/helpers/src/_object_spread_props.mjs new file mode 100644 index 0000000000000000000000000000000000000000..799de3f688769af054dabb5f16accc42e1713c45 --- /dev/null +++ b/node_modules/@swc/helpers/src/_object_spread_props.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_spread_props.js"; diff --git a/node_modules/@swc/helpers/src/_object_without_properties.mjs b/node_modules/@swc/helpers/src/_object_without_properties.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f0ce12c6c1d4060268f13d452cb98efccff35df7 --- /dev/null +++ b/node_modules/@swc/helpers/src/_object_without_properties.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_without_properties.js"; diff --git a/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs b/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f6f26696e521cd5959979a55b2be6c97c804e1f3 --- /dev/null +++ b/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_without_properties_loose.js"; diff --git a/node_modules/@swc/helpers/src/_overload_yield.mjs b/node_modules/@swc/helpers/src/_overload_yield.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d854c354454ebc5620c1cc556a092b867f5f11c3 --- /dev/null +++ b/node_modules/@swc/helpers/src/_overload_yield.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_overload_yield.js"; diff --git a/node_modules/@swc/helpers/src/_possible_constructor_return.mjs b/node_modules/@swc/helpers/src/_possible_constructor_return.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ee9657d256cfa0ce49ba8fa14b3d718fd6ae17e9 --- /dev/null +++ b/node_modules/@swc/helpers/src/_possible_constructor_return.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_possible_constructor_return.js"; diff --git a/node_modules/@swc/helpers/src/_read_only_error.mjs b/node_modules/@swc/helpers/src/_read_only_error.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3e95329b1430b6d42833466404eac08f997bd3b5 --- /dev/null +++ b/node_modules/@swc/helpers/src/_read_only_error.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_read_only_error.js"; diff --git a/node_modules/@swc/helpers/src/_set.mjs b/node_modules/@swc/helpers/src/_set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5cc033773f86b25240a88b6eaf3e68c7611b90d6 --- /dev/null +++ b/node_modules/@swc/helpers/src/_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_set.js"; diff --git a/node_modules/@swc/helpers/src/_set_prototype_of.mjs b/node_modules/@swc/helpers/src/_set_prototype_of.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f244856c06d0e81b10b9e2af893ec186d13bbc7c --- /dev/null +++ b/node_modules/@swc/helpers/src/_set_prototype_of.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_set_prototype_of.js"; diff --git a/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs b/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f437b3ce8d22a24157f65ae86f68fdcc6b0d46e6 --- /dev/null +++ b/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_skip_first_generator_next.js"; diff --git a/node_modules/@swc/helpers/src/_sliced_to_array.mjs b/node_modules/@swc/helpers/src/_sliced_to_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..34f97233d08a7aca1b05c49c633d8082288f0e16 --- /dev/null +++ b/node_modules/@swc/helpers/src/_sliced_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_sliced_to_array.js"; diff --git a/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs b/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..116211bc5e8d53fb6df1b836ac6bb968c2a11992 --- /dev/null +++ b/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_sliced_to_array_loose.js"; diff --git a/node_modules/@swc/helpers/src/_super_prop_base.mjs b/node_modules/@swc/helpers/src/_super_prop_base.mjs new file mode 100644 index 0000000000000000000000000000000000000000..25a1b4b471aa70874f7903b58213fa215f2b4007 --- /dev/null +++ b/node_modules/@swc/helpers/src/_super_prop_base.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_super_prop_base.js"; diff --git a/node_modules/@swc/helpers/src/_tagged_template_literal.mjs b/node_modules/@swc/helpers/src/_tagged_template_literal.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ea788727152e810036920619a7d3206d53acf5b9 --- /dev/null +++ b/node_modules/@swc/helpers/src/_tagged_template_literal.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_tagged_template_literal.js"; diff --git a/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs b/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f65c3bb96cb74697023650709cb99c917af31626 --- /dev/null +++ b/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_tagged_template_literal_loose.js"; diff --git a/node_modules/@swc/helpers/src/_throw.mjs b/node_modules/@swc/helpers/src/_throw.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a0b50e049821d3616ee6cb659d28eaa153ceddfd --- /dev/null +++ b/node_modules/@swc/helpers/src/_throw.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_throw.js"; diff --git a/node_modules/@swc/helpers/src/_to_array.mjs b/node_modules/@swc/helpers/src/_to_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d42cba535fc0174c5574b916c711790400350f86 --- /dev/null +++ b/node_modules/@swc/helpers/src/_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_array.js"; diff --git a/node_modules/@swc/helpers/src/_to_consumable_array.mjs b/node_modules/@swc/helpers/src/_to_consumable_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e23f2ebc610b6fcca2eb82191ebe59e080c8ca78 --- /dev/null +++ b/node_modules/@swc/helpers/src/_to_consumable_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_consumable_array.js"; diff --git a/node_modules/@swc/helpers/src/_to_primitive.mjs b/node_modules/@swc/helpers/src/_to_primitive.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0d4a248636fc7338159a5b0368c35fec30bbed51 --- /dev/null +++ b/node_modules/@swc/helpers/src/_to_primitive.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_primitive.js"; diff --git a/node_modules/@swc/helpers/src/_to_property_key.mjs b/node_modules/@swc/helpers/src/_to_property_key.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7b767073fe22d03acba912f6ea0fd6676dd7d4e0 --- /dev/null +++ b/node_modules/@swc/helpers/src/_to_property_key.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_property_key.js"; diff --git a/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs b/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b059656ed4f603ce9f2e0e6604b5d461edbd0922 --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_add_disposable_resource.js"; diff --git a/node_modules/@swc/helpers/src/_ts_decorate.mjs b/node_modules/@swc/helpers/src/_ts_decorate.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2d7763f3516b49384460263ea06c64f127a04c9c --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_decorate.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_decorate.js"; diff --git a/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs b/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ba5ec13678ca62b0644c48cbdf0a98644714bae0 --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_dispose_resources.js"; diff --git a/node_modules/@swc/helpers/src/_ts_generator.mjs b/node_modules/@swc/helpers/src/_ts_generator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f595f6d8753215b2a79f2da4cf49f184d2daf5ba --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_generator.js"; diff --git a/node_modules/@swc/helpers/src/_ts_metadata.mjs b/node_modules/@swc/helpers/src/_ts_metadata.mjs new file mode 100644 index 0000000000000000000000000000000000000000..424457eba9d0fa2c29b2ed25b383808841f2187f --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_metadata.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_metadata.js"; diff --git a/node_modules/@swc/helpers/src/_ts_param.mjs b/node_modules/@swc/helpers/src/_ts_param.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1806317955415fb518eca6bb4cae127028347142 --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_param.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_param.js"; diff --git a/node_modules/@swc/helpers/src/_ts_rewrite_relative_import_extension.mjs b/node_modules/@swc/helpers/src/_ts_rewrite_relative_import_extension.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d135817f9749b8009239f72d26adf478ed815d59 --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_rewrite_relative_import_extension.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_rewrite_relative_import_extension.js"; diff --git a/node_modules/@swc/helpers/src/_ts_values.mjs b/node_modules/@swc/helpers/src/_ts_values.mjs new file mode 100644 index 0000000000000000000000000000000000000000..126c78379e63dd43b24acbcc25f6e0599b2eec44 --- /dev/null +++ b/node_modules/@swc/helpers/src/_ts_values.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_values.js"; diff --git a/node_modules/@swc/helpers/src/_type_of.mjs b/node_modules/@swc/helpers/src/_type_of.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4f8a93659e2c913833a8bdcc9018f4e878c6b2f1 --- /dev/null +++ b/node_modules/@swc/helpers/src/_type_of.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_type_of.js"; diff --git a/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs b/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9e4222212cd297cb99ae171756f0aae9f3e723d8 --- /dev/null +++ b/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_unsupported_iterable_to_array.js"; diff --git a/node_modules/@swc/helpers/src/_update.mjs b/node_modules/@swc/helpers/src/_update.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6adb4a428daadcf4d8a340f101cd0da3afa19b92 --- /dev/null +++ b/node_modules/@swc/helpers/src/_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_update.js"; diff --git a/node_modules/@swc/helpers/src/_using.mjs b/node_modules/@swc/helpers/src/_using.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f71681556fd04759dc6b2d0e0279318f172d4c9a --- /dev/null +++ b/node_modules/@swc/helpers/src/_using.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_using.js"; diff --git a/node_modules/@swc/helpers/src/_using_ctx.mjs b/node_modules/@swc/helpers/src/_using_ctx.mjs new file mode 100644 index 0000000000000000000000000000000000000000..87e80979e1a8fed77a193cc930bbbccd014ed668 --- /dev/null +++ b/node_modules/@swc/helpers/src/_using_ctx.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_using_ctx.js"; diff --git a/node_modules/@swc/helpers/src/_wrap_async_generator.mjs b/node_modules/@swc/helpers/src/_wrap_async_generator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..44acb1ab4aac6c7aa242be492b621cdbb4418ded --- /dev/null +++ b/node_modules/@swc/helpers/src/_wrap_async_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_wrap_async_generator.js"; diff --git a/node_modules/@swc/helpers/src/_wrap_native_super.mjs b/node_modules/@swc/helpers/src/_wrap_native_super.mjs new file mode 100644 index 0000000000000000000000000000000000000000..266f5d3b74eda2dd9c46f3ff904a6ccc63ec3993 --- /dev/null +++ b/node_modules/@swc/helpers/src/_wrap_native_super.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_wrap_native_super.js"; diff --git a/node_modules/@swc/helpers/src/_wrap_reg_exp.mjs b/node_modules/@swc/helpers/src/_wrap_reg_exp.mjs new file mode 100644 index 0000000000000000000000000000000000000000..772afe9d1ae525a5d4c0427223484c9c643ca926 --- /dev/null +++ b/node_modules/@swc/helpers/src/_wrap_reg_exp.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_wrap_reg_exp.js"; diff --git a/node_modules/@swc/helpers/src/_write_only_error.mjs b/node_modules/@swc/helpers/src/_write_only_error.mjs new file mode 100644 index 0000000000000000000000000000000000000000..68c8af268662b7f0a016ce35f5c3ea6e388cf352 --- /dev/null +++ b/node_modules/@swc/helpers/src/_write_only_error.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_write_only_error.js"; diff --git a/node_modules/@swc/helpers/src/index.mjs b/node_modules/@swc/helpers/src/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d0d0812948c6fe0d4ce5f0fde507a21166548781 --- /dev/null +++ b/node_modules/@swc/helpers/src/index.mjs @@ -0,0 +1 @@ +export * from "../esm/index.js"; diff --git a/node_modules/@swc/types/LICENSE b/node_modules/@swc/types/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..6a08504909fe063aedf79b9113c240dec13858d5 --- /dev/null +++ b/node_modules/@swc/types/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright 2024 SWC contributors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/node_modules/@swc/types/README.md b/node_modules/@swc/types/README.md new file mode 100644 index 0000000000000000000000000000000000000000..dc14caece209e522a20eb731a3ea63e45d32a376 --- /dev/null +++ b/node_modules/@swc/types/README.md @@ -0,0 +1,4 @@ +# @swc/types + +Typings for `@swc/core` APIs. This is a separate package because SWC is used by various tools but not all of them want to depend on `@swc/core`. +This package is very cheap, so feel free to depend on this. diff --git a/node_modules/@swc/types/assumptions.d.ts b/node_modules/@swc/types/assumptions.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..df59495ff6aec178e01818d5072fc49c296b0735 --- /dev/null +++ b/node_modules/@swc/types/assumptions.d.ts @@ -0,0 +1,92 @@ +export interface Assumptions { + /** + * https://babeljs.io/docs/en/assumptions#arraylikeisiterable + */ + arrayLikeIsIterable?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#constantreexports + */ + constantReexports?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#constantsuper + */ + constantSuper?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#enumerablemodulemeta + */ + enumerableModuleMeta?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#ignorefunctionlength + */ + ignoreFunctionLength?: boolean; + ignoreFunctionName?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#ignoretoprimitivehint + */ + ignoreToPrimitiveHint?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#iterableisarray + */ + iterableIsArray?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#mutabletemplateobject + */ + mutableTemplateObject?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#noclasscalls + */ + noClassCalls?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#nodocumentall + */ + noDocumentAll?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#noincompletensimportdetection + */ + noIncompleteNsImportDetection?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#nonewarrows + */ + noNewArrows?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#objectrestnosymbols + */ + objectRestNoSymbols?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#privatefieldsasproperties + */ + privateFieldsAsProperties?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#puregetters + */ + pureGetters?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#setclassmethods + */ + setClassMethods?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#setcomputedproperties + */ + setComputedProperties?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#setpublicclassfields + */ + setPublicClassFields?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#setspreadproperties + */ + setSpreadProperties?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#skipforofiteratorclosing + */ + skipForOfIteratorClosing?: boolean; + /** + * https://babeljs.io/docs/en/assumptions#superiscallableconstructor + */ + superIsCallableConstructor?: boolean; + /** + * @deprecated This value will be always true + */ + tsEnumIsReadonly?: boolean; +} +//# sourceMappingURL=assumptions.d.ts.map \ No newline at end of file diff --git a/node_modules/@swc/types/assumptions.js b/node_modules/@swc/types/assumptions.js new file mode 100644 index 0000000000000000000000000000000000000000..c8ad2e549bdc6801e0d1c80b0308d4b9bd4985ce --- /dev/null +++ b/node_modules/@swc/types/assumptions.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@swc/types/index.d.ts b/node_modules/@swc/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0731fc16f739d581fed7cf0df0db920abd357a8e --- /dev/null +++ b/node_modules/@swc/types/index.d.ts @@ -0,0 +1,2178 @@ +import { Assumptions } from "./assumptions"; +export interface Plugin { + (module: Program): Program; +} +export type ParseOptions = ParserConfig & { + comments?: boolean; + script?: boolean; + /** + * Defaults to es3. + */ + target?: JscTarget; +}; +export type TerserEcmaVersion = 5 | 2015 | 2016 | string | number; +export interface JsMinifyOptions { + compress?: TerserCompressOptions | boolean; + format?: JsFormatOptions & ToSnakeCaseProperties; + mangle?: TerserMangleOptions | boolean; + ecma?: TerserEcmaVersion; + keep_classnames?: boolean; + keep_fnames?: boolean; + module?: boolean | "unknown"; + safari10?: boolean; + toplevel?: boolean; + sourceMap?: boolean; + /** + * Serializable subset of terser-webpack-plugin's `extractComments`. + * `true` behaves like `'some'`. + */ + extractComments?: boolean | "some" | "all" | { + regex: string; + }; + outputPath?: string; + inlineSourcesContent?: boolean; +} +/** + * @example ToSnakeCase<'indentLevel'> == 'indent_level' + */ +type ToSnakeCase = T extends `${infer A}${infer B}` ? `${A extends Lowercase ? A : `_${Lowercase}`}${ToSnakeCase}` : T; +/** + * @example ToSnakeCaseProperties<{indentLevel: 3}> == {indent_level: 3} + */ +type ToSnakeCaseProperties = { + [K in keyof T as K extends string ? ToSnakeCase : K]: T[K]; +}; +/** + * These properties are mostly not implemented yet, + * but it exists to support passing terser config to swc minify + * without modification. + */ +export interface JsFormatOptions { + /** + * Currently noop. + * @default false + * @alias ascii_only + */ + asciiOnly?: boolean; + /** + * Currently noop. + * @default false + */ + beautify?: boolean; + /** + * Currently noop. + * @default false + */ + braces?: boolean; + /** + * - `false`: removes all comments + * - `'some'`: preserves some comments + * - `'all'`: preserves all comments + * - `{ regex: string }`: preserves comments that match the regex + * @default false + */ + comments?: false | "some" | "all" | { + regex: string; + }; + /** + * Currently noop. + * @default 5 + */ + ecma?: TerserEcmaVersion; + /** + * Currently noop. + * @alias indent_level + */ + indentLevel?: number; + /** + * Currently noop. + * @alias indent_start + */ + indentStart?: number; + /** + * Currently noop. + * @alias inline_script + */ + inlineScript?: boolean; + /** + * Currently noop. + * @alias keep_numbers + */ + keepNumbers?: number; + /** + * Currently noop. + * @alias keep_quoted_props + */ + keepQuotedProps?: boolean; + /** + * Currently noop. + * @alias max_line_len + */ + maxLineLen?: number | false; + /** + * Currently noop. + */ + preamble?: string; + /** + * Currently noop. + * @alias quote_keys + */ + quoteKeys?: boolean; + /** + * Currently noop. + * @alias quote_style + */ + quoteStyle?: boolean; + /** + * Currently noop. + * @alias preserve_annotations + */ + preserveAnnotations?: boolean; + /** + * Currently noop. + */ + safari10?: boolean; + /** + * Currently noop. + */ + semicolons?: boolean; + /** + * Currently noop. + */ + shebang?: boolean; + /** + * Currently noop. + */ + webkit?: boolean; + /** + * Currently noop. + * @alias wrap_iife + */ + wrapIife?: boolean; + /** + * Currently noop. + * @alias wrap_func_args + */ + wrapFuncArgs?: boolean; +} +export interface TerserCompressOptions { + arguments?: boolean; + arrows?: boolean; + booleans?: boolean; + booleans_as_integers?: boolean; + collapse_vars?: boolean; + comparisons?: boolean; + computed_props?: boolean; + conditionals?: boolean; + dead_code?: boolean; + defaults?: boolean; + directives?: boolean; + drop_console?: boolean; + drop_debugger?: boolean; + ecma?: TerserEcmaVersion; + evaluate?: boolean; + expression?: boolean; + global_defs?: any; + hoist_funs?: boolean; + hoist_props?: boolean; + hoist_vars?: boolean; + ie8?: boolean; + if_return?: boolean; + inline?: 0 | 1 | 2 | 3; + join_vars?: boolean; + keep_classnames?: boolean; + keep_fargs?: boolean; + keep_fnames?: boolean; + keep_infinity?: boolean; + loops?: boolean; + negate_iife?: boolean; + passes?: number; + properties?: boolean; + pure_getters?: any; + pure_funcs?: string[]; + reduce_funcs?: boolean; + reduce_vars?: boolean; + sequences?: any; + side_effects?: boolean; + switches?: boolean; + top_retain?: any; + toplevel?: any; + typeofs?: boolean; + unsafe?: boolean; + unsafe_passes?: boolean; + unsafe_arrows?: boolean; + unsafe_comps?: boolean; + unsafe_function?: boolean; + unsafe_math?: boolean; + unsafe_symbols?: boolean; + unsafe_methods?: boolean; + unsafe_proto?: boolean; + unsafe_regexp?: boolean; + unsafe_undefined?: boolean; + unsafe_hoist_static_method_alias?: boolean; + unsafe_hoist_global_objects_alias?: boolean; + unused?: boolean; + const_to_let?: boolean; + module?: boolean; +} +export interface TerserMangleOptions { + props?: TerserManglePropertiesOptions; + /** + * Pass `true` to mangle names declared in the top level scope. + */ + topLevel?: boolean; + /** + * @deprecated An alias for compatibility with terser. + */ + toplevel?: boolean; + /** + * Pass `true` to not mangle class names. + */ + keepClassNames?: boolean; + /** + * @deprecated An alias for compatibility with terser. + */ + keep_classnames?: boolean; + /** + * Pass `true` to not mangle function names. + */ + keepFnNames?: boolean; + /** + * @deprecated An alias for compatibility with terser. + */ + keep_fnames?: boolean; + /** + * Pass `true` to not mangle private props. + */ + keepPrivateProps?: boolean; + /** + * @deprecated An alias for compatibility with terser. + */ + keep_private_props?: boolean; + ie8?: boolean; + safari10?: boolean; + reserved?: string[]; +} +export interface TerserManglePropertiesOptions { +} +/** + * Programmatic options. + */ +export interface Options extends Config { + /** + * If true, a file is parsed as a script instead of module. + */ + script?: boolean; + /** + * The working directory that all paths in the programmatic + * options will be resolved relative to. + * + * Defaults to `process.cwd()`. + */ + cwd?: string; + caller?: CallerOptions; + /** The filename associated with the code currently being compiled, + * if there is one. The filename is optional, but not all of Swc's + * functionality is available when the filename is unknown, because a + * subset of options rely on the filename for their functionality. + * + * The three primary cases users could run into are: + * + * - The filename is exposed to plugins. Some plugins may require the + * presence of the filename. + * - Options like "test", "exclude", and "ignore" require the filename + * for string/RegExp matching. + * - .swcrc files are loaded relative to the file being compiled. + * If this option is omitted, Swc will behave as if swcrc: false has been set. + */ + filename?: string; + /** + * The initial path that will be processed based on the "rootMode" to + * determine the conceptual root folder for the current Swc project. + * This is used in two primary cases: + * + * - The base directory when checking for the default "configFile" value + * - The default value for "swcrcRoots". + * + * Defaults to `opts.cwd` + */ + root?: string; + /** + * This option, combined with the "root" value, defines how Swc chooses + * its project root. The different modes define different ways that Swc + * can process the "root" value to get the final project root. + * + * "root" - Passes the "root" value through as unchanged. + * "upward" - Walks upward from the "root" directory, looking for a directory + * containing a .swcrc file, and throws an error if a .swcrc + * is not found. + * "upward-optional" - Walk upward from the "root" directory, looking for + * a directory containing a .swcrc file, and falls back to "root" + * if a .swcrc is not found. + * + * + * "root" is the default mode because it avoids the risk that Swc + * will accidentally load a .swcrc that is entirely outside + * of the current project folder. If you use "upward-optional", + * be aware that it will walk up the directory structure all the + * way to the filesystem root, and it is always possible that someone + * will have a forgotten .swcrc in their home directory, + * which could cause unexpected errors in your builds. + * + * + * Users with monorepo project structures that run builds/tests on a + * per-package basis may well want to use "upward" since monorepos + * often have a .swcrc in the project root. Running Swc + * in a monorepo subdirectory without "upward", will cause Swc + * to skip loading any .swcrc files in the project root, + * which can lead to unexpected errors and compilation failure. + */ + rootMode?: "root" | "upward" | "upward-optional"; + /** + * The current active environment used during configuration loading. + * This value is used as the key when resolving "env" configs, + * and is also available inside configuration functions, plugins, + * and presets, via the api.env() function. + * + * Defaults to `process.env.SWC_ENV || process.env.NODE_ENV || "development"` + */ + envName?: string; + /** + * Defaults to searching for a default `.swcrc` file, but can + * be passed the path of any JS or JSON5 config file. + * + * + * NOTE: This option does not affect loading of .swcrc files, + * so while it may be tempting to do configFile: "./foo/.swcrc", + * it is not recommended. If the given .swcrc is loaded via the + * standard file-relative logic, you'll end up loading the same + * config file twice, merging it with itself. If you are linking + * a specific config file, it is recommended to stick with a + * naming scheme that is independent of the "swcrc" name. + * + * Defaults to `path.resolve(opts.root, ".swcrc")` + */ + configFile?: string | boolean; + /** + * true will enable searching for configuration files relative to the "filename" provided to Swc. + * + * A swcrc value passed in the programmatic options will override one set within a configuration file. + * + * Note: .swcrc files are only loaded if the current "filename" is inside of + * a package that matches one of the "swcrcRoots" packages. + * + * + * Defaults to true as long as the filename option has been specified + */ + swcrc?: boolean; + /** + * By default, Babel will only search for .babelrc files within the "root" package + * because otherwise Babel cannot know if a given .babelrc is meant to be loaded, + * or if it's "plugins" and "presets" have even been installed, since the file + * being compiled could be inside node_modules, or have been symlinked into the project. + * + * + * This option allows users to provide a list of other packages that should be + * considered "root" packages when considering whether to load .babelrc files. + * + * + * For example, a monorepo setup that wishes to allow individual packages + * to have their own configs might want to do + * + * + * + * Defaults to `opts.root` + */ + swcrcRoots?: boolean | MatchPattern | MatchPattern[]; + /** + * `true` will attempt to load an input sourcemap from the file itself, if it + * contains a //# sourceMappingURL=... comment. If no map is found, or the + * map fails to load and parse, it will be silently discarded. + * + * If an object is provided, it will be treated as the source map object itself. + * + * Defaults to `true`. + */ + inputSourceMap?: boolean | string; + /** + * The name to use for the file inside the source map object. + * + * Defaults to `path.basename(opts.filenameRelative)` when available, or `"unknown"`. + */ + sourceFileName?: string; + /** + * The sourceRoot fields to set in the generated source map, if one is desired. + */ + sourceRoot?: string; + plugin?: Plugin; + isModule?: boolean | "unknown" | "commonjs"; + /** + * Destination path. Note that this value is used only to fix source path + * of source map files and swc does not write output to this path. + */ + outputPath?: string; +} +export interface CallerOptions { + name: string; + [key: string]: any; +} +export type Swcrc = Config | Config[]; +/** + * .swcrc + */ +export interface Config { + /** + * Note: The type is string because it follows rust's regex syntax. + */ + test?: string | string[]; + /** + * Note: The type is string because it follows rust's regex syntax. + */ + exclude?: string | string[]; + env?: EnvConfig; + jsc?: JscConfig; + module?: ModuleConfig; + minify?: boolean; + /** + * - true to generate a sourcemap for the code and include it in the result object. + * - "inline" to generate a sourcemap and append it as a data URL to the end of the code, but not include it in the result object. + * + * `swc-cli` overloads some of these to also affect how maps are written to disk: + * + * - true will write the map to a .map file on disk + * - "inline" will write the file directly, so it will have a data: containing the map + * - Note: These options are bit weird, so it may make the most sense to just use true + * and handle the rest in your own code, depending on your use case. + */ + sourceMaps?: boolean | "inline"; + inlineSourcesContent?: boolean; +} +/** + * Configuration ported from babel-preset-env + */ +export interface EnvConfig { + mode?: "usage" | "entry"; + debug?: boolean; + dynamicImport?: boolean; + loose?: boolean; + /** + * Transpiles the broken syntax to the closest non-broken modern syntax + * + * Defaults to false. + */ + bugfixes?: boolean; + skip?: string[]; + include?: string[]; + exclude?: string[]; + /** + * The version of the used core js. + * + */ + coreJs?: string; + targets?: any; + path?: string; + shippedProposals?: boolean; + /** + * Enable all transforms + */ + forceAllTransforms?: boolean; +} +export interface JscConfig { + assumptions?: Assumptions; + loose?: boolean; + /** + * Defaults to EsParserConfig + */ + parser?: ParserConfig; + transform?: TransformConfig; + /** + * Use `@swc/helpers` instead of inline helpers. + */ + externalHelpers?: boolean; + /** + * Defaults to `es3` (which enabled **all** pass). + */ + target?: JscTarget; + /** + * Keep class names. + */ + keepClassNames?: boolean; + /** + * This is experimental, and can be removed without a major version bump. + */ + experimental?: { + optimizeHygiene?: boolean; + /** + * Preserve `with` in imports and exports. + * + * @deprecated Use `keepImportAssertions` instead. + */ + keepImportAttributes?: boolean; + /** + * Use `assert` instead of `with` for imports and exports. + * This option only works when `keepImportAttributes` is `true`. + */ + emitAssertForImportAttributes?: boolean; + /** + * Emit ECMA-426 source-map scopes metadata. + */ + emitSourceMapScopes?: boolean; + /** + * Specify the location where SWC stores its intermediate cache files. + * Currently only transform plugin uses this. If not specified, SWC will + * create `.swc` directories. + */ + cacheRoot?: string; + /** + * List of custom transform plugins written in WebAssembly. + * First parameter of tuple indicates the name of the plugin - it can be either + * a name of the npm package can be resolved, or absolute path to .wasm binary. + * + * Second parameter of tuple is JSON based configuration for the plugin. + */ + plugins?: WasmPlugin[]; + /** + * Run Wasm plugins before stripping TypeScript or decorators. + * + * See https://github.com/swc-project/swc/issues/9132 for more details. + */ + runPluginFirst?: boolean; + /** + * Disable builtin transforms. If enabled, only Wasm plugins are used. + */ + disableBuiltinTransformsForInternalTesting?: boolean; + /** + * Emit isolated dts files for each module. + */ + emitIsolatedDts?: boolean; + /** + * Disable all lint rules. + */ + disableAllLints?: boolean; + /** + * Keep import assertions. + */ + keepImportAssertions?: boolean; + }; + baseUrl?: string; + paths?: { + [from: string]: string[]; + }; + minify?: JsMinifyOptions; + preserveAllComments?: boolean; + output?: { + /** + * This can be used to keep the output ascii-only. + * If this option is set, `minify.format.asciiOnly` will be ignored. + * @default 'utf8' + */ + charset?: 'utf8' | 'ascii'; + }; +} +export type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "esnext"; +export type ParserConfig = TsParserConfig | EsParserConfig | FlowParserConfig; +export interface TsParserConfig { + syntax: "typescript"; + /** + * Defaults to `false`. + */ + tsx?: boolean; + /** + * Defaults to `false`. + */ + decorators?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + dynamicImport?: boolean; +} +export interface FlowParserConfig { + syntax: "flow"; + /** + * Defaults to `false`. + */ + jsx?: boolean; + /** + * Defaults to `false`. + */ + all?: boolean; + /** + * Defaults to `false`. + */ + requireDirective?: boolean; + /** + * Defaults to `false`. + */ + enums?: boolean; + /** + * Defaults to `false`. + */ + decorators?: boolean; + /** + * Defaults to `false`. + */ + components?: boolean; + /** + * Defaults to `false`. + */ + patternMatching?: boolean; +} +export interface EsParserConfig { + syntax: "ecmascript"; + /** + * Defaults to false. + */ + jsx?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + numericSeparator?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + classPrivateProperty?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + privateMethod?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + classProperty?: boolean; + /** + * Defaults to `false` + */ + functionBind?: boolean; + /** + * Defaults to `false` + */ + decorators?: boolean; + /** + * Defaults to `false` + */ + decoratorsBeforeExport?: boolean; + /** + * Defaults to `false` + */ + exportDefaultFrom?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + exportNamespaceFrom?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + dynamicImport?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + nullishCoalescing?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + optionalChaining?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + importMeta?: boolean; + /** + * @deprecated Always true because it's in ecmascript spec. + */ + topLevelAwait?: boolean; + /** + * @deprecated An alias of `importAttributes` + */ + importAssertions?: boolean; + /** + * @deprecated Always true in swc + */ + importAttributes?: boolean; + /** + * Defaults to `false` + */ + allowSuperOutsideMethod?: boolean; + /** + * Defaults to `false` + */ + allowReturnOutsideFunction?: boolean; + /** + * Defaults to `false` + */ + autoAccessors?: boolean; + /** + * Defaults to `false` + */ + explicitResourceManagement?: boolean; +} +/** + * Options for transform. + */ +export interface TransformConfig { + /** + * Effective only if `syntax` supports ƒ. + */ + react?: ReactConfig; + reactCompiler?: boolean | ReactCompilerOptions; + constModules?: ConstModulesConfig; + /** + * Defaults to null, which skips optimizer pass. + */ + optimizer?: OptimizerConfig; + /** + * https://swc.rs/docs/configuration/compilation#jsctransformlegacydecorator + */ + legacyDecorator?: boolean; + /** + * https://swc.rs/docs/configuration/compilation#jsctransformdecoratormetadata + */ + decoratorMetadata?: boolean; + /** + * https://swc.rs/docs/configuration/compilation#jsctransformdecoratorversion + */ + decoratorVersion?: "2021-12" | "2022-03" | "2023-11"; + treatConstEnumAsEnum?: boolean; + /** + * https://www.typescriptlang.org/tsconfig#useDefineForClassFields + */ + useDefineForClassFields?: boolean; + /** + * https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax + */ + verbatimModuleSyntax?: boolean; + tsEnumIsMutable?: boolean; +} +export interface ReactCompilerOptions { + /** + * Which functions to compile. + * + * Defaults to `"infer"`. + */ + compilationMode?: "infer" | "syntax" | "annotation" | "all"; + /** + * What to do when a function cannot be compiled. + * + * Defaults to `"none"`. + */ + panicThreshold?: "none" | "critical_errors" | "all_errors"; + /** + * React runtime version target. + * + * Defaults to `"19"`. + */ + target?: "17" | "18" | "19"; + /** + * Analyze and report diagnostics only; emit no transformed code. + * + * Defaults to `false`. + */ + noEmit?: boolean; + /** + * Defaults to `"client"`. + */ + outputMode?: "client" | "ssr" | "lint"; + /** + * Compile even functions marked with opt-out directives. + * + * Defaults to `false`. + */ + ignoreUseNoForget?: boolean; + /** + * Treat Flow suppression comments as opt-outs. + * + * Defaults to `true`. + */ + flowSuppressions?: boolean; + /** + * Enable react-native-reanimated support. + * + * Defaults to `false`. + */ + enableReanimated?: boolean; + /** + * Development mode. + * + * Defaults to `false`. + */ + isDev?: boolean; + /** + * ESLint rules whose suppressions opt a function out of compilation. + */ + eslintSuppressionRules?: string[]; + /** + * Extra directives that opt a function out of compilation. + */ + customOptOutDirectives?: string[]; + /** + * Emit a gated version of each compiled function. + */ + gating?: ReactCompilerGatingConfig; + /** + * Dynamically-gated compilation. + */ + dynamicGating?: ReactCompilerDynamicGatingConfig; +} +export interface ReactCompilerGatingConfig { + /** + * Module the gating import comes from. + */ + source: string; + /** + * Imported specifier used as the gate. + */ + importSpecifierName: string; +} +export interface ReactCompilerDynamicGatingConfig { + /** + * Module the gating import comes from. + */ + source: string; +} +export interface ReactConfig { + /** + * Replace the function used when compiling JSX expressions. + * + * Defaults to `React.createElement`. + */ + pragma?: string; + /** + * Replace the component used when compiling JSX fragments. + * + * Defaults to `React.Fragment` + */ + pragmaFrag?: string; + /** + * Toggles whether or not to throw an error if a XML namespaced tag name is used. For example: + * `` + * + * Though the JSX spec allows this, it is disabled by default since React's + * JSX does not currently have support for it. + * + */ + throwIfNamespace?: boolean; + /** + * Toggles plugins that aid in development, such as @swc/plugin-transform-react-jsx-self + * and @swc/plugin-transform-react-jsx-source. + * + * Defaults to `false`, + * + */ + development?: boolean; + /** + * Use `Object.assign()` instead of `_extends`. Defaults to false. + * @deprecated + */ + useBuiltins?: boolean; + /** + * Enable fast refresh feature for React app + */ + refresh?: boolean | { + /** + * Identifier for the `react-refresh` register function. + * + * Defaults to `$RefreshReg$` + */ + refreshReg?: string; + /** + * Identifier for the `react-refresh` signature function. + * + * Defaults to `$RefreshSig$` + */ + refreshSig?: string; + /** + * Flag to emit full signatures. + * + * Defaults to `false` + */ + emitFullSignatures?: boolean; + }; + /** + * Decides which runtime to use when transforming JSX. + * - `"automatic"` - Automatically imports the functions that JSX transpiles to. + * This is the modern approach introduced in React 17+ that eliminates the need to + * manually import React in every file that uses JSX. + * - `"classic"` - Uses the traditional JSX transform that relies on `React.createElement` + * calls. Requires React to be in scope, which was the standard behavior before React 17. + * - `"preserve"` - Leaves JSX syntax unchanged without transforming it. + * @default "classic" + */ + runtime?: "automatic" | "classic" | "preserve"; + /** + * Declares the module specifier to be used for importing the `jsx` and `jsxs` factory + * functions when using `runtime` 'automatic' + * @default "react" + */ + importSource?: string; +} +/** + * - `import { DEBUG } from '@ember/env-flags';` + * - `import { FEATURE_A, FEATURE_B } from '@ember/features';` + * + * See: https://github.com/swc-project/swc/issues/18#issuecomment-466272558 + */ +export interface ConstModulesConfig { + globals?: { + [module: string]: { + [name: string]: string; + }; + }; +} +export interface OptimizerConfig { + simplify?: boolean; + globals?: GlobalPassOption; + jsonify?: { + minCost: number; + }; +} +/** + * Options for inline-global pass. + */ +export interface GlobalPassOption { + /** + * Global variables that should be inlined with passed value. + * + * e.g. `{ __DEBUG__: true }` + */ + vars?: Record; + /** + * Names of environment variables that should be inlined with the value of corresponding env during build. + * + * Defaults to `["NODE_ENV", "SWC_ENV"]` + */ + envs?: string[] | Record; + /** + * Replaces typeof calls for passed variables with corresponding value + * + * e.g. `{ window: 'object' }` + */ + typeofs?: Record; +} +export type ModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig | NodeNextConfig | SystemjsConfig; +export interface BaseModuleConfig { + /** + * By default, when using exports with babel a non-enumerable `__esModule` + * property is exported. In some cases this property is used to determine + * if the import is the default export or if it contains the default export. + * + * In order to prevent the __esModule property from being exported, you + * can set the strict option to true. + * + * Defaults to `false`. + */ + strict?: boolean; + /** + * Emits 'use strict' directive. + * + * Defaults to `true`. + */ + strictMode?: boolean; + /** + * Changes Babel's compiled import statements to be lazily evaluated when their imported bindings are used for the first time. + * + * This can improve initial load time of your module because evaluating dependencies up + * front is sometimes entirely un-necessary. This is especially the case when implementing + * a library module. + * + * + * The value of `lazy` has a few possible effects: + * + * - `false` - No lazy initialization of any imported module. + * - `true` - Do not lazy-initialize local `./foo` imports, but lazy-init `foo` dependencies. + * + * Local paths are much more likely to have circular dependencies, which may break if loaded lazily, + * so they are not lazy by default, whereas dependencies between independent modules are rarely cyclical. + * + * - `Array` - Lazy-initialize all imports with source matching one of the given strings. + * + * ----- + * + * The two cases where imports can never be lazy are: + * + * - `import "foo";` + * + * Side-effect imports are automatically non-lazy since their very existence means + * that there is no binding to later kick off initialization. + * + * - `export * from "foo"` + * + * Re-exporting all names requires up-front execution because otherwise there is no + * way to know what names need to be exported. + * + * Defaults to `false`. + */ + lazy?: boolean | string[]; + /** + * @deprecated Use the `importInterop` option instead. + * + * By default, when using exports with swc a non-enumerable __esModule property is exported. + * This property is then used to determine if the import is the default export or if + * it contains the default export. + * + * In cases where the auto-unwrapping of default is not needed, you can set the noInterop option + * to true to avoid the usage of the interopRequireDefault helper (shown in inline form above). + * + * Defaults to `false`. + */ + noInterop?: boolean; + /** + * Defaults to `swc`. + * + * CommonJS modules and ECMAScript modules are not fully compatible. + * However, compilers, bundlers and JavaScript runtimes developed different strategies + * to make them work together as well as possible. + * + * - `swc` (alias: `babel`) + * + * When using exports with `swc` a non-enumerable `__esModule` property is exported + * This property is then used to determine if the import is the default export + * or if it contains the default export. + * + * ```javascript + * import foo from "foo"; + * import { bar } from "bar"; + * foo; + * bar; + * + * // Is compiled to ... + * + * "use strict"; + * + * function _interop_require_default(obj) { + * return obj && obj.__esModule ? obj : { default: obj }; + * } + * + * var _foo = _interop_require_default(require("foo")); + * var _bar = require("bar"); + * + * _foo.default; + * _bar.bar; + * ``` + * + * When this import interop is used, if both the imported and the importer module are compiled + * with swc they behave as if none of them was compiled. + * + * This is the default behavior. + * + * - `node` + * + * When importing CommonJS files (either directly written in CommonJS, or generated with a compiler) + * Node.js always binds the `default` export to the value of `module.exports`. + * + * ```javascript + * import foo from "foo"; + * import { bar } from "bar"; + * foo; + * bar; + * + * // Is compiled to ... + * + * "use strict"; + * + * var _foo = require("foo"); + * var _bar = require("bar"); + * + * _foo; + * _bar.bar; + * ``` + * This is not exactly the same as what Node.js does since swc allows accessing any property of `module.exports` + * as a named export, while Node.js only allows importing statically analyzable properties of `module.exports`. + * However, any import working in Node.js will also work when compiled with swc using `importInterop: "node"`. + * + * - `none` + * + * If you know that the imported file has been transformed with a compiler that stores the `default` export on + * `exports.default` (such as swc or Babel), you can safely omit the `_interop_require_default` helper. + * + * ```javascript + * import foo from "foo"; + * import { bar } from "bar"; + * foo; + * bar; + * + * // Is compiled to ... + * + * "use strict"; + * + * var _foo = require("foo"); + * var _bar = require("bar"); + * + * _foo.default; + * _bar.bar; + * ``` + */ + importInterop?: "swc" | "babel" | "node" | "none"; + /** + * Output extension for generated files. + * + * Defaults to `js`. + */ + outFileExtension?: "js" | "mjs" | "cjs"; + /** + * Emits `cjs-module-lexer` annotation + * `cjs-module-lexer` is used in Node.js core for detecting the named exports available when importing a CJS module into ESM. + * swc will emit `cjs-module-lexer` detectable annotation with this option enabled. + * + * Defaults to `true` if import_interop is Node, else `false` + */ + exportInteropAnnotation?: boolean; + /** + * If set to true, dynamic imports will be preserved. + */ + ignoreDynamic?: boolean; + allowTopLevelThis?: boolean; + preserveImportMeta?: boolean; + /** + * If set to true, This will resolve top .mjs + */ + resolveFully?: boolean; +} +export interface Es6Config extends BaseModuleConfig { + type: "es6"; +} +export interface NodeNextConfig extends BaseModuleConfig { + type: "nodenext"; +} +export interface CommonJsConfig extends BaseModuleConfig { + type: "commonjs"; +} +export interface UmdConfig extends BaseModuleConfig { + type: "umd"; + globals?: { + [key: string]: string; + }; +} +export interface AmdConfig extends BaseModuleConfig { + type: "amd"; + moduleId?: string; +} +export interface SystemjsConfig { + type: "systemjs"; + allowTopLevelThis?: boolean; +} +export interface Output { + /** + * Transformed code + */ + code: string; + /** + * Sourcemap (**not** base64 encoded) + */ + map?: string; + /** + * Extracted comments collected during minification. + */ + extractedComments?: string[]; +} +export interface MatchPattern { +} +export interface Span { + start: number; + end: number; + ctxt: number; +} +export interface Node { + type: string; +} +export interface HasSpan { + span: Span; +} +export interface HasDecorator { + decorators?: Decorator[]; +} +export interface Class extends HasSpan, HasDecorator { + body: ClassMember[]; + superClass?: Expression; + isAbstract: boolean; + typeParams?: TsTypeParameterDeclaration; + superTypeParams?: TsTypeParameterInstantiation; + implements: TsExpressionWithTypeArguments[]; +} +export type ClassMember = Constructor | ClassMethod | PrivateMethod | ClassProperty | PrivateProperty | TsIndexSignature | EmptyStatement | StaticBlock; +export interface ClassPropertyBase extends Node, HasSpan, HasDecorator { + value?: Expression; + typeAnnotation?: TsTypeAnnotation; + isStatic: boolean; + accessibility?: Accessibility; + isOptional: boolean; + isOverride: boolean; + readonly: boolean; + definite: boolean; +} +export interface ClassProperty extends ClassPropertyBase { + type: "ClassProperty"; + key: PropertyName; + isAbstract: boolean; + declare: boolean; +} +export interface PrivateProperty extends ClassPropertyBase { + type: "PrivateProperty"; + key: PrivateName; +} +export interface Param extends Node, HasSpan, HasDecorator { + type: "Parameter"; + pat: Pattern; +} +export interface Constructor extends Node, HasSpan { + type: "Constructor"; + key: PropertyName; + params: (TsParameterProperty | Param)[]; + body?: BlockStatement; + accessibility?: Accessibility; + isOptional: boolean; +} +export interface ClassMethodBase extends Node, HasSpan { + function: Fn; + kind: MethodKind; + isStatic: boolean; + accessibility?: Accessibility; + isAbstract: boolean; + isOptional: boolean; + isOverride: boolean; +} +export interface ClassMethod extends ClassMethodBase { + type: "ClassMethod"; + key: PropertyName; +} +export interface PrivateMethod extends ClassMethodBase { + type: "PrivateMethod"; + key: PrivateName; +} +export interface StaticBlock extends Node, HasSpan { + type: "StaticBlock"; + body: BlockStatement; +} +export interface Decorator extends Node, HasSpan { + type: "Decorator"; + expression: Expression; +} +export type MethodKind = "method" | "getter" | "setter"; +export type Declaration = ClassDeclaration | FunctionDeclaration | VariableDeclaration | TsInterfaceDeclaration | TsTypeAliasDeclaration | TsEnumDeclaration | TsModuleDeclaration; +export interface FunctionDeclaration extends Fn { + type: "FunctionDeclaration"; + identifier: Identifier; + declare: boolean; +} +export interface ClassDeclaration extends Class, Node { + type: "ClassDeclaration"; + identifier: Identifier; + declare: boolean; +} +export interface VariableDeclaration extends Node, HasSpan { + type: "VariableDeclaration"; + kind: VariableDeclarationKind; + declare: boolean; + declarations: VariableDeclarator[]; +} +export type VariableDeclarationKind = "var" | "let" | "const"; +export interface VariableDeclarator extends Node, HasSpan { + type: "VariableDeclarator"; + id: Pattern; + init?: Expression; + definite: boolean; +} +export type Expression = ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression | UnaryExpression | UpdateExpression | BinaryExpression | AssignmentExpression | MemberExpression | SuperPropExpression | ConditionalExpression | CallExpression | NewExpression | SequenceExpression | Identifier | Literal | TemplateLiteral | TaggedTemplateExpression | ArrowFunctionExpression | ClassExpression | YieldExpression | MetaProperty | AwaitExpression | ParenthesisExpression | JSXMemberExpression | JSXNamespacedName | JSXEmptyExpression | JSXElement | JSXFragment | TsTypeAssertion | TsConstAssertion | TsNonNullExpression | TsAsExpression | TsSatisfiesExpression | TsInstantiation | PrivateName | OptionalChainingExpression | Invalid; +interface ExpressionBase extends Node, HasSpan { +} +export interface Identifier extends ExpressionBase { + type: "Identifier"; + value: string; + optional: boolean; +} +export interface OptionalChainingExpression extends ExpressionBase { + type: "OptionalChainingExpression"; + questionDotToken: Span; + /** + * Call expression or member expression. + */ + base: MemberExpression | OptionalChainingCall; +} +export interface OptionalChainingCall extends ExpressionBase { + type: "CallExpression"; + callee: Expression; + arguments: ExprOrSpread[]; + typeArguments?: TsTypeParameterInstantiation; +} +export interface ThisExpression extends ExpressionBase { + type: "ThisExpression"; +} +export interface ArrayExpression extends ExpressionBase { + type: "ArrayExpression"; + elements: (ExprOrSpread | undefined)[]; +} +export interface ExprOrSpread { + spread?: Span; + expression: Expression; +} +export interface ObjectExpression extends ExpressionBase { + type: "ObjectExpression"; + properties: (SpreadElement | Property)[]; +} +export interface Argument { + spread?: Span; + expression: Expression; +} +export interface SpreadElement extends Node { + type: "SpreadElement"; + spread: Span; + arguments: Expression; +} +export interface UnaryExpression extends ExpressionBase { + type: "UnaryExpression"; + operator: UnaryOperator; + argument: Expression; +} +export interface UpdateExpression extends ExpressionBase { + type: "UpdateExpression"; + operator: UpdateOperator; + prefix: boolean; + argument: Expression; +} +export interface BinaryExpression extends ExpressionBase { + type: "BinaryExpression"; + operator: BinaryOperator; + left: Expression; + right: Expression; +} +export interface FunctionExpression extends Fn, ExpressionBase { + type: "FunctionExpression"; + identifier?: Identifier; +} +export interface ClassExpression extends Class, ExpressionBase { + type: "ClassExpression"; + identifier?: Identifier; +} +export interface AssignmentExpression extends ExpressionBase { + type: "AssignmentExpression"; + operator: AssignmentOperator; + left: Expression | Pattern; + right: Expression; +} +export interface MemberExpression extends ExpressionBase { + type: "MemberExpression"; + object: Expression; + property: Identifier | PrivateName | ComputedPropName; +} +export interface SuperPropExpression extends ExpressionBase { + type: "SuperPropExpression"; + obj: Super; + property: Identifier | ComputedPropName; +} +export interface ConditionalExpression extends ExpressionBase { + type: "ConditionalExpression"; + test: Expression; + consequent: Expression; + alternate: Expression; +} +export interface Super extends Node, HasSpan { + type: "Super"; +} +export interface Import extends Node, HasSpan { + type: "Import"; +} +export interface CallExpression extends ExpressionBase { + type: "CallExpression"; + callee: Super | Import | Expression; + arguments: Argument[]; + typeArguments?: TsTypeParameterInstantiation; +} +export interface NewExpression extends ExpressionBase { + type: "NewExpression"; + callee: Expression; + arguments?: Argument[]; + typeArguments?: TsTypeParameterInstantiation; +} +export interface SequenceExpression extends ExpressionBase { + type: "SequenceExpression"; + expressions: Expression[]; +} +export interface ArrowFunctionExpression extends ExpressionBase { + type: "ArrowFunctionExpression"; + params: Pattern[]; + body: BlockStatement | Expression; + async: boolean; + generator: boolean; + typeParameters?: TsTypeParameterDeclaration; + returnType?: TsTypeAnnotation; +} +export interface YieldExpression extends ExpressionBase { + type: "YieldExpression"; + argument?: Expression; + delegate: boolean; +} +export interface MetaProperty extends Node, HasSpan { + type: "MetaProperty"; + kind: "new.target" | "import.meta"; +} +export interface AwaitExpression extends ExpressionBase { + type: "AwaitExpression"; + argument: Expression; +} +export interface TemplateLiteral extends ExpressionBase { + type: "TemplateLiteral"; + expressions: Expression[]; + quasis: TemplateElement[]; +} +export interface TaggedTemplateExpression extends ExpressionBase { + type: "TaggedTemplateExpression"; + tag: Expression; + typeParameters?: TsTypeParameterInstantiation; + template: TemplateLiteral; +} +export interface TemplateElement extends ExpressionBase { + type: "TemplateElement"; + tail: boolean; + cooked?: string; + raw: string; +} +export interface ParenthesisExpression extends ExpressionBase { + type: "ParenthesisExpression"; + expression: Expression; +} +export interface Fn extends HasSpan, HasDecorator { + params: Param[]; + body?: BlockStatement; + generator: boolean; + async: boolean; + typeParameters?: TsTypeParameterDeclaration; + returnType?: TsTypeAnnotation; +} +interface PatternBase extends Node, HasSpan { + typeAnnotation?: TsTypeAnnotation; +} +export interface PrivateName extends ExpressionBase { + type: "PrivateName"; + id: Identifier; +} +export type JSXObject = JSXMemberExpression | Identifier; +export interface JSXMemberExpression extends Node { + type: "JSXMemberExpression"; + object: JSXObject; + property: Identifier; +} +/** + * XML-based namespace syntax: + */ +export interface JSXNamespacedName extends Node { + type: "JSXNamespacedName"; + namespace: Identifier; + name: Identifier; +} +export interface JSXEmptyExpression extends Node, HasSpan { + type: "JSXEmptyExpression"; +} +export interface JSXExpressionContainer extends Node, HasSpan { + type: "JSXExpressionContainer"; + expression: JSXExpression; +} +export type JSXExpression = JSXEmptyExpression | Expression; +export interface JSXSpreadChild extends Node, HasSpan { + type: "JSXSpreadChild"; + expression: Expression; +} +export type JSXElementName = Identifier | JSXMemberExpression | JSXNamespacedName; +export interface JSXOpeningElement extends Node, HasSpan { + type: "JSXOpeningElement"; + name: JSXElementName; + attributes: JSXAttributeOrSpread[]; + selfClosing: boolean; + typeArguments?: TsTypeParameterInstantiation; +} +export type JSXAttributeOrSpread = JSXAttribute | SpreadElement; +export interface JSXClosingElement extends Node, HasSpan { + type: "JSXClosingElement"; + name: JSXElementName; +} +export interface JSXAttribute extends Node, HasSpan { + type: "JSXAttribute"; + name: JSXAttributeName; + value?: JSXAttrValue; +} +export type JSXAttributeName = Identifier | JSXNamespacedName; +export type JSXAttrValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment; +export interface JSXText extends Node, HasSpan { + type: "JSXText"; + value: string; + raw: string; +} +export interface JSXElement extends Node, HasSpan { + type: "JSXElement"; + opening: JSXOpeningElement; + children: JSXElementChild[]; + closing?: JSXClosingElement; +} +export type JSXElementChild = JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment; +export interface JSXFragment extends Node, HasSpan { + type: "JSXFragment"; + opening: JSXOpeningFragment; + children: JSXElementChild[]; + closing: JSXClosingFragment; +} +export interface JSXOpeningFragment extends Node, HasSpan { + type: "JSXOpeningFragment"; +} +export interface JSXClosingFragment extends Node, HasSpan { + type: "JSXClosingFragment"; +} +export type Literal = StringLiteral | BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | JSXText; +export interface StringLiteral extends Node, HasSpan { + type: "StringLiteral"; + value: string; + raw?: string; +} +export interface BooleanLiteral extends Node, HasSpan { + type: "BooleanLiteral"; + value: boolean; +} +export interface NullLiteral extends Node, HasSpan { + type: "NullLiteral"; +} +export interface RegExpLiteral extends Node, HasSpan { + type: "RegExpLiteral"; + pattern: string; + flags: string; +} +export interface NumericLiteral extends Node, HasSpan { + type: "NumericLiteral"; + value: number; + raw?: string; +} +export interface BigIntLiteral extends Node, HasSpan { + type: "BigIntLiteral"; + value: bigint; + raw?: string; +} +export type ModuleDeclaration = ImportDeclaration | ExportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportDefaultExpression | ExportAllDeclaration | TsImportEqualsDeclaration | TsExportAssignment | TsNamespaceExportDeclaration; +export interface ExportDefaultExpression extends Node, HasSpan { + type: "ExportDefaultExpression"; + expression: Expression; +} +export interface ExportDeclaration extends Node, HasSpan { + type: "ExportDeclaration"; + declaration: Declaration; +} +export interface ImportDeclaration extends Node, HasSpan { + type: "ImportDeclaration"; + specifiers: ImportSpecifier[]; + source: StringLiteral; + typeOnly: boolean; + asserts?: ObjectExpression; +} +export interface ExportAllDeclaration extends Node, HasSpan { + type: "ExportAllDeclaration"; + source: StringLiteral; + asserts?: ObjectExpression; +} +/** + * - `export { foo } from 'mod'` + * - `export { foo as bar } from 'mod'` + */ +export interface ExportNamedDeclaration extends Node, HasSpan { + type: "ExportNamedDeclaration"; + specifiers: ExportSpecifier[]; + source?: StringLiteral; + typeOnly: boolean; + asserts?: ObjectExpression; +} +export interface ExportDefaultDeclaration extends Node, HasSpan { + type: "ExportDefaultDeclaration"; + decl: DefaultDecl; +} +export type DefaultDecl = ClassExpression | FunctionExpression | TsInterfaceDeclaration; +export type ImportSpecifier = NamedImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier; +/** + * e.g. `import foo from 'mod.js'` + */ +export interface ImportDefaultSpecifier extends Node, HasSpan { + type: "ImportDefaultSpecifier"; + local: Identifier; +} +/** + * e.g. `import * as foo from 'mod.js'`. + */ +export interface ImportNamespaceSpecifier extends Node, HasSpan { + type: "ImportNamespaceSpecifier"; + local: Identifier; +} +/** + * e.g. - `import { foo } from 'mod.js'` + * + * local = foo, imported = None + * + * e.g. `import { foo as bar } from 'mod.js'` + * + * local = bar, imported = Some(foo) for + */ +export interface NamedImportSpecifier extends Node, HasSpan { + type: "ImportSpecifier"; + local: Identifier; + imported?: ModuleExportName; + isTypeOnly: boolean; +} +export type ModuleExportName = Identifier | StringLiteral; +export type ExportSpecifier = ExportNamespaceSpecifier | ExportDefaultSpecifier | NamedExportSpecifier; +/** + * `export * as foo from 'src';` + */ +export interface ExportNamespaceSpecifier extends Node, HasSpan { + type: "ExportNamespaceSpecifier"; + name: ModuleExportName; +} +export interface ExportDefaultSpecifier extends Node, HasSpan { + type: "ExportDefaultSpecifier"; + exported: Identifier; +} +export interface NamedExportSpecifier extends Node, HasSpan { + type: "ExportSpecifier"; + orig: ModuleExportName; + /** + * `Some(bar)` in `export { foo as bar }` + */ + exported?: ModuleExportName; + isTypeOnly: boolean; +} +interface HasInterpreter { + /** + * e.g. `/usr/bin/node` for `#!/usr/bin/node` + */ + interpreter: string; +} +export type Program = Module | Script; +export interface Module extends Node, HasSpan, HasInterpreter { + type: "Module"; + body: ModuleItem[]; +} +export interface Script extends Node, HasSpan, HasInterpreter { + type: "Script"; + body: Statement[]; +} +export type ModuleItem = ModuleDeclaration | Statement; +export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "||" | "&&" | "in" | "instanceof" | "**" | "??"; +export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "&&=" | "||=" | "??="; +export type UpdateOperator = "++" | "--"; +export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; +export type Pattern = BindingIdentifier | ArrayPattern | RestElement | ObjectPattern | AssignmentPattern | Invalid | Expression; +export interface BindingIdentifier extends PatternBase { + type: "Identifier"; + value: string; + optional: boolean; +} +export interface ArrayPattern extends PatternBase { + type: "ArrayPattern"; + elements: (Pattern | undefined)[]; + optional: boolean; +} +export interface ObjectPattern extends PatternBase { + type: "ObjectPattern"; + properties: ObjectPatternProperty[]; + optional: boolean; +} +export interface AssignmentPattern extends PatternBase { + type: "AssignmentPattern"; + left: Pattern; + right: Expression; +} +export interface RestElement extends PatternBase { + type: "RestElement"; + rest: Span; + argument: Pattern; +} +export type ObjectPatternProperty = KeyValuePatternProperty | AssignmentPatternProperty | RestElement; +/** + * `{key: value}` + */ +export interface KeyValuePatternProperty extends Node { + type: "KeyValuePatternProperty"; + key: PropertyName; + value: Pattern; +} +/** + * `{key}` or `{key = value}` + */ +export interface AssignmentPatternProperty extends Node, HasSpan { + type: "AssignmentPatternProperty"; + key: Identifier; + value?: Expression; +} +/** Identifier is `a` in `{ a, }` */ +export type Property = Identifier | KeyValueProperty | AssignmentProperty | GetterProperty | SetterProperty | MethodProperty; +interface PropBase extends Node { + key: PropertyName; +} +export interface KeyValueProperty extends PropBase { + type: "KeyValueProperty"; + value: Expression; +} +export interface AssignmentProperty extends Node { + type: "AssignmentProperty"; + key: Identifier; + value: Expression; +} +export interface GetterProperty extends PropBase, HasSpan { + type: "GetterProperty"; + typeAnnotation?: TsTypeAnnotation; + body?: BlockStatement; +} +export interface SetterProperty extends PropBase, HasSpan { + type: "SetterProperty"; + param: Pattern; + body?: BlockStatement; +} +export interface MethodProperty extends PropBase, Fn { + type: "MethodProperty"; +} +export type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropName | BigIntLiteral; +export interface ComputedPropName extends Node, HasSpan { + type: "Computed"; + expression: Expression; +} +export interface BlockStatement extends Node, HasSpan { + type: "BlockStatement"; + stmts: Statement[]; +} +export interface ExpressionStatement extends Node, HasSpan { + type: "ExpressionStatement"; + expression: Expression; +} +export type Statement = BlockStatement | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | Declaration | ExpressionStatement; +export interface EmptyStatement extends Node, HasSpan { + type: "EmptyStatement"; +} +export interface DebuggerStatement extends Node, HasSpan { + type: "DebuggerStatement"; +} +export interface WithStatement extends Node, HasSpan { + type: "WithStatement"; + object: Expression; + body: Statement; +} +export interface ReturnStatement extends Node, HasSpan { + type: "ReturnStatement"; + argument?: Expression; +} +export interface LabeledStatement extends Node, HasSpan { + type: "LabeledStatement"; + label: Identifier; + body: Statement; +} +export interface BreakStatement extends Node, HasSpan { + type: "BreakStatement"; + label?: Identifier; +} +export interface ContinueStatement extends Node, HasSpan { + type: "ContinueStatement"; + label?: Identifier; +} +export interface IfStatement extends Node, HasSpan { + type: "IfStatement"; + test: Expression; + consequent: Statement; + alternate?: Statement; +} +export interface SwitchStatement extends Node, HasSpan { + type: "SwitchStatement"; + discriminant: Expression; + cases: SwitchCase[]; +} +export interface ThrowStatement extends Node, HasSpan { + type: "ThrowStatement"; + argument: Expression; +} +export interface TryStatement extends Node, HasSpan { + type: "TryStatement"; + block: BlockStatement; + handler?: CatchClause; + finalizer?: BlockStatement; +} +export interface WhileStatement extends Node, HasSpan { + type: "WhileStatement"; + test: Expression; + body: Statement; +} +export interface DoWhileStatement extends Node, HasSpan { + type: "DoWhileStatement"; + test: Expression; + body: Statement; +} +export interface ForStatement extends Node, HasSpan { + type: "ForStatement"; + init?: VariableDeclaration | Expression; + test?: Expression; + update?: Expression; + body: Statement; +} +export interface ForInStatement extends Node, HasSpan { + type: "ForInStatement"; + left: VariableDeclaration | Pattern; + right: Expression; + body: Statement; +} +export interface ForOfStatement extends Node, HasSpan { + type: "ForOfStatement"; + /** + * Span of the await token. + * + * es2018 for-await-of statements, e.g., `for await (const x of xs) {` + */ + await?: Span; + left: VariableDeclaration | Pattern; + right: Expression; + body: Statement; +} +export interface SwitchCase extends Node, HasSpan { + type: "SwitchCase"; + /** + * Undefined for default case + */ + test?: Expression; + consequent: Statement[]; +} +export interface CatchClause extends Node, HasSpan { + type: "CatchClause"; + /** + * The param is `undefined` if the catch binding is omitted. E.g., `try { foo() } catch {}` + */ + param?: Pattern; + body: BlockStatement; +} +export interface TsTypeAnnotation extends Node, HasSpan { + type: "TsTypeAnnotation"; + typeAnnotation: TsType; +} +export interface TsTypeParameterDeclaration extends Node, HasSpan { + type: "TsTypeParameterDeclaration"; + parameters: TsTypeParameter[]; +} +export interface TsTypeParameter extends Node, HasSpan { + type: "TsTypeParameter"; + name: Identifier; + in: boolean; + out: boolean; + constraint?: TsType; + default?: TsType; +} +export interface TsTypeParameterInstantiation extends Node, HasSpan { + type: "TsTypeParameterInstantiation"; + params: TsType[]; +} +export interface TsParameterProperty extends Node, HasSpan, HasDecorator { + type: "TsParameterProperty"; + accessibility?: Accessibility; + override: boolean; + readonly: boolean; + param: TsParameterPropertyParameter; +} +export type TsParameterPropertyParameter = BindingIdentifier | AssignmentPattern; +export interface TsQualifiedName extends Node { + type: "TsQualifiedName"; + left: TsEntityName; + right: Identifier; +} +export type TsEntityName = TsQualifiedName | Identifier; +export type TsTypeElement = TsCallSignatureDeclaration | TsConstructSignatureDeclaration | TsPropertySignature | TsGetterSignature | TsSetterSignature | TsMethodSignature | TsIndexSignature; +export interface TsCallSignatureDeclaration extends Node, HasSpan { + type: "TsCallSignatureDeclaration"; + params: TsFnParameter[]; + typeAnnotation?: TsTypeAnnotation; + typeParams?: TsTypeParameterDeclaration; +} +export interface TsConstructSignatureDeclaration extends Node, HasSpan { + type: "TsConstructSignatureDeclaration"; + params: TsFnParameter[]; + typeAnnotation?: TsTypeAnnotation; + typeParams?: TsTypeParameterDeclaration; +} +export interface TsPropertySignature extends Node, HasSpan { + type: "TsPropertySignature"; + readonly: boolean; + key: Expression; + computed: boolean; + optional: boolean; + typeAnnotation?: TsTypeAnnotation; +} +export interface TsGetterSignature extends Node, HasSpan { + type: "TsGetterSignature"; + readonly: boolean; + key: Expression; + computed: boolean; + optional: boolean; + typeAnnotation?: TsTypeAnnotation; +} +export interface TsSetterSignature extends Node, HasSpan { + type: "TsSetterSignature"; + readonly: boolean; + key: Expression; + computed: boolean; + optional: boolean; + param: TsFnParameter; +} +export interface TsMethodSignature extends Node, HasSpan { + type: "TsMethodSignature"; + readonly: boolean; + key: Expression; + computed: boolean; + optional: boolean; + params: TsFnParameter[]; + typeAnn?: TsTypeAnnotation; + typeParams?: TsTypeParameterDeclaration; +} +export interface TsIndexSignature extends Node, HasSpan { + type: "TsIndexSignature"; + params: TsFnParameter[]; + typeAnnotation?: TsTypeAnnotation; + readonly: boolean; + static: boolean; +} +export type TsType = TsKeywordType | TsThisType | TsFnOrConstructorType | TsTypeReference | TsTypeQuery | TsTypeLiteral | TsArrayType | TsTupleType | TsOptionalType | TsRestType | TsUnionOrIntersectionType | TsConditionalType | TsInferType | TsParenthesizedType | TsTypeOperator | TsIndexedAccessType | TsMappedType | TsLiteralType | TsTypePredicate | TsImportType; +export type TsFnOrConstructorType = TsFunctionType | TsConstructorType; +export interface TsKeywordType extends Node, HasSpan { + type: "TsKeywordType"; + kind: TsKeywordTypeKind; +} +export type TsKeywordTypeKind = "any" | "unknown" | "number" | "object" | "boolean" | "bigint" | "string" | "symbol" | "void" | "undefined" | "null" | "never" | "intrinsic"; +export interface TsThisType extends Node, HasSpan { + type: "TsThisType"; +} +export type TsFnParameter = BindingIdentifier | ArrayPattern | RestElement | ObjectPattern; +export interface TsFunctionType extends Node, HasSpan { + type: "TsFunctionType"; + params: TsFnParameter[]; + typeParams?: TsTypeParameterDeclaration; + typeAnnotation: TsTypeAnnotation; +} +export interface TsConstructorType extends Node, HasSpan { + type: "TsConstructorType"; + params: TsFnParameter[]; + typeParams?: TsTypeParameterDeclaration; + typeAnnotation: TsTypeAnnotation; + isAbstract: boolean; +} +export interface TsTypeReference extends Node, HasSpan { + type: "TsTypeReference"; + typeName: TsEntityName; + typeParams?: TsTypeParameterInstantiation; +} +export interface TsTypePredicate extends Node, HasSpan { + type: "TsTypePredicate"; + asserts: boolean; + paramName: TsThisTypeOrIdent; + typeAnnotation?: TsTypeAnnotation; +} +export type TsThisTypeOrIdent = TsThisType | Identifier; +export interface TsImportType extends Node, HasSpan { + type: "TsImportType"; + argument: StringLiteral; + qualifier?: TsEntityName; + typeArguments?: TsTypeParameterInstantiation; +} +/** + * `typeof` operator + */ +export interface TsTypeQuery extends Node, HasSpan { + type: "TsTypeQuery"; + exprName: TsTypeQueryExpr; + typeArguments?: TsTypeParameterInstantiation; +} +export type TsTypeQueryExpr = TsEntityName | TsImportType; +export interface TsTypeLiteral extends Node, HasSpan { + type: "TsTypeLiteral"; + members: TsTypeElement[]; +} +export interface TsArrayType extends Node, HasSpan { + type: "TsArrayType"; + elemType: TsType; +} +export interface TsTupleType extends Node, HasSpan { + type: "TsTupleType"; + elemTypes: TsTupleElement[]; +} +export interface TsTupleElement extends Node, HasSpan { + type: "TsTupleElement"; + label?: Pattern; + ty: TsType; +} +export interface TsOptionalType extends Node, HasSpan { + type: "TsOptionalType"; + typeAnnotation: TsType; +} +export interface TsRestType extends Node, HasSpan { + type: "TsRestType"; + typeAnnotation: TsType; +} +export type TsUnionOrIntersectionType = TsUnionType | TsIntersectionType; +export interface TsUnionType extends Node, HasSpan { + type: "TsUnionType"; + types: TsType[]; +} +export interface TsIntersectionType extends Node, HasSpan { + type: "TsIntersectionType"; + types: TsType[]; +} +export interface TsConditionalType extends Node, HasSpan { + type: "TsConditionalType"; + checkType: TsType; + extendsType: TsType; + trueType: TsType; + falseType: TsType; +} +export interface TsInferType extends Node, HasSpan { + type: "TsInferType"; + typeParam: TsTypeParameter; +} +export interface TsParenthesizedType extends Node, HasSpan { + type: "TsParenthesizedType"; + typeAnnotation: TsType; +} +export interface TsTypeOperator extends Node, HasSpan { + type: "TsTypeOperator"; + op: TsTypeOperatorOp; + typeAnnotation: TsType; +} +export type TsTypeOperatorOp = "keyof" | "unique" | "readonly"; +export interface TsIndexedAccessType extends Node, HasSpan { + type: "TsIndexedAccessType"; + readonly: boolean; + objectType: TsType; + indexType: TsType; +} +export type TruePlusMinus = true | "+" | "-"; +export interface TsMappedType extends Node, HasSpan { + type: "TsMappedType"; + readonly?: TruePlusMinus; + typeParam: TsTypeParameter; + nameType?: TsType; + optional?: TruePlusMinus; + typeAnnotation?: TsType; +} +export interface TsLiteralType extends Node, HasSpan { + type: "TsLiteralType"; + literal: TsLiteral; +} +export type TsLiteral = NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | TsTemplateLiteralType; +export interface TsTemplateLiteralType extends Node, HasSpan { + type: "TemplateLiteral"; + types: TsType[]; + quasis: TemplateElement[]; +} +export interface TsInterfaceDeclaration extends Node, HasSpan { + type: "TsInterfaceDeclaration"; + id: Identifier; + declare: boolean; + typeParams?: TsTypeParameterDeclaration; + extends: TsExpressionWithTypeArguments[]; + body: TsInterfaceBody; +} +export interface TsInterfaceBody extends Node, HasSpan { + type: "TsInterfaceBody"; + body: TsTypeElement[]; +} +export interface TsExpressionWithTypeArguments extends Node, HasSpan { + type: "TsExpressionWithTypeArguments"; + expression: Expression; + typeArguments?: TsTypeParameterInstantiation; +} +export interface TsTypeAliasDeclaration extends Node, HasSpan { + type: "TsTypeAliasDeclaration"; + declare: boolean; + id: Identifier; + typeParams?: TsTypeParameterDeclaration; + typeAnnotation: TsType; +} +export interface TsEnumDeclaration extends Node, HasSpan { + type: "TsEnumDeclaration"; + declare: boolean; + isConst: boolean; + id: Identifier; + members: TsEnumMember[]; +} +export interface TsEnumMember extends Node, HasSpan { + type: "TsEnumMember"; + id: TsEnumMemberId; + init?: Expression; +} +export type TsEnumMemberId = Identifier | StringLiteral; +export interface TsModuleDeclaration extends Node, HasSpan { + type: "TsModuleDeclaration"; + declare: boolean; + global: boolean; + id: TsModuleName; + body?: TsNamespaceBody; +} +/** + * `namespace A.B { }` is a namespace named `A` with another TsNamespaceDecl as its body. + */ +export type TsNamespaceBody = TsModuleBlock | TsNamespaceDeclaration; +export interface TsModuleBlock extends Node, HasSpan { + type: "TsModuleBlock"; + body: ModuleItem[]; +} +export interface TsNamespaceDeclaration extends Node, HasSpan { + type: "TsNamespaceDeclaration"; + declare: boolean; + global: boolean; + id: Identifier; + body: TsNamespaceBody; +} +export type TsModuleName = Identifier | StringLiteral; +export interface TsImportEqualsDeclaration extends Node, HasSpan { + type: "TsImportEqualsDeclaration"; + declare: boolean; + isExport: boolean; + isTypeOnly: boolean; + id: Identifier; + moduleRef: TsModuleReference; +} +export type TsModuleReference = TsEntityName | TsExternalModuleReference; +export interface TsExternalModuleReference extends Node, HasSpan { + type: "TsExternalModuleReference"; + expression: StringLiteral; +} +export interface TsExportAssignment extends Node, HasSpan { + type: "TsExportAssignment"; + expression: Expression; +} +export interface TsNamespaceExportDeclaration extends Node, HasSpan { + type: "TsNamespaceExportDeclaration"; + id: Identifier; +} +export interface TsAsExpression extends ExpressionBase { + type: "TsAsExpression"; + expression: Expression; + typeAnnotation: TsType; +} +export interface TsSatisfiesExpression extends ExpressionBase { + type: "TsSatisfiesExpression"; + expression: Expression; + typeAnnotation: TsType; +} +export interface TsInstantiation extends Node, HasSpan { + type: "TsInstantiation"; + expression: Expression; + typeArguments: TsTypeParameterInstantiation; +} +export interface TsTypeAssertion extends ExpressionBase { + type: "TsTypeAssertion"; + expression: Expression; + typeAnnotation: TsType; +} +export interface TsConstAssertion extends ExpressionBase { + type: "TsConstAssertion"; + expression: Expression; +} +export interface TsNonNullExpression extends ExpressionBase { + type: "TsNonNullExpression"; + expression: Expression; +} +export type Accessibility = "public" | "protected" | "private"; +export interface Invalid extends Node, HasSpan { + type: "Invalid"; +} +export type WasmAnalysisOptions = { + parser?: ParserConfig; + module?: true | false | "unknown"; + filename?: string; + errorFormat?: "json" | "normal"; + cacheRoot?: string; + plugins: WasmPlugin[]; +}; +export type WasmPlugin = [wasmPackage: string, config: Record]; +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@swc/types/index.js b/node_modules/@swc/types/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c8ad2e549bdc6801e0d1c80b0308d4b9bd4985ce --- /dev/null +++ b/node_modules/@swc/types/index.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@swc/types/package.json b/node_modules/@swc/types/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5acf38c4f28dce6427947f67f4e628b87263d746 --- /dev/null +++ b/node_modules/@swc/types/package.json @@ -0,0 +1,39 @@ +{ + "name": "@swc/types", + "version": "0.1.27", + "description": "Typings for the swc project.", + "types": "./index.d.ts", + "sideEffects": false, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git", + "directory": "packages/types" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "files": [ + "*.js", + "*.d.ts" + ], + "keywords": [ + "swc", + "types" + ], + "author": "강동윤 ", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + }, + "homepage": "https://swc.rs", + "devDependencies": { + "typescript": "^5.2.2" + }, + "dependencies": { + "@swc/counter": "^0.1.3" + }, + "scripts": { + "build": "tsc" + } +} \ No newline at end of file diff --git a/node_modules/@testing-library/dom/LICENSE b/node_modules/@testing-library/dom/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4c43675bc4da5d353732ebb199ebaaf5eeeef014 --- /dev/null +++ b/node_modules/@testing-library/dom/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) +Copyright (c) 2017 Kent C. Dodds + +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/@testing-library/dom/README.md b/node_modules/@testing-library/dom/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2011260acf6436e88aecb2197debae83aac4d3b9 --- /dev/null +++ b/node_modules/@testing-library/dom/README.md @@ -0,0 +1,402 @@ + + +
+ + +[![Build Status][build-badge]][build] +[![Code Coverage][coverage-badge]][coverage] +[![version][version-badge]][package] +[![downloads][downloads-badge]][npmtrends] +[![MIT License][license-badge]][license] +[![All Contributors][all-contributors-badge]](#contributors) +[![PRs Welcome][prs-badge]][prs] +[![Code of Conduct][coc-badge]][coc] +[![Discord][discord-badge]][discord] + +[![Watch on GitHub][github-watch-badge]][github-watch] +[![Star on GitHub][github-star-badge]][github-star] +[![Tweet][twitter-badge]][twitter] + + + + +## Table of Contents + + + + +- [The Problem](#the-problem) +- [This Solution](#this-solution) +- [Installation](#installation) +- [Documentation](#documentation) +- [Guiding Principles](#guiding-principles) +- [Contributors](#contributors) +- [LICENSE](#license) + + + +## The Problem + +You want to write maintainable tests for your Web UI. As a part of this goal, +you want your tests to avoid including implementation details of your components +and rather focus on making your tests give you the confidence for which they are +intended. As part of this, you want your testbase to be maintainable in the long +run so refactors of your components (changes to implementation but not +functionality) don't break your tests and slow you and your team down. + +## This Solution + +The `DOM Testing Library` is a very light-weight solution for testing DOM nodes +(whether simulated with [`JSDOM`](https://github.com/jsdom/jsdom) as provided by +default with [Jest][] or in the browser). The main utilities it provides involve +querying the DOM for nodes in a way that's similar to how the user finds +elements on the page. In this way, the library helps ensure your tests give you +confidence in your UI code. The `DOM Testing Library`'s primary guiding +principle is: + +> [The more your tests resemble the way your software is used, the more +> confidence they can give you.][guiding-principle] + +## Installation + +This module is distributed via [npm][npm] which is bundled with [node][node] and +should be installed as one of your project's `devDependencies`: + +``` +npm install --save-dev @testing-library/dom +``` + +> [**Docs**](https://testing-library.com/docs/install) + +## Documentation + +Read the docs (and discover framework and tool-specific implementations) at +[testing-library.com](https://testing-library.com/dom) + +## Guiding Principles + +> [The more your tests resemble the way your software is used, the more +> confidence they can give you.][guiding-principle] + +We try to only expose methods and utilities that encourage you to write tests +that closely resemble how your web pages are used. + +Utilities are included in this project based on the following guiding +principles: + +1. If it relates to rendering components, it deals with DOM nodes rather than + component instances, nor should it encourage dealing with component + instances. +2. It should be generally useful for testing the application components in the + way the user would use it. We _are_ making some trade-offs here because + we're using a computer and often a simulated browser environment, but in + general, utilities should encourage tests that use the components the way + they're intended to be used. +3. Utility implementations and APIs should be simple and flexible. + +At the end of the day, what we want is for this library to be pretty +light-weight, simple, and understandable. + +## Contributors + +Thanks goes to these people ([emoji key][emojis]): + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Kent C. Dodds
Kent C. Dodds

💻 📖 🚇 ⚠️
Greg Bergé
Greg Bergé

🤔
Ryan Castner
Ryan Castner

📖
Daniel Sandiego
Daniel Sandiego

💻
Paweł Mikołajczyk
Paweł Mikołajczyk

💻
Alejandro Ñáñez Ortiz
Alejandro Ñáñez Ortiz

📖
Matt Parrish
Matt Parrish

🐛 💻 📖 ⚠️
Justin Hall
Justin Hall

📦
Anto Aravinth
Anto Aravinth

💻 ⚠️ 📖
Jonah Moses
Jonah Moses

📖
Łukasz Gandecki
Łukasz Gandecki

💻 ⚠️ 📖
Ivan Babak
Ivan Babak

🐛 🤔 💻 📖
Jesse Day
Jesse Day

💻
Ernesto García
Ernesto García

💬 💻 📖
Josef Maxx Blake
Josef Maxx Blake

💻 📖 ⚠️
Alex Cook
Alex Cook

📖 💡 👀
Daniel Cook
Daniel Cook

💻 📖 ⚠️
Thomas Chia
Thomas Chia

🐛 💻
Tim Deschryver
Tim Deschryver

💻 ⚠️ 👀
Alex Krolick
Alex Krolick

💻
Maddi Joyce
Maddi Joyce

💻
Peter Kamps
Peter Kamps

🐛 💻 ⚠️
Jonathan Stoye
Jonathan Stoye

📖 💻
Sanghyeon Lee
Sanghyeon Lee

💡
Justice Mba
Justice Mba

💻 📖 🤔
Wayne Crouch
Wayne Crouch

💻
Ben Elliott
Ben Elliott

💻
Ruben Costa
Ruben Costa

💻
Robert Smith
Robert Smith

🐛 🤔 📖
dadamssg
dadamssg

💻
Neil Kistner
Neil Kistner

💻 ⚠️
Ben Chauvette
Ben Chauvette

💻
Jeff Baumgardt
Jeff Baumgardt

💻 📖
Matan Kushner
Matan Kushner

💻 📖 🤔 ⚠️
Alex Wendte
Alex Wendte

💻 📖 ⚠️
Tamas Fodor
Tamas Fodor

📖
Benjamin Eckardt
Benjamin Eckardt

💻
Ryan Campbell
Ryan Campbell

📖
Taylor Briggs
Taylor Briggs

⚠️
John Gozde
John Gozde

💻
C. T. Lin
C. T. Lin

📖
Terrence Wong
Terrence Wong

💻
Soo Jae Hwang
Soo Jae Hwang

💻
Royston Shufflebotham
Royston Shufflebotham

🐛 💻 📖 ⚠️
Vadim Brodsky
Vadim Brodsky

💻
Eunjae Lee
Eunjae Lee

💻
David Peter
David Peter

💻
Shy Alter
Shy Alter

💻 📖
Łukasz Makuch
Łukasz Makuch

📦
Tyler Haas
Tyler Haas

💻 ⚠️
Vesa Laakso
Vesa Laakso

💻 ⚠️
Tulsi Sapkota
Tulsi Sapkota

💻
Tiago Nunes
Tiago Nunes

💻 ⚠️
JaxCavalera
JaxCavalera

💻 👀
bopfer
bopfer

⚠️
Jan Pfitzner
Jan Pfitzner

💻
David
David

💻
Diego Hernandez
Diego Hernandez

💻 ⚠️
Alex Young
Alex Young

💻
Paul Armstrong
Paul Armstrong

💻 ⚠️
Tamás Szabó
Tamás Szabó

💻 ⚠️
Dylan Piercey
Dylan Piercey

💻 ⚠️
Michael Lasky
Michael Lasky

💻 ⚠️ 📖
Sebastian Silbermann
Sebastian Silbermann

💻 ⚠️ 📖 🚇 👀
Dylan Vann
Dylan Vann

💻
Adrià Fontcuberta
Adrià Fontcuberta

💻 ⚠️ 📖
Thomas Lombart
Thomas Lombart

💻
Sam Horton
Sam Horton

💻 ⚠️
Andrew Hill
Andrew Hill

💻
Jan Amann
Jan Amann

💻 ⚠️
Brais Piñeiro
Brais Piñeiro

💻 ⚠️
Dominykas Blyžė
Dominykas Blyžė

💻 ⚠️
Olzhas Askar
Olzhas Askar

💻 ⚠️ 📖
Max Belsky
Max Belsky

💻 ⚠️
Michael Mantel
Michael Mantel

⚠️
Tom Nagle
Tom Nagle

💻
Westbrook Johnson
Westbrook Johnson

💻
Mohammad Aziz
Mohammad Aziz

💻 ⚠️
seetdev
seetdev

⚠️ 💻
Xavier Garcia Buils
Xavier Garcia Buils

💻 ⚠️
aw-davidson
aw-davidson

💻 ⚠️
Michaël De Boey
Michaël De Boey

💻
Minh Nguyen
Minh Nguyen

💻
Egill Sveinbjörnsson
Egill Sveinbjörnsson

💻
Pavel Pustovalov
Pavel Pustovalov

📖
Adam Palaniuk
Adam Palaniuk

💻 ⚠️
Yama-Tomo
Yama-Tomo

💻 ⚠️
Aaron Pettengill
Aaron Pettengill

💻 ⚠️
Kate W. Boyd
Kate W. Boyd

💻
Rahul Suryakanth
Rahul Suryakanth

💻 ⚠️
Jamie
Jamie

💻 ⚠️
Nicolas Stepien
Nicolas Stepien

💻
Ken Powers
Ken Powers

💻
Michał Zdunek
Michał Zdunek

💻
Ali Nasserzadeh
Ali Nasserzadeh

💻
Darek Kay
Darek Kay

📖 💻 ⚠️
Lukas
Lukas

💻 ⚠️
Tom Crockett
Tom Crockett

💻 ⚠️
Kevin Brewer
Kevin Brewer

💻 ⚠️
Ben Monro
Ben Monro

💻 🤔 ⚠️ 📖
Stephan Meijer
Stephan Meijer

🤔 💻 ⚠️
João Forja
João Forja

💻 ⚠️
Nick McCurdy
Nick McCurdy

📖 💻 ⚠️ 👀 🚇
Caleb Meredith
Caleb Meredith

💻
Marco Moretti
Marco Moretti

💻 ⚠️ 👀
Travis Jefferson
Travis Jefferson

💻 ⚠️
Maciej Jastrzebski
Maciej Jastrzebski

🐛
Geoff Harcourt
Geoff Harcourt

💻
Josh Goldberg
Josh Goldberg

💻 ⚠️
Ken Gregory
Ken Gregory

💻 ⚠️
Jacob Paris
Jacob Paris

💻 ⚠️
keiya sasaki
keiya sasaki

📖
Idan Entin
Idan Entin

💻 ⚠️
Deniz Susman
Deniz Susman

💻
Bianca Del Carretto
Bianca Del Carretto

⚠️ 💻
Josh Lalonde
Josh Lalonde

💻 ⚠️
Ioannis Papadopoulos
Ioannis Papadopoulos

💻 ⚠️
Maxwell Newlands
Maxwell Newlands

💻 ⚠️
Jared Luxenberg
Jared Luxenberg

💻 ⚠️
snizhana
snizhana

💻 ⚠️
Michael van Engelshoven
Michael van Engelshoven

👀
Asher Tuggle
Asher Tuggle

🐛
Winter LaMon
Winter LaMon

💻 ⚠️
Victor Cordova
Victor Cordova

💻 ⚠️
slowselfip
slowselfip

🐛
Dmitry Semigradsky
Dmitry Semigradsky

💻
Adam
Adam

💻 ⚠️
balavishnuvj
balavishnuvj

💻
Chris Colborne
Chris Colborne

💻
Romain Trotard
Romain Trotard

💻
Thomas Marshall
Thomas Marshall

💻 ⚠️
johnjessewood
johnjessewood

🐛 💻
Ari Perkkiö
Ari Perkkiö

🐛 💻 📖
Nathan Force
Nathan Force

💻
Philipp Fritsche
Philipp Fritsche

💻
Renato Alencar
Renato Alencar

💻 ⚠️
Simen Bekkhus
Simen Bekkhus

🐛
Dan Abramov
Dan Abramov

🐛 👀
Matan Borenkraout
Matan Borenkraout

💻
simcha90
simcha90

💻
Amit Miran
Amit Miran

🚇
Dominik Lesch
Dominik Lesch

📖
Gareth Jones
Gareth Jones

💻 ⚠️
Rayat Rahman
Rayat Rahman

💻
Nik Savchenko
Nik Savchenko

💻
Kevin Fleischman
Kevin Fleischman

💻 ⚠️
Beth Hitch
Beth Hitch

💻
Jack Laurence
Jack Laurence

💻
SantoJambit
SantoJambit

💻
Yashu Mittal
Yashu Mittal

📖
Ian VanSchooten
Ian VanSchooten

💻
Vanya Prokopovich
Vanya Prokopovich

🐛
James Nail
James Nail

🐛
Rob Caldecott
Rob Caldecott

🐛
Dennis273
Dennis273

💻
Jackson Hardaker
Jackson Hardaker

⚠️
Robin Drexler
Robin Drexler

💻
Omer Dolev
Omer Dolev

💻
Lirlev48
Lirlev48

💻
Tarnay Kálmán
Tarnay Kálmán

💻
Than Hutchins
Than Hutchins

💻
Raphaël LEMIEUX
Raphaël LEMIEUX

💻
Arthur Lauck Vilas Boas
Arthur Lauck Vilas Boas

📖
Daniel Acuña
Daniel Acuña

💻
Craig Morten
Craig Morten

💻 💬
Naor Peled
Naor Peled

💻
Julien Wajsberg
Julien Wajsberg

💻 🐛
Kevin BON
Kevin BON

💻 🐛
sieem
sieem

💻
+ + + + + + +This project follows the [all-contributors][all-contributors] specification. +Contributions of any kind welcome! + +## LICENSE + +[MIT](LICENSE) + + + +[npm]: https://www.npmjs.com/ +[node]: https://nodejs.org +[build-badge]: https://img.shields.io/github/workflow/status/testing-library/dom-testing-library/validate?logo=github&style=flat-square +[build]: https://github.com/testing-library/dom-testing-library/actions?query=workflow%3Avalidate +[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/dom-testing-library.svg?style=flat-square +[coverage]: https://codecov.io/github/testing-library/dom-testing-library +[version-badge]: https://img.shields.io/npm/v/@testing-library/dom.svg?style=flat-square +[package]: https://www.npmjs.com/package/@testing-library/dom +[downloads-badge]: https://img.shields.io/npm/dm/@testing-library/dom.svg?style=flat-square +[npmtrends]: http://www.npmtrends.com/@testing-library/dom +[license-badge]: https://img.shields.io/npm/l/@testing-library/dom.svg?style=flat-square +[license]: https://github.com/testing-library/dom-testing-library/blob/main/LICENSE +[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square +[prs]: http://makeapullrequest.com +[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square +[coc]: https://github.com/testing-library/dom-testing-library/blob/main/CODE_OF_CONDUCT.md +[github-watch-badge]: https://img.shields.io/github/watchers/testing-library/dom-testing-library.svg?style=social +[github-watch]: https://github.com/testing-library/dom-testing-library/watchers +[github-star-badge]: https://img.shields.io/github/stars/testing-library/dom-testing-library.svg?style=social +[github-star]: https://github.com/testing-library/dom-testing-library/stargazers +[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20dom-testing-library%20by%20%40testing-library%20https%3A%2F%2Fgithub.com%2Ftesting-library%2Fdom-testing-library%20%F0%9F%91%8D +[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/testing-library/dom-testing-library.svg?style=social +[emojis]: https://github.com/all-contributors/all-contributors#emoji-key +[all-contributors]: https://github.com/all-contributors/all-contributors +[all-contributors-badge]: https://img.shields.io/github/all-contributors/testing-library/dom-testing-library?color=orange&style=flat-square +[set-immediate]: https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate +[guiding-principle]: https://twitter.com/kentcdodds/status/977018512689455106 +[jest]: https://facebook.github.io/jest +[discord-badge]: https://img.shields.io/discord/723559267868737556.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square +[discord]: https://discord.gg/testing-library + + diff --git a/node_modules/@testing-library/dom/package.json b/node_modules/@testing-library/dom/package.json new file mode 100644 index 0000000000000000000000000000000000000000..14740c10f5e0ab7821d2766e06f5db1db9752d9c --- /dev/null +++ b/node_modules/@testing-library/dom/package.json @@ -0,0 +1,120 @@ +{ + "name": "@testing-library/dom", + "version": "10.4.1", + "description": "Simple and complete DOM testing utilities that encourage good testing practices.", + "main": "dist/index.js", + "types": "types/index.d.ts", + "module": "dist/@testing-library/dom.esm.js", + "umd:main": "dist/@testing-library/dom.umd.js", + "source": "src/index.js", + "keywords": [ + "testing", + "ui", + "dom", + "jsdom", + "unit", + "integration", + "functional", + "end-to-end", + "e2e" + ], + "author": "Kent C. Dodds (https://kentcdodds.com)", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "browserslist": [ + "and_chr 103", + "and_ff 101", + "and_qq 10.4", + "and_uc 12.12", + "android 103", + "chrome 102", + "edge 102", + "firefox 91", + "ios_saf 12.2-12.5", + "kaios 2.5", + "op_mini all", + "op_mob 64", + "opera 88", + "safari 15.5", + "samsung 17.0", + "samsung 16.0", + "node 18.0" + ], + "scripts": { + "build": "kcd-scripts build --no-ts-defs --ignore \"**/__tests__/**,**/__node_tests__/**,**/__mocks__/**\" && kcd-scripts build --no-ts-defs --bundle --no-clean", + "format": "kcd-scripts format", + "install:csb": "npm install", + "lint": "kcd-scripts lint", + "setup": "npm install && npm run validate -s", + "test": "kcd-scripts test", + "test:debug": "node --inspect-brk ./node_modules/.bin/jest --watch --runInBand", + "test:update": "npm test -- --updateSnapshot --coverage", + "validate": "kcd-scripts validate", + "typecheck": "kcd-scripts typecheck --build types" + }, + "files": [ + "dist", + "types/*.d.ts" + ], + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "picocolors": "1.1.1", + "pretty-format": "^27.0.2" + }, + "devDependencies": { + "@testing-library/jest-dom": "^5.11.6", + "browserslist": "4.21.8", + "caniuse-lite": "1.0.30001502", + "jest-in-case": "^1.0.2", + "jest-snapshot-serializer-ansi": "^1.0.0", + "jest-watch-select-projects": "^2.0.0", + "jsdom": "20.0.0", + "kcd-scripts": "^13.0.0", + "typescript": "^4.1.2" + }, + "overrides": { + "@babel/helper-compilation-targets": "7.24.7", + "browserslist": "4.21.8", + "caniuse-lite": "1.0.30001502" + }, + "eslintConfig": { + "extends": [ + "./node_modules/kcd-scripts/eslint.js", + "plugin:import/typescript" + ], + "parserOptions": { + "ecmaVersion": 2020 + }, + "rules": { + "@typescript-eslint/prefer-optional-chain": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off", + "@typescript-eslint/prefer-includes": "off", + "import/prefer-default-export": "off", + "import/no-unassigned-import": "off", + "import/no-useless-path-segments": "off", + "no-console": "off" + } + }, + "eslintIgnore": [ + "node_modules", + "coverage", + "dist" + ], + "repository": { + "type": "git", + "url": "https://github.com/testing-library/dom-testing-library" + }, + "bugs": { + "url": "https://github.com/testing-library/dom-testing-library/issues" + }, + "homepage": "https://github.com/testing-library/dom-testing-library#readme" +} diff --git a/node_modules/@testing-library/dom/types/config.d.ts b/node_modules/@testing-library/dom/types/config.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c3617ef087f1fadf67f964e3afb9754f50b058cf --- /dev/null +++ b/node_modules/@testing-library/dom/types/config.d.ts @@ -0,0 +1,27 @@ +export interface Config { + testIdAttribute: string + /** + * WARNING: `unstable` prefix means this API may change in patch and minor releases. + * @param cb + */ + unstable_advanceTimersWrapper(cb: (...args: unknown[]) => unknown): unknown + // eslint-disable-next-line @typescript-eslint/no-explicit-any + asyncWrapper(cb: (...args: any[]) => any): Promise + // eslint-disable-next-line @typescript-eslint/no-explicit-any + eventWrapper(cb: (...args: any[]) => any): void + asyncUtilTimeout: number + computedStyleSupportsPseudoElements: boolean + defaultHidden: boolean + /** default value for the `ignore` option in `ByText` queries */ + defaultIgnore: string + showOriginalStackTrace: boolean + throwSuggestions: boolean + getElementError: (message: string | null, container: Element) => Error +} + +export interface ConfigFn { + (existingConfig: Config): Partial +} + +export function configure(configDelta: ConfigFn | Partial): void +export function getConfig(): Config diff --git a/node_modules/@testing-library/dom/types/events.d.ts b/node_modules/@testing-library/dom/types/events.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b524c189b2181c16902e56d9094945373ff75139 --- /dev/null +++ b/node_modules/@testing-library/dom/types/events.d.ts @@ -0,0 +1,118 @@ +export type EventType = + | 'copy' + | 'cut' + | 'paste' + | 'compositionEnd' + | 'compositionStart' + | 'compositionUpdate' + | 'keyDown' + | 'keyPress' + | 'keyUp' + | 'focus' + | 'blur' + | 'focusIn' + | 'focusOut' + | 'change' + | 'input' + | 'invalid' + | 'submit' + | 'reset' + | 'click' + | 'contextMenu' + | 'dblClick' + | 'drag' + | 'dragEnd' + | 'dragEnter' + | 'dragExit' + | 'dragLeave' + | 'dragOver' + | 'dragStart' + | 'drop' + | 'mouseDown' + | 'mouseEnter' + | 'mouseLeave' + | 'mouseMove' + | 'mouseOut' + | 'mouseOver' + | 'mouseUp' + | 'popState' + | 'select' + | 'touchCancel' + | 'touchEnd' + | 'touchMove' + | 'touchStart' + | 'resize' + | 'scroll' + | 'wheel' + | 'abort' + | 'canPlay' + | 'canPlayThrough' + | 'durationChange' + | 'emptied' + | 'encrypted' + | 'ended' + | 'loadedData' + | 'loadedMetadata' + | 'loadStart' + | 'pause' + | 'play' + | 'playing' + | 'progress' + | 'rateChange' + | 'seeked' + | 'seeking' + | 'stalled' + | 'suspend' + | 'timeUpdate' + | 'volumeChange' + | 'waiting' + | 'load' + | 'error' + | 'animationStart' + | 'animationEnd' + | 'animationIteration' + | 'transitionCancel' + | 'transitionEnd' + | 'transitionRun' + | 'transitionStart' + | 'doubleClick' + | 'pointerOver' + | 'pointerEnter' + | 'pointerDown' + | 'pointerMove' + | 'pointerUp' + | 'pointerCancel' + | 'pointerOut' + | 'pointerLeave' + | 'gotPointerCapture' + | 'lostPointerCapture' + | 'offline' + | 'online' + | 'pageHide' + | 'pageShow' + +export type FireFunction = ( + element: Document | Element | Window | Node, + event: Event, +) => boolean +export type FireObject = { + [K in EventType]: ( + element: Document | Element | Window | Node, + options?: {}, + ) => boolean +} +export type CreateFunction = ( + eventName: string, + node: Document | Element | Window | Node, + init?: {}, + options?: {EventType?: string; defaultInit?: {}}, +) => Event +export type CreateObject = { + [K in EventType]: ( + element: Document | Element | Window | Node, + options?: {}, + ) => Event +} + +export const createEvent: CreateObject & CreateFunction +export const fireEvent: FireFunction & FireObject diff --git a/node_modules/@testing-library/dom/types/get-node-text.d.ts b/node_modules/@testing-library/dom/types/get-node-text.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3f01b6291142c8f6a90ad9a8ef73d8157ee01bac --- /dev/null +++ b/node_modules/@testing-library/dom/types/get-node-text.d.ts @@ -0,0 +1 @@ +export function getNodeText(node: HTMLElement): string diff --git a/node_modules/@testing-library/dom/types/get-queries-for-element.d.ts b/node_modules/@testing-library/dom/types/get-queries-for-element.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..33d13de8a6ec4465bac442dcf9030c6e5430e66e --- /dev/null +++ b/node_modules/@testing-library/dom/types/get-queries-for-element.d.ts @@ -0,0 +1,182 @@ +import * as queries from './queries' + +export type BoundFunction = T extends ( + container: HTMLElement, + ...args: infer P +) => infer R + ? (...args: P) => R + : never + +export type BoundFunctions = Q extends typeof queries + ? { + getByLabelText( + ...args: Parameters>> + ): ReturnType> + getAllByLabelText( + ...args: Parameters>> + ): ReturnType> + queryByLabelText( + ...args: Parameters>> + ): ReturnType> + queryAllByLabelText( + ...args: Parameters>> + ): ReturnType> + findByLabelText( + ...args: Parameters>> + ): ReturnType> + findAllByLabelText( + ...args: Parameters>> + ): ReturnType> + getByPlaceholderText( + ...args: Parameters>> + ): ReturnType> + getAllByPlaceholderText( + ...args: Parameters>> + ): ReturnType> + queryByPlaceholderText( + ...args: Parameters>> + ): ReturnType> + queryAllByPlaceholderText( + ...args: Parameters>> + ): ReturnType> + findByPlaceholderText( + ...args: Parameters>> + ): ReturnType> + findAllByPlaceholderText( + ...args: Parameters>> + ): ReturnType> + getByText( + ...args: Parameters>> + ): ReturnType> + getAllByText( + ...args: Parameters>> + ): ReturnType> + queryByText( + ...args: Parameters>> + ): ReturnType> + queryAllByText( + ...args: Parameters>> + ): ReturnType> + findByText( + ...args: Parameters>> + ): ReturnType> + findAllByText( + ...args: Parameters>> + ): ReturnType> + getByAltText( + ...args: Parameters>> + ): ReturnType> + getAllByAltText( + ...args: Parameters>> + ): ReturnType> + queryByAltText( + ...args: Parameters>> + ): ReturnType> + queryAllByAltText( + ...args: Parameters>> + ): ReturnType> + findByAltText( + ...args: Parameters>> + ): ReturnType> + findAllByAltText( + ...args: Parameters>> + ): ReturnType> + getByTitle( + ...args: Parameters>> + ): ReturnType> + getAllByTitle( + ...args: Parameters>> + ): ReturnType> + queryByTitle( + ...args: Parameters>> + ): ReturnType> + queryAllByTitle( + ...args: Parameters>> + ): ReturnType> + findByTitle( + ...args: Parameters>> + ): ReturnType> + findAllByTitle( + ...args: Parameters>> + ): ReturnType> + getByDisplayValue( + ...args: Parameters>> + ): ReturnType> + getAllByDisplayValue( + ...args: Parameters>> + ): ReturnType> + queryByDisplayValue( + ...args: Parameters>> + ): ReturnType> + queryAllByDisplayValue( + ...args: Parameters>> + ): ReturnType> + findByDisplayValue( + ...args: Parameters>> + ): ReturnType> + findAllByDisplayValue( + ...args: Parameters>> + ): ReturnType> + getByRole( + ...args: Parameters>> + ): ReturnType> + getAllByRole( + ...args: Parameters>> + ): ReturnType> + queryByRole( + ...args: Parameters>> + ): ReturnType> + queryAllByRole( + ...args: Parameters>> + ): ReturnType> + findByRole( + ...args: Parameters>> + ): ReturnType> + findAllByRole( + ...args: Parameters>> + ): ReturnType> + getByTestId( + ...args: Parameters>> + ): ReturnType> + getAllByTestId( + ...args: Parameters>> + ): ReturnType> + queryByTestId( + ...args: Parameters>> + ): ReturnType> + queryAllByTestId( + ...args: Parameters>> + ): ReturnType> + findByTestId( + ...args: Parameters>> + ): ReturnType> + findAllByTestId( + ...args: Parameters>> + ): ReturnType> + } & { + [P in keyof Q]: BoundFunction + } + : { + [P in keyof Q]: BoundFunction + } + +export type Query = ( + container: HTMLElement, + ...args: any[] +) => + | Error + | HTMLElement + | HTMLElement[] + | Promise + | Promise + | null + +export interface Queries { + [T: string]: Query +} + +export function getQueriesForElement< + QueriesToBind extends Queries = typeof queries, + // Extra type parameter required for reassignment. + T extends QueriesToBind = QueriesToBind, +>(element: HTMLElement, queriesToBind?: T): BoundFunctions diff --git a/node_modules/@testing-library/dom/types/index.d.ts b/node_modules/@testing-library/dom/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b5dcfbc2833c28c9d796074ca2bb7429f652467f --- /dev/null +++ b/node_modules/@testing-library/dom/types/index.d.ts @@ -0,0 +1,22 @@ +// TypeScript Version: 3.8 + +import {getQueriesForElement} from './get-queries-for-element' +import * as queries from './queries' +import * as queryHelpers from './query-helpers' + +declare const within: typeof getQueriesForElement +export {queries, queryHelpers, within} + +export * from './queries' +export * from './query-helpers' +export * from './screen' +export * from './wait-for' +export * from './wait-for-element-to-be-removed' +export * from './matches' +export * from './get-node-text' +export * from './events' +export * from './get-queries-for-element' +export * from './pretty-dom' +export * from './role-helpers' +export * from './config' +export * from './suggestions' diff --git a/node_modules/@testing-library/dom/types/matches.d.ts b/node_modules/@testing-library/dom/types/matches.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9df516803758aa2dab89dfb9755a47e3e5f340ad --- /dev/null +++ b/node_modules/@testing-library/dom/types/matches.d.ts @@ -0,0 +1,46 @@ +import {ARIARole} from 'aria-query' + +export type MatcherFunction = ( + content: string, + element: Element | null, +) => boolean +export type Matcher = MatcherFunction | RegExp | number | string + +// Get autocomplete for ARIARole union types, while still supporting another string +// Ref: https://github.com/microsoft/TypeScript/issues/29729#issuecomment-567871939 +export type ByRoleMatcher = ARIARole | (string & {}) + +export type NormalizerFn = (text: string) => string + +export interface NormalizerOptions extends DefaultNormalizerOptions { + normalizer?: NormalizerFn +} + +export interface MatcherOptions { + exact?: boolean + /** Use normalizer with getDefaultNormalizer instead */ + trim?: boolean + /** Use normalizer with getDefaultNormalizer instead */ + collapseWhitespace?: boolean + normalizer?: NormalizerFn + /** suppress suggestions for a specific query */ + suggest?: boolean +} + +export type Match = ( + textToMatch: string, + node: HTMLElement | null, + matcher: Matcher, + options?: MatcherOptions, +) => boolean + +export interface DefaultNormalizerOptions { + trim?: boolean + collapseWhitespace?: boolean +} + +export function getDefaultNormalizer( + options?: DefaultNormalizerOptions, +): NormalizerFn + +// N.B. Don't expose fuzzyMatches + matches here: they're not public API diff --git a/node_modules/@testing-library/dom/types/pretty-dom.d.ts b/node_modules/@testing-library/dom/types/pretty-dom.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6b413b3bb09ef95f81ea44619dbcb424577085fa --- /dev/null +++ b/node_modules/@testing-library/dom/types/pretty-dom.d.ts @@ -0,0 +1,21 @@ +import * as prettyFormat from 'pretty-format' + +export interface PrettyDOMOptions extends prettyFormat.OptionsReceived { + /** + * Given a `Node` return `false` if you wish to ignore that node in the output. + * By default, ignores ` or
+

DOM Testing Library

+ +
+ octopus + + +

Simple and complete DOM testing utilities that encourage good testing +practices.

+ +[**Read the docs**](https://testing-library.com/dom) | +[Edit the docs](https://github.com/testing-library/testing-library-docs) + +