create-enchilada 1.0.2 → 1.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.
package/dist/index.js CHANGED
@@ -1,42 +1,42 @@
1
- import Pt from"readline";import Ct from"events";import{fileURLToPath as Dt}from"node:url";import z from"node:path";import oe,{argv as ai}from"node:process";import ci from"node:os";import Et from"node:tty";import{readFileSync as di,writeFileSync as fi,existsSync as _t,mkdirSync as pi}from"fs";import{readdirSync as mi,lstatSync as gi,mkdirSync as vi,copyFileSync as bi}from"node:fs";function qt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var le={},he,At;function q(){if(At)return he;At=1;const{FORCE_COLOR:e,NODE_DISABLE_COLORS:r,TERM:o}=process.env,t={enabled:!r&&o!=="dumb"&&e!=="0",reset:i(0,0),bold:i(1,22),dim:i(2,22),italic:i(3,23),underline:i(4,24),inverse:i(7,27),hidden:i(8,28),strikethrough:i(9,29),black:i(30,39),red:i(31,39),green:i(32,39),yellow:i(33,39),blue:i(34,39),magenta:i(35,39),cyan:i(36,39),white:i(37,39),gray:i(90,39),grey:i(90,39),bgBlack:i(40,49),bgRed:i(41,49),bgGreen:i(42,49),bgYellow:i(43,49),bgBlue:i(44,49),bgMagenta:i(45,49),bgCyan:i(46,49),bgWhite:i(47,49)};function s(b,l){let a=0,n,m="",f="";for(;a<b.length;a++)n=b[a],m+=n.open,f+=n.close,l.includes(n.close)&&(l=l.replace(n.rgx,n.close+n.open));return m+l+f}function c(b,l){let a={has:b,keys:l};return a.reset=t.reset.bind(a),a.bold=t.bold.bind(a),a.dim=t.dim.bind(a),a.italic=t.italic.bind(a),a.underline=t.underline.bind(a),a.inverse=t.inverse.bind(a),a.hidden=t.hidden.bind(a),a.strikethrough=t.strikethrough.bind(a),a.black=t.black.bind(a),a.red=t.red.bind(a),a.green=t.green.bind(a),a.yellow=t.yellow.bind(a),a.blue=t.blue.bind(a),a.magenta=t.magenta.bind(a),a.cyan=t.cyan.bind(a),a.white=t.white.bind(a),a.gray=t.gray.bind(a),a.grey=t.grey.bind(a),a.bgBlack=t.bgBlack.bind(a),a.bgRed=t.bgRed.bind(a),a.bgGreen=t.bgGreen.bind(a),a.bgYellow=t.bgYellow.bind(a),a.bgBlue=t.bgBlue.bind(a),a.bgMagenta=t.bgMagenta.bind(a),a.bgCyan=t.bgCyan.bind(a),a.bgWhite=t.bgWhite.bind(a),a}function i(b,l){let a={open:`\x1B[${b}m`,close:`\x1B[${l}m`,rgx:new RegExp(`\\x1b\\[${l}m`,"g")};return function(n){return this!==void 0&&this.has!==void 0?(this.has.includes(b)||(this.has.push(b),this.keys.push(a)),n===void 0?this:t.enabled?s(this.keys,n+""):n+""):n===void 0?c([b],[a]):t.enabled?s([a],n+""):n+""}}return he=t,he}var ue,It;function yi(){return It||(It=1,ue=(e,r)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(r){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}),ue}var ae,jt;function ce(){return jt||(jt=1,ae=e=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),o=new RegExp(r,"g");return typeof e=="string"?e.replace(o,""):e}),ae}var de,Ft;function A(){if(Ft)return de;Ft=1;const e="\x1B",r=`${e}[`,o="\x07",t={to(i,b){return b?`${r}${b+1};${i+1}H`:`${r}${i+1}G`},move(i,b){let l="";return i<0?l+=`${r}${-i}D`:i>0&&(l+=`${r}${i}C`),b<0?l+=`${r}${-b}A`:b>0&&(l+=`${r}${b}B`),l},up:(i=1)=>`${r}${i}A`,down:(i=1)=>`${r}${i}B`,forward:(i=1)=>`${r}${i}C`,backward:(i=1)=>`${r}${i}D`,nextLine:(i=1)=>`${r}E`.repeat(i),prevLine:(i=1)=>`${r}F`.repeat(i),left:`${r}G`,hide:`${r}?25l`,show:`${r}?25h`,save:`${e}7`,restore:`${e}8`},s={up:(i=1)=>`${r}S`.repeat(i),down:(i=1)=>`${r}T`.repeat(i)},c={screen:`${r}2J`,up:(i=1)=>`${r}1J`.repeat(i),down:(i=1)=>`${r}J`.repeat(i),line:`${r}2K`,lineEnd:`${r}K`,lineStart:`${r}1K`,lines(i){let b="";for(let l=0;l<i;l++)b+=this.line+(l<i-1?t.up():"");return i&&(b+=t.left),b}};return de={cursor:t,scroll:s,erase:c,beep:o},de}var fe,Nt;function wi(){if(Nt)return fe;Nt=1;function e(l,a){var n=typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(!n){if(Array.isArray(l)||(n=r(l))||a){n&&(l=n);var m=0,f=function(){};return{s:f,n:function(){return m>=l.length?{done:!0}:{done:!1,value:l[m++]}},e:function(d){throw d},f}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,u=!1,v;return{s:function(){n=n.call(l)},n:function(){var d=n.next();return h=d.done,d},e:function(d){u=!0,v=d},f:function(){try{!h&&n.return!=null&&n.return()}finally{if(u)throw v}}}}function r(l,a){if(l){if(typeof l=="string")return o(l,a);var n=Object.prototype.toString.call(l).slice(8,-1);if(n==="Object"&&l.constructor&&(n=l.constructor.name),n==="Map"||n==="Set")return Array.from(l);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(l,a)}}function o(l,a){(a==null||a>l.length)&&(a=l.length);for(var n=0,m=new Array(a);n<a;n++)m[n]=l[n];return m}const t=ce(),s=A(),c=s.erase,i=s.cursor,b=l=>[...t(l)].length;return fe=function(l,a){if(!a)return c.line+i.to(0);let n=0;const m=l.split(/\r?\n/);var f=e(m),h;try{for(f.s();!(h=f.n()).done;){let u=h.value;n+=1+Math.floor(Math.max(b(u)-1,0)/a)}}catch(u){f.e(u)}finally{f.f()}return c.lines(n)},fe}var pe,kt;function Lt(){if(kt)return pe;kt=1;const e={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"};return pe=process.platform==="win32"?r:e,pe}var me,Yt;function xi(){if(Yt)return me;Yt=1;const e=q(),r=Lt(),o=Object.freeze({password:{scale:1,render:l=>"*".repeat(l.length)},emoji:{scale:2,render:l=>"\u{1F603}".repeat(l.length)},invisible:{scale:0,render:l=>""},default:{scale:1,render:l=>`${l}`}}),t=l=>o[l]||o.default,s=Object.freeze({aborted:e.red(r.cross),done:e.green(r.tick),exited:e.yellow(r.cross),default:e.cyan("?")});return me={styles:o,render:t,symbols:s,symbol:(l,a,n)=>a?s.aborted:n?s.exited:l?s.done:s.default,delimiter:l=>e.gray(l?r.ellipsis:r.pointerSmall),item:(l,a)=>e.gray(l?a?r.pointerSmall:"+":r.line)},me}var ge,Bt;function $i(){if(Bt)return ge;Bt=1;const e=ce();return ge=function(r,o){let t=String(e(r)||"").split(/\r?\n/);return o?t.map(s=>Math.ceil(s.length/o)).reduce((s,c)=>s+c):t.length},ge}var ve,Vt;function Si(){return Vt||(Vt=1,ve=(e,r={})=>{const o=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"",t=r.width;return(e||"").split(/\r?\n/g).map(s=>s.split(/\s+/g).reduce((c,i)=>(i.length+o.length>=t||c[c.length-1].length+i.length+1<t?c[c.length-1]+=` ${i}`:c.push(`${o}${i}`),c),[o]).join(`
1
+ import Pt from"readline";import Ct from"events";import{fileURLToPath as ui}from"node:url";import X from"node:path";import oe,{argv as ai}from"node:process";import ci from"node:os";import Et from"node:tty";import{readFileSync as di,writeFileSync as fi,existsSync as Dt,mkdirSync as pi}from"fs";import{readdirSync as mi,lstatSync as gi,mkdirSync as vi,copyFileSync as bi}from"node:fs";function _t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var le={},he,qt;function q(){if(qt)return he;qt=1;const{FORCE_COLOR:e,NODE_DISABLE_COLORS:r,TERM:o}=process.env,t={enabled:!r&&o!=="dumb"&&e!=="0",reset:i(0,0),bold:i(1,22),dim:i(2,22),italic:i(3,23),underline:i(4,24),inverse:i(7,27),hidden:i(8,28),strikethrough:i(9,29),black:i(30,39),red:i(31,39),green:i(32,39),yellow:i(33,39),blue:i(34,39),magenta:i(35,39),cyan:i(36,39),white:i(37,39),gray:i(90,39),grey:i(90,39),bgBlack:i(40,49),bgRed:i(41,49),bgGreen:i(42,49),bgYellow:i(43,49),bgBlue:i(44,49),bgMagenta:i(45,49),bgCyan:i(46,49),bgWhite:i(47,49)};function s(b,l){let a=0,n,f="",p="";for(;a<b.length;a++)n=b[a],f+=n.open,p+=n.close,l.includes(n.close)&&(l=l.replace(n.rgx,n.close+n.open));return f+l+p}function c(b,l){let a={has:b,keys:l};return a.reset=t.reset.bind(a),a.bold=t.bold.bind(a),a.dim=t.dim.bind(a),a.italic=t.italic.bind(a),a.underline=t.underline.bind(a),a.inverse=t.inverse.bind(a),a.hidden=t.hidden.bind(a),a.strikethrough=t.strikethrough.bind(a),a.black=t.black.bind(a),a.red=t.red.bind(a),a.green=t.green.bind(a),a.yellow=t.yellow.bind(a),a.blue=t.blue.bind(a),a.magenta=t.magenta.bind(a),a.cyan=t.cyan.bind(a),a.white=t.white.bind(a),a.gray=t.gray.bind(a),a.grey=t.grey.bind(a),a.bgBlack=t.bgBlack.bind(a),a.bgRed=t.bgRed.bind(a),a.bgGreen=t.bgGreen.bind(a),a.bgYellow=t.bgYellow.bind(a),a.bgBlue=t.bgBlue.bind(a),a.bgMagenta=t.bgMagenta.bind(a),a.bgCyan=t.bgCyan.bind(a),a.bgWhite=t.bgWhite.bind(a),a}function i(b,l){let a={open:`\x1B[${b}m`,close:`\x1B[${l}m`,rgx:new RegExp(`\\x1b\\[${l}m`,"g")};return function(n){return this!==void 0&&this.has!==void 0?(this.has.includes(b)||(this.has.push(b),this.keys.push(a)),n===void 0?this:t.enabled?s(this.keys,n+""):n+""):n===void 0?c([b],[a]):t.enabled?s([a],n+""):n+""}}return he=t,he}var ue,At;function yi(){return At||(At=1,ue=(e,r)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(r){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}),ue}var ae,It;function ce(){return It||(It=1,ae=e=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),o=new RegExp(r,"g");return typeof e=="string"?e.replace(o,""):e}),ae}var de,Ft;function A(){if(Ft)return de;Ft=1;const e="\x1B",r=`${e}[`,o="\x07",t={to(i,b){return b?`${r}${b+1};${i+1}H`:`${r}${i+1}G`},move(i,b){let l="";return i<0?l+=`${r}${-i}D`:i>0&&(l+=`${r}${i}C`),b<0?l+=`${r}${-b}A`:b>0&&(l+=`${r}${b}B`),l},up:(i=1)=>`${r}${i}A`,down:(i=1)=>`${r}${i}B`,forward:(i=1)=>`${r}${i}C`,backward:(i=1)=>`${r}${i}D`,nextLine:(i=1)=>`${r}E`.repeat(i),prevLine:(i=1)=>`${r}F`.repeat(i),left:`${r}G`,hide:`${r}?25l`,show:`${r}?25h`,save:`${e}7`,restore:`${e}8`},s={up:(i=1)=>`${r}S`.repeat(i),down:(i=1)=>`${r}T`.repeat(i)},c={screen:`${r}2J`,up:(i=1)=>`${r}1J`.repeat(i),down:(i=1)=>`${r}J`.repeat(i),line:`${r}2K`,lineEnd:`${r}K`,lineStart:`${r}1K`,lines(i){let b="";for(let l=0;l<i;l++)b+=this.line+(l<i-1?t.up():"");return i&&(b+=t.left),b}};return de={cursor:t,scroll:s,erase:c,beep:o},de}var fe,jt;function wi(){if(jt)return fe;jt=1;function e(l,a){var n=typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(!n){if(Array.isArray(l)||(n=r(l))||a){n&&(l=n);var f=0,p=function(){};return{s:p,n:function(){return f>=l.length?{done:!0}:{done:!1,value:l[f++]}},e:function(d){throw d},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h=!0,u=!1,v;return{s:function(){n=n.call(l)},n:function(){var d=n.next();return h=d.done,d},e:function(d){u=!0,v=d},f:function(){try{!h&&n.return!=null&&n.return()}finally{if(u)throw v}}}}function r(l,a){if(l){if(typeof l=="string")return o(l,a);var n=Object.prototype.toString.call(l).slice(8,-1);if(n==="Object"&&l.constructor&&(n=l.constructor.name),n==="Map"||n==="Set")return Array.from(l);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(l,a)}}function o(l,a){(a==null||a>l.length)&&(a=l.length);for(var n=0,f=new Array(a);n<a;n++)f[n]=l[n];return f}const t=ce(),s=A(),c=s.erase,i=s.cursor,b=l=>[...t(l)].length;return fe=function(l,a){if(!a)return c.line+i.to(0);let n=0;const f=l.split(/\r?\n/);var p=e(f),h;try{for(p.s();!(h=p.n()).done;){let u=h.value;n+=1+Math.floor(Math.max(b(u)-1,0)/a)}}catch(u){p.e(u)}finally{p.f()}return c.lines(n)},fe}var pe,Nt;function kt(){if(Nt)return pe;Nt=1;const e={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"};return pe=process.platform==="win32"?r:e,pe}var me,Lt;function xi(){if(Lt)return me;Lt=1;const e=q(),r=kt(),o=Object.freeze({password:{scale:1,render:l=>"*".repeat(l.length)},emoji:{scale:2,render:l=>"\u{1F603}".repeat(l.length)},invisible:{scale:0,render:l=>""},default:{scale:1,render:l=>`${l}`}}),t=l=>o[l]||o.default,s=Object.freeze({aborted:e.red(r.cross),done:e.green(r.tick),exited:e.yellow(r.cross),default:e.cyan("?")});return me={styles:o,render:t,symbols:s,symbol:(l,a,n)=>a?s.aborted:n?s.exited:l?s.done:s.default,delimiter:l=>e.gray(l?r.ellipsis:r.pointerSmall),item:(l,a)=>e.gray(l?a?r.pointerSmall:"+":r.line)},me}var ge,Yt;function $i(){if(Yt)return ge;Yt=1;const e=ce();return ge=function(r,o){let t=String(e(r)||"").split(/\r?\n/);return o?t.map(s=>Math.ceil(s.length/o)).reduce((s,c)=>s+c):t.length},ge}var ve,Bt;function Si(){return Bt||(Bt=1,ve=(e,r={})=>{const o=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"",t=r.width;return(e||"").split(/\r?\n/g).map(s=>s.split(/\s+/g).reduce((c,i)=>(i.length+o.length>=t||c[c.length-1].length+i.length+1<t?c[c.length-1]+=` ${i}`:c.push(`${o}${i}`),c),[o]).join(`
3
3
  `)).join(`
4
- `)}),ve}var be,Ht;function Ti(){return Ht||(Ht=1,be=(e,r,o)=>{o=o||r;let t=Math.min(r-o,e-Math.floor(o/2));t<0&&(t=0);let s=Math.min(t+o,r);return{startIndex:t,endIndex:s}}),be}var ye,Ut;function B(){return Ut||(Ut=1,ye={action:yi(),clear:wi(),style:xi(),strip:ce(),figures:Lt(),lines:$i(),wrap:Si(),entriesToDisplay:Ti()}),ye}var we,Gt;function K(){if(Gt)return we;Gt=1;const e=Pt,r=B(),o=r.action,t=Ct,s=A(),c=s.beep,i=s.cursor,b=q();class l extends t{constructor(n={}){super(),this.firstRender=!0,this.in=n.stdin||process.stdin,this.out=n.stdout||process.stdout,this.onRender=(n.onRender||(()=>{})).bind(this);const m=e.createInterface({input:this.in,escapeCodeTimeout:50});e.emitKeypressEvents(this.in,m),this.in.isTTY&&this.in.setRawMode(!0);const f=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,h=(u,v)=>{let g=o(v,f);g===!1?this._&&this._(u,v):typeof this[g]=="function"?this[g](v):this.bell()};this.close=()=>{this.out.write(i.show),this.in.removeListener("keypress",h),this.in.isTTY&&this.in.setRawMode(!1),m.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",h)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(c)}render(){this.onRender(b),this.firstRender&&(this.firstRender=!1)}}return we=l,we}var xe,Jt;function Mi(){if(Jt)return xe;Jt=1;function e(h,u,v,g,d,p,y){try{var w=h[p](y),x=w.value}catch(S){v(S);return}w.done?u(x):Promise.resolve(x).then(g,d)}function r(h){return function(){var u=this,v=arguments;return new Promise(function(g,d){var p=h.apply(u,v);function y(x){e(p,g,d,y,w,"next",x)}function w(x){e(p,g,d,y,w,"throw",x)}y(void 0)})}}const o=q(),t=K(),s=A(),c=s.erase,i=s.cursor,b=B(),l=b.style,a=b.clear,n=b.lines,m=b.figures;class f extends t{constructor(u={}){super(u),this.transform=l.render(u.style),this.scale=this.transform.scale,this.msg=u.message,this.initial=u.initial||"",this.validator=u.validate||(()=>!0),this.value="",this.errorMsg=u.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=a("",this.out.columns),this.render()}set value(u){!u&&this.initial?(this.placeholder=!0,this.rendered=o.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(u)),this._value=u,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
4
+ `)}),ve}var be,Vt;function Ti(){return Vt||(Vt=1,be=(e,r,o)=>{o=o||r;let t=Math.min(r-o,e-Math.floor(o/2));t<0&&(t=0);let s=Math.min(t+o,r);return{startIndex:t,endIndex:s}}),be}var ye,Ht;function B(){return Ht||(Ht=1,ye={action:yi(),clear:wi(),style:xi(),strip:ce(),figures:kt(),lines:$i(),wrap:Si(),entriesToDisplay:Ti()}),ye}var we,Ut;function z(){if(Ut)return we;Ut=1;const e=Pt,r=B(),o=r.action,t=Ct,s=A(),c=s.beep,i=s.cursor,b=q();class l extends t{constructor(n={}){super(),this.firstRender=!0,this.in=n.stdin||process.stdin,this.out=n.stdout||process.stdout,this.onRender=(n.onRender||(()=>{})).bind(this);const f=e.createInterface({input:this.in,escapeCodeTimeout:50});e.emitKeypressEvents(this.in,f),this.in.isTTY&&this.in.setRawMode(!0);const p=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,h=(u,v)=>{let g=o(v,p);g===!1?this._&&this._(u,v):typeof this[g]=="function"?this[g](v):this.bell()};this.close=()=>{this.out.write(i.show),this.in.removeListener("keypress",h),this.in.isTTY&&this.in.setRawMode(!1),f.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",h)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(c)}render(){this.onRender(b),this.firstRender&&(this.firstRender=!1)}}return we=l,we}var xe,Gt;function Mi(){if(Gt)return xe;Gt=1;function e(h,u,v,g,d,m,y){try{var w=h[m](y),x=w.value}catch(S){v(S);return}w.done?u(x):Promise.resolve(x).then(g,d)}function r(h){return function(){var u=this,v=arguments;return new Promise(function(g,d){var m=h.apply(u,v);function y(x){e(m,g,d,y,w,"next",x)}function w(x){e(m,g,d,y,w,"throw",x)}y(void 0)})}}const o=q(),t=z(),s=A(),c=s.erase,i=s.cursor,b=B(),l=b.style,a=b.clear,n=b.lines,f=b.figures;class p extends t{constructor(u={}){super(u),this.transform=l.render(u.style),this.scale=this.transform.scale,this.msg=u.message,this.initial=u.initial||"",this.validator=u.validate||(()=>!0),this.value="",this.errorMsg=u.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=a("",this.out.columns),this.render()}set value(u){!u&&this.initial?(this.placeholder=!0,this.rendered=o.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(u)),this._value=u,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
5
5
  `),this.close()}validate(){var u=this;return r(function*(){let v=yield u.validator(u.value);typeof v=="string"&&(u.errorMsg=v,v=!1),u.error=!v})()}submit(){var u=this;return r(function*(){if(u.value=u.value||u.initial,u.cursorOffset=0,u.cursor=u.rendered.length,yield u.validate(),u.error){u.red=!0,u.fire(),u.render();return}u.done=!0,u.aborted=!1,u.fire(),u.render(),u.out.write(`
6
6
  `),u.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(u){this.placeholder||(this.cursor=this.cursor+u,this.cursorOffset+=u)}_(u,v){let g=this.value.slice(0,this.cursor),d=this.value.slice(this.cursor);this.value=`${g}${u}${d}`,this.red=!1,this.cursor=this.placeholder?0:g.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let u=this.value.slice(0,this.cursor-1),v=this.value.slice(this.cursor);this.value=`${u}${v}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let u=this.value.slice(0,this.cursor),v=this.value.slice(this.cursor+1);this.value=`${u}${v}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(i.down(n(this.outputError,this.out.columns)-1)+a(this.outputError,this.out.columns)),this.out.write(a(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),this.red?o.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
7
7
  `).reduce((u,v,g)=>u+`
8
- ${g?" ":m.pointerSmall} ${o.red().italic(v)}`,"")),this.out.write(c.line+i.to(0)+this.outputText+i.save+this.outputError+i.restore+i.move(this.cursorOffset,0)))}}return xe=f,xe}var $e,Wt;function Oi(){if(Wt)return $e;Wt=1;const e=q(),r=K(),o=B(),t=o.style,s=o.clear,c=o.figures,i=o.wrap,b=o.entriesToDisplay,l=A(),a=l.cursor;class n extends r{constructor(f={}){super(f),this.msg=f.message,this.hint=f.hint||"- Use arrow-keys. Return to submit.",this.warn=f.warn||"- This option is disabled",this.cursor=f.initial||0,this.choices=f.choices.map((h,u)=>(typeof h=="string"&&(h={title:h,value:u}),{title:h&&(h.title||h.value||h),value:h&&(h.value===void 0?u:h.value),description:h&&h.description,selected:h&&h.selected,disabled:h&&h.disabled})),this.optionsPerPage=f.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=s("",this.out.columns),this.render()}moveCursor(f){this.cursor=f,this.value=this.choices[f].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
8
+ ${g?" ":f.pointerSmall} ${o.red().italic(v)}`,"")),this.out.write(c.line+i.to(0)+this.outputText+i.save+this.outputError+i.restore+i.move(this.cursorOffset,0)))}}return xe=p,xe}var $e,Jt;function Oi(){if(Jt)return $e;Jt=1;const e=q(),r=z(),o=B(),t=o.style,s=o.clear,c=o.figures,i=o.wrap,b=o.entriesToDisplay,l=A(),a=l.cursor;class n extends r{constructor(p={}){super(p),this.msg=p.message,this.hint=p.hint||"- Use arrow-keys. Return to submit.",this.warn=p.warn||"- This option is disabled",this.cursor=p.initial||0,this.choices=p.choices.map((h,u)=>(typeof h=="string"&&(h={title:h,value:u}),{title:h&&(h.title||h.value||h),value:h&&(h.value===void 0?u:h.value),description:h&&h.description,selected:h&&h.selected,disabled:h&&h.disabled})),this.optionsPerPage=p.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=s("",this.out.columns),this.render()}moveCursor(p){this.cursor=p,this.value=this.choices[p].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
9
9
  `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
10
- `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(f,h){if(f===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(a.hide):this.out.write(s(this.outputText,this.out.columns)),super.render();let f=b(this.cursor,this.choices.length,this.optionsPerPage),h=f.startIndex,u=f.endIndex;if(this.outputText=[t.symbol(this.done,this.aborted),e.bold(this.msg),t.delimiter(!1),this.done?this.selection.title:this.selection.disabled?e.yellow(this.warn):e.gray(this.hint)].join(" "),!this.done){this.outputText+=`
11
- `;for(let v=h;v<u;v++){let g,d,p="",y=this.choices[v];v===h&&h>0?d=c.arrowUp:v===u-1&&u<this.choices.length?d=c.arrowDown:d=" ",y.disabled?(g=this.cursor===v?e.gray().underline(y.title):e.strikethrough().gray(y.title),d=(this.cursor===v?e.bold().gray(c.pointer)+" ":" ")+d):(g=this.cursor===v?e.cyan().underline(y.title):y.title,d=(this.cursor===v?e.cyan(c.pointer)+" ":" ")+d,y.description&&this.cursor===v&&(p=` - ${y.description}`,(d.length+g.length+p.length>=this.out.columns||y.description.split(/\r?\n/).length>1)&&(p=`
12
- `+i(y.description,{margin:3,width:this.out.columns})))),this.outputText+=`${d} ${g}${e.gray(p)}
13
- `}}this.out.write(this.outputText)}}return $e=n,$e}var Se,zt;function Ri(){if(zt)return Se;zt=1;const e=q(),r=K(),o=B(),t=o.style,s=o.clear,c=A(),i=c.cursor,b=c.erase;class l extends r{constructor(n={}){super(n),this.msg=n.message,this.value=!!n.initial,this.active=n.active||"on",this.inactive=n.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
10
+ `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(p,h){if(p===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(a.hide):this.out.write(s(this.outputText,this.out.columns)),super.render();let p=b(this.cursor,this.choices.length,this.optionsPerPage),h=p.startIndex,u=p.endIndex;if(this.outputText=[t.symbol(this.done,this.aborted),e.bold(this.msg),t.delimiter(!1),this.done?this.selection.title:this.selection.disabled?e.yellow(this.warn):e.gray(this.hint)].join(" "),!this.done){this.outputText+=`
11
+ `;for(let v=h;v<u;v++){let g,d,m="",y=this.choices[v];v===h&&h>0?d=c.arrowUp:v===u-1&&u<this.choices.length?d=c.arrowDown:d=" ",y.disabled?(g=this.cursor===v?e.gray().underline(y.title):e.strikethrough().gray(y.title),d=(this.cursor===v?e.bold().gray(c.pointer)+" ":" ")+d):(g=this.cursor===v?e.cyan().underline(y.title):y.title,d=(this.cursor===v?e.cyan(c.pointer)+" ":" ")+d,y.description&&this.cursor===v&&(m=` - ${y.description}`,(d.length+g.length+m.length>=this.out.columns||y.description.split(/\r?\n/).length>1)&&(m=`
12
+ `+i(y.description,{margin:3,width:this.out.columns})))),this.outputText+=`${d} ${g}${e.gray(m)}
13
+ `}}this.out.write(this.outputText)}}return $e=n,$e}var Se,Wt;function Ri(){if(Wt)return Se;Wt=1;const e=q(),r=z(),o=B(),t=o.style,s=o.clear,c=A(),i=c.cursor,b=c.erase;class l extends r{constructor(n={}){super(n),this.msg=n.message,this.value=!!n.initial,this.active=n.active||"on",this.inactive=n.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
14
14
  `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
15
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(n,m){if(n===" ")this.value=!this.value;else if(n==="1")this.value=!0;else if(n==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(i.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[t.symbol(this.done,this.aborted),e.bold(this.msg),t.delimiter(this.done),this.value?this.inactive:e.cyan().underline(this.inactive),e.gray("/"),this.value?e.cyan().underline(this.active):this.active].join(" "),this.out.write(b.line+i.to(0)+this.outputText))}}return Se=l,Se}var Te,Kt;function U(){if(Kt)return Te;Kt=1;class e{constructor({token:o,date:t,parts:s,locales:c}){this.token=o,this.date=t||new Date,this.parts=s||[this],this.locales=c||{}}up(){}down(){}next(){const o=this.parts.indexOf(this);return this.parts.find((t,s)=>s>o&&t instanceof e)}setTo(o){}prev(){let o=[].concat(this.parts).reverse();const t=o.indexOf(this);return o.find((s,c)=>c>t&&s instanceof e)}toString(){return String(this.date)}}return Te=e,Te}var Me,Zt;function Pi(){if(Zt)return Me;Zt=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}return Me=r,Me}var Oe,Xt;function Ci(){if(Xt)return Oe;Xt=1;const e=U(),r=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th");class o extends e{constructor(s={}){super(s)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(s){this.date.setDate(parseInt(s.substr(-2)))}toString(){let s=this.date.getDate(),c=this.date.getDay();return this.token==="DD"?String(s).padStart(2,"0"):this.token==="Do"?s+r(s):this.token==="d"?c+1:this.token==="ddd"?this.locales.weekdaysShort[c]:this.token==="dddd"?this.locales.weekdays[c]:s}}return Oe=o,Oe}var Re,Qt;function Di(){if(Qt)return Re;Qt=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}}return Re=r,Re}var Pe,er;function Ei(){if(er)return Pe;er=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return Pe=r,Pe}var Ce,tr;function _i(){if(tr)return Ce;tr=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}return Ce=r,Ce}var De,rr;function qi(){if(rr)return De;rr=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),s=this.token.length;return s===2?String(t+1).padStart(2,"0"):s===3?this.locales.monthsShort[t]:s===4?this.locales.months[t]:String(t+1)}}return De=r,De}var Ee,ir;function Ai(){if(ir)return Ee;ir=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}return Ee=r,Ee}var _e,sr;function Ii(){if(sr)return _e;sr=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}return _e=r,_e}var qe,nr;function ji(){return nr||(nr=1,qe={DatePart:U(),Meridiem:Pi(),Day:Ci(),Hours:Di(),Milliseconds:Ei(),Minutes:_i(),Month:qi(),Seconds:Ai(),Year:Ii()}),qe}var Ae,or;function Fi(){if(or)return Ae;or=1;function e(M,$,R,D,C,j,Y){try{var N=M[j](Y),F=N.value}catch(X){R(X);return}N.done?$(F):Promise.resolve(F).then(D,C)}function r(M){return function(){var $=this,R=arguments;return new Promise(function(D,C){var j=M.apply($,R);function Y(F){e(j,D,C,Y,N,"next",F)}function N(F){e(j,D,C,Y,N,"throw",F)}Y(void 0)})}}const o=q(),t=K(),s=B(),c=s.style,i=s.clear,b=s.figures,l=A(),a=l.erase,n=l.cursor,m=ji(),f=m.DatePart,h=m.Meridiem,u=m.Day,v=m.Hours,g=m.Milliseconds,d=m.Minutes,p=m.Month,y=m.Seconds,w=m.Year,x=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,S={1:({token:M})=>M.replace(/\\(.)/g,"$1"),2:M=>new u(M),3:M=>new p(M),4:M=>new w(M),5:M=>new h(M),6:M=>new v(M),7:M=>new d(M),8:M=>new y(M),9:M=>new g(M)},T={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class O extends t{constructor($={}){super($),this.msg=$.message,this.cursor=0,this.typed="",this.locales=Object.assign(T,$.locales),this._date=$.initial||new Date,this.errorMsg=$.error||"Please Enter A Valid Value",this.validator=$.validate||(()=>!0),this.mask=$.mask||"YYYY-MM-DD HH:mm:ss",this.clear=i("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date($){$&&this._date.setTime($.getTime())}set mask($){let R;for(this.parts=[];R=x.exec($);){let C=R.shift(),j=R.findIndex(Y=>Y!=null);this.parts.push(j in S?S[j]({token:R[j]||C,date:this.date,parts:this.parts,locales:this.locales}):R[j]||C)}let D=this.parts.reduce((C,j)=>(typeof j=="string"&&typeof C[C.length-1]=="string"?C[C.length-1]+=j:C.push(j),C),[]);this.parts.splice(0),this.parts.push(...D),this.reset()}moveCursor($){this.typed="",this.cursor=$,this.fire()}reset(){this.moveCursor(this.parts.findIndex($=>$ instanceof f)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
15
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(n,f){if(n===" ")this.value=!this.value;else if(n==="1")this.value=!0;else if(n==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(i.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[t.symbol(this.done,this.aborted),e.bold(this.msg),t.delimiter(this.done),this.value?this.inactive:e.cyan().underline(this.inactive),e.gray("/"),this.value?e.cyan().underline(this.active):this.active].join(" "),this.out.write(b.line+i.to(0)+this.outputText))}}return Se=l,Se}var Te,zt;function U(){if(zt)return Te;zt=1;class e{constructor({token:o,date:t,parts:s,locales:c}){this.token=o,this.date=t||new Date,this.parts=s||[this],this.locales=c||{}}up(){}down(){}next(){const o=this.parts.indexOf(this);return this.parts.find((t,s)=>s>o&&t instanceof e)}setTo(o){}prev(){let o=[].concat(this.parts).reverse();const t=o.indexOf(this);return o.find((s,c)=>c>t&&s instanceof e)}toString(){return String(this.date)}}return Te=e,Te}var Me,Kt;function Pi(){if(Kt)return Me;Kt=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}return Me=r,Me}var Oe,Zt;function Ci(){if(Zt)return Oe;Zt=1;const e=U(),r=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th");class o extends e{constructor(s={}){super(s)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(s){this.date.setDate(parseInt(s.substr(-2)))}toString(){let s=this.date.getDate(),c=this.date.getDay();return this.token==="DD"?String(s).padStart(2,"0"):this.token==="Do"?s+r(s):this.token==="d"?c+1:this.token==="ddd"?this.locales.weekdaysShort[c]:this.token==="dddd"?this.locales.weekdays[c]:s}}return Oe=o,Oe}var Re,Xt;function Ei(){if(Xt)return Re;Xt=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}}return Re=r,Re}var Pe,Qt;function Di(){if(Qt)return Pe;Qt=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return Pe=r,Pe}var Ce,er;function _i(){if(er)return Ce;er=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}return Ce=r,Ce}var Ee,tr;function qi(){if(tr)return Ee;tr=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),s=this.token.length;return s===2?String(t+1).padStart(2,"0"):s===3?this.locales.monthsShort[t]:s===4?this.locales.months[t]:String(t+1)}}return Ee=r,Ee}var De,rr;function Ai(){if(rr)return De;rr=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}return De=r,De}var _e,ir;function Ii(){if(ir)return _e;ir=1;const e=U();class r extends e{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}return _e=r,_e}var qe,sr;function Fi(){return sr||(sr=1,qe={DatePart:U(),Meridiem:Pi(),Day:Ci(),Hours:Ei(),Milliseconds:Di(),Minutes:_i(),Month:qi(),Seconds:Ai(),Year:Ii()}),qe}var Ae,nr;function ji(){if(nr)return Ae;nr=1;function e(M,$,R,E,C,F,Y){try{var N=M[F](Y),j=N.value}catch(Z){R(Z);return}N.done?$(j):Promise.resolve(j).then(E,C)}function r(M){return function(){var $=this,R=arguments;return new Promise(function(E,C){var F=M.apply($,R);function Y(j){e(F,E,C,Y,N,"next",j)}function N(j){e(F,E,C,Y,N,"throw",j)}Y(void 0)})}}const o=q(),t=z(),s=B(),c=s.style,i=s.clear,b=s.figures,l=A(),a=l.erase,n=l.cursor,f=Fi(),p=f.DatePart,h=f.Meridiem,u=f.Day,v=f.Hours,g=f.Milliseconds,d=f.Minutes,m=f.Month,y=f.Seconds,w=f.Year,x=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,S={1:({token:M})=>M.replace(/\\(.)/g,"$1"),2:M=>new u(M),3:M=>new m(M),4:M=>new w(M),5:M=>new h(M),6:M=>new v(M),7:M=>new d(M),8:M=>new y(M),9:M=>new g(M)},T={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class O extends t{constructor($={}){super($),this.msg=$.message,this.cursor=0,this.typed="",this.locales=Object.assign(T,$.locales),this._date=$.initial||new Date,this.errorMsg=$.error||"Please Enter A Valid Value",this.validator=$.validate||(()=>!0),this.mask=$.mask||"YYYY-MM-DD HH:mm:ss",this.clear=i("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date($){$&&this._date.setTime($.getTime())}set mask($){let R;for(this.parts=[];R=x.exec($);){let C=R.shift(),F=R.findIndex(Y=>Y!=null);this.parts.push(F in S?S[F]({token:R[F]||C,date:this.date,parts:this.parts,locales:this.locales}):R[F]||C)}let E=this.parts.reduce((C,F)=>(typeof F=="string"&&typeof C[C.length-1]=="string"?C[C.length-1]+=F:C.push(F),C),[]);this.parts.splice(0),this.parts.push(...E),this.reset()}moveCursor($){this.typed="",this.cursor=$,this.fire()}reset(){this.moveCursor(this.parts.findIndex($=>$ instanceof p)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
16
16
  `),this.close()}validate(){var $=this;return r(function*(){let R=yield $.validator($.value);typeof R=="string"&&($.errorMsg=R,R=!1),$.error=!R})()}submit(){var $=this;return r(function*(){if(yield $.validate(),$.error){$.color="red",$.fire(),$.render();return}$.done=!0,$.aborted=!1,$.fire(),$.render(),$.out.write(`
17
- `),$.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let $=this.parts[this.cursor].prev();if($==null)return this.bell();this.moveCursor(this.parts.indexOf($)),this.render()}right(){let $=this.parts[this.cursor].next();if($==null)return this.bell();this.moveCursor(this.parts.indexOf($)),this.render()}next(){let $=this.parts[this.cursor].next();this.moveCursor($?this.parts.indexOf($):this.parts.findIndex(R=>R instanceof f)),this.render()}_($){/\d/.test($)&&(this.typed+=$,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(n.hide):this.out.write(i(this.outputText,this.out.columns)),super.render(),this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(!1),this.parts.reduce(($,R,D)=>$.concat(D===this.cursor&&!this.done?o.cyan().underline(R.toString()):R),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
18
- `).reduce(($,R,D)=>$+`
19
- ${D?" ":b.pointerSmall} ${o.red().italic(R)}`,"")),this.out.write(a.line+n.to(0)+this.outputText))}}return Ae=O,Ae}var Ie,lr;function Ni(){if(lr)return Ie;lr=1;function e(g,d,p,y,w,x,S){try{var T=g[x](S),O=T.value}catch(M){p(M);return}T.done?d(O):Promise.resolve(O).then(y,w)}function r(g){return function(){var d=this,p=arguments;return new Promise(function(y,w){var x=g.apply(d,p);function S(O){e(x,y,w,S,T,"next",O)}function T(O){e(x,y,w,S,T,"throw",O)}S(void 0)})}}const o=q(),t=K(),s=A(),c=s.cursor,i=s.erase,b=B(),l=b.style,a=b.figures,n=b.clear,m=b.lines,f=/[0-9]/,h=g=>g!==void 0,u=(g,d)=>{let p=Math.pow(10,d);return Math.round(g*p)/p};class v extends t{constructor(d={}){super(d),this.transform=l.render(d.style),this.msg=d.message,this.initial=h(d.initial)?d.initial:"",this.float=!!d.float,this.round=d.round||2,this.inc=d.increment||1,this.min=h(d.min)?d.min:-1/0,this.max=h(d.max)?d.max:1/0,this.errorMsg=d.error||"Please Enter A Valid Value",this.validator=d.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(d){!d&&d!==0?(this.placeholder=!0,this.rendered=o.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${u(d,this.round)}`),this._value=u(d,this.round)),this.fire()}get value(){return this._value}parse(d){return this.float?parseFloat(d):parseInt(d)}valid(d){return d==="-"||d==="."&&this.float||f.test(d)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let d=this.value;this.value=d!==""?d:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
20
- `),this.close()}validate(){var d=this;return r(function*(){let p=yield d.validator(d.value);typeof p=="string"&&(d.errorMsg=p,p=!1),d.error=!p})()}submit(){var d=this;return r(function*(){if(yield d.validate(),d.error){d.color="red",d.fire(),d.render();return}let p=d.value;d.value=p!==""?p:d.initial,d.done=!0,d.aborted=!1,d.error=!1,d.fire(),d.render(),d.out.write(`
21
- `),d.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let d=this.value.toString();if(d.length===0)return this.bell();this.value=this.parse(d=d.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(d,p){if(!this.valid(d))return this.bell();const y=Date.now();if(y-this.lastHit>1e3&&(this.typed=""),this.typed+=d,this.lastHit=y,this.color="cyan",d===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(c.down(m(this.outputError,this.out.columns)-1)+n(this.outputError,this.out.columns)),this.out.write(n(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),!this.done||!this.done&&!this.placeholder?o[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
22
- `).reduce((d,p,y)=>d+`
23
- ${y?" ":a.pointerSmall} ${o.red().italic(p)}`,"")),this.out.write(i.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore))}}return Ie=v,Ie}var je,hr;function ur(){if(hr)return je;hr=1;const e=q(),r=A(),o=r.cursor,t=K(),s=B(),c=s.clear,i=s.figures,b=s.style,l=s.wrap,a=s.entriesToDisplay;class n extends t{constructor(f={}){super(f),this.msg=f.message,this.cursor=f.cursor||0,this.scrollIndex=f.cursor||0,this.hint=f.hint||"",this.warn=f.warn||"- This option is disabled -",this.minSelected=f.min,this.showMinError=!1,this.maxChoices=f.max,this.instructions=f.instructions,this.optionsPerPage=f.optionsPerPage||10,this.value=f.choices.map((h,u)=>(typeof h=="string"&&(h={title:h,value:u}),{title:h&&(h.title||h.value||h),description:h&&h.description,value:h&&(h.value===void 0?u:h.value),selected:h&&h.selected,disabled:h&&h.disabled})),this.clear=c("",this.out.columns),f.overrideRender||this.render()}reset(){this.value.map(f=>!f.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(f=>f.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
24
- `),this.close()}submit(){const f=this.value.filter(h=>h.selected);this.minSelected&&f.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
25
- `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(f=>f.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const f=this.value[this.cursor];if(f.selected)f.selected=!1,this.render();else{if(f.disabled||this.value.filter(h=>h.selected).length>=this.maxChoices)return this.bell();f.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const f=!this.value[this.cursor].selected;this.value.filter(h=>!h.disabled).forEach(h=>h.selected=f),this.render()}_(f,h){if(f===" ")this.handleSpaceToggle();else if(f==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
17
+ `),$.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let $=this.parts[this.cursor].prev();if($==null)return this.bell();this.moveCursor(this.parts.indexOf($)),this.render()}right(){let $=this.parts[this.cursor].next();if($==null)return this.bell();this.moveCursor(this.parts.indexOf($)),this.render()}next(){let $=this.parts[this.cursor].next();this.moveCursor($?this.parts.indexOf($):this.parts.findIndex(R=>R instanceof p)),this.render()}_($){/\d/.test($)&&(this.typed+=$,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(n.hide):this.out.write(i(this.outputText,this.out.columns)),super.render(),this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(!1),this.parts.reduce(($,R,E)=>$.concat(E===this.cursor&&!this.done?o.cyan().underline(R.toString()):R),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
18
+ `).reduce(($,R,E)=>$+`
19
+ ${E?" ":b.pointerSmall} ${o.red().italic(R)}`,"")),this.out.write(a.line+n.to(0)+this.outputText))}}return Ae=O,Ae}var Ie,or;function Ni(){if(or)return Ie;or=1;function e(g,d,m,y,w,x,S){try{var T=g[x](S),O=T.value}catch(M){m(M);return}T.done?d(O):Promise.resolve(O).then(y,w)}function r(g){return function(){var d=this,m=arguments;return new Promise(function(y,w){var x=g.apply(d,m);function S(O){e(x,y,w,S,T,"next",O)}function T(O){e(x,y,w,S,T,"throw",O)}S(void 0)})}}const o=q(),t=z(),s=A(),c=s.cursor,i=s.erase,b=B(),l=b.style,a=b.figures,n=b.clear,f=b.lines,p=/[0-9]/,h=g=>g!==void 0,u=(g,d)=>{let m=Math.pow(10,d);return Math.round(g*m)/m};class v extends t{constructor(d={}){super(d),this.transform=l.render(d.style),this.msg=d.message,this.initial=h(d.initial)?d.initial:"",this.float=!!d.float,this.round=d.round||2,this.inc=d.increment||1,this.min=h(d.min)?d.min:-1/0,this.max=h(d.max)?d.max:1/0,this.errorMsg=d.error||"Please Enter A Valid Value",this.validator=d.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(d){!d&&d!==0?(this.placeholder=!0,this.rendered=o.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${u(d,this.round)}`),this._value=u(d,this.round)),this.fire()}get value(){return this._value}parse(d){return this.float?parseFloat(d):parseInt(d)}valid(d){return d==="-"||d==="."&&this.float||p.test(d)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let d=this.value;this.value=d!==""?d:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
20
+ `),this.close()}validate(){var d=this;return r(function*(){let m=yield d.validator(d.value);typeof m=="string"&&(d.errorMsg=m,m=!1),d.error=!m})()}submit(){var d=this;return r(function*(){if(yield d.validate(),d.error){d.color="red",d.fire(),d.render();return}let m=d.value;d.value=m!==""?m:d.initial,d.done=!0,d.aborted=!1,d.error=!1,d.fire(),d.render(),d.out.write(`
21
+ `),d.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let d=this.value.toString();if(d.length===0)return this.bell();this.value=this.parse(d=d.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(d,m){if(!this.valid(d))return this.bell();const y=Date.now();if(y-this.lastHit>1e3&&(this.typed=""),this.typed+=d,this.lastHit=y,this.color="cyan",d===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(c.down(f(this.outputError,this.out.columns)-1)+n(this.outputError,this.out.columns)),this.out.write(n(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),!this.done||!this.done&&!this.placeholder?o[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
22
+ `).reduce((d,m,y)=>d+`
23
+ ${y?" ":a.pointerSmall} ${o.red().italic(m)}`,"")),this.out.write(i.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore))}}return Ie=v,Ie}var Fe,lr;function hr(){if(lr)return Fe;lr=1;const e=q(),r=A(),o=r.cursor,t=z(),s=B(),c=s.clear,i=s.figures,b=s.style,l=s.wrap,a=s.entriesToDisplay;class n extends t{constructor(p={}){super(p),this.msg=p.message,this.cursor=p.cursor||0,this.scrollIndex=p.cursor||0,this.hint=p.hint||"",this.warn=p.warn||"- This option is disabled -",this.minSelected=p.min,this.showMinError=!1,this.maxChoices=p.max,this.instructions=p.instructions,this.optionsPerPage=p.optionsPerPage||10,this.value=p.choices.map((h,u)=>(typeof h=="string"&&(h={title:h,value:u}),{title:h&&(h.title||h.value||h),description:h&&h.description,value:h&&(h.value===void 0?u:h.value),selected:h&&h.selected,disabled:h&&h.disabled})),this.clear=c("",this.out.columns),p.overrideRender||this.render()}reset(){this.value.map(p=>!p.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(p=>p.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
24
+ `),this.close()}submit(){const p=this.value.filter(h=>h.selected);this.minSelected&&p.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
25
+ `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(p=>p.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const p=this.value[this.cursor];if(p.selected)p.selected=!1,this.render();else{if(p.disabled||this.value.filter(h=>h.selected).length>=this.maxChoices)return this.bell();p.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const p=!this.value[this.cursor].selected;this.value.filter(h=>!h.disabled).forEach(h=>h.selected=p),this.render()}_(p,h){if(p===" ")this.handleSpaceToggle();else if(p==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
26
26
  Instructions:
27
27
  ${i.arrowUp}/${i.arrowDown}: Highlight option
28
28
  ${i.arrowLeft}/${i.arrowRight}/[space]: Toggle selection
29
29
  `+(this.maxChoices===void 0?` a: Toggle all
30
- `:"")+" enter/return: Complete answer":""}renderOption(f,h,u,v){const g=(h.selected?e.green(i.radioOn):i.radioOff)+" "+v+" ";let d,p;return h.disabled?d=f===u?e.gray().underline(h.title):e.strikethrough().gray(h.title):(d=f===u?e.cyan().underline(h.title):h.title,f===u&&h.description&&(p=` - ${h.description}`,(g.length+d.length+p.length>=this.out.columns||h.description.split(/\r?\n/).length>1)&&(p=`
31
- `+l(h.description,{margin:g.length,width:this.out.columns})))),g+d+e.gray(p||"")}paginateOptions(f){if(f.length===0)return e.red("No matches for this query.");let h=a(this.cursor,f.length,this.optionsPerPage),u=h.startIndex,v=h.endIndex,g,d=[];for(let p=u;p<v;p++)p===u&&u>0?g=i.arrowUp:p===v-1&&v<f.length?g=i.arrowDown:g=" ",d.push(this.renderOption(this.cursor,f[p],p,g));return`
30
+ `:"")+" enter/return: Complete answer":""}renderOption(p,h,u,v){const g=(h.selected?e.green(i.radioOn):i.radioOff)+" "+v+" ";let d,m;return h.disabled?d=p===u?e.gray().underline(h.title):e.strikethrough().gray(h.title):(d=p===u?e.cyan().underline(h.title):h.title,p===u&&h.description&&(m=` - ${h.description}`,(g.length+d.length+m.length>=this.out.columns||h.description.split(/\r?\n/).length>1)&&(m=`
31
+ `+l(h.description,{margin:g.length,width:this.out.columns})))),g+d+e.gray(m||"")}paginateOptions(p){if(p.length===0)return e.red("No matches for this query.");let h=a(this.cursor,p.length,this.optionsPerPage),u=h.startIndex,v=h.endIndex,g,d=[];for(let m=u;m<v;m++)m===u&&u>0?g=i.arrowUp:m===v-1&&v<p.length?g=i.arrowDown:g=" ",d.push(this.renderOption(this.cursor,p[m],m,g));return`
32
32
  `+d.join(`
33
- `)}renderOptions(f){return this.done?"":this.paginateOptions(f)}renderDoneOrInstructions(){if(this.done)return this.value.filter(h=>h.selected).map(h=>h.title).join(", ");const f=[e.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&f.push(e.yellow(this.warn)),f.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(o.hide),super.render();let f=[b.symbol(this.done,this.aborted),e.bold(this.msg),b.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(f+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),f+=this.renderOptions(this.value),this.out.write(this.clear+f),this.clear=c(f,this.out.columns)}}return je=n,je}var Fe,ar;function ki(){if(ar)return Fe;ar=1;function e(d,p,y,w,x,S,T){try{var O=d[S](T),M=O.value}catch($){y($);return}O.done?p(M):Promise.resolve(M).then(w,x)}function r(d){return function(){var p=this,y=arguments;return new Promise(function(w,x){var S=d.apply(p,y);function T(M){e(S,w,x,T,O,"next",M)}function O(M){e(S,w,x,T,O,"throw",M)}T(void 0)})}}const o=q(),t=K(),s=A(),c=s.erase,i=s.cursor,b=B(),l=b.style,a=b.clear,n=b.figures,m=b.wrap,f=b.entriesToDisplay,h=(d,p)=>d[p]&&(d[p].value||d[p].title||d[p]),u=(d,p)=>d[p]&&(d[p].title||d[p].value||d[p]),v=(d,p)=>{const y=d.findIndex(w=>w.value===p||w.title===p);return y>-1?y:void 0};class g extends t{constructor(p={}){super(p),this.msg=p.message,this.suggest=p.suggest,this.choices=p.choices,this.initial=typeof p.initial=="number"?p.initial:v(p.choices,p.initial),this.select=this.initial||p.cursor||0,this.i18n={noMatches:p.noMatches||"no matches found"},this.fallback=p.fallback||this.initial,this.clearFirst=p.clearFirst||!1,this.suggestions=[],this.input="",this.limit=p.limit||10,this.cursor=0,this.transform=l.render(p.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=a("",this.out.columns),this.complete(this.render),this.render()}set fallback(p){this._fb=Number.isSafeInteger(parseInt(p))?parseInt(p):p}get fallback(){let p;return typeof this._fb=="number"?p=this.choices[this._fb]:typeof this._fb=="string"&&(p={title:this._fb}),p||this._fb||{title:this.i18n.noMatches}}moveSelect(p){this.select=p,this.suggestions.length>0?this.value=h(this.suggestions,p):this.value=this.fallback.value,this.fire()}complete(p){var y=this;return r(function*(){const w=y.completing=y.suggest(y.input,y.choices),x=yield w;if(y.completing!==w)return;y.suggestions=x.map((T,O,M)=>({title:u(M,O),value:h(M,O),description:T.description})),y.completing=!1;const S=Math.max(x.length-1,0);y.moveSelect(Math.min(S,y.select)),p&&p()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
33
+ `)}renderOptions(p){return this.done?"":this.paginateOptions(p)}renderDoneOrInstructions(){if(this.done)return this.value.filter(h=>h.selected).map(h=>h.title).join(", ");const p=[e.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&p.push(e.yellow(this.warn)),p.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(o.hide),super.render();let p=[b.symbol(this.done,this.aborted),e.bold(this.msg),b.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(p+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),p+=this.renderOptions(this.value),this.out.write(this.clear+p),this.clear=c(p,this.out.columns)}}return Fe=n,Fe}var je,ur;function ki(){if(ur)return je;ur=1;function e(d,m,y,w,x,S,T){try{var O=d[S](T),M=O.value}catch($){y($);return}O.done?m(M):Promise.resolve(M).then(w,x)}function r(d){return function(){var m=this,y=arguments;return new Promise(function(w,x){var S=d.apply(m,y);function T(M){e(S,w,x,T,O,"next",M)}function O(M){e(S,w,x,T,O,"throw",M)}T(void 0)})}}const o=q(),t=z(),s=A(),c=s.erase,i=s.cursor,b=B(),l=b.style,a=b.clear,n=b.figures,f=b.wrap,p=b.entriesToDisplay,h=(d,m)=>d[m]&&(d[m].value||d[m].title||d[m]),u=(d,m)=>d[m]&&(d[m].title||d[m].value||d[m]),v=(d,m)=>{const y=d.findIndex(w=>w.value===m||w.title===m);return y>-1?y:void 0};class g extends t{constructor(m={}){super(m),this.msg=m.message,this.suggest=m.suggest,this.choices=m.choices,this.initial=typeof m.initial=="number"?m.initial:v(m.choices,m.initial),this.select=this.initial||m.cursor||0,this.i18n={noMatches:m.noMatches||"no matches found"},this.fallback=m.fallback||this.initial,this.clearFirst=m.clearFirst||!1,this.suggestions=[],this.input="",this.limit=m.limit||10,this.cursor=0,this.transform=l.render(m.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=a("",this.out.columns),this.complete(this.render),this.render()}set fallback(m){this._fb=Number.isSafeInteger(parseInt(m))?parseInt(m):m}get fallback(){let m;return typeof this._fb=="number"?m=this.choices[this._fb]:typeof this._fb=="string"&&(m={title:this._fb}),m||this._fb||{title:this.i18n.noMatches}}moveSelect(m){this.select=m,this.suggestions.length>0?this.value=h(this.suggestions,m):this.value=this.fallback.value,this.fire()}complete(m){var y=this;return r(function*(){const w=y.completing=y.suggest(y.input,y.choices),x=yield w;if(y.completing!==w)return;y.suggestions=x.map((T,O,M)=>({title:u(M,O),value:h(M,O),description:T.description})),y.completing=!1;const S=Math.max(x.length-1,0);y.moveSelect(Math.min(S,y.select)),m&&m()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
34
34
  `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
35
35
  `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
36
- `),this.close()}_(p,y){let w=this.input.slice(0,this.cursor),x=this.input.slice(this.cursor);this.input=`${w}${p}${x}`,this.cursor=w.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let p=this.input.slice(0,this.cursor-1),y=this.input.slice(this.cursor);this.input=`${p}${y}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let p=this.input.slice(0,this.cursor),y=this.input.slice(this.cursor+1);this.input=`${p}${y}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(p,y,w,x){let S,T=w?n.arrowUp:x?n.arrowDown:" ",O=y?o.cyan().underline(p.title):p.title;return T=(y?o.cyan(n.pointer)+" ":" ")+T,p.description&&(S=` - ${p.description}`,(T.length+O.length+S.length>=this.out.columns||p.description.split(/\r?\n/).length>1)&&(S=`
37
- `+m(p.description,{margin:3,width:this.out.columns}))),T+" "+O+o.gray(S||"")}render(){if(this.closed)return;this.firstRender?this.out.write(i.hide):this.out.write(a(this.outputText,this.out.columns)),super.render();let p=f(this.select,this.choices.length,this.limit),y=p.startIndex,w=p.endIndex;if(this.outputText=[l.symbol(this.done,this.aborted,this.exited),o.bold(this.msg),l.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const x=this.suggestions.slice(y,w).map((S,T)=>this.renderOption(S,this.select===T+y,T===0&&y>0,T+y===w-1&&w<this.choices.length)).join(`
36
+ `),this.close()}_(m,y){let w=this.input.slice(0,this.cursor),x=this.input.slice(this.cursor);this.input=`${w}${m}${x}`,this.cursor=w.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let m=this.input.slice(0,this.cursor-1),y=this.input.slice(this.cursor);this.input=`${m}${y}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let m=this.input.slice(0,this.cursor),y=this.input.slice(this.cursor+1);this.input=`${m}${y}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(m,y,w,x){let S,T=w?n.arrowUp:x?n.arrowDown:" ",O=y?o.cyan().underline(m.title):m.title;return T=(y?o.cyan(n.pointer)+" ":" ")+T,m.description&&(S=` - ${m.description}`,(T.length+O.length+S.length>=this.out.columns||m.description.split(/\r?\n/).length>1)&&(S=`
37
+ `+f(m.description,{margin:3,width:this.out.columns}))),T+" "+O+o.gray(S||"")}render(){if(this.closed)return;this.firstRender?this.out.write(i.hide):this.out.write(a(this.outputText,this.out.columns)),super.render();let m=p(this.select,this.choices.length,this.limit),y=m.startIndex,w=m.endIndex;if(this.outputText=[l.symbol(this.done,this.aborted,this.exited),o.bold(this.msg),l.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const x=this.suggestions.slice(y,w).map((S,T)=>this.renderOption(S,this.select===T+y,T===0&&y>0,T+y===w-1&&w<this.choices.length)).join(`
38
38
  `);this.outputText+=`
39
- `+(x||o.gray(this.fallback.title))}this.out.write(c.line+i.to(0)+this.outputText)}}return Fe=g,Fe}var Ne,cr;function Li(){if(cr)return Ne;cr=1;const e=q(),r=A(),o=r.cursor,t=ur(),s=B(),c=s.clear,i=s.style,b=s.figures;class l extends t{constructor(n={}){n.overrideRender=!0,super(n),this.inputValue="",this.clear=c("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const n=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(f=>this.inputValue?!!(typeof f.title=="string"&&f.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof f.value=="string"&&f.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);const m=this.filteredOptions.findIndex(f=>f===n);this.cursor=m<0?0:m,this.render()}handleSpaceToggle(){const n=this.filteredOptions[this.cursor];if(n.selected)n.selected=!1,this.render();else{if(n.disabled||this.value.filter(m=>m.selected).length>=this.maxChoices)return this.bell();n.selected=!0,this.render()}}handleInputChange(n){this.inputValue=this.inputValue+n,this.updateFilteredOptions()}_(n,m){n===" "?this.handleSpaceToggle():this.handleInputChange(n)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
39
+ `+(x||o.gray(this.fallback.title))}this.out.write(c.line+i.to(0)+this.outputText)}}return je=g,je}var Ne,ar;function Li(){if(ar)return Ne;ar=1;const e=q(),r=A(),o=r.cursor,t=hr(),s=B(),c=s.clear,i=s.style,b=s.figures;class l extends t{constructor(n={}){n.overrideRender=!0,super(n),this.inputValue="",this.clear=c("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const n=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(p=>this.inputValue?!!(typeof p.title=="string"&&p.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof p.value=="string"&&p.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);const f=this.filteredOptions.findIndex(p=>p===n);this.cursor=f<0?0:f,this.render()}handleSpaceToggle(){const n=this.filteredOptions[this.cursor];if(n.selected)n.selected=!1,this.render();else{if(n.disabled||this.value.filter(f=>f.selected).length>=this.maxChoices)return this.bell();n.selected=!0,this.render()}}handleInputChange(n){this.inputValue=this.inputValue+n,this.updateFilteredOptions()}_(n,f){n===" "?this.handleSpaceToggle():this.handleInputChange(n)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
40
40
  Instructions:
41
41
  ${b.arrowUp}/${b.arrowDown}: Highlight option
42
42
  ${b.arrowLeft}/${b.arrowRight}/[space]: Toggle selection
@@ -44,47 +44,47 @@ Instructions:
44
44
  enter/return: Complete answer
45
45
  `:""}renderCurrentInput(){return`
46
46
  Filtered results for: ${this.inputValue?this.inputValue:e.gray("Enter something to filter")}
47
- `}renderOption(n,m,f){let h;return m.disabled?h=n===f?e.gray().underline(m.title):e.strikethrough().gray(m.title):h=n===f?e.cyan().underline(m.title):m.title,(m.selected?e.green(b.radioOn):b.radioOff)+" "+h}renderDoneOrInstructions(){if(this.done)return this.value.filter(m=>m.selected).map(m=>m.title).join(", ");const n=[e.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&n.push(e.yellow(this.warn)),n.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(o.hide),super.render();let n=[i.symbol(this.done,this.aborted),e.bold(this.msg),i.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(n+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),n+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+n),this.clear=c(n,this.out.columns)}}return Ne=l,Ne}var ke,dr;function Yi(){if(dr)return ke;dr=1;const e=q(),r=K(),o=B(),t=o.style,s=o.clear,c=A(),i=c.erase,b=c.cursor;class l extends r{constructor(n={}){super(n),this.msg=n.message,this.value=n.initial,this.initialValue=!!n.initial,this.yesMsg=n.yes||"yes",this.yesOption=n.yesOption||"(Y/n)",this.noMsg=n.no||"no",this.noOption=n.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
47
+ `}renderOption(n,f,p){let h;return f.disabled?h=n===p?e.gray().underline(f.title):e.strikethrough().gray(f.title):h=n===p?e.cyan().underline(f.title):f.title,(f.selected?e.green(b.radioOn):b.radioOff)+" "+h}renderDoneOrInstructions(){if(this.done)return this.value.filter(f=>f.selected).map(f=>f.title).join(", ");const n=[e.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&n.push(e.yellow(this.warn)),n.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(o.hide),super.render();let n=[i.symbol(this.done,this.aborted),e.bold(this.msg),i.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(n+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),n+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+n),this.clear=c(n,this.out.columns)}}return Ne=l,Ne}var ke,cr;function Yi(){if(cr)return ke;cr=1;const e=q(),r=z(),o=B(),t=o.style,s=o.clear,c=A(),i=c.erase,b=c.cursor;class l extends r{constructor(n={}){super(n),this.msg=n.message,this.value=n.initial,this.initialValue=!!n.initial,this.yesMsg=n.yes||"yes",this.yesOption=n.yesOption||"(Y/n)",this.noMsg=n.no||"no",this.noOption=n.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
48
48
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
49
- `),this.close()}_(n,m){return n.toLowerCase()==="y"?(this.value=!0,this.submit()):n.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(b.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[t.symbol(this.done,this.aborted),e.bold(this.msg),t.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:e.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(i.line+b.to(0)+this.outputText))}}return ke=l,ke}var Le,fr;function Bi(){return fr||(fr=1,Le={TextPrompt:Mi(),SelectPrompt:Oi(),TogglePrompt:Ri(),DatePrompt:Fi(),NumberPrompt:Ni(),MultiselectPrompt:ur(),AutocompletePrompt:ki(),AutocompleteMultiselectPrompt:Li(),ConfirmPrompt:Yi()}),Le}var pr;function Vi(){return pr||(pr=1,function(e){const r=e,o=Bi(),t=i=>i;function s(i,b,l={}){return new Promise((a,n)=>{const m=new o[i](b),f=l.onAbort||t,h=l.onSubmit||t,u=l.onExit||t;m.on("state",b.onState||t),m.on("submit",v=>a(h(v))),m.on("exit",v=>a(u(v))),m.on("abort",v=>n(f(v)))})}r.text=i=>s("TextPrompt",i),r.password=i=>(i.style="password",r.text(i)),r.invisible=i=>(i.style="invisible",r.text(i)),r.number=i=>s("NumberPrompt",i),r.date=i=>s("DatePrompt",i),r.confirm=i=>s("ConfirmPrompt",i),r.list=i=>{const b=i.separator||",";return s("TextPrompt",i,{onSubmit:l=>l.split(b).map(a=>a.trim())})},r.toggle=i=>s("TogglePrompt",i),r.select=i=>s("SelectPrompt",i),r.multiselect=i=>{i.choices=[].concat(i.choices||[]);const b=l=>l.filter(a=>a.selected).map(a=>a.value);return s("MultiselectPrompt",i,{onAbort:b,onSubmit:b})},r.autocompleteMultiselect=i=>{i.choices=[].concat(i.choices||[]);const b=l=>l.filter(a=>a.selected).map(a=>a.value);return s("AutocompleteMultiselectPrompt",i,{onAbort:b,onSubmit:b})};const c=(i,b)=>Promise.resolve(b.filter(l=>l.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));r.autocomplete=i=>(i.suggest=i.suggest||c,i.choices=[].concat(i.choices||[]),s("AutocompletePrompt",i))}(le)),le}var Ye,mr;function Hi(){if(mr)return Ye;mr=1;function e(g,d){var p=Object.keys(g);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(g);d&&(y=y.filter(function(w){return Object.getOwnPropertyDescriptor(g,w).enumerable})),p.push.apply(p,y)}return p}function r(g){for(var d=1;d<arguments.length;d++){var p=arguments[d]!=null?arguments[d]:{};d%2?e(Object(p),!0).forEach(function(y){o(g,y,p[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(p)):e(Object(p)).forEach(function(y){Object.defineProperty(g,y,Object.getOwnPropertyDescriptor(p,y))})}return g}function o(g,d,p){return d in g?Object.defineProperty(g,d,{value:p,enumerable:!0,configurable:!0,writable:!0}):g[d]=p,g}function t(g,d){var p=typeof Symbol<"u"&&g[Symbol.iterator]||g["@@iterator"];if(!p){if(Array.isArray(g)||(p=s(g))||d){p&&(g=p);var y=0,w=function(){};return{s:w,n:function(){return y>=g.length?{done:!0}:{done:!1,value:g[y++]}},e:function(M){throw M},f:w}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
50
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,S=!1,T;return{s:function(){p=p.call(g)},n:function(){var M=p.next();return x=M.done,M},e:function(M){S=!0,T=M},f:function(){try{!x&&p.return!=null&&p.return()}finally{if(S)throw T}}}}function s(g,d){if(g){if(typeof g=="string")return c(g,d);var p=Object.prototype.toString.call(g).slice(8,-1);if(p==="Object"&&g.constructor&&(p=g.constructor.name),p==="Map"||p==="Set")return Array.from(g);if(p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))return c(g,d)}}function c(g,d){(d==null||d>g.length)&&(d=g.length);for(var p=0,y=new Array(d);p<d;p++)y[p]=g[p];return y}function i(g,d,p,y,w,x,S){try{var T=g[x](S),O=T.value}catch(M){p(M);return}T.done?d(O):Promise.resolve(O).then(y,w)}function b(g){return function(){var d=this,p=arguments;return new Promise(function(y,w){var x=g.apply(d,p);function S(O){i(x,y,w,S,T,"next",O)}function T(O){i(x,y,w,S,T,"throw",O)}S(void 0)})}}const l=Vi(),a=["suggest","format","onState","validate","onRender","type"],n=()=>{};function m(){return f.apply(this,arguments)}function f(){return f=b(function*(g=[],{onSubmit:d=n,onCancel:p=n}={}){const y={},w=m._override||{};g=[].concat(g);let x,S,T,O,M,$;const R=function(){var N=b(function*(F,X,Rt=!1){if(!(!Rt&&F.validate&&F.validate(X)!==!0))return F.format?yield F.format(X,y):X});return function(X,Rt){return N.apply(this,arguments)}}();var D=t(g),C;try{for(D.s();!(C=D.n()).done;){S=C.value;var j=S;if(O=j.name,M=j.type,typeof M=="function"&&(M=yield M(x,r({},y),S),S.type=M),!!M){for(let N in S){if(a.includes(N))continue;let F=S[N];S[N]=typeof F=="function"?yield F(x,r({},y),$):F}if($=S,typeof S.message!="string")throw new Error("prompt message is required");var Y=S;if(O=Y.name,M=Y.type,l[M]===void 0)throw new Error(`prompt type (${M}) is not defined`);if(w[S.name]!==void 0&&(x=yield R(S,w[S.name]),x!==void 0)){y[O]=x;continue}try{x=m._injected?h(m._injected,S.initial):yield l[M](S),y[O]=x=yield R(S,x,!0),T=yield d(S,x,y)}catch{T=!(yield p(S,y))}if(T)return y}}}catch(N){D.e(N)}finally{D.f()}return y}),f.apply(this,arguments)}function h(g,d){const p=g.shift();if(p instanceof Error)throw p;return p===void 0?d:p}function u(g){m._injected=(m._injected||[]).concat(g)}function v(g){m._override=Object.assign({},g)}return Ye=Object.assign(m,{prompt:m,prompts:l,inject:u,override:v}),Ye}var Be={},Ve,gr;function Ui(){return gr||(gr=1,Ve=(e,r)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(r){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}),Ve}var He,vr;function Ue(){return vr||(vr=1,He=e=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),o=new RegExp(r,"g");return typeof e=="string"?e.replace(o,""):e}),He}var Ge,br;function Gi(){if(br)return Ge;br=1;const e=Ue(),{erase:r,cursor:o}=A(),t=s=>[...e(s)].length;return Ge=function(s,c){if(!c)return r.line+o.to(0);let i=0;const b=s.split(/\r?\n/);for(let l of b)i+=1+Math.floor(Math.max(t(l)-1,0)/c);return r.lines(i)},Ge}var Je,yr;function wr(){if(yr)return Je;yr=1;const e={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"};return Je=process.platform==="win32"?r:e,Je}var We,xr;function Ji(){if(xr)return We;xr=1;const e=q(),r=wr(),o=Object.freeze({password:{scale:1,render:l=>"*".repeat(l.length)},emoji:{scale:2,render:l=>"\u{1F603}".repeat(l.length)},invisible:{scale:0,render:l=>""},default:{scale:1,render:l=>`${l}`}}),t=l=>o[l]||o.default,s=Object.freeze({aborted:e.red(r.cross),done:e.green(r.tick),exited:e.yellow(r.cross),default:e.cyan("?")});return We={styles:o,render:t,symbols:s,symbol:(l,a,n)=>a?s.aborted:n?s.exited:l?s.done:s.default,delimiter:l=>e.gray(l?r.ellipsis:r.pointerSmall),item:(l,a)=>e.gray(l?a?r.pointerSmall:"+":r.line)},We}var ze,$r;function Wi(){if($r)return ze;$r=1;const e=Ue();return ze=function(r,o){let t=String(e(r)||"").split(/\r?\n/);return o?t.map(s=>Math.ceil(s.length/o)).reduce((s,c)=>s+c):t.length},ze}var Ke,Sr;function zi(){return Sr||(Sr=1,Ke=(e,r={})=>{const o=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"",t=r.width;return(e||"").split(/\r?\n/g).map(s=>s.split(/\s+/g).reduce((c,i)=>(i.length+o.length>=t||c[c.length-1].length+i.length+1<t?c[c.length-1]+=` ${i}`:c.push(`${o}${i}`),c),[o]).join(`
49
+ `),this.close()}_(n,f){return n.toLowerCase()==="y"?(this.value=!0,this.submit()):n.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(b.hide):this.out.write(s(this.outputText,this.out.columns)),super.render(),this.outputText=[t.symbol(this.done,this.aborted),e.bold(this.msg),t.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:e.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(i.line+b.to(0)+this.outputText))}}return ke=l,ke}var Le,dr;function Bi(){return dr||(dr=1,Le={TextPrompt:Mi(),SelectPrompt:Oi(),TogglePrompt:Ri(),DatePrompt:ji(),NumberPrompt:Ni(),MultiselectPrompt:hr(),AutocompletePrompt:ki(),AutocompleteMultiselectPrompt:Li(),ConfirmPrompt:Yi()}),Le}var fr;function Vi(){return fr||(fr=1,function(e){const r=e,o=Bi(),t=i=>i;function s(i,b,l={}){return new Promise((a,n)=>{const f=new o[i](b),p=l.onAbort||t,h=l.onSubmit||t,u=l.onExit||t;f.on("state",b.onState||t),f.on("submit",v=>a(h(v))),f.on("exit",v=>a(u(v))),f.on("abort",v=>n(p(v)))})}r.text=i=>s("TextPrompt",i),r.password=i=>(i.style="password",r.text(i)),r.invisible=i=>(i.style="invisible",r.text(i)),r.number=i=>s("NumberPrompt",i),r.date=i=>s("DatePrompt",i),r.confirm=i=>s("ConfirmPrompt",i),r.list=i=>{const b=i.separator||",";return s("TextPrompt",i,{onSubmit:l=>l.split(b).map(a=>a.trim())})},r.toggle=i=>s("TogglePrompt",i),r.select=i=>s("SelectPrompt",i),r.multiselect=i=>{i.choices=[].concat(i.choices||[]);const b=l=>l.filter(a=>a.selected).map(a=>a.value);return s("MultiselectPrompt",i,{onAbort:b,onSubmit:b})},r.autocompleteMultiselect=i=>{i.choices=[].concat(i.choices||[]);const b=l=>l.filter(a=>a.selected).map(a=>a.value);return s("AutocompleteMultiselectPrompt",i,{onAbort:b,onSubmit:b})};const c=(i,b)=>Promise.resolve(b.filter(l=>l.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));r.autocomplete=i=>(i.suggest=i.suggest||c,i.choices=[].concat(i.choices||[]),s("AutocompletePrompt",i))}(le)),le}var Ye,pr;function Hi(){if(pr)return Ye;pr=1;function e(g,d){var m=Object.keys(g);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(g);d&&(y=y.filter(function(w){return Object.getOwnPropertyDescriptor(g,w).enumerable})),m.push.apply(m,y)}return m}function r(g){for(var d=1;d<arguments.length;d++){var m=arguments[d]!=null?arguments[d]:{};d%2?e(Object(m),!0).forEach(function(y){o(g,y,m[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(m)):e(Object(m)).forEach(function(y){Object.defineProperty(g,y,Object.getOwnPropertyDescriptor(m,y))})}return g}function o(g,d,m){return d in g?Object.defineProperty(g,d,{value:m,enumerable:!0,configurable:!0,writable:!0}):g[d]=m,g}function t(g,d){var m=typeof Symbol<"u"&&g[Symbol.iterator]||g["@@iterator"];if(!m){if(Array.isArray(g)||(m=s(g))||d){m&&(g=m);var y=0,w=function(){};return{s:w,n:function(){return y>=g.length?{done:!0}:{done:!1,value:g[y++]}},e:function(M){throw M},f:w}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
50
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,S=!1,T;return{s:function(){m=m.call(g)},n:function(){var M=m.next();return x=M.done,M},e:function(M){S=!0,T=M},f:function(){try{!x&&m.return!=null&&m.return()}finally{if(S)throw T}}}}function s(g,d){if(g){if(typeof g=="string")return c(g,d);var m=Object.prototype.toString.call(g).slice(8,-1);if(m==="Object"&&g.constructor&&(m=g.constructor.name),m==="Map"||m==="Set")return Array.from(g);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return c(g,d)}}function c(g,d){(d==null||d>g.length)&&(d=g.length);for(var m=0,y=new Array(d);m<d;m++)y[m]=g[m];return y}function i(g,d,m,y,w,x,S){try{var T=g[x](S),O=T.value}catch(M){m(M);return}T.done?d(O):Promise.resolve(O).then(y,w)}function b(g){return function(){var d=this,m=arguments;return new Promise(function(y,w){var x=g.apply(d,m);function S(O){i(x,y,w,S,T,"next",O)}function T(O){i(x,y,w,S,T,"throw",O)}S(void 0)})}}const l=Vi(),a=["suggest","format","onState","validate","onRender","type"],n=()=>{};function f(){return p.apply(this,arguments)}function p(){return p=b(function*(g=[],{onSubmit:d=n,onCancel:m=n}={}){const y={},w=f._override||{};g=[].concat(g);let x,S,T,O,M,$;const R=function(){var N=b(function*(j,Z,Rt=!1){if(!(!Rt&&j.validate&&j.validate(Z)!==!0))return j.format?yield j.format(Z,y):Z});return function(Z,Rt){return N.apply(this,arguments)}}();var E=t(g),C;try{for(E.s();!(C=E.n()).done;){S=C.value;var F=S;if(O=F.name,M=F.type,typeof M=="function"&&(M=yield M(x,r({},y),S),S.type=M),!!M){for(let N in S){if(a.includes(N))continue;let j=S[N];S[N]=typeof j=="function"?yield j(x,r({},y),$):j}if($=S,typeof S.message!="string")throw new Error("prompt message is required");var Y=S;if(O=Y.name,M=Y.type,l[M]===void 0)throw new Error(`prompt type (${M}) is not defined`);if(w[S.name]!==void 0&&(x=yield R(S,w[S.name]),x!==void 0)){y[O]=x;continue}try{x=f._injected?h(f._injected,S.initial):yield l[M](S),y[O]=x=yield R(S,x,!0),T=yield d(S,x,y)}catch{T=!(yield m(S,y))}if(T)return y}}}catch(N){E.e(N)}finally{E.f()}return y}),p.apply(this,arguments)}function h(g,d){const m=g.shift();if(m instanceof Error)throw m;return m===void 0?d:m}function u(g){f._injected=(f._injected||[]).concat(g)}function v(g){f._override=Object.assign({},g)}return Ye=Object.assign(f,{prompt:f,prompts:l,inject:u,override:v}),Ye}var Be={},Ve,mr;function Ui(){return mr||(mr=1,Ve=(e,r)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(r){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}),Ve}var He,gr;function Ue(){return gr||(gr=1,He=e=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),o=new RegExp(r,"g");return typeof e=="string"?e.replace(o,""):e}),He}var Ge,vr;function Gi(){if(vr)return Ge;vr=1;const e=Ue(),{erase:r,cursor:o}=A(),t=s=>[...e(s)].length;return Ge=function(s,c){if(!c)return r.line+o.to(0);let i=0;const b=s.split(/\r?\n/);for(let l of b)i+=1+Math.floor(Math.max(t(l)-1,0)/c);return r.lines(i)},Ge}var Je,br;function yr(){if(br)return Je;br=1;const e={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"};return Je=process.platform==="win32"?r:e,Je}var We,wr;function Ji(){if(wr)return We;wr=1;const e=q(),r=yr(),o=Object.freeze({password:{scale:1,render:l=>"*".repeat(l.length)},emoji:{scale:2,render:l=>"\u{1F603}".repeat(l.length)},invisible:{scale:0,render:l=>""},default:{scale:1,render:l=>`${l}`}}),t=l=>o[l]||o.default,s=Object.freeze({aborted:e.red(r.cross),done:e.green(r.tick),exited:e.yellow(r.cross),default:e.cyan("?")});return We={styles:o,render:t,symbols:s,symbol:(l,a,n)=>a?s.aborted:n?s.exited:l?s.done:s.default,delimiter:l=>e.gray(l?r.ellipsis:r.pointerSmall),item:(l,a)=>e.gray(l?a?r.pointerSmall:"+":r.line)},We}var ze,xr;function Wi(){if(xr)return ze;xr=1;const e=Ue();return ze=function(r,o){let t=String(e(r)||"").split(/\r?\n/);return o?t.map(s=>Math.ceil(s.length/o)).reduce((s,c)=>s+c):t.length},ze}var Ke,$r;function zi(){return $r||($r=1,Ke=(e,r={})=>{const o=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"",t=r.width;return(e||"").split(/\r?\n/g).map(s=>s.split(/\s+/g).reduce((c,i)=>(i.length+o.length>=t||c[c.length-1].length+i.length+1<t?c[c.length-1]+=` ${i}`:c.push(`${o}${i}`),c),[o]).join(`
51
51
  `)).join(`
52
- `)}),Ke}var Ze,Tr;function Ki(){return Tr||(Tr=1,Ze=(e,r,o)=>{o=o||r;let t=Math.min(r-o,e-Math.floor(o/2));t<0&&(t=0);let s=Math.min(t+o,r);return{startIndex:t,endIndex:s}}),Ze}var Xe,Mr;function V(){return Mr||(Mr=1,Xe={action:Ui(),clear:Gi(),style:Ji(),strip:Ue(),figures:wr(),lines:Wi(),wrap:zi(),entriesToDisplay:Ki()}),Xe}var Qe,Or;function Z(){if(Or)return Qe;Or=1;const e=Pt,{action:r}=V(),o=Ct,{beep:t,cursor:s}=A(),c=q();class i extends o{constructor(l={}){super(),this.firstRender=!0,this.in=l.stdin||process.stdin,this.out=l.stdout||process.stdout,this.onRender=(l.onRender||(()=>{})).bind(this);const a=e.createInterface({input:this.in,escapeCodeTimeout:50});e.emitKeypressEvents(this.in,a),this.in.isTTY&&this.in.setRawMode(!0);const n=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,m=(f,h)=>{let u=r(h,n);u===!1?this._&&this._(f,h):typeof this[u]=="function"?this[u](h):this.bell()};this.close=()=>{this.out.write(s.show),this.in.removeListener("keypress",m),this.in.isTTY&&this.in.setRawMode(!1),a.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",m)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(t)}render(){this.onRender(c),this.firstRender&&(this.firstRender=!1)}}return Qe=i,Qe}var et,Rr;function Zi(){if(Rr)return et;Rr=1;const e=q(),r=Z(),{erase:o,cursor:t}=A(),{style:s,clear:c,lines:i,figures:b}=V();class l extends r{constructor(n={}){super(n),this.transform=s.render(n.style),this.scale=this.transform.scale,this.msg=n.message,this.initial=n.initial||"",this.validator=n.validate||(()=>!0),this.value="",this.errorMsg=n.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=c("",this.out.columns),this.render()}set value(n){!n&&this.initial?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(n)),this._value=n,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
52
+ `)}),Ke}var Ze,Sr;function Ki(){return Sr||(Sr=1,Ze=(e,r,o)=>{o=o||r;let t=Math.min(r-o,e-Math.floor(o/2));t<0&&(t=0);let s=Math.min(t+o,r);return{startIndex:t,endIndex:s}}),Ze}var Xe,Tr;function V(){return Tr||(Tr=1,Xe={action:Ui(),clear:Gi(),style:Ji(),strip:Ue(),figures:yr(),lines:Wi(),wrap:zi(),entriesToDisplay:Ki()}),Xe}var Qe,Mr;function K(){if(Mr)return Qe;Mr=1;const e=Pt,{action:r}=V(),o=Ct,{beep:t,cursor:s}=A(),c=q();class i extends o{constructor(l={}){super(),this.firstRender=!0,this.in=l.stdin||process.stdin,this.out=l.stdout||process.stdout,this.onRender=(l.onRender||(()=>{})).bind(this);const a=e.createInterface({input:this.in,escapeCodeTimeout:50});e.emitKeypressEvents(this.in,a),this.in.isTTY&&this.in.setRawMode(!0);const n=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,f=(p,h)=>{let u=r(h,n);u===!1?this._&&this._(p,h):typeof this[u]=="function"?this[u](h):this.bell()};this.close=()=>{this.out.write(s.show),this.in.removeListener("keypress",f),this.in.isTTY&&this.in.setRawMode(!1),a.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",f)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(t)}render(){this.onRender(c),this.firstRender&&(this.firstRender=!1)}}return Qe=i,Qe}var et,Or;function Zi(){if(Or)return et;Or=1;const e=q(),r=K(),{erase:o,cursor:t}=A(),{style:s,clear:c,lines:i,figures:b}=V();class l extends r{constructor(n={}){super(n),this.transform=s.render(n.style),this.scale=this.transform.scale,this.msg=n.message,this.initial=n.initial||"",this.validator=n.validate||(()=>!0),this.value="",this.errorMsg=n.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=c("",this.out.columns),this.render()}set value(n){!n&&this.initial?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(n)),this._value=n,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
53
53
  `),this.close()}async validate(){let n=await this.validator(this.value);typeof n=="string"&&(this.errorMsg=n,n=!1),this.error=!n}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
54
- `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(n){this.placeholder||(this.cursor=this.cursor+n,this.cursorOffset+=n)}_(n,m){let f=this.value.slice(0,this.cursor),h=this.value.slice(this.cursor);this.value=`${f}${n}${h}`,this.red=!1,this.cursor=this.placeholder?0:f.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let n=this.value.slice(0,this.cursor-1),m=this.value.slice(this.cursor);this.value=`${n}${m}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let n=this.value.slice(0,this.cursor),m=this.value.slice(this.cursor+1);this.value=`${n}${m}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(t.down(i(this.outputError,this.out.columns)-1)+c(this.outputError,this.out.columns)),this.out.write(c(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[s.symbol(this.done,this.aborted),e.bold(this.msg),s.delimiter(this.done),this.red?e.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
55
- `).reduce((n,m,f)=>n+`
56
- ${f?" ":b.pointerSmall} ${e.red().italic(m)}`,"")),this.out.write(o.line+t.to(0)+this.outputText+t.save+this.outputError+t.restore+t.move(this.cursorOffset,0)))}}return et=l,et}var tt,Pr;function Xi(){if(Pr)return tt;Pr=1;const e=q(),r=Z(),{style:o,clear:t,figures:s,wrap:c,entriesToDisplay:i}=V(),{cursor:b}=A();class l extends r{constructor(n={}){super(n),this.msg=n.message,this.hint=n.hint||"- Use arrow-keys. Return to submit.",this.warn=n.warn||"- This option is disabled",this.cursor=n.initial||0,this.choices=n.choices.map((m,f)=>(typeof m=="string"&&(m={title:m,value:f}),{title:m&&(m.title||m.value||m),value:m&&(m.value===void 0?f:m.value),description:m&&m.description,selected:m&&m.selected,disabled:m&&m.disabled})),this.optionsPerPage=n.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=t("",this.out.columns),this.render()}moveCursor(n){this.cursor=n,this.value=this.choices[n].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
54
+ `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(n){this.placeholder||(this.cursor=this.cursor+n,this.cursorOffset+=n)}_(n,f){let p=this.value.slice(0,this.cursor),h=this.value.slice(this.cursor);this.value=`${p}${n}${h}`,this.red=!1,this.cursor=this.placeholder?0:p.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let n=this.value.slice(0,this.cursor-1),f=this.value.slice(this.cursor);this.value=`${n}${f}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let n=this.value.slice(0,this.cursor),f=this.value.slice(this.cursor+1);this.value=`${n}${f}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(t.down(i(this.outputError,this.out.columns)-1)+c(this.outputError,this.out.columns)),this.out.write(c(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[s.symbol(this.done,this.aborted),e.bold(this.msg),s.delimiter(this.done),this.red?e.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
55
+ `).reduce((n,f,p)=>n+`
56
+ ${p?" ":b.pointerSmall} ${e.red().italic(f)}`,"")),this.out.write(o.line+t.to(0)+this.outputText+t.save+this.outputError+t.restore+t.move(this.cursorOffset,0)))}}return et=l,et}var tt,Rr;function Xi(){if(Rr)return tt;Rr=1;const e=q(),r=K(),{style:o,clear:t,figures:s,wrap:c,entriesToDisplay:i}=V(),{cursor:b}=A();class l extends r{constructor(n={}){super(n),this.msg=n.message,this.hint=n.hint||"- Use arrow-keys. Return to submit.",this.warn=n.warn||"- This option is disabled",this.cursor=n.initial||0,this.choices=n.choices.map((f,p)=>(typeof f=="string"&&(f={title:f,value:p}),{title:f&&(f.title||f.value||f),value:f&&(f.value===void 0?p:f.value),description:f&&f.description,selected:f&&f.selected,disabled:f&&f.disabled})),this.optionsPerPage=n.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=t("",this.out.columns),this.render()}moveCursor(n){this.cursor=n,this.value=this.choices[n].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
57
57
  `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
58
- `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(n,m){if(n===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(b.hide):this.out.write(t(this.outputText,this.out.columns)),super.render();let{startIndex:n,endIndex:m}=i(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(!1),this.done?this.selection.title:this.selection.disabled?e.yellow(this.warn):e.gray(this.hint)].join(" "),!this.done){this.outputText+=`
59
- `;for(let f=n;f<m;f++){let h,u,v="",g=this.choices[f];f===n&&n>0?u=s.arrowUp:f===m-1&&m<this.choices.length?u=s.arrowDown:u=" ",g.disabled?(h=this.cursor===f?e.gray().underline(g.title):e.strikethrough().gray(g.title),u=(this.cursor===f?e.bold().gray(s.pointer)+" ":" ")+u):(h=this.cursor===f?e.cyan().underline(g.title):g.title,u=(this.cursor===f?e.cyan(s.pointer)+" ":" ")+u,g.description&&this.cursor===f&&(v=` - ${g.description}`,(u.length+h.length+v.length>=this.out.columns||g.description.split(/\r?\n/).length>1)&&(v=`
58
+ `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(n,f){if(n===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(b.hide):this.out.write(t(this.outputText,this.out.columns)),super.render();let{startIndex:n,endIndex:f}=i(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(!1),this.done?this.selection.title:this.selection.disabled?e.yellow(this.warn):e.gray(this.hint)].join(" "),!this.done){this.outputText+=`
59
+ `;for(let p=n;p<f;p++){let h,u,v="",g=this.choices[p];p===n&&n>0?u=s.arrowUp:p===f-1&&f<this.choices.length?u=s.arrowDown:u=" ",g.disabled?(h=this.cursor===p?e.gray().underline(g.title):e.strikethrough().gray(g.title),u=(this.cursor===p?e.bold().gray(s.pointer)+" ":" ")+u):(h=this.cursor===p?e.cyan().underline(g.title):g.title,u=(this.cursor===p?e.cyan(s.pointer)+" ":" ")+u,g.description&&this.cursor===p&&(v=` - ${g.description}`,(u.length+h.length+v.length>=this.out.columns||g.description.split(/\r?\n/).length>1)&&(v=`
60
60
  `+c(g.description,{margin:3,width:this.out.columns})))),this.outputText+=`${u} ${h}${e.gray(v)}
61
- `}}this.out.write(this.outputText)}}return tt=l,tt}var rt,Cr;function Qi(){if(Cr)return rt;Cr=1;const e=q(),r=Z(),{style:o,clear:t}=V(),{cursor:s,erase:c}=A();class i extends r{constructor(l={}){super(l),this.msg=l.message,this.value=!!l.initial,this.active=l.active||"on",this.inactive=l.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
61
+ `}}this.out.write(this.outputText)}}return tt=l,tt}var rt,Pr;function Qi(){if(Pr)return rt;Pr=1;const e=q(),r=K(),{style:o,clear:t}=V(),{cursor:s,erase:c}=A();class i extends r{constructor(l={}){super(l),this.msg=l.message,this.value=!!l.initial,this.active=l.active||"on",this.inactive=l.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
62
62
  `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
63
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(l,a){if(l===" ")this.value=!this.value;else if(l==="1")this.value=!0;else if(l==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(s.hide):this.out.write(t(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:e.cyan().underline(this.inactive),e.gray("/"),this.value?e.cyan().underline(this.active):this.active].join(" "),this.out.write(c.line+s.to(0)+this.outputText))}}return rt=i,rt}var it,Dr;function G(){if(Dr)return it;Dr=1;class e{constructor({token:o,date:t,parts:s,locales:c}){this.token=o,this.date=t||new Date,this.parts=s||[this],this.locales=c||{}}up(){}down(){}next(){const o=this.parts.indexOf(this);return this.parts.find((t,s)=>s>o&&t instanceof e)}setTo(o){}prev(){let o=[].concat(this.parts).reverse();const t=o.indexOf(this);return o.find((s,c)=>c>t&&s instanceof e)}toString(){return String(this.date)}}return it=e,it}var st,Er;function es(){if(Er)return st;Er=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}return st=r,st}var nt,_r;function ts(){if(_r)return nt;_r=1;const e=G(),r=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th");class o extends e{constructor(s={}){super(s)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(s){this.date.setDate(parseInt(s.substr(-2)))}toString(){let s=this.date.getDate(),c=this.date.getDay();return this.token==="DD"?String(s).padStart(2,"0"):this.token==="Do"?s+r(s):this.token==="d"?c+1:this.token==="ddd"?this.locales.weekdaysShort[c]:this.token==="dddd"?this.locales.weekdays[c]:s}}return nt=o,nt}var ot,qr;function rs(){if(qr)return ot;qr=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}}return ot=r,ot}var lt,Ar;function is(){if(Ar)return lt;Ar=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return lt=r,lt}var ht,Ir;function ss(){if(Ir)return ht;Ir=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}return ht=r,ht}var ut,jr;function ns(){if(jr)return ut;jr=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),s=this.token.length;return s===2?String(t+1).padStart(2,"0"):s===3?this.locales.monthsShort[t]:s===4?this.locales.months[t]:String(t+1)}}return ut=r,ut}var at,Fr;function os(){if(Fr)return at;Fr=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}return at=r,at}var ct,Nr;function ls(){if(Nr)return ct;Nr=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}return ct=r,ct}var dt,kr;function hs(){return kr||(kr=1,dt={DatePart:G(),Meridiem:es(),Day:ts(),Hours:rs(),Milliseconds:is(),Minutes:ss(),Month:ns(),Seconds:os(),Year:ls()}),dt}var ft,Lr;function us(){if(Lr)return ft;Lr=1;const e=q(),r=Z(),{style:o,clear:t,figures:s}=V(),{erase:c,cursor:i}=A(),{DatePart:b,Meridiem:l,Day:a,Hours:n,Milliseconds:m,Minutes:f,Month:h,Seconds:u,Year:v}=hs(),g=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,d={1:({token:w})=>w.replace(/\\(.)/g,"$1"),2:w=>new a(w),3:w=>new h(w),4:w=>new v(w),5:w=>new l(w),6:w=>new n(w),7:w=>new f(w),8:w=>new u(w),9:w=>new m(w)},p={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class y extends r{constructor(x={}){super(x),this.msg=x.message,this.cursor=0,this.typed="",this.locales=Object.assign(p,x.locales),this._date=x.initial||new Date,this.errorMsg=x.error||"Please Enter A Valid Value",this.validator=x.validate||(()=>!0),this.mask=x.mask||"YYYY-MM-DD HH:mm:ss",this.clear=t("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(x){x&&this._date.setTime(x.getTime())}set mask(x){let S;for(this.parts=[];S=g.exec(x);){let O=S.shift(),M=S.findIndex($=>$!=null);this.parts.push(M in d?d[M]({token:S[M]||O,date:this.date,parts:this.parts,locales:this.locales}):S[M]||O)}let T=this.parts.reduce((O,M)=>(typeof M=="string"&&typeof O[O.length-1]=="string"?O[O.length-1]+=M:O.push(M),O),[]);this.parts.splice(0),this.parts.push(...T),this.reset()}moveCursor(x){this.typed="",this.cursor=x,this.fire()}reset(){this.moveCursor(this.parts.findIndex(x=>x instanceof b)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
63
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(l,a){if(l===" ")this.value=!this.value;else if(l==="1")this.value=!0;else if(l==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(s.hide):this.out.write(t(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:e.cyan().underline(this.inactive),e.gray("/"),this.value?e.cyan().underline(this.active):this.active].join(" "),this.out.write(c.line+s.to(0)+this.outputText))}}return rt=i,rt}var it,Cr;function G(){if(Cr)return it;Cr=1;class e{constructor({token:o,date:t,parts:s,locales:c}){this.token=o,this.date=t||new Date,this.parts=s||[this],this.locales=c||{}}up(){}down(){}next(){const o=this.parts.indexOf(this);return this.parts.find((t,s)=>s>o&&t instanceof e)}setTo(o){}prev(){let o=[].concat(this.parts).reverse();const t=o.indexOf(this);return o.find((s,c)=>c>t&&s instanceof e)}toString(){return String(this.date)}}return it=e,it}var st,Er;function es(){if(Er)return st;Er=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}return st=r,st}var nt,Dr;function ts(){if(Dr)return nt;Dr=1;const e=G(),r=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th");class o extends e{constructor(s={}){super(s)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(s){this.date.setDate(parseInt(s.substr(-2)))}toString(){let s=this.date.getDate(),c=this.date.getDay();return this.token==="DD"?String(s).padStart(2,"0"):this.token==="Do"?s+r(s):this.token==="d"?c+1:this.token==="ddd"?this.locales.weekdaysShort[c]:this.token==="dddd"?this.locales.weekdays[c]:s}}return nt=o,nt}var ot,_r;function rs(){if(_r)return ot;_r=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}}return ot=r,ot}var lt,qr;function is(){if(qr)return lt;qr=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return lt=r,lt}var ht,Ar;function ss(){if(Ar)return ht;Ar=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}return ht=r,ht}var ut,Ir;function ns(){if(Ir)return ut;Ir=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),s=this.token.length;return s===2?String(t+1).padStart(2,"0"):s===3?this.locales.monthsShort[t]:s===4?this.locales.months[t]:String(t+1)}}return ut=r,ut}var at,Fr;function os(){if(Fr)return at;Fr=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}return at=r,at}var ct,jr;function ls(){if(jr)return ct;jr=1;const e=G();class r extends e{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}return ct=r,ct}var dt,Nr;function hs(){return Nr||(Nr=1,dt={DatePart:G(),Meridiem:es(),Day:ts(),Hours:rs(),Milliseconds:is(),Minutes:ss(),Month:ns(),Seconds:os(),Year:ls()}),dt}var ft,kr;function us(){if(kr)return ft;kr=1;const e=q(),r=K(),{style:o,clear:t,figures:s}=V(),{erase:c,cursor:i}=A(),{DatePart:b,Meridiem:l,Day:a,Hours:n,Milliseconds:f,Minutes:p,Month:h,Seconds:u,Year:v}=hs(),g=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,d={1:({token:w})=>w.replace(/\\(.)/g,"$1"),2:w=>new a(w),3:w=>new h(w),4:w=>new v(w),5:w=>new l(w),6:w=>new n(w),7:w=>new p(w),8:w=>new u(w),9:w=>new f(w)},m={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class y extends r{constructor(x={}){super(x),this.msg=x.message,this.cursor=0,this.typed="",this.locales=Object.assign(m,x.locales),this._date=x.initial||new Date,this.errorMsg=x.error||"Please Enter A Valid Value",this.validator=x.validate||(()=>!0),this.mask=x.mask||"YYYY-MM-DD HH:mm:ss",this.clear=t("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(x){x&&this._date.setTime(x.getTime())}set mask(x){let S;for(this.parts=[];S=g.exec(x);){let O=S.shift(),M=S.findIndex($=>$!=null);this.parts.push(M in d?d[M]({token:S[M]||O,date:this.date,parts:this.parts,locales:this.locales}):S[M]||O)}let T=this.parts.reduce((O,M)=>(typeof M=="string"&&typeof O[O.length-1]=="string"?O[O.length-1]+=M:O.push(M),O),[]);this.parts.splice(0),this.parts.push(...T),this.reset()}moveCursor(x){this.typed="",this.cursor=x,this.fire()}reset(){this.moveCursor(this.parts.findIndex(x=>x instanceof b)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
64
64
  `),this.close()}async validate(){let x=await this.validator(this.value);typeof x=="string"&&(this.errorMsg=x,x=!1),this.error=!x}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
65
65
  `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let x=this.parts[this.cursor].prev();if(x==null)return this.bell();this.moveCursor(this.parts.indexOf(x)),this.render()}right(){let x=this.parts[this.cursor].next();if(x==null)return this.bell();this.moveCursor(this.parts.indexOf(x)),this.render()}next(){let x=this.parts[this.cursor].next();this.moveCursor(x?this.parts.indexOf(x):this.parts.findIndex(S=>S instanceof b)),this.render()}_(x){/\d/.test(x)&&(this.typed+=x,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(i.hide):this.out.write(t(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(!1),this.parts.reduce((x,S,T)=>x.concat(T===this.cursor&&!this.done?e.cyan().underline(S.toString()):S),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
66
66
  `).reduce((x,S,T)=>x+`
67
- ${T?" ":s.pointerSmall} ${e.red().italic(S)}`,"")),this.out.write(c.line+i.to(0)+this.outputText))}}return ft=y,ft}var pt,Yr;function as(){if(Yr)return pt;Yr=1;const e=q(),r=Z(),{cursor:o,erase:t}=A(),{style:s,figures:c,clear:i,lines:b}=V(),l=/[0-9]/,a=f=>f!==void 0,n=(f,h)=>{let u=Math.pow(10,h);return Math.round(f*u)/u};class m extends r{constructor(h={}){super(h),this.transform=s.render(h.style),this.msg=h.message,this.initial=a(h.initial)?h.initial:"",this.float=!!h.float,this.round=h.round||2,this.inc=h.increment||1,this.min=a(h.min)?h.min:-1/0,this.max=a(h.max)?h.max:1/0,this.errorMsg=h.error||"Please Enter A Valid Value",this.validator=h.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(h){!h&&h!==0?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${n(h,this.round)}`),this._value=n(h,this.round)),this.fire()}get value(){return this._value}parse(h){return this.float?parseFloat(h):parseInt(h)}valid(h){return h==="-"||h==="."&&this.float||l.test(h)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let h=this.value;this.value=h!==""?h:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
67
+ ${T?" ":s.pointerSmall} ${e.red().italic(S)}`,"")),this.out.write(c.line+i.to(0)+this.outputText))}}return ft=y,ft}var pt,Lr;function as(){if(Lr)return pt;Lr=1;const e=q(),r=K(),{cursor:o,erase:t}=A(),{style:s,figures:c,clear:i,lines:b}=V(),l=/[0-9]/,a=p=>p!==void 0,n=(p,h)=>{let u=Math.pow(10,h);return Math.round(p*u)/u};class f extends r{constructor(h={}){super(h),this.transform=s.render(h.style),this.msg=h.message,this.initial=a(h.initial)?h.initial:"",this.float=!!h.float,this.round=h.round||2,this.inc=h.increment||1,this.min=a(h.min)?h.min:-1/0,this.max=a(h.max)?h.max:1/0,this.errorMsg=h.error||"Please Enter A Valid Value",this.validator=h.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(h){!h&&h!==0?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${n(h,this.round)}`),this._value=n(h,this.round)),this.fire()}get value(){return this._value}parse(h){return this.float?parseFloat(h):parseInt(h)}valid(h){return h==="-"||h==="."&&this.float||l.test(h)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let h=this.value;this.value=h!==""?h:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
68
68
  `),this.close()}async validate(){let h=await this.validator(this.value);typeof h=="string"&&(this.errorMsg=h,h=!1),this.error=!h}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let h=this.value;this.value=h!==""?h:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
69
69
  `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let h=this.value.toString();if(h.length===0)return this.bell();this.value=this.parse(h=h.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(h,u){if(!this.valid(h))return this.bell();const v=Date.now();if(v-this.lastHit>1e3&&(this.typed=""),this.typed+=h,this.lastHit=v,this.color="cyan",h===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(o.down(b(this.outputError,this.out.columns)-1)+i(this.outputError,this.out.columns)),this.out.write(i(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[s.symbol(this.done,this.aborted),e.bold(this.msg),s.delimiter(this.done),!this.done||!this.done&&!this.placeholder?e[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
70
70
  `).reduce((h,u,v)=>h+`
71
- ${v?" ":c.pointerSmall} ${e.red().italic(u)}`,"")),this.out.write(t.line+o.to(0)+this.outputText+o.save+this.outputError+o.restore))}}return pt=m,pt}var mt,Br;function Vr(){if(Br)return mt;Br=1;const e=q(),{cursor:r}=A(),o=Z(),{clear:t,figures:s,style:c,wrap:i,entriesToDisplay:b}=V();class l extends o{constructor(n={}){super(n),this.msg=n.message,this.cursor=n.cursor||0,this.scrollIndex=n.cursor||0,this.hint=n.hint||"",this.warn=n.warn||"- This option is disabled -",this.minSelected=n.min,this.showMinError=!1,this.maxChoices=n.max,this.instructions=n.instructions,this.optionsPerPage=n.optionsPerPage||10,this.value=n.choices.map((m,f)=>(typeof m=="string"&&(m={title:m,value:f}),{title:m&&(m.title||m.value||m),description:m&&m.description,value:m&&(m.value===void 0?f:m.value),selected:m&&m.selected,disabled:m&&m.disabled})),this.clear=t("",this.out.columns),n.overrideRender||this.render()}reset(){this.value.map(n=>!n.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(n=>n.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
72
- `),this.close()}submit(){const n=this.value.filter(m=>m.selected);this.minSelected&&n.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
73
- `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const n=this.value[this.cursor];if(n.selected)n.selected=!1,this.render();else{if(n.disabled||this.value.filter(m=>m.selected).length>=this.maxChoices)return this.bell();n.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const n=!this.value[this.cursor].selected;this.value.filter(m=>!m.disabled).forEach(m=>m.selected=n),this.render()}_(n,m){if(n===" ")this.handleSpaceToggle();else if(n==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
71
+ ${v?" ":c.pointerSmall} ${e.red().italic(u)}`,"")),this.out.write(t.line+o.to(0)+this.outputText+o.save+this.outputError+o.restore))}}return pt=f,pt}var mt,Yr;function Br(){if(Yr)return mt;Yr=1;const e=q(),{cursor:r}=A(),o=K(),{clear:t,figures:s,style:c,wrap:i,entriesToDisplay:b}=V();class l extends o{constructor(n={}){super(n),this.msg=n.message,this.cursor=n.cursor||0,this.scrollIndex=n.cursor||0,this.hint=n.hint||"",this.warn=n.warn||"- This option is disabled -",this.minSelected=n.min,this.showMinError=!1,this.maxChoices=n.max,this.instructions=n.instructions,this.optionsPerPage=n.optionsPerPage||10,this.value=n.choices.map((f,p)=>(typeof f=="string"&&(f={title:f,value:p}),{title:f&&(f.title||f.value||f),description:f&&f.description,value:f&&(f.value===void 0?p:f.value),selected:f&&f.selected,disabled:f&&f.disabled})),this.clear=t("",this.out.columns),n.overrideRender||this.render()}reset(){this.value.map(n=>!n.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(n=>n.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
72
+ `),this.close()}submit(){const n=this.value.filter(f=>f.selected);this.minSelected&&n.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
73
+ `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const n=this.value[this.cursor];if(n.selected)n.selected=!1,this.render();else{if(n.disabled||this.value.filter(f=>f.selected).length>=this.maxChoices)return this.bell();n.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const n=!this.value[this.cursor].selected;this.value.filter(f=>!f.disabled).forEach(f=>f.selected=n),this.render()}_(n,f){if(n===" ")this.handleSpaceToggle();else if(n==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
74
74
  Instructions:
75
75
  ${s.arrowUp}/${s.arrowDown}: Highlight option
76
76
  ${s.arrowLeft}/${s.arrowRight}/[space]: Toggle selection
77
77
  `+(this.maxChoices===void 0?` a: Toggle all
78
- `:"")+" enter/return: Complete answer":""}renderOption(n,m,f,h){const u=(m.selected?e.green(s.radioOn):s.radioOff)+" "+h+" ";let v,g;return m.disabled?v=n===f?e.gray().underline(m.title):e.strikethrough().gray(m.title):(v=n===f?e.cyan().underline(m.title):m.title,n===f&&m.description&&(g=` - ${m.description}`,(u.length+v.length+g.length>=this.out.columns||m.description.split(/\r?\n/).length>1)&&(g=`
79
- `+i(m.description,{margin:u.length,width:this.out.columns})))),u+v+e.gray(g||"")}paginateOptions(n){if(n.length===0)return e.red("No matches for this query.");let{startIndex:m,endIndex:f}=b(this.cursor,n.length,this.optionsPerPage),h,u=[];for(let v=m;v<f;v++)v===m&&m>0?h=s.arrowUp:v===f-1&&f<n.length?h=s.arrowDown:h=" ",u.push(this.renderOption(this.cursor,n[v],v,h));return`
78
+ `:"")+" enter/return: Complete answer":""}renderOption(n,f,p,h){const u=(f.selected?e.green(s.radioOn):s.radioOff)+" "+h+" ";let v,g;return f.disabled?v=n===p?e.gray().underline(f.title):e.strikethrough().gray(f.title):(v=n===p?e.cyan().underline(f.title):f.title,n===p&&f.description&&(g=` - ${f.description}`,(u.length+v.length+g.length>=this.out.columns||f.description.split(/\r?\n/).length>1)&&(g=`
79
+ `+i(f.description,{margin:u.length,width:this.out.columns})))),u+v+e.gray(g||"")}paginateOptions(n){if(n.length===0)return e.red("No matches for this query.");let{startIndex:f,endIndex:p}=b(this.cursor,n.length,this.optionsPerPage),h,u=[];for(let v=f;v<p;v++)v===f&&f>0?h=s.arrowUp:v===p-1&&p<n.length?h=s.arrowDown:h=" ",u.push(this.renderOption(this.cursor,n[v],v,h));return`
80
80
  `+u.join(`
81
- `)}renderOptions(n){return this.done?"":this.paginateOptions(n)}renderDoneOrInstructions(){if(this.done)return this.value.filter(m=>m.selected).map(m=>m.title).join(", ");const n=[e.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&n.push(e.yellow(this.warn)),n.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let n=[c.symbol(this.done,this.aborted),e.bold(this.msg),c.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(n+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),n+=this.renderOptions(this.value),this.out.write(this.clear+n),this.clear=t(n,this.out.columns)}}return mt=l,mt}var gt,Hr;function cs(){if(Hr)return gt;Hr=1;const e=q(),r=Z(),{erase:o,cursor:t}=A(),{style:s,clear:c,figures:i,wrap:b,entriesToDisplay:l}=V(),a=(h,u)=>h[u]&&(h[u].value||h[u].title||h[u]),n=(h,u)=>h[u]&&(h[u].title||h[u].value||h[u]),m=(h,u)=>{const v=h.findIndex(g=>g.value===u||g.title===u);return v>-1?v:void 0};class f extends r{constructor(u={}){super(u),this.msg=u.message,this.suggest=u.suggest,this.choices=u.choices,this.initial=typeof u.initial=="number"?u.initial:m(u.choices,u.initial),this.select=this.initial||u.cursor||0,this.i18n={noMatches:u.noMatches||"no matches found"},this.fallback=u.fallback||this.initial,this.clearFirst=u.clearFirst||!1,this.suggestions=[],this.input="",this.limit=u.limit||10,this.cursor=0,this.transform=s.render(u.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=c("",this.out.columns),this.complete(this.render),this.render()}set fallback(u){this._fb=Number.isSafeInteger(parseInt(u))?parseInt(u):u}get fallback(){let u;return typeof this._fb=="number"?u=this.choices[this._fb]:typeof this._fb=="string"&&(u={title:this._fb}),u||this._fb||{title:this.i18n.noMatches}}moveSelect(u){this.select=u,this.suggestions.length>0?this.value=a(this.suggestions,u):this.value=this.fallback.value,this.fire()}async complete(u){const v=this.completing=this.suggest(this.input,this.choices),g=await v;if(this.completing!==v)return;this.suggestions=g.map((p,y,w)=>({title:n(w,y),value:a(w,y),description:p.description})),this.completing=!1;const d=Math.max(g.length-1,0);this.moveSelect(Math.min(d,this.select)),u&&u()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
81
+ `)}renderOptions(n){return this.done?"":this.paginateOptions(n)}renderDoneOrInstructions(){if(this.done)return this.value.filter(f=>f.selected).map(f=>f.title).join(", ");const n=[e.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&n.push(e.yellow(this.warn)),n.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let n=[c.symbol(this.done,this.aborted),e.bold(this.msg),c.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(n+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),n+=this.renderOptions(this.value),this.out.write(this.clear+n),this.clear=t(n,this.out.columns)}}return mt=l,mt}var gt,Vr;function cs(){if(Vr)return gt;Vr=1;const e=q(),r=K(),{erase:o,cursor:t}=A(),{style:s,clear:c,figures:i,wrap:b,entriesToDisplay:l}=V(),a=(h,u)=>h[u]&&(h[u].value||h[u].title||h[u]),n=(h,u)=>h[u]&&(h[u].title||h[u].value||h[u]),f=(h,u)=>{const v=h.findIndex(g=>g.value===u||g.title===u);return v>-1?v:void 0};class p extends r{constructor(u={}){super(u),this.msg=u.message,this.suggest=u.suggest,this.choices=u.choices,this.initial=typeof u.initial=="number"?u.initial:f(u.choices,u.initial),this.select=this.initial||u.cursor||0,this.i18n={noMatches:u.noMatches||"no matches found"},this.fallback=u.fallback||this.initial,this.clearFirst=u.clearFirst||!1,this.suggestions=[],this.input="",this.limit=u.limit||10,this.cursor=0,this.transform=s.render(u.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=c("",this.out.columns),this.complete(this.render),this.render()}set fallback(u){this._fb=Number.isSafeInteger(parseInt(u))?parseInt(u):u}get fallback(){let u;return typeof this._fb=="number"?u=this.choices[this._fb]:typeof this._fb=="string"&&(u={title:this._fb}),u||this._fb||{title:this.i18n.noMatches}}moveSelect(u){this.select=u,this.suggestions.length>0?this.value=a(this.suggestions,u):this.value=this.fallback.value,this.fire()}async complete(u){const v=this.completing=this.suggest(this.input,this.choices),g=await v;if(this.completing!==v)return;this.suggestions=g.map((m,y,w)=>({title:n(w,y),value:a(w,y),description:m.description})),this.completing=!1;const d=Math.max(g.length-1,0);this.moveSelect(Math.min(d,this.select)),u&&u()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
82
82
  `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
83
83
  `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
84
- `),this.close()}_(u,v){let g=this.input.slice(0,this.cursor),d=this.input.slice(this.cursor);this.input=`${g}${u}${d}`,this.cursor=g.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let u=this.input.slice(0,this.cursor-1),v=this.input.slice(this.cursor);this.input=`${u}${v}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let u=this.input.slice(0,this.cursor),v=this.input.slice(this.cursor+1);this.input=`${u}${v}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(u,v,g,d){let p,y=g?i.arrowUp:d?i.arrowDown:" ",w=v?e.cyan().underline(u.title):u.title;return y=(v?e.cyan(i.pointer)+" ":" ")+y,u.description&&(p=` - ${u.description}`,(y.length+w.length+p.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(p=`
85
- `+b(u.description,{margin:3,width:this.out.columns}))),y+" "+w+e.gray(p||"")}render(){if(this.closed)return;this.firstRender?this.out.write(t.hide):this.out.write(c(this.outputText,this.out.columns)),super.render();let{startIndex:u,endIndex:v}=l(this.select,this.choices.length,this.limit);if(this.outputText=[s.symbol(this.done,this.aborted,this.exited),e.bold(this.msg),s.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const g=this.suggestions.slice(u,v).map((d,p)=>this.renderOption(d,this.select===p+u,p===0&&u>0,p+u===v-1&&v<this.choices.length)).join(`
84
+ `),this.close()}_(u,v){let g=this.input.slice(0,this.cursor),d=this.input.slice(this.cursor);this.input=`${g}${u}${d}`,this.cursor=g.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let u=this.input.slice(0,this.cursor-1),v=this.input.slice(this.cursor);this.input=`${u}${v}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let u=this.input.slice(0,this.cursor),v=this.input.slice(this.cursor+1);this.input=`${u}${v}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(u,v,g,d){let m,y=g?i.arrowUp:d?i.arrowDown:" ",w=v?e.cyan().underline(u.title):u.title;return y=(v?e.cyan(i.pointer)+" ":" ")+y,u.description&&(m=` - ${u.description}`,(y.length+w.length+m.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(m=`
85
+ `+b(u.description,{margin:3,width:this.out.columns}))),y+" "+w+e.gray(m||"")}render(){if(this.closed)return;this.firstRender?this.out.write(t.hide):this.out.write(c(this.outputText,this.out.columns)),super.render();let{startIndex:u,endIndex:v}=l(this.select,this.choices.length,this.limit);if(this.outputText=[s.symbol(this.done,this.aborted,this.exited),e.bold(this.msg),s.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const g=this.suggestions.slice(u,v).map((d,m)=>this.renderOption(d,this.select===m+u,m===0&&u>0,m+u===v-1&&v<this.choices.length)).join(`
86
86
  `);this.outputText+=`
87
- `+(g||e.gray(this.fallback.title))}this.out.write(o.line+t.to(0)+this.outputText)}}return gt=f,gt}var vt,Ur;function ds(){if(Ur)return vt;Ur=1;const e=q(),{cursor:r}=A(),o=Vr(),{clear:t,style:s,figures:c}=V();class i extends o{constructor(l={}){l.overrideRender=!0,super(l),this.inputValue="",this.clear=t("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(l=>l.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const l=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(n=>this.inputValue?!!(typeof n.title=="string"&&n.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof n.value=="string"&&n.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);const a=this.filteredOptions.findIndex(n=>n===l);this.cursor=a<0?0:a,this.render()}handleSpaceToggle(){const l=this.filteredOptions[this.cursor];if(l.selected)l.selected=!1,this.render();else{if(l.disabled||this.value.filter(a=>a.selected).length>=this.maxChoices)return this.bell();l.selected=!0,this.render()}}handleInputChange(l){this.inputValue=this.inputValue+l,this.updateFilteredOptions()}_(l,a){l===" "?this.handleSpaceToggle():this.handleInputChange(l)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
87
+ `+(g||e.gray(this.fallback.title))}this.out.write(o.line+t.to(0)+this.outputText)}}return gt=p,gt}var vt,Hr;function ds(){if(Hr)return vt;Hr=1;const e=q(),{cursor:r}=A(),o=Br(),{clear:t,style:s,figures:c}=V();class i extends o{constructor(l={}){l.overrideRender=!0,super(l),this.inputValue="",this.clear=t("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(l=>l.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const l=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(n=>this.inputValue?!!(typeof n.title=="string"&&n.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof n.value=="string"&&n.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);const a=this.filteredOptions.findIndex(n=>n===l);this.cursor=a<0?0:a,this.render()}handleSpaceToggle(){const l=this.filteredOptions[this.cursor];if(l.selected)l.selected=!1,this.render();else{if(l.disabled||this.value.filter(a=>a.selected).length>=this.maxChoices)return this.bell();l.selected=!0,this.render()}}handleInputChange(l){this.inputValue=this.inputValue+l,this.updateFilteredOptions()}_(l,a){l===" "?this.handleSpaceToggle():this.handleInputChange(l)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
88
88
  Instructions:
89
89
  ${c.arrowUp}/${c.arrowDown}: Highlight option
90
90
  ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection
@@ -92,13 +92,13 @@ Instructions:
92
92
  enter/return: Complete answer
93
93
  `:""}renderCurrentInput(){return`
94
94
  Filtered results for: ${this.inputValue?this.inputValue:e.gray("Enter something to filter")}
95
- `}renderOption(l,a,n){let m;return a.disabled?m=l===n?e.gray().underline(a.title):e.strikethrough().gray(a.title):m=l===n?e.cyan().underline(a.title):a.title,(a.selected?e.green(c.radioOn):c.radioOff)+" "+m}renderDoneOrInstructions(){if(this.done)return this.value.filter(a=>a.selected).map(a=>a.title).join(", ");const l=[e.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&l.push(e.yellow(this.warn)),l.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let l=[s.symbol(this.done,this.aborted),e.bold(this.msg),s.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(l+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),l+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+l),this.clear=t(l,this.out.columns)}}return vt=i,vt}var bt,Gr;function fs(){if(Gr)return bt;Gr=1;const e=q(),r=Z(),{style:o,clear:t}=V(),{erase:s,cursor:c}=A();class i extends r{constructor(l={}){super(l),this.msg=l.message,this.value=l.initial,this.initialValue=!!l.initial,this.yesMsg=l.yes||"yes",this.yesOption=l.yesOption||"(Y/n)",this.noMsg=l.no||"no",this.noOption=l.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
95
+ `}renderOption(l,a,n){let f;return a.disabled?f=l===n?e.gray().underline(a.title):e.strikethrough().gray(a.title):f=l===n?e.cyan().underline(a.title):a.title,(a.selected?e.green(c.radioOn):c.radioOff)+" "+f}renderDoneOrInstructions(){if(this.done)return this.value.filter(a=>a.selected).map(a=>a.title).join(", ");const l=[e.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&l.push(e.yellow(this.warn)),l.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let l=[s.symbol(this.done,this.aborted),e.bold(this.msg),s.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(l+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),l+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+l),this.clear=t(l,this.out.columns)}}return vt=i,vt}var bt,Ur;function fs(){if(Ur)return bt;Ur=1;const e=q(),r=K(),{style:o,clear:t}=V(),{erase:s,cursor:c}=A();class i extends r{constructor(l={}){super(l),this.msg=l.message,this.value=l.initial,this.initialValue=!!l.initial,this.yesMsg=l.yes||"yes",this.yesOption=l.yesOption||"(Y/n)",this.noMsg=l.no||"no",this.noOption=l.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
96
96
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
97
- `),this.close()}_(l,a){return l.toLowerCase()==="y"?(this.value=!0,this.submit()):l.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(c.hide):this.out.write(t(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:e.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(s.line+c.to(0)+this.outputText))}}return bt=i,bt}var yt,Jr;function ps(){return Jr||(Jr=1,yt={TextPrompt:Zi(),SelectPrompt:Xi(),TogglePrompt:Qi(),DatePrompt:us(),NumberPrompt:as(),MultiselectPrompt:Vr(),AutocompletePrompt:cs(),AutocompleteMultiselectPrompt:ds(),ConfirmPrompt:fs()}),yt}var Wr;function ms(){return Wr||(Wr=1,function(e){const r=e,o=ps(),t=i=>i;function s(i,b,l={}){return new Promise((a,n)=>{const m=new o[i](b),f=l.onAbort||t,h=l.onSubmit||t,u=l.onExit||t;m.on("state",b.onState||t),m.on("submit",v=>a(h(v))),m.on("exit",v=>a(u(v))),m.on("abort",v=>n(f(v)))})}r.text=i=>s("TextPrompt",i),r.password=i=>(i.style="password",r.text(i)),r.invisible=i=>(i.style="invisible",r.text(i)),r.number=i=>s("NumberPrompt",i),r.date=i=>s("DatePrompt",i),r.confirm=i=>s("ConfirmPrompt",i),r.list=i=>{const b=i.separator||",";return s("TextPrompt",i,{onSubmit:l=>l.split(b).map(a=>a.trim())})},r.toggle=i=>s("TogglePrompt",i),r.select=i=>s("SelectPrompt",i),r.multiselect=i=>{i.choices=[].concat(i.choices||[]);const b=l=>l.filter(a=>a.selected).map(a=>a.value);return s("MultiselectPrompt",i,{onAbort:b,onSubmit:b})},r.autocompleteMultiselect=i=>{i.choices=[].concat(i.choices||[]);const b=l=>l.filter(a=>a.selected).map(a=>a.value);return s("AutocompleteMultiselectPrompt",i,{onAbort:b,onSubmit:b})};const c=(i,b)=>Promise.resolve(b.filter(l=>l.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));r.autocomplete=i=>(i.suggest=i.suggest||c,i.choices=[].concat(i.choices||[]),s("AutocompletePrompt",i))}(Be)),Be}var wt,zr;function gs(){if(zr)return wt;zr=1;const e=ms(),r=["suggest","format","onState","validate","onRender","type"],o=()=>{};async function t(b=[],{onSubmit:l=o,onCancel:a=o}={}){const n={},m=t._override||{};b=[].concat(b);let f,h,u,v,g,d;const p=async(y,w,x=!1)=>{if(!(!x&&y.validate&&y.validate(w)!==!0))return y.format?await y.format(w,n):w};for(h of b)if({name:v,type:g}=h,typeof g=="function"&&(g=await g(f,{...n},h),h.type=g),!!g){for(let y in h){if(r.includes(y))continue;let w=h[y];h[y]=typeof w=="function"?await w(f,{...n},d):w}if(d=h,typeof h.message!="string")throw new Error("prompt message is required");if({name:v,type:g}=h,e[g]===void 0)throw new Error(`prompt type (${g}) is not defined`);if(m[h.name]!==void 0&&(f=await p(h,m[h.name]),f!==void 0)){n[v]=f;continue}try{f=t._injected?s(t._injected,h.initial):await e[g](h),n[v]=f=await p(h,f,!0),u=await l(h,f,n)}catch{u=!await a(h,n)}if(u)return n}return n}function s(b,l){const a=b.shift();if(a instanceof Error)throw a;return a===void 0?l:a}function c(b){t._injected=(t._injected||[]).concat(b)}function i(b){t._override=Object.assign({},b)}return wt=Object.assign(t,{prompt:t,prompts:e,inject:c,override:i}),wt}var xt,Kr;function vs(){if(Kr)return xt;Kr=1;function e(r){r=(Array.isArray(r)?r:r.split(".")).map(Number);let o=0,t=process.versions.node.split(".").map(Number);for(;o<r.length;o++){if(t[o]>r[o])return!1;if(r[o]>t[o])return!0}return!1}return xt=e("8.6.0")?Hi():gs(),xt}var bs=vs(),ie=qt(bs),$t,Zr;function ys(){if(Zr)return $t;Zr=1;function e(t,s){var c=t;s.slice(0,-1).forEach(function(b){c=c[b]||{}});var i=s[s.length-1];return i in c}function r(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function o(t,s){return s==="constructor"&&typeof t[s]=="function"||s==="__proto__"}return $t=function(t,s){s||(s={});var c={bools:{},strings:{},unknownFn:null};typeof s.unknown=="function"&&(c.unknownFn=s.unknown),typeof s.boolean=="boolean"&&s.boolean?c.allBools=!0:[].concat(s.boolean).filter(Boolean).forEach(function(T){c.bools[T]=!0});var i={};function b(T){return i[T].some(function(O){return c.bools[O]})}Object.keys(s.alias||{}).forEach(function(T){i[T]=[].concat(s.alias[T]),i[T].forEach(function(O){i[O]=[T].concat(i[T].filter(function(M){return O!==M}))})}),[].concat(s.string).filter(Boolean).forEach(function(T){c.strings[T]=!0,i[T]&&[].concat(i[T]).forEach(function(O){c.strings[O]=!0})});var l=s.default||{},a={_:[]};function n(T,O){return c.allBools&&/^--[^=]+$/.test(O)||c.strings[T]||c.bools[T]||i[T]}function m(T,O,M){for(var $=T,R=0;R<O.length-1;R++){var D=O[R];if(o($,D))return;$[D]===void 0&&($[D]={}),($[D]===Object.prototype||$[D]===Number.prototype||$[D]===String.prototype)&&($[D]={}),$[D]===Array.prototype&&($[D]=[]),$=$[D]}var C=O[O.length-1];o($,C)||(($===Object.prototype||$===Number.prototype||$===String.prototype)&&($={}),$===Array.prototype&&($=[]),$[C]===void 0||c.bools[C]||typeof $[C]=="boolean"?$[C]=M:Array.isArray($[C])?$[C].push(M):$[C]=[$[C],M])}function f(T,O,M){if(!(M&&c.unknownFn&&!n(T,M)&&c.unknownFn(M)===!1)){var $=!c.strings[T]&&r(O)?Number(O):O;m(a,T.split("."),$),(i[T]||[]).forEach(function(R){m(a,R.split("."),$)})}}Object.keys(c.bools).forEach(function(T){f(T,l[T]===void 0?!1:l[T])});var h=[];t.indexOf("--")!==-1&&(h=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var u=0;u<t.length;u++){var v=t[u],g,d;if(/^--.+=/.test(v)){var p=v.match(/^--([^=]+)=([\s\S]*)$/);g=p[1];var y=p[2];c.bools[g]&&(y=y!=="false"),f(g,y,v)}else if(/^--no-.+/.test(v))g=v.match(/^--no-(.+)/)[1],f(g,!1,v);else if(/^--.+/.test(v))g=v.match(/^--(.+)/)[1],d=t[u+1],d!==void 0&&!/^(-|--)[^-]/.test(d)&&!c.bools[g]&&!c.allBools&&(!i[g]||!b(g))?(f(g,d,v),u+=1):/^(true|false)$/.test(d)?(f(g,d==="true",v),u+=1):f(g,c.strings[g]?"":!0,v);else if(/^-[^-]+/.test(v)){for(var w=v.slice(1,-1).split(""),x=!1,S=0;S<w.length;S++){if(d=v.slice(S+2),d==="-"){f(w[S],d,v);continue}if(/[A-Za-z]/.test(w[S])&&d[0]==="="){f(w[S],d.slice(1),v),x=!0;break}if(/[A-Za-z]/.test(w[S])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(d)){f(w[S],d,v),x=!0;break}if(w[S+1]&&w[S+1].match(/\W/)){f(w[S],v.slice(S+2),v),x=!0;break}else f(w[S],c.strings[w[S]]?"":!0,v)}g=v.slice(-1)[0],!x&&g!=="-"&&(t[u+1]&&!/^(-|--)[^-]/.test(t[u+1])&&!c.bools[g]&&(!i[g]||!b(g))?(f(g,t[u+1],v),u+=1):t[u+1]&&/^(true|false)$/.test(t[u+1])?(f(g,t[u+1]==="true",v),u+=1):f(g,c.strings[g]?"":!0,v))}else if((!c.unknownFn||c.unknownFn(v)!==!1)&&a._.push(c.strings._||!r(v)?v:Number(v)),s.stopEarly){a._.push.apply(a._,t.slice(u+1));break}}return Object.keys(l).forEach(function(T){e(a,T.split("."))||(m(a,T.split("."),l[T]),(i[T]||[]).forEach(function(O){m(a,O.split("."),l[T])}))}),s["--"]?a["--"]=h.slice():h.forEach(function(T){a._.push(T)}),a},$t}var ws=ys(),xs=qt(ws);const St=10,Xr=(e=0)=>r=>`\x1B[${r+e}m`,Qr=(e=0)=>r=>`\x1B[${38+e};5;${r}m`,ei=(e=0)=>(r,o,t)=>`\x1B[${38+e};2;${r};${o};${t}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 $s=Object.keys(E.color),Ss=Object.keys(E.bgColor);[...$s,...Ss];function Ts(){const e=new Map;for(const[r,o]of Object.entries(E)){for(const[t,s]of Object.entries(o))E[t]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},o[t]=E[t],e.set(s[0],s[1]);Object.defineProperty(E,r,{value:o,enumerable:!1})}return Object.defineProperty(E,"codes",{value:e,enumerable:!1}),E.color.close="\x1B[39m",E.bgColor.close="\x1B[49m",E.color.ansi=Xr(),E.color.ansi256=Qr(),E.color.ansi16m=ei(),E.bgColor.ansi=Xr(St),E.bgColor.ansi256=Qr(St),E.bgColor.ansi16m=ei(St),Object.defineProperties(E,{rgbToAnsi256:{value(r,o,t){return r===o&&o===t?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(o/255*5)+Math.round(t/255*5)},enumerable:!1},hexToRgb:{value(r){const o=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!o)return[0,0,0];let[t]=o;t.length===3&&(t=[...t].map(c=>c+c).join(""));const s=Number.parseInt(t,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:r=>E.rgbToAnsi256(...E.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value(r){if(r<8)return 30+r;if(r<16)return 90+(r-8);let o,t,s;if(r>=232)o=((r-232)*10+8)/255,t=o,s=o;else{r-=16;const b=r%36;o=Math.floor(r/36)/5,t=Math.floor(b/6)/5,s=b%6/5}const c=Math.max(o,t,s)*2;if(c===0)return 30;let i=30+(Math.round(s)<<2|Math.round(t)<<1|Math.round(o));return c===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(r,o,t)=>E.ansi256ToAnsi(E.rgbToAnsi256(r,o,t)),enumerable:!1},hexToAnsi:{value:r=>E.ansi256ToAnsi(E.hexToAnsi256(r)),enumerable:!1}}),E}const H=Ts();function k(e,r=globalThis.Deno?globalThis.Deno.args:oe.argv){const o=e.startsWith("-")?"":e.length===1?"-":"--",t=r.indexOf(o+e),s=r.indexOf("--");return t!==-1&&(s===-1||t<s)}const{env:_}=oe;let se;k("no-color")||k("no-colors")||k("color=false")||k("color=never")?se=0:(k("color")||k("colors")||k("color=true")||k("color=always"))&&(se=1);function Ms(){if("FORCE_COLOR"in _)return _.FORCE_COLOR==="true"?1:_.FORCE_COLOR==="false"?0:_.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(_.FORCE_COLOR,10),3)}function Os(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Rs(e,{streamIsTTY:r,sniffFlags:o=!0}={}){const t=Ms();t!==void 0&&(se=t);const s=o?se:t;if(s===0)return 0;if(o){if(k("color=16m")||k("color=full")||k("color=truecolor"))return 3;if(k("color=256"))return 2}if("TF_BUILD"in _&&"AGENT_NAME"in _)return 1;if(e&&!r&&s===void 0)return 0;const c=s||0;if(_.TERM==="dumb")return c;if(oe.platform==="win32"){const i=ci.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in _)return"GITHUB_ACTIONS"in _||"GITEA_ACTIONS"in _?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(i=>i in _)||_.CI_NAME==="codeship"?1:c;if("TEAMCITY_VERSION"in _)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(_.TEAMCITY_VERSION)?1:0;if(_.COLORTERM==="truecolor"||_.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in _){const i=Number.parseInt((_.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(_.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(_.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(_.TERM)||"COLORTERM"in _?1:c}function ti(e,r={}){const o=Rs(e,{streamIsTTY:e&&e.isTTY,...r});return Os(o)}const Ps={stdout:ti({isTTY:Et.isatty(1)}),stderr:ti({isTTY:Et.isatty(2)})};function Cs(e,r,o){let t=e.indexOf(r);if(t===-1)return e;const s=r.length;let c=0,i="";do i+=e.slice(c,t)+r+o,c=t+s,t=e.indexOf(r,c);while(t!==-1);return i+=e.slice(c),i}function Ds(e,r,o,t){let s=0,c="";do{const i=e[t-1]==="\r";c+=e.slice(s,i?t-1:t)+r+(i?`\r
97
+ `),this.close()}_(l,a){return l.toLowerCase()==="y"?(this.value=!0,this.submit()):l.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(c.hide):this.out.write(t(this.outputText,this.out.columns)),super.render(),this.outputText=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:e.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(s.line+c.to(0)+this.outputText))}}return bt=i,bt}var yt,Gr;function ps(){return Gr||(Gr=1,yt={TextPrompt:Zi(),SelectPrompt:Xi(),TogglePrompt:Qi(),DatePrompt:us(),NumberPrompt:as(),MultiselectPrompt:Br(),AutocompletePrompt:cs(),AutocompleteMultiselectPrompt:ds(),ConfirmPrompt:fs()}),yt}var Jr;function ms(){return Jr||(Jr=1,function(e){const r=e,o=ps(),t=i=>i;function s(i,b,l={}){return new Promise((a,n)=>{const f=new o[i](b),p=l.onAbort||t,h=l.onSubmit||t,u=l.onExit||t;f.on("state",b.onState||t),f.on("submit",v=>a(h(v))),f.on("exit",v=>a(u(v))),f.on("abort",v=>n(p(v)))})}r.text=i=>s("TextPrompt",i),r.password=i=>(i.style="password",r.text(i)),r.invisible=i=>(i.style="invisible",r.text(i)),r.number=i=>s("NumberPrompt",i),r.date=i=>s("DatePrompt",i),r.confirm=i=>s("ConfirmPrompt",i),r.list=i=>{const b=i.separator||",";return s("TextPrompt",i,{onSubmit:l=>l.split(b).map(a=>a.trim())})},r.toggle=i=>s("TogglePrompt",i),r.select=i=>s("SelectPrompt",i),r.multiselect=i=>{i.choices=[].concat(i.choices||[]);const b=l=>l.filter(a=>a.selected).map(a=>a.value);return s("MultiselectPrompt",i,{onAbort:b,onSubmit:b})},r.autocompleteMultiselect=i=>{i.choices=[].concat(i.choices||[]);const b=l=>l.filter(a=>a.selected).map(a=>a.value);return s("AutocompleteMultiselectPrompt",i,{onAbort:b,onSubmit:b})};const c=(i,b)=>Promise.resolve(b.filter(l=>l.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));r.autocomplete=i=>(i.suggest=i.suggest||c,i.choices=[].concat(i.choices||[]),s("AutocompletePrompt",i))}(Be)),Be}var wt,Wr;function gs(){if(Wr)return wt;Wr=1;const e=ms(),r=["suggest","format","onState","validate","onRender","type"],o=()=>{};async function t(b=[],{onSubmit:l=o,onCancel:a=o}={}){const n={},f=t._override||{};b=[].concat(b);let p,h,u,v,g,d;const m=async(y,w,x=!1)=>{if(!(!x&&y.validate&&y.validate(w)!==!0))return y.format?await y.format(w,n):w};for(h of b)if({name:v,type:g}=h,typeof g=="function"&&(g=await g(p,{...n},h),h.type=g),!!g){for(let y in h){if(r.includes(y))continue;let w=h[y];h[y]=typeof w=="function"?await w(p,{...n},d):w}if(d=h,typeof h.message!="string")throw new Error("prompt message is required");if({name:v,type:g}=h,e[g]===void 0)throw new Error(`prompt type (${g}) is not defined`);if(f[h.name]!==void 0&&(p=await m(h,f[h.name]),p!==void 0)){n[v]=p;continue}try{p=t._injected?s(t._injected,h.initial):await e[g](h),n[v]=p=await m(h,p,!0),u=await l(h,p,n)}catch{u=!await a(h,n)}if(u)return n}return n}function s(b,l){const a=b.shift();if(a instanceof Error)throw a;return a===void 0?l:a}function c(b){t._injected=(t._injected||[]).concat(b)}function i(b){t._override=Object.assign({},b)}return wt=Object.assign(t,{prompt:t,prompts:e,inject:c,override:i}),wt}var xt,zr;function vs(){if(zr)return xt;zr=1;function e(r){r=(Array.isArray(r)?r:r.split(".")).map(Number);let o=0,t=process.versions.node.split(".").map(Number);for(;o<r.length;o++){if(t[o]>r[o])return!1;if(r[o]>t[o])return!0}return!1}return xt=e("8.6.0")?Hi():gs(),xt}var bs=vs(),ie=_t(bs),$t,Kr;function ys(){if(Kr)return $t;Kr=1;function e(t,s){var c=t;s.slice(0,-1).forEach(function(b){c=c[b]||{}});var i=s[s.length-1];return i in c}function r(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function o(t,s){return s==="constructor"&&typeof t[s]=="function"||s==="__proto__"}return $t=function(t,s){s||(s={});var c={bools:{},strings:{},unknownFn:null};typeof s.unknown=="function"&&(c.unknownFn=s.unknown),typeof s.boolean=="boolean"&&s.boolean?c.allBools=!0:[].concat(s.boolean).filter(Boolean).forEach(function(T){c.bools[T]=!0});var i={};function b(T){return i[T].some(function(O){return c.bools[O]})}Object.keys(s.alias||{}).forEach(function(T){i[T]=[].concat(s.alias[T]),i[T].forEach(function(O){i[O]=[T].concat(i[T].filter(function(M){return O!==M}))})}),[].concat(s.string).filter(Boolean).forEach(function(T){c.strings[T]=!0,i[T]&&[].concat(i[T]).forEach(function(O){c.strings[O]=!0})});var l=s.default||{},a={_:[]};function n(T,O){return c.allBools&&/^--[^=]+$/.test(O)||c.strings[T]||c.bools[T]||i[T]}function f(T,O,M){for(var $=T,R=0;R<O.length-1;R++){var E=O[R];if(o($,E))return;$[E]===void 0&&($[E]={}),($[E]===Object.prototype||$[E]===Number.prototype||$[E]===String.prototype)&&($[E]={}),$[E]===Array.prototype&&($[E]=[]),$=$[E]}var C=O[O.length-1];o($,C)||(($===Object.prototype||$===Number.prototype||$===String.prototype)&&($={}),$===Array.prototype&&($=[]),$[C]===void 0||c.bools[C]||typeof $[C]=="boolean"?$[C]=M:Array.isArray($[C])?$[C].push(M):$[C]=[$[C],M])}function p(T,O,M){if(!(M&&c.unknownFn&&!n(T,M)&&c.unknownFn(M)===!1)){var $=!c.strings[T]&&r(O)?Number(O):O;f(a,T.split("."),$),(i[T]||[]).forEach(function(R){f(a,R.split("."),$)})}}Object.keys(c.bools).forEach(function(T){p(T,l[T]===void 0?!1:l[T])});var h=[];t.indexOf("--")!==-1&&(h=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var u=0;u<t.length;u++){var v=t[u],g,d;if(/^--.+=/.test(v)){var m=v.match(/^--([^=]+)=([\s\S]*)$/);g=m[1];var y=m[2];c.bools[g]&&(y=y!=="false"),p(g,y,v)}else if(/^--no-.+/.test(v))g=v.match(/^--no-(.+)/)[1],p(g,!1,v);else if(/^--.+/.test(v))g=v.match(/^--(.+)/)[1],d=t[u+1],d!==void 0&&!/^(-|--)[^-]/.test(d)&&!c.bools[g]&&!c.allBools&&(!i[g]||!b(g))?(p(g,d,v),u+=1):/^(true|false)$/.test(d)?(p(g,d==="true",v),u+=1):p(g,c.strings[g]?"":!0,v);else if(/^-[^-]+/.test(v)){for(var w=v.slice(1,-1).split(""),x=!1,S=0;S<w.length;S++){if(d=v.slice(S+2),d==="-"){p(w[S],d,v);continue}if(/[A-Za-z]/.test(w[S])&&d[0]==="="){p(w[S],d.slice(1),v),x=!0;break}if(/[A-Za-z]/.test(w[S])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(d)){p(w[S],d,v),x=!0;break}if(w[S+1]&&w[S+1].match(/\W/)){p(w[S],v.slice(S+2),v),x=!0;break}else p(w[S],c.strings[w[S]]?"":!0,v)}g=v.slice(-1)[0],!x&&g!=="-"&&(t[u+1]&&!/^(-|--)[^-]/.test(t[u+1])&&!c.bools[g]&&(!i[g]||!b(g))?(p(g,t[u+1],v),u+=1):t[u+1]&&/^(true|false)$/.test(t[u+1])?(p(g,t[u+1]==="true",v),u+=1):p(g,c.strings[g]?"":!0,v))}else if((!c.unknownFn||c.unknownFn(v)!==!1)&&a._.push(c.strings._||!r(v)?v:Number(v)),s.stopEarly){a._.push.apply(a._,t.slice(u+1));break}}return Object.keys(l).forEach(function(T){e(a,T.split("."))||(f(a,T.split("."),l[T]),(i[T]||[]).forEach(function(O){f(a,O.split("."),l[T])}))}),s["--"]?a["--"]=h.slice():h.forEach(function(T){a._.push(T)}),a},$t}var ws=ys(),xs=_t(ws);const St=10,Zr=(e=0)=>r=>`\x1B[${r+e}m`,Xr=(e=0)=>r=>`\x1B[${38+e};5;${r}m`,Qr=(e=0)=>(r,o,t)=>`\x1B[${38+e};2;${r};${o};${t}m`,D={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],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(D.modifier);const $s=Object.keys(D.color),Ss=Object.keys(D.bgColor);[...$s,...Ss];function Ts(){const e=new Map;for(const[r,o]of Object.entries(D)){for(const[t,s]of Object.entries(o))D[t]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},o[t]=D[t],e.set(s[0],s[1]);Object.defineProperty(D,r,{value:o,enumerable:!1})}return Object.defineProperty(D,"codes",{value:e,enumerable:!1}),D.color.close="\x1B[39m",D.bgColor.close="\x1B[49m",D.color.ansi=Zr(),D.color.ansi256=Xr(),D.color.ansi16m=Qr(),D.bgColor.ansi=Zr(St),D.bgColor.ansi256=Xr(St),D.bgColor.ansi16m=Qr(St),Object.defineProperties(D,{rgbToAnsi256:{value(r,o,t){return r===o&&o===t?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(o/255*5)+Math.round(t/255*5)},enumerable:!1},hexToRgb:{value(r){const o=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!o)return[0,0,0];let[t]=o;t.length===3&&(t=[...t].map(c=>c+c).join(""));const s=Number.parseInt(t,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:r=>D.rgbToAnsi256(...D.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value(r){if(r<8)return 30+r;if(r<16)return 90+(r-8);let o,t,s;if(r>=232)o=((r-232)*10+8)/255,t=o,s=o;else{r-=16;const b=r%36;o=Math.floor(r/36)/5,t=Math.floor(b/6)/5,s=b%6/5}const c=Math.max(o,t,s)*2;if(c===0)return 30;let i=30+(Math.round(s)<<2|Math.round(t)<<1|Math.round(o));return c===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(r,o,t)=>D.ansi256ToAnsi(D.rgbToAnsi256(r,o,t)),enumerable:!1},hexToAnsi:{value:r=>D.ansi256ToAnsi(D.hexToAnsi256(r)),enumerable:!1}}),D}const H=Ts();function k(e,r=globalThis.Deno?globalThis.Deno.args:oe.argv){const o=e.startsWith("-")?"":e.length===1?"-":"--",t=r.indexOf(o+e),s=r.indexOf("--");return t!==-1&&(s===-1||t<s)}const{env:_}=oe;let se;k("no-color")||k("no-colors")||k("color=false")||k("color=never")?se=0:(k("color")||k("colors")||k("color=true")||k("color=always"))&&(se=1);function Ms(){if("FORCE_COLOR"in _)return _.FORCE_COLOR==="true"?1:_.FORCE_COLOR==="false"?0:_.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(_.FORCE_COLOR,10),3)}function Os(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Rs(e,{streamIsTTY:r,sniffFlags:o=!0}={}){const t=Ms();t!==void 0&&(se=t);const s=o?se:t;if(s===0)return 0;if(o){if(k("color=16m")||k("color=full")||k("color=truecolor"))return 3;if(k("color=256"))return 2}if("TF_BUILD"in _&&"AGENT_NAME"in _)return 1;if(e&&!r&&s===void 0)return 0;const c=s||0;if(_.TERM==="dumb")return c;if(oe.platform==="win32"){const i=ci.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in _)return"GITHUB_ACTIONS"in _||"GITEA_ACTIONS"in _?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(i=>i in _)||_.CI_NAME==="codeship"?1:c;if("TEAMCITY_VERSION"in _)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(_.TEAMCITY_VERSION)?1:0;if(_.COLORTERM==="truecolor"||_.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in _){const i=Number.parseInt((_.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(_.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(_.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(_.TERM)||"COLORTERM"in _?1:c}function ei(e,r={}){const o=Rs(e,{streamIsTTY:e&&e.isTTY,...r});return Os(o)}const Ps={stdout:ei({isTTY:Et.isatty(1)}),stderr:ei({isTTY:Et.isatty(2)})};function Cs(e,r,o){let t=e.indexOf(r);if(t===-1)return e;const s=r.length;let c=0,i="";do i+=e.slice(c,t)+r+o,c=t+s,t=e.indexOf(r,c);while(t!==-1);return i+=e.slice(c),i}function Es(e,r,o,t){let s=0,c="";do{const i=e[t-1]==="\r";c+=e.slice(s,i?t-1:t)+r+(i?`\r
98
98
  `:`
99
99
  `)+o,s=t+1,t=e.indexOf(`
100
- `,s)}while(t!==-1);return c+=e.slice(s),c}const{stdout:ri,stderr:ii}=Ps,Tt=Symbol("GENERATOR"),Q=Symbol("STYLER"),te=Symbol("IS_EMPTY"),si=["ansi","ansi","ansi256","ansi16m"],ee=Object.create(null),Es=(e,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const o=ri?ri.level:0;e.level=r.level===void 0?o:r.level},_s=e=>{const r=(...o)=>o.join(" ");return Es(r,e),Object.setPrototypeOf(r,re.prototype),r};function re(e){return _s(e)}Object.setPrototypeOf(re.prototype,Function.prototype);for(const[e,r]of Object.entries(H))ee[e]={get(){const o=ne(this,Ot(r.open,r.close,this[Q]),this[te]);return Object.defineProperty(this,e,{value:o}),o}};ee.visible={get(){const e=ne(this,this[Q],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const Mt=(e,r,o,...t)=>e==="rgb"?r==="ansi16m"?H[o].ansi16m(...t):r==="ansi256"?H[o].ansi256(H.rgbToAnsi256(...t)):H[o].ansi(H.rgbToAnsi(...t)):e==="hex"?Mt("rgb",r,o,...H.hexToRgb(...t)):H[o][e](...t),qs=["rgb","hex","ansi256"];for(const e of qs){ee[e]={get(){const{level:o}=this;return function(...t){const s=Ot(Mt(e,si[o],"color",...t),H.color.close,this[Q]);return ne(this,s,this[te])}}};const r="bg"+e[0].toUpperCase()+e.slice(1);ee[r]={get(){const{level:o}=this;return function(...t){const s=Ot(Mt(e,si[o],"bgColor",...t),H.bgColor.close,this[Q]);return ne(this,s,this[te])}}}}const As=Object.defineProperties(()=>{},{...ee,level:{enumerable:!0,get(){return this[Tt].level},set(e){this[Tt].level=e}}}),Ot=(e,r,o)=>{let t,s;return o===void 0?(t=e,s=r):(t=o.openAll+e,s=r+o.closeAll),{open:e,close:r,openAll:t,closeAll:s,parent:o}},ne=(e,r,o)=>{const t=(...s)=>Is(t,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(t,As),t[Tt]=e,t[Q]=r,t[te]=o,t},Is=(e,r)=>{if(e.level<=0||!r)return e[te]?"":r;let o=e[Q];if(o===void 0)return r;const{openAll:t,closeAll:s}=o;if(r.includes("\x1B"))for(;o!==void 0;)r=Cs(r,o.close,o.open),o=o.parent;const c=r.indexOf(`
101
- `);return c!==-1&&(r=Ds(r,s,t,c)),t+r+s};Object.defineProperties(re.prototype,ee);const I=re();re({level:ii?ii.level:0});const P={backend:I.hex("#3677FF"),frontend:I.hex("#6DC6FE"),vanilla:I.hex("#EEC900"),react:I.hex("#3B89E0"),typescript:I.hex("#30B3ED"),ok:I.hex("#30ED86"),error:I.hex("#ED3066"),info:I.hex("#42ECDE"),gray:I.hex("#686868"),vue:I.hex("#54E6A5"),warn:I.hex("#EC9942"),webpack:I.hex("#75AFCC"),node:I.hex("#417E38"),rust:I.hex("#D34516"),experimental:I.hex("#FA2200")};function J(e){const r=22-e.length;return I.reset(P.gray(`${" ".repeat(r)}|${" ".repeat(2)}`))}function L(e){const r=e.split(" ");return e==="Frontend"?P.frontend(e):e==="Backend"?P.backend(e):e==="VanillaJS"?P.vanilla(e):e==="NodeJS"||r.includes("Node")?P.node(e):r.includes("JavaScript")?P.react(e):r.includes("Rspack")||r.includes("Rust")?P.rust(e):r.includes("TypeScript")||r.includes("TypeScript")?P.typescript(e):r.includes("React")?P.react(e):e}function W(e){return I.reset(e)}const ni={Frontend:{VanillaJS:[{value:"vanilla-js",title:`${L("VanillaJS")}${J("VanillaJS")}${W(P.error("Vanilla JS + Vite."))}`}],"React JavaScript":[{value:"react",title:`${L("React")}${J("React")}${W(P.error("React + Vite."))}`},{value:"react-dev",title:`${L("React Dev")}${J("React Dev")}${W(P.error("Tailwind + Linter + Tests"))}`},{value:"react-webpack",title:`${L("React Webpack")}${J("React Webpack")}${W(P.error("React + Webpack."))}`},{value:"react-dev-webpack",title:`${L("React Dev Webpack")}${J("React Dev Webpack")}${W(P.error("Tailwind + Linter + Tests"))}`}],"React TypeScript":[{value:"react-typescript",title:`${L("React TypeScript")}${J("React TypeScript")}${W(P.error("React + Vite + TypeScript"))}`},{value:"react-dev-typescript",title:`${L("React Dev TypeScript")}${J("React Dev TypeScript")}${W(P.error("Tailwind + Linter + Tests"))}`}],"React Rust":[{value:"react-rspack",title:`${L("React Rspack")}${J("React Rspack")}${W(P.error("React + Rspack"))}`}]},Backend:{NodeJS:[{value:"node-express",title:`${L("Node Express")}${J("Node Express")}${W(P.error("Express + Sequelize + Linter + Tests"))}`}]}},oi=(e,r)=>{mi(e).forEach(o=>{const t=z.join(e,o);let s=z.join(r,o);o==="_gitignore"&&(s=z.join(r,".gitignore")),gi(t).isDirectory()?(vi(s),oi(t,s)):bi(t,s)})},js=(e,r)=>{const o=z.join(e,"package.json");try{const t=di(o,"utf8"),s=JSON.parse(t);s.name=r,fi(o,JSON.stringify(s,null,2),"utf8")}catch(t){console.log(t.message)}};async function li(e,r,o){const t=_t(e),s=_t(r);t||console.log(P.error("Invalid Template")),s&&console.log(P.error("Target directory already exist!")),t&&!s&&(console.info(`\u{1F4C2} ${P.ok("Target directory doesn't exist")}`),console.info(`\u{1F6A7} ${P.ok("Creating directory")}`),pi(r,{recursive:!0}),console.info(`\u{1F4C1} ${P.ok("Finished creating directory")}`),oi(e,r),js(r,o),console.info(`\u{1F680} ${P.ok(`Finished generating your app ${P.error(o)}`)}`),console.info(`\u{1F3E0} ${P.info(`cd ${o}`)}`),console.info(`\u{1F9EA} ${P.info("npm install")}`))}const Fs=e=>e.toLowerCase().split(/[\s|_]/).join("-"),Ns=e=>e.match(/[^a-zA-Z0-9-\s]/g)?"App name should not contain special characters except hyphen (-)":!0,hi=`
100
+ `,s)}while(t!==-1);return c+=e.slice(s),c}const{stdout:ti,stderr:ri}=Ps,Tt=Symbol("GENERATOR"),Q=Symbol("STYLER"),te=Symbol("IS_EMPTY"),ii=["ansi","ansi","ansi256","ansi16m"],ee=Object.create(null),Ds=(e,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const o=ti?ti.level:0;e.level=r.level===void 0?o:r.level},_s=e=>{const r=(...o)=>o.join(" ");return Ds(r,e),Object.setPrototypeOf(r,re.prototype),r};function re(e){return _s(e)}Object.setPrototypeOf(re.prototype,Function.prototype);for(const[e,r]of Object.entries(H))ee[e]={get(){const o=ne(this,Ot(r.open,r.close,this[Q]),this[te]);return Object.defineProperty(this,e,{value:o}),o}};ee.visible={get(){const e=ne(this,this[Q],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const Mt=(e,r,o,...t)=>e==="rgb"?r==="ansi16m"?H[o].ansi16m(...t):r==="ansi256"?H[o].ansi256(H.rgbToAnsi256(...t)):H[o].ansi(H.rgbToAnsi(...t)):e==="hex"?Mt("rgb",r,o,...H.hexToRgb(...t)):H[o][e](...t),qs=["rgb","hex","ansi256"];for(const e of qs){ee[e]={get(){const{level:o}=this;return function(...t){const s=Ot(Mt(e,ii[o],"color",...t),H.color.close,this[Q]);return ne(this,s,this[te])}}};const r="bg"+e[0].toUpperCase()+e.slice(1);ee[r]={get(){const{level:o}=this;return function(...t){const s=Ot(Mt(e,ii[o],"bgColor",...t),H.bgColor.close,this[Q]);return ne(this,s,this[te])}}}}const As=Object.defineProperties(()=>{},{...ee,level:{enumerable:!0,get(){return this[Tt].level},set(e){this[Tt].level=e}}}),Ot=(e,r,o)=>{let t,s;return o===void 0?(t=e,s=r):(t=o.openAll+e,s=r+o.closeAll),{open:e,close:r,openAll:t,closeAll:s,parent:o}},ne=(e,r,o)=>{const t=(...s)=>Is(t,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(t,As),t[Tt]=e,t[Q]=r,t[te]=o,t},Is=(e,r)=>{if(e.level<=0||!r)return e[te]?"":r;let o=e[Q];if(o===void 0)return r;const{openAll:t,closeAll:s}=o;if(r.includes("\x1B"))for(;o!==void 0;)r=Cs(r,o.close,o.open),o=o.parent;const c=r.indexOf(`
101
+ `);return c!==-1&&(r=Es(r,s,t,c)),t+r+s};Object.defineProperties(re.prototype,ee);const I=re();re({level:ri?ri.level:0});const P={backend:I.hex("#3677FF"),frontend:I.hex("#6DC6FE"),vanilla:I.hex("#EEC900"),react:I.hex("#3B89E0"),typescript:I.hex("#30B3ED"),ok:I.hex("#30ED86"),error:I.hex("#ED3066"),info:I.hex("#42ECDE"),gray:I.hex("#686868"),vue:I.hex("#54E6A5"),warn:I.hex("#EC9942"),webpack:I.hex("#75AFCC"),node:I.hex("#417E38"),rust:I.hex("#D34516"),experimental:I.hex("#FA2200")};function J(e){const r=22-e.length;return I.reset(P.gray(`${" ".repeat(r)}|${" ".repeat(2)}`))}function L(e){const r=e.split(" ");return e==="Frontend"?P.frontend(e):e==="Backend"?P.backend(e):e==="VanillaJS"?P.vanilla(e):e==="NodeJS"||r.includes("Node")?P.node(e):r.includes("JavaScript")?P.react(e):r.includes("Rspack")||r.includes("Rust")?P.rust(e):r.includes("TypeScript")?P.typescript(e):r.includes("React")?P.react(e):e}function W(e){return I.reset(e)}const si={Frontend:{VanillaJS:[{value:"vanilla-js",title:`${L("VanillaJS")}${J("VanillaJS")}${W(P.error("Vanilla JS + Vite."))}`}],"React JavaScript":[{value:"react",title:`${L("React")}${J("React")}${W(P.error("React + Vite."))}`},{value:"react-dev",title:`${L("React Dev")}${J("React Dev")}${W(P.error("Tailwind + Linter + Tests"))}`},{value:"react-webpack",title:`${L("React Webpack")}${J("React Webpack")}${W(P.error("React + Webpack."))}`},{value:"react-dev-webpack",title:`${L("React Dev Webpack")}${J("React Dev Webpack")}${W(P.error("Tailwind + Linter + Tests"))}`}],"React TypeScript":[{value:"react-typescript",title:`${L("React TypeScript")}${J("React TypeScript")}${W(P.error("React + Vite + TypeScript"))}`},{value:"react-dev-typescript",title:`${L("React Dev TypeScript")}${J("React Dev TypeScript")}${W(P.error("Tailwind + Linter + Tests"))}`}],"React Rust":[{value:"react-rspack",title:`${L("React Rspack")}${J("React Rspack")}${W(P.error("React + Rspack"))}`}]},Backend:{NodeJS:[{value:"node-express",title:`${L("Node Express")}${J("Node Express")}${W(P.error("Express + Sequelize + Linter + Tests"))}`}]}},ni=(e,r)=>{mi(e).forEach(o=>{const t=X.join(e,o);let s=X.join(r,o);o==="_gitignore"&&(s=X.join(r,".gitignore"));try{gi(t).isDirectory()?(vi(s,{recursive:!0}),ni(t,s)):bi(t,s)}catch(c){throw new Error(`Failed to copy ${t} to ${s}`,{cause:c})}})},Fs=(e,r)=>{const o=X.join(e,"package.json");try{const t=di(o,"utf8"),s=JSON.parse(t);s.name=r,fi(o,JSON.stringify(s,null,2),"utf8")}catch(t){console.log(t.message)}};async function js(e,r,o){const t=Dt(e),s=Dt(r);if(!t){console.log(P.error("Invalid Template"));return}if(s){console.log(P.error("Target directory already exist!"));return}console.info(`\u{1F4C2} ${P.ok("Target directory doesn't exist")}`),console.info(`\u{1F6A7} ${P.ok("Creating directory")}`),pi(r,{recursive:!0}),console.info(`\u{1F4C1} ${P.ok("Finished creating directory")}`),ni(e,r),Fs(r,o),console.info(`\u{1F680} ${P.ok(`Finished generating your app ${P.error(o)}`)}`),console.info(`\u{1F3E0} ${P.info(`cd ${o}`)}`),console.info(`\u{1F9EA} ${P.info("npm install")}`)}const Ns=e=>e.toLowerCase().split(/[\s|_]/).join("-"),ks=e=>e.match(/[^a-zA-Z0-9-\s]/g)?"App name should not contain special characters except hyphen (-)":!0,oi=`
102
102
  Usage: create-enchilada [OPTION]... [DIRECTORY]
103
103
 
104
104
  Create a new app. With no arguments,
@@ -121,4 +121,4 @@ Available templates:
121
121
  react-dev-typescript Tailwind + Linter + Tests
122
122
  react-rspack React + Rspack
123
123
  node-express Express + Sequelize + Linter + Tests
124
- `,ks=xs(ai.slice(2)),ui=async e=>{const r=e.template||e.t,o=e._[0],{help:t,h:s}=e;if(t||s)return console.info(hi),hi;if(!r||!o)try{const c=await ie([{type:"select",name:"category",message:"Select the type of project:",choices:Object.keys(ni).map(v=>({title:L(v),value:v}))}]);c.category||process.exit(0);const i=ni[c.category],b=await ie({type:"select",name:"subcategory",message:`Select the technology for ${c.category}:`,choices:Object.keys(i).map(v=>({title:L(v),value:v}))});b.subcategory||process.exit(0);const l=i[b.subcategory],a=await ie({type:"select",name:"template",message:`Select the template for ${b.subcategory}:`,choices:l});a.template||process.exit(0);const n=await ie({type:"text",name:"appName",message:P.typescript("Enter your app name"),initial:"my-app",format:v=>Fs(v),validate:v=>Ns(v)});n.appName||process.exit(0);const{template:m}=a,{appName:f}=n,h=z.join(process.cwd(),f),u=z.resolve(Dt(import.meta.url),"../../templates",`${m}`);li(u,h,f)}catch(c){console.error(P.error(c.message))}else try{const c=r,i=o,b=z.join(process.cwd(),i),l=z.resolve(Dt(import.meta.url),"../../templates",`${c}`);li(l,b,i)}catch(c){console.error(P.error(c.message))}return 0};ui(ks);export{ui as default};
124
+ `,Ls=xs(ai.slice(2)),li=(e,r)=>{const o=X.join(process.cwd(),r),t=X.resolve(ui(import.meta.url),"../../templates",`${e}`);js(t,o,r)},hi=async e=>{const r=e.template||e.t,o=e._[0],{help:t,h:s}=e;if(t||s)return console.info(oi),oi;if(!r||!o)try{const c=await ie([{type:"select",name:"category",message:"Select the type of project:",choices:Object.keys(si).map(f=>({title:L(f),value:f}))}]);c.category||process.exit(0);const i=si[c.category],b=await ie({type:"select",name:"subcategory",message:`Select the technology for ${c.category}:`,choices:Object.keys(i).map(f=>({title:L(f),value:f}))});b.subcategory||process.exit(0);const l=i[b.subcategory],a=await ie({type:"select",name:"template",message:`Select the template for ${b.subcategory}:`,choices:l});a.template||process.exit(0);const n=await ie({type:"text",name:"appName",message:P.typescript("Enter your app name"),initial:"my-app",format:f=>Ns(f),validate:f=>ks(f)});n.appName||process.exit(0),li(a.template,n.appName)}catch(c){console.error(P.error(c.message))}else try{li(r,o)}catch(c){console.error(P.error(c.message))}return 0};hi(Ls);export{hi as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-enchilada",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "A quick way to start your web applications.",
6
6
  "main": "index.js",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "preferGlobal": true,
44
44
  "engines": {
45
- "node": "^18.0.0 || >=20.0.0"
45
+ "node": ">=20.19.0"
46
46
  },
47
47
  "files": [
48
48
  "index.js",
@@ -56,12 +56,12 @@
56
56
  },
57
57
  "homepage": "https://github.com/Sharmaz/enchilada#readme",
58
58
  "devDependencies": {
59
- "@eslint/js": "^9.29.0",
59
+ "@eslint/js": "^10.0.0",
60
60
  "@jest/globals": "^30.0.2",
61
61
  "@rollup/plugin-commonjs": "^28.0.6",
62
62
  "@rollup/plugin-node-resolve": "^16.0.1",
63
63
  "cli-prompts-test": "^0.3.0",
64
- "eslint": "^9.29.0",
64
+ "eslint": "^10.0.0",
65
65
  "execa": "^9.2.0",
66
66
  "globals": "^16.2.0",
67
67
  "jest": "^30.0.2",
@@ -32,9 +32,9 @@
32
32
  "uuid": "^10.0.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@eslint/js": "^9.11.1",
35
+ "@eslint/js": "^9.26.0",
36
36
  "@jest/globals": "^29.7.0",
37
- "eslint": "^9.11.1",
37
+ "eslint": "^9.26.0",
38
38
  "globals": "^15.9.0",
39
39
  "jest": "^29.7.0",
40
40
  "nodemon": "^3.1.7",
@@ -16,9 +16,9 @@
16
16
  "react-dom": "^19.1.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@babel/plugin-transform-runtime": "^7.24.7",
20
- "@babel/preset-env": "^7.24.7",
21
- "@babel/preset-react": "^7.24.7",
19
+ "@babel/plugin-transform-runtime": "^7.26.10",
20
+ "@babel/preset-env": "^7.26.10",
21
+ "@babel/preset-react": "^7.26.10",
22
22
  "@eslint/js": "^9.26.0",
23
23
  "@tailwindcss/postcss": "^4.1.5",
24
24
  "@testing-library/dom": "^10.1.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "react-ts-tw-lint-test",
2
+ "name": "react-dev-typescript",
3
3
  "private": true,
4
4
  "version": "0.0.0",
5
5
  "type": "module",
@@ -16,10 +16,10 @@
16
16
  "react-dom": "^19.1.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@babel/plugin-transform-runtime": "^7.24.7",
20
- "@babel/preset-env": "^7.24.7",
21
- "@babel/preset-react": "^7.24.7",
22
- "@babel/preset-typescript": "^7.24.7",
19
+ "@babel/plugin-transform-runtime": "^7.26.10",
20
+ "@babel/preset-env": "^7.26.10",
21
+ "@babel/preset-react": "^7.26.10",
22
+ "@babel/preset-typescript": "^7.26.10",
23
23
  "@eslint/js": "^9.26.0",
24
24
  "@tailwindcss/postcss": "^4.1.5",
25
25
  "@testing-library/dom": "^10.3.1",
@@ -37,7 +37,7 @@
37
37
  "jest-environment-jsdom": "^30.0.0",
38
38
  "postcss": "^8.5.3",
39
39
  "tailwindcss": "^4.1.5",
40
- "typescript": "5.2.2",
40
+ "typescript": "^5.8.3",
41
41
  "typescript-eslint": "^8.31.1",
42
42
  "vite": "npm:rolldown-vite@latest"
43
43
  }
@@ -14,10 +14,10 @@
14
14
  "react-dom": "^19.1.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@babel/core": "^7.24.7",
18
- "@babel/plugin-transform-runtime": "^7.24.7",
19
- "@babel/preset-env": "^7.24.7",
20
- "@babel/preset-react": "^7.24.7",
17
+ "@babel/core": "^7.26.10",
18
+ "@babel/plugin-transform-runtime": "^7.26.10",
19
+ "@babel/preset-env": "^7.26.10",
20
+ "@babel/preset-react": "^7.26.10",
21
21
  "@eslint/js": "^9.26.0",
22
22
  "@tailwindcss/postcss": "^4.1.5",
23
23
  "@testing-library/dom": "^10.3.1",
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "react-ts",
2
+ "name": "react-typescript",
3
3
  "private": true,
4
4
  "version": "0.0.0",
5
5
  "type": "module",
@@ -15,11 +15,11 @@
15
15
  "react-dom": "^19.1.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@eslint/js": "^9.24.0",
18
+ "@eslint/js": "^9.26.0",
19
19
  "@types/react": "^19.1.2",
20
20
  "@types/react-dom": "^19.1.2",
21
21
  "@vitejs/plugin-react-oxc": "^0.2.2",
22
- "eslint": "^9.24.0",
22
+ "eslint": "^9.26.0",
23
23
  "eslint-plugin-react": "^7.37.5",
24
24
  "globals": "^16.0.0",
25
25
  "typescript": "^5.8.3",
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "presets": [
3
+ "@babel/preset-env",
3
4
  ["@babel/preset-react", {"runtime": "automatic"}]
4
5
  ],
5
6
  "plugins": ["@babel/plugin-transform-runtime"]
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "minimal-react-webpack",
2
+ "name": "react-webpack",
3
3
  "private": true,
4
4
  "version": "0.0.0",
5
5
  "scripts": {
@@ -13,6 +13,7 @@
13
13
  "devDependencies": {
14
14
  "@babel/core": "^7.26.10",
15
15
  "@babel/plugin-transform-runtime": "^7.26.10",
16
+ "@babel/preset-env": "^7.26.10",
16
17
  "@babel/preset-react": "^7.26.3",
17
18
  "babel-loader": "^10.0.0",
18
19
  "css-loader": "^7.1.2",
@@ -1,89 +0,0 @@
1
- # compiled output
2
- /dist
3
- /tmp
4
- /out-tsc
5
-
6
- # Runtime data
7
- pids
8
- *.pid
9
- *.seed
10
- *.pid.lock
11
-
12
- # Directory for instrumented libs generated by jscoverage/JSCover
13
- lib-cov
14
-
15
- # Coverage directory used by tools like istanbul
16
- coverage
17
-
18
- # nyc test coverage
19
- .nyc_output
20
-
21
- # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
22
- .grunt
23
-
24
- # Bower dependency directory (https://bower.io/)
25
- bower_components
26
-
27
- # node-waf configuration
28
- .lock-wscript
29
-
30
- # IDEs and editors
31
- .idea
32
- .project
33
- .classpath
34
- .c9/
35
- *.launch
36
- .settings/
37
- *.sublime-workspace
38
-
39
- # IDE - VSCode
40
- .vscode/*
41
- !.vscode/settings.json
42
- !.vscode/tasks.json
43
- !.vscode/launch.json
44
- !.vscode/extensions.json
45
-
46
- # misc
47
- .sass-cache
48
- connect.lock
49
- typings
50
-
51
- # Logs
52
- logs
53
- *.log
54
- npm-debug.log*
55
- yarn-debug.log*
56
- yarn-error.log*
57
-
58
-
59
- # Dependency directories
60
- node_modules/
61
- jspm_packages/
62
-
63
- # Optional npm cache directory
64
- .npm
65
-
66
- # Optional eslint cache
67
- .eslintcache
68
-
69
- # Optional REPL history
70
- .node_repl_history
71
-
72
- # Output of 'npm pack'
73
- *.tgz
74
-
75
- # Yarn Integrity file
76
- .yarn-integrity
77
-
78
- # dotenv environment variables file
79
- .env
80
-
81
- # next.js build output
82
- .next
83
-
84
- # Lerna
85
- lerna-debug.log
86
-
87
- # System Files
88
- .DS_Store
89
- Thumbs.db
@@ -1,5 +0,0 @@
1
- import { defineConfig } from '@farmfe/core';
2
-
3
- export default defineConfig({
4
- plugins: ['@farmfe/plugin-react']
5
- });
@@ -1,12 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="#" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- </head>
8
- <body>
9
- <div id="root"></div>
10
- <script type="module" src="/src/main.jsx"></script>
11
- </body>
12
- </html>
@@ -1,12 +0,0 @@
1
- {
2
- "env": {
3
- "browser": true
4
- },
5
- "globals": {
6
- "foo": "readonly"
7
- },
8
- "settings": {},
9
- "rules": {
10
- "eqeqeq": "warn"
11
- }
12
- }
@@ -1,28 +0,0 @@
1
- {
2
- "name": "react-experimental",
3
- "private": true,
4
- "version": "0.0.0",
5
- "type": "module",
6
- "scripts": {
7
- "dev": "farm start",
8
- "start": "farm start",
9
- "build": "farm build",
10
- "preview": "farm preview",
11
- "clean": "farm clean",
12
- "lint": "oxlint -c oxlintrc.json ./src"
13
- },
14
- "dependencies": {
15
- "react": "^19.1.0",
16
- "react-dom": "^19.1.0"
17
- },
18
- "devDependencies": {
19
- "@farmfe/cli": "^1.0.4",
20
- "@farmfe/core": "^1.7.4",
21
- "@farmfe/plugin-react": "^1.2.6",
22
- "@types/react": "^19.1.2",
23
- "@types/react-dom": "^19.1.3",
24
- "core-js": "^3.42.0",
25
- "oxlint": "^0.16.9",
26
- "react-refresh": "^0.17.0"
27
- }
28
- }
@@ -1,3 +0,0 @@
1
- .card {
2
- padding: 2em;
3
- }
@@ -1,20 +0,0 @@
1
- import { useState } from 'react'
2
- import './App.css'
3
-
4
- function App() {
5
- const [count, setCount] = useState(0)
6
-
7
- return (
8
- <>
9
- <title>{`React ${count}`}</title>
10
- <h1>React</h1>
11
- <div className="card">
12
- <button onClick={() => setCount((count) => count + 1)}>
13
- count is {count}
14
- </button>
15
- </div>
16
- </>
17
- )
18
- }
19
-
20
- export default App
@@ -1,57 +0,0 @@
1
- :root {
2
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3
- line-height: 1.5;
4
- font-weight: 400;
5
-
6
- color-scheme: light dark;
7
- color: rgba(255, 255, 255, 0.87);
8
- background-color: #242424;
9
-
10
- font-synthesis: none;
11
- text-rendering: optimizeLegibility;
12
- -webkit-font-smoothing: antialiased;
13
- -moz-osx-font-smoothing: grayscale;
14
- }
15
- body {
16
- margin: 0;
17
- display: flex;
18
- justify-content: center;
19
- place-items: center;
20
- min-width: 320px;
21
- min-height: 100vh;
22
- }
23
- h1 {
24
- font-size: 3.2em;
25
- line-height: 1.1;
26
- text-align: center;
27
- }
28
- button {
29
- border-radius: 8px;
30
- border: 1px solid transparent;
31
- padding: 0.6em 1.2em;
32
- font-size: 1em;
33
- font-weight: 500;
34
- font-family: inherit;
35
- background-color: #1a1a1a;
36
- cursor: pointer;
37
- transition: border-color 0.25s;
38
- }
39
- button:hover {
40
- border-color: #646cff;
41
- }
42
- button:focus,
43
- button:focus-visible {
44
- outline: 4px auto -webkit-focus-ring-color;
45
- }
46
- @media (prefers-color-scheme: light) {
47
- :root {
48
- color: #213547;
49
- background-color: #ffffff;
50
- }
51
- a:hover {
52
- color: #747bff;
53
- }
54
- button {
55
- background-color: #f9f9f9;
56
- }
57
- }
@@ -1,10 +0,0 @@
1
- import React from 'react'
2
- import ReactDOM from 'react-dom/client'
3
- import App from './App.jsx'
4
- import './index.css'
5
-
6
- ReactDOM.createRoot(document.getElementById('root')).render(
7
- <React.StrictMode>
8
- <App />
9
- </React.StrictMode>,
10
- )
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "useDefineForClassFields": true,
5
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
- "module": "ESNext",
7
- "skipLibCheck": true,
8
-
9
- /* Bundler mode */
10
- "moduleResolution": "bundler",
11
- "allowImportingTsExtensions": true,
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "noEmit": true,
15
- "jsx": "react-jsx",
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "noFallthroughCasesInSwitch": true
22
- },
23
- "include": ["src"],
24
- "references": [{ "path": "./tsconfig.node.json" }]
25
- }
@@ -1,11 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "allowSyntheticDefaultImports": true,
8
- "strict": true
9
- },
10
- "include": ["farm.config.ts"]
11
- }