UNPKG

@tonyptang/unocss-config

Version:

unocss-config

1,617 lines (1,589 loc) 359 kB
import { joinURL } from "./chunk-SDWIKQ7Y.mjs"; import { __commonJS, __require, __toESM } from "./chunk-TTFRSOOU.mjs"; // node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js var require_ms = __commonJS({ "node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports, module) { var s = 1e3; var m = s * 60; var h = m * 60; var d = h * 24; var w = d * 7; var y = d * 365.25; module.exports = function(val, options2) { options2 = options2 || {}; var type = typeof val; if (type === "string" && val.length > 0) { return parse4(val); } else if (type === "number" && isFinite(val)) { return options2.long ? fmtLong(val) : fmtShort(val); } throw new Error( "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse4(str) { str = String(str); if (str.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( str ); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || "ms").toLowerCase(); switch (type) { case "years": case "year": case "yrs": case "yr": case "y": return n * y; case "weeks": case "week": case "w": return n * w; case "days": case "day": case "d": return n * d; case "hours": case "hour": case "hrs": case "hr": case "h": return n * h; case "minutes": case "minute": case "mins": case "min": case "m": return n * m; case "seconds": case "second": case "secs": case "sec": case "s": return n * s; case "milliseconds": case "millisecond": case "msecs": case "msec": case "ms": return n; default: return void 0; } } function fmtShort(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return Math.round(ms / d) + "d"; } if (msAbs >= h) { return Math.round(ms / h) + "h"; } if (msAbs >= m) { return Math.round(ms / m) + "m"; } if (msAbs >= s) { return Math.round(ms / s) + "s"; } return ms + "ms"; } function fmtLong(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return plural(ms, msAbs, d, "day"); } if (msAbs >= h) { return plural(ms, msAbs, h, "hour"); } if (msAbs >= m) { return plural(ms, msAbs, m, "minute"); } if (msAbs >= s) { return plural(ms, msAbs, s, "second"); } return ms + " ms"; } function plural(ms, msAbs, n, name) { var isPlural = msAbs >= n * 1.5; return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); } } }); // node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/common.js var require_common = __commonJS({ "node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/common.js"(exports, module) { function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled2; createDebug.humanize = require_ms(); createDebug.destroy = destroy; Object.keys(env).forEach((key) => { createDebug[key] = env[key]; }); createDebug.names = []; createDebug.skips = []; createDebug.formatters = {}; function selectColor(namespace) { let hash = 0; for (let i = 0; i < namespace.length; i++) { hash = (hash << 5) - hash + namespace.charCodeAt(i); hash |= 0; } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } createDebug.selectColor = selectColor; function createDebug(namespace) { let prevTime; let enableOverride = null; let namespacesCache; let enabledCache; function debug3(...args) { if (!debug3.enabled) { return; } const self2 = debug3; const curr = Number(/* @__PURE__ */ new Date()); const ms = curr - (prevTime || curr); self2.diff = ms; self2.prev = prevTime; self2.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== "string") { args.unshift("%O"); } let index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format3) => { if (match === "%%") { return "%"; } index++; const formatter = createDebug.formatters[format3]; if (typeof formatter === "function") { const val = args[index]; match = formatter.call(self2, val); args.splice(index, 1); index--; } return match; }); createDebug.formatArgs.call(self2, args); const logFn = self2.log || createDebug.log; logFn.apply(self2, args); } debug3.namespace = namespace; debug3.useColors = createDebug.useColors(); debug3.color = createDebug.selectColor(namespace); debug3.extend = extend2; debug3.destroy = createDebug.destroy; Object.defineProperty(debug3, "enabled", { enumerable: true, configurable: false, get: () => { if (enableOverride !== null) { return enableOverride; } if (namespacesCache !== createDebug.namespaces) { namespacesCache = createDebug.namespaces; enabledCache = createDebug.enabled(namespace); } return enabledCache; }, set: (v) => { enableOverride = v; } }); if (typeof createDebug.init === "function") { createDebug.init(debug3); } return debug3; } function extend2(namespace, delimiter2) { const newDebug = createDebug(this.namespace + (typeof delimiter2 === "undefined" ? ":" : delimiter2) + namespace); newDebug.log = this.log; return newDebug; } function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; let i; const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); const len = split.length; for (i = 0; i < len; i++) { if (!split[i]) { continue; } namespaces = split[i].replace(/\*/g, ".*?"); if (namespaces[0] === "-") { createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); } else { createDebug.names.push(new RegExp("^" + namespaces + "$")); } } } function disable() { const namespaces = [ ...createDebug.names.map(toNamespace), ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) ].join(","); createDebug.enable(""); return namespaces; } function enabled2(name) { if (name[name.length - 1] === "*") { return true; } let i; let len; for (i = 0, len = createDebug.skips.length; i < len; i++) { if (createDebug.skips[i].test(name)) { return false; } } for (i = 0, len = createDebug.names.length; i < len; i++) { if (createDebug.names[i].test(name)) { return true; } } return false; } function toNamespace(regexp) { return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); } function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } createDebug.enable(createDebug.load()); return createDebug; } module.exports = setup; } }); // node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/browser.js var require_browser = __commonJS({ "node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/browser.js"(exports, module) { exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); exports.destroy = (() => { let warned2 = false; return () => { if (!warned2) { warned2 = true; console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } }; })(); exports.colors = [ "#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33" ]; function useColors() { if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { return true; } if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } let m; return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff); if (!this.useColors) { return; } const c = "color: " + this.color; args.splice(1, 0, c, "color: inherit"); let index = 0; let lastC = 0; args[0].replace(/%[a-zA-Z%]/g, (match) => { if (match === "%%") { return; } index++; if (match === "%c") { lastC = index; } }); args.splice(lastC, 0, c); } exports.log = console.debug || console.log || (() => { }); function save(namespaces) { try { if (namespaces) { exports.storage.setItem("debug", namespaces); } else { exports.storage.removeItem("debug"); } } catch (error) { } } function load() { let r; try { r = exports.storage.getItem("debug"); } catch (error) { } if (!r && typeof process !== "undefined" && "env" in process) { r = process.env.DEBUG; } return r; } function localstorage() { try { return localStorage; } catch (error) { } } module.exports = require_common()(exports); var { formatters } = module.exports; formatters.j = function(v) { try { return JSON.stringify(v); } catch (error) { return "[UnexpectedJSONParseError]: " + error.message; } }; } }); // node_modules/.pnpm/registry.npmmirror.com+has-flag@4.0.0/node_modules/has-flag/index.js var require_has_flag = __commonJS({ "node_modules/.pnpm/registry.npmmirror.com+has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module) { "use strict"; module.exports = (flag, argv = process.argv) => { const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; const position = argv.indexOf(prefix + flag); const terminatorPosition = argv.indexOf("--"); return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); }; } }); // node_modules/.pnpm/registry.npmmirror.com+supports-color@7.2.0/node_modules/supports-color/index.js var require_supports_color = __commonJS({ "node_modules/.pnpm/registry.npmmirror.com+supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) { "use strict"; var os = __require("os"); var tty = __require("tty"); var hasFlag = require_has_flag(); var { env } = process; var forceColor; if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { forceColor = 0; } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { forceColor = 1; } if ("FORCE_COLOR" in env) { if (env.FORCE_COLOR === "true") { forceColor = 1; } else if (env.FORCE_COLOR === "false") { forceColor = 0; } else { forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); } } function translateLevel(level) { if (level === 0) { return false; } return { level, hasBasic: true, has256: level >= 2, has16m: level >= 3 }; } function supportsColor(haveStream, streamIsTTY) { if (forceColor === 0) { return 0; } if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { return 3; } if (hasFlag("color=256")) { return 2; } if (haveStream && !streamIsTTY && forceColor === void 0) { return 0; } const min = forceColor || 0; if (env.TERM === "dumb") { return min; } if (process.platform === "win32") { const osRelease = os.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } return 1; } if ("CI" in env) { if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { return 1; } return min; } if ("TEAMCITY_VERSION" in env) { return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; } if (env.COLORTERM === "truecolor") { return 3; } if ("TERM_PROGRAM" in env) { const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); switch (env.TERM_PROGRAM) { case "iTerm.app": return version2 >= 3 ? 3 : 2; case "Apple_Terminal": return 2; } } if (/-256(color)?$/i.test(env.TERM)) { return 2; } if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { return 1; } if ("COLORTERM" in env) { return 1; } return min; } function getSupportLevel(stream) { const level = supportsColor(stream, stream && stream.isTTY); return translateLevel(level); } module.exports = { supportsColor: getSupportLevel, stdout: translateLevel(supportsColor(true, tty.isatty(1))), stderr: translateLevel(supportsColor(true, tty.isatty(2))) }; } }); // node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/node.js var require_node = __commonJS({ "node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/node.js"(exports, module) { var tty = __require("tty"); var util = __require("util"); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.destroy = util.deprecate( () => { }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." ); exports.colors = [6, 2, 3, 4, 5, 1]; try { const supportsColor = require_supports_color(); if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { exports.colors = [ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221 ]; } } catch (error) { } exports.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); }).reduce((obj, key) => { const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); let val = process.env[key]; if (/^(yes|on|true|enabled)$/i.test(val)) { val = true; } else if (/^(no|off|false|disabled)$/i.test(val)) { val = false; } else if (val === "null") { val = null; } else { val = Number(val); } obj[prop] = val; return obj; }, {}); function useColors() { return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); } function formatArgs(args) { const { namespace: name, useColors: useColors2 } = this; if (useColors2) { const c = this.color; const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); const prefix = ` ${colorCode};1m${name} \x1B[0m`; args[0] = prefix + args[0].split("\n").join("\n" + prefix); args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m"); } else { args[0] = getDate() + name + " " + args[0]; } } function getDate() { if (exports.inspectOpts.hideDate) { return ""; } return (/* @__PURE__ */ new Date()).toISOString() + " "; } function log(...args) { return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n"); } function save(namespaces) { if (namespaces) { process.env.DEBUG = namespaces; } else { delete process.env.DEBUG; } } function load() { return process.env.DEBUG; } function init(debug3) { debug3.inspectOpts = {}; const keys = Object.keys(exports.inspectOpts); for (let i = 0; i < keys.length; i++) { debug3.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; } } module.exports = require_common()(exports); var { formatters } = module.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; return util.inspect(v, this.inspectOpts); }; } }); // node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/index.js var require_src = __commonJS({ "node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/index.js"(exports, module) { if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { module.exports = require_browser(); } else { module.exports = require_node(); } } }); // node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js var require_yocto_queue = __commonJS({ "node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js"(exports, module) { var Node5 = class { /// value; /// next; constructor(value) { this.value = value; this.next = void 0; } }; var Queue3 = class { // TODO: Use private class fields when targeting Node.js 12. // #_head; // #_tail; // #_size; constructor() { this.clear(); } enqueue(value) { const node = new Node5(value); if (this._head) { this._tail.next = node; this._tail = node; } else { this._head = node; this._tail = node; } this._size++; } dequeue() { const current2 = this._head; if (!current2) { return; } this._head = this._head.next; this._size--; return current2.value; } clear() { this._head = void 0; this._tail = void 0; this._size = 0; } get size() { return this._size; } *[Symbol.iterator]() { let current2 = this._head; while (current2) { yield current2.value; current2 = current2.next; } } }; module.exports = Queue3; } }); // node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js var require_p_limit = __commonJS({ "node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js"(exports, module) { "use strict"; var Queue3 = require_yocto_queue(); var pLimit = (concurrency) => { if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { throw new TypeError("Expected `concurrency` to be a number from 1 and up"); } const queue = new Queue3(); let activeCount = 0; const next = () => { activeCount--; if (queue.size > 0) { queue.dequeue()(); } }; const run = async (fn, resolve2, ...args) => { activeCount++; const result = (async () => fn(...args))(); resolve2(result); try { await result; } catch { } next(); }; const enqueue = (fn, resolve2, ...args) => { queue.enqueue(run.bind(null, fn, resolve2, ...args)); (async () => { await Promise.resolve(); if (activeCount < concurrency && queue.size > 0) { queue.dequeue()(); } })(); }; const generator = (fn, ...args) => new Promise((resolve2) => { enqueue(fn, resolve2, ...args); }); Object.defineProperties(generator, { activeCount: { get: () => activeCount }, pendingCount: { get: () => queue.size }, clearQueue: { value: () => { queue.clear(); } } }); return generator; }; module.exports = pLimit; } }); // node_modules/.pnpm/p-locate@5.0.0/node_modules/p-locate/index.js var require_p_locate = __commonJS({ "node_modules/.pnpm/p-locate@5.0.0/node_modules/p-locate/index.js"(exports, module) { "use strict"; var pLimit = require_p_limit(); var EndError = class extends Error { constructor(value) { super(); this.value = value; } }; var testElement = async (element, tester) => tester(await element); var finder = async (element) => { const values = await Promise.all(element); if (values[1] === true) { throw new EndError(values[0]); } return false; }; var pLocate = async (iterable, tester, options2) => { options2 = { concurrency: Infinity, preserveOrder: true, ...options2 }; const limit = pLimit(options2.concurrency); const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]); const checkLimit = pLimit(options2.preserveOrder ? 1 : Infinity); try { await Promise.all(items.map((element) => checkLimit(finder, element))); } catch (error) { if (error instanceof EndError) { return error.value; } throw error; } }; module.exports = pLocate; } }); // node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js var require_locate_path = __commonJS({ "node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js"(exports, module) { "use strict"; var path4 = __require("path"); var fs3 = __require("fs"); var { promisify } = __require("util"); var pLocate = require_p_locate(); var fsStat = promisify(fs3.stat); var fsLStat = promisify(fs3.lstat); var typeMappings = { directory: "isDirectory", file: "isFile" }; function checkType({ type }) { if (type in typeMappings) { return; } throw new Error(`Invalid type specified: ${type}`); } var matchType = (type, stat) => type === void 0 || stat[typeMappings[type]](); module.exports = async (paths, options2) => { options2 = { cwd: process.cwd(), type: "file", allowSymlinks: true, ...options2 }; checkType(options2); const statFn = options2.allowSymlinks ? fsStat : fsLStat; return pLocate(paths, async (path_) => { try { const stat = await statFn(path4.resolve(options2.cwd, path_)); return matchType(options2.type, stat); } catch { return false; } }, options2); }; module.exports.sync = (paths, options2) => { options2 = { cwd: process.cwd(), allowSymlinks: true, type: "file", ...options2 }; checkType(options2); const statFn = options2.allowSymlinks ? fs3.statSync : fs3.lstatSync; for (const path_ of paths) { try { const stat = statFn(path4.resolve(options2.cwd, path_)); if (matchType(options2.type, stat)) { return path_; } } catch { } } }; } }); // node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js var require_path_exists = __commonJS({ "node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js"(exports, module) { "use strict"; var fs3 = __require("fs"); var { promisify } = __require("util"); var pAccess = promisify(fs3.access); module.exports = async (path4) => { try { await pAccess(path4); return true; } catch (_) { return false; } }; module.exports.sync = (path4) => { try { fs3.accessSync(path4); return true; } catch (_) { return false; } }; } }); // node_modules/.pnpm/find-up@5.0.0/node_modules/find-up/index.js var require_find_up = __commonJS({ "node_modules/.pnpm/find-up@5.0.0/node_modules/find-up/index.js"(exports, module) { "use strict"; var path4 = __require("path"); var locatePath = require_locate_path(); var pathExists = require_path_exists(); var stop = Symbol("findUp.stop"); module.exports = async (name, options2 = {}) => { let directory = path4.resolve(options2.cwd || ""); const { root } = path4.parse(directory); const paths = [].concat(name); const runMatcher = async (locateOptions) => { if (typeof name !== "function") { return locatePath(paths, locateOptions); } const foundPath = await name(locateOptions.cwd); if (typeof foundPath === "string") { return locatePath([foundPath], locateOptions); } return foundPath; }; while (true) { const foundPath = await runMatcher({ ...options2, cwd: directory }); if (foundPath === stop) { return; } if (foundPath) { return path4.resolve(directory, foundPath); } if (directory === root) { return; } directory = path4.dirname(directory); } }; module.exports.sync = (name, options2 = {}) => { let directory = path4.resolve(options2.cwd || ""); const { root } = path4.parse(directory); const paths = [].concat(name); const runMatcher = (locateOptions) => { if (typeof name !== "function") { return locatePath.sync(paths, locateOptions); } const foundPath = name(locateOptions.cwd); if (typeof foundPath === "string") { return locatePath.sync([foundPath], locateOptions); } return foundPath; }; while (true) { const foundPath = runMatcher({ ...options2, cwd: directory }); if (foundPath === stop) { return; } if (foundPath) { return path4.resolve(directory, foundPath); } if (directory === root) { return; } directory = path4.dirname(directory); } }; module.exports.exists = pathExists; module.exports.sync.exists = pathExists.sync; module.exports.stop = stop; } }); // node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js var require_windows = __commonJS({ "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) { module.exports = isexe; isexe.sync = sync; var fs3 = __require("fs"); function checkPathExt(path4, options2) { var pathext = options2.pathExt !== void 0 ? options2.pathExt : process.env.PATHEXT; if (!pathext) { return true; } pathext = pathext.split(";"); if (pathext.indexOf("") !== -1) { return true; } for (var i = 0; i < pathext.length; i++) { var p = pathext[i].toLowerCase(); if (p && path4.substr(-p.length).toLowerCase() === p) { return true; } } return false; } function checkStat(stat, path4, options2) { if (!stat.isSymbolicLink() && !stat.isFile()) { return false; } return checkPathExt(path4, options2); } function isexe(path4, options2, cb) { fs3.stat(path4, function(er, stat) { cb(er, er ? false : checkStat(stat, path4, options2)); }); } function sync(path4, options2) { return checkStat(fs3.statSync(path4), path4, options2); } } }); // node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js var require_mode = __commonJS({ "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) { module.exports = isexe; isexe.sync = sync; var fs3 = __require("fs"); function isexe(path4, options2, cb) { fs3.stat(path4, function(er, stat) { cb(er, er ? false : checkStat(stat, options2)); }); } function sync(path4, options2) { return checkStat(fs3.statSync(path4), options2); } function checkStat(stat, options2) { return stat.isFile() && checkMode(stat, options2); } function checkMode(stat, options2) { var mod = stat.mode; var uid = stat.uid; var gid = stat.gid; var myUid = options2.uid !== void 0 ? options2.uid : process.getuid && process.getuid(); var myGid = options2.gid !== void 0 ? options2.gid : process.getgid && process.getgid(); var u = parseInt("100", 8); var g = parseInt("010", 8); var o = parseInt("001", 8); var ug = u | g; var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0; return ret; } } }); // node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js var require_isexe = __commonJS({ "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) { var fs3 = __require("fs"); var core; if (process.platform === "win32" || global.TESTING_WINDOWS) { core = require_windows(); } else { core = require_mode(); } module.exports = isexe; isexe.sync = sync; function isexe(path4, options2, cb) { if (typeof options2 === "function") { cb = options2; options2 = {}; } if (!cb) { if (typeof Promise !== "function") { throw new TypeError("callback not provided"); } return new Promise(function(resolve2, reject) { isexe(path4, options2 || {}, function(er, is) { if (er) { reject(er); } else { resolve2(is); } }); }); } core(path4, options2 || {}, function(er, is) { if (er) { if (er.code === "EACCES" || options2 && options2.ignoreErrors) { er = null; is = false; } } cb(er, is); }); } function sync(path4, options2) { try { return core.sync(path4, options2 || {}); } catch (er) { if (options2 && options2.ignoreErrors || er.code === "EACCES") { return false; } else { throw er; } } } } }); // node_modules/.pnpm/which@2.0.2/node_modules/which/which.js var require_which = __commonJS({ "node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) { var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; var path4 = __require("path"); var COLON = isWindows ? ";" : ":"; var isexe = require_isexe(); var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); var getPathInfo = (cmd, opt) => { const colon = opt.colon || COLON; const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [ // windows always checks the cwd first ...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */ "").split(colon) ]; const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; const pathExt = isWindows ? pathExtExe.split(colon) : [""]; if (isWindows) { if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") pathExt.unshift(""); } return { pathEnv, pathExt, pathExtExe }; }; var which = (cmd, opt, cb) => { if (typeof opt === "function") { cb = opt; opt = {}; } if (!opt) opt = {}; const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); const found = []; const step = (i) => new Promise((resolve2, reject) => { if (i === pathEnv.length) return opt.all && found.length ? resolve2(found) : reject(getNotFoundError(cmd)); const ppRaw = pathEnv[i]; const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; const pCmd = path4.join(pathPart, cmd); const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; resolve2(subStep(p, i, 0)); }); const subStep = (p, i, ii) => new Promise((resolve2, reject) => { if (ii === pathExt.length) return resolve2(step(i + 1)); const ext = pathExt[ii]; isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { if (!er && is) { if (opt.all) found.push(p + ext); else return resolve2(p + ext); } return resolve2(subStep(p, i, ii + 1)); }); }); return cb ? step(0).then((res) => cb(null, res), cb) : step(0); }; var whichSync = (cmd, opt) => { opt = opt || {}; const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); const found = []; for (let i = 0; i < pathEnv.length; i++) { const ppRaw = pathEnv[i]; const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; const pCmd = path4.join(pathPart, cmd); const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; for (let j = 0; j < pathExt.length; j++) { const cur = p + pathExt[j]; try { const is = isexe.sync(cur, { pathExt: pathExtExe }); if (is) { if (opt.all) found.push(cur); else return cur; } } catch (ex) { } } } if (opt.all && found.length) return found; if (opt.nothrow) return null; throw getNotFoundError(cmd); }; module.exports = which; which.sync = whichSync; } }); // node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js var require_path_key = __commonJS({ "node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module) { "use strict"; var pathKey = (options2 = {}) => { const environment = options2.env || process.env; const platform = options2.platform || process.platform; if (platform !== "win32") { return "PATH"; } return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; }; module.exports = pathKey; module.exports.default = pathKey; } }); // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js var require_resolveCommand = __commonJS({ "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) { "use strict"; var path4 = __require("path"); var which = require_which(); var getPathKey = require_path_key(); function resolveCommandAttempt(parsed, withoutPathExt) { const env = parsed.options.env || process.env; const cwd = process.cwd(); const hasCustomCwd = parsed.options.cwd != null; const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled; if (shouldSwitchCwd) { try { process.chdir(parsed.options.cwd); } catch (err) { } } let resolved; try { resolved = which.sync(parsed.command, { path: env[getPathKey({ env })], pathExt: withoutPathExt ? path4.delimiter : void 0 }); } catch (e) { } finally { if (shouldSwitchCwd) { process.chdir(cwd); } } if (resolved) { resolved = path4.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); } return resolved; } function resolveCommand(parsed) { return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); } module.exports = resolveCommand; } }); // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js var require_escape = __commonJS({ "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports, module) { "use strict"; var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; function escapeCommand(arg) { arg = arg.replace(metaCharsRegExp, "^$1"); return arg; } function escapeArgument(arg, doubleEscapeMetaChars) { arg = `${arg}`; arg = arg.replace(/(\\*)"/g, '$1$1\\"'); arg = arg.replace(/(\\*)$/, "$1$1"); arg = `"${arg}"`; arg = arg.replace(metaCharsRegExp, "^$1"); if (doubleEscapeMetaChars) { arg = arg.replace(metaCharsRegExp, "^$1"); } return arg; } module.exports.command = escapeCommand; module.exports.argument = escapeArgument; } }); // node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js var require_shebang_regex = __commonJS({ "node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module) { "use strict"; module.exports = /^#!(.*)/; } }); // node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js var require_shebang_command = __commonJS({ "node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module) { "use strict"; var shebangRegex = require_shebang_regex(); module.exports = (string = "") => { const match = string.match(shebangRegex); if (!match) { return null; } const [path4, argument] = match[0].replace(/#! ?/, "").split(" "); const binary = path4.split("/").pop(); if (binary === "env") { return argument; } return argument ? `${binary} ${argument}` : binary; }; } }); // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js var require_readShebang = __commonJS({ "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) { "use strict"; var fs3 = __require("fs"); var shebangCommand = require_shebang_command(); function readShebang(command) { const size = 150; const buffer = Buffer.alloc(size); let fd; try { fd = fs3.openSync(command, "r"); fs3.readSync(fd, buffer, 0, size, 0); fs3.closeSync(fd); } catch (e) { } return shebangCommand(buffer.toString()); } module.exports = readShebang; } }); // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js var require_parse = __commonJS({ "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports, module) { "use strict"; var path4 = __require("path"); var resolveCommand = require_resolveCommand(); var escape = require_escape(); var readShebang = require_readShebang(); var isWin = process.platform === "win32"; var isExecutableRegExp = /\.(?:com|exe)$/i; var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; function detectShebang(parsed) { parsed.file = resolveCommand(parsed); const shebang = parsed.file && readShebang(parsed.file); if (shebang) { parsed.args.unshift(parsed.file); parsed.command = shebang; return resolveCommand(parsed); } return parsed.file; } function parseNonShell(parsed) { if (!isWin) { return parsed; } const commandFile = detectShebang(parsed); const needsShell = !isExecutableRegExp.test(commandFile); if (parsed.options.forceShell || needsShell) { const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); parsed.command = path4.normalize(parsed.command); parsed.command = escape.command(parsed.command); parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); const shellCommand = [parsed.command].concat(parsed.args).join(" "); parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; parsed.command = process.env.comspec || "cmd.exe"; parsed.options.windowsVerbatimArguments = true; } return parsed; } function parse4(command, args, options2) { if (args && !Array.isArray(args)) { options2 = args; args = null; } args = args ? args.slice(0) : []; options2 = Object.assign({}, options2); const parsed = { command, args, options: options2, file: void 0, original: { command, args } }; return options2.shell ? parsed : parseNonShell(parsed); } module.exports = parse4; } }); // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js var require_enoent = __commonJS({ "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports, module) { "use strict"; var isWin = process.platform === "win32"; function notFoundError(original, syscall) { return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { code: "ENOENT", errno: "ENOENT", syscall: `${syscall} ${original.command}`, path: original.command, spawnargs: original.args }); } function hookChildProcess(cp, parsed) { if (!isWin) { return; } const originalEmit = cp.emit; cp.emit = function(name, arg1) { if (name === "exit") { const err = verifyENOENT(arg1, parsed, "spawn"); if (err) { return originalEmit.call(cp, "error", err); } } return originalEmit.apply(cp, arguments); }; } function verifyENOENT(status, parsed) { if (isWin && status === 1 && !parsed.file) { return notFoundError(parsed.original, "spawn"); } return null; } function verifyENOENTSync(status, parsed) { if (isWin && status === 1 && !parsed.file) { return notFoundError(parsed.original, "spawnSync"); } return null; } module.exports = { hookChildProcess, verifyENOENT, verifyENOENTSync, notFoundError }; } }); // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js var require_cross_spawn = __commonJS({ "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports, module) { "use strict"; var cp = __require("child_process"); var parse4 = require_parse(); var enoent = require_enoent(); function spawn(command, args, options2) { const parsed = parse4(command, args, options2); const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); enoent.hookChildProcess(spawned, parsed); return spawned; } function spawnSync(command, args, options2) { const parsed = parse4(command, args, options2); const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); return result; } module.exports = spawn; module.exports.spawn = spawn; module.exports.sync = spawnSync; module.exports._parse = parse4; module.exports._enoent = enoent; } }); // node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js var require_strip_final_newline = __commonJS({ "node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports, module) { "use strict"; module.exports = (input) => { const LF = typeof input === "string" ? "\n" : "\n".charCodeAt(); const CR = typeof input === "string" ? "\r" : "\r".charCodeAt(); if (input[input.length - 1] === LF) { input = input.slice(0, input.length - 1); } if (input[input.length - 1] === CR) { input = input.slice(0, input.length - 1); } return input; }; } }); // node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js var require_npm_run_path = __commonJS({ "node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports, module) { "use strict"; var path4 = __require("path"); var pathKey = require_path_key(); var npmRunPath = (options2) => { options2 = { cwd: process.cwd(), path: process.env[pathKey()], execPath: process.execPath, ...options2 }; let previous; let cwdPath = path4.resolve(options2.cwd); const result = []; while (previous !== cwdPath) { result.push(path4.join(cwdPath, "node_modules/.bin")); previous = cwdPath; cwdPath = path4.resolve(cwdPath, ".."); } const execPathDir = path4.resolve(options2.cwd, options2.execPath, ".."); result.push(execPathDir); return result.concat(options2.path).join(path4.delimiter); }; module.exports = npmRunPath; module.exports.default = npmRunPath; module.exports.env = (options2) => { options