@negoziator/ai-commit 1.2.31 → 1.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.mjs +85 -85
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -1,100 +1,100 @@
1
1
  #!/usr/bin/env node
2
- import Fu from"tty";import{Buffer as Xt}from"node:buffer";import W from"node:path";import WD,{ChildProcess as Qt}from"node:child_process";import b,{stdin as qD,stdout as HD}from"node:process";import un from"child_process";import q from"path";import ku from"fs";import{fileURLToPath as zD}from"node:url";import Dn,{constants as KD}from"node:os";import VD from"assert";import YD from"events";import{createWriteStream as en,createReadStream as tn}from"node:fs";import nn from"buffer";import Ru from"stream";import JD from"util";import{debuglog as rn}from"node:util";import*as Cu from"node:readline";import ZD from"node:readline";import{WriteStream as on}from"node:tty";import O from"fs/promises";import XD from"os";import sn from"https";import an from"net";import cn from"tls";import ln,{fileURLToPath as Fn,pathToFileURL as Cn}from"url";const fn="known-flag",dn="unknown-flag",En="argument",{stringify:Q}=JSON,pn=/\B([A-Z])/g,hn=u=>u.replace(pn,"-$1").toLowerCase(),{hasOwnProperty:mn}=Object.prototype,uu=(u,D)=>mn.call(u,D),gn=u=>Array.isArray(u),QD=u=>typeof u=="function"?[u,!1]:gn(u)?[u[0],!0]:QD(u.type),Bn=(u,D)=>u===Boolean?D!=="false":D,bn=(u,D)=>typeof D=="boolean"?D:u===Number&&D===""?Number.NaN:u(D),yn=/[\s.:=]/,An=u=>{const D=`Flag name ${Q(u)}`;if(u.length===0)throw new Error(`${D} cannot be empty`);if(u.length===1)throw new Error(`${D} must be longer than a character`);const t=u.match(yn);if(t)throw new Error(`${D} cannot contain ${Q(t?.[0])}`)},wn=u=>{const D={},t=(e,r)=>{if(uu(D,e))throw new Error(`Duplicate flags named ${Q(e)}`);D[e]=r};for(const e in u){if(!uu(u,e))continue;An(e);const r=u[e],o=[[],...QD(r),r];t(e,o);const n=hn(e);if(e!==n&&t(n,o),"alias"in r&&typeof r.alias=="string"){const{alias:s}=r,i=`Flag alias ${Q(s)} for flag ${Q(e)}`;if(s.length===0)throw new Error(`${i} cannot be empty`);if(s.length>1)throw new Error(`${i} must be a single character`);t(s,o)}}return D},$n=(u,D)=>{const t={};for(const e in u){if(!uu(u,e))continue;const[r,,o,n]=D[e];if(r.length===0&&"default"in n){let{default:s}=n;typeof s=="function"&&(s=s()),t[e]=s}else t[e]=o?r:r.pop()}return t},fu="--",vn=/[.:=]/,xn=/^-{1,2}\w/,Sn=u=>{if(!xn.test(u))return;const D=!u.startsWith(fu);let t=u.slice(D?1:2),e;const r=t.match(vn);if(r){const{index:o}=r;e=t.slice(o+1),t=t.slice(0,o)}return[t,e,D]},On=(u,{onFlag:D,onArgument:t})=>{let e;const r=(o,n)=>{if(typeof e!="function")return!0;e(o,n),e=void 0};for(let o=0;o<u.length;o+=1){const n=u[o];if(n===fu){r();const i=u.slice(o+1);t?.(i,[o],!0);break}const s=Sn(n);if(s){if(r(),!D)continue;const[i,c,F]=s;if(F)for(let a=0;a<i.length;a+=1){r();const l=a===i.length-1;e=D(i[a],l?c:void 0,[o,a+1,l])}else e=D(i,c,[o])}else r(n,[o])&&t?.([n],[o])}r()},Tn=(u,D)=>{for(const[t,e,r]of D.reverse()){if(e){const o=u[t];let n=o.slice(0,e);if(r||(n+=o.slice(e+1)),n!=="-"){u[t]=n;continue}}u.splice(t,1)}},Pn=(u,D=process.argv.slice(2),{ignore:t}={})=>{const e=[],r=wn(u),o={},n=[];return n[fu]=[],On(D,{onFlag(s,i,c){const F=uu(r,s);if(!t?.(F?fn:dn,s,i)){if(F){const[a,l]=r[s],C=Bn(l,i),f=(d,p)=>{e.push(c),p&&e.push(p),a.push(bn(l,d||""))};return C===void 0?f:f(C)}uu(o,s)||(o[s]=[]),o[s].push(i===void 0?!0:i),e.push(c)}},onArgument(s,i,c){t?.(En,D[i[0]])||(n.push(...s),c?(n[fu]=s,D.splice(i[0])):e.push(i))}}),Tn(D,e),{flags:$n(u,r),unknownFlags:o,_:n}};var In=Object.create,du=Object.defineProperty,_n=Object.defineProperties,kn=Object.getOwnPropertyDescriptor,Rn=Object.getOwnPropertyDescriptors,Mn=Object.getOwnPropertyNames,ue=Object.getOwnPropertySymbols,jn=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,ee=(u,D,t)=>D in u?du(u,D,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[D]=t,Eu=(u,D)=>{for(var t in D||(D={}))De.call(D,t)&&ee(u,t,D[t]);if(ue)for(var t of ue(D))Nn.call(D,t)&&ee(u,t,D[t]);return u},Mu=(u,D)=>_n(u,Rn(D)),Ln=u=>du(u,"__esModule",{value:!0}),Gn=(u,D)=>()=>(u&&(D=u(u=0)),D),Un=(u,D)=>()=>(D||u((D={exports:{}}).exports,D),D.exports),Wn=(u,D,t,e)=>{if(D&&typeof D=="object"||typeof D=="function")for(let r of Mn(D))!De.call(u,r)&&r!=="default"&&du(u,r,{get:()=>D[r],enumerable:!(e=kn(D,r))||e.enumerable});return u},qn=(u,D)=>Wn(Ln(du(u!=null?In(jn(u)):{},"default",{value:u,enumerable:!0})),u),x=Gn(()=>{}),Hn=Un((u,D)=>{x(),D.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});x(),x(),x();var zn=u=>{var D,t,e;let r=(D=process.stdout.columns)!=null?D:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(r)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:r}:{columns:(t=u.columns)!=null?t:[],stdoutColumns:(e=u.stdoutColumns)!=null?e:r}};x(),x(),x(),x(),x();function Kn({onlyFirst:u=!1}={}){let D=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(D,u?void 0:"g")}function te(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(Kn(),"")}x();function Vn(u){return Number.isInteger(u)?u>=4352&&(u<=4447||u===9001||u===9002||11904<=u&&u<=12871&&u!==12351||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141):!1}var Yn=qn(Hn());function j(u){if(typeof u!="string"||u.length===0||(u=te(u),u.length===0))return 0;u=u.replace((0,Yn.default)()," ");let D=0;for(let t=0;t<u.length;t++){let e=u.codePointAt(t);e<=31||e>=127&&e<=159||e>=768&&e<=879||(e>65535&&t++,D+=Vn(e)?2:1)}return D}var ne=u=>Math.max(...u.split(`
3
- `).map(j)),Jn=u=>{let D=[];for(let t of u){let{length:e}=t,r=e-D.length;for(let o=0;o<r;o+=1)D.push(0);for(let o=0;o<e;o+=1){let n=ne(t[o]);n>D[o]&&(D[o]=n)}}return D};x();var re=/^\d+%$/,oe={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},Zn=(u,D)=>{var t;let e=[];for(let r=0;r<u.length;r+=1){let o=(t=D[r])!=null?t:"auto";if(typeof o=="number"||o==="auto"||o==="content-width"||typeof o=="string"&&re.test(o)){e.push(Mu(Eu({},oe),{width:o,contentWidth:u[r]}));continue}if(o&&typeof o=="object"){let n=Mu(Eu(Eu({},oe),o),{contentWidth:u[r]});n.horizontalPadding=n.paddingLeft+n.paddingRight,e.push(n);continue}throw new Error(`Invalid column width: ${JSON.stringify(o)}`)}return e};function Xn(u,D){for(let t of u){let{width:e}=t;if(e==="content-width"&&(t.width=t.contentWidth),e==="auto"){let i=Math.min(20,t.contentWidth);t.width=i,t.autoOverflow=t.contentWidth-i}if(typeof e=="string"&&re.test(e)){let i=Number.parseFloat(e.slice(0,-1))/100;t.width=Math.floor(D*i)-(t.paddingLeft+t.paddingRight)}let{horizontalPadding:r}=t,o=1,n=o+r;if(n>=D){let i=n-D,c=Math.ceil(t.paddingLeft/r*i),F=i-c;t.paddingLeft-=c,t.paddingRight-=F,t.horizontalPadding=t.paddingLeft+t.paddingRight}t.paddingLeftString=t.paddingLeft?" ".repeat(t.paddingLeft):"",t.paddingRightString=t.paddingRight?" ".repeat(t.paddingRight):"";let s=D-t.horizontalPadding;t.width=Math.max(Math.min(t.width,s),o)}}var se=()=>Object.assign([],{columns:0});function Qn(u,D){let t=[se()],[e]=t;for(let r of u){let o=r.width+r.horizontalPadding;e.columns+o>D&&(e=se(),t.push(e)),e.push(r),e.columns+=o}for(let r of t){let o=r.reduce((l,C)=>l+C.width+C.horizontalPadding,0),n=D-o;if(n===0)continue;let s=r.filter(l=>"autoOverflow"in l),i=s.filter(l=>l.autoOverflow>0),c=i.reduce((l,C)=>l+C.autoOverflow,0),F=Math.min(c,n);for(let l of i){let C=Math.floor(l.autoOverflow/c*F);l.width+=C,n-=C}let a=Math.floor(n/s.length);for(let l=0;l<s.length;l+=1){let C=s[l];l===s.length-1?C.width+=n:C.width+=a,n-=a}}return t}function ur(u,D,t){let e=Zn(t,D);return Xn(e,u),Qn(e,u)}x(),x(),x();var ju=10,ie=(u=0)=>D=>`\x1B[${D+u}m`,ae=(u=0)=>D=>`\x1B[${38+u};5;${D}m`,ce=(u=0)=>(D,t,e)=>`\x1B[${38+u};2;${D};${t};${e}m`;function Dr(){let u=new Map,D={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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};D.color.gray=D.color.blackBright,D.bgColor.bgGray=D.bgColor.bgBlackBright,D.color.grey=D.color.blackBright,D.bgColor.bgGrey=D.bgColor.bgBlackBright;for(let[t,e]of Object.entries(D)){for(let[r,o]of Object.entries(e))D[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},e[r]=D[r],u.set(o[0],o[1]);Object.defineProperty(D,t,{value:e,enumerable:!1})}return Object.defineProperty(D,"codes",{value:u,enumerable:!1}),D.color.close="\x1B[39m",D.bgColor.close="\x1B[49m",D.color.ansi=ie(),D.color.ansi256=ae(),D.color.ansi16m=ce(),D.bgColor.ansi=ie(ju),D.bgColor.ansi256=ae(ju),D.bgColor.ansi16m=ce(ju),Object.defineProperties(D,{rgbToAnsi256:{value:(t,e,r)=>t===e&&e===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let e=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(t.toString(16));if(!e)return[0,0,0];let{colorString:r}=e.groups;r.length===3&&(r=r.split("").map(n=>n+n).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>D.rgbToAnsi256(...D.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let e,r,o;if(t>=232)e=((t-232)*10+8)/255,r=e,o=e;else{t-=16;let i=t%36;e=Math.floor(t/36)/5,r=Math.floor(i/6)/5,o=i%6/5}let n=Math.max(e,r,o)*2;if(n===0)return 30;let s=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(e));return n===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,e,r)=>D.ansi256ToAnsi(D.rgbToAnsi256(t,e,r)),enumerable:!1},hexToAnsi:{value:t=>D.ansi256ToAnsi(D.hexToAnsi256(t)),enumerable:!1}}),D}var er=Dr(),tr=er,pu=new Set(["\x1B","\x9B"]),nr=39,Nu="\x07",le="[",rr="]",Fe="m",Lu=`${rr}8;;`,Ce=u=>`${pu.values().next().value}${le}${u}${Fe}`,fe=u=>`${pu.values().next().value}${Lu}${u}${Nu}`,or=u=>u.split(" ").map(D=>j(D)),Gu=(u,D,t)=>{let e=[...D],r=!1,o=!1,n=j(te(u[u.length-1]));for(let[s,i]of e.entries()){let c=j(i);if(n+c<=t?u[u.length-1]+=i:(u.push(i),n=0),pu.has(i)&&(r=!0,o=e.slice(s+1).join("").startsWith(Lu)),r){o?i===Nu&&(r=!1,o=!1):i===Fe&&(r=!1);continue}n+=c,n===t&&s<e.length-1&&(u.push(""),n=0)}!n&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},sr=u=>{let D=u.split(" "),t=D.length;for(;t>0&&!(j(D[t-1])>0);)t--;return t===D.length?u:D.slice(0,t).join(" ")+D.slice(t).join("")},ir=(u,D,t={})=>{if(t.trim!==!1&&u.trim()==="")return"";let e="",r,o,n=or(u),s=[""];for(let[c,F]of u.split(" ").entries()){t.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let a=j(s[s.length-1]);if(c!==0&&(a>=D&&(t.wordWrap===!1||t.trim===!1)&&(s.push(""),a=0),(a>0||t.trim===!1)&&(s[s.length-1]+=" ",a++)),t.hard&&n[c]>D){let l=D-a,C=1+Math.floor((n[c]-l-1)/D);Math.floor((n[c]-1)/D)<C&&s.push(""),Gu(s,F,D);continue}if(a+n[c]>D&&a>0&&n[c]>0){if(t.wordWrap===!1&&a<D){Gu(s,F,D);continue}s.push("")}if(a+n[c]>D&&t.wordWrap===!1){Gu(s,F,D);continue}s[s.length-1]+=F}t.trim!==!1&&(s=s.map(c=>sr(c)));let i=[...s.join(`
4
- `)];for(let[c,F]of i.entries()){if(e+=F,pu.has(F)){let{groups:l}=new RegExp(`(?:\\${le}(?<code>\\d+)m|\\${Lu}(?<uri>.*)${Nu})`).exec(i.slice(c).join(""))||{groups:{}};if(l.code!==void 0){let C=Number.parseFloat(l.code);r=C===nr?void 0:C}else l.uri!==void 0&&(o=l.uri.length===0?void 0:l.uri)}let a=tr.codes.get(Number(r));i[c+1]===`
5
- `?(o&&(e+=fe("")),r&&a&&(e+=Ce(a))):F===`
6
- `&&(r&&a&&(e+=Ce(r)),o&&(e+=fe(o)))}return e};function ar(u,D,t){return String(u).normalize().replace(/\r\n/g,`
2
+ var an=Object.defineProperty;var s=(u,D)=>an(u,"name",{value:D,configurable:!0});var Fu,Cu,fu;import Eu from"tty";import{Buffer as cn}from"node:buffer";import q from"node:path";import ue,{ChildProcess as ln}from"node:child_process";import y,{stdin as De,stdout as ee}from"node:process";import Fn from"child_process";import z from"path";import Lu from"fs";import{fileURLToPath as te}from"node:url";import Cn,{constants as ne}from"node:os";import re from"assert";import oe from"events";import{createWriteStream as fn,createReadStream as dn}from"node:fs";import En from"buffer";import Gu from"stream";import se from"util";import{debuglog as pn}from"node:util";import*as pu from"node:readline";import ie from"node:readline";import{WriteStream as hn}from"node:tty";import T from"fs/promises";import ae from"os";import mn from"https";import gn from"net";import Bn from"tls";import bn,{fileURLToPath as yn,pathToFileURL as An}from"url";const wn="known-flag",$n="unknown-flag",vn="argument",{stringify:uu}=JSON,xn=/\B([A-Z])/g,Sn=s(u=>u.replace(xn,"-$1").toLowerCase(),"v$2"),{hasOwnProperty:On}=Object.prototype,Du=s((u,D)=>On.call(u,D),"w$3"),Tn=s(u=>Array.isArray(u),"L$3"),ce=s(u=>typeof u=="function"?[u,!1]:Tn(u)?[u[0],!0]:ce(u.type),"b$4"),In=s((u,D)=>u===Boolean?D!=="false":D,"d$3"),Pn=s((u,D)=>typeof D=="boolean"?D:u===Number&&D===""?Number.NaN:u(D),"m$2"),kn=/[\s.:=]/,_n=s(u=>{const D=`Flag name ${uu(u)}`;if(u.length===0)throw new Error(`${D} cannot be empty`);if(u.length===1)throw new Error(`${D} must be longer than a character`);const e=u.match(kn);if(e)throw new Error(`${D} cannot contain ${uu(e?.[0])}`)},"B"),Rn=s(u=>{const D={},e=s((n,r)=>{if(Du(D,n))throw new Error(`Duplicate flags named ${uu(n)}`);D[n]=r},"r");for(const n in u){if(!Du(u,n))continue;_n(n);const r=u[n],o=[[],...ce(r),r];e(n,o);const t=Sn(n);if(n!==t&&e(t,o),"alias"in r&&typeof r.alias=="string"){const{alias:i}=r,a=`Flag alias ${uu(i)} for flag ${uu(n)}`;if(i.length===0)throw new Error(`${a} cannot be empty`);if(i.length>1)throw new Error(`${a} must be a single character`);e(i,o)}}return D},"K$2"),Mn=s((u,D)=>{const e={};for(const n in u){if(!Du(u,n))continue;const[r,,o,t]=D[n];if(r.length===0&&"default"in t){let{default:i}=t;typeof i=="function"&&(i=i()),e[n]=i}else e[n]=o?r:r.pop()}return e},"_$3"),hu="--",jn=/[.:=]/,Nn=/^-{1,2}\w/,Ln=s(u=>{if(!Nn.test(u))return;const D=!u.startsWith(hu);let e=u.slice(D?1:2),n;const r=e.match(jn);if(r){const{index:o}=r;n=e.slice(o+1),e=e.slice(0,o)}return[e,n,D]},"N$1"),Gn=s((u,{onFlag:D,onArgument:e})=>{let n;const r=s((o,t)=>{if(typeof n!="function")return!0;n(o,t),n=void 0},"o");for(let o=0;o<u.length;o+=1){const t=u[o];if(t===hu){r();const a=u.slice(o+1);e?.(a,[o],!0);break}const i=Ln(t);if(i){if(r(),!D)continue;const[a,l,C]=i;if(C)for(let c=0;c<a.length;c+=1){r();const F=c===a.length-1;n=D(a[c],F?l:void 0,[o,c+1,F])}else n=D(a,l,[o])}else r(t,[o])&&e?.([t],[o])}r()},"$$1"),Wn=s((u,D)=>{for(const[e,n,r]of D.reverse()){if(n){const o=u[e];let t=o.slice(0,n);if(r||(t+=o.slice(n+1)),t!=="-"){u[e]=t;continue}}u.splice(e,1)}},"E$1"),Un=s((u,D=process.argv.slice(2),{ignore:e}={})=>{const n=[],r=Rn(u),o={},t=[];return t[hu]=[],Gn(D,{onFlag(i,a,l){const C=Du(r,i);if(!e?.(C?wn:$n,i,a)){if(C){const[c,F]=r[i],f=In(F,a),d=s((E,h)=>{n.push(l),h&&n.push(h),c.push(Pn(F,E||""))},"p");return f===void 0?d:d(f)}Du(o,i)||(o[i]=[]),o[i].push(a===void 0?!0:a),n.push(l)}},onArgument(i,a,l){e?.(vn,D[a[0]])||(t.push(...i),l?(t[hu]=i,D.splice(a[0])):n.push(a))}}),Wn(D,n),{flags:Mn(u,r),unknownFlags:o,_:t}},"U$2");var qn=Object.create,mu=Object.defineProperty,zn=Object.defineProperties,Hn=Object.getOwnPropertyDescriptor,Kn=Object.getOwnPropertyDescriptors,Vn=Object.getOwnPropertyNames,le=Object.getOwnPropertySymbols,Yn=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty,Jn=Object.prototype.propertyIsEnumerable,Ce=s((u,D,e)=>D in u?mu(u,D,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[D]=e,"W$2"),gu=s((u,D)=>{for(var e in D||(D={}))Fe.call(D,e)&&Ce(u,e,D[e]);if(le)for(var e of le(D))Jn.call(D,e)&&Ce(u,e,D[e]);return u},"p"),Wu=s((u,D)=>zn(u,Kn(D)),"c"),Zn=s(u=>mu(u,"__esModule",{value:!0}),"nD$1"),Xn=s((u,D)=>()=>(u&&(D=u(u=0)),D),"rD$1"),Qn=s((u,D)=>()=>(D||u((D={exports:{}}).exports,D),D.exports),"iD$1"),ur=s((u,D,e,n)=>{if(D&&typeof D=="object"||typeof D=="function")for(let r of Vn(D))!Fe.call(u,r)&&r!=="default"&&mu(u,r,{get:()=>D[r],enumerable:!(n=Hn(D,r))||n.enumerable});return u},"oD$1"),Dr=s((u,D)=>ur(Zn(mu(u!=null?qn(Yn(u)):{},"default",{value:u,enumerable:!0})),u),"BD"),O=Xn(()=>{}),er=Qn((u,D)=>{O(),D.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});O(),O(),O();var tr=s(u=>{var D,e,n;let r=(D=process.stdout.columns)!=null?D:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(r)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:r}:{columns:(e=u.columns)!=null?e:[],stdoutColumns:(n=u.stdoutColumns)!=null?n:r}},"v$1");O(),O(),O(),O(),O();function nr({onlyFirst:u=!1}={}){let D=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(D,u?void 0:"g")}s(nr,"w$2");function fe(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(nr(),"")}s(fe,"d$2"),O();function rr(u){return Number.isInteger(u)?u>=4352&&(u<=4447||u===9001||u===9002||11904<=u&&u<=12871&&u!==12351||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141):!1}s(rr,"y$3");var or=Dr(er());function N(u){if(typeof u!="string"||u.length===0||(u=fe(u),u.length===0))return 0;u=u.replace((0,or.default)()," ");let D=0;for(let e=0;e<u.length;e++){let n=u.codePointAt(e);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&e++,D+=rr(n)?2:1)}return D}s(N,"g$1");var de=s(u=>Math.max(...u.split(`
3
+ `).map(N)),"b$3"),sr=s(u=>{let D=[];for(let e of u){let{length:n}=e,r=n-D.length;for(let o=0;o<r;o+=1)D.push(0);for(let o=0;o<n;o+=1){let t=de(e[o]);t>D[o]&&(D[o]=t)}}return D},"k$1");O();var Ee=/^\d+%$/,pe={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},ir=s((u,D)=>{var e;let n=[];for(let r=0;r<u.length;r+=1){let o=(e=D[r])!=null?e:"auto";if(typeof o=="number"||o==="auto"||o==="content-width"||typeof o=="string"&&Ee.test(o)){n.push(Wu(gu({},pe),{width:o,contentWidth:u[r]}));continue}if(o&&typeof o=="object"){let t=Wu(gu(gu({},pe),o),{contentWidth:u[r]});t.horizontalPadding=t.paddingLeft+t.paddingRight,n.push(t);continue}throw new Error(`Invalid column width: ${JSON.stringify(o)}`)}return n},"sD$1");function ar(u,D){for(let e of u){let{width:n}=e;if(n==="content-width"&&(e.width=e.contentWidth),n==="auto"){let a=Math.min(20,e.contentWidth);e.width=a,e.autoOverflow=e.contentWidth-a}if(typeof n=="string"&&Ee.test(n)){let a=Number.parseFloat(n.slice(0,-1))/100;e.width=Math.floor(D*a)-(e.paddingLeft+e.paddingRight)}let{horizontalPadding:r}=e,o=1,t=o+r;if(t>=D){let a=t-D,l=Math.ceil(e.paddingLeft/r*a),C=a-l;e.paddingLeft-=l,e.paddingRight-=C,e.horizontalPadding=e.paddingLeft+e.paddingRight}e.paddingLeftString=e.paddingLeft?" ".repeat(e.paddingLeft):"",e.paddingRightString=e.paddingRight?" ".repeat(e.paddingRight):"";let i=D-e.horizontalPadding;e.width=Math.max(Math.min(e.width,i),o)}}s(ar,"aD$1");var he=s(()=>Object.assign([],{columns:0}),"G$1");function cr(u,D){let e=[he()],[n]=e;for(let r of u){let o=r.width+r.horizontalPadding;n.columns+o>D&&(n=he(),e.push(n)),n.push(r),n.columns+=o}for(let r of e){let o=r.reduce((F,f)=>F+f.width+f.horizontalPadding,0),t=D-o;if(t===0)continue;let i=r.filter(F=>"autoOverflow"in F),a=i.filter(F=>F.autoOverflow>0),l=a.reduce((F,f)=>F+f.autoOverflow,0),C=Math.min(l,t);for(let F of a){let f=Math.floor(F.autoOverflow/l*C);F.width+=f,t-=f}let c=Math.floor(t/i.length);for(let F=0;F<i.length;F+=1){let f=i[F];F===i.length-1?f.width+=t:f.width+=c,t-=c}}return e}s(cr,"lD$1");function lr(u,D,e){let n=ir(e,D);return ar(n,u),cr(n,u)}s(lr,"Z$2"),O(),O(),O();var Uu=10,me=s((u=0)=>D=>`\x1B[${D+u}m`,"U$1"),ge=s((u=0)=>D=>`\x1B[${38+u};5;${D}m`,"V$2"),Be=s((u=0)=>(D,e,n)=>`\x1B[${38+u};2;${D};${e};${n}m`,"Y");function Fr(){let u=new Map,D={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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};D.color.gray=D.color.blackBright,D.bgColor.bgGray=D.bgColor.bgBlackBright,D.color.grey=D.color.blackBright,D.bgColor.bgGrey=D.bgColor.bgBlackBright;for(let[e,n]of Object.entries(D)){for(let[r,o]of Object.entries(n))D[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[r]=D[r],u.set(o[0],o[1]);Object.defineProperty(D,e,{value:n,enumerable:!1})}return Object.defineProperty(D,"codes",{value:u,enumerable:!1}),D.color.close="\x1B[39m",D.bgColor.close="\x1B[49m",D.color.ansi=me(),D.color.ansi256=ge(),D.color.ansi16m=Be(),D.bgColor.ansi=me(Uu),D.bgColor.ansi256=ge(Uu),D.bgColor.ansi16m=Be(Uu),Object.defineProperties(D,{rgbToAnsi256:{value:(e,n,r)=>e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:e=>{let n=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(e.toString(16));if(!n)return[0,0,0];let{colorString:r}=n.groups;r.length===3&&(r=r.split("").map(t=>t+t).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:e=>D.rgbToAnsi256(...D.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let n,r,o;if(e>=232)n=((e-232)*10+8)/255,r=n,o=n;else{e-=16;let a=e%36;n=Math.floor(e/36)/5,r=Math.floor(a/6)/5,o=a%6/5}let t=Math.max(n,r,o)*2;if(t===0)return 30;let i=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(n));return t===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,n,r)=>D.ansi256ToAnsi(D.rgbToAnsi256(e,n,r)),enumerable:!1},hexToAnsi:{value:e=>D.ansi256ToAnsi(D.hexToAnsi256(e)),enumerable:!1}}),D}s(Fr,"AD");var Cr=Fr(),fr=Cr,Bu=new Set(["\x1B","\x9B"]),dr=39,qu="\x07",be="[",Er="]",ye="m",zu=`${Er}8;;`,Ae=s(u=>`${Bu.values().next().value}${be}${u}${ye}`,"J$2"),we=s(u=>`${Bu.values().next().value}${zu}${u}${qu}`,"Q$1"),pr=s(u=>u.split(" ").map(D=>N(D)),"hD$1"),Hu=s((u,D,e)=>{let n=[...D],r=!1,o=!1,t=N(fe(u[u.length-1]));for(let[i,a]of n.entries()){let l=N(a);if(t+l<=e?u[u.length-1]+=a:(u.push(a),t=0),Bu.has(a)&&(r=!0,o=n.slice(i+1).join("").startsWith(zu)),r){o?a===qu&&(r=!1,o=!1):a===ye&&(r=!1);continue}t+=l,t===e&&i<n.length-1&&(u.push(""),t=0)}!t&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},"S$3"),hr=s(u=>{let D=u.split(" "),e=D.length;for(;e>0&&!(N(D[e-1])>0);)e--;return e===D.length?u:D.slice(0,e).join(" ")+D.slice(e).join("")},"cD"),mr=s((u,D,e={})=>{if(e.trim!==!1&&u.trim()==="")return"";let n="",r,o,t=pr(u),i=[""];for(let[l,C]of u.split(" ").entries()){e.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let c=N(i[i.length-1]);if(l!==0&&(c>=D&&(e.wordWrap===!1||e.trim===!1)&&(i.push(""),c=0),(c>0||e.trim===!1)&&(i[i.length-1]+=" ",c++)),e.hard&&t[l]>D){let F=D-c,f=1+Math.floor((t[l]-F-1)/D);Math.floor((t[l]-1)/D)<f&&i.push(""),Hu(i,C,D);continue}if(c+t[l]>D&&c>0&&t[l]>0){if(e.wordWrap===!1&&c<D){Hu(i,C,D);continue}i.push("")}if(c+t[l]>D&&e.wordWrap===!1){Hu(i,C,D);continue}i[i.length-1]+=C}e.trim!==!1&&(i=i.map(l=>hr(l)));let a=[...i.join(`
4
+ `)];for(let[l,C]of a.entries()){if(n+=C,Bu.has(C)){let{groups:F}=new RegExp(`(?:\\${be}(?<code>\\d+)m|\\${zu}(?<uri>.*)${qu})`).exec(a.slice(l).join(""))||{groups:{}};if(F.code!==void 0){let f=Number.parseFloat(F.code);r=f===dr?void 0:f}else F.uri!==void 0&&(o=F.uri.length===0?void 0:F.uri)}let c=fr.codes.get(Number(r));a[l+1]===`
5
+ `?(o&&(n+=we("")),r&&c&&(n+=Ae(c))):C===`
6
+ `&&(r&&c&&(n+=Ae(r)),o&&(n+=we(o)))}return n},"dD");function gr(u,D,e){return String(u).normalize().replace(/\r\n/g,`
7
7
  `).split(`
8
- `).map(e=>ir(e,D,t)).join(`
9
- `)}var de=u=>Array.from({length:u}).fill("");function cr(u,D){let t=[],e=0;for(let r of u){let o=0,n=r.map(i=>{var c;let F=(c=D[e])!=null?c:"";e+=1,i.preprocess&&(F=i.preprocess(F)),ne(F)>i.width&&(F=ar(F,i.width,{hard:!0}));let a=F.split(`
10
- `);if(i.postprocess){let{postprocess:l}=i;a=a.map((C,f)=>l.call(i,C,f))}return i.paddingTop&&a.unshift(...de(i.paddingTop)),i.paddingBottom&&a.push(...de(i.paddingBottom)),a.length>o&&(o=a.length),Mu(Eu({},i),{lines:a})}),s=[];for(let i=0;i<o;i+=1){let c=n.map(F=>{var a;let l=(a=F.lines[i])!=null?a:"",C=Number.isFinite(F.width)?" ".repeat(F.width-j(l)):"",f=F.paddingLeftString;return F.align==="right"&&(f+=C),f+=l,F.align==="left"&&(f+=C),f+F.paddingRightString}).join("");s.push(c)}t.push(s.join(`
11
- `))}return t.join(`
12
- `)}function lr(u,D){if(!u||u.length===0)return"";let t=Jn(u),e=t.length;if(e===0)return"";let{stdoutColumns:r,columns:o}=zn(D);if(o.length>e)throw new Error(`${o.length} columns defined, but only ${e} columns found`);let n=ur(r,o,t);return u.map(s=>cr(n,s)).join(`
13
- `)}x();var Fr=["<",">","=",">=","<="];function Cr(u){if(!Fr.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}function fr(u){let D=Object.keys(u).map(t=>{let[e,r]=t.split(" ");Cr(e);let o=Number.parseInt(r,10);if(Number.isNaN(o))throw new TypeError(`Invalid breakpoint value: ${r}`);let n=u[t];return{operator:e,breakpoint:o,value:n}}).sort((t,e)=>e.breakpoint-t.breakpoint);return t=>{var e;return(e=D.find(({operator:r,breakpoint:o})=>r==="="&&t===o||r===">"&&t>o||r==="<"&&t<o||r===">="&&t>=o||r==="<="&&t<=o))==null?void 0:e.value}}const dr=u=>u.replace(/[\W_]([a-z\d])?/gi,(D,t)=>t?t.toUpperCase():""),Er=u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),pr={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:u=>u.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function hr(u){let D=!1;return{type:"table",data:{tableData:Object.keys(u).sort((t,e)=>t.localeCompare(e)).map(t=>{const e=u[t],r="alias"in e;return r&&(D=!0),{name:t,flag:e,flagFormatted:`--${Er(t)}`,aliasesEnabled:D,aliasFormatted:r?`-${e.alias}`:void 0}}).map(t=>(t.aliasesEnabled=D,[{type:"flagName",data:t},{type:"flagDescription",data:t}])),tableBreakpoints:pr}}}const Ee=u=>!u||(u.version??(u.help?u.help.version:void 0)),pe=u=>{const D="parent"in u&&u.parent?.name;return(D?`${D} `:"")+u.name};function mr(u){const D=[];u.name&&D.push(pe(u));const t=Ee(u)??("parent"in u&&Ee(u.parent));if(t&&D.push(`v${t}`),D.length!==0)return{id:"name",type:"text",data:`${D.join(" ")}
14
- `}}function gr(u){const{help:D}=u;if(!(!D||!D.description))return{id:"description",type:"text",data:`${D.description}
15
- `}}function Br(u){const D=u.help||{};if("usage"in D)return D.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(D.usage)?D.usage.join(`
16
- `):D.usage}}:void 0;if(u.name){const t=[],e=[pe(u)];if(u.flags&&Object.keys(u.flags).length>0&&e.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:r}=u,o=r.indexOf("--"),n=o>-1&&r.slice(o+1).some(s=>s.startsWith("<"));e.push(r.map(s=>s!=="--"?s:n?"--":"[--]").join(" "))}if(e.length>1&&t.push(e.join(" ")),"commands"in u&&u.commands?.length&&t.push(`${u.name} <command>`),t.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:t.join(`
17
- `)}}}}function br(u){return!("commands"in u)||!u.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u.commands.map(D=>[D.options.name,D.options.help?D.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}function yr(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:hr(u.flags),indentBody:0}}}function Ar(u){const{help:D}=u;if(!D||!D.examples||D.examples.length===0)return;let{examples:t}=D;if(Array.isArray(t)&&(t=t.join(`
18
- `)),t)return{id:"examples",type:"section",data:{title:"Examples:",body:t}}}function wr(u){if(!("alias"in u)||!u.alias)return;const{alias:D}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(D)?D.join(", "):D}}}const $r=u=>[mr,gr,Br,br,yr,Ar,wr].map(D=>D(u)).filter(Boolean),vr=Fu.WriteStream.prototype.hasColors();let xr=class{text(D){return D}bold(D){return vr?`\x1B[1m${D}\x1B[22m`:D.toLocaleUpperCase()}indentText({text:D,spaces:t}){return D.replace(/^/gm," ".repeat(t))}heading(D){return this.bold(D)}section({title:D,body:t,indentBody:e=2}){return`${(D?`${this.heading(D)}
19
- `:"")+(t?this.indentText({text:this.render(t),spaces:e}):"")}
20
- `}table({tableData:D,tableOptions:t,tableBreakpoints:e}){return lr(D.map(r=>r.map(o=>this.render(o))),e?fr(e):t)}flagParameter(D){return D===Boolean?"":D===String?"<string>":D===Number?"<number>":Array.isArray(D)?this.flagParameter(D[0]):"<value>"}flagOperator(D){return" "}flagName(D){const{flag:t,flagFormatted:e,aliasesEnabled:r,aliasFormatted:o}=D;let n="";if(o?n+=`${o}, `:r&&(n+=" "),n+=e,"placeholder"in t&&typeof t.placeholder=="string")n+=`${this.flagOperator(D)}${t.placeholder}`;else{const s=this.flagParameter("type"in t?t.type:t);s&&(n+=`${this.flagOperator(D)}${s}`)}return n}flagDefault(D){return JSON.stringify(D)}flagDescription({flag:D}){let t="description"in D?D.description??"":"";if("default"in D){let{default:e}=D;typeof e=="function"&&(e=e()),e&&(t+=` (default: ${this.flagDefault(e)})`)}return t}render(D){if(typeof D=="string")return D;if(Array.isArray(D))return D.map(t=>this.render(t)).join(`
21
- `);if("type"in D&&this[D.type]){const t=this[D.type];if(typeof t=="function")return t.call(this,D.data)}throw new Error(`Invalid node type: ${JSON.stringify(D)}`)}};const Uu=/^[\w.-]+$/,{stringify:_}=JSON,Sr=/[|\\{}()[\]^$+*?.]/;function Wu(u){const D=[];let t,e;for(const r of u){if(e)throw new Error(`Invalid parameter: Spread parameter ${_(e)} must be last`);const o=r[0],n=r[r.length-1];let s;if(o==="<"&&n===">"&&(s=!0,t))throw new Error(`Invalid parameter: Required parameter ${_(r)} cannot come after optional parameter ${_(t)}`);if(o==="["&&n==="]"&&(s=!1,t=r),s===void 0)throw new Error(`Invalid parameter: ${_(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let i=r.slice(1,-1);const c=i.slice(-3)==="...";c&&(e=r,i=i.slice(0,-3));const F=i.match(Sr);if(F)throw new Error(`Invalid parameter: ${_(r)}. Invalid character found ${_(F[0])}`);D.push({name:i,required:s,spread:c})}return D}function qu(u,D,t,e){for(let r=0;r<D.length;r+=1){const{name:o,required:n,spread:s}=D[r],i=dr(o);if(i in u)throw new Error(`Invalid parameter: ${_(o)} is used more than once.`);const c=s?t.slice(r):t[r];if(s&&(r=D.length),n&&(!c||s&&c.length===0))return console.error(`Error: Missing required parameter ${_(o)}
22
- `),e(),process.exit(1);u[i]=c}}function Or(u){return u===void 0||u!==!1}function he(u,D,t,e){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:n}=D,s=Or(n);s&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const i=Pn(r,e,{ignore:D.ignoreArgv}),c=()=>{console.log(D.version)};if(o&&i.flags.version===!0)return c(),process.exit(0);const F=new xr,a=s&&n?.render?n.render:f=>F.render(f),l=f=>{const d=$r({...D,...f?{help:f}:{},flags:r});console.log(a(d,F))};if(s&&i.flags.help===!0)return l(),process.exit(0);if(D.parameters){let{parameters:f}=D,d=i._;const p=f.indexOf("--"),h=f.slice(p+1),A=Object.create(null);if(p>-1&&h.length>0){f=f.slice(0,p);const P=i._["--"];d=d.slice(0,-P.length||void 0),qu(A,Wu(f),d,l),qu(A,Wu(h),P,l)}else qu(A,Wu(f),d,l);Object.assign(i._,A)}const C={...i,showVersion:c,showHelp:l};return typeof t=="function"&&t(C),{command:u,...C}}function Tr(u,D){const t=new Map;for(const e of D){const r=[e.options.name],{alias:o}=e.options;o&&(Array.isArray(o)?r.push(...o):r.push(o));for(const n of r){if(t.has(n))throw new Error(`Duplicate command name found: ${_(n)}`);t.set(n,e)}}return t.get(u)}function Pr(u,D,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Uu.test(u.name)))throw new Error(`Invalid script name: ${_(u.name)}`);const e=t[0];if(u.commands&&Uu.test(e)){const r=Tr(e,u.commands);if(r)return he(r.options.name,{...r.options,parent:u},r.callback,t.slice(1))}return he(void 0,u,D,t)}function me(u,D){if(!u)throw new Error("Command options are required");const{name:t}=u;if(u.name===void 0)throw new Error("Command name is required");if(!Uu.test(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:D}}var ge="1.2.31",Ir="Writes your git commit messages for you with AI",y=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function H(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var z={exports:{}},Hu,Be;function _r(){if(Be)return Hu;Be=1,Hu=e,e.sync=r;var u=ku;function D(o,n){var s=n.pathExt!==void 0?n.pathExt:process.env.PATHEXT;if(!s||(s=s.split(";"),s.indexOf("")!==-1))return!0;for(var i=0;i<s.length;i++){var c=s[i].toLowerCase();if(c&&o.substr(-c.length).toLowerCase()===c)return!0}return!1}function t(o,n,s){return!o.isSymbolicLink()&&!o.isFile()?!1:D(n,s)}function e(o,n,s){u.stat(o,function(i,c){s(i,i?!1:t(c,o,n))})}function r(o,n){return t(u.statSync(o),o,n)}return Hu}var zu,be;function kr(){if(be)return zu;be=1,zu=D,D.sync=t;var u=ku;function D(o,n,s){u.stat(o,function(i,c){s(i,i?!1:e(c,n))})}function t(o,n){return e(u.statSync(o),n)}function e(o,n){return o.isFile()&&r(o,n)}function r(o,n){var s=o.mode,i=o.uid,c=o.gid,F=n.uid!==void 0?n.uid:process.getuid&&process.getuid(),a=n.gid!==void 0?n.gid:process.getgid&&process.getgid(),l=parseInt("100",8),C=parseInt("010",8),f=parseInt("001",8),d=l|C,p=s&f||s&C&&c===a||s&l&&i===F||s&d&&F===0;return p}return zu}var hu;process.platform==="win32"||y.TESTING_WINDOWS?hu=_r():hu=kr();var Rr=Ku;Ku.sync=Mr;function Ku(u,D,t){if(typeof D=="function"&&(t=D,D={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(e,r){Ku(u,D||{},function(o,n){o?r(o):e(n)})})}hu(u,D||{},function(e,r){e&&(e.code==="EACCES"||D&&D.ignoreErrors)&&(e=null,r=!1),t(e,r)})}function Mr(u,D){try{return hu.sync(u,D||{})}catch(t){if(D&&D.ignoreErrors||t.code==="EACCES")return!1;throw t}}const K=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",ye=q,jr=K?";":":",Ae=Rr,we=u=>Object.assign(new Error(`not found: ${u}`),{code:"ENOENT"}),$e=(u,D)=>{const t=D.colon||jr,e=u.match(/\//)||K&&u.match(/\\/)?[""]:[...K?[process.cwd()]:[],...(D.path||process.env.PATH||"").split(t)],r=K?D.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=K?r.split(t):[""];return K&&u.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:e,pathExt:o,pathExtExe:r}},ve=(u,D,t)=>{typeof D=="function"&&(t=D,D={}),D||(D={});const{pathEnv:e,pathExt:r,pathExtExe:o}=$e(u,D),n=[],s=c=>new Promise((F,a)=>{if(c===e.length)return D.all&&n.length?F(n):a(we(u));const l=e[c],C=/^".*"$/.test(l)?l.slice(1,-1):l,f=ye.join(C,u),d=!C&&/^\.[\\\/]/.test(u)?u.slice(0,2)+f:f;F(i(d,c,0))}),i=(c,F,a)=>new Promise((l,C)=>{if(a===r.length)return l(s(F+1));const f=r[a];Ae(c+f,{pathExt:o},(d,p)=>{if(!d&&p)if(D.all)n.push(c+f);else return l(c+f);return l(i(c,F,a+1))})});return t?s(0).then(c=>t(null,c),t):s(0)},Nr=(u,D)=>{D=D||{};const{pathEnv:t,pathExt:e,pathExtExe:r}=$e(u,D),o=[];for(let n=0;n<t.length;n++){const s=t[n],i=/^".*"$/.test(s)?s.slice(1,-1):s,c=ye.join(i,u),F=!i&&/^\.[\\\/]/.test(u)?u.slice(0,2)+c:c;for(let a=0;a<e.length;a++){const l=F+e[a];try{if(Ae.sync(l,{pathExt:r}))if(D.all)o.push(l);else return l}catch{}}}if(D.all&&o.length)return o;if(D.nothrow)return null;throw we(u)};var Lr=ve;ve.sync=Nr;var Vu={exports:{}};const xe=(u={})=>{const D=u.env||process.env;return(u.platform||process.platform)!=="win32"?"PATH":Object.keys(D).reverse().find(e=>e.toUpperCase()==="PATH")||"Path"};Vu.exports=xe,Vu.exports.default=xe;var Gr=Vu.exports;const Se=q,Ur=Lr,Wr=Gr;function Oe(u,D){const t=u.options.env||process.env,e=process.cwd(),r=u.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(u.options.cwd)}catch{}let n;try{n=Ur.sync(u.command,{path:t[Wr({env:t})],pathExt:D?Se.delimiter:void 0})}catch{}finally{o&&process.chdir(e)}return n&&(n=Se.resolve(r?u.options.cwd:"",n)),n}function qr(u){return Oe(u)||Oe(u,!0)}var Hr=qr,Yu={};const Ju=/([()\][%!^"`<>&|;, *?])/g;function zr(u){return u=u.replace(Ju,"^$1"),u}function Kr(u,D){return u=`${u}`,u=u.replace(/(\\*)"/g,'$1$1\\"'),u=u.replace(/(\\*)$/,"$1$1"),u=`"${u}"`,u=u.replace(Ju,"^$1"),D&&(u=u.replace(Ju,"^$1")),u}Yu.command=zr,Yu.argument=Kr;var Vr=/^#!(.*)/;const Yr=Vr;var Jr=(u="")=>{const D=u.match(Yr);if(!D)return null;const[t,e]=D[0].replace(/#! ?/,"").split(" "),r=t.split("/").pop();return r==="env"?e:e?`${r} ${e}`:r};const Zu=ku,Zr=Jr;function Xr(u){const t=Buffer.alloc(150);let e;try{e=Zu.openSync(u,"r"),Zu.readSync(e,t,0,150,0),Zu.closeSync(e)}catch{}return Zr(t.toString())}var Qr=Xr;const uo=q,Te=Hr,Pe=Yu,Do=Qr,eo=process.platform==="win32",to=/\.(?:com|exe)$/i,no=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ro(u){u.file=Te(u);const D=u.file&&Do(u.file);return D?(u.args.unshift(u.file),u.command=D,Te(u)):u.file}function oo(u){if(!eo)return u;const D=ro(u),t=!to.test(D);if(u.options.forceShell||t){const e=no.test(D);u.command=uo.normalize(u.command),u.command=Pe.command(u.command),u.args=u.args.map(o=>Pe.argument(o,e));const r=[u.command].concat(u.args).join(" ");u.args=["/d","/s","/c",`"${r}"`],u.command=process.env.comspec||"cmd.exe",u.options.windowsVerbatimArguments=!0}return u}function so(u,D,t){D&&!Array.isArray(D)&&(t=D,D=null),D=D?D.slice(0):[],t=Object.assign({},t);const e={command:u,args:D,options:t,file:void 0,original:{command:u,args:D}};return t.shell?e:oo(e)}var io=so;const Xu=process.platform==="win32";function Qu(u,D){return Object.assign(new Error(`${D} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${u.command}`,path:u.command,spawnargs:u.args})}function ao(u,D){if(!Xu)return;const t=u.emit;u.emit=function(e,r){if(e==="exit"){const o=Ie(r,D);if(o)return t.call(u,"error",o)}return t.apply(u,arguments)}}function Ie(u,D){return Xu&&u===1&&!D.file?Qu(D.original,"spawn"):null}function co(u,D){return Xu&&u===1&&!D.file?Qu(D.original,"spawnSync"):null}var lo={hookChildProcess:ao,verifyENOENT:Ie,verifyENOENTSync:co,notFoundError:Qu};const _e=un,uD=io,DD=lo;function ke(u,D,t){const e=uD(u,D,t),r=_e.spawn(e.command,e.args,e.options);return DD.hookChildProcess(r,e),r}function Fo(u,D,t){const e=uD(u,D,t),r=_e.spawnSync(e.command,e.args,e.options);return r.error=r.error||DD.verifyENOENTSync(r.status,e),r}z.exports=ke,z.exports.spawn=ke,z.exports.sync=Fo,z.exports._parse=uD,z.exports._enoent=DD;var Co=z.exports,fo=H(Co);function Eo(u){const D=typeof u=="string"?`
23
- `:10,t=typeof u=="string"?"\r":13;return u[u.length-1]===D&&(u=u.slice(0,-1)),u[u.length-1]===t&&(u=u.slice(0,-1)),u}function Re(u={}){const{env:D=process.env,platform:t=process.platform}=u;return t!=="win32"?"PATH":Object.keys(D).reverse().find(e=>e.toUpperCase()==="PATH")||"Path"}const po=({cwd:u=b.cwd(),path:D=b.env[Re()],preferLocal:t=!0,execPath:e=b.execPath,addExecPath:r=!0}={})=>{const o=u instanceof URL?zD(u):u,n=W.resolve(o),s=[];return t&&ho(s,n),r&&mo(s,e,n),[...s,D].join(W.delimiter)},ho=(u,D)=>{let t;for(;t!==D;)u.push(W.join(D,"node_modules/.bin")),t=D,D=W.resolve(D,"..")},mo=(u,D,t)=>{const e=D instanceof URL?zD(D):D;u.push(W.resolve(t,e,".."))},go=({env:u=b.env,...D}={})=>{u={...u};const t=Re({env:u});return D.path=u[t],u[t]=po(D),u},Bo=(u,D,t,e)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;const r=Object.getOwnPropertyDescriptor(u,t),o=Object.getOwnPropertyDescriptor(D,t);!bo(r,o)&&e||Object.defineProperty(u,t,o)},bo=function(u,D){return u===void 0||u.configurable||u.writable===D.writable&&u.enumerable===D.enumerable&&u.configurable===D.configurable&&(u.writable||u.value===D.value)},yo=(u,D)=>{const t=Object.getPrototypeOf(D);t!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,t)},Ao=(u,D)=>`/* Wrapped ${u}*/
24
- ${D}`,wo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),$o=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),vo=(u,D,t)=>{const e=t===""?"":`with ${t.trim()}() `,r=Ao.bind(null,e,D.toString());Object.defineProperty(r,"name",$o),Object.defineProperty(u,"toString",{...wo,value:r})};function xo(u,D,{ignoreNonConfigurable:t=!1}={}){const{name:e}=u;for(const r of Reflect.ownKeys(D))Bo(u,D,r,t);return yo(u,D),vo(u,D,e),u}const mu=new WeakMap,Me=(u,D={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let t,e=0;const r=u.displayName||u.name||"<anonymous>",o=function(...n){if(mu.set(o,++e),e===1)t=u.apply(this,n),u=null;else if(D.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return t};return xo(o,u),mu.set(o,e),o};Me.callCount=u=>{if(!mu.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return mu.get(u)};const So=()=>{const u=Ne-je+1;return Array.from({length:u},Oo)},Oo=(u,D)=>({name:`SIGRT${D+1}`,number:je+D,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),je=34,Ne=64,To=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],Le=()=>{const u=So();return[...To,...u].map(Po)},Po=({name:u,number:D,description:t,action:e,forced:r=!1,standard:o})=>{const{signals:{[u]:n}}=KD,s=n!==void 0;return{name:u,number:s?n:D,description:t,supported:s,action:e,forced:r,standard:o}},Io=()=>{const u=Le();return Object.fromEntries(u.map(_o))},_o=({name:u,number:D,description:t,supported:e,action:r,forced:o,standard:n})=>[u,{name:u,number:D,description:t,supported:e,action:r,forced:o,standard:n}],ko=Io(),Ro=()=>{const u=Le(),D=Ne+1,t=Array.from({length:D},(e,r)=>Mo(r,u));return Object.assign({},...t)},Mo=(u,D)=>{const t=jo(u,D);if(t===void 0)return{};const{name:e,description:r,supported:o,action:n,forced:s,standard:i}=t;return{[u]:{name:e,number:u,description:r,supported:o,action:n,forced:s,standard:i}}},jo=(u,D)=>{const t=D.find(({name:e})=>KD.signals[e]===u);return t!==void 0?t:D.find(e=>e.number===u)};Ro();const No=({timedOut:u,timeout:D,errorCode:t,signal:e,signalDescription:r,exitCode:o,isCanceled:n})=>u?`timed out after ${D} milliseconds`:n?"was canceled":t!==void 0?`failed with ${t}`:e!==void 0?`was killed with ${e} (${r})`:o!==void 0?`failed with exit code ${o}`:"failed",Ge=({stdout:u,stderr:D,all:t,error:e,signal:r,exitCode:o,command:n,escapedCommand:s,timedOut:i,isCanceled:c,killed:F,parsed:{options:{timeout:a,cwd:l=b.cwd()}}})=>{o=o===null?void 0:o,r=r===null?void 0:r;const C=r===void 0?void 0:ko[r].description,f=e&&e.code,p=`Command ${No({timedOut:i,timeout:a,errorCode:f,signal:r,signalDescription:C,exitCode:o,isCanceled:c})}: ${n}`,h=Object.prototype.toString.call(e)==="[object Error]",A=h?`${p}
25
- ${e.message}`:p,P=[A,D,u].filter(Boolean).join(`
26
- `);return h?(e.originalMessage=e.message,e.message=P):e=new Error(P),e.shortMessage=A,e.command=n,e.escapedCommand=s,e.exitCode=o,e.signal=r,e.signalDescription=C,e.stdout=u,e.stderr=D,e.cwd=l,t!==void 0&&(e.all=t),"bufferedData"in e&&delete e.bufferedData,e.failed=!0,e.timedOut=!!i,e.isCanceled=c,e.killed=F&&!i,e},gu=["stdin","stdout","stderr"],Lo=u=>gu.some(D=>u[D]!==void 0),Go=u=>{if(!u)return;const{stdio:D}=u;if(D===void 0)return gu.map(e=>u[e]);if(Lo(u))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${gu.map(e=>`\`${e}\``).join(", ")}`);if(typeof D=="string")return D;if(!Array.isArray(D))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof D}\``);const t=Math.max(D.length,gu.length);return Array.from({length:t},(e,r)=>D[r])};var V={exports:{}},eD={exports:{}},Ue;function Uo(){return Ue||(Ue=1,function(u){u.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&u.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&u.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(eD)),eD.exports}var m=y.process;const N=function(u){return u&&typeof u=="object"&&typeof u.removeListener=="function"&&typeof u.emit=="function"&&typeof u.reallyExit=="function"&&typeof u.listeners=="function"&&typeof u.kill=="function"&&typeof u.pid=="number"&&typeof u.on=="function"};if(!N(m))V.exports=function(){return function(){}};else{var Wo=VD,Du=Uo(),qo=/^win/i.test(m.platform),Bu=YD;typeof Bu!="function"&&(Bu=Bu.EventEmitter);var w;m.__signal_exit_emitter__?w=m.__signal_exit_emitter__:(w=m.__signal_exit_emitter__=new Bu,w.count=0,w.emitted={}),w.infinite||(w.setMaxListeners(1/0),w.infinite=!0),V.exports=function(u,D){if(!N(y.process))return function(){};Wo.equal(typeof u,"function","a callback must be provided for exit handler"),eu===!1&&We();var t="exit";D&&D.alwaysLast&&(t="afterexit");var e=function(){w.removeListener(t,u),w.listeners("exit").length===0&&w.listeners("afterexit").length===0&&tD()};return w.on(t,u),e};var tD=function(){!eu||!N(y.process)||(eu=!1,Du.forEach(function(D){try{m.removeListener(D,nD[D])}catch{}}),m.emit=rD,m.reallyExit=qe,w.count-=1)};V.exports.unload=tD;var Y=function(D,t,e){w.emitted[D]||(w.emitted[D]=!0,w.emit(D,t,e))},nD={};Du.forEach(function(u){nD[u]=function(){if(N(y.process)){var t=m.listeners(u);t.length===w.count&&(tD(),Y("exit",null,u),Y("afterexit",null,u),qo&&u==="SIGHUP"&&(u="SIGINT"),m.kill(m.pid,u))}}}),V.exports.signals=function(){return Du};var eu=!1,We=function(){eu||!N(y.process)||(eu=!0,w.count+=1,Du=Du.filter(function(D){try{return m.on(D,nD[D]),!0}catch{return!1}}),m.emit=zo,m.reallyExit=Ho)};V.exports.load=We;var qe=m.reallyExit,Ho=function(D){N(y.process)&&(m.exitCode=D||0,Y("exit",m.exitCode,null),Y("afterexit",m.exitCode,null),qe.call(m,m.exitCode))},rD=m.emit,zo=function(D,t){if(D==="exit"&&N(y.process)){t!==void 0&&(m.exitCode=t);var e=rD.apply(this,arguments);return Y("exit",m.exitCode,null),Y("afterexit",m.exitCode,null),e}else return rD.apply(this,arguments)}}var Ko=V.exports,Vo=H(Ko);const Yo=1e3*5,Jo=(u,D="SIGTERM",t={})=>{const e=u(D);return Zo(u,D,t,e),e},Zo=(u,D,t,e)=>{if(!Xo(D,t,e))return;const r=us(t),o=setTimeout(()=>{u("SIGKILL")},r);o.unref&&o.unref()},Xo=(u,{forceKillAfterTimeout:D},t)=>Qo(u)&&D!==!1&&t,Qo=u=>u===Dn.constants.signals.SIGTERM||typeof u=="string"&&u.toUpperCase()==="SIGTERM",us=({forceKillAfterTimeout:u=!0})=>{if(u===!0)return Yo;if(!Number.isFinite(u)||u<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${u}\` (${typeof u})`);return u},Ds=(u,D)=>{u.kill()&&(D.isCanceled=!0)},es=(u,D,t)=>{u.kill(D),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:D}))},ts=(u,{timeout:D,killSignal:t="SIGTERM"},e)=>{if(D===0||D===void 0)return e;let r;const o=new Promise((s,i)=>{r=setTimeout(()=>{es(u,t,i)},D)}),n=e.finally(()=>{clearTimeout(r)});return Promise.race([o,n])},ns=({timeout:u})=>{if(u!==void 0&&(!Number.isFinite(u)||u<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${u}\` (${typeof u})`)},rs=async(u,{cleanup:D,detached:t},e)=>{if(!D||t)return e;const r=Vo(()=>{u.kill()});return e.finally(()=>{r()})};function He(u){return u!==null&&typeof u=="object"&&typeof u.pipe=="function"}function ze(u){return He(u)&&u.writable!==!1&&typeof u._write=="function"&&typeof u._writableState=="object"}const os=u=>u instanceof Qt&&typeof u.then=="function",oD=(u,D,t)=>{if(typeof t=="string")return u[D].pipe(en(t)),u;if(ze(t))return u[D].pipe(t),u;if(!os(t))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!ze(t.stdin))throw new TypeError("The target child process's stdin must be available.");return u[D].pipe(t.stdin),t},ss=u=>{u.stdout!==null&&(u.pipeStdout=oD.bind(void 0,u,"stdout")),u.stderr!==null&&(u.pipeStderr=oD.bind(void 0,u,"stderr")),u.all!==void 0&&(u.pipeAll=oD.bind(void 0,u,"all"))};var tu={exports:{}};const{PassThrough:is}=Ru;var as=u=>{u={...u};const{array:D}=u;let{encoding:t}=u;const e=t==="buffer";let r=!1;D?r=!(t||e):t=t||"utf8",e&&(t=null);const o=new is({objectMode:r});t&&o.setEncoding(t);let n=0;const s=[];return o.on("data",i=>{s.push(i),r?n=s.length:n+=i.length}),o.getBufferedValue=()=>D?s:e?Buffer.concat(s,n):s.join(""),o.getBufferedLength=()=>n,o};const{constants:cs}=nn,ls=Ru,{promisify:Fs}=JD,Cs=as,fs=Fs(ls.pipeline);class Ke extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function sD(u,D){if(!u)throw new Error("Expected a stream");D={maxBuffer:1/0,...D};const{maxBuffer:t}=D,e=Cs(D);return await new Promise((r,o)=>{const n=s=>{s&&e.getBufferedLength()<=cs.MAX_LENGTH&&(s.bufferedData=e.getBufferedValue()),o(s)};(async()=>{try{await fs(u,e),r()}catch(s){n(s)}})(),e.on("data",()=>{e.getBufferedLength()>t&&n(new Ke)})}),e.getBufferedValue()}tu.exports=sD,tu.exports.buffer=(u,D)=>sD(u,{...D,encoding:"buffer"}),tu.exports.array=(u,D)=>sD(u,{...D,array:!0}),tu.exports.MaxBufferError=Ke;var ds=tu.exports,Ve=H(ds);const{PassThrough:Es}=Ru;var ps=function(){var u=[],D=new Es({objectMode:!0});return D.setMaxListeners(0),D.add=t,D.isEmpty=e,D.on("unpipe",r),Array.prototype.slice.call(arguments).forEach(t),D;function t(o){return Array.isArray(o)?(o.forEach(t),this):(u.push(o),o.once("end",r.bind(null,o)),o.once("error",D.emit.bind(D,"error")),o.pipe(D,{end:!1}),this)}function e(){return u.length==0}function r(o){u=u.filter(function(n){return n!==o}),!u.length&&D.readable&&D.end()}},hs=H(ps);const ms=u=>{if(u!==void 0)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},gs=({input:u,inputFile:D})=>typeof D!="string"?u:(ms(u),tn(D)),Bs=(u,D)=>{const t=gs(D);t!==void 0&&(He(t)?t.pipe(u.stdin):u.stdin.end(t))},bs=(u,{all:D})=>{if(!D||!u.stdout&&!u.stderr)return;const t=hs();return u.stdout&&t.add(u.stdout),u.stderr&&t.add(u.stderr),t},iD=async(u,D)=>{if(!(!u||D===void 0)){u.destroy();try{return await D}catch(t){return t.bufferedData}}},aD=(u,{encoding:D,buffer:t,maxBuffer:e})=>{if(!(!u||!t))return D?Ve(u,{encoding:D,maxBuffer:e}):Ve.buffer(u,{maxBuffer:e})},ys=async({stdout:u,stderr:D,all:t},{encoding:e,buffer:r,maxBuffer:o},n)=>{const s=aD(u,{encoding:e,buffer:r,maxBuffer:o}),i=aD(D,{encoding:e,buffer:r,maxBuffer:o}),c=aD(t,{encoding:e,buffer:r,maxBuffer:o*2});try{return await Promise.all([n,s,i,c])}catch(F){return Promise.all([{error:F,signal:F.signal,timedOut:F.timedOut},iD(u,s),iD(D,i),iD(t,c)])}},As=(async()=>{})().constructor.prototype,ws=["then","catch","finally"].map(u=>[u,Reflect.getOwnPropertyDescriptor(As,u)]),Ye=(u,D)=>{for(const[t,e]of ws){const r=typeof D=="function"?(...o)=>Reflect.apply(e.value,D(),o):e.value.bind(D);Reflect.defineProperty(u,t,{...e,value:r})}},$s=u=>new Promise((D,t)=>{u.on("exit",(e,r)=>{D({exitCode:e,signal:r})}),u.on("error",e=>{t(e)}),u.stdin&&u.stdin.on("error",e=>{t(e)})}),Je=(u,D=[])=>Array.isArray(D)?[u,...D]:[u],vs=/^[\w.-]+$/,xs=/"/g,Ss=u=>typeof u!="string"||vs.test(u)?u:`"${u.replace(xs,'\\"')}"`,Os=(u,D)=>Je(u,D).join(" "),Ts=(u,D)=>Je(u,D).map(t=>Ss(t)).join(" "),Ps=rn("execa").enabled,bu=(u,D)=>String(u).padStart(D,"0"),Is=()=>{const u=new Date;return`${bu(u.getHours(),2)}:${bu(u.getMinutes(),2)}:${bu(u.getSeconds(),2)}.${bu(u.getMilliseconds(),3)}`},_s=(u,{verbose:D})=>{D&&b.stderr.write(`[${Is()}] ${u}
27
- `)},ks=1e3*1e3*100,Rs=({env:u,extendEnv:D,preferLocal:t,localDir:e,execPath:r})=>{const o=D?{...b.env,...u}:u;return t?go({env:o,cwd:e,execPath:r}):o},Ms=(u,D,t={})=>{const e=fo._parse(u,D,t);return u=e.command,D=e.args,t=e.options,t={maxBuffer:ks,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:t.cwd||b.cwd(),execPath:b.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Ps,...t},t.env=Rs(t),t.stdio=Go(t),b.platform==="win32"&&W.basename(u,".exe")==="cmd"&&D.unshift("/q"),{file:u,args:D,options:t,parsed:e}},cD=(u,D,t)=>typeof D!="string"&&!Xt.isBuffer(D)?t===void 0?void 0:"":u.stripFinalNewline?Eo(D):D;function J(u,D,t){const e=Ms(u,D,t),r=Os(u,D),o=Ts(u,D);_s(o,e.options),ns(e.options);let n;try{n=WD.spawn(e.file,e.args,e.options)}catch(C){const f=new WD.ChildProcess,d=Promise.reject(Ge({error:C,stdout:"",stderr:"",all:"",command:r,escapedCommand:o,parsed:e,timedOut:!1,isCanceled:!1,killed:!1}));return Ye(f,d),f}const s=$s(n),i=ts(n,e.options,s),c=rs(n,e.options,i),F={isCanceled:!1};n.kill=Jo.bind(null,n.kill.bind(n)),n.cancel=Ds.bind(null,n,F);const l=Me(async()=>{const[{error:C,exitCode:f,signal:d,timedOut:p},h,A,P]=await ys(n,e.options,c),lu=cD(e.options,h),M=cD(e.options,A),_u=cD(e.options,P);if(C||f!==0||d!==null){const U=Ge({error:C,exitCode:f,signal:d,stdout:lu,stderr:M,all:_u,command:r,escapedCommand:o,parsed:e,timedOut:p,isCanceled:e.options.signal?e.options.signal.aborted:!1,killed:n.killed});if(!e.options.reject)return U;throw U}return{command:r,escapedCommand:o,exitCode:0,stdout:lu,stderr:M,all:_u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return Bs(n,e.options),n.all=bs(n,e.options),ss(n),Ye(n,l),n}let L=!0;const Z=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let nu=0;if(Z.process&&Z.process.env&&Z.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:D,NO_COLOR:t,TERM:e,COLORTERM:r}=Z.process.env;D||t||u==="0"?L=!1:u==="1"||u==="2"||u==="3"?L=!0:e==="dumb"?L=!1:"CI"in Z.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in Z.process.env)?L=!0:L=process.stdout.isTTY,L&&(process.platform==="win32"||r&&(r==="truecolor"||r==="24bit")?nu=3:e&&(e.endsWith("-256color")||e.endsWith("256"))?nu=2:nu=1)}let Ze={enabled:L,supportLevel:nu};function ru(u,D,t=1){const e=`\x1B[${u}m`,r=`\x1B[${D}m`,o=new RegExp(`\\x1b\\[${D}m`,"g");return n=>Ze.enabled&&Ze.supportLevel>=t?e+(""+n).replace(o,e)+r:""+n}const lD=ru(2,22),Xe=ru(30,39),yu=ru(31,39),ou=ru(32,39),Qe=ru(46,49),FD="\x1B",B=`${FD}[`,js="\x07",CD={to(u,D){return D?`${B}${D+1};${u+1}H`:`${B}${u+1}G`},move(u,D){let t="";return u<0?t+=`${B}${-u}D`:u>0&&(t+=`${B}${u}C`),D<0?t+=`${B}${-D}A`:D>0&&(t+=`${B}${D}B`),t},up:(u=1)=>`${B}${u}A`,down:(u=1)=>`${B}${u}B`,forward:(u=1)=>`${B}${u}C`,backward:(u=1)=>`${B}${u}D`,nextLine:(u=1)=>`${B}E`.repeat(u),prevLine:(u=1)=>`${B}F`.repeat(u),left:`${B}G`,hide:`${B}?25l`,show:`${B}?25h`,save:`${FD}7`,restore:`${FD}8`},Ns={up:(u=1)=>`${B}S`.repeat(u),down:(u=1)=>`${B}T`.repeat(u)},Ls={screen:`${B}2J`,up:(u=1)=>`${B}1J`.repeat(u),down:(u=1)=>`${B}J`.repeat(u),line:`${B}2K`,lineEnd:`${B}K`,lineStart:`${B}1K`,lines(u){let D="";for(let t=0;t<u;t++)D+=this.line+(t<u-1?CD.up():"");return u&&(D+=CD.left),D}};var $={cursor:CD,scroll:Ns,erase:Ls,beep:js};function Gs(u){throw new Error('Could not dynamically require "'+u+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fD={exports:{}};let ut=process.argv||[],Au=process.env,Us=!("NO_COLOR"in Au||ut.includes("--no-color"))&&("FORCE_COLOR"in Au||ut.includes("--color")||process.platform==="win32"||Gs!=null&&Fu.isatty(1)&&Au.TERM!=="dumb"||"CI"in Au),Ws=(u,D,t=u)=>e=>{let r=""+e,o=r.indexOf(D,u.length);return~o?u+qs(r,D,t,o)+D:u+r+D},qs=(u,D,t,e)=>{let r="",o=0;do r+=u.substring(o,e)+t,o=e+D.length,e=u.indexOf(D,o);while(~e);return r+u.substring(o)},Dt=(u=Us)=>{let D=u?Ws:()=>String;return{isColorSupported:u,reset:D("\x1B[0m","\x1B[0m"),bold:D("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:D("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:D("\x1B[3m","\x1B[23m"),underline:D("\x1B[4m","\x1B[24m"),inverse:D("\x1B[7m","\x1B[27m"),hidden:D("\x1B[8m","\x1B[28m"),strikethrough:D("\x1B[9m","\x1B[29m"),black:D("\x1B[30m","\x1B[39m"),red:D("\x1B[31m","\x1B[39m"),green:D("\x1B[32m","\x1B[39m"),yellow:D("\x1B[33m","\x1B[39m"),blue:D("\x1B[34m","\x1B[39m"),magenta:D("\x1B[35m","\x1B[39m"),cyan:D("\x1B[36m","\x1B[39m"),white:D("\x1B[37m","\x1B[39m"),gray:D("\x1B[90m","\x1B[39m"),bgBlack:D("\x1B[40m","\x1B[49m"),bgRed:D("\x1B[41m","\x1B[49m"),bgGreen:D("\x1B[42m","\x1B[49m"),bgYellow:D("\x1B[43m","\x1B[49m"),bgBlue:D("\x1B[44m","\x1B[49m"),bgMagenta:D("\x1B[45m","\x1B[49m"),bgCyan:D("\x1B[46m","\x1B[49m"),bgWhite:D("\x1B[47m","\x1B[49m")}};fD.exports=Dt(),fD.exports.createColors=Dt;var Hs=fD.exports,E=H(Hs);function zs({onlyFirst:u=!1}={}){const D=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(D,u?void 0:"g")}function et(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(zs(),"")}function tt(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var nt={exports:{}};(function(u){var D={};u.exports=D,D.eastAsianWidth=function(e){var r=e.charCodeAt(0),o=e.length==2?e.charCodeAt(1):0,n=r;return 55296<=r&&r<=56319&&56320<=o&&o<=57343&&(r&=1023,o&=1023,n=r<<10|o,n+=65536),n==12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n==8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n==172||n==175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n==161||n==164||167<=n&&n<=168||n==170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n==198||n==208||215<=n&&n<=216||222<=n&&n<=225||n==230||232<=n&&n<=234||236<=n&&n<=237||n==240||242<=n&&n<=243||247<=n&&n<=250||n==252||n==254||n==257||n==273||n==275||n==283||294<=n&&n<=295||n==299||305<=n&&n<=307||n==312||319<=n&&n<=322||n==324||328<=n&&n<=331||n==333||338<=n&&n<=339||358<=n&&n<=359||n==363||n==462||n==464||n==466||n==468||n==470||n==472||n==474||n==476||n==593||n==609||n==708||n==711||713<=n&&n<=715||n==717||n==720||728<=n&&n<=731||n==733||n==735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n==1025||1040<=n&&n<=1103||n==1105||n==8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n==8240||8242<=n&&n<=8243||n==8245||n==8251||n==8254||n==8308||n==8319||8321<=n&&n<=8324||n==8364||n==8451||n==8453||n==8457||n==8467||n==8470||8481<=n&&n<=8482||n==8486||n==8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n==8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n==8658||n==8660||n==8679||n==8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n==8715||n==8719||n==8721||n==8725||n==8730||8733<=n&&n<=8736||n==8739||n==8741||8743<=n&&n<=8748||n==8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n==8776||n==8780||n==8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n==8853||n==8857||n==8869||n==8895||n==8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n==9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n==9711||9733<=n&&n<=9734||n==9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n==9756||n==9758||n==9792||n==9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n==9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n==9955||9960<=n&&n<=9983||n==10045||n==10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n==65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"},D.characterLength=function(e){var r=this.eastAsianWidth(e);return r=="F"||r=="W"||r=="A"?2:1};function t(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}D.length=function(e){for(var r=t(e),o=0,n=0;n<r.length;n++)o=o+this.characterLength(r[n]);return o},D.slice=function(e,r,o){textLen=D.length(e),r=r||0,o=o||1,r<0&&(r=textLen+r),o<0&&(o=textLen+o);for(var n="",s=0,i=t(e),c=0;c<i.length;c++){var F=i[c],a=D.length(F);if(s>=r-(a==2?1:0))if(s+a<=o)n+=F;else break;s+=a}return n}})(nt);var Ks=nt.exports;const Vs=tt(Ks);var Ys=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const Js=tt(Ys);function su(u,D={}){if(typeof u!="string"||u.length===0||(D={ambiguousIsNarrow:!0,...D},u=et(u),u.length===0))return 0;u=u.replace(Js()," ");const t=D.ambiguousIsNarrow?1:2;let e=0;for(const r of u){const o=r.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(Vs.eastAsianWidth(r)){case"F":case"W":e+=2;break;case"A":e+=t;break;default:e+=1}}return e}const dD=10,rt=(u=0)=>D=>`\x1B[${D+u}m`,ot=(u=0)=>D=>`\x1B[${38+u};5;${D}m`,st=(u=0)=>(D,t,e)=>`\x1B[${38+u};2;${D};${t};${e}m`,g={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(g.modifier);const Zs=Object.keys(g.color),Xs=Object.keys(g.bgColor);[...Zs,...Xs];function Qs(){const u=new Map;for(const[D,t]of Object.entries(g)){for(const[e,r]of Object.entries(t))g[e]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[e]=g[e],u.set(r[0],r[1]);Object.defineProperty(g,D,{value:t,enumerable:!1})}return Object.defineProperty(g,"codes",{value:u,enumerable:!1}),g.color.close="\x1B[39m",g.bgColor.close="\x1B[49m",g.color.ansi=rt(),g.color.ansi256=ot(),g.color.ansi16m=st(),g.bgColor.ansi=rt(dD),g.bgColor.ansi256=ot(dD),g.bgColor.ansi16m=st(dD),Object.defineProperties(g,{rgbToAnsi256:{value:(D,t,e)=>D===t&&t===e?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(t/255*5)+Math.round(e/255*5),enumerable:!1},hexToRgb:{value:D=>{const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!t)return[0,0,0];let[e]=t;e.length===3&&(e=[...e].map(o=>o+o).join(""));const r=Number.parseInt(e,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:D=>g.rgbToAnsi256(...g.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value:D=>{if(D<8)return 30+D;if(D<16)return 90+(D-8);let t,e,r;if(D>=232)t=((D-232)*10+8)/255,e=t,r=t;else{D-=16;const s=D%36;t=Math.floor(D/36)/5,e=Math.floor(s/6)/5,r=s%6/5}const o=Math.max(t,e,r)*2;if(o===0)return 30;let n=30+(Math.round(r)<<2|Math.round(e)<<1|Math.round(t));return o===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(D,t,e)=>g.ansi256ToAnsi(g.rgbToAnsi256(D,t,e)),enumerable:!1},hexToAnsi:{value:D=>g.ansi256ToAnsi(g.hexToAnsi256(D)),enumerable:!1}}),g}const ui=Qs(),wu=new Set(["\x1B","\x9B"]),Di=39,ED="\x07",it="[",ei="]",at="m",pD=`${ei}8;;`,ct=u=>`${wu.values().next().value}${it}${u}${at}`,lt=u=>`${wu.values().next().value}${pD}${u}${ED}`,ti=u=>u.split(" ").map(D=>su(D)),hD=(u,D,t)=>{const e=[...D];let r=!1,o=!1,n=su(et(u[u.length-1]));for(const[s,i]of e.entries()){const c=su(i);if(n+c<=t?u[u.length-1]+=i:(u.push(i),n=0),wu.has(i)&&(r=!0,o=e.slice(s+1).join("").startsWith(pD)),r){o?i===ED&&(r=!1,o=!1):i===at&&(r=!1);continue}n+=c,n===t&&s<e.length-1&&(u.push(""),n=0)}!n&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},ni=u=>{const D=u.split(" ");let t=D.length;for(;t>0&&!(su(D[t-1])>0);)t--;return t===D.length?u:D.slice(0,t).join(" ")+D.slice(t).join("")},ri=(u,D,t={})=>{if(t.trim!==!1&&u.trim()==="")return"";let e="",r,o;const n=ti(u);let s=[""];for(const[c,F]of u.split(" ").entries()){t.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let a=su(s[s.length-1]);if(c!==0&&(a>=D&&(t.wordWrap===!1||t.trim===!1)&&(s.push(""),a=0),(a>0||t.trim===!1)&&(s[s.length-1]+=" ",a++)),t.hard&&n[c]>D){const l=D-a,C=1+Math.floor((n[c]-l-1)/D);Math.floor((n[c]-1)/D)<C&&s.push(""),hD(s,F,D);continue}if(a+n[c]>D&&a>0&&n[c]>0){if(t.wordWrap===!1&&a<D){hD(s,F,D);continue}s.push("")}if(a+n[c]>D&&t.wordWrap===!1){hD(s,F,D);continue}s[s.length-1]+=F}t.trim!==!1&&(s=s.map(c=>ni(c)));const i=[...s.join(`
28
- `)];for(const[c,F]of i.entries()){if(e+=F,wu.has(F)){const{groups:l}=new RegExp(`(?:\\${it}(?<code>\\d+)m|\\${pD}(?<uri>.*)${ED})`).exec(i.slice(c).join(""))||{groups:{}};if(l.code!==void 0){const C=Number.parseFloat(l.code);r=C===Di?void 0:C}else l.uri!==void 0&&(o=l.uri.length===0?void 0:l.uri)}const a=ui.codes.get(Number(r));i[c+1]===`
29
- `?(o&&(e+=lt("")),r&&a&&(e+=ct(a))):F===`
30
- `&&(r&&a&&(e+=ct(r)),o&&(e+=lt(o)))}return e};function Ft(u,D,t){return String(u).normalize().replace(/\r\n/g,`
8
+ `).map(n=>mr(n,D,e)).join(`
9
+ `)}s(gr,"T$2");var $e=s(u=>Array.from({length:u}).fill(""),"X$1");function Br(u,D){let e=[],n=0;for(let r of u){let o=0,t=r.map(a=>{var l;let C=(l=D[n])!=null?l:"";n+=1,a.preprocess&&(C=a.preprocess(C)),de(C)>a.width&&(C=gr(C,a.width,{hard:!0}));let c=C.split(`
10
+ `);if(a.postprocess){let{postprocess:F}=a;c=c.map((f,d)=>F.call(a,f,d))}return a.paddingTop&&c.unshift(...$e(a.paddingTop)),a.paddingBottom&&c.push(...$e(a.paddingBottom)),c.length>o&&(o=c.length),Wu(gu({},a),{lines:c})}),i=[];for(let a=0;a<o;a+=1){let l=t.map(C=>{var c;let F=(c=C.lines[a])!=null?c:"",f=Number.isFinite(C.width)?" ".repeat(C.width-N(F)):"",d=C.paddingLeftString;return C.align==="right"&&(d+=f),d+=F,C.align==="left"&&(d+=f),d+C.paddingRightString}).join("");i.push(l)}e.push(i.join(`
11
+ `))}return e.join(`
12
+ `)}s(Br,"P$1");function br(u,D){if(!u||u.length===0)return"";let e=sr(u),n=e.length;if(n===0)return"";let{stdoutColumns:r,columns:o}=tr(D);if(o.length>n)throw new Error(`${o.length} columns defined, but only ${n} columns found`);let t=lr(r,o,e);return u.map(i=>Br(t,i)).join(`
13
+ `)}s(br,"mD"),O();var yr=["<",">","=",">=","<="];function Ar(u){if(!yr.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}s(Ar,"xD$1");function wr(u){let D=Object.keys(u).map(e=>{let[n,r]=e.split(" ");Ar(n);let o=Number.parseInt(r,10);if(Number.isNaN(o))throw new TypeError(`Invalid breakpoint value: ${r}`);let t=u[e];return{operator:n,breakpoint:o,value:t}}).sort((e,n)=>n.breakpoint-e.breakpoint);return e=>{var n;return(n=D.find(({operator:r,breakpoint:o})=>r==="="&&e===o||r===">"&&e>o||r==="<"&&e<o||r===">="&&e>=o||r==="<="&&e<=o))==null?void 0:n.value}}s(wr,"wD$1");const $r=s(u=>u.replace(/[\W_]([a-z\d])?/gi,(D,e)=>e?e.toUpperCase():""),"S$2"),vr=s(u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q$2"),xr={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:u=>u.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function Sr(u){let D=!1;return{type:"table",data:{tableData:Object.keys(u).sort((e,n)=>e.localeCompare(n)).map(e=>{const n=u[e],r="alias"in n;return r&&(D=!0),{name:e,flag:n,flagFormatted:`--${vr(e)}`,aliasesEnabled:D,aliasFormatted:r?`-${n.alias}`:void 0}}).map(e=>(e.aliasesEnabled=D,[{type:"flagName",data:e},{type:"flagDescription",data:e}])),tableBreakpoints:xr}}}s(Sr,"D");const ve=s(u=>!u||(u.version??(u.help?u.help.version:void 0)),"A$1"),xe=s(u=>{const D="parent"in u&&u.parent?.name;return(D?`${D} `:"")+u.name},"C");function Or(u){const D=[];u.name&&D.push(xe(u));const e=ve(u)??("parent"in u&&ve(u.parent));if(e&&D.push(`v${e}`),D.length!==0)return{id:"name",type:"text",data:`${D.join(" ")}
14
+ `}}s(Or,"R$1");function Tr(u){const{help:D}=u;if(!(!D||!D.description))return{id:"description",type:"text",data:`${D.description}
15
+ `}}s(Tr,"L$1");function Ir(u){const D=u.help||{};if("usage"in D)return D.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(D.usage)?D.usage.join(`
16
+ `):D.usage}}:void 0;if(u.name){const e=[],n=[xe(u)];if(u.flags&&Object.keys(u.flags).length>0&&n.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:r}=u,o=r.indexOf("--"),t=o>-1&&r.slice(o+1).some(i=>i.startsWith("<"));n.push(r.map(i=>i!=="--"?i:t?"--":"[--]").join(" "))}if(n.length>1&&e.push(n.join(" ")),"commands"in u&&u.commands?.length&&e.push(`${u.name} <command>`),e.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:e.join(`
17
+ `)}}}}s(Ir,"T$1");function Pr(u){return!("commands"in u)||!u.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u.commands.map(D=>[D.options.name,D.options.help?D.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}s(Pr,"_$1");function kr(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Sr(u.flags),indentBody:0}}}s(kr,"k");function _r(u){const{help:D}=u;if(!D||!D.examples||D.examples.length===0)return;let{examples:e}=D;if(Array.isArray(e)&&(e=e.join(`
18
+ `)),e)return{id:"examples",type:"section",data:{title:"Examples:",body:e}}}s(_r,"F");function Rr(u){if(!("alias"in u)||!u.alias)return;const{alias:D}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(D)?D.join(", "):D}}}s(Rr,"H$1");const Mr=s(u=>[Or,Tr,Ir,Pr,kr,_r,Rr].map(D=>D(u)).filter(Boolean),"U"),jr=Eu.WriteStream.prototype.hasColors();let Nr=(Fu=class{text(D){return D}bold(D){return jr?`\x1B[1m${D}\x1B[22m`:D.toLocaleUpperCase()}indentText({text:D,spaces:e}){return D.replace(/^/gm," ".repeat(e))}heading(D){return this.bold(D)}section({title:D,body:e,indentBody:n=2}){return`${(D?`${this.heading(D)}
19
+ `:"")+(e?this.indentText({text:this.render(e),spaces:n}):"")}
20
+ `}table({tableData:D,tableOptions:e,tableBreakpoints:n}){return br(D.map(r=>r.map(o=>this.render(o))),n?wr(n):e)}flagParameter(D){return D===Boolean?"":D===String?"<string>":D===Number?"<number>":Array.isArray(D)?this.flagParameter(D[0]):"<value>"}flagOperator(D){return" "}flagName(D){const{flag:e,flagFormatted:n,aliasesEnabled:r,aliasFormatted:o}=D;let t="";if(o?t+=`${o}, `:r&&(t+=" "),t+=n,"placeholder"in e&&typeof e.placeholder=="string")t+=`${this.flagOperator(D)}${e.placeholder}`;else{const i=this.flagParameter("type"in e?e.type:e);i&&(t+=`${this.flagOperator(D)}${i}`)}return t}flagDefault(D){return JSON.stringify(D)}flagDescription({flag:D}){let e="description"in D?D.description??"":"";if("default"in D){let{default:n}=D;typeof n=="function"&&(n=n()),n&&(e+=` (default: ${this.flagDefault(n)})`)}return e}render(D){if(typeof D=="string")return D;if(Array.isArray(D))return D.map(e=>this.render(e)).join(`
21
+ `);if("type"in D&&this[D.type]){const e=this[D.type];if(typeof e=="function")return e.call(this,D.data)}throw new Error(`Invalid node type: ${JSON.stringify(D)}`)}},s(Fu,"M"),Fu);const Ku=/^[\w.-]+$/,{stringify:_}=JSON,Lr=/[|\\{}()[\]^$+*?.]/;function Vu(u){const D=[];let e,n;for(const r of u){if(n)throw new Error(`Invalid parameter: Spread parameter ${_(n)} must be last`);const o=r[0],t=r[r.length-1];let i;if(o==="<"&&t===">"&&(i=!0,e))throw new Error(`Invalid parameter: Required parameter ${_(r)} cannot come after optional parameter ${_(e)}`);if(o==="["&&t==="]"&&(i=!1,e=r),i===void 0)throw new Error(`Invalid parameter: ${_(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=r.slice(1,-1);const l=a.slice(-3)==="...";l&&(n=r,a=a.slice(0,-3));const C=a.match(Lr);if(C)throw new Error(`Invalid parameter: ${_(r)}. Invalid character found ${_(C[0])}`);D.push({name:a,required:i,spread:l})}return D}s(Vu,"w$1");function Yu(u,D,e,n){for(let r=0;r<D.length;r+=1){const{name:o,required:t,spread:i}=D[r],a=$r(o);if(a in u)throw new Error(`Invalid parameter: ${_(o)} is used more than once.`);const l=i?e.slice(r):e[r];if(i&&(r=D.length),t&&(!l||i&&l.length===0))return console.error(`Error: Missing required parameter ${_(o)}
22
+ `),n(),process.exit(1);u[a]=l}}s(Yu,"b$2");function Gr(u){return u===void 0||u!==!1}s(Gr,"W$1");function Se(u,D,e,n){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:t}=D,i=Gr(t);i&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const a=Un(r,n,{ignore:D.ignoreArgv}),l=s(()=>{console.log(D.version)},"f");if(o&&a.flags.version===!0)return l(),process.exit(0);const C=new Nr,c=i&&t?.render?t.render:d=>C.render(d),F=s(d=>{const E=Mr({...D,...d?{help:d}:{},flags:r});console.log(c(E,C))},"u");if(i&&a.flags.help===!0)return F(),process.exit(0);if(D.parameters){let{parameters:d}=D,E=a._;const h=d.indexOf("--"),m=d.slice(h+1),w=Object.create(null);if(h>-1&&m.length>0){d=d.slice(0,h);const P=a._["--"];E=E.slice(0,-P.length||void 0),Yu(w,Vu(d),E,F),Yu(w,Vu(m),P,F)}else Yu(w,Vu(d),E,F);Object.assign(a._,w)}const f={...a,showVersion:l,showHelp:F};return typeof e=="function"&&e(f),{command:u,...f}}s(Se,"x$2");function Wr(u,D){const e=new Map;for(const n of D){const r=[n.options.name],{alias:o}=n.options;o&&(Array.isArray(o)?r.push(...o):r.push(o));for(const t of r){if(e.has(t))throw new Error(`Duplicate command name found: ${_(t)}`);e.set(t,n)}}return e.get(u)}s(Wr,"z$1");function Ur(u,D,e=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Ku.test(u.name)))throw new Error(`Invalid script name: ${_(u.name)}`);const n=e[0];if(u.commands&&Ku.test(n)){const r=Wr(n,u.commands);if(r)return Se(r.options.name,{...r.options,parent:u},r.callback,e.slice(1))}return Se(void 0,u,D,e)}s(Ur,"Z$1");function Oe(u,D){if(!u)throw new Error("Command options are required");const{name:e}=u;if(u.name===void 0)throw new Error("Command name is required");if(!Ku.test(e))throw new Error(`Invalid command name ${JSON.stringify(e)}. Command names must be one word.`);return{options:u,callback:D}}s(Oe,"G");var Te="1.2.32",qr="Writes your git commit messages for you with AI",A=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function H(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}s(H,"getDefaultExportFromCjs");var K={exports:{}},Ju,Ie;function zr(){if(Ie)return Ju;Ie=1,Ju=n,n.sync=r;var u=Lu;function D(o,t){var i=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!i||(i=i.split(";"),i.indexOf("")!==-1))return!0;for(var a=0;a<i.length;a++){var l=i[a].toLowerCase();if(l&&o.substr(-l.length).toLowerCase()===l)return!0}return!1}s(D,"checkPathExt");function e(o,t,i){return!o.isSymbolicLink()&&!o.isFile()?!1:D(t,i)}s(e,"checkStat");function n(o,t,i){u.stat(o,function(a,l){i(a,a?!1:e(l,o,t))})}s(n,"isexe");function r(o,t){return e(u.statSync(o),o,t)}return s(r,"sync"),Ju}s(zr,"requireWindows");var Zu,Pe;function Hr(){if(Pe)return Zu;Pe=1,Zu=D,D.sync=e;var u=Lu;function D(o,t,i){u.stat(o,function(a,l){i(a,a?!1:n(l,t))})}s(D,"isexe");function e(o,t){return n(u.statSync(o),t)}s(e,"sync");function n(o,t){return o.isFile()&&r(o,t)}s(n,"checkStat");function r(o,t){var i=o.mode,a=o.uid,l=o.gid,C=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),c=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),F=parseInt("100",8),f=parseInt("010",8),d=parseInt("001",8),E=F|f,h=i&d||i&f&&l===c||i&F&&a===C||i&E&&C===0;return h}return s(r,"checkMode"),Zu}s(Hr,"requireMode");var bu;process.platform==="win32"||A.TESTING_WINDOWS?bu=zr():bu=Hr();var Kr=Xu;Xu.sync=Vr;function Xu(u,D,e){if(typeof D=="function"&&(e=D,D={}),!e){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,r){Xu(u,D||{},function(o,t){o?r(o):n(t)})})}bu(u,D||{},function(n,r){n&&(n.code==="EACCES"||D&&D.ignoreErrors)&&(n=null,r=!1),e(n,r)})}s(Xu,"isexe$1");function Vr(u,D){try{return bu.sync(u,D||{})}catch(e){if(D&&D.ignoreErrors||e.code==="EACCES")return!1;throw e}}s(Vr,"sync");const V=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",ke=z,Yr=V?";":":",_e=Kr,Re=s(u=>Object.assign(new Error(`not found: ${u}`),{code:"ENOENT"}),"getNotFoundError"),Me=s((u,D)=>{const e=D.colon||Yr,n=u.match(/\//)||V&&u.match(/\\/)?[""]:[...V?[process.cwd()]:[],...(D.path||process.env.PATH||"").split(e)],r=V?D.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=V?r.split(e):[""];return V&&u.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:r}},"getPathInfo"),je=s((u,D,e)=>{typeof D=="function"&&(e=D,D={}),D||(D={});const{pathEnv:n,pathExt:r,pathExtExe:o}=Me(u,D),t=[],i=s(l=>new Promise((C,c)=>{if(l===n.length)return D.all&&t.length?C(t):c(Re(u));const F=n[l],f=/^".*"$/.test(F)?F.slice(1,-1):F,d=ke.join(f,u),E=!f&&/^\.[\\\/]/.test(u)?u.slice(0,2)+d:d;C(a(E,l,0))}),"step"),a=s((l,C,c)=>new Promise((F,f)=>{if(c===r.length)return F(i(C+1));const d=r[c];_e(l+d,{pathExt:o},(E,h)=>{if(!E&&h)if(D.all)t.push(l+d);else return F(l+d);return F(a(l,C,c+1))})}),"subStep");return e?i(0).then(l=>e(null,l),e):i(0)},"which$1"),Jr=s((u,D)=>{D=D||{};const{pathEnv:e,pathExt:n,pathExtExe:r}=Me(u,D),o=[];for(let t=0;t<e.length;t++){const i=e[t],a=/^".*"$/.test(i)?i.slice(1,-1):i,l=ke.join(a,u),C=!a&&/^\.[\\\/]/.test(u)?u.slice(0,2)+l:l;for(let c=0;c<n.length;c++){const F=C+n[c];try{if(_e.sync(F,{pathExt:r}))if(D.all)o.push(F);else return F}catch{}}}if(D.all&&o.length)return o;if(D.nothrow)return null;throw Re(u)},"whichSync");var Zr=je;je.sync=Jr;var Qu={exports:{}};const Ne=s((u={})=>{const D=u.env||process.env;return(u.platform||process.platform)!=="win32"?"PATH":Object.keys(D).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey$1");Qu.exports=Ne,Qu.exports.default=Ne;var Xr=Qu.exports;const Le=z,Qr=Zr,uo=Xr;function Ge(u,D){const e=u.options.env||process.env,n=process.cwd(),r=u.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(u.options.cwd)}catch{}let t;try{t=Qr.sync(u.command,{path:e[uo({env:e})],pathExt:D?Le.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return t&&(t=Le.resolve(r?u.options.cwd:"",t)),t}s(Ge,"resolveCommandAttempt");function Do(u){return Ge(u)||Ge(u,!0)}s(Do,"resolveCommand$1");var eo=Do,uD={};const DD=/([()\][%!^"`<>&|;, *?])/g;function to(u){return u=u.replace(DD,"^$1"),u}s(to,"escapeCommand");function no(u,D){return u=`${u}`,u=u.replace(/(\\*)"/g,'$1$1\\"'),u=u.replace(/(\\*)$/,"$1$1"),u=`"${u}"`,u=u.replace(DD,"^$1"),D&&(u=u.replace(DD,"^$1")),u}s(no,"escapeArgument"),uD.command=to,uD.argument=no;var ro=/^#!(.*)/;const oo=ro;var so=s((u="")=>{const D=u.match(oo);if(!D)return null;const[e,n]=D[0].replace(/#! ?/,"").split(" "),r=e.split("/").pop();return r==="env"?n:n?`${r} ${n}`:r},"shebangCommand$1");const eD=Lu,io=so;function ao(u){const e=Buffer.alloc(150);let n;try{n=eD.openSync(u,"r"),eD.readSync(n,e,0,150,0),eD.closeSync(n)}catch{}return io(e.toString())}s(ao,"readShebang$1");var co=ao;const lo=z,We=eo,Ue=uD,Fo=co,Co=process.platform==="win32",fo=/\.(?:com|exe)$/i,Eo=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function po(u){u.file=We(u);const D=u.file&&Fo(u.file);return D?(u.args.unshift(u.file),u.command=D,We(u)):u.file}s(po,"detectShebang");function ho(u){if(!Co)return u;const D=po(u),e=!fo.test(D);if(u.options.forceShell||e){const n=Eo.test(D);u.command=lo.normalize(u.command),u.command=Ue.command(u.command),u.args=u.args.map(o=>Ue.argument(o,n));const r=[u.command].concat(u.args).join(" ");u.args=["/d","/s","/c",`"${r}"`],u.command=process.env.comspec||"cmd.exe",u.options.windowsVerbatimArguments=!0}return u}s(ho,"parseNonShell");function mo(u,D,e){D&&!Array.isArray(D)&&(e=D,D=null),D=D?D.slice(0):[],e=Object.assign({},e);const n={command:u,args:D,options:e,file:void 0,original:{command:u,args:D}};return e.shell?n:ho(n)}s(mo,"parse$1");var go=mo;const tD=process.platform==="win32";function nD(u,D){return Object.assign(new Error(`${D} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${u.command}`,path:u.command,spawnargs:u.args})}s(nD,"notFoundError");function Bo(u,D){if(!tD)return;const e=u.emit;u.emit=function(n,r){if(n==="exit"){const o=qe(r,D);if(o)return e.call(u,"error",o)}return e.apply(u,arguments)}}s(Bo,"hookChildProcess");function qe(u,D){return tD&&u===1&&!D.file?nD(D.original,"spawn"):null}s(qe,"verifyENOENT");function bo(u,D){return tD&&u===1&&!D.file?nD(D.original,"spawnSync"):null}s(bo,"verifyENOENTSync");var yo={hookChildProcess:Bo,verifyENOENT:qe,verifyENOENTSync:bo,notFoundError:nD};const ze=Fn,rD=go,oD=yo;function He(u,D,e){const n=rD(u,D,e),r=ze.spawn(n.command,n.args,n.options);return oD.hookChildProcess(r,n),r}s(He,"spawn");function Ao(u,D,e){const n=rD(u,D,e),r=ze.spawnSync(n.command,n.args,n.options);return r.error=r.error||oD.verifyENOENTSync(r.status,n),r}s(Ao,"spawnSync"),K.exports=He,K.exports.spawn=He,K.exports.sync=Ao,K.exports._parse=rD,K.exports._enoent=oD;var wo=K.exports,$o=H(wo);function vo(u){const D=typeof u=="string"?`
23
+ `:10,e=typeof u=="string"?"\r":13;return u[u.length-1]===D&&(u=u.slice(0,-1)),u[u.length-1]===e&&(u=u.slice(0,-1)),u}s(vo,"stripFinalNewline");function Ke(u={}){const{env:D=process.env,platform:e=process.platform}=u;return e!=="win32"?"PATH":Object.keys(D).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}s(Ke,"pathKey");const xo=s(({cwd:u=y.cwd(),path:D=y.env[Ke()],preferLocal:e=!0,execPath:n=y.execPath,addExecPath:r=!0}={})=>{const o=u instanceof URL?te(u):u,t=q.resolve(o),i=[];return e&&So(i,t),r&&Oo(i,n,t),[...i,D].join(q.delimiter)},"npmRunPath"),So=s((u,D)=>{let e;for(;e!==D;)u.push(q.join(D,"node_modules/.bin")),e=D,D=q.resolve(D,"..")},"applyPreferLocal"),Oo=s((u,D,e)=>{const n=D instanceof URL?te(D):D;u.push(q.resolve(e,n,".."))},"applyExecPath"),To=s(({env:u=y.env,...D}={})=>{u={...u};const e=Ke({env:u});return D.path=u[e],u[e]=xo(D),u},"npmRunPathEnv"),Io=s((u,D,e,n)=>{if(e==="length"||e==="prototype"||e==="arguments"||e==="caller")return;const r=Object.getOwnPropertyDescriptor(u,e),o=Object.getOwnPropertyDescriptor(D,e);!Po(r,o)&&n||Object.defineProperty(u,e,o)},"copyProperty"),Po=s(function(u,D){return u===void 0||u.configurable||u.writable===D.writable&&u.enumerable===D.enumerable&&u.configurable===D.configurable&&(u.writable||u.value===D.value)},"canCopyProperty"),ko=s((u,D)=>{const e=Object.getPrototypeOf(D);e!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,e)},"changePrototype"),_o=s((u,D)=>`/* Wrapped ${u}*/
24
+ ${D}`,"wrappedToString"),Ro=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Mo=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),jo=s((u,D,e)=>{const n=e===""?"":`with ${e.trim()}() `,r=_o.bind(null,n,D.toString());Object.defineProperty(r,"name",Mo),Object.defineProperty(u,"toString",{...Ro,value:r})},"changeToString");function No(u,D,{ignoreNonConfigurable:e=!1}={}){const{name:n}=u;for(const r of Reflect.ownKeys(D))Io(u,D,r,e);return ko(u,D),jo(u,D,n),u}s(No,"mimicFunction");const yu=new WeakMap,Ve=s((u,D={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let e,n=0;const r=u.displayName||u.name||"<anonymous>",o=s(function(...t){if(yu.set(o,++n),n===1)e=u.apply(this,t),u=null;else if(D.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return e},"onetime");return No(o,u),yu.set(o,n),o},"onetime");Ve.callCount=u=>{if(!yu.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return yu.get(u)};const Lo=s(()=>{const u=Je-Ye+1;return Array.from({length:u},Go)},"getRealtimeSignals"),Go=s((u,D)=>({name:`SIGRT${D+1}`,number:Ye+D,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),"getRealtimeSignal"),Ye=34,Je=64,Wo=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],Ze=s(()=>{const u=Lo();return[...Wo,...u].map(Uo)},"getSignals"),Uo=s(({name:u,number:D,description:e,action:n,forced:r=!1,standard:o})=>{const{signals:{[u]:t}}=ne,i=t!==void 0;return{name:u,number:i?t:D,description:e,supported:i,action:n,forced:r,standard:o}},"normalizeSignal"),qo=s(()=>{const u=Ze();return Object.fromEntries(u.map(zo))},"getSignalsByName"),zo=s(({name:u,number:D,description:e,supported:n,action:r,forced:o,standard:t})=>[u,{name:u,number:D,description:e,supported:n,action:r,forced:o,standard:t}],"getSignalByName"),Ho=qo(),Ko=s(()=>{const u=Ze(),D=Je+1,e=Array.from({length:D},(n,r)=>Vo(r,u));return Object.assign({},...e)},"getSignalsByNumber"),Vo=s((u,D)=>{const e=Yo(u,D);if(e===void 0)return{};const{name:n,description:r,supported:o,action:t,forced:i,standard:a}=e;return{[u]:{name:n,number:u,description:r,supported:o,action:t,forced:i,standard:a}}},"getSignalByNumber"),Yo=s((u,D)=>{const e=D.find(({name:n})=>ne.signals[n]===u);return e!==void 0?e:D.find(n=>n.number===u)},"findSignalByNumber");Ko();const Jo=s(({timedOut:u,timeout:D,errorCode:e,signal:n,signalDescription:r,exitCode:o,isCanceled:t})=>u?`timed out after ${D} milliseconds`:t?"was canceled":e!==void 0?`failed with ${e}`:n!==void 0?`was killed with ${n} (${r})`:o!==void 0?`failed with exit code ${o}`:"failed","getErrorPrefix"),Xe=s(({stdout:u,stderr:D,all:e,error:n,signal:r,exitCode:o,command:t,escapedCommand:i,timedOut:a,isCanceled:l,killed:C,parsed:{options:{timeout:c,cwd:F=y.cwd()}}})=>{o=o===null?void 0:o,r=r===null?void 0:r;const f=r===void 0?void 0:Ho[r].description,d=n&&n.code,h=`Command ${Jo({timedOut:a,timeout:c,errorCode:d,signal:r,signalDescription:f,exitCode:o,isCanceled:l})}: ${t}`,m=Object.prototype.toString.call(n)==="[object Error]",w=m?`${h}
25
+ ${n.message}`:h,P=[w,D,u].filter(Boolean).join(`
26
+ `);return m?(n.originalMessage=n.message,n.message=P):n=new Error(P),n.shortMessage=w,n.command=t,n.escapedCommand=i,n.exitCode=o,n.signal=r,n.signalDescription=f,n.stdout=u,n.stderr=D,n.cwd=F,e!==void 0&&(n.all=e),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!a,n.isCanceled=l,n.killed=C&&!a,n},"makeError"),Au=["stdin","stdout","stderr"],Zo=s(u=>Au.some(D=>u[D]!==void 0),"hasAlias"),Xo=s(u=>{if(!u)return;const{stdio:D}=u;if(D===void 0)return Au.map(n=>u[n]);if(Zo(u))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Au.map(n=>`\`${n}\``).join(", ")}`);if(typeof D=="string")return D;if(!Array.isArray(D))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof D}\``);const e=Math.max(D.length,Au.length);return Array.from({length:e},(n,r)=>D[r])},"normalizeStdio");var Y={exports:{}},sD={exports:{}},Qe;function Qo(){return Qe||(Qe=1,function(u){u.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&u.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&u.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(sD)),sD.exports}s(Qo,"requireSignals");var g=A.process;const L=s(function(u){return u&&typeof u=="object"&&typeof u.removeListener=="function"&&typeof u.emit=="function"&&typeof u.reallyExit=="function"&&typeof u.listeners=="function"&&typeof u.kill=="function"&&typeof u.pid=="number"&&typeof u.on=="function"},"processOk");if(!L(g))Y.exports=function(){return function(){}};else{var us=re,eu=Qo(),Ds=/^win/i.test(g.platform),wu=oe;typeof wu!="function"&&(wu=wu.EventEmitter);var $;g.__signal_exit_emitter__?$=g.__signal_exit_emitter__:($=g.__signal_exit_emitter__=new wu,$.count=0,$.emitted={}),$.infinite||($.setMaxListeners(1/0),$.infinite=!0),Y.exports=function(u,D){if(!L(A.process))return function(){};us.equal(typeof u,"function","a callback must be provided for exit handler"),tu===!1&&ut();var e="exit";D&&D.alwaysLast&&(e="afterexit");var n=s(function(){$.removeListener(e,u),$.listeners("exit").length===0&&$.listeners("afterexit").length===0&&iD()},"remove");return $.on(e,u),n};var iD=s(function(){!tu||!L(A.process)||(tu=!1,eu.forEach(function(D){try{g.removeListener(D,aD[D])}catch{}}),g.emit=cD,g.reallyExit=Dt,$.count-=1)},"unload");Y.exports.unload=iD;var J=s(function(D,e,n){$.emitted[D]||($.emitted[D]=!0,$.emit(D,e,n))},"emit"),aD={};eu.forEach(function(u){aD[u]=s(function(){if(L(A.process)){var e=g.listeners(u);e.length===$.count&&(iD(),J("exit",null,u),J("afterexit",null,u),Ds&&u==="SIGHUP"&&(u="SIGINT"),g.kill(g.pid,u))}},"listener")}),Y.exports.signals=function(){return eu};var tu=!1,ut=s(function(){tu||!L(A.process)||(tu=!0,$.count+=1,eu=eu.filter(function(D){try{return g.on(D,aD[D]),!0}catch{return!1}}),g.emit=ts,g.reallyExit=es)},"load");Y.exports.load=ut;var Dt=g.reallyExit,es=s(function(D){L(A.process)&&(g.exitCode=D||0,J("exit",g.exitCode,null),J("afterexit",g.exitCode,null),Dt.call(g,g.exitCode))},"processReallyExit"),cD=g.emit,ts=s(function(D,e){if(D==="exit"&&L(A.process)){e!==void 0&&(g.exitCode=e);var n=cD.apply(this,arguments);return J("exit",g.exitCode,null),J("afterexit",g.exitCode,null),n}else return cD.apply(this,arguments)},"processEmit")}var ns=Y.exports,rs=H(ns);const os=1e3*5,ss=s((u,D="SIGTERM",e={})=>{const n=u(D);return is(u,D,e,n),n},"spawnedKill"),is=s((u,D,e,n)=>{if(!as(D,e,n))return;const r=ls(e),o=setTimeout(()=>{u("SIGKILL")},r);o.unref&&o.unref()},"setKillTimeout"),as=s((u,{forceKillAfterTimeout:D},e)=>cs(u)&&D!==!1&&e,"shouldForceKill"),cs=s(u=>u===Cn.constants.signals.SIGTERM||typeof u=="string"&&u.toUpperCase()==="SIGTERM","isSigterm"),ls=s(({forceKillAfterTimeout:u=!0})=>{if(u===!0)return os;if(!Number.isFinite(u)||u<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${u}\` (${typeof u})`);return u},"getForceKillAfterTimeout"),Fs=s((u,D)=>{u.kill()&&(D.isCanceled=!0)},"spawnedCancel"),Cs=s((u,D,e)=>{u.kill(D),e(Object.assign(new Error("Timed out"),{timedOut:!0,signal:D}))},"timeoutKill"),fs=s((u,{timeout:D,killSignal:e="SIGTERM"},n)=>{if(D===0||D===void 0)return n;let r;const o=new Promise((i,a)=>{r=setTimeout(()=>{Cs(u,e,a)},D)}),t=n.finally(()=>{clearTimeout(r)});return Promise.race([o,t])},"setupTimeout"),ds=s(({timeout:u})=>{if(u!==void 0&&(!Number.isFinite(u)||u<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${u}\` (${typeof u})`)},"validateTimeout"),Es=s(async(u,{cleanup:D,detached:e},n)=>{if(!D||e)return n;const r=rs(()=>{u.kill()});return n.finally(()=>{r()})},"setExitHandler");function et(u){return u!==null&&typeof u=="object"&&typeof u.pipe=="function"}s(et,"isStream");function tt(u){return et(u)&&u.writable!==!1&&typeof u._write=="function"&&typeof u._writableState=="object"}s(tt,"isWritableStream");const ps=s(u=>u instanceof ln&&typeof u.then=="function","isExecaChildProcess"),lD=s((u,D,e)=>{if(typeof e=="string")return u[D].pipe(fn(e)),u;if(tt(e))return u[D].pipe(e),u;if(!ps(e))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!tt(e.stdin))throw new TypeError("The target child process's stdin must be available.");return u[D].pipe(e.stdin),e},"pipeToTarget"),hs=s(u=>{u.stdout!==null&&(u.pipeStdout=lD.bind(void 0,u,"stdout")),u.stderr!==null&&(u.pipeStderr=lD.bind(void 0,u,"stderr")),u.all!==void 0&&(u.pipeAll=lD.bind(void 0,u,"all"))},"addPipeMethods");var nu={exports:{}};const{PassThrough:ms}=Gu;var gs=s(u=>{u={...u};const{array:D}=u;let{encoding:e}=u;const n=e==="buffer";let r=!1;D?r=!(e||n):e=e||"utf8",n&&(e=null);const o=new ms({objectMode:r});e&&o.setEncoding(e);let t=0;const i=[];return o.on("data",a=>{i.push(a),r?t=i.length:t+=a.length}),o.getBufferedValue=()=>D?i:n?Buffer.concat(i,t):i.join(""),o.getBufferedLength=()=>t,o},"bufferStream$1");const{constants:Bs}=En,bs=Gu,{promisify:ys}=se,As=gs,ws=ys(bs.pipeline),YD=class YD extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};s(YD,"MaxBufferError");let $u=YD;async function FD(u,D){if(!u)throw new Error("Expected a stream");D={maxBuffer:1/0,...D};const{maxBuffer:e}=D,n=As(D);return await new Promise((r,o)=>{const t=s(i=>{i&&n.getBufferedLength()<=Bs.MAX_LENGTH&&(i.bufferedData=n.getBufferedValue()),o(i)},"rejectPromise");(async()=>{try{await ws(u,n),r()}catch(i){t(i)}})(),n.on("data",()=>{n.getBufferedLength()>e&&t(new $u)})}),n.getBufferedValue()}s(FD,"getStream"),nu.exports=FD,nu.exports.buffer=(u,D)=>FD(u,{...D,encoding:"buffer"}),nu.exports.array=(u,D)=>FD(u,{...D,array:!0}),nu.exports.MaxBufferError=$u;var $s=nu.exports,nt=H($s);const{PassThrough:vs}=Gu;var xs=s(function(){var u=[],D=new vs({objectMode:!0});return D.setMaxListeners(0),D.add=e,D.isEmpty=n,D.on("unpipe",r),Array.prototype.slice.call(arguments).forEach(e),D;function e(o){return Array.isArray(o)?(o.forEach(e),this):(u.push(o),o.once("end",r.bind(null,o)),o.once("error",D.emit.bind(D,"error")),o.pipe(D,{end:!1}),this)}s(e,"add");function n(){return u.length==0}s(n,"isEmpty");function r(o){u=u.filter(function(t){return t!==o}),!u.length&&D.readable&&D.end()}s(r,"remove")},"mergeStream"),Ss=H(xs);const Os=s(u=>{if(u!==void 0)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},"validateInputOptions"),Ts=s(({input:u,inputFile:D})=>typeof D!="string"?u:(Os(u),dn(D)),"getInput"),Is=s((u,D)=>{const e=Ts(D);e!==void 0&&(et(e)?e.pipe(u.stdin):u.stdin.end(e))},"handleInput"),Ps=s((u,{all:D})=>{if(!D||!u.stdout&&!u.stderr)return;const e=Ss();return u.stdout&&e.add(u.stdout),u.stderr&&e.add(u.stderr),e},"makeAllStream"),CD=s(async(u,D)=>{if(!(!u||D===void 0)){u.destroy();try{return await D}catch(e){return e.bufferedData}}},"getBufferedData"),fD=s((u,{encoding:D,buffer:e,maxBuffer:n})=>{if(!(!u||!e))return D?nt(u,{encoding:D,maxBuffer:n}):nt.buffer(u,{maxBuffer:n})},"getStreamPromise"),ks=s(async({stdout:u,stderr:D,all:e},{encoding:n,buffer:r,maxBuffer:o},t)=>{const i=fD(u,{encoding:n,buffer:r,maxBuffer:o}),a=fD(D,{encoding:n,buffer:r,maxBuffer:o}),l=fD(e,{encoding:n,buffer:r,maxBuffer:o*2});try{return await Promise.all([t,i,a,l])}catch(C){return Promise.all([{error:C,signal:C.signal,timedOut:C.timedOut},CD(u,i),CD(D,a),CD(e,l)])}},"getSpawnedResult"),_s=(async()=>{})().constructor.prototype,Rs=["then","catch","finally"].map(u=>[u,Reflect.getOwnPropertyDescriptor(_s,u)]),rt=s((u,D)=>{for(const[e,n]of Rs){const r=typeof D=="function"?(...o)=>Reflect.apply(n.value,D(),o):n.value.bind(D);Reflect.defineProperty(u,e,{...n,value:r})}},"mergePromise"),Ms=s(u=>new Promise((D,e)=>{u.on("exit",(n,r)=>{D({exitCode:n,signal:r})}),u.on("error",n=>{e(n)}),u.stdin&&u.stdin.on("error",n=>{e(n)})}),"getSpawnedPromise"),ot=s((u,D=[])=>Array.isArray(D)?[u,...D]:[u],"normalizeArgs"),js=/^[\w.-]+$/,Ns=/"/g,Ls=s(u=>typeof u!="string"||js.test(u)?u:`"${u.replace(Ns,'\\"')}"`,"escapeArg"),Gs=s((u,D)=>ot(u,D).join(" "),"joinCommand"),Ws=s((u,D)=>ot(u,D).map(e=>Ls(e)).join(" "),"getEscapedCommand"),Us=pn("execa").enabled,vu=s((u,D)=>String(u).padStart(D,"0"),"padField"),qs=s(()=>{const u=new Date;return`${vu(u.getHours(),2)}:${vu(u.getMinutes(),2)}:${vu(u.getSeconds(),2)}.${vu(u.getMilliseconds(),3)}`},"getTimestamp"),zs=s((u,{verbose:D})=>{D&&y.stderr.write(`[${qs()}] ${u}
27
+ `)},"logCommand"),Hs=1e3*1e3*100,Ks=s(({env:u,extendEnv:D,preferLocal:e,localDir:n,execPath:r})=>{const o=D?{...y.env,...u}:u;return e?To({env:o,cwd:n,execPath:r}):o},"getEnv"),Vs=s((u,D,e={})=>{const n=$o._parse(u,D,e);return u=n.command,D=n.args,e=n.options,e={maxBuffer:Hs,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:e.cwd||y.cwd(),execPath:y.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Us,...e},e.env=Ks(e),e.stdio=Xo(e),y.platform==="win32"&&q.basename(u,".exe")==="cmd"&&D.unshift("/q"),{file:u,args:D,options:e,parsed:n}},"handleArguments"),dD=s((u,D,e)=>typeof D!="string"&&!cn.isBuffer(D)?e===void 0?void 0:"":u.stripFinalNewline?vo(D):D,"handleOutput");function Z(u,D,e){const n=Vs(u,D,e),r=Gs(u,D),o=Ws(u,D);zs(o,n.options),ds(n.options);let t;try{t=ue.spawn(n.file,n.args,n.options)}catch(f){const d=new ue.ChildProcess,E=Promise.reject(Xe({error:f,stdout:"",stderr:"",all:"",command:r,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return rt(d,E),d}const i=Ms(t),a=fs(t,n.options,i),l=Es(t,n.options,a),C={isCanceled:!1};t.kill=ss.bind(null,t.kill.bind(t)),t.cancel=Fs.bind(null,t,C);const F=Ve(s(async()=>{const[{error:f,exitCode:d,signal:E,timedOut:h},m,w,P]=await ks(t,n.options,l),du=dD(n.options,m),j=dD(n.options,w),Nu=dD(n.options,P);if(f||d!==0||E!==null){const U=Xe({error:f,exitCode:d,signal:E,stdout:du,stderr:j,all:Nu,command:r,escapedCommand:o,parsed:n,timedOut:h,isCanceled:n.options.signal?n.options.signal.aborted:!1,killed:t.killed});if(!n.options.reject)return U;throw U}return{command:r,escapedCommand:o,exitCode:0,stdout:du,stderr:j,all:Nu,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},"handlePromise"));return Is(t,n.options),t.all=Ps(t,n.options),hs(t),rt(t,F),t}s(Z,"execa");let G=!0;const X=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let ru=0;if(X.process&&X.process.env&&X.process.stdout){const{FORCE_COLOR:u,NODE_DISABLE_COLORS:D,NO_COLOR:e,TERM:n,COLORTERM:r}=X.process.env;D||e||u==="0"?G=!1:u==="1"||u==="2"||u==="3"?G=!0:n==="dumb"?G=!1:"CI"in X.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in X.process.env)?G=!0:G=process.stdout.isTTY,G&&(process.platform==="win32"||r&&(r==="truecolor"||r==="24bit")?ru=3:n&&(n.endsWith("-256color")||n.endsWith("256"))?ru=2:ru=1)}let st={enabled:G,supportLevel:ru};function ou(u,D,e=1){const n=`\x1B[${u}m`,r=`\x1B[${D}m`,o=new RegExp(`\\x1b\\[${D}m`,"g");return t=>st.enabled&&st.supportLevel>=e?n+(""+t).replace(o,n)+r:""+t}s(ou,"kolorist");const ED=ou(2,22),it=ou(30,39),xu=ou(31,39),su=ou(32,39),at=ou(46,49),pD="\x1B",b=`${pD}[`,Ys="\x07",hD={to(u,D){return D?`${b}${D+1};${u+1}H`:`${b}${u+1}G`},move(u,D){let e="";return u<0?e+=`${b}${-u}D`:u>0&&(e+=`${b}${u}C`),D<0?e+=`${b}${-D}A`:D>0&&(e+=`${b}${D}B`),e},up:(u=1)=>`${b}${u}A`,down:(u=1)=>`${b}${u}B`,forward:(u=1)=>`${b}${u}C`,backward:(u=1)=>`${b}${u}D`,nextLine:(u=1)=>`${b}E`.repeat(u),prevLine:(u=1)=>`${b}F`.repeat(u),left:`${b}G`,hide:`${b}?25l`,show:`${b}?25h`,save:`${pD}7`,restore:`${pD}8`},Js={up:(u=1)=>`${b}S`.repeat(u),down:(u=1)=>`${b}T`.repeat(u)},Zs={screen:`${b}2J`,up:(u=1)=>`${b}1J`.repeat(u),down:(u=1)=>`${b}J`.repeat(u),line:`${b}2K`,lineEnd:`${b}K`,lineStart:`${b}1K`,lines(u){let D="";for(let e=0;e<u;e++)D+=this.line+(e<u-1?hD.up():"");return u&&(D+=hD.left),D}};var v={cursor:hD,scroll:Js,erase:Zs,beep:Ys};function Xs(u){throw new Error('Could not dynamically require "'+u+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}s(Xs,"commonjsRequire");var mD={exports:{}};let ct=process.argv||[],Su=process.env,Qs=!("NO_COLOR"in Su||ct.includes("--no-color"))&&("FORCE_COLOR"in Su||ct.includes("--color")||process.platform==="win32"||Xs!=null&&Eu.isatty(1)&&Su.TERM!=="dumb"||"CI"in Su),ui=s((u,D,e=u)=>n=>{let r=""+n,o=r.indexOf(D,u.length);return~o?u+Di(r,D,e,o)+D:u+r+D},"formatter"),Di=s((u,D,e,n)=>{let r="",o=0;do r+=u.substring(o,n)+e,o=n+D.length,n=u.indexOf(D,o);while(~n);return r+u.substring(o)},"replaceClose"),lt=s((u=Qs)=>{let D=u?ui:()=>String;return{isColorSupported:u,reset:D("\x1B[0m","\x1B[0m"),bold:D("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:D("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:D("\x1B[3m","\x1B[23m"),underline:D("\x1B[4m","\x1B[24m"),inverse:D("\x1B[7m","\x1B[27m"),hidden:D("\x1B[8m","\x1B[28m"),strikethrough:D("\x1B[9m","\x1B[29m"),black:D("\x1B[30m","\x1B[39m"),red:D("\x1B[31m","\x1B[39m"),green:D("\x1B[32m","\x1B[39m"),yellow:D("\x1B[33m","\x1B[39m"),blue:D("\x1B[34m","\x1B[39m"),magenta:D("\x1B[35m","\x1B[39m"),cyan:D("\x1B[36m","\x1B[39m"),white:D("\x1B[37m","\x1B[39m"),gray:D("\x1B[90m","\x1B[39m"),bgBlack:D("\x1B[40m","\x1B[49m"),bgRed:D("\x1B[41m","\x1B[49m"),bgGreen:D("\x1B[42m","\x1B[49m"),bgYellow:D("\x1B[43m","\x1B[49m"),bgBlue:D("\x1B[44m","\x1B[49m"),bgMagenta:D("\x1B[45m","\x1B[49m"),bgCyan:D("\x1B[46m","\x1B[49m"),bgWhite:D("\x1B[47m","\x1B[49m")}},"createColors");mD.exports=lt(),mD.exports.createColors=lt;var ei=mD.exports,p=H(ei);function ti({onlyFirst:u=!1}={}){const D=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(D,u?void 0:"g")}s(ti,"q$1");function Ft(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(ti(),"")}s(Ft,"S$1");function Ct(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}s(Ct,"j");var ft={exports:{}};(function(u){var D={};u.exports=D,D.eastAsianWidth=function(n){var r=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,t=r;return 55296<=r&&r<=56319&&56320<=o&&o<=57343&&(r&=1023,o&=1023,t=r<<10|o,t+=65536),t==12288||65281<=t&&t<=65376||65504<=t&&t<=65510?"F":t==8361||65377<=t&&t<=65470||65474<=t&&t<=65479||65482<=t&&t<=65487||65490<=t&&t<=65495||65498<=t&&t<=65500||65512<=t&&t<=65518?"H":4352<=t&&t<=4447||4515<=t&&t<=4519||4602<=t&&t<=4607||9001<=t&&t<=9002||11904<=t&&t<=11929||11931<=t&&t<=12019||12032<=t&&t<=12245||12272<=t&&t<=12283||12289<=t&&t<=12350||12353<=t&&t<=12438||12441<=t&&t<=12543||12549<=t&&t<=12589||12593<=t&&t<=12686||12688<=t&&t<=12730||12736<=t&&t<=12771||12784<=t&&t<=12830||12832<=t&&t<=12871||12880<=t&&t<=13054||13056<=t&&t<=19903||19968<=t&&t<=42124||42128<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||55216<=t&&t<=55238||55243<=t&&t<=55291||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65106||65108<=t&&t<=65126||65128<=t&&t<=65131||110592<=t&&t<=110593||127488<=t&&t<=127490||127504<=t&&t<=127546||127552<=t&&t<=127560||127568<=t&&t<=127569||131072<=t&&t<=194367||177984<=t&&t<=196605||196608<=t&&t<=262141?"W":32<=t&&t<=126||162<=t&&t<=163||165<=t&&t<=166||t==172||t==175||10214<=t&&t<=10221||10629<=t&&t<=10630?"Na":t==161||t==164||167<=t&&t<=168||t==170||173<=t&&t<=174||176<=t&&t<=180||182<=t&&t<=186||188<=t&&t<=191||t==198||t==208||215<=t&&t<=216||222<=t&&t<=225||t==230||232<=t&&t<=234||236<=t&&t<=237||t==240||242<=t&&t<=243||247<=t&&t<=250||t==252||t==254||t==257||t==273||t==275||t==283||294<=t&&t<=295||t==299||305<=t&&t<=307||t==312||319<=t&&t<=322||t==324||328<=t&&t<=331||t==333||338<=t&&t<=339||358<=t&&t<=359||t==363||t==462||t==464||t==466||t==468||t==470||t==472||t==474||t==476||t==593||t==609||t==708||t==711||713<=t&&t<=715||t==717||t==720||728<=t&&t<=731||t==733||t==735||768<=t&&t<=879||913<=t&&t<=929||931<=t&&t<=937||945<=t&&t<=961||963<=t&&t<=969||t==1025||1040<=t&&t<=1103||t==1105||t==8208||8211<=t&&t<=8214||8216<=t&&t<=8217||8220<=t&&t<=8221||8224<=t&&t<=8226||8228<=t&&t<=8231||t==8240||8242<=t&&t<=8243||t==8245||t==8251||t==8254||t==8308||t==8319||8321<=t&&t<=8324||t==8364||t==8451||t==8453||t==8457||t==8467||t==8470||8481<=t&&t<=8482||t==8486||t==8491||8531<=t&&t<=8532||8539<=t&&t<=8542||8544<=t&&t<=8555||8560<=t&&t<=8569||t==8585||8592<=t&&t<=8601||8632<=t&&t<=8633||t==8658||t==8660||t==8679||t==8704||8706<=t&&t<=8707||8711<=t&&t<=8712||t==8715||t==8719||t==8721||t==8725||t==8730||8733<=t&&t<=8736||t==8739||t==8741||8743<=t&&t<=8748||t==8750||8756<=t&&t<=8759||8764<=t&&t<=8765||t==8776||t==8780||t==8786||8800<=t&&t<=8801||8804<=t&&t<=8807||8810<=t&&t<=8811||8814<=t&&t<=8815||8834<=t&&t<=8835||8838<=t&&t<=8839||t==8853||t==8857||t==8869||t==8895||t==8978||9312<=t&&t<=9449||9451<=t&&t<=9547||9552<=t&&t<=9587||9600<=t&&t<=9615||9618<=t&&t<=9621||9632<=t&&t<=9633||9635<=t&&t<=9641||9650<=t&&t<=9651||9654<=t&&t<=9655||9660<=t&&t<=9661||9664<=t&&t<=9665||9670<=t&&t<=9672||t==9675||9678<=t&&t<=9681||9698<=t&&t<=9701||t==9711||9733<=t&&t<=9734||t==9737||9742<=t&&t<=9743||9748<=t&&t<=9749||t==9756||t==9758||t==9792||t==9794||9824<=t&&t<=9825||9827<=t&&t<=9829||9831<=t&&t<=9834||9836<=t&&t<=9837||t==9839||9886<=t&&t<=9887||9918<=t&&t<=9919||9924<=t&&t<=9933||9935<=t&&t<=9953||t==9955||9960<=t&&t<=9983||t==10045||t==10071||10102<=t&&t<=10111||11093<=t&&t<=11097||12872<=t&&t<=12879||57344<=t&&t<=63743||65024<=t&&t<=65039||t==65533||127232<=t&&t<=127242||127248<=t&&t<=127277||127280<=t&&t<=127337||127344<=t&&t<=127386||917760<=t&&t<=917999||983040<=t&&t<=1048573||1048576<=t&&t<=1114109?"A":"N"},D.characterLength=function(n){var r=this.eastAsianWidth(n);return r=="F"||r=="W"||r=="A"?2:1};function e(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}s(e,"F"),D.length=function(n){for(var r=e(n),o=0,t=0;t<r.length;t++)o=o+this.characterLength(r[t]);return o},D.slice=function(n,r,o){textLen=D.length(n),r=r||0,o=o||1,r<0&&(r=textLen+r),o<0&&(o=textLen+o);for(var t="",i=0,a=e(n),l=0;l<a.length;l++){var C=a[l],c=D.length(C);if(i>=r-(c==2?1:0))if(i+c<=o)t+=C;else break;i+=c}return t}})(ft);var ni=ft.exports;const ri=Ct(ni);var oi=s(function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},"X");const si=Ct(oi);function iu(u,D={}){if(typeof u!="string"||u.length===0||(D={ambiguousIsNarrow:!0,...D},u=Ft(u),u.length===0))return 0;u=u.replace(si()," ");const e=D.ambiguousIsNarrow?1:2;let n=0;for(const r of u){const o=r.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(ri.eastAsianWidth(r)){case"F":case"W":n+=2;break;case"A":n+=e;break;default:n+=1}}return n}s(iu,"A");const gD=10,dt=s((u=0)=>D=>`\x1B[${D+u}m`,"T"),Et=s((u=0)=>D=>`\x1B[${38+u};5;${D}m`,"P"),pt=s((u=0)=>(D,e,n)=>`\x1B[${38+u};2;${D};${e};${n}m`,"W"),B={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(B.modifier);const ii=Object.keys(B.color),ai=Object.keys(B.bgColor);[...ii,...ai];function ci(){const u=new Map;for(const[D,e]of Object.entries(B)){for(const[n,r]of Object.entries(e))B[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[n]=B[n],u.set(r[0],r[1]);Object.defineProperty(B,D,{value:e,enumerable:!1})}return Object.defineProperty(B,"codes",{value:u,enumerable:!1}),B.color.close="\x1B[39m",B.bgColor.close="\x1B[49m",B.color.ansi=dt(),B.color.ansi256=Et(),B.color.ansi16m=pt(),B.bgColor.ansi=dt(gD),B.bgColor.ansi256=Et(gD),B.bgColor.ansi16m=pt(gD),Object.defineProperties(B,{rgbToAnsi256:{value:(D,e,n)=>D===e&&e===n?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(e/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:D=>{const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!e)return[0,0,0];let[n]=e;n.length===3&&(n=[...n].map(o=>o+o).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:D=>B.rgbToAnsi256(...B.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value:D=>{if(D<8)return 30+D;if(D<16)return 90+(D-8);let e,n,r;if(D>=232)e=((D-232)*10+8)/255,n=e,r=e;else{D-=16;const i=D%36;e=Math.floor(D/36)/5,n=Math.floor(i/6)/5,r=i%6/5}const o=Math.max(e,n,r)*2;if(o===0)return 30;let t=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(e));return o===2&&(t+=60),t},enumerable:!1},rgbToAnsi:{value:(D,e,n)=>B.ansi256ToAnsi(B.rgbToAnsi256(D,e,n)),enumerable:!1},hexToAnsi:{value:D=>B.ansi256ToAnsi(B.hexToAnsi256(D)),enumerable:!1}}),B}s(ci,"tD");const li=ci(),Ou=new Set(["\x1B","\x9B"]),Fi=39,BD="\x07",ht="[",Ci="]",mt="m",bD=`${Ci}8;;`,gt=s(u=>`${Ou.values().next().value}${ht}${u}${mt}`,"N"),Bt=s(u=>`${Ou.values().next().value}${bD}${u}${BD}`,"L"),fi=s(u=>u.split(" ").map(D=>iu(D)),"iD"),yD=s((u,D,e)=>{const n=[...D];let r=!1,o=!1,t=iu(Ft(u[u.length-1]));for(const[i,a]of n.entries()){const l=iu(a);if(t+l<=e?u[u.length-1]+=a:(u.push(a),t=0),Ou.has(a)&&(r=!0,o=n.slice(i+1).join("").startsWith(bD)),r){o?a===BD&&(r=!1,o=!1):a===mt&&(r=!1);continue}t+=l,t===e&&i<n.length-1&&(u.push(""),t=0)}!t&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},"y$1"),di=s(u=>{const D=u.split(" ");let e=D.length;for(;e>0&&!(iu(D[e-1])>0);)e--;return e===D.length?u:D.slice(0,e).join(" ")+D.slice(e).join("")},"rD"),Ei=s((u,D,e={})=>{if(e.trim!==!1&&u.trim()==="")return"";let n="",r,o;const t=fi(u);let i=[""];for(const[l,C]of u.split(" ").entries()){e.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let c=iu(i[i.length-1]);if(l!==0&&(c>=D&&(e.wordWrap===!1||e.trim===!1)&&(i.push(""),c=0),(c>0||e.trim===!1)&&(i[i.length-1]+=" ",c++)),e.hard&&t[l]>D){const F=D-c,f=1+Math.floor((t[l]-F-1)/D);Math.floor((t[l]-1)/D)<f&&i.push(""),yD(i,C,D);continue}if(c+t[l]>D&&c>0&&t[l]>0){if(e.wordWrap===!1&&c<D){yD(i,C,D);continue}i.push("")}if(c+t[l]>D&&e.wordWrap===!1){yD(i,C,D);continue}i[i.length-1]+=C}e.trim!==!1&&(i=i.map(l=>di(l)));const a=[...i.join(`
28
+ `)];for(const[l,C]of a.entries()){if(n+=C,Ou.has(C)){const{groups:F}=new RegExp(`(?:\\${ht}(?<code>\\d+)m|\\${bD}(?<uri>.*)${BD})`).exec(a.slice(l).join(""))||{groups:{}};if(F.code!==void 0){const f=Number.parseFloat(F.code);r=f===Fi?void 0:f}else F.uri!==void 0&&(o=F.uri.length===0?void 0:F.uri)}const c=li.codes.get(Number(r));a[l+1]===`
29
+ `?(o&&(n+=Bt("")),r&&c&&(n+=gt(c))):C===`
30
+ `&&(r&&c&&(n+=gt(r)),o&&(n+=Bt(o)))}return n},"ED");function bt(u,D,e){return String(u).normalize().replace(/\r\n/g,`
31
31
  `).split(`
32
- `).map(e=>ri(e,D,t)).join(`
33
- `)}var oi=Object.defineProperty,si=(u,D,t)=>D in u?oi(u,D,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[D]=t,I=(u,D,t)=>(si(u,typeof D!="symbol"?D+"":D,t),t);function ii(u,D){if(u===D)return;const t=u.split(`
34
- `),e=D.split(`
35
- `),r=[];for(let o=0;o<Math.max(t.length,e.length);o++)t[o]!==e[o]&&r.push(o);return r}const Ct=Symbol("clack:cancel");function ft(u){return u===Ct}function $u(u,D){u.isTTY&&u.setRawMode(D)}const dt=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),ai=new Set(["up","down","left","right","space","enter"]);let Et=class{constructor({render:D,input:t=qD,output:e=HD,...r},o=!0){I(this,"input"),I(this,"output"),I(this,"rl"),I(this,"opts"),I(this,"_track",!1),I(this,"_render"),I(this,"_cursor",0),I(this,"state","initial"),I(this,"value"),I(this,"error",""),I(this,"subscribers",new Map),I(this,"_prevFrame",""),this.opts=r,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=D.bind(this),this._track=o,this.input=t,this.output=e}prompt(){const D=new on(0);return D._write=(t,e,r)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),r()},this.input.pipe(D),this.rl=ZD.createInterface({input:this.input,output:D,tabSize:2,prompt:"",escapeCodeTimeout:50}),ZD.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),$u(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((t,e)=>{this.once("submit",()=>{this.output.write($.cursor.show),this.output.off("resize",this.render),$u(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write($.cursor.show),this.output.off("resize",this.render),$u(this.input,!1),t(Ct)})})}on(D,t){const e=this.subscribers.get(D)??[];e.push({cb:t}),this.subscribers.set(D,e)}once(D,t){const e=this.subscribers.get(D)??[];e.push({cb:t,once:!0}),this.subscribers.set(D,e)}emit(D,...t){const e=this.subscribers.get(D)??[],r=[];for(const o of e)o.cb(...t),o.once&&r.push(()=>e.splice(e.indexOf(o),1));for(const o of r)o()}unsubscribe(){this.subscribers.clear()}onKeypress(D,t){if(this.state==="error"&&(this.state="active"),t?.name&&!this._track&&dt.has(t.name)&&this.emit("cursor",dt.get(t.name)),t?.name&&ai.has(t.name)&&this.emit("cursor",t.name),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D===" "&&this.opts.placeholder&&(this.value||(this.rl.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),D&&this.emit("key",D.toLowerCase()),t?.name==="return"){if(this.opts.validate){const e=this.opts.validate(this.value);e&&(this.error=e,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}D===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
36
- `),$u(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const D=Ft(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
37
- `).length-1;this.output.write($.cursor.move(-999,D*-1))}render(){const D=Ft(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write($.cursor.hide);else{const t=ii(this._prevFrame,D);if(this.restoreCursor(),t&&t?.length===1){const e=t[0];this.output.write($.cursor.move(0,e)),this.output.write($.erase.lines(1));const r=D.split(`
38
- `);this.output.write(r[e]),this._prevFrame=D,this.output.write($.cursor.move(0,r.length-e-1));return}else if(t&&t?.length>1){const e=t[0];this.output.write($.cursor.move(0,e)),this.output.write($.erase.down());const r=D.split(`
39
- `).slice(e);this.output.write(r.join(`
40
- `)),this._prevFrame=D;return}this.output.write($.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}};class ci extends Et{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(D){super(D,!1),this.value=!!D.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",t=>{this.output.write($.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var li=Object.defineProperty,Fi=(u,D,t)=>D in u?li(u,D,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[D]=t,pt=(u,D,t)=>(Fi(u,typeof D!="symbol"?D+"":D,t),t);let Ci=class extends Et{constructor(u){super(u,!1),pt(this,"options"),pt(this,"cursor",0),this.options=u.options,this.cursor=this.options.findIndex(({value:D})=>D===u.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",D=>{switch(D){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};const fi=globalThis.process.platform.startsWith("win");function di({input:u=qD,output:D=HD,overwrite:t=!0,hideCursor:e=!0}={}){const r=Cu.createInterface({input:u,output:D,prompt:"",tabSize:1});Cu.emitKeypressEvents(u,r),u.isTTY&&u.setRawMode(!0);const o=(n,{name:s})=>{if(String(n)===""&&process.exit(0),!t)return;let i=s==="return"?0:-1,c=s==="return"?-1:0;Cu.moveCursor(D,i,c,()=>{Cu.clearLine(D,1,()=>{u.once("keypress",o)})})};return e&&process.stdout.write($.cursor.hide),u.once("keypress",o),()=>{u.off("keypress",o),e&&process.stdout.write($.cursor.show),u.isTTY&&!fi&&u.setRawMode(!1),r.terminal=!1,r.close()}}function Ei(){return b.platform!=="win32"?b.env.TERM!=="linux":!!b.env.CI||!!b.env.WT_SESSION||!!b.env.TERMINUS_SUBLIME||b.env.ConEmuTask==="{cmd::Cmder}"||b.env.TERM_PROGRAM==="Terminus-Sublime"||b.env.TERM_PROGRAM==="vscode"||b.env.TERM==="xterm-256color"||b.env.TERM==="alacritty"||b.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const mD=Ei(),k=(u,D)=>mD?u:D,pi=k("\u25C6","*"),ht=k("\u25A0","x"),mt=k("\u25B2","x"),gt=k("\u25C7","o"),hi=k("\u250C","T"),T=k("\u2502","|"),gD=k("\u2514","\u2014"),BD=k("\u25CF",">"),bD=k("\u25CB"," "),Bt=u=>{switch(u){case"initial":case"active":return E.cyan(pi);case"cancel":return E.red(ht);case"error":return E.yellow(mt);case"submit":return E.green(gt)}},mi=u=>{const D=u.active??"Yes",t=u.inactive??"No";return new ci({active:D,inactive:t,initialValue:u.initialValue??!0,render(){const e=`${E.gray(T)}
41
- ${Bt(this.state)} ${u.message}
42
- `,r=this.value?D:t;switch(this.state){case"submit":return`${e}${E.gray(T)} ${E.dim(r)}`;case"cancel":return`${e}${E.gray(T)} ${E.strikethrough(E.dim(r))}
43
- ${E.gray(T)}`;default:return`${e}${E.cyan(T)} ${this.value?`${E.green(BD)} ${D}`:`${E.dim(bD)} ${E.dim(D)}`} ${E.dim("/")} ${this.value?`${E.dim(bD)} ${E.dim(t)}`:`${E.green(BD)} ${t}`}
44
- ${E.cyan(gD)}
45
- `}}}).prompt()},gi=u=>{const D=(e,r)=>{const o=e.label??String(e.value);return r==="active"?`${E.green(BD)} ${o} ${e.hint?E.dim(`(${e.hint})`):""}`:r==="selected"?`${E.dim(o)}`:r==="cancelled"?`${E.strikethrough(E.dim(o))}`:`${E.dim(bD)} ${E.dim(o)}`};let t=0;return new Ci({options:u.options,initialValue:u.initialValue,render(){const e=`${E.gray(T)}
46
- ${Bt(this.state)} ${u.message}
47
- `;switch(this.state){case"submit":return`${e}${E.gray(T)} ${D(this.options[this.cursor],"selected")}`;case"cancel":return`${e}${E.gray(T)} ${D(this.options[this.cursor],"cancelled")}
48
- ${E.gray(T)}`;default:{const r=u.maxItems===void 0?1/0:Math.max(u.maxItems,5);this.cursor>=t+r-3?t=Math.max(Math.min(this.cursor-r+3,this.options.length-r),0):this.cursor<t+2&&(t=Math.max(this.cursor-2,0));const o=r<this.options.length&&t>0,n=r<this.options.length&&t+r<this.options.length;return`${e}${E.cyan(T)} ${this.options.slice(t,t+r).map((s,i,c)=>i===0&&o||i===c.length-1&&n?E.dim("..."):D(s,i+t===this.cursor?"active":"inactive")).join(`
49
- ${E.cyan(T)} `)}
50
- ${E.cyan(gD)}
51
- `}}}}).prompt()},bt=(u="")=>{process.stdout.write(`${E.gray(hi)} ${u}
52
- `)},G=(u="")=>{process.stdout.write(`${E.gray(T)}
53
- ${E.gray(gD)} ${u}
32
+ `).map(n=>Ei(n,D,e)).join(`
33
+ `)}s(bt,"R");var pi=Object.defineProperty,hi=s((u,D,e)=>D in u?pi(u,D,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[D]=e,"nD"),k=s((u,D,e)=>(hi(u,typeof D!="symbol"?D+"":D,e),e),"a$1");function mi(u,D){if(u===D)return;const e=u.split(`
34
+ `),n=D.split(`
35
+ `),r=[];for(let o=0;o<Math.max(e.length,n.length);o++)e[o]!==n[o]&&r.push(o);return r}s(mi,"aD");const yt=Symbol("clack:cancel");function At(u){return u===yt}s(At,"hD");function Tu(u,D){u.isTTY&&u.setRawMode(D)}s(Tu,"v");const wt=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),gi=new Set(["up","down","left","right","space","enter"]);let $t=(Cu=class{constructor({render:D,input:e=De,output:n=ee,...r},o=!0){k(this,"input"),k(this,"output"),k(this,"rl"),k(this,"opts"),k(this,"_track",!1),k(this,"_render"),k(this,"_cursor",0),k(this,"state","initial"),k(this,"value"),k(this,"error",""),k(this,"subscribers",new Map),k(this,"_prevFrame",""),this.opts=r,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=D.bind(this),this._track=o,this.input=e,this.output=n}prompt(){const D=new hn(0);return D._write=(e,n,r)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),r()},this.input.pipe(D),this.rl=ie.createInterface({input:this.input,output:D,tabSize:2,prompt:"",escapeCodeTimeout:50}),ie.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),Tu(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((e,n)=>{this.once("submit",()=>{this.output.write(v.cursor.show),this.output.off("resize",this.render),Tu(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(v.cursor.show),this.output.off("resize",this.render),Tu(this.input,!1),e(yt)})})}on(D,e){const n=this.subscribers.get(D)??[];n.push({cb:e}),this.subscribers.set(D,n)}once(D,e){const n=this.subscribers.get(D)??[];n.push({cb:e,once:!0}),this.subscribers.set(D,n)}emit(D,...e){const n=this.subscribers.get(D)??[],r=[];for(const o of n)o.cb(...e),o.once&&r.push(()=>n.splice(n.indexOf(o),1));for(const o of r)o()}unsubscribe(){this.subscribers.clear()}onKeypress(D,e){if(this.state==="error"&&(this.state="active"),e?.name&&!this._track&&wt.has(e.name)&&this.emit("cursor",wt.get(e.name)),e?.name&&gi.has(e.name)&&this.emit("cursor",e.name),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D===" "&&this.opts.placeholder&&(this.value||(this.rl.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),D&&this.emit("key",D.toLowerCase()),e?.name==="return"){if(this.opts.validate){const n=this.opts.validate(this.value);n&&(this.error=n,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}D===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
36
+ `),Tu(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const D=bt(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
37
+ `).length-1;this.output.write(v.cursor.move(-999,D*-1))}render(){const D=bt(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(v.cursor.hide);else{const e=mi(this._prevFrame,D);if(this.restoreCursor(),e&&e?.length===1){const n=e[0];this.output.write(v.cursor.move(0,n)),this.output.write(v.erase.lines(1));const r=D.split(`
38
+ `);this.output.write(r[n]),this._prevFrame=D,this.output.write(v.cursor.move(0,r.length-n-1));return}else if(e&&e?.length>1){const n=e[0];this.output.write(v.cursor.move(0,n)),this.output.write(v.erase.down());const r=D.split(`
39
+ `).slice(n);this.output.write(r.join(`
40
+ `)),this._prevFrame=D;return}this.output.write(v.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}},s(Cu,"x"),Cu);const JD=class JD extends $t{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(D){super(D,!1),this.value=!!D.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",e=>{this.output.write(v.cursor.move(0,-1)),this.value=e,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};s(JD,"xD");let AD=JD;var Bi=Object.defineProperty,bi=s((u,D,e)=>D in u?Bi(u,D,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[D]=e,"wD"),vt=s((u,D,e)=>(bi(u,typeof D!="symbol"?D+"":D,e),e),"Z");let yi=(fu=class extends $t{constructor(D){super(D,!1),vt(this,"options"),vt(this,"cursor",0),this.options=D.options,this.cursor=this.options.findIndex(({value:e})=>e===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",e=>{switch(e){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}},s(fu,"yD"),fu);const Ai=globalThis.process.platform.startsWith("win");function wi({input:u=De,output:D=ee,overwrite:e=!0,hideCursor:n=!0}={}){const r=pu.createInterface({input:u,output:D,prompt:"",tabSize:1});pu.emitKeypressEvents(u,r),u.isTTY&&u.setRawMode(!0);const o=s((t,{name:i})=>{if(String(t)===""&&process.exit(0),!e)return;let a=i==="return"?0:-1,l=i==="return"?-1:0;pu.moveCursor(D,a,l,()=>{pu.clearLine(D,1,()=>{u.once("keypress",o)})})},"C");return n&&process.stdout.write(v.cursor.hide),u.once("keypress",o),()=>{u.off("keypress",o),n&&process.stdout.write(v.cursor.show),u.isTTY&&!Ai&&u.setRawMode(!1),r.terminal=!1,r.close()}}s(wi,"WD");function $i(){return y.platform!=="win32"?y.env.TERM!=="linux":!!y.env.CI||!!y.env.WT_SESSION||!!y.env.TERMINUS_SUBLIME||y.env.ConEmuTask==="{cmd::Cmder}"||y.env.TERM_PROGRAM==="Terminus-Sublime"||y.env.TERM_PROGRAM==="vscode"||y.env.TERM==="xterm-256color"||y.env.TERM==="alacritty"||y.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}s($i,"q");const wD=$i(),R=s((u,D)=>wD?u:D,"o"),vi=R("\u25C6","*"),xt=R("\u25A0","x"),St=R("\u25B2","x"),Ot=R("\u25C7","o"),xi=R("\u250C","T"),I=R("\u2502","|"),$D=R("\u2514","\u2014"),vD=R("\u25CF",">"),xD=R("\u25CB"," "),Tt=s(u=>{switch(u){case"initial":case"active":return p.cyan(vi);case"cancel":return p.red(xt);case"error":return p.yellow(St);case"submit":return p.green(Ot)}},"y"),Si=s(u=>{const D=u.active??"Yes",e=u.inactive??"No";return new AD({active:D,inactive:e,initialValue:u.initialValue??!0,render(){const n=`${p.gray(I)}
41
+ ${Tt(this.state)} ${u.message}
42
+ `,r=this.value?D:e;switch(this.state){case"submit":return`${n}${p.gray(I)} ${p.dim(r)}`;case"cancel":return`${n}${p.gray(I)} ${p.strikethrough(p.dim(r))}
43
+ ${p.gray(I)}`;default:return`${n}${p.cyan(I)} ${this.value?`${p.green(vD)} ${D}`:`${p.dim(xD)} ${p.dim(D)}`} ${p.dim("/")} ${this.value?`${p.dim(xD)} ${p.dim(e)}`:`${p.green(vD)} ${e}`}
44
+ ${p.cyan($D)}
45
+ `}}}).prompt()},"se"),Oi=s(u=>{const D=s((n,r)=>{const o=n.label??String(n.value);return r==="active"?`${p.green(vD)} ${o} ${n.hint?p.dim(`(${n.hint})`):""}`:r==="selected"?`${p.dim(o)}`:r==="cancelled"?`${p.strikethrough(p.dim(o))}`:`${p.dim(xD)} ${p.dim(o)}`},"n");let e=0;return new yi({options:u.options,initialValue:u.initialValue,render(){const n=`${p.gray(I)}
46
+ ${Tt(this.state)} ${u.message}
47
+ `;switch(this.state){case"submit":return`${n}${p.gray(I)} ${D(this.options[this.cursor],"selected")}`;case"cancel":return`${n}${p.gray(I)} ${D(this.options[this.cursor],"cancelled")}
48
+ ${p.gray(I)}`;default:{const r=u.maxItems===void 0?1/0:Math.max(u.maxItems,5);this.cursor>=e+r-3?e=Math.max(Math.min(this.cursor-r+3,this.options.length-r),0):this.cursor<e+2&&(e=Math.max(this.cursor-2,0));const o=r<this.options.length&&e>0,t=r<this.options.length&&e+r<this.options.length;return`${n}${p.cyan(I)} ${this.options.slice(e,e+r).map((i,a,l)=>a===0&&o||a===l.length-1&&t?p.dim("..."):D(i,a+e===this.cursor?"active":"inactive")).join(`
49
+ ${p.cyan(I)} `)}
50
+ ${p.cyan($D)}
51
+ `}}}}).prompt()},"ie"),It=s((u="")=>{process.stdout.write(`${p.gray(xi)} ${u}
52
+ `)},"oe"),W=s((u="")=>{process.stdout.write(`${p.gray(I)}
53
+ ${p.gray($D)} ${u}
54
54
 
55
- `)},yD=()=>{const u=mD?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],D=mD?80:120;let t,e,r=!1,o="";const n=(F="")=>{r=!0,t=di(),o=F.replace(/\.+$/,""),process.stdout.write(`${E.gray(T)}
56
- `);let a=0,l=0;e=setInterval(()=>{const C=E.magenta(u[a]),f=".".repeat(Math.floor(l)).slice(0,3);process.stdout.write($.cursor.move(-999,0)),process.stdout.write($.erase.down(1)),process.stdout.write(`${C} ${o}${f}`),a=a+1<u.length?a+1:0,l=l<u.length?l+.125:0},D)},s=(F="",a=0)=>{o=F??o,r=!1,clearInterval(e);const l=a===0?E.green(gt):a===1?E.red(ht):E.red(mt);process.stdout.write($.cursor.move(-999,0)),process.stdout.write($.erase.down(1)),process.stdout.write(`${l} ${o}
57
- `),t()},i=(F="")=>{o=F??o},c=F=>{const a=F>1?"Something went wrong":"Canceled";r&&s(a,F)};return process.on("uncaughtExceptionMonitor",()=>c(2)),process.on("unhandledRejection",()=>c(2)),process.on("SIGINT",()=>c(1)),process.on("SIGTERM",()=>c(1)),process.on("exit",c),{start:n,stop:s,message:i}};class S extends Error{}const AD=" ",vu=u=>{u instanceof Error&&!(u instanceof S)&&(u.stack&&console.error(lD(u.stack.split(`
55
+ `)},"$e"),SD=s(()=>{const u=wD?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],D=wD?80:120;let e,n,r=!1,o="";const t=s((C="")=>{r=!0,e=wi(),o=C.replace(/\.+$/,""),process.stdout.write(`${p.gray(I)}
56
+ `);let c=0,F=0;n=setInterval(()=>{const f=p.magenta(u[c]),d=".".repeat(Math.floor(F)).slice(0,3);process.stdout.write(v.cursor.move(-999,0)),process.stdout.write(v.erase.down(1)),process.stdout.write(`${f} ${o}${d}`),c=c+1<u.length?c+1:0,F=F<u.length?F+.125:0},D)},"l"),i=s((C="",c=0)=>{o=C??o,r=!1,clearInterval(n);const F=c===0?p.green(Ot):c===1?p.red(xt):p.red(St);process.stdout.write(v.cursor.move(-999,0)),process.stdout.write(v.erase.down(1)),process.stdout.write(`${F} ${o}
57
+ `),e()},"u"),a=s((C="")=>{o=C??o},"m"),l=s(C=>{const c=C>1?"Something went wrong":"Canceled";r&&i(c,C)},"$");return process.on("uncaughtExceptionMonitor",()=>l(2)),process.on("unhandledRejection",()=>l(2)),process.on("SIGINT",()=>l(1)),process.on("SIGTERM",()=>l(1)),process.on("exit",l),{start:t,stop:i,message:a}},"de"),ZD=class ZD extends Error{};s(ZD,"KnownError");let S=ZD;const OD=" ",Iu=s(u=>{u instanceof Error&&!(u instanceof S)&&(u.stack&&console.error(ED(u.stack.split(`
58
58
  `).slice(1).join(`
59
59
  `))),console.error(`
60
- ${AD}${lD(`aicommit v${ge}`)}`),console.error(`
61
- ${AD}Please open a Bug report with the information above:`),console.error(`${AD}https://github.com/NegoZiatoR/ai-commit/issues/new/choose`))},yt=async()=>{const{stdout:u,failed:D}=await J("git",["rev-parse","--show-toplevel"],{reject:!1});if(D)throw new S("The current directory must be a Git repository!");return u},wD=u=>`:(exclude)${u}`,At=["package-lock.json","*.lock"].map(wD),wt=async u=>{const D=["diff","--cached","--diff-algorithm=minimal"],{stdout:t}=await J("git",[...D,"--name-only",...At,...u?u.map(wD):[]]);if(!t)return;const{stdout:e}=await J("git",[...D,...At,...u?u.map(wD):[]]);return{files:t.split(`
62
- `),diff:e}},Bi=u=>`Detected ${u.length.toLocaleString()} staged file${u.length>1?"s":""}`,{hasOwnProperty:$D}=Object.prototype,vD=(u,D={})=>{typeof D=="string"&&(D={section:D}),D.align=D.align===!0,D.newline=D.newline===!0,D.sort=D.sort===!0,D.whitespace=D.whitespace===!0||D.align===!0,D.platform=D.platform||typeof process<"u"&&process.platform,D.bracketedArray=D.bracketedArray!==!1;const t=D.platform==="win32"?`\r
60
+ ${OD}${ED(`aicommit v${Te}`)}`),console.error(`
61
+ ${OD}Please open a Bug report with the information above:`),console.error(`${OD}https://github.com/NegoZiatoR/ai-commit/issues/new/choose`))},"handleCliError"),Pt=s(async()=>{const{stdout:u,failed:D}=await Z("git",["rev-parse","--show-toplevel"],{reject:!1});if(D)throw new S("The current directory must be a Git repository!");return u},"assertGitRepo"),TD=s(u=>`:(exclude)${u}`,"excludeFromDiff"),kt=["package-lock.json","*.lock"].map(TD),_t=s(async u=>{const D=["diff","--cached","--diff-algorithm=minimal"],{stdout:e}=await Z("git",[...D,"--name-only",...kt,...u?u.map(TD):[]]);if(!e)return;const{stdout:n}=await Z("git",[...D,...kt,...u?u.map(TD):[]]);return{files:e.split(`
62
+ `),diff:n}},"getStagedDiff"),Ti=s(u=>`Detected ${u.length.toLocaleString()} staged file${u.length>1?"s":""}`,"getDetectedMessage"),{hasOwnProperty:ID}=Object.prototype,PD=s((u,D={})=>{typeof D=="string"&&(D={section:D}),D.align=D.align===!0,D.newline=D.newline===!0,D.sort=D.sort===!0,D.whitespace=D.whitespace===!0||D.align===!0,D.platform=D.platform||typeof process<"u"&&process.platform,D.bracketedArray=D.bracketedArray!==!1;const e=D.platform==="win32"?`\r
63
63
  `:`
64
- `,e=D.whitespace?" = ":"=",r=[],o=D.sort?Object.keys(u).sort():Object.keys(u);let n=0;D.align&&(n=R(o.filter(c=>u[c]===null||Array.isArray(u[c])||typeof u[c]!="object").map(c=>Array.isArray(u[c])?`${c}[]`:c).concat([""]).reduce((c,F)=>R(c).length>=R(F).length?c:F)).length);let s="";const i=D.bracketedArray?"[]":"";for(const c of o){const F=u[c];if(F&&Array.isArray(F))for(const a of F)s+=R(`${c}${i}`).padEnd(n," ")+e+R(a)+t;else F&&typeof F=="object"?r.push(c):s+=R(c).padEnd(n," ")+e+R(F)+t}D.section&&s.length&&(s="["+R(D.section)+"]"+(D.newline?t+t:t)+s);for(const c of r){const F=$t(c,".").join("\\."),a=(D.section?D.section+".":"")+F,l=vD(u[c],{...D,section:a});s.length&&l.length&&(s+=t),s+=l}return s};function $t(u,D){var t=0,e=0,r=0,o=[];do if(r=u.indexOf(D,t),r!==-1){if(t=r+D.length,r>0&&u[r-1]==="\\")continue;o.push(u.slice(e,r)),e=r+D.length}while(r!==-1);return o.push(u.slice(e)),o}const vt=(u,D={})=>{D.bracketedArray=D.bracketedArray!==!1;const t=Object.create(null);let e=t,r=null;const o=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,n=u.split(/[\r\n]+/g),s={};for(const c of n){if(!c||c.match(/^\s*[;#]/)||c.match(/^\s*$/))continue;const F=c.match(o);if(!F)continue;if(F[1]!==void 0){if(r=xu(F[1]),r==="__proto__"){e=Object.create(null);continue}e=t[r]=t[r]||Object.create(null);continue}const a=xu(F[2]);let l;D.bracketedArray?l=a.length>2&&a.slice(-2)==="[]":(s[a]=(s?.[a]||0)+1,l=s[a]>1);const C=l?a.slice(0,-2):a;if(C==="__proto__")continue;const f=F[3]?xu(F[4]):!0,d=f==="true"||f==="false"||f==="null"?JSON.parse(f):f;l&&($D.call(e,C)?Array.isArray(e[C])||(e[C]=[e[C]]):e[C]=[]),Array.isArray(e[C])?e[C].push(d):e[C]=d}const i=[];for(const c of Object.keys(t)){if(!$D.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;const F=$t(c,".");e=t;const a=F.pop(),l=a.replace(/\\\./g,".");for(const C of F)C!=="__proto__"&&((!$D.call(e,C)||typeof e[C]!="object")&&(e[C]=Object.create(null)),e=e[C]);e===t&&l===a||(e[l]=t[c],i.push(c))}for(const c of i)delete t[c];return t},xt=u=>u.startsWith('"')&&u.endsWith('"')||u.startsWith("'")&&u.endsWith("'"),R=u=>typeof u!="string"||u.match(/[=\r\n]/)||u.match(/^\[/)||u.length>1&&xt(u)||u!==u.trim()?JSON.stringify(u):u.split(";").join("\\;").split("#").join("\\#"),xu=u=>{if(u=(u||"").trim(),xt(u)){u.charAt(0)==="'"&&(u=u.slice(1,-1));try{u=JSON.parse(u)}catch{}}else{let D=!1,t="";for(let e=0,r=u.length;e<r;e++){const o=u.charAt(e);if(D)"\\;#".indexOf(o)!==-1?t+=o:t+="\\"+o,D=!1;else{if(";#".indexOf(o)!==-1)break;o==="\\"?D=!0:t+=o}}return D&&(t+="\\"),t.trim()}return u};var bi={parse:vt,decode:vt,stringify:vD,encode:vD,safe:R,unsafe:xu},St=H(bi);const Ot=u=>O.lstat(u).then(()=>!0,()=>!1),yi=["","conventional"],{hasOwnProperty:Ai}=Object.prototype,Tt=(u,D)=>Ai.call(u,D),v=(u,D,t)=>{if(!D)throw new S(`Invalid config property ${u}: ${t}`)},Su={OPENAI_KEY(u){if(!u)throw new S("Please set your OpenAI API key via `aicommit config set OPENAI_KEY=<your token>`");return v("OPENAI_KEY",u.startsWith("sk-"),'Must start with "sk-"'),u},locale(u){return u?(v("locale",u,"Cannot be empty"),v("locale",/^[a-z-]+$/i.test(u),"Must be a valid locale (letters and dashes/underscores). You can consult the list of codes in: https://wikipedia.org/wiki/List_of_ISO_639-1_codes"),u):"en"},generate(u){if(!u)return 1;v("generate",/^\d+$/.test(u),"Must be an integer");const D=Number(u);return v("generate",D>0,"Must be greater than 0"),v("generate",D<=5,"Must be less or equal to 5"),D},type(u){return u?(v("type",yi.includes(u),"Invalid commit type"),u):""},proxy(u){if(!(!u||u.length===0))return v("proxy",/^https?:\/\//.test(u),"Must be a valid URL"),u},model(u){return!u||u.length===0?"gpt-3.5-turbo":u},timeout(u){if(!u)return 1e4;v("timeout",/^\d+$/.test(u),"Must be an integer");const D=Number(u);return v("timeout",D>=500,"Must be greater than 500ms"),D},temperature(u){if(!u)return .2;v("temperature",/^(2|\d)(\.\d{1,2})?$/.test(u),"Must be decimal between 0 and 2");const D=Number(u);return v("temperature",D>0,"Must be greater than 0"),v("temperature",D<=2,"Must be less than or equal to 2"),D},"max-length"(u){if(!u)return 50;v("max-length",/^\d+$/.test(u),"Must be an integer");const D=Number(u);return v("max-length",D>=20,"Must be greater than 20 characters"),D},"auto-confirm"(u){return u?typeof u=="boolean"?u:(v("auto-confirm",/^(?:true|false)$/.test(u),"Must be a boolean"),u==="true"):!1},"prepend-reference"(u){return u?typeof u=="boolean"?u:(v("prepend-reference",/^(?:true|false)$/.test(u),"Must be a boolean"),u==="true"):!1}},xD=q.join(XD.homedir(),".aicommit"),Pt=async()=>{if(!await Ot(xD))return Object.create(null);const D=await O.readFile(xD,"utf8");return St.parse(D)},SD=async(u,D)=>{const t=await Pt(),e={};for(const r of Object.keys(Su)){const o=Su[r],n=u?.[r]??t[r];if(D)try{e[r]=o(n)}catch{}else e[r]=o(n)}return e},wi=async u=>{const D=await Pt();for(const[t,e]of u){if(!Tt(Su,t))throw new S(`Invalid config property: ${t}`);const r=Su[t](e);D[t]=r}await O.writeFile(xD,St.stringify(D),"utf8")};var OD={},TD={exports:{}},Ou={exports:{}},PD,It;function $i(){if(It)return PD;It=1;var u=1e3,D=u*60,t=D*60,e=t*24,r=e*7,o=e*365.25;PD=function(F,a){a=a||{};var l=typeof F;if(l==="string"&&F.length>0)return n(F);if(l==="number"&&isFinite(F))return a.long?i(F):s(F);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(F))};function n(F){if(F=String(F),!(F.length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(F);if(a){var l=parseFloat(a[1]),C=(a[2]||"ms").toLowerCase();switch(C){case"years":case"year":case"yrs":case"yr":case"y":return l*o;case"weeks":case"week":case"w":return l*r;case"days":case"day":case"d":return l*e;case"hours":case"hour":case"hrs":case"hr":case"h":return l*t;case"minutes":case"minute":case"mins":case"min":case"m":return l*D;case"seconds":case"second":case"secs":case"sec":case"s":return l*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function s(F){var a=Math.abs(F);return a>=e?Math.round(F/e)+"d":a>=t?Math.round(F/t)+"h":a>=D?Math.round(F/D)+"m":a>=u?Math.round(F/u)+"s":F+"ms"}function i(F){var a=Math.abs(F);return a>=e?c(F,a,e,"day"):a>=t?c(F,a,t,"hour"):a>=D?c(F,a,D,"minute"):a>=u?c(F,a,u,"second"):F+" ms"}function c(F,a,l,C){var f=a>=l*1.5;return Math.round(F/l)+" "+C+(f?"s":"")}return PD}var ID,_t;function kt(){if(_t)return ID;_t=1;function u(D){e.debug=e,e.default=e,e.coerce=c,e.disable=n,e.enable=o,e.enabled=s,e.humanize=$i(),e.destroy=F,Object.keys(D).forEach(a=>{e[a]=D[a]}),e.names=[],e.skips=[],e.formatters={};function t(a){let l=0;for(let C=0;C<a.length;C++)l=(l<<5)-l+a.charCodeAt(C),l|=0;return e.colors[Math.abs(l)%e.colors.length]}e.selectColor=t;function e(a){let l,C=null,f,d;function p(...h){if(!p.enabled)return;const A=p,P=Number(new Date),lu=P-(l||P);A.diff=lu,A.prev=l,A.curr=P,l=P,h[0]=e.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");let M=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,(U,Jt)=>{if(U==="%%")return"%";M++;const UD=e.formatters[Jt];if(typeof UD=="function"){const Zt=h[M];U=UD.call(A,Zt),h.splice(M,1),M--}return U}),e.formatArgs.call(A,h),(A.log||e.log).apply(A,h)}return p.namespace=a,p.useColors=e.useColors(),p.color=e.selectColor(a),p.extend=r,p.destroy=e.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>C!==null?C:(f!==e.namespaces&&(f=e.namespaces,d=e.enabled(a)),d),set:h=>{C=h}}),typeof e.init=="function"&&e.init(p),p}function r(a,l){const C=e(this.namespace+(typeof l>"u"?":":l)+a);return C.log=this.log,C}function o(a){e.save(a),e.namespaces=a,e.names=[],e.skips=[];let l;const C=(typeof a=="string"?a:"").split(/[\s,]+/),f=C.length;for(l=0;l<f;l++)C[l]&&(a=C[l].replace(/\*/g,".*?"),a[0]==="-"?e.skips.push(new RegExp("^"+a.slice(1)+"$")):e.names.push(new RegExp("^"+a+"$")))}function n(){const a=[...e.names.map(i),...e.skips.map(i).map(l=>"-"+l)].join(",");return e.enable(""),a}function s(a){if(a[a.length-1]==="*")return!0;let l,C;for(l=0,C=e.skips.length;l<C;l++)if(e.skips[l].test(a))return!1;for(l=0,C=e.names.length;l<C;l++)if(e.names[l].test(a))return!0;return!1}function i(a){return a.toString().substring(2,a.toString().length-2).replace(/\.\*\?$/,"*")}function c(a){return a instanceof Error?a.stack||a.message:a}function F(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return e.enable(e.load()),e}return ID=u,ID}var Rt;function vi(){return Rt||(Rt=1,function(u,D){D.formatArgs=e,D.save=r,D.load=o,D.useColors=t,D.storage=n(),D.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),D.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function e(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+u.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;i.splice(1,0,c,"color: inherit");let F=0,a=0;i[0].replace(/%[a-zA-Z%]/g,l=>{l!=="%%"&&(F++,l==="%c"&&(a=F))}),i.splice(a,0,c)}D.log=console.debug||console.log||(()=>{});function r(i){try{i?D.storage.setItem("debug",i):D.storage.removeItem("debug")}catch{}}function o(){let i;try{i=D.storage.getItem("debug")}catch{}return!i&&typeof process<"u"&&"env"in process&&(i=process.env.DEBUG),i}function n(){try{return localStorage}catch{}}u.exports=kt()(D);const{formatters:s}=u.exports;s.j=function(i){try{return JSON.stringify(i)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}}(Ou,Ou.exports)),Ou.exports}var Tu={exports:{}},_D,Mt;function xi(){return Mt||(Mt=1,_D=(u,D=process.argv)=>{const t=u.startsWith("-")?"":u.length===1?"-":"--",e=D.indexOf(t+u),r=D.indexOf("--");return e!==-1&&(r===-1||e<r)}),_D}var kD,jt;function Si(){if(jt)return kD;jt=1;const u=XD,D=Fu,t=xi(),{env:e}=process;let r;t("no-color")||t("no-colors")||t("color=false")||t("color=never")?r=0:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(r=1),"FORCE_COLOR"in e&&(e.FORCE_COLOR==="true"?r=1:e.FORCE_COLOR==="false"?r=0:r=e.FORCE_COLOR.length===0?1:Math.min(parseInt(e.FORCE_COLOR,10),3));function o(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function n(i,c){if(r===0)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(i&&!c&&r===void 0)return 0;const F=r||0;if(e.TERM==="dumb")return F;if(process.platform==="win32"){const a=u.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in e)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(a=>a in e)||e.CI_NAME==="codeship"?1:F;if("TEAMCITY_VERSION"in e)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(e.TEAMCITY_VERSION)?1:0;if(e.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in e){const a=parseInt((e.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(e.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(e.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(e.TERM)||"COLORTERM"in e?1:F}function s(i){const c=n(i,i&&i.isTTY);return o(c)}return kD={supportsColor:s,stdout:o(n(!0,D.isatty(1))),stderr:o(n(!0,D.isatty(2)))},kD}var Nt;function Oi(){return Nt||(Nt=1,function(u,D){const t=Fu,e=JD;D.init=F,D.log=s,D.formatArgs=o,D.save=i,D.load=c,D.useColors=r,D.destroy=e.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),D.colors=[6,2,3,4,5,1];try{const l=Si();l&&(l.stderr||l).level>=2&&(D.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}D.inspectOpts=Object.keys(process.env).filter(l=>/^debug_/i.test(l)).reduce((l,C)=>{const f=C.substring(6).toLowerCase().replace(/_([a-z])/g,(p,h)=>h.toUpperCase());let d=process.env[C];return/^(yes|on|true|enabled)$/i.test(d)?d=!0:/^(no|off|false|disabled)$/i.test(d)?d=!1:d==="null"?d=null:d=Number(d),l[f]=d,l},{});function r(){return"colors"in D.inspectOpts?!!D.inspectOpts.colors:t.isatty(process.stderr.fd)}function o(l){const{namespace:C,useColors:f}=this;if(f){const d=this.color,p="\x1B[3"+(d<8?d:"8;5;"+d),h=` ${p};1m${C} \x1B[0m`;l[0]=h+l[0].split(`
64
+ `,n=D.whitespace?" = ":"=",r=[],o=D.sort?Object.keys(u).sort():Object.keys(u);let t=0;D.align&&(t=M(o.filter(l=>u[l]===null||Array.isArray(u[l])||typeof u[l]!="object").map(l=>Array.isArray(u[l])?`${l}[]`:l).concat([""]).reduce((l,C)=>M(l).length>=M(C).length?l:C)).length);let i="";const a=D.bracketedArray?"[]":"";for(const l of o){const C=u[l];if(C&&Array.isArray(C))for(const c of C)i+=M(`${l}${a}`).padEnd(t," ")+n+M(c)+e;else C&&typeof C=="object"?r.push(l):i+=M(l).padEnd(t," ")+n+M(C)+e}D.section&&i.length&&(i="["+M(D.section)+"]"+(D.newline?e+e:e)+i);for(const l of r){const C=Rt(l,".").join("\\."),c=(D.section?D.section+".":"")+C,F=PD(u[l],{...D,section:c});i.length&&F.length&&(i+=e),i+=F}return i},"encode");function Rt(u,D){var e=0,n=0,r=0,o=[];do if(r=u.indexOf(D,e),r!==-1){if(e=r+D.length,r>0&&u[r-1]==="\\")continue;o.push(u.slice(n,r)),n=r+D.length}while(r!==-1);return o.push(u.slice(n)),o}s(Rt,"splitSections");const Mt=s((u,D={})=>{D.bracketedArray=D.bracketedArray!==!1;const e=Object.create(null);let n=e,r=null;const o=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,t=u.split(/[\r\n]+/g),i={};for(const l of t){if(!l||l.match(/^\s*[;#]/)||l.match(/^\s*$/))continue;const C=l.match(o);if(!C)continue;if(C[1]!==void 0){if(r=Pu(C[1]),r==="__proto__"){n=Object.create(null);continue}n=e[r]=e[r]||Object.create(null);continue}const c=Pu(C[2]);let F;D.bracketedArray?F=c.length>2&&c.slice(-2)==="[]":(i[c]=(i?.[c]||0)+1,F=i[c]>1);const f=F&&c.endsWith("[]")?c.slice(0,-2):c;if(f==="__proto__")continue;const d=C[3]?Pu(C[4]):!0,E=d==="true"||d==="false"||d==="null"?JSON.parse(d):d;F&&(ID.call(n,f)?Array.isArray(n[f])||(n[f]=[n[f]]):n[f]=[]),Array.isArray(n[f])?n[f].push(E):n[f]=E}const a=[];for(const l of Object.keys(e)){if(!ID.call(e,l)||typeof e[l]!="object"||Array.isArray(e[l]))continue;const C=Rt(l,".");n=e;const c=C.pop(),F=c.replace(/\\\./g,".");for(const f of C)f!=="__proto__"&&((!ID.call(n,f)||typeof n[f]!="object")&&(n[f]=Object.create(null)),n=n[f]);n===e&&F===c||(n[F]=e[l],a.push(l))}for(const l of a)delete e[l];return e},"decode"),jt=s(u=>u.startsWith('"')&&u.endsWith('"')||u.startsWith("'")&&u.endsWith("'"),"isQuoted"),M=s(u=>typeof u!="string"||u.match(/[=\r\n]/)||u.match(/^\[/)||u.length>1&&jt(u)||u!==u.trim()?JSON.stringify(u):u.split(";").join("\\;").split("#").join("\\#"),"safe"),Pu=s(u=>{if(u=(u||"").trim(),jt(u)){u.charAt(0)==="'"&&(u=u.slice(1,-1));try{u=JSON.parse(u)}catch{}}else{let D=!1,e="";for(let n=0,r=u.length;n<r;n++){const o=u.charAt(n);if(D)"\\;#".indexOf(o)!==-1?e+=o:e+="\\"+o,D=!1;else{if(";#".indexOf(o)!==-1)break;o==="\\"?D=!0:e+=o}}return D&&(e+="\\"),e.trim()}return u},"unsafe");var Ii={parse:Mt,decode:Mt,stringify:PD,encode:PD,safe:M,unsafe:Pu},Nt=H(Ii);const Lt=s(u=>T.lstat(u).then(()=>!0,()=>!1),"fileExists"),Pi=["","conventional"],{hasOwnProperty:ki}=Object.prototype,Gt=s((u,D)=>ki.call(u,D),"hasOwn"),x=s((u,D,e)=>{if(!D)throw new S(`Invalid config property ${u}: ${e}`)},"parseAssert"),ku={OPENAI_KEY(u){if(!u)throw new S("Please set your OpenAI API key via `aicommit config set OPENAI_KEY=<your token>`");return x("OPENAI_KEY",u.startsWith("sk-"),'Must start with "sk-"'),u},locale(u){return u?(x("locale",u,"Cannot be empty"),x("locale",/^[a-z-]+$/i.test(u),"Must be a valid locale (letters and dashes/underscores). You can consult the list of codes in: https://wikipedia.org/wiki/List_of_ISO_639-1_codes"),u):"en"},generate(u){if(!u)return 1;x("generate",/^\d+$/.test(u),"Must be an integer");const D=Number(u);return x("generate",D>0,"Must be greater than 0"),x("generate",D<=5,"Must be less or equal to 5"),D},type(u){return u?(x("type",Pi.includes(u),"Invalid commit type"),u):""},proxy(u){if(!(!u||u.length===0))return x("proxy",/^https?:\/\//.test(u),"Must be a valid URL"),u},model(u){return!u||u.length===0?"gpt-3.5-turbo":u},timeout(u){if(!u)return 1e4;x("timeout",/^\d+$/.test(u),"Must be an integer");const D=Number(u);return x("timeout",D>=500,"Must be greater than 500ms"),D},temperature(u){if(!u)return .2;x("temperature",/^(2|\d)(\.\d{1,2})?$/.test(u),"Must be decimal between 0 and 2");const D=Number(u);return x("temperature",D>0,"Must be greater than 0"),x("temperature",D<=2,"Must be less than or equal to 2"),D},"max-length"(u){if(!u)return 50;x("max-length",/^\d+$/.test(u),"Must be an integer");const D=Number(u);return x("max-length",D>=20,"Must be greater than 20 characters"),D},"auto-confirm"(u){return u?typeof u=="boolean"?u:(x("auto-confirm",/^(?:true|false)$/.test(u),"Must be a boolean"),u==="true"):!1},"prepend-reference"(u){return u?typeof u=="boolean"?u:(x("prepend-reference",/^(?:true|false)$/.test(u),"Must be a boolean"),u==="true"):!1}},kD=z.join(ae.homedir(),".aicommit"),Wt=s(async()=>{if(!await Lt(kD))return Object.create(null);const D=await T.readFile(kD,"utf8");return Nt.parse(D)},"readConfigFile"),_D=s(async(u,D)=>{const e=await Wt(),n={};for(const r of Object.keys(ku)){const o=ku[r],t=u?.[r]??e[r];if(D)try{n[r]=o(t)}catch{}else n[r]=o(t)}return n},"getConfig"),_i=s(async u=>{const D=await Wt();for(const[e,n]of u){if(!Gt(ku,e))throw new S(`Invalid config property: ${e}`);const r=ku[e](n);D[e]=r}await T.writeFile(kD,Nt.stringify(D),"utf8")},"setConfigs");var RD={},MD={exports:{}},_u={exports:{}},jD,Ut;function Ri(){if(Ut)return jD;Ut=1;var u=1e3,D=u*60,e=D*60,n=e*24,r=n*7,o=n*365.25;jD=s(function(C,c){c=c||{};var F=typeof C;if(F==="string"&&C.length>0)return t(C);if(F==="number"&&isFinite(C))return c.long?a(C):i(C);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(C))},"ms");function t(C){if(C=String(C),!(C.length>100)){var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(C);if(c){var F=parseFloat(c[1]),f=(c[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return F*o;case"weeks":case"week":case"w":return F*r;case"days":case"day":case"d":return F*n;case"hours":case"hour":case"hrs":case"hr":case"h":return F*e;case"minutes":case"minute":case"mins":case"min":case"m":return F*D;case"seconds":case"second":case"secs":case"sec":case"s":return F*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return F;default:return}}}}s(t,"parse");function i(C){var c=Math.abs(C);return c>=n?Math.round(C/n)+"d":c>=e?Math.round(C/e)+"h":c>=D?Math.round(C/D)+"m":c>=u?Math.round(C/u)+"s":C+"ms"}s(i,"fmtShort");function a(C){var c=Math.abs(C);return c>=n?l(C,c,n,"day"):c>=e?l(C,c,e,"hour"):c>=D?l(C,c,D,"minute"):c>=u?l(C,c,u,"second"):C+" ms"}s(a,"fmtLong");function l(C,c,F,f){var d=c>=F*1.5;return Math.round(C/F)+" "+f+(d?"s":"")}return s(l,"plural"),jD}s(Ri,"requireMs");var ND,qt;function zt(){if(qt)return ND;qt=1;function u(D){n.debug=n,n.default=n,n.coerce=l,n.disable=t,n.enable=o,n.enabled=i,n.humanize=Ri(),n.destroy=C,Object.keys(D).forEach(c=>{n[c]=D[c]}),n.names=[],n.skips=[],n.formatters={};function e(c){let F=0;for(let f=0;f<c.length;f++)F=(F<<5)-F+c.charCodeAt(f),F|=0;return n.colors[Math.abs(F)%n.colors.length]}s(e,"selectColor"),n.selectColor=e;function n(c){let F,f=null,d,E;function h(...m){if(!h.enabled)return;const w=h,P=Number(new Date),du=P-(F||P);w.diff=du,w.prev=F,w.curr=P,F=P,m[0]=n.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let j=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(U,on)=>{if(U==="%%")return"%";j++;const QD=n.formatters[on];if(typeof QD=="function"){const sn=m[j];U=QD.call(w,sn),m.splice(j,1),j--}return U}),n.formatArgs.call(w,m),(w.log||n.log).apply(w,m)}return s(h,"debug"),h.namespace=c,h.useColors=n.useColors(),h.color=n.selectColor(c),h.extend=r,h.destroy=n.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(d!==n.namespaces&&(d=n.namespaces,E=n.enabled(c)),E),set:m=>{f=m}}),typeof n.init=="function"&&n.init(h),h}s(n,"createDebug");function r(c,F){const f=n(this.namespace+(typeof F>"u"?":":F)+c);return f.log=this.log,f}s(r,"extend");function o(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let F;const f=(typeof c=="string"?c:"").split(/[\s,]+/),d=f.length;for(F=0;F<d;F++)f[F]&&(c=f[F].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}s(o,"enable");function t(){const c=[...n.names.map(a),...n.skips.map(a).map(F=>"-"+F)].join(",");return n.enable(""),c}s(t,"disable");function i(c){if(c[c.length-1]==="*")return!0;let F,f;for(F=0,f=n.skips.length;F<f;F++)if(n.skips[F].test(c))return!1;for(F=0,f=n.names.length;F<f;F++)if(n.names[F].test(c))return!0;return!1}s(i,"enabled");function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}s(a,"toNamespace");function l(c){return c instanceof Error?c.stack||c.message:c}s(l,"coerce");function C(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return s(C,"destroy"),n.enable(n.load()),n}return s(u,"setup"),ND=u,ND}s(zt,"requireCommon");var Ht;function Mi(){return Ht||(Ht=1,function(u,D){D.formatArgs=n,D.save=r,D.load=o,D.useColors=e,D.storage=t(),D.destroy=(()=>{let a=!1;return()=>{a||(a=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),D.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function e(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(e,"useColors");function n(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+u.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;a.splice(1,0,l,"color: inherit");let C=0,c=0;a[0].replace(/%[a-zA-Z%]/g,F=>{F!=="%%"&&(C++,F==="%c"&&(c=C))}),a.splice(c,0,l)}s(n,"formatArgs"),D.log=console.debug||console.log||(()=>{});function r(a){try{a?D.storage.setItem("debug",a):D.storage.removeItem("debug")}catch{}}s(r,"save");function o(){let a;try{a=D.storage.getItem("debug")}catch{}return!a&&typeof process<"u"&&"env"in process&&(a=process.env.DEBUG),a}s(o,"load");function t(){try{return localStorage}catch{}}s(t,"localstorage"),u.exports=zt()(D);const{formatters:i}=u.exports;i.j=function(a){try{return JSON.stringify(a)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}}(_u,_u.exports)),_u.exports}s(Mi,"requireBrowser");var Ru={exports:{}},LD,Kt;function ji(){return Kt||(Kt=1,LD=s((u,D=process.argv)=>{const e=u.startsWith("-")?"":u.length===1?"-":"--",n=D.indexOf(e+u),r=D.indexOf("--");return n!==-1&&(r===-1||n<r)},"hasFlag")),LD}s(ji,"requireHasFlag");var GD,Vt;function Ni(){if(Vt)return GD;Vt=1;const u=ae,D=Eu,e=ji(),{env:n}=process;let r;e("no-color")||e("no-colors")||e("color=false")||e("color=never")?r=0:(e("color")||e("colors")||e("color=true")||e("color=always"))&&(r=1),"FORCE_COLOR"in n&&(n.FORCE_COLOR==="true"?r=1:n.FORCE_COLOR==="false"?r=0:r=n.FORCE_COLOR.length===0?1:Math.min(parseInt(n.FORCE_COLOR,10),3));function o(a){return a===0?!1:{level:a,hasBasic:!0,has256:a>=2,has16m:a>=3}}s(o,"translateLevel");function t(a,l){if(r===0)return 0;if(e("color=16m")||e("color=full")||e("color=truecolor"))return 3;if(e("color=256"))return 2;if(a&&!l&&r===void 0)return 0;const C=r||0;if(n.TERM==="dumb")return C;if(process.platform==="win32"){const c=u.release().split(".");return Number(c[0])>=10&&Number(c[2])>=10586?Number(c[2])>=14931?3:2:1}if("CI"in n)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(c=>c in n)||n.CI_NAME==="codeship"?1:C;if("TEAMCITY_VERSION"in n)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(n.TEAMCITY_VERSION)?1:0;if(n.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in n){const c=parseInt((n.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(n.TERM_PROGRAM){case"iTerm.app":return c>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(n.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(n.TERM)||"COLORTERM"in n?1:C}s(t,"supportsColor");function i(a){const l=t(a,a&&a.isTTY);return o(l)}return s(i,"getSupportLevel"),GD={supportsColor:i,stdout:o(t(!0,D.isatty(1))),stderr:o(t(!0,D.isatty(2)))},GD}s(Ni,"requireSupportsColor");var Yt;function Li(){return Yt||(Yt=1,function(u,D){const e=Eu,n=se;D.init=C,D.log=i,D.formatArgs=o,D.save=a,D.load=l,D.useColors=r,D.destroy=n.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),D.colors=[6,2,3,4,5,1];try{const F=Ni();F&&(F.stderr||F).level>=2&&(D.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}D.inspectOpts=Object.keys(process.env).filter(F=>/^debug_/i.test(F)).reduce((F,f)=>{const d=f.substring(6).toLowerCase().replace(/_([a-z])/g,(h,m)=>m.toUpperCase());let E=process.env[f];return/^(yes|on|true|enabled)$/i.test(E)?E=!0:/^(no|off|false|disabled)$/i.test(E)?E=!1:E==="null"?E=null:E=Number(E),F[d]=E,F},{});function r(){return"colors"in D.inspectOpts?!!D.inspectOpts.colors:e.isatty(process.stderr.fd)}s(r,"useColors");function o(F){const{namespace:f,useColors:d}=this;if(d){const E=this.color,h="\x1B[3"+(E<8?E:"8;5;"+E),m=` ${h};1m${f} \x1B[0m`;F[0]=m+F[0].split(`
65
65
  `).join(`
66
- `+h),l.push(p+"m+"+u.exports.humanize(this.diff)+"\x1B[0m")}else l[0]=n()+C+" "+l[0]}function n(){return D.inspectOpts.hideDate?"":new Date().toISOString()+" "}function s(...l){return process.stderr.write(e.format(...l)+`
67
- `)}function i(l){l?process.env.DEBUG=l:delete process.env.DEBUG}function c(){return process.env.DEBUG}function F(l){l.inspectOpts={};const C=Object.keys(D.inspectOpts);for(let f=0;f<C.length;f++)l.inspectOpts[C[f]]=D.inspectOpts[C[f]]}u.exports=kt()(D);const{formatters:a}=u.exports;a.o=function(l){return this.inspectOpts.colors=this.useColors,e.inspect(l,this.inspectOpts).split(`
68
- `).map(C=>C.trim()).join(" ")},a.O=function(l){return this.inspectOpts.colors=this.useColors,e.inspect(l,this.inspectOpts)}}(Tu,Tu.exports)),Tu.exports}typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?TD.exports=vi():TD.exports=Oi();var RD=TD.exports,MD={};Object.defineProperty(MD,"__esModule",{value:!0});function Ti(u){return function(D,t){return new Promise((e,r)=>{u.call(this,D,t,(o,n)=>{o?r(o):e(n)})})}}MD.default=Ti;var Lt=y&&y.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};const Pi=YD,Ii=Lt(RD),_i=Lt(MD),iu=Ii.default("agent-base");function ki(u){return!!u&&typeof u.addRequest=="function"}function jD(){const{stack:u}=new Error;return typeof u!="string"?!1:u.split(`
69
- `).some(D=>D.indexOf("(https.js:")!==-1||D.indexOf("node:https:")!==-1)}function Pu(u,D){return new Pu.Agent(u,D)}(function(u){class D extends Pi.EventEmitter{constructor(e,r){super();let o=r;typeof e=="function"?this.callback=e:e&&(o=e),this.timeout=null,o&&typeof o.timeout=="number"&&(this.timeout=o.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:jD()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:jD()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,r,o){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,r){const o=Object.assign({},r);typeof o.secureEndpoint!="boolean"&&(o.secureEndpoint=jD()),o.host==null&&(o.host="localhost"),o.port==null&&(o.port=o.secureEndpoint?443:80),o.protocol==null&&(o.protocol=o.secureEndpoint?"https:":"http:"),o.host&&o.path&&delete o.path,delete o.agent,delete o.hostname,delete o._defaultAgent,delete o.defaultPort,delete o.createConnection,e._last=!0,e.shouldKeepAlive=!1;let n=!1,s=null;const i=o.timeout||this.timeout,c=C=>{e._hadError||(e.emit("error",C),e._hadError=!0)},F=()=>{s=null,n=!0;const C=new Error(`A "socket" was not created for HTTP request before ${i}ms`);C.code="ETIMEOUT",c(C)},a=C=>{n||(s!==null&&(clearTimeout(s),s=null),c(C))},l=C=>{if(n)return;if(s!=null&&(clearTimeout(s),s=null),ki(C)){iu("Callback returned another Agent instance %o",C.constructor.name),C.addRequest(e,o);return}if(C){C.once("free",()=>{this.freeSocket(C,o)}),e.onSocket(C);return}const f=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);c(f)};if(typeof this.callback!="function"){c(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(iu("Converting legacy callback function to promise"),this.promisifiedCallback=_i.default(this.callback)):this.promisifiedCallback=this.callback),typeof i=="number"&&i>0&&(s=setTimeout(F,i)),"port"in o&&typeof o.port!="number"&&(o.port=Number(o.port));try{iu("Resolving socket for %o request: %o",o.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,o)).then(l,a)}catch(C){Promise.reject(C).catch(a)}}freeSocket(e,r){iu("Freeing socket %o %o",e.constructor.name,r),e.destroy()}destroy(){iu("Destroying agent %o",this.constructor.name)}}u.Agent=D,u.prototype=u.Agent.prototype})(Pu||(Pu={}));var Ri=Pu,ND={},Mi=y&&y.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ND,"__esModule",{value:!0});const ji=Mi(RD),au=ji.default("https-proxy-agent:parse-proxy-response");function Ni(u){return new Promise((D,t)=>{let e=0;const r=[];function o(){const a=u.read();a?F(a):u.once("readable",o)}function n(){u.removeListener("end",i),u.removeListener("error",c),u.removeListener("close",s),u.removeListener("readable",o)}function s(a){au("onclose had error %o",a)}function i(){au("onend")}function c(a){n(),au("onerror %o",a),t(a)}function F(a){r.push(a),e+=a.length;const l=Buffer.concat(r,e);if(l.indexOf(`\r
66
+ `+m),F.push(h+"m+"+u.exports.humanize(this.diff)+"\x1B[0m")}else F[0]=t()+f+" "+F[0]}s(o,"formatArgs");function t(){return D.inspectOpts.hideDate?"":new Date().toISOString()+" "}s(t,"getDate");function i(...F){return process.stderr.write(n.formatWithOptions(D.inspectOpts,...F)+`
67
+ `)}s(i,"log");function a(F){F?process.env.DEBUG=F:delete process.env.DEBUG}s(a,"save");function l(){return process.env.DEBUG}s(l,"load");function C(F){F.inspectOpts={};const f=Object.keys(D.inspectOpts);for(let d=0;d<f.length;d++)F.inspectOpts[f[d]]=D.inspectOpts[f[d]]}s(C,"init"),u.exports=zt()(D);const{formatters:c}=u.exports;c.o=function(F){return this.inspectOpts.colors=this.useColors,n.inspect(F,this.inspectOpts).split(`
68
+ `).map(f=>f.trim()).join(" ")},c.O=function(F){return this.inspectOpts.colors=this.useColors,n.inspect(F,this.inspectOpts)}}(Ru,Ru.exports)),Ru.exports}s(Li,"requireNode"),typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?MD.exports=Mi():MD.exports=Li();var WD=MD.exports,UD={};Object.defineProperty(UD,"__esModule",{value:!0});function Gi(u){return function(D,e){return new Promise((n,r)=>{u.call(this,D,e,(o,t)=>{o?r(o):n(t)})})}}s(Gi,"promisify"),UD.default=Gi;var Jt=A&&A.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};const Wi=oe,Ui=Jt(WD),qi=Jt(UD),au=Ui.default("agent-base");function zi(u){return!!u&&typeof u.addRequest=="function"}s(zi,"isAgent");function qD(){const{stack:u}=new Error;return typeof u!="string"?!1:u.split(`
69
+ `).some(D=>D.indexOf("(https.js:")!==-1||D.indexOf("node:https:")!==-1)}s(qD,"isSecureEndpoint");function Mu(u,D){return new Mu.Agent(u,D)}s(Mu,"createAgent"),function(u){const e=class e extends Wi.EventEmitter{constructor(r,o){super();let t=o;typeof r=="function"?this.callback=r:r&&(t=r),this.timeout=null,t&&typeof t.timeout=="number"&&(this.timeout=t.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:qD()?443:80}set defaultPort(r){this.explicitDefaultPort=r}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:qD()?"https:":"http:"}set protocol(r){this.explicitProtocol=r}callback(r,o,t){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(r,o){const t=Object.assign({},o);typeof t.secureEndpoint!="boolean"&&(t.secureEndpoint=qD()),t.host==null&&(t.host="localhost"),t.port==null&&(t.port=t.secureEndpoint?443:80),t.protocol==null&&(t.protocol=t.secureEndpoint?"https:":"http:"),t.host&&t.path&&delete t.path,delete t.agent,delete t.hostname,delete t._defaultAgent,delete t.defaultPort,delete t.createConnection,r._last=!0,r.shouldKeepAlive=!1;let i=!1,a=null;const l=t.timeout||this.timeout,C=s(d=>{r._hadError||(r.emit("error",d),r._hadError=!0)},"onerror"),c=s(()=>{a=null,i=!0;const d=new Error(`A "socket" was not created for HTTP request before ${l}ms`);d.code="ETIMEOUT",C(d)},"ontimeout"),F=s(d=>{i||(a!==null&&(clearTimeout(a),a=null),C(d))},"callbackError"),f=s(d=>{if(i)return;if(a!=null&&(clearTimeout(a),a=null),zi(d)){au("Callback returned another Agent instance %o",d.constructor.name),d.addRequest(r,t);return}if(d){d.once("free",()=>{this.freeSocket(d,t)}),r.onSocket(d);return}const E=new Error(`no Duplex stream was returned to agent-base for \`${r.method} ${r.path}\``);C(E)},"onsocket");if(typeof this.callback!="function"){C(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(au("Converting legacy callback function to promise"),this.promisifiedCallback=qi.default(this.callback)):this.promisifiedCallback=this.callback),typeof l=="number"&&l>0&&(a=setTimeout(c,l)),"port"in t&&typeof t.port!="number"&&(t.port=Number(t.port));try{au("Resolving socket for %o request: %o",t.protocol,`${r.method} ${r.path}`),Promise.resolve(this.promisifiedCallback(r,t)).then(f,F)}catch(d){Promise.reject(d).catch(F)}}freeSocket(r,o){au("Freeing socket %o %o",r.constructor.name,o),r.destroy()}destroy(){au("Destroying agent %o",this.constructor.name)}};s(e,"Agent");let D=e;u.Agent=D,u.prototype=u.Agent.prototype}(Mu||(Mu={}));var Hi=Mu,zD={},Ki=A&&A.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(zD,"__esModule",{value:!0});const Vi=Ki(WD),cu=Vi.default("https-proxy-agent:parse-proxy-response");function Yi(u){return new Promise((D,e)=>{let n=0;const r=[];function o(){const c=u.read();c?C(c):u.once("readable",o)}s(o,"read");function t(){u.removeListener("end",a),u.removeListener("error",l),u.removeListener("close",i),u.removeListener("readable",o)}s(t,"cleanup");function i(c){cu("onclose had error %o",c)}s(i,"onclose");function a(){cu("onend")}s(a,"onend");function l(c){t(),cu("onerror %o",c),e(c)}s(l,"onerror");function C(c){r.push(c),n+=c.length;const F=Buffer.concat(r,n);if(F.indexOf(`\r
70
70
  \r
71
- `)===-1){au("have not received end of HTTP headers yet..."),o();return}const f=l.toString("ascii",0,l.indexOf(`\r
72
- `)),d=+f.split(" ")[1];au("got proxy server response: %o",f),D({statusCode:d,buffered:l})}u.on("error",c),u.on("close",s),u.on("end",i),o()})}ND.default=Ni;var Li=y&&y.__awaiter||function(u,D,t,e){function r(o){return o instanceof t?o:new t(function(n){n(o)})}return new(t||(t=Promise))(function(o,n){function s(F){try{c(e.next(F))}catch(a){n(a)}}function i(F){try{c(e.throw(F))}catch(a){n(a)}}function c(F){F.done?o(F.value):r(F.value).then(s,i)}c((e=e.apply(u,D||[])).next())})},X=y&&y.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(OD,"__esModule",{value:!0});const Gt=X(an),Ut=X(cn),Gi=X(ln),Ui=X(VD),Wi=X(RD),qi=Ri,Hi=X(ND),cu=Wi.default("https-proxy-agent:agent");class zi extends qi.Agent{constructor(D){let t;if(typeof D=="string"?t=Gi.default.parse(D):t=D,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");cu("creating new HttpsProxyAgent instance: %o",t),super(t);const e=Object.assign({},t);this.secureProxy=t.secureProxy||Yi(e.protocol),e.host=e.hostname||e.host,typeof e.port=="string"&&(e.port=parseInt(e.port,10)),!e.port&&e.host&&(e.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in e)&&(e.ALPNProtocols=["http 1.1"]),e.host&&e.path&&(delete e.path,delete e.pathname),this.proxy=e}callback(D,t){return Li(this,void 0,void 0,function*(){const{proxy:e,secureProxy:r}=this;let o;r?(cu("Creating `tls.Socket`: %o",e),o=Ut.default.connect(e)):(cu("Creating `net.Socket`: %o",e),o=Gt.default.connect(e));const n=Object.assign({},e.headers);let i=`CONNECT ${`${t.host}:${t.port}`} HTTP/1.1\r
73
- `;e.auth&&(n["Proxy-Authorization"]=`Basic ${Buffer.from(e.auth).toString("base64")}`);let{host:c,port:F,secureEndpoint:a}=t;Vi(F,a)||(c+=`:${F}`),n.Host=c,n.Connection="close";for(const p of Object.keys(n))i+=`${p}: ${n[p]}\r
74
- `;const l=Hi.default(o);o.write(`${i}\r
75
- `);const{statusCode:C,buffered:f}=yield l;if(C===200){if(D.once("socket",Ki),t.secureEndpoint){cu("Upgrading socket connection to TLS");const p=t.servername||t.host;return Ut.default.connect(Object.assign(Object.assign({},Ji(t,"host","hostname","path","port")),{socket:o,servername:p}))}return o}o.destroy();const d=new Gt.default.Socket({writable:!1});return d.readable=!0,D.once("socket",p=>{cu("replaying proxy buffer for failed request"),Ui.default(p.listenerCount("data")>0),p.push(f),p.push(null)}),d})}}OD.default=zi;function Ki(u){u.resume()}function Vi(u,D){return!!(!D&&u===80||D&&u===443)}function Yi(u){return typeof u=="string"?/^https:?$/i.test(u):!1}function Ji(u,...D){const t={};let e;for(e in u)D.includes(e)||(t[e]=u[e]);return t}var Zi=y&&y.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};const LD=Zi(OD);function Wt(u){return new LD.default(u)}(function(u){u.HttpsProxyAgent=LD.default,u.prototype=LD.default.prototype})(Wt||(Wt={}));const Xi={"":"<commit message>",conventional:"<type>(<optional scope>): <commit message>"},Qi=u=>`The output response must be in format:
76
- ${Xi[u]}`,ua={"":"",conventional:`Choose a type from the type-to-description JSON below that best describes the git diff:
77
- ${JSON.stringify({docs:"Documentation only changes",style:"Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",refactor:"A code change that neither fixes a bug nor adds a feature",perf:"A code change that improves performance",test:"Adding missing tests or correcting existing tests",build:"Changes that affect the build system or external dependencies",ci:"Changes to our CI configuration files and scripts",chore:"Other changes that don't modify src or test files",revert:"Reverts a previous commit",feat:"A new feature",fix:"A bug fix"},null,2)}`},Da=(u,D,t)=>["Generate a concise git commit message written in present tense for the following code diff with the given specifications below:",`Message language: ${u}`,`Commit message must be a maximum of ${D} characters.`,"Exclude anything unnecessary such as translation. Your entire response will be passed directly into git commit.",ua[t],Qi(t)].filter(Boolean).join(`
78
- `),ea=async(u,D,t,e,r,o)=>new Promise((n,s)=>{const i=JSON.stringify(e),c=sn.request({port:443,hostname:u,path:D,method:"POST",headers:{...t,"Content-Type":"application/json","Content-Length":Buffer.byteLength(i)},timeout:r,agent:void 0},F=>{const a=[];F.on("data",l=>a.push(l)),F.on("end",()=>{n({request:c,response:F,data:Buffer.concat(a).toString()})})});c.on("error",s),c.on("timeout",()=>{c.destroy(),s(new S(`Time out error: request took over ${r}ms. Try increasing the \`timeout\` config, or checking the OpenAI API status https://status.openai.com`))}),c.write(i),c.end()}),ta=async(u,D,t,e)=>{const{response:r,data:o}=await ea("api.openai.com","/v1/chat/completions",{Authorization:`Bearer ${u}`},D,t);if(!r.statusCode||r.statusCode<200||r.statusCode>299){let n=`OpenAI API Error: ${r.statusCode} - ${r.statusMessage}`;throw o&&(n+=`
71
+ `)===-1){cu("have not received end of HTTP headers yet..."),o();return}const d=F.toString("ascii",0,F.indexOf(`\r
72
+ `)),E=+d.split(" ")[1];cu("got proxy server response: %o",d),D({statusCode:E,buffered:F})}s(C,"ondata"),u.on("error",l),u.on("close",i),u.on("end",a),o()})}s(Yi,"parseProxyResponse"),zD.default=Yi;var Ji=A&&A.__awaiter||function(u,D,e,n){function r(o){return o instanceof e?o:new e(function(t){t(o)})}return s(r,"adopt"),new(e||(e=Promise))(function(o,t){function i(C){try{l(n.next(C))}catch(c){t(c)}}s(i,"fulfilled");function a(C){try{l(n.throw(C))}catch(c){t(c)}}s(a,"rejected");function l(C){C.done?o(C.value):r(C.value).then(i,a)}s(l,"step"),l((n=n.apply(u,D||[])).next())})},Q=A&&A.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(RD,"__esModule",{value:!0});const Zt=Q(gn),Xt=Q(Bn),Zi=Q(bn),Xi=Q(re),Qi=Q(WD),ua=Hi,Da=Q(zD),lu=Qi.default("https-proxy-agent:agent"),XD=class XD extends ua.Agent{constructor(D){let e;if(typeof D=="string"?e=Zi.default.parse(D):e=D,!e)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");lu("creating new HttpsProxyAgent instance: %o",e),super(e);const n=Object.assign({},e);this.secureProxy=e.secureProxy||na(n.protocol),n.host=n.hostname||n.host,typeof n.port=="string"&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(D,e){return Ji(this,void 0,void 0,function*(){const{proxy:n,secureProxy:r}=this;let o;r?(lu("Creating `tls.Socket`: %o",n),o=Xt.default.connect(n)):(lu("Creating `net.Socket`: %o",n),o=Zt.default.connect(n));const t=Object.assign({},n.headers);let a=`CONNECT ${`${e.host}:${e.port}`} HTTP/1.1\r
73
+ `;n.auth&&(t["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:l,port:C,secureEndpoint:c}=e;ta(C,c)||(l+=`:${C}`),t.Host=l,t.Connection="close";for(const h of Object.keys(t))a+=`${h}: ${t[h]}\r
74
+ `;const F=Da.default(o);o.write(`${a}\r
75
+ `);const{statusCode:f,buffered:d}=yield F;if(f===200){if(D.once("socket",ea),e.secureEndpoint){lu("Upgrading socket connection to TLS");const h=e.servername||e.host;return Xt.default.connect(Object.assign(Object.assign({},ra(e,"host","hostname","path","port")),{socket:o,servername:h}))}return o}o.destroy();const E=new Zt.default.Socket({writable:!1});return E.readable=!0,D.once("socket",h=>{lu("replaying proxy buffer for failed request"),Xi.default(h.listenerCount("data")>0),h.push(d),h.push(null)}),E})}};s(XD,"HttpsProxyAgent");let HD=XD;RD.default=HD;function ea(u){u.resume()}s(ea,"resume");function ta(u,D){return!!(!D&&u===80||D&&u===443)}s(ta,"isDefaultPort");function na(u){return typeof u=="string"?/^https:?$/i.test(u):!1}s(na,"isHTTPS");function ra(u,...D){const e={};let n;for(n in u)D.includes(n)||(e[n]=u[n]);return e}s(ra,"omit");var oa=A&&A.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};const KD=oa(RD);function Qt(u){return new KD.default(u)}s(Qt,"createHttpsProxyAgent"),function(u){u.HttpsProxyAgent=KD.default,u.prototype=KD.default.prototype}(Qt||(Qt={}));const sa={"":"<commit message>",conventional:"<type>(<optional scope>): <commit message>"},ia=s(u=>`The output response must be in format:
76
+ ${sa[u]}`,"specifyCommitFormat"),aa={"":"",conventional:`Choose a type from the type-to-description JSON below that best describes the git diff:
77
+ ${JSON.stringify({docs:"Documentation only changes",style:"Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",refactor:"A code change that neither fixes a bug nor adds a feature",perf:"A code change that improves performance",test:"Adding missing tests or correcting existing tests",build:"Changes that affect the build system or external dependencies",ci:"Changes to our CI configuration files and scripts",chore:"Other changes that don't modify src or test files",revert:"Reverts a previous commit",feat:"A new feature",fix:"A bug fix"},null,2)}`},ca=s((u,D,e)=>["Generate a concise git commit message written in present tense for the following code diff with the given specifications below:",`Message language: ${u}`,`Commit message must be a maximum of ${D} characters.`,"Exclude anything unnecessary such as translation. Your entire response will be passed directly into git commit.",aa[e],ia(e)].filter(Boolean).join(`
78
+ `),"generatePrompt"),la=s(async(u,D,e,n,r,o)=>new Promise((t,i)=>{const a=JSON.stringify(n),l=mn.request({port:443,hostname:u,path:D,method:"POST",headers:{...e,"Content-Type":"application/json","Content-Length":Buffer.byteLength(a)},timeout:r,agent:void 0},C=>{const c=[];C.on("data",F=>c.push(F)),C.on("end",()=>{t({request:l,response:C,data:Buffer.concat(c).toString()})})});l.on("error",i),l.on("timeout",()=>{l.destroy(),i(new S(`Time out error: request took over ${r}ms. Try increasing the \`timeout\` config, or checking the OpenAI API status https://status.openai.com`))}),l.write(a),l.end()}),"httpsPost"),Fa=s(async(u,D,e,n)=>{const{response:r,data:o}=await la("api.openai.com","/v1/chat/completions",{Authorization:`Bearer ${u}`},D,e);if(!r.statusCode||r.statusCode<200||r.statusCode>299){let t=`OpenAI API Error: ${r.statusCode} - ${r.statusMessage}`;throw o&&(t+=`
79
79
 
80
- ${o}`),r.statusCode===500&&(n+=`
80
+ ${o}`),r.statusCode===500&&(t+=`
81
81
 
82
- Check the API status: https://status.openai.com`),new S(n)}return JSON.parse(o)},na=u=>u.trim().replace(/[\n\r]/g,"").replace(/(\w)\.$/,"$1"),ra=u=>Array.from(new Set(u)),qt=async(u,D,t,e,r,o,n,s,i)=>{try{const c=await ta(u,{model:D,messages:[{role:"system",content:Da(t,o,n)},{role:"user",content:e}],temperature:i,top_p:1,frequency_penalty:0,presence_penalty:0,max_tokens:300,stream:!1,n:r},s);return ra(c.choices.filter(F=>F.message?.content).map(F=>na(F.message.content)))}catch(c){const F=c;throw F.code==="ENOTFOUND"?new S(`Error connecting to ${F.hostname} (${F.syscall}). Are you connected to the internet?`):F}};var oa=async(u,D,t,e,r)=>(async()=>{bt(Qe(Xe(" aicommit "))),await yt();const o=yD();t&&await J("git",["add","--update"]),o.start("Detecting staged files");const n=await wt(D);if(!n)throw o.stop("Detecting staged files"),new S("No staged changes found. Stage your changes manually, or automatically stage all changes with the `--all` flag.");o.stop(`${Bi(n.files)}:
83
- ${n.files.map(l=>` ${l}`).join(`
84
- `)}`);const{env:s}=process,i=await SD({OPENAI_KEY:s.OPENAI_KEY||s.OPENAI_API_KEY,proxy:s.https_proxy||s.HTTPS_PROXY||s.http_proxy||s.HTTP_PROXY,generate:u?.toString(),type:e?.toString()}),c=yD();c.start("The AI is analyzing your changes");let F;try{F=await qt(i.OPENAI_KEY,i.model,i.locale,n.diff,i.generate,i["max-length"],i.type,i.timeout,i.temperature)}finally{c.stop("Changes analyzed")}if(F.length===0)throw new S("No commit messages were generated. Try again.");let a;if(F.length===1){[a]=F;let l;if(i["auto-confirm"]?(l=!0,G(`${ou("\u2714")} Auto confirmed commit message.
82
+ Check the API status: https://status.openai.com`),new S(t)}return JSON.parse(o)},"createChatCompletion"),Ca=s(u=>u.trim().replace(/[\n\r]/g,"").replace(/(\w)\.$/,"$1"),"sanitizeMessage"),fa=s(u=>Array.from(new Set(u)),"deduplicateMessages"),un=s(async(u,D,e,n,r,o,t,i,a)=>{try{const l=await Fa(u,{model:D,messages:[{role:"system",content:ca(e,o,t)},{role:"user",content:n}],temperature:a,top_p:1,frequency_penalty:0,presence_penalty:0,max_tokens:300,stream:!1,n:r},i);return fa(l.choices.filter(C=>C.message?.content).map(C=>Ca(C.message.content)))}catch(l){const C=l;throw C.code==="ENOTFOUND"?new S(`Error connecting to ${C.hostname} (${C.syscall}). Are you connected to the internet?`):C}},"generateCommitMessage");var da=s(async(u,D,e,n,r)=>(async()=>{It(at(it(" aicommit "))),await Pt();const o=SD();e&&await Z("git",["add","--update"]),o.start("Detecting staged files");const t=await _t(D);if(!t)throw o.stop("Detecting staged files"),new S("No staged changes found. Stage your changes manually, or automatically stage all changes with the `--all` flag.");o.stop(`${Ti(t.files)}:
83
+ ${t.files.map(F=>` ${F}`).join(`
84
+ `)}`);const{env:i}=process,a=await _D({OPENAI_KEY:i.OPENAI_KEY||i.OPENAI_API_KEY,proxy:i.https_proxy||i.HTTPS_PROXY||i.http_proxy||i.HTTP_PROXY,generate:u?.toString(),type:n?.toString()}),l=SD();l.start("The AI is analyzing your changes");let C;try{C=await un(a.OPENAI_KEY,a.model,a.locale,t.diff,a.generate,a["max-length"],a.type,a.timeout,a.temperature)}finally{l.stop("Changes analyzed")}if(C.length===0)throw new S("No commit messages were generated. Try again.");let c;if(C.length===1){[c]=C;let F;if(a["auto-confirm"]?(F=!0,W(`${su("\u2714")} Auto confirmed commit message.
85
85
 
86
- ${a}
87
- `)):l=await mi({message:`Use this commit message?
86
+ ${c}
87
+ `)):F=await Si({message:`Use this commit message?
88
88
 
89
- ${a}
90
- `}),!l||ft(l)){G("Commit cancelled");return}}else{const l=await gi({message:`Pick a commit message to use: ${lD("(Ctrl+c to exit)")}`,options:F.map(C=>({label:C,value:C}))});if(ft(l)){G("Commit cancelled");return}a=l}if(i["prepend-reference"]){const{stdout:l}=await J("git",["branch","--show-current"]),C=l.match(/([a-zA-Z])+-([0-9]+)/)?.[0];C?.length&&(a=`${C?.toUpperCase()}: ${a}`)}await J("git",["commit","-m",a,...r]),G(`${ou("\u2714")} Successfully committed!`)})().catch(o=>{G(`${yu("\u2716")} ${o.message}`),vu(o),process.exit(1)});const[GD,sa]=process.argv.slice(2);var ia=()=>(async()=>{if(!GD)throw new S('Commit message file path is missing. This file should be called from the "prepare-commit-msg" git hook');if(sa)return;const u=await wt();if(!u)return;bt(Qe(Xe(" aicommit ")));const{env:D}=process,t=await SD({proxy:D.https_proxy||D.HTTPS_PROXY||D.http_proxy||D.HTTP_PROXY}),e=yD();e.start("The AI is analyzing your changes");let r;try{r=await qt(t.OPENAI_KEY,t.model,t.locale,u.diff,t.generate,t["max-length"],t.type,t.timeout,t.temperature)}finally{e.stop("Changes analyzed")}const n=await O.readFile(GD,"utf8")!=="",s=r.length>1;let i="";n&&(i=`# \u{1F916} AI generated commit${s?"s":""}
91
- `),s?(n&&(i+=`# Select one of the following messages by uncommeting:
92
- `),i+=`
93
- ${r.map(c=>`# ${c}`).join(`
94
- `)}`):(n&&(i+=`# Edit the message below and commit:
95
- `),i+=`
89
+ ${c}
90
+ `}),!F||At(F)){W("Commit cancelled");return}}else{const F=await Oi({message:`Pick a commit message to use: ${ED("(Ctrl+c to exit)")}`,options:C.map(f=>({label:f,value:f}))});if(At(F)){W("Commit cancelled");return}c=F}if(a["prepend-reference"]){const{stdout:F}=await Z("git",["branch","--show-current"]),f=F.match(/([a-zA-Z])+-([0-9]+)/)?.[0];f?.length&&(c=`${f?.toUpperCase()}: ${c}`)}await Z("git",["commit","-m",c,...r]),W(`${su("\u2714")} Successfully committed!`)})().catch(o=>{W(`${xu("\u2716")} ${o.message}`),Iu(o),process.exit(1)}),"aicommit");const[VD,Ea]=process.argv.slice(2);var pa=s(()=>(async()=>{if(!VD)throw new S('Commit message file path is missing. This file should be called from the "prepare-commit-msg" git hook');if(Ea)return;const u=await _t();if(!u)return;It(at(it(" aicommit ")));const{env:D}=process,e=await _D({proxy:D.https_proxy||D.HTTPS_PROXY||D.http_proxy||D.HTTP_PROXY}),n=SD();n.start("The AI is analyzing your changes");let r;try{r=await un(e.OPENAI_KEY,e.model,e.locale,u.diff,e.generate,e["max-length"],e.type,e.timeout,e.temperature)}finally{n.stop("Changes analyzed")}const t=await T.readFile(VD,"utf8")!=="",i=r.length>1;let a="";t&&(a=`# \u{1F916} AI generated commit${i?"s":""}
91
+ `),i?(t&&(a+=`# Select one of the following messages by uncommeting:
92
+ `),a+=`
93
+ ${r.map(l=>`# ${l}`).join(`
94
+ `)}`):(t&&(a+=`# Edit the message below and commit:
95
+ `),a+=`
96
96
  ${r[0]}
97
- `),await O.appendFile(GD,i),G(`${ou("\u2714")} Saved commit message!`)})().catch(u=>{G(`${yu("\u2716")} ${u.message}`),vu(u),process.exit(1)}),aa=me({name:"config",parameters:["<mode>","<key=value...>"]},u=>{(async()=>{const{mode:D,keyValue:t}=u._;if(D==="get"){const e=await SD({},!0);for(const r of t)Tt(e,r)&&console.log(`${r}=${e[r]}`);return}if(D==="set"){await wi(t.map(e=>e.split("=")));return}throw new S(`Invalid mode: ${D}`)})().catch(D=>{console.error(`${yu("\u2716")} ${D.message}`),vu(D),process.exit(1)})});const Ht="prepare-commit-msg",zt=`.git/hooks/${Ht}`,Iu=Fn(new URL("cli.mjs",import.meta.url)),ca=process.argv[1].replace(/\\/g,"/").endsWith(`/${zt}`),Kt=process.platform==="win32",Vt=`
97
+ `),await T.appendFile(VD,a),W(`${su("\u2714")} Saved commit message!`)})().catch(u=>{W(`${xu("\u2716")} ${u.message}`),Iu(u),process.exit(1)}),"prepareCommitMessageHook"),ha=Oe({name:"config",parameters:["<mode>","<key=value...>"]},u=>{(async()=>{const{mode:D,keyValue:e}=u._;if(D==="get"){const n=await _D({},!0);for(const r of e)Gt(n,r)&&console.log(`${r}=${n[r]}`);return}if(D==="set"){await _i(e.map(n=>n.split("=")));return}throw new S(`Invalid mode: ${D}`)})().catch(D=>{console.error(`${xu("\u2716")} ${D.message}`),Iu(D),process.exit(1)})});const Dn="prepare-commit-msg",en=`.git/hooks/${Dn}`,ju=yn(new URL("cli.mjs",import.meta.url)),ma=process.argv[1].replace(/\\/g,"/").endsWith(`/${en}`),tn=process.platform==="win32",nn=`
98
98
  #!/usr/bin/env node
99
- import(${JSON.stringify(Cn(Iu))})
100
- `.trim();var la=me({name:"hook",parameters:["<install/uninstall>"]},u=>{(async()=>{const D=await yt(),{installUninstall:t}=u._,e=q.join(D,zt),r=await Ot(e);if(t==="install"){if(r){if(await O.realpath(e).catch(()=>{})===Iu){console.warn("The hook is already installed");return}throw new S(`A different ${Ht} hook seems to be installed. Please remove it before installing aicommit.`)}await O.mkdir(q.dirname(e),{recursive:!0}),Kt?await O.writeFile(e,Vt):(await O.symlink(Iu,e,"file"),await O.chmod(e,493)),console.log(`${ou("\u2714")} Hook installed`);return}if(t==="uninstall"){if(!r){console.warn("Hook is not installed");return}if(Kt){if(await O.readFile(e,"utf8")!==Vt){console.warn("Hook is not installed");return}}else if(await O.realpath(e)!==Iu){console.warn("Hook is not installed");return}await O.rm(e),console.log(`${ou("\u2714")} Hook uninstalled`);return}throw new S(`Invalid mode: ${t}`)})().catch(D=>{console.error(`${yu("\u2716")} ${D.message}`),vu(D),process.exit(1)})});const Yt=process.argv.slice(2);Pr({name:"aicommit",version:ge,flags:{generate:{type:Number,description:"Number of messages to generate (Warning: generating multiple costs more) (default: 1)",alias:"g"},exclude:{type:[String],description:"Files to exclude from AI analysis",alias:"x"},all:{type:Boolean,description:"Automatically stage changes in tracked files for the commit",alias:"a",default:!1},type:{type:String,description:"Type of commit message to generate",alias:"t"}},commands:[aa,la],help:{description:Ir},ignoreArgv:u=>u==="unknown-flag"||u==="argument"},u=>{ca?ia():oa(u.flags.generate,u.flags.exclude,u.flags.all,u.flags.type,Yt)},Yt);
99
+ import(${JSON.stringify(An(ju))})
100
+ `.trim();var ga=Oe({name:"hook",parameters:["<install/uninstall>"]},u=>{(async()=>{const D=await Pt(),{installUninstall:e}=u._,n=z.join(D,en),r=await Lt(n);if(e==="install"){if(r){if(await T.realpath(n).catch(()=>{})===ju){console.warn("The hook is already installed");return}throw new S(`A different ${Dn} hook seems to be installed. Please remove it before installing aicommit.`)}await T.mkdir(z.dirname(n),{recursive:!0}),tn?await T.writeFile(n,nn):(await T.symlink(ju,n,"file"),await T.chmod(n,493)),console.log(`${su("\u2714")} Hook installed`);return}if(e==="uninstall"){if(!r){console.warn("Hook is not installed");return}if(tn){if(await T.readFile(n,"utf8")!==nn){console.warn("Hook is not installed");return}}else if(await T.realpath(n)!==ju){console.warn("Hook is not installed");return}await T.rm(n),console.log(`${su("\u2714")} Hook uninstalled`);return}throw new S(`Invalid mode: ${e}`)})().catch(D=>{console.error(`${xu("\u2716")} ${D.message}`),Iu(D),process.exit(1)})});const rn=process.argv.slice(2);Ur({name:"aicommit",version:Te,flags:{generate:{type:Number,description:"Number of messages to generate (Warning: generating multiple costs more) (default: 1)",alias:"g"},exclude:{type:[String],description:"Files to exclude from AI analysis",alias:"x"},all:{type:Boolean,description:"Automatically stage changes in tracked files for the commit",alias:"a",default:!1},type:{type:String,description:"Type of commit message to generate",alias:"t"}},commands:[ha,ga],help:{description:qr},ignoreArgv:u=>u==="unknown-flag"||u==="argument"},u=>{ma?pa():da(u.flags.generate,u.flags.exclude,u.flags.all,u.flags.type,rn)},rn);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@negoziator/ai-commit",
3
- "version": "1.2.31",
3
+ "version": "1.2.32",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },