@shopify/create-app
Version:
A CLI tool to create a new Shopify app.
7,351 lines • 307 kB
JavaScript
import {
isUnitTest,
isVerbose
} from "./chunk-X2X377NR.js";
import {
require_has_flag
} from "./chunk-7OHJH7BF.js";
import {
isTruthy
} from "./chunk-HNIAZN6U.js";
import {
cwd,
dirname,
isSubpath,
join,
joinPath,
normalizePath,
relativizePath,
resolvePath,
sep,
sniffForPath
} from "./chunk-C3J4HVUN.js";
import {
require_out
} from "./chunk-UFLX7QDP.js";
import {
__commonJS,
__esm,
__export,
__require,
__toCommonJS,
__toESM,
init_cjs_shims
} from "./chunk-3XNI6LP4.js";
// ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
var require_supports_color = __commonJS({
"../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var os3 = __require("os"), tty2 = __require("tty"), hasFlag2 = require_has_flag(), { env: env2 } = process, forceColor;
hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never") ? forceColor = 0 : (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) && (forceColor = 1);
"FORCE_COLOR" in env2 && (env2.FORCE_COLOR === "true" ? forceColor = 1 : env2.FORCE_COLOR === "false" ? forceColor = 0 : forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3));
function translateLevel2(level) {
return level === 0 ? !1 : {
level,
hasBasic: !0,
has256: level >= 2,
has16m: level >= 3
};
}
function supportsColor2(haveStream, streamIsTTY) {
if (forceColor === 0)
return 0;
if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor"))
return 3;
if (hasFlag2("color=256"))
return 2;
if (haveStream && !streamIsTTY && forceColor === void 0)
return 0;
let min = forceColor || 0;
if (env2.TERM === "dumb")
return min;
if (process.platform === "win32") {
let osRelease = os3.release().split(".");
return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
}
if ("CI" in env2)
return ["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship" ? 1 : min;
if ("TEAMCITY_VERSION" in env2)
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
if (env2.COLORTERM === "truecolor")
return 3;
if ("TERM_PROGRAM" in env2) {
let version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
switch (env2.TERM_PROGRAM) {
case "iTerm.app":
return version >= 3 ? 3 : 2;
case "Apple_Terminal":
return 2;
}
}
return /-256(color)?$/i.test(env2.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM) || "COLORTERM" in env2 ? 1 : min;
}
function getSupportLevel(stream) {
let level = supportsColor2(stream, stream && stream.isTTY);
return translateLevel2(level);
}
module.exports = {
supportsColor: getSupportLevel,
stdout: translateLevel2(supportsColor2(!0, tty2.isatty(1))),
stderr: translateLevel2(supportsColor2(!0, tty2.isatty(2)))
};
}
});
// ../../node_modules/.pnpm/supports-hyperlinks@3.2.0/node_modules/supports-hyperlinks/index.js
var require_supports_hyperlinks = __commonJS({
"../../node_modules/.pnpm/supports-hyperlinks@3.2.0/node_modules/supports-hyperlinks/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var supportsColor2 = require_supports_color(), hasFlag2 = require_has_flag();
function parseVersion(versionString) {
if (/^\d{3,4}$/.test(versionString)) {
let m = /(\d{1,2})(\d{2})/.exec(versionString) || [];
return {
major: 0,
minor: parseInt(m[1], 10),
patch: parseInt(m[2], 10)
};
}
let versions = (versionString || "").split(".").map((n) => parseInt(n, 10));
return {
major: versions[0],
minor: versions[1],
patch: versions[2]
};
}
function supportsHyperlink(stream) {
let {
CI,
FORCE_HYPERLINK,
NETLIFY,
TEAMCITY_VERSION,
TERM_PROGRAM,
TERM_PROGRAM_VERSION,
VTE_VERSION,
TERM
} = process.env;
if (FORCE_HYPERLINK)
return !(FORCE_HYPERLINK.length > 0 && parseInt(FORCE_HYPERLINK, 10) === 0);
if (hasFlag2("no-hyperlink") || hasFlag2("no-hyperlinks") || hasFlag2("hyperlink=false") || hasFlag2("hyperlink=never"))
return !1;
if (hasFlag2("hyperlink=true") || hasFlag2("hyperlink=always") || NETLIFY)
return !0;
if (!supportsColor2.supportsColor(stream) || stream && !stream.isTTY)
return !1;
if ("WT_SESSION" in process.env)
return !0;
if (process.platform === "win32" || CI || TEAMCITY_VERSION)
return !1;
if (TERM_PROGRAM) {
let version = parseVersion(TERM_PROGRAM_VERSION || "");
switch (TERM_PROGRAM) {
case "iTerm.app":
return version.major === 3 ? version.minor >= 1 : version.major > 3;
case "WezTerm":
return version.major >= 20200620;
case "vscode":
return version.major > 1 || version.major === 1 && version.minor >= 72;
case "ghostty":
return !0;
}
}
if (VTE_VERSION) {
if (VTE_VERSION === "0.50.0")
return !1;
let version = parseVersion(VTE_VERSION);
return version.major > 0 || version.minor >= 50;
}
return TERM === "alacritty";
}
module.exports = {
supportsHyperlink,
stdout: supportsHyperlink(process.stdout),
stderr: supportsHyperlink(process.stderr)
};
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheClear.js
var require_listCacheClear = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheClear.js"(exports, module) {
init_cjs_shims();
function listCacheClear() {
this.__data__ = [], this.size = 0;
}
module.exports = listCacheClear;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/eq.js
var require_eq = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/eq.js"(exports, module) {
init_cjs_shims();
function eq(value, other) {
return value === other || value !== value && other !== other;
}
module.exports = eq;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js
var require_assocIndexOf = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js"(exports, module) {
init_cjs_shims();
var eq = require_eq();
function assocIndexOf(array, key) {
for (var length = array.length; length--; )
if (eq(array[length][0], key))
return length;
return -1;
}
module.exports = assocIndexOf;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js
var require_listCacheDelete = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js"(exports, module) {
init_cjs_shims();
var assocIndexOf = require_assocIndexOf(), arrayProto = Array.prototype, splice = arrayProto.splice;
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0)
return !1;
var lastIndex = data.length - 1;
return index == lastIndex ? data.pop() : splice.call(data, index, 1), --this.size, !0;
}
module.exports = listCacheDelete;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheGet.js
var require_listCacheGet = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheGet.js"(exports, module) {
init_cjs_shims();
var assocIndexOf = require_assocIndexOf();
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
module.exports = listCacheGet;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheHas.js
var require_listCacheHas = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheHas.js"(exports, module) {
init_cjs_shims();
var assocIndexOf = require_assocIndexOf();
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
module.exports = listCacheHas;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheSet.js
var require_listCacheSet = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_listCacheSet.js"(exports, module) {
init_cjs_shims();
var assocIndexOf = require_assocIndexOf();
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? (++this.size, data.push([key, value])) : data[index][1] = value, this;
}
module.exports = listCacheSet;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_ListCache.js
var require_ListCache = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_ListCache.js"(exports, module) {
init_cjs_shims();
var listCacheClear = require_listCacheClear(), listCacheDelete = require_listCacheDelete(), listCacheGet = require_listCacheGet(), listCacheHas = require_listCacheHas(), listCacheSet = require_listCacheSet();
function ListCache(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
for (this.clear(); ++index < length; ) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype.delete = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackClear.js
var require_stackClear = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackClear.js"(exports, module) {
init_cjs_shims();
var ListCache = require_ListCache();
function stackClear() {
this.__data__ = new ListCache(), this.size = 0;
}
module.exports = stackClear;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackDelete.js
var require_stackDelete = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackDelete.js"(exports, module) {
init_cjs_shims();
function stackDelete(key) {
var data = this.__data__, result = data.delete(key);
return this.size = data.size, result;
}
module.exports = stackDelete;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackGet.js
var require_stackGet = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackGet.js"(exports, module) {
init_cjs_shims();
function stackGet(key) {
return this.__data__.get(key);
}
module.exports = stackGet;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackHas.js
var require_stackHas = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackHas.js"(exports, module) {
init_cjs_shims();
function stackHas(key) {
return this.__data__.has(key);
}
module.exports = stackHas;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js
var require_freeGlobal = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js"(exports, module) {
init_cjs_shims();
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
module.exports = freeGlobal;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_root.js
var require_root = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_root.js"(exports, module) {
init_cjs_shims();
var freeGlobal = require_freeGlobal(), freeSelf = typeof self == "object" && self && self.Object === Object && self, root = freeGlobal || freeSelf || Function("return this")();
module.exports = root;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Symbol.js
var require_Symbol = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Symbol.js"(exports, module) {
init_cjs_shims();
var root = require_root(), Symbol2 = root.Symbol;
module.exports = Symbol2;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getRawTag.js
var require_getRawTag = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getRawTag.js"(exports, module) {
init_cjs_shims();
var Symbol2 = require_Symbol(), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, nativeObjectToString = objectProto.toString, symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
try {
value[symToStringTag] = void 0;
var unmasked = !0;
} catch {
}
var result = nativeObjectToString.call(value);
return unmasked && (isOwn ? value[symToStringTag] = tag : delete value[symToStringTag]), result;
}
module.exports = getRawTag;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_objectToString.js
var require_objectToString = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_objectToString.js"(exports, module) {
init_cjs_shims();
var objectProto = Object.prototype, nativeObjectToString = objectProto.toString;
function objectToString(value) {
return nativeObjectToString.call(value);
}
module.exports = objectToString;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetTag.js
var require_baseGetTag = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetTag.js"(exports, module) {
init_cjs_shims();
var Symbol2 = require_Symbol(), getRawTag = require_getRawTag(), objectToString = require_objectToString(), nullTag = "[object Null]", undefinedTag = "[object Undefined]", symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
function baseGetTag(value) {
return value == null ? value === void 0 ? undefinedTag : nullTag : symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}
module.exports = baseGetTag;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObject.js
var require_isObject = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObject.js"(exports, module) {
init_cjs_shims();
function isObject(value) {
var type = typeof value;
return value != null && (type == "object" || type == "function");
}
module.exports = isObject;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isFunction.js
var require_isFunction = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isFunction.js"(exports, module) {
init_cjs_shims();
var baseGetTag = require_baseGetTag(), isObject = require_isObject(), asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
function isFunction(value) {
if (!isObject(value))
return !1;
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
module.exports = isFunction;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_coreJsData.js
var require_coreJsData = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_coreJsData.js"(exports, module) {
init_cjs_shims();
var root = require_root(), coreJsData = root["__core-js_shared__"];
module.exports = coreJsData;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isMasked.js
var require_isMasked = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isMasked.js"(exports, module) {
init_cjs_shims();
var coreJsData = require_coreJsData(), maskSrcKey = (function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
})();
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
module.exports = isMasked;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_toSource.js
var require_toSource = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_toSource.js"(exports, module) {
init_cjs_shims();
var funcProto = Function.prototype, funcToString = funcProto.toString;
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch {
}
try {
return func + "";
} catch {
}
}
return "";
}
module.exports = toSource;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsNative.js
var require_baseIsNative = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsNative.js"(exports, module) {
init_cjs_shims();
var isFunction = require_isFunction(), isMasked = require_isMasked(), isObject = require_isObject(), toSource = require_toSource(), reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reIsHostCtor = /^\[object .+?Constructor\]$/, funcProto = Function.prototype, objectProto = Object.prototype, funcToString = funcProto.toString, hasOwnProperty = objectProto.hasOwnProperty, reIsNative = RegExp(
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function baseIsNative(value) {
if (!isObject(value) || isMasked(value))
return !1;
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
module.exports = baseIsNative;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getValue.js
var require_getValue = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getValue.js"(exports, module) {
init_cjs_shims();
function getValue(object, key) {
return object?.[key];
}
module.exports = getValue;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getNative.js
var require_getNative = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getNative.js"(exports, module) {
init_cjs_shims();
var baseIsNative = require_baseIsNative(), getValue = require_getValue();
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : void 0;
}
module.exports = getNative;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Map.js
var require_Map = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Map.js"(exports, module) {
init_cjs_shims();
var getNative = require_getNative(), root = require_root(), Map2 = getNative(root, "Map");
module.exports = Map2;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_nativeCreate.js
var require_nativeCreate = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_nativeCreate.js"(exports, module) {
init_cjs_shims();
var getNative = require_getNative(), nativeCreate = getNative(Object, "create");
module.exports = nativeCreate;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashClear.js
var require_hashClear = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashClear.js"(exports, module) {
init_cjs_shims();
var nativeCreate = require_nativeCreate();
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {}, this.size = 0;
}
module.exports = hashClear;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashDelete.js
var require_hashDelete = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashDelete.js"(exports, module) {
init_cjs_shims();
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
return this.size -= result ? 1 : 0, result;
}
module.exports = hashDelete;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashGet.js
var require_hashGet = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashGet.js"(exports, module) {
init_cjs_shims();
var nativeCreate = require_nativeCreate(), HASH_UNDEFINED = "__lodash_hash_undefined__", objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data, key) ? data[key] : void 0;
}
module.exports = hashGet;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashHas.js
var require_hashHas = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashHas.js"(exports, module) {
init_cjs_shims();
var nativeCreate = require_nativeCreate(), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
}
module.exports = hashHas;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashSet.js
var require_hashSet = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hashSet.js"(exports, module) {
init_cjs_shims();
var nativeCreate = require_nativeCreate(), HASH_UNDEFINED = "__lodash_hash_undefined__";
function hashSet(key, value) {
var data = this.__data__;
return this.size += this.has(key) ? 0 : 1, data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value, this;
}
module.exports = hashSet;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Hash.js
var require_Hash = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Hash.js"(exports, module) {
init_cjs_shims();
var hashClear = require_hashClear(), hashDelete = require_hashDelete(), hashGet = require_hashGet(), hashHas = require_hashHas(), hashSet = require_hashSet();
function Hash(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
for (this.clear(); ++index < length; ) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
Hash.prototype.clear = hashClear;
Hash.prototype.delete = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
module.exports = Hash;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js
var require_mapCacheClear = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js"(exports, module) {
init_cjs_shims();
var Hash = require_Hash(), ListCache = require_ListCache(), Map2 = require_Map();
function mapCacheClear() {
this.size = 0, this.__data__ = {
hash: new Hash(),
map: new (Map2 || ListCache)(),
string: new Hash()
};
}
module.exports = mapCacheClear;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isKeyable.js
var require_isKeyable = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isKeyable.js"(exports, module) {
init_cjs_shims();
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
module.exports = isKeyable;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getMapData.js
var require_getMapData = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getMapData.js"(exports, module) {
init_cjs_shims();
var isKeyable = require_isKeyable();
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
module.exports = getMapData;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js
var require_mapCacheDelete = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js"(exports, module) {
init_cjs_shims();
var getMapData = require_getMapData();
function mapCacheDelete(key) {
var result = getMapData(this, key).delete(key);
return this.size -= result ? 1 : 0, result;
}
module.exports = mapCacheDelete;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js
var require_mapCacheGet = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js"(exports, module) {
init_cjs_shims();
var getMapData = require_getMapData();
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
module.exports = mapCacheGet;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js
var require_mapCacheHas = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js"(exports, module) {
init_cjs_shims();
var getMapData = require_getMapData();
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
module.exports = mapCacheHas;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js
var require_mapCacheSet = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js"(exports, module) {
init_cjs_shims();
var getMapData = require_getMapData();
function mapCacheSet(key, value) {
var data = getMapData(this, key), size = data.size;
return data.set(key, value), this.size += data.size == size ? 0 : 1, this;
}
module.exports = mapCacheSet;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_MapCache.js
var require_MapCache = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_MapCache.js"(exports, module) {
init_cjs_shims();
var mapCacheClear = require_mapCacheClear(), mapCacheDelete = require_mapCacheDelete(), mapCacheGet = require_mapCacheGet(), mapCacheHas = require_mapCacheHas(), mapCacheSet = require_mapCacheSet();
function MapCache(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
for (this.clear(); ++index < length; ) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype.delete = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackSet.js
var require_stackSet = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stackSet.js"(exports, module) {
init_cjs_shims();
var ListCache = require_ListCache(), Map2 = require_Map(), MapCache = require_MapCache(), LARGE_ARRAY_SIZE = 200;
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1)
return pairs.push([key, value]), this.size = ++data.size, this;
data = this.__data__ = new MapCache(pairs);
}
return data.set(key, value), this.size = data.size, this;
}
module.exports = stackSet;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Stack.js
var require_Stack = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Stack.js"(exports, module) {
init_cjs_shims();
var ListCache = require_ListCache(), stackClear = require_stackClear(), stackDelete = require_stackDelete(), stackGet = require_stackGet(), stackHas = require_stackHas(), stackSet = require_stackSet();
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
Stack.prototype.clear = stackClear;
Stack.prototype.delete = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = Stack;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setCacheAdd.js
var require_setCacheAdd = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setCacheAdd.js"(exports, module) {
init_cjs_shims();
var HASH_UNDEFINED = "__lodash_hash_undefined__";
function setCacheAdd(value) {
return this.__data__.set(value, HASH_UNDEFINED), this;
}
module.exports = setCacheAdd;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setCacheHas.js
var require_setCacheHas = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setCacheHas.js"(exports, module) {
init_cjs_shims();
function setCacheHas(value) {
return this.__data__.has(value);
}
module.exports = setCacheHas;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_SetCache.js
var require_SetCache = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_SetCache.js"(exports, module) {
init_cjs_shims();
var MapCache = require_MapCache(), setCacheAdd = require_setCacheAdd(), setCacheHas = require_setCacheHas();
function SetCache(values) {
var index = -1, length = values == null ? 0 : values.length;
for (this.__data__ = new MapCache(); ++index < length; )
this.add(values[index]);
}
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
module.exports = SetCache;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arraySome.js
var require_arraySome = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arraySome.js"(exports, module) {
init_cjs_shims();
function arraySome(array, predicate) {
for (var index = -1, length = array == null ? 0 : array.length; ++index < length; )
if (predicate(array[index], index, array))
return !0;
return !1;
}
module.exports = arraySome;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_cacheHas.js
var require_cacheHas = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_cacheHas.js"(exports, module) {
init_cjs_shims();
function cacheHas(cache, key) {
return cache.has(key);
}
module.exports = cacheHas;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalArrays.js
var require_equalArrays = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalArrays.js"(exports, module) {
init_cjs_shims();
var SetCache = require_SetCache(), arraySome = require_arraySome(), cacheHas = require_cacheHas(), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength))
return !1;
var arrStacked = stack.get(array), othStacked = stack.get(other);
if (arrStacked && othStacked)
return arrStacked == other && othStacked == array;
var index = -1, result = !0, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
for (stack.set(array, other), stack.set(other, array); ++index < arrLength; ) {
var arrValue = array[index], othValue = other[index];
if (customizer)
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
if (compared !== void 0) {
if (compared)
continue;
result = !1;
break;
}
if (seen) {
if (!arraySome(other, function(othValue2, othIndex) {
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack)))
return seen.push(othIndex);
})) {
result = !1;
break;
}
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
result = !1;
break;
}
}
return stack.delete(array), stack.delete(other), result;
}
module.exports = equalArrays;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Uint8Array.js
var require_Uint8Array = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Uint8Array.js"(exports, module) {
init_cjs_shims();
var root = require_root(), Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapToArray.js
var require_mapToArray = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_mapToArray.js"(exports, module) {
init_cjs_shims();
function mapToArray(map) {
var index = -1, result = Array(map.size);
return map.forEach(function(value, key) {
result[++index] = [key, value];
}), result;
}
module.exports = mapToArray;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setToArray.js
var require_setToArray = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setToArray.js"(exports, module) {
init_cjs_shims();
function setToArray(set) {
var index = -1, result = Array(set.size);
return set.forEach(function(value) {
result[++index] = value;
}), result;
}
module.exports = setToArray;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalByTag.js
var require_equalByTag = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalByTag.js"(exports, module) {
init_cjs_shims();
var Symbol2 = require_Symbol(), Uint8Array = require_Uint8Array(), eq = require_eq(), equalArrays = require_equalArrays(), mapToArray = require_mapToArray(), setToArray = require_setToArray(), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2, boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", symbolProto = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset)
return !1;
object = object.buffer, other = other.buffer;
case arrayBufferTag:
return !(object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other)));
case boolTag:
case dateTag:
case numberTag:
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
return object == other + "";
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
if (convert || (convert = setToArray), object.size != other.size && !isPartial)
return !1;
var stacked = stack.get(object);
if (stacked)
return stacked == other;
bitmask |= COMPARE_UNORDERED_FLAG, stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
return stack.delete(object), result;
case symbolTag:
if (symbolValueOf)
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
return !1;
}
module.exports = equalByTag;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayPush.js
var require_arrayPush = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayPush.js"(exports, module) {
init_cjs_shims();
function arrayPush(array, values) {
for (var index = -1, length = values.length, offset = array.length; ++index < length; )
array[offset + index] = values[index];
return array;
}
module.exports = arrayPush;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArray.js
var require_isArray = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArray.js"(exports, module) {
init_cjs_shims();
var isArray = Array.isArray;
module.exports = isArray;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetAllKeys.js
var require_baseGetAllKeys = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetAllKeys.js"(exports, module) {
init_cjs_shims();
var arrayPush = require_arrayPush(), isArray = require_isArray();
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
module.exports = baseGetAllKeys;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayFilter.js
var require_arrayFilter = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayFilter.js"(exports, module) {
init_cjs_shims();
function arrayFilter(array, predicate) {
for (var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; ++index < length; ) {
var value = array[index];
predicate(value, index, array) && (result[resIndex++] = value);
}
return result;
}
module.exports = arrayFilter;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/stubArray.js
var require_stubArray = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/stubArray.js"(exports, module) {
init_cjs_shims();
function stubArray() {
return [];
}
module.exports = stubArray;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getSymbols.js
var require_getSymbols = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getSymbols.js"(exports, module) {
init_cjs_shims();
var arrayFilter = require_arrayFilter(), stubArray = require_stubArray(), objectProto = Object.prototype, propertyIsEnumerable = objectProto.propertyIsEnumerable, nativeGetSymbols = Object.getOwnPropertySymbols, getSymbols = nativeGetSymbols ? function(object) {
return object == null ? [] : (object = Object(object), arrayFilter(nativeGetSymbols(object), function(symbol) {
return propertyIsEnumerable.call(object, symbol);
}));
} : stubArray;
module.exports = getSymbols;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTimes.js
var require_baseTimes = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTimes.js"(exports, module) {
init_cjs_shims();
function baseTimes(n, iteratee) {
for (var index = -1, result = Array(n); ++index < n; )
result[index] = iteratee(index);
return result;
}
module.exports = baseTimes;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObjectLike.js
var require_isObjectLike = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObjectLike.js"(exports, module) {
init_cjs_shims();
function isObjectLike(value) {
return value != null && typeof value == "object";
}
module.exports = isObjectLike;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsArguments.js
var require_baseIsArguments = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsArguments.js"(exports, module) {
init_cjs_shims();
var baseGetTag = require_baseGetTag(), isObjectLike = require_isObjectLike(), argsTag = "[object Arguments]";
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
module.exports = baseIsArguments;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArguments.js
var require_isArguments = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArguments.js"(exports, module) {
init_cjs_shims();
var baseIsArguments = require_baseIsArguments(), isObjectLike = require_isObjectLike(), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty, propertyIsEnumerable = objectProto.propertyIsEnumerable, isArguments = baseIsArguments(/* @__PURE__ */ (function() {
return arguments;
})()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
};
module.exports = isArguments;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/stubFalse.js
var require_stubFalse = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/stubFalse.js"(exports, module) {
init_cjs_shims();
function stubFalse() {
return !1;
}
module.exports = stubFalse;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isBuffer.js
var require_isBuffer = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isBuffer.js"(exports, module) {
init_cjs_shims();
var root = require_root(), stubFalse = require_stubFalse(), freeExports = typeof exports == "object" && exports && !exports.nodeType && exports, freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports, Buffer2 = moduleExports ? root.Buffer : void 0, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0, isBuffer = nativeIsBuffer || stubFalse;
module.exports = isBuffer;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isIndex.js
var require_isIndex = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isIndex.js"(exports, module) {
init_cjs_shims();
var MAX_SAFE_INTEGER = 9007199254740991, reIsUint = /^(?:0|[1-9]\d*)$/;
function isIndex(value, length) {
var type = typeof value;
return length = length ?? MAX_SAFE_INTEGER, !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}
module.exports = isIndex;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isLength.js
var require_isLength = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isLength.js"(exports, module) {
init_cjs_shims();
var MAX_SAFE_INTEGER = 9007199254740991;
function isLength(value) {
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsTypedArray.js
var require_baseIsTypedArray = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsTypedArray.js"(exports, module) {
init_cjs_shims();
var baseGetTag = require_baseGetTag(), isLength = require_isLength(), isObjectLike = require_isObjectLike(), argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", weakMapTag = "[object WeakMap]", arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]", typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = !0;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = !1;
function baseIsTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
module.exports = baseIsTypedArray;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseUnary.js
var require_baseUnary = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseUnary.js"(exports, module) {
init_cjs_shims();
function baseUnary(func) {
return function(value) {
return func(value);
};
}
module.exports = baseUnary;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_nodeUtil.js
var require_nodeUtil = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_nodeUtil.js"(exports, module) {
init_cjs_shims();
var freeGlobal = require_freeGlobal(), freeExports = typeof exports == "object" && exports && !exports.nodeType && exports, freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports, freeProcess = moduleExports && freeGlobal.process, nodeUtil = (function() {
try {
var types2 = freeModule && freeModule.require && freeModule.require("util").types;
return types2 || freeProcess && freeProcess.binding && freeProcess.binding("util");
} catch {
}
})();
module.exports = nodeUtil;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isTypedArray.js
var require_isTypedArray = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isTypedArray.js"(exports, module) {
init_cjs_shims();
var baseIsTypedArray = require_baseIsTypedArray(), baseUnary = require_baseUnary(), nodeUtil = require_nodeUtil(), nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray, isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
module.exports = isTypedArray;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayLikeKeys.js
var require_arrayLikeKeys = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayLikeKeys.js"(exports, module) {
init_cjs_shims();
var baseTimes = require_baseTimes(), isArguments = require_isArguments(), isArray = require_isArray(), isBuffer = require_isBuffer(), isIndex = require_isIndex(), isTypedArray = require_isTypedArray(), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
for (var key in value)
(inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
isIndex(key, length))) && result.push(key);
return result;
}
module.exports = arrayLikeKeys;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isPrototype.js
var require_isPrototype = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isPrototype.js"(exports, module) {
init_cjs_shims();
var objectProto = Object.prototype;
function isPrototype(value) {
var Ctor = value && value.constructor, proto2 = typeof Ctor == "function" && Ctor.prototype || objectProto;
return value === proto2;
}
module.exports = isPrototype;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_overArg.js
var require_overArg = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_overArg.js"(exports, module) {
init_cjs_shims();
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
module.exports = overArg;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_nativeKeys.js
var require_nativeKeys = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_nativeKeys.js"(exports, module) {
init_cjs_shims();
var overArg = require_overArg(), nativeKeys = overArg(Object.keys, Object);
module.exports = nativeKeys;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseKeys.js
var require_baseKeys = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseKeys.js"(exports, module) {
init_cjs_shims();
var isPrototype = require_isPrototype(), nativeKeys = require_nativeKeys(), objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
function baseKeys(object) {
if (!isPrototype(object))
return nativeKeys(object);
var result = [];
for (var key in Object(object))
hasOwnProperty.call(object, key) && key != "constructor" && result.push(key);
return result;
}
module.exports = baseKeys;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArrayLike.js
var require_isArrayLike = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArrayLike.js"(exports, module) {
init_cjs_shims();
var isFunction = require_isFunction(), isLength = require_isLength();
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
module.exports = isArrayLike;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/keys.js
var require_keys = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/keys.js"(exports, module) {
init_cjs_shims();
var arrayLikeKeys = require_arrayLikeKeys(), baseKeys = require_baseKeys(), isArrayLike = require_isArrayLike();
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
module.exports = keys;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getAllKeys.js
var require_getAllKeys = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getAllKeys.js"(exports, module) {
init_cjs_shims();
var baseGetAllKeys = require_baseGetAllKeys(), getSymbols = require_getSymbols(), keys = require_keys();
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
module.exports = getAllKeys;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalObjects.js
var require_equalObjects = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_equalObjects.js"(exports, module) {
init_cjs_shims();
var getAllKeys = require_getAllKeys(), COMPARE_PARTIAL_FLAG = 1, objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
if (objLength != othLength && !isPartial)
return !1;
for (var index = objLength; index--; ) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key)))
return !1;
}
var objStacked = stack.get(object), othStacked = stack.get(other);
if (objStacked && othStacked)
return objStacked == other && othStacked == object;
var result = !0;
stack.set(object, other), stack.set(other, object);
for (var skipCtor = isPartial; ++index < objLength; ) {
key = objProps[index];
var objValue = object[key], othValue = other[key];
if (customizer)
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
result = !1;
break;
}
skipCtor || (skipCtor = key == "constructor");
}
if (result && !skipCtor) {
var objCtor = object.constructor, othCtor = other.constructor;
objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor) && (result = !1);
}
return stack.delete(object), stack.delete(other), result;
}
module.exports = equalObjects;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_DataView.js
var require_DataView = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_DataView.js"(exports, module) {
init_cjs_shims();
var getNative = require_getNative(), root = require_root(), DataView = getNative(root, "DataView");
module.exports = DataView;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Promise.js
var require_Promise = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Promise.js"(exports, module) {
init_cjs_shims();
var getNative = require_getNative(), root = require_root(), Promise2 = getNative(root, "Promise");
module.exports = Promise2;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Set.js
var require_Set = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Set.js"(exports, module) {
init_cjs_shims();
var getNative = require_getNative(), root = require_root(), Set2 = getNative(root, "Set");
module.exports = Set2;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_WeakMap.js
var require_WeakMap = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_WeakMap.js"(exports, module) {
init_cjs_shims();
var getNative = require_getNative(), root = require_root(), WeakMap = getNative(root, "WeakMap");
module.exports = WeakMap;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getTag.js
var require_getTag = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getTag.js"(exports, module) {
init_cjs_shims();
var DataView = require_DataView(), Map2 = require_Map(), Promise2 = require_Promise(), Set2 = require_Set(), WeakMap = require_WeakMap(), baseGetTag = require_baseGetTag(), toSource = require_toSource(), mapTag = "[object Map]", objectTag = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]", dataViewTag = "[object DataView]", dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap), getTag = baseGetTag;
(DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) && (getTag = function(value) {
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
if (ctorString)
switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
return result;
});
module.exports = getTag;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsEqualDeep.js
var require_baseIsEqualDeep = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsEqualDeep.js"(exports, module) {
init_cjs_shims();
var Stack = require_Stack(), equalArrays = require_equalArrays(), equalByTag = require_equalByTag(), equalObjects = require_equalObjects(), getTag = require_getTag(), isArray = require_isArray(), isBuffer = require_isBuffer(), isTypedArray = require_isTypedArray(), COMPARE_PARTIAL_FLAG = 1, argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]", objectProto = Object.prototype, hasOwnProperty = objectProto.hasOwnProperty;
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
objTag = objTag == argsTag ? objectTag : objTag, othTag = othTag == argsTag ? objectTag : othTag;
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other))
return !1;
objIsArr = !0, objIsObj = !1;
}
if (isSameTag && !objIsObj)
return stack || (stack = new Stack()), objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
return stack || (stack = new Stack()), equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
return isSameTag ? (stack || (stack = new Stack()), equalObjects(object, other, bitmask, customizer, equalFunc, stack)) : !1;
}
module.exports = baseIsEqualDeep;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsEqual.js
var require_baseIsEqual = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsEqual.js"(exports, module) {
init_cjs_shims();
var baseIsEqualDeep = require_baseIsEqualDeep(), isObjectLike = require_isObjectLike();
function baseIsEqual(value, other, bitmask, customizer, stack) {
return value === other ? !0 : value == null || other == null || !isObjectLike(value) && !isObjectLike(other) ? value !== value && other !== other : baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
module.exports = baseIsEqual;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsMatch.js
var require_baseIsMatch = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsMatch.js"(exports, module) {
init_cjs_shims();
var Stack = require_Stack(), baseIsEqual = require_baseIsEqual(), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length, length = index, noCustomizer = !customizer;
if (object == null)
return !length;
for (object = Object(object); index--; ) {
var data = matchData[index];
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object))
return !1;
}
for (; ++index < length; ) {
data = matchData[index];
var key = data[0], objValue = object[key], srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === void 0 && !(key in object))
return !1;
} else {
var stack = new Stack();
if (customizer)
var result = customizer(objValue, srcValue, key, object, source, stack);
if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result))
return !1;
}
}
return !0;
}
module.exports = baseIsMatch;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isStrictComparable.js
var require_isStrictComparable = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isStrictComparable.js"(exports, module) {
init_cjs_shims();
var isObject = require_isObject();
function isStrictComparable(value) {
return value === value && !isObject(value);
}
module.exports = isStrictComparable;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getMatchData.js
var require_getMatchData = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getMatchData.js"(exports, module) {
init_cjs_shims();
var isStrictComparable = require_isStrictComparable(), keys = require_keys();
function getMatchData(object) {
for (var result = keys(object), length = result.length; length--; ) {
var key = result[length], value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
module.exports = getMatchData;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_matchesStrictComparable.js
var require_matchesStrictComparable = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_matchesStrictComparable.js"(exports, module) {
init_cjs_shims();
function matchesStrictComparable(key, srcValue) {
return function(object) {
return object == null ? !1 : object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
};
}
module.exports = matchesStrictComparable;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseMatches.js
var require_baseMatches = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseMatches.js"(exports, module) {
init_cjs_shims();
var baseIsMatch = require_baseIsMatch(), getMatchData = require_getMatchData(), matchesStrictComparable = require_matchesStrictComparable();
function baseMatches(source) {
var matchData = getMatchData(source);
return matchData.length == 1 && matchData[0][2] ? matchesStrictComparable(matchData[0][0], matchData[0][1]) : function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
module.exports = baseMatches;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isSymbol.js
var require_isSymbol = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isSymbol.js"(exports, module) {
init_cjs_shims();
var baseGetTag = require_baseGetTag(), isObjectLike = require_isObjectLike(), symbolTag = "[object Symbol]";
function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
}
module.exports = isSymbol;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isKey.js
var require_isKey = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isKey.js"(exports, module) {
init_cjs_shims();
var isArray = require_isArray(), isSymbol = require_isSymbol(), reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
function isKey(value, object) {
if (isArray(value))
return !1;
var type = typeof value;
return type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value) ? !0 : reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
module.exports = isKey;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/memoize.js
var require_memoize = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/memoize.js"(exports, module) {
init_cjs_shims();
var MapCache = require_MapCache(), FUNC_ERROR_TEXT = "Expected a function";
function memoize(func, resolver) {
if (typeof func != "function" || resolver != null && typeof resolver != "function")
throw new TypeError(FUNC_ERROR_TEXT);
var memoized = function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key))
return cache.get(key);
var result = func.apply(this, args);
return memoized.cache = cache.set(key, result) || cache, result;
};
return memoized.cache = new (memoize.Cache || MapCache)(), memoized;
}
memoize.Cache = MapCache;
module.exports = memoize;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_memoizeCapped.js
var require_memoizeCapped = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_memoizeCapped.js"(exports, module) {
init_cjs_shims();
var memoize = require_memoize(), MAX_MEMOIZE_SIZE = 500;
function memoizeCapped(func) {
var result = memoize(func, function(key) {
return cache.size === MAX_MEMOIZE_SIZE && cache.clear(), key;
}), cache = result.cache;
return result;
}
module.exports = memoizeCapped;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stringToPath.js
var require_stringToPath = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_stringToPath.js"(exports, module) {
init_cjs_shims();
var memoizeCapped = require_memoizeCapped(), rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, reEscapeChar = /\\(\\)?/g, stringToPath = memoizeCapped(function(string) {
var result = [];
return string.charCodeAt(0) === 46 && result.push(""), string.replace(rePropName, function(match2, number, quote, subString) {
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match2);
}), result;
});
module.exports = stringToPath;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayMap.js
var require_arrayMap = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayMap.js"(exports, module) {
init_cjs_shims();
function arrayMap(array, iteratee) {
for (var index = -1, length = array == null ? 0 : array.length, result = Array(length); ++index < length; )
result[index] = iteratee(array[index], index, array);
return result;
}
module.exports = arrayMap;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseToString.js
var require_baseToString = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseToString.js"(exports, module) {
init_cjs_shims();
var Symbol2 = require_Symbol(), arrayMap = require_arrayMap(), isArray = require_isArray(), isSymbol = require_isSymbol(), INFINITY = 1 / 0, symbolProto = Symbol2 ? Symbol2.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
function baseToString(value) {
if (typeof value == "string")
return value;
if (isArray(value))
return arrayMap(value, baseToString) + "";
if (isSymbol(value))
return symbolToString ? symbolToString.call(value) : "";
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
module.exports = baseToString;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toString.js
var require_toString = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toString.js"(exports, module) {
init_cjs_shims();
var baseToString = require_baseToString();
function toString(value) {
return value == null ? "" : baseToString(value);
}
module.exports = toString;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_castPath.js
var require_castPath = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_castPath.js"(exports, module) {
init_cjs_shims();
var isArray = require_isArray(), isKey = require_isKey(), stringToPath = require_stringToPath(), toString = require_toString();
function castPath(value, object) {
return isArray(value) ? value : isKey(value, object) ? [value] : stringToPath(toString(value));
}
module.exports = castPath;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_toKey.js
var require_toKey = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_toKey.js"(exports, module) {
init_cjs_shims();
var isSymbol = require_isSymbol(), INFINITY = 1 / 0;
function toKey(value) {
if (typeof value == "string" || isSymbol(value))
return value;
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
module.exports = toKey;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGet.js
var require_baseGet = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGet.js"(exports, module) {
init_cjs_shims();
var castPath = require_castPath(), toKey = require_toKey();
function baseGet(object, path4) {
path4 = castPath(path4, object);
for (var index = 0, length = path4.length; object != null && index < length; )
object = object[toKey(path4[index++])];
return index && index == length ? object : void 0;
}
module.exports = baseGet;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/get.js
var require_get = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/get.js"(exports, module) {
init_cjs_shims();
var baseGet = require_baseGet();
function get(object, path4, defaultValue) {
var result = object == null ? void 0 : baseGet(object, path4);
return result === void 0 ? defaultValue : result;
}
module.exports = get;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseHasIn.js
var require_baseHasIn = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseHasIn.js"(exports, module) {
init_cjs_shims();
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
module.exports = baseHasIn;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hasPath.js
var require_hasPath = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_hasPath.js"(exports, module) {
init_cjs_shims();
var castPath = require_castPath(), isArguments = require_isArguments(), isArray = require_isArray(), isIndex = require_isIndex(), isLength = require_isLength(), toKey = require_toKey();
function hasPath(object, path4, hasFunc) {
path4 = castPath(path4, object);
for (var index = -1, length = path4.length, result = !1; ++index < length; ) {
var key = toKey(path4[index]);
if (!(result = object != null && hasFunc(object, key)))
break;
object = object[key];
}
return result || ++index != length ? result : (length = object == null ? 0 : object.length, !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)));
}
module.exports = hasPath;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/hasIn.js
var require_hasIn = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/hasIn.js"(exports, module) {
init_cjs_shims();
var baseHasIn = require_baseHasIn(), hasPath = require_hasPath();
function hasIn(object, path4) {
return object != null && hasPath(object, path4, baseHasIn);
}
module.exports = hasIn;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseMatchesProperty.js
var require_baseMatchesProperty = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseMatchesProperty.js"(exports, module) {
init_cjs_shims();
var baseIsEqual = require_baseIsEqual(), get = require_get(), hasIn = require_hasIn(), isKey = require_isKey(), isStrictComparable = require_isStrictComparable(), matchesStrictComparable = require_matchesStrictComparable(), toKey = require_toKey(), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
function baseMatchesProperty(path4, srcValue) {
return isKey(path4) && isStrictComparable(srcValue) ? matchesStrictComparable(toKey(path4), srcValue) : function(object) {
var objValue = get(object, path4);
return objValue === void 0 && objValue === srcValue ? hasIn(object, path4) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
};
}
module.exports = baseMatchesProperty;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/identity.js
var require_identity = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/identity.js"(exports, module) {
init_cjs_shims();
function identity(value) {
return value;
}
module.exports = identity;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseProperty.js
var require_baseProperty = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseProperty.js"(exports, module) {
init_cjs_shims();
function baseProperty(key) {
return function(object) {
return object?.[key];
};
}
module.exports = baseProperty;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_basePropertyDeep.js
var require_basePropertyDeep = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_basePropertyDeep.js"(exports, module) {
init_cjs_shims();
var baseGet = require_baseGet();
function basePropertyDeep(path4) {
return function(object) {
return baseGet(object, path4);
};
}
module.exports = basePropertyDeep;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/property.js
var require_property = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/property.js"(exports, module) {
init_cjs_shims();
var baseProperty = require_baseProperty(), basePropertyDeep = require_basePropertyDeep(), isKey = require_isKey(), toKey = require_toKey();
function property(path4) {
return isKey(path4) ? baseProperty(toKey(path4)) : basePropertyDeep(path4);
}
module.exports = property;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIteratee.js
var require_baseIteratee = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIteratee.js"(exports, module) {
init_cjs_shims();
var baseMatches = require_baseMatches(), baseMatchesProperty = require_baseMatchesProperty(), identity = require_identity(), isArray = require_isArray(), property = require_property();
function baseIteratee(value) {
return typeof value == "function" ? value : value == null ? identity : typeof value == "object" ? isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value) : property(value);
}
module.exports = baseIteratee;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseFindIndex.js
var require_baseFindIndex = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseFindIndex.js"(exports, module) {
init_cjs_shims();
function baseFindIndex(array, predicate, fromIndex, fromRight) {
for (var length = array.length, index = fromIndex + (fromRight ? 1 : -1); fromRight ? index-- : ++index < length; )
if (predicate(array[index], index, array))
return index;
return -1;
}
module.exports = baseFindIndex;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsNaN.js
var require_baseIsNaN = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIsNaN.js"(exports, module) {
init_cjs_shims();
function baseIsNaN(value) {
return value !== value;
}
module.exports = baseIsNaN;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_strictIndexOf.js
var require_strictIndexOf = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_strictIndexOf.js"(exports, module) {
init_cjs_shims();
function strictIndexOf(array, value, fromIndex) {
for (var index = fromIndex - 1, length = array.length; ++index < length; )
if (array[index] === value)
return index;
return -1;
}
module.exports = strictIndexOf;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIndexOf.js
var require_baseIndexOf = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseIndexOf.js"(exports, module) {
init_cjs_shims();
var baseFindIndex = require_baseFindIndex(), baseIsNaN = require_baseIsNaN(), strictIndexOf = require_strictIndexOf();
function baseIndexOf(array, value, fromIndex) {
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
}
module.exports = baseIndexOf;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayIncludes.js
var require_arrayIncludes = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayIncludes.js"(exports, module) {
init_cjs_shims();
var baseIndexOf = require_baseIndexOf();
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && baseIndexOf(array, value, 0) > -1;
}
module.exports = arrayIncludes;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayIncludesWith.js
var require_arrayIncludesWith = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_arrayIncludesWith.js"(exports, module) {
init_cjs_shims();
function arrayIncludesWith(array, value, comparator) {
for (var index = -1, length = array == null ? 0 : array.length; ++index < length; )
if (comparator(value, array[index]))
return !0;
return !1;
}
module.exports = arrayIncludesWith;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/noop.js
var require_noop = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/noop.js"(exports, module) {
init_cjs_shims();
function noop() {
}
module.exports = noop;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_createSet.js
var require_createSet = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_createSet.js"(exports, module) {
init_cjs_shims();
var Set2 = require_Set(), noop = require_noop(), setToArray = require_setToArray(), INFINITY = 1 / 0, createSet = Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY ? function(values) {
return new Set2(values);
} : noop;
module.exports = createSet;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseUniq.js
var require_baseUniq = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseUniq.js"(exports, module) {
init_cjs_shims();
var SetCache = require_SetCache(), arrayIncludes = require_arrayIncludes(), arrayIncludesWith = require_arrayIncludesWith(), cacheHas = require_cacheHas(), createSet = require_createSet(), setToArray = require_setToArray(), LARGE_ARRAY_SIZE = 200;
function baseUniq(array, iteratee, comparator) {
var index = -1, includes = arrayIncludes, length = array.length, isCommon = !0, result = [], seen = result;
if (comparator)
isCommon = !1, includes = arrayIncludesWith;
else if (length >= LARGE_ARRAY_SIZE) {
var set = iteratee ? null : createSet(array);
if (set)
return setToArray(set);
isCommon = !1, includes = cacheHas, seen = new SetCache();
} else
seen = iteratee ? [] : result;
outer:
for (; ++index < length; ) {
var value = array[index], computed = iteratee ? iteratee(value) : value;
if (value = comparator || value !== 0 ? value : 0, isCommon && computed === computed) {
for (var seenIndex = seen.length; seenIndex--; )
if (seen[seenIndex] === computed)
continue outer;
iteratee && seen.push(computed), result.push(value);
} else includes(seen, computed, comparator) || (seen !== result && seen.push(computed), result.push(value));
}
return result;
}
module.exports = baseUniq;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/uniqBy.js
var require_uniqBy = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/uniqBy.js"(exports, module) {
init_cjs_shims();
var baseIteratee = require_baseIteratee(), baseUniq = require_baseUniq();
function uniqBy2(array, iteratee) {
return array && array.length ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
}
module.exports = uniqBy2;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseDifference.js
var require_baseDifference = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseDifference.js"(exports, module) {
init_cjs_shims();
var SetCache = require_SetCache(), arrayIncludes = require_arrayIncludes(), arrayIncludesWith = require_arrayIncludesWith(), arrayMap = require_arrayMap(), baseUnary = require_baseUnary(), cacheHas = require_cacheHas(), LARGE_ARRAY_SIZE = 200;
function baseDifference(array, values, iteratee, comparator) {
var index = -1, includes = arrayIncludes, isCommon = !0, length = array.length, result = [], valuesLength = values.length;
if (!length)
return result;
iteratee && (values = arrayMap(values, baseUnary(iteratee))), comparator ? (includes = arrayIncludesWith, isCommon = !1) : values.length >= LARGE_ARRAY_SIZE && (includes = cacheHas, isCommon = !1, values = new SetCache(values));
outer:
for (; ++index < length; ) {
var value = array[index], computed = iteratee == null ? value : iteratee(value);
if (value = comparator || value !== 0 ? value : 0, isCommon && computed === computed) {
for (var valuesIndex = valuesLength; valuesIndex--; )
if (values[valuesIndex] === computed)
continue outer;
result.push(value);
} else includes(values, computed, comparator) || result.push(value);
}
return result;
}
module.exports = baseDifference;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isFlattenable.js
var require_isFlattenable = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_isFlattenable.js"(exports, module) {
init_cjs_shims();
var Symbol2 = require_Symbol(), isArguments = require_isArguments(), isArray = require_isArray(), spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0;
function isFlattenable(value) {
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
}
module.exports = isFlattenable;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseFlatten.js
var require_baseFlatten = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseFlatten.js"(exports, module) {
init_cjs_shims();
var arrayPush = require_arrayPush(), isFlattenable = require_isFlattenable();
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1, length = array.length;
for (predicate || (predicate = isFlattenable), result || (result = []); ++index < length; ) {
var value = array[index];
depth > 0 && predicate(value) ? depth > 1 ? baseFlatten(value, depth - 1, predicate, isStrict, result) : arrayPush(result, value) : isStrict || (result[result.length] = value);
}
return result;
}
module.exports = baseFlatten;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_apply.js
var require_apply = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_apply.js"(exports, module) {
init_cjs_shims();
function apply(func, thisArg, args) {
switch (args.length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
module.exports = apply;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_overRest.js
var require_overRest = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_overRest.js"(exports, module) {
init_cjs_shims();
var apply = require_apply(), nativeMax = Math.max;
function overRest(func, start, transform) {
return start = nativeMax(start === void 0 ? func.length - 1 : start, 0), function() {
for (var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); ++index < length; )
array[index] = args[start + index];
index = -1;
for (var otherArgs = Array(start + 1); ++index < start; )
otherArgs[index] = args[index];
return otherArgs[start] = transform(array), apply(func, this, otherArgs);
};
}
module.exports = overRest;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/constant.js
var require_constant = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/constant.js"(exports, module) {
init_cjs_shims();
function constant(value) {
return function() {
return value;
};
}
module.exports = constant;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_defineProperty.js
var require_defineProperty = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_defineProperty.js"(exports, module) {
init_cjs_shims();
var getNative = require_getNative(), defineProperty = (function() {
try {
var func = getNative(Object, "defineProperty");
return func({}, "", {}), func;
} catch {
}
})();
module.exports = defineProperty;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseSetToString.js
var require_baseSetToString = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseSetToString.js"(exports, module) {
init_cjs_shims();
var constant = require_constant(), defineProperty = require_defineProperty(), identity = require_identity(), baseSetToString = defineProperty ? function(func, string) {
return defineProperty(func, "toString", {
configurable: !0,
enumerable: !1,
value: constant(string),
writable: !0
});
} : identity;
module.exports = baseSetToString;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_shortOut.js
var require_shortOut = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_shortOut.js"(exports, module) {
init_cjs_shims();
var HOT_COUNT = 800, HOT_SPAN = 16, nativeNow = Date.now;
function shortOut(func) {
var count = 0, lastCalled = 0;
return function() {
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
if (lastCalled = stamp, remaining > 0) {
if (++count >= HOT_COUNT)
return arguments[0];
} else
count = 0;
return func.apply(void 0, arguments);
};
}
module.exports = shortOut;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setToString.js
var require_setToString = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_setToString.js"(exports, module) {
init_cjs_shims();
var baseSetToString = require_baseSetToString(), shortOut = require_shortOut(), setToString = shortOut(baseSetToString);
module.exports = setToString;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseRest.js
var require_baseRest = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseRest.js"(exports, module) {
init_cjs_shims();
var identity = require_identity(), overRest = require_overRest(), setToString = require_setToString();
function baseRest(func, start) {
return setToString(overRest(func, start, identity), func + "");
}
module.exports = baseRest;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArrayLikeObject.js
var require_isArrayLikeObject = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isArrayLikeObject.js"(exports, module) {
init_cjs_shims();
var isArrayLike = require_isArrayLike(), isObjectLike = require_isObjectLike();
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
module.exports = isArrayLikeObject;
}
});
// ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/difference.js
var require_difference = __commonJS({
"../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/difference.js"(exports, module) {
init_cjs_shims();
var baseDifference = require_baseDifference(), baseFlatten = require_baseFlatten(), baseRest = require_baseRest(), isArrayLikeObject = require_isArrayLikeObject(), difference = baseRest(function(array, values) {
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, !0)) : [];
});
module.exports = difference;
}
});
// ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
var tslib_es6_exports = {};
__export(tslib_es6_exports, {
__addDisposableResource: () => __addDisposableResource,
__assign: () => __assign,
__asyncDelegator: () => __asyncDelegator,
__asyncGenerator: () => __asyncGenerator,
__asyncValues: () => __asyncValues,
__await: () => __await,
__awaiter: () => __awaiter,
__classPrivateFieldGet: () => __classPrivateFieldGet,
__classPrivateFieldIn: () => __classPrivateFieldIn,
__classPrivateFieldSet: () => __classPrivateFieldSet,
__createBinding: () => __createBinding,
__decorate: () => __decorate,
__disposeResources: () => __disposeResources,
__esDecorate: () => __esDecorate,
__exportStar: () => __exportStar,
__extends: () => __extends,
__generator: () => __generator,
__importDefault: () => __importDefault,
__importStar: () => __importStar,
__makeTemplateObject: () => __makeTemplateObject,
__metadata: () => __metadata,
__param: () => __param,
__propKey: () => __propKey,
__read: () => __read,
__rest: () => __rest,
__rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,
__runInitializers: () => __runInitializers,
__setFunctionName: () => __setFunctionName,
__spread: () => __spread,
__spreadArray: () => __spreadArray,
__spreadArrays: () => __spreadArrays,
__values: () => __values,
default: () => tslib_es6_default
});
function __extends(d, b) {
if (typeof b != "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __rest(s, e) {
var t = {};
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
if (s != null && typeof Object.getOwnPropertySymbols == "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function(target, key) {
decorator(target, key, paramIndex);
};
}
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) {
if (f !== void 0 && typeof f != "function") throw new TypeError("Function expected");
return f;
}
for (var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value", target = !descriptorIn && ctor ? contextIn.static ? ctor : ctor.prototype : null, descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}), _, done = !1, i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
context.addInitializer = function(f) {
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
extraInitializers.push(accept(f || null));
};
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0) continue;
if (result === null || typeof result != "object") throw new TypeError("Object expected");
(_ = accept(result.get)) && (descriptor.get = _), (_ = accept(result.set)) && (descriptor.set = _), (_ = accept(result.init)) && initializers.unshift(_);
} else (_ = accept(result)) && (kind === "field" ? initializers.unshift(_) : descriptor[key] = _);
}
target && Object.defineProperty(target, contextIn.name, descriptor), done = !0;
}
function __runInitializers(thisArg, initializers, value) {
for (var useValue = arguments.length > 2, i = 0; i < initializers.length; i++)
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
return useValue ? value : void 0;
}
function __propKey(x) {
return typeof x == "symbol" ? x : "".concat(x);
}
function __setFunctionName(f, name, prefix) {
return typeof name == "symbol" && (name = name.description ? "[".concat(name.description, "]") : ""), Object.defineProperty(f, "name", { configurable: !0, value: prefix ? "".concat(prefix, " ", name) : name });
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() {
if (t[0] & 1) throw t[1];
return t[1];
}, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
return g.next = verb(0), g.throw = verb(1), g.return = verb(2), typeof Symbol == "function" && (g[Symbol.iterator] = 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.");
for (; 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;
switch (y = 0, t && (op = [op[0] & 2, t.value]), op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
return _.label++, { value: op[1], done: !1 };
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;
}
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: !0 };
}
}
function __exportStar(m, o) {
for (var p in m) p !== "default" && !Object.prototype.hasOwnProperty.call(o, p) && __createBinding(o, m, p);
}
function __values(o) {
var s = typeof Symbol == "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length == "number") return {
next: function() {
return o && i >= o.length && (o = void 0), { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol == "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
for (; (n === void 0 || n-- > 0) && !(r = i.next()).done; ) ar.push(r.value);
} catch (error) {
e = { error };
} finally {
try {
r && !r.done && (m = i.return) && m.call(i);
} finally {
if (e) throw e.error;
}
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++)
(ar || !(i in from)) && (ar || (ar = Array.prototype.slice.call(from, 0, i)), ar[i] = from[i]);
return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
return this;
}, i;
function awaitReturn(f) {
return function(v) {
return Promise.resolve(v).then(f, reject);
};
}
function verb(n, f) {
g[n] && (i[n] = function(v) {
return new Promise(function(a, b) {
q.push([n, v, a, b]) > 1 || resume(n, v);
});
}, f && (i[n] = f(i[n])));
}
function resume(n, v) {
try {
step(g[n](v));
} catch (e) {
settle(q[0][3], e);
}
}
function step(r) {
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
}
function fulfill(value) {
resume("next", value);
}
function reject(value) {
resume("throw", value);
}
function settle(f, v) {
f(v), q.shift(), q.length && resume(q[0][0], q[0][1]);
}
}
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function(e) {
throw e;
}), verb("return"), i[Symbol.iterator] = function() {
return this;
}, i;
function verb(n, f) {
i[n] = o[n] ? function(v) {
return (p = !p) ? { value: __await(o[n](v)), done: !1 } : f ? f(v) : v;
} : f;
}
}
function __asyncValues(o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values == "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
return this;
}, i);
function verb(n) {
i[n] = o[n] && function(v) {
return new Promise(function(resolve, reject) {
v = o[n](v), settle(resolve, reject, v.done, v.value);
});
};
}
function settle(resolve, reject, d, v) {
Promise.resolve(v).then(function(v2) {
resolve({ value: v2, done: d });
}, reject);
}
}
function __makeTemplateObject(cooked, raw) {
return Object.defineProperty ? Object.defineProperty(cooked, "raw", { value: raw }) : cooked.raw = raw, cooked;
}
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) k[i] !== "default" && __createBinding(result, mod, k[i]);
return __setModuleDefault(result, mod), result;
}
function __importDefault(mod) {
return mod && mod.__esModule ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state == "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state == "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
}
function __classPrivateFieldIn(state, receiver) {
if (receiver === null || typeof receiver != "object" && typeof receiver != "function") throw new TypeError("Cannot use 'in' operator on non-object");
return typeof state == "function" ? receiver === state : state.has(receiver);
}
function __addDisposableResource(env2, value, async) {
if (value != null) {
if (typeof value != "object" && typeof value != "function") throw new TypeError("Object expected.");
var dispose, inner;
if (async) {
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
dispose = value[Symbol.asyncDispose];
}
if (dispose === void 0) {
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
dispose = value[Symbol.dispose], async && (inner = dispose);
}
if (typeof dispose != "function") throw new TypeError("Object not disposable.");
inner && (dispose = function() {
try {
inner.call(this);
} catch (e) {
return Promise.reject(e);
}
}), env2.stack.push({ value, dispose, async });
} else async && env2.stack.push({ async: !0 });
return value;
}
function __disposeResources(env2) {
function fail(e) {
env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e, env2.hasError = !0;
}
var r, s = 0;
function next() {
for (; r = env2.stack.pop(); )
try {
if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
if (r.dispose) {
var result = r.dispose.call(r.value);
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
return fail(e), next();
});
} else s |= 1;
} catch (e) {
fail(e);
}
if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
if (env2.hasError) throw env2.error;
}
return next();
}
function __rewriteRelativeImportExtension(path4, preserveJsx) {
return typeof path4 == "string" && /^\.\.?\//.test(path4) ? path4.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext2, cm) {
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext2 || !cm) ? m : d + ext2 + "." + cm.toLowerCase() + "js";
}) : path4;
}
var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default, init_tslib_es6 = __esm({
"../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs"() {
init_cjs_shims();
extendStatics = function(d, b) {
return extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
d2.__proto__ = b2;
} || function(d2, b2) {
for (var p in b2) Object.prototype.hasOwnProperty.call(b2, p) && (d2[p] = b2[p]);
}, extendStatics(d, b);
};
__assign = function() {
return __assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
}
return t;
}, __assign.apply(this, arguments);
};
__createBinding = Object.create ? (function(o, m, k, k2) {
k2 === void 0 && (k2 = k);
var desc = Object.getOwnPropertyDescriptor(m, k);
(!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { enumerable: !0, get: function() {
return m[k];
} }), Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
k2 === void 0 && (k2 = k), o[k2] = m[k];
});
__setModuleDefault = Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: !0, value: v });
}) : function(o, v) {
o.default = v;
}, ownKeys = function(o) {
return ownKeys = Object.getOwnPropertyNames || function(o2) {
var ar = [];
for (var k in o2) Object.prototype.hasOwnProperty.call(o2, k) && (ar[ar.length] = k);
return ar;
}, ownKeys(o);
};
_SuppressedError = typeof SuppressedError == "function" ? SuppressedError : function(error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
tslib_es6_default = {
__extends,
__assign,
__rest,
__decorate,
__param,
__esDecorate,
__runInitializers,
__propKey,
__setFunctionName,
__metadata,
__awaiter,
__generator,
__createBinding,
__exportStar,
__values,
__read,
__spread,
__spreadArrays,
__spreadArray,
__await,
__asyncGenerator,
__asyncDelegator,
__asyncValues,
__makeTemplateObject,
__importStar,
__importDefault,
__classPrivateFieldGet,
__classPrivateFieldSet,
__classPrivateFieldIn,
__addDisposableResource,
__disposeResources,
__rewriteRelativeImportExtension
};
}
});
// ../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist/index.js
var require_dist = __commonJS({
"../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.lowerCase = exports.localeLowerCase = void 0;
var SUPPORTED_LOCALE = {
tr: {
regexp: /\u0130|\u0049|\u0049\u0307/g,
map: {
\u0130: "i",
I: "\u0131",
I\u0307: "i"
}
},
az: {
regexp: /\u0130/g,
map: {
\u0130: "i",
I: "\u0131",
I\u0307: "i"
}
},
lt: {
regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
map: {
I: "i\u0307",
J: "j\u0307",
\u012E: "\u012F\u0307",
\u00CC: "i\u0307\u0300",
\u00CD: "i\u0307\u0301",
\u0128: "i\u0307\u0303"
}
}
};
function localeLowerCase(str, locale) {
var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
return lowerCase(lang ? str.replace(lang.regexp, function(m) {
return lang.map[m];
}) : str);
}
exports.localeLowerCase = localeLowerCase;
function lowerCase(str) {
return str.toLowerCase();
}
exports.lowerCase = lowerCase;
}
});
// ../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist/index.js
var require_dist2 = __commonJS({
"../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.noCase = void 0;
var lower_case_1 = require_dist(), DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
function noCase(input, options) {
options === void 0 && (options = {});
for (var _a2 = options.splitRegexp, splitRegexp = _a2 === void 0 ? DEFAULT_SPLIT_REGEXP : _a2, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lower_case_1.lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d, result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0"), start = 0, end = result.length; result.charAt(start) === "\0"; )
start++;
for (; result.charAt(end - 1) === "\0"; )
end--;
return result.slice(start, end).split("\0").map(transform).join(delimiter);
}
exports.noCase = noCase;
function replace(input, re, value) {
return re instanceof RegExp ? input.replace(re, value) : re.reduce(function(input2, re2) {
return input2.replace(re2, value);
}, input);
}
}
});
// ../../node_modules/.pnpm/pascal-case@3.1.2/node_modules/pascal-case/dist/index.js
var require_dist3 = __commonJS({
"../../node_modules/.pnpm/pascal-case@3.1.2/node_modules/pascal-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.pascalCase = exports.pascalCaseTransformMerge = exports.pascalCaseTransform = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), no_case_1 = require_dist2();
function pascalCaseTransform(input, index) {
var firstChar = input.charAt(0), lowerChars = input.substr(1).toLowerCase();
return index > 0 && firstChar >= "0" && firstChar <= "9" ? "_" + firstChar + lowerChars : "" + firstChar.toUpperCase() + lowerChars;
}
exports.pascalCaseTransform = pascalCaseTransform;
function pascalCaseTransformMerge(input) {
return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
}
exports.pascalCaseTransformMerge = pascalCaseTransformMerge;
function pascalCase2(input, options) {
return options === void 0 && (options = {}), no_case_1.noCase(input, tslib_1.__assign({ delimiter: "", transform: pascalCaseTransform }, options));
}
exports.pascalCase = pascalCase2;
}
});
// ../../node_modules/.pnpm/camel-case@4.1.2/node_modules/camel-case/dist/index.js
var require_dist4 = __commonJS({
"../../node_modules/.pnpm/camel-case@4.1.2/node_modules/camel-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.camelCase = exports.camelCaseTransformMerge = exports.camelCaseTransform = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), pascal_case_1 = require_dist3();
function camelCaseTransform(input, index) {
return index === 0 ? input.toLowerCase() : pascal_case_1.pascalCaseTransform(input, index);
}
exports.camelCaseTransform = camelCaseTransform;
function camelCaseTransformMerge(input, index) {
return index === 0 ? input.toLowerCase() : pascal_case_1.pascalCaseTransformMerge(input);
}
exports.camelCaseTransformMerge = camelCaseTransformMerge;
function camelCase2(input, options) {
return options === void 0 && (options = {}), pascal_case_1.pascalCase(input, tslib_1.__assign({ transform: camelCaseTransform }, options));
}
exports.camelCase = camelCase2;
}
});
// ../../node_modules/.pnpm/upper-case-first@2.0.2/node_modules/upper-case-first/dist/index.js
var require_dist5 = __commonJS({
"../../node_modules/.pnpm/upper-case-first@2.0.2/node_modules/upper-case-first/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.upperCaseFirst = void 0;
function upperCaseFirst(input) {
return input.charAt(0).toUpperCase() + input.substr(1);
}
exports.upperCaseFirst = upperCaseFirst;
}
});
// ../../node_modules/.pnpm/capital-case@1.0.4/node_modules/capital-case/dist/index.js
var require_dist6 = __commonJS({
"../../node_modules/.pnpm/capital-case@1.0.4/node_modules/capital-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.capitalCase = exports.capitalCaseTransform = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), no_case_1 = require_dist2(), upper_case_first_1 = require_dist5();
function capitalCaseTransform(input) {
return upper_case_first_1.upperCaseFirst(input.toLowerCase());
}
exports.capitalCaseTransform = capitalCaseTransform;
function capitalCase2(input, options) {
return options === void 0 && (options = {}), no_case_1.noCase(input, tslib_1.__assign({ delimiter: " ", transform: capitalCaseTransform }, options));
}
exports.capitalCase = capitalCase2;
}
});
// ../../node_modules/.pnpm/upper-case@2.0.2/node_modules/upper-case/dist/index.js
var require_dist7 = __commonJS({
"../../node_modules/.pnpm/upper-case@2.0.2/node_modules/upper-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.upperCase = exports.localeUpperCase = void 0;
var SUPPORTED_LOCALE = {
tr: {
regexp: /[\u0069]/g,
map: {
i: "\u0130"
}
},
az: {
regexp: /[\u0069]/g,
map: {
i: "\u0130"
}
},
lt: {
regexp: /[\u0069\u006A\u012F]\u0307|\u0069\u0307[\u0300\u0301\u0303]/g,
map: {
i\u0307: "I",
j\u0307: "J",
\u012F\u0307: "\u012E",
i\u0307\u0300: "\xCC",
i\u0307\u0301: "\xCD",
i\u0307\u0303: "\u0128"
}
}
};
function localeUpperCase(str, locale) {
var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
return upperCase(lang ? str.replace(lang.regexp, function(m) {
return lang.map[m];
}) : str);
}
exports.localeUpperCase = localeUpperCase;
function upperCase(str) {
return str.toUpperCase();
}
exports.upperCase = upperCase;
}
});
// ../../node_modules/.pnpm/constant-case@3.0.4/node_modules/constant-case/dist/index.js
var require_dist8 = __commonJS({
"../../node_modules/.pnpm/constant-case@3.0.4/node_modules/constant-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.constantCase = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), no_case_1 = require_dist2(), upper_case_1 = require_dist7();
function constantCase2(input, options) {
return options === void 0 && (options = {}), no_case_1.noCase(input, tslib_1.__assign({ delimiter: "_", transform: upper_case_1.upperCase }, options));
}
exports.constantCase = constantCase2;
}
});
// ../../node_modules/.pnpm/dot-case@3.0.4/node_modules/dot-case/dist/index.js
var require_dist9 = __commonJS({
"../../node_modules/.pnpm/dot-case@3.0.4/node_modules/dot-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.dotCase = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), no_case_1 = require_dist2();
function dotCase(input, options) {
return options === void 0 && (options = {}), no_case_1.noCase(input, tslib_1.__assign({ delimiter: "." }, options));
}
exports.dotCase = dotCase;
}
});
// ../../node_modules/.pnpm/header-case@2.0.4/node_modules/header-case/dist/index.js
var require_dist10 = __commonJS({
"../../node_modules/.pnpm/header-case@2.0.4/node_modules/header-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.headerCase = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), capital_case_1 = require_dist6();
function headerCase(input, options) {
return options === void 0 && (options = {}), capital_case_1.capitalCase(input, tslib_1.__assign({ delimiter: "-" }, options));
}
exports.headerCase = headerCase;
}
});
// ../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist/index.js
var require_dist11 = __commonJS({
"../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.paramCase = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), dot_case_1 = require_dist9();
function paramCase2(input, options) {
return options === void 0 && (options = {}), dot_case_1.dotCase(input, tslib_1.__assign({ delimiter: "-" }, options));
}
exports.paramCase = paramCase2;
}
});
// ../../node_modules/.pnpm/path-case@3.0.4/node_modules/path-case/dist/index.js
var require_dist12 = __commonJS({
"../../node_modules/.pnpm/path-case@3.0.4/node_modules/path-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.pathCase = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), dot_case_1 = require_dist9();
function pathCase(input, options) {
return options === void 0 && (options = {}), dot_case_1.dotCase(input, tslib_1.__assign({ delimiter: "/" }, options));
}
exports.pathCase = pathCase;
}
});
// ../../node_modules/.pnpm/sentence-case@3.0.4/node_modules/sentence-case/dist/index.js
var require_dist13 = __commonJS({
"../../node_modules/.pnpm/sentence-case@3.0.4/node_modules/sentence-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.sentenceCase = exports.sentenceCaseTransform = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), no_case_1 = require_dist2(), upper_case_first_1 = require_dist5();
function sentenceCaseTransform(input, index) {
var result = input.toLowerCase();
return index === 0 ? upper_case_first_1.upperCaseFirst(result) : result;
}
exports.sentenceCaseTransform = sentenceCaseTransform;
function sentenceCase(input, options) {
return options === void 0 && (options = {}), no_case_1.noCase(input, tslib_1.__assign({ delimiter: " ", transform: sentenceCaseTransform }, options));
}
exports.sentenceCase = sentenceCase;
}
});
// ../../node_modules/.pnpm/snake-case@3.0.4/node_modules/snake-case/dist/index.js
var require_dist14 = __commonJS({
"../../node_modules/.pnpm/snake-case@3.0.4/node_modules/snake-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
exports.snakeCase = void 0;
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)), dot_case_1 = require_dist9();
function snakeCase2(input, options) {
return options === void 0 && (options = {}), dot_case_1.dotCase(input, tslib_1.__assign({ delimiter: "_" }, options));
}
exports.snakeCase = snakeCase2;
}
});
// ../../node_modules/.pnpm/change-case@4.1.2/node_modules/change-case/dist/index.js
var require_dist15 = __commonJS({
"../../node_modules/.pnpm/change-case@4.1.2/node_modules/change-case/dist/index.js"(exports) {
"use strict";
init_cjs_shims();
Object.defineProperty(exports, "__esModule", { value: !0 });
var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
tslib_1.__exportStar(require_dist4(), exports);
tslib_1.__exportStar(require_dist6(), exports);
tslib_1.__exportStar(require_dist8(), exports);
tslib_1.__exportStar(require_dist9(), exports);
tslib_1.__exportStar(require_dist10(), exports);
tslib_1.__exportStar(require_dist2(), exports);
tslib_1.__exportStar(require_dist11(), exports);
tslib_1.__exportStar(require_dist3(), exports);
tslib_1.__exportStar(require_dist12(), exports);
tslib_1.__exportStar(require_dist13(), exports);
tslib_1.__exportStar(require_dist14(), exports);
}
});
// ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
var require_universalify = __commonJS({
"../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
"use strict";
init_cjs_shims();
exports.fromCallback = function(fn) {
return Object.defineProperty(function(...args) {
if (typeof args[args.length - 1] == "function") fn.apply(this, args);
else
return new Promise((resolve, reject) => {
args.push((err, res) => err != null ? reject(err) : resolve(res)), fn.apply(this, args);
});
}, "name", { value: fn.name });
};
exports.fromPromise = function(fn) {
return Object.defineProperty(function(...args) {
let cb = args[args.length - 1];
if (typeof cb != "function") return fn.apply(this, args);
args.pop(), fn.apply(this, args).then((r) => cb(null, r), cb);
}, "name", { value: fn.name });
};
}
});
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
var require_polyfills = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module) {
init_cjs_shims();
var constants = __require("constants"), origCwd = process.cwd, cwd2 = null, platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
process.cwd = function() {
return cwd2 || (cwd2 = origCwd.call(process)), cwd2;
};
try {
process.cwd();
} catch {
}
typeof process.chdir == "function" && (chdir = process.chdir, process.chdir = function(d) {
cwd2 = null, chdir.call(process, d);
}, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, chdir));
var chdir;
module.exports = patch;
function patch(fs2) {
constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && patchLchmod(fs2), fs2.lutimes || patchLutimes(fs2), fs2.chown = chownFix(fs2.chown), fs2.fchown = chownFix(fs2.fchown), fs2.lchown = chownFix(fs2.lchown), fs2.chmod = chmodFix(fs2.chmod), fs2.fchmod = chmodFix(fs2.fchmod), fs2.lchmod = chmodFix(fs2.lchmod), fs2.chownSync = chownFixSync(fs2.chownSync), fs2.fchownSync = chownFixSync(fs2.fchownSync), fs2.lchownSync = chownFixSync(fs2.lchownSync), fs2.chmodSync = chmodFixSync(fs2.chmodSync), fs2.fchmodSync = chmodFixSync(fs2.fchmodSync), fs2.lchmodSync = chmodFixSync(fs2.lchmodSync), fs2.stat = statFix(fs2.stat), fs2.fstat = statFix(fs2.fstat), fs2.lstat = statFix(fs2.lstat), fs2.statSync = statFixSync(fs2.statSync), fs2.fstatSync = statFixSync(fs2.fstatSync), fs2.lstatSync = statFixSync(fs2.lstatSync), fs2.chmod && !fs2.lchmod && (fs2.lchmod = function(path4, mode, cb) {
cb && process.nextTick(cb);
}, fs2.lchmodSync = function() {
}), fs2.chown && !fs2.lchown && (fs2.lchown = function(path4, uid, gid, cb) {
cb && process.nextTick(cb);
}, fs2.lchownSync = function() {
}), platform === "win32" && (fs2.rename = typeof fs2.rename != "function" ? fs2.rename : (function(fs$rename) {
function rename(from, to, cb) {
var start = Date.now(), backoff = 0;
fs$rename(from, to, function CB(er) {
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
setTimeout(function() {
fs2.stat(to, function(stater, st) {
stater && stater.code === "ENOENT" ? fs$rename(from, to, CB) : cb(er);
});
}, backoff), backoff < 100 && (backoff += 10);
return;
}
cb && cb(er);
});
}
return Object.setPrototypeOf && Object.setPrototypeOf(rename, fs$rename), rename;
})(fs2.rename)), fs2.read = typeof fs2.read != "function" ? fs2.read : (function(fs$read) {
function read(fd, buffer, offset, length, position, callback_) {
var callback;
if (callback_ && typeof callback_ == "function") {
var eagCounter = 0;
callback = function(er, _, __) {
if (er && er.code === "EAGAIN" && eagCounter < 10)
return eagCounter++, fs$read.call(fs2, fd, buffer, offset, length, position, callback);
callback_.apply(this, arguments);
};
}
return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
}
return Object.setPrototypeOf && Object.setPrototypeOf(read, fs$read), read;
})(fs2.read), fs2.readSync = typeof fs2.readSync != "function" ? fs2.readSync : /* @__PURE__ */ (function(fs$readSync) {
return function(fd, buffer, offset, length, position) {
for (var eagCounter = 0; ; )
try {
return fs$readSync.call(fs2, fd, buffer, offset, length, position);
} catch (er) {
if (er.code === "EAGAIN" && eagCounter < 10) {
eagCounter++;
continue;
}
throw er;
}
};
})(fs2.readSync);
function patchLchmod(fs3) {
fs3.lchmod = function(path4, mode, callback) {
fs3.open(
path4,
constants.O_WRONLY | constants.O_SYMLINK,
mode,
function(err, fd) {
if (err) {
callback && callback(err);
return;
}
fs3.fchmod(fd, mode, function(err2) {
fs3.close(fd, function(err22) {
callback && callback(err2 || err22);
});
});
}
);
}, fs3.lchmodSync = function(path4, mode) {
var fd = fs3.openSync(path4, constants.O_WRONLY | constants.O_SYMLINK, mode), threw = !0, ret;
try {
ret = fs3.fchmodSync(fd, mode), threw = !1;
} finally {
if (threw)
try {
fs3.closeSync(fd);
} catch {
}
else
fs3.closeSync(fd);
}
return ret;
};
}
function patchLutimes(fs3) {
constants.hasOwnProperty("O_SYMLINK") && fs3.futimes ? (fs3.lutimes = function(path4, at, mt, cb) {
fs3.open(path4, constants.O_SYMLINK, function(er, fd) {
if (er) {
cb && cb(er);
return;
}
fs3.futimes(fd, at, mt, function(er2) {
fs3.close(fd, function(er22) {
cb && cb(er2 || er22);
});
});
});
}, fs3.lutimesSync = function(path4, at, mt) {
var fd = fs3.openSync(path4, constants.O_SYMLINK), ret, threw = !0;
try {
ret = fs3.futimesSync(fd, at, mt), threw = !1;
} finally {
if (threw)
try {
fs3.closeSync(fd);
} catch {
}
else
fs3.closeSync(fd);
}
return ret;
}) : fs3.futimes && (fs3.lutimes = function(_a2, _b, _c, cb) {
cb && process.nextTick(cb);
}, fs3.lutimesSync = function() {
});
}
function chmodFix(orig) {
return orig && function(target, mode, cb) {
return orig.call(fs2, target, mode, function(er) {
chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
});
};
}
function chmodFixSync(orig) {
return orig && function(target, mode) {
try {
return orig.call(fs2, target, mode);
} catch (er) {
if (!chownErOk(er)) throw er;
}
};
}
function chownFix(orig) {
return orig && function(target, uid, gid, cb) {
return orig.call(fs2, target, uid, gid, function(er) {
chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
});
};
}
function chownFixSync(orig) {
return orig && function(target, uid, gid) {
try {
return orig.call(fs2, target, uid, gid);
} catch (er) {
if (!chownErOk(er)) throw er;
}
};
}
function statFix(orig) {
return orig && function(target, options, cb) {
typeof options == "function" && (cb = options, options = null);
function callback(er, stats) {
stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), cb && cb.apply(this, arguments);
}
return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback);
};
}
function statFixSync(orig) {
return orig && function(target, options) {
var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target);
return stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), stats;
};
}
function chownErOk(er) {
if (!er || er.code === "ENOSYS")
return !0;
var nonroot = !process.getuid || process.getuid() !== 0;
return !!(nonroot && (er.code === "EINVAL" || er.code === "EPERM"));
}
}
}
});
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
var require_legacy_streams = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module) {
init_cjs_shims();
var Stream = __require("stream").Stream;
module.exports = legacy;
function legacy(fs2) {
return {
ReadStream,
WriteStream
};
function ReadStream(path4, options) {
if (!(this instanceof ReadStream)) return new ReadStream(path4, options);
Stream.call(this);
var self2 = this;
this.path = path4, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, options = options || {};
for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
var key = keys[index];
this[key] = options[key];
}
if (this.encoding && this.setEncoding(this.encoding), this.start !== void 0) {
if (typeof this.start != "number")
throw TypeError("start must be a Number");
if (this.end === void 0)
this.end = 1 / 0;
else if (typeof this.end != "number")
throw TypeError("end must be a Number");
if (this.start > this.end)
throw new Error("start must be <= end");
this.pos = this.start;
}
if (this.fd !== null) {
process.nextTick(function() {
self2._read();
});
return;
}
fs2.open(this.path, this.flags, this.mode, function(err, fd) {
if (err) {
self2.emit("error", err), self2.readable = !1;
return;
}
self2.fd = fd, self2.emit("open", fd), self2._read();
});
}
function WriteStream(path4, options) {
if (!(this instanceof WriteStream)) return new WriteStream(path4, options);
Stream.call(this), this.path = path4, this.fd = null, this.writable = !0, this.flags = "w", this.encoding = "binary", this.mode = 438, this.bytesWritten = 0, options = options || {};
for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
var key = keys[index];
this[key] = options[key];
}
if (this.start !== void 0) {
if (typeof this.start != "number")
throw TypeError("start must be a Number");
if (this.start < 0)
throw new Error("start must be >= zero");
this.pos = this.start;
}
this.busy = !1, this._queue = [], this.fd === null && (this._open = fs2.open, this._queue.push([this._open, this.path, this.flags, this.mode, void 0]), this.flush());
}
}
}
});
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
var require_clone = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module) {
"use strict";
init_cjs_shims();
module.exports = clone;
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
return obj.__proto__;
};
function clone(obj) {
if (obj === null || typeof obj != "object")
return obj;
if (obj instanceof Object)
var copy2 = { __proto__: getPrototypeOf(obj) };
else
var copy2 = /* @__PURE__ */ Object.create(null);
return Object.getOwnPropertyNames(obj).forEach(function(key) {
Object.defineProperty(copy2, key, Object.getOwnPropertyDescriptor(obj, key));
}), copy2;
}
}
});
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
var require_graceful_fs = __commonJS({
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
init_cjs_shims();
var fs2 = __require("fs"), polyfills = require_polyfills(), legacy = require_legacy_streams(), clone = require_clone(), util = __require("util"), gracefulQueue, previousSymbol;
typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = /* @__PURE__ */ Symbol.for("graceful-fs.queue"), previousSymbol = /* @__PURE__ */ Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
function noop() {
}
function publishQueue(context, queue2) {
Object.defineProperty(context, gracefulQueue, {
get: function() {
return queue2;
}
});
}
var debug = noop;
util.debuglog ? debug = util.debuglog("gfs4") : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && (debug = function() {
var m = util.format.apply(util, arguments);
m = "GFS4: " + m.split(/\n/).join(`
GFS4: `), console.error(m);
});
fs2[gracefulQueue] || (queue = global[gracefulQueue] || [], publishQueue(fs2, queue), fs2.close = (function(fs$close) {
function close(fd, cb) {
return fs$close.call(fs2, fd, function(err) {
err || resetQueue(), typeof cb == "function" && cb.apply(this, arguments);
});
}
return Object.defineProperty(close, previousSymbol, {
value: fs$close
}), close;
})(fs2.close), fs2.closeSync = (function(fs$closeSync) {
function closeSync(fd) {
fs$closeSync.apply(fs2, arguments), resetQueue();
}
return Object.defineProperty(closeSync, previousSymbol, {
value: fs$closeSync
}), closeSync;
})(fs2.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
debug(fs2[gracefulQueue]), __require("assert").equal(fs2[gracefulQueue].length, 0);
}));
var queue;
global[gracefulQueue] || publishQueue(global, fs2[gracefulQueue]);
module.exports = patch(clone(fs2));
process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched && (module.exports = patch(fs2), fs2.__patched = !0);
function patch(fs3) {
polyfills(fs3), fs3.gracefulify = patch, fs3.createReadStream = createReadStream, fs3.createWriteStream = createWriteStream;
var fs$readFile = fs3.readFile;
fs3.readFile = readFile2;
function readFile2(path4, options, cb) {
return typeof options == "function" && (cb = options, options = null), go$readFile(path4, options, cb);
function go$readFile(path5, options2, cb2, startTime) {
return fs$readFile(path5, options2, function(err) {
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$readFile, [path5, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
});
}
}
var fs$writeFile = fs3.writeFile;
fs3.writeFile = writeFile2;
function writeFile2(path4, data, options, cb) {
return typeof options == "function" && (cb = options, options = null), go$writeFile(path4, data, options, cb);
function go$writeFile(path5, data2, options2, cb2, startTime) {
return fs$writeFile(path5, data2, options2, function(err) {
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$writeFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
});
}
}
var fs$appendFile = fs3.appendFile;
fs$appendFile && (fs3.appendFile = appendFile2);
function appendFile2(path4, data, options, cb) {
return typeof options == "function" && (cb = options, options = null), go$appendFile(path4, data, options, cb);
function go$appendFile(path5, data2, options2, cb2, startTime) {
return fs$appendFile(path5, data2, options2, function(err) {
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$appendFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
});
}
}
var fs$copyFile = fs3.copyFile;
fs$copyFile && (fs3.copyFile = copyFile2);
function copyFile2(src, dest, flags, cb) {
return typeof flags == "function" && (cb = flags, flags = 0), go$copyFile(src, dest, flags, cb);
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
return fs$copyFile(src2, dest2, flags2, function(err) {
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
});
}
}
var fs$readdir = fs3.readdir;
fs3.readdir = readdir2;
var noReaddirOptionVersions = /^v[0-5]\./;
function readdir2(path4, options, cb) {
typeof options == "function" && (cb = options, options = null);
var go$readdir = noReaddirOptionVersions.test(process.version) ? function(path5, options2, cb2, startTime) {
return fs$readdir(path5, fs$readdirCallback(
path5,
options2,
cb2,
startTime
));
} : function(path5, options2, cb2, startTime) {
return fs$readdir(path5, options2, fs$readdirCallback(
path5,
options2,
cb2,
startTime
));
};
return go$readdir(path4, options, cb);
function fs$readdirCallback(path5, options2, cb2, startTime) {
return function(err, files) {
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([
go$readdir,
[path5, options2, cb2],
err,
startTime || Date.now(),
Date.now()
]) : (files && files.sort && files.sort(), typeof cb2 == "function" && cb2.call(this, err, files));
};
}
}
if (process.version.substr(0, 4) === "v0.8") {
var legStreams = legacy(fs3);
ReadStream = legStreams.ReadStream, WriteStream = legStreams.WriteStream;
}
var fs$ReadStream = fs3.ReadStream;
fs$ReadStream && (ReadStream.prototype = Object.create(fs$ReadStream.prototype), ReadStream.prototype.open = ReadStream$open);
var fs$WriteStream = fs3.WriteStream;
fs$WriteStream && (WriteStream.prototype = Object.create(fs$WriteStream.prototype), WriteStream.prototype.open = WriteStream$open), Object.defineProperty(fs3, "ReadStream", {
get: function() {
return ReadStream;
},
set: function(val) {
ReadStream = val;
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(fs3, "WriteStream", {
get: function() {
return WriteStream;
},
set: function(val) {
WriteStream = val;
},
enumerable: !0,
configurable: !0
});
var FileReadStream = ReadStream;
Object.defineProperty(fs3, "FileReadStream", {
get: function() {
return FileReadStream;
},
set: function(val) {
FileReadStream = val;
},
enumerable: !0,
configurable: !0
});
var FileWriteStream = WriteStream;
Object.defineProperty(fs3, "FileWriteStream", {
get: function() {
return FileWriteStream;
},
set: function(val) {
FileWriteStream = val;
},
enumerable: !0,
configurable: !0
});
function ReadStream(path4, options) {
return this instanceof ReadStream ? (fs$ReadStream.apply(this, arguments), this) : ReadStream.apply(Object.create(ReadStream.prototype), arguments);
}
function ReadStream$open() {
var that = this;
open(that.path, that.flags, that.mode, function(err, fd) {
err ? (that.autoClose && that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd), that.read());
});
}
function WriteStream(path4, options) {
return this instanceof WriteStream ? (fs$WriteStream.apply(this, arguments), this) : WriteStream.apply(Object.create(WriteStream.prototype), arguments);
}
function WriteStream$open() {
var that = this;
open(that.path, that.flags, that.mode, function(err, fd) {
err ? (that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd));
});
}
function createReadStream(path4, options) {
return new fs3.ReadStream(path4, options);
}
function createWriteStream(path4, options) {
return new fs3.WriteStream(path4, options);
}
var fs$open = fs3.open;
fs3.open = open;
function open(path4, flags, mode, cb) {
return typeof mode == "function" && (cb = mode, mode = null), go$open(path4, flags, mode, cb);
function go$open(path5, flags2, mode2, cb2, startTime) {
return fs$open(path5, flags2, mode2, function(err, fd) {
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$open, [path5, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
});
}
}
return fs3;
}
function enqueue(elem) {
debug("ENQUEUE", elem[0].name, elem[1]), fs2[gracefulQueue].push(elem), retry();
}
var retryTimer;
function resetQueue() {
for (var now = Date.now(), i = 0; i < fs2[gracefulQueue].length; ++i)
fs2[gracefulQueue][i].length > 2 && (fs2[gracefulQueue][i][3] = now, fs2[gracefulQueue][i][4] = now);
retry();
}
function retry() {
if (clearTimeout(retryTimer), retryTimer = void 0, fs2[gracefulQueue].length !== 0) {
var elem = fs2[gracefulQueue].shift(), fn = elem[0], args = elem[1], err = elem[2], startTime = elem[3], lastTime = elem[4];
if (startTime === void 0)
debug("RETRY", fn.name, args), fn.apply(null, args);
else if (Date.now() - startTime >= 6e4) {
debug("TIMEOUT", fn.name, args);
var cb = args.pop();
typeof cb == "function" && cb.call(null, err);
} else {
var sinceAttempt = Date.now() - lastTime, sinceStart = Math.max(lastTime - startTime, 1), desiredDelay = Math.min(sinceStart * 1.2, 100);
sinceAttempt >= desiredDelay ? (debug("RETRY", fn.name, args), fn.apply(null, args.concat([startTime]))) : fs2[gracefulQueue].push(elem);
}
retryTimer === void 0 && (retryTimer = setTimeout(retry, 0));
}
}
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/fs/index.js
var require_fs = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromCallback, fs2 = require_graceful_fs(), api = [
"access",
"appendFile",
"chmod",
"chown",
"close",
"copyFile",
"fchmod",
"fchown",
"fdatasync",
"fstat",
"fsync",
"ftruncate",
"futimes",
"lchmod",
"lchown",
"link",
"lstat",
"mkdir",
"mkdtemp",
"open",
"opendir",
"readdir",
"readFile",
"readlink",
"realpath",
"rename",
"rm",
"rmdir",
"stat",
"symlink",
"truncate",
"unlink",
"utimes",
"writeFile"
].filter((key) => typeof fs2[key] == "function");
Object.assign(exports, fs2);
api.forEach((method) => {
exports[method] = u(fs2[method]);
});
exports.exists = function(filename, callback) {
return typeof callback == "function" ? fs2.exists(filename, callback) : new Promise((resolve) => fs2.exists(filename, resolve));
};
exports.read = function(fd, buffer, offset, length, position, callback) {
return typeof callback == "function" ? fs2.read(fd, buffer, offset, length, position, callback) : new Promise((resolve, reject) => {
fs2.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
if (err) return reject(err);
resolve({ bytesRead, buffer: buffer2 });
});
});
};
exports.write = function(fd, buffer, ...args) {
return typeof args[args.length - 1] == "function" ? fs2.write(fd, buffer, ...args) : new Promise((resolve, reject) => {
fs2.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
if (err) return reject(err);
resolve({ bytesWritten, buffer: buffer2 });
});
});
};
exports.readv = function(fd, buffers, ...args) {
return typeof args[args.length - 1] == "function" ? fs2.readv(fd, buffers, ...args) : new Promise((resolve, reject) => {
fs2.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
if (err) return reject(err);
resolve({ bytesRead, buffers: buffers2 });
});
});
};
exports.writev = function(fd, buffers, ...args) {
return typeof args[args.length - 1] == "function" ? fs2.writev(fd, buffers, ...args) : new Promise((resolve, reject) => {
fs2.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
if (err) return reject(err);
resolve({ bytesWritten, buffers: buffers2 });
});
});
};
typeof fs2.realpath.native == "function" ? exports.realpath.native = u(fs2.realpath.native) : process.emitWarning(
"fs.realpath.native is not a function. Is fs being monkey-patched?",
"Warning",
"fs-extra-WARN0003"
);
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/mkdirs/utils.js
var require_utils = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
"use strict";
init_cjs_shims();
var path4 = __require("path");
module.exports.checkPath = function(pth) {
if (process.platform === "win32" && /[<>:"|?*]/.test(pth.replace(path4.parse(pth).root, ""))) {
let error = new Error(`Path contains invalid characters: ${pth}`);
throw error.code = "EINVAL", error;
}
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
var require_make_dir = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
"use strict";
init_cjs_shims();
var fs2 = require_fs(), { checkPath } = require_utils(), getMode = (options) => {
let defaults2 = { mode: 511 };
return typeof options == "number" ? options : { ...defaults2, ...options }.mode;
};
module.exports.makeDir = async (dir, options) => (checkPath(dir), fs2.mkdir(dir, {
mode: getMode(options),
recursive: !0
}));
module.exports.makeDirSync = (dir, options) => (checkPath(dir), fs2.mkdirSync(dir, {
mode: getMode(options),
recursive: !0
}));
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/mkdirs/index.js
var require_mkdirs = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromPromise, { makeDir: _makeDir, makeDirSync } = require_make_dir(), makeDir = u(_makeDir);
module.exports = {
mkdirs: makeDir,
mkdirsSync: makeDirSync,
// alias
mkdirp: makeDir,
mkdirpSync: makeDirSync,
ensureDir: makeDir,
ensureDirSync: makeDirSync
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/path-exists/index.js
var require_path_exists = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromPromise, fs2 = require_fs();
function pathExists3(path4) {
return fs2.access(path4).then(() => !0).catch(() => !1);
}
module.exports = {
pathExists: u(pathExists3),
pathExistsSync: fs2.existsSync
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/util/utimes.js
var require_utimes = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
"use strict";
init_cjs_shims();
var fs2 = require_graceful_fs();
function utimesMillis(path4, atime, mtime, callback) {
fs2.open(path4, "r+", (err, fd) => {
if (err) return callback(err);
fs2.futimes(fd, atime, mtime, (futimesErr) => {
fs2.close(fd, (closeErr) => {
callback && callback(futimesErr || closeErr);
});
});
});
}
function utimesMillisSync(path4, atime, mtime) {
let fd = fs2.openSync(path4, "r+");
return fs2.futimesSync(fd, atime, mtime), fs2.closeSync(fd);
}
module.exports = {
utimesMillis,
utimesMillisSync
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/util/stat.js
var require_stat = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
"use strict";
init_cjs_shims();
var fs2 = require_fs(), path4 = __require("path"), util = __require("util");
function getStats(src, dest, opts) {
let statFunc = opts.dereference ? (file) => fs2.stat(file, { bigint: !0 }) : (file) => fs2.lstat(file, { bigint: !0 });
return Promise.all([
statFunc(src),
statFunc(dest).catch((err) => {
if (err.code === "ENOENT") return null;
throw err;
})
]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
}
function getStatsSync(src, dest, opts) {
let destStat, statFunc = opts.dereference ? (file) => fs2.statSync(file, { bigint: !0 }) : (file) => fs2.lstatSync(file, { bigint: !0 }), srcStat = statFunc(src);
try {
destStat = statFunc(dest);
} catch (err) {
if (err.code === "ENOENT") return { srcStat, destStat: null };
throw err;
}
return { srcStat, destStat };
}
function checkPaths(src, dest, funcName, opts, cb) {
util.callbackify(getStats)(src, dest, opts, (err, stats) => {
if (err) return cb(err);
let { srcStat, destStat } = stats;
if (destStat) {
if (areIdentical(srcStat, destStat)) {
let srcBaseName = path4.basename(src), destBaseName = path4.basename(dest);
return funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase() ? cb(null, { srcStat, destStat, isChangingCase: !0 }) : cb(new Error("Source and destination must not be the same."));
}
if (srcStat.isDirectory() && !destStat.isDirectory())
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));
if (!srcStat.isDirectory() && destStat.isDirectory())
return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`));
}
return srcStat.isDirectory() && isSrcSubdir(src, dest) ? cb(new Error(errMsg(src, dest, funcName))) : cb(null, { srcStat, destStat });
});
}
function checkPathsSync(src, dest, funcName, opts) {
let { srcStat, destStat } = getStatsSync(src, dest, opts);
if (destStat) {
if (areIdentical(srcStat, destStat)) {
let srcBaseName = path4.basename(src), destBaseName = path4.basename(dest);
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase())
return { srcStat, destStat, isChangingCase: !0 };
throw new Error("Source and destination must not be the same.");
}
if (srcStat.isDirectory() && !destStat.isDirectory())
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
if (!srcStat.isDirectory() && destStat.isDirectory())
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
}
if (srcStat.isDirectory() && isSrcSubdir(src, dest))
throw new Error(errMsg(src, dest, funcName));
return { srcStat, destStat };
}
function checkParentPaths(src, srcStat, dest, funcName, cb) {
let srcParent = path4.resolve(path4.dirname(src)), destParent = path4.resolve(path4.dirname(dest));
if (destParent === srcParent || destParent === path4.parse(destParent).root) return cb();
fs2.stat(destParent, { bigint: !0 }, (err, destStat) => err ? err.code === "ENOENT" ? cb() : cb(err) : areIdentical(srcStat, destStat) ? cb(new Error(errMsg(src, dest, funcName))) : checkParentPaths(src, srcStat, destParent, funcName, cb));
}
function checkParentPathsSync(src, srcStat, dest, funcName) {
let srcParent = path4.resolve(path4.dirname(src)), destParent = path4.resolve(path4.dirname(dest));
if (destParent === srcParent || destParent === path4.parse(destParent).root) return;
let destStat;
try {
destStat = fs2.statSync(destParent, { bigint: !0 });
} catch (err) {
if (err.code === "ENOENT") return;
throw err;
}
if (areIdentical(srcStat, destStat))
throw new Error(errMsg(src, dest, funcName));
return checkParentPathsSync(src, srcStat, destParent, funcName);
}
function areIdentical(srcStat, destStat) {
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
}
function isSrcSubdir(src, dest) {
let srcArr = path4.resolve(src).split(path4.sep).filter((i) => i), destArr = path4.resolve(dest).split(path4.sep).filter((i) => i);
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, !0);
}
function errMsg(src, dest, funcName) {
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
}
module.exports = {
checkPaths,
checkPathsSync,
checkParentPaths,
checkParentPathsSync,
isSrcSubdir,
areIdentical
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/copy.js
var require_copy = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
"use strict";
init_cjs_shims();
var fs2 = require_graceful_fs(), path4 = __require("path"), mkdirs2 = require_mkdirs().mkdirs, pathExists3 = require_path_exists().pathExists, utimesMillis = require_utimes().utimesMillis, stat = require_stat();
function copy2(src, dest, opts, cb) {
typeof opts == "function" && !cb ? (cb = opts, opts = {}) : typeof opts == "function" && (opts = { filter: opts }), cb = cb || function() {
}, opts = opts || {}, opts.clobber = "clobber" in opts ? !!opts.clobber : !0, opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber, opts.preserveTimestamps && process.arch === "ia32" && process.emitWarning(
`Using the preserveTimestamps option in 32-bit node is not recommended;
see https://github.com/jprichardson/node-fs-extra/issues/269`,
"Warning",
"fs-extra-WARN0001"
), stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
if (err) return cb(err);
let { srcStat, destStat } = stats;
stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => {
if (err2) return cb(err2);
runFilter(src, dest, opts, (err3, include) => {
if (err3) return cb(err3);
if (!include) return cb();
checkParentDir(destStat, src, dest, opts, cb);
});
});
});
}
function checkParentDir(destStat, src, dest, opts, cb) {
let destParent = path4.dirname(dest);
pathExists3(destParent, (err, dirExists) => {
if (err) return cb(err);
if (dirExists) return getStats(destStat, src, dest, opts, cb);
mkdirs2(destParent, (err2) => err2 ? cb(err2) : getStats(destStat, src, dest, opts, cb));
});
}
function runFilter(src, dest, opts, cb) {
if (!opts.filter) return cb(null, !0);
Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
}
function getStats(destStat, src, dest, opts, cb) {
(opts.dereference ? fs2.stat : fs2.lstat)(src, (err, srcStat) => err ? cb(err) : srcStat.isDirectory() ? onDir(srcStat, destStat, src, dest, opts, cb) : srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice() ? onFile(srcStat, destStat, src, dest, opts, cb) : srcStat.isSymbolicLink() ? onLink(destStat, src, dest, opts, cb) : srcStat.isSocket() ? cb(new Error(`Cannot copy a socket file: ${src}`)) : srcStat.isFIFO() ? cb(new Error(`Cannot copy a FIFO pipe: ${src}`)) : cb(new Error(`Unknown file: ${src}`)));
}
function onFile(srcStat, destStat, src, dest, opts, cb) {
return destStat ? mayCopyFile(srcStat, src, dest, opts, cb) : copyFile2(srcStat, src, dest, opts, cb);
}
function mayCopyFile(srcStat, src, dest, opts, cb) {
if (opts.overwrite)
fs2.unlink(dest, (err) => err ? cb(err) : copyFile2(srcStat, src, dest, opts, cb));
else return opts.errorOnExist ? cb(new Error(`'${dest}' already exists`)) : cb();
}
function copyFile2(srcStat, src, dest, opts, cb) {
fs2.copyFile(src, dest, (err) => err ? cb(err) : opts.preserveTimestamps ? handleTimestampsAndMode(srcStat.mode, src, dest, cb) : setDestMode(dest, srcStat.mode, cb));
}
function handleTimestampsAndMode(srcMode, src, dest, cb) {
return fileIsNotWritable(srcMode) ? makeFileWritable(dest, srcMode, (err) => err ? cb(err) : setDestTimestampsAndMode(srcMode, src, dest, cb)) : setDestTimestampsAndMode(srcMode, src, dest, cb);
}
function fileIsNotWritable(srcMode) {
return (srcMode & 128) === 0;
}
function makeFileWritable(dest, srcMode, cb) {
return setDestMode(dest, srcMode | 128, cb);
}
function setDestTimestampsAndMode(srcMode, src, dest, cb) {
setDestTimestamps(src, dest, (err) => err ? cb(err) : setDestMode(dest, srcMode, cb));
}
function setDestMode(dest, srcMode, cb) {
return fs2.chmod(dest, srcMode, cb);
}
function setDestTimestamps(src, dest, cb) {
fs2.stat(src, (err, updatedSrcStat) => err ? cb(err) : utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb));
}
function onDir(srcStat, destStat, src, dest, opts, cb) {
return destStat ? copyDir(src, dest, opts, cb) : mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
}
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
fs2.mkdir(dest, (err) => {
if (err) return cb(err);
copyDir(src, dest, opts, (err2) => err2 ? cb(err2) : setDestMode(dest, srcMode, cb));
});
}
function copyDir(src, dest, opts, cb) {
fs2.readdir(src, (err, items) => err ? cb(err) : copyDirItems(items, src, dest, opts, cb));
}
function copyDirItems(items, src, dest, opts, cb) {
let item = items.pop();
return item ? copyDirItem(items, item, src, dest, opts, cb) : cb();
}
function copyDirItem(items, item, src, dest, opts, cb) {
let srcItem = path4.join(src, item), destItem = path4.join(dest, item);
runFilter(srcItem, destItem, opts, (err, include) => {
if (err) return cb(err);
if (!include) return copyDirItems(items, src, dest, opts, cb);
stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => {
if (err2) return cb(err2);
let { destStat } = stats;
getStats(destStat, srcItem, destItem, opts, (err3) => err3 ? cb(err3) : copyDirItems(items, src, dest, opts, cb));
});
});
}
function onLink(destStat, src, dest, opts, cb) {
fs2.readlink(src, (err, resolvedSrc) => {
if (err) return cb(err);
if (opts.dereference && (resolvedSrc = path4.resolve(process.cwd(), resolvedSrc)), destStat)
fs2.readlink(dest, (err2, resolvedDest) => err2 ? err2.code === "EINVAL" || err2.code === "UNKNOWN" ? fs2.symlink(resolvedSrc, dest, cb) : cb(err2) : (opts.dereference && (resolvedDest = path4.resolve(process.cwd(), resolvedDest)), stat.isSrcSubdir(resolvedSrc, resolvedDest) ? cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)) : stat.isSrcSubdir(resolvedDest, resolvedSrc) ? cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)) : copyLink(resolvedSrc, dest, cb)));
else
return fs2.symlink(resolvedSrc, dest, cb);
});
}
function copyLink(resolvedSrc, dest, cb) {
fs2.unlink(dest, (err) => err ? cb(err) : fs2.symlink(resolvedSrc, dest, cb));
}
module.exports = copy2;
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/copy-sync.js
var require_copy_sync = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
"use strict";
init_cjs_shims();
var fs2 = require_graceful_fs(), path4 = __require("path"), mkdirsSync2 = require_mkdirs().mkdirsSync, utimesMillisSync = require_utimes().utimesMillisSync, stat = require_stat();
function copySync2(src, dest, opts) {
typeof opts == "function" && (opts = { filter: opts }), opts = opts || {}, opts.clobber = "clobber" in opts ? !!opts.clobber : !0, opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber, opts.preserveTimestamps && process.arch === "ia32" && process.emitWarning(
`Using the preserveTimestamps option in 32-bit node is not recommended;
see https://github.com/jprichardson/node-fs-extra/issues/269`,
"Warning",
"fs-extra-WARN0002"
);
let { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
if (stat.checkParentPathsSync(src, srcStat, dest, "copy"), opts.filter && !opts.filter(src, dest)) return;
let destParent = path4.dirname(dest);
return fs2.existsSync(destParent) || mkdirsSync2(destParent), getStats(destStat, src, dest, opts);
}
function getStats(destStat, src, dest, opts) {
let srcStat = (opts.dereference ? fs2.statSync : fs2.lstatSync)(src);
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
throw srcStat.isSocket() ? new Error(`Cannot copy a socket file: ${src}`) : srcStat.isFIFO() ? new Error(`Cannot copy a FIFO pipe: ${src}`) : new Error(`Unknown file: ${src}`);
}
function onFile(srcStat, destStat, src, dest, opts) {
return destStat ? mayCopyFile(srcStat, src, dest, opts) : copyFile2(srcStat, src, dest, opts);
}
function mayCopyFile(srcStat, src, dest, opts) {
if (opts.overwrite)
return fs2.unlinkSync(dest), copyFile2(srcStat, src, dest, opts);
if (opts.errorOnExist)
throw new Error(`'${dest}' already exists`);
}
function copyFile2(srcStat, src, dest, opts) {
return fs2.copyFileSync(src, dest), opts.preserveTimestamps && handleTimestamps(srcStat.mode, src, dest), setDestMode(dest, srcStat.mode);
}
function handleTimestamps(srcMode, src, dest) {
return fileIsNotWritable(srcMode) && makeFileWritable(dest, srcMode), setDestTimestamps(src, dest);
}
function fileIsNotWritable(srcMode) {
return (srcMode & 128) === 0;
}
function makeFileWritable(dest, srcMode) {
return setDestMode(dest, srcMode | 128);
}
function setDestMode(dest, srcMode) {
return fs2.chmodSync(dest, srcMode);
}
function setDestTimestamps(src, dest) {
let updatedSrcStat = fs2.statSync(src);
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
}
function onDir(srcStat, destStat, src, dest, opts) {
return destStat ? copyDir(src, dest, opts) : mkDirAndCopy(srcStat.mode, src, dest, opts);
}
function mkDirAndCopy(srcMode, src, dest, opts) {
return fs2.mkdirSync(dest), copyDir(src, dest, opts), setDestMode(dest, srcMode);
}
function copyDir(src, dest, opts) {
fs2.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
}
function copyDirItem(item, src, dest, opts) {
let srcItem = path4.join(src, item), destItem = path4.join(dest, item);
if (opts.filter && !opts.filter(srcItem, destItem)) return;
let { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
return getStats(destStat, srcItem, destItem, opts);
}
function onLink(destStat, src, dest, opts) {
let resolvedSrc = fs2.readlinkSync(src);
if (opts.dereference && (resolvedSrc = path4.resolve(process.cwd(), resolvedSrc)), destStat) {
let resolvedDest;
try {
resolvedDest = fs2.readlinkSync(dest);
} catch (err) {
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs2.symlinkSync(resolvedSrc, dest);
throw err;
}
if (opts.dereference && (resolvedDest = path4.resolve(process.cwd(), resolvedDest)), stat.isSrcSubdir(resolvedSrc, resolvedDest))
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
if (stat.isSrcSubdir(resolvedDest, resolvedSrc))
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
return copyLink(resolvedSrc, dest);
} else
return fs2.symlinkSync(resolvedSrc, dest);
}
function copyLink(resolvedSrc, dest) {
return fs2.unlinkSync(dest), fs2.symlinkSync(resolvedSrc, dest);
}
module.exports = copySync2;
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/index.js
var require_copy2 = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromCallback;
module.exports = {
copy: u(require_copy()),
copySync: require_copy_sync()
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/remove/index.js
var require_remove = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var fs2 = require_graceful_fs(), u = require_universalify().fromCallback;
function remove2(path4, callback) {
fs2.rm(path4, { recursive: !0, force: !0 }, callback);
}
function removeSync2(path4) {
fs2.rmSync(path4, { recursive: !0, force: !0 });
}
module.exports = {
remove: u(remove2),
removeSync: removeSync2
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/empty/index.js
var require_empty = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromPromise, fs2 = require_fs(), path4 = __require("path"), mkdir2 = require_mkdirs(), remove2 = require_remove(), emptyDir2 = u(async function(dir) {
let items;
try {
items = await fs2.readdir(dir);
} catch {
return mkdir2.mkdirs(dir);
}
return Promise.all(items.map((item) => remove2.remove(path4.join(dir, item))));
});
function emptyDirSync2(dir) {
let items;
try {
items = fs2.readdirSync(dir);
} catch {
return mkdir2.mkdirsSync(dir);
}
items.forEach((item) => {
item = path4.join(dir, item), remove2.removeSync(item);
});
}
module.exports = {
emptyDirSync: emptyDirSync2,
emptydirSync: emptyDirSync2,
emptyDir: emptyDir2,
emptydir: emptyDir2
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/file.js
var require_file = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromCallback, path4 = __require("path"), fs2 = require_graceful_fs(), mkdir2 = require_mkdirs();
function createFile2(file, callback) {
function makeFile() {
fs2.writeFile(file, "", (err) => {
if (err) return callback(err);
callback();
});
}
fs2.stat(file, (err, stats) => {
if (!err && stats.isFile()) return callback();
let dir = path4.dirname(file);
fs2.stat(dir, (err2, stats2) => {
if (err2)
return err2.code === "ENOENT" ? mkdir2.mkdirs(dir, (err3) => {
if (err3) return callback(err3);
makeFile();
}) : callback(err2);
stats2.isDirectory() ? makeFile() : fs2.readdir(dir, (err3) => {
if (err3) return callback(err3);
});
});
});
}
function createFileSync2(file) {
let stats;
try {
stats = fs2.statSync(file);
} catch {
}
if (stats && stats.isFile()) return;
let dir = path4.dirname(file);
try {
fs2.statSync(dir).isDirectory() || fs2.readdirSync(dir);
} catch (err) {
if (err && err.code === "ENOENT") mkdir2.mkdirsSync(dir);
else throw err;
}
fs2.writeFileSync(file, "");
}
module.exports = {
createFile: u(createFile2),
createFileSync: createFileSync2
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/link.js
var require_link = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromCallback, path4 = __require("path"), fs2 = require_graceful_fs(), mkdir2 = require_mkdirs(), pathExists3 = require_path_exists().pathExists, { areIdentical } = require_stat();
function createLink2(srcpath, dstpath, callback) {
function makeLink(srcpath2, dstpath2) {
fs2.link(srcpath2, dstpath2, (err) => {
if (err) return callback(err);
callback(null);
});
}
fs2.lstat(dstpath, (_, dstStat) => {
fs2.lstat(srcpath, (err, srcStat) => {
if (err)
return err.message = err.message.replace("lstat", "ensureLink"), callback(err);
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null);
let dir = path4.dirname(dstpath);
pathExists3(dir, (err2, dirExists) => {
if (err2) return callback(err2);
if (dirExists) return makeLink(srcpath, dstpath);
mkdir2.mkdirs(dir, (err3) => {
if (err3) return callback(err3);
makeLink(srcpath, dstpath);
});
});
});
});
}
function createLinkSync2(srcpath, dstpath) {
let dstStat;
try {
dstStat = fs2.lstatSync(dstpath);
} catch {
}
try {
let srcStat = fs2.lstatSync(srcpath);
if (dstStat && areIdentical(srcStat, dstStat)) return;
} catch (err) {
throw err.message = err.message.replace("lstat", "ensureLink"), err;
}
let dir = path4.dirname(dstpath);
return fs2.existsSync(dir) || mkdir2.mkdirsSync(dir), fs2.linkSync(srcpath, dstpath);
}
module.exports = {
createLink: u(createLink2),
createLinkSync: createLinkSync2
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
var require_symlink_paths = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
"use strict";
init_cjs_shims();
var path4 = __require("path"), fs2 = require_graceful_fs(), pathExists3 = require_path_exists().pathExists;
function symlinkPaths(srcpath, dstpath, callback) {
if (path4.isAbsolute(srcpath))
return fs2.lstat(srcpath, (err) => err ? (err.message = err.message.replace("lstat", "ensureSymlink"), callback(err)) : callback(null, {
toCwd: srcpath,
toDst: srcpath
}));
{
let dstdir = path4.dirname(dstpath), relativeToDst = path4.join(dstdir, srcpath);
return pathExists3(relativeToDst, (err, exists) => err ? callback(err) : exists ? callback(null, {
toCwd: relativeToDst,
toDst: srcpath
}) : fs2.lstat(srcpath, (err2) => err2 ? (err2.message = err2.message.replace("lstat", "ensureSymlink"), callback(err2)) : callback(null, {
toCwd: srcpath,
toDst: path4.relative(dstdir, srcpath)
})));
}
}
function symlinkPathsSync(srcpath, dstpath) {
let exists;
if (path4.isAbsolute(srcpath)) {
if (exists = fs2.existsSync(srcpath), !exists) throw new Error("absolute srcpath does not exist");
return {
toCwd: srcpath,
toDst: srcpath
};
} else {
let dstdir = path4.dirname(dstpath), relativeToDst = path4.join(dstdir, srcpath);
if (exists = fs2.existsSync(relativeToDst), exists)
return {
toCwd: relativeToDst,
toDst: srcpath
};
if (exists = fs2.existsSync(srcpath), !exists) throw new Error("relative srcpath does not exist");
return {
toCwd: srcpath,
toDst: path4.relative(dstdir, srcpath)
};
}
}
module.exports = {
symlinkPaths,
symlinkPathsSync
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js
var require_symlink_type = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
"use strict";
init_cjs_shims();
var fs2 = require_graceful_fs();
function symlinkType(srcpath, type, callback) {
if (callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type, type) return callback(null, type);
fs2.lstat(srcpath, (err, stats) => {
if (err) return callback(null, "file");
type = stats && stats.isDirectory() ? "dir" : "file", callback(null, type);
});
}
function symlinkTypeSync(srcpath, type) {
let stats;
if (type) return type;
try {
stats = fs2.lstatSync(srcpath);
} catch {
return "file";
}
return stats && stats.isDirectory() ? "dir" : "file";
}
module.exports = {
symlinkType,
symlinkTypeSync
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink.js
var require_symlink = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromCallback, path4 = __require("path"), fs2 = require_fs(), _mkdirs2 = require_mkdirs(), mkdirs2 = _mkdirs2.mkdirs, mkdirsSync2 = _mkdirs2.mkdirsSync, _symlinkPaths = require_symlink_paths(), symlinkPaths = _symlinkPaths.symlinkPaths, symlinkPathsSync = _symlinkPaths.symlinkPathsSync, _symlinkType = require_symlink_type(), symlinkType = _symlinkType.symlinkType, symlinkTypeSync = _symlinkType.symlinkTypeSync, pathExists3 = require_path_exists().pathExists, { areIdentical } = require_stat();
function createSymlink2(srcpath, dstpath, type, callback) {
callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type, fs2.lstat(dstpath, (err, stats) => {
!err && stats.isSymbolicLink() ? Promise.all([
fs2.stat(srcpath),
fs2.stat(dstpath)
]).then(([srcStat, dstStat]) => {
if (areIdentical(srcStat, dstStat)) return callback(null);
_createSymlink(srcpath, dstpath, type, callback);
}) : _createSymlink(srcpath, dstpath, type, callback);
});
}
function _createSymlink(srcpath, dstpath, type, callback) {
symlinkPaths(srcpath, dstpath, (err, relative) => {
if (err) return callback(err);
srcpath = relative.toDst, symlinkType(relative.toCwd, type, (err2, type2) => {
if (err2) return callback(err2);
let dir = path4.dirname(dstpath);
pathExists3(dir, (err3, dirExists) => {
if (err3) return callback(err3);
if (dirExists) return fs2.symlink(srcpath, dstpath, type2, callback);
mkdirs2(dir, (err4) => {
if (err4) return callback(err4);
fs2.symlink(srcpath, dstpath, type2, callback);
});
});
});
});
}
function createSymlinkSync2(srcpath, dstpath, type) {
let stats;
try {
stats = fs2.lstatSync(dstpath);
} catch {
}
if (stats && stats.isSymbolicLink()) {
let srcStat = fs2.statSync(srcpath), dstStat = fs2.statSync(dstpath);
if (areIdentical(srcStat, dstStat)) return;
}
let relative = symlinkPathsSync(srcpath, dstpath);
srcpath = relative.toDst, type = symlinkTypeSync(relative.toCwd, type);
let dir = path4.dirname(dstpath);
return fs2.existsSync(dir) || mkdirsSync2(dir), fs2.symlinkSync(srcpath, dstpath, type);
}
module.exports = {
createSymlink: u(createSymlink2),
createSymlinkSync: createSymlinkSync2
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/index.js
var require_ensure = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var { createFile: createFile2, createFileSync: createFileSync2 } = require_file(), { createLink: createLink2, createLinkSync: createLinkSync2 } = require_link(), { createSymlink: createSymlink2, createSymlinkSync: createSymlinkSync2 } = require_symlink();
module.exports = {
// file
createFile: createFile2,
createFileSync: createFileSync2,
ensureFile: createFile2,
ensureFileSync: createFileSync2,
// link
createLink: createLink2,
createLinkSync: createLinkSync2,
ensureLink: createLink2,
ensureLinkSync: createLinkSync2,
// symlink
createSymlink: createSymlink2,
createSymlinkSync: createSymlinkSync2,
ensureSymlink: createSymlink2,
ensureSymlinkSync: createSymlinkSync2
};
}
});
// ../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/utils.js
var require_utils2 = __commonJS({
"../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/utils.js"(exports, module) {
init_cjs_shims();
function stringify(obj, { EOL: EOL2 = `
`, finalEOL = !0, replacer = null, spaces } = {}) {
let EOF = finalEOL ? EOL2 : "";
return JSON.stringify(obj, replacer, spaces).replace(/\n/g, EOL2) + EOF;
}
function stripBom(content) {
return Buffer.isBuffer(content) && (content = content.toString("utf8")), content.replace(/^\uFEFF/, "");
}
module.exports = { stringify, stripBom };
}
});
// ../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/index.js
var require_jsonfile = __commonJS({
"../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/index.js"(exports, module) {
init_cjs_shims();
var _fs;
try {
_fs = require_graceful_fs();
} catch {
_fs = __require("fs");
}
var universalify = require_universalify(), { stringify, stripBom } = require_utils2();
async function _readFile(file, options = {}) {
typeof options == "string" && (options = { encoding: options });
let fs2 = options.fs || _fs, shouldThrow = "throws" in options ? options.throws : !0, data = await universalify.fromCallback(fs2.readFile)(file, options);
data = stripBom(data);
let obj;
try {
obj = JSON.parse(data, options ? options.reviver : null);
} catch (err) {
if (shouldThrow)
throw err.message = `${file}: ${err.message}`, err;
return null;
}
return obj;
}
var readFile2 = universalify.fromPromise(_readFile);
function readFileSync2(file, options = {}) {
typeof options == "string" && (options = { encoding: options });
let fs2 = options.fs || _fs, shouldThrow = "throws" in options ? options.throws : !0;
try {
let content = fs2.readFileSync(file, options);
return content = stripBom(content), JSON.parse(content, options.reviver);
} catch (err) {
if (shouldThrow)
throw err.message = `${file}: ${err.message}`, err;
return null;
}
}
async function _writeFile(file, obj, options = {}) {
let fs2 = options.fs || _fs, str = stringify(obj, options);
await universalify.fromCallback(fs2.writeFile)(file, str, options);
}
var writeFile2 = universalify.fromPromise(_writeFile);
function writeFileSync2(file, obj, options = {}) {
let fs2 = options.fs || _fs, str = stringify(obj, options);
return fs2.writeFileSync(file, str, options);
}
module.exports = {
readFile: readFile2,
readFileSync: readFileSync2,
writeFile: writeFile2,
writeFileSync: writeFileSync2
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/json/jsonfile.js
var require_jsonfile2 = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module) {
"use strict";
init_cjs_shims();
var jsonFile = require_jsonfile();
module.exports = {
// jsonfile exports
readJson: jsonFile.readFile,
readJsonSync: jsonFile.readFileSync,
writeJson: jsonFile.writeFile,
writeJsonSync: jsonFile.writeFileSync
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/output-file/index.js
var require_output_file = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromCallback, fs2 = require_graceful_fs(), path4 = __require("path"), mkdir2 = require_mkdirs(), pathExists3 = require_path_exists().pathExists;
function outputFile2(file, data, encoding, callback) {
typeof encoding == "function" && (callback = encoding, encoding = "utf8");
let dir = path4.dirname(file);
pathExists3(dir, (err, itDoes) => {
if (err) return callback(err);
if (itDoes) return fs2.writeFile(file, data, encoding, callback);
mkdir2.mkdirs(dir, (err2) => {
if (err2) return callback(err2);
fs2.writeFile(file, data, encoding, callback);
});
});
}
function outputFileSync2(file, ...args) {
let dir = path4.dirname(file);
if (fs2.existsSync(dir))
return fs2.writeFileSync(file, ...args);
mkdir2.mkdirsSync(dir), fs2.writeFileSync(file, ...args);
}
module.exports = {
outputFile: u(outputFile2),
outputFileSync: outputFileSync2
};
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/json/output-json.js
var require_output_json = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module) {
"use strict";
init_cjs_shims();
var { stringify } = require_utils2(), { outputFile: outputFile2 } = require_output_file();
async function outputJson2(file, data, options = {}) {
let str = stringify(data, options);
await outputFile2(file, str, options);
}
module.exports = outputJson2;
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/json/output-json-sync.js
var require_output_json_sync = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module) {
"use strict";
init_cjs_shims();
var { stringify } = require_utils2(), { outputFileSync: outputFileSync2 } = require_output_file();
function outputJsonSync2(file, data, options) {
let str = stringify(data, options);
outputFileSync2(file, str, options);
}
module.exports = outputJsonSync2;
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/json/index.js
var require_json = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/json/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromPromise, jsonFile = require_jsonfile2();
jsonFile.outputJson = u(require_output_json());
jsonFile.outputJsonSync = require_output_json_sync();
jsonFile.outputJSON = jsonFile.outputJson;
jsonFile.outputJSONSync = jsonFile.outputJsonSync;
jsonFile.writeJSON = jsonFile.writeJson;
jsonFile.writeJSONSync = jsonFile.writeJsonSync;
jsonFile.readJSON = jsonFile.readJson;
jsonFile.readJSONSync = jsonFile.readJsonSync;
module.exports = jsonFile;
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/move.js
var require_move = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
"use strict";
init_cjs_shims();
var fs2 = require_graceful_fs(), path4 = __require("path"), copy2 = require_copy2().copy, remove2 = require_remove().remove, mkdirp2 = require_mkdirs().mkdirp, pathExists3 = require_path_exists().pathExists, stat = require_stat();
function move2(src, dest, opts, cb) {
typeof opts == "function" && (cb = opts, opts = {}), opts = opts || {};
let overwrite = opts.overwrite || opts.clobber || !1;
stat.checkPaths(src, dest, "move", opts, (err, stats) => {
if (err) return cb(err);
let { srcStat, isChangingCase = !1 } = stats;
stat.checkParentPaths(src, srcStat, dest, "move", (err2) => {
if (err2) return cb(err2);
if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb);
mkdirp2(path4.dirname(dest), (err3) => err3 ? cb(err3) : doRename(src, dest, overwrite, isChangingCase, cb));
});
});
}
function isParentRoot(dest) {
let parent = path4.dirname(dest);
return path4.parse(parent).root === parent;
}
function doRename(src, dest, overwrite, isChangingCase, cb) {
if (isChangingCase) return rename(src, dest, overwrite, cb);
if (overwrite)
return remove2(dest, (err) => err ? cb(err) : rename(src, dest, overwrite, cb));
pathExists3(dest, (err, destExists) => err ? cb(err) : destExists ? cb(new Error("dest already exists.")) : rename(src, dest, overwrite, cb));
}
function rename(src, dest, overwrite, cb) {
fs2.rename(src, dest, (err) => err ? err.code !== "EXDEV" ? cb(err) : moveAcrossDevice(src, dest, overwrite, cb) : cb());
}
function moveAcrossDevice(src, dest, overwrite, cb) {
copy2(src, dest, {
overwrite,
errorOnExist: !0
}, (err) => err ? cb(err) : remove2(src, cb));
}
module.exports = move2;
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/move-sync.js
var require_move_sync = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
"use strict";
init_cjs_shims();
var fs2 = require_graceful_fs(), path4 = __require("path"), copySync2 = require_copy2().copySync, removeSync2 = require_remove().removeSync, mkdirpSync2 = require_mkdirs().mkdirpSync, stat = require_stat();
function moveSync2(src, dest, opts) {
opts = opts || {};
let overwrite = opts.overwrite || opts.clobber || !1, { srcStat, isChangingCase = !1 } = stat.checkPathsSync(src, dest, "move", opts);
return stat.checkParentPathsSync(src, srcStat, dest, "move"), isParentRoot(dest) || mkdirpSync2(path4.dirname(dest)), doRename(src, dest, overwrite, isChangingCase);
}
function isParentRoot(dest) {
let parent = path4.dirname(dest);
return path4.parse(parent).root === parent;
}
function doRename(src, dest, overwrite, isChangingCase) {
if (isChangingCase) return rename(src, dest, overwrite);
if (overwrite)
return removeSync2(dest), rename(src, dest, overwrite);
if (fs2.existsSync(dest)) throw new Error("dest already exists.");
return rename(src, dest, overwrite);
}
function rename(src, dest, overwrite) {
try {
fs2.renameSync(src, dest);
} catch (err) {
if (err.code !== "EXDEV") throw err;
return moveAcrossDevice(src, dest, overwrite);
}
}
function moveAcrossDevice(src, dest, overwrite) {
return copySync2(src, dest, {
overwrite,
errorOnExist: !0
}), removeSync2(src);
}
module.exports = moveSync2;
}
});
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/index.js
var require_move2 = __commonJS({
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/index.js"(exports, module) {
"use strict";
init_cjs_shims();
var u = require_universalify().fromCallback;
module.exports = {
move: u(require_move()),
moveSync: require_move_sync()
};
}
});
// ../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js
var require_balanced_match = __commonJS({
"../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports, module) {
"use strict";
init_cjs_shims();
module.exports = balanced;
function balanced(a, b, str) {
a instanceof RegExp && (a = maybeMatch(a, str)), b instanceof RegExp && (b = maybeMatch(b, str));
var r = range(a, b, str);
return r && {
start: r[0],
end: r[1],
pre: str.slice(0, r[0]),
body: str.slice(r[0] + a.length, r[1]),
post: str.slice(r[1] + b.length)
};
}
function maybeMatch(reg, str) {
var m = str.match(reg);
return m ? m[0] : null;
}
balanced.range = range;
function range(a, b, str) {
var begs, beg, left, right, result, ai = str.indexOf(a), bi = str.indexOf(b, ai + 1), i = ai;
if (ai >= 0 && bi > 0) {
if (a === b)
return [ai, bi];
for (begs = [], left = str.length; i >= 0 && !result; )
i == ai ? (begs.push(i), ai = str.indexOf(a, i + 1)) : begs.length == 1 ? result = [begs.pop(), bi] : (beg = begs.pop(), beg < left && (left = beg, right = bi), bi = str.indexOf(b, i + 1)), i = ai < bi && ai >= 0 ? ai : bi;
begs.length && (result = [left, right]);
}
return result;
}
}
});
// ../../node_modules/.pnpm/brace-expansion@2.1.0/node_modules/brace-expansion/index.js
var require_brace_expansion = __commonJS({
"../../node_modules/.pnpm/brace-expansion@2.1.0/node_modules/brace-expansion/index.js"(exports, module) {
init_cjs_shims();
var balanced = require_balanced_match();
module.exports = expandTop;
var escSlash = "\0SLASH" + Math.random() + "\0", escOpen = "\0OPEN" + Math.random() + "\0", escClose = "\0CLOSE" + Math.random() + "\0", escComma = "\0COMMA" + Math.random() + "\0", escPeriod = "\0PERIOD" + Math.random() + "\0";
function numeric(str) {
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
}
function escapeBraces(str) {
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
}
function unescapeBraces(str) {
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
}
function parseCommaParts(str) {
if (!str)
return [""];
var parts = [], m = balanced("{", "}", str);
if (!m)
return str.split(",");
var pre = m.pre, body = m.body, post = m.post, p = pre.split(",");
p[p.length - 1] += "{" + body + "}";
var postParts = parseCommaParts(post);
return post.length && (p[p.length - 1] += postParts.shift(), p.push.apply(p, postParts)), parts.push.apply(parts, p), parts;
}
function expandTop(str, options) {
if (!str)
return [];
options = options || {};
var max = options.max == null ? 1 / 0 : options.max;
return str.substr(0, 2) === "{}" && (str = "\\{\\}" + str.substr(2)), expand2(escapeBraces(str), max, !0).map(unescapeBraces);
}
function embrace(str) {
return "{" + str + "}";
}
function isPadded(el) {
return /^-?0\d/.test(el);
}
function lte(i, y) {
return i <= y;
}
function gte(i, y) {
return i >= y;
}
function expand2(str, max, isTop) {
var expansions = [], m = balanced("{", "}", str);
if (!m) return [str];
var pre = m.pre, post = m.post.length ? expand2(m.post, max, !1) : [""];
if (/\$$/.test(m.pre))
for (var k = 0; k < post.length && k < max; k++) {
var expansion = pre + "{" + m.body + "}" + post[k];
expansions.push(expansion);
}
else {
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body), isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body), isSequence = isNumericSequence || isAlphaSequence, isOptions = m.body.indexOf(",") >= 0;
if (!isSequence && !isOptions)
return m.post.match(/,(?!,).*\}/) ? (str = m.pre + "{" + m.body + escClose + m.post, expand2(str, max, !0)) : [str];
var n;
if (isSequence)
n = m.body.split(/\.\./);
else if (n = parseCommaParts(m.body), n.length === 1 && (n = expand2(n[0], max, !1).map(embrace), n.length === 1))
return post.map(function(p) {
return m.pre + n[0] + p;
});
var N;
if (isSequence) {
var x = numeric(n[0]), y = numeric(n[1]), width = Math.max(n[0].length, n[1].length), incr = n.length == 3 ? Math.max(Math.abs(numeric(n[2])), 1) : 1, test = lte, reverse = y < x;
reverse && (incr *= -1, test = gte);
var pad = n.some(isPadded);
N = [];
for (var i = x; test(i, y); i += incr) {
var c;
if (isAlphaSequence)
c = String.fromCharCode(i), c === "\\" && (c = "");
else if (c = String(i), pad) {
var need = width - c.length;
if (need > 0) {
var z = new Array(need + 1).join("0");
i < 0 ? c = "-" + z + c.slice(1) : c = z + c;
}
}
N.push(c);
}
} else {
N = [];
for (var j = 0; j < n.length; j++)
N.push.apply(N, expand2(n[j], max, !1));
}
for (var j = 0; j < N.length; j++)
for (var k = 0; k < post.length && expansions.length < max; k++) {
var expansion = pre + N[j] + post[k];
(!isTop || isSequence || expansion) && expansions.push(expansion);
}
}
return expansions;
}
}
});
// ../cli-kit/dist/public/node/fs.js
init_cjs_shims();
// ../cli-kit/dist/public/node/output.js
init_cjs_shims();
// ../cli-kit/dist/public/node/is-global.js
init_cjs_shims();
import { realpathSync } from "fs";
var _isGlobal;
function currentProcessIsGlobal(argv = process.argv) {
try {
if (_isGlobal !== void 0 && !isUnitTest())
return _isGlobal;
let path4 = sniffForPath() ?? cwd(), projectDir = getProjectDir(path4);
if (!projectDir)
return !0;
let binDir = argv[1] ?? "";
return binDir ? (_isGlobal = !isSubpath(projectDir.trim(), binDir), _isGlobal) : !0;
} catch {
return !1;
}
}
async function installGlobalShopifyCLI(packageManager) {
let { outputInfo: outputInfo2 } = await import("./output-2RGSJNA6.js"), { exec } = await import("./system-KQM7CSD6.js"), args = packageManager === "yarn" ? ["global", "add", "@shopify/cli@latest"] : ["install", "-g", "@shopify/cli@latest"];
outputInfo2(`Running ${packageManager} ${args.join(" ")}...`), await exec(packageManager, args, { stdio: "inherit" });
}
async function installGlobalCLIPrompt() {
let { terminalSupportsPrompting } = await import("./system-KQM7CSD6.js");
if (!terminalSupportsPrompting())
return { install: !1, alreadyInstalled: !1 };
let { globalCLIVersion } = await import("./version-6CVFB4SF.js");
if (await globalCLIVersion())
return { install: !1, alreadyInstalled: !0 };
let { renderSelectPrompt } = await import("./ui-UAVSRCJ7.js");
return { install: await renderSelectPrompt({
message: "We recommend installing Shopify CLI globally in your system. Would you like to install it now?",
choices: [
{ value: "yes", label: "Yes" },
{ value: "no", label: "No, just for this project" }
]
}) === "yes", alreadyInstalled: !1 };
}
function inferPackageManagerForGlobalCLI(argv = process.argv, env2 = process.env) {
if (!currentProcessIsGlobal(argv))
return "unknown";
if (env2.SHOPIFY_HOMEBREW_FORMULA)
return "homebrew";
let processArgv = argv[1] ?? "", symlinkPath = processArgv.toLowerCase(), realPath = symlinkPath;
try {
realPath = realpathSync(processArgv).toLowerCase();
} catch {
}
let matches = (needle) => realPath.includes(needle) || symlinkPath.includes(needle);
return matches("yarn") ? "yarn" : matches("pnpm") ? "pnpm" : matches("bun") ? "bun" : realPath.includes("/cellar/") ? "homebrew" : "npm";
}
function getProjectDir(directory) {
let configFiles = ["shopify.app{,.*}.toml", "hydrogen.config.js", "hydrogen.config.ts"], existsConfigFile = (directory2) => {
let configPaths = globSync(configFiles.map((file) => joinPath(directory2, file)));
return configPaths.length > 0 ? configPaths[0] : void 0;
};
try {
let configFile = findPathUpSync(existsConfigFile, {
cwd: directory,
type: "file"
});
if (configFile)
return dirname(configFile);
} catch {
return;
}
}
// ../cli-kit/dist/public/node/colors.js
init_cjs_shims();
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
init_cjs_shims();
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
init_cjs_shims();
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, styles = {
modifier: {
reset: [0, 0],
// 21 isn't widely supported and 22 does the same thing
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
overline: [53, 55],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
// Bright color
blackBright: [90, 39],
gray: [90, 39],
// Alias of `blackBright`
grey: [90, 39],
// Alias of `blackBright`
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
// Bright color
bgBlackBright: [100, 49],
bgGray: [100, 49],
// Alias of `bgBlackBright`
bgGrey: [100, 49],
// Alias of `bgBlackBright`
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
}, modifierNames = Object.keys(styles.modifier), foregroundColorNames = Object.keys(styles.color), backgroundColorNames = Object.keys(styles.bgColor), colorNames = [...foregroundColorNames, ...backgroundColorNames];
function assembleStyles() {
let codes = /* @__PURE__ */ new Map();
for (let [groupName, group] of Object.entries(styles)) {
for (let [styleName, style] of Object.entries(group))
styles[styleName] = {
open: `\x1B[${style[0]}m`,
close: `\x1B[${style[1]}m`
}, group[styleName] = styles[styleName], codes.set(style[0], style[1]);
Object.defineProperty(styles, groupName, {
value: group,
enumerable: !1
});
}
return Object.defineProperty(styles, "codes", {
value: codes,
enumerable: !1
}), styles.color.close = "\x1B[39m", styles.bgColor.close = "\x1B[49m", styles.color.ansi = wrapAnsi16(), styles.color.ansi256 = wrapAnsi256(), styles.color.ansi16m = wrapAnsi16m(), styles.bgColor.ansi = wrapAnsi16(10), styles.bgColor.ansi256 = wrapAnsi256(10), styles.bgColor.ansi16m = wrapAnsi16m(10), Object.defineProperties(styles, {
rgbToAnsi256: {
value(red, green, blue) {
return red === green && green === blue ? red < 8 ? 16 : red > 248 ? 231 : Math.round((red - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
},
enumerable: !1
},
hexToRgb: {
value(hex) {
let matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
if (!matches)
return [0, 0, 0];
let [colorString] = matches;
colorString.length === 3 && (colorString = [...colorString].map((character) => character + character).join(""));
let integer = Number.parseInt(colorString, 16);
return [
/* eslint-disable no-bitwise */
integer >> 16 & 255,
integer >> 8 & 255,
integer & 255
/* eslint-enable no-bitwise */
];
},
enumerable: !1
},
hexToAnsi256: {
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
enumerable: !1
},
ansi256ToAnsi: {
value(code) {
if (code < 8)
return 30 + code;
if (code < 16)
return 90 + (code - 8);
let red, green, blue;
if (code >= 232)
red = ((code - 232) * 10 + 8) / 255, green = red, blue = red;
else {
code -= 16;
let remainder = code % 36;
red = Math.floor(code / 36) / 5, green = Math.floor(remainder / 6) / 5, blue = remainder % 6 / 5;
}
let value = Math.max(red, green, blue) * 2;
if (value === 0)
return 30;
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
return value === 2 && (result += 60), result;
},
enumerable: !1
},
rgbToAnsi: {
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
enumerable: !1
},
hexToAnsi: {
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
enumerable: !1
}
}), styles;
}
var ansiStyles = assembleStyles(), ansi_styles_default = ansiStyles;
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
init_cjs_shims();
import process2 from "node:process";
import os from "node:os";
import tty from "node:tty";
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
let prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--", position = argv.indexOf(prefix + flag), terminatorPosition = argv.indexOf("--");
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
}
var { env } = process2, flagForceColor;
hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never") ? flagForceColor = 0 : (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) && (flagForceColor = 1);
function envForceColor() {
if ("FORCE_COLOR" in env)
return env.FORCE_COLOR === "true" ? 1 : env.FORCE_COLOR === "false" ? 0 : env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
}
function translateLevel(level) {
return level === 0 ? !1 : {
level,
hasBasic: !0,
has256: level >= 2,
has16m: level >= 3
};
}
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = !0 } = {}) {
let noFlagForceColor = envForceColor();
noFlagForceColor !== void 0 && (flagForceColor = noFlagForceColor);
let forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
if (forceColor === 0)
return 0;
if (sniffFlags) {
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor"))
return 3;
if (hasFlag("color=256"))
return 2;
}
if ("TF_BUILD" in env && "AGENT_NAME" in env)
return 1;
if (haveStream && !streamIsTTY && forceColor === void 0)
return 0;
let min = forceColor || 0;
if (env.TERM === "dumb")
return min;
if (process2.platform === "win32") {
let osRelease = os.release().split(".");
return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
}
if ("CI" in env)
return ["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env) ? 3 : ["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship" ? 1 : min;
if ("TEAMCITY_VERSION" in env)
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
if (env.COLORTERM === "truecolor" || env.TERM === "xterm-kitty" || env.TERM === "xterm-ghostty" || env.TERM === "wezterm")
return 3;
if ("TERM_PROGRAM" in env) {
let version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
switch (env.TERM_PROGRAM) {
case "iTerm.app":
return version >= 3 ? 3 : 2;
case "Apple_Terminal":
return 2;
}
}
return /-256(color)?$/i.test(env.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM) || "COLORTERM" in env ? 1 : min;
}
function createSupportsColor(stream, options = {}) {
let level = _supportsColor(stream, {
streamIsTTY: stream && stream.isTTY,
...options
});
return translateLevel(level);
}
var supportsColor = {
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
}, supports_color_default = supportsColor;
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
init_cjs_shims();
function stringReplaceAll(string, substring, replacer) {
let index = string.indexOf(substring);
if (index === -1)
return string;
let substringLength = substring.length, endIndex = 0, returnValue = "";
do
returnValue += string.slice(endIndex, index) + substring + replacer, endIndex = index + substringLength, index = string.indexOf(substring, endIndex);
while (index !== -1);
return returnValue += string.slice(endIndex), returnValue;
}
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
let endIndex = 0, returnValue = "";
do {
let gotCR = string[index - 1] === "\r";
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
` : `
`) + postfix, endIndex = index + 1, index = string.indexOf(`
`, endIndex);
} while (index !== -1);
return returnValue += string.slice(endIndex), returnValue;
}
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default, GENERATOR = /* @__PURE__ */ Symbol("GENERATOR"), STYLER = /* @__PURE__ */ Symbol("STYLER"), IS_EMPTY = /* @__PURE__ */ Symbol("IS_EMPTY"), levelMapping = [
"ansi",
"ansi",
"ansi256",
"ansi16m"
], styles2 = /* @__PURE__ */ Object.create(null), applyOptions = (object, options = {}) => {
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3))
throw new Error("The `level` option should be an integer from 0 to 3");
let colorLevel = stdoutColor ? stdoutColor.level : 0;
object.level = options.level === void 0 ? colorLevel : options.level;
};
var chalkFactory = (options) => {
let chalk2 = (...strings) => strings.join(" ");
return applyOptions(chalk2, options), Object.setPrototypeOf(chalk2, createChalk.prototype), chalk2;
};
function createChalk(options) {
return chalkFactory(options);
}
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
for (let [styleName, style] of Object.entries(ansi_styles_default))
styles2[styleName] = {
get() {
let builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
return Object.defineProperty(this, styleName, { value: builder }), builder;
}
};
styles2.visible = {
get() {
let builder = createBuilder(this, this[STYLER], !0);
return Object.defineProperty(this, "visible", { value: builder }), builder;
}
};
var getModelAnsi = (model, level, type, ...arguments_) => model === "rgb" ? level === "ansi16m" ? ansi_styles_default[type].ansi16m(...arguments_) : level === "ansi256" ? ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_)) : ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_)) : model === "hex" ? getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_)) : ansi_styles_default[type][model](...arguments_), usedModels = ["rgb", "hex", "ansi256"];
for (let model of usedModels) {
styles2[model] = {
get() {
let { level } = this;
return function(...arguments_) {
let styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
return createBuilder(this, styler, this[IS_EMPTY]);
};
}
};
let bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
styles2[bgModel] = {
get() {
let { level } = this;
return function(...arguments_) {
let styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
return createBuilder(this, styler, this[IS_EMPTY]);
};
}
};
}
var proto = Object.defineProperties(() => {
}, {
...styles2,
level: {
enumerable: !0,
get() {
return this[GENERATOR].level;
},
set(level) {
this[GENERATOR].level = level;
}
}
}), createStyler = (open, close, parent) => {
let openAll, closeAll;
return parent === void 0 ? (openAll = open, closeAll = close) : (openAll = parent.openAll + open, closeAll = close + parent.closeAll), {
open,
close,
openAll,
closeAll,
parent
};
}, createBuilder = (self2, _styler, _isEmpty) => {
let builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
return Object.setPrototypeOf(builder, proto), builder[GENERATOR] = self2, builder[STYLER] = _styler, builder[IS_EMPTY] = _isEmpty, builder;
}, applyStyle = (self2, string) => {
if (self2.level <= 0 || !string)
return self2[IS_EMPTY] ? "" : string;
let styler = self2[STYLER];
if (styler === void 0)
return string;
let { openAll, closeAll } = styler;
if (string.includes("\x1B"))
for (; styler !== void 0; )
string = stringReplaceAll(string, styler.close, styler.open), styler = styler.parent;
let lfIndex = string.indexOf(`
`);
return lfIndex !== -1 && (string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex)), openAll + string + closeAll;
};
Object.defineProperties(createChalk.prototype, styles2);
var chalk = createChalk(), chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
var source_default = chalk;
// ../cli-kit/dist/private/node/content-tokens.js
init_cjs_shims();
// ../../node_modules/.pnpm/ansi-escapes@6.2.1/node_modules/ansi-escapes/index.js
init_cjs_shims();
import process3 from "node:process";
var ESC = "\x1B[", OSC = "\x1B]", BEL = "\x07", SEP = ";", isBrowser = typeof window < "u" && typeof window.document < "u", isTerminalApp = !isBrowser && process3.env.TERM_PROGRAM === "Apple_Terminal", isWindows = !isBrowser && process3.platform === "win32", cwdFunction = isBrowser ? () => {
throw new Error("`process.cwd()` only works in Node.js, not the browser.");
} : process3.cwd, ansiEscapes = {};
ansiEscapes.cursorTo = (x, y) => {
if (typeof x != "number")
throw new TypeError("The `x` argument is required");
return typeof y != "number" ? ESC + (x + 1) + "G" : ESC + (y + 1) + SEP + (x + 1) + "H";
};
ansiEscapes.cursorMove = (x, y) => {
if (typeof x != "number")
throw new TypeError("The `x` argument is required");
let returnValue = "";
return x < 0 ? returnValue += ESC + -x + "D" : x > 0 && (returnValue += ESC + x + "C"), y < 0 ? returnValue += ESC + -y + "A" : y > 0 && (returnValue += ESC + y + "B"), returnValue;
};
ansiEscapes.cursorUp = (count = 1) => ESC + count + "A";
ansiEscapes.cursorDown = (count = 1) => ESC + count + "B";
ansiEscapes.cursorForward = (count = 1) => ESC + count + "C";
ansiEscapes.cursorBackward = (count = 1) => ESC + count + "D";
ansiEscapes.cursorLeft = ESC + "G";
ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
ansiEscapes.cursorGetPosition = ESC + "6n";
ansiEscapes.cursorNextLine = ESC + "E";
ansiEscapes.cursorPrevLine = ESC + "F";
ansiEscapes.cursorHide = ESC + "?25l";
ansiEscapes.cursorShow = ESC + "?25h";
ansiEscapes.eraseLines = (count) => {
let clear = "";
for (let i = 0; i < count; i++)
clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : "");
return count && (clear += ansiEscapes.cursorLeft), clear;
};
ansiEscapes.eraseEndLine = ESC + "K";
ansiEscapes.eraseStartLine = ESC + "1K";
ansiEscapes.eraseLine = ESC + "2K";
ansiEscapes.eraseDown = ESC + "J";
ansiEscapes.eraseUp = ESC + "1J";
ansiEscapes.eraseScreen = ESC + "2J";
ansiEscapes.scrollUp = ESC + "S";
ansiEscapes.scrollDown = ESC + "T";
ansiEscapes.clearScreen = "\x1Bc";
ansiEscapes.clearTerminal = isWindows ? `${ansiEscapes.eraseScreen}${ESC}0f` : `${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
ansiEscapes.enterAlternativeScreen = ESC + "?1049h";
ansiEscapes.exitAlternativeScreen = ESC + "?1049l";
ansiEscapes.beep = BEL;
ansiEscapes.link = (text, url) => [
OSC,
"8",
SEP,
SEP,
url,
BEL,
text,
OSC,
"8",
SEP,
SEP,
BEL
].join("");
ansiEscapes.image = (buffer, options = {}) => {
let returnValue = `${OSC}1337;File=inline=1`;
return options.width && (returnValue += `;width=${options.width}`), options.height && (returnValue += `;height=${options.height}`), options.preserveAspectRatio === !1 && (returnValue += ";preserveAspectRatio=0"), returnValue + ":" + buffer.toString("base64") + BEL;
};
ansiEscapes.iTerm = {
setCwd: (cwd2 = cwdFunction()) => `${OSC}50;CurrentDir=${cwd2}${BEL}`,
annotation(message, options = {}) {
let returnValue = `${OSC}1337;`, hasX = typeof options.x < "u", hasY = typeof options.y < "u";
if ((hasX || hasY) && !(hasX && hasY && typeof options.length < "u"))
throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
return message = message.replace(/\|/g, ""), returnValue += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=", options.length > 0 ? returnValue += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|") : returnValue += message, returnValue + BEL;
}
};
var ansi_escapes_default = ansiEscapes;
// ../cli-kit/dist/private/node/content-tokens.js
var import_supports_hyperlinks = __toESM(require_supports_hyperlinks(), 1), ContentToken = class {
value;
constructor(value) {
this.value = value;
}
}, RawContentToken = class extends ContentToken {
output() {
return this.value;
}
}, LinkContentToken = class extends ContentToken {
link;
fallback;
constructor(value, link, fallback) {
super(value), this.link = link ?? stringifyMessage(value), this.fallback = fallback;
}
output() {
let text = source_default.green(stringifyMessage(this.value)), url = this.link ?? "", defaultFallback = this.value === this.link ? text : `${text} ( ${url} )`;
return import_supports_hyperlinks.default.stdout ? ansi_escapes_default.link(text, url) : this.fallback ?? defaultFallback;
}
}, CommandContentToken = class extends ContentToken {
output() {
return `\`${source_default.magentaBright(stringifyMessage(this.value))}\``;
}
}, jsonTokenRegex = /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g;
function colorJson(input) {
let object = typeof input == "string" ? JSON.parse(input) : input, colorized = JSON.stringify(object, void 0, 2).replace(jsonTokenRegex, (match2) => match2.startsWith('"') ? match2.endsWith(":") ? source_default.white(match2) : source_default.green(match2) : match2 === "true" || match2 === "false" ? source_default.cyan(match2) : match2 === "null" ? source_default.red(match2) : source_default.magenta(match2));
return source_default.yellow(colorized);
}
var JsonContentToken = class extends ContentToken {
output() {
try {
return colorJson(stringifyMessage(this.value) ?? {});
} catch {
return JSON.stringify(stringifyMessage(this.value) ?? {}, null, 2);
}
}
}, LinesDiffContentToken = class extends ContentToken {
output() {
return this.value.flatMap((part) => part.added ? part.value.split(/\n/).filter((line) => line !== "").map((line) => source_default.green(`+ ${line}
`)) : part.removed ? part.value.split(/\n/).filter((line) => line !== "").map((line) => source_default.magenta(`- ${line}
`)) : part.value);
}
}, ColorContentToken = class extends ContentToken {
color;
constructor(value, color) {
super(value), this.color = color;
}
output() {
return this.color(stringifyMessage(this.value));
}
}, ErrorContentToken = class extends ContentToken {
output() {
return source_default.bold.redBright(stringifyMessage(this.value));
}
}, PathContentToken = class extends ContentToken {
output() {
return relativizePath(stringifyMessage(this.value));
}
}, HeadingContentToken = class extends ContentToken {
output() {
return source_default.bold.underline(stringifyMessage(this.value));
}
}, SubHeadingContentToken = class extends ContentToken {
output() {
return source_default.underline(stringifyMessage(this.value));
}
}, ItalicContentToken = class extends ContentToken {
output() {
return source_default.italic(stringifyMessage(this.value));
}
};
// ../cli-kit/dist/private/node/ui/components/token-item.js
init_cjs_shims();
function tokenItemToString(token) {
return typeof token == "string" ? token : "command" in token ? token.command : "link" in token ? token.link.label || token.link.url : "char" in token ? token.char : "userInput" in token ? token.userInput : "subdued" in token ? token.subdued : "filePath" in token ? token.filePath : "list" in token ? token.list.items.map(tokenItemToString).join(" ") : "bold" in token ? token.bold : "info" in token ? token.info : "warn" in token ? token.warn : "error" in token ? token.error : token.map((item, index) => index !== 0 && !(typeof item != "string" && "char" in item) ? ` ${tokenItemToString(item)}` : tokenItemToString(item)).join("");
}
function appendToTokenItem(token, suffix) {
return Array.isArray(token) ? [...token, { char: suffix }] : [token, { char: suffix }];
}
// ../cli-kit/dist/private/node/output.js
init_cjs_shims();
function withOrWithoutStyle(message) {
return shouldDisplayColors() ? message : unstyled(message);
}
function consoleLog(message) {
process.stdout.write(`${withOrWithoutStyle(message)}
`);
}
function consoleWarn(message) {
process.stderr.write(`${withOrWithoutStyle(message)}
`);
}
function output(content, logLevel = "info", logger = consoleWarn) {
isUnitTest() && collectLog(logLevel, content);
let message = stringifyMessage(content);
outputWhereAppropriate(logLevel, logger, message);
}
// ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
init_cjs_shims();
// ../../node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
init_cjs_shims();
function ansiRegex({ onlyFirst = !1 } = {}) {
let pattern = "(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
return new RegExp(pattern, onlyFirst ? void 0 : "g");
}
// ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
var regex = ansiRegex();
function stripAnsi(string) {
if (typeof string != "string")
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
return !string.includes("\x1B") && !string.includes("\x9B") ? string : string.replace(regex, "");
}
// ../cli-kit/dist/public/node/output.js
import { Writable } from "stream";
var TokenizedString = class {
value;
constructor(value) {
this.value = value;
}
}, outputToken = {
raw(value) {
return new RawContentToken(value);
},
genericShellCommand(value) {
return new CommandContentToken(value);
},
json(value) {
return new JsonContentToken(value);
},
path(value) {
return new PathContentToken(value);
},
link(value, link, fallback) {
return new LinkContentToken(value, link, fallback);
},
heading(value) {
return new HeadingContentToken(value);
},
subheading(value) {
return new SubHeadingContentToken(value);
},
italic(value) {
return new ItalicContentToken(value);
},
errorText(value) {
return new ErrorContentToken(value);
},
cyan(value) {
return new ColorContentToken(value, source_default.cyan);
},
yellow(value) {
return new ColorContentToken(value, source_default.yellow);
},
magenta(value) {
return new ColorContentToken(value, source_default.magenta);
},
green(value) {
return new ColorContentToken(value, source_default.green);
},
gray(value) {
return new ColorContentToken(value, source_default.gray);
},
packagejsonScript(packageManager, scriptName, ...scriptArgs) {
return new CommandContentToken(formatPackageManagerCommand(packageManager, scriptName, ...scriptArgs));
},
successIcon() {
return new ColorContentToken("\u2714", source_default.green);
},
failIcon() {
return new ErrorContentToken("\u2716");
},
linesDiff(value) {
return new LinesDiffContentToken(value);
}
};
function formatPackageManagerCommand(packageManager, scriptName, ...scriptArgs) {
if (currentProcessIsGlobal())
return [scriptName, ...scriptArgs].join(" ");
switch (packageManager) {
case "pnpm":
case "bun":
case "yarn":
return [packageManager, scriptName, ...scriptArgs].join(" ");
case "npm": {
let pieces = ["npm", "run", scriptName];
return scriptArgs.length > 0 && (pieces.push("--"), pieces.push(...scriptArgs)), pieces.join(" ");
}
case "homebrew":
case "unknown":
return [scriptName, ...scriptArgs].join(" ");
}
}
function outputContent(strings, ...keys) {
let output2 = strings.reduce((acc, string, i) => {
let token = keys[i], tokenValue = "";
if (typeof token == "string")
tokenValue = token;
else if (token) {
let enumTokenOutput = token.output();
tokenValue = Array.isArray(enumTokenOutput) ? enumTokenOutput.join("") : enumTokenOutput;
}
return acc + string + tokenValue;
}, "");
return new TokenizedString(output2);
}
function logLevelValue(level) {
switch (level) {
case "trace":
return 10;
case "debug":
return 20;
case "info":
return 30;
case "warn":
return 40;
case "error":
return 50;
case "fatal":
return 60;
case "silent":
return 70;
}
}
function currentLogLevel() {
return isVerbose() ? "debug" : "info";
}
function shouldOutput(logLevel) {
if (isUnitTest())
return !1;
let currentLogLevelValue = logLevelValue(currentLogLevel());
return logLevelValue(logLevel) >= currentLogLevelValue;
}
var collectedLogs = {}, memoizedShouldDisplayColors;
function collectLog(key, content) {
let message = stripAnsi(stringifyMessage(content));
collectedLogs.output ??= [], collectedLogs[key] ??= [], collectedLogs.output.push(message), collectedLogs[key].push(message);
}
var clearCollectedLogs = () => {
collectedLogs = {};
};
function outputResult(content) {
output(content, "info", consoleLog);
}
function outputInfo(content, logger = consoleWarn) {
let message = stringifyMessage(content);
isUnitTest() && collectLog("info", content), outputWhereAppropriate("info", logger, message);
}
function outputSuccess(content, logger = consoleWarn) {
let message = source_default.bold(`\u2705 Success! ${stringifyMessage(content)}.`);
isUnitTest() && collectLog("success", content), outputWhereAppropriate("info", logger, message);
}
function outputCompleted(content, logger = consoleWarn) {
let message = `${source_default.green("\u2714")} ${stringifyMessage(content)}`;
isUnitTest() && collectLog("completed", content), outputWhereAppropriate("info", logger, message);
}
function outputDebug(content, logger = consoleWarn) {
if (isUnitTest() && collectLog("debug", content), !shouldOutput("debug"))
return;
let message = source_default.gray(stringifyMessage(content));
outputWhereAppropriate("debug", logger, `${(/* @__PURE__ */ new Date()).toISOString()}: ${message}`);
}
function outputWarn(content, logger = consoleWarn) {
isUnitTest() && collectLog("warn", content);
let message = source_default.yellow(stringifyMessage(content));
outputWhereAppropriate("warn", logger, message);
}
function outputNewline() {
consoleWarn("");
}
function stringifyMessage(message) {
return message instanceof TokenizedString ? message.value : message;
}
function itemToString(item) {
return tokenItemToString(item);
}
function outputWhereAppropriate(logLevel, logger, message) {
shouldOutput(logLevel) && (logger instanceof Writable ? logger.write(message) : logger(message, logLevel));
}
function unstyled(message) {
return message.includes("\x1B") ? stripAnsi(message) : message;
}
function shouldDisplayColors(_process = process) {
if (_process === process && memoizedShouldDisplayColors !== void 0)
return memoizedShouldDisplayColors;
let { env: env2, stdout } = _process, result = Object.hasOwnProperty.call(env2, "FORCE_COLOR") ? isTruthy(env2.FORCE_COLOR) : !!stdout.isTTY;
return _process === process && (memoizedShouldDisplayColors = result), result;
}
function formatSection(title, body) {
let formattedTitle = title.toUpperCase().padEnd(35);
return outputContent`${outputToken.heading(formattedTitle)}\n${body}`.value;
}
// ../cli-kit/dist/public/common/string.js
init_cjs_shims();
// ../cli-kit/dist/public/common/array.js
init_cjs_shims();
var import_uniqBy = __toESM(require_uniqBy()), import_difference = __toESM(require_difference());
function takeRandomFromArray(array) {
return array[Math.floor(Math.random() * array.length)];
}
function getArrayRejectingUndefined(array) {
return array.filter((item) => item !== void 0);
}
function getArrayContainsDuplicates(array) {
return array.length !== new Set(array).size;
}
function uniq(array) {
return Array.from(new Set(array));
}
function uniqBy(array, iteratee) {
return (0, import_uniqBy.default)(array, iteratee);
}
function asHumanFriendlyArray(items) {
return items.length < 2 ? items : items.reduce((acc, item, index) => (index === items.length - 1 ? acc.push("and") : index !== 0 && acc.push(", "), acc.push(item), acc), []);
}
// ../cli-kit/dist/public/common/string.js
var import_change_case = __toESM(require_dist15()), SAFE_RANDOM_BUSINESS_ADJECTIVES = [
"commercial",
"profitable",
"amortizable",
"branded",
"integrated",
"synergistic",
"consolidated",
"diversified",
"lean",
"niche",
"premium",
"luxury",
"scalable",
"optimized",
"empowered",
"international",
"beneficial",
"fruitful",
"extensive",
"lucrative",
"modern",
"stable",
"strategic",
"adaptive",
"efficient",
"growing",
"sustainable",
"innovative",
"regional",
"specialized",
"focused",
"pragmatic",
"ethical",
"flexible",
"competitive"
], SAFE_RANDOM_CREATIVE_ADJECTIVES = [
"bright",
"impactful",
"stylish",
"colorful",
"modern",
"minimal",
"trendy",
"creative",
"artistic",
"spectacular",
"glamorous",
"luxury",
"retro",
"nostalgic",
"comfy",
"polished",
"fabulous",
"balanced",
"monochrome",
"glitched",
"contrasted",
"elegant",
"textured",
"vibrant",
"harmonious",
"versatile",
"eclectic",
"futuristic",
"idealistic",
"intricate",
"bohemian",
"abstract",
"meticulous",
"refined",
"flamboyant"
], SAFE_RANDOM_BUSINESS_NOUNS = [
"account",
"consumer",
"customer",
"enterprise",
"business",
"venture",
"marketplace",
"revenue",
"vertical",
"portfolio",
"negotiation",
"shipping",
"demand",
"supply",
"growth",
"merchant",
"investment",
"shareholder",
"conversion",
"capital",
"projection",
"upside",
"trade",
"deal",
"merchandise",
"transaction",
"sale",
"franchise",
"subsidiary",
"logistics",
"sponsorship",
"partnership",
"tax",
"policy",
"outsource",
"equity",
"strategy",
"valuation",
"benchmark",
"metrics",
"duplication"
], SAFE_RANDOM_CREATIVE_NOUNS = [
"vibe",
"style",
"moment",
"mood",
"flavor",
"look",
"appearance",
"perspective",
"aspect",
"ambience",
"quality",
"backdrop",
"focus",
"tone",
"inspiration",
"imagery",
"aesthetics",
"palette",
"ornamentation",
"contrast",
"colorway",
"visuals",
"typography",
"composition",
"scale",
"symmetry",
"gradients",
"proportions",
"textures",
"harmony",
"shapes",
"patterns"
], NAME_FAMILIES = {
business: {
adjectives: SAFE_RANDOM_BUSINESS_ADJECTIVES,
nouns: SAFE_RANDOM_BUSINESS_NOUNS
},
creative: {
adjectives: SAFE_RANDOM_CREATIVE_ADJECTIVES,
nouns: SAFE_RANDOM_CREATIVE_NOUNS
}
};
function getRandomName(family = "business") {
return `${takeRandomFromArray(NAME_FAMILIES[family].adjectives)}-${takeRandomFromArray(NAME_FAMILIES[family].nouns)}`;
}
function capitalize(str) {
return str.substring(0, 1).toUpperCase() + str.substring(1);
}
function pluralize(items, plural, singular, none) {
return items.length === 1 ? singular(items[0]) : items.length > 1 ? plural(items) : none ? none() : "";
}
function tryParseInt(maybeInt) {
if (maybeInt === void 0)
return;
let asInt = Number.parseInt(maybeInt, 10);
return Number.isNaN(asInt) ? void 0 : asInt;
}
function slugify(str) {
return str.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
}
function camelize(input) {
return (0, import_change_case.camelCase)(input);
}
function capitalizeWords(input) {
return (0, import_change_case.capitalCase)(input);
}
function hyphenate(input) {
return (0, import_change_case.paramCase)(input);
}
function underscore(input) {
return (0, import_change_case.snakeCase)(input);
}
function constantize(input) {
return (0, import_change_case.constantCase)(input);
}
function formatDate(date) {
let components = date.toISOString().split("T"), dateString = components[0] ?? date.toDateString(), timeString = components[1]?.split(".")[0] ?? date.toTimeString();
return `${dateString} ${timeString}`;
}
function formatLocalDate(dateString) {
let dateObj = new Date(dateString), localDate = new Date(Date.UTC(dateObj.getFullYear(), dateObj.getMonth(), dateObj.getDate(), dateObj.getHours(), dateObj.getMinutes(), dateObj.getSeconds()));
return formatDate(localDate);
}
function joinWithAnd(items) {
return items.length === 0 ? "" : items.length === 1 ? `"${items[0]}"` : `${items.slice(0, -1).map((item) => `"${item}"`).join(", ")} and "${items[items.length - 1]}"`;
}
function pascalize(str) {
return (0, import_change_case.pascalCase)(str);
}
function normalizeDelimitedString(delimitedString, delimiter = ",") {
if (delimitedString)
return uniq(delimitedString.split(delimiter).map((item) => item.trim()).filter((item) => item !== "")).sort().join(delimiter);
}
function timeAgo(from, to) {
let seconds = Math.floor((to.getTime() - from.getTime()) / 1e3);
if (seconds < 60)
return `${formatTimeUnit(seconds, "second")} ago`;
let minutes = Math.floor(seconds / 60);
if (minutes < 60)
return `${formatTimeUnit(minutes, "minute")} ago`;
let hours = Math.floor(minutes / 60);
if (hours < 24)
return `${formatTimeUnit(hours, "hour")} ago`;
let days = Math.floor(hours / 24);
return `${formatTimeUnit(days, "day")} ago`;
}
function formatTimeUnit(count, unit) {
return `${count} ${unit}${count === 1 ? "" : "s"}`;
}
// ../cli-kit/dist/private/node/temp-dir.js
init_cjs_shims();
import { realpath } from "fs/promises";
import { tmpdir } from "os";
var systemTempDir = await realpath(tmpdir());
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/esm.mjs
init_cjs_shims();
var import_copy = __toESM(require_copy2(), 1), import_empty = __toESM(require_empty(), 1), import_ensure = __toESM(require_ensure(), 1), import_json = __toESM(require_json(), 1), import_mkdirs = __toESM(require_mkdirs(), 1), import_move = __toESM(require_move2(), 1), import_output_file = __toESM(require_output_file(), 1), import_path_exists = __toESM(require_path_exists(), 1), import_remove = __toESM(require_remove(), 1), copy = import_copy.default.copy, copySync = import_copy.default.copySync, emptyDirSync = import_empty.default.emptyDirSync, emptydirSync = import_empty.default.emptydirSync, emptyDir = import_empty.default.emptyDir, emptydir = import_empty.default.emptydir, createFile = import_ensure.default.createFile, createFileSync = import_ensure.default.createFileSync, ensureFile = import_ensure.default.ensureFile, ensureFileSync = import_ensure.default.ensureFileSync, createLink = import_ensure.default.createLink, createLinkSync = import_ensure.default.createLinkSync, ensureLink = import_ensure.default.ensureLink, ensureLinkSync = import_ensure.default.ensureLinkSync, createSymlink = import_ensure.default.createSymlink, createSymlinkSync = import_ensure.default.createSymlinkSync, ensureSymlink = import_ensure.default.ensureSymlink, ensureSymlinkSync = import_ensure.default.ensureSymlinkSync, readJson = import_json.default.readJson, readJSON = import_json.default.readJSON, readJsonSync = import_json.default.readJsonSync, readJSONSync = import_json.default.readJSONSync, writeJson = import_json.default.writeJson, writeJSON = import_json.default.writeJSON, writeJsonSync = import_json.default.writeJsonSync, writeJSONSync = import_json.default.writeJSONSync, outputJson = import_json.default.outputJson, outputJSON = import_json.default.outputJSON, outputJsonSync = import_json.default.outputJsonSync, outputJSONSync = import_json.default.outputJSONSync, mkdirs = import_mkdirs.default.mkdirs, mkdirsSync = import_mkdirs.default.mkdirsSync, mkdirp = import_mkdirs.default.mkdirp, mkdirpSync = import_mkdirs.default.mkdirpSync, ensureDir = import_mkdirs.default.ensureDir, ensureDirSync = import_mkdirs.default.ensureDirSync, move = import_move.default.move, moveSync = import_move.default.moveSync, outputFile = import_output_file.default.outputFile, outputFileSync = import_output_file.default.outputFileSync, pathExists = import_path_exists.default.pathExists, pathExistsSync = import_path_exists.default.pathExistsSync, remove = import_remove.default.remove, removeSync = import_remove.default.removeSync, esm_default = {
...import_copy.default,
...import_empty.default,
...import_ensure.default,
...import_json.default,
...import_mkdirs.default,
...import_move.default,
...import_output_file.default,
...import_path_exists.default,
...import_remove.default
};
// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
init_cjs_shims();
import path2 from "node:path";
import { fileURLToPath as fileURLToPath2 } from "node:url";
// ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
init_cjs_shims();
import process4 from "node:process";
import path from "node:path";
import fs, { promises as fsPromises } from "node:fs";
import { fileURLToPath } from "node:url";
// ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
init_cjs_shims();
// ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
init_cjs_shims();
// ../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
init_cjs_shims();
var Node = class {
value;
next;
constructor(value) {
this.value = value;
}
}, Queue = class {
#head;
#tail;
#size;
constructor() {
this.clear();
}
enqueue(value) {
let node = new Node(value);
this.#head ? (this.#tail.next = node, this.#tail = node) : (this.#head = node, this.#tail = node), this.#size++;
}
dequeue() {
let current = this.#head;
if (current)
return this.#head = this.#head.next, this.#size--, this.#head || (this.#tail = void 0), current.value;
}
peek() {
if (this.#head)
return this.#head.value;
}
clear() {
this.#head = void 0, this.#tail = void 0, this.#size = 0;
}
get size() {
return this.#size;
}
*[Symbol.iterator]() {
let current = this.#head;
for (; current; )
yield current.value, current = current.next;
}
*drain() {
for (; this.#head; )
yield this.dequeue();
}
};
// ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
function pLimit(concurrency) {
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0))
throw new TypeError("Expected `concurrency` to be a number from 1 and up");
let queue = new Queue(), activeCount = 0, next = () => {
activeCount--, queue.size > 0 && queue.dequeue()();
}, run = async (fn, resolve, args) => {
activeCount++;
let result = (async () => fn(...args))();
resolve(result);
try {
await result;
} catch {
}
next();
}, enqueue = (fn, resolve, args) => {
queue.enqueue(run.bind(void 0, fn, resolve, args)), (async () => (await Promise.resolve(), activeCount < concurrency && queue.size > 0 && queue.dequeue()()))();
}, generator = (fn, ...args) => new Promise((resolve) => {
enqueue(fn, resolve, args);
});
return Object.defineProperties(generator, {
activeCount: {
get: () => activeCount
},
pendingCount: {
get: () => queue.size
},
clearQueue: {
value: () => {
queue.clear();
}
}
}), generator;
}
// ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
var EndError = class extends Error {
constructor(value) {
super(), this.value = value;
}
}, testElement = async (element, tester) => tester(await element), finder = async (element) => {
let values = await Promise.all(element);
if (values[1] === !0)
throw new EndError(values[0]);
return !1;
};
async function pLocate(iterable, tester, {
concurrency = Number.POSITIVE_INFINITY,
preserveOrder = !0
} = {}) {
let limit = pLimit(concurrency), items = [...iterable].map((element) => [element, limit(testElement, element, tester)]), checkLimit = pLimit(preserveOrder ? 1 : Number.POSITIVE_INFINITY);
try {
await Promise.all(items.map((element) => checkLimit(finder, element)));
} catch (error) {
if (error instanceof EndError)
return error.value;
throw error;
}
}
// ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
var typeMappings = {
directory: "isDirectory",
file: "isFile"
};
function checkType(type) {
if (!Object.hasOwnProperty.call(typeMappings, type))
throw new Error(`Invalid type specified: ${type}`);
}
var matchType = (type, stat) => stat[typeMappings[type]](), toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
async function locatePath(paths, {
cwd: cwd2 = process4.cwd(),
type = "file",
allowSymlinks = !0,
concurrency,
preserveOrder
} = {}) {
checkType(type), cwd2 = toPath(cwd2);
let statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;
return pLocate(paths, async (path_) => {
try {
let stat = await statFunction(path.resolve(cwd2, path_));
return matchType(type, stat);
} catch {
return !1;
}
}, { concurrency, preserveOrder });
}
function locatePathSync(paths, {
cwd: cwd2 = process4.cwd(),
type = "file",
allowSymlinks = !0
} = {}) {
checkType(type), cwd2 = toPath(cwd2);
let statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;
for (let path_ of paths)
try {
let stat = statFunction(path.resolve(cwd2, path_), {
throwIfNoEntry: !1
});
if (!stat)
continue;
if (matchType(type, stat))
return path_;
} catch {
}
}
// ../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js
init_cjs_shims();
// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
var toPath2 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath2(urlOrPath) : urlOrPath, findUpStop = /* @__PURE__ */ Symbol("findUpStop");
async function findUpMultiple(name, options = {}) {
let directory = path2.resolve(toPath2(options.cwd) || ""), { root } = path2.parse(directory), stopAt = path2.resolve(directory, options.stopAt || root), limit = options.limit || Number.POSITIVE_INFINITY, paths = [name].flat(), runMatcher = async (locateOptions) => {
if (typeof name != "function")
return locatePath(paths, locateOptions);
let foundPath = await name(locateOptions.cwd);
return typeof foundPath == "string" ? locatePath([foundPath], locateOptions) : foundPath;
}, matches = [];
for (; ; ) {
let foundPath = await runMatcher({ ...options, cwd: directory });
if (foundPath === findUpStop || (foundPath && matches.push(path2.resolve(directory, foundPath)), directory === stopAt || matches.length >= limit))
break;
directory = path2.dirname(directory);
}
return matches;
}
function findUpMultipleSync(name, options = {}) {
let directory = path2.resolve(toPath2(options.cwd) || ""), { root } = path2.parse(directory), stopAt = options.stopAt || root, limit = options.limit || Number.POSITIVE_INFINITY, paths = [name].flat(), runMatcher = (locateOptions) => {
if (typeof name != "function")
return locatePathSync(paths, locateOptions);
let foundPath = name(locateOptions.cwd);
return typeof foundPath == "string" ? locatePathSync([foundPath], locateOptions) : foundPath;
}, matches = [];
for (; ; ) {
let foundPath = runMatcher({ ...options, cwd: directory });
if (foundPath === findUpStop || (foundPath && matches.push(path2.resolve(directory, foundPath)), directory === stopAt || matches.length >= limit))
break;
directory = path2.dirname(directory);
}
return matches;
}
async function findUp(name, options = {}) {
return (await findUpMultiple(name, { ...options, limit: 1 }))[0];
}
function findUpSync(name, options = {}) {
return findUpMultipleSync(name, { ...options, limit: 1 })[0];
}
// ../../node_modules/.pnpm/minimatch@9.0.9/node_modules/minimatch/dist/esm/index.js
init_cjs_shims();
var import_brace_expansion = __toESM(require_brace_expansion(), 1);
// ../../node_modules/.pnpm/minimatch@9.0.9/node_modules/minimatch/dist/esm/assert-valid-pattern.js
init_cjs_shims();
var assertValidPattern = (pattern) => {
if (typeof pattern != "string")
throw new TypeError("invalid pattern");
if (pattern.length > 65536)
throw new TypeError("pattern is too long");
};
// ../../node_modules/.pnpm/minimatch@9.0.9/node_modules/minimatch/dist/esm/ast.js
init_cjs_shims();
// ../../node_modules/.pnpm/minimatch@9.0.9/node_modules/minimatch/dist/esm/brace-expressions.js
init_cjs_shims();
var posixClasses = {
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
"[:alpha:]": ["\\p{L}\\p{Nl}", !0],
"[:ascii:]": ["\\x00-\\x7f", !1],
"[:blank:]": ["\\p{Zs}\\t", !0],
"[:cntrl:]": ["\\p{Cc}", !0],
"[:digit:]": ["\\p{Nd}", !0],
"[:graph:]": ["\\p{Z}\\p{C}", !0, !0],
"[:lower:]": ["\\p{Ll}", !0],
"[:print:]": ["\\p{C}", !0],
"[:punct:]": ["\\p{P}", !0],
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", !0],
"[:upper:]": ["\\p{Lu}", !0],
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
"[:xdigit:]": ["A-Fa-f0-9", !1]
}, braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&"), regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), rangesToString = (ranges) => ranges.join(""), parseClass = (glob2, position) => {
let pos = position;
if (glob2.charAt(pos) !== "[")
throw new Error("not in a brace expression");
let ranges = [], negs = [], i = pos + 1, sawStart = !1, uflag = !1, escaping = !1, negate = !1, endPos = pos, rangeStart = "";
WHILE: for (; i < glob2.length; ) {
let c = glob2.charAt(i);
if ((c === "!" || c === "^") && i === pos + 1) {
negate = !0, i++;
continue;
}
if (c === "]" && sawStart && !escaping) {
endPos = i + 1;
break;
}
if (sawStart = !0, c === "\\" && !escaping) {
escaping = !0, i++;
continue;
}
if (c === "[" && !escaping) {
for (let [cls, [unip, u, neg]] of Object.entries(posixClasses))
if (glob2.startsWith(cls, i)) {
if (rangeStart)
return ["$.", !1, glob2.length - pos, !0];
i += cls.length, neg ? negs.push(unip) : ranges.push(unip), uflag = uflag || u;
continue WHILE;
}
}
if (escaping = !1, rangeStart) {
c > rangeStart ? ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c)) : c === rangeStart && ranges.push(braceEscape(c)), rangeStart = "", i++;
continue;
}
if (glob2.startsWith("-]", i + 1)) {
ranges.push(braceEscape(c + "-")), i += 2;
continue;
}
if (glob2.startsWith("-", i + 1)) {
rangeStart = c, i += 2;
continue;
}
ranges.push(braceEscape(c)), i++;
}
if (endPos < i)
return ["", !1, 0, !1];
if (!ranges.length && !negs.length)
return ["$.", !1, glob2.length - pos, !0];
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
let r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
return [regexpEscape(r), !1, endPos - pos, !1];
}
let sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]", snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
return [ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs, uflag, endPos - pos, !0];
};
// ../../node_modules/.pnpm/minimatch@9.0.9/node_modules/minimatch/dist/esm/unescape.js
init_cjs_shims();
var unescape = (s, { windowsPathsNoEscape = !1 } = {}) => windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
// ../../node_modules/.pnpm/minimatch@9.0.9/node_modules/minimatch/dist/esm/ast.js
var _a, types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), isExtglobType = (c) => types.has(c), isExtglobAST = (c) => isExtglobType(c.type), adoptionMap = /* @__PURE__ */ new Map([
["!", ["@"]],
["?", ["?", "@"]],
["@", ["@"]],
["*", ["*", "+", "?", "@"]],
["+", ["+", "@"]]
]), adoptionWithSpaceMap = /* @__PURE__ */ new Map([
["!", ["?"]],
["@", ["?"]],
["+", ["?", "*"]]
]), adoptionAnyMap = /* @__PURE__ */ new Map([
["!", ["?", "@"]],
["?", ["?", "@"]],
["@", ["?", "@"]],
["*", ["*", "+", "?", "@"]],
["+", ["+", "@", "?", "*"]]
]), usurpMap = /* @__PURE__ */ new Map([
["!", /* @__PURE__ */ new Map([["!", "@"]])],
["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
["@", /* @__PURE__ */ new Map([["!", "!"], ["?", "?"], ["@", "@"], ["*", "*"], ["+", "+"]])],
["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
]), startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))", startNoDot = "(?!\\.)", addPatternStart = /* @__PURE__ */ new Set(["[", "."]), justDots = /* @__PURE__ */ new Set(["..", "."]), reSpecials = new Set("().*{}+?[]^$\\!"), regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), qmark = "[^/]", star = qmark + "*?", starNoEmpty = qmark + "+?", AST = class {
type;
#root;
#hasMagic;
#uflag = !1;
#parts = [];
#parent;
#parentIndex;
#negs;
#filledNegs = !1;
#options;
#toString;
// set to true if it's an extglob with no children
// (which really means one child of '')
#emptyExt = !1;
constructor(type, parent, options = {}) {
this.type = type, type && (this.#hasMagic = !0), this.#parent = parent, this.#root = this.#parent ? this.#parent.#root : this, this.#options = this.#root === this ? options : this.#root.#options, this.#negs = this.#root === this ? [] : this.#root.#negs, type === "!" && !this.#root.#filledNegs && this.#negs.push(this), this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
}
get hasMagic() {
if (this.#hasMagic !== void 0)
return this.#hasMagic;
for (let p of this.#parts)
if (typeof p != "string" && (p.type || p.hasMagic))
return this.#hasMagic = !0;
return this.#hasMagic;
}
// reconstructs the pattern
toString() {
return this.#toString !== void 0 ? this.#toString : this.type ? this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")" : this.#toString = this.#parts.map((p) => String(p)).join("");
}
#fillNegs() {
if (this !== this.#root)
throw new Error("should only call on root");
if (this.#filledNegs)
return this;
this.toString(), this.#filledNegs = !0;
let n;
for (; n = this.#negs.pop(); ) {
if (n.type !== "!")
continue;
let p = n, pp = p.#parent;
for (; pp; ) {
for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++)
for (let part of n.#parts) {
if (typeof part == "string")
throw new Error("string part in extglob AST??");
part.copyIn(pp.#parts[i]);
}
p = pp, pp = p.#parent;
}
}
return this;
}
push(...parts) {
for (let p of parts)
if (p !== "") {
if (typeof p != "string" && !(p instanceof _a && p.#parent === this))
throw new Error("invalid part: " + p);
this.#parts.push(p);
}
}
toJSON() {
let ret = this.type === null ? this.#parts.slice().map((p) => typeof p == "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())];
return this.isStart() && !this.type && ret.unshift([]), this.isEnd() && (this === this.#root || this.#root.#filledNegs && this.#parent?.type === "!") && ret.push({}), ret;
}
isStart() {
if (this.#root === this)
return !0;
if (!this.#parent?.isStart())
return !1;
if (this.#parentIndex === 0)
return !0;
let p = this.#parent;
for (let i = 0; i < this.#parentIndex; i++) {
let pp = p.#parts[i];
if (!(pp instanceof _a && pp.type === "!"))
return !1;
}
return !0;
}
isEnd() {
if (this.#root === this || this.#parent?.type === "!")
return !0;
if (!this.#parent?.isEnd())
return !1;
if (!this.type)
return this.#parent?.isEnd();
let pl = this.#parent ? this.#parent.#parts.length : 0;
return this.#parentIndex === pl - 1;
}
copyIn(part) {
typeof part == "string" ? this.push(part) : this.push(part.clone(this));
}
clone(parent) {
let c = new _a(this.type, parent);
for (let p of this.#parts)
c.copyIn(p);
return c;
}
static #parseAST(str, ast, pos, opt, extDepth) {
let maxDepth = opt.maxExtglobRecursion ?? 2, escaping = !1, inBrace = !1, braceStart = -1, braceNeg = !1;
if (ast.type === null) {
let i2 = pos, acc2 = "";
for (; i2 < str.length; ) {
let c = str.charAt(i2++);
if (escaping || c === "\\") {
escaping = !escaping, acc2 += c;
continue;
}
if (inBrace) {
i2 === braceStart + 1 ? (c === "^" || c === "!") && (braceNeg = !0) : c === "]" && !(i2 === braceStart + 2 && braceNeg) && (inBrace = !1), acc2 += c;
continue;
} else if (c === "[") {
inBrace = !0, braceStart = i2, braceNeg = !1, acc2 += c;
continue;
}
if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth) {
ast.push(acc2), acc2 = "";
let ext2 = new _a(c, ast);
i2 = _a.#parseAST(str, ext2, i2, opt, extDepth + 1), ast.push(ext2);
continue;
}
acc2 += c;
}
return ast.push(acc2), i2;
}
let i = pos + 1, part = new _a(null, ast), parts = [], acc = "";
for (; i < str.length; ) {
let c = str.charAt(i++);
if (escaping || c === "\\") {
escaping = !escaping, acc += c;
continue;
}
if (inBrace) {
i === braceStart + 1 ? (c === "^" || c === "!") && (braceNeg = !0) : c === "]" && !(i === braceStart + 2 && braceNeg) && (inBrace = !1), acc += c;
continue;
} else if (c === "[") {
inBrace = !0, braceStart = i, braceNeg = !1, acc += c;
continue;
}
if (isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
(extDepth <= maxDepth || ast && ast.#canAdoptType(c))) {
let depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
part.push(acc), acc = "";
let ext2 = new _a(c, part);
part.push(ext2), i = _a.#parseAST(str, ext2, i, opt, extDepth + depthAdd);
continue;
}
if (c === "|") {
part.push(acc), acc = "", parts.push(part), part = new _a(null, ast);
continue;
}
if (c === ")")
return acc === "" && ast.#parts.length === 0 && (ast.#emptyExt = !0), part.push(acc), acc = "", ast.push(...parts, part), i;
acc += c;
}
return ast.type = null, ast.#hasMagic = void 0, ast.#parts = [str.substring(pos - 1)], i;
}
#canAdoptWithSpace(child) {
return this.#canAdopt(child, adoptionWithSpaceMap);
}
#canAdopt(child, map = adoptionMap) {
if (!child || typeof child != "object" || child.type !== null || child.#parts.length !== 1 || this.type === null)
return !1;
let gc = child.#parts[0];
return !gc || typeof gc != "object" || gc.type === null ? !1 : this.#canAdoptType(gc.type, map);
}
#canAdoptType(c, map = adoptionAnyMap) {
return !!map.get(this.type)?.includes(c);
}
#adoptWithSpace(child, index) {
let gc = child.#parts[0], blank = new _a(null, gc, this.options);
blank.#parts.push(""), gc.push(blank), this.#adopt(child, index);
}
#adopt(child, index) {
let gc = child.#parts[0];
this.#parts.splice(index, 1, ...gc.#parts);
for (let p of gc.#parts)
typeof p == "object" && (p.#parent = this);
this.#toString = void 0;
}
#canUsurpType(c) {
return !!usurpMap.get(this.type)?.has(c);
}
#canUsurp(child) {
if (!child || typeof child != "object" || child.type !== null || child.#parts.length !== 1 || this.type === null || this.#parts.length !== 1)
return !1;
let gc = child.#parts[0];
return !gc || typeof gc != "object" || gc.type === null ? !1 : this.#canUsurpType(gc.type);
}
#usurp(child) {
let m = usurpMap.get(this.type), gc = child.#parts[0], nt = m?.get(gc.type);
if (!nt)
return !1;
this.#parts = gc.#parts;
for (let p of this.#parts)
typeof p == "object" && (p.#parent = this);
this.type = nt, this.#toString = void 0, this.#emptyExt = !1;
}
#flatten() {
if (isExtglobAST(this)) {
let iterations = 0, done = !1;
do {
done = !0;
for (let i = 0; i < this.#parts.length; i++) {
let c = this.#parts[i];
typeof c == "object" && (c.#flatten(), this.#canAdopt(c) ? (done = !1, this.#adopt(c, i)) : this.#canAdoptWithSpace(c) ? (done = !1, this.#adoptWithSpace(c, i)) : this.#canUsurp(c) && (done = !1, this.#usurp(c)));
}
} while (!done && ++iterations < 10);
} else
for (let p of this.#parts)
typeof p == "object" && p.#flatten();
this.#toString = void 0;
}
static fromGlob(pattern, options = {}) {
let ast = new _a(null, void 0, options);
return _a.#parseAST(pattern, ast, 0, options, 0), ast;
}
// returns the regular expression if there's magic, or the unescaped
// string if not.
toMMPattern() {
if (this !== this.#root)
return this.#root.toMMPattern();
let glob2 = this.toString(), [re, body, hasMagic, uflag] = this.toRegExpSource();
if (!(hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob2.toUpperCase() !== glob2.toLowerCase()))
return body;
let flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : "");
return Object.assign(new RegExp(`^${re}$`, flags), {
_src: re,
_glob: glob2
});
}
get options() {
return this.#options;
}
// returns the string match, the regexp source, whether there's magic
// in the regexp (so a regular expression is required) and whether or
// not the uflag is needed for the regular expression (for posix classes)
// TODO: instead of injecting the start/end at this point, just return
// the BODY of the regexp, along with the start/end portions suitable
// for binding the start/end in either a joined full-path makeRe context
// (where we bind to (^|/), or a standalone matchPart context (where
// we bind to ^, and not /). Otherwise slashes get duped!
//
// In part-matching mode, the start is:
// - if not isStart: nothing
// - if traversal possible, but not allowed: ^(?!\.\.?$)
// - if dots allowed or not possible: ^
// - if dots possible and not allowed: ^(?!\.)
// end is:
// - if not isEnd(): nothing
// - else: $
//
// In full-path matching mode, we put the slash at the START of the
// pattern, so start is:
// - if first pattern: same as part-matching mode
// - if not isStart(): nothing
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
// - if dots allowed or not possible: /
// - if dots possible and not allowed: /(?!\.)
// end is:
// - if last pattern, same as part-matching mode
// - else nothing
//
// Always put the (?:$|/) on negated tails, though, because that has to be
// there to bind the end of the negated pattern portion, and it's easier to
// just stick it in now rather than try to inject it later in the middle of
// the pattern.
//
// We can just always return the same end, and leave it up to the caller
// to know whether it's going to be used joined or in parts.
// And, if the start is adjusted slightly, can do the same there:
// - if not isStart: nothing
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
// - if dots allowed or not possible: (?:/|^)
// - if dots possible and not allowed: (?:/|^)(?!\.)
//
// But it's better to have a simpler binding without a conditional, for
// performance, so probably better to return both start options.
//
// Then the caller just ignores the end if it's not the first pattern,
// and the start always gets applied.
//
// But that's always going to be $ if it's the ending pattern, or nothing,
// so the caller can just attach $ at the end of the pattern when building.
//
// So the todo is:
// - better detect what kind of start is needed
// - return both flavors of starting pattern
// - attach $ at the end of the pattern when creating the actual RegExp
//
// Ah, but wait, no, that all only applies to the root when the first pattern
// is not an extglob. If the first pattern IS an extglob, then we need all
// that dot prevention biz to live in the extglob portions, because eg
// +(*|.x*) can match .xy but not .yx.
//
// So, return the two flavors if it's #root and the first child is not an
// AST, otherwise leave it to the child AST to handle it, and there,
// use the (?:^|/) style of start binding.
//
// Even simplified further:
// - Since the start for a join is eg /(?!\.) and the start for a part
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
// or start or whatever) and prepend ^ or / at the Regexp construction.
toRegExpSource(allowDot) {
let dot = allowDot ?? !!this.#options.dot;
if (this.#root === this && (this.#flatten(), this.#fillNegs()), !isExtglobAST(this)) {
let noEmpty = this.isStart() && this.isEnd(), src = this.#parts.map((p) => {
let [re, _, hasMagic, uflag] = typeof p == "string" ? _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
return this.#hasMagic = this.#hasMagic || hasMagic, this.#uflag = this.#uflag || uflag, re;
}).join(""), start2 = "";
if (this.isStart() && typeof this.#parts[0] == "string" && !(this.#parts.length === 1 && justDots.has(this.#parts[0]))) {
let aps = addPatternStart, needNoTrav = (
// dots are allowed, and the pattern starts with [ or .
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
), needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
}
let end = "";
return this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!" && (end = "(?:$|\\/)"), [
start2 + src + end,
unescape(src),
this.#hasMagic = !!this.#hasMagic,
this.#uflag
];
}
let repeated = this.type === "*" || this.type === "+", start = this.type === "!" ? "(?:(?!(?:" : "(?:", body = this.#partsToRegExp(dot);
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
let s = this.toString(), me = this;
return me.#parts = [s], me.type = null, me.#hasMagic = void 0, [s, unescape(this.toString()), !1, !1];
}
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(!0);
bodyDotAllowed === body && (bodyDotAllowed = ""), bodyDotAllowed && (body = `(?:${body})(?:${bodyDotAllowed})*?`);
let final = "";
if (this.type === "!" && this.#emptyExt)
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
else {
let close = this.type === "!" ? (
// !() must match something,but !(x) can match ''
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? ")?" : `)${this.type}`;
final = start + body + close;
}
return [
final,
unescape(body),
this.#hasMagic = !!this.#hasMagic,
this.#uflag
];
}
#partsToRegExp(dot) {
return this.#parts.map((p) => {
if (typeof p == "string")
throw new Error("string type in extglob ast??");
let [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
return this.#uflag = this.#uflag || uflag, re;
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
}
static #parseGlob(glob2, hasMagic, noEmpty = !1) {
let escaping = !1, re = "", uflag = !1, inStar = !1;
for (let i = 0; i < glob2.length; i++) {
let c = glob2.charAt(i);
if (escaping) {
escaping = !1, re += (reSpecials.has(c) ? "\\" : "") + c, inStar = !1;
continue;
}
if (c === "\\") {
i === glob2.length - 1 ? re += "\\\\" : escaping = !0;
continue;
}
if (c === "[") {
let [src, needUflag, consumed, magic] = parseClass(glob2, i);
if (consumed) {
re += src, uflag = uflag || needUflag, i += consumed - 1, hasMagic = hasMagic || magic, inStar = !1;
continue;
}
}
if (c === "*") {
if (inStar)
continue;
inStar = !0, re += noEmpty && /^[*]+$/.test(glob2) ? starNoEmpty : star, hasMagic = !0;
continue;
} else
inStar = !1;
if (c === "?") {
re += qmark, hasMagic = !0;
continue;
}
re += regExpEscape(c);
}
return [re, unescape(glob2), !!hasMagic, uflag];
}
};
_a = AST;
// ../../node_modules/.pnpm/minimatch@9.0.9/node_modules/minimatch/dist/esm/escape.js
init_cjs_shims();
var escape = (s, { windowsPathsNoEscape = !1 } = {}) => windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
// ../../node_modules/.pnpm/minimatch@9.0.9/node_modules/minimatch/dist/esm/index.js
var minimatch = (p, pattern, options = {}) => (assertValidPattern(pattern), !options.nocomment && pattern.charAt(0) === "#" ? !1 : new Minimatch(pattern, options).match(p)), starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/, starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2), starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2), starDotExtTestNocase = (ext2) => (ext2 = ext2.toLowerCase(), (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2)), starDotExtTestNocaseDot = (ext2) => (ext2 = ext2.toLowerCase(), (f) => f.toLowerCase().endsWith(ext2)), starDotStarRE = /^\*+\.\*+$/, starDotStarTest = (f) => !f.startsWith(".") && f.includes("."), starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes("."), dotStarRE = /^\.\*+$/, dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith("."), starRE = /^\*+$/, starTest = (f) => f.length !== 0 && !f.startsWith("."), starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..", qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/, qmarksTestNocase = ([$0, ext2 = ""]) => {
let noext = qmarksTestNoExt([$0]);
return ext2 ? (ext2 = ext2.toLowerCase(), (f) => noext(f) && f.toLowerCase().endsWith(ext2)) : noext;
}, qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
let noext = qmarksTestNoExtDot([$0]);
return ext2 ? (ext2 = ext2.toLowerCase(), (f) => noext(f) && f.toLowerCase().endsWith(ext2)) : noext;
}, qmarksTestDot = ([$0, ext2 = ""]) => {
let noext = qmarksTestNoExtDot([$0]);
return ext2 ? (f) => noext(f) && f.endsWith(ext2) : noext;
}, qmarksTest = ([$0, ext2 = ""]) => {
let noext = qmarksTestNoExt([$0]);
return ext2 ? (f) => noext(f) && f.endsWith(ext2) : noext;
}, qmarksTestNoExt = ([$0]) => {
let len = $0.length;
return (f) => f.length === len && !f.startsWith(".");
}, qmarksTestNoExtDot = ([$0]) => {
let len = $0.length;
return (f) => f.length === len && f !== "." && f !== "..";
}, defaultPlatform = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", path3 = {
win32: { sep: "\\" },
posix: { sep: "/" }
}, sep2 = defaultPlatform === "win32" ? path3.win32.sep : path3.posix.sep;
minimatch.sep = sep2;
var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
minimatch.GLOBSTAR = GLOBSTAR;
var qmark2 = "[^/]", star2 = qmark2 + "*?", twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?", filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
minimatch.filter = filter;
var ext = (a, b = {}) => Object.assign({}, a, b), defaults = (def) => {
if (!def || typeof def != "object" || !Object.keys(def).length)
return minimatch;
let orig = minimatch;
return Object.assign((p, pattern, options = {}) => orig(p, pattern, ext(def, options)), {
Minimatch: class extends orig.Minimatch {
constructor(pattern, options = {}) {
super(pattern, ext(def, options));
}
static defaults(options) {
return orig.defaults(ext(def, options)).Minimatch;
}
},
AST: class extends orig.AST {
/* c8 ignore start */
constructor(type, parent, options = {}) {
super(type, parent, ext(def, options));
}
/* c8 ignore stop */
static fromGlob(pattern, options = {}) {
return orig.AST.fromGlob(pattern, ext(def, options));
}
},
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
defaults: (options) => orig.defaults(ext(def, options)),
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
sep: orig.sep,
GLOBSTAR
});
};
minimatch.defaults = defaults;
var braceExpand = (pattern, options = {}) => (assertValidPattern(pattern), options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern) ? [pattern] : (0, import_brace_expansion.default)(pattern));
minimatch.braceExpand = braceExpand;
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
minimatch.makeRe = makeRe;
var match = (list, pattern, options = {}) => {
let mm = new Minimatch(pattern, options);
return list = list.filter((f) => mm.match(f)), mm.options.nonull && !list.length && list.push(pattern), list;
};
minimatch.match = match;
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/, regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), Minimatch = class {
options;
set;
pattern;
windowsPathsNoEscape;
nonegate;
negate;
comment;
empty;
preserveMultipleSlashes;
partial;
globSet;
globParts;
nocase;
isWindows;
platform;
windowsNoMagicRoot;
maxGlobstarRecursion;
regexp;
constructor(pattern, options = {}) {
assertValidPattern(pattern), options = options || {}, this.options = options, this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200, this.pattern = pattern, this.platform = options.platform || defaultPlatform, this.isWindows = this.platform === "win32", this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === !1, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!options.preserveMultipleSlashes, this.regexp = null, this.negate = !1, this.nonegate = !!options.nonegate, this.comment = !1, this.empty = !1, this.partial = !!options.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase), this.globSet = [], this.globParts = [], this.set = [], this.make();
}
hasMagic() {
if (this.options.magicalBraces && this.set.length > 1)
return !0;
for (let pattern of this.set)
for (let part of pattern)
if (typeof part != "string")
return !0;
return !1;
}
debug(..._) {
}
make() {
let pattern = this.pattern, options = this.options;
if (!options.nocomment && pattern.charAt(0) === "#") {
this.comment = !0;
return;
}
if (!pattern) {
this.empty = !0;
return;
}
this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], options.debug && (this.debug = (...args) => console.error(...args)), this.debug(this.pattern, this.globSet);
let rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
this.globParts = this.preprocess(rawGlobParts), this.debug(this.pattern, this.globParts);
let set = this.globParts.map((s, _, __) => {
if (this.isWindows && this.windowsNoMagicRoot) {
let isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]), isDrive = /^[a-z]:/i.test(s[0]);
if (isUNC)
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
if (isDrive)
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
}
return s.map((ss) => this.parse(ss));
});
if (this.debug(this.pattern, set), this.set = set.filter((s) => s.indexOf(!1) === -1), this.isWindows)
for (let i = 0; i < this.set.length; i++) {
let p = this.set[i];
p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" && typeof p[3] == "string" && /^[a-z]:$/i.test(p[3]) && (p[2] = "?");
}
this.debug(this.pattern, this.set);
}
// various transforms to equivalent pattern sets that are
// faster to process in a filesystem walk. The goal is to
// eliminate what we can, and push all ** patterns as far
// to the right as possible, even if it increases the number
// of patterns that we have to process.
preprocess(globParts) {
if (this.options.noglobstar)
for (let i = 0; i < globParts.length; i++)
for (let j = 0; j < globParts[i].length; j++)
globParts[i][j] === "**" && (globParts[i][j] = "*");
let { optimizationLevel = 1 } = this.options;
return optimizationLevel >= 2 ? (globParts = this.firstPhasePreProcess(globParts), globParts = this.secondPhasePreProcess(globParts)) : optimizationLevel >= 1 ? globParts = this.levelOneOptimize(globParts) : globParts = this.adjascentGlobstarOptimize(globParts), globParts;
}
// just get rid of adjascent ** portions
adjascentGlobstarOptimize(globParts) {
return globParts.map((parts) => {
let gs = -1;
for (; (gs = parts.indexOf("**", gs + 1)) !== -1; ) {
let i = gs;
for (; parts[i + 1] === "**"; )
i++;
i !== gs && parts.splice(gs, i - gs);
}
return parts;
});
}
// get rid of adjascent ** and resolve .. portions
levelOneOptimize(globParts) {
return globParts.map((parts) => (parts = parts.reduce((set, part) => {
let prev = set[set.length - 1];
return part === "**" && prev === "**" ? set : part === ".." && prev && prev !== ".." && prev !== "." && prev !== "**" ? (set.pop(), set) : (set.push(part), set);
}, []), parts.length === 0 ? [""] : parts));
}
levelTwoFileOptimize(parts) {
Array.isArray(parts) || (parts = this.slashSplit(parts));
let didSomething = !1;
do {
if (didSomething = !1, !this.preserveMultipleSlashes) {
for (let i = 1; i < parts.length - 1; i++) {
let p = parts[i];
i === 1 && p === "" && parts[0] === "" || (p === "." || p === "") && (didSomething = !0, parts.splice(i, 1), i--);
}
parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "") && (didSomething = !0, parts.pop());
}
let dd = 0;
for (; (dd = parts.indexOf("..", dd + 1)) !== -1; ) {
let p = parts[dd - 1];
p && p !== "." && p !== ".." && p !== "**" && (didSomething = !0, parts.splice(dd - 1, 2), dd -= 2);
}
} while (didSomething);
return parts.length === 0 ? [""] : parts;
}
// First phase: single-pattern processing
// <pre> is 1 or more portions
// <rest> is 1 or more portions
// <p> is any portion other than ., .., '', or **
// <e> is . or ''
//
// **/.. is *brutal* for filesystem walking performance, because
// it effectively resets the recursive walk each time it occurs,
// and ** cannot be reduced out by a .. pattern part like a regexp
// or most strings (other than .., ., and '') can be.
//
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
// <pre>/<e>/<rest> -> <pre>/<rest>
// <pre>/<p>/../<rest> -> <pre>/<rest>
// **/**/<rest> -> **/<rest>
//
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
// this WOULD be allowed if ** did follow symlinks, or * didn't
firstPhasePreProcess(globParts) {
let didSomething = !1;
do {
didSomething = !1;
for (let parts of globParts) {
let gs = -1;
for (; (gs = parts.indexOf("**", gs + 1)) !== -1; ) {
let gss = gs;
for (; parts[gss + 1] === "**"; )
gss++;
gss > gs && parts.splice(gs + 1, gss - gs);
let next = parts[gs + 1], p = parts[gs + 2], p2 = parts[gs + 3];
if (next !== ".." || !p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..")
continue;
didSomething = !0, parts.splice(gs, 1);
let other = parts.slice(0);
other[gs] = "**", globParts.push(other), gs--;
}
if (!this.preserveMultipleSlashes) {
for (let i = 1; i < parts.length - 1; i++) {
let p = parts[i];
i === 1 && p === "" && parts[0] === "" || (p === "." || p === "") && (didSomething = !0, parts.splice(i, 1), i--);
}
parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "") && (didSomething = !0, parts.pop());
}
let dd = 0;
for (; (dd = parts.indexOf("..", dd + 1)) !== -1; ) {
let p = parts[dd - 1];
if (p && p !== "." && p !== ".." && p !== "**") {
didSomething = !0;
let splin = dd === 1 && parts[dd + 1] === "**" ? ["."] : [];
parts.splice(dd - 1, 2, ...splin), parts.length === 0 && parts.push(""), dd -= 2;
}
}
}
} while (didSomething);
return globParts;
}
// second phase: multi-pattern dedupes
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
//
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
// ^-- not valid because ** doens't follow symlinks
secondPhasePreProcess(globParts) {
for (let i = 0; i < globParts.length - 1; i++)
for (let j = i + 1; j < globParts.length; j++) {
let matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
if (matched) {
globParts[i] = [], globParts[j] = matched;
break;
}
}
return globParts.filter((gs) => gs.length);
}
partsMatch(a, b, emptyGSMatch = !1) {
let ai = 0, bi = 0, result = [], which = "";
for (; ai < a.length && bi < b.length; )
if (a[ai] === b[bi])
result.push(which === "b" ? b[bi] : a[ai]), ai++, bi++;
else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1])
result.push(a[ai]), ai++;
else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1])
result.push(b[bi]), bi++;
else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
if (which === "b")
return !1;
which = "a", result.push(a[ai]), ai++, bi++;
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
if (which === "a")
return !1;
which = "b", result.push(b[bi]), ai++, bi++;
} else
return !1;
return a.length === b.length && result;
}
parseNegate() {
if (this.nonegate)
return;
let pattern = this.pattern, negate = !1, negateOffset = 0;
for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++)
negate = !negate, negateOffset++;
negateOffset && (this.pattern = pattern.slice(negateOffset)), this.negate = negate;
}
// set partial to true to test if, for example,
// "/a/b" matches the start of "/*/b/*/d"
// Partial means, if you run out of file before you run
// out of pattern, then that's fine, as long as all
// the parts match.
matchOne(file, pattern, partial = !1) {
let fileStartIndex = 0, patternStartIndex = 0;
if (this.isWindows) {
let fileDrive = typeof file[0] == "string" && /^[a-z]:$/i.test(file[0]), fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]), patternDrive = typeof pattern[0] == "string" && /^[a-z]:$/i.test(pattern[0]), patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] == "string" && /^[a-z]:$/i.test(pattern[3]), fdi = fileUNC ? 3 : fileDrive ? 0 : void 0, pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
if (typeof fdi == "number" && typeof pdi == "number") {
let [fd, pd] = [
file[fdi],
pattern[pdi]
];
fd.toLowerCase() === pd.toLowerCase() && (pattern[pdi] = fd, patternStartIndex = pdi, fileStartIndex = fdi);
}
}
let { optimizationLevel = 1 } = this.options;
return optimizationLevel >= 2 && (file = this.levelTwoFileOptimize(file)), pattern.includes(GLOBSTAR) ? this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex) : this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
}
#matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
let firstgs = pattern.indexOf(GLOBSTAR, patternIndex), lastgs = pattern.lastIndexOf(GLOBSTAR), [head, body, tail] = partial ? [
pattern.slice(patternIndex, firstgs),
pattern.slice(firstgs + 1),
[]
] : [
pattern.slice(patternIndex, firstgs),
pattern.slice(firstgs + 1, lastgs),
pattern.slice(lastgs + 1)
];
if (head.length) {
let fileHead = file.slice(fileIndex, fileIndex + head.length);
if (!this.#matchOne(fileHead, head, partial, 0, 0))
return !1;
fileIndex += head.length;
}
let fileTailMatch = 0;
if (tail.length) {
if (tail.length + fileIndex > file.length)
return !1;
let tailStart = file.length - tail.length;
if (this.#matchOne(file, tail, partial, tailStart, 0))
fileTailMatch = tail.length;
else {
if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length || (tailStart--, !this.#matchOne(file, tail, partial, tailStart, 0)))
return !1;
fileTailMatch = tail.length + 1;
}
}
if (!body.length) {
let sawSome = !!fileTailMatch;
for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
let f = String(file[i2]);
if (sawSome = !0, f === "." || f === ".." || !this.options.dot && f.startsWith("."))
return !1;
}
return partial || sawSome;
}
let bodySegments = [[[], 0]], currentBody = bodySegments[0], nonGsParts = 0, nonGsPartsSums = [0];
for (let b of body)
b === GLOBSTAR ? (nonGsPartsSums.push(nonGsParts), currentBody = [[], 0], bodySegments.push(currentBody)) : (currentBody[0].push(b), nonGsParts++);
let i = bodySegments.length - 1, fileLength = file.length - fileTailMatch;
for (let b of bodySegments)
b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
}
#matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
let bs = bodySegments[bodyIndex];
if (!bs) {
for (let i = fileIndex; i < file.length; i++) {
sawTail = !0;
let f = file[i];
if (f === "." || f === ".." || !this.options.dot && f.startsWith("."))
return !1;
}
return sawTail;
}
let [body, after] = bs;
for (; fileIndex <= after; ) {
if (this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0) && globStarDepth < this.maxGlobstarRecursion) {
let sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
if (sub !== !1)
return sub;
}
let f = file[fileIndex];
if (f === "." || f === ".." || !this.options.dot && f.startsWith("."))
return !1;
fileIndex++;
}
return partial || null;
}
#matchOne(file, pattern, partial, fileIndex, patternIndex) {
let fi, pi, pl, fl;
for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
this.debug("matchOne loop");
let p = pattern[pi], f = file[fi];
if (this.debug(pattern, p, f), p === !1 || p === GLOBSTAR)
return !1;
let hit;
if (typeof p == "string" ? (hit = f === p, this.debug("string match", p, f, hit)) : (hit = p.test(f), this.debug("pattern match", p, f, hit)), !hit)
return !1;
}
if (fi === fl && pi === pl)
return !0;
if (fi === fl)
return partial;
if (pi === pl)
return fi === fl - 1 && file[fi] === "";
throw new Error("wtf?");
}
braceExpand() {
return braceExpand(this.pattern, this.options);
}
parse(pattern) {
assertValidPattern(pattern);
let options = this.options;
if (pattern === "**")
return GLOBSTAR;
if (pattern === "")
return "";
let m, fastTest = null;
(m = pattern.match(starRE)) ? fastTest = options.dot ? starTestDot : starTest : (m = pattern.match(starDotExtRE)) ? fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]) : (m = pattern.match(qmarksRE)) ? fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m) : (m = pattern.match(starDotStarRE)) ? fastTest = options.dot ? starDotStarTestDot : starDotStarTest : (m = pattern.match(dotStarRE)) && (fastTest = dotStarTest);
let re = AST.fromGlob(pattern, this.options).toMMPattern();
return fastTest && typeof re == "object" && Reflect.defineProperty(re, "test", { value: fastTest }), re;
}
makeRe() {
if (this.regexp || this.regexp === !1)
return this.regexp;
let set = this.set;
if (!set.length)
return this.regexp = !1, this.regexp;
let options = this.options, twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot, flags = new Set(options.nocase ? ["i"] : []), re = set.map((pattern) => {
let pp = pattern.map((p) => {
if (p instanceof RegExp)
for (let f of p.flags.split(""))
flags.add(f);
return typeof p == "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
});
return pp.forEach((p, i) => {
let next = pp[i + 1], prev = pp[i - 1];
p !== GLOBSTAR || prev === GLOBSTAR || (prev === void 0 ? next !== void 0 && next !== GLOBSTAR ? pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next : pp[i] = twoStar : next === void 0 ? pp[i - 1] = prev + "(?:\\/|" + twoStar + ")?" : next !== GLOBSTAR && (pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next, pp[i + 1] = GLOBSTAR));
}), pp.filter((p) => p !== GLOBSTAR).join("/");
}).join("|"), [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
re = "^" + open + re + close + "$", this.negate && (re = "^(?!" + re + ").+$");
try {
this.regexp = new RegExp(re, [...flags].join(""));
} catch {
this.regexp = !1;
}
return this.regexp;
}
slashSplit(p) {
return this.preserveMultipleSlashes ? p.split("/") : this.isWindows && /^\/\/[^\/]+/.test(p) ? ["", ...p.split(/\/+/)] : p.split(/\/+/);
}
match(f, partial = this.partial) {
if (this.debug("match", f, this.pattern), this.comment)
return !1;
if (this.empty)
return f === "";
if (f === "/" && partial)
return !0;
let options = this.options;
this.isWindows && (f = f.split("\\").join("/"));
let ff = this.slashSplit(f);
this.debug(this.pattern, "split", ff);
let set = this.set;
this.debug(this.pattern, "set", set);
let filename = ff[ff.length - 1];
if (!filename)
for (let i = ff.length - 2; !filename && i >= 0; i--)
filename = ff[i];
for (let i = 0; i < set.length; i++) {
let pattern = set[i], file = ff;
if (options.matchBase && pattern.length === 1 && (file = [filename]), this.matchOne(file, pattern, partial))
return options.flipNegate ? !0 : !this.negate;
}
return options.flipNegate ? !1 : this.negate;
}
static defaults(def) {
return minimatch.defaults(def).Minimatch;
}
};
minimatch.AST = AST;
minimatch.Minimatch = Minimatch;
minimatch.escape = escape;
minimatch.unescape = unescape;
// ../cli-kit/dist/public/node/fs.js
var import_fast_glob = __toESM(require_out(), 1);
import { mkdirSync as fsMkdirSync, readFileSync as fsReadFileSync, writeFileSync as fsWriteFileSync, appendFileSync as fsAppendFileSync, statSync as fsStatSync, createReadStream as fsCreateReadStream, createWriteStream as fsCreateWriteStream, constants as fsConstants, existsSync as fsFileExistsSync, unlinkSync as fsUnlinkSync, mkdtempSync as fsMkdtempSync, accessSync, statSync } from "fs";
import { mkdir as fsMkdir, writeFile as fsWriteFile, readFile as fsReadFile, realpath as fsRealPath, appendFile as fsAppendFile, mkdtemp as fsMkdtemp, stat as fsStat, lstat as fsLstat, chmod as fsChmod, access as fsAccess, rename as fsRename, unlink as fsUnlink, rm as fsRm, readdir as fsReaddir, symlink as fsSymlink } from "fs/promises";
import { pathToFileURL as pathToFile } from "url";
import * as os2 from "os";
function stripUpPath(path4, strip) {
let parts = path4.split(sep);
return join(...parts.slice(strip));
}
async function inTemporaryDirectory(callback) {
let tmpDir = await fsMkdtemp(join(systemTempDir, "tmp-"));
try {
return await callback(tmpDir);
} finally {
await fsRm(tmpDir, { recursive: !0, force: !0, maxRetries: 2 });
}
}
function tempDirectory() {
return fsMkdtempSync(join(systemTempDir, "tmp-"));
}
async function readFile(path4, options = { encoding: "utf8" }) {
return outputDebug(outputContent`Reading the content of file at ${outputToken.path(path4)}...`), fsReadFile(path4, options);
}
function readFileSync(path4) {
return outputDebug(outputContent`Sync-reading the content of file at ${outputToken.path(path4)}...`), fsReadFileSync(path4);
}
async function fileRealPath(path4) {
return fsRealPath(path4);
}
async function copyFile(from, to) {
if (resolvePath(from) === resolvePath(to)) {
outputDebug(outputContent`Skipping copy file step because source and destination is the same: ${outputToken.path(from)}`);
return;
}
outputDebug(outputContent`Copying file from ${outputToken.path(from)} to ${outputToken.path(to)}...`), await copy(from, to);
}
async function touchFile(path4) {
outputDebug(outputContent`Creating an empty file at ${outputToken.path(path4)}...`), await ensureFile(path4);
}
function touchFileSync(path4) {
outputDebug(outputContent`Creating an empty file at ${outputToken.path(path4)}...`), ensureFileSync(path4);
}
async function appendFile(path4, content) {
outputDebug(outputContent`Appending the following content to ${outputToken.path(path4)}:
${content.split(`
`).map((line) => ` ${line}`).join(`
`)}
`), await fsAppendFile(path4, content);
}
function appendFileSync(path4, data) {
fsAppendFileSync(path4, data);
}
async function writeFile(path4, data, options = { encoding: "utf8" }) {
outputDebug(outputContent`Writing some content to file at ${outputToken.path(path4)}...`), await fsWriteFile(path4, data, options);
}
function writeFileSync(path4, data) {
outputDebug(outputContent`File-writing some content to file at ${outputToken.path(path4)}...`), fsWriteFileSync(path4, data);
}
async function mkdir(path4) {
outputDebug(outputContent`Creating directory at ${outputToken.path(path4)}...`), await fsMkdir(path4, { recursive: !0 });
}
function mkdirSync(path4) {
outputDebug(outputContent`Sync-creating directory at ${outputToken.path(path4)}...`), fsMkdirSync(path4, { recursive: !0 });
}
async function removeFile(path4) {
outputDebug(outputContent`Removing file at ${outputToken.path(path4)}...`), await remove(path4);
}
async function renameFile(from, to) {
outputDebug(outputContent`Renaming file from ${outputToken.path(from)} to ${outputToken.path(to)}...`), await fsRename(from, to);
}
async function symlink(target, path4) {
outputDebug(outputContent`Creating symbolic link from ${outputToken.path(path4)} to ${outputToken.path(target)}...`);
let type = "file";
try {
(await fsLstat(target)).isDirectory() && (type = "junction");
} catch {
}
await fsSymlink(target, path4, type);
}
function removeFileSync(path4) {
outputDebug(outputContent`Sync-removing file at ${outputToken.path(path4)}...`), removeSync(path4);
}
async function rmdir(path4, options = {}) {
outputDebug(outputContent`Removing directory at ${outputToken.path(path4)}...`), await fsRm(path4, { recursive: !0, force: options.force ?? !0 });
}
async function mkTmpDir() {
return outputDebug(outputContent`Creating a temporary directory...`), await fsMkdtemp(joinPath(os2.tmpdir(), "tmp-"));
}
async function isDirectory(path4) {
return outputDebug(outputContent`Checking if ${outputToken.path(path4)} is a directory...`), (await fsLstat(path4)).isDirectory();
}
function isDirectorySync(path4) {
return outputDebug(outputContent`Checking if ${outputToken.path(path4)} is a directory...`), fsStatSync(path4).isDirectory();
}
async function fileSize(path4) {
return outputDebug(outputContent`Getting the size of file at ${outputToken.path(path4)}...`), (await fsStat(path4)).size;
}
function fileSizeSync(path4) {
return outputDebug(outputContent`Sync-getting the size of file at ${outputToken.path(path4)}...`), fsStatSync(path4).size;
}
function unlinkFileSync(path4) {
fsUnlinkSync(path4);
}
function unlinkFile(path4) {
return fsUnlink(path4);
}
function createFileReadStream(path4, options) {
return fsCreateReadStream(path4, options);
}
function createFileWriteStream(path4) {
return fsCreateWriteStream(path4);
}
async function fileLastUpdated(path4) {
return outputDebug(outputContent`Getting last updated timestamp for file at ${outputToken.path(path4)}...`), (await fsStat(path4)).ctime;
}
async function fileLastUpdatedTimestamp(path4) {
try {
return (await fileLastUpdated(path4)).getTime();
} catch {
return;
}
}
async function moveFile(src, dest, options = {}) {
await move(src, dest, options);
}
async function chmod(path4, mode) {
await fsChmod(path4, mode);
}
async function fileHasExecutablePermissions(path4) {
try {
return await fsAccess(path4, fsConstants.X_OK), !0;
} catch {
return !1;
}
}
function fileHasWritePermissions(path4) {
try {
return accessSync(path4, fsConstants.W_OK), !0;
} catch {
return !1;
}
}
function unixFileIsOwnedByCurrentUser(path4) {
if (!(process.platform === "win32" || typeof process.getuid != "function")) {
if (!fileExistsSync(path4))
return !1;
try {
let stats = statSync(path4), currentUid = process.getuid();
return stats.uid === currentUid;
} catch {
return !1;
}
}
}
async function fileExists(path4) {
try {
return await fsAccess(path4), !0;
} catch {
return !1;
}
}
function fileExistsSync(path4) {
return fsFileExistsSync(path4);
}
async function generateRandomNameForSubdirectory(options) {
let generated = `${getRandomName(options.family ?? "business")}-${options.suffix}`, randomDirectoryPath = joinPath(options.directory, generated);
return await fileExists(randomDirectoryPath) ? generateRandomNameForSubdirectory(options) : generated;
}
async function glob(pattern, options) {
let { default: fastGlob } = await import("./out-LBNH64BP.js"), overridenOptions = options;
return options?.dot == null && (overridenOptions = { ...options, dot: !0 }), fastGlob(pattern, overridenOptions);
}
function globSync(pattern, options) {
let overridenOptions = options;
return options?.dot == null && (overridenOptions = { ...options, dot: !0 }), import_fast_glob.default.sync(pattern, overridenOptions);
}
function pathToFileURL(path4) {
return pathToFile(path4);
}
function detectEOL(content) {
let match2 = content.match(/\r\n|\n/g);
if (!match2)
return defaultEOL();
let crlf = 0;
for (let eol of match2)
eol === `\r
` && crlf++;
let lf = match2.length - crlf;
return crlf > lf ? `\r
` : `
`;
}
function defaultEOL() {
return os2.EOL;
}
async function findPathUp(matcher, options) {
let got = await findUp(matcher, options);
return got ? normalizePath(got) : void 0;
}
function findPathUpSync(matcher, options) {
let got = findUpSync(matcher, options);
return got ? normalizePath(got) : void 0;
}
function matchGlob(key, pattern, options) {
return minimatch(key, pattern, options);
}
function readdir(path4) {
return fsReaddir(path4);
}
async function copyDirectoryContents(srcDir, destDir) {
if (!await fileExists(srcDir))
throw new Error(`Source directory ${srcDir} does not exist`);
await copy(srcDir, destDir);
}
export {
require_eq,
require_root,
require_Symbol,
require_isObject,
require_Stack,
require_Uint8Array,
require_mapToArray,
require_arrayPush,
require_isArray,
require_baseGetAllKeys,
require_stubArray,
require_getSymbols,
require_isObjectLike,
require_isArguments,
require_isBuffer,
require_isIndex,
require_baseUnary,
require_nodeUtil,
require_isTypedArray,
require_arrayLikeKeys,
require_isPrototype,
require_overArg,
require_baseKeys,
require_isArrayLike,
require_keys,
require_getAllKeys,
require_getTag,
require_baseIsEqual,
require_isSymbol,
require_memoize,
require_arrayMap,
require_castPath,
require_toKey,
require_baseGet,
require_get,
require_identity,
require_baseIteratee,
require_baseDifference,
require_baseFlatten,
require_defineProperty,
require_baseRest,
require_isArrayLikeObject,
getArrayRejectingUndefined,
getArrayContainsDuplicates,
uniq,
uniqBy,
asHumanFriendlyArray,
tslib_es6_exports,
init_tslib_es6,
getRandomName,
capitalize,
pluralize,
tryParseInt,
slugify,
camelize,
capitalizeWords,
hyphenate,
underscore,
constantize,
formatDate,
formatLocalDate,
joinWithAnd,
pascalize,
normalizeDelimitedString,
timeAgo,
require_graceful_fs,
require_balanced_match,
stripUpPath,
inTemporaryDirectory,
tempDirectory,
readFile,
readFileSync,
fileRealPath,
copyFile,
touchFile,
touchFileSync,
appendFile,
appendFileSync,
writeFile,
writeFileSync,
mkdir,
mkdirSync,
removeFile,
renameFile,
symlink,
removeFileSync,
rmdir,
mkTmpDir,
isDirectory,
isDirectorySync,
fileSize,
fileSizeSync,
unlinkFileSync,
unlinkFile,
createFileReadStream,
createFileWriteStream,
fileLastUpdated,
fileLastUpdatedTimestamp,
moveFile,
chmod,
fileHasExecutablePermissions,
fileHasWritePermissions,
unixFileIsOwnedByCurrentUser,
fileExists,
fileExistsSync,
generateRandomNameForSubdirectory,
glob,
globSync,
pathToFileURL,
detectEOL,
defaultEOL,
findPathUp,
findPathUpSync,
matchGlob,
readdir,
copyDirectoryContents,
tokenItemToString,
appendToTokenItem,
currentProcessIsGlobal,
installGlobalShopifyCLI,
installGlobalCLIPrompt,
inferPackageManagerForGlobalCLI,
getProjectDir,
output,
stripAnsi,
source_default,
ansi_escapes_default,
require_supports_color,
require_supports_hyperlinks,
TokenizedString,
outputToken,
formatPackageManagerCommand,
outputContent,
collectedLogs,
collectLog,
clearCollectedLogs,
outputResult,
outputInfo,
outputSuccess,
outputCompleted,
outputDebug,
outputWarn,
outputNewline,
stringifyMessage,
itemToString,
outputWhereAppropriate,
unstyled,
shouldDisplayColors,
formatSection
};
//# sourceMappingURL=chunk-PK2M5CKS.js.map