create-openfort 0.0.2 → 0.0.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.
Files changed (2) hide show
  1. package/dist/index.mjs +22 -22
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import"node:util";import k,{stdin as Eu,stdout as hu}from"node:process";import*as W from"node:readline";import du from"node:readline";import{Writable as Nu}from"node:stream";import{spawn as fu}from"node:child_process";import v from"node:fs";import w from"node:path";function X(e){return e==null?[]:Array.isArray(e)?e:[e]}function Ku(e,D,t,r){var i,s=e[D],u=~r.string.indexOf(D)?t==null||t===!0?"":String(t):typeof t=="boolean"?t:~r.boolean.indexOf(D)?t==="false"?!1:t==="true"||(e._.push((i=+t,i*0===0?i:t)),!!t):(i=+t,i*0===0?i:t);e[D]=s==null?u:Array.isArray(s)?s.concat(u):[s,u]}function Yu(e,D){e=e||[],D=D||{};var t,r,i,s,u,o={_:[]},n=0,a=0,l=0,C=e.length;const c=D.alias!==void 0,g=D.unknown!==void 0,O=D.default!==void 0;if(D.alias=D.alias||{},D.string=X(D.string),D.boolean=X(D.boolean),c)for(t in D.alias)for(r=D.alias[t]=X(D.alias[t]),n=0;n<r.length;n++)(D.alias[r[n]]=r.concat(t)).splice(n,1);for(n=D.boolean.length;n-- >0;)for(r=D.alias[D.boolean[n]]||[],a=r.length;a-- >0;)D.boolean.push(r[a]);for(n=D.string.length;n-- >0;)for(r=D.alias[D.string[n]]||[],a=r.length;a-- >0;)D.string.push(r[a]);if(O){for(t in D.default)if(s=typeof D.default[t],r=D.alias[t]=D.alias[t]||[],D[s]!==void 0)for(D[s].push(t),n=0;n<r.length;n++)D[s].push(r[n])}const M=g?Object.keys(D.alias):[];for(n=0;n<C;n++){if(i=e[n],i==="--"){o._=o._.concat(e.slice(++n));break}for(a=0;a<i.length&&i.charCodeAt(a)===45;a++);if(a===0)o._.push(i);else if(i.substring(a,a+3)==="no-"){if(s=i.substring(a+3),g&&!~M.indexOf(s))return D.unknown(i);o[s]=!1}else{for(l=a+1;l<i.length&&i.charCodeAt(l)!==61;l++);for(s=i.substring(a,l),u=i.substring(++l)||n+1===C||(""+e[n+1]).charCodeAt(0)===45||e[++n],r=a===2?[s]:s,l=0;l<r.length;l++){if(s=r[l],g&&!~M.indexOf(s))return D.unknown("-".repeat(a)+s);Ku(o,s,l+1<r.length||u,D)}}}if(O)for(t in D.default)o[t]===void 0&&(o[t]=D.default[t]);if(c)for(t in o)for(r=D.alias[t]||[];r.length>0;)o[r.shift()]=o[t];return o}function zu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uu,pu;function Wu(){if(pu)return uu;pu=1;const e="\x1B",D=`${e}[`,t="\x07",r={to(u,o){return o?`${D}${o+1};${u+1}H`:`${D}${u+1}G`},move(u,o){let n="";return u<0?n+=`${D}${-u}D`:u>0&&(n+=`${D}${u}C`),o<0?n+=`${D}${-o}A`:o>0&&(n+=`${D}${o}B`),n},up:(u=1)=>`${D}${u}A`,down:(u=1)=>`${D}${u}B`,forward:(u=1)=>`${D}${u}C`,backward:(u=1)=>`${D}${u}D`,nextLine:(u=1)=>`${D}E`.repeat(u),prevLine:(u=1)=>`${D}F`.repeat(u),left:`${D}G`,hide:`${D}?25l`,show:`${D}?25h`,save:`${e}7`,restore:`${e}8`},i={up:(u=1)=>`${D}S`.repeat(u),down:(u=1)=>`${D}T`.repeat(u)},s={screen:`${D}2J`,up:(u=1)=>`${D}1J`.repeat(u),down:(u=1)=>`${D}J`.repeat(u),line:`${D}2K`,lineEnd:`${D}K`,lineStart:`${D}1K`,lines(u){let o="";for(let n=0;n<u;n++)o+=this.line+(n<u-1?r.up():"");return u&&(o+=r.left),o}};return uu={cursor:r,scroll:i,erase:s,beep:t},uu}var m=Wu(),V={exports:{}},Bu;function Vu(){if(Bu)return V.exports;Bu=1;let e=process||{},D=e.argv||[],t=e.env||{},r=!(t.NO_COLOR||D.includes("--no-color"))&&(!!t.FORCE_COLOR||D.includes("--color")||e.platform==="win32"||(e.stdout||{}).isTTY&&t.TERM!=="dumb"||!!t.CI),i=(o,n,a=o)=>l=>{let C=""+l,c=C.indexOf(n,o.length);return~c?o+s(C,n,a,c)+n:o+C+n},s=(o,n,a,l)=>{let C="",c=0;do C+=o.substring(c,l)+a,c=l+n.length,l=o.indexOf(n,c);while(~l);return C+o.substring(c)},u=(o=r)=>{let n=o?i:()=>String;return{isColorSupported:o,reset:n("\x1B[0m","\x1B[0m"),bold:n("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:n("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:n("\x1B[3m","\x1B[23m"),underline:n("\x1B[4m","\x1B[24m"),inverse:n("\x1B[7m","\x1B[27m"),hidden:n("\x1B[8m","\x1B[28m"),strikethrough:n("\x1B[9m","\x1B[29m"),black:n("\x1B[30m","\x1B[39m"),red:n("\x1B[31m","\x1B[39m"),green:n("\x1B[32m","\x1B[39m"),yellow:n("\x1B[33m","\x1B[39m"),blue:n("\x1B[34m","\x1B[39m"),magenta:n("\x1B[35m","\x1B[39m"),cyan:n("\x1B[36m","\x1B[39m"),white:n("\x1B[37m","\x1B[39m"),gray:n("\x1B[90m","\x1B[39m"),bgBlack:n("\x1B[40m","\x1B[49m"),bgRed:n("\x1B[41m","\x1B[49m"),bgGreen:n("\x1B[42m","\x1B[49m"),bgYellow:n("\x1B[43m","\x1B[49m"),bgBlue:n("\x1B[44m","\x1B[49m"),bgMagenta:n("\x1B[45m","\x1B[49m"),bgCyan:n("\x1B[46m","\x1B[49m"),bgWhite:n("\x1B[47m","\x1B[49m"),blackBright:n("\x1B[90m","\x1B[39m"),redBright:n("\x1B[91m","\x1B[39m"),greenBright:n("\x1B[92m","\x1B[39m"),yellowBright:n("\x1B[93m","\x1B[39m"),blueBright:n("\x1B[94m","\x1B[39m"),magentaBright:n("\x1B[95m","\x1B[39m"),cyanBright:n("\x1B[96m","\x1B[39m"),whiteBright:n("\x1B[97m","\x1B[39m"),bgBlackBright:n("\x1B[100m","\x1B[49m"),bgRedBright:n("\x1B[101m","\x1B[49m"),bgGreenBright:n("\x1B[102m","\x1B[49m"),bgYellowBright:n("\x1B[103m","\x1B[49m"),bgBlueBright:n("\x1B[104m","\x1B[49m"),bgMagentaBright:n("\x1B[105m","\x1B[49m"),bgCyanBright:n("\x1B[106m","\x1B[49m"),bgWhiteBright:n("\x1B[107m","\x1B[49m")}};return V.exports=u(),V.exports.createColors=u,V.exports}var qu=Vu();const F=zu(qu);function Gu({onlyFirst:e=!1}={}){const D=["[\\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(D,e?void 0:"g")}const Hu=Gu();function gu(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Hu,"")}function mu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bu={exports:{}};(function(e){var D={};e.exports=D,D.eastAsianWidth=function(r){var i=r.charCodeAt(0),s=r.length==2?r.charCodeAt(1):0,u=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,u=i<<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"},D.characterLength=function(r){var i=this.eastAsianWidth(r);return i=="F"||i=="W"||i=="A"?2:1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}D.length=function(r){for(var i=t(r),s=0,u=0;u<i.length;u++)s=s+this.characterLength(i[u]);return s},D.slice=function(r,i,s){textLen=D.length(r),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var u="",o=0,n=t(r),a=0;a<n.length;a++){var l=n[a],C=D.length(l);if(o>=i-(C==2?1:0))if(o+C<=s)u+=l;else break;o+=C}return u}})(bu);var Uu=bu.exports;const Ju=mu(Uu);var Zu=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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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-\u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CAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const Qu=mu(Zu);function L(e,D={}){if(typeof e!="string"||e.length===0||(D={ambiguousIsNarrow:!0,...D},e=gu(e),e.length===0))return 0;e=e.replace(Qu()," ");const t=D.ambiguousIsNarrow?1:2;let r=0;for(const i of e){const s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(Ju.eastAsianWidth(i)){case"F":case"W":r+=2;break;case"A":r+=t;break;default:r+=1}}return r}const Du=10,Au=(e=0)=>D=>`\x1B[${D+e}m`,vu=(e=0)=>D=>`\x1B[${38+e};5;${D}m`,wu=(e=0)=>(D,t,r)=>`\x1B[${38+e};2;${D};${t};${r}m`,E={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(E.modifier);const Xu=Object.keys(E.color),uD=Object.keys(E.bgColor);[...Xu,...uD];function DD(){const e=new Map;for(const[D,t]of Object.entries(E)){for(const[r,i]of Object.entries(t))E[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[r]=E[r],e.set(i[0],i[1]);Object.defineProperty(E,D,{value:t,enumerable:!1})}return Object.defineProperty(E,"codes",{value:e,enumerable:!1}),E.color.close="\x1B[39m",E.bgColor.close="\x1B[49m",E.color.ansi=Au(),E.color.ansi256=vu(),E.color.ansi16m=wu(),E.bgColor.ansi=Au(Du),E.bgColor.ansi256=vu(Du),E.bgColor.ansi16m=wu(Du),Object.defineProperties(E,{rgbToAnsi256:{value:(D,t,r)=>D===t&&t===r?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:D=>{const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!t)return[0,0,0];let[r]=t;r.length===3&&(r=[...r].map(s=>s+s).join(""));const i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:D=>E.rgbToAnsi256(...E.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value:D=>{if(D<8)return 30+D;if(D<16)return 90+(D-8);let t,r,i;if(D>=232)t=((D-232)*10+8)/255,r=t,i=t;else{D-=16;const o=D%36;t=Math.floor(D/36)/5,r=Math.floor(o/6)/5,i=o%6/5}const s=Math.max(t,r,i)*2;if(s===0)return 30;let u=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(t));return s===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(D,t,r)=>E.ansi256ToAnsi(E.rgbToAnsi256(D,t,r)),enumerable:!1},hexToAnsi:{value:D=>E.ansi256ToAnsi(E.hexToAnsi256(D)),enumerable:!1}}),E}const eD=DD(),q=new Set(["\x1B","\x9B"]),tD=39,eu="\x07",$u="[",rD="]",yu="m",tu=`${rD}8;;`,xu=e=>`${q.values().next().value}${$u}${e}${yu}`,Su=e=>`${q.values().next().value}${tu}${e}${eu}`,iD=e=>e.split(" ").map(D=>L(D)),ru=(e,D,t)=>{const r=[...D];let i=!1,s=!1,u=L(gu(e[e.length-1]));for(const[o,n]of r.entries()){const a=L(n);if(u+a<=t?e[e.length-1]+=n:(e.push(n),u=0),q.has(n)&&(i=!0,s=r.slice(o+1).join("").startsWith(tu)),i){s?n===eu&&(i=!1,s=!1):n===yu&&(i=!1);continue}u+=a,u===t&&o<r.length-1&&(e.push(""),u=0)}!u&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},sD=e=>{const D=e.split(" ");let t=D.length;for(;t>0&&!(L(D[t-1])>0);)t--;return t===D.length?e:D.slice(0,t).join(" ")+D.slice(t).join("")},nD=(e,D,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let r="",i,s;const u=iD(e);let o=[""];for(const[a,l]of e.split(" ").entries()){t.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let C=L(o[o.length-1]);if(a!==0&&(C>=D&&(t.wordWrap===!1||t.trim===!1)&&(o.push(""),C=0),(C>0||t.trim===!1)&&(o[o.length-1]+=" ",C++)),t.hard&&u[a]>D){const c=D-C,g=1+Math.floor((u[a]-c-1)/D);Math.floor((u[a]-1)/D)<g&&o.push(""),ru(o,l,D);continue}if(C+u[a]>D&&C>0&&u[a]>0){if(t.wordWrap===!1&&C<D){ru(o,l,D);continue}o.push("")}if(C+u[a]>D&&t.wordWrap===!1){ru(o,l,D);continue}o[o.length-1]+=l}t.trim!==!1&&(o=o.map(a=>sD(a)));const n=[...o.join(`
1
+ import"node:util";import k,{stdin as Eu,stdout as hu}from"node:process";import*as W from"node:readline";import du from"node:readline";import{Writable as Nu}from"node:stream";import{spawn as pu}from"node:child_process";import v from"node:fs";import w from"node:path";function X(e){return e==null?[]:Array.isArray(e)?e:[e]}function Ku(e,D,t,r){var i,s=e[D],u=~r.string.indexOf(D)?t==null||t===!0?"":String(t):typeof t=="boolean"?t:~r.boolean.indexOf(D)?t==="false"?!1:t==="true"||(e._.push((i=+t,i*0===0?i:t)),!!t):(i=+t,i*0===0?i:t);e[D]=s==null?u:Array.isArray(s)?s.concat(u):[s,u]}function Yu(e,D){e=e||[],D=D||{};var t,r,i,s,u,o={_:[]},n=0,a=0,l=0,C=e.length;const c=D.alias!==void 0,g=D.unknown!==void 0,O=D.default!==void 0;if(D.alias=D.alias||{},D.string=X(D.string),D.boolean=X(D.boolean),c)for(t in D.alias)for(r=D.alias[t]=X(D.alias[t]),n=0;n<r.length;n++)(D.alias[r[n]]=r.concat(t)).splice(n,1);for(n=D.boolean.length;n-- >0;)for(r=D.alias[D.boolean[n]]||[],a=r.length;a-- >0;)D.boolean.push(r[a]);for(n=D.string.length;n-- >0;)for(r=D.alias[D.string[n]]||[],a=r.length;a-- >0;)D.string.push(r[a]);if(O){for(t in D.default)if(s=typeof D.default[t],r=D.alias[t]=D.alias[t]||[],D[s]!==void 0)for(D[s].push(t),n=0;n<r.length;n++)D[s].push(r[n])}const M=g?Object.keys(D.alias):[];for(n=0;n<C;n++){if(i=e[n],i==="--"){o._=o._.concat(e.slice(++n));break}for(a=0;a<i.length&&i.charCodeAt(a)===45;a++);if(a===0)o._.push(i);else if(i.substring(a,a+3)==="no-"){if(s=i.substring(a+3),g&&!~M.indexOf(s))return D.unknown(i);o[s]=!1}else{for(l=a+1;l<i.length&&i.charCodeAt(l)!==61;l++);for(s=i.substring(a,l),u=i.substring(++l)||n+1===C||(""+e[n+1]).charCodeAt(0)===45||e[++n],r=a===2?[s]:s,l=0;l<r.length;l++){if(s=r[l],g&&!~M.indexOf(s))return D.unknown("-".repeat(a)+s);Ku(o,s,l+1<r.length||u,D)}}}if(O)for(t in D.default)o[t]===void 0&&(o[t]=D.default[t]);if(c)for(t in o)for(r=D.alias[t]||[];r.length>0;)o[r.shift()]=o[t];return o}function zu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uu,fu;function Wu(){if(fu)return uu;fu=1;const e="\x1B",D=`${e}[`,t="\x07",r={to(u,o){return o?`${D}${o+1};${u+1}H`:`${D}${u+1}G`},move(u,o){let n="";return u<0?n+=`${D}${-u}D`:u>0&&(n+=`${D}${u}C`),o<0?n+=`${D}${-o}A`:o>0&&(n+=`${D}${o}B`),n},up:(u=1)=>`${D}${u}A`,down:(u=1)=>`${D}${u}B`,forward:(u=1)=>`${D}${u}C`,backward:(u=1)=>`${D}${u}D`,nextLine:(u=1)=>`${D}E`.repeat(u),prevLine:(u=1)=>`${D}F`.repeat(u),left:`${D}G`,hide:`${D}?25l`,show:`${D}?25h`,save:`${e}7`,restore:`${e}8`},i={up:(u=1)=>`${D}S`.repeat(u),down:(u=1)=>`${D}T`.repeat(u)},s={screen:`${D}2J`,up:(u=1)=>`${D}1J`.repeat(u),down:(u=1)=>`${D}J`.repeat(u),line:`${D}2K`,lineEnd:`${D}K`,lineStart:`${D}1K`,lines(u){let o="";for(let n=0;n<u;n++)o+=this.line+(n<u-1?r.up():"");return u&&(o+=r.left),o}};return uu={cursor:r,scroll:i,erase:s,beep:t},uu}var m=Wu(),V={exports:{}},Bu;function Vu(){if(Bu)return V.exports;Bu=1;let e=process||{},D=e.argv||[],t=e.env||{},r=!(t.NO_COLOR||D.includes("--no-color"))&&(!!t.FORCE_COLOR||D.includes("--color")||e.platform==="win32"||(e.stdout||{}).isTTY&&t.TERM!=="dumb"||!!t.CI),i=(o,n,a=o)=>l=>{let C=""+l,c=C.indexOf(n,o.length);return~c?o+s(C,n,a,c)+n:o+C+n},s=(o,n,a,l)=>{let C="",c=0;do C+=o.substring(c,l)+a,c=l+n.length,l=o.indexOf(n,c);while(~l);return C+o.substring(c)},u=(o=r)=>{let n=o?i:()=>String;return{isColorSupported:o,reset:n("\x1B[0m","\x1B[0m"),bold:n("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:n("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:n("\x1B[3m","\x1B[23m"),underline:n("\x1B[4m","\x1B[24m"),inverse:n("\x1B[7m","\x1B[27m"),hidden:n("\x1B[8m","\x1B[28m"),strikethrough:n("\x1B[9m","\x1B[29m"),black:n("\x1B[30m","\x1B[39m"),red:n("\x1B[31m","\x1B[39m"),green:n("\x1B[32m","\x1B[39m"),yellow:n("\x1B[33m","\x1B[39m"),blue:n("\x1B[34m","\x1B[39m"),magenta:n("\x1B[35m","\x1B[39m"),cyan:n("\x1B[36m","\x1B[39m"),white:n("\x1B[37m","\x1B[39m"),gray:n("\x1B[90m","\x1B[39m"),bgBlack:n("\x1B[40m","\x1B[49m"),bgRed:n("\x1B[41m","\x1B[49m"),bgGreen:n("\x1B[42m","\x1B[49m"),bgYellow:n("\x1B[43m","\x1B[49m"),bgBlue:n("\x1B[44m","\x1B[49m"),bgMagenta:n("\x1B[45m","\x1B[49m"),bgCyan:n("\x1B[46m","\x1B[49m"),bgWhite:n("\x1B[47m","\x1B[49m"),blackBright:n("\x1B[90m","\x1B[39m"),redBright:n("\x1B[91m","\x1B[39m"),greenBright:n("\x1B[92m","\x1B[39m"),yellowBright:n("\x1B[93m","\x1B[39m"),blueBright:n("\x1B[94m","\x1B[39m"),magentaBright:n("\x1B[95m","\x1B[39m"),cyanBright:n("\x1B[96m","\x1B[39m"),whiteBright:n("\x1B[97m","\x1B[39m"),bgBlackBright:n("\x1B[100m","\x1B[49m"),bgRedBright:n("\x1B[101m","\x1B[49m"),bgGreenBright:n("\x1B[102m","\x1B[49m"),bgYellowBright:n("\x1B[103m","\x1B[49m"),bgBlueBright:n("\x1B[104m","\x1B[49m"),bgMagentaBright:n("\x1B[105m","\x1B[49m"),bgCyanBright:n("\x1B[106m","\x1B[49m"),bgWhiteBright:n("\x1B[107m","\x1B[49m")}};return V.exports=u(),V.exports.createColors=u,V.exports}var qu=Vu();const F=zu(qu);function Gu({onlyFirst:e=!1}={}){const D=["[\\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(D,e?void 0:"g")}const Hu=Gu();function gu(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Hu,"")}function mu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bu={exports:{}};(function(e){var D={};e.exports=D,D.eastAsianWidth=function(r){var i=r.charCodeAt(0),s=r.length==2?r.charCodeAt(1):0,u=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,u=i<<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"},D.characterLength=function(r){var i=this.eastAsianWidth(r);return i=="F"||i=="W"||i=="A"?2:1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}D.length=function(r){for(var i=t(r),s=0,u=0;u<i.length;u++)s=s+this.characterLength(i[u]);return s},D.slice=function(r,i,s){textLen=D.length(r),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var u="",o=0,n=t(r),a=0;a<n.length;a++){var l=n[a],C=D.length(l);if(o>=i-(C==2?1:0))if(o+C<=s)u+=l;else break;o+=C}return u}})(bu);var Uu=bu.exports;const Ju=mu(Uu);var Zu=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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DF73\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\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261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const Qu=mu(Zu);function L(e,D={}){if(typeof e!="string"||e.length===0||(D={ambiguousIsNarrow:!0,...D},e=gu(e),e.length===0))return 0;e=e.replace(Qu()," ");const t=D.ambiguousIsNarrow?1:2;let r=0;for(const i of e){const s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(Ju.eastAsianWidth(i)){case"F":case"W":r+=2;break;case"A":r+=t;break;default:r+=1}}return r}const Du=10,Au=(e=0)=>D=>`\x1B[${D+e}m`,vu=(e=0)=>D=>`\x1B[${38+e};5;${D}m`,wu=(e=0)=>(D,t,r)=>`\x1B[${38+e};2;${D};${t};${r}m`,h={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(h.modifier);const Xu=Object.keys(h.color),uD=Object.keys(h.bgColor);[...Xu,...uD];function DD(){const e=new Map;for(const[D,t]of Object.entries(h)){for(const[r,i]of Object.entries(t))h[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[r]=h[r],e.set(i[0],i[1]);Object.defineProperty(h,D,{value:t,enumerable:!1})}return Object.defineProperty(h,"codes",{value:e,enumerable:!1}),h.color.close="\x1B[39m",h.bgColor.close="\x1B[49m",h.color.ansi=Au(),h.color.ansi256=vu(),h.color.ansi16m=wu(),h.bgColor.ansi=Au(Du),h.bgColor.ansi256=vu(Du),h.bgColor.ansi16m=wu(Du),Object.defineProperties(h,{rgbToAnsi256:{value:(D,t,r)=>D===t&&t===r?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:D=>{const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!t)return[0,0,0];let[r]=t;r.length===3&&(r=[...r].map(s=>s+s).join(""));const i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:D=>h.rgbToAnsi256(...h.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value:D=>{if(D<8)return 30+D;if(D<16)return 90+(D-8);let t,r,i;if(D>=232)t=((D-232)*10+8)/255,r=t,i=t;else{D-=16;const o=D%36;t=Math.floor(D/36)/5,r=Math.floor(o/6)/5,i=o%6/5}const s=Math.max(t,r,i)*2;if(s===0)return 30;let u=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(t));return s===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(D,t,r)=>h.ansi256ToAnsi(h.rgbToAnsi256(D,t,r)),enumerable:!1},hexToAnsi:{value:D=>h.ansi256ToAnsi(h.hexToAnsi256(D)),enumerable:!1}}),h}const eD=DD(),q=new Set(["\x1B","\x9B"]),tD=39,eu="\x07",$u="[",rD="]",yu="m",tu=`${rD}8;;`,xu=e=>`${q.values().next().value}${$u}${e}${yu}`,Su=e=>`${q.values().next().value}${tu}${e}${eu}`,iD=e=>e.split(" ").map(D=>L(D)),ru=(e,D,t)=>{const r=[...D];let i=!1,s=!1,u=L(gu(e[e.length-1]));for(const[o,n]of r.entries()){const a=L(n);if(u+a<=t?e[e.length-1]+=n:(e.push(n),u=0),q.has(n)&&(i=!0,s=r.slice(o+1).join("").startsWith(tu)),i){s?n===eu&&(i=!1,s=!1):n===yu&&(i=!1);continue}u+=a,u===t&&o<r.length-1&&(e.push(""),u=0)}!u&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},sD=e=>{const D=e.split(" ");let t=D.length;for(;t>0&&!(L(D[t-1])>0);)t--;return t===D.length?e:D.slice(0,t).join(" ")+D.slice(t).join("")},nD=(e,D,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let r="",i,s;const u=iD(e);let o=[""];for(const[a,l]of e.split(" ").entries()){t.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let C=L(o[o.length-1]);if(a!==0&&(C>=D&&(t.wordWrap===!1||t.trim===!1)&&(o.push(""),C=0),(C>0||t.trim===!1)&&(o[o.length-1]+=" ",C++)),t.hard&&u[a]>D){const c=D-C,g=1+Math.floor((u[a]-c-1)/D);Math.floor((u[a]-1)/D)<g&&o.push(""),ru(o,l,D);continue}if(C+u[a]>D&&C>0&&u[a]>0){if(t.wordWrap===!1&&C<D){ru(o,l,D);continue}o.push("")}if(C+u[a]>D&&t.wordWrap===!1){ru(o,l,D);continue}o[o.length-1]+=l}t.trim!==!1&&(o=o.map(a=>sD(a)));const n=[...o.join(`
2
2
  `)];for(const[a,l]of n.entries()){if(r+=l,q.has(l)){const{groups:c}=new RegExp(`(?:\\${$u}(?<code>\\d+)m|\\${tu}(?<uri>.*)${eu})`).exec(n.slice(a).join(""))||{groups:{}};if(c.code!==void 0){const g=Number.parseFloat(c.code);i=g===tD?void 0:g}else c.uri!==void 0&&(s=c.uri.length===0?void 0:c.uri)}const C=eD.codes.get(Number(i));n[a+1]===`
3
3
  `?(s&&(r+=Su("")),i&&C&&(r+=xu(C))):l===`
4
4
  `&&(i&&C&&(r+=xu(i)),s&&(r+=Su(s)))}return r};function ku(e,D,t){return String(e).normalize().replace(/\r\n/g,`
@@ -11,35 +11,35 @@ import"node:util";import k,{stdin as Eu,stdout as hu}from"node:process";import*a
11
11
  `).length-1;this.output.write(m.cursor.move(-999,D*-1))}render(){const D=ku(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(m.cursor.hide);else{const t=aD(this._prevFrame,D);if(this.restoreCursor(),t&&t?.length===1){const r=t[0];this.output.write(m.cursor.move(0,r)),this.output.write(m.erase.lines(1));const i=D.split(`
12
12
  `);this.output.write(i[r]),this._prevFrame=D,this.output.write(m.cursor.move(0,i.length-r-1));return}if(t&&t?.length>1){const r=t[0];this.output.write(m.cursor.move(0,r)),this.output.write(m.erase.down());const i=D.split(`
13
13
  `).slice(r);this.output.write(i.join(`
14
- `)),this._prevFrame=D;return}this.output.write(m.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}var ED=Object.defineProperty,hD=(e,D,t)=>D in e?ED(e,D,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[D]=t,Tu=(e,D,t)=>(hD(e,typeof D!="symbol"?D+"":D,t),t);class dD extends _u{constructor(D){super(D,!1),Tu(this,"options"),Tu(this,"cursor",0),this.options=D.options,this.cursor=this.options.findIndex(({value:t})=>t===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),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}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}class fD extends _u{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;const D=this.value.slice(0,this.cursor),[t,...r]=this.value.slice(this.cursor);return`${D}${F.inverse(t)}${r.join("")}`}get cursor(){return this._cursor}constructor(D){super(D),this.on("finalize",()=>{this.value||(this.value=D.defaultValue)})}}function pD(){return k.platform!=="win32"?k.env.TERM!=="linux":!!k.env.CI||!!k.env.WT_SESSION||!!k.env.TERMINUS_SUBLIME||k.env.ConEmuTask==="{cmd::Cmder}"||k.env.TERM_PROGRAM==="Terminus-Sublime"||k.env.TERM_PROGRAM==="vscode"||k.env.TERM==="xterm-256color"||k.env.TERM==="alacritty"||k.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const nu=pD(),x=(e,D)=>nu?e:D,BD=x("\u25C6","*"),Ou=x("\u25A0","x"),Iu=x("\u25B2","x"),ou=x("\u25C7","o"),gD=x("\u250C","T"),f=x("\u2502","|"),N=x("\u2514","\u2014"),mD=x("\u25CF",">"),bD=x("\u25CB"," "),AD=x("\u25CF","\u2022"),vD=x("\u25C6","*"),wD=x("\u25B2","!"),$D=x("\u25A0","x"),Mu=e=>{switch(e){case"initial":case"active":return F.cyan(BD);case"cancel":return F.red(Ou);case"error":return F.yellow(Iu);case"submit":return F.green(ou)}},yD=e=>{const{cursor:D,options:t,style:r}=e,i=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),u=Math.min(s,Math.max(i,5));let o=0;D>=o+u-3?o=Math.max(Math.min(D-u+3,t.length-u),0):D<o+2&&(o=Math.max(D-2,0));const n=u<t.length&&o>0,a=u<t.length&&o+u<t.length;return t.slice(o,o+u).map((l,C,c)=>{const g=C===0&&n,O=C===c.length-1&&a;return g||O?F.dim("..."):r(l,C+o===D)})},I=e=>new fD({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){const D=`${F.gray(f)}
14
+ `)),this._prevFrame=D;return}this.output.write(m.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}var ED=Object.defineProperty,hD=(e,D,t)=>D in e?ED(e,D,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[D]=t,Tu=(e,D,t)=>(hD(e,typeof D!="symbol"?D+"":D,t),t);class dD extends _u{constructor(D){super(D,!1),Tu(this,"options"),Tu(this,"cursor",0),this.options=D.options,this.cursor=this.options.findIndex(({value:t})=>t===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),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}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}class pD extends _u{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;const D=this.value.slice(0,this.cursor),[t,...r]=this.value.slice(this.cursor);return`${D}${F.inverse(t)}${r.join("")}`}get cursor(){return this._cursor}constructor(D){super(D),this.on("finalize",()=>{this.value||(this.value=D.defaultValue)})}}function fD(){return k.platform!=="win32"?k.env.TERM!=="linux":!!k.env.CI||!!k.env.WT_SESSION||!!k.env.TERMINUS_SUBLIME||k.env.ConEmuTask==="{cmd::Cmder}"||k.env.TERM_PROGRAM==="Terminus-Sublime"||k.env.TERM_PROGRAM==="vscode"||k.env.TERM==="xterm-256color"||k.env.TERM==="alacritty"||k.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const nu=fD(),x=(e,D)=>nu?e:D,BD=x("\u25C6","*"),Ou=x("\u25A0","x"),Iu=x("\u25B2","x"),ou=x("\u25C7","o"),gD=x("\u250C","T"),p=x("\u2502","|"),N=x("\u2514","\u2014"),mD=x("\u25CF",">"),bD=x("\u25CB"," "),AD=x("\u25CF","\u2022"),vD=x("\u25C6","*"),wD=x("\u25B2","!"),$D=x("\u25A0","x"),Mu=e=>{switch(e){case"initial":case"active":return F.cyan(BD);case"cancel":return F.red(Ou);case"error":return F.yellow(Iu);case"submit":return F.green(ou)}},yD=e=>{const{cursor:D,options:t,style:r}=e,i=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),u=Math.min(s,Math.max(i,5));let o=0;D>=o+u-3?o=Math.max(Math.min(D-u+3,t.length-u),0):D<o+2&&(o=Math.max(D-2,0));const n=u<t.length&&o>0,a=u<t.length&&o+u<t.length;return t.slice(o,o+u).map((l,C,c)=>{const g=C===0&&n,O=C===c.length-1&&a;return g||O?F.dim("..."):r(l,C+o===D)})},I=e=>new pD({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){const D=`${F.gray(p)}
15
15
  ${Mu(this.state)} ${e.message}
16
16
  `,t=e.placeholder?F.inverse(e.placeholder[0])+F.dim(e.placeholder.slice(1)):F.inverse(F.hidden("_")),r=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${D.trim()}
17
- ${F.yellow(f)} ${r}
17
+ ${F.yellow(p)} ${r}
18
18
  ${F.yellow(N)} ${F.yellow(this.error)}
19
- `;case"submit":return`${D}${F.gray(f)} ${F.dim(this.value||e.placeholder)}`;case"cancel":return`${D}${F.gray(f)} ${F.strikethrough(F.dim(this.value??""))}${this.value?.trim()?`
20
- ${F.gray(f)}`:""}`;default:return`${D}${F.cyan(f)} ${r}
19
+ `;case"submit":return`${D}${F.gray(p)} ${F.dim(this.value||e.placeholder)}`;case"cancel":return`${D}${F.gray(p)} ${F.strikethrough(F.dim(this.value??""))}${this.value?.trim()?`
20
+ ${F.gray(p)}`:""}`;default:return`${D}${F.cyan(p)} ${r}
21
21
  ${F.cyan(N)}
22
- `}}}).prompt(),K=e=>{const D=(t,r)=>{const i=t.label??String(t.value);switch(r){case"selected":return`${F.dim(i)}`;case"active":return`${F.green(mD)} ${i} ${t.hint?F.dim(`(${t.hint})`):""}`;case"cancelled":return`${F.strikethrough(F.dim(i))}`;default:return`${F.dim(bD)} ${F.dim(i)}`}};return new dD({options:e.options,initialValue:e.initialValue,render(){const t=`${F.gray(f)}
22
+ `}}}).prompt(),K=e=>{const D=(t,r)=>{const i=t.label??String(t.value);switch(r){case"selected":return`${F.dim(i)}`;case"active":return`${F.green(mD)} ${i} ${t.hint?F.dim(`(${t.hint})`):""}`;case"cancelled":return`${F.strikethrough(F.dim(i))}`;default:return`${F.dim(bD)} ${F.dim(i)}`}};return new dD({options:e.options,initialValue:e.initialValue,render(){const t=`${F.gray(p)}
23
23
  ${Mu(this.state)} ${e.message}
24
- `;switch(this.state){case"submit":return`${t}${F.gray(f)} ${D(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${F.gray(f)} ${D(this.options[this.cursor],"cancelled")}
25
- ${F.gray(f)}`;default:return`${t}${F.cyan(f)} ${yD({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(r,i)=>D(r,i?"active":"inactive")}).join(`
26
- ${F.cyan(f)} `)}
24
+ `;switch(this.state){case"submit":return`${t}${F.gray(p)} ${D(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${F.gray(p)} ${D(this.options[this.cursor],"cancelled")}
25
+ ${F.gray(p)}`;default:return`${t}${F.cyan(p)} ${yD({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(r,i)=>D(r,i?"active":"inactive")}).join(`
26
+ ${F.cyan(p)} `)}
27
27
  ${F.cyan(N)}
28
28
  `}}}).prompt()},xD=(e="")=>{process.stdout.write(`${F.gray(N)} ${F.red(e)}
29
29
 
30
30
  `)},SD=(e="")=>{process.stdout.write(`${F.gray(gD)} ${e}
31
- `)},kD=(e="")=>{process.stdout.write(`${F.gray(f)}
31
+ `)},kD=(e="")=>{process.stdout.write(`${F.gray(p)}
32
32
  ${F.gray(N)} ${e}
33
33
 
34
- `)},h={message:(e="",{symbol:D=F.gray(f)}={})=>{const t=[`${F.gray(f)}`];if(e){const[r,...i]=e.split(`
35
- `);t.push(`${D} ${r}`,...i.map(s=>`${F.gray(f)} ${s}`))}process.stdout.write(`${t.join(`
34
+ `)},E={message:(e="",{symbol:D=F.gray(p)}={})=>{const t=[`${F.gray(p)}`];if(e){const[r,...i]=e.split(`
35
+ `);t.push(`${D} ${r}`,...i.map(s=>`${F.gray(p)} ${s}`))}process.stdout.write(`${t.join(`
36
36
  `)}
37
- `)},info:e=>{h.message(e,{symbol:F.blue(AD)})},success:e=>{h.message(e,{symbol:F.green(vD)})},step:e=>{h.message(e,{symbol:F.green(ou)})},warn:e=>{h.message(e,{symbol:F.yellow(wD)})},warning:e=>{h.warn(e)},error:e=>{h.message(e,{symbol:F.red($D)})}};`${F.gray(f)}`;const Pu=({indicator:e="dots"}={})=>{const D=nu?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=nu?80:120,r=process.env.CI==="true";let i,s,u=!1,o="",n,a=performance.now();const l=p=>{const A=p>1?"Something went wrong":"Canceled";u&&z(A,p)},C=()=>l(2),c=()=>l(1),g=()=>{process.on("uncaughtExceptionMonitor",C),process.on("unhandledRejection",C),process.on("SIGINT",c),process.on("SIGTERM",c),process.on("exit",l)},O=()=>{process.removeListener("uncaughtExceptionMonitor",C),process.removeListener("unhandledRejection",C),process.removeListener("SIGINT",c),process.removeListener("SIGTERM",c),process.removeListener("exit",l)},M=()=>{if(n===void 0)return;r&&process.stdout.write(`
38
- `);const p=n.split(`
39
- `);process.stdout.write(m.cursor.move(-999,p.length-1)),process.stdout.write(m.erase.down(p.length))},R=p=>p.replace(/\.+$/,""),Y=p=>{const A=(performance.now()-p)/1e3,S=Math.floor(A/60),T=Math.floor(A%60);return S>0?`[${S}m ${T}s]`:`[${T}s]`},U=(p="")=>{u=!0,i=lD(),o=R(p),a=performance.now(),process.stdout.write(`${F.gray(f)}
40
- `);let A=0,S=0;g(),s=setInterval(()=>{if(r&&o===n)return;M(),n=o;const T=F.magenta(D[A]);if(r)process.stdout.write(`${T} ${o}...`);else if(e==="timer")process.stdout.write(`${T} ${o} ${Y(a)}`);else{const j=".".repeat(Math.floor(S)).slice(0,3);process.stdout.write(`${T} ${o}${j}`)}A=A+1<D.length?A+1:0,S=S<D.length?S+.125:0},t)},z=(p="",A=0)=>{u=!1,clearInterval(s),M();const S=A===0?F.green(ou):A===1?F.red(Ou):F.red(Iu);o=R(p??o),e==="timer"?process.stdout.write(`${S} ${o} ${Y(a)}
37
+ `)},info:e=>{E.message(e,{symbol:F.blue(AD)})},success:e=>{E.message(e,{symbol:F.green(vD)})},step:e=>{E.message(e,{symbol:F.green(ou)})},warn:e=>{E.message(e,{symbol:F.yellow(wD)})},warning:e=>{E.warn(e)},error:e=>{E.message(e,{symbol:F.red($D)})}};`${F.gray(p)}`;const Pu=({indicator:e="dots"}={})=>{const D=nu?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=nu?80:120,r=process.env.CI==="true";let i,s,u=!1,o="",n,a=performance.now();const l=f=>{const A=f>1?"Something went wrong":"Canceled";u&&z(A,f)},C=()=>l(2),c=()=>l(1),g=()=>{process.on("uncaughtExceptionMonitor",C),process.on("unhandledRejection",C),process.on("SIGINT",c),process.on("SIGTERM",c),process.on("exit",l)},O=()=>{process.removeListener("uncaughtExceptionMonitor",C),process.removeListener("unhandledRejection",C),process.removeListener("SIGINT",c),process.removeListener("SIGTERM",c),process.removeListener("exit",l)},M=()=>{if(n===void 0)return;r&&process.stdout.write(`
38
+ `);const f=n.split(`
39
+ `);process.stdout.write(m.cursor.move(-999,f.length-1)),process.stdout.write(m.erase.down(f.length))},R=f=>f.replace(/\.+$/,""),Y=f=>{const A=(performance.now()-f)/1e3,S=Math.floor(A/60),T=Math.floor(A%60);return S>0?`[${S}m ${T}s]`:`[${T}s]`},U=(f="")=>{u=!0,i=lD(),o=R(f),a=performance.now(),process.stdout.write(`${F.gray(p)}
40
+ `);let A=0,S=0;g(),s=setInterval(()=>{if(r&&o===n)return;M(),n=o;const T=F.magenta(D[A]);if(r)process.stdout.write(`${T} ${o}...`);else if(e==="timer")process.stdout.write(`${T} ${o} ${Y(a)}`);else{const j=".".repeat(Math.floor(S)).slice(0,3);process.stdout.write(`${T} ${o}${j}`)}A=A+1<D.length?A+1:0,S=S<D.length?S+.125:0},t)},z=(f="",A=0)=>{u=!1,clearInterval(s),M();const S=A===0?F.green(ou):A===1?F.red(Ou):F.red(Iu);o=R(f??o),e==="timer"?process.stdout.write(`${S} ${o} ${Y(a)}
41
41
  `):process.stdout.write(`${S} ${o}
42
- `),O(),i()};return{start:U,stop:z,message:(p="")=>{o=R(p??o)}}},b=(e="Operation cancelled")=>xD(e);function _D(){const e=process.env.npm_config_user_agent;if(!e)return;const D=e.split(" ")[0].split("/");return{name:D[0],version:D[1]}}function Ru(e){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(e)}function au(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}function TD(e){const D=v.readdirSync(e);return D.length===0||D.length===1&&D[0]===".git"}function OD(e){if(v.existsSync(e))for(const D of v.readdirSync(e))D!==".git"&&v.rmSync(w.resolve(e,D),{recursive:!0,force:!0})}async function ID(e,D){return await new Promise((t,r)=>{const i=fu("npx",["degit",e,D],{shell:!0});i.on("close",(s,u)=>{s===0?t():r(new Error(`Process exited with code ${s}`))}),i.on("error",s=>{r(s)})})}async function MD(e,D){return await new Promise((t,r)=>{const i=fu("npx",["gitpick",e,D],{shell:!0});i.on("close",(s,u)=>{s===0?t():r(new Error(`Process exited with code ${s}`))}),i.on("error",s=>{r(s)})})}function PD(e,D){const t=v.readFileSync(e,"utf-8");v.writeFileSync(e,D(t),"utf-8")}function ju(e){return e.trim().replace(/\/+$/g,"")}class RD{root;cwd=process.cwd();targetDir;packageName;addSubfolders=!1;verbose;pkgInfo;pkgManager="npm";constructor({verbose:D}={}){this.pkgInfo=_D(),this.pkgManager=this.pkgInfo?.name??"npm",this.verbose=!!D,D&&h.info(`Using ${this.pkgInfo?.name??"npm"} ${this.pkgInfo?.version??""}`)}async init({argTargetDir:D,argOverwrite:t,defaultTargetDir:r}){if(D)this.targetDir=D,h.success(`Project name: ${this.targetDir}`);else{const s=await I({message:"Project name:",defaultValue:r,placeholder:r});if($(s))return b();this.targetDir=ju(s)}if(v.existsSync(this.targetDir)&&!TD(this.targetDir)){const s=t?"yes":await K({message:(this.targetDir==="."?"Current directory":`Target directory "${this.targetDir}"`)+" is not empty. Please choose how to proceed:",options:[{label:"Cancel operation",value:"no"},{label:"Remove existing files and continue",value:"yes"},{label:"Ignore files and continue",value:"ignore"}]});if($(s))return b();switch(s){case"yes":OD(this.targetDir);break;case"no":return b()}}let i=w.basename(w.resolve(this.targetDir));if(!Ru(i)){const s=await I({message:"Package name:",defaultValue:au(i),placeholder:au(i),validate(u){if(u&&!Ru(u))return"Invalid package.json name"}});if($(s))return b();s?i=s:i=au(i)}return this.packageName=i,this.root=w.join(this.cwd,this.targetDir),v.mkdirSync(this.root,{recursive:!0}),this}isInitialized(){return!!this.root}getFilePath(D){if(!this.root)throw new Error("FileManager not initialized");return w.join(this.root,this.addSubfolders?"frontend":"",D)}write(D,t){if(!this.root)throw new Error("FileManager not initialized");const r=this.getFilePath(D);t!==void 0&&v.writeFileSync(r,t)}read(D){if(!this.root)throw new Error("FileManager not initialized");const t=this.getFilePath(D);return v.readFileSync(t,"utf-8").toString()}async gitPick(D){if(!this.root)throw new Error("FileManager not initialized");const t=Pu();t.start("Downloading template...");try{this.verbose&&h.info(`Cloning repo ${D}`),await MD(D,this.addSubfolders?w.join(this.root,"frontend"):this.root),this.verbose&&h.info(`Cloned repo ${D}`),t.stop("Template download completed successfully! \u{1F680}")}catch(r){t.stop("Failed to download template: "+JSON.stringify(r))}}async createBackend({openfortSecretKey:D,shieldSecretKey:t,shieldApiKey:r,shieldEncryptionShare:i,port:s}){if(!this.root)throw new Error("FileManager not initialized");this.addSubfolders=!0;const u=Pu();u.start("Creating backend...");try{this.verbose&&h.info("Creating backend folder from openfort-xyz/openfort-backend-quickstart"),await ID("openfort-xyz/openfort-backend-quickstart",this.addSubfolders?w.join(this.root,"backend"):this.root),this.verbose&&(h.info("Cloned backend folder"),h.info("Copying .env.example to .env"));const o=w.join(this.root,"backend",".env.example"),n=w.join(this.root,"backend",".env");this.verbose&&h.info(`Reading .env.example from ${o}`);const a=v.readFileSync(o,"utf-8").toString().replace(/OPENFORT_SECRET_KEY=/g,`OPENFORT_SECRET_KEY=${D}`).replace(/SHIELD_SECRET_KEY=/g,`SHIELD_SECRET_KEY=${t}`).replace(/SHIELD_API_KEY=/g,`SHIELD_API_KEY=${r}`).replace(/SHIELD_ENCRYPTION_SHARE=/g,`SHIELD_ENCRYPTION_SHARE=${i}`).replace(/PORT=/g,`PORT=${s}`);this.verbose&&h.info(`Writing .env to ${n}`),v.writeFileSync(n,a),u.stop("Backend creation completed successfully! \u{1F680}")}catch(o){u.stop("Failed to create backend: "+JSON.stringify(o))}}editFile(D,t){if(!this.root)throw new Error("FileManager not initialized");const r=this.getFilePath(D);PD(r,t)}addEnv(D){if(!this.root)throw new Error("FileManager not initialized");const t=w.join(this.root,this.addSubfolders?w.join(this.root,"frontend"):this.root,".env.example"),r=w.join(this.root,this.addSubfolders?w.join(this.root,"frontend"):this.root,".env"),i=v.readFileSync(t,"utf-8").split(`
42
+ `),O(),i()};return{start:U,stop:z,message:(f="")=>{o=R(f??o)}}},b=(e="Operation cancelled")=>xD(e);function _D(){const e=process.env.npm_config_user_agent;if(!e)return;const D=e.split(" ")[0].split("/");return{name:D[0],version:D[1]}}function Ru(e){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(e)}function au(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}function TD(e){const D=v.readdirSync(e);return D.length===0||D.length===1&&D[0]===".git"}function OD(e){if(v.existsSync(e))for(const D of v.readdirSync(e))D!==".git"&&v.rmSync(w.resolve(e,D),{recursive:!0,force:!0})}async function ID(e,D,{verbose:t}={}){return await new Promise((r,i)=>{t&&E.info(`Running: npx degit ${e} ${D}`);const s=pu("npx",["degit",e,D],{shell:!0});s.stdout.on("data",u=>{t&&process.stdout.write(`\r[stdout]: ${u}`)}),s.stderr.on("data",u=>{t&&process.stdout.write(`\r[stderr]: ${u}`)}),s.on("close",(u,o)=>{u===0?r():i(new Error(`Process exited with code ${u}`))}),s.on("error",u=>{i(u)})})}async function MD(e,D,{verbose:t}={}){return await new Promise((r,i)=>{t&&E.info(`Running: npx gitpick ${e} ${D}`);const s=pu("npx",["gitpick",e,D],{shell:!0});s.stdout.on("data",u=>{t&&process.stdout.write(`\r[stdout]: ${u}`)}),s.stderr.on("data",u=>{t&&process.stdout.write(`\r[stderr]: ${u}`)}),s.on("close",(u,o)=>{u===0?r():i(new Error(`Process exited with code ${u}`))}),s.on("error",u=>{i(u)})})}function PD(e,D){const t=v.readFileSync(e,"utf-8");v.writeFileSync(e,D(t),"utf-8")}function ju(e){return e.trim().replace(/\/+$/g,"")}class RD{root;cwd=process.cwd();targetDir;packageName;addSubfolders=!1;verbose;pkgInfo;pkgManager="npm";constructor({verbose:D}={}){this.pkgInfo=_D(),this.pkgManager=this.pkgInfo?.name??"npm",this.verbose=!!D,D&&E.info(`Using ${this.pkgInfo?.name??"npm"} ${this.pkgInfo?.version??""}`)}async init({argTargetDir:D,argOverwrite:t,defaultTargetDir:r}){if(D)this.targetDir=D,E.success(`Project name: ${this.targetDir}`);else{const s=await I({message:"Project name:",defaultValue:r,placeholder:r});if($(s))return b();this.targetDir=ju(s)}if(v.existsSync(this.targetDir)&&!TD(this.targetDir)){const s=t?"yes":await K({message:(this.targetDir==="."?"Current directory":`Target directory "${this.targetDir}"`)+" is not empty. Please choose how to proceed:",options:[{label:"Cancel operation",value:"no"},{label:"Remove existing files and continue",value:"yes"},{label:"Ignore files and continue",value:"ignore"}]});if($(s))return b();switch(s){case"yes":OD(this.targetDir);break;case"no":return b()}}let i=w.basename(w.resolve(this.targetDir));if(!Ru(i)){const s=await I({message:"Package name:",defaultValue:au(i),placeholder:au(i),validate(u){if(u&&!Ru(u))return"Invalid package.json name"}});if($(s))return b();s?i=s:i=au(i)}return this.packageName=i,this.root=w.join(this.cwd,this.targetDir),v.mkdirSync(this.root,{recursive:!0}),this}isInitialized(){return!!this.root}getFilePath(D){if(!this.root)throw new Error("FileManager not initialized");return w.join(this.root,this.addSubfolders?"frontend":"",D)}write(D,t){if(!this.root)throw new Error("FileManager not initialized");const r=this.getFilePath(D);t!==void 0&&v.writeFileSync(r,t)}read(D){if(!this.root)throw new Error("FileManager not initialized");const t=this.getFilePath(D);return v.readFileSync(t,"utf-8").toString()}async gitPick(D){if(!this.root)throw new Error("FileManager not initialized");const t=Pu();t.start("Downloading template...");try{this.verbose&&E.info(`Cloning repo ${D}`),await MD(D,this.addSubfolders?w.join(this.root,"frontend"):this.root,{verbose:this.verbose}),this.verbose&&E.info(`Cloned repo ${D}`),t.stop("Template download completed successfully! \u{1F680}")}catch(r){t.stop("Failed to download template: "+JSON.stringify(r))}}async createBackend({openfortSecretKey:D,shieldSecretKey:t,shieldApiKey:r,shieldEncryptionShare:i,port:s}){if(!this.root)throw new Error("FileManager not initialized");this.addSubfolders=!0;const u=Pu();u.start("Creating backend...");try{this.verbose&&E.info("Creating backend folder from openfort-xyz/openfort-backend-quickstart"),await ID("openfort-xyz/openfort-backend-quickstart",this.addSubfolders?w.join(this.root,"backend"):this.root,{verbose:this.verbose}),this.verbose&&(E.info("Cloned backend folder"),E.info("Copying .env.example to .env"));const o=w.join(this.root,"backend",".env.example"),n=w.join(this.root,"backend",".env");this.verbose&&E.info(`Reading .env.example from ${o}`);const a=v.readFileSync(o,"utf-8").toString().replace(/OPENFORT_SECRET_KEY=/g,`OPENFORT_SECRET_KEY=${D}`).replace(/SHIELD_SECRET_KEY=/g,`SHIELD_SECRET_KEY=${t}`).replace(/SHIELD_API_KEY=/g,`SHIELD_API_KEY=${r}`).replace(/SHIELD_ENCRYPTION_SHARE=/g,`SHIELD_ENCRYPTION_SHARE=${i}`).replace(/PORT=/g,`PORT=${s}`);this.verbose&&E.info(`Writing .env to ${n}`),v.writeFileSync(n,a),u.stop("Backend creation completed successfully! \u{1F680}")}catch(o){u.stop("Failed to create backend: "+JSON.stringify(o))}}editFile(D,t){if(!this.root)throw new Error("FileManager not initialized");const r=this.getFilePath(D);PD(r,t)}addEnv(D){if(!this.root)throw new Error("FileManager not initialized");const t=w.join(this.root,this.addSubfolders?w.join(this.root,"frontend"):this.root,".env.example"),r=w.join(this.root,this.addSubfolders?w.join(this.root,"frontend"):this.root,".env"),i=v.readFileSync(t,"utf-8").split(`
43
43
  `).map(s=>{if(!s.trim()||s.trim().startsWith("#"))return s;const[u]=s.split("=");if(!u)return s;const o=u.includes("_")?u.split("_").slice(1).join("_"):u,n=D[o];return n!==void 0?`${u}=${n}`:s});v.writeFileSync(r,i.join(`
44
44
  `),"utf-8")}outro(){let D="";const t=w.relative(this.cwd,this.root);D+=`Done.
45
45
 
@@ -54,7 +54,7 @@ For the backend project, run in one terminal.`,D+=`
54
54
  cd backend`,r(),D+=`
55
55
 
56
56
  Then run the frontend project in another terminal.`,D+=`
57
- cd frontend`),r(),kD(D)}}const{blue:ue,blueBright:De,cyan:jD,green:LD,greenBright:ee,magenta:te,red:re,redBright:ie,reset:se,yellow:ND}=F,Fu=[{name:"openfort-ui",display:"Openfort UI",hint:"default",color:jD},{name:"headless",display:"Headless UI",hint:"custom, unstyled",color:LD},{name:"firebase",display:"Third party auth",hint:"with Firebase",color:ND}],KD=Fu.map(e=>e.name);async function YD({argTemplate:e,availableTemplates:D=KD}){let t=e,r=!1;if(e&&(!Fu.some(i=>i.name===e)||!D.includes(e))&&(t=void 0,r=!0),!t){const i=await K({message:r?`"${e}" isn't a valid template. Please choose from below: `:"Select a template:",options:Fu.map(s=>({label:s.color(s.display||s.name),value:s,hint:s.hint}))});if($(i))return b();t=i.name}return t}const _=Yu(process.argv.slice(2),{alias:{h:"help",t:"template",o:"overwrite",v:"verbose",d:"default"},boolean:["help","overwrite","verbose","validate"],string:["dashboard","template","template"],default:{template:void 0,overwrite:!1,verbose:!1,validate:!0,default:!1,dashboard:!1}}),zD=`Usage: create-openfort [OPTION]... [DIRECTORY]
57
+ cd frontend`),r(),kD(D)}}const{blue:ue,blueBright:De,cyan:jD,green:LD,greenBright:ee,magenta:te,red:re,redBright:ie,reset:se,yellow:ND}=F,Fu=[{name:"openfort-ui",display:"Openfort UI",hint:"default",color:jD},{name:"headless",display:"Headless UI",hint:"custom, unstyled",color:LD},{name:"firebase",display:"Third party auth",hint:"with Firebase",color:ND}],KD=Fu.map(e=>e.name);async function YD({argTemplate:e,availableTemplates:D=KD}){let t=e,r=!1;if(e&&(!Fu.some(i=>i.name===e)||!D.includes(e))&&(t=void 0,r=!0),!t){const i=await K({message:r?`"${e}" isn't a valid template. Please choose from below: `:"Select a template:",options:Fu.map(s=>({label:s.color(s.display||s.name),value:s,hint:s.hint}))});if($(i))return b();t=i.name}return t}const _=Yu(process.argv.slice(2),{alias:{h:"help",t:"template",o:"overwrite",v:"verbose",d:"default"},boolean:["help","overwrite","verbose","validate"],string:["dashboard","template"],default:{template:void 0,overwrite:!1,verbose:!1,validate:!0,default:!1,dashboard:!1}}),zD=`Usage: create-openfort [OPTION]... [DIRECTORY]
58
58
 
59
59
  Create a new Openfortkit project in TypeScript.
60
60
  With no arguments, start the CLI in interactive mode.
@@ -68,8 +68,8 @@ Options:
68
68
 
69
69
  --no-validate Disable input validation
70
70
  `,WD="openfortkit-project",VD="http://localhost:3110/api/protected-create-encryption-session",Lu="https://dashboard.openfort.io";async function qD(){const e=_._[0]?ju(String(_._[0])):void 0,D=_.template,t=_.overwrite,r=_.verbose,i=!!_.validate,s=_.default,u=_.dashboard?_.dashboard!==!0?String(_.dashboard):Lu:!1;if(_.help){console.log(zD);return}console.log(`
71
- `),SD("Let's create a new Openfortkit project!"),r&&h.success("Verbose mode enabled"),u&&h.info(`You can manage your Openfort project at ${u}`),i||h.warn(`No validation will be performed on the input values.
72
- Please make sure to provide valid values.`+D);const o=await new RD({verbose:r}).init({argTargetDir:e,argOverwrite:t,defaultTargetDir:WD});if(!o||!o.root)return;D&&r&&h.info(`Using template from argument: ${D}`);const n=await YD({argTemplate:D});if(!n)return;let a=!1,l=VD;{const d=s?!0:await K({message:"Do you want to create a backend for automatic account recovery?",options:[{value:!0,label:"Yes",hint:"Better user experience"},{value:!1,label:"No",hint:"Users will recover their account with a password or passkey"}]});if($(d))throw b();if(d){const B=await K({message:"Do you already have a backend to create an encryption session?",options:[{value:!0,label:"No",hint:"We will create a sample backend for you"},{value:!1,label:"Yes",hint:"You will need to provide an endpoint to create an encryption session"}]});if($(B))throw b();a=B;let Q=a,Cu=0;for(;!Q;){const cu=await I({message:Cu===0?"Please provide your API endpoint to create an encryption session:":"Please provide a valid API endpoint to create an encryption session:",placeholder:"http://localhost:3110/api/protected-create-encryption-session",validate:P=>{if(i&&!P)return"API endpoint is required"}});if($(cu))throw b();l=cu,await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"}}).then(P=>P.json()).then(P=>{P.session?Q=!0:h.error(`Invalid API endpoint:
71
+ `),SD("Let's create a new Openfortkit project!"),r&&E.success("Verbose mode enabled"),u&&E.info(`You can manage your Openfort project at ${u}`),i||E.warn(`No validation will be performed on the input values.
72
+ Please make sure to provide valid values.`+D);const o=await new RD({verbose:r}).init({argTargetDir:e,argOverwrite:t,defaultTargetDir:WD});if(!o||!o.root)return;D&&r&&E.info(`Using template from argument: ${D}`);const n=await YD({argTemplate:D});if(!n)return;let a=!1,l=VD;{const d=s?!0:await K({message:"Do you want to create a backend for automatic account recovery?",options:[{value:!0,label:"Yes",hint:"Better user experience"},{value:!1,label:"No",hint:"Users will recover their account with a password or passkey"}]});if($(d))throw b();if(d){const B=await K({message:"Do you already have a backend to create an encryption session?",options:[{value:!0,label:"No",hint:"We will create a sample backend for you"},{value:!1,label:"Yes",hint:"You will need to provide an endpoint to create an encryption session"}]});if($(B))throw b();a=B;let Q=a,Cu=0;for(;!Q;){const cu=await I({message:Cu===0?"Please provide your API endpoint to create an encryption session:":"Please provide a valid API endpoint to create an encryption session:",placeholder:"http://localhost:3110/api/protected-create-encryption-session",validate:P=>{if(i&&!P)return"API endpoint is required"}});if($(cu))throw b();l=cu,await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"}}).then(P=>P.json()).then(P=>{P.session?Q=!0:E.error(`Invalid API endpoint:
73
73
 
74
74
  Response must be:
75
75
  {
@@ -78,6 +78,6 @@ Response must be:
78
78
 
79
79
  But got:
80
80
  ${JSON.stringify(P,null,2)}
81
- `)}).catch(P=>{h.error("Invalid API endpoint. Ensure you have a backend running and the endpoint is correct.")}),i||(Q=!0),Cu++}}}let C;if(n==="openfort-ui"){const d=await K({message:"Select a theme:",options:[{value:"auto",label:"Default",hint:"Auto"},{value:"midnight",label:"Midnight"},{value:"minimal",label:"Minimal"},{value:"soft",label:"Soft"},{value:"web95",label:"Web95"},{value:"rounded",label:"Rounded"},{value:"retro",label:"Retro"},{value:"nouns",label:"Nouns"}]});if($(d))throw b();C=d}h.success(`Good! You are all set.
81
+ `)}).catch(P=>{E.error("Invalid API endpoint. Ensure you have a backend running and the endpoint is correct.")}),i||(Q=!0),Cu++}}}let C;if(n==="openfort-ui"){const d=await K({message:"Select a theme:",options:[{value:"auto",label:"Default",hint:"Auto"},{value:"midnight",label:"Midnight"},{value:"minimal",label:"Minimal"},{value:"soft",label:"Soft"},{value:"web95",label:"Web95"},{value:"rounded",label:"Rounded"},{value:"retro",label:"Retro"},{value:"nouns",label:"Nouns"}]});if($(d))throw b();C=d}E.success(`Good! You are all set.
82
82
  Please provide the following keys to continue.
83
- Get your keys from ${u||Lu}/developers/api-keys`);const c="[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}",g=`(test|live)_${c}`,O=new RegExp(`^sk_${g}$`),M=new RegExp(`^pk_${g}$`),R=new RegExp(`^${c}$`),Y=async()=>{const d=await I({message:"Openfort Publishable Key:",placeholder:"pk...",validate:B=>{if(i)if(B){if(!M.test(B))return"Openfort Publishable Key is invalid"}else return"Openfort Publishable Key is required"}});if($(d))throw b();return d},U=async()=>{const d=await I({message:"Openfort Secret:",placeholder:"sk_...",validate:B=>{if(i)if(B){if(!O.test(B))return"Openfort Secret Key is invalid"}else return"Openfort Secret Key is required"}});if($(d))throw b();return d},z=async()=>{const d=await I({message:"Shield Publishable Key:",placeholder:"Your Shield Publishable Key",validate:B=>{if(i)if(B){if(!R.test(B))return"Shield Publishable Key is invalid"}else return"Shield Publishable Key is required"}});if($(d))throw b();return d},p=async()=>{const d=await I({message:"Shield Secret:",placeholder:"Your Shield Secret",validate:B=>{if(i)if(B){if(!R.test(B))return"Shield Secret Key is invalid"}else return"Shield Secret Key is required"}});if($(d))throw b();return d},A=async()=>{const d=await I({message:"Shield Encryption Share:",placeholder:"Your Shield Encryption Share",validate:B=>{if(i)if(B){if(B.length!==44)return"Shield Encryption Share is invalid"}else return"Shield Encryption Share is required"}});if($(d))throw b();return d},S=await Y(),T=await z();let j,J,Z;if(a&&(j=await U(),Z=await A(),J=await p()),r&&h.info(`Using template: ${n}`),h.step(`Scaffolding project in ${o.root}...`),a){if(!j||!J||!T||!Z)throw b("Missing Openfort Secret, Shield Secret, Shield Publishable Key or Shield Encryption Share");await o.createBackend({openfortSecretKey:j,shieldSecretKey:J,shieldApiKey:T,shieldEncryptionShare:Z,port:3110})}await o.gitPick("openfort-xyz/openfort-react/tree/main/examples/quickstarts/"+n);const lu={SHIELD_PUBLISHABLE_KEY:T,OPENFORT_PUBLISHABLE_KEY:S,CREATE_ENCRYPTED_SESSION_ENDPOINT:l};C&&(lu.OPENFORT_THEME=C),o.addEnv(lu),o.outro()}qD().catch(()=>{});
83
+ Get your keys from ${u||Lu}/developers/api-keys`);const c="[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}",g=`(test|live)_${c}`,O=new RegExp(`^sk_${g}$`),M=new RegExp(`^pk_${g}$`),R=new RegExp(`^${c}$`),Y=async()=>{const d=await I({message:"Openfort Publishable Key:",placeholder:"pk...",validate:B=>{if(i)if(B){if(!M.test(B))return"Openfort Publishable Key is invalid"}else return"Openfort Publishable Key is required"}});if($(d))throw b();return d},U=async()=>{const d=await I({message:"Openfort Secret:",placeholder:"sk_...",validate:B=>{if(i)if(B){if(!O.test(B))return"Openfort Secret Key is invalid"}else return"Openfort Secret Key is required"}});if($(d))throw b();return d},z=async()=>{const d=await I({message:"Shield Publishable Key:",placeholder:"Your Shield Publishable Key",validate:B=>{if(i)if(B){if(!R.test(B))return"Shield Publishable Key is invalid"}else return"Shield Publishable Key is required"}});if($(d))throw b();return d},f=async()=>{const d=await I({message:"Shield Secret:",placeholder:"Your Shield Secret",validate:B=>{if(i)if(B){if(!R.test(B))return"Shield Secret Key is invalid"}else return"Shield Secret Key is required"}});if($(d))throw b();return d},A=async()=>{const d=await I({message:"Shield Encryption Share:",placeholder:"Your Shield Encryption Share",validate:B=>{if(i)if(B){if(B.length!==44)return"Shield Encryption Share is invalid"}else return"Shield Encryption Share is required"}});if($(d))throw b();return d},S=await Y(),T=await z();let j,J,Z;if(a&&(j=await U(),Z=await A(),J=await f()),r&&E.info(`Using template: ${n}`),E.step(`Scaffolding project in ${o.root}...`),a){if(!j||!J||!T||!Z)throw b("Missing Openfort Secret, Shield Secret, Shield Publishable Key or Shield Encryption Share");await o.createBackend({openfortSecretKey:j,shieldSecretKey:J,shieldApiKey:T,shieldEncryptionShare:Z,port:3110})}await o.gitPick("openfort-xyz/openfort-react/tree/main/examples/quickstarts/"+n);const lu={SHIELD_PUBLISHABLE_KEY:T,OPENFORT_PUBLISHABLE_KEY:S,CREATE_ENCRYPTED_SESSION_ENDPOINT:l};C&&(lu.OPENFORT_THEME=C),o.addEnv(lu),o.outro()}qD().catch(()=>{});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-openfort",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Openfort (https://www.openfort.xyz)",
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "scripts": {
13
13
  "dev": "unbuild --watch",
14
- "test": "cd tests && node ./../index.js",
14
+ "test": "node -e \"require('fs').mkdirSync('tests', { recursive: true });\" && cd tests && node ./../index.js",
15
15
  "build": "unbuild && node build.js",
16
16
  "lint": "tsc --noEmit"
17
17
  },