Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

poof

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poof - npm Package Compare versions

Comparing version
3.0.1
to
3.1.0
+252
-326
dist/cli.mjs
#!/usr/bin/env node
import path from 'node:path';
import S$1 from 'tty';
import M$1 from 'tty';
import poof from './index.mjs';

@@ -13,7 +13,7 @@ import 'node:fs/promises';

var a = (t, e) => O$2(t, "name", { value: e, configurable: true });
const P$1 = "known-flag", _$2 = "unknown-flag", D$1 = "argument", B$1 = /\B([A-Z])/g, G$2 = a((t) => t.replaceAll(B$1, "-$1").toLowerCase(), "camelToKebab"), { hasOwnProperty: K$2 } = Object.prototype, h$1 = a((t, e) => K$2.call(t, e), "hasOwn"), F$1 = a((t) => typeof t == "function" ? [t, false] : Array.isArray(t) ? [t[0], true] : F$1(t.type), "parseFlagType"), $$2 = a((t, e) => t === Boolean ? e !== "false" : e, "normalizeBoolean"), m$1 = a((t, e) => typeof e == "boolean" ? e : t === Number && e === "" ? Number.NaN : t(e), "applyParser"), R$2 = /[\s.:=]/, T$2 = a((t) => {
const P$2 = "known-flag", _$2 = "unknown-flag", D = "argument", B$1 = /\B([A-Z])/g, G$2 = a((t) => t.replaceAll(B$1, "-$1").toLowerCase(), "camelToKebab"), { hasOwnProperty: K$2 } = Object.prototype, h$1 = a((t, e) => K$2.call(t, e), "hasOwn"), F$1 = a((t) => typeof t == "function" ? [t, false] : Array.isArray(t) ? [t[0], true] : F$1(t.type), "parseFlagType"), $$1 = a((t, e) => t === Boolean ? e !== "false" : e, "normalizeBoolean"), m$1 = a((t, e) => typeof e == "boolean" ? e : t === Number && e === "" ? Number.NaN : t(e), "applyParser"), R$1 = /[\s.:=]/, T$2 = a((t) => {
const e = `Flag name "${t}"`;
if (t.length === 0) throw new Error(`${e} cannot be empty`);
if (t.length === 1) throw new Error(`${e} must be longer than a character`);
const n = t.match(R$2);
const n = t.match(R$1);
if (n) throw new Error(`${e} cannot contain "${n?.[0]}"`);

@@ -23,3 +23,3 @@ }, "validateFlagName"), d$1 = a((t, e, n) => {

t[e] = n;
}, "setFlag"), U$2 = a((t) => {
}, "setFlag"), U$1 = a((t) => {
const e = {};

@@ -51,5 +51,5 @@ for (const n in t) {

return n;
}, "finalizeFlags"), A = "--", j$2 = 3, v$1 = /^-{1,2}\w/, V$2 = a((t) => {
}, "finalizeFlags"), A$1 = "--", j$1 = 3, v$1 = /^-{1,2}\w/, V$2 = a((t) => {
if (!v$1.test(t)) return;
const e = !t.startsWith(A);
const e = !t.startsWith(A$1);
let n = t.slice(e ? 1 : 2), s, r = -1;

@@ -69,3 +69,3 @@ for (const l of ["=", ":", "."]) {

const o = t[l];
if (o === A) {
if (o === A$1) {
r();

@@ -103,8 +103,8 @@ const c = t.slice(l + 1);

}, "spliceFromArgv"), z$2 = a((t, e = process.argv.slice(2), { ignore: n } = {}) => {
const s = [], r = U$2(t), l = {}, o = [];
return o[A] = [], L$2(e, { onFlag(i, c, f) {
const g = (f.length === j$2 || i.length > 1) && h$1(r, i);
if (!n?.(g ? P$1 : _$2, i, c)) {
const s = [], r = U$1(t), l = {}, o = [];
return o[A$1] = [], L$2(e, { onFlag(i, c, f) {
const g = (f.length === j$1 || i.length > 1) && h$1(r, i);
if (!n?.(g ? P$2 : _$2, i, c)) {
if (g) {
const [y, p] = r[i], b = $$2(p, c), N = a((C, E) => {
const [y, p] = r[i], b = $$1(p, c), N = a((C, E) => {
s.push(f), E && s.push(E), y.push(m$1(p, C || ""));

@@ -117,3 +117,3 @@ }, "getFollowingValue");

}, onArgument: a((i, c, f) => {
n?.(D$1, e[c[0]]) || (o.push(...i), f ? (o[A] = i, e.splice(c[0])) : s.push(c));
n?.(D, e[c[0]]) || (o.push(...i), f ? (o[A$1] = i, e.splice(c[0])) : s.push(c));
}, "onArgument") }), k$2(e, s), { flags: W$2(t, r), unknownFlags: l, _: o };

@@ -124,3 +124,3 @@ }, "typeFlag"); a((t, e, n = process.argv.slice(2)) => {

if (!s.has(c) || !l && o.length > 0) return;
const u = $$2(r, f), g = a((y, p) => {
const u = $$1(r, f), g = a((y, p) => {
i.push(w), p && i.push(p), o.push(m$1(r, y || ""));

@@ -134,12 +134,12 @@ }, "getFollowingValue");

var n = (D, F) => O$1(D, "name", { value: F, configurable: true });
const M$1 = n((D) => {
const M = n((D) => {
const F = process.stdout.columns ?? Number.POSITIVE_INFINITY;
return typeof D == "function" && (D = D(F)), D || (D = {}), Array.isArray(D) ? { columns: D, stdoutColumns: F } : { columns: D.columns ?? [], stdoutColumns: D.stdoutColumns ?? F };
}, "getOptions");
function j$1({ onlyFirst: D = false } = {}) {
function j({ onlyFirst: D = false } = {}) {
const u = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
return new RegExp(u, D ? void 0 : "g");
}
n(j$1, "ansiRegex");
const k$1 = j$1();
n(j, "ansiRegex");
const k$1 = j();
function w(D) {

@@ -150,6 +150,6 @@ if (typeof D != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);

n(w, "stripAnsi");
function P(D) {
function P$1(D) {
return D === 161 || D === 164 || D === 167 || D === 168 || D === 170 || D === 173 || D === 174 || D >= 176 && D <= 180 || D >= 182 && D <= 186 || D >= 188 && D <= 191 || D === 198 || D === 208 || D === 215 || D === 216 || D >= 222 && D <= 225 || D === 230 || D >= 232 && D <= 234 || D === 236 || D === 237 || D === 240 || D === 242 || D === 243 || D >= 247 && D <= 250 || D === 252 || D === 254 || D === 257 || D === 273 || D === 275 || D === 283 || D === 294 || D === 295 || D === 299 || D >= 305 && D <= 307 || D === 312 || D >= 319 && D <= 322 || D === 324 || D >= 328 && D <= 331 || D === 333 || D === 338 || D === 339 || D === 358 || D === 359 || D === 363 || D === 462 || D === 464 || D === 466 || D === 468 || D === 470 || D === 472 || D === 474 || D === 476 || D === 593 || D === 609 || D === 708 || D === 711 || D >= 713 && D <= 715 || D === 717 || D === 720 || D >= 728 && D <= 731 || D === 733 || D === 735 || D >= 768 && D <= 879 || D >= 913 && D <= 929 || D >= 931 && D <= 937 || D >= 945 && D <= 961 || D >= 963 && D <= 969 || D === 1025 || D >= 1040 && D <= 1103 || D === 1105 || D === 8208 || D >= 8211 && D <= 8214 || D === 8216 || D === 8217 || D === 8220 || D === 8221 || D >= 8224 && D <= 8226 || D >= 8228 && D <= 8231 || D === 8240 || D === 8242 || D === 8243 || D === 8245 || D === 8251 || D === 8254 || D === 8308 || D === 8319 || D >= 8321 && D <= 8324 || D === 8364 || D === 8451 || D === 8453 || D === 8457 || D === 8467 || D === 8470 || D === 8481 || D === 8482 || D === 8486 || D === 8491 || D === 8531 || D === 8532 || D >= 8539 && D <= 8542 || D >= 8544 && D <= 8555 || D >= 8560 && D <= 8569 || D === 8585 || D >= 8592 && D <= 8601 || D === 8632 || D === 8633 || D === 8658 || D === 8660 || D === 8679 || D === 8704 || D === 8706 || D === 8707 || D === 8711 || D === 8712 || D === 8715 || D === 8719 || D === 8721 || D === 8725 || D === 8730 || D >= 8733 && D <= 8736 || D === 8739 || D === 8741 || D >= 8743 && D <= 8748 || D === 8750 || D >= 8756 && D <= 8759 || D === 8764 || D === 8765 || D === 8776 || D === 8780 || D === 8786 || D === 8800 || D === 8801 || D >= 8804 && D <= 8807 || D === 8810 || D === 8811 || D === 8814 || D === 8815 || D === 8834 || D === 8835 || D === 8838 || D === 8839 || D === 8853 || D === 8857 || D === 8869 || D === 8895 || D === 8978 || D >= 9312 && D <= 9449 || D >= 9451 && D <= 9547 || D >= 9552 && D <= 9587 || D >= 9600 && D <= 9615 || D >= 9618 && D <= 9621 || D === 9632 || D === 9633 || D >= 9635 && D <= 9641 || D === 9650 || D === 9651 || D === 9654 || D === 9655 || D === 9660 || D === 9661 || D === 9664 || D === 9665 || D >= 9670 && D <= 9672 || D === 9675 || D >= 9678 && D <= 9681 || D >= 9698 && D <= 9701 || D === 9711 || D === 9733 || D === 9734 || D === 9737 || D === 9742 || D === 9743 || D === 9756 || D === 9758 || D === 9792 || D === 9794 || D === 9824 || D === 9825 || D >= 9827 && D <= 9829 || D >= 9831 && D <= 9834 || D === 9836 || D === 9837 || D === 9839 || D === 9886 || D === 9887 || D === 9919 || D >= 9926 && D <= 9933 || D >= 9935 && D <= 9939 || D >= 9941 && D <= 9953 || D === 9955 || D === 9960 || D === 9961 || D >= 9963 && D <= 9969 || D === 9972 || D >= 9974 && D <= 9977 || D === 9979 || D === 9980 || D === 9982 || D === 9983 || D === 10045 || D >= 10102 && D <= 10111 || D >= 11094 && D <= 11097 || D >= 12872 && D <= 12879 || D >= 57344 && D <= 63743 || D >= 65024 && D <= 65039 || D === 65533 || D >= 127232 && D <= 127242 || D >= 127248 && D <= 127277 || D >= 127280 && D <= 127337 || D >= 127344 && D <= 127373 || D === 127375 || D === 127376 || D >= 127387 && D <= 127404 || D >= 917760 && D <= 917999 || D >= 983040 && D <= 1048573 || D >= 1048576 && D <= 1114109;
}
n(P, "isAmbiguous");
n(P$1, "isAmbiguous");
function z$1(D) {

@@ -168,7 +168,7 @@ return D === 12288 || D >= 65281 && D <= 65376 || D >= 65504 && D <= 65510;

function V$1(D, { ambiguousAsWide: F = false } = {}) {
return Z$1(D), z$1(D) || G$1(D) || F && P(D) ? 2 : 1;
return Z$1(D), z$1(D) || G$1(D) || F && P$1(D) ? 2 : 1;
}
n(V$1, "eastAsianWidth");
var Y = n(() => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|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\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g, "emojiRegex");
const K$1 = new Intl.Segmenter(), U$1 = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
var Y$1 = n(() => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?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])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g, "emojiRegex");
const K$1 = new Intl.Segmenter(), U = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
function d(D, F = {}) {

@@ -182,4 +182,4 @@ if (typeof D != "string" || D.length === 0) return 0;

const e = i.codePointAt(0);
if (!(e <= 31 || e >= 127 && e <= 159) && !(e >= 8203 && e <= 8207 || e === 65279) && !(e >= 768 && e <= 879 || e >= 6832 && e <= 6911 || e >= 7616 && e <= 7679 || e >= 8400 && e <= 8447 || e >= 65056 && e <= 65071) && !(e >= 55296 && e <= 57343) && !(e >= 65024 && e <= 65039) && !U$1.test(i)) {
if (Y().test(i)) {
if (!(e <= 31 || e >= 127 && e <= 159) && !(e >= 8203 && e <= 8207 || e === 65279) && !(e >= 768 && e <= 879 || e >= 6832 && e <= 6911 || e >= 7616 && e <= 7679 || e >= 8400 && e <= 8447 || e >= 65056 && e <= 65071) && !(e >= 55296 && e <= 57343) && !(e >= 65024 && e <= 65039) && !U.test(i)) {
if (Y$1().test(i)) {
E += 2;

@@ -194,3 +194,3 @@ continue;

n(d, "stringWidth");
const x$1 = n((D) => Math.max(...D.split(`
const x = n((D) => Math.max(...D.split(`
`).map((F) => d(F))), "getLongestLineWidth"), q = n((D) => {

@@ -202,3 +202,3 @@ const F = [];

for (let t = 0; t < C; t += 1) {
const i = x$1(u[t]);
const i = x(u[t]);
i > F[t] && (F[t] = i);

@@ -208,3 +208,3 @@ }

return F;
}, "getColumnContentWidths"), y = /^\d+%$/, S = { width: "auto", align: "left", contentWidth: 0, paddingLeft: 0, paddingRight: 0, paddingTop: 0, paddingBottom: 0, horizontalPadding: 0, paddingLeftString: "", paddingRightString: "" }, H$1 = n((D, F) => {
}, "getColumnContentWidths"), y = /^\d+%$/, S$1 = { width: "auto", align: "left", contentWidth: 0, paddingLeft: 0, paddingRight: 0, paddingTop: 0, paddingBottom: 0, horizontalPadding: 0, paddingLeftString: "", paddingRightString: "" }, H$1 = n((D, F) => {
const u = [];

@@ -214,7 +214,7 @@ for (let C = 0; C < D.length; C += 1) {

if (typeof E == "number" || E === "auto" || E === "content-width" || typeof E == "string" && y.test(E)) {
u.push({ ...S, width: E, contentWidth: D[C] });
u.push({ ...S$1, width: E, contentWidth: D[C] });
continue;
}
if (E && typeof E == "object") {
const t = { ...S, ...E, contentWidth: D[C] };
const t = { ...S$1, ...E, contentWidth: D[C] };
t.horizontalPadding = t.paddingLeft + t.paddingRight, u.push(t);

@@ -246,8 +246,8 @@ continue;

}
}, "resolveColumnWidths"), R$1 = n(() => Object.assign([], { columns: 0 }), "makeRow"), Q$1 = n((D, F) => {
const u = [R$1()];
}, "resolveColumnWidths"), R = n(() => Object.assign([], { columns: 0 }), "makeRow"), Q$1 = n((D, F) => {
const u = [R()];
let [C] = u;
for (const E of D) {
const t = E.width + E.horizontalPadding;
C.columns + t > F && (C = R$1(), u.push(C)), C.push(E), C.columns += t;
C.columns + t > F && (C = R(), u.push(C)), C.push(E), C.columns += t;
}

@@ -273,13 +273,13 @@ for (const E of u) {

return J$1(C, D), Q$1(C, D);
}, "computeColumnWidths"), p = 10, v = n((D = 0) => (F) => `\x1B[${F + D}m`, "wrapAnsi16"), _$1 = n((D = 0) => (F) => `\x1B[${38 + D};5;${F}m`, "wrapAnsi256"), L$1 = n((D = 0) => (F, u, C) => `\x1B[${38 + D};2;${F};${u};${C}m`, "wrapAnsi16m"), s$1 = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
Object.keys(s$1.modifier);
const DD = Object.keys(s$1.color), uD = Object.keys(s$1.bgColor);
}, "computeColumnWidths"), p = 10, v = n((D = 0) => (F) => `\x1B[${F + D}m`, "wrapAnsi16"), _$1 = n((D = 0) => (F) => `\x1B[${38 + D};5;${F}m`, "wrapAnsi256"), L$1 = n((D = 0) => (F, u, C) => `\x1B[${38 + D};2;${F};${u};${C}m`, "wrapAnsi16m"), s = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
Object.keys(s.modifier);
const DD = Object.keys(s.color), uD = Object.keys(s.bgColor);
[...DD, ...uD];
function FD() {
const D = /* @__PURE__ */ new Map();
for (const [F, u] of Object.entries(s$1)) {
for (const [C, E] of Object.entries(u)) s$1[C] = { open: `\x1B[${E[0]}m`, close: `\x1B[${E[1]}m` }, u[C] = s$1[C], D.set(E[0], E[1]);
Object.defineProperty(s$1, F, { value: u, enumerable: false });
for (const [F, u] of Object.entries(s)) {
for (const [C, E] of Object.entries(u)) s[C] = { open: `\x1B[${E[0]}m`, close: `\x1B[${E[1]}m` }, u[C] = s[C], D.set(E[0], E[1]);
Object.defineProperty(s, F, { value: u, enumerable: false });
}
return Object.defineProperty(s$1, "codes", { value: D, enumerable: false }), s$1.color.close = "\x1B[39m", s$1.bgColor.close = "\x1B[49m", s$1.color.ansi = v(), s$1.color.ansi256 = _$1(), s$1.color.ansi16m = L$1(), s$1.bgColor.ansi = v(p), s$1.bgColor.ansi256 = _$1(p), s$1.bgColor.ansi16m = L$1(p), Object.defineProperties(s$1, { rgbToAnsi256: { value: n((F, u, C) => F === u && u === C ? F < 8 ? 16 : F > 248 ? 231 : Math.round((F - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(F / 255 * 5) + 6 * Math.round(u / 255 * 5) + Math.round(C / 255 * 5), "value"), enumerable: false }, hexToRgb: { value: n((F) => {
return Object.defineProperty(s, "codes", { value: D, enumerable: false }), s.color.close = "\x1B[39m", s.bgColor.close = "\x1B[49m", s.color.ansi = v(), s.color.ansi256 = _$1(), s.color.ansi16m = L$1(), s.bgColor.ansi = v(p), s.bgColor.ansi256 = _$1(p), s.bgColor.ansi16m = L$1(p), Object.defineProperties(s, { rgbToAnsi256: { value: n((F, u, C) => F === u && u === C ? F < 8 ? 16 : F > 248 ? 231 : Math.round((F - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(F / 255 * 5) + 6 * Math.round(u / 255 * 5) + Math.round(C / 255 * 5), "value"), enumerable: false }, hexToRgb: { value: n((F) => {
const u = /[a-f\d]{6}|[a-f\d]{3}/i.exec(F.toString(16));

@@ -291,3 +291,3 @@ if (!u) return [0, 0, 0];

return [E >> 16 & 255, E >> 8 & 255, E & 255];
}, "value"), enumerable: false }, hexToAnsi256: { value: n((F) => s$1.rgbToAnsi256(...s$1.hexToRgb(F)), "value"), enumerable: false }, ansi256ToAnsi: { value: n((F) => {
}, "value"), enumerable: false }, hexToAnsi256: { value: n((F) => s.rgbToAnsi256(...s.hexToRgb(F)), "value"), enumerable: false }, ansi256ToAnsi: { value: n((F) => {
if (F < 8) return 30 + F;

@@ -306,6 +306,6 @@ if (F < 16) return 90 + (F - 8);

return t === 2 && (i += 60), i;
}, "value"), enumerable: false }, rgbToAnsi: { value: n((F, u, C) => s$1.ansi256ToAnsi(s$1.rgbToAnsi256(F, u, C)), "value"), enumerable: false }, hexToAnsi: { value: n((F) => s$1.ansi256ToAnsi(s$1.hexToAnsi256(F)), "value"), enumerable: false } }), s$1;
}, "value"), enumerable: false }, rgbToAnsi: { value: n((F, u, C) => s.ansi256ToAnsi(s.rgbToAnsi256(F, u, C)), "value"), enumerable: false }, hexToAnsi: { value: n((F) => s.ansi256ToAnsi(s.hexToAnsi256(F)), "value"), enumerable: false } }), s;
}
n(FD, "assembleStyles");
const CD = FD(), g = /* @__PURE__ */ new Set(["\x1B", "\x9B"]), ED = 39, m = "\x07", N = "[", eD = "]", T$1 = "m", h = `${eD}8;;`, $$1 = n((D) => `${g.values().next().value}${N}${D}${T$1}`, "wrapAnsiCode"), W$1 = n((D) => `${g.values().next().value}${h}${D}${m}`, "wrapAnsiHyperlink"), tD = n((D) => D.split(" ").map((F) => d(F)), "wordLengths"), b = n((D, F, u) => {
const CD = FD(), g = /* @__PURE__ */ new Set(["\x1B", "\x9B"]), ED = 39, m = "\x07", N = "[", eD = "]", T$1 = "m", h = `${eD}8;;`, $ = n((D) => `${g.values().next().value}${N}${D}${T$1}`, "wrapAnsiCode"), W$1 = n((D) => `${g.values().next().value}${h}${D}${m}`, "wrapAnsiHyperlink"), tD = n((D) => D.split(" ").map((F) => d(F)), "wordLengths"), b$1 = n((D, F, u) => {
const C = [...F];

@@ -337,3 +337,3 @@ let E = false, t = false, i = d(w(D.at(-1)));

const c = F - o, f = 1 + Math.floor((i[l] - c - 1) / F);
Math.floor((i[l] - 1) / F) < f && e.push(""), b(e, r, F);
Math.floor((i[l] - 1) / F) < f && e.push(""), b$1(e, r, F);
continue;

@@ -343,3 +343,3 @@ }

if (u.wordWrap === false && o < F) {
b(e, r, F);
b$1(e, r, F);
continue;

@@ -350,3 +350,3 @@ }

if (o + i[l] > F && u.wordWrap === false) {
b(e, r, F);
b$1(e, r, F);
continue;

@@ -370,4 +370,4 @@ }

A[l + 1] === `
` ? (t && (C += W$1("")), E && o && (C += $$1(o))) : r === `
` && (E && o && (C += $$1(E)), t && (C += W$1(t))), a += r.length;
` ? (t && (C += W$1("")), E && o && (C += $(o))) : r === `
` && (E && o && (C += $(E)), t && (C += W$1(t))), a += r.length;
}

@@ -384,3 +384,3 @@ return C;

n(BD, "wrapAnsi");
const I = n((D) => Array.from({ length: D }).fill(""), "emptyLines"), oD = n((D, F) => {
const I$1 = n((D) => Array.from({ length: D }).fill(""), "emptyLines"), oD = n((D, F) => {
const u = [];

@@ -392,3 +392,3 @@ let C = 0;

let A = F[C] ?? "";
C += 1, B.preprocess && (A = B.preprocess(A)), x$1(A) > B.width && (A = BD(A, B.width, { hard: true }));
C += 1, B.preprocess && (A = B.preprocess(A)), x(A) > B.width && (A = BD(A, B.width, { hard: true }));
let a = A.split(`

@@ -400,3 +400,3 @@ `);

}
return B.paddingTop && a.unshift(...I(B.paddingTop)), B.paddingBottom && a.push(...I(B.paddingBottom)), a.length > t && (t = a.length), { ...B, lines: a };
return B.paddingTop && a.unshift(...I$1(B.paddingTop)), B.paddingBottom && a.push(...I$1(B.paddingBottom)), a.length > t && (t = a.length), { ...B, lines: a };
}), e = [];

@@ -420,3 +420,3 @@ for (let B = 0; B < t; B += 1) {

if (C === 0) return "";
const { stdoutColumns: E, columns: t } = M$1(F);
const { stdoutColumns: E, columns: t } = M(F);
if (t.length > C) throw new Error(`${t.length} columns defined, but only ${C} columns found`);

@@ -440,26 +440,76 @@ const i = X$1(E, t, u);

var B = Object.defineProperty;
var s = (t, e) => B(t, "name", { value: e, configurable: true });
const R = s((t) => t.replaceAll(/[\W_]([a-z\d])?/gi, (e, r) => r ? r.toUpperCase() : ""), "camelCase"), D = s((t) => t.replaceAll(/\B([A-Z])/g, "-$1").toLowerCase(), "kebabCase"), L = { "> 80": [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "auto" }], "> 40": [{ width: "auto", paddingLeft: 2, paddingRight: 8, preprocess: s((t) => t.trim(), "preprocess") }, { width: "100%", paddingLeft: 2, paddingBottom: 1 }], "> 0": { stdoutColumns: 1e3, columns: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "content-width" }] } };
function T(t) {
var _ = Object.defineProperty;
var o = (t, e) => _(t, "name", { value: e, configurable: true });
const b = new Uint32Array(65536), L = o((t, e) => {
const r = t.length, a = e.length, n = 1 << r - 1;
let s = -1, i = 0, d = r, l = r;
for (; l--; ) b[t.charCodeAt(l)] |= 1 << l;
for (l = 0; l < a; l++) {
let h = b[e.charCodeAt(l)];
const u = h | i;
h |= (h & s) + s ^ s, i |= ~(h | s), s &= h, i & n && d++, s & n && d--, i = i << 1 | 1, s = s << 1 | ~(u | i), i &= u;
}
for (l = r; l--; ) b[t.charCodeAt(l)] = 0;
return d;
}, "myers_32"), T = o((t, e) => {
const r = e.length, a = t.length, n = [], s = [], i = Math.ceil(r / 32), d = Math.ceil(a / 32);
for (let c = 0; c < i; c++) s[c] = -1, n[c] = 0;
let l = 0;
for (; l < d - 1; l++) {
let c = 0, g = -1;
const m = l * 32, y = Math.min(32, a) + m;
for (let f = m; f < y; f++) b[t.charCodeAt(f)] |= 1 << f;
for (let f = 0; f < r; f++) {
const v = b[e.charCodeAt(f)], w = s[f / 32 | 0] >>> f & 1, p = n[f / 32 | 0] >>> f & 1, N = v | c, q = ((v | p) & g) + g ^ g | v | p;
let x = c | ~(q | g), j = g & q;
x >>> 31 ^ w && (s[f / 32 | 0] ^= 1 << f), j >>> 31 ^ p && (n[f / 32 | 0] ^= 1 << f), x = x << 1 | w, j = j << 1 | p, g = j | ~(N | x), c = x & N;
}
for (let f = m; f < y; f++) b[t.charCodeAt(f)] = 0;
}
let h = 0, u = -1;
const C = l * 32, $ = Math.min(32, a - C) + C;
for (let c = C; c < $; c++) b[t.charCodeAt(c)] |= 1 << c;
let E = a;
for (let c = 0; c < r; c++) {
const g = b[e.charCodeAt(c)], m = s[c / 32 | 0] >>> c & 1, y = n[c / 32 | 0] >>> c & 1, f = g | h, v = ((g | y) & u) + u ^ u | g | y;
let w = h | ~(v | u), p = u & v;
E += w >>> a - 1 & 1, E -= p >>> a - 1 & 1, w >>> 31 ^ m && (s[c / 32 | 0] ^= 1 << c), p >>> 31 ^ y && (n[c / 32 | 0] ^= 1 << c), w = w << 1 | m, p = p << 1 | y, u = p | ~(f | w), h = w & f;
}
for (let c = C; c < $; c++) b[t.charCodeAt(c)] = 0;
return E;
}, "myers_x"), F = o((t, e) => {
if (t.length < e.length) {
const r = e;
e = t, t = r;
}
return e.length === 0 ? t.length : t.length <= 32 ? L(t, e) : T(t, e);
}, "distance"), H = o((t, e) => {
let r = 1 / 0, a = 0;
for (let n = 0; n < e.length; n++) {
const s = F(t, e[n]);
s < r && (r = s, a = n);
}
return e[a];
}, "closest"), V = o((t) => t.replaceAll(/[\W_]([a-z\d])?/gi, (e, r) => r ? r.toUpperCase() : ""), "camelCase"), J = o((t) => t.replaceAll(/\B([A-Z])/g, "-$1").toLowerCase(), "kebabCase"), W = { "> 80": [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "auto" }], "> 40": [{ width: "auto", paddingLeft: 2, paddingRight: 8, preprocess: o((t) => t.trim(), "preprocess") }, { width: "100%", paddingLeft: 2, paddingBottom: 1 }], "> 0": { stdoutColumns: 1e3, columns: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "content-width" }] } };
function z(t) {
let e = false;
return { type: "table", data: { tableData: Object.keys(t).sort((a, i) => a.localeCompare(i)).map((a) => {
const i = t[a], o = "alias" in i;
return o && (e = true), { name: a, flag: i, flagFormatted: `--${D(a)}`, aliasesEnabled: e, aliasFormatted: o ? `-${i.alias}` : void 0 };
}).map((a) => (a.aliasesEnabled = e, [{ type: "flagName", data: a }, { type: "flagDescription", data: a }])), tableBreakpoints: L } };
return { type: "table", data: { tableData: Object.keys(t).sort((n, s) => n.localeCompare(s)).map((n) => {
const s = t[n], i = "alias" in s;
return i && (e = true), { name: n, flag: s, flagFormatted: `--${J(n)}`, aliasesEnabled: e, aliasFormatted: i ? `-${s.alias}` : void 0 };
}).map((n) => (n.aliasesEnabled = e, [{ type: "flagName", data: n }, { type: "flagDescription", data: n }])), tableBreakpoints: W } };
}
s(T, "renderFlags");
const E = s((t) => !t || (t.version ?? (t.help ? t.help.version : void 0)), "getVersion"), C = s((t) => {
o(z, "renderFlags");
const k = o((t) => !t || (t.version ?? (t.help ? t.help.version : void 0)), "getVersion"), B = o((t) => {
const e = "parent" in t && t.parent?.name;
return (e ? `${e} ` : "") + t.name;
}, "getName");
function k(t) {
function K(t) {
const e = [];
t.name && e.push(C(t));
const r = E(t) ?? ("parent" in t && E(t.parent));
t.name && e.push(B(t));
const r = k(t) ?? ("parent" in t && k(t.parent));
if (r && e.push(`v${r}`), e.length !== 0) return { id: "name", type: "text", data: `${e.join(" ")}
` };
}
s(k, "getNameAndVersion");
function _(t) {
o(K, "getNameAndVersion");
function Z(t) {
const { help: e } = t;

@@ -469,4 +519,4 @@ if (!(!e || !e.description)) return { id: "description", type: "text", data: `${e.description}

}
s(_, "getDescription");
function F(t) {
o(Z, "getDescription");
function G(t) {
const e = t.help || {};

@@ -476,24 +526,24 @@ if ("usage" in e) return e.usage ? { id: "usage", type: "section", data: { title: "Usage:", body: Array.isArray(e.usage) ? e.usage.join(`

if (t.name) {
const r = [], n = [C(t)];
if (t.flags && Object.keys(t.flags).length > 0 && n.push("[flags...]"), t.parameters && t.parameters.length > 0) {
const { parameters: a } = t, i = a.indexOf("--"), o = i !== -1 && a.slice(i + 1).some((l) => l.startsWith("<"));
n.push(a.map((l) => l !== "--" ? l : o ? "--" : "[--]").join(" "));
const r = [], a = [B(t)];
if (t.flags && Object.keys(t.flags).length > 0 && a.push("[flags...]"), t.parameters && t.parameters.length > 0) {
const { parameters: n } = t, s = n.indexOf("--"), i = s !== -1 && n.slice(s + 1).some((d) => d.startsWith("<"));
a.push(n.map((d) => d !== "--" ? d : i ? "--" : "[--]").join(" "));
}
if (n.length > 1 && r.push(n.join(" ")), "commands" in t && t.commands?.length && r.push(`${t.name} <command>`), r.length > 0) return { id: "usage", type: "section", data: { title: "Usage:", body: r.join(`
if (a.length > 1 && r.push(a.join(" ")), "commands" in t && t.commands?.length && r.push(`${t.name} <command>`), r.length > 0) return { id: "usage", type: "section", data: { title: "Usage:", body: r.join(`
`) } };
}
}
s(F, "getUsage");
function H(t) {
return !("commands" in t) || !t.commands?.length ? void 0 : { id: "commands", type: "section", data: { title: "Commands:", body: { type: "table", data: { tableData: t.commands.map((n) => {
const { help: a } = n.options;
return [n.options.name, typeof a == "object" && a.description || ""];
o(G, "getUsage");
function Q(t) {
return !("commands" in t) || !t.commands?.length ? void 0 : { id: "commands", type: "section", data: { title: "Commands:", body: { type: "table", data: { tableData: t.commands.map((a) => {
const { help: n } = a.options;
return [a.options.name, typeof n == "object" && n.description || ""];
}), tableOptions: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }] } }, indentBody: 0 } };
}
s(H, "getCommands");
function U(t) {
if (!(!t.flags || Object.keys(t.flags).length === 0)) return { id: "flags", type: "section", data: { title: "Flags:", body: T(t.flags), indentBody: 0 } };
o(Q, "getCommands");
function X(t) {
if (!(!t.flags || Object.keys(t.flags).length === 0)) return { id: "flags", type: "section", data: { title: "Flags:", body: z(t.flags), indentBody: 0 } };
}
s(U, "getFlags");
function V(t) {
o(X, "getFlags");
function Y(t) {
const { help: e } = t;

@@ -505,4 +555,4 @@ if (!e || !e.examples || e.examples.length === 0) return;

}
s(V, "getExamples");
function J(t) {
o(Y, "getExamples");
function ee(t) {
if (!("alias" in t) || !t.alias) return;

@@ -512,7 +562,7 @@ const { alias: e } = t;

}
s(J, "getAliases");
const M = s((t) => [k, _, F, H, U, V, J].map((e) => e(t)).filter(Boolean), "generateHelp"), W = S$1.WriteStream.prototype.hasColors();
class z {
o(ee, "getAliases");
const te = o((t) => [K, Z, G, Q, X, Y, ee].map((e) => e(t)).filter(Boolean), "generateHelp"), re = M$1.WriteStream.prototype.hasColors();
class ne {
static {
s(this, "Renderers");
o(this, "Renderers");
}

@@ -523,3 +573,3 @@ text(e) {

bold(e) {
return W ? `\x1B[1m${e}\x1B[22m` : e.toLocaleUpperCase();
return re ? `\x1B[1m${e}\x1B[22m` : e.toLocaleUpperCase();
}

@@ -532,9 +582,9 @@ indentText({ text: e, spaces: r }) {

}
section({ title: e, body: r, indentBody: n = 2 }) {
section({ title: e, body: r, indentBody: a = 2 }) {
return `${(e ? `${this.heading(e)}
` : "") + (r ? this.indentText({ text: this.render(r), spaces: n }) : "")}
` : "") + (r ? this.indentText({ text: this.render(r), spaces: a }) : "")}
`;
}
table({ tableData: e, tableOptions: r, tableBreakpoints: n }) {
return rD(e.map((a) => a.map((i) => this.render(i))), n ? AD(n) : r);
table({ tableData: e, tableOptions: r, tableBreakpoints: a }) {
return rD(e.map((n) => n.map((s) => this.render(s))), a ? AD(a) : r);
}

@@ -548,10 +598,10 @@ flagParameter(e) {

flagName(e) {
const { flag: r, flagFormatted: n, aliasesEnabled: a, aliasFormatted: i } = e;
let o = "";
if (i ? o += `${i}, ` : a && (o += " "), o += n, "placeholder" in r && typeof r.placeholder == "string") o += `${this.flagOperator(e)}${r.placeholder}`;
const { flag: r, flagFormatted: a, aliasesEnabled: n, aliasFormatted: s } = e;
let i = "";
if (s ? i += `${s}, ` : n && (i += " "), i += a, "placeholder" in r && typeof r.placeholder == "string") i += `${this.flagOperator(e)}${r.placeholder}`;
else {
const l = this.flagParameter("type" in r ? r.type : r);
l && (o += `${this.flagOperator(e)}${l}`);
const d = this.flagParameter("type" in r ? r.type : r);
d && (i += `${this.flagOperator(e)}${d}`);
}
return o;
return i;
}

@@ -564,4 +614,4 @@ flagDefault(e) {

if ("default" in e) {
let { default: n } = e;
typeof n == "function" && (n = n()), n && (r += ` (default: ${this.flagDefault(n)})`);
let { default: a } = e;
typeof a == "function" && (a = a()), a && (r += ` (default: ${this.flagDefault(a)})`);
}

@@ -581,73 +631,94 @@ return r;

}
const $ = s((t) => t.length > 0 && !t.includes(" "), "isValidScriptName"), { stringify: f } = JSON, Z = /[|\\{}()[\]^$+*?.]/;
function x(t) {
const O = o((t) => t.length > 0 && !t.includes(" "), "isValidScriptName"), { stringify: A } = JSON, ae = /[|\\{}()[\]^$+*?.]/;
function P(t) {
const e = [];
let r, n;
for (const a of t) {
if (n) throw new Error(`Invalid parameter: Spread parameter ${f(n)} must be last`);
const i = a[0], o = a.at(-1);
let l;
if (i === "<" && o === ">" && (l = true, r)) throw new Error(`Invalid parameter: Required parameter ${f(a)} cannot come after optional parameter ${f(r)}`);
if (i === "[" && o === "]" && (l = false, r = a), l === void 0) throw new Error(`Invalid parameter: ${f(a)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);
let c = a.slice(1, -1);
const m = c.slice(-3) === "...";
m && (n = a, c = c.slice(0, -3));
const u = c.match(Z);
if (u) throw new Error(`Invalid parameter: ${f(a)}. Invalid character found ${f(u[0])}`);
e.push({ name: c, required: l, spread: m });
let r, a;
for (const n of t) {
if (a) throw new Error(`Invalid parameter: Spread parameter ${A(a)} must be last`);
const s = n[0], i = n.at(-1);
let d;
if (s === "<" && i === ">" && (d = true, r)) throw new Error(`Invalid parameter: Required parameter ${A(n)} cannot come after optional parameter ${A(r)}`);
if (s === "[" && i === "]" && (d = false, r = n), d === void 0) throw new Error(`Invalid parameter: ${A(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);
let l = n.slice(1, -1);
const h = l.slice(-3) === "...";
h && (a = n, l = l.slice(0, -3));
const u = l.match(ae);
if (u) throw new Error(`Invalid parameter: ${A(n)}. Invalid character found ${A(u[0])}`);
e.push({ name: l, required: d, spread: h });
}
return e;
}
s(x, "parseParameters");
function O(t, e, r, n) {
for (let a = 0; a < e.length; a += 1) {
const { name: i, required: o, spread: l } = e[a], c = R(i);
if (c in t) throw new Error(`Invalid parameter: ${f(i)} is used more than once.`);
const m = l ? r.slice(a) : r[a];
if (l && (a = e.length), o && (!m || l && m.length === 0)) return console.error(`Error: Missing required parameter ${f(i)}
`), n(), process.exit(1);
t[c] = m;
o(P, "parseParameters");
function S(t, e, r, a) {
for (let n = 0; n < e.length; n += 1) {
const { name: s, required: i, spread: d } = e[n], l = V(s);
if (l in t) throw new Error(`Invalid parameter: ${A(s)} is used more than once.`);
const h = d ? r.slice(n) : r[n];
if (d && (n = e.length), i && (!h || d && h.length === 0)) return console.error(`Error: Missing required parameter ${A(s)}
`), a(), process.exit(1);
t[l] = h;
}
}
s(O, "mapParametersToArguments");
function G(t) {
o(S, "mapParametersToArguments");
function se(t) {
return t !== false;
}
s(G, "helpEnabled");
function j(t, e, r, n) {
const a = { ...e.flags }, i = e.version && !("version" in a);
i && (a.version = { type: Boolean, description: "Show version" });
const { help: o } = e, l = G(o);
l && !("help" in a) && (a.help = { type: Boolean, alias: "h", description: "Show help" });
const c = z$2(a, n, { ignore: e.ignoreArgv }), m = s(() => {
o(se, "helpEnabled");
const ie = o((t) => {
const e = [];
for (const [r, a] of Object.entries(t)) if (e.push(r), a && typeof a == "object" && "alias" in a) {
const { alias: n } = a;
typeof n == "string" && n ? e.push(n) : Array.isArray(n) && e.push(...n.filter(Boolean));
}
return e;
}, "getKnownFlagNames"), oe = o((t, e) => {
if (t.length < 3 || e.length === 0) return;
const r = H(t, e);
return F(t, r) <= 2 ? r : void 0;
}, "findClosestFlag"), le = o((t, e) => {
const r = Object.keys(t);
if (r.length !== 0) {
for (const a of r) {
const n = oe(a, e), s = n ? ` (Did you mean --${n}?)` : "";
console.error(`Error: Unknown flag: --${a}.${s}`);
}
process.exit(1);
}
}, "handleUnknownFlags");
function I(t, e, r, a) {
const n = { ...e.flags }, s = e.version && !("version" in n);
s && (n.version = { type: Boolean, description: "Show version" });
const { help: i } = e, d = se(i);
d && !("help" in n) && (n.help = { type: Boolean, alias: "h", description: "Show help" });
const l = z$2(n, a, { ignore: e.ignoreArgv }), h = o(() => {
console.log(e.version);
}, "showVersion");
if (i && c.flags.version === true) return m(), process.exit(0);
const u = new z(), N = l && o?.render ? o.render : (d) => u.render(d), h = s((d) => {
const p = M({ ...e, ...d ? { help: d } : {}, flags: a });
console.log(N(p, u));
if (s && l.flags.version === true) return h(), process.exit(0);
const u = new ne(), C = d && i?.render ? i.render : (m) => u.render(m), $ = o((m) => {
const y = te({ ...e, ...m ? { help: m } : {}, flags: n });
console.log(C(y, u));
}, "showHelp");
if (l && c.flags.help === true) return h(), process.exit(0);
if (e.parameters) {
let { parameters: d } = e, p = c._;
const g = d.indexOf("--"), y = d.slice(g + 1), w = /* @__PURE__ */ Object.create(null);
let b = [];
g > -1 && y.length > 0 && (d = d.slice(0, g), b = c._["--"], p = p.slice(0, -b.length || void 0)), O(w, x(d), p, h), g > -1 && y.length > 0 && O(w, x(y), b, h), Object.assign(c._, w);
if (d && l.flags.help === true) return $(), process.exit(0);
if ((e.strictFlags ?? e.parent?.strictFlags) && le(l.unknownFlags, ie(n)), e.parameters) {
let { parameters: m } = e, y = l._;
const f = m.indexOf("--"), v = m.slice(f + 1), w = /* @__PURE__ */ Object.create(null);
let p = [];
f > -1 && v.length > 0 && (m = m.slice(0, f), p = l._["--"], y = y.slice(0, -p.length || void 0)), S(w, P(m), y, $), f > -1 && v.length > 0 && S(w, P(v), p, $), Object.assign(l._, w);
}
const v = { ...c, showVersion: m, showHelp: h }, A = { command: t, ...v };
const c = { ...l, showVersion: h, showHelp: $ }, g = { command: t, ...c };
if (typeof r == "function") {
const d = r(v);
if (d && "then" in d) return Object.assign(Promise.resolve(d), A);
const m = r(c);
if (m && "then" in m) return Object.assign(Promise.resolve(m), g);
}
return A;
return g;
}
s(j, "cliBase");
function K(t, e) {
o(I, "cliBase");
function ce(t, e) {
const r = /* @__PURE__ */ new Map();
for (const n of e) {
const a = [n.options.name], { alias: i } = n.options;
i && (Array.isArray(i) ? a.push(...i) : a.push(i));
for (const o of a) {
if (r.has(o)) throw new Error(`Duplicate command name found: ${f(o)}`);
r.set(o, n);
for (const a of e) {
const n = [a.options.name], { alias: s } = a.options;
s && (Array.isArray(s) ? n.push(...s) : n.push(s));
for (const i of n) {
if (r.has(i)) throw new Error(`Duplicate command name found: ${A(i)}`);
r.set(i, a);
}

@@ -657,163 +728,25 @@ }

}
s(K, "getCommand");
function Q(t, e, r = process.argv.slice(2)) {
o(ce, "getCommand");
function fe(t, e, r = process.argv.slice(2)) {
if (!t) throw new Error("Options is required");
if ("name" in t && (!t.name || !$(t.name))) throw new Error(`Invalid script name: ${f(t.name)}`);
const n = r[0];
if (t.commands && n && $(n)) {
const a = K(n, t.commands);
if (a) return j(a.options.name, { ...a.options, parent: t }, a.callback, r.slice(1));
if ("name" in t && (!t.name || !O(t.name))) throw new Error(`Invalid script name: ${A(t.name)}`);
const a = r[0];
if (t.commands && a && O(a)) {
const n = ce(a, t.commands);
if (n) return I(n.options.name, { ...n.options, parent: t }, n.callback, r.slice(1));
}
return j(void 0, t, e, r);
return I(void 0, t, e, r);
}
s(Q, "cli");
function X(t, e) {
o(fe, "cli");
function de(t, e) {
if (!t) throw new Error("Command options are required");
const { name: r } = t;
if (r === void 0) throw new Error("Command name is required");
if (!$(r)) throw new Error(`Invalid command name ${JSON.stringify(r)}. Command names must be one word.`);
if (!O(r)) throw new Error(`Invalid command name ${JSON.stringify(r)}. Command names must be one word.`);
return { options: t, callback: e };
}
s(X, "command");
o(de, "command");
const peq = new Uint32Array(65536);
const myers_32 = (a, b) => {
const n = a.length;
const m = b.length;
const lst = 1 << n - 1;
let pv = -1;
let mv = 0;
let sc = n;
let i = n;
while (i--) {
peq[a.charCodeAt(i)] |= 1 << i;
}
for (i = 0; i < m; i++) {
let eq = peq[b.charCodeAt(i)];
const xv = eq | mv;
eq |= (eq & pv) + pv ^ pv;
mv |= ~(eq | pv);
pv &= eq;
if (mv & lst) {
sc++;
}
if (pv & lst) {
sc--;
}
mv = mv << 1 | 1;
pv = pv << 1 | ~(xv | mv);
mv &= xv;
}
i = n;
while (i--) {
peq[a.charCodeAt(i)] = 0;
}
return sc;
};
const myers_x = (b, a) => {
const n = a.length;
const m = b.length;
const mhc = [];
const phc = [];
const hsize = Math.ceil(n / 32);
const vsize = Math.ceil(m / 32);
for (let i = 0; i < hsize; i++) {
phc[i] = -1;
mhc[i] = 0;
}
let j = 0;
for (; j < vsize - 1; j++) {
let mv2 = 0;
let pv2 = -1;
const start2 = j * 32;
const vlen2 = Math.min(32, m) + start2;
for (let k = start2; k < vlen2; k++) {
peq[b.charCodeAt(k)] |= 1 << k;
}
for (let i = 0; i < n; i++) {
const eq = peq[a.charCodeAt(i)];
const pb = phc[i / 32 | 0] >>> i & 1;
const mb = mhc[i / 32 | 0] >>> i & 1;
const xv = eq | mv2;
const xh = ((eq | mb) & pv2) + pv2 ^ pv2 | eq | mb;
let ph = mv2 | ~(xh | pv2);
let mh = pv2 & xh;
if (ph >>> 31 ^ pb) {
phc[i / 32 | 0] ^= 1 << i;
}
if (mh >>> 31 ^ mb) {
mhc[i / 32 | 0] ^= 1 << i;
}
ph = ph << 1 | pb;
mh = mh << 1 | mb;
pv2 = mh | ~(xv | ph);
mv2 = ph & xv;
}
for (let k = start2; k < vlen2; k++) {
peq[b.charCodeAt(k)] = 0;
}
}
let mv = 0;
let pv = -1;
const start = j * 32;
const vlen = Math.min(32, m - start) + start;
for (let k = start; k < vlen; k++) {
peq[b.charCodeAt(k)] |= 1 << k;
}
let score = m;
for (let i = 0; i < n; i++) {
const eq = peq[a.charCodeAt(i)];
const pb = phc[i / 32 | 0] >>> i & 1;
const mb = mhc[i / 32 | 0] >>> i & 1;
const xv = eq | mv;
const xh = ((eq | mb) & pv) + pv ^ pv | eq | mb;
let ph = mv | ~(xh | pv);
let mh = pv & xh;
score += ph >>> m - 1 & 1;
score -= mh >>> m - 1 & 1;
if (ph >>> 31 ^ pb) {
phc[i / 32 | 0] ^= 1 << i;
}
if (mh >>> 31 ^ mb) {
mhc[i / 32 | 0] ^= 1 << i;
}
ph = ph << 1 | pb;
mh = mh << 1 | mb;
pv = mh | ~(xv | ph);
mv = ph & xv;
}
for (let k = start; k < vlen; k++) {
peq[b.charCodeAt(k)] = 0;
}
return score;
};
const distance = (a, b) => {
if (a.length < b.length) {
const tmp = b;
b = a;
a = tmp;
}
if (b.length === 0) {
return a.length;
}
if (a.length <= 32) {
return myers_32(a, b);
}
return myers_x(a, b);
};
const closest = (str, arr) => {
let min_distance = Infinity;
let min_index = 0;
for (let i = 0; i < arr.length; i++) {
const dist = distance(str, arr[i]);
if (dist < min_distance) {
min_distance = dist;
min_index = i;
}
}
return arr[min_index];
};
var name = "poof";
var version = "3.0.1";
var version = "3.1.0";
var description = "Fast, non-blocking rm -rf alternative. Deletes files instantly while cleanup runs in the background.";

@@ -825,7 +758,2 @@ var packageJson = {

const knownFlags = ["dry", "verbose", "dangerous", "version", "help"];
const findClosestFlag = (unknown) => {
const match = closest(unknown, knownFlags);
return distance(unknown, match) <= 2 ? match : void 0;
};
const friendlyMessages = {

@@ -843,3 +771,3 @@ EBUSY: "Resource busy or locked",

};
const argv = Q({
const argv = fe({
name: packageJson.name,

@@ -865,14 +793,11 @@ version: packageJson.version,

description: "Allow deleting paths outside current directory"
},
ignore: {
type: [String],
alias: "i",
description: "Glob pattern to exclude from deletion"
}
}
},
strictFlags: true
});
const unknownFlags = Object.keys(argv.unknownFlags);
if (unknownFlags.length > 0) {
for (const flag of unknownFlags) {
const closestMatch = findClosestFlag(flag);
const suggestion = closestMatch ? ` (Did you mean --${closestMatch}?)` : "";
console.error(`Unknown flag: --${flag}.${suggestion}`);
}
process.exit(1);
}
(async () => {

@@ -887,3 +812,4 @@ const { globs } = argv._;

dry: argv.flags.dry,
dangerous: argv.flags.dangerous
dangerous: argv.flags.dangerous,
ignore: argv.flags.ignore
});

@@ -890,0 +816,0 @@ if (deleted.length === 0 && errors.length === 0) {

@@ -1586,6 +1586,9 @@ #!/usr/bin/env node

const glob = async (root, globPattern, options) => {
const glob = async (root, globPatterns, options) => {
const includeDot = options?.dot ?? false;
const isMatch = picomatch(globPattern, { dot: includeDot });
const isRecursive = globPattern.includes("**");
const ignorePatterns = options?.ignore;
const isMatch = picomatch(globPatterns, { dot: includeDot });
const shouldPrune = ignorePatterns?.length ? picomatch(ignorePatterns, { dot: true }) : void 0;
const patterns = Array.isArray(globPatterns) ? globPatterns : [globPatterns];
const isRecursive = patterns.some((p) => p.includes("**"));
const results = [];

@@ -1599,2 +1602,5 @@ const rootPrefix = root.length + 1;

const relativePath = fullPath.slice(rootPrefix);
if (shouldPrune?.(relativePath)) {
continue;
}
if (isMatch(relativePath)) {

@@ -1637,6 +1643,10 @@ results.push(fullPath);

};
const resolvePatterns = async (patterns, cwd, dangerous = false) => {
const needsDotMode = (globPattern) => /^\.[^\\/.]|[{,]\.[^\\/.]/.test(globPattern);
const resolvePatterns = async (patterns, options) => {
const { cwd, dangerous = false, ignore } = options;
const files = [];
const notFound = [];
await concurrentMap(patterns, GLOB_CONCURRENCY, async (pattern) => {
const groups = /* @__PURE__ */ new Map();
const explicitPaths = [];
for (const pattern of patterns) {
const posixPattern = toPosix(pattern);

@@ -1649,13 +1659,7 @@ const fullPattern = path.isAbsolute(pattern) ? posixPattern : path.posix.join(toPosix(cwd), posixPattern);

if (!scanned.isGlob) {
await fs.access(fullPattern).then(
() => {
debug$2(`explicit path exists: ${fullPattern}`);
files.push(fullPattern);
},
() => {
debug$2(`explicit path not found: ${pattern}`);
notFound.push(pattern);
}
);
return;
explicitPaths.push({
fullPath: fullPattern,
originalPattern: pattern
});
continue;
}

@@ -1666,10 +1670,43 @@ let root = scanned.base || toPosix(cwd);

}
const descendIntoDotDirectories = /^\.[^\\/.]|[{,]\.[^\\/.]/.test(scanned.glob);
const globStart = performance.now();
const matches = await glob(root, scanned.glob, { dot: descendIntoDotDirectories });
debug$2(`glob pattern=${pattern} files=${matches.length} time=${(performance.now() - globStart).toFixed(2)}ms`);
for (const match of matches) {
files.push(match);
const group = groups.get(root);
if (group) {
group.globs.push(scanned.glob);
group.needsDot = group.needsDot || needsDotMode(scanned.glob);
} else {
groups.set(root, {
globs: [scanned.glob],
needsDot: needsDotMode(scanned.glob)
});
}
});
}
await Promise.all([
// Check explicit paths concurrently
concurrentMap(explicitPaths, GLOB_CONCURRENCY, async ({ fullPath, originalPattern }) => {
await fs.access(fullPath).then(
() => {
debug$2(`explicit path exists: ${fullPath}`);
files.push(fullPath);
},
() => {
debug$2(`explicit path not found: ${originalPattern}`);
notFound.push(originalPattern);
}
);
}),
// Walk globs concurrently (one walk per unique root)
concurrentMap([...groups.keys()], GLOB_CONCURRENCY, async (root) => {
const group = groups.get(root);
const globStart = performance.now();
const matches = await glob(root, group.globs, {
dot: group.needsDot,
ignore
});
debug$2(
`glob root=${root} patterns=${group.globs.length} matches=${matches.length} time=${(performance.now() - globStart).toFixed(2)}ms`
);
for (const match of matches) {
files.push(match);
}
})
]);
return {

@@ -1755,2 +1792,18 @@ files,

const RENAME_CONCURRENCY = 100;
const filterNestedPaths = (paths) => {
if (paths.length === 0) {
return [];
}
const sorted = paths.slice().sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
const roots = [];
let lastAccepted;
for (const filePath of sorted) {
if (lastAccepted && filePath.startsWith(`${lastAccepted}/`)) {
continue;
}
roots.push(filePath);
lastAccepted = filePath;
}
return roots;
};
const poof = async (patterns, options) => {

@@ -1761,5 +1814,10 @@ const patternArray = Array.isArray(patterns) ? patterns : [patterns];

const resolveStart = performance.now();
const { files, notFound } = await resolvePatterns(patternArray, cwd, options?.dangerous ?? false);
const { files, notFound } = await resolvePatterns(patternArray, {
cwd,
dangerous: options?.dangerous,
ignore: options?.ignore
});
debug(`resolve files=${files.length} time=${(performance.now() - resolveStart).toFixed(2)}ms`);
const filesToDelete = files;
const filesToDelete = filterNestedPaths(files);
debug(`filtered ${files.length} -> ${filesToDelete.length} (removed ${files.length - filesToDelete.length} nested)`);
const errors = notFound.map((pattern) => {

@@ -1766,0 +1824,0 @@ const error = new Error(`Path not found: ${pattern}`);

{
"name": "poof",
"version": "3.0.1",
"version": "3.1.0",
"description": "Fast, non-blocking rm -rf alternative. Deletes files instantly while cleanup runs in the background.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -55,2 +55,3 @@ <h2 align="center">

| `--verbose` | `-v` | Log each file as it's deleted |
| `--ignore` | `-i` | Glob pattern to exclude from deletion |
| `--dangerous` | | Allow deleting paths outside current directory |

@@ -109,2 +110,14 @@ | `--version` | | Show version |

### Excluding paths
Use `--ignore` to exclude paths from deletion:
```sh
# Delete all dist folders except those in node_modules
$ poof "**/dist" --ignore "**/node_modules/**"
# Multiple ignore patterns
$ poof "**/*.log" -i "**/important/**" -i "**/backup/**"
```
### Dotfiles (hidden files)

@@ -220,2 +233,3 @@

dangerous?: boolean
ignore?: string[]
}

@@ -222,0 +236,0 @@