UNPKG

aicommits

Version:

Writes your git commit messages for you with AI

23 lines 542 kB
var LD=Object.defineProperty;var i=(e,t)=>LD(e,"name",{value:t,configurable:!0});var Qn,In,er,tr,nr,rr,or,ar,sr,ir,on,ur,lr,An,$n,cr,dr,pr,mr,fr,Tn,hr,Dr,gr,vr,yr,_r,br,wr,Cr,Fr,Er,xr,kr,Ir,Ar,$r,Tr,Sr,Br,Or,Rr,Nr,Pr,Mr,jr,zr,Lr,qr,Ur,Zr,Vr;import qD from"tty";import{Buffer as UD}from"node:buffer";import On from"node:path";import Cl,{ChildProcess as ZD}from"node:child_process";import Le,{stdin as Fl,stdout as El}from"node:process";import VD,{exec as hs,execSync as an}from"child_process";import wt from"path";import Ds from"fs";import{fileURLToPath as xl}from"node:url";import GD,{constants as kl}from"node:os";import WD from"assert";import HD from"events";import{createWriteStream as JD,createReadStream as KD}from"node:fs";import YD from"buffer";import gs from"stream";import XD,{promisify as Il}from"util";import{debuglog as QD}from"node:util";import*as Wo from"node:readline";import Al from"node:readline";import{Writable as eg}from"node:stream";import He from"fs/promises";import $l from"os";import tg from"crypto";import{fileURLToPath as ng,pathToFileURL as rg}from"url";var og=Object.defineProperty,Ue=i((e,t)=>og(e,"name",{value:t,configurable:!0}),"a");const ag="known-flag",sg="unknown-flag",ig="argument",ug=/\B([A-Z])/g,lg=Ue(e=>e.replaceAll(ug,"-$1").toLowerCase(),"camelToKebab"),{hasOwnProperty:cg}=Object.prototype,ao=Ue((e,t)=>cg.call(e,t),"hasOwn"),vs=Ue(e=>typeof e=="function"?[e,!1]:Array.isArray(e)?[e[0],!0]:vs(e.type),"parseFlagType"),Tl=Ue((e,t)=>e===Boolean?t!=="false":t,"normalizeBoolean"),Sl=Ue((e,t)=>typeof t=="boolean"?t:e===Number&&t===""?Number.NaN:e(t),"applyParser"),dg=/[\s.:=]/,pg=Ue(e=>{const t=`Flag name "${e}"`;if(e.length===0)throw new Error(`${t} cannot be empty`);if(e.length===1)throw new Error(`${t} must be longer than a character`);const n=e.match(dg);if(n)throw new Error(`${t} cannot contain "${n?.[0]}"`)},"validateFlagName"),ys=Ue((e,t,n)=>{if(ao(e,t))throw new Error(`Duplicate flags named "${t}"`);e[t]=n},"setFlag"),mg=Ue(e=>{const t={};for(const n in e){if(!ao(e,n))continue;pg(n);const r=e[n],o=[[],...vs(r),r];ys(t,n,o);const s=lg(n);if(n!==s&&ys(t,s,o),"alias"in r&&typeof r.alias=="string"){const{alias:a}=r,u=`Flag alias "${a}" for flag "${n}"`;if(a.length===0)throw new Error(`${u} cannot be empty`);if(a.length>1)throw new Error(`${u} must be a single character`);ys(t,a,o)}}return t},"createRegistry"),fg=Ue((e,t)=>{const n={};for(const r in e){if(!ao(e,r))continue;const[o,,s,a]=t[r];if(o.length===0&&"default"in a){let{default:u}=a;typeof u=="function"&&(u=u()),n[r]=u}else n[r]=s?o:o.pop()}return n},"finalizeFlags"),Ho="--",hg=3,Dg=/^-{1,2}\w/,Bl=Ue(e=>{if(!Dg.test(e))return;const t=!e.startsWith(Ho);let n=e.slice(t?1:2),r,o=-1;for(const s of["=",":","."]){const a=n.indexOf(s);a!==-1&&(o===-1||a<o)&&(o=a)}return o!==-1&&(r=n.slice(o+1),n=n.slice(0,o)),[n,r,t]},"parseFlagArgv"),Ol=Ue((e,{onFlag:t,onArgument:n})=>{let r;const o=Ue((s,a)=>{if(typeof r!="function")return!0;r(s,a),r=void 0},"triggerValueCallback");for(let s=0;s<e.length;s+=1){const a=e[s];if(a===Ho){o();const l=e.slice(s+1);n?.(l,[s],!0);break}const u=Bl(a);if(u){if(o(),!t)continue;const[l,c,d]=u;if(d)for(let m=0;m<l.length;m+=1){o();const f=m===l.length-1;r=t(l[m],f?c:void 0,[s,m+1,f])}else r=t(l,c,[s])}else o(a,[s])&&n?.([a],[s])}o()},"argvIterator"),Rl=Ue((e,t)=>{for(let n=t.length-1;n>=0;n-=1){const[r,o,s]=t[n];if(o){const a=e[r];let u=a.slice(0,o);if(s||(u+=a.slice(o+1)),u!=="-"){e[r]=u;continue}}e.splice(r,1)}},"spliceFromArgv"),gg=Ue((e,t=process.argv.slice(2),{ignore:n}={})=>{const r=[],o=mg(e),s={},a=[];return a[Ho]=[],Ol(t,{onFlag(u,l,c){const d=(c.length===hg||u.length>1)&&ao(o,u);if(!n?.(d?ag:sg,u,l)){if(d){const[m,f]=o[u],D=Tl(f,l),h=Ue((v,y)=>{r.push(c),y&&r.push(y),m.push(Sl(f,v||""))},"getFollowingValue");return D===void 0?h:h(D)}ao(s,u)||(s[u]=[]),s[u].push(l===void 0?!0:l),r.push(c)}},onArgument:Ue((u,l,c)=>{n?.(ig,t[l[0]])||(a.push(...u),c?(a[Ho]=u,t.splice(l[0])):r.push(l))},"onArgument")}),Rl(t,r),{flags:fg(e,o),unknownFlags:s,_:a}},"typeFlag");Ue((e,t,n=process.argv.slice(2))=>{const r=new Set(e.split(",").map(l=>Bl(l)?.[0])),[o,s]=vs(t),a=[],u=[];return Ol(n,{onFlag:Ue((l,c,d)=>{if(!r.has(l)||!s&&a.length>0)return;const m=Tl(o,c),f=Ue((D,h)=>{u.push(d),h&&u.push(h),a.push(Sl(o,D||""))},"getFollowingValue");return m===void 0?f:f(m)},"onFlag")}),Rl(n,u),s?a:a[0]},"getFlag");var vg=Object.defineProperty,ie=i((e,t)=>vg(e,"name",{value:t,configurable:!0}),"n");const yg=ie(e=>{const t=process.stdout.columns??Number.POSITIVE_INFINITY;return typeof e=="function"&&(e=e(t)),e||(e={}),Array.isArray(e)?{columns:e,stdoutColumns:t}:{columns:e.columns??[],stdoutColumns:e.stdoutColumns??t}},"getOptions");function Nl({onlyFirst:e=!1}={}){const t=["[\\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(t,e?void 0:"g")}i(Nl,"j$1"),ie(Nl,"ansiRegex");const _g=Nl();function _s(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(_g,"")}i(_s,"w$2"),ie(_s,"stripAnsi");function Pl(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}i(Pl,"P$2"),ie(Pl,"isAmbiguous");function Ml(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}i(Ml,"z$2"),ie(Ml,"isFullWidth");function jl(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}i(jl,"G$3"),ie(jl,"isWide");function zl(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}i(zl,"Z$1"),ie(zl,"validate");function Ll(e,{ambiguousAsWide:t=!1}={}){return zl(e),Ml(e)||jl(e)||t&&Pl(e)?2:1}i(Ll,"V$3"),ie(Ll,"eastAsianWidth");var bg=ie(()=>/[#*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?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\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 wg=new Intl.Segmenter,Cg=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Zt(e,t={}){if(typeof e!="string"||e.length===0)return 0;const{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=_s(e)),e.length===0)return 0;let o=0;const s={ambiguousAsWide:!n};for(const{segment:a}of wg.segment(e)){const u=a.codePointAt(0);if(!(u<=31||u>=127&&u<=159)&&!(u>=8203&&u<=8207||u===65279)&&!(u>=768&&u<=879||u>=6832&&u<=6911||u>=7616&&u<=7679||u>=8400&&u<=8447||u>=65056&&u<=65071)&&!(u>=55296&&u<=57343)&&!(u>=65024&&u<=65039)&&!Cg.test(a)){if(bg().test(a)){o+=2;continue}o+=Ll(u,s)}}return o}i(Zt,"d$2"),ie(Zt,"stringWidth");const ql=ie(e=>Math.max(...e.split(` `).map(t=>Zt(t))),"getLongestLineWidth"),Fg=ie(e=>{const t=[];for(const n of e){const{length:r}=n,o=r-t.length;for(let s=0;s<o;s+=1)t.push(0);for(let s=0;s<r;s+=1){const a=ql(n[s]);a>t[s]&&(t[s]=a)}}return t},"getColumnContentWidths"),Ul=/^\d+%$/,Zl={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Eg=ie((e,t)=>{const n=[];for(let r=0;r<e.length;r+=1){const o=t[r]??"auto";if(typeof o=="number"||o==="auto"||o==="content-width"||typeof o=="string"&&Ul.test(o)){n.push({...Zl,width:o,contentWidth:e[r]});continue}if(o&&typeof o=="object"){const s={...Zl,...o,contentWidth:e[r]};s.horizontalPadding=s.paddingLeft+s.paddingRight,n.push(s);continue}throw new Error(`Invalid column width: ${JSON.stringify(o)}`)}return n},"initColumns"),xg=ie((e,t)=>{for(const n of e){const{width:r}=n;if(r==="content-width"&&(n.width=n.contentWidth),r==="auto"){const l=Math.min(20,n.contentWidth);n.width=l,n.autoOverflow=n.contentWidth-l}if(typeof r=="string"&&Ul.test(r)){const l=Number.parseFloat(r.slice(0,-1))/100;n.width=Math.floor(t*l)-(n.paddingLeft+n.paddingRight)}const{horizontalPadding:o}=n,s=1,a=s+o;if(a>=t){const l=a-t,c=Math.ceil(n.paddingLeft/o*l),d=l-c;n.paddingLeft-=c,n.paddingRight-=d,n.horizontalPadding=n.paddingLeft+n.paddingRight}n.paddingLeftString=n.paddingLeft?" ".repeat(n.paddingLeft):"",n.paddingRightString=n.paddingRight?" ".repeat(n.paddingRight):"";const u=t-n.horizontalPadding;n.width=Math.max(Math.min(n.width,u),s)}},"resolveColumnWidths"),Vl=ie(()=>Object.assign([],{columns:0}),"makeRow"),kg=ie((e,t)=>{const n=[Vl()];let[r]=n;for(const o of e){const s=o.width+o.horizontalPadding;r.columns+s>t&&(r=Vl(),n.push(r)),r.push(o),r.columns+=s}for(const o of n){const s=o.reduce((f,D)=>f+D.width+D.horizontalPadding,0);let a=t-s;if(a===0)continue;const u=o.filter(f=>"autoOverflow"in f),l=u.filter(f=>f.autoOverflow>0),c=l.reduce((f,D)=>f+D.autoOverflow,0),d=Math.min(c,a);for(const f of l){const D=Math.floor(f.autoOverflow/c*d);f.width+=D,a-=D}const m=Math.floor(a/u.length);for(let f=0;f<u.length;f+=1){const D=u[f];f===u.length-1?D.width+=a:D.width+=m,a-=m}}return n},"balanceAuto"),Ig=ie((e,t,n)=>{const r=Eg(n,t);return xg(r,e),kg(r,e)},"computeColumnWidths"),bs=10,Gl=ie((e=0)=>t=>`\x1B[${t+e}m`,"wrapAnsi16"),Wl=ie((e=0)=>t=>`\x1B[${38+e};5;${t}m`,"wrapAnsi256"),Hl=ie((e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,"wrapAnsi16m"),Te={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(Te.modifier);const Ag=Object.keys(Te.color),$g=Object.keys(Te.bgColor);[...Ag,...$g];function Jl(){const e=new Map;for(const[t,n]of Object.entries(Te)){for(const[r,o]of Object.entries(n))Te[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[r]=Te[r],e.set(o[0],o[1]);Object.defineProperty(Te,t,{value:n,enumerable:!1})}return Object.defineProperty(Te,"codes",{value:e,enumerable:!1}),Te.color.close="\x1B[39m",Te.bgColor.close="\x1B[49m",Te.color.ansi=Gl(),Te.color.ansi256=Wl(),Te.color.ansi16m=Hl(),Te.bgColor.ansi=Gl(bs),Te.bgColor.ansi256=Wl(bs),Te.bgColor.ansi16m=Hl(bs),Object.defineProperties(Te,{rgbToAnsi256:{value:ie((t,n,r)=>t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5),"value"),enumerable:!1},hexToRgb:{value:ie(t=>{const n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(s=>s+s).join(""));const o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},"value"),enumerable:!1},hexToAnsi256:{value:ie(t=>Te.rgbToAnsi256(...Te.hexToRgb(t)),"value"),enumerable:!1},ansi256ToAnsi:{value:ie(t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,o;if(t>=232)n=((t-232)*10+8)/255,r=n,o=n;else{t-=16;const u=t%36;n=Math.floor(t/36)/5,r=Math.floor(u/6)/5,o=u%6/5}const s=Math.max(n,r,o)*2;if(s===0)return 30;let a=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(n));return s===2&&(a+=60),a},"value"),enumerable:!1},rgbToAnsi:{value:ie((t,n,r)=>Te.ansi256ToAnsi(Te.rgbToAnsi256(t,n,r)),"value"),enumerable:!1},hexToAnsi:{value:ie(t=>Te.ansi256ToAnsi(Te.hexToAnsi256(t)),"value"),enumerable:!1}}),Te}i(Jl,"FD$1"),ie(Jl,"assembleStyles");const Tg=Jl(),Jo=new Set(["\x1B","\x9B"]),Sg=39,ws="\x07",Kl="[",Bg="]",Yl="m",Ko=`${Bg}8;;`,Xl=ie(e=>`${Jo.values().next().value}${Kl}${e}${Yl}`,"wrapAnsiCode"),Ql=ie(e=>`${Jo.values().next().value}${Ko}${e}${ws}`,"wrapAnsiHyperlink"),Og=ie(e=>e.split(" ").map(t=>Zt(t)),"wordLengths"),Cs=ie((e,t,n)=>{const r=[...t];let o=!1,s=!1,a=Zt(_s(e.at(-1)));for(const[u,l]of r.entries()){const c=Zt(l);if(a+c<=n?e[e.length-1]+=l:(e.push(l),a=0),Jo.has(l)&&(o=!0,s=r.slice(u+1,u+1+Ko.length).join("")===Ko),o){s?l===ws&&(o=!1,s=!1):l===Yl&&(o=!1);continue}a+=c,a===n&&u<r.length-1&&(e.push(""),a=0)}!a&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},"wrapWord"),Rg=ie(e=>{const t=e.split(" ");let n=t.length;for(;n>0&&!(Zt(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(" ")+t.slice(n).join("")},"stringVisibleTrimSpacesRight"),Ng=ie((e,t,n={})=>{if(n.trim!==!1&&e.trim()==="")return"";let r="",o,s;const a=Og(e);let u=[""];for(const[m,f]of e.split(" ").entries()){n.trim!==!1&&(u[u.length-1]=u.at(-1).trimStart());let D=Zt(u.at(-1));if(m!==0&&(D>=t&&(n.wordWrap===!1||n.trim===!1)&&(u.push(""),D=0),(D>0||n.trim===!1)&&(u[u.length-1]+=" ",D++)),n.hard&&a[m]>t){const h=t-D,v=1+Math.floor((a[m]-h-1)/t);Math.floor((a[m]-1)/t)<v&&u.push(""),Cs(u,f,t);continue}if(D+a[m]>t&&D>0&&a[m]>0){if(n.wordWrap===!1&&D<t){Cs(u,f,t);continue}u.push("")}if(D+a[m]>t&&n.wordWrap===!1){Cs(u,f,t);continue}u[u.length-1]+=f}n.trim!==!1&&(u=u.map(m=>Rg(m)));const l=u.join(` `),c=[...l];let d=0;for(const[m,f]of c.entries()){if(r+=f,Jo.has(f)){const{groups:h}=new RegExp(`(?:\\${Kl}(?<code>\\d+)m|\\${Ko}(?<uri>.*)${ws})`).exec(l.slice(d))||{groups:{}};if(h.code!==void 0){const v=Number.parseFloat(h.code);o=v===Sg?void 0:v}else h.uri!==void 0&&(s=h.uri.length===0?void 0:h.uri)}const D=Tg.codes.get(Number(o));c[m+1]===` `?(s&&(r+=Ql("")),o&&D&&(r+=Xl(D))):f===` `&&(o&&D&&(r+=Xl(o)),s&&(r+=Ql(s))),d+=f.length}return r},"exec");function ec(e,t,n){return String(e).normalize().replaceAll(`\r `,` `).split(` `).map(r=>Ng(r,t,n)).join(` `)}i(ec,"BD$1"),ie(ec,"wrapAnsi");const tc=ie(e=>Array.from({length:e}).fill(""),"emptyLines"),Pg=ie((e,t)=>{const n=[];let r=0;for(const o of e){let s=0;const a=o.map(l=>{let c=t[r]??"";r+=1,l.preprocess&&(c=l.preprocess(c)),ql(c)>l.width&&(c=ec(c,l.width,{hard:!0}));let d=c.split(` `);if(l.postprocess){const{postprocess:m}=l;d=d.map((f,D)=>m.call(l,f,D))}return l.paddingTop&&d.unshift(...tc(l.paddingTop)),l.paddingBottom&&d.push(...tc(l.paddingBottom)),d.length>s&&(s=d.length),{...l,lines:d}}),u=[];for(let l=0;l<s;l+=1){const c=a.map(d=>{const m=d.lines[l]??"",f=Number.isFinite(d.width)?" ".repeat(d.width-Zt(m)):"";let D=d.paddingLeftString;return d.align==="right"&&(D+=f),D+=m,d.align==="left"&&(D+=f),D+d.paddingRightString}).join("");u.push(c)}n.push(u.join(` `))}return n.join(` `)},"renderRow"),Mg=ie((e,t)=>{if(!e||e.length===0)return"";const n=Fg(e),r=n.length;if(r===0)return"";const{stdoutColumns:o,columns:s}=yg(t);if(s.length>r)throw new Error(`${s.length} columns defined, but only ${r} columns found`);const a=Ig(o,s,n);return e.map(u=>Pg(a,u)).join(` `)},"terminalColumns"),jg=["<",">","=",">=","<="],zg=ie(e=>{if(!jg.includes(e))throw new TypeError(`Invalid breakpoint operator: ${e}`)},"assertOperator"),Lg=ie(e=>{const t=Object.keys(e).map(n=>{const[r,o]=n.split(" ");zg(r);const s=Number.parseInt(o,10);if(Number.isNaN(s))throw new TypeError(`Invalid breakpoint value: ${o}`);const a=e[n];return{operator:r,breakpoint:s,value:a}}).sort((n,r)=>r.breakpoint-n.breakpoint);return n=>t.find(({operator:r,breakpoint:o})=>r==="="&&n===o||r===">"&&n>o||r==="<"&&n<o||r===">="&&n>=o||r==="<="&&n<=o)?.value},"breakpoints");var qg=Object.defineProperty,Ie=i((e,t)=>qg(e,"name",{value:t,configurable:!0}),"s");const Ug=Ie(e=>e.replaceAll(/[\W_]([a-z\d])?/gi,(t,n)=>n?n.toUpperCase():""),"camelCase"),Zg=Ie(e=>e.replaceAll(/\B([A-Z])/g,"-$1").toLowerCase(),"kebabCase"),Vg={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:Ie(e=>e.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function nc(e){let t=!1;return{type:"table",data:{tableData:Object.keys(e).sort((n,r)=>n.localeCompare(r)).map(n=>{const r=e[n],o="alias"in r;return o&&(t=!0),{name:n,flag:r,flagFormatted:`--${Zg(n)}`,aliasesEnabled:t,aliasFormatted:o?`-${r.alias}`:void 0}}).map(n=>(n.aliasesEnabled=t,[{type:"flagName",data:n},{type:"flagDescription",data:n}])),tableBreakpoints:Vg}}}i(nc,"T"),Ie(nc,"renderFlags");const rc=Ie(e=>!e||(e.version??(e.help?e.help.version:void 0)),"getVersion"),oc=Ie(e=>{const t="parent"in e&&e.parent?.name;return(t?`${t} `:"")+e.name},"getName");function ac(e){const t=[];e.name&&t.push(oc(e));const n=rc(e)??("parent"in e&&rc(e.parent));if(n&&t.push(`v${n}`),t.length!==0)return{id:"name",type:"text",data:`${t.join(" ")} `}}i(ac,"k$2"),Ie(ac,"getNameAndVersion");function sc(e){const{help:t}=e;if(!(!t||!t.description))return{id:"description",type:"text",data:`${t.description} `}}i(sc,"_$1"),Ie(sc,"getDescription");function ic(e){const t=e.help||{};if("usage"in t)return t.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(t.usage)?t.usage.join(` `):t.usage}}:void 0;if(e.name){const n=[],r=[oc(e)];if(e.flags&&Object.keys(e.flags).length>0&&r.push("[flags...]"),e.parameters&&e.parameters.length>0){const{parameters:o}=e,s=o.indexOf("--"),a=s!==-1&&o.slice(s+1).some(u=>u.startsWith("<"));r.push(o.map(u=>u!=="--"?u:a?"--":"[--]").join(" "))}if(r.length>1&&n.push(r.join(" ")),"commands"in e&&e.commands?.length&&n.push(`${e.name} <command>`),n.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:n.join(` `)}}}}i(ic,"F"),Ie(ic,"getUsage");function uc(e){return!("commands"in e)||!e.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:e.commands.map(t=>[t.options.name,t.options.help?t.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}i(uc,"H"),Ie(uc,"getCommands");function lc(e){if(!(!e.flags||Object.keys(e.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:nc(e.flags),indentBody:0}}}i(lc,"U$1"),Ie(lc,"getFlags");function cc(e){const{help:t}=e;if(!t||!t.examples||t.examples.length===0)return;let{examples:n}=t;if(Array.isArray(n)&&(n=n.join(` `)),n)return{id:"examples",type:"section",data:{title:"Examples:",body:n}}}i(cc,"V$2"),Ie(cc,"getExamples");function dc(e){if(!("alias"in e)||!e.alias)return;const{alias:t}=e;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(t)?t.join(", "):t}}}i(dc,"J$1"),Ie(dc,"getAliases");const Gg=Ie(e=>[ac,sc,ic,uc,lc,cc,dc].map(t=>t(e)).filter(Boolean),"generateHelp"),Wg=qD.WriteStream.prototype.hasColors(),pc=(Qn=class{text(t){return t}bold(t){return Wg?`\x1B[1m${t}\x1B[22m`:t.toLocaleUpperCase()}indentText({text:t,spaces:n}){return t.replaceAll(/^/gm," ".repeat(n))}heading(t){return this.bold(t)}section({title:t,body:n,indentBody:r=2}){return`${(t?`${this.heading(t)} `:"")+(n?this.indentText({text:this.render(n),spaces:r}):"")} `}table({tableData:t,tableOptions:n,tableBreakpoints:r}){return Mg(t.map(o=>o.map(s=>this.render(s))),r?Lg(r):n)}flagParameter(t){return t===Boolean?"":t===String?"<string>":t===Number?"<number>":Array.isArray(t)?this.flagParameter(t[0]):"<value>"}flagOperator(t){return" "}flagName(t){const{flag:n,flagFormatted:r,aliasesEnabled:o,aliasFormatted:s}=t;let a="";if(s?a+=`${s}, `:o&&(a+=" "),a+=r,"placeholder"in n&&typeof n.placeholder=="string")a+=`${this.flagOperator(t)}${n.placeholder}`;else{const u=this.flagParameter("type"in n?n.type:n);u&&(a+=`${this.flagOperator(t)}${u}`)}return a}flagDefault(t){return JSON.stringify(t)}flagDescription({flag:t}){let n="description"in t?t.description??"":"";if("default"in t){let{default:r}=t;typeof r=="function"&&(r=r()),r&&(n+=` (default: ${this.flagDefault(r)})`)}return n}render(t){if(typeof t=="string")return t;if(Array.isArray(t))return t.map(n=>this.render(n)).join(` `);if("type"in t&&this[t.type]){const n=this[t.type];if(typeof n=="function")return n.call(this,t.data)}throw new Error(`Invalid node type: ${JSON.stringify(t)}`)}},i(Qn,"_z"),Qn);Ie(pc,"Renderers");let Hg=pc;const Fs=Ie(e=>e.length>0&&!e.includes(" "),"isValidScriptName"),{stringify:St}=JSON,Jg=/[|\\{}()[\]^$+*?.]/;function Yo(e){const t=[];let n,r;for(const o of e){if(r)throw new Error(`Invalid parameter: Spread parameter ${St(r)} must be last`);const s=o[0],a=o.at(-1);let u;if(s==="<"&&a===">"&&(u=!0,n))throw new Error(`Invalid parameter: Required parameter ${St(o)} cannot come after optional parameter ${St(n)}`);if(s==="["&&a==="]"&&(u=!1,n=o),u===void 0)throw new Error(`Invalid parameter: ${St(o)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let l=o.slice(1,-1);const c=l.slice(-3)==="...";c&&(r=o,l=l.slice(0,-3));const d=l.match(Jg);if(d)throw new Error(`Invalid parameter: ${St(o)}. Invalid character found ${St(d[0])}`);t.push({name:l,required:u,spread:c})}return t}i(Yo,"b$1"),Ie(Yo,"parseParameters");function Xo(e,t,n,r){for(let o=0;o<t.length;o+=1){const{name:s,required:a,spread:u}=t[o],l=Ug(s);if(l in e)throw new Error(`Invalid parameter: ${St(s)} is used more than once.`);const c=u?n.slice(o):n[o];if(u&&(o=t.length),a&&(!c||u&&c.length===0))return console.error(`Error: Missing required parameter ${St(s)} `),r(),process.exit(1);e[l]=c}}i(Xo,"v"),Ie(Xo,"mapParametersToArguments");function mc(e){return e===void 0||e!==!1}i(mc,"G$2"),Ie(mc,"helpEnabled");function Es(e,t,n,r){const o={...t.flags},s=t.version&&!("version"in o);s&&(o.version={type:Boolean,description:"Show version"});const{help:a}=t,u=mc(a);u&&!("help"in o)&&(o.help={type:Boolean,alias:"h",description:"Show help"});const l=gg(o,r,{ignore:t.ignoreArgv}),c=Ie(()=>{console.log(t.version)},"showVersion");if(s&&l.flags.version===!0)return c(),process.exit(0);const d=new Hg,m=u&&a?.render?a.render:v=>d.render(v),f=Ie(v=>{const y=Gg({...t,...v?{help:v}:{},flags:o});console.log(m(y,d))},"showHelp");if(u&&l.flags.help===!0)return f(),process.exit(0);if(t.parameters){let{parameters:v}=t,y=l._;const b=v.indexOf("--"),w=v.slice(b+1),C=Object.create(null);if(b>-1&&w.length>0){v=v.slice(0,b);const E=l._["--"];y=y.slice(0,-E.length||void 0),Xo(C,Yo(v),y,f),Xo(C,Yo(w),E,f)}else Xo(C,Yo(v),y,f);Object.assign(l._,C)}const D={...l,showVersion:c,showHelp:f},h={command:e,...D};if(typeof n=="function"){const v=n(D);if(v&&"then"in v)return Object.assign(Promise.resolve(v),h)}return h}i(Es,"j"),Ie(Es,"cliBase");function fc(e,t){const n=new Map;for(const r of t){const o=[r.options.name],{alias:s}=r.options;s&&(Array.isArray(s)?o.push(...s):o.push(s));for(const a of o){if(n.has(a))throw new Error(`Duplicate command name found: ${St(a)}`);n.set(a,r)}}return n.get(e)}i(fc,"K$1"),Ie(fc,"getCommand");function hc(e,t,n=process.argv.slice(2)){if(!e)throw new Error("Options is required");if("name"in e&&(!e.name||!Fs(e.name)))throw new Error(`Invalid script name: ${St(e.name)}`);const r=n[0];if(e.commands&&r&&Fs(r)){const o=fc(r,e.commands);if(o)return Es(o.options.name,{...o.options,parent:e},o.callback,n.slice(1))}return Es(void 0,e,t,n)}i(hc,"Q"),Ie(hc,"cli");function sn(e,t){if(!e)throw new Error("Command options are required");const{name:n}=e;if(n===void 0)throw new Error("Command name is required");if(!Fs(n))throw new Error(`Invalid command name ${JSON.stringify(n)}. Command names must be one word.`);return{options:e,callback:t}}i(sn,"X"),Ie(sn,"command");var Kg="aicommits",Yg="3.4.0",Xg="Writes your git commit messages for you with AI",Qg=["ai","git","commit","code changes"],ev="MIT",tv={type:"git",url:"git+https://github.com/Nutlope/aicommits.git"},nv="Hassan El Mghari (@nutlope)",rv="module",ov=["dist"],av={aicommits:"dist/cli.mjs",aic:"dist/cli.mjs"},sv={build:"pkgroll --minify",lint:"","type-check":"tsc",test:"tsx tests",prepack:"pnpm build && clean-pkg-json"},iv={"@clack/prompts":"^0.11.0","@types/ini":"^1.3.31","@types/node":"^24.10.1","clean-pkg-json":"^1.3.0",cleye:"^2.0.0",execa:"^7.0.0","fs-fixture":"^1.2.0",ini:"^3.0.1",kolorist:"^1.8.0",manten:"^0.7.0",ai:"^6.0.97","@ai-sdk/openai":"^3.0.30","@ai-sdk/openai-compatible":"^2.0.30",pkgroll:"^2.20.1",tsx:"^4.21.0",typescript:"^5.9.3"},uv={branches:["develop"]},Vt={name:Kg,version:Yg,description:Xg,keywords:Qg,license:ev,repository:tv,author:nv,type:rv,files:ov,bin:av,scripts:sv,devDependencies:iv,release:uv},Gt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function un(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i(un,"getDefaultExportFromCjs");var ln={exports:{}},xs,Dc;function lv(){if(Dc)return xs;Dc=1,xs=r,r.sync=o;var e=Ds;function t(s,a){var u=a.pathExt!==void 0?a.pathExt:process.env.PATHEXT;if(!u||(u=u.split(";"),u.indexOf("")!==-1))return!0;for(var l=0;l<u.length;l++){var c=u[l].toLowerCase();if(c&&s.substr(-c.length).toLowerCase()===c)return!0}return!1}i(t,"checkPathExt");function n(s,a,u){return!s.isSymbolicLink()&&!s.isFile()?!1:t(a,u)}i(n,"checkStat");function r(s,a,u){e.stat(s,function(l,c){u(l,l?!1:n(c,s,a))})}i(r,"isexe");function o(s,a){return n(e.statSync(s),s,a)}return i(o,"sync"),xs}i(lv,"requireWindows");var ks,gc;function cv(){if(gc)return ks;gc=1,ks=t,t.sync=n;var e=Ds;function t(s,a,u){e.stat(s,function(l,c){u(l,l?!1:r(c,a))})}i(t,"isexe");function n(s,a){return r(e.statSync(s),a)}i(n,"sync");function r(s,a){return s.isFile()&&o(s,a)}i(r,"checkStat");function o(s,a){var u=s.mode,l=s.uid,c=s.gid,d=a.uid!==void 0?a.uid:process.getuid&&process.getuid(),m=a.gid!==void 0?a.gid:process.getgid&&process.getgid(),f=parseInt("100",8),D=parseInt("010",8),h=parseInt("001",8),v=f|D,y=u&h||u&D&&c===m||u&f&&l===d||u&v&&d===0;return y}return i(o,"checkMode"),ks}i(cv,"requireMode");var Is,vc;function dv(){if(vc)return Is;vc=1;var e;process.platform==="win32"||Gt.TESTING_WINDOWS?e=lv():e=cv(),Is=t,t.sync=n;function t(r,o,s){if(typeof o=="function"&&(s=o,o={}),!s){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(a,u){t(r,o||{},function(l,c){l?u(l):a(c)})})}e(r,o||{},function(a,u){a&&(a.code==="EACCES"||o&&o.ignoreErrors)&&(a=null,u=!1),s(a,u)})}i(t,"isexe");function n(r,o){try{return e.sync(r,o||{})}catch(s){if(o&&o.ignoreErrors||s.code==="EACCES")return!1;throw s}}return i(n,"sync"),Is}i(dv,"requireIsexe");var As,yc;function pv(){if(yc)return As;yc=1;const e=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",t=wt,n=e?";":":",r=dv(),o=i(l=>Object.assign(new Error(`not found: ${l}`),{code:"ENOENT"}),"getNotFoundError"),s=i((l,c)=>{const d=c.colon||n,m=l.match(/\//)||e&&l.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(c.path||process.env.PATH||"").split(d)],f=e?c.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",D=e?f.split(d):[""];return e&&l.indexOf(".")!==-1&&D[0]!==""&&D.unshift(""),{pathEnv:m,pathExt:D,pathExtExe:f}},"getPathInfo"),a=i((l,c,d)=>{typeof c=="function"&&(d=c,c={}),c||(c={});const{pathEnv:m,pathExt:f,pathExtExe:D}=s(l,c),h=[],v=i(b=>new Promise((w,C)=>{if(b===m.length)return c.all&&h.length?w(h):C(o(l));const E=m[b],I=/^".*"$/.test(E)?E.slice(1,-1):E,O=t.join(I,l),$=!I&&/^\.[\\\/]/.test(l)?l.slice(0,2)+O:O;w(y($,b,0))}),"step"),y=i((b,w,C)=>new Promise((E,I)=>{if(C===f.length)return E(v(w+1));const O=f[C];r(b+O,{pathExt:D},($,T)=>{if(!$&&T)if(c.all)h.push(b+O);else return E(b+O);return E(y(b,w,C+1))})}),"subStep");return d?v(0).then(b=>d(null,b),d):v(0)},"which"),u=i((l,c)=>{c=c||{};const{pathEnv:d,pathExt:m,pathExtExe:f}=s(l,c),D=[];for(let h=0;h<d.length;h++){const v=d[h],y=/^".*"$/.test(v)?v.slice(1,-1):v,b=t.join(y,l),w=!y&&/^\.[\\\/]/.test(l)?l.slice(0,2)+b:b;for(let C=0;C<m.length;C++){const E=w+m[C];try{if(r.sync(E,{pathExt:f}))if(c.all)D.push(E);else return E}catch{}}}if(c.all&&D.length)return D;if(c.nothrow)return null;throw o(l)},"whichSync");return As=a,a.sync=u,As}i(pv,"requireWhich");var Qo={exports:{}},_c;function mv(){if(_c)return Qo.exports;_c=1;const e=i((t={})=>{const n=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(n).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"},"pathKey");return Qo.exports=e,Qo.exports.default=e,Qo.exports}i(mv,"requirePathKey");var $s,bc;function fv(){if(bc)return $s;bc=1;const e=wt,t=pv(),n=mv();function r(s,a){const u=s.options.env||process.env,l=process.cwd(),c=s.options.cwd!=null,d=c&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(s.options.cwd)}catch{}let m;try{m=t.sync(s.command,{path:u[n({env:u})],pathExt:a?e.delimiter:void 0})}catch{}finally{d&&process.chdir(l)}return m&&(m=e.resolve(c?s.options.cwd:"",m)),m}i(r,"resolveCommandAttempt");function o(s){return r(s)||r(s,!0)}return i(o,"resolveCommand"),$s=o,$s}i(fv,"requireResolveCommand");var ea={},wc;function hv(){if(wc)return ea;wc=1;const e=/([()\][%!^"`<>&|;, *?])/g;function t(r){return r=r.replace(e,"^$1"),r}i(t,"escapeCommand");function n(r,o){return r=`${r}`,r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(e,"^$1"),o&&(r=r.replace(e,"^$1")),r}return i(n,"escapeArgument"),ea.command=t,ea.argument=n,ea}i(hv,"require_escape");var Ts,Cc;function Dv(){return Cc||(Cc=1,Ts=/^#!(.*)/),Ts}i(Dv,"requireShebangRegex");var Ss,Fc;function gv(){if(Fc)return Ss;Fc=1;const e=Dv();return Ss=i((t="")=>{const n=t.match(e);if(!n)return null;const[r,o]=n[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?o:o?`${s} ${o}`:s},"shebangCommand"),Ss}i(gv,"requireShebangCommand");var Bs,Ec;function vv(){if(Ec)return Bs;Ec=1;const e=Ds,t=gv();function n(r){const s=Buffer.alloc(150);let a;try{a=e.openSync(r,"r"),e.readSync(a,s,0,150,0),e.closeSync(a)}catch{}return t(s.toString())}return i(n,"readShebang"),Bs=n,Bs}i(vv,"requireReadShebang");var Os,xc;function yv(){if(xc)return Os;xc=1;const e=wt,t=fv(),n=hv(),r=vv(),o=process.platform==="win32",s=/\.(?:com|exe)$/i,a=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function u(d){d.file=t(d);const m=d.file&&r(d.file);return m?(d.args.unshift(d.file),d.command=m,t(d)):d.file}i(u,"detectShebang");function l(d){if(!o)return d;const m=u(d),f=!s.test(m);if(d.options.forceShell||f){const D=a.test(m);d.command=e.normalize(d.command),d.command=n.command(d.command),d.args=d.args.map(v=>n.argument(v,D));const h=[d.command].concat(d.args).join(" ");d.args=["/d","/s","/c",`"${h}"`],d.command=process.env.comspec||"cmd.exe",d.options.windowsVerbatimArguments=!0}return d}i(l,"parseNonShell");function c(d,m,f){m&&!Array.isArray(m)&&(f=m,m=null),m=m?m.slice(0):[],f=Object.assign({},f);const D={command:d,args:m,options:f,file:void 0,original:{command:d,args:m}};return f.shell?D:l(D)}return i(c,"parse"),Os=c,Os}i(yv,"requireParse");var Rs,kc;function _v(){if(kc)return Rs;kc=1;const e=process.platform==="win32";function t(s,a){return Object.assign(new Error(`${a} ${s.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${a} ${s.command}`,path:s.command,spawnargs:s.args})}i(t,"notFoundError");function n(s,a){if(!e)return;const u=s.emit;s.emit=function(l,c){if(l==="exit"){const d=r(c,a);if(d)return u.call(s,"error",d)}return u.apply(s,arguments)}}i(n,"hookChildProcess");function r(s,a){return e&&s===1&&!a.file?t(a.original,"spawn"):null}i(r,"verifyENOENT");function o(s,a){return e&&s===1&&!a.file?t(a.original,"spawnSync"):null}return i(o,"verifyENOENTSync"),Rs={hookChildProcess:n,verifyENOENT:r,verifyENOENTSync:o,notFoundError:t},Rs}i(_v,"requireEnoent");var Ic;function bv(){if(Ic)return ln.exports;Ic=1;const e=VD,t=yv(),n=_v();function r(s,a,u){const l=t(s,a,u),c=e.spawn(l.command,l.args,l.options);return n.hookChildProcess(c,l),c}i(r,"spawn");function o(s,a,u){const l=t(s,a,u),c=e.spawnSync(l.command,l.args,l.options);return c.error=c.error||n.verifyENOENTSync(c.status,l),c}return i(o,"spawnSync"),ln.exports=r,ln.exports.spawn=r,ln.exports.sync=o,ln.exports._parse=t,ln.exports._enoent=n,ln.exports}i(bv,"requireCrossSpawn");var wv=bv(),Cv=un(wv);function Fv(e){const t=typeof e=="string"?` `:10,n=typeof e=="string"?"\r":13;return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}i(Fv,"stripFinalNewline");function Ac(e={}){const{env:t=process.env,platform:n=process.platform}=e;return n!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}i(Ac,"pathKey");const Ev=i(({cwd:e=Le.cwd(),path:t=Le.env[Ac()],preferLocal:n=!0,execPath:r=Le.execPath,addExecPath:o=!0}={})=>{const s=e instanceof URL?xl(e):e,a=On.resolve(s),u=[];return n&&xv(u,a),o&&kv(u,r,a),[...u,t].join(On.delimiter)},"npmRunPath"),xv=i((e,t)=>{let n;for(;n!==t;)e.push(On.join(t,"node_modules/.bin")),n=t,t=On.resolve(t,"..")},"applyPreferLocal"),kv=i((e,t,n)=>{const r=t instanceof URL?xl(t):t;e.push(On.resol