create-openfort 0.0.2 → 0.0.4
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/dist/index.mjs +32 -31
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
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\uD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27\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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\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(`
|
|
2
|
-
`)];for(const[a,l]of n.entries()){if(r+=l,q.has(l)){const{groups:
|
|
3
|
-
`?(s&&(r+=
|
|
4
|
-
`&&(i&&C&&(r+=
|
|
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 Ku}from"node:stream";import{spawn as Yu}from"node:child_process";import d from"node:fs";import w from"node:path";function X(e){return e==null?[]:Array.isArray(e)?e:[e]}function zu(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 Wu(e,D){e=e||[],D=D||{};var t,r,i,s,u,o={_:[]},n=0,a=0,l=0,C=e.length;const E=D.alias!==void 0,m=D.unknown!==void 0,O=D.default!==void 0;if(D.alias=D.alias||{},D.string=X(D.string),D.boolean=X(D.boolean),E)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=m?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),m&&!~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],m&&!~M.indexOf(s))return D.unknown("-".repeat(a)+s);zu(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(E)for(t in o)for(r=D.alias[t]||[];r.length>0;)o[r.shift()]=o[t];return o}function Vu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uu,pu;function qu(){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 b=qu(),V={exports:{}},fu;function Gu(){if(fu)return V.exports;fu=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,E=C.indexOf(n,o.length);return~E?o+s(C,n,a,E)+n:o+C+n},s=(o,n,a,l)=>{let C="",E=0;do C+=o.substring(E,l)+a,E=l+n.length,l=o.indexOf(n,E);while(~l);return C+o.substring(E)},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 Hu=Gu();const F=Vu(Hu);function Uu({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 Ju=Uu();function Bu(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Ju,"")}function gu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mu={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}})(mu);var Zu=mu.exports;const Qu=gu(Zu);var Xu=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[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BB\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(?:\uD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1E\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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DDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const uD=gu(Xu);function L(e,D={}){if(typeof e!="string"||e.length===0||(D={ambiguousIsNarrow:!0,...D},e=Bu(e),e.length===0))return 0;e=e.replace(uD()," ");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(Qu.eastAsianWidth(i)){case"F":case"W":r+=2;break;case"A":r+=t;break;default:r+=1}}return r}const Du=10,bu=(e=0)=>D=>`\x1B[${D+e}m`,Au=(e=0)=>D=>`\x1B[${38+e};5;${D}m`,vu=(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 DD=Object.keys(h.color),eD=Object.keys(h.bgColor);[...DD,...eD];function tD(){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=bu(),h.color.ansi256=Au(),h.color.ansi16m=vu(),h.bgColor.ansi=bu(Du),h.bgColor.ansi256=Au(Du),h.bgColor.ansi16m=vu(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 rD=tD(),q=new Set(["\x1B","\x9B"]),iD=39,eu="\x07",wu="[",sD="]",$u="m",tu=`${sD}8;;`,yu=e=>`${q.values().next().value}${wu}${e}${$u}`,xu=e=>`${q.values().next().value}${tu}${e}${eu}`,nD=e=>e.split(" ").map(D=>L(D)),ru=(e,D,t)=>{const r=[...D];let i=!1,s=!1,u=L(Bu(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===$u&&(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())},oD=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("")},aD=(e,D,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let r="",i,s;const u=nD(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 E=D-C,m=1+Math.floor((u[a]-E-1)/D);Math.floor((u[a]-1)/D)<m&&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=>oD(a)));const n=[...o.join(`
|
|
2
|
+
`)];for(const[a,l]of n.entries()){if(r+=l,q.has(l)){const{groups:E}=new RegExp(`(?:\\${wu}(?<code>\\d+)m|\\${tu}(?<uri>.*)${eu})`).exec(n.slice(a).join(""))||{groups:{}};if(E.code!==void 0){const m=Number.parseFloat(E.code);i=m===iD?void 0:m}else E.uri!==void 0&&(s=E.uri.length===0?void 0:E.uri)}const C=rD.codes.get(Number(i));n[a+1]===`
|
|
3
|
+
`?(s&&(r+=xu("")),i&&C&&(r+=yu(C))):l===`
|
|
4
|
+
`&&(i&&C&&(r+=yu(i)),s&&(r+=xu(s)))}return r};function Su(e,D,t){return String(e).normalize().replace(/\r\n/g,`
|
|
5
5
|
`).split(`
|
|
6
|
-
`).map(r=>
|
|
7
|
-
`)}const
|
|
6
|
+
`).map(r=>aD(r,D,t)).join(`
|
|
7
|
+
`)}const FD=["up","down","left","right","space","enter","cancel"],G={actions:new Set(FD),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function iu(e,D){if(typeof e=="string")return G.aliases.get(e)===D;for(const t of e)if(t!==void 0&&iu(t,D))return!0;return!1}function lD(e,D){if(e===D)return;const t=e.split(`
|
|
8
8
|
`),r=D.split(`
|
|
9
|
-
`),i=[];for(let s=0;s<Math.max(t.length,r.length);s++)t[s]!==r[s]&&i.push(s);return i}const
|
|
10
|
-
`),H(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const D=
|
|
11
|
-
`).length-1;this.output.write(
|
|
12
|
-
`);this.output.write(i[r]),this._prevFrame=D,this.output.write(
|
|
9
|
+
`),i=[];for(let s=0;s<Math.max(t.length,r.length);s++)t[s]!==r[s]&&i.push(s);return i}const CD=globalThis.process.platform.startsWith("win"),su=Symbol("clack:cancel");function $(e){return e===su}function H(e,D){const t=e;t.isTTY&&t.setRawMode(D)}function cD({input:e=Eu,output:D=hu,overwrite:t=!0,hideCursor:r=!0}={}){const i=W.createInterface({input:e,output:D,prompt:"",tabSize:1});W.emitKeypressEvents(e,i),e.isTTY&&e.setRawMode(!0);const s=(u,{name:o,sequence:n})=>{const a=String(u);if(iu([a,o,n],"cancel")){r&&D.write(b.cursor.show),process.exit(0);return}if(!t)return;const l=o==="return"?0:-1,C=o==="return"?-1:0;W.moveCursor(D,l,C,()=>{W.clearLine(D,1,()=>{e.once("keypress",s)})})};return r&&D.write(b.cursor.hide),e.once("keypress",s),()=>{e.off("keypress",s),r&&D.write(b.cursor.show),e.isTTY&&!CD&&e.setRawMode(!1),i.terminal=!1,i.close()}}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,y=(e,D,t)=>(hD(e,typeof D!="symbol"?D+"":D,t),t);class ku{constructor(D,t=!0){y(this,"input"),y(this,"output"),y(this,"_abortSignal"),y(this,"rl"),y(this,"opts"),y(this,"_render"),y(this,"_track",!1),y(this,"_prevFrame",""),y(this,"_subscribers",new Map),y(this,"_cursor",0),y(this,"state","initial"),y(this,"error",""),y(this,"value");const{input:r=Eu,output:i=hu,render:s,signal:u,...o}=D;this.opts=o,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=t,this._abortSignal=u,this.input=r,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(D,t){const r=this._subscribers.get(D)??[];r.push(t),this._subscribers.set(D,r)}on(D,t){this.setSubscriber(D,{cb:t})}once(D,t){this.setSubscriber(D,{cb:t,once:!0})}emit(D,...t){const r=this._subscribers.get(D)??[],i=[];for(const s of r)s.cb(...t),s.once&&i.push(()=>r.splice(r.indexOf(s),1));for(const s of i)s()}prompt(){return new Promise((D,t)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),D(su);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}const r=new Ku;r._write=(i,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(r),this.rl=du.createInterface({input:this.input,output:r,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),du.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),H(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),H(this.input,!1),D(this.value)}),this.once("cancel",()=>{this.output.write(b.cursor.show),this.output.off("resize",this.render),H(this.input,!1),D(su)})})}onKeypress(D,t){if(this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&G.aliases.has(t.name)&&this.emit("cursor",G.aliases.get(t.name)),G.actions.has(t.name)&&this.emit("cursor",t.name)),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),D&&this.emit("key",D.toLowerCase()),t?.name==="return"){if(!this.value&&this.opts.placeholder&&(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder)),this.opts.validate){const r=this.opts.validate(this.value);r&&(this.error=r instanceof Error?r.message:r,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}iu([D,t?.name,t?.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(`
|
|
10
|
+
`),H(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const D=Su(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
11
|
+
`).length-1;this.output.write(b.cursor.move(-999,D*-1))}render(){const D=Su(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(b.cursor.hide);else{const t=lD(this._prevFrame,D);if(this.restoreCursor(),t&&t?.length===1){const r=t[0];this.output.write(b.cursor.move(0,r)),this.output.write(b.erase.lines(1));const i=D.split(`
|
|
12
|
+
`);this.output.write(i[r]),this._prevFrame=D,this.output.write(b.cursor.move(0,i.length-r-1));return}if(t&&t?.length>1){const r=t[0];this.output.write(b.cursor.move(0,r)),this.output.write(b.erase.down());const i=D.split(`
|
|
13
13
|
`).slice(r);this.output.write(i.join(`
|
|
14
|
-
`)),this._prevFrame=D;return}this.output.write(
|
|
15
|
-
${
|
|
14
|
+
`)),this._prevFrame=D;return}this.output.write(b.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}var dD=Object.defineProperty,pD=(e,D,t)=>D in e?dD(e,D,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[D]=t,_u=(e,D,t)=>(pD(e,typeof D!="symbol"?D+"":D,t),t);class fD extends ku{constructor(D){super(D,!1),_u(this,"options"),_u(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 BD extends ku{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 gD(){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=gD(),x=(e,D)=>nu?e:D,mD=x("\u25C6","*"),Tu=x("\u25A0","x"),Ou=x("\u25B2","x"),ou=x("\u25C7","o"),bD=x("\u250C","T"),f=x("\u2502","|"),N=x("\u2514","\u2014"),AD=x("\u25CF",">"),vD=x("\u25CB"," "),wD=x("\u25CF","\u2022"),$D=x("\u25C6","*"),yD=x("\u25B2","!"),xD=x("\u25A0","x"),Iu=e=>{switch(e){case"initial":case"active":return F.cyan(mD);case"cancel":return F.red(Tu);case"error":return F.yellow(Ou);case"submit":return F.green(ou)}},SD=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,E)=>{const m=C===0&&n,O=C===E.length-1&&a;return m||O?F.dim("..."):r(l,C+o===D)})},I=e=>new BD({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){const D=`${F.gray(f)}
|
|
15
|
+
${Iu(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
17
|
${F.yellow(f)} ${r}
|
|
18
18
|
${F.yellow(N)} ${F.yellow(this.error)}
|
|
19
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
20
|
${F.gray(f)}`:""}`;default:return`${D}${F.cyan(f)} ${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(
|
|
23
|
-
${
|
|
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(AD)} ${i} ${t.hint?F.dim(`(${t.hint})`):""}`;case"cancelled":return`${F.strikethrough(F.dim(i))}`;default:return`${F.dim(vD)} ${F.dim(i)}`}};return new fD({options:e.options,initialValue:e.initialValue,render(){const t=`${F.gray(f)}
|
|
23
|
+
${Iu(this.state)} ${e.message}
|
|
24
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)} ${
|
|
25
|
+
${F.gray(f)}`;default:return`${t}${F.cyan(f)} ${SD({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(r,i)=>D(r,i?"active":"inactive")}).join(`
|
|
26
26
|
${F.cyan(f)} `)}
|
|
27
27
|
${F.cyan(N)}
|
|
28
|
-
`}}}).prompt()},
|
|
28
|
+
`}}}).prompt()},kD=(e="")=>{process.stdout.write(`${F.gray(N)} ${F.red(e)}
|
|
29
29
|
|
|
30
|
-
`)},
|
|
31
|
-
`)},
|
|
30
|
+
`)},_D=(e="")=>{process.stdout.write(`${F.gray(bD)} ${e}
|
|
31
|
+
`)},TD=(e="")=>{process.stdout.write(`${F.gray(f)}
|
|
32
32
|
${F.gray(N)} ${e}
|
|
33
33
|
|
|
34
|
-
`)},
|
|
34
|
+
`)},c={message:(e="",{symbol:D=F.gray(f)}={})=>{const t=[`${F.gray(f)}`];if(e){const[r,...i]=e.split(`
|
|
35
35
|
`);t.push(`${D} ${r}`,...i.map(s=>`${F.gray(f)} ${s}`))}process.stdout.write(`${t.join(`
|
|
36
36
|
`)}
|
|
37
|
-
`)},info:e=>{
|
|
38
|
-
`);const
|
|
39
|
-
`);process.stdout.write(
|
|
40
|
-
`);let
|
|
37
|
+
`)},info:e=>{c.message(e,{symbol:F.blue(wD)})},success:e=>{c.message(e,{symbol:F.green($D)})},step:e=>{c.message(e,{symbol:F.green(ou)})},warn:e=>{c.message(e,{symbol:F.yellow(yD)})},warning:e=>{c.warn(e)},error:e=>{c.message(e,{symbol:F.red(xD)})}};`${F.gray(f)}`;const Mu=({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=B=>{const v=B>1?"Something went wrong":"Canceled";u&&z(v,B)},C=()=>l(2),E=()=>l(1),m=()=>{process.on("uncaughtExceptionMonitor",C),process.on("unhandledRejection",C),process.on("SIGINT",E),process.on("SIGTERM",E),process.on("exit",l)},O=()=>{process.removeListener("uncaughtExceptionMonitor",C),process.removeListener("unhandledRejection",C),process.removeListener("SIGINT",E),process.removeListener("SIGTERM",E),process.removeListener("exit",l)},M=()=>{if(n===void 0)return;r&&process.stdout.write(`
|
|
38
|
+
`);const B=n.split(`
|
|
39
|
+
`);process.stdout.write(b.cursor.move(-999,B.length-1)),process.stdout.write(b.erase.down(B.length))},R=B=>B.replace(/\.+$/,""),Y=B=>{const v=(performance.now()-B)/1e3,S=Math.floor(v/60),T=Math.floor(v%60);return S>0?`[${S}m ${T}s]`:`[${T}s]`},U=(B="")=>{u=!0,i=cD(),o=R(B),a=performance.now(),process.stdout.write(`${F.gray(f)}
|
|
40
|
+
`);let v=0,S=0;m(),s=setInterval(()=>{if(r&&o===n)return;M(),n=o;const T=F.magenta(D[v]);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}`)}v=v+1<D.length?v+1:0,S=S<D.length?S+.125:0},t)},z=(B="",v=0)=>{u=!1,clearInterval(s),M();const S=v===0?F.green(ou):v===1?F.red(Tu):F.red(Ou);o=R(B??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:(
|
|
43
|
-
|
|
42
|
+
`),O(),i()};return{start:U,stop:z,message:(B="")=>{o=R(B??o)}}},A=(e="Operation cancelled")=>kD(e);function OD(){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 Pu(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 ID(e){const D=d.readdirSync(e);return D.length===0||D.length===1&&D[0]===".git"}function MD(e){if(d.existsSync(e))for(const D of d.readdirSync(e))D!==".git"&&d.rmSync(w.resolve(e,D),{recursive:!0,force:!0})}async function Ru(e,D,{verbose:t}={}){return await new Promise((r,i)=>{t&&c.info(`Running: npx degit ${e} ${D}`);const s=Yu("npx",["degit",e,D],{shell:!0});s.stdout.on("data",u=>{t&&process.stdout.write(`\r[CLONE_REPO stdout]: ${u}`)}),s.stderr.on("data",u=>{t&&process.stdout.write(`\r[CLONE_REPO 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 ju(e,D,t=[]){d.mkdirSync(D,{recursive:!0});for(const r of d.readdirSync(e)){const i=w.resolve(e,r),s=w.resolve(D,r);PD(i,s,t)}}function PD(e,D,t=[]){t.some(r=>r===e)||(d.statSync(e).isDirectory()?ju(e,D,t):d.copyFileSync(e,D))}function RD(e,D){const t=d.readFileSync(e,"utf-8");d.writeFileSync(e,D(t),"utf-8")}function Lu(e){return e.trim().replace(/\/+$/g,"")}class jD{root;cwd=process.cwd();targetDir;packageName;addSubfolders=!1;verbose;pkgInfo;pkgManager="npm";constructor({verbose:D}={}){this.pkgInfo=OD(),this.pkgManager=this.pkgInfo?.name??"npm",this.verbose=!!D,D&&c.info(`Using ${this.pkgInfo?.name??"npm"} ${this.pkgInfo?.version??""}`)}async init({argTargetDir:D,argOverwrite:t,defaultTargetDir:r}){if(D)this.targetDir=D,c.success(`Project name: ${this.targetDir}`);else{const s=await I({message:"Project name:",defaultValue:r,placeholder:r});if($(s))return A();this.targetDir=Lu(s)}if(d.existsSync(this.targetDir)&&!ID(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 A();switch(s){case"yes":MD(this.targetDir);break;case"no":return A()}}let i=w.basename(w.resolve(this.targetDir));if(!Pu(i)){const s=await I({message:"Package name:",defaultValue:au(i),placeholder:au(i),validate(u){if(u&&!Pu(u))return"Invalid package.json name"}});if($(s))return A();s?i=s:i=au(i)}return this.packageName=i,this.root=w.join(this.cwd,this.targetDir),d.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&&d.writeFileSync(r,t)}read(D){if(!this.root)throw new Error("FileManager not initialized");const t=this.getFilePath(D);return d.readFileSync(t,"utf-8").toString()}async gitPick(D,t){if(!this.root)throw new Error("FileManager not initialized");const r=w.join(this.root,"tmp"),i=Mu();i.start("Downloading template...");try{this.verbose&&c.info(`Cloning repo ${D} path ${t}`);const s=this.addSubfolders?w.join(this.root,"frontend"):this.root;await Ru(D,r,{verbose:this.verbose}),this.verbose&&c.info(`Repo cloned. Copying path "${t}" to ${s}`),ju(w.join(r,t),s),d.rmSync(r,{recursive:!0,force:!0}),this.verbose&&c.info(`Cloned repo ${D}`),i.stop("Template download completed successfully! \u{1F680}")}catch(s){d.existsSync(r)&&d.rmSync(r,{recursive:!0,force:!0}),i.stop("Failed to download template: "+JSON.stringify(s))}}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=Mu();u.start("Creating backend...");try{this.verbose&&c.info("Creating backend folder from openfort-xyz/openfort-backend-quickstart"),await Ru("openfort-xyz/openfort-backend-quickstart",this.addSubfolders?w.join(this.root,"backend"):this.root,{verbose:this.verbose}),this.verbose&&(c.info("Cloned backend folder"),c.info("Copying .env.example to .env"));const o=w.join(this.root,"backend",".env.example"),n=w.join(this.root,"backend",".env");this.verbose&&c.info(`Reading .env.example from ${o}`);const a=d.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&&c.info(`Writing .env to ${n}`),d.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);RD(r,t)}addEnv(D){if(!this.root)throw new Error("FileManager not initialized");this.verbose&&c.info(`Filling .env with provided environment variables:
|
|
43
|
+
${JSON.stringify(D,null,2)}`);const t=this.getFilePath(".env.example"),r=this.getFilePath(".env");this.verbose&&(c.info(`Reading .env.example from ${t}`),c.info(`Writing .env to ${r}`));const i=d.readFileSync(t,"utf-8").split(`
|
|
44
|
+
`).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});d.writeFileSync(r,i.join(`
|
|
44
45
|
`),"utf-8")}outro(){let D="";const t=w.relative(this.cwd,this.root);D+=`Done.
|
|
45
46
|
|
|
46
47
|
Now run:`,this.root!==this.cwd&&(D+=`
|
|
@@ -54,7 +55,7 @@ For the backend project, run in one terminal.`,D+=`
|
|
|
54
55
|
cd backend`,r(),D+=`
|
|
55
56
|
|
|
56
57
|
Then run the frontend project in another terminal.`,D+=`
|
|
57
|
-
cd frontend`),r(),
|
|
58
|
+
cd frontend`),r(),TD(D)}}const{blue:De,blueBright:ee,cyan:LD,green:ND,greenBright:te,magenta:re,red:ie,redBright:se,reset:ne,yellow:KD}=F,Fu=[{name:"openfort-ui",display:"Openfort UI",hint:"default",color:LD},{name:"headless",display:"Headless UI",hint:"custom, unstyled",color:ND},{name:"firebase",display:"Third party auth",hint:"with Firebase",color:KD}],YD=Fu.map(e=>e.name);async function zD({argTemplate:e,availableTemplates:D=YD}){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 A();t=i.name}return t}const _=Wu(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}}),WD=`Usage: create-openfort [OPTION]... [DIRECTORY]
|
|
58
59
|
|
|
59
60
|
Create a new Openfortkit project in TypeScript.
|
|
60
61
|
With no arguments, start the CLI in interactive mode.
|
|
@@ -67,9 +68,9 @@ Options:
|
|
|
67
68
|
-t, --template Template to use
|
|
68
69
|
|
|
69
70
|
--no-validate Disable input validation
|
|
70
|
-
`,
|
|
71
|
-
`),
|
|
72
|
-
Please make sure to provide valid values.`+D);const o=await new
|
|
71
|
+
`,VD="openfortkit-project",qD="http://localhost:3110/api/protected-create-encryption-session",Nu="https://dashboard.openfort.io";async function GD(){const e=_._[0]?Lu(String(_._[0])):void 0,D=_.template,t=_.overwrite,r=_.verbose,i=!!_.validate,s=_.default,u=_.dashboard?_.dashboard!==!0?String(_.dashboard):Nu:!1;if(_.help){console.log(WD);return}console.log(`
|
|
72
|
+
`),_D("Let's create a new Openfortkit project!"),r&&c.success("Verbose mode enabled"),u&&c.info(`You can manage your Openfort project at ${u}`),i||c.warn(`No validation will be performed on the input values.
|
|
73
|
+
Please make sure to provide valid values.`+D);const o=await new jD({verbose:r}).init({argTargetDir:e,argOverwrite:t,defaultTargetDir:VD});if(!o||!o.root)return;D&&r&&c.info(`Using template from argument: ${D}`);const n=await zD({argTemplate:D});if(!n)return;let a=!1,l=qD;{const p=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($(p))throw A();if(p){const g=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($(g))throw A();a=g;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 A();l=cu,await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"}}).then(P=>P.json()).then(P=>{P.session?Q=!0:c.error(`Invalid API endpoint:
|
|
73
74
|
|
|
74
75
|
Response must be:
|
|
75
76
|
{
|
|
@@ -78,6 +79,6 @@ Response must be:
|
|
|
78
79
|
|
|
79
80
|
But got:
|
|
80
81
|
${JSON.stringify(P,null,2)}
|
|
81
|
-
`)}).catch(P=>{
|
|
82
|
+
`)}).catch(P=>{c.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 p=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($(p))throw A();C=p}c.success(`Good! You are all set.
|
|
82
83
|
Please provide the following keys to continue.
|
|
83
|
-
Get your keys from ${u||
|
|
84
|
+
Get your keys from ${u||Nu}/developers/api-keys`);const E="[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}",m=`(test|live)_${E}`,O=new RegExp(`^sk_${m}$`),M=new RegExp(`^pk_${m}$`),R=new RegExp(`^${E}$`),Y=async()=>{const p=await I({message:"Openfort Publishable Key:",placeholder:"pk...",validate:g=>{if(i)if(g){if(!M.test(g))return"Openfort Publishable Key is invalid"}else return"Openfort Publishable Key is required"}});if($(p))throw A();return p},U=async()=>{const p=await I({message:"Openfort Secret:",placeholder:"sk_...",validate:g=>{if(i)if(g){if(!O.test(g))return"Openfort Secret Key is invalid"}else return"Openfort Secret Key is required"}});if($(p))throw A();return p},z=async()=>{const p=await I({message:"Shield Publishable Key:",placeholder:"Your Shield Publishable Key",validate:g=>{if(i)if(g){if(!R.test(g))return"Shield Publishable Key is invalid"}else return"Shield Publishable Key is required"}});if($(p))throw A();return p},B=async()=>{const p=await I({message:"Shield Secret:",placeholder:"Your Shield Secret",validate:g=>{if(i)if(g){if(!R.test(g))return"Shield Secret Key is invalid"}else return"Shield Secret Key is required"}});if($(p))throw A();return p},v=async()=>{const p=await I({message:"Shield Encryption Share:",placeholder:"Your Shield Encryption Share",validate:g=>{if(i)if(g){if(g.length!==44)return"Shield Encryption Share is invalid"}else return"Shield Encryption Share is required"}});if($(p))throw A();return p},S=await Y(),T=await z();let j,J,Z;if(a&&(j=await U(),Z=await v(),J=await B()),r&&c.info(`Using template: ${n}`),c.step(`Scaffolding project in ${o.root}...`),a){if(!j||!J||!T||!Z)throw A("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",`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()}GD().catch(()=>{});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-openfort",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
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
|
},
|