npm-check-updates
Version:
Find newer versions of dependencies than what your package.json allows
48 lines • 1.16 MB
JavaScript
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Ee=require("node:path"),YC=require("node:readline"),St=require("node:events"),k_=require("node:child_process"),Ze=require("node:fs"),at=require("node:os"),tr=require("node:util"),Ie=require("node:fs/promises"),tt=require("node:url"),Ls=require("node:http"),ep=require("node:https"),P_=require("node:assert"),tp=require("node:buffer"),kt=require("node:stream"),Ji=require("node:string_decoder"),L_=require("node:zlib"),KC=require("node:path/win32"),N_=require("node:module"),rp=require("node:dns"),M_=require("node:crypto"),$r=require("node:net"),Ns=require("node:tls"),j_=require("node:tty"),ZC=require("node:timers/promises"),JC=require("node:querystring"),XC=require("node:stream/consumers");var qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function QC(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var o=function i(){var s=!1;try{s=this instanceof i}catch{}return s?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};o.prototype=r.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(o,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),o}var yo={},vo,yg;function Pt(){if(yg)return vo;yg=1;let e,r,o,i,s=!0;typeof process<"u"&&({FORCE_COLOR:e,NODE_DISABLE_COLORS:r,NO_COLOR:o,TERM:i}=process.env||{},s=process.stdout&&process.stdout.isTTY);const t={enabled:!r&&o==null&&i!=="dumb"&&(e!=null&&e!=="0"||s),reset:a(0,0),bold:a(1,22),dim:a(2,22),italic:a(3,23),underline:a(4,24),inverse:a(7,27),hidden:a(8,28),strikethrough:a(9,29),black:a(30,39),red:a(31,39),green:a(32,39),yellow:a(33,39),blue:a(34,39),magenta:a(35,39),cyan:a(36,39),white:a(37,39),gray:a(90,39),grey:a(90,39),bgBlack:a(40,49),bgRed:a(41,49),bgGreen:a(42,49),bgYellow:a(43,49),bgBlue:a(44,49),bgMagenta:a(45,49),bgCyan:a(46,49),bgWhite:a(47,49)};function n(l,h){let p=0,f,u="",d="";for(;p<l.length;p++)f=l[p],u+=f.open,d+=f.close,~h.indexOf(f.close)&&(h=h.replace(f.rgx,f.close+f.open));return u+h+d}function c(l,h){let p={has:l,keys:h};return p.reset=t.reset.bind(p),p.bold=t.bold.bind(p),p.dim=t.dim.bind(p),p.italic=t.italic.bind(p),p.underline=t.underline.bind(p),p.inverse=t.inverse.bind(p),p.hidden=t.hidden.bind(p),p.strikethrough=t.strikethrough.bind(p),p.black=t.black.bind(p),p.red=t.red.bind(p),p.green=t.green.bind(p),p.yellow=t.yellow.bind(p),p.blue=t.blue.bind(p),p.magenta=t.magenta.bind(p),p.cyan=t.cyan.bind(p),p.white=t.white.bind(p),p.gray=t.gray.bind(p),p.grey=t.grey.bind(p),p.bgBlack=t.bgBlack.bind(p),p.bgRed=t.bgRed.bind(p),p.bgGreen=t.bgGreen.bind(p),p.bgYellow=t.bgYellow.bind(p),p.bgBlue=t.bgBlue.bind(p),p.bgMagenta=t.bgMagenta.bind(p),p.bgCyan=t.bgCyan.bind(p),p.bgWhite=t.bgWhite.bind(p),p}function a(l,h){let p={open:`\x1B[${l}m`,close:`\x1B[${h}m`,rgx:new RegExp(`\\x1b\\[${h}m`,"g")};return function(f){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(l)||(this.has.push(l),this.keys.push(p)),f===void 0?this:t.enabled?n(this.keys,f+""):f+""):f===void 0?c([l],[p]):t.enabled?n([p],f+""):f+""}}return vo=t,vo}var bo,vg;function eR(){return vg||(vg=1,bo=(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}}),bo}var Do,bg;function ip(){return bg||(bg=1,Do=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}),Do}var Eo,Dg;function Lt(){if(Dg)return Eo;Dg=1;const e="\x1B",r=`${e}[`,o="\x07",i={to(n,c){return c?`${r}${c+1};${n+1}H`:`${r}${n+1}G`},move(n,c){let a="";return n<0?a+=`${r}${-n}D`:n>0&&(a+=`${r}${n}C`),c<0?a+=`${r}${-c}A`:c>0&&(a+=`${r}${c}B`),a},up:(n=1)=>`${r}${n}A`,down:(n=1)=>`${r}${n}B`,forward:(n=1)=>`${r}${n}C`,backward:(n=1)=>`${r}${n}D`,nextLine:(n=1)=>`${r}E`.repeat(n),prevLine:(n=1)=>`${r}F`.repeat(n),left:`${r}G`,hide:`${r}?25l`,show:`${r}?25h`,save:`${e}7`,restore:`${e}8`},s={up:(n=1)=>`${r}S`.repeat(n),down:(n=1)=>`${r}T`.repeat(n)},t={screen:`${r}2J`,up:(n=1)=>`${r}1J`.repeat(n),down:(n=1)=>`${r}J`.repeat(n),line:`${r}2K`,lineEnd:`${r}K`,lineStart:`${r}1K`,lines(n){let c="";for(let a=0;a<n;a++)c+=this.line+(a<n-1?i.up():"");return n&&(c+=i.left),c}};return Eo={cursor:i,scroll:s,erase:t,beep:o},Eo}var wo,Eg;function tR(){if(Eg)return wo;Eg=1;const e=ip(),{erase:r,cursor:o}=Lt(),i=s=>[...e(s)].length;return wo=function(s,t){if(!t)return r.line+o.to(0);let n=0;const c=s.split(/\r?\n/);for(let a of c)n+=1+Math.floor(Math.max(i(a)-1,0)/t);return r.lines(n)},wo}var _o,wg;function q_(){if(wg)return _o;wg=1;const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};return _o=process.platform==="win32"?r:e,_o}var So,_g;function rR(){if(_g)return So;_g=1;const e=Pt(),r=q_(),o=Object.freeze({password:{scale:1,render:a=>"*".repeat(a.length)},emoji:{scale:2,render:a=>"😃".repeat(a.length)},invisible:{scale:0,render:a=>""},default:{scale:1,render:a=>`${a}`}}),i=a=>o[a]||o.default,s=Object.freeze({aborted:e.red(r.cross),done:e.green(r.tick),exited:e.yellow(r.cross),default:e.cyan("?")});return So={styles:o,render:i,symbols:s,symbol:(a,l,h)=>l?s.aborted:h?s.exited:a?s.done:s.default,delimiter:a=>e.gray(a?r.ellipsis:r.pointerSmall),item:(a,l)=>e.gray(a?l?r.pointerSmall:"+":r.line)},So}var Ao,Sg;function iR(){if(Sg)return Ao;Sg=1;const e=ip();return Ao=function(r,o){let i=String(e(r)||"").split(/\r?\n/);return o?i.map(s=>Math.ceil(s.length/o)).reduce((s,t)=>s+t):i.length},Ao}var Co,Ag;function nR(){return Ag||(Ag=1,Co=(e,r={})=>{const o=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"",i=r.width;return(e||"").split(/\r?\n/g).map(s=>s.split(/\s+/g).reduce((t,n)=>(n.length+o.length>=i||t[t.length-1].length+n.length+1<i?t[t.length-1]+=` ${n}`:t.push(`${o}${n}`),t),[o]).join(`
`)).join(`
`)}),Co}var Ro,Cg;function sR(){return Cg||(Cg=1,Ro=(e,r,o)=>{o=o||r;let i=Math.min(r-o,e-Math.floor(o/2));i<0&&(i=0);let s=Math.min(i+o,r);return{startIndex:i,endIndex:s}}),Ro}var xo,Rg;function Ht(){return Rg||(Rg=1,xo={action:eR(),clear:tR(),style:rR(),strip:ip(),figures:q_(),lines:iR(),wrap:nR(),entriesToDisplay:sR()}),xo}var Fo,xg;function cr(){if(xg)return Fo;xg=1;const e=YC,{action:r}=Ht(),o=St,{beep:i,cursor:s}=Lt(),t=Pt();class n extends o{constructor(a={}){super(),this.firstRender=!0,this.in=a.stdin||process.stdin,this.out=a.stdout||process.stdout,this.onRender=(a.onRender||(()=>{})).bind(this);const l=e.createInterface({input:this.in,escapeCodeTimeout:50});e.emitKeypressEvents(this.in,l),this.in.isTTY&&this.in.setRawMode(!0);const h=(p,f)=>{let u=r(f,this.isSelect);u===!1?this._&&this._(p,f):typeof this[u]=="function"?this[u](f):this.bell()};this.close=()=>{this.out.write(s.show),this.in.removeListener("keypress",h),this.in.isTTY&&this.in.setRawMode(!1),l.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(i)}render(){this.onRender(t),this.firstRender&&(this.firstRender=!1)}}return Fo=n,Fo}var Oo,Fg;function oR(){if(Fg)return Oo;Fg=1;const e=Pt(),r=cr(),{erase:o,cursor:i}=Lt(),{style:s,clear:t,lines:n,figures:c}=Ht();class a extends r{constructor(h={}){super(h),this.transform=s.render(h.style),this.scale=this.transform.scale,this.msg=h.message,this.initial=h.initial||"",this.validator=h.validate||(()=>!0),this.value="",this.errorMsg=h.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=t("",this.out.columns),this.render()}set value(h){!h&&this.initial?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(h)),this._value=h,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(`
`),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(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(`
`),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(h){this.placeholder||(this.cursor=this.cursor+h,this.cursorOffset+=h)}_(h,p){let f=this.value.slice(0,this.cursor),u=this.value.slice(this.cursor);this.value=`${f}${h}${u}`,this.red=!1,this.cursor=this.placeholder?0:f.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let h=this.value.slice(0,this.cursor-1),p=this.value.slice(this.cursor);this.value=`${h}${p}`,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 h=this.value.slice(0,this.cursor),p=this.value.slice(this.cursor+1);this.value=`${h}${p}`,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)+t(this.outputError,this.out.columns)),this.out.write(t(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(`
`).reduce((h,p,f)=>h+`
${f?" ":c.pointerSmall} ${e.red().italic(p)}`,"")),this.out.write(o.line+i.to(0)+this.outputText+i.save+this.outputError+i.restore+i.move(this.cursorOffset,0)))}}return Oo=a,Oo}var To,Og;function aR(){if(Og)return To;Og=1;const e=Pt(),r=cr(),{style:o,clear:i,figures:s,wrap:t,entriesToDisplay:n}=Ht(),{cursor:c}=Lt();class a extends r{constructor(h={}){super(h),this.isSelect=!0,this.msg=h.message,this.hint=h.hint||"- Use arrow-keys. Return to submit.",this.warn=h.warn||"- This option is disabled",this.cursor=h.initial||0,this.choices=h.choices.map((p,f)=>(typeof p=="string"&&(p={title:p,value:f}),{title:p&&(p.title||p.value||p),value:p&&(p.value===void 0?f:p.value),description:p&&p.description,selected:p&&p.selected,disabled:p&&p.disabled})),this.optionsPerPage=h.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=i("",this.out.columns),this.render()}moveCursor(h){this.cursor=h,this.value=this.choices[h].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(`
`),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),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()}_(h,p){if(h===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(c.hide):this.out.write(i(this.outputText,this.out.columns)),super.render();let{startIndex:h,endIndex:p}=n(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+=`
`;for(let f=h;f<p;f++){let u,d,g="",m=this.choices[f];f===h&&h>0?d=s.arrowUp:f===p-1&&p<this.choices.length?d=s.arrowDown:d=" ",m.disabled?(u=this.cursor===f?e.gray().underline(m.title):e.strikethrough().gray(m.title),d=(this.cursor===f?e.bold().gray(s.pointer)+" ":" ")+d):(u=this.cursor===f?e.cyan().underline(m.title):m.title,d=(this.cursor===f?e.cyan(s.pointer)+" ":" ")+d,m.description&&this.cursor===f&&(g=` - ${m.description}`,(d.length+u.length+g.length>=this.out.columns||m.description.split(/\r?\n/).length>1)&&(g=`
`+t(m.description,{margin:3,width:this.out.columns})))),this.outputText+=`${d} ${u}${e.gray(g)}
`}}this.out.write(this.outputText)}}return To=a,To}var Io,Tg;function uR(){if(Tg)return Io;Tg=1;const e=Pt(),r=cr(),{style:o,clear:i}=Ht(),{cursor:s,erase:t}=Lt();class n extends r{constructor(a={}){super(a),this.msg=a.message,this.value=!!a.initial,this.active=a.active||"on",this.inactive=a.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(`
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),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()}_(a,l){if(a===" ")this.value=!this.value;else if(a==="1")this.value=!0;else if(a==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(s.hide):this.out.write(i(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(t.line+s.to(0)+this.outputText))}}return Io=n,Io}var $o,Ig;function rr(){if(Ig)return $o;Ig=1;class e{constructor({token:o,date:i,parts:s,locales:t}){this.token=o,this.date=i||new Date,this.parts=s||[this],this.locales=t||{}}up(){}down(){}next(){const o=this.parts.indexOf(this);return this.parts.find((i,s)=>s>o&&i instanceof e)}setTo(o){}prev(){let o=[].concat(this.parts).reverse();const i=o.indexOf(this);return o.find((s,t)=>t>i&&s instanceof e)}toString(){return String(this.date)}}return $o=e,$o}var Bo,$g;function cR(){if($g)return Bo;$g=1;const e=rr();class r extends e{constructor(i={}){super(i)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let i=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?i.toUpperCase():i}}return Bo=r,Bo}var ko,Bg;function lR(){if(Bg)return ko;Bg=1;const e=rr(),r=i=>(i=i%10,i===1?"st":i===2?"nd":i===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(),t=this.date.getDay();return this.token==="DD"?String(s).padStart(2,"0"):this.token==="Do"?s+r(s):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:s}}return ko=o,ko}var Po,kg;function hR(){if(kg)return Po;kg=1;const e=rr();class r extends e{constructor(i={}){super(i)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(i){this.date.setHours(parseInt(i.substr(-2)))}toString(){let i=this.date.getHours();return/h/.test(this.token)&&(i=i%12||12),this.token.length>1?String(i).padStart(2,"0"):i}}return Po=r,Po}var Lo,Pg;function fR(){if(Pg)return Lo;Pg=1;const e=rr();class r extends e{constructor(i={}){super(i)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(i){this.date.setMilliseconds(parseInt(i.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}return Lo=r,Lo}var No,Lg;function dR(){if(Lg)return No;Lg=1;const e=rr();class r extends e{constructor(i={}){super(i)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(i){this.date.setMinutes(parseInt(i.substr(-2)))}toString(){let i=this.date.getMinutes();return this.token.length>1?String(i).padStart(2,"0"):i}}return No=r,No}var Mo,Ng;function pR(){if(Ng)return Mo;Ng=1;const e=rr();class r extends e{constructor(i={}){super(i)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(i){i=parseInt(i.substr(-2))-1,this.date.setMonth(i<0?0:i)}toString(){let i=this.date.getMonth(),s=this.token.length;return s===2?String(i+1).padStart(2,"0"):s===3?this.locales.monthsShort[i]:s===4?this.locales.months[i]:String(i+1)}}return Mo=r,Mo}var jo,Mg;function gR(){if(Mg)return jo;Mg=1;const e=rr();class r extends e{constructor(i={}){super(i)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(i){this.date.setSeconds(parseInt(i.substr(-2)))}toString(){let i=this.date.getSeconds();return this.token.length>1?String(i).padStart(2,"0"):i}}return jo=r,jo}var qo,jg;function mR(){if(jg)return qo;jg=1;const e=rr();class r extends e{constructor(i={}){super(i)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(i){this.date.setFullYear(i.substr(-4))}toString(){let i=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?i.substr(-2):i}}return qo=r,qo}var Uo,qg;function yR(){return qg||(qg=1,Uo={DatePart:rr(),Meridiem:cR(),Day:lR(),Hours:hR(),Milliseconds:fR(),Minutes:dR(),Month:pR(),Seconds:gR(),Year:mR()}),Uo}var Ho,Ug;function vR(){if(Ug)return Ho;Ug=1;const e=Pt(),r=cr(),{style:o,clear:i,figures:s}=Ht(),{erase:t,cursor:n}=Lt(),{DatePart:c,Meridiem:a,Day:l,Hours:h,Milliseconds:p,Minutes:f,Month:u,Seconds:d,Year:g}=yR(),m=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,y={1:({token:b})=>b.replace(/\\(.)/g,"$1"),2:b=>new l(b),3:b=>new u(b),4:b=>new g(b),5:b=>new a(b),6:b=>new h(b),7:b=>new f(b),8:b=>new d(b),9:b=>new p(b)},D={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 v extends r{constructor(E={}){super(E),this.msg=E.message,this.cursor=0,this.typed="",this.locales=Object.assign(D,E.locales),this._date=E.initial||new Date,this.errorMsg=E.error||"Please Enter A Valid Value",this.validator=E.validate||(()=>!0),this.mask=E.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(E){E&&this._date.setTime(E.getTime())}set mask(E){let S;for(this.parts=[];S=m.exec(E);){let C=S.shift(),F=S.findIndex($=>$!=null);this.parts.push(F in y?y[F]({token:S[F]||C,date:this.date,parts:this.parts,locales:this.locales}):S[F]||C)}let A=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(...A),this.reset()}moveCursor(E){this.typed="",this.cursor=E,this.fire()}reset(){this.moveCursor(this.parts.findIndex(E=>E instanceof c)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}async validate(){let E=await this.validator(this.value);typeof E=="string"&&(this.errorMsg=E,E=!1),this.error=!E}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(`
`),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let E=this.parts[this.cursor].prev();if(E==null)return this.bell();this.moveCursor(this.parts.indexOf(E)),this.render()}right(){let E=this.parts[this.cursor].next();if(E==null)return this.bell();this.moveCursor(this.parts.indexOf(E)),this.render()}next(){let E=this.parts[this.cursor].next();this.moveCursor(E?this.parts.indexOf(E):this.parts.findIndex(S=>S instanceof c)),this.render()}_(E){/\d/.test(E)&&(this.typed+=E,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=[o.symbol(this.done,this.aborted),e.bold(this.msg),o.delimiter(!1),this.parts.reduce((E,S,A)=>E.concat(A===this.cursor&&!this.done?e.cyan().underline(S.toString()):S),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
`).reduce((E,S,A)=>E+`
${A?" ":s.pointerSmall} ${e.red().italic(S)}`,"")),this.out.write(t.line+n.to(0)+this.outputText))}}return Ho=v,Ho}var Go,Hg;function bR(){if(Hg)return Go;Hg=1;const e=Pt(),r=cr(),{cursor:o,erase:i}=Lt(),{style:s,figures:t,clear:n,lines:c}=Ht(),a=/[0-9]/,l=f=>f!==void 0,h=(f,u)=>{let d=Math.pow(10,u);return Math.round(f*d)/d};class p extends r{constructor(u={}){super(u),this.transform=s.render(u.style),this.msg=u.message,this.initial=l(u.initial)?u.initial:"",this.float=!!u.float,this.round=u.round||2,this.inc=u.increment||1,this.min=l(u.min)?u.min:-1/0,this.max=l(u.max)?u.max:1/0,this.errorMsg=u.error||"Please Enter A Valid Value",this.validator=u.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(u){!u&&u!==0?(this.placeholder=!0,this.rendered=e.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${h(u,this.round)}`),this._value=h(u,this.round)),this.fire()}get value(){return this._value}parse(u){return this.float?parseFloat(u):parseInt(u)}valid(u){return u==="-"||u==="."&&this.float||a.test(u)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let u=this.value;this.value=u!==""?u:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}async validate(){let u=await this.validator(this.value);typeof u=="string"&&(this.errorMsg=u,u=!1),this.error=!u}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let u=this.value;this.value=u!==""?u:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
`),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 u=this.value.toString();if(u.length===0)return this.bell();this.value=this.parse(u=u.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()}_(u,d){if(!this.valid(u))return this.bell();const g=Date.now();if(g-this.lastHit>1e3&&(this.typed=""),this.typed+=u,this.lastHit=g,this.color="cyan",u===".")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(c(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=[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(`
`).reduce((u,d,g)=>u+`
${g?" ":t.pointerSmall} ${e.red().italic(d)}`,"")),this.out.write(i.line+o.to(0)+this.outputText+o.save+this.outputError+o.restore))}}return Go=p,Go}var Wo,Gg;function U_(){if(Gg)return Wo;Gg=1;const e=Pt(),{cursor:r}=Lt(),o=cr(),{clear:i,figures:s,style:t,wrap:n,entriesToDisplay:c}=Ht();class a extends o{constructor(h={}){super(h),this.isSelect=!0,this.msg=h.message,this.cursorStart=h.choices.findIndex(p=>!p.heading),this.cursor=h.cursor||this.cursorStart,this.scrollIndex=h.cursor||0,this.hint=h.hint||"",this.warn=h.warn||"- This option is disabled -",this.minSelected=h.min,this.showMinError=!1,this.maxChoices=h.max,this.instructions=h.instructions,this.optionsPerPage=h.optionsPerPage||10,this.value=h.choices.map((p,f)=>(typeof p=="string"&&(p={title:p,value:f}),{title:p&&(p.title||p.value||p),description:p&&p.description,value:p&&(p.value===void 0?f:p.value),selected:p&&p.selected,disabled:p&&p.disabled,heading:p&&p.heading})),this.clear=i("",this.out.columns),h.overrideRender||this.render()}reset(){this.value.map(h=>!h.selected),this.cursor=this.cursorStart,this.fire(),this.render()}selected(){return this.value.filter(h=>h.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
`),this.close()}submit(){const h=this.value.filter(p=>p.selected);this.minSelected&&h.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),this.close())}first(){this.cursor=this.cursorStart,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.value[this.cursor].heading&&this.next(),this.render()}up(){this.cursor===this.cursorStart?this.cursor=this.value.length-1:this.cursor--,this.value[this.cursor].heading&&this.up(),this.render()}down(){this.cursor===this.value.length-1?this.cursor=this.cursorStart:this.cursor++,this.value[this.cursor].heading&&this.down(),this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(h=>h.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const h=this.value[this.cursor];if(h.selected)h.selected=!1,this.render();else{if(h.disabled||this.value.filter(p=>p.selected).length>=this.maxChoices)return this.bell();h.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const h=!this.value[this.cursor].selected;this.value.filter(p=>!p.disabled&&!p.heading).forEach(p=>p.selected=h),this.render()}_(h,p){if(h===" ")this.handleSpaceToggle();else if(h==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
Instructions:
${s.arrowUp}/${s.arrowDown}: Highlight option
${s.arrowLeft}/${s.arrowRight}/[space]: Toggle selection
`+(this.maxChoices===void 0?` a: Toggle all
`:"")+" enter/return: Complete answer":""}renderOption(h,p,f,u){const d=(h===f?"❯ ":" ")+(p.selected?e.green(s.radioOn):s.radioOff)+" ";let g,m;if(p.disabled)g=h===f?e.gray(p.title):e.strikethrough().gray(p.title);else{if(p.heading)return g=p.title,g+e.gray(m||"");g=p.title,h===f&&p.description&&(m=` - ${p.description}`,(d.length+g.length+m.length>=this.out.columns||p.description.split(/\r?\n/).length>1)&&(m=`
`+n(p.description,{margin:d.length,width:this.out.columns})))}return d+g+e.gray(m||"")}paginateOptions(h){if(h.length===0)return e.red("No matches for this query.");let{startIndex:p,endIndex:f}=c(this.cursor,h.length,this.optionsPerPage),u,d=[];for(let g=p;g<f;g++)g===p&&p>0?u=s.arrowUp:g===f-1&&f<h.length?u=s.arrowDown:u=" ",d.push(this.renderOption(this.cursor,h[g],g,u));return`
`+d.join(`
`)}renderOptions(h){return this.done?"":this.paginateOptions(h)}renderDoneOrInstructions(){if(this.done)return"";const h=[e.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&h.push(e.yellow(this.warn)),h.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let h=[t.symbol(this.done,this.aborted),e.bold(this.msg),t.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(h+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),h+=this.renderOptions(this.value),this.out.write(this.clear+h),this.clear=i(h,this.out.columns)}}return Wo=a,Wo}var zo,Wg;function DR(){if(Wg)return zo;Wg=1;const e=Pt(),r=cr(),{erase:o,cursor:i}=Lt(),{style:s,clear:t,figures:n,wrap:c,entriesToDisplay:a}=Ht(),l=(u,d)=>u[d]&&(u[d].value||u[d].title||u[d]),h=(u,d)=>u[d]&&(u[d].title||u[d].value||u[d]),p=(u,d)=>{const g=u.findIndex(m=>m.value===d||m.title===d);return g>-1?g:void 0};class f extends r{constructor(d={}){super(d),this.msg=d.message,this.suggest=d.suggest,this.choices=d.choices,this.initial=typeof d.initial=="number"?d.initial:p(d.choices,d.initial),this.select=this.initial||d.cursor||0,this.i18n={noMatches:d.noMatches||"no matches found"},this.fallback=d.fallback||this.initial,this.clearFirst=d.clearFirst||!1,this.suggestions=[],this.input="",this.limit=d.limit||10,this.cursor=0,this.transform=s.render(d.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=t("",this.out.columns),this.complete(this.render),this.render()}set fallback(d){this._fb=Number.isSafeInteger(parseInt(d))?parseInt(d):d}get fallback(){let d;return typeof this._fb=="number"?d=this.choices[this._fb]:typeof this._fb=="string"&&(d={title:this._fb}),d||this._fb||{title:this.i18n.noMatches}}moveSelect(d){this.select=d,this.suggestions.length>0?this.value=l(this.suggestions,d):this.value=this.fallback.value,this.fire()}async complete(d){const g=this.completing=this.suggest(this.input,this.choices),m=await g;if(this.completing!==g)return;this.suggestions=m.map((D,v,b)=>({title:h(b,v),value:l(b,v),description:D.description})),this.completing=!1;const y=Math.max(m.length-1,0);this.moveSelect(Math.min(y,this.select)),d&&d()}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(`
`),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}_(d,g){let m=this.input.slice(0,this.cursor),y=this.input.slice(this.cursor);this.input=`${m}${d}${y}`,this.cursor=m.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let d=this.input.slice(0,this.cursor-1),g=this.input.slice(this.cursor);this.input=`${d}${g}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let d=this.input.slice(0,this.cursor),g=this.input.slice(this.cursor+1);this.input=`${d}${g}`,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(d,g,m,y){let D,v=m?n.arrowUp:y?n.arrowDown:" ",b=g?e.cyan().underline(d.title):d.title;return v=(g?e.cyan(n.pointer)+" ":" ")+v,d.description&&(D=` - ${d.description}`,(v.length+b.length+D.length>=this.out.columns||d.description.split(/\r?\n/).length>1)&&(D=`
`+c(d.description,{margin:3,width:this.out.columns}))),v+" "+b+e.gray(D||"")}render(){if(this.closed)return;this.firstRender?this.out.write(i.hide):this.out.write(t(this.outputText,this.out.columns)),super.render();let{startIndex:d,endIndex:g}=a(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 m=this.suggestions.slice(d,g).map((y,D)=>this.renderOption(y,this.select===D+d,D===0&&d>0,D+d===g-1&&g<this.choices.length)).join(`
`);this.outputText+=`
`+(m||e.gray(this.fallback.title))}this.out.write(o.line+i.to(0)+this.outputText)}}return zo=f,zo}var Vo,zg;function ER(){if(zg)return Vo;zg=1;const e=Pt(),{cursor:r}=Lt(),o=U_(),{clear:i,style:s,figures:t}=Ht();class n extends o{constructor(a={}){a.overrideRender=!0,super(a),this.inputValue="",this.clear=i("",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(a=>a.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 a=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(h=>this.inputValue?!!(typeof h.title=="string"&&h.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof h.value=="string"&&h.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);const l=this.filteredOptions.findIndex(h=>h===a);this.cursor=l<0?0:l,this.render()}handleSpaceToggle(){const a=this.filteredOptions[this.cursor];if(a.selected)a.selected=!1,this.render();else{if(a.disabled||this.value.filter(l=>l.selected).length>=this.maxChoices)return this.bell();a.selected=!0,this.render()}}handleInputChange(a){this.inputValue=this.inputValue+a,this.updateFilteredOptions()}_(a,l){a===" "?this.handleSpaceToggle():this.handleInputChange(a)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
Instructions:
${t.arrowUp}/${t.arrowDown}: Highlight option
${t.arrowLeft}/${t.arrowRight}/[space]: Toggle selection
[a,b,c]/delete: Filter choices
enter/return: Complete answer
`:""}renderCurrentInput(){return`
Filtered results for: ${this.inputValue?this.inputValue:e.gray("Enter something to filter")}
`}renderOption(a,l,h,p){const f=(l.selected?e.green(t.radioOn):t.radioOff)+" "+p+" ";let u;return l.disabled?u=a===h?e.gray().underline(l.title):e.strikethrough().gray(l.title):u=a===h?e.cyan().underline(l.title):l.title,f+u}renderDoneOrInstructions(){if(this.done)return this.value.filter(l=>l.selected).map(l=>l.title).join(", ");const a=[e.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&a.push(e.yellow(this.warn)),a.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let a=[s.symbol(this.done,this.aborted),e.bold(this.msg),s.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(a+=e.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),a+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+a),this.clear=i(a,this.out.columns)}}return Vo=n,Vo}var Yo,Vg;function wR(){if(Vg)return Yo;Vg=1;const e=Pt(),r=cr(),{style:o,clear:i}=Ht(),{erase:s,cursor:t}=Lt();class n extends r{constructor(a={}){super(a),this.msg=a.message,this.value=a.initial,this.initialValue=!!a.initial,this.yesMsg=a.yes||"yes",this.yesOption=a.yesOption||"(Y/n)",this.noMsg=a.no||"no",this.noOption=a.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(`
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
`),this.close()}_(a,l){return a.toLowerCase()==="y"?(this.value=!0,this.submit()):a.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){if(this.closed)return;this.firstRender?this.out.write(t.hide):this.out.write(i(this.outputText,this.out.columns)),super.render();const a=this.aborted||this.done&&!this.value;this.outputText=[o.symbol(this.done,a),e.bold(this.msg),o.delimiter(this.done),this.done?this.value&&!this.aborted?this.yesMsg:this.noMsg:e.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(s.line+t.to(0)+this.outputText)}}return Yo=n,Yo}var Ko,Yg;function _R(){return Yg||(Yg=1,Ko={TextPrompt:oR(),SelectPrompt:aR(),TogglePrompt:uR(),DatePrompt:vR(),NumberPrompt:bR(),MultiselectPrompt:U_(),AutocompletePrompt:DR(),AutocompleteMultiselectPrompt:ER(),ConfirmPrompt:wR()}),Ko}var Kg;function SR(){return Kg||(Kg=1,function(e){const r=e,o=_R(),i=n=>n;function s(n,c,a={}){return new Promise((l,h)=>{const p=new o[n](c),f=a.onAbort||i,u=a.onSubmit||i,d=a.onExit||i;p.on("state",c.onState||i),p.on("submit",g=>l(u(g))),p.on("exit",g=>l(d(g))),p.on("abort",g=>h(f(g)))})}r.text=n=>s("TextPrompt",n),r.password=n=>(n.style="password",r.text(n)),r.invisible=n=>(n.style="invisible",r.text(n)),r.number=n=>s("NumberPrompt",n),r.date=n=>s("DatePrompt",n),r.confirm=n=>s("ConfirmPrompt",n),r.list=n=>{const c=n.separator||",";return s("TextPrompt",n,{onSubmit:a=>a.split(c).map(l=>l.trim())})},r.toggle=n=>s("TogglePrompt",n),r.select=n=>s("SelectPrompt",n),r.multiselect=n=>{n.choices=[].concat(n.choices||[]);const c=a=>a.filter(l=>l.selected).map(l=>l.value);return s("MultiselectPrompt",n,{onAbort:c,onSubmit:c})},r.autocompleteMultiselect=n=>{n.choices=[].concat(n.choices||[]);const c=a=>a.filter(l=>l.selected).map(l=>l.value);return s("AutocompleteMultiselectPrompt",n,{onAbort:c,onSubmit:c})};const t=(n,c)=>Promise.resolve(c.filter(a=>a.title.slice(0,n.length).toLowerCase()===n.toLowerCase()));r.autocomplete=n=>(n.suggest=n.suggest||t,n.choices=[].concat(n.choices||[]),s("AutocompletePrompt",n))}(yo)),yo}var Zo,Zg;function AR(){if(Zg)return Zo;Zg=1;const e=SR(),r=["suggest","format","onState","validate","onRender","type"],o=()=>{};async function i(c=[],{onSubmit:a=o,onCancel:l=o}={}){const h={},p=i._override||{};c=[].concat(c);let f,u,d,g,m,y;const D=async(v,b,E=!1)=>{if(!(!E&&v.validate&&v.validate(b)!==!0))return v.format?await v.format(b,h):b};for(u of c)if({name:g,type:m}=u,typeof m=="function"&&(m=await m(f,{...h},u),u.type=m),!!m){for(let v in u){if(r.includes(v))continue;let b=u[v];u[v]=typeof b=="function"?await b(f,{...h},y):b}if(y=u,typeof u.message!="string")throw new Error("prompt message is required");if({name:g,type:m}=u,e[m]===void 0)throw new Error(`prompt type (${m}) is not defined`);if(p[u.name]!==void 0&&(f=await D(u,p[u.name]),f!==void 0)){h[g]=f;continue}try{f=i._injected?s(i._injected,u.initial):await e[m](u),h[g]=f=await D(u,f,!0),d=await a(u,f,h)}catch{d=!await l(u,h)}if(d)return h}return h}function s(c,a){const l=c.shift();if(l instanceof Error)throw l;return l===void 0?a:l}function t(c){i._injected=(i._injected||[]).concat(c)}function n(c){i._override=Object.assign({},c)}return Zo=Object.assign(i,{prompt:i,prompts:e,inject:t,override:n}),Zo}var Jo,Jg;function CR(){return Jg||(Jg=1,Jo=AR()),Jo}var RR=CR();const ws=We(RR);var dr={exports:{}},Xo,Xg;function xR(){if(Xg)return Xo;Xg=1,Xo=i,i.sync=s;var e=Ze;function r(t,n){var c=n.pathExt!==void 0?n.pathExt:process.env.PATHEXT;if(!c||(c=c.split(";"),c.indexOf("")!==-1))return!0;for(var a=0;a<c.length;a++){var l=c[a].toLowerCase();if(l&&t.substr(-l.length).toLowerCase()===l)return!0}return!1}function o(t,n,c){return!t.isSymbolicLink()&&!t.isFile()?!1:r(n,c)}function i(t,n,c){e.stat(t,function(a,l){c(a,a?!1:o(l,t,n))})}function s(t,n){return o(e.statSync(t),t,n)}return Xo}var Qo,Qg;function FR(){if(Qg)return Qo;Qg=1,Qo=r,r.sync=o;var e=Ze;function r(t,n,c){e.stat(t,function(a,l){c(a,a?!1:i(l,n))})}function o(t,n){return i(e.statSync(t),n)}function i(t,n){return t.isFile()&&s(t,n)}function s(t,n){var c=t.mode,a=t.uid,l=t.gid,h=n.uid!==void 0?n.uid:process.getuid&&process.getuid(),p=n.gid!==void 0?n.gid:process.getgid&&process.getgid(),f=parseInt("100",8),u=parseInt("010",8),d=parseInt("001",8),g=f|u,m=c&d||c&u&&l===p||c&f&&a===h||c&g&&h===0;return m}return Qo}var ea,e0;function OR(){if(e0)return ea;e0=1;var e;process.platform==="win32"||qt.TESTING_WINDOWS?e=xR():e=FR(),ea=r,r.sync=o;function r(i,s,t){if(typeof s=="function"&&(t=s,s={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,c){r(i,s||{},function(a,l){a?c(a):n(l)})})}e(i,s||{},function(n,c){n&&(n.code==="EACCES"||s&&s.ignoreErrors)&&(n=null,c=!1),t(n,c)})}function o(i,s){try{return e.sync(i,s||{})}catch(t){if(s&&s.ignoreErrors||t.code==="EACCES")return!1;throw t}}return ea}var ta,t0;function TR(){if(t0)return ta;t0=1;const e=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",r=Ee,o=e?";":":",i=OR(),s=a=>Object.assign(new Error(`not found: ${a}`),{code:"ENOENT"}),t=(a,l)=>{const h=l.colon||o,p=a.match(/\//)||e&&a.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(l.path||process.env.PATH||"").split(h)],f=e?l.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",u=e?f.split(h):[""];return e&&a.indexOf(".")!==-1&&u[0]!==""&&u.unshift(""),{pathEnv:p,pathExt:u,pathExtExe:f}},n=(a,l,h)=>{typeof l=="function"&&(h=l,l={}),l||(l={});const{pathEnv:p,pathExt:f,pathExtExe:u}=t(a,l),d=[],g=y=>new Promise((D,v)=>{if(y===p.length)return l.all&&d.length?D(d):v(s(a));const b=p[y],E=/^".*"$/.test(b)?b.slice(1,-1):b,S=r.join(E,a),A=!E&&/^\.[\\\/]/.test(a)?a.slice(0,2)+S:S;D(m(A,y,0))}),m=(y,D,v)=>new Promise((b,E)=>{if(v===f.length)return b(g(D+1));const S=f[v];i(y+S,{pathExt:u},(A,C)=>{if(!A&&C)if(l.all)d.push(y+S);else return b(y+S);return b(m(y,D,v+1))})});return h?g(0).then(y=>h(null,y),h):g(0)},c=(a,l)=>{l=l||{};const{pathEnv:h,pathExt:p,pathExtExe:f}=t(a,l),u=[];for(let d=0;d<h.length;d++){const g=h[d],m=/^".*"$/.test(g)?g.slice(1,-1):g,y=r.join(m,a),D=!m&&/^\.[\\\/]/.test(a)?a.slice(0,2)+y:y;for(let v=0;v<p.length;v++){const b=D+p[v];try{if(i.sync(b,{pathExt:f}))if(l.all)u.push(b);else return b}catch{}}}if(l.all&&u.length)return u;if(l.nothrow)return null;throw s(a)};return ta=n,n.sync=c,ta}var mn={exports:{}},r0;function IR(){if(r0)return mn.exports;r0=1;const e=(r={})=>{const o=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(o).reverse().find(s=>s.toUpperCase()==="PATH")||"Path"};return mn.exports=e,mn.exports.default=e,mn.exports}var ra,i0;function $R(){if(i0)return ra;i0=1;const e=Ee,r=TR(),o=IR();function i(t,n){const c=t.options.env||process.env,a=process.cwd(),l=t.options.cwd!=null,h=l&&process.chdir!==void 0&&!process.chdir.disabled;if(h)try{process.chdir(t.options.cwd)}catch{}let p;try{p=r.sync(t.command,{path:c[o({env:c})],pathExt:n?e.delimiter:void 0})}catch{}finally{h&&process.chdir(a)}return p&&(p=e.resolve(l?t.options.cwd:"",p)),p}function s(t){return i(t)||i(t,!0)}return ra=s,ra}var yn={},n0;function BR(){if(n0)return yn;n0=1;const e=/([()\][%!^"`<>&|;, *?])/g;function r(i){return i=i.replace(e,"^$1"),i}function o(i,s){return i=`${i}`,i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(e,"^$1"),s&&(i=i.replace(e,"^$1")),i}return yn.command=r,yn.argument=o,yn}var ia,s0;function kR(){return s0||(s0=1,ia=/^#!(.*)/),ia}var na,o0;function PR(){if(o0)return na;o0=1;const e=kR();return na=(r="")=>{const o=r.match(e);if(!o)return null;const[i,s]=o[0].replace(/#! ?/,"").split(" "),t=i.split("/").pop();return t==="env"?s:s?`${t} ${s}`:t},na}var sa,a0;function LR(){if(a0)return sa;a0=1;const e=Ze,r=PR();function o(i){const t=Buffer.alloc(150);let n;try{n=e.openSync(i,"r"),e.readSync(n,t,0,150,0),e.closeSync(n)}catch{}return r(t.toString())}return sa=o,sa}var oa,u0;function NR(){if(u0)return oa;u0=1;const e=Ee,r=$R(),o=BR(),i=LR(),s=process.platform==="win32",t=/\.(?:com|exe)$/i,n=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function c(h){h.file=r(h);const p=h.file&&i(h.file);return p?(h.args.unshift(h.file),h.command=p,r(h)):h.file}function a(h){if(!s)return h;const p=c(h),f=!t.test(p);if(h.options.forceShell||f){const u=n.test(p);h.command=e.normalize(h.command),h.command=o.command(h.command),h.args=h.args.map(g=>o.argument(g,u));const d=[h.command].concat(h.args).join(" ");h.args=["/d","/s","/c",`"${d}"`],h.command=process.env.comspec||"cmd.exe",h.options.windowsVerbatimArguments=!0}return h}function l(h,p,f){p&&!Array.isArray(p)&&(f=p,p=null),p=p?p.slice(0):[],f=Object.assign({},f);const u={command:h,args:p,options:f,file:void 0,original:{command:h,args:p}};return f.shell?u:a(u)}return oa=l,oa}var aa,c0;function MR(){if(c0)return aa;c0=1;const e=process.platform==="win32";function r(t,n){return Object.assign(new Error(`${n} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${n} ${t.command}`,path:t.command,spawnargs:t.args})}function o(t,n){if(!e)return;const c=t.emit;t.emit=function(a,l){if(a==="exit"){const h=i(l,n);if(h)return c.call(t,"error",h)}return c.apply(t,arguments)}}function i(t,n){return e&&t===1&&!n.file?r(n.original,"spawn"):null}function s(t,n){return e&&t===1&&!n.file?r(n.original,"spawnSync"):null}return aa={hookChildProcess:o,verifyENOENT:i,verifyENOENTSync:s,notFoundError:r},aa}var l0;function jR(){if(l0)return dr.exports;l0=1;const e=k_,r=NR(),o=MR();function i(t,n,c){const a=r(t,n,c),l=e.spawn(a.command,a.args,a.options);return o.hookChildProcess(l,a),l}function s(t,n,c){const a=r(t,n,c),l=e.spawnSync(a.command,a.args,a.options);return l.error=l.error||o.verifyENOENTSync(l.status,a),l}return dr.exports=i,dr.exports.spawn=i,dr.exports.sync=s,dr.exports._parse=r,dr.exports._enoent=o,dr.exports}var ua,h0;function qR(){if(h0)return ua;h0=1;const e=jR();return ua=(o,i,s={},t={})=>{s.rejectOnError===void 0&&(s.rejectOnError=!0);let n="",c="";const a=e(o,i,t);return new Promise((l,h)=>{s.stdin!==void 0&&s.stdin!=null&&a.stdin.write(s.stdin),a.stdin.end(),a.stdout.on("data",p=>{n+=p,s.stdout&&s.stdout(p)}),a.stderr.on("data",p=>{c+=p,s.stderr&&s.stderr(p)}),s.rejectOnError&&a.addListener("error",h),a.on("close",p=>{p!==0&&s.rejectOnError?h(c):l({stdout:n,stderr:c})})})},ua}var UR=qR();const yt=We(UR),HR="npm-check-updates",GR="19.2.0",WR="Tomas Junnonen <tomas1@gmail.com>",zR="Apache-2.0",VR=["Raine Revere (https://github.com/raineorshine)","Imamuzzaki Abu Salam <imamuzzaki@gmail.com>"],YR="Find newer versions of dependencies than what your package.json allows",KR=["dependencies","npm","package.json","update","upgrade","versions"],ZR={node:">=20.0.0",npm:">=8.12.1"},JR="build/index.js",XR="build/index.d.ts",QR={build:"rimraf build && npm run build:optio