eazy-git 0.3.1 → 0.3.3
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.
- package/README.md +4 -0
- package/dist/git.js +63 -63
- package/dist/index.js +73 -105
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -152,9 +152,13 @@ eazy-git/
|
|
|
152
152
|
│ ├── ui/
|
|
153
153
|
│ │ └── theme.js
|
|
154
154
|
│ └── utils/
|
|
155
|
+
│ ├── aiCommitSuggestion.js
|
|
156
|
+
│ ├── commitWithHooks.js
|
|
157
|
+
│ ├── gitFiles.js
|
|
155
158
|
│ ├── handleUserCancellation.js
|
|
156
159
|
│ ├── hasGitInstalled.js
|
|
157
160
|
│ ├── isEmpty.js
|
|
161
|
+
│ ├── selectFiles.js
|
|
158
162
|
│ └── validateTicketOfJIRA.js
|
|
159
163
|
│
|
|
160
164
|
├── build.js
|
package/dist/git.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var Dt=Object.create;var tu=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var ot=Object.getOwnPropertyNames;var it=Object.getPrototypeOf,nt=Object.prototype.hasOwnProperty;var ru=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var at=(e,t,r,D)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ot(t))!nt.call(e,s)&&s!==r&&tu(e,s,{get:()=>t[s],enumerable:!(D=st(t,s))||D.enumerable});return e};var ie=(e,t,r)=>(r=e!=null?Dt(it(e)):{},at(t||!e||!e.__esModule?tu(r,"default",{value:e,enumerable:!0}):r,e));var Te=ru((Mr,Du)=>{"use strict";var xe="\x1B",E=`${xe}[`,ct="\x07",Re={to(e,t){return t?`${E}${t+1};${e+1}H`:`${E}${e+1}G`},move(e,t){let r="";return e<0?r+=`${E}${-e}D`:e>0&&(r+=`${E}${e}C`),t<0?r+=`${E}${-t}A`:t>0&&(r+=`${E}${t}B`),r},up:(e=1)=>`${E}${e}A`,down:(e=1)=>`${E}${e}B`,forward:(e=1)=>`${E}${e}C`,backward:(e=1)=>`${E}${e}D`,nextLine:(e=1)=>`${E}E`.repeat(e),prevLine:(e=1)=>`${E}F`.repeat(e),left:`${E}G`,hide:`${E}?25l`,show:`${E}?25h`,save:`${xe}7`,restore:`${xe}8`},lt={up:(e=1)=>`${E}S`.repeat(e),down:(e=1)=>`${E}T`.repeat(e)},mt={screen:`${E}2J`,up:(e=1)=>`${E}1J`.repeat(e),down:(e=1)=>`${E}J`.repeat(e),line:`${E}2K`,lineEnd:`${E}K`,lineStart:`${E}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?Re.up():"");return e&&(t+=Re.left),t}};Du.exports={cursor:Re,scroll:lt,erase:mt,beep:ct}});var ke=ru((Or,Se)=>{var ae=process||{},su=ae.argv||[],ne=ae.env||{},ht=!(ne.NO_COLOR||su.includes("--no-color"))&&(!!ne.FORCE_COLOR||su.includes("--color")||ae.platform==="win32"||(ae.stdout||{}).isTTY&&ne.TERM!=="dumb"||!!ne.CI),dt=(e,t,r=e)=>D=>{let s=""+D,o=s.indexOf(t,e.length);return~o?e+Ft(s,t,r,o)+t:e+s+t},Ft=(e,t,r,D)=>{let s="",o=0;do s+=e.substring(o,D)+r,o=D+t.length,D=e.indexOf(t,o);while(~D);return s+e.substring(o)},ou=(e=ht)=>{let t=e?dt:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Se.exports=ou();Se.exports.createColors=ou});import{stripVTControlCharacters as _e}from"node:util";var A=ie(Te(),1),pu=ie(ke(),1);import{stdin as Cu,stdout as gu}from"node:process";import*as P from"node:readline";import iu from"node:readline";import{Writable as Ct}from"node:stream";function gt({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var pt=gt();function Eu(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(pt,"")}function fu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bu={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(D){var s=D.charCodeAt(0),o=D.length==2?D.charCodeAt(1):0,u=s;return 55296<=s&&s<=56319&&56320<=o&&o<=57343&&(s&=1023,o&=1023,u=s<<10|o,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},t.characterLength=function(D){var s=this.eastAsianWidth(D);return s=="F"||s=="W"||s=="A"?2:1};function r(D){return D.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(D){for(var s=r(D),o=0,u=0;u<s.length;u++)o=o+this.characterLength(s[u]);return o},t.slice=function(D,s,o){textLen=t.length(D),s=s||0,o=o||1,s<0&&(s=textLen+s),o<0&&(o=textLen+o);for(var u="",a=0,l=r(D),h=0;h<l.length;h++){var F=l[h],d=t.length(F);if(a>=s-(d==2?1:0))if(a+d<=o)u+=F;else break;a+=d}return u}})(bu);var Et=bu.exports,ft=fu(Et),bt=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},Bt=fu(bt);function Q(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Eu(e),e.length===0))return 0;e=e.replace(Bt()," ");let r=t.ambiguousIsNarrow?1:2,D=0;for(let s of e){let o=s.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(ft.eastAsianWidth(s)){case"F":case"W":D+=2;break;case"A":D+=r;break;default:D+=1}}return D}var Me=10,nu=(e=0)=>t=>`\x1B[${t+e}m`,au=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,cu=(e=0)=>(t,r,D)=>`\x1B[${38+e};2;${t};${r};${D}m`,C={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(C.modifier);var $t=Object.keys(C.color),yt=Object.keys(C.bgColor);[...$t,...yt];function vt(){let e=new Map;for(let[t,r]of Object.entries(C)){for(let[D,s]of Object.entries(r))C[D]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[D]=C[D],e.set(s[0],s[1]);Object.defineProperty(C,t,{value:r,enumerable:!1})}return Object.defineProperty(C,"codes",{value:e,enumerable:!1}),C.color.close="\x1B[39m",C.bgColor.close="\x1B[49m",C.color.ansi=nu(),C.color.ansi256=au(),C.color.ansi16m=cu(),C.bgColor.ansi=nu(Me),C.bgColor.ansi256=au(Me),C.bgColor.ansi16m=cu(Me),Object.defineProperties(C,{rgbToAnsi256:{value:(t,r,D)=>t===r&&r===D?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(D/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[D]=r;D.length===3&&(D=[...D].map(o=>o+o).join(""));let s=Number.parseInt(D,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>C.rgbToAnsi256(...C.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,D,s;if(t>=232)r=((t-232)*10+8)/255,D=r,s=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,D=Math.floor(a/6)/5,s=a%6/5}let o=Math.max(r,D,s)*2;if(o===0)return 30;let u=30+(Math.round(s)<<2|Math.round(D)<<1|Math.round(r));return o===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(t,r,D)=>C.ansi256ToAnsi(C.rgbToAnsi256(t,r,D)),enumerable:!1},hexToAnsi:{value:t=>C.ansi256ToAnsi(C.hexToAnsi256(t)),enumerable:!1}}),C}var At=vt(),Fe=new Set(["\x1B","\x9B"]),wt=39,Le="\x07",Bu="[",xt="]",$u="m",Pe=`${xt}8;;`,lu=e=>`${Fe.values().next().value}${Bu}${e}${$u}`,mu=e=>`${Fe.values().next().value}${Pe}${e}${Le}`,Rt=e=>e.split(" ").map(t=>Q(t)),Oe=(e,t,r)=>{let D=[...t],s=!1,o=!1,u=Q(Eu(e[e.length-1]));for(let[a,l]of D.entries()){let h=Q(l);if(u+h<=r?e[e.length-1]+=l:(e.push(l),u=0),Fe.has(l)&&(s=!0,o=D.slice(a+1).join("").startsWith(Pe)),s){o?l===Le&&(s=!1,o=!1):l===$u&&(s=!1);continue}u+=h,u===r&&a<D.length-1&&(e.push(""),u=0)}!u&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Tt=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(Q(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},St=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let D="",s,o,u=Rt(e),a=[""];for(let[h,F]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let d=Q(a[a.length-1]);if(h!==0&&(d>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),d=0),(d>0||r.trim===!1)&&(a[a.length-1]+=" ",d++)),r.hard&&u[h]>t){let v=t-d,x=1+Math.floor((u[h]-v-1)/t);Math.floor((u[h]-1)/t)<x&&a.push(""),Oe(a,F,t);continue}if(d+u[h]>t&&d>0&&u[h]>0){if(r.wordWrap===!1&&d<t){Oe(a,F,t);continue}a.push("")}if(d+u[h]>t&&r.wordWrap===!1){Oe(a,F,t);continue}a[a.length-1]+=F}r.trim!==!1&&(a=a.map(h=>Tt(h)));let l=[...a.join(`
|
|
3
|
-
`)];for(let[
|
|
4
|
-
`?(
|
|
5
|
-
`&&(
|
|
2
|
+
var ut=Object.create;var Je=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var rt=Object.getOwnPropertyNames;var Dt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var Qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var st=(e,t,r,D)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of rt(t))!ot.call(e,o)&&o!==r&&Je(e,o,{get:()=>t[o],enumerable:!(D=tt(t,o))||D.enumerable});return e};var ee=(e,t,r)=>(r=e!=null?ut(Dt(e)):{},st(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e));var be=Qe((kr,Ze)=>{"use strict";var fe="\x1B",f=`${fe}[`,it="\x07",Ee={to(e,t){return t?`${f}${t+1};${e+1}H`:`${f}${e+1}G`},move(e,t){let r="";return e<0?r+=`${f}${-e}D`:e>0&&(r+=`${f}${e}C`),t<0?r+=`${f}${-t}A`:t>0&&(r+=`${f}${t}B`),r},up:(e=1)=>`${f}${e}A`,down:(e=1)=>`${f}${e}B`,forward:(e=1)=>`${f}${e}C`,backward:(e=1)=>`${f}${e}D`,nextLine:(e=1)=>`${f}E`.repeat(e),prevLine:(e=1)=>`${f}F`.repeat(e),left:`${f}G`,hide:`${f}?25l`,show:`${f}?25h`,save:`${fe}7`,restore:`${fe}8`},nt={up:(e=1)=>`${f}S`.repeat(e),down:(e=1)=>`${f}T`.repeat(e)},at={screen:`${f}2J`,up:(e=1)=>`${f}1J`.repeat(e),down:(e=1)=>`${f}J`.repeat(e),line:`${f}2K`,lineEnd:`${f}K`,lineStart:`${f}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?Ee.up():"");return e&&(t+=Ee.left),t}};Ze.exports={cursor:Ee,scroll:nt,erase:at,beep:it}});var ye=Qe((Mr,Be)=>{var te=process||{},Xe=te.argv||[],ue=te.env||{},ct=!(ue.NO_COLOR||Xe.includes("--no-color"))&&(!!ue.FORCE_COLOR||Xe.includes("--color")||te.platform==="win32"||(te.stdout||{}).isTTY&&ue.TERM!=="dumb"||!!ue.CI),lt=(e,t,r=e)=>D=>{let o=""+D,s=o.indexOf(t,e.length);return~s?e+mt(o,t,r,s)+t:e+o+t},mt=(e,t,r,D)=>{let o="",s=0;do o+=e.substring(s,D)+r,s=D+t.length,D=e.indexOf(t,s);while(~D);return o+e.substring(s)},eu=(e=ct)=>{let t=e?lt:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Be.exports=eu();Be.exports.createColors=eu});import{stripVTControlCharacters as Se}from"node:util";var B=ee(be(),1),mu=ee(ye(),1);import{stdin as cu,stdout as lu}from"node:process";import*as I from"node:readline";import uu from"node:readline";import{Writable as ht}from"node:stream";function dt({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var Ct=dt();function hu(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Ct,"")}function du(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cu={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(D){var o=D.charCodeAt(0),s=D.length==2?D.charCodeAt(1):0,u=o;return 55296<=o&&o<=56319&&56320<=s&&s<=57343&&(o&=1023,s&=1023,u=o<<10|s,u+=65536),u==12288||65281<=u&&u<=65376||65504<=u&&u<=65510?"F":u==8361||65377<=u&&u<=65470||65474<=u&&u<=65479||65482<=u&&u<=65487||65490<=u&&u<=65495||65498<=u&&u<=65500||65512<=u&&u<=65518?"H":4352<=u&&u<=4447||4515<=u&&u<=4519||4602<=u&&u<=4607||9001<=u&&u<=9002||11904<=u&&u<=11929||11931<=u&&u<=12019||12032<=u&&u<=12245||12272<=u&&u<=12283||12289<=u&&u<=12350||12353<=u&&u<=12438||12441<=u&&u<=12543||12549<=u&&u<=12589||12593<=u&&u<=12686||12688<=u&&u<=12730||12736<=u&&u<=12771||12784<=u&&u<=12830||12832<=u&&u<=12871||12880<=u&&u<=13054||13056<=u&&u<=19903||19968<=u&&u<=42124||42128<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||55216<=u&&u<=55238||55243<=u&&u<=55291||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65106||65108<=u&&u<=65126||65128<=u&&u<=65131||110592<=u&&u<=110593||127488<=u&&u<=127490||127504<=u&&u<=127546||127552<=u&&u<=127560||127568<=u&&u<=127569||131072<=u&&u<=194367||177984<=u&&u<=196605||196608<=u&&u<=262141?"W":32<=u&&u<=126||162<=u&&u<=163||165<=u&&u<=166||u==172||u==175||10214<=u&&u<=10221||10629<=u&&u<=10630?"Na":u==161||u==164||167<=u&&u<=168||u==170||173<=u&&u<=174||176<=u&&u<=180||182<=u&&u<=186||188<=u&&u<=191||u==198||u==208||215<=u&&u<=216||222<=u&&u<=225||u==230||232<=u&&u<=234||236<=u&&u<=237||u==240||242<=u&&u<=243||247<=u&&u<=250||u==252||u==254||u==257||u==273||u==275||u==283||294<=u&&u<=295||u==299||305<=u&&u<=307||u==312||319<=u&&u<=322||u==324||328<=u&&u<=331||u==333||338<=u&&u<=339||358<=u&&u<=359||u==363||u==462||u==464||u==466||u==468||u==470||u==472||u==474||u==476||u==593||u==609||u==708||u==711||713<=u&&u<=715||u==717||u==720||728<=u&&u<=731||u==733||u==735||768<=u&&u<=879||913<=u&&u<=929||931<=u&&u<=937||945<=u&&u<=961||963<=u&&u<=969||u==1025||1040<=u&&u<=1103||u==1105||u==8208||8211<=u&&u<=8214||8216<=u&&u<=8217||8220<=u&&u<=8221||8224<=u&&u<=8226||8228<=u&&u<=8231||u==8240||8242<=u&&u<=8243||u==8245||u==8251||u==8254||u==8308||u==8319||8321<=u&&u<=8324||u==8364||u==8451||u==8453||u==8457||u==8467||u==8470||8481<=u&&u<=8482||u==8486||u==8491||8531<=u&&u<=8532||8539<=u&&u<=8542||8544<=u&&u<=8555||8560<=u&&u<=8569||u==8585||8592<=u&&u<=8601||8632<=u&&u<=8633||u==8658||u==8660||u==8679||u==8704||8706<=u&&u<=8707||8711<=u&&u<=8712||u==8715||u==8719||u==8721||u==8725||u==8730||8733<=u&&u<=8736||u==8739||u==8741||8743<=u&&u<=8748||u==8750||8756<=u&&u<=8759||8764<=u&&u<=8765||u==8776||u==8780||u==8786||8800<=u&&u<=8801||8804<=u&&u<=8807||8810<=u&&u<=8811||8814<=u&&u<=8815||8834<=u&&u<=8835||8838<=u&&u<=8839||u==8853||u==8857||u==8869||u==8895||u==8978||9312<=u&&u<=9449||9451<=u&&u<=9547||9552<=u&&u<=9587||9600<=u&&u<=9615||9618<=u&&u<=9621||9632<=u&&u<=9633||9635<=u&&u<=9641||9650<=u&&u<=9651||9654<=u&&u<=9655||9660<=u&&u<=9661||9664<=u&&u<=9665||9670<=u&&u<=9672||u==9675||9678<=u&&u<=9681||9698<=u&&u<=9701||u==9711||9733<=u&&u<=9734||u==9737||9742<=u&&u<=9743||9748<=u&&u<=9749||u==9756||u==9758||u==9792||u==9794||9824<=u&&u<=9825||9827<=u&&u<=9829||9831<=u&&u<=9834||9836<=u&&u<=9837||u==9839||9886<=u&&u<=9887||9918<=u&&u<=9919||9924<=u&&u<=9933||9935<=u&&u<=9953||u==9955||9960<=u&&u<=9983||u==10045||u==10071||10102<=u&&u<=10111||11093<=u&&u<=11097||12872<=u&&u<=12879||57344<=u&&u<=63743||65024<=u&&u<=65039||u==65533||127232<=u&&u<=127242||127248<=u&&u<=127277||127280<=u&&u<=127337||127344<=u&&u<=127386||917760<=u&&u<=917999||983040<=u&&u<=1048573||1048576<=u&&u<=1114109?"A":"N"},t.characterLength=function(D){var o=this.eastAsianWidth(D);return o=="F"||o=="W"||o=="A"?2:1};function r(D){return D.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(D){for(var o=r(D),s=0,u=0;u<o.length;u++)s=s+this.characterLength(o[u]);return s},t.slice=function(D,o,s){textLen=t.length(D),o=o||0,s=s||1,o<0&&(o=textLen+o),s<0&&(s=textLen+s);for(var u="",a=0,h=r(D),l=0;l<h.length;l++){var C=h[l],m=t.length(C);if(a>=o-(m==2?1:0))if(a+m<=s)u+=C;else break;a+=m}return u}})(Cu);var Ft=Cu.exports,gt=du(Ft),pt=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},ft=du(pt);function Y(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=hu(e),e.length===0))return 0;e=e.replace(ft()," ");let r=t.ambiguousIsNarrow?1:2,D=0;for(let o of e){let s=o.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(gt.eastAsianWidth(o)){case"F":case"W":D+=2;break;case"A":D+=r;break;default:D+=1}}return D}var $e=10,tu=(e=0)=>t=>`\x1B[${t+e}m`,ru=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Du=(e=0)=>(t,r,D)=>`\x1B[${38+e};2;${t};${r};${D}m`,F={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(F.modifier);var Et=Object.keys(F.color),bt=Object.keys(F.bgColor);[...Et,...bt];function Bt(){let e=new Map;for(let[t,r]of Object.entries(F)){for(let[D,o]of Object.entries(r))F[D]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},r[D]=F[D],e.set(o[0],o[1]);Object.defineProperty(F,t,{value:r,enumerable:!1})}return Object.defineProperty(F,"codes",{value:e,enumerable:!1}),F.color.close="\x1B[39m",F.bgColor.close="\x1B[49m",F.color.ansi=tu(),F.color.ansi256=ru(),F.color.ansi16m=Du(),F.bgColor.ansi=tu($e),F.bgColor.ansi256=ru($e),F.bgColor.ansi16m=Du($e),Object.defineProperties(F,{rgbToAnsi256:{value:(t,r,D)=>t===r&&r===D?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(D/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[D]=r;D.length===3&&(D=[...D].map(s=>s+s).join(""));let o=Number.parseInt(D,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>F.rgbToAnsi256(...F.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,D,o;if(t>=232)r=((t-232)*10+8)/255,D=r,o=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,D=Math.floor(a/6)/5,o=a%6/5}let s=Math.max(r,D,o)*2;if(s===0)return 30;let u=30+(Math.round(o)<<2|Math.round(D)<<1|Math.round(r));return s===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(t,r,D)=>F.ansi256ToAnsi(F.rgbToAnsi256(t,r,D)),enumerable:!1},hexToAnsi:{value:t=>F.ansi256ToAnsi(F.hexToAnsi256(t)),enumerable:!1}}),F}var yt=Bt(),ne=new Set(["\x1B","\x9B"]),$t=39,we="\x07",Fu="[",vt="]",gu="m",xe=`${vt}8;;`,ou=e=>`${ne.values().next().value}${Fu}${e}${gu}`,su=e=>`${ne.values().next().value}${xe}${e}${we}`,At=e=>e.split(" ").map(t=>Y(t)),ve=(e,t,r)=>{let D=[...t],o=!1,s=!1,u=Y(hu(e[e.length-1]));for(let[a,h]of D.entries()){let l=Y(h);if(u+l<=r?e[e.length-1]+=h:(e.push(h),u=0),ne.has(h)&&(o=!0,s=D.slice(a+1).join("").startsWith(xe)),o){s?h===we&&(o=!1,s=!1):h===gu&&(o=!1);continue}u+=l,u===r&&a<D.length-1&&(e.push(""),u=0)}!u&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},wt=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(Y(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},xt=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let D="",o,s,u=At(e),a=[""];for(let[l,C]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let m=Y(a[a.length-1]);if(l!==0&&(m>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),m=0),(m>0||r.trim===!1)&&(a[a.length-1]+=" ",m++)),r.hard&&u[l]>t){let p=t-m,v=1+Math.floor((u[l]-p-1)/t);Math.floor((u[l]-1)/t)<v&&a.push(""),ve(a,C,t);continue}if(m+u[l]>t&&m>0&&u[l]>0){if(r.wordWrap===!1&&m<t){ve(a,C,t);continue}a.push("")}if(m+u[l]>t&&r.wordWrap===!1){ve(a,C,t);continue}a[a.length-1]+=C}r.trim!==!1&&(a=a.map(l=>wt(l)));let h=[...a.join(`
|
|
3
|
+
`)];for(let[l,C]of h.entries()){if(D+=C,ne.has(C)){let{groups:p}=new RegExp(`(?:\\${Fu}(?<code>\\d+)m|\\${xe}(?<uri>.*)${we})`).exec(h.slice(l).join(""))||{groups:{}};if(p.code!==void 0){let v=Number.parseFloat(p.code);o=v===$t?void 0:v}else p.uri!==void 0&&(s=p.uri.length===0?void 0:p.uri)}let m=yt.codes.get(Number(o));h[l+1]===`
|
|
4
|
+
`?(s&&(D+=su("")),o&&m&&(D+=ou(m))):C===`
|
|
5
|
+
`&&(o&&m&&(D+=ou(o)),s&&(D+=su(s)))}return D};function iu(e,t,r){return String(e).normalize().replace(/\r\n/g,`
|
|
6
6
|
`).split(`
|
|
7
|
-
`).map(D=>
|
|
8
|
-
`)}var
|
|
7
|
+
`).map(D=>xt(D,t,r)).join(`
|
|
8
|
+
`)}var Rt=["up","down","left","right","space","enter","cancel"],De={actions:new Set(Rt),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function Re(e,t){if(typeof e=="string")return De.aliases.get(e)===t;for(let r of e)if(r!==void 0&&Re(r,t))return!0;return!1}function St(e,t){if(e===t)return;let r=e.split(`
|
|
9
9
|
`),D=t.split(`
|
|
10
|
-
`),
|
|
11
|
-
`),
|
|
12
|
-
`).length-1;this.output.write(
|
|
13
|
-
`);this.output.write(
|
|
14
|
-
`).slice(D);this.output.write(
|
|
15
|
-
`)),this._prevFrame=t;return}this.output.write(
|
|
16
|
-
${
|
|
10
|
+
`),o=[];for(let s=0;s<Math.max(r.length,D.length);s++)r[s]!==D[s]&&o.push(s);return o}var Tt=globalThis.process.platform.startsWith("win"),Ae=Symbol("clack:cancel");function ae(e){return e===Ae}function re(e,t){let r=e;r.isTTY&&r.setRawMode(t)}function pu({input:e=cu,output:t=lu,overwrite:r=!0,hideCursor:D=!0}={}){let o=I.createInterface({input:e,output:t,prompt:"",tabSize:1});I.emitKeypressEvents(e,o),e.isTTY&&e.setRawMode(!0);let s=(u,{name:a,sequence:h})=>{let l=String(u);if(Re([l,a,h],"cancel")){D&&t.write(B.cursor.show),process.exit(0);return}if(!r)return;I.moveCursor(t,a==="return"?0:-1,a==="return"?-1:0,()=>{I.clearLine(t,1,()=>{e.once("keypress",s)})})};return D&&t.write(B.cursor.hide),e.once("keypress",s),()=>{e.off("keypress",s),D&&t.write(B.cursor.show),e.isTTY&&!Tt&&e.setRawMode(!1),o.terminal=!1,o.close()}}var kt=Object.defineProperty,Mt=(e,t,r)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>(Mt(e,typeof t!="symbol"?t+"":t,r),r),G=class{constructor(t,r=!0){A(this,"input"),A(this,"output"),A(this,"_abortSignal"),A(this,"rl"),A(this,"opts"),A(this,"_render"),A(this,"_track",!1),A(this,"_prevFrame",""),A(this,"_subscribers",new Map),A(this,"_cursor",0),A(this,"state","initial"),A(this,"error",""),A(this,"value");let{input:D=cu,output:o=lu,render:s,signal:u,...a}=t;this.opts=a,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=r,this._abortSignal=u,this.input=D,this.output=o}unsubscribe(){this._subscribers.clear()}setSubscriber(t,r){let D=this._subscribers.get(t)??[];D.push(r),this._subscribers.set(t,D)}on(t,r){this.setSubscriber(t,{cb:r})}once(t,r){this.setSubscriber(t,{cb:r,once:!0})}emit(t,...r){let D=this._subscribers.get(t)??[],o=[];for(let s of D)s.cb(...r),s.once&&o.push(()=>D.splice(D.indexOf(s),1));for(let s of o)s()}prompt(){return new Promise((t,r)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(Ae);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let D=new ht;D._write=(o,s,u)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),u()},this.input.pipe(D),this.rl=uu.createInterface({input:this.input,output:D,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),uu.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),re(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(B.cursor.show),this.output.off("resize",this.render),re(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(B.cursor.show),this.output.off("resize",this.render),re(this.input,!1),t(Ae)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&De.aliases.has(r.name)&&this.emit("cursor",De.aliases.get(r.name)),De.actions.has(r.name)&&this.emit("cursor",r.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),r?.name==="return"){if(!this.value&&this.opts.placeholder&&(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder)),this.opts.validate){let D=this.opts.validate(this.value);D&&(this.error=D instanceof Error?D.message:D,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}Re([t,r?.name,r?.sequence],"cancel")&&(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(`
|
|
11
|
+
`),re(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=iu(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
12
|
+
`).length-1;this.output.write(B.cursor.move(-999,t*-1))}render(){let t=iu(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(B.cursor.hide);else{let r=St(this._prevFrame,t);if(this.restoreCursor(),r&&r?.length===1){let D=r[0];this.output.write(B.cursor.move(0,D)),this.output.write(B.erase.lines(1));let o=t.split(`
|
|
13
|
+
`);this.output.write(o[D]),this._prevFrame=t,this.output.write(B.cursor.move(0,o.length-D-1));return}if(r&&r?.length>1){let D=r[0];this.output.write(B.cursor.move(0,D)),this.output.write(B.erase.down());let o=t.split(`
|
|
14
|
+
`).slice(D);this.output.write(o.join(`
|
|
15
|
+
`)),this._prevFrame=t;return}this.output.write(B.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}},oe=class extends G{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",r=>{this.output.write(B.cursor.move(0,-1)),this.value=r,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var Ot;Ot=new WeakMap;var It=Object.defineProperty,Lt=(e,t,r)=>t in e?It(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nu=(e,t,r)=>(Lt(e,typeof t!="symbol"?t+"":t,r),r),fu=class extends G{constructor(e){super(e,!1),nu(this,"options"),nu(this,"cursor",0),this.options=e.options,this.value=[...e.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===e.cursorAt),0),this.on("key",t=>{t==="a"&&this.toggleAll()}),this.on("cursor",t=>{switch(t){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;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let e=this.value.length===this.options.length;this.value=e?[]:this.options.map(t=>t.value)}toggleValue(){let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}};var Pt=Object.defineProperty,Nt=(e,t,r)=>t in e?Pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,au=(e,t,r)=>(Nt(e,typeof t!="symbol"?t+"":t,r),r),se=class extends G{constructor(t){super(t,!1),au(this,"options"),au(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:r})=>r===t.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",r=>{switch(r){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}};var ie=class extends G{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let t=this.value.slice(0,this.cursor),[r,...D]=this.value.slice(this.cursor);return`${t}${mu.default.inverse(r)}${D.join("")}`}get cursor(){return this._cursor}constructor(t){super(t),this.on("finalize",()=>{this.value||(this.value=t.defaultValue)})}};var i=ee(ye(),1),ce=ee(be(),1);import T from"node:process";function _t(){return T.platform!=="win32"?T.env.TERM!=="linux":!!T.env.CI||!!T.env.WT_SESSION||!!T.env.TERMINUS_SUBLIME||T.env.ConEmuTask==="{cmd::Cmder}"||T.env.TERM_PROGRAM==="Terminus-Sublime"||T.env.TERM_PROGRAM==="vscode"||T.env.TERM==="xterm-256color"||T.env.TERM==="alacritty"||T.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Te=_t(),b=(e,t)=>Te?e:t,jt=b("\u25C6","*"),Bu=b("\u25A0","x"),yu=b("\u25B2","x"),le=b("\u25C7","o"),zr=b("\u250C","T"),d=b("\u2502","|"),N=b("\u2514","\u2014"),ke=b("\u25CF",">"),Me=b("\u25CB"," "),Ut=b("\u25FB","[\u2022]"),Eu=b("\u25FC","[+]"),Wt=b("\u25FB","[ ]"),Hr=b("\u25AA","\u2022"),bu=b("\u2500","-"),Gt=b("\u256E","+"),Vt=b("\u251C","+"),qt=b("\u256F","+"),zt=b("\u25CF","\u2022"),Ht=b("\u25C6","*"),Yt=b("\u25B2","!"),Kt=b("\u25A0","x"),me=e=>{switch(e){case"initial":case"active":return i.default.cyan(jt);case"cancel":return i.default.red(Bu);case"error":return i.default.yellow(yu);case"submit":return i.default.green(le)}},Oe=e=>{let{cursor:t,options:r,style:D}=e,o=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),u=Math.min(s,Math.max(o,5)),a=0;t>=a+u-3?a=Math.max(Math.min(t-u+3,r.length-u),0):t<a+2&&(a=Math.max(t-2,0));let h=u<r.length&&a>0,l=u<r.length&&a+u<r.length;return r.slice(a,a+u).map((C,m,p)=>{let v=m===0&&h,S=m===p.length-1&&l;return v||S?i.default.dim("..."):D(C,m+a===t)})},K=e=>new ie({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let t=`${i.default.gray(d)}
|
|
16
|
+
${me(this.state)} ${e.message}
|
|
17
17
|
`,r=e.placeholder?i.default.inverse(e.placeholder[0])+i.default.dim(e.placeholder.slice(1)):i.default.inverse(i.default.hidden("_")),D=this.value?this.valueWithCursor:r;switch(this.state){case"error":return`${t.trim()}
|
|
18
|
-
${i.default.yellow(
|
|
19
|
-
${i.default.yellow(
|
|
20
|
-
`;case"submit":return`${t}${i.default.gray(
|
|
21
|
-
${i.default.gray(
|
|
22
|
-
${i.default.cyan(
|
|
23
|
-
`}}}).prompt();var
|
|
24
|
-
${
|
|
25
|
-
`,
|
|
26
|
-
${i.default.gray(
|
|
27
|
-
${i.default.cyan(
|
|
28
|
-
`}}}).prompt()},
|
|
29
|
-
${
|
|
30
|
-
`;switch(this.state){case"submit":return`${r}${i.default.gray(
|
|
31
|
-
${i.default.gray(
|
|
32
|
-
${i.default.cyan(
|
|
33
|
-
${i.default.cyan(
|
|
34
|
-
`}}}).prompt()};var
|
|
35
|
-
${i.default.reset(i.default.dim(`Press ${i.default.gray(i.default.bgWhite(i.default.inverse(" space ")))} to select, ${i.default.gray(i.default.bgWhite(i.default.inverse(" enter ")))} to submit`))}`},render(){let r=`${i.default.gray(
|
|
36
|
-
${
|
|
37
|
-
`,D=(s
|
|
38
|
-
${i.default.gray(
|
|
39
|
-
`).map((
|
|
40
|
-
`);return`${r+i.default.yellow(
|
|
41
|
-
${i.default.yellow(
|
|
42
|
-
${
|
|
43
|
-
`}default:return`${r}${i.default.cyan(
|
|
44
|
-
${i.default.cyan(
|
|
45
|
-
${i.default.cyan(
|
|
46
|
-
`}}}).prompt()};var
|
|
18
|
+
${i.default.yellow(d)} ${D}
|
|
19
|
+
${i.default.yellow(N)} ${i.default.yellow(this.error)}
|
|
20
|
+
`;case"submit":return`${t}${i.default.gray(d)} ${i.default.dim(this.value||e.placeholder)}`;case"cancel":return`${t}${i.default.gray(d)} ${i.default.strikethrough(i.default.dim(this.value??""))}${this.value?.trim()?`
|
|
21
|
+
${i.default.gray(d)}`:""}`;default:return`${t}${i.default.cyan(d)} ${D}
|
|
22
|
+
${i.default.cyan(N)}
|
|
23
|
+
`}}}).prompt();var $u=e=>{let t=e.active??"Yes",r=e.inactive??"No";return new oe({active:t,inactive:r,initialValue:e.initialValue??!0,render(){let D=`${i.default.gray(d)}
|
|
24
|
+
${me(this.state)} ${e.message}
|
|
25
|
+
`,o=this.value?t:r;switch(this.state){case"submit":return`${D}${i.default.gray(d)} ${i.default.dim(o)}`;case"cancel":return`${D}${i.default.gray(d)} ${i.default.strikethrough(i.default.dim(o))}
|
|
26
|
+
${i.default.gray(d)}`;default:return`${D}${i.default.cyan(d)} ${this.value?`${i.default.green(ke)} ${t}`:`${i.default.dim(Me)} ${i.default.dim(t)}`} ${i.default.dim("/")} ${this.value?`${i.default.dim(Me)} ${i.default.dim(r)}`:`${i.default.green(ke)} ${r}`}
|
|
27
|
+
${i.default.cyan(N)}
|
|
28
|
+
`}}}).prompt()},_=e=>{let t=(r,D)=>{let o=r.label??String(r.value);switch(D){case"selected":return`${i.default.dim(o)}`;case"active":return`${i.default.green(ke)} ${o} ${r.hint?i.default.dim(`(${r.hint})`):""}`;case"cancelled":return`${i.default.strikethrough(i.default.dim(o))}`;default:return`${i.default.dim(Me)} ${i.default.dim(o)}`}};return new se({options:e.options,initialValue:e.initialValue,render(){let r=`${i.default.gray(d)}
|
|
29
|
+
${me(this.state)} ${e.message}
|
|
30
|
+
`;switch(this.state){case"submit":return`${r}${i.default.gray(d)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${r}${i.default.gray(d)} ${t(this.options[this.cursor],"cancelled")}
|
|
31
|
+
${i.default.gray(d)}`;default:return`${r}${i.default.cyan(d)} ${Oe({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(D,o)=>t(D,o?"active":"inactive")}).join(`
|
|
32
|
+
${i.default.cyan(d)} `)}
|
|
33
|
+
${i.default.cyan(N)}
|
|
34
|
+
`}}}).prompt()};var vu=e=>{let t=(r,D)=>{let o=r.label??String(r.value);return D==="active"?`${i.default.cyan(Ut)} ${o} ${r.hint?i.default.dim(`(${r.hint})`):""}`:D==="selected"?`${i.default.green(Eu)} ${i.default.dim(o)} ${r.hint?i.default.dim(`(${r.hint})`):""}`:D==="cancelled"?`${i.default.strikethrough(i.default.dim(o))}`:D==="active-selected"?`${i.default.green(Eu)} ${o} ${r.hint?i.default.dim(`(${r.hint})`):""}`:D==="submitted"?`${i.default.dim(o)}`:`${i.default.dim(Wt)} ${i.default.dim(o)}`};return new fu({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(r){if(this.required&&r.length===0)return`Please select at least one option.
|
|
35
|
+
${i.default.reset(i.default.dim(`Press ${i.default.gray(i.default.bgWhite(i.default.inverse(" space ")))} to select, ${i.default.gray(i.default.bgWhite(i.default.inverse(" enter ")))} to submit`))}`},render(){let r=`${i.default.gray(d)}
|
|
36
|
+
${me(this.state)} ${e.message}
|
|
37
|
+
`,D=(o,s)=>{let u=this.value.includes(o.value);return s&&u?t(o,"active-selected"):u?t(o,"selected"):t(o,s?"active":"inactive")};switch(this.state){case"submit":return`${r}${i.default.gray(d)} ${this.options.filter(({value:o})=>this.value.includes(o)).map(o=>t(o,"submitted")).join(i.default.dim(", "))||i.default.dim("none")}`;case"cancel":{let o=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>t(s,"cancelled")).join(i.default.dim(", "));return`${r}${i.default.gray(d)} ${o.trim()?`${o}
|
|
38
|
+
${i.default.gray(d)}`:""}`}case"error":{let o=this.error.split(`
|
|
39
|
+
`).map((s,u)=>u===0?`${i.default.yellow(N)} ${i.default.yellow(s)}`:` ${s}`).join(`
|
|
40
|
+
`);return`${r+i.default.yellow(d)} ${Oe({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:D}).join(`
|
|
41
|
+
${i.default.yellow(d)} `)}
|
|
42
|
+
${o}
|
|
43
|
+
`}default:return`${r}${i.default.cyan(d)} ${Oe({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:D}).join(`
|
|
44
|
+
${i.default.cyan(d)} `)}
|
|
45
|
+
${i.default.cyan(N)}
|
|
46
|
+
`}}}).prompt()};var V=(e="",t="")=>{let r=`
|
|
47
47
|
${e}
|
|
48
48
|
`.split(`
|
|
49
|
-
`),D=
|
|
50
|
-
`);process.stdout.write(`${i.default.gray(
|
|
51
|
-
${i.default.green(
|
|
52
|
-
${
|
|
53
|
-
${i.default.gray(
|
|
54
|
-
`)},
|
|
49
|
+
`),D=Se(t).length,o=Math.max(r.reduce((u,a)=>{let h=Se(a);return h.length>u?h.length:u},0),D)+2,s=r.map(u=>`${i.default.gray(d)} ${i.default.dim(u)}${" ".repeat(o-Se(u).length)}${i.default.gray(d)}`).join(`
|
|
50
|
+
`);process.stdout.write(`${i.default.gray(d)}
|
|
51
|
+
${i.default.green(le)} ${i.default.reset(t)} ${i.default.gray(bu.repeat(Math.max(o-D-1,1))+Gt)}
|
|
52
|
+
${s}
|
|
53
|
+
${i.default.gray(Vt+bu.repeat(o+2)+qt)}
|
|
54
|
+
`)},Au=(e="")=>{process.stdout.write(`${i.default.gray(N)} ${i.default.red(e)}
|
|
55
55
|
|
|
56
|
-
`)};var c={message:(e="",{symbol:t=i.default.gray(
|
|
57
|
-
`);r.push(`${t} ${D}`,...
|
|
56
|
+
`)};var c={message:(e="",{symbol:t=i.default.gray(d)}={})=>{let r=[`${i.default.gray(d)}`];if(e){let[D,...o]=e.split(`
|
|
57
|
+
`);r.push(`${t} ${D}`,...o.map(s=>`${i.default.gray(d)} ${s}`))}process.stdout.write(`${r.join(`
|
|
58
58
|
`)}
|
|
59
|
-
`)},info:e=>{c.message(e,{symbol:i.default.blue(
|
|
60
|
-
`);let
|
|
61
|
-
`);process.stdout.write(
|
|
62
|
-
`);let
|
|
63
|
-
`):process.stdout.write(`${
|
|
64
|
-
`),W(),s()};return{start:Y,stop:se,message:(B="")=>{a=H(B??a)}}};import{spawnSync as ju}from"child_process";import{existsSync as Xt,readFileSync as er,writeFileSync as Xr,mkdirSync as eD}from"fs";import ur from"os";import Lu from"path";var tr=Lu.join(ur.homedir(),".eazy-git"),Ou=Lu.join(tr,"config.json"),Iu={language:"es",defaultBaseBranch:"release",aiProvider:"claude"};function ee(){try{if(Xt(Ou)){let e=er(Ou,"utf-8");return{...Iu,...JSON.parse(e)}}}catch{}return{...Iu}}var Pu={welcome:"Bienvenido a",subtitle:"tu CLI de confianza para gestionar ramas en GIT",operationCompleted:"Operacion completada!",operationCancelled:"Operacion cancelada. Saliendo...",unknownCommand:"Comando desconocido",errorExecuting:"Error al ejecutar el comando",version:"eazy-git version",whatToDo:"Que deseas hacer?",addChanges:"Agregar cambios a una rama",createOriginal:"Crear rama original",createTemporal:"Crear rama temporal",notGitRepo:"Este directorio no es un repositorio git",gitNotInstalled:"git no esta instalado en el sistema",currentBranch:"Branch actual",filesChanged:"Archivos con cambios",noChangesPending:"No hay cambios pendientes. Deseas continuar de todas formas?",updatingRefs:"Actualizando referencias remotas...",refsUpdated:"Referencias actualizadas",fetchFailed:"No se pudo hacer fetch (continuando...)",baseBranch:"Desde que branch base quieres crear la rama?",baseBranchRequired:"El branch base es requerido",ticketId:"Cual es el identificador del ticket? (ej: DPW-0000)",ticketRequired:"El ticket es requerido",changeType:"Que tipo de cambio es?",branchExistsLocal:e=>`La rama "${e}" ya existe localmente. Que deseas hacer?`,switchToIt:"Cambiarme a ella y continuar",cancel:"Cancelar",cancelledOp:"Operacion cancelada.",creatingBranch:(e,t)=>`Creando rama ${e} desde origin/${t}...`,branchCreated:e=>`Rama ${e} creada`,errorCreatingBranch:e=>`Error al crear la rama: ${e}`,noFilesToStage:"No hay archivos para stagear.",selectFiles:"Cuales archivos quieres incluir en el commit?",selectAllFiles:"Seleccionar todos los archivos",stagedFiles:"Archivos en stage",stagedCorrect:"Los archivos en stage son correctos?",aiProvider:"Con que IA quieres generar la sugerencia de commit?",generatingCommit:e=>`Generando sugerencia de commit con ${e}...`,aiSuggestionFailed:e=>`No se pudo obtener sugerencia de ${e}. Escribe el mensaje manualmente.`,writeCommitMsg:"Escribe el mensaje de commit:",commitMsgRequired:"El mensaje es requerido",suggestionOf:e=>`Sugerencia de ${e}`,useThisCommit:"Este mensaje de commit te parece bien?",yesUseIt:"Si, usar este",modify:"Modificar",commitSuccess:"Commit realizado correctamente",hookBlocked:"El pre-commit hook bloqueo el commit. Que deseas hacer?",retryHook:"Ya lo corregi, agrega los cambios y vuelve a intentarlo",skipHook:"Saltar el hook (--no-verify)",commitNoHooks:"Commit realizado (sin hooks)",pushToRemote:"Deseas subir la rama al repositorio remoto?",pushSuccess:"Push realizado",pushForceQuestion:"La rama ya existe en el remoto con historial diferente. Deseas forzar el push? (git push -f)",pushForceSuccess:"Push forzado realizado",pushForceError:e=>`Error en el push forzado: ${e}`,pushError:e=>`Error en el push: ${e}`,summaryTitle:"Resumen",summaryBranch:"Rama",summaryFrom:"Desde",summaryCommit:"Commit",summaryFiles:e=>`${e} archivos commiteados`,summaryPush:"Push",summaryPR:"Crear PR",statusModified:"modificado",statusAdded:"agregado",statusDeleted:"eliminado",statusRenamed:"renombrado",statusUntracked:"sin rastrear",commitTypes:{fix:"fix \u2014 correccion de bug",feat:"feat \u2014 nueva funcionalidad",refactor:"refactor \u2014 mejora sin cambio funcional",chore:"chore \u2014 mantenimiento, dependencias",docs:"docs \u2014 documentacion",test:"test \u2014 pruebas",ci:"ci \u2014 integracion continua",perf:"perf \u2014 rendimiento",style:"style \u2014 formato, sin cambio de logica"},selectBranchType:"Selecciona el tipo de rama:",branchFix:"Fix",branchImprovement:"Mejora",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creando rama original...",branchCreatedAndPushed:e=>`Rama "${e}" creada y pusheada correctamente!`,branchCreatedSuccess:e=>`Rama "${e}" creada correctamente!`,mergeBranchQuestion:"A que rama deseas hacer merge?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Rama temporal creada correctamente",temporalBranchMerged:"Rama temporal mergeada correctamente",conflictsDetected:"Conflictos detectados. Resolvelos manualmente!",branchPushedToRemote:"Rama pusheada al repositorio remoto",removeTemporalBranch:"Deseas eliminar la rama temporal?",temporalBranchDeleted:"Rama temporal eliminada correctamente",errorCreatingTemporal:"Error creando la rama temporal",enterJiraCode:"Ingresa el codigo del ticket JIRA:",jiraRequired:"El codigo JIRA es requerido!",jiraInvalidFormat:"El codigo JIRA debe tener el formato DPW-0000",fetchingRemote:"Obteniendo cambios remotos...",pullingChanges:"Aplicando cambios en tu rama...",pullError:e=>`Error: ${e}`,pushingChanges:"Subiendo cambios al remoto...",pushedSuccess:"Cambios subidos correctamente!",pushedForceSuccess:"Cambios subidos (forzado) correctamente!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Proporciona un mensaje de commit",stagingChanges:"Stageando cambios...",creatingCommit:"Creando commit...",commitCreated:"Commit creado correctamente!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Cambiando a la rama anterior...",switchedTo:e=>`Cambiado a rama ${e} correctamente!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Obteniendo ultimos cambios...",mergingWith:e=>`Mergeando con ${e}...`,pushingMerged:"Subiendo cambios mergeados...",mergeCompleted:"Merge completado correctamente!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Eliminando ultimo commit...",removeLastConfirm:"Esto eliminara el ultimo commit (los cambios se mantienen en staging). Continuar?",lastCommitRemoved:e=>`commit ${e} eliminado correctamente`,removedCommitDetail:"Detalle del commit",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Configurando tu entorno",configSaved:"Configuracion guardada",missingConfigValues:"Faltan valores de configuracion requeridos.",errorWritingConfig:"Error escribiendo archivo de configuracion:",currentConfig:"Configuracion actual",useThisConfig:"Deseas usar esta configuracion?",installingDeps:"Instalando dependencias...",depsInstalled:"Todas las dependencias fueron instaladas",authFailed:"Autenticacion fallida",unexpectedError:"Ocurrio un error inesperado",enterEndpoint:"Ingresa la URL del endpoint:",urlRequired:"La URL es requerida!",urlMustBeHttp:"La URL debe usar protocolo HTTP/HTTPS",urlMustHaveHost:"La URL debe incluir un hostname",urlInvalid:"Ingresa una URL valida",enterApiKey:"Ingresa tu apikey:",apiKeyRequired:"El API key es requerido!",enterRegistryName:"Ingresa el nombre del registro NPM (sin caracteres especiales):",registryNameRequired:"El nombre del registro es requerido!",registryNameLettersOnly:"El nombre del registro debe contener solo letras",enterRegistryURL:"Ingresa la URL del registro NPM (sin http/https):",registryURLRequired:"La URL del registro es requerida!",registryURLStartWithName:"La URL debe empezar con un nombre, evita caracteres especiales",registryURLNoProtocol:"La URL no debe incluir protocolo 'http/https' y debe empezar con una letra",registryURLNoSlash:"La URL no debe empezar con '/' y debe empezar con una letra o numero",registryURLNoWWW:"La URL no debe empezar con 'www' y debe empezar con una letra o numero",currentVersionLabel:"Version actual",checkingUpdates:"Buscando actualizaciones...",upgradeCheckFailed:"No se pudo verificar la ultima version",alreadyLatest:e=>`Ya tienes la ultima version (${e})`,upgrading:e=>`Actualizando a v${e}...`,upgradeError:"Error al actualizar eazy-git",upgradeSuccess:e=>`eazy-git actualizado a v${e}!`,languageSelect:"Selecciona el idioma de la interfaz:",languageChanged:e=>`Idioma cambiado a: ${e}`,configMenu:"Que deseas configurar?",configLanguage:"Cambiar idioma",configDefaultBranch:"Rama base por defecto",configAIProvider:"Proveedor de IA por defecto",configView:"Ver configuracion actual",defaultBranchSet:e=>`Rama base por defecto: ${e}`,aiProviderSet:e=>`Proveedor de IA por defecto: ${e}`,goBack:"Volver"};var Nu={welcome:"Welcome to",subtitle:"your trusted CLI for GIT branch management",operationCompleted:"Operation completed!",operationCancelled:"Operation cancelled. Exiting...",unknownCommand:"Unknown command",errorExecuting:"Error executing command",version:"eazy-git version",whatToDo:"What would you like to do?",addChanges:"Add Changes to Branch",createOriginal:"Create Original Branch",createTemporal:"Create Temporal Branch",notGitRepo:"This directory is not a git repository",gitNotInstalled:"git is not installed on the system",currentBranch:"Current branch",filesChanged:"Files with changes",noChangesPending:"No pending changes. Do you want to continue anyway?",updatingRefs:"Updating remote references...",refsUpdated:"References updated",fetchFailed:"Could not fetch (continuing...)",baseBranch:"From which base branch do you want to create the branch?",baseBranchRequired:"Base branch is required",ticketId:"What is the ticket identifier? (e.g.: DPW-0000)",ticketRequired:"Ticket is required",changeType:"What type of change is this?",branchExistsLocal:e=>`Branch "${e}" already exists locally. What would you like to do?`,switchToIt:"Switch to it and continue",cancel:"Cancel",cancelledOp:"Operation cancelled.",creatingBranch:(e,t)=>`Creating branch ${e} from origin/${t}...`,branchCreated:e=>`Branch ${e} created`,errorCreatingBranch:e=>`Error creating branch: ${e}`,noFilesToStage:"No files to stage.",selectFiles:"Which files do you want to include in the commit?",selectAllFiles:"Select all files",stagedFiles:"Staged files",stagedCorrect:"Are the staged files correct?",aiProvider:"Which AI do you want to use for the commit suggestion?",generatingCommit:e=>`Generating commit suggestion with ${e}...`,aiSuggestionFailed:e=>`Could not get suggestion from ${e}. Write the message manually.`,writeCommitMsg:"Write the commit message:",commitMsgRequired:"Message is required",suggestionOf:e=>`${e} suggestion`,useThisCommit:"Does this commit message look good?",yesUseIt:"Yes, use it",modify:"Modify",commitSuccess:"Commit created successfully",hookBlocked:"The pre-commit hook blocked the commit. What would you like to do?",retryHook:"I fixed it, re-stage and retry",skipHook:"Skip the hook (--no-verify)",commitNoHooks:"Commit created (without hooks)",pushToRemote:"Do you want to push the branch to the remote repository?",pushSuccess:"Push completed",pushForceQuestion:"The branch already exists on remote with different history. Force push? (git push -f)",pushForceSuccess:"Force push completed",pushForceError:e=>`Error in force push: ${e}`,pushError:e=>`Error in push: ${e}`,summaryTitle:"Summary",summaryBranch:"Branch",summaryFrom:"From",summaryCommit:"Commit",summaryFiles:e=>`${e} files committed`,summaryPush:"Push",summaryPR:"Create PR",statusModified:"modified",statusAdded:"added",statusDeleted:"deleted",statusRenamed:"renamed",statusUntracked:"untracked",commitTypes:{fix:"fix - bug fix",feat:"feat - new feature",refactor:"refactor - improvement without functional change",chore:"chore - maintenance, dependencies",docs:"docs - documentation",test:"test - testing",ci:"ci - continuous integration",perf:"perf - performance",style:"style - formatting, no logic change"},selectBranchType:"Select the branch type:",branchFix:"Fix",branchImprovement:"Improvement",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creating original branch...",branchCreatedAndPushed:e=>`Branch "${e}" created and pushed successfully!`,branchCreatedSuccess:e=>`Branch "${e}" created successfully!`,mergeBranchQuestion:"Which branch do you want to merge into?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Temporal branch created successfully",temporalBranchMerged:"Temporal branch merged successfully",conflictsDetected:"Conflicts detected. Please resolve them manually!",branchPushedToRemote:"Branch pushed to remote repository",removeTemporalBranch:"Do you want to remove the temporal branch?",temporalBranchDeleted:"Temporal branch deleted successfully",errorCreatingTemporal:"Error creating the temporal branch",enterJiraCode:"Enter the JIRA ticket code:",jiraRequired:"JIRA code is required!",jiraInvalidFormat:"JIRA code must have the format DPW-0000",fetchingRemote:"Fetching remote changes...",pullingChanges:"Pulling changes into your branch...",pullError:e=>`Error: ${e}`,pushingChanges:"Pushing changes to remote...",pushedSuccess:"Changes pushed successfully!",pushedForceSuccess:"Changes pushed (force) successfully!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Please provide a commit message",stagingChanges:"Staging changes...",creatingCommit:"Creating commit...",commitCreated:"Commit created successfully!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Switching to previous branch...",switchedTo:e=>`Successfully switched to ${e} branch!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Fetching latest changes...",mergingWith:e=>`Merging with ${e}...`,pushingMerged:"Pushing merged changes...",mergeCompleted:"Merge completed successfully!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Removing last commit...",removeLastConfirm:"This will remove the last commit (changes will remain in staging). Continue?",lastCommitRemoved:e=>`commit ${e} removed successfully`,removedCommitDetail:"Commit detail",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Setting up your configuration",configSaved:"Configuration saved",missingConfigValues:"Missing required configuration values.",errorWritingConfig:"Error writing configuration file:",currentConfig:"Current configuration",useThisConfig:"Would you like to use this configuration?",installingDeps:"Installing dependencies...",depsInstalled:"All dependencies were installed",authFailed:"Authentication failed",unexpectedError:"An unexpected error occurred",enterEndpoint:"Enter your endpoint URL:",urlRequired:"URL is required!",urlMustBeHttp:"URL must use HTTP/HTTPS protocol",urlMustHaveHost:"URL must include a hostname",urlInvalid:"Please enter a valid URL",enterApiKey:"Enter your apikey:",apiKeyRequired:"API key is required!",enterRegistryName:"Enter your NPM registry name (without special characters):",registryNameRequired:"Registry name is required!",registryNameLettersOnly:"Registry name must contain only letters",enterRegistryURL:"Enter your NPM registry URL (without http/https):",registryURLRequired:"Registry URL is required!",registryURLStartWithName:"URL must start with a name only, avoid special characters",registryURLNoProtocol:"URL must not include 'http/https' protocol and must start with a letter",registryURLNoSlash:"URL must not start with '/' and must begin with a letter or number",registryURLNoWWW:"URL must not start with 'www' and must begin with a letter or number",currentVersionLabel:"Current version",checkingUpdates:"Checking for updates...",upgradeCheckFailed:"Could not check the latest version",alreadyLatest:e=>`Already on the latest version (${e})`,upgrading:e=>`Upgrading to v${e}...`,upgradeError:"Error upgrading eazy-git",upgradeSuccess:e=>`eazy-git upgraded to v${e}!`,languageSelect:"Select the interface language:",languageChanged:e=>`Language changed to: ${e}`,configMenu:"What would you like to configure?",configLanguage:"Change language",configDefaultBranch:"Default base branch",configAIProvider:"Default AI provider",configView:"View current configuration",defaultBranchSet:e=>`Default base branch: ${e}`,aiProviderSet:e=>`Default AI provider: ${e}`,goBack:"Go back"};var be={es:Pu,en:Nu};function n(e,...t){let D=ee().language||"es",o=(be[D]||be.es)[e];return typeof o=="function"?o(...t):o||e}function _u(){let t=ee().language||"es";return(be[t]||be.es).commitTypes}function Ve(){if(c.step(n("fetchingRemote")),ju("git",["fetch"],{stdio:"inherit"}).status!==0){c.error(n("pullError","fetch failed"));return}c.step(n("pullingChanges")),ju("git",["pull","origin","HEAD"],{stdio:"inherit"}).status!==0&&c.error(n("pullError","pull failed"))}import{spawnSync as rr}from"child_process";function qe(e){let t=e.includes("-f")||e.includes("--force")||e.includes("-force");c.step(n("pushingChanges")),rr("git",t?["push","-f","origin","HEAD"]:["push","origin","HEAD"],{stdio:"inherit"}).status===0?c.success(t?n("pushedForceSuccess"):n("pushedSuccess")):c.error(n("pushQuickError","push failed"))}import{execSync as Be,spawnSync as Dr}from"child_process";function sr(e){let t=new Date(e),r=t.getFullYear(),D=t.toLocaleString("en",{month:"long"}),s=t.getDate(),o=t.toLocaleString("en",{weekday:"long"}),u=t.getHours(),a=String(t.getMinutes()).padStart(2,"0"),l=String(t.getSeconds()).padStart(2,"0"),h=u>=12?"PM":"AM",d=`${u%12||12}:${a}:${l} ${h}`,v=Intl.DateTimeFormat(void 0,{timeZoneName:"long"}).formatToParts(t).find(x=>x.type==="timeZoneName")?.value??"";return`${r} de ${D} ${s} (${o}) | ${d} | ${v}`}function ze(){let e=Be("git rev-parse HEAD",{encoding:"utf-8"}).trim(),t=Be('git log -1 --format="%an <%ae>"',{encoding:"utf-8"}).trim(),r=Be('git log -1 --format="%ai"',{encoding:"utf-8"}).trim(),D=Be('git log -1 --format="%s"',{encoding:"utf-8"}).trim();if(c.step(n("removingLastCommit")),Dr("git",["reset","--soft","HEAD~1"],{stdio:"inherit"}).status===0){c.success(n("lastCommitRemoved",e));let o=[`Author: ${t}`,`Date: ${sr(r)}`,"",` ${D}`].join(`
|
|
65
|
-
`);
|
|
59
|
+
`)},info:e=>{c.message(e,{symbol:i.default.blue(zt)})},success:e=>{c.message(e,{symbol:i.default.green(Ht)})},step:e=>{c.message(e,{symbol:i.default.green(le)})},warn:e=>{c.message(e,{symbol:i.default.yellow(Yt)})},warning:e=>{c.warn(e)},error:e=>{c.message(e,{symbol:i.default.red(Kt)})}},Yr=`${i.default.gray(d)} `;var wu=({indicator:e="dots"}={})=>{let t=Te?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],r=Te?80:120,D=process.env.CI==="true",o,s,u=!1,a="",h,l=performance.now(),C=y=>{let x=y>1?"Something went wrong":"Canceled";u&&Ke(x,y)},m=()=>C(2),p=()=>C(1),v=()=>{process.on("uncaughtExceptionMonitor",m),process.on("unhandledRejection",m),process.on("SIGINT",p),process.on("SIGTERM",p),process.on("exit",C)},S=()=>{process.removeListener("uncaughtExceptionMonitor",m),process.removeListener("unhandledRejection",m),process.removeListener("SIGINT",p),process.removeListener("SIGTERM",p),process.removeListener("exit",C)},L=()=>{if(h===void 0)return;D&&process.stdout.write(`
|
|
60
|
+
`);let y=h.split(`
|
|
61
|
+
`);process.stdout.write(ce.cursor.move(-999,y.length-1)),process.stdout.write(ce.erase.down(y.length))},U=y=>y.replace(/\.+$/,""),P=y=>{let x=(performance.now()-y)/1e3,M=Math.floor(x/60),W=Math.floor(x%60);return M>0?`[${M}m ${W}s]`:`[${W}s]`},O=(y="")=>{u=!0,o=pu(),a=U(y),l=performance.now(),process.stdout.write(`${i.default.gray(d)}
|
|
62
|
+
`);let x=0,M=0;v(),s=setInterval(()=>{if(D&&a===h)return;L(),h=a;let W=i.default.magenta(t[x]);if(D)process.stdout.write(`${W} ${a}...`);else if(e==="timer")process.stdout.write(`${W} ${a} ${P(l)}`);else{let et=".".repeat(Math.floor(M)).slice(0,3);process.stdout.write(`${W} ${a}${et}`)}x=x+1<t.length?x+1:0,M=M<t.length?M+.125:0},r)},Ke=(y="",x=0)=>{u=!1,clearInterval(s),L();let M=x===0?i.default.green(le):x===1?i.default.red(Bu):i.default.red(yu);a=U(y??a),e==="timer"?process.stdout.write(`${M} ${a} ${P(l)}
|
|
63
|
+
`):process.stdout.write(`${M} ${a}
|
|
64
|
+
`),S(),o()};return{start:O,stop:Ke,message:(y="")=>{a=U(y??a)}}};import{spawnSync as Ou}from"child_process";import{existsSync as Jt,readFileSync as Qt,writeFileSync as Zr,mkdirSync as Xr}from"fs";import Zt from"os";import Su from"path";var Xt=Su.join(Zt.homedir(),".eazy-git"),xu=Su.join(Xt,"config.json"),Ru={language:"es",defaultBaseBranch:"release",aiProvider:"claude"};function J(){try{if(Jt(xu)){let e=Qt(xu,"utf-8");return{...Ru,...JSON.parse(e)}}}catch{}return{...Ru}}var Tu={welcome:"Bienvenido a",subtitle:"tu CLI de confianza para gestionar ramas en GIT",operationCompleted:"Operacion completada!",operationCancelled:"Operacion cancelada. Saliendo...",unknownCommand:"Comando desconocido",errorExecuting:"Error al ejecutar el comando",version:"eazy-git version",whatToDo:"Que deseas hacer?",addChanges:"Agregar cambios a una rama",createOriginal:"Crear rama original",createTemporal:"Crear rama temporal",notGitRepo:"Este directorio no es un repositorio git",gitNotInstalled:"git no esta instalado en el sistema",currentBranch:"Branch actual",filesChanged:"Archivos con cambios",noChangesPending:"No hay cambios pendientes. Deseas continuar de todas formas?",updatingRefs:"Actualizando referencias remotas...",refsUpdated:"Referencias actualizadas",fetchFailed:"No se pudo hacer fetch (continuando...)",baseBranch:"Desde que branch base quieres crear la rama?",baseBranchRequired:"El branch base es requerido",ticketId:"Cual es el identificador del ticket? (ej: DPW-0000)",ticketRequired:"El ticket es requerido",changeType:"Que tipo de cambio es?",branchExistsLocal:e=>`La rama "${e}" ya existe localmente. Que deseas hacer?`,switchToIt:"Cambiarme a ella y continuar",cancel:"Cancelar",cancelledOp:"Operacion cancelada.",creatingBranch:(e,t)=>`Creando rama ${e} desde origin/${t}...`,branchCreated:e=>`Rama ${e} creada`,errorCreatingBranch:e=>`Error al crear la rama: ${e}`,noFilesToStage:"No hay archivos para stagear.",selectFiles:"Cuales archivos quieres incluir en el commit?",selectAllFiles:"Seleccionar todos los archivos",stagedFiles:"Archivos en stage",stagedCorrect:"Los archivos en stage son correctos?",aiProvider:"Con que IA quieres generar la sugerencia de commit?",generatingCommit:e=>`Generando sugerencia de commit con ${e}...`,aiSuggestionFailed:e=>`No se pudo obtener sugerencia de ${e}. Escribe el mensaje manualmente.`,writeCommitMsg:"Escribe el mensaje de commit:",commitMsgRequired:"El mensaje es requerido",suggestionOf:e=>`Sugerencia de ${e}`,useThisCommit:"Este mensaje de commit te parece bien?",yesUseIt:"Si, usar este",modify:"Modificar",commitSuccess:"Commit realizado correctamente",hookBlocked:"El pre-commit hook bloqueo el commit. Que deseas hacer?",retryHook:"Ya lo corregi, agrega los cambios y vuelve a intentarlo",skipHook:"Saltar el hook (--no-verify)",commitNoHooks:"Commit realizado (sin hooks)",pushToRemote:"Deseas subir la rama al repositorio remoto?",pushSuccess:"Push realizado",pushForceQuestion:"La rama ya existe en el remoto con historial diferente. Deseas forzar el push? (git push -f)",pushForceSuccess:"Push forzado realizado",pushForceError:e=>`Error en el push forzado: ${e}`,pushError:e=>`Error en el push: ${e}`,summaryTitle:"Resumen",summaryBranch:"Rama",summaryFrom:"Desde",summaryCommit:"Commit",summaryFiles:e=>`${e} archivos commiteados`,summaryPush:"Push",summaryPR:"Crear PR",statusModified:"modificado",statusAdded:"agregado",statusDeleted:"eliminado",statusRenamed:"renombrado",statusUntracked:"sin rastrear",commitTypes:{fix:"fix \u2014 correccion de bug",feat:"feat \u2014 nueva funcionalidad",refactor:"refactor \u2014 mejora sin cambio funcional",chore:"chore \u2014 mantenimiento, dependencias",docs:"docs \u2014 documentacion",test:"test \u2014 pruebas",ci:"ci \u2014 integracion continua",perf:"perf \u2014 rendimiento",style:"style \u2014 formato, sin cambio de logica"},selectBranchType:"Selecciona el tipo de rama:",branchFix:"Fix",branchImprovement:"Mejora",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creando rama original...",branchCreatedAndPushed:e=>`Rama "${e}" creada y pusheada correctamente!`,branchCreatedSuccess:e=>`Rama "${e}" creada correctamente!`,mergeBranchQuestion:"A que rama deseas hacer merge?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Rama temporal creada correctamente",temporalBranchMerged:"Rama temporal mergeada correctamente",conflictsDetected:"Conflictos detectados. Resolvelos manualmente!",branchPushedToRemote:"Rama pusheada al repositorio remoto",removeTemporalBranch:"Deseas eliminar la rama temporal?",temporalBranchDeleted:"Rama temporal eliminada correctamente",errorCreatingTemporal:"Error creando la rama temporal",enterJiraCode:"Ingresa el codigo del ticket JIRA:",jiraRequired:"El codigo JIRA es requerido!",jiraInvalidFormat:"El codigo JIRA debe tener el formato DPW-0000",fetchingRemote:"Obteniendo cambios remotos...",pullingChanges:"Aplicando cambios en tu rama...",pullError:e=>`Error: ${e}`,pushingChanges:"Subiendo cambios al remoto...",pushedSuccess:"Cambios subidos correctamente!",pushedForceSuccess:"Cambios subidos (forzado) correctamente!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Proporciona un mensaje de commit",stagingChanges:"Stageando cambios...",creatingCommit:"Creando commit...",commitCreated:"Commit creado correctamente!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Cambiando a la rama anterior...",switchedTo:e=>`Cambiado a rama ${e} correctamente!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Obteniendo ultimos cambios...",mergingWith:e=>`Mergeando con ${e}...`,pushingMerged:"Subiendo cambios mergeados...",mergeCompleted:"Merge completado correctamente!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Eliminando ultimo commit...",removeLastConfirm:"Esto eliminara el ultimo commit (los cambios se mantienen en staging). Continuar?",lastCommitRemoved:e=>`commit ${e} eliminado correctamente`,removedCommitDetail:"Detalle del commit",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Configurando tu entorno",configSaved:"Configuracion guardada",missingConfigValues:"Faltan valores de configuracion requeridos.",errorWritingConfig:"Error escribiendo archivo de configuracion:",currentConfig:"Configuracion actual",useThisConfig:"Deseas usar esta configuracion?",installingDeps:"Instalando dependencias...",depsInstalled:"Todas las dependencias fueron instaladas",authFailed:"Autenticacion fallida",unexpectedError:"Ocurrio un error inesperado",enterEndpoint:"Ingresa la URL del endpoint:",urlRequired:"La URL es requerida!",urlMustBeHttp:"La URL debe usar protocolo HTTP/HTTPS",urlMustHaveHost:"La URL debe incluir un hostname",urlInvalid:"Ingresa una URL valida",enterApiKey:"Ingresa tu apikey:",apiKeyRequired:"El API key es requerido!",enterRegistryName:"Ingresa el nombre del registro NPM (sin caracteres especiales):",registryNameRequired:"El nombre del registro es requerido!",registryNameLettersOnly:"El nombre del registro debe contener solo letras",enterRegistryURL:"Ingresa la URL del registro NPM (sin http/https):",registryURLRequired:"La URL del registro es requerida!",registryURLStartWithName:"La URL debe empezar con un nombre, evita caracteres especiales",registryURLNoProtocol:"La URL no debe incluir protocolo 'http/https' y debe empezar con una letra",registryURLNoSlash:"La URL no debe empezar con '/' y debe empezar con una letra o numero",registryURLNoWWW:"La URL no debe empezar con 'www' y debe empezar con una letra o numero",currentVersionLabel:"Version actual",checkingUpdates:"Buscando actualizaciones...",upgradeCheckFailed:"No se pudo verificar la ultima version",alreadyLatest:e=>`Ya tienes la ultima version (${e})`,upgrading:e=>`Actualizando a v${e}...`,upgradeError:"Error al actualizar eazy-git",upgradeSuccess:e=>`eazy-git actualizado a v${e}!`,languageSelect:"Selecciona el idioma de la interfaz:",languageChanged:e=>`Idioma cambiado a: ${e}`,configMenu:"Que deseas configurar?",configLanguage:"Cambiar idioma",configDefaultBranch:"Rama base por defecto",configAIProvider:"Proveedor de IA por defecto",configView:"Ver configuracion actual",defaultBranchSet:e=>`Rama base por defecto: ${e}`,aiProviderSet:e=>`Proveedor de IA por defecto: ${e}`,goBack:"Volver"};var ku={welcome:"Welcome to",subtitle:"your trusted CLI for GIT branch management",operationCompleted:"Operation completed!",operationCancelled:"Operation cancelled. Exiting...",unknownCommand:"Unknown command",errorExecuting:"Error executing command",version:"eazy-git version",whatToDo:"What would you like to do?",addChanges:"Add Changes to Branch",createOriginal:"Create Original Branch",createTemporal:"Create Temporal Branch",notGitRepo:"This directory is not a git repository",gitNotInstalled:"git is not installed on the system",currentBranch:"Current branch",filesChanged:"Files with changes",noChangesPending:"No pending changes. Do you want to continue anyway?",updatingRefs:"Updating remote references...",refsUpdated:"References updated",fetchFailed:"Could not fetch (continuing...)",baseBranch:"From which base branch do you want to create the branch?",baseBranchRequired:"Base branch is required",ticketId:"What is the ticket identifier? (e.g.: DPW-0000)",ticketRequired:"Ticket is required",changeType:"What type of change is this?",branchExistsLocal:e=>`Branch "${e}" already exists locally. What would you like to do?`,switchToIt:"Switch to it and continue",cancel:"Cancel",cancelledOp:"Operation cancelled.",creatingBranch:(e,t)=>`Creating branch ${e} from origin/${t}...`,branchCreated:e=>`Branch ${e} created`,errorCreatingBranch:e=>`Error creating branch: ${e}`,noFilesToStage:"No files to stage.",selectFiles:"Which files do you want to include in the commit?",selectAllFiles:"Select all files",stagedFiles:"Staged files",stagedCorrect:"Are the staged files correct?",aiProvider:"Which AI do you want to use for the commit suggestion?",generatingCommit:e=>`Generating commit suggestion with ${e}...`,aiSuggestionFailed:e=>`Could not get suggestion from ${e}. Write the message manually.`,writeCommitMsg:"Write the commit message:",commitMsgRequired:"Message is required",suggestionOf:e=>`${e} suggestion`,useThisCommit:"Does this commit message look good?",yesUseIt:"Yes, use it",modify:"Modify",commitSuccess:"Commit created successfully",hookBlocked:"The pre-commit hook blocked the commit. What would you like to do?",retryHook:"I fixed it, re-stage and retry",skipHook:"Skip the hook (--no-verify)",commitNoHooks:"Commit created (without hooks)",pushToRemote:"Do you want to push the branch to the remote repository?",pushSuccess:"Push completed",pushForceQuestion:"The branch already exists on remote with different history. Force push? (git push -f)",pushForceSuccess:"Force push completed",pushForceError:e=>`Error in force push: ${e}`,pushError:e=>`Error in push: ${e}`,summaryTitle:"Summary",summaryBranch:"Branch",summaryFrom:"From",summaryCommit:"Commit",summaryFiles:e=>`${e} files committed`,summaryPush:"Push",summaryPR:"Create PR",statusModified:"modified",statusAdded:"added",statusDeleted:"deleted",statusRenamed:"renamed",statusUntracked:"untracked",commitTypes:{fix:"fix - bug fix",feat:"feat - new feature",refactor:"refactor - improvement without functional change",chore:"chore - maintenance, dependencies",docs:"docs - documentation",test:"test - testing",ci:"ci - continuous integration",perf:"perf - performance",style:"style - formatting, no logic change"},selectBranchType:"Select the branch type:",branchFix:"Fix",branchImprovement:"Improvement",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creating original branch...",branchCreatedAndPushed:e=>`Branch "${e}" created and pushed successfully!`,branchCreatedSuccess:e=>`Branch "${e}" created successfully!`,mergeBranchQuestion:"Which branch do you want to merge into?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Temporal branch created successfully",temporalBranchMerged:"Temporal branch merged successfully",conflictsDetected:"Conflicts detected. Please resolve them manually!",branchPushedToRemote:"Branch pushed to remote repository",removeTemporalBranch:"Do you want to remove the temporal branch?",temporalBranchDeleted:"Temporal branch deleted successfully",errorCreatingTemporal:"Error creating the temporal branch",enterJiraCode:"Enter the JIRA ticket code:",jiraRequired:"JIRA code is required!",jiraInvalidFormat:"JIRA code must have the format DPW-0000",fetchingRemote:"Fetching remote changes...",pullingChanges:"Pulling changes into your branch...",pullError:e=>`Error: ${e}`,pushingChanges:"Pushing changes to remote...",pushedSuccess:"Changes pushed successfully!",pushedForceSuccess:"Changes pushed (force) successfully!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Please provide a commit message",stagingChanges:"Staging changes...",creatingCommit:"Creating commit...",commitCreated:"Commit created successfully!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Switching to previous branch...",switchedTo:e=>`Successfully switched to ${e} branch!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Fetching latest changes...",mergingWith:e=>`Merging with ${e}...`,pushingMerged:"Pushing merged changes...",mergeCompleted:"Merge completed successfully!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Removing last commit...",removeLastConfirm:"This will remove the last commit (changes will remain in staging). Continue?",lastCommitRemoved:e=>`commit ${e} removed successfully`,removedCommitDetail:"Commit detail",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Setting up your configuration",configSaved:"Configuration saved",missingConfigValues:"Missing required configuration values.",errorWritingConfig:"Error writing configuration file:",currentConfig:"Current configuration",useThisConfig:"Would you like to use this configuration?",installingDeps:"Installing dependencies...",depsInstalled:"All dependencies were installed",authFailed:"Authentication failed",unexpectedError:"An unexpected error occurred",enterEndpoint:"Enter your endpoint URL:",urlRequired:"URL is required!",urlMustBeHttp:"URL must use HTTP/HTTPS protocol",urlMustHaveHost:"URL must include a hostname",urlInvalid:"Please enter a valid URL",enterApiKey:"Enter your apikey:",apiKeyRequired:"API key is required!",enterRegistryName:"Enter your NPM registry name (without special characters):",registryNameRequired:"Registry name is required!",registryNameLettersOnly:"Registry name must contain only letters",enterRegistryURL:"Enter your NPM registry URL (without http/https):",registryURLRequired:"Registry URL is required!",registryURLStartWithName:"URL must start with a name only, avoid special characters",registryURLNoProtocol:"URL must not include 'http/https' protocol and must start with a letter",registryURLNoSlash:"URL must not start with '/' and must begin with a letter or number",registryURLNoWWW:"URL must not start with 'www' and must begin with a letter or number",currentVersionLabel:"Current version",checkingUpdates:"Checking for updates...",upgradeCheckFailed:"Could not check the latest version",alreadyLatest:e=>`Already on the latest version (${e})`,upgrading:e=>`Upgrading to v${e}...`,upgradeError:"Error upgrading eazy-git",upgradeSuccess:e=>`eazy-git upgraded to v${e}!`,languageSelect:"Select the interface language:",languageChanged:e=>`Language changed to: ${e}`,configMenu:"What would you like to configure?",configLanguage:"Change language",configDefaultBranch:"Default base branch",configAIProvider:"Default AI provider",configView:"View current configuration",defaultBranchSet:e=>`Default base branch: ${e}`,aiProviderSet:e=>`Default AI provider: ${e}`,goBack:"Go back"};var he={es:Tu,en:ku};function n(e,...t){let D=J().language||"es",s=(he[D]||he.es)[e];return typeof s=="function"?s(...t):s||e}function Mu(){let t=J().language||"es";return(he[t]||he.es).commitTypes}function Ie(){if(c.step(n("fetchingRemote")),Ou("git",["fetch"],{stdio:"inherit"}).status!==0){c.error(n("pullError","fetch failed"));return}c.step(n("pullingChanges")),Ou("git",["pull","origin","HEAD"],{stdio:"inherit"}).status!==0&&c.error(n("pullError","pull failed"))}import{spawnSync as er}from"child_process";function Le(e){let t=e.includes("-f")||e.includes("--force")||e.includes("-force");c.step(n("pushingChanges")),er("git",t?["push","-f","origin","HEAD"]:["push","origin","HEAD"],{stdio:"inherit"}).status===0?c.success(t?n("pushedForceSuccess"):n("pushedSuccess")):c.error(n("pushQuickError","push failed"))}import{execSync as de,spawnSync as ur}from"child_process";function tr(e){let t=new Date(e),r=t.getFullYear(),D=t.toLocaleString("en",{month:"long"}),o=t.getDate(),s=t.toLocaleString("en",{weekday:"long"}),u=t.getHours(),a=String(t.getMinutes()).padStart(2,"0"),h=String(t.getSeconds()).padStart(2,"0"),l=u>=12?"PM":"AM",m=`${u%12||12}:${a}:${h} ${l}`,p=Intl.DateTimeFormat(void 0,{timeZoneName:"long"}).formatToParts(t).find(v=>v.type==="timeZoneName")?.value??"";return`${r} de ${D} ${o} (${s}) | ${m} | ${p}`}function Pe(){let e=de("git rev-parse HEAD",{encoding:"utf-8"}).trim(),t=de('git log -1 --format="%an <%ae>"',{encoding:"utf-8"}).trim(),r=de('git log -1 --format="%ai"',{encoding:"utf-8"}).trim(),D=de('git log -1 --format="%s"',{encoding:"utf-8"}).trim();if(c.step(n("removingLastCommit")),ur("git",["reset","--soft","HEAD~1"],{stdio:"inherit"}).status===0){c.success(n("lastCommitRemoved",e));let s=[`Author: ${t}`,`Date: ${tr(r)}`,"",` ${D}`].join(`
|
|
65
|
+
`);V(s,n("removedCommitDetail"))}else c.error(n("removeLastError","reset failed"))}import{spawnSync as Ne}from"child_process";function _e(e){let t=e[0]??"develop";if(c.step(n("fetchingLatest")),Ne("git",["fetch"],{stdio:"inherit"}),c.step(n("mergingWith",t)),Ne("git",["merge",`origin/${t}`],{stdio:"inherit"}).status!==0){c.error(n("mergeError","merge failed"));return}c.step(n("pushingMerged")),Ne("git",["push","origin","HEAD"],{stdio:"inherit"}).status===0?c.success(n("mergeCompleted")):c.error(n("mergeError","push failed"))}import{execSync as Ju,spawnSync as Qu}from"child_process";function $(e){if(ae(e))return Au(n("operationCancelled")),process.exit(0)}import{execSync as rr}from"child_process";function je(e){let t=e.match(/^[MADRCU? ]{2}\s+(.+)$/),r=t?t[1]:e.replace(/^[MADRCU? ]+\s+/,"");return r.includes(" -> ")?r.split(" -> ")[1].trim():r.trim()}function Ce(){let e=rr("git status --short",{encoding:"utf-8"}).trim();return e?e.split(`
|
|
66
|
+
`):[]}function Iu(){return{M:n("statusModified"),A:n("statusAdded"),D:n("statusDeleted"),R:n("statusRenamed"),"??":n("statusUntracked")}}import{execSync as fr,spawnSync as qe}from"child_process";var Lu=(e=0)=>t=>`\x1B[${t+e}m`,Pu=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Nu=(e=0)=>(t,r,D)=>`\x1B[${38+e};2;${t};${r};${D}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]}},TD=Object.keys(g.modifier),Dr=Object.keys(g.color),or=Object.keys(g.bgColor),kD=[...Dr,...or];function sr(){let e=new Map;for(let[t,r]of Object.entries(g)){for(let[D,o]of Object.entries(r))g[D]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},r[D]=g[D],e.set(o[0],o[1]);Object.defineProperty(g,t,{value:r,enumerable:!1})}return Object.defineProperty(g,"codes",{value:e,enumerable:!1}),g.color.close="\x1B[39m",g.bgColor.close="\x1B[49m",g.color.ansi=Lu(),g.color.ansi256=Pu(),g.color.ansi16m=Nu(),g.bgColor.ansi=Lu(10),g.bgColor.ansi256=Pu(10),g.bgColor.ansi16m=Nu(10),Object.defineProperties(g,{rgbToAnsi256:{value(t,r,D){return t===r&&r===D?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(D/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[D]=r;D.length===3&&(D=[...D].map(s=>s+s).join(""));let o=Number.parseInt(D,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>g.rgbToAnsi256(...g.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,D,o;if(t>=232)r=((t-232)*10+8)/255,D=r,o=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,D=Math.floor(a/6)/5,o=a%6/5}let s=Math.max(r,D,o)*2;if(s===0)return 30;let u=30+(Math.round(o)<<2|Math.round(D)<<1|Math.round(r));return s===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(t,r,D)=>g.ansi256ToAnsi(g.rgbToAnsi256(t,r,D)),enumerable:!1},hexToAnsi:{value:t=>g.ansi256ToAnsi(g.hexToAnsi256(t)),enumerable:!1}}),g}var ir=sr(),k=ir;import Ue from"node:process";import nr from"node:os";import _u from"node:tty";function R(e,t=globalThis.Deno?globalThis.Deno.args:Ue.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",D=t.indexOf(r+e),o=t.indexOf("--");return D!==-1&&(o===-1||D<o)}var{env:E}=Ue,Fe;R("no-color")||R("no-colors")||R("color=false")||R("color=never")?Fe=0:(R("color")||R("colors")||R("color=true")||R("color=always"))&&(Fe=1);function ar(){if("FORCE_COLOR"in E)return E.FORCE_COLOR==="true"?1:E.FORCE_COLOR==="false"?0:E.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(E.FORCE_COLOR,10),3)}function cr(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function lr(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let D=ar();D!==void 0&&(Fe=D);let o=r?Fe:D;if(o===0)return 0;if(r){if(R("color=16m")||R("color=full")||R("color=truecolor"))return 3;if(R("color=256"))return 2}if("TF_BUILD"in E&&"AGENT_NAME"in E)return 1;if(e&&!t&&o===void 0)return 0;let s=o||0;if(E.TERM==="dumb")return s;if(Ue.platform==="win32"){let u=nr.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in E)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(u=>u in E)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in E)||E.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in E)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(E.TEAMCITY_VERSION)?1:0;if(E.COLORTERM==="truecolor"||E.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in E){let u=Number.parseInt((E.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(E.TERM_PROGRAM){case"iTerm.app":return u>=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:s}function ju(e,t={}){let r=lr(e,{streamIsTTY:e&&e.isTTY,...t});return cr(r)}var mr={stdout:ju({isTTY:_u.isatty(1)}),stderr:ju({isTTY:_u.isatty(2)})},Uu=mr;function Wu(e,t,r){let D=e.indexOf(t);if(D===-1)return e;let o=t.length,s=0,u="";do u+=e.slice(s,D)+t+r,s=D+o,D=e.indexOf(t,s);while(D!==-1);return u+=e.slice(s),u}function Gu(e,t,r,D){let o=0,s="";do{let u=e[D-1]==="\r";s+=e.slice(o,u?D-1:D)+t+(u?`\r
|
|
66
67
|
`:`
|
|
67
|
-
`)+r,
|
|
68
|
-
`,
|
|
69
|
-
`);return
|
|
70
|
-
`):[]}function Br(e){let t=e[0];t||(c.error(n("provideCommitMsg")),process.exit(1)),c.step(n("stagingChanges")),N("git",["add","."],{stdio:"inherit"}),c.step(n("creatingCommit")),N("git",["commit","-m",t],{stdio:"inherit"}).status===0?c.success(n("commitCreated")):c.error(n("commitError","commit failed"))}async function $r(){let e=ee(),t=_u(),r=Object.entries(t).map(([p,$])=>({value:p,label:$})),D={M:n("statusModified"),A:n("statusAdded"),D:n("statusDeleted"),R:n("statusRenamed"),"??":n("statusUntracked")},s=ve("git rev-parse --abbrev-ref HEAD",{encoding:"utf-8"}).trim(),o=Xu();if(c.info(`${n("currentBranch")}: ${s}`),c.info(`${n("filesChanged")}: ${o.length}`),o.length===0){c.warn(n("noFilesToStage"));return}let u=await fe({message:I.secondary(n("ticketId")),placeholder:"DPW-0000"});k(u);let a=u?.trim(),l=await Z({message:I.secondary(n("changeType")),options:r});k(l);let h=Mu(),F=!1;for(;!F;){let p=Xu();if(p.length===0){c.warn(n("noFilesToStage"));return}let $="__select_all__",_=p.map(K=>{let J=K.slice(0,2).trim(),oe=Zu(K),rt=D[J]??J;return{value:K,label:oe,hint:rt}}),O=await Su({message:I.secondary(n("selectFiles")),options:[{value:$,label:I.primary(n("selectAllFiles"))},..._],required:!0});k(O);let L=O.includes($)?p:O;N("git",["restore","--staged","."],{encoding:"utf-8"});for(let K of L){let J=Zu(K),oe=N("git",["add","--",J],{encoding:"utf-8"});oe.status!==0&&c.error(`git add failed for ${J}: ${oe.stderr}`)}let tt=ve("git status --short",{encoding:"utf-8"}).trim();X(tt,n("stagedFiles"));let uu=await Tu({message:n("stagedCorrect")});k(uu),F=uu,F||N("git",["restore","--staged","."],{encoding:"utf-8"})}let d=ve("git diff --cached",{encoding:"utf-8"}),x=`Analiza el siguiente git diff y sugiere UN SOLO mensaje de commit en formato convencional.
|
|
68
|
+
`)+r,o=D+1,D=e.indexOf(`
|
|
69
|
+
`,o)}while(D!==-1);return s+=e.slice(o),s}var{stdout:Vu,stderr:qu}=Uu,We=Symbol("GENERATOR"),q=Symbol("STYLER"),Q=Symbol("IS_EMPTY"),zu=["ansi","ansi","ansi256","ansi16m"],z=Object.create(null),hr=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Vu?Vu.level:0;e.level=t.level===void 0?r:t.level};var dr=e=>{let t=(...r)=>r.join(" ");return hr(t,e),Object.setPrototypeOf(t,Z.prototype),t};function Z(e){return dr(e)}Object.setPrototypeOf(Z.prototype,Function.prototype);for(let[e,t]of Object.entries(k))z[e]={get(){let r=ge(this,Ve(t.open,t.close,this[q]),this[Q]);return Object.defineProperty(this,e,{value:r}),r}};z.visible={get(){let e=ge(this,this[q],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Ge=(e,t,r,...D)=>e==="rgb"?t==="ansi16m"?k[r].ansi16m(...D):t==="ansi256"?k[r].ansi256(k.rgbToAnsi256(...D)):k[r].ansi(k.rgbToAnsi(...D)):e==="hex"?Ge("rgb",t,r,...k.hexToRgb(...D)):k[r][e](...D),Cr=["rgb","hex","ansi256"];for(let e of Cr){z[e]={get(){let{level:r}=this;return function(...D){let o=Ve(Ge(e,zu[r],"color",...D),k.color.close,this[q]);return ge(this,o,this[Q])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);z[t]={get(){let{level:r}=this;return function(...D){let o=Ve(Ge(e,zu[r],"bgColor",...D),k.bgColor.close,this[q]);return ge(this,o,this[Q])}}}}var Fr=Object.defineProperties(()=>{},{...z,level:{enumerable:!0,get(){return this[We].level},set(e){this[We].level=e}}}),Ve=(e,t,r)=>{let D,o;return r===void 0?(D=e,o=t):(D=r.openAll+e,o=t+r.closeAll),{open:e,close:t,openAll:D,closeAll:o,parent:r}},ge=(e,t,r)=>{let D=(...o)=>gr(D,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(D,Fr),D[We]=e,D[q]=t,D[Q]=r,D},gr=(e,t)=>{if(e.level<=0||!t)return e[Q]?"":t;let r=e[q];if(r===void 0)return t;let{openAll:D,closeAll:o}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Wu(t,r.close,r.open),r=r.parent;let s=t.indexOf(`
|
|
70
|
+
`);return s!==-1&&(t=Gu(t,o,D,s)),D+t+o};Object.defineProperties(Z.prototype,z);var pr=Z(),WD=Z({level:qu?qu.level:0});var j=pr;var H={primary:"#57d7c4",secondary:"#199288",muted:"#9ca3af",success:"#06D6A0",error:"#EF4444",warning:"#F59E0B"},w={primary:e=>j.hex(H.primary)(e),secondary:e=>j.hex(H.secondary)(e),muted:e=>j.hex(H.muted)(e),success:e=>j.hex(H.success)(e),error:e=>j.hex(H.error)(e),warning:e=>j.hex(H.warning)(e)};async function Hu(){let e=Iu(),t=!1;for(;!t;){let r=Ce();if(r.length===0)return c.warn(n("noFilesToStage")),!1;let D="__select_all__",o=r.map(l=>{let C=l.slice(0,2).trim(),m=je(l),p=e[C]??C;return{value:l,label:m,hint:p}}),s=await vu({message:w.secondary(n("selectFiles")),options:[{value:D,label:w.primary(n("selectAllFiles"))},...o],required:!0});$(s);let u=s.includes(D)?r:s;qe("git",["restore","--staged","."],{encoding:"utf-8"});for(let l of u){let C=je(l),m=qe("git",["add","--",C],{encoding:"utf-8"});m.status!==0&&c.error(`git add failed for ${C}: ${m.stderr}`)}let a=fr("git status --short",{encoding:"utf-8"}).trim();V(a,n("stagedFiles"));let h=await $u({message:n("stagedCorrect")});$(h),t=h,t||qe("git",["restore","--staged","."],{encoding:"utf-8"})}return!0}import{spawn as Er}from"child_process";async function Yu({diff:e,commitPrefix:t}){let r=J(),D=`Analiza el siguiente git diff y sugiere UN SOLO mensaje de commit en formato convencional.
|
|
71
71
|
|
|
72
|
-
Formato requerido: ${
|
|
72
|
+
Formato requerido: ${t}description in english
|
|
73
73
|
Reglas:
|
|
74
74
|
- Maximo 72 caracteres en total
|
|
75
75
|
- Verbo en presente ("add", "fix", "update", NO "added", "fixed")
|
|
@@ -78,4 +78,4 @@ Reglas:
|
|
|
78
78
|
- Responde UNICAMENTE con el mensaje de commit, sin explicaciones, sin comillas, sin markdown
|
|
79
79
|
|
|
80
80
|
Git diff:
|
|
81
|
-
${
|
|
81
|
+
${e}`,o=await _({message:w.secondary(n("aiProvider")),options:[{value:"claude",label:"Claude"},{value:"opencode",label:"Opencode"}],initialValue:r.aiProvider});$(o);let s={claude:{binary:"claude",args:["-p",D],label:"Claude"},opencode:{binary:"opencode",args:["run",D],label:"Opencode"}},{binary:u,args:a,label:h}=s[o],l=wu();l.start(n("generatingCommit",h));let C=await new Promise(S=>{let L="",U="",P=Er(u,a,{stdio:["ignore","pipe","pipe"]});P.stdout.on("data",O=>{L+=O}),P.stderr.on("data",O=>{U+=O}),P.on("close",O=>S({status:O,stdout:L,stderr:U,error:null})),P.on("error",O=>S({status:1,stdout:"",stderr:"",error:O}))});if(l.stop(""),C.error||C.status!==0){c.warn(n("aiSuggestionFailed",h));let S=await K({message:w.secondary(n("writeCommitMsg")),initialValue:t,validate:L=>L?.trim()?void 0:n("commitMsgRequired")});return $(S),S}let m=C.stdout.trim();V(m,n("suggestionOf",h));let p=await _({message:w.secondary(n("useThisCommit")),options:[{value:"yes",label:n("yesUseIt")},{value:"modify",label:n("modify")}]});if($(p),p==="yes")return m;let v=await K({message:w.secondary(n("writeCommitMsg")),initialValue:m,validate:S=>S?.trim()?void 0:n("commitMsgRequired")});return $(v),v}import{spawnSync as ze}from"child_process";async function Ku(e){let t=!1;for(;!t;)if(ze("git",["commit","-m",e],{stdio:"inherit"}).status===0)c.success(n("commitSuccess")),t=!0;else{let D=await _({message:w.secondary(n("hookBlocked")),options:[{value:"retry",label:n("retryHook")},{value:"noverify",label:n("skipHook")},{value:"cancel",label:n("cancel")}]});if($(D),D==="cancel")return!1;D==="noverify"&&(ze("git",["commit","--no-verify","-m",e],{stdio:"inherit"}),c.success(n("commitNoHooks")),t=!0),D==="retry"&&ze("git",["add","-u"],{stdio:"inherit"})}return!0}function br(e){let t=e[0];t||(c.error(n("provideCommitMsg")),process.exit(1)),c.step(n("stagingChanges")),Qu("git",["add","."],{stdio:"inherit"}),c.step(n("creatingCommit")),Qu("git",["commit","-m",t],{stdio:"inherit"}).status===0?c.success(n("commitCreated")):c.error(n("commitError","commit failed"))}async function Br(){let e=Mu(),t=Object.entries(e).map(([m,p])=>({value:m,label:p})),r=Ju("git rev-parse --abbrev-ref HEAD",{encoding:"utf-8"}).trim(),D=Ce();if(c.info(`${n("currentBranch")}: ${r}`),c.info(`${n("filesChanged")}: ${D.length}`),D.length===0){c.warn(n("noFilesToStage"));return}let o=await K({message:w.secondary(n("ticketId"))});$(o);let s=o?.trim(),u=await _({message:w.secondary(n("changeType")),options:t});if($(u),!await Hu())return;let h=Ju("git diff --cached",{encoding:"utf-8"}),l=s?`${u}(${o.trim()}): `:`${u}: `,C=await Yu({diff:h,commitPrefix:l});await Ku(C)}async function He(e){try{e.length>0?br(e):await Br()}catch(t){c.error(t.message),process.exit(1)}}import{spawnSync as yr}from"child_process";function Ye(e=[]){yr("git",["log",...e],{stdio:"inherit"}).status!==0&&(c.error(n("logError","git log failed")),process.exit(1))}import{spawnSync as $r}from"child_process";function pe(e){let t=e[0]||"-",r=t==="-";r&&c.step(n("switchingPrevBranch")),$r("git",["checkout",t],{stdio:"inherit"}).status===0?c.success(n("switchedTo",r?"previous":t)):(c.error(n("checkoutError","checkout failed")),process.exit(1))}import{existsSync as vr}from"fs";import{join as Ar}from"path";import{execSync as wr}from"child_process";var xr=()=>{try{wr("git --version",{stdio:"ignore"})}catch{c.error(n("gitNotInstalled")),process.exit(1)}let e=Ar(process.cwd(),".git");vr(e)||(c.error(n("notGitRepo")),process.exit(1))},Zu=xr;Zu();var Xu=process.argv[1].split("/").pop(),X=process.argv.slice(2),Rr={pull:Ie,push:()=>Le(X),removelast:Pe,mergewith:()=>_e(X),commit:()=>He(X),checkout:()=>pe(X),back:()=>pe("-"),log:()=>Ye(X)};async function Sr(){try{let e=Rr[Xu];e||(c.error(`${n("unknownCommand")}: ${Xu}`),process.exit(1)),await e(),process.exit(0)}catch(e){c.error(`${n("errorExecuting")}: ${e.message}`),process.exit(1)}}Sr();
|