UNPKG

@stencil/core

Version:

A Compiler for Web Components and Progressive Web Apps

1,337 lines (1,317 loc) • 392 kB
/*! Stencil Testing v4.22.2 | MIT Licensed | https://stenciljs.com */ "use strict"; // eslint-disable-next-line @typescript-eslint/no-unused-vars function _lazyRequire(moduleId) { return new Proxy( {}, { get(_target, propertyKey) { const importedModule = require(moduleId); return Reflect.get(importedModule, propertyKey); }, set(_target, propertyKey, value) { const importedModule = require(moduleId); return Reflect.set(importedModule, propertyKey, value); }, }, ); } var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // node_modules/semver/internal/debug.js var require_debug = __commonJS({ "node_modules/semver/internal/debug.js"(exports2, module2) { var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { }; module2.exports = debug; } }); // node_modules/semver/internal/constants.js var require_constants = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { var SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; var RELEASE_TYPES = [ "major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease" ]; module2.exports = { MAX_LENGTH, MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_SAFE_INTEGER, RELEASE_TYPES, SEMVER_SPEC_VERSION, FLAG_INCLUDE_PRERELEASE: 1, FLAG_LOOSE: 2 }; } }); // node_modules/semver/internal/re.js var require_re = __commonJS({ "node_modules/semver/internal/re.js"(exports2, module2) { var { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants(); var debug = require_debug(); exports2 = module2.exports = {}; var re = exports2.re = []; var safeRe = exports2.safeRe = []; var src = exports2.src = []; var t = exports2.t = {}; var R = 0; var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; var safeRegexReplacements = [ ["\\s", 1], ["\\d", MAX_LENGTH], [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] ]; var makeSafeRegex = (value) => { for (const [token, max] of safeRegexReplacements) { value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); } return value; }; var createToken = (name, value, isGlobal) => { const safe = makeSafeRegex(value); const index = R++; debug(name, index, value); t[name] = index; src[index] = value; re[index] = new RegExp(value, isGlobal ? "g" : void 0); safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); }; createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); createToken("FULL", `^${src[t.FULLPLAIN]}$`); createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); createToken("GTLT", "((?:<|>)?=?)"); createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); createToken("COERCERTL", src[t.COERCE], true); createToken("COERCERTLFULL", src[t.COERCEFULL], true); createToken("LONETILDE", "(?:~>?)"); createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); exports2.tildeTrimReplace = "$1~"; createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); createToken("LONECARET", "(?:\\^)"); createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); exports2.caretTrimReplace = "$1^"; createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); exports2.comparatorTrimReplace = "$1$2$3"; createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); createToken("STAR", "(<|>)?=?\\s*\\*"); createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); } }); // node_modules/semver/internal/parse-options.js var require_parse_options = __commonJS({ "node_modules/semver/internal/parse-options.js"(exports2, module2) { var looseOption = Object.freeze({ loose: true }); var emptyOpts = Object.freeze({}); var parseOptions = (options) => { if (!options) { return emptyOpts; } if (typeof options !== "object") { return looseOption; } return options; }; module2.exports = parseOptions; } }); // node_modules/semver/internal/identifiers.js var require_identifiers = __commonJS({ "node_modules/semver/internal/identifiers.js"(exports2, module2) { var numeric = /^[0-9]+$/; var compareIdentifiers = (a, b) => { const anum = numeric.test(a); const bnum = numeric.test(b); if (anum && bnum) { a = +a; b = +b; } return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; }; var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); module2.exports = { compareIdentifiers, rcompareIdentifiers }; } }); // node_modules/semver/classes/semver.js var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports2, module2) { var debug = require_debug(); var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); var { safeRe: re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); var SemVer = class _SemVer { constructor(version2, options) { options = parseOptions(options); if (version2 instanceof _SemVer) { if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { return version2; } else { version2 = version2.version; } } else if (typeof version2 !== "string") { throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`); } if (version2.length > MAX_LENGTH) { throw new TypeError( `version is longer than ${MAX_LENGTH} characters` ); } debug("SemVer", version2, options); this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); if (!m) { throw new TypeError(`Invalid Version: ${version2}`); } this.raw = version2; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError("Invalid major version"); } if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError("Invalid minor version"); } if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError("Invalid patch version"); } if (!m[4]) { this.prerelease = []; } else { this.prerelease = m[4].split(".").map((id) => { if (/^[0-9]+$/.test(id)) { const num = +id; if (num >= 0 && num < MAX_SAFE_INTEGER) { return num; } } return id; }); } this.build = m[5] ? m[5].split(".") : []; this.format(); } format() { this.version = `${this.major}.${this.minor}.${this.patch}`; if (this.prerelease.length) { this.version += `-${this.prerelease.join(".")}`; } return this.version; } toString() { return this.version; } compare(other) { debug("SemVer.compare", this.version, this.options, other); if (!(other instanceof _SemVer)) { if (typeof other === "string" && other === this.version) { return 0; } other = new _SemVer(other, this.options); } if (other.version === this.version) { return 0; } return this.compareMain(other) || this.comparePre(other); } compareMain(other) { if (!(other instanceof _SemVer)) { other = new _SemVer(other, this.options); } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); } comparePre(other) { if (!(other instanceof _SemVer)) { other = new _SemVer(other, this.options); } if (this.prerelease.length && !other.prerelease.length) { return -1; } else if (!this.prerelease.length && other.prerelease.length) { return 1; } else if (!this.prerelease.length && !other.prerelease.length) { return 0; } let i = 0; do { const a = this.prerelease[i]; const b = other.prerelease[i]; debug("prerelease compare", i, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i); } compareBuild(other) { if (!(other instanceof _SemVer)) { other = new _SemVer(other, this.options); } let i = 0; do { const a = this.build[i]; const b = other.build[i]; debug("build compare", i, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i); } // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. inc(release, identifier, identifierBase) { switch (release) { case "premajor": this.prerelease.length = 0; this.patch = 0; this.minor = 0; this.major++; this.inc("pre", identifier, identifierBase); break; case "preminor": this.prerelease.length = 0; this.patch = 0; this.minor++; this.inc("pre", identifier, identifierBase); break; case "prepatch": this.prerelease.length = 0; this.inc("patch", identifier, identifierBase); this.inc("pre", identifier, identifierBase); break; case "prerelease": if (this.prerelease.length === 0) { this.inc("patch", identifier, identifierBase); } this.inc("pre", identifier, identifierBase); break; case "major": if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { this.major++; } this.minor = 0; this.patch = 0; this.prerelease = []; break; case "minor": if (this.patch !== 0 || this.prerelease.length === 0) { this.minor++; } this.patch = 0; this.prerelease = []; break; case "patch": if (this.prerelease.length === 0) { this.patch++; } this.prerelease = []; break; case "pre": { const base = Number(identifierBase) ? 1 : 0; if (!identifier && identifierBase === false) { throw new Error("invalid increment argument: identifier is empty"); } if (this.prerelease.length === 0) { this.prerelease = [base]; } else { let i = this.prerelease.length; while (--i >= 0) { if (typeof this.prerelease[i] === "number") { this.prerelease[i]++; i = -2; } } if (i === -1) { if (identifier === this.prerelease.join(".") && identifierBase === false) { throw new Error("invalid increment argument: identifier already exists"); } this.prerelease.push(base); } } if (identifier) { let prerelease = [identifier, base]; if (identifierBase === false) { prerelease = [identifier]; } if (compareIdentifiers(this.prerelease[0], identifier) === 0) { if (isNaN(this.prerelease[1])) { this.prerelease = prerelease; } } else { this.prerelease = prerelease; } } break; } default: throw new Error(`invalid increment argument: ${release}`); } this.raw = this.format(); if (this.build.length) { this.raw += `+${this.build.join(".")}`; } return this; } }; module2.exports = SemVer; } }); // node_modules/semver/functions/major.js var require_major = __commonJS({ "node_modules/semver/functions/major.js"(exports2, module2) { var SemVer = require_semver(); var major = (a, loose) => new SemVer(a, loose).major; module2.exports = major; } }); // node_modules/resolve/lib/homedir.js var require_homedir = __commonJS({ "node_modules/resolve/lib/homedir.js"(exports2, module2) { "use strict"; var os2 = require("os"); module2.exports = os2.homedir || function homedir2() { var home = process.env.HOME; var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME; if (process.platform === "win32") { return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null; } if (process.platform === "darwin") { return home || (user ? "/Users/" + user : null); } if (process.platform === "linux") { return home || (process.getuid() === 0 ? "/root" : user ? "/home/" + user : null); } return home || null; }; } }); // node_modules/resolve/lib/caller.js var require_caller = __commonJS({ "node_modules/resolve/lib/caller.js"(exports2, module2) { module2.exports = function() { var origPrepareStackTrace = Error.prepareStackTrace; Error.prepareStackTrace = function(_, stack2) { return stack2; }; var stack = new Error().stack; Error.prepareStackTrace = origPrepareStackTrace; return stack[2].getFileName(); }; } }); // node_modules/path-parse/index.js var require_path_parse = __commonJS({ "node_modules/path-parse/index.js"(exports2, module2) { "use strict"; var isWindows = process.platform === "win32"; var splitWindowsRe = /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/; var win32 = {}; function win32SplitPath(filename) { return splitWindowsRe.exec(filename).slice(1); } win32.parse = function(pathString) { if (typeof pathString !== "string") { throw new TypeError( "Parameter 'pathString' must be a string, not " + typeof pathString ); } var allParts = win32SplitPath(pathString); if (!allParts || allParts.length !== 5) { throw new TypeError("Invalid path '" + pathString + "'"); } return { root: allParts[1], dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1), base: allParts[2], ext: allParts[4], name: allParts[3] }; }; var splitPathRe = /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/; var posix = {}; function posixSplitPath(filename) { return splitPathRe.exec(filename).slice(1); } posix.parse = function(pathString) { if (typeof pathString !== "string") { throw new TypeError( "Parameter 'pathString' must be a string, not " + typeof pathString ); } var allParts = posixSplitPath(pathString); if (!allParts || allParts.length !== 5) { throw new TypeError("Invalid path '" + pathString + "'"); } return { root: allParts[1], dir: allParts[0].slice(0, -1), base: allParts[2], ext: allParts[4], name: allParts[3] }; }; if (isWindows) module2.exports = win32.parse; else module2.exports = posix.parse; module2.exports.posix = posix.parse; module2.exports.win32 = win32.parse; } }); // node_modules/resolve/lib/node-modules-paths.js var require_node_modules_paths = __commonJS({ "node_modules/resolve/lib/node-modules-paths.js"(exports2, module2) { var path6 = require("path"); var parse = path6.parse || require_path_parse(); var getNodeModulesDirs = function getNodeModulesDirs2(absoluteStart, modules) { var prefix = "/"; if (/^([A-Za-z]:)/.test(absoluteStart)) { prefix = ""; } else if (/^\\\\/.test(absoluteStart)) { prefix = "\\\\"; } var paths = [absoluteStart]; var parsed = parse(absoluteStart); while (parsed.dir !== paths[paths.length - 1]) { paths.push(parsed.dir); parsed = parse(parsed.dir); } return paths.reduce(function(dirs, aPath) { return dirs.concat(modules.map(function(moduleDir) { return path6.resolve(prefix, aPath, moduleDir); })); }, []); }; module2.exports = function nodeModulesPaths(start2, opts, request) { var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ["node_modules"]; if (opts && typeof opts.paths === "function") { return opts.paths( request, start2, function() { return getNodeModulesDirs(start2, modules); }, opts ); } var dirs = getNodeModulesDirs(start2, modules); return opts && opts.paths ? dirs.concat(opts.paths) : dirs; }; } }); // node_modules/resolve/lib/normalize-options.js var require_normalize_options = __commonJS({ "node_modules/resolve/lib/normalize-options.js"(exports2, module2) { module2.exports = function(x, opts) { return opts || {}; }; } }); // node_modules/function-bind/implementation.js var require_implementation = __commonJS({ "node_modules/function-bind/implementation.js"(exports2, module2) { "use strict"; var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; var toStr = Object.prototype.toString; var max = Math.max; var funcType = "[object Function]"; var concatty = function concatty2(a, b) { var arr = []; for (var i = 0; i < a.length; i += 1) { arr[i] = a[i]; } for (var j = 0; j < b.length; j += 1) { arr[j + a.length] = b[j]; } return arr; }; var slicy = function slicy2(arrLike, offset) { var arr = []; for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { arr[j] = arrLike[i]; } return arr; }; var joiny = function(arr, joiner) { var str = ""; for (var i = 0; i < arr.length; i += 1) { str += arr[i]; if (i + 1 < arr.length) { str += joiner; } } return str; }; module2.exports = function bind(that) { var target = this; if (typeof target !== "function" || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } var args = slicy(arguments, 1); var bound; var binder = function() { if (this instanceof bound) { var result2 = target.apply( this, concatty(args, arguments) ); if (Object(result2) === result2) { return result2; } return this; } return target.apply( that, concatty(args, arguments) ); }; var boundLength = max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { boundArgs[i] = "$" + i; } bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); if (target.prototype) { var Empty = function Empty2() { }; Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; } }); // node_modules/function-bind/index.js var require_function_bind = __commonJS({ "node_modules/function-bind/index.js"(exports2, module2) { "use strict"; var implementation = require_implementation(); module2.exports = Function.prototype.bind || implementation; } }); // node_modules/hasown/index.js var require_hasown = __commonJS({ "node_modules/hasown/index.js"(exports2, module2) { "use strict"; var call = Function.prototype.call; var $hasOwn = Object.prototype.hasOwnProperty; var bind = require_function_bind(); module2.exports = bind.call(call, $hasOwn); } }); // node_modules/is-core-module/core.json var require_core = __commonJS({ "node_modules/is-core-module/core.json"(exports2, module2) { module2.exports = { assert: true, "node:assert": [">= 14.18 && < 15", ">= 16"], "assert/strict": ">= 15", "node:assert/strict": ">= 16", async_hooks: ">= 8", "node:async_hooks": [">= 14.18 && < 15", ">= 16"], buffer_ieee754: ">= 0.5 && < 0.9.7", buffer: true, "node:buffer": [">= 14.18 && < 15", ">= 16"], child_process: true, "node:child_process": [">= 14.18 && < 15", ">= 16"], cluster: ">= 0.5", "node:cluster": [">= 14.18 && < 15", ">= 16"], console: true, "node:console": [">= 14.18 && < 15", ">= 16"], constants: true, "node:constants": [">= 14.18 && < 15", ">= 16"], crypto: true, "node:crypto": [">= 14.18 && < 15", ">= 16"], _debug_agent: ">= 1 && < 8", _debugger: "< 8", dgram: true, "node:dgram": [">= 14.18 && < 15", ">= 16"], diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"], "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], dns: true, "node:dns": [">= 14.18 && < 15", ">= 16"], "dns/promises": ">= 15", "node:dns/promises": ">= 16", domain: ">= 0.7.12", "node:domain": [">= 14.18 && < 15", ">= 16"], events: true, "node:events": [">= 14.18 && < 15", ">= 16"], freelist: "< 6", fs: true, "node:fs": [">= 14.18 && < 15", ">= 16"], "fs/promises": [">= 10 && < 10.1", ">= 14"], "node:fs/promises": [">= 14.18 && < 15", ">= 16"], _http_agent: ">= 0.11.1", "node:_http_agent": [">= 14.18 && < 15", ">= 16"], _http_client: ">= 0.11.1", "node:_http_client": [">= 14.18 && < 15", ">= 16"], _http_common: ">= 0.11.1", "node:_http_common": [">= 14.18 && < 15", ">= 16"], _http_incoming: ">= 0.11.1", "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], _http_outgoing: ">= 0.11.1", "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], _http_server: ">= 0.11.1", "node:_http_server": [">= 14.18 && < 15", ">= 16"], http: true, "node:http": [">= 14.18 && < 15", ">= 16"], http2: ">= 8.8", "node:http2": [">= 14.18 && < 15", ">= 16"], https: true, "node:https": [">= 14.18 && < 15", ">= 16"], inspector: ">= 8", "node:inspector": [">= 14.18 && < 15", ">= 16"], "inspector/promises": [">= 19"], "node:inspector/promises": [">= 19"], _linklist: "< 8", module: true, "node:module": [">= 14.18 && < 15", ">= 16"], net: true, "node:net": [">= 14.18 && < 15", ">= 16"], "node-inspect/lib/_inspect": ">= 7.6 && < 12", "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", os: true, "node:os": [">= 14.18 && < 15", ">= 16"], path: true, "node:path": [">= 14.18 && < 15", ">= 16"], "path/posix": ">= 15.3", "node:path/posix": ">= 16", "path/win32": ">= 15.3", "node:path/win32": ">= 16", perf_hooks: ">= 8.5", "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], process: ">= 1", "node:process": [">= 14.18 && < 15", ">= 16"], punycode: ">= 0.5", "node:punycode": [">= 14.18 && < 15", ">= 16"], querystring: true, "node:querystring": [">= 14.18 && < 15", ">= 16"], readline: true, "node:readline": [">= 14.18 && < 15", ">= 16"], "readline/promises": ">= 17", "node:readline/promises": ">= 17", repl: true, "node:repl": [">= 14.18 && < 15", ">= 16"], smalloc: ">= 0.11.5 && < 3", _stream_duplex: ">= 0.9.4", "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], _stream_transform: ">= 0.9.4", "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], _stream_wrap: ">= 1.4.1", "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], _stream_passthrough: ">= 0.9.4", "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], _stream_readable: ">= 0.9.4", "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], _stream_writable: ">= 0.9.4", "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], stream: true, "node:stream": [">= 14.18 && < 15", ">= 16"], "stream/consumers": ">= 16.7", "node:stream/consumers": ">= 16.7", "stream/promises": ">= 15", "node:stream/promises": ">= 16", "stream/web": ">= 16.5", "node:stream/web": ">= 16.5", string_decoder: true, "node:string_decoder": [">= 14.18 && < 15", ">= 16"], sys: [">= 0.4 && < 0.7", ">= 0.8"], "node:sys": [">= 14.18 && < 15", ">= 16"], "test/reporters": ">= 19.9 && < 20.2", "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"], "node:test": [">= 16.17 && < 17", ">= 18"], timers: true, "node:timers": [">= 14.18 && < 15", ">= 16"], "timers/promises": ">= 15", "node:timers/promises": ">= 16", _tls_common: ">= 0.11.13", "node:_tls_common": [">= 14.18 && < 15", ">= 16"], _tls_legacy: ">= 0.11.3 && < 10", _tls_wrap: ">= 0.11.3", "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], tls: true, "node:tls": [">= 14.18 && < 15", ">= 16"], trace_events: ">= 10", "node:trace_events": [">= 14.18 && < 15", ">= 16"], tty: true, "node:tty": [">= 14.18 && < 15", ">= 16"], url: true, "node:url": [">= 14.18 && < 15", ">= 16"], util: true, "node:util": [">= 14.18 && < 15", ">= 16"], "util/types": ">= 15.3", "node:util/types": ">= 16", "v8/tools/arguments": ">= 10 && < 12", "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], v8: ">= 1", "node:v8": [">= 14.18 && < 15", ">= 16"], vm: true, "node:vm": [">= 14.18 && < 15", ">= 16"], wasi: [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"], "node:wasi": [">= 18.17 && < 19", ">= 20"], worker_threads: ">= 11.7", "node:worker_threads": [">= 14.18 && < 15", ">= 16"], zlib: ">= 0.5", "node:zlib": [">= 14.18 && < 15", ">= 16"] }; } }); // node_modules/is-core-module/index.js var require_is_core_module = __commonJS({ "node_modules/is-core-module/index.js"(exports2, module2) { "use strict"; var hasOwn = require_hasown(); function specifierIncluded(current, specifier) { var nodeParts = current.split("."); var parts = specifier.split(" "); var op = parts.length > 1 ? parts[0] : "="; var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split("."); for (var i = 0; i < 3; ++i) { var cur = parseInt(nodeParts[i] || 0, 10); var ver = parseInt(versionParts[i] || 0, 10); if (cur === ver) { continue; } if (op === "<") { return cur < ver; } if (op === ">=") { return cur >= ver; } return false; } return op === ">="; } function matchesRange(current, range) { var specifiers = range.split(/ ?&& ?/); if (specifiers.length === 0) { return false; } for (var i = 0; i < specifiers.length; ++i) { if (!specifierIncluded(current, specifiers[i])) { return false; } } return true; } function versionIncluded(nodeVersion, specifierValue) { if (typeof specifierValue === "boolean") { return specifierValue; } var current = typeof nodeVersion === "undefined" ? process.versions && process.versions.node : nodeVersion; if (typeof current !== "string") { throw new TypeError(typeof nodeVersion === "undefined" ? "Unable to determine current node version" : "If provided, a valid node version is required"); } if (specifierValue && typeof specifierValue === "object") { for (var i = 0; i < specifierValue.length; ++i) { if (matchesRange(current, specifierValue[i])) { return true; } } return false; } return matchesRange(current, specifierValue); } var data = require_core(); module2.exports = function isCore(x, nodeVersion) { return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]); }; } }); // node_modules/resolve/lib/async.js var require_async = __commonJS({ "node_modules/resolve/lib/async.js"(exports2, module2) { var fs2 = require("fs"); var getHomedir = require_homedir(); var path6 = require("path"); var caller = require_caller(); var nodeModulesPaths = require_node_modules_paths(); var normalizeOptions = require_normalize_options(); var isCore = require_is_core_module(); var realpathFS = process.platform !== "win32" && fs2.realpath && typeof fs2.realpath.native === "function" ? fs2.realpath.native : fs2.realpath; var homedir2 = getHomedir(); var defaultPaths = function() { return [ path6.join(homedir2, ".node_modules"), path6.join(homedir2, ".node_libraries") ]; }; var defaultIsFile = function isFile(file, cb) { fs2.stat(file, function(err2, stat) { if (!err2) { return cb(null, stat.isFile() || stat.isFIFO()); } if (err2.code === "ENOENT" || err2.code === "ENOTDIR") return cb(null, false); return cb(err2); }); }; var defaultIsDir = function isDirectory(dir, cb) { fs2.stat(dir, function(err2, stat) { if (!err2) { return cb(null, stat.isDirectory()); } if (err2.code === "ENOENT" || err2.code === "ENOTDIR") return cb(null, false); return cb(err2); }); }; var defaultRealpath = function realpath(x, cb) { realpathFS(x, function(realpathErr, realPath) { if (realpathErr && realpathErr.code !== "ENOENT") cb(realpathErr); else cb(null, realpathErr ? x : realPath); }); }; var maybeRealpath = function maybeRealpath2(realpath, x, opts, cb) { if (opts && opts.preserveSymlinks === false) { realpath(x, cb); } else { cb(null, x); } }; var defaultReadPackage = function defaultReadPackage2(readFile, pkgfile, cb) { readFile(pkgfile, function(readFileErr, body) { if (readFileErr) cb(readFileErr); else { try { var pkg = JSON.parse(body); cb(null, pkg); } catch (jsonErr) { cb(null); } } }); }; var getPackageCandidates = function getPackageCandidates2(x, start2, opts) { var dirs = nodeModulesPaths(start2, opts, x); for (var i = 0; i < dirs.length; i++) { dirs[i] = path6.join(dirs[i], x); } return dirs; }; module2.exports = function resolve3(x, options, callback) { var cb = callback; var opts = options; if (typeof options === "function") { cb = opts; opts = {}; } if (typeof x !== "string") { var err2 = new TypeError("Path must be a string."); return process.nextTick(function() { cb(err2); }); } opts = normalizeOptions(x, opts); var isFile = opts.isFile || defaultIsFile; var isDirectory = opts.isDirectory || defaultIsDir; var readFile = opts.readFile || fs2.readFile; var realpath = opts.realpath || defaultRealpath; var readPackage = opts.readPackage || defaultReadPackage; if (opts.readFile && opts.readPackage) { var conflictErr = new TypeError("`readFile` and `readPackage` are mutually exclusive."); return process.nextTick(function() { cb(conflictErr); }); } var packageIterator = opts.packageIterator; var extensions = opts.extensions || [".js"]; var includeCoreModules = opts.includeCoreModules !== false; var basedir = opts.basedir || path6.dirname(caller()); var parent = opts.filename || basedir; opts.paths = opts.paths || defaultPaths(); var absoluteStart = path6.resolve(basedir); maybeRealpath( realpath, absoluteStart, opts, function(err3, realStart) { if (err3) cb(err3); else init(realStart); } ); var res; function init(basedir2) { if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { res = path6.resolve(basedir2, x); if (x === "." || x === ".." || x.slice(-1) === "/") res += "/"; if (/\/$/.test(x) && res === basedir2) { loadAsDirectory(res, opts.package, onfile); } else loadAsFile(res, opts.package, onfile); } else if (includeCoreModules && isCore(x)) { return cb(null, x); } else loadNodeModules(x, basedir2, function(err3, n, pkg) { if (err3) cb(err3); else if (n) { return maybeRealpath(realpath, n, opts, function(err4, realN) { if (err4) { cb(err4); } else { cb(null, realN, pkg); } }); } else { var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); moduleError.code = "MODULE_NOT_FOUND"; cb(moduleError); } }); } function onfile(err3, m, pkg) { if (err3) cb(err3); else if (m) cb(null, m, pkg); else loadAsDirectory(res, function(err4, d, pkg2) { if (err4) cb(err4); else if (d) { maybeRealpath(realpath, d, opts, function(err5, realD) { if (err5) { cb(err5); } else { cb(null, realD, pkg2); } }); } else { var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'"); moduleError.code = "MODULE_NOT_FOUND"; cb(moduleError); } }); } function loadAsFile(x2, thePackage, callback2) { var loadAsFilePackage = thePackage; var cb2 = callback2; if (typeof loadAsFilePackage === "function") { cb2 = loadAsFilePackage; loadAsFilePackage = void 0; } var exts = [""].concat(extensions); load(exts, x2, loadAsFilePackage); function load(exts2, x3, loadPackage) { if (exts2.length === 0) return cb2(null, void 0, loadPackage); var file = x3 + exts2[0]; var pkg = loadPackage; if (pkg) onpkg(null, pkg); else loadpkg(path6.dirname(file), onpkg); function onpkg(err3, pkg_, dir) { pkg = pkg_; if (err3) return cb2(err3); if (dir && pkg && opts.pathFilter) { var rfile = path6.relative(dir, file); var rel = rfile.slice(0, rfile.length - exts2[0].length); var r = opts.pathFilter(pkg, x3, rel); if (r) return load( [""].concat(extensions.slice()), path6.resolve(dir, r), pkg ); } isFile(file, onex); } function onex(err3, ex) { if (err3) return cb2(err3); if (ex) return cb2(null, file, pkg); load(exts2.slice(1), x3, pkg); } } } function loadpkg(dir, cb2) { if (dir === "" || dir === "/") return cb2(null); if (process.platform === "win32" && /^\w:[/\\]*$/.test(dir)) { return cb2(null); } if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb2(null); maybeRealpath(realpath, dir, opts, function(unwrapErr2, pkgdir) { if (unwrapErr2) return loadpkg(path6.dirname(dir), cb2); var pkgfile = path6.join(pkgdir, "package.json"); isFile(pkgfile, function(err3, ex) { if (!ex) return loadpkg(path6.dirname(dir), cb2); readPackage(readFile, pkgfile, function(err4, pkgParam) { if (err4) cb2(err4); var pkg = pkgParam; if (pkg && opts.packageFilter) { pkg = opts.packageFilter(pkg, pkgfile); } cb2(null, pkg, dir); }); }); }); } function loadAsDirectory(x2, loadAsDirectoryPackage, callback2) { var cb2 = callback2; var fpkg = loadAsDirectoryPackage; if (typeof fpkg === "function") { cb2 = fpkg; fpkg = opts.package; } maybeRealpath(realpath, x2, opts, function(unwrapErr2, pkgdir) { if (unwrapErr2) return cb2(unwrapErr2); var pkgfile = path6.join(pkgdir, "package.json"); isFile(pkgfile, function(err3, ex) { if (err3) return cb2(err3); if (!ex) return loadAsFile(path6.join(x2, "index"), fpkg, cb2); readPackage(readFile, pkgfile, function(err4, pkgParam) { if (err4) return cb2(err4); var pkg = pkgParam; if (pkg && opts.packageFilter) { pkg = opts.packageFilter(pkg, pkgfile); } if (pkg && pkg.main) { if (typeof pkg.main !== "string") { var mainError = new TypeError("package \u201C" + pkg.name + "\u201D `main` must be a string"); mainError.code = "INVALID_PACKAGE_MAIN"; return cb2(mainError); } if (pkg.main === "." || pkg.main === "./") { pkg.main = "index"; } loadAsFile(path6.resolve(x2, pkg.main), pkg, function(err5, m, pkg2) { if (err5) return cb2(err5); if (m) return cb2(null, m, pkg2); if (!pkg2) return loadAsFile(path6.join(x2, "index"), pkg2, cb2); var dir = path6.resolve(x2, pkg2.main); loadAsDirectory(dir, pkg2, function(err6, n, pkg3) { if (err6) return cb2(err6); if (n) return cb2(null, n, pkg3); loadAsFile(path6.join(x2, "index"), pkg3, cb2); }); }); return; } loadAsFile(path6.join(x2, "/index"), pkg, cb2); }); }); }); } function processDirs(cb2, dirs) { if (dirs.length === 0) return cb2(null, void 0); var dir = dirs[0]; isDirectory(path6.dirname(dir), isdir); function isdir(err3, isdir2) { if (err3) return cb2(err3); if (!isdir2) return processDirs(cb2, dirs.slice(1)); loadAsFile(dir, opts.package, onfile2); } function onfile2(err3, m, pkg) { if (err3) return cb2(err3); if (m) return cb2(null, m, pkg); loadAsDirectory(dir, opts.package, ondir); } function ondir(err3, n, pkg) { if (err3) return cb2(err3); if (n) return cb2(null, n, pkg); processDirs(cb2, dirs.slice(1)); } } function loadNodeModules(x2, start2, cb2) { var thunk = function() { return getPackageCandidates(x2, start2, opts); }; processDirs( cb2, packageIterator ? packageIterator(x2, start2, thunk, opts) : thunk() ); } }; } }); // node_modules/resolve/lib/core.json var require_core2 = __commonJS({ "node_modules/resolve/lib/core.json"(exports2, module2) { module2.exports = { assert: true, "node:assert": [">= 14.18 && < 15", ">= 16"], "assert/strict": ">= 15", "node:assert/strict": ">= 16", async_hooks: ">= 8", "node:async_hooks": [">= 14.18 && < 15", ">= 16"], buffer_ieee754: ">= 0.5 && < 0.9.7", buffer: true, "node:buffer": [">= 14.18 && < 15", ">= 16"], child_process: true, "node:child_process": [">= 14.18 && < 15", ">= 16"], cluster: ">= 0.5", "node:cluster": [">= 14.18 && < 15", ">= 16"], console: true, "node:console": [">= 14.18 && < 15", ">= 16"], constants: true, "node:constants": [">= 14.18 && < 15", ">= 16"], crypto: true, "node:crypto": [">= 14.18 && < 15", ">= 16"], _debug_agent: ">= 1 && < 8", _debugger: "< 8", dgram: true, "node:dgram": [">= 14.18 && < 15", ">= 16"], diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"], "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], dns: true, "node:dns": [">= 14.18 && < 15", ">= 16"], "dns/promises": ">= 15", "node:dns/promises": ">= 16", domain: ">= 0.7.12", "node:domain": [">= 14.18 && < 15", ">= 16"], events: true, "node:events": [">= 14.18 && < 15", ">= 16"], freelist: "< 6", fs: true, "node:fs": [">= 14.18 && < 15", ">= 16"], "fs/promises": [">= 10 && < 10.1", ">= 14"], "node:fs/promises": [">= 14.18 && < 15", ">= 16"], _http_agent: ">= 0.11.1", "node:_http_agent": [">= 14.18 && < 15", ">= 16"], _http_client: ">= 0.11.1", "node:_http_client": [">= 14.18 && < 15", ">= 16"], _http_common: ">= 0.11.1", "node:_http_common": [">= 14.18 && < 15", ">= 16"], _http_incoming: ">= 0.11.1", "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], _http_outgoing: ">= 0.11.1", "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], _http_server: ">= 0.11.1", "node:_http_server": [">= 14.18 && < 15", ">= 16"], http: true, "node:http": [">= 14.18 && < 15", ">= 16"], http2: ">= 8.8", "node:http2": [">= 14.18 && < 15", ">= 16"], https: true, "node:https": [">= 14.18 && < 15", ">= 16"], inspector: ">= 8", "node:inspector": [">= 14.18 && < 15", ">= 16"], "inspector/promises": [">= 19"], "node:inspector/promises": [">= 19"], _linklist: "< 8", module: true, "node:module": [">= 14.18 && < 15", ">= 16"], net: true, "node:net": [">= 14.18 && < 15", ">= 16"], "node-inspect/lib/_inspect": ">= 7.6 && < 12", "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", os: true, "node:os": [">= 14.18 && < 15", ">= 16"], path: true, "node:path": [">= 14.18 && < 15", ">= 16"], "path/posix": ">= 15.3", "node:path/posix": ">= 16", "path/win32": ">= 15.3", "node:path/win32": ">= 16", perf_hooks: ">= 8.5", "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], process: ">= 1", "node:process": [">= 14.18 && < 15", ">= 16"], punycode: ">= 0.5", "node:punycode": [">= 14.18 && < 15", ">= 16"], querystring: true, "node:querystring": [">= 14.18 && < 15", ">= 16"], readline: true, "node:readline": [">= 14.18 && < 15", ">= 16"], "readline/promises": ">= 17", "node:readline/promises": ">= 17", repl: true, "node:repl": [">= 14.18 && < 15", ">= 16"], smalloc: ">= 0.11.5 && < 3", _stream_duplex: ">= 0.9.4", "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], _stream_transform: ">= 0.9.4", "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], _stream_wrap: ">= 1.4.1", "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], _stream_passthrough: ">= 0.9.4", "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], _str