@stacksjs/cli 0.64.0 → 0.64.2

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
@@ -14,7 +14,7 @@ Instructions:
14
14
  enter/return: Complete answer
15
15
  `}return""}renderCurrentInput(){return`
16
16
  Filtered results for: ${this.inputValue?this.inputValue:BD.gray("Enter something to filter")}\n`}renderOption(D,u,F){let C;if(u.disabled)C=D===F?BD.gray().underline(u.title):BD.strikethrough().gray(u.title);else C=D===F?BD.cyan().underline(u.title):u.title;return(u.selected?BD.green(VD.radioOn):VD.radioOff)+" "+C}renderDoneOrInstructions(){if(this.done)return this.value.filter((u)=>u.selected).map((u)=>u.title).join(", ");const D=[BD.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)D.push(BD.yellow(this.warn));return D.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(K4.hide);super.render();let D=[A8.symbol(this.done,this.aborted),BD.bold(this.msg),A8.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)D+=BD.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;D+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+D),this.clear=B8(D,this.out.columns)}}$8.exports=h8});var z8=O((mA,Z8)=>{var U8=W(),X4=CD(),{style:M8,clear:G4}=g(),{erase:Y4,cursor:H8}=N();class O8 extends X4{constructor(D={}){super(D);this.msg=D.message,this.value=D.initial,this.initialValue=!!D.initial,this.yesMsg=D.yes||"yes",this.yesOption=D.yesOption||"(Y/n)",this.noMsg=D.no||"no",this.noOption=D.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("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(D,u){if(D.toLowerCase()==="y")return this.value=!0,this.submit();if(D.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(H8.hide);else this.out.write(G4(this.outputText,this.out.columns));super.render(),this.outputText=[M8.symbol(this.done,this.aborted),U8.bold(this.msg),M8.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:U8.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Y4.line+H8.to(0)+this.outputText)}}Z8.exports=O8});var J8=O((nA,f8)=>{f8.exports={TextPrompt:o1(),SelectPrompt:C3(),TogglePrompt:$3(),DatePrompt:m3(),NumberPrompt:p3(),MultiselectPrompt:G0(),AutocompletePrompt:E8(),AutocompleteMultiselectPrompt:_8(),ConfirmPrompt:z8()}});var Q8=O((K8)=>{function t(D,u,F={}){return new Promise((C,E)=>{const B=new W4[D](u),A=F.onAbort||Vu,h=F.onSubmit||Vu,$=F.onExit||Vu;B.on("state",u.onState||Vu),B.on("submit",(_)=>C(h(_))),B.on("exit",(_)=>C($(_))),B.on("abort",(_)=>E(A(_)))})}var P=K8,W4=J8(),Vu=(D)=>D;P.text=(D)=>t("TextPrompt",D);P.password=(D)=>{return D.style="password",P.text(D)};P.invisible=(D)=>{return D.style="invisible",P.text(D)};P.number=(D)=>t("NumberPrompt",D);P.date=(D)=>t("DatePrompt",D);P.confirm=(D)=>t("ConfirmPrompt",D);P.list=(D)=>{const u=D.separator||",";return t("TextPrompt",D,{onSubmit:(F)=>F.split(u).map((C)=>C.trim())})};P.toggle=(D)=>t("TogglePrompt",D);P.select=(D)=>t("SelectPrompt",D);P.multiselect=(D)=>{D.choices=[].concat(D.choices||[]);const u=(F)=>F.filter((C)=>C.selected).map((C)=>C.value);return t("MultiselectPrompt",D,{onAbort:u,onSubmit:u})};P.autocompleteMultiselect=(D)=>{D.choices=[].concat(D.choices||[]);const u=(F)=>F.filter((C)=>C.selected).map((C)=>C.value);return t("AutocompleteMultiselectPrompt",D,{onAbort:u,onSubmit:u})};var R4=(D,u)=>Promise.resolve(u.filter((F)=>F.title.slice(0,D.length).toLowerCase()===D.toLowerCase()));P.autocomplete=(D)=>{return D.suggest=D.suggest||R4,D.choices=[].concat(D.choices||[]),t("AutocompletePrompt",D)}});var Y8=O((iA,G8)=>{async function MD(D=[],{onSubmit:u=X8,onCancel:F=X8}={}){const C={},E=MD._override||{};D=[].concat(D);let B,A,h,$,_,M;const H=async(U,Z,J=!1)=>{if(!J&&U.validate&&U.validate(Z)!==!0)return;return U.format?await U.format(Z,C):Z};for(A of D){if({name:$,type:_}=A,typeof _==="function")_=await _(B,{...C},A),A.type=_;if(!_)continue;for(let U in A){if(N4.includes(U))continue;let Z=A[U];A[U]=typeof Z==="function"?await Z(B,{...C},M):Z}if(M=A,typeof A.message!=="string")throw new Error("prompt message is required");if({name:$,type:_}=A,R0[_]===void 0)throw new Error(`prompt type (${_}) is not defined`);if(E[A.name]!==void 0){if(B=await H(A,E[A.name]),B!==void 0){C[$]=B;continue}}try{B=MD._injected?V4(MD._injected,A.initial):await R0[_](A),C[$]=B=await H(A,B,!0),h=await u(A,B,C)}catch(U){h=!await F(A,C)}if(h)return C}return C}function V4(D,u){const F=D.shift();if(F instanceof Error)throw F;return F===void 0?u:F}function L4(D){MD._injected=(MD._injected||[]).concat(D)}function w4(D){MD._override=Object.assign({},D)}var R0=Q8(),N4=["suggest","format","onState","validate","onRender","type"],X8=()=>{};G8.exports=Object.assign(MD,{prompt:MD,prompts:R0,inject:L4,override:w4})});var R8=O((aA,W8)=>{function q4(D){D=(Array.isArray(D)?D:D.split(".")).map(Number);let u=0,F=process.versions.node.split(".").map(Number);for(;u<D.length;u++){if(F[u]>D[u])return!1;if(D[u]>F[u])return!0}return!1}W8.exports=q4("8.6.0")?I1():Y8()});var pC=O((h$,L9)=>{L9.exports={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots13:{interval:80,frames:["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},sand:{interval:80,frames:["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["😄 ","😝 "]},monkey:{interval:300,frames:["🙈 ","🙈 ","🙉 ","🙊 "]},hearts:{interval:100,frames:["💛 ","💙 ","💜 ","💚 ","❤️ "]},clock:{interval:100,frames:["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},earth:{interval:180,frames:["🌍 ","🌎 ","🌏 "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},runner:{interval:140,frames:["🚶 ","🏃 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\____________▌","▐_|\___________▌","▐__|\__________▌","▐___|\_________▌","▐____|\________▌","▐_____|\_______▌","▐______|\______▌","▐_______|\_____▌","▐________|\____▌","▐_________|\___▌","▐__________|\__▌","▐___________|\_▌","▐____________|\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["🌲","🎄"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},fistBump:{interval:80,frames:["🤜    🤛 ","🤜    🤛 ","🤜    🤛 "," 🤜  🤛  ","  🤜🤛   "," 🤜✨🤛   ","🤜 ✨ 🤛  "]},soccerHeader:{interval:80,frames:[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},mindblown:{interval:160,frames:["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ ","  ","  ","  "]},speaker:{interval:160,frames:["🔈 ","🔉 ","🔊 ","🔉 "]},orangePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},bluePulse:{interval:100,frames:["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},orangeBluePulse:{interval:100,frames:["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},timeTravel:{interval:100,frames:["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},dwarfFortress:{interval:80,frames:[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}});var c0=O(($$,rC)=>{var vu=Object.assign({},pC()),tC=Object.keys(vu);Object.defineProperty(vu,"random",{get(){const D=Math.floor(Math.random()*tC.length),u=tC[D];return vu[u]}});rC.exports=vu});import M6 from"process";import GE from"fs";import YE from"fs/promises";import GD from"path";import WE from"process";var DF=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun"],au={"bun.lockb":"bun","pnpm-lock.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"};async function FF({cwd:D,onUnknown:u}={}){for(let F of RE(D)){for(let E of Object.keys(au))if(await CF(GD.join(F,E))){const B=au[E],A=await uF(GD.join(F,"package.json"),u);if(A)return A;else return{name:B,agent:B}}const C=await uF(GD.join(F,"package.json"),u);if(C)return C}return null}function*RE(D=WE.cwd()){let u=GD.resolve(D);const{root:F}=GD.parse(u);while(u&&u!==F)yield u,u=GD.dirname(u)}async function uF(D,u){if(!D||!await CF(D))return null;try{const F=JSON.parse(GE.readFileSync(D,"utf8"));let C;if(typeof F.packageManager==="string"){const[E,B]=F.packageManager.replace(/^\^/,"").split("@");let A=B;if(E==="yarn"&&Number.parseInt(B)>1)return C="yarn@berry",A="berry",{name:E,agent:C,version:A};else if(E==="pnpm"&&Number.parseInt(B)<7)return C="pnpm@6",{name:E,agent:C,version:A};else if(DF.includes(E))return C=E,{name:E,agent:C,version:A};else return u?.(F.packageManager)??null}}catch{}return null}async function CF(D){try{if((await YE.stat(D)).isFile())return!0}catch{}return!1}async function H6(D=M6.cwd()){return(await FF({cwd:D,onUnknown(F){console.warn("[@antfu/install-pkg] Unknown packageManager:",F);return}}))?.agent||null}import{existsSync as O6}from"fs";import Z6 from"process";import{resolve as z6}from"path";import{createRequire as NE}from"module";import{spawn as iE}from"child_process";import{normalize as aE}from"path";import{cwd as pE}from"process";import{delimiter as EF,resolve as tE,dirname as rE}from"path";function oE(D){for(let u in D){if(!Object.prototype.hasOwnProperty.call(D,u)||!sE.test(u))continue;let F=D[u];return F?{key:u,value:F}:BF}return BF}function eE(D,u){let F=u.value.split(EF),C=D,E;do F.push(tE(C,"node_modules",".bin")),E=C,C=rE(C);while(C!==E);return{key:u.key,value:F.join(EF)}}function D6(D,u){let F={...process.env,...u},C=eE(D,oE(F));return F[C.key]=C.value,F}import{PassThrough as u6}from"stream";import E6 from"readline";function h6(D,u){return{command:aE(D),args:u??[]}}function $6(D){let u=new AbortController;for(let F of D){if(F.aborted)return u.abort(),F;let C=()=>{u.abort(F.reason)};F.addEventListener("abort",C,{signal:u.signal})}return u.signal}var YD=NE(import.meta.url),VE=Object.create,hF=Object.defineProperty,LE=Object.getOwnPropertyDescriptor,wE=Object.getOwnPropertyNames,qE=Object.getPrototypeOf,IE=Object.prototype.hasOwnProperty,hD=((D)=>typeof YD<"u"?YD:typeof Proxy<"u"?new Proxy(D,{get:(u,F)=>(typeof YD<"u"?YD:u)[F]}):D)(function(D){if(typeof YD<"u")return YD.apply(this,arguments);throw Error('Dynamic require of "'+D+'" is not supported')}),T=(D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports),jE=(D,u,F,C)=>{if(u&&typeof u=="object"||typeof u=="function")for(let E of wE(u))!IE.call(D,E)&&E!==F&&hF(D,E,{get:()=>u[E],enumerable:!(C=LE(u,E))||C.enumerable});return D},SE=(D,u,F)=>(F=D!=null?VE(qE(D)):{},jE(u||!D||!D.__esModule?hF(F,"default",{value:D,enumerable:!0}):F,D)),PE=T((D,u)=>{u.exports=B,B.sync=A;var F=hD("fs");function C(h,$){var _=$.pathExt!==void 0?$.pathExt:process.env.PATHEXT;if(!_||(_=_.split(";"),_.indexOf("")!==-1))return!0;for(var M=0;M<_.length;M++){var H=_[M].toLowerCase();if(H&&h.substr(-H.length).toLowerCase()===H)return!0}return!1}function E(h,$,_){return!h.isSymbolicLink()&&!h.isFile()?!1:C($,_)}function B(h,$,_){F.stat(h,function(M,H){_(M,M?!1:E(H,h,$))})}function A(h,$){return E(F.statSync(h),h,$)}}),TE=T((D,u)=>{u.exports=C,C.sync=E;var F=hD("fs");function C(h,$,_){F.stat(h,function(M,H){_(M,M?!1:B(H,$))})}function E(h,$){return B(F.statSync(h),$)}function B(h,$){return h.isFile()&&A(h,$)}function A(h,$){var{mode:_,uid:M,gid:H}=h,U=$.uid!==void 0?$.uid:process.getuid&&process.getuid(),Z=$.gid!==void 0?$.gid:process.getgid&&process.getgid(),J=parseInt("100",8),X=parseInt("010",8),w=parseInt("001",8),q=J|X,b=_&w||_&X&&H===Z||_&J&&M===U||_&q&&U===0;return b}}),bE=T((D,u)=>{var F=hD("fs"),C;process.platform==="win32"||global.TESTING_WINDOWS?C=PE():C=TE(),u.exports=E,E.sync=B;function E(A,h,$){if(typeof h=="function"&&($=h,h={}),!$){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(_,M){E(A,h||{},function(H,U){H?M(H):_(U)})})}C(A,h||{},function(_,M){_&&(_.code==="EACCES"||h&&h.ignoreErrors)&&(_=null,M=!1),$(_,M)})}function B(A,h){try{return C.sync(A,h||{})}catch($){if(h&&h.ignoreErrors||$.code==="EACCES")return!1;throw $}}}),kE=T((D,u)=>{var F=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",C=hD("path"),E=F?";":":",B=bE(),A=(M)=>Object.assign(new Error(`not found: ${M}`),{code:"ENOENT"}),h=(M,H)=>{let U=H.colon||E,Z=M.match(/\//)||F&&M.match(/\\/)?[""]:[...F?[process.cwd()]:[],...(H.path||"/home/runner/work/stacks/stacks/storage/framework/core/cli/node_modules/.bin:/home/runner/work/stacks/stacks/storage/framework/core/cli/node_modules/.bin:/home/runner/work/stacks/stacks/storage/framework/core/node_modules/.bin:/home/runner/work/stacks/stacks/storage/framework/node_modules/.bin:/home/runner/work/stacks/stacks/storage/node_modules/.bin:/home/runner/work/stacks/stacks/node_modules/.bin:/home/runner/work/stacks/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/home/runner/work/stacks/stacks/storage/framework/core/cli/node_modules/.bin:/home/runner/work/stacks/stacks/storage/framework/core/node_modules/.bin:/home/runner/work/stacks/stacks/storage/framework/node_modules/.bin:/home/runner/work/stacks/stacks/storage/node_modules/.bin:/home/runner/work/stacks/stacks/node_modules/.bin:/home/runner/work/stacks/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.17.0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/.bun/bin:/opt/hostedtoolcache/node/20.17.0/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(U)],J=F?H.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",X=F?J.split(U):[""];return F&&M.indexOf(".")!==-1&&X[0]!==""&&X.unshift(""),{pathEnv:Z,pathExt:X,pathExtExe:J}},$=(M,H,U)=>{typeof H=="function"&&(U=H,H={}),H||(H={});let{pathEnv:Z,pathExt:J,pathExtExe:X}=h(M,H),w=[],q=(j)=>new Promise((OD,o)=>{if(j===Z.length)return H.all&&w.length?OD(w):o(A(M));let x=Z[j],mu=/^".*"$/.test(x)?x.slice(1,-1):x,XD=C.join(mu,M),nu=!mu&&/^\.[\\\/]/.test(M)?M.slice(0,2)+XD:XD;OD(b(nu,j,0))}),b=(j,OD,o)=>new Promise((x,mu)=>{if(o===J.length)return x(q(OD+1));let XD=J[o];B(j+XD,{pathExt:X},(nu,zE)=>{if(!nu&&zE)if(H.all)w.push(j+XD);else return x(j+XD);return x(b(j,OD,o+1))})});return U?q(0).then((j)=>U(null,j),U):q(0)},_=(M,H)=>{H=H||{};let{pathEnv:U,pathExt:Z,pathExtExe:J}=h(M,H),X=[];for(let w=0;w<U.length;w++){let q=U[w],b=/^".*"$/.test(q)?q.slice(1,-1):q,j=C.join(b,M),OD=!b&&/^\.[\\\/]/.test(M)?M.slice(0,2)+j:j;for(let o=0;o<Z.length;o++){let x=OD+Z[o];try{if(B.sync(x,{pathExt:J}))if(H.all)X.push(x);else return x}catch{}}}if(H.all&&X.length)return X;if(H.nothrow)return null;throw A(M)};u.exports=$,$.sync=_}),dE=T((D,u)=>{var F=(C={})=>{let E=C.env||process.env;return(C.platform||process.platform)!=="win32"?"PATH":Object.keys(E).reverse().find((B)=>B.toUpperCase()==="PATH")||"Path"};u.exports=F,u.exports.default=F}),xE=T((D,u)=>{var F=hD("path"),C=kE(),E=dE();function B(h,$){let _=h.options.env||process.env,M=process.cwd(),H=h.options.cwd!=null,U=H&&process.chdir!==void 0&&!process.chdir.disabled;if(U)try{process.chdir(h.options.cwd)}catch{}let Z;try{Z=C.sync(h.command,{path:_[E({env:_})],pathExt:$?F.delimiter:void 0})}catch{}finally{U&&process.chdir(M)}return Z&&(Z=F.resolve(H?h.options.cwd:"",Z)),Z}function A(h){return B(h)||B(h,!0)}u.exports=A}),vE=T((D,u)=>{var F=/([()\][%!^"`<>&|;, *?])/g;function C(B){return B=B.replace(F,"^$1"),B}function E(B,A){return B=`${B}`,B=B.replace(/(\\*)"/g,'$1$1\\"'),B=B.replace(/(\\*)$/,"$1$1"),B=`"${B}"`,B=B.replace(F,"^$1"),A&&(B=B.replace(F,"^$1")),B}u.exports.command=C,u.exports.argument=E}),gE=T((D,u)=>{u.exports=/^#!(.*)/}),yE=T((D,u)=>{var F=gE();u.exports=(C="")=>{let E=C.match(F);if(!E)return null;let[B,A]=E[0].replace(/#! ?/,"").split(" "),h=B.split("/").pop();return h==="env"?A:A?`${h} ${A}`:h}}),cE=T((D,u)=>{var F=hD("fs"),C=yE();function E(B){let A=Buffer.alloc(150),h;try{h=F.openSync(B,"r"),F.readSync(h,A,0,150,0),F.closeSync(h)}catch{}return C(A.toString())}u.exports=E}),mE=T((D,u)=>{var F=hD("path"),C=xE(),E=vE(),B=cE(),A=process.platform==="win32",h=/\.(?:com|exe)$/i,$=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function _(U){U.file=C(U);let Z=U.file&&B(U.file);return Z?(U.args.unshift(U.file),U.command=Z,C(U)):U.file}function M(U){if(!A)return U;let Z=_(U),J=!h.test(Z);if(U.options.forceShell||J){let X=$.test(Z);U.command=F.normalize(U.command),U.command=E.command(U.command),U.args=U.args.map((q)=>E.argument(q,X));let w=[U.command].concat(U.args).join(" ");U.args=["/d","/s","/c",`"${w}"`],U.command=process.env.comspec||"cmd.exe",U.options.windowsVerbatimArguments=!0}return U}function H(U,Z,J){Z&&!Array.isArray(Z)&&(J=Z,Z=null),Z=Z?Z.slice(0):[],J=Object.assign({},J);let X={command:U,args:Z,options:J,file:void 0,original:{command:U,args:Z}};return J.shell?X:M(X)}u.exports=H}),nE=T((D,u)=>{var F=process.platform==="win32";function C(h,$){return Object.assign(new Error(`${$} ${h.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${$} ${h.command}`,path:h.command,spawnargs:h.args})}function E(h,$){if(!F)return;let _=h.emit;h.emit=function(M,H){if(M==="exit"){let U=B(H,$,"spawn");if(U)return _.call(h,"error",U)}return _.apply(h,arguments)}}function B(h,$){return F&&h===1&&!$.file?C($.original,"spawn"):null}function A(h,$){return F&&h===1&&!$.file?C($.original,"spawnSync"):null}u.exports={hookChildProcess:E,verifyENOENT:B,verifyENOENTSync:A,notFoundError:C}}),lE=T((D,u)=>{var F=hD("child_process"),C=mE(),E=nE();function B(h,$,_){let M=C(h,$,_),H=F.spawn(M.command,M.args,M.options);return E.hookChildProcess(H,M),H}function A(h,$,_){let M=C(h,$,_),H=F.spawnSync(M.command,M.args,M.options);return H.error=H.error||E.verifyENOENTSync(H.status,M),H}u.exports=B,u.exports.spawn=B,u.exports.sync=A,u.exports._parse=C,u.exports._enoent=E}),sE=/^path$/i,BF={key:"PATH",value:""},F6=(D)=>{let u=D.length,F=new u6,C=()=>{--u===0&&F.emit("end")};for(let E of D)E.pipe(F,{end:!1}),E.on("end",C);return F},C6=SE(lE(),1),AF=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(D,u){super(`Process exited with non-zero status (${D.exitCode})`),this.result=D,this.output=u}},B6={timeout:void 0,persist:!1},A6={windowsHide:!0},_6=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(D,u,F){this._options={...B6,...F},this._command=D,this._args=u??[],this._processClosed=new Promise((C)=>{this._resolveClose=C})}kill(D){return this._process?.kill(D)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(D,u,F){return U6(D,u,{...F,stdin:this})}async*[Symbol.asyncIterator](){let D=this._process;if(!D)return;let u=[];this._streamErr&&u.push(this._streamErr),this._streamOut&&u.push(this._streamOut);let F=F6(u),C=E6.createInterface({input:F});for await(let E of C)yield E.toString();if(await this._processClosed,D.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new AF(this)}async _waitForOutput(){let D=this._process;if(!D)throw new Error("No process was started");let u="",F="";if(this._streamErr)for await(let E of this._streamErr)u+=E.toString();if(this._streamOut)for await(let E of this._streamOut)F+=E.toString();if(await this._processClosed,this._options?.stdin&&await this._options.stdin,D.removeAllListeners(),this._thrownError)throw this._thrownError;let C={stderr:u,stdout:F};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new AF(this,C);return C}then(D,u){return this._waitForOutput().then(D,u)}_streamOut;_streamErr;spawn(){let D=pE(),u=this._options,F={...A6,...u.nodeOptions},C=[];this._resetState(),u.timeout!==void 0&&C.push(AbortSignal.timeout(u.timeout)),u.signal!==void 0&&C.push(u.signal),u.persist===!0&&(F.detached=!0),C.length>0&&(F.signal=$6(C)),F.env=D6(D,F.env);let{command:E,args:B}=h6(this._command,this._args),A=C6._parse(E,B,F),h=iE(A.command,A.args,A.options);if(h.stderr&&(this._streamErr=h.stderr),h.stdout&&(this._streamOut=h.stdout),this._process=h,h.once("error",this._onError),h.once("close",this._onClose),u.stdin!==void 0&&h.stdin&&u.stdin.process){let{stdout:$}=u.stdin.process;$&&$.pipe(h.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise((D)=>{this._resolveClose=D}),this._thrownError=void 0}_onError=(D)=>{if(D.name==="AbortError"&&(!(D.cause instanceof Error)||D.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=D};_onClose=()=>{this._resolveClose&&this._resolveClose()}},pu=(D,u,F)=>{let C=new _6(D,u,F);return C.spawn(),C},U6=pu;async function dD(D,u={}){const F=u.packageManager||await H6(u.cwd)||"npm",[C]=F.split("@");if(!Array.isArray(D))D=[D];const E=u.additionalArgs||[];if(u.preferOffline)if(F==="yarn@berry")E.unshift("--cached");else E.unshift("--prefer-offline");if(C==="pnpm"&&O6(z6(u.cwd??Z6.cwd(),"pnpm-workspace.yaml")))E.unshift("-w");return pu(C,[C==="yarn"?"add":"install",u.dev?"-D":"",...E,...D].filter(Boolean),{nodeOptions:{stdio:u.silent?"ignore":"inherit",cwd:u.cwd},throwOnError:!0})}async function N5(D,u){if(u)return await dD(D,u);return await dD(D,{silent:!0})}async function V5(D,u){if(u)return await dD(`@stacksjs/${D}`,u);return await dD(`@stacksjs/${D}`,{silent:!0})}import{EventEmitter as f6}from"events";function tu(D){return D==null?[]:Array.isArray(D)?D:[D]}function J6(D,u,F,C){var E,B=D[u],A=~C.string.indexOf(u)?F==null||F===!0?"":String(F):typeof F==="boolean"?F:~C.boolean.indexOf(u)?F==="false"?!1:F==="true"||(D._.push((E=+F,E*0===0)?E:F),!!F):(E=+F,E*0===0)?E:F;D[u]=B==null?A:Array.isArray(B)?B.concat(A):[B,A]}function K6(D,u){D=D||[],u=u||{};var F,C,E,B,A,h={_:[]},$=0,_=0,M=0,H=D.length;const U=u.alias!==void 0,Z=u.unknown!==void 0,J=u.default!==void 0;if(u.alias=u.alias||{},u.string=tu(u.string),u.boolean=tu(u.boolean),U)for(F in u.alias){C=u.alias[F]=tu(u.alias[F]);for($=0;$<C.length;$++)(u.alias[C[$]]=C.concat(F)).splice($,1)}for($=u.boolean.length;$-- >0;){C=u.alias[u.boolean[$]]||[];for(_=C.length;_-- >0;)u.boolean.push(C[_])}for($=u.string.length;$-- >0;){C=u.alias[u.string[$]]||[];for(_=C.length;_-- >0;)u.string.push(C[_])}if(J){for(F in u.default)if(B=typeof u.default[F],C=u.alias[F]=u.alias[F]||[],u[B]!==void 0){u[B].push(F);for($=0;$<C.length;$++)u[B].push(C[$])}}const X=Z?Object.keys(u.alias):[];for($=0;$<H;$++){if(E=D[$],E==="--"){h._=h._.concat(D.slice(++$));break}for(_=0;_<E.length;_++)if(E.charCodeAt(_)!==45)break;if(_===0)h._.push(E);else if(E.substring(_,_+3)==="no-"){if(B=E.substring(_+3),Z&&!~X.indexOf(B))return u.unknown(E);h[B]=!1}else{for(M=_+1;M<E.length;M++)if(E.charCodeAt(M)===61)break;B=E.substring(_,M),A=E.substring(++M)||($+1===H||(""+D[$+1]).charCodeAt(0)===45||D[++$]),C=_===2?[B]:B;for(M=0;M<C.length;M++){if(B=C[M],Z&&!~X.indexOf(B))return u.unknown("-".repeat(_)+B);J6(h,B,M+1<C.length||A,u)}}}if(J){for(F in u.default)if(h[F]===void 0)h[F]=u.default[F]}if(U)for(F in h){C=u.alias[F]||[];while(C.length>0)h[C.shift()]=h[F]}return h}var UF=(D)=>D.replace(/[<[].+/,"").trim(),Q6=(D)=>{const u=/<([^>]+)>/g,F=/\[([^\]]+)\]/g,C=[],E=(h)=>{let $=!1,_=h[1];if(_.startsWith("..."))_=_.slice(3),$=!0;return{required:h[0].startsWith("<"),value:_,variadic:$}};let B;while(B=u.exec(D))C.push(E(B));let A;while(A=F.exec(D))C.push(E(A));return C},X6=(D)=>{const u={alias:{},boolean:[]};for(let[F,C]of D.entries()){if(C.names.length>1)u.alias[C.names[0]]=C.names.slice(1);if(C.isBoolean)if(C.negated){if(!D.some((B,A)=>{return A!==F&&B.names.some((h)=>C.names.includes(h))&&typeof B.required==="boolean"}))u.boolean.push(C.names[0])}else u.boolean.push(C.names[0])}return u},$F=(D)=>{return D.sort((u,F)=>{return u.length>F.length?-1:1})[0]},_F=(D,u)=>{return D.length>=u?D:`${D}${" ".repeat(u-D.length)}`},G6=(D)=>{return D.replace(/([a-z])-([a-z])/g,(u,F,C)=>{return F+C.toUpperCase()})},Y6=(D,u,F)=>{let C=0,E=u.length,B=D,A;for(;C<E;++C)A=B[u[C]],B=B[u[C]]=C===E-1?F:A!=null?A:!!~u[C+1].indexOf(".")||!(+u[C+1]>-1)?{}:[]},W6=(D,u)=>{for(let F of Object.keys(u)){const C=u[F];if(C.shouldTransform){if(D[F]=Array.prototype.concat.call([],D[F]),typeof C.transformFunction==="function")D[F]=D[F].map(C.transformFunction)}}},R6=(D)=>{const u=/([^\\\/]+)$/.exec(D);return u?u[1]:""},MF=(D)=>{return D.split(".").map((u,F)=>{return F===0?G6(u):u}).join(".")};class $u extends Error{constructor(D){super(D);if(this.name=this.constructor.name,typeof Error.captureStackTrace==="function")Error.captureStackTrace(this,this.constructor);else this.stack=new Error(D).stack}}class HF{constructor(D,u,F){if(this.rawName=D,this.description=u,this.config=Object.assign({},F),D=D.replace(/\.\*/g,""),this.negated=!1,this.names=UF(D).split(",").map((C)=>{let E=C.trim().replace(/^-{1,2}/,"");if(E.startsWith("no-"))this.negated=!0,E=E.replace(/^no-/,"");return MF(E)}).sort((C,E)=>C.length>E.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null)this.config.default=!0;if(D.includes("<"))this.required=!0;else if(D.includes("["))this.required=!1;else this.isBoolean=!0}}var N6=process.argv,V6=`${process.platform}-${process.arch} node-${process.version}`;class ru{constructor(D,u,F={},C){this.rawName=D,this.description=u,this.config=F,this.cli=C,this.options=[],this.aliasNames=[],this.name=UF(D),this.args=Q6(D),this.examples=[]}usage(D){return this.usageText=D,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(D,u="-v, --version"){return this.versionNumber=D,this.option(u,"Display version number"),this}example(D){return this.examples.push(D),this}option(D,u,F){const C=new HF(D,u,F);return this.options.push(C),this}alias(D){return this.aliasNames.push(D),this}action(D){return this.commandAction=D,this}isMatched(D){return this.name===D||this.aliasNames.includes(D)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof su}hasOption(D){return D=D.split(".")[0],this.options.find((u)=>{return u.names.includes(D)})}outputHelp(){const{name:D,commands:u}=this.cli,{versionNumber:F,options:C,helpCallback:E}=this.cli.globalCommand;let B=[{body:`${D}${F?`/${F}`:""}`}];if(B.push({title:"Usage",body:` \$ ${D} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&u.length>0){const $=$F(u.map((_)=>_.rawName));B.push({title:"Commands",body:u.map((_)=>{return` ${_F(_.rawName,$.length)} ${_.description}`}).join("\n")}),B.push({title:"For more info, run any command with the \`--help\` flag",body:u.map((_)=>` \$ ${D}${_.name===""?"":` ${_.name}`} --help`).join("\n")})}let h=this.isGlobalCommand?C:[...this.options,...C||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand)h=h.filter(($)=>$.name!=="version");if(h.length>0){const $=$F(h.map((_)=>_.rawName));B.push({title:"Options",body:h.map((_)=>{return` ${_F(_.rawName,$.length)} ${_.description} ${_.config.default===void 0?"":`(default: ${_.config.default})`}`}).join("\n")})}if(this.examples.length>0)B.push({title:"Examples",body:this.examples.map(($)=>{if(typeof $==="function")return $(D);return $}).join("\n")});if(E)B=E(B)||B;console.log(B.map(($)=>{return $.title?`${$.title}:
17
- ${$.body}`:$.body}).join("\n\n"))}outputVersion(){const{name:D}=this.cli,{versionNumber:u}=this.cli.globalCommand;if(u)console.log(`${D}/${u} ${V6}`)}checkRequiredArgs(){const D=this.args.filter((u)=>u.required).length;if(this.cli.args.length<D)throw new $u(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){const{options:D,globalCommand:u}=this.cli;if(!this.config.allowUnknownOptions){for(let F of Object.keys(D))if(F!=="--"&&!this.hasOption(F)&&!u.hasOption(F))throw new $u(`Unknown option \`${F.length>1?`--${F}`:`-${F}`}\``)}}checkOptionValue(){const{options:D,globalCommand:u}=this.cli,F=[...u.options,...this.options];for(let C of F){const E=D[C.name.split(".")[0]];if(C.required){const B=F.some((A)=>A.negated&&A.names.includes(C.name));if(E===!0||E===!1&&!B)throw new $u(`option \`${C.rawName}\` value is missing`)}}}}class su extends ru{constructor(D){super("@@global@@","",{},D)}}var hu=Object.assign;class ou extends f6{constructor(D=""){super();this.name=D,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new su(this),this.globalCommand.usage("<command> [options]")}usage(D){return this.globalCommand.usage(D),this}command(D,u,F){const C=new ru(D,u||"",F,this);return C.globalCommand=this.globalCommand,this.commands.push(C),C}option(D,u,F){return this.globalCommand.option(D,u,F),this}help(D){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=D,this.showHelpOnExit=!0,this}version(D,u="-v, --version"){return this.globalCommand.version(D,u),this.showVersionOnExit=!0,this}example(D){return this.globalCommand.example(D),this}outputHelp(){if(this.matchedCommand)this.matchedCommand.outputHelp();else this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:D,options:u},F,C){if(this.args=D,this.options=u,F)this.matchedCommand=F;if(C)this.matchedCommandName=C;return this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(D=N6,{run:u=!0}={}){if(this.rawArgs=D,!this.name)this.name=D[1]?R6(D[1]):"cli";let F=!0;for(let E of this.commands){const B=this.mri(D.slice(2),E),A=B.args[0];if(E.isMatched(A)){F=!1;const h=hu(hu({},B),{args:B.args.slice(1)});this.setParsedInfo(h,E,A),this.emit(`command:${A}`,E)}}if(F){for(let E of this.commands)if(E.name===""){F=!1;const B=this.mri(D.slice(2),E);this.setParsedInfo(B,E),this.emit("command:!",E)}}if(F){const E=this.mri(D.slice(2));this.setParsedInfo(E)}if(this.options.help&&this.showHelpOnExit)this.outputHelp(),u=!1,this.unsetMatchedCommand();if(this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null)this.outputVersion(),u=!1,this.unsetMatchedCommand();const C={args:this.args,options:this.options};if(u)this.runMatchedCommand();if(!this.matchedCommand&&this.args[0])this.emit("command:*");return C}mri(D,u){const F=[...this.globalCommand.options,...u?u.options:[]],C=X6(F);let E=[];const B=D.indexOf("--");if(B>-1)E=D.slice(B+1),D=D.slice(0,B);let A=K6(D,C);A=Object.keys(A).reduce((H,U)=>{return hu(hu({},H),{[MF(U)]:A[U]})},{_:[]});const h=A._,$={"--":E},_=u&&u.config.ignoreOptionDefaultValue?u.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue;let M=Object.create(null);for(let H of F){if(!_&&H.config.default!==void 0)for(let U of H.names)$[U]=H.config.default;if(Array.isArray(H.config.type)){if(M[H.name]===void 0)M[H.name]=Object.create(null),M[H.name].shouldTransform=!0,M[H.name].transformFunction=H.config.type[0]}}for(let H of Object.keys(A))if(H!=="_"){const U=H.split(".");Y6($,U,A[H]),W6($,M)}return{args:h,options:$}}runMatchedCommand(){const{args:D,options:u,matchedCommand:F}=this;if(!F||!F.commandAction)return;F.checkUnknownOptions(),F.checkOptionValue(),F.checkRequiredArgs();const C=[];return F.args.forEach((E,B)=>{if(E.variadic)C.push(D.slice(B));else C.push(D[B])}),C.push(u),F.commandAction.apply(this,C)}}function P5(D,u){if(typeof D==="object")u=D,D=u.name;return new ou(D||"buddy")}import{ExitCode as p4}from"@stacksjs/types";var I4=iu(R8(),1);import{log as I}from"@stacksjs/logging";import tD from"process";import{err as N8,handleError as V8,ok as j4}from"@stacksjs/error-handling";import{ExitCode as rD}from"@stacksjs/types";async function N0(D,u){const F=Array.isArray(D)?D:D.match(/(?:[^\s"]+|"[^"]*")+/g);if(!F)return N8(V8(`Failed to parse command: ${F}`,u));I.debug("exec:",Array.isArray(D)?D.join(" "):D),I.debug("cmd:",F),I.debug("exec options:",u);const C=u?.cwd||tD.cwd(),E=Bun.spawn(F,{...u,stdout:u?.silent||u?.quiet?"ignore":u?.stdin?u.stdin:u?.stdout||"inherit",stderr:u?.silent||u?.quiet?"ignore":u?.stderr||"inherit",detached:u?.background||!1,cwd:C,onExit(A,h,$,_){w8("spawn",A,h,$,_)}});if(u?.stdin==="pipe"&&u.input){if(E.stdin)E.stdin.write(u.input),E.stdin.end()}if(await E.exited===rD.Success)return j4(E);return N8(V8(`Failed to execute command: ${F.join(" ")}`))}async function L8(D,u){I.debug("Running ExecSync:",D),I.debug("ExecSync Options:",u);const F=Array.isArray(D)?D:D.match(/(?:[^\s"]+|"[^"]*")+/g);if(!F)I.error(`Failed to parse command: ${F}`,u),tD.exit(rD.FatalError);return Bun.spawnSync(F,{...u,stdin:u?.stdin??"inherit",stdout:u?.stdout??"pipe",stderr:u?.stderr??"inherit",cwd:u?.cwd??tD.cwd(),onExit(E,B,A,h){w8("spawnSync",E,B,A,h)}}).stdout.toString()}function w8(D,u,F,C,E){if(I.debug(`exitHandler: ${D}`),I.debug("subprocess",u),I.debug("exitCode",F),I.debug("signalCode",C),E)I.error(E),tD.exit(rD.FatalError);if(F!==rD.Success&&F)tD.exit(F)}import{collect as a4}from"@stacksjs/collections";var zC={};XE(zC,{yellow:()=>g8,white:()=>m8,underline:()=>T8,trueColorBg:()=>OC,trueColor:()=>HC,stripColors:()=>S8,strikethrough:()=>d8,reset:()=>P8,red:()=>v8,options:()=>wD,magenta:()=>c8,link:()=>ZC,lightYellow:()=>a8,lightRed:()=>l8,lightMagenta:()=>t8,lightGreen:()=>i8,lightGray:()=>n8,lightCyan:()=>r8,lightBlue:()=>p8,italic:()=>KD,inverse:()=>b8,hidden:()=>k8,green:()=>wu,gray:()=>oD,dim:()=>qD,cyan:()=>qu,bold:()=>JD,blue:()=>y8,black:()=>x8,bgYellow:()=>DC,bgWhite:()=>CC,bgRed:()=>o8,bgMagenta:()=>FC,bgLightYellow:()=>hC,bgLightRed:()=>BC,bgLightMagenta:()=>_C,bgLightGreen:()=>AC,bgLightGray:()=>MC,bgLightCyan:()=>UC,bgLightBlue:()=>$C,bgGreen:()=>e8,bgGray:()=>EC,bgCyan:()=>Iu,bgBlue:()=>uC,bgBlack:()=>s8,ansi256Bg:()=>L0,ansi256:()=>V0});function z(D,u,F=1){const C=`\x1B[${D}m`,E=`\x1B[${u}m`,B=new RegExp(`\\x1b\\[${u}m`,"g");return(A)=>{return wD.enabled&&wD.supportLevel>=F?C+(""+A).replace(B,C)+E:""+A}}function j8(D,u,F){if(D>>4===u>>4&&u>>4===F>>4){if(D<8)return 16;if(D>248)return 231;return Math.round((D-8)/247*24)+232}return 16+36*Math.round(D/255*5)+6*Math.round(u/255*5)+Math.round(F/255*5)}function S8(D){return(""+D).replace(/\x1b\[[0-9;]+m/g,"").replace(/\x1b\]8;;.*?\x07(.*?)\x1b\]8;;\x07/g,(u,F)=>F)}function ZC(D,u){return wD.enabled?q8+"8"+Lu+Lu+u+I8+D+q8+"8"+Lu+Lu+I8:`${D} (\u200B${u}\u200B)`}var fD=!0,LD=typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:{},sD=0;if(LD.process&&LD.process.env&&LD.process.stdout){const{FORCE_COLOR:D,NODE_DISABLE_COLORS:u,NO_COLOR:F,TERM:C,COLORTERM:E}=LD.process.env;if(u||F||D==="0")fD=!1;else if(D==="1"||D==="2"||D==="3")fD=!0;else if(C==="dumb")fD=!1;else if("CI"in LD.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((B)=>(B in LD.process.env)))fD=!0;else fD=process.stdout.isTTY;if(fD)if(process.platform==="win32")sD=3;else if(E&&(E==="truecolor"||E==="24bit"))sD=3;else if(C&&(C.endsWith("-256color")||C.endsWith("256")))sD=2;else sD=1}var wD={enabled:fD,supportLevel:sD},P8=z(0,0),JD=z(1,22),qD=z(2,22),KD=z(3,23),T8=z(4,24),b8=z(7,27),k8=z(8,28),d8=z(9,29),x8=z(30,39),v8=z(31,39),wu=z(32,39),g8=z(33,39),y8=z(34,39),c8=z(35,39),qu=z(36,39),m8=z(97,39),oD=z(90,39),n8=z(37,39),l8=z(91,39),i8=z(92,39),a8=z(93,39),p8=z(94,39),t8=z(95,39),r8=z(96,39),s8=z(40,49),o8=z(41,49),e8=z(42,49),DC=z(43,49),uC=z(44,49),FC=z(45,49),Iu=z(46,49),CC=z(107,49),EC=z(100,49),BC=z(101,49),AC=z(102,49),hC=z(103,49),$C=z(104,49),_C=z(105,49),UC=z(106,49),MC=z(47,49),V0=(D)=>z("38;5;"+D,0,2),L0=(D)=>z("48;5;"+D,0,2),HC=(D,u,F)=>{return wD.supportLevel===2?V0(j8(D,u,F)):z(`38;2;${D};${u};${F}`,0,3)},OC=(D,u,F)=>{return wD.supportLevel===2?L0(j8(D,u,F)):z(`48;2;${D};${u};${F}`,0,3)},q8="\x1B]",I8="\x07",Lu=";";import*as ju from"tty";function XC(D,u,F,C,E=u.slice(0,Math.max(0,D))+C,B=u.slice(Math.max(0,D+F.length)),A=B.indexOf(F)){return E+(A<0?B:XC(A,B,F,C))}function v4(D,u,F,C,E){return D<0?F+u+C:F+XC(D,u,C,E)+C}function g4(D,u,F=D,C=D.length+1){return(E)=>E||!(E===""||E===void 0)?v4((""+E).indexOf(u,C),E,D,u,F):""}function f(D,u,F){return g4(`\x1B[${D}m`,`\x1B[${u}m`,F)}function y4(D=x4){return D?fC:Object.fromEntries(Object.keys(fC).map((u)=>[u,String]))}function q0(D,u="reset"){return w0[D]||w0[u]}function c4(D,u){return q0(D)(u)}function eD(D){return D.replace(new RegExp(m4,"g"),"")}function GC(D,u,F=" "){const C=u-D.length;if(C<=0)return D;const E=Math.floor(C/2);let B="";for(let A=0;A<u;A++)B+=A<E||A>=E+D.length?F:D[A-E];return B}function YC(D,u,F=" "){const C=u-D.length;if(C<=0)return D;let E="";for(let B=0;B<u;B++)E+=B<C?F:D[B-C];return E}function WC(D,u,F=" "){let C="";for(let E=0;E<u;E++)C+=E<D.length?D[E]:F;return C}function n4(D,u,F,C=" "){switch(D){case"left":return WC(u,F,C);case"right":return YC(u,F,C);case"center":return GC(u,F,C);default:return u}}function i4(D,u={}){const F={...u,style:{...l4,...u.style}},C=D.split("\n"),E=[],B=q0(F.style.borderColor),A={...typeof F.style.borderStyle==="string"?JC[F.style.borderStyle]||JC.solid:F.style.borderStyle};if(B)for(let Z in A)A[Z]=B(A[Z]);const h=F.style.padding%2===0?F.style.padding:F.style.padding+1,$=C.length+h,_=Math.max(...C.map((Z)=>Z.length))+h,M=_+h,H=F.style.marginLeft>0?" ".repeat(F.style.marginLeft):"";if(F.style.marginTop>0)E.push("".repeat(F.style.marginTop));if(F.title){const Z=A.h.repeat(Math.floor((_-eD(F.title).length)/2)),J=A.h.repeat(_-eD(F.title).length-eD(Z).length+h);E.push(`${H}${A.tl}${Z}${F.title}${J}${A.tr}`)}else E.push(`${H}${A.tl}${A.h.repeat(M)}${A.tr}`);const U=F.style.valign==="center"?Math.floor(($-C.length)/2):F.style.valign==="top"?$-C.length-h:$-C.length;for(let Z=0;Z<$;Z++)if(Z<U||Z>=U+C.length)E.push(`${H}${A.v}${" ".repeat(M)}${A.v}`);else{const J=C[Z-U],X=" ".repeat(h),w=" ".repeat(_-eD(J).length);E.push(`${H}${A.v}${X}${J}${w}${A.v}`)}if(E.push(`${H}${A.bl}${A.h.repeat(M)}${A.br}`),F.style.marginBottom>0)E.push("".repeat(F.style.marginBottom));return E.join("\n")}var{env:HD={},argv:KC=[],platform:S4=""}=typeof process==="undefined"?{}:process,P4="NO_COLOR"in HD||KC.includes("--no-color"),T4="FORCE_COLOR"in HD||KC.includes("--color"),b4=S4==="win32",QC=HD.TERM==="dumb",k4=ju&&ju.isatty&&ju.isatty(1)&&HD.TERM&&!QC,d4="CI"in HD&&(("GITHUB_ACTIONS"in HD)||("GITLAB_CI"in HD)||("CIRCLECI"in HD)),x4=!P4&&(T4||b4&&!QC||k4||d4),fC={reset:f(0,0),bold:f(1,22,"\x1B[22m\x1B[1m"),dim:f(2,22,"\x1B[22m\x1B[2m"),italic:f(3,23),underline:f(4,24),inverse:f(7,27),hidden:f(8,28),strikethrough:f(9,29),black:f(30,39),red:f(31,39),green:f(32,39),yellow:f(33,39),blue:f(34,39),magenta:f(35,39),cyan:f(36,39),white:f(37,39),gray:f(90,39),bgBlack:f(40,49),bgRed:f(41,49),bgGreen:f(42,49),bgYellow:f(43,49),bgBlue:f(44,49),bgMagenta:f(45,49),bgCyan:f(46,49),bgWhite:f(47,49),blackBright:f(90,39),redBright:f(91,39),greenBright:f(92,39),yellowBright:f(93,39),blueBright:f(94,39),magentaBright:f(95,39),cyanBright:f(96,39),whiteBright:f(97,39),bgBlackBright:f(100,49),bgRedBright:f(101,49),bgGreenBright:f(102,49),bgYellowBright:f(103,49),bgBlueBright:f(104,49),bgMagentaBright:f(105,49),bgCyanBright:f(106,49),bgWhiteBright:f(107,49)},w0=y4(),m4=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),JC={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},l4={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1};var Ch=a4(["The best way to get started is to quit talking and begin doing.","The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.","Don\u2019t let yesterday take up too much of today.","You learn more from failure than from success. Don\u2019t let it stop you. Failure builds character.","It\u2019s not whether you get knocked down, it\u2019s whether you get up.","If you are working on something that you really care about, you don\u2019t have to be pushed. The vision pulls you.","People who are crazy enough to think they can change the world, are the ones who do.","Failure will never overtake me if my determination to succeed is strong enough.","Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That\u2019s the classic entrepreneur.","We may encounter many defeats but we must not be defeated.","Knowing is not enough; we must apply. Wishing is not enough; we must do.","Imagine your life is perfect in every respect; what would it look like?","We generate fears while we sit. We overcome them by action.","Whether you think you can or think you can\u2019t, you\u2019re right.","Security is mostly a superstition. Life is either a daring adventure or nothing."]);async function Su(D,u){return I.debug("runCommand:",D),I.debug("options:",u),await N0(D,u)}async function Mh(D,u){return I.debug("runProcess:",KD(D)),I.debug("runProcess Options:",u),await N0(D,u)}async function Hh(D,u){return I.debug("runCommandSync:",KD(D)),I.debug("runCommandSync Options:",u),await L8(D,u)}async function Oh(D,u){const F=[];for(let C of D){const E=await Su(C,u);if(E.isErr())I.error(E.error),process.exit(p4.FatalError);F.push(E)}return F}class t4{name;description;options;run;onFail;onSuccess;constructor({name:D,description:u,options:F,run:C,onFail:E,onSuccess:B}){this.name=D,this.description=u,this.options=F,this.run=C,this.onFail=E,this.onSuccess=B}}var fh={run:async(D,u)=>{return await Su(D,u)},runSync:async(D,u)=>{return await Su(D,u)}};import{handleError as s4}from"@stacksjs/error-handling";import{log as ID}from"@stacksjs/logging";import{ExitCode as NC}from"@stacksjs/types";var RC="0.64.0";async function Rh(D,u){return new Promise((F)=>{if(u?.quiet===!1)console.log(),console.log(qu(JD("Stacks CLI"))+qD(` v${RC}`)),console.log();if(ID.info(`Running ${Iu(KD(JD(` ${D} `)))}`,{styled:!1}),u?.showPerformance===!1||u?.quiet)return F(0);return F(performance.now())})}function Nh(D,u,F){const C={type:"success",useSeconds:!0,...u};return C.message=u?.message||D,new Promise((E)=>{if(F)return s4(F);if(C?.startTime){let B=performance.now()-C.startTime;if(C.useSeconds)B=B/1000,B=Math.round(B*100)/100;if(C.quiet===!0)return E(NC.Success);if(F)ID.error(`[${B.toFixed(2)}${C.useSeconds?"s":"ms"}] Failed`);else if(C.type==="info")ID.info(`${qD(oD(`[${B.toFixed(2)}${C.useSeconds?"s":"ms"}]`))} ${C.message??"Complete"}`);else ID.success(`${qD(oD(JD(`[${B.toFixed(2)}${C.useSeconds?"s":"ms"}]`)))} ${JD(wu(C.message??"Complete"))}`)}else if(C?.type==="info")ID.info(D);else if(C?.type==="success"&&C?.quiet!==!0)ID.success(D);return E(NC.Success)})}import jD from"process";import{log as I0}from"@stacksjs/logging";function VC(D){if(!D)return!1;return D.startsWith("--")}function o4(D){return D.startsWith("-")&&!VC(D)}function j0(D){if(D==="true")return!0;if(D==="false")return!1;const u=Number.parseFloat(D);if(!Number.isNaN(u))return u;return D.replace(/"/g,"")}function e4(D,u,F,C){const[E,B]=D.slice(2).split("=");if(B!==void 0)C[E]=j0(B);else if(F+1<u.length&&!u[F+1]?.startsWith("-"))C[E]=u[F+1],F++;else C[E]=!0;return F}function D9(D,u,F,C){const[E,B]=D.slice(1).split("=");if(E===void 0)return F;if(B!==void 0&&E!==void 0)for(let A=0;A<E.length;A++)C[E[A]]=j0(B);else for(let A=0;A<E.length;A++)if(F+1<u.length&&A===E.length-1&&!u[F+1]?.startsWith("-"))C[E[A]]=j0(u[F+1]),F++;else C[E[A]]=!0;return F}function u9(D){if(D===void 0)D=jD.argv.slice(2);const u=[],F={};for(let C=0;C<D.length;C++){const E=D[C];if(!E)continue;if(VC(E))C=e4(E,D,C,F);else if(o4(E))C=D9(E,D,C,F);else u.push(E)}return{args:u,options:F}}function qh(D){if(D===void 0)D=jD.argv.slice(2);return u9(D).args}function Ih(D){D=D||{};const u=jD.argv.slice(2);for(let F=0;F<u.length;F++){const C=u[F];if(C?.startsWith("--")){const B=C.substring(2).replace(/-([a-z])/gi,(A)=>A[1]?A[1].toUpperCase():"");if(F+1<u.length)if(u[F+1]==="true"||u[F+1]==="false")D[B]=u[F+1]==="true",F++;else D[B]=u[F+1],F++;else D[B]=!0}}if(Object.keys(D).length===0)return{dryRun:!1,quiet:!1,verbose:!1};return Object.keys(D).forEach((F)=>{if(!D)return{dryRun:!1,quiet:!1,verbose:!1};const C=D[F];if(C==="true"||C==="false")D[F]=C==="true"}),D}function jh(D){if(!D){if(D=jD.argv.slice(2),D=Array.from(new Set(D)),D[0]&&!D[0].startsWith("-"))D.shift()}if(D?.verbose)I0.debug("process.argv",jD.argv),I0.debug("process.argv.slice(2)",jD.argv.slice(2)),I0.debug("options inside buddyOptions",D);return D.join(" ")}import cu from"process";function E9(){const D=new Map;for(let[u,F]of Object.entries(G)){for(let[C,E]of Object.entries(F))G[C]={open:`\x1B[${E[0]}m`,close:`\x1B[${E[1]}m`},F[C]=G[C],D.set(E[0],E[1]);Object.defineProperty(G,u,{value:F,enumerable:!1})}return Object.defineProperty(G,"codes",{value:D,enumerable:!1}),G.color.close="\x1B[39m",G.bgColor.close="\x1B[49m",G.color.ansi=LC(),G.color.ansi256=wC(),G.color.ansi16m=qC(),G.bgColor.ansi=LC(10),G.bgColor.ansi256=wC(10),G.bgColor.ansi16m=qC(10),Object.defineProperties(G,{rgbToAnsi256:{value(u,F,C){if(u===F&&F===C){if(u<8)return 16;if(u>248)return 231;return Math.round((u-8)/247*24)+232}return 16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(C/255*5)},enumerable:!1},hexToRgb:{value(u){const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[C]=F;if(C.length===3)C=[...C].map((B)=>B+B).join("");const E=Number.parseInt(C,16);return[E>>16&255,E>>8&255,E&255]},enumerable:!1},hexToAnsi256:{value:(u)=>G.rgbToAnsi256(...G.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,C,E;if(u>=232)F=((u-232)*10+8)/255,C=F,E=F;else{u-=16;const h=u%36;F=Math.floor(u/36)/5,C=Math.floor(h/6)/5,E=h%6/5}const B=Math.max(F,C,E)*2;if(B===0)return 30;let A=30+(Math.round(E)<<2|Math.round(C)<<1|Math.round(F));if(B===2)A+=60;return A},enumerable:!1},rgbToAnsi:{value:(u,F,C)=>G.ansi256ToAnsi(G.rgbToAnsi256(u,F,C)),enumerable:!1},hexToAnsi:{value:(u)=>G.ansi256ToAnsi(G.hexToAnsi256(u)),enumerable:!1}}),G}var LC=(D=0)=>(u)=>`\x1B[${u+D}m`,wC=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,qC=(D=0)=>(u,F,C)=>`\x1B[${38+D};2;${u};${F};${C}m`,G={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Ph=Object.keys(G.modifier),F9=Object.keys(G.color),C9=Object.keys(G.bgColor),Th=[...F9,...C9],B9=E9(),y=B9;import S0 from"process";import A9 from"os";import IC from"tty";function k(D,u=globalThis.Deno?globalThis.Deno.args:S0.argv){const F=D.startsWith("-")?"":D.length===1?"-":"--",C=u.indexOf(F+D),E=u.indexOf("--");return C!==-1&&(E===-1||C<E)}function h9(){if("FORCE_COLOR"in V){if(V.FORCE_COLOR==="true")return 1;if(V.FORCE_COLOR==="false")return 0;return V.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(V.FORCE_COLOR,10),3)}}function $9(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function _9(D,{streamIsTTY:u,sniffFlags:F=!0}={}){const C=h9();if(C!==void 0)Pu=C;const E=F?Pu:C;if(E===0)return 0;if(F){if(k("color=16m")||k("color=full")||k("color=truecolor"))return 3;if(k("color=256"))return 2}if("TF_BUILD"in V&&"AGENT_NAME"in V)return 1;if(D&&!u&&E===void 0)return 0;const B=E||0;if(V.TERM==="dumb")return B;if(S0.platform==="win32"){const A=A9.release().split(".");if(Number(A[0])>=10&&Number(A[2])>=10586)return Number(A[2])>=14931?3:2;return 1}if("CI"in V){if("GITHUB_ACTIONS"in V||"GITEA_ACTIONS"in V)return 3;if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((A)=>(A in V))||V.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in V)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(V.TEAMCITY_VERSION)?1:0;if(V.COLORTERM==="truecolor")return 3;if(V.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in V){const A=Number.parseInt((V.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(V.TERM_PROGRAM){case"iTerm.app":return A>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(V.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(V.TERM))return 1;if("COLORTERM"in V)return 1;return B}function jC(D,u={}){const F=_9(D,{streamIsTTY:D&&D.isTTY,...u});return $9(F)}var{env:V}=S0,Pu;if(k("no-color")||k("no-colors")||k("color=false")||k("color=never"))Pu=0;else if(k("color")||k("colors")||k("color=true")||k("color=always"))Pu=1;var U9={stdout:jC({isTTY:IC.isatty(1)}),stderr:jC({isTTY:IC.isatty(2)})},SC=U9;function PC(D,u,F){let C=D.indexOf(u);if(C===-1)return D;const E=u.length;let B=0,A="";do A+=D.slice(B,C)+u+F,B=C+E,C=D.indexOf(u,B);while(C!==-1);return A+=D.slice(B),A}function TC(D,u,F,C){let E=0,B="";do{const A=D[C-1]==="\r";B+=D.slice(E,A?C-1:C)+u+(A?"\r\n":"\n")+F,E=C+1,C=D.indexOf("\n",E)}while(C!==-1);return B+=D.slice(E),B}function uu(D){return H9(D)}var{stdout:bC,stderr:kC}=SC,P0=Symbol("GENERATOR"),SD=Symbol("STYLER"),Du=Symbol("IS_EMPTY"),dC=["ansi","ansi","ansi256","ansi16m"],PD=Object.create(null),M9=(D,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const F=bC?bC.level:0;D.level=u.level===void 0?F:u.level};var H9=(D)=>{const u=(...F)=>F.join(" ");return M9(u,D),Object.setPrototypeOf(u,uu.prototype),u};Object.setPrototypeOf(uu.prototype,Function.prototype);for(let[D,u]of Object.entries(y))PD[D]={get(){const F=Tu(this,b0(u.open,u.close,this[SD]),this[Du]);return Object.defineProperty(this,D,{value:F}),F}};PD.visible={get(){const D=Tu(this,this[SD],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var T0=(D,u,F,...C)=>{if(D==="rgb"){if(u==="ansi16m")return y[F].ansi16m(...C);if(u==="ansi256")return y[F].ansi256(y.rgbToAnsi256(...C));return y[F].ansi(y.rgbToAnsi(...C))}if(D==="hex")return T0("rgb",u,F,...y.hexToRgb(...C));return y[F][D](...C)},O9=["rgb","hex","ansi256"];for(let D of O9){PD[D]={get(){const{level:F}=this;return function(...C){const E=b0(T0(D,dC[F],"color",...C),y.color.close,this[SD]);return Tu(this,E,this[Du])}}};const u="bg"+D[0].toUpperCase()+D.slice(1);PD[u]={get(){const{level:F}=this;return function(...C){const E=b0(T0(D,dC[F],"bgColor",...C),y.bgColor.close,this[SD]);return Tu(this,E,this[Du])}}}}var Z9=Object.defineProperties(()=>{},{...PD,level:{enumerable:!0,get(){return this[P0].level},set(D){this[P0].level=D}}}),b0=(D,u,F)=>{let C,E;if(F===void 0)C=D,E=u;else C=F.openAll+D,E=u+F.closeAll;return{open:D,close:u,openAll:C,closeAll:E,parent:F}},Tu=(D,u,F)=>{const C=(...E)=>z9(C,E.length===1?""+E[0]:E.join(" "));return Object.setPrototypeOf(C,Z9),C[P0]=D,C[SD]=u,C[Du]=F,C},z9=(D,u)=>{if(D.level<=0||!u)return D[Du]?"":u;let F=D[SD];if(F===void 0)return u;const{openAll:C,closeAll:E}=F;if(u.includes("\x1B"))while(F!==void 0)u=PC(u,F.close,F.open),F=F.parent;const B=u.indexOf("\n");if(B!==-1)u=TC(u,E,C,B);return C+u+E};Object.defineProperties(uu.prototype,PD);var f9=uu(),nh=uu({level:kC?kC.level:0});var xC=f9;import aC from"process";import du from"process";var J9=(D,u,F,C)=>{if(F==="length"||F==="prototype")return;if(F==="arguments"||F==="caller")return;const E=Object.getOwnPropertyDescriptor(D,F),B=Object.getOwnPropertyDescriptor(u,F);if(!K9(E,B)&&C)return;Object.defineProperty(D,F,B)},K9=function(D,u){return D===void 0||D.configurable||D.writable===u.writable&&D.enumerable===u.enumerable&&D.configurable===u.configurable&&(D.writable||D.value===u.value)},Q9=(D,u)=>{const F=Object.getPrototypeOf(u);if(F===Object.getPrototypeOf(D))return;Object.setPrototypeOf(D,F)},X9=(D,u)=>`/* Wrapped ${D}*/\n${u}`,G9=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Y9=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),W9=(D,u,F)=>{const C=F===""?"":`with ${F.trim()}() `,E=X9.bind(null,C,u.toString());Object.defineProperty(E,"name",Y9);const{writable:B,enumerable:A,configurable:h}=G9;Object.defineProperty(D,"toString",{value:E,writable:B,enumerable:A,configurable:h})};function k0(D,u,{ignoreNonConfigurable:F=!1}={}){const{name:C}=D;for(let E of Reflect.ownKeys(u))J9(D,u,E,F);return Q9(D,u),W9(D,u,C),D}var bu=new WeakMap,vC=(D,u={})=>{if(typeof D!=="function")throw new TypeError("Expected a function");let F,C=0;const E=D.displayName||D.name||"<anonymous>",B=function(...A){if(bu.set(B,++C),C===1)F=D.apply(this,A),D=void 0;else if(u.throw===!0)throw new Error(`Function \`${E}\` can only be called once`);return F};return k0(B,D),bu.set(B,C),B};vC.callCount=(D)=>{if(!bu.has(D))throw new Error(`The given function \`${D.name}\` is not wrapped by the \`onetime\` package`);return bu.get(D)};var gC=vC;var QD=[];QD.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")QD.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")QD.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ku=(D)=>!!D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function",d0=Symbol.for("signal-exit emitter"),x0=globalThis,R9=Object.defineProperty.bind(Object);class yC{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(x0[d0])return x0[d0];R9(x0,d0,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(D,u){this.listeners[D].push(u)}removeListener(D,u){const F=this.listeners[D],C=F.indexOf(u);if(C===-1)return;if(C===0&&F.length===1)F.length=0;else F.splice(C,1)}emit(D,u,F){if(this.emitted[D])return!1;this.emitted[D]=!0;let C=!1;for(let E of this.listeners[D])C=E(u,F)===!0||C;if(D==="exit")C=this.emit("afterExit",u,F)||C;return C}}class g0{}var N9=(D)=>{return{onExit(u,F){return D.onExit(u,F)},load(){return D.load()},unload(){return D.unload()}}};class cC extends g0{onExit(){return()=>{}}load(){}unload(){}}class mC extends g0{#E=v0.platform==="win32"?"SIGINT":"SIGHUP";#C=new yC;#D;#B;#u;#A={};#F=!1;constructor(D){super();this.#D=D,this.#A={};for(let u of QD)this.#A[u]=()=>{const F=this.#D.listeners(u);let{count:C}=this.#C;const E=D;if(typeof E.__signal_exit_emitter__==="object"&&typeof E.__signal_exit_emitter__.count==="number")C+=E.__signal_exit_emitter__.count;if(F.length===C){this.unload();const B=this.#C.emit("exit",null,u),A=u==="SIGHUP"?this.#E:u;if(!B)D.kill(D.pid,A)}};this.#u=D.reallyExit,this.#B=D.emit}onExit(D,u){if(!ku(this.#D))return()=>{};if(this.#F===!1)this.load();const F=u?.alwaysLast?"afterExit":"exit";return this.#C.on(F,D),()=>{if(this.#C.removeListener(F,D),this.#C.listeners.exit.length===0&&this.#C.listeners.afterExit.length===0)this.unload()}}load(){if(this.#F)return;this.#F=!0,this.#C.count+=1;for(let D of QD)try{const u=this.#A[D];if(u)this.#D.on(D,u)}catch(u){}this.#D.emit=(D,...u)=>{return this.#O(D,...u)},this.#D.reallyExit=(D)=>{return this.#H(D)}}unload(){if(!this.#F)return;this.#F=!1,QD.forEach((D)=>{const u=this.#A[D];if(!u)throw new Error("Listener not defined for signal: "+D);try{this.#D.removeListener(D,u)}catch(F){}}),this.#D.emit=this.#B,this.#D.reallyExit=this.#u,this.#C.count-=1}#H(D){if(!ku(this.#D))return 0;return this.#D.exitCode=D||0,this.#C.emit("exit",this.#D.exitCode,null),this.#u.call(this.#D,this.#D.exitCode)}#O(D,...u){const F=this.#B;if(D==="exit"&&ku(this.#D)){if(typeof u[0]==="number")this.#D.exitCode=u[0];const C=F.call(this.#D,D,...u);return this.#C.emit("exit",this.#D.exitCode,null),C}else return F.call(this.#D,D,...u)}}var v0=globalThis.process,{onExit:nC,load:sh,unload:oh}=N9(ku(v0)?new mC(v0):new cC);var lC=du.stderr.isTTY?du.stderr:du.stdout.isTTY?du.stdout:void 0,V9=lC?gC(()=>{nC(()=>{lC.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},iC=V9;var xu=!1,TD={};TD.show=(D=aC.stderr)=>{if(!D.isTTY)return;xu=!1,D.write("\x1B[?25h")};TD.hide=(D=aC.stderr)=>{if(!D.isTTY)return;iC(),xu=!0,D.write("\x1B[?25l")};TD.toggle=(D,u)=>{if(D!==void 0)xu=D;if(xu)TD.show(u);else TD.hide(u)};var y0=TD;var Au=iu(c0(),1);function I9(){const D=new Map;for(let[u,F]of Object.entries(Y)){for(let[C,E]of Object.entries(F))Y[C]={open:`\x1B[${E[0]}m`,close:`\x1B[${E[1]}m`},F[C]=Y[C],D.set(E[0],E[1]);Object.defineProperty(Y,u,{value:F,enumerable:!1})}return Object.defineProperty(Y,"codes",{value:D,enumerable:!1}),Y.color.close="\x1B[39m",Y.bgColor.close="\x1B[49m",Y.color.ansi=sC(),Y.color.ansi256=oC(),Y.color.ansi16m=eC(),Y.bgColor.ansi=sC(10),Y.bgColor.ansi256=oC(10),Y.bgColor.ansi16m=eC(10),Object.defineProperties(Y,{rgbToAnsi256:{value(u,F,C){if(u===F&&F===C){if(u<8)return 16;if(u>248)return 231;return Math.round((u-8)/247*24)+232}return 16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(C/255*5)},enumerable:!1},hexToRgb:{value(u){const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[C]=F;if(C.length===3)C=[...C].map((B)=>B+B).join("");const E=Number.parseInt(C,16);return[E>>16&255,E>>8&255,E&255]},enumerable:!1},hexToAnsi256:{value:(u)=>Y.rgbToAnsi256(...Y.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,C,E;if(u>=232)F=((u-232)*10+8)/255,C=F,E=F;else{u-=16;const h=u%36;F=Math.floor(u/36)/5,C=Math.floor(h/6)/5,E=h%6/5}const B=Math.max(F,C,E)*2;if(B===0)return 30;let A=30+(Math.round(E)<<2|Math.round(C)<<1|Math.round(F));if(B===2)A+=60;return A},enumerable:!1},rgbToAnsi:{value:(u,F,C)=>Y.ansi256ToAnsi(Y.rgbToAnsi256(u,F,C)),enumerable:!1},hexToAnsi:{value:(u)=>Y.ansi256ToAnsi(Y.hexToAnsi256(u)),enumerable:!1}}),Y}var sC=(D=0)=>(u)=>`\x1B[${u+D}m`,oC=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,eC=(D=0)=>(u,F,C)=>`\x1B[${38+D};2;${u};${F};${C}m`,Y={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(Y.modifier),w9=Object.keys(Y.color),q9=Object.keys(Y.bgColor),U$=[...w9,...q9],j9=I9(),c=j9;import m0 from"process";import S9 from"os";import DE from"tty";function d(D,u=globalThis.Deno?globalThis.Deno.args:m0.argv){const F=D.startsWith("-")?"":D.length===1?"-":"--",C=u.indexOf(F+D),E=u.indexOf("--");return C!==-1&&(E===-1||C<E)}function P9(){if("FORCE_COLOR"in L){if(L.FORCE_COLOR==="true")return 1;if(L.FORCE_COLOR==="false")return 0;return L.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(L.FORCE_COLOR,10),3)}}function T9(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function b9(D,{streamIsTTY:u,sniffFlags:F=!0}={}){const C=P9();if(C!==void 0)gu=C;const E=F?gu:C;if(E===0)return 0;if(F){if(d("color=16m")||d("color=full")||d("color=truecolor"))return 3;if(d("color=256"))return 2}if("TF_BUILD"in L&&"AGENT_NAME"in L)return 1;if(D&&!u&&E===void 0)return 0;const B=E||0;if(L.TERM==="dumb")return B;if(m0.platform==="win32"){const A=S9.release().split(".");if(Number(A[0])>=10&&Number(A[2])>=10586)return Number(A[2])>=14931?3:2;return 1}if("CI"in L){if("GITHUB_ACTIONS"in L||"GITEA_ACTIONS"in L)return 3;if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((A)=>(A in L))||L.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in L)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(L.TEAMCITY_VERSION)?1:0;if(L.COLORTERM==="truecolor")return 3;if(L.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in L){const A=Number.parseInt((L.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(L.TERM_PROGRAM){case"iTerm.app":return A>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(L.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(L.TERM))return 1;if("COLORTERM"in L)return 1;return B}function uE(D,u={}){const F=b9(D,{streamIsTTY:D&&D.isTTY,...u});return T9(F)}var{env:L}=m0,gu;if(d("no-color")||d("no-colors")||d("color=false")||d("color=never"))gu=0;else if(d("color")||d("colors")||d("color=true")||d("color=always"))gu=1;var k9={stdout:uE({isTTY:DE.isatty(1)}),stderr:uE({isTTY:DE.isatty(2)})},FE=k9;function CE(D,u,F){let C=D.indexOf(u);if(C===-1)return D;const E=u.length;let B=0,A="";do A+=D.slice(B,C)+u+F,B=C+E,C=D.indexOf(u,B);while(C!==-1);return A+=D.slice(B),A}function EE(D,u,F,C){let E=0,B="";do{const A=D[C-1]==="\r";B+=D.slice(E,A?C-1:C)+u+(A?"\r\n":"\n")+F,E=C+1,C=D.indexOf("\n",E)}while(C!==-1);return B+=D.slice(E),B}function Cu(D){return x9(D)}var{stdout:BE,stderr:AE}=FE,n0=Symbol("GENERATOR"),bD=Symbol("STYLER"),Fu=Symbol("IS_EMPTY"),hE=["ansi","ansi","ansi256","ansi16m"],kD=Object.create(null),d9=(D,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const F=BE?BE.level:0;D.level=u.level===void 0?F:u.level};var x9=(D)=>{const u=(...F)=>F.join(" ");return d9(u,D),Object.setPrototypeOf(u,Cu.prototype),u};Object.setPrototypeOf(Cu.prototype,Function.prototype);for(let[D,u]of Object.entries(c))kD[D]={get(){const F=yu(this,i0(u.open,u.close,this[bD]),this[Fu]);return Object.defineProperty(this,D,{value:F}),F}};kD.visible={get(){const D=yu(this,this[bD],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var l0=(D,u,F,...C)=>{if(D==="rgb"){if(u==="ansi16m")return c[F].ansi16m(...C);if(u==="ansi256")return c[F].ansi256(c.rgbToAnsi256(...C));return c[F].ansi(c.rgbToAnsi(...C))}if(D==="hex")return l0("rgb",u,F,...c.hexToRgb(...C));return c[F][D](...C)},v9=["rgb","hex","ansi256"];for(let D of v9){kD[D]={get(){const{level:F}=this;return function(...C){const E=i0(l0(D,hE[F],"color",...C),c.color.close,this[bD]);return yu(this,E,this[Fu])}}};const u="bg"+D[0].toUpperCase()+D.slice(1);kD[u]={get(){const{level:F}=this;return function(...C){const E=i0(l0(D,hE[F],"bgColor",...C),c.bgColor.close,this[bD]);return yu(this,E,this[Fu])}}}}var g9=Object.defineProperties(()=>{},{...kD,level:{enumerable:!0,get(){return this[n0].level},set(D){this[n0].level=D}}}),i0=(D,u,F)=>{let C,E;if(F===void 0)C=D,E=u;else C=F.openAll+D,E=u+F.closeAll;return{open:D,close:u,openAll:C,closeAll:E,parent:F}},yu=(D,u,F)=>{const C=(...E)=>y9(C,E.length===1?""+E[0]:E.join(" "));return Object.setPrototypeOf(C,g9),C[n0]=D,C[bD]=u,C[Fu]=F,C},y9=(D,u)=>{if(D.level<=0||!u)return D[Fu]?"":u;let F=D[bD];if(F===void 0)return u;const{openAll:C,closeAll:E}=F;if(u.includes("\x1B"))while(F!==void 0)u=CE(u,F.close,F.open),F=F.parent;const B=u.indexOf("\n");if(B!==-1)u=EE(u,E,C,B);return C+u+E};Object.defineProperties(Cu.prototype,kD);var c9=Cu(),X$=Cu({level:AE?AE.level:0});var AD=c9;import m from"process";function a0(){if(m.platform!=="win32")return m.env.TERM!=="linux";return Boolean(m.env.CI)||Boolean(m.env.WT_SESSION)||Boolean(m.env.TERMINUS_SUBLIME)||m.env.ConEmuTask==="{cmd::Cmder}"||m.env.TERM_PROGRAM==="Terminus-Sublime"||m.env.TERM_PROGRAM==="vscode"||m.env.TERM==="xterm-256color"||m.env.TERM==="alacritty"||m.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var m9={info:AD.blue("\u2139"),success:AD.green("\u2714"),warning:AD.yellow("\u26A0"),error:AD.red("\u2716")},n9={info:AD.blue("i"),success:AD.green("\u221A"),warning:AD.yellow("\u203C"),error:AD.red("\xD7")},l9=a0()?m9:n9,Eu=l9;function p0({onlyFirst:D=!1}={}){const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}var i9=p0();function Bu(D){if(typeof D!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(i9,"")}function $E(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}function _E(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function UE(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9800&&D<=9811||D===9855||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12771||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=19903||D>=19968&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D===94192||D===94193||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101632&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129672||D>=129680&&D<=129725||D>=129727&&D<=129733||D>=129742&&D<=129755||D>=129760&&D<=129768||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function a9(D){if(!Number.isSafeInteger(D))throw new TypeError(`Expected a code point, got \`${typeof D}\`.`)}function ME(D,{ambiguousAsWide:u=!1}={}){if(a9(D),_E(D)||UE(D)||u&&$E(D))return 2;return 1}var HE=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g};var p9=new Intl.Segmenter,t9=/^\p{Default_Ignorable_Code_Point}$/u;function t0(D,u={}){if(typeof D!=="string"||D.length===0)return 0;const{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:C=!1}=u;if(!C)D=Bu(D);if(D.length===0)return 0;let E=0;const B={ambiguousAsWide:!F};for(let{segment:A}of p9.segment(D)){const h=A.codePointAt(0);if(h<=31||h>=127&&h<=159)continue;if(h>=8203&&h<=8207||h===65279)continue;if(h>=768&&h<=879||h>=6832&&h<=6911||h>=7616&&h<=7679||h>=8400&&h<=8447||h>=65056&&h<=65071)continue;if(h>=55296&&h<=57343)continue;if(h>=65024&&h<=65039)continue;if(t9.test(A))continue;if(HE().test(A)){E+=2;continue}E+=ME(h,B)}return E}function r0({stream:D=process.stdout}={}){return Boolean(D&&D.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import r from"process";function s0(){if(r.platform!=="win32")return r.env.TERM!=="linux";return Boolean(r.env.WT_SESSION)||Boolean(r.env.TERMINUS_SUBLIME)||r.env.ConEmuTask==="{cmd::Cmder}"||r.env.TERM_PROGRAM==="Terminus-Sublime"||r.env.TERM_PROGRAM==="vscode"||r.env.TERM==="xterm-256color"||r.env.TERM==="alacritty"||r.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}import s from"process";var r9=3;class OE{#E=0;start(){if(this.#E++,this.#E===1)this.#C()}stop(){if(this.#E<=0)throw new Error("`stop` called more times than `start`");if(this.#E--,this.#E===0)this.#D()}#C(){if(s.platform==="win32"||!s.stdin.isTTY)return;s.stdin.setRawMode(!0),s.stdin.on("data",this.#B),s.stdin.resume()}#D(){if(!s.stdin.isTTY)return;s.stdin.off("data",this.#B),s.stdin.pause(),s.stdin.setRawMode(!1)}#B(D){if(D[0]===r9)s.emit("SIGINT")}}var s9=new OE,o0=s9;var o9=iu(c0(),1);class ZE{#E=0;#C=!1;#D=0;#B=0;#u;#A;#F;#H;#O;#_;#U;#M;#z;#h;#$;color;constructor(D){if(typeof D==="string")D={text:D};if(this.#u={color:"cyan",stream:cu.stderr,discardStdin:!0,hideCursor:!0,...D},this.color=this.#u.color,this.spinner=this.#u.spinner,this.#O=this.#u.interval,this.#F=this.#u.stream,this.#_=typeof this.#u.isEnabled==="boolean"?this.#u.isEnabled:r0({stream:this.#F}),this.#U=typeof this.#u.isSilent==="boolean"?this.#u.isSilent:!1,this.text=this.#u.text,this.prefixText=this.#u.prefixText,this.suffixText=this.#u.suffixText,this.indent=this.#u.indent,cu.env.NODE_ENV==="test")this._stream=this.#F,this._isEnabled=this.#_,Object.defineProperty(this,"_linesToClear",{get(){return this.#E},set(u){this.#E=u}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#B}}),Object.defineProperty(this,"_lineCount",{get(){return this.#D}})}get indent(){return this.#M}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw new Error("The `indent` option must be an integer from 0 and up");this.#M=D,this.#Z()}get interval(){return this.#O??this.#A.interval??100}get spinner(){return this.#A}set spinner(D){if(this.#B=0,this.#O=void 0,typeof D==="object"){if(D.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#A=D}else if(!s0())this.#A=Au.default.line;else if(D===void 0)this.#A=Au.default.dots;else if(D!=="default"&&Au.default[D])this.#A=Au.default[D];else throw new Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#z}set text(D=""){this.#z=D,this.#Z()}get prefixText(){return this.#h}set prefixText(D=""){this.#h=D,this.#Z()}get suffixText(){return this.#$}set suffixText(D=""){this.#$=D,this.#Z()}get isSpinning(){return this.#H!==void 0}#f(D=this.#h,u=" "){if(typeof D==="string"&&D!=="")return D+u;if(typeof D==="function")return D()+u;return""}#J(D=this.#$,u=" "){if(typeof D==="string"&&D!=="")return u+D;if(typeof D==="function")return u+D();return""}#Z(){const D=this.#F.columns??80,u=this.#f(this.#h,"-"),F=this.#J(this.#$,"-"),C=" ".repeat(this.#M)+u+"--"+this.#z+"--"+F;this.#D=0;for(let E of Bu(C).split("\n"))this.#D+=Math.max(1,Math.ceil(t0(E,{countAnsiEscapeCodes:!0})/D))}get isEnabled(){return this.#_&&!this.#U}set isEnabled(D){if(typeof D!=="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#_=D}get isSilent(){return this.#U}set isSilent(D){if(typeof D!=="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#U=D}frame(){const{frames:D}=this.#A;let u=D[this.#B];if(this.color)u=xC[this.color](u);this.#B=++this.#B%D.length;const F=typeof this.#h==="string"&&this.#h!==""?this.#h+" ":"",C=typeof this.text==="string"?" "+this.text:"",E=typeof this.#$==="string"&&this.#$!==""?" "+this.#$:"";return F+u+C+E}clear(){if(!this.#_||!this.#F.isTTY)return this;this.#F.cursorTo(0);for(let D=0;D<this.#E;D++){if(D>0)this.#F.moveCursor(0,-1);this.#F.clearLine(1)}if(this.#M||this.lastIndent!==this.#M)this.#F.cursorTo(this.#M);return this.lastIndent=this.#M,this.#E=0,this}render(){if(this.#U)return this;return this.clear(),this.#F.write(this.frame()),this.#E=this.#D,this}start(D){if(D)this.text=D;if(this.#U)return this;if(!this.#_){if(this.text)this.#F.write(`- ${this.text}\n`);return this}if(this.isSpinning)return this;if(this.#u.hideCursor)y0.hide(this.#F);if(this.#u.discardStdin&&cu.stdin.isTTY)this.#C=!0,o0.start();return this.render(),this.#H=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.#_)return this;if(clearInterval(this.#H),this.#H=void 0,this.#B=0,this.clear(),this.#u.hideCursor)y0.show(this.#F);if(this.#u.discardStdin&&cu.stdin.isTTY&&this.#C)o0.stop(),this.#C=!1;return this}succeed(D){return this.stopAndPersist({symbol:Eu.success,text:D})}fail(D){return this.stopAndPersist({symbol:Eu.error,text:D})}warn(D){return this.stopAndPersist({symbol:Eu.warning,text:D})}info(D){return this.stopAndPersist({symbol:Eu.info,text:D})}stopAndPersist(D={}){if(this.#U)return this;const u=D.prefixText??this.#h,F=this.#f(u," "),C=D.symbol??" ",E=D.text??this.text,B=typeof E==="string"?" "+E:"",A=D.suffixText??this.#$,h=this.#J(A," "),$=F+C+B+h+"\n";return this.stop(),this.#F.write($),this}}function e0(D){return new ZE(D)}var u_=e0;var export_prompts=I4.default;export{g8 as yellow,m8 as white,T8 as underline,OC as trueColorBg,HC as trueColor,S8 as stripColors,eD as stripAnsi,d8 as strikethrough,u_ as spinner,Mh as runProcess,Oh as runCommands,Hh as runCommandSync,Su as runCommand,YC as rightAlign,P8 as reset,v8 as red,Ch as quotes,export_prompts as prompts,Ih as parseOptions,u9 as parseArgv,qh as parseArgs,Nh as outro,c8 as magenta,I as log,ZC as link,a8 as lightYellow,l8 as lightRed,t8 as lightMagenta,i8 as lightGreen,n8 as lightGray,r8 as lightCyan,p8 as lightBlue,WC as leftAlign,zC as kolorist,KD as italic,b8 as inverse,Rh as intro,V5 as installStack,N5 as installPackage,k8 as hidden,wu as green,oD as gray,q0 as getColor,L8 as execSync,N0 as exec,qD as dim,qu as cyan,fh as command,w0 as colors,c4 as colorize,P5 as cli,GC as centerAlign,jh as buddyOptions,i4 as box,JD as bold,y8 as blue,x8 as black,DC as bgYellow,CC as bgWhite,o8 as bgRed,FC as bgMagenta,hC as bgLightYellow,BC as bgLightRed,_C as bgLightMagenta,AC as bgLightGreen,MC as bgLightGray,UC as bgLightCyan,$C as bgLightBlue,e8 as bgGreen,EC as bgGray,Iu as bgCyan,uC as bgBlue,s8 as bgBlack,L0 as ansi256Bg,V0 as ansi256,n4 as align,t4 as Command,ou as CAC};
17
+ ${$.body}`:$.body}).join("\n\n"))}outputVersion(){const{name:D}=this.cli,{versionNumber:u}=this.cli.globalCommand;if(u)console.log(`${D}/${u} ${V6}`)}checkRequiredArgs(){const D=this.args.filter((u)=>u.required).length;if(this.cli.args.length<D)throw new $u(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){const{options:D,globalCommand:u}=this.cli;if(!this.config.allowUnknownOptions){for(let F of Object.keys(D))if(F!=="--"&&!this.hasOption(F)&&!u.hasOption(F))throw new $u(`Unknown option \`${F.length>1?`--${F}`:`-${F}`}\``)}}checkOptionValue(){const{options:D,globalCommand:u}=this.cli,F=[...u.options,...this.options];for(let C of F){const E=D[C.name.split(".")[0]];if(C.required){const B=F.some((A)=>A.negated&&A.names.includes(C.name));if(E===!0||E===!1&&!B)throw new $u(`option \`${C.rawName}\` value is missing`)}}}}class su extends ru{constructor(D){super("@@global@@","",{},D)}}var hu=Object.assign;class ou extends f6{constructor(D=""){super();this.name=D,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new su(this),this.globalCommand.usage("<command> [options]")}usage(D){return this.globalCommand.usage(D),this}command(D,u,F){const C=new ru(D,u||"",F,this);return C.globalCommand=this.globalCommand,this.commands.push(C),C}option(D,u,F){return this.globalCommand.option(D,u,F),this}help(D){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=D,this.showHelpOnExit=!0,this}version(D,u="-v, --version"){return this.globalCommand.version(D,u),this.showVersionOnExit=!0,this}example(D){return this.globalCommand.example(D),this}outputHelp(){if(this.matchedCommand)this.matchedCommand.outputHelp();else this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:D,options:u},F,C){if(this.args=D,this.options=u,F)this.matchedCommand=F;if(C)this.matchedCommandName=C;return this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(D=N6,{run:u=!0}={}){if(this.rawArgs=D,!this.name)this.name=D[1]?R6(D[1]):"cli";let F=!0;for(let E of this.commands){const B=this.mri(D.slice(2),E),A=B.args[0];if(E.isMatched(A)){F=!1;const h=hu(hu({},B),{args:B.args.slice(1)});this.setParsedInfo(h,E,A),this.emit(`command:${A}`,E)}}if(F){for(let E of this.commands)if(E.name===""){F=!1;const B=this.mri(D.slice(2),E);this.setParsedInfo(B,E),this.emit("command:!",E)}}if(F){const E=this.mri(D.slice(2));this.setParsedInfo(E)}if(this.options.help&&this.showHelpOnExit)this.outputHelp(),u=!1,this.unsetMatchedCommand();if(this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null)this.outputVersion(),u=!1,this.unsetMatchedCommand();const C={args:this.args,options:this.options};if(u)this.runMatchedCommand();if(!this.matchedCommand&&this.args[0])this.emit("command:*");return C}mri(D,u){const F=[...this.globalCommand.options,...u?u.options:[]],C=X6(F);let E=[];const B=D.indexOf("--");if(B>-1)E=D.slice(B+1),D=D.slice(0,B);let A=K6(D,C);A=Object.keys(A).reduce((H,U)=>{return hu(hu({},H),{[MF(U)]:A[U]})},{_:[]});const h=A._,$={"--":E},_=u&&u.config.ignoreOptionDefaultValue?u.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue;let M=Object.create(null);for(let H of F){if(!_&&H.config.default!==void 0)for(let U of H.names)$[U]=H.config.default;if(Array.isArray(H.config.type)){if(M[H.name]===void 0)M[H.name]=Object.create(null),M[H.name].shouldTransform=!0,M[H.name].transformFunction=H.config.type[0]}}for(let H of Object.keys(A))if(H!=="_"){const U=H.split(".");Y6($,U,A[H]),W6($,M)}return{args:h,options:$}}runMatchedCommand(){const{args:D,options:u,matchedCommand:F}=this;if(!F||!F.commandAction)return;F.checkUnknownOptions(),F.checkOptionValue(),F.checkRequiredArgs();const C=[];return F.args.forEach((E,B)=>{if(E.variadic)C.push(D.slice(B));else C.push(D[B])}),C.push(u),F.commandAction.apply(this,C)}}function P5(D,u){if(typeof D==="object")u=D,D=u.name;return new ou(D||"buddy")}import{ExitCode as p4}from"@stacksjs/types";var I4=iu(R8(),1);import{log as I}from"@stacksjs/logging";import tD from"process";import{err as N8,handleError as V8,ok as j4}from"@stacksjs/error-handling";import{ExitCode as rD}from"@stacksjs/types";async function N0(D,u){const F=Array.isArray(D)?D:D.match(/(?:[^\s"]+|"[^"]*")+/g);if(!F)return N8(V8(`Failed to parse command: ${F}`,u));I.debug("exec:",Array.isArray(D)?D.join(" "):D),I.debug("cmd:",F),I.debug("exec options:",u);const C=u?.cwd||tD.cwd(),E=Bun.spawn(F,{...u,stdout:u?.silent||u?.quiet?"ignore":u?.stdin?u.stdin:u?.stdout||"inherit",stderr:u?.silent||u?.quiet?"ignore":u?.stderr||"inherit",detached:u?.background||!1,cwd:C,onExit(A,h,$,_){w8("spawn",A,h,$,_)}});if(u?.stdin==="pipe"&&u.input){if(E.stdin)E.stdin.write(u.input),E.stdin.end()}if(await E.exited===rD.Success)return j4(E);return N8(V8(`Failed to execute command: ${F.join(" ")}`))}async function L8(D,u){I.debug("Running ExecSync:",D),I.debug("ExecSync Options:",u);const F=Array.isArray(D)?D:D.match(/(?:[^\s"]+|"[^"]*")+/g);if(!F)I.error(`Failed to parse command: ${F}`,u),tD.exit(rD.FatalError);return Bun.spawnSync(F,{...u,stdin:u?.stdin??"inherit",stdout:u?.stdout??"pipe",stderr:u?.stderr??"inherit",cwd:u?.cwd??tD.cwd(),onExit(E,B,A,h){w8("spawnSync",E,B,A,h)}}).stdout.toString()}function w8(D,u,F,C,E){if(I.debug(`exitHandler: ${D}`),I.debug("subprocess",u),I.debug("exitCode",F),I.debug("signalCode",C),E)I.error(E),tD.exit(rD.FatalError);if(F!==rD.Success&&F)tD.exit(F)}import{collect as a4}from"@stacksjs/collections";var zC={};XE(zC,{yellow:()=>g8,white:()=>m8,underline:()=>T8,trueColorBg:()=>OC,trueColor:()=>HC,stripColors:()=>S8,strikethrough:()=>d8,reset:()=>P8,red:()=>v8,options:()=>wD,magenta:()=>c8,link:()=>ZC,lightYellow:()=>a8,lightRed:()=>l8,lightMagenta:()=>t8,lightGreen:()=>i8,lightGray:()=>n8,lightCyan:()=>r8,lightBlue:()=>p8,italic:()=>KD,inverse:()=>b8,hidden:()=>k8,green:()=>wu,gray:()=>oD,dim:()=>qD,cyan:()=>qu,bold:()=>JD,blue:()=>y8,black:()=>x8,bgYellow:()=>DC,bgWhite:()=>CC,bgRed:()=>o8,bgMagenta:()=>FC,bgLightYellow:()=>hC,bgLightRed:()=>BC,bgLightMagenta:()=>_C,bgLightGreen:()=>AC,bgLightGray:()=>MC,bgLightCyan:()=>UC,bgLightBlue:()=>$C,bgGreen:()=>e8,bgGray:()=>EC,bgCyan:()=>Iu,bgBlue:()=>uC,bgBlack:()=>s8,ansi256Bg:()=>L0,ansi256:()=>V0});function z(D,u,F=1){const C=`\x1B[${D}m`,E=`\x1B[${u}m`,B=new RegExp(`\\x1b\\[${u}m`,"g");return(A)=>{return wD.enabled&&wD.supportLevel>=F?C+(""+A).replace(B,C)+E:""+A}}function j8(D,u,F){if(D>>4===u>>4&&u>>4===F>>4){if(D<8)return 16;if(D>248)return 231;return Math.round((D-8)/247*24)+232}return 16+36*Math.round(D/255*5)+6*Math.round(u/255*5)+Math.round(F/255*5)}function S8(D){return(""+D).replace(/\x1b\[[0-9;]+m/g,"").replace(/\x1b\]8;;.*?\x07(.*?)\x1b\]8;;\x07/g,(u,F)=>F)}function ZC(D,u){return wD.enabled?q8+"8"+Lu+Lu+u+I8+D+q8+"8"+Lu+Lu+I8:`${D} (\u200B${u}\u200B)`}var fD=!0,LD=typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:{},sD=0;if(LD.process&&LD.process.env&&LD.process.stdout){const{FORCE_COLOR:D,NODE_DISABLE_COLORS:u,NO_COLOR:F,TERM:C,COLORTERM:E}=LD.process.env;if(u||F||D==="0")fD=!1;else if(D==="1"||D==="2"||D==="3")fD=!0;else if(C==="dumb")fD=!1;else if("CI"in LD.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((B)=>(B in LD.process.env)))fD=!0;else fD=process.stdout.isTTY;if(fD)if(process.platform==="win32")sD=3;else if(E&&(E==="truecolor"||E==="24bit"))sD=3;else if(C&&(C.endsWith("-256color")||C.endsWith("256")))sD=2;else sD=1}var wD={enabled:fD,supportLevel:sD},P8=z(0,0),JD=z(1,22),qD=z(2,22),KD=z(3,23),T8=z(4,24),b8=z(7,27),k8=z(8,28),d8=z(9,29),x8=z(30,39),v8=z(31,39),wu=z(32,39),g8=z(33,39),y8=z(34,39),c8=z(35,39),qu=z(36,39),m8=z(97,39),oD=z(90,39),n8=z(37,39),l8=z(91,39),i8=z(92,39),a8=z(93,39),p8=z(94,39),t8=z(95,39),r8=z(96,39),s8=z(40,49),o8=z(41,49),e8=z(42,49),DC=z(43,49),uC=z(44,49),FC=z(45,49),Iu=z(46,49),CC=z(107,49),EC=z(100,49),BC=z(101,49),AC=z(102,49),hC=z(103,49),$C=z(104,49),_C=z(105,49),UC=z(106,49),MC=z(47,49),V0=(D)=>z("38;5;"+D,0,2),L0=(D)=>z("48;5;"+D,0,2),HC=(D,u,F)=>{return wD.supportLevel===2?V0(j8(D,u,F)):z(`38;2;${D};${u};${F}`,0,3)},OC=(D,u,F)=>{return wD.supportLevel===2?L0(j8(D,u,F)):z(`48;2;${D};${u};${F}`,0,3)},q8="\x1B]",I8="\x07",Lu=";";import*as ju from"tty";function XC(D,u,F,C,E=u.slice(0,Math.max(0,D))+C,B=u.slice(Math.max(0,D+F.length)),A=B.indexOf(F)){return E+(A<0?B:XC(A,B,F,C))}function v4(D,u,F,C,E){return D<0?F+u+C:F+XC(D,u,C,E)+C}function g4(D,u,F=D,C=D.length+1){return(E)=>E||!(E===""||E===void 0)?v4((""+E).indexOf(u,C),E,D,u,F):""}function f(D,u,F){return g4(`\x1B[${D}m`,`\x1B[${u}m`,F)}function y4(D=x4){return D?fC:Object.fromEntries(Object.keys(fC).map((u)=>[u,String]))}function q0(D,u="reset"){return w0[D]||w0[u]}function c4(D,u){return q0(D)(u)}function eD(D){return D.replace(new RegExp(m4,"g"),"")}function GC(D,u,F=" "){const C=u-D.length;if(C<=0)return D;const E=Math.floor(C/2);let B="";for(let A=0;A<u;A++)B+=A<E||A>=E+D.length?F:D[A-E];return B}function YC(D,u,F=" "){const C=u-D.length;if(C<=0)return D;let E="";for(let B=0;B<u;B++)E+=B<C?F:D[B-C];return E}function WC(D,u,F=" "){let C="";for(let E=0;E<u;E++)C+=E<D.length?D[E]:F;return C}function n4(D,u,F,C=" "){switch(D){case"left":return WC(u,F,C);case"right":return YC(u,F,C);case"center":return GC(u,F,C);default:return u}}function i4(D,u={}){const F={...u,style:{...l4,...u.style}},C=D.split("\n"),E=[],B=q0(F.style.borderColor),A={...typeof F.style.borderStyle==="string"?JC[F.style.borderStyle]||JC.solid:F.style.borderStyle};if(B)for(let Z in A)A[Z]=B(A[Z]);const h=F.style.padding%2===0?F.style.padding:F.style.padding+1,$=C.length+h,_=Math.max(...C.map((Z)=>Z.length))+h,M=_+h,H=F.style.marginLeft>0?" ".repeat(F.style.marginLeft):"";if(F.style.marginTop>0)E.push("".repeat(F.style.marginTop));if(F.title){const Z=A.h.repeat(Math.floor((_-eD(F.title).length)/2)),J=A.h.repeat(_-eD(F.title).length-eD(Z).length+h);E.push(`${H}${A.tl}${Z}${F.title}${J}${A.tr}`)}else E.push(`${H}${A.tl}${A.h.repeat(M)}${A.tr}`);const U=F.style.valign==="center"?Math.floor(($-C.length)/2):F.style.valign==="top"?$-C.length-h:$-C.length;for(let Z=0;Z<$;Z++)if(Z<U||Z>=U+C.length)E.push(`${H}${A.v}${" ".repeat(M)}${A.v}`);else{const J=C[Z-U],X=" ".repeat(h),w=" ".repeat(_-eD(J).length);E.push(`${H}${A.v}${X}${J}${w}${A.v}`)}if(E.push(`${H}${A.bl}${A.h.repeat(M)}${A.br}`),F.style.marginBottom>0)E.push("".repeat(F.style.marginBottom));return E.join("\n")}var{env:HD={},argv:KC=[],platform:S4=""}=typeof process==="undefined"?{}:process,P4="NO_COLOR"in HD||KC.includes("--no-color"),T4="FORCE_COLOR"in HD||KC.includes("--color"),b4=S4==="win32",QC=HD.TERM==="dumb",k4=ju&&ju.isatty&&ju.isatty(1)&&HD.TERM&&!QC,d4="CI"in HD&&(("GITHUB_ACTIONS"in HD)||("GITLAB_CI"in HD)||("CIRCLECI"in HD)),x4=!P4&&(T4||b4&&!QC||k4||d4),fC={reset:f(0,0),bold:f(1,22,"\x1B[22m\x1B[1m"),dim:f(2,22,"\x1B[22m\x1B[2m"),italic:f(3,23),underline:f(4,24),inverse:f(7,27),hidden:f(8,28),strikethrough:f(9,29),black:f(30,39),red:f(31,39),green:f(32,39),yellow:f(33,39),blue:f(34,39),magenta:f(35,39),cyan:f(36,39),white:f(37,39),gray:f(90,39),bgBlack:f(40,49),bgRed:f(41,49),bgGreen:f(42,49),bgYellow:f(43,49),bgBlue:f(44,49),bgMagenta:f(45,49),bgCyan:f(46,49),bgWhite:f(47,49),blackBright:f(90,39),redBright:f(91,39),greenBright:f(92,39),yellowBright:f(93,39),blueBright:f(94,39),magentaBright:f(95,39),cyanBright:f(96,39),whiteBright:f(97,39),bgBlackBright:f(100,49),bgRedBright:f(101,49),bgGreenBright:f(102,49),bgYellowBright:f(103,49),bgBlueBright:f(104,49),bgMagentaBright:f(105,49),bgCyanBright:f(106,49),bgWhiteBright:f(107,49)},w0=y4(),m4=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),JC={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},l4={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1};var Ch=a4(["The best way to get started is to quit talking and begin doing.","The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.","Don\u2019t let yesterday take up too much of today.","You learn more from failure than from success. Don\u2019t let it stop you. Failure builds character.","It\u2019s not whether you get knocked down, it\u2019s whether you get up.","If you are working on something that you really care about, you don\u2019t have to be pushed. The vision pulls you.","People who are crazy enough to think they can change the world, are the ones who do.","Failure will never overtake me if my determination to succeed is strong enough.","Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That\u2019s the classic entrepreneur.","We may encounter many defeats but we must not be defeated.","Knowing is not enough; we must apply. Wishing is not enough; we must do.","Imagine your life is perfect in every respect; what would it look like?","We generate fears while we sit. We overcome them by action.","Whether you think you can or think you can\u2019t, you\u2019re right.","Security is mostly a superstition. Life is either a daring adventure or nothing."]);async function Su(D,u){return I.debug("runCommand:",D),I.debug("options:",u),await N0(D,u)}async function Mh(D,u){return I.debug("runProcess:",KD(D)),I.debug("runProcess Options:",u),await N0(D,u)}async function Hh(D,u){return I.debug("runCommandSync:",KD(D)),I.debug("runCommandSync Options:",u),await L8(D,u)}async function Oh(D,u){const F=[];for(let C of D){const E=await Su(C,u);if(E.isErr())I.error(E.error),process.exit(p4.FatalError);F.push(E)}return F}class t4{name;description;options;run;onFail;onSuccess;constructor({name:D,description:u,options:F,run:C,onFail:E,onSuccess:B}){this.name=D,this.description=u,this.options=F,this.run=C,this.onFail=E,this.onSuccess=B}}var fh={run:async(D,u)=>{return await Su(D,u)},runSync:async(D,u)=>{return await Su(D,u)}};import{handleError as s4}from"@stacksjs/error-handling";import{log as ID}from"@stacksjs/logging";import{ExitCode as NC}from"@stacksjs/types";var RC="0.64.2";async function Rh(D,u){return new Promise((F)=>{if(u?.quiet===!1)console.log(),console.log(qu(JD("Stacks CLI"))+qD(` v${RC}`)),console.log();if(ID.info(`Running ${Iu(KD(JD(` ${D} `)))}`),u?.showPerformance===!1||u?.quiet)return F(0);return F(performance.now())})}function Nh(D,u,F){const C={type:"success",useSeconds:!0,...u};return C.message=u?.message||D,new Promise((E)=>{if(F)return s4(F);if(C?.startTime){let B=performance.now()-C.startTime;if(C.useSeconds)B=B/1000,B=Math.round(B*100)/100;if(C.quiet===!0)return E(NC.Success);if(F)ID.error(`[${B.toFixed(2)}${C.useSeconds?"s":"ms"}] Failed`);else if(C.type==="info")ID.info(`${qD(oD(`[${B.toFixed(2)}${C.useSeconds?"s":"ms"}]`))} ${C.message??"Complete"}`);else ID.success(`${qD(oD(JD(`[${B.toFixed(2)}${C.useSeconds?"s":"ms"}]`)))} ${JD(wu(C.message??"Complete"))}`)}else if(C?.type==="info")ID.info(D);else if(C?.type==="success"&&C?.quiet!==!0)ID.success(D);return E(NC.Success)})}import jD from"process";import{log as I0}from"@stacksjs/logging";function VC(D){if(!D)return!1;return D.startsWith("--")}function o4(D){return D.startsWith("-")&&!VC(D)}function j0(D){if(D==="true")return!0;if(D==="false")return!1;const u=Number.parseFloat(D);if(!Number.isNaN(u))return u;return D.replace(/"/g,"")}function e4(D,u,F,C){const[E,B]=D.slice(2).split("=");if(B!==void 0)C[E]=j0(B);else if(F+1<u.length&&!u[F+1]?.startsWith("-"))C[E]=u[F+1],F++;else C[E]=!0;return F}function D9(D,u,F,C){const[E,B]=D.slice(1).split("=");if(E===void 0)return F;if(B!==void 0&&E!==void 0)for(let A=0;A<E.length;A++)C[E[A]]=j0(B);else for(let A=0;A<E.length;A++)if(F+1<u.length&&A===E.length-1&&!u[F+1]?.startsWith("-"))C[E[A]]=j0(u[F+1]),F++;else C[E[A]]=!0;return F}function u9(D){if(D===void 0)D=jD.argv.slice(2);const u=[],F={};for(let C=0;C<D.length;C++){const E=D[C];if(!E)continue;if(VC(E))C=e4(E,D,C,F);else if(o4(E))C=D9(E,D,C,F);else u.push(E)}return{args:u,options:F}}function qh(D){if(D===void 0)D=jD.argv.slice(2);return u9(D).args}function Ih(D){D=D||{};const u=jD.argv.slice(2);for(let F=0;F<u.length;F++){const C=u[F];if(C?.startsWith("--")){const B=C.substring(2).replace(/-([a-z])/gi,(A)=>A[1]?A[1].toUpperCase():"");if(F+1<u.length)if(u[F+1]==="true"||u[F+1]==="false")D[B]=u[F+1]==="true",F++;else D[B]=u[F+1],F++;else D[B]=!0}}if(Object.keys(D).length===0)return{dryRun:!1,quiet:!1,verbose:!1};return Object.keys(D).forEach((F)=>{if(!D)return{dryRun:!1,quiet:!1,verbose:!1};const C=D[F];if(C==="true"||C==="false")D[F]=C==="true"}),D}function jh(D){if(!D){if(D=jD.argv.slice(2),D=Array.from(new Set(D)),D[0]&&!D[0].startsWith("-"))D.shift()}if(D?.verbose)I0.debug("process.argv",jD.argv),I0.debug("process.argv.slice(2)",jD.argv.slice(2)),I0.debug("options inside buddyOptions",D);return D.join(" ")}import cu from"process";function E9(){const D=new Map;for(let[u,F]of Object.entries(G)){for(let[C,E]of Object.entries(F))G[C]={open:`\x1B[${E[0]}m`,close:`\x1B[${E[1]}m`},F[C]=G[C],D.set(E[0],E[1]);Object.defineProperty(G,u,{value:F,enumerable:!1})}return Object.defineProperty(G,"codes",{value:D,enumerable:!1}),G.color.close="\x1B[39m",G.bgColor.close="\x1B[49m",G.color.ansi=LC(),G.color.ansi256=wC(),G.color.ansi16m=qC(),G.bgColor.ansi=LC(10),G.bgColor.ansi256=wC(10),G.bgColor.ansi16m=qC(10),Object.defineProperties(G,{rgbToAnsi256:{value(u,F,C){if(u===F&&F===C){if(u<8)return 16;if(u>248)return 231;return Math.round((u-8)/247*24)+232}return 16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(C/255*5)},enumerable:!1},hexToRgb:{value(u){const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[C]=F;if(C.length===3)C=[...C].map((B)=>B+B).join("");const E=Number.parseInt(C,16);return[E>>16&255,E>>8&255,E&255]},enumerable:!1},hexToAnsi256:{value:(u)=>G.rgbToAnsi256(...G.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,C,E;if(u>=232)F=((u-232)*10+8)/255,C=F,E=F;else{u-=16;const h=u%36;F=Math.floor(u/36)/5,C=Math.floor(h/6)/5,E=h%6/5}const B=Math.max(F,C,E)*2;if(B===0)return 30;let A=30+(Math.round(E)<<2|Math.round(C)<<1|Math.round(F));if(B===2)A+=60;return A},enumerable:!1},rgbToAnsi:{value:(u,F,C)=>G.ansi256ToAnsi(G.rgbToAnsi256(u,F,C)),enumerable:!1},hexToAnsi:{value:(u)=>G.ansi256ToAnsi(G.hexToAnsi256(u)),enumerable:!1}}),G}var LC=(D=0)=>(u)=>`\x1B[${u+D}m`,wC=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,qC=(D=0)=>(u,F,C)=>`\x1B[${38+D};2;${u};${F};${C}m`,G={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Ph=Object.keys(G.modifier),F9=Object.keys(G.color),C9=Object.keys(G.bgColor),Th=[...F9,...C9],B9=E9(),y=B9;import S0 from"process";import A9 from"os";import IC from"tty";function k(D,u=globalThis.Deno?globalThis.Deno.args:S0.argv){const F=D.startsWith("-")?"":D.length===1?"-":"--",C=u.indexOf(F+D),E=u.indexOf("--");return C!==-1&&(E===-1||C<E)}function h9(){if("FORCE_COLOR"in V){if(V.FORCE_COLOR==="true")return 1;if(V.FORCE_COLOR==="false")return 0;return V.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(V.FORCE_COLOR,10),3)}}function $9(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function _9(D,{streamIsTTY:u,sniffFlags:F=!0}={}){const C=h9();if(C!==void 0)Pu=C;const E=F?Pu:C;if(E===0)return 0;if(F){if(k("color=16m")||k("color=full")||k("color=truecolor"))return 3;if(k("color=256"))return 2}if("TF_BUILD"in V&&"AGENT_NAME"in V)return 1;if(D&&!u&&E===void 0)return 0;const B=E||0;if(V.TERM==="dumb")return B;if(S0.platform==="win32"){const A=A9.release().split(".");if(Number(A[0])>=10&&Number(A[2])>=10586)return Number(A[2])>=14931?3:2;return 1}if("CI"in V){if("GITHUB_ACTIONS"in V||"GITEA_ACTIONS"in V)return 3;if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((A)=>(A in V))||V.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in V)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(V.TEAMCITY_VERSION)?1:0;if(V.COLORTERM==="truecolor")return 3;if(V.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in V){const A=Number.parseInt((V.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(V.TERM_PROGRAM){case"iTerm.app":return A>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(V.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(V.TERM))return 1;if("COLORTERM"in V)return 1;return B}function jC(D,u={}){const F=_9(D,{streamIsTTY:D&&D.isTTY,...u});return $9(F)}var{env:V}=S0,Pu;if(k("no-color")||k("no-colors")||k("color=false")||k("color=never"))Pu=0;else if(k("color")||k("colors")||k("color=true")||k("color=always"))Pu=1;var U9={stdout:jC({isTTY:IC.isatty(1)}),stderr:jC({isTTY:IC.isatty(2)})},SC=U9;function PC(D,u,F){let C=D.indexOf(u);if(C===-1)return D;const E=u.length;let B=0,A="";do A+=D.slice(B,C)+u+F,B=C+E,C=D.indexOf(u,B);while(C!==-1);return A+=D.slice(B),A}function TC(D,u,F,C){let E=0,B="";do{const A=D[C-1]==="\r";B+=D.slice(E,A?C-1:C)+u+(A?"\r\n":"\n")+F,E=C+1,C=D.indexOf("\n",E)}while(C!==-1);return B+=D.slice(E),B}function uu(D){return H9(D)}var{stdout:bC,stderr:kC}=SC,P0=Symbol("GENERATOR"),SD=Symbol("STYLER"),Du=Symbol("IS_EMPTY"),dC=["ansi","ansi","ansi256","ansi16m"],PD=Object.create(null),M9=(D,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const F=bC?bC.level:0;D.level=u.level===void 0?F:u.level};var H9=(D)=>{const u=(...F)=>F.join(" ");return M9(u,D),Object.setPrototypeOf(u,uu.prototype),u};Object.setPrototypeOf(uu.prototype,Function.prototype);for(let[D,u]of Object.entries(y))PD[D]={get(){const F=Tu(this,b0(u.open,u.close,this[SD]),this[Du]);return Object.defineProperty(this,D,{value:F}),F}};PD.visible={get(){const D=Tu(this,this[SD],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var T0=(D,u,F,...C)=>{if(D==="rgb"){if(u==="ansi16m")return y[F].ansi16m(...C);if(u==="ansi256")return y[F].ansi256(y.rgbToAnsi256(...C));return y[F].ansi(y.rgbToAnsi(...C))}if(D==="hex")return T0("rgb",u,F,...y.hexToRgb(...C));return y[F][D](...C)},O9=["rgb","hex","ansi256"];for(let D of O9){PD[D]={get(){const{level:F}=this;return function(...C){const E=b0(T0(D,dC[F],"color",...C),y.color.close,this[SD]);return Tu(this,E,this[Du])}}};const u="bg"+D[0].toUpperCase()+D.slice(1);PD[u]={get(){const{level:F}=this;return function(...C){const E=b0(T0(D,dC[F],"bgColor",...C),y.bgColor.close,this[SD]);return Tu(this,E,this[Du])}}}}var Z9=Object.defineProperties(()=>{},{...PD,level:{enumerable:!0,get(){return this[P0].level},set(D){this[P0].level=D}}}),b0=(D,u,F)=>{let C,E;if(F===void 0)C=D,E=u;else C=F.openAll+D,E=u+F.closeAll;return{open:D,close:u,openAll:C,closeAll:E,parent:F}},Tu=(D,u,F)=>{const C=(...E)=>z9(C,E.length===1?""+E[0]:E.join(" "));return Object.setPrototypeOf(C,Z9),C[P0]=D,C[SD]=u,C[Du]=F,C},z9=(D,u)=>{if(D.level<=0||!u)return D[Du]?"":u;let F=D[SD];if(F===void 0)return u;const{openAll:C,closeAll:E}=F;if(u.includes("\x1B"))while(F!==void 0)u=PC(u,F.close,F.open),F=F.parent;const B=u.indexOf("\n");if(B!==-1)u=TC(u,E,C,B);return C+u+E};Object.defineProperties(uu.prototype,PD);var f9=uu(),nh=uu({level:kC?kC.level:0});var xC=f9;import aC from"process";import du from"process";var J9=(D,u,F,C)=>{if(F==="length"||F==="prototype")return;if(F==="arguments"||F==="caller")return;const E=Object.getOwnPropertyDescriptor(D,F),B=Object.getOwnPropertyDescriptor(u,F);if(!K9(E,B)&&C)return;Object.defineProperty(D,F,B)},K9=function(D,u){return D===void 0||D.configurable||D.writable===u.writable&&D.enumerable===u.enumerable&&D.configurable===u.configurable&&(D.writable||D.value===u.value)},Q9=(D,u)=>{const F=Object.getPrototypeOf(u);if(F===Object.getPrototypeOf(D))return;Object.setPrototypeOf(D,F)},X9=(D,u)=>`/* Wrapped ${D}*/\n${u}`,G9=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Y9=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),W9=(D,u,F)=>{const C=F===""?"":`with ${F.trim()}() `,E=X9.bind(null,C,u.toString());Object.defineProperty(E,"name",Y9);const{writable:B,enumerable:A,configurable:h}=G9;Object.defineProperty(D,"toString",{value:E,writable:B,enumerable:A,configurable:h})};function k0(D,u,{ignoreNonConfigurable:F=!1}={}){const{name:C}=D;for(let E of Reflect.ownKeys(u))J9(D,u,E,F);return Q9(D,u),W9(D,u,C),D}var bu=new WeakMap,vC=(D,u={})=>{if(typeof D!=="function")throw new TypeError("Expected a function");let F,C=0;const E=D.displayName||D.name||"<anonymous>",B=function(...A){if(bu.set(B,++C),C===1)F=D.apply(this,A),D=void 0;else if(u.throw===!0)throw new Error(`Function \`${E}\` can only be called once`);return F};return k0(B,D),bu.set(B,C),B};vC.callCount=(D)=>{if(!bu.has(D))throw new Error(`The given function \`${D.name}\` is not wrapped by the \`onetime\` package`);return bu.get(D)};var gC=vC;var QD=[];QD.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")QD.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")QD.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ku=(D)=>!!D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function",d0=Symbol.for("signal-exit emitter"),x0=globalThis,R9=Object.defineProperty.bind(Object);class yC{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(x0[d0])return x0[d0];R9(x0,d0,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(D,u){this.listeners[D].push(u)}removeListener(D,u){const F=this.listeners[D],C=F.indexOf(u);if(C===-1)return;if(C===0&&F.length===1)F.length=0;else F.splice(C,1)}emit(D,u,F){if(this.emitted[D])return!1;this.emitted[D]=!0;let C=!1;for(let E of this.listeners[D])C=E(u,F)===!0||C;if(D==="exit")C=this.emit("afterExit",u,F)||C;return C}}class g0{}var N9=(D)=>{return{onExit(u,F){return D.onExit(u,F)},load(){return D.load()},unload(){return D.unload()}}};class cC extends g0{onExit(){return()=>{}}load(){}unload(){}}class mC extends g0{#E=v0.platform==="win32"?"SIGINT":"SIGHUP";#C=new yC;#D;#B;#u;#A={};#F=!1;constructor(D){super();this.#D=D,this.#A={};for(let u of QD)this.#A[u]=()=>{const F=this.#D.listeners(u);let{count:C}=this.#C;const E=D;if(typeof E.__signal_exit_emitter__==="object"&&typeof E.__signal_exit_emitter__.count==="number")C+=E.__signal_exit_emitter__.count;if(F.length===C){this.unload();const B=this.#C.emit("exit",null,u),A=u==="SIGHUP"?this.#E:u;if(!B)D.kill(D.pid,A)}};this.#u=D.reallyExit,this.#B=D.emit}onExit(D,u){if(!ku(this.#D))return()=>{};if(this.#F===!1)this.load();const F=u?.alwaysLast?"afterExit":"exit";return this.#C.on(F,D),()=>{if(this.#C.removeListener(F,D),this.#C.listeners.exit.length===0&&this.#C.listeners.afterExit.length===0)this.unload()}}load(){if(this.#F)return;this.#F=!0,this.#C.count+=1;for(let D of QD)try{const u=this.#A[D];if(u)this.#D.on(D,u)}catch(u){}this.#D.emit=(D,...u)=>{return this.#O(D,...u)},this.#D.reallyExit=(D)=>{return this.#H(D)}}unload(){if(!this.#F)return;this.#F=!1,QD.forEach((D)=>{const u=this.#A[D];if(!u)throw new Error("Listener not defined for signal: "+D);try{this.#D.removeListener(D,u)}catch(F){}}),this.#D.emit=this.#B,this.#D.reallyExit=this.#u,this.#C.count-=1}#H(D){if(!ku(this.#D))return 0;return this.#D.exitCode=D||0,this.#C.emit("exit",this.#D.exitCode,null),this.#u.call(this.#D,this.#D.exitCode)}#O(D,...u){const F=this.#B;if(D==="exit"&&ku(this.#D)){if(typeof u[0]==="number")this.#D.exitCode=u[0];const C=F.call(this.#D,D,...u);return this.#C.emit("exit",this.#D.exitCode,null),C}else return F.call(this.#D,D,...u)}}var v0=globalThis.process,{onExit:nC,load:sh,unload:oh}=N9(ku(v0)?new mC(v0):new cC);var lC=du.stderr.isTTY?du.stderr:du.stdout.isTTY?du.stdout:void 0,V9=lC?gC(()=>{nC(()=>{lC.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},iC=V9;var xu=!1,TD={};TD.show=(D=aC.stderr)=>{if(!D.isTTY)return;xu=!1,D.write("\x1B[?25h")};TD.hide=(D=aC.stderr)=>{if(!D.isTTY)return;iC(),xu=!0,D.write("\x1B[?25l")};TD.toggle=(D,u)=>{if(D!==void 0)xu=D;if(xu)TD.show(u);else TD.hide(u)};var y0=TD;var Au=iu(c0(),1);function I9(){const D=new Map;for(let[u,F]of Object.entries(Y)){for(let[C,E]of Object.entries(F))Y[C]={open:`\x1B[${E[0]}m`,close:`\x1B[${E[1]}m`},F[C]=Y[C],D.set(E[0],E[1]);Object.defineProperty(Y,u,{value:F,enumerable:!1})}return Object.defineProperty(Y,"codes",{value:D,enumerable:!1}),Y.color.close="\x1B[39m",Y.bgColor.close="\x1B[49m",Y.color.ansi=sC(),Y.color.ansi256=oC(),Y.color.ansi16m=eC(),Y.bgColor.ansi=sC(10),Y.bgColor.ansi256=oC(10),Y.bgColor.ansi16m=eC(10),Object.defineProperties(Y,{rgbToAnsi256:{value(u,F,C){if(u===F&&F===C){if(u<8)return 16;if(u>248)return 231;return Math.round((u-8)/247*24)+232}return 16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(C/255*5)},enumerable:!1},hexToRgb:{value(u){const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[C]=F;if(C.length===3)C=[...C].map((B)=>B+B).join("");const E=Number.parseInt(C,16);return[E>>16&255,E>>8&255,E&255]},enumerable:!1},hexToAnsi256:{value:(u)=>Y.rgbToAnsi256(...Y.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,C,E;if(u>=232)F=((u-232)*10+8)/255,C=F,E=F;else{u-=16;const h=u%36;F=Math.floor(u/36)/5,C=Math.floor(h/6)/5,E=h%6/5}const B=Math.max(F,C,E)*2;if(B===0)return 30;let A=30+(Math.round(E)<<2|Math.round(C)<<1|Math.round(F));if(B===2)A+=60;return A},enumerable:!1},rgbToAnsi:{value:(u,F,C)=>Y.ansi256ToAnsi(Y.rgbToAnsi256(u,F,C)),enumerable:!1},hexToAnsi:{value:(u)=>Y.ansi256ToAnsi(Y.hexToAnsi256(u)),enumerable:!1}}),Y}var sC=(D=0)=>(u)=>`\x1B[${u+D}m`,oC=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,eC=(D=0)=>(u,F,C)=>`\x1B[${38+D};2;${u};${F};${C}m`,Y={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(Y.modifier),w9=Object.keys(Y.color),q9=Object.keys(Y.bgColor),U$=[...w9,...q9],j9=I9(),c=j9;import m0 from"process";import S9 from"os";import DE from"tty";function d(D,u=globalThis.Deno?globalThis.Deno.args:m0.argv){const F=D.startsWith("-")?"":D.length===1?"-":"--",C=u.indexOf(F+D),E=u.indexOf("--");return C!==-1&&(E===-1||C<E)}function P9(){if("FORCE_COLOR"in L){if(L.FORCE_COLOR==="true")return 1;if(L.FORCE_COLOR==="false")return 0;return L.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(L.FORCE_COLOR,10),3)}}function T9(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function b9(D,{streamIsTTY:u,sniffFlags:F=!0}={}){const C=P9();if(C!==void 0)gu=C;const E=F?gu:C;if(E===0)return 0;if(F){if(d("color=16m")||d("color=full")||d("color=truecolor"))return 3;if(d("color=256"))return 2}if("TF_BUILD"in L&&"AGENT_NAME"in L)return 1;if(D&&!u&&E===void 0)return 0;const B=E||0;if(L.TERM==="dumb")return B;if(m0.platform==="win32"){const A=S9.release().split(".");if(Number(A[0])>=10&&Number(A[2])>=10586)return Number(A[2])>=14931?3:2;return 1}if("CI"in L){if("GITHUB_ACTIONS"in L||"GITEA_ACTIONS"in L)return 3;if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((A)=>(A in L))||L.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in L)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(L.TEAMCITY_VERSION)?1:0;if(L.COLORTERM==="truecolor")return 3;if(L.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in L){const A=Number.parseInt((L.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(L.TERM_PROGRAM){case"iTerm.app":return A>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(L.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(L.TERM))return 1;if("COLORTERM"in L)return 1;return B}function uE(D,u={}){const F=b9(D,{streamIsTTY:D&&D.isTTY,...u});return T9(F)}var{env:L}=m0,gu;if(d("no-color")||d("no-colors")||d("color=false")||d("color=never"))gu=0;else if(d("color")||d("colors")||d("color=true")||d("color=always"))gu=1;var k9={stdout:uE({isTTY:DE.isatty(1)}),stderr:uE({isTTY:DE.isatty(2)})},FE=k9;function CE(D,u,F){let C=D.indexOf(u);if(C===-1)return D;const E=u.length;let B=0,A="";do A+=D.slice(B,C)+u+F,B=C+E,C=D.indexOf(u,B);while(C!==-1);return A+=D.slice(B),A}function EE(D,u,F,C){let E=0,B="";do{const A=D[C-1]==="\r";B+=D.slice(E,A?C-1:C)+u+(A?"\r\n":"\n")+F,E=C+1,C=D.indexOf("\n",E)}while(C!==-1);return B+=D.slice(E),B}function Cu(D){return x9(D)}var{stdout:BE,stderr:AE}=FE,n0=Symbol("GENERATOR"),bD=Symbol("STYLER"),Fu=Symbol("IS_EMPTY"),hE=["ansi","ansi","ansi256","ansi16m"],kD=Object.create(null),d9=(D,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const F=BE?BE.level:0;D.level=u.level===void 0?F:u.level};var x9=(D)=>{const u=(...F)=>F.join(" ");return d9(u,D),Object.setPrototypeOf(u,Cu.prototype),u};Object.setPrototypeOf(Cu.prototype,Function.prototype);for(let[D,u]of Object.entries(c))kD[D]={get(){const F=yu(this,i0(u.open,u.close,this[bD]),this[Fu]);return Object.defineProperty(this,D,{value:F}),F}};kD.visible={get(){const D=yu(this,this[bD],!0);return Object.defineProperty(this,"visible",{value:D}),D}};var l0=(D,u,F,...C)=>{if(D==="rgb"){if(u==="ansi16m")return c[F].ansi16m(...C);if(u==="ansi256")return c[F].ansi256(c.rgbToAnsi256(...C));return c[F].ansi(c.rgbToAnsi(...C))}if(D==="hex")return l0("rgb",u,F,...c.hexToRgb(...C));return c[F][D](...C)},v9=["rgb","hex","ansi256"];for(let D of v9){kD[D]={get(){const{level:F}=this;return function(...C){const E=i0(l0(D,hE[F],"color",...C),c.color.close,this[bD]);return yu(this,E,this[Fu])}}};const u="bg"+D[0].toUpperCase()+D.slice(1);kD[u]={get(){const{level:F}=this;return function(...C){const E=i0(l0(D,hE[F],"bgColor",...C),c.bgColor.close,this[bD]);return yu(this,E,this[Fu])}}}}var g9=Object.defineProperties(()=>{},{...kD,level:{enumerable:!0,get(){return this[n0].level},set(D){this[n0].level=D}}}),i0=(D,u,F)=>{let C,E;if(F===void 0)C=D,E=u;else C=F.openAll+D,E=u+F.closeAll;return{open:D,close:u,openAll:C,closeAll:E,parent:F}},yu=(D,u,F)=>{const C=(...E)=>y9(C,E.length===1?""+E[0]:E.join(" "));return Object.setPrototypeOf(C,g9),C[n0]=D,C[bD]=u,C[Fu]=F,C},y9=(D,u)=>{if(D.level<=0||!u)return D[Fu]?"":u;let F=D[bD];if(F===void 0)return u;const{openAll:C,closeAll:E}=F;if(u.includes("\x1B"))while(F!==void 0)u=CE(u,F.close,F.open),F=F.parent;const B=u.indexOf("\n");if(B!==-1)u=EE(u,E,C,B);return C+u+E};Object.defineProperties(Cu.prototype,kD);var c9=Cu(),X$=Cu({level:AE?AE.level:0});var AD=c9;import m from"process";function a0(){if(m.platform!=="win32")return m.env.TERM!=="linux";return Boolean(m.env.CI)||Boolean(m.env.WT_SESSION)||Boolean(m.env.TERMINUS_SUBLIME)||m.env.ConEmuTask==="{cmd::Cmder}"||m.env.TERM_PROGRAM==="Terminus-Sublime"||m.env.TERM_PROGRAM==="vscode"||m.env.TERM==="xterm-256color"||m.env.TERM==="alacritty"||m.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var m9={info:AD.blue("\u2139"),success:AD.green("\u2714"),warning:AD.yellow("\u26A0"),error:AD.red("\u2716")},n9={info:AD.blue("i"),success:AD.green("\u221A"),warning:AD.yellow("\u203C"),error:AD.red("\xD7")},l9=a0()?m9:n9,Eu=l9;function p0({onlyFirst:D=!1}={}){const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}var i9=p0();function Bu(D){if(typeof D!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(i9,"")}function $E(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}function _E(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function UE(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9800&&D<=9811||D===9855||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12771||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=19903||D>=19968&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D===94192||D===94193||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101632&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129672||D>=129680&&D<=129725||D>=129727&&D<=129733||D>=129742&&D<=129755||D>=129760&&D<=129768||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function a9(D){if(!Number.isSafeInteger(D))throw new TypeError(`Expected a code point, got \`${typeof D}\`.`)}function ME(D,{ambiguousAsWide:u=!1}={}){if(a9(D),_E(D)||UE(D)||u&&$E(D))return 2;return 1}var HE=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g};var p9=new Intl.Segmenter,t9=/^\p{Default_Ignorable_Code_Point}$/u;function t0(D,u={}){if(typeof D!=="string"||D.length===0)return 0;const{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:C=!1}=u;if(!C)D=Bu(D);if(D.length===0)return 0;let E=0;const B={ambiguousAsWide:!F};for(let{segment:A}of p9.segment(D)){const h=A.codePointAt(0);if(h<=31||h>=127&&h<=159)continue;if(h>=8203&&h<=8207||h===65279)continue;if(h>=768&&h<=879||h>=6832&&h<=6911||h>=7616&&h<=7679||h>=8400&&h<=8447||h>=65056&&h<=65071)continue;if(h>=55296&&h<=57343)continue;if(h>=65024&&h<=65039)continue;if(t9.test(A))continue;if(HE().test(A)){E+=2;continue}E+=ME(h,B)}return E}function r0({stream:D=process.stdout}={}){return Boolean(D&&D.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import r from"process";function s0(){if(r.platform!=="win32")return r.env.TERM!=="linux";return Boolean(r.env.WT_SESSION)||Boolean(r.env.TERMINUS_SUBLIME)||r.env.ConEmuTask==="{cmd::Cmder}"||r.env.TERM_PROGRAM==="Terminus-Sublime"||r.env.TERM_PROGRAM==="vscode"||r.env.TERM==="xterm-256color"||r.env.TERM==="alacritty"||r.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}import s from"process";var r9=3;class OE{#E=0;start(){if(this.#E++,this.#E===1)this.#C()}stop(){if(this.#E<=0)throw new Error("`stop` called more times than `start`");if(this.#E--,this.#E===0)this.#D()}#C(){if(s.platform==="win32"||!s.stdin.isTTY)return;s.stdin.setRawMode(!0),s.stdin.on("data",this.#B),s.stdin.resume()}#D(){if(!s.stdin.isTTY)return;s.stdin.off("data",this.#B),s.stdin.pause(),s.stdin.setRawMode(!1)}#B(D){if(D[0]===r9)s.emit("SIGINT")}}var s9=new OE,o0=s9;var o9=iu(c0(),1);class ZE{#E=0;#C=!1;#D=0;#B=0;#u;#A;#F;#H;#O;#_;#U;#M;#z;#h;#$;color;constructor(D){if(typeof D==="string")D={text:D};if(this.#u={color:"cyan",stream:cu.stderr,discardStdin:!0,hideCursor:!0,...D},this.color=this.#u.color,this.spinner=this.#u.spinner,this.#O=this.#u.interval,this.#F=this.#u.stream,this.#_=typeof this.#u.isEnabled==="boolean"?this.#u.isEnabled:r0({stream:this.#F}),this.#U=typeof this.#u.isSilent==="boolean"?this.#u.isSilent:!1,this.text=this.#u.text,this.prefixText=this.#u.prefixText,this.suffixText=this.#u.suffixText,this.indent=this.#u.indent,cu.env.NODE_ENV==="test")this._stream=this.#F,this._isEnabled=this.#_,Object.defineProperty(this,"_linesToClear",{get(){return this.#E},set(u){this.#E=u}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#B}}),Object.defineProperty(this,"_lineCount",{get(){return this.#D}})}get indent(){return this.#M}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw new Error("The `indent` option must be an integer from 0 and up");this.#M=D,this.#Z()}get interval(){return this.#O??this.#A.interval??100}get spinner(){return this.#A}set spinner(D){if(this.#B=0,this.#O=void 0,typeof D==="object"){if(D.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#A=D}else if(!s0())this.#A=Au.default.line;else if(D===void 0)this.#A=Au.default.dots;else if(D!=="default"&&Au.default[D])this.#A=Au.default[D];else throw new Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#z}set text(D=""){this.#z=D,this.#Z()}get prefixText(){return this.#h}set prefixText(D=""){this.#h=D,this.#Z()}get suffixText(){return this.#$}set suffixText(D=""){this.#$=D,this.#Z()}get isSpinning(){return this.#H!==void 0}#f(D=this.#h,u=" "){if(typeof D==="string"&&D!=="")return D+u;if(typeof D==="function")return D()+u;return""}#J(D=this.#$,u=" "){if(typeof D==="string"&&D!=="")return u+D;if(typeof D==="function")return u+D();return""}#Z(){const D=this.#F.columns??80,u=this.#f(this.#h,"-"),F=this.#J(this.#$,"-"),C=" ".repeat(this.#M)+u+"--"+this.#z+"--"+F;this.#D=0;for(let E of Bu(C).split("\n"))this.#D+=Math.max(1,Math.ceil(t0(E,{countAnsiEscapeCodes:!0})/D))}get isEnabled(){return this.#_&&!this.#U}set isEnabled(D){if(typeof D!=="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#_=D}get isSilent(){return this.#U}set isSilent(D){if(typeof D!=="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#U=D}frame(){const{frames:D}=this.#A;let u=D[this.#B];if(this.color)u=xC[this.color](u);this.#B=++this.#B%D.length;const F=typeof this.#h==="string"&&this.#h!==""?this.#h+" ":"",C=typeof this.text==="string"?" "+this.text:"",E=typeof this.#$==="string"&&this.#$!==""?" "+this.#$:"";return F+u+C+E}clear(){if(!this.#_||!this.#F.isTTY)return this;this.#F.cursorTo(0);for(let D=0;D<this.#E;D++){if(D>0)this.#F.moveCursor(0,-1);this.#F.clearLine(1)}if(this.#M||this.lastIndent!==this.#M)this.#F.cursorTo(this.#M);return this.lastIndent=this.#M,this.#E=0,this}render(){if(this.#U)return this;return this.clear(),this.#F.write(this.frame()),this.#E=this.#D,this}start(D){if(D)this.text=D;if(this.#U)return this;if(!this.#_){if(this.text)this.#F.write(`- ${this.text}\n`);return this}if(this.isSpinning)return this;if(this.#u.hideCursor)y0.hide(this.#F);if(this.#u.discardStdin&&cu.stdin.isTTY)this.#C=!0,o0.start();return this.render(),this.#H=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.#_)return this;if(clearInterval(this.#H),this.#H=void 0,this.#B=0,this.clear(),this.#u.hideCursor)y0.show(this.#F);if(this.#u.discardStdin&&cu.stdin.isTTY&&this.#C)o0.stop(),this.#C=!1;return this}succeed(D){return this.stopAndPersist({symbol:Eu.success,text:D})}fail(D){return this.stopAndPersist({symbol:Eu.error,text:D})}warn(D){return this.stopAndPersist({symbol:Eu.warning,text:D})}info(D){return this.stopAndPersist({symbol:Eu.info,text:D})}stopAndPersist(D={}){if(this.#U)return this;const u=D.prefixText??this.#h,F=this.#f(u," "),C=D.symbol??" ",E=D.text??this.text,B=typeof E==="string"?" "+E:"",A=D.suffixText??this.#$,h=this.#J(A," "),$=F+C+B+h+"\n";return this.stop(),this.#F.write($),this}}function e0(D){return new ZE(D)}var u_=e0;var export_prompts=I4.default;export{g8 as yellow,m8 as white,T8 as underline,OC as trueColorBg,HC as trueColor,S8 as stripColors,eD as stripAnsi,d8 as strikethrough,u_ as spinner,Mh as runProcess,Oh as runCommands,Hh as runCommandSync,Su as runCommand,YC as rightAlign,P8 as reset,v8 as red,Ch as quotes,export_prompts as prompts,Ih as parseOptions,u9 as parseArgv,qh as parseArgs,Nh as outro,c8 as magenta,I as log,ZC as link,a8 as lightYellow,l8 as lightRed,t8 as lightMagenta,i8 as lightGreen,n8 as lightGray,r8 as lightCyan,p8 as lightBlue,WC as leftAlign,zC as kolorist,KD as italic,b8 as inverse,Rh as intro,V5 as installStack,N5 as installPackage,k8 as hidden,wu as green,oD as gray,q0 as getColor,L8 as execSync,N0 as exec,qD as dim,qu as cyan,fh as command,w0 as colors,c4 as colorize,P5 as cli,GC as centerAlign,jh as buddyOptions,i4 as box,JD as bold,y8 as blue,x8 as black,DC as bgYellow,CC as bgWhite,o8 as bgRed,FC as bgMagenta,hC as bgLightYellow,BC as bgLightRed,_C as bgLightMagenta,AC as bgLightGreen,MC as bgLightGray,UC as bgLightCyan,$C as bgLightBlue,e8 as bgGreen,EC as bgGray,Iu as bgCyan,uC as bgBlue,s8 as bgBlack,L0 as ansi256Bg,V0 as ansi256,n4 as align,t4 as Command,ou as CAC};
18
18
 
19
- //# debugId=0EFA53D1D453291264756E2164756E21
19
+ //# debugId=CC5A1C2CC015D2AC64756E2164756E21
20
20
  //# sourceMappingURL=index.js.map