@mahameru/cli 0.0.14 → 0.0.16

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.
@@ -2,20 +2,15 @@
2
2
  /*!
3
3
  * ┌────────────────────────────────────────────┐
4
4
  * │ │
5
- * │ ▲ MahameruJS - CLI UTILITY
6
- * │ Version: 0.0.14
5
+ * │ ▲ MahameruJS - CLI
6
+ * │ Version: 0.0.16
7
7
  * │ Built: 2026 │
8
8
  * │ │
9
9
  * │ Copyright (c) Bintan <hello@bintvn.co> │
10
10
  * │ Licensed under the ISC License. │
11
11
  * │ │
12
12
  * └────────────────────────────────────────────┘
13
- */
14
- import{default as t,spawn as e}from"node:child_process";import{default as i,join as r,relative as s}from"node:path"
15
- ;import{default as n,existsSync as o,readFileSync as a,readdirSync as l,statSync as h}from"node:fs"
16
- ;import{default as c}from"node:process";import{stripVTControlCharacters as u}from"node:util"
17
- ;import{default as m}from"node:os";import{default as p}from"node:tty";import{pathToFileURL as d}from"node:url"
18
- ;import{EventEmitter as f}from"node:events";import{rename as g,rm as _}from"node:fs/promises";var v={991(t){
13
+ */(()=>{var t={991(t){
19
14
  let e=process||{},i=e.argv||[],r=e.env||{},s=!(r.NO_COLOR||i.includes("--no-color"))&&(!!r.FORCE_COLOR||i.includes("--color")||"win32"===e.platform||(e.stdout||{}).isTTY&&"dumb"!==r.TERM||!!r.CI),n=(t,e,i=t)=>r=>{
20
15
  let s=""+r,n=s.indexOf(e,t.length);return~n?t+o(s,e,i,n)+e:t+s+e},o=(t,e,i,r)=>{let s="",n=0;do{s+=t.substring(n,r)+i,
21
16
  n=r+e.length,r=t.indexOf(e,n)}while(~r);return s+t.substring(n)},a=(t=s)=>{let e=t?n:()=>String;return{
@@ -30,244 +25,243 @@ greenBright:e("",""),yellowBright:e("",""),blueBright:e("[9
30
25
  magentaBright:e("",""),cyanBright:e("",""),whiteBright:e("",""),
31
26
  bgBlackBright:e("",""),bgRedBright:e("",""),bgGreenBright:e("",""),
32
27
  bgYellowBright:e("",""),bgBlueBright:e("",""),bgMagentaBright:e("",""),
33
- bgCyanBright:e("",""),bgWhiteBright:e("","")}};t.exports=a(),t.exports.createColors=a}},b={}
34
- ;function O(t){var e=b[t];if(void 0!==e)return e.exports;var i=b[t]={exports:{}};return v[t](i,i.exports,O),i.exports}
35
- O.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return O.d(e,{a:e}),e},O.d=(t,e)=>{
36
- for(var i in e)O.o(e,i)&&!O.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},
37
- O.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const x={rE:"0.0.14"
38
- },y=(t=0)=>e=>`[${e+t}m`,w=(t=0)=>e=>`[${38+t};5;${e}m`,C=(t=0)=>(e,i,r)=>`[${38+t};2;${e};${i};${r}m`,T={modifier:{
39
- reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],
40
- strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],
41
- cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],
42
- yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{
43
- bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],
44
- bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],
45
- bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}}
46
- ;Object.keys(T.modifier),Object.keys(T.color),Object.keys(T.bgColor);const E=function(){const t=new Map
47
- ;for(const[e,i]of Object.entries(T)){for(const[e,r]of Object.entries(i))T[e]={open:`[${r[0]}m`,close:`[${r[1]}m`},
48
- i[e]=T[e],t.set(r[0],r[1]);Object.defineProperty(T,e,{value:i,enumerable:!1})}return Object.defineProperty(T,"codes",{
49
- value:t,enumerable:!1}),T.color.close="",T.bgColor.close="",T.color.ansi=y(),T.color.ansi256=w(),
50
- T.color.ansi16m=C(),T.bgColor.ansi=y(10),T.bgColor.ansi256=w(10),T.bgColor.ansi16m=C(10),Object.defineProperties(T,{
51
- rgbToAnsi256:{
52
- value:(t,e,i)=>t===e&&e===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(i/255*5),
53
- enumerable:!1},hexToRgb:{value(t){const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!e)return[0,0,0];let[i]=e
54
- ;3===i.length&&(i=[...i].map(t=>t+t).join(""));const r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,255&r]},
55
- enumerable:!1},hexToAnsi256:{value:t=>T.rgbToAnsi256(...T.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){
56
- if(t<8)return 30+t;if(t<16)return t-8+90;let e,i,r;if(t>=232)e=(10*(t-232)+8)/255,i=e,r=e;else{const s=(t-=16)%36
57
- ;e=Math.floor(t/36)/5,i=Math.floor(s/6)/5,r=s%6/5}const s=2*Math.max(e,i,r);if(0===s)return 30
58
- ;let n=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(e));return 2===s&&(n+=60),n},enumerable:!1},rgbToAnsi:{
59
- value:(t,e,i)=>T.ansi256ToAnsi(T.rgbToAnsi256(t,e,i)),enumerable:!1},hexToAnsi:{
60
- value:t=>T.ansi256ToAnsi(T.hexToAnsi256(t)),enumerable:!1}}),T}(),A=E
61
- ;function S(t,e=(globalThis.Deno?globalThis.Deno.args:c.argv)){
62
- const i=t.startsWith("-")?"":1===t.length?"-":"--",r=e.indexOf(i+t),s=e.indexOf("--");return-1!==r&&(-1===s||r<s)}
63
- const{env:$}=c;let P;function k(t,{streamIsTTY:e,sniffFlags:i=!0}={}){const r=function(){
64
- if("FORCE_COLOR"in $)return"true"===$.FORCE_COLOR?1:"false"===$.FORCE_COLOR?0:0===$.FORCE_COLOR.length?1:Math.min(Number.parseInt($.FORCE_COLOR,10),3)
65
- }();void 0!==r&&(P=r);const s=i?P:r;if(0===s)return 0;if(i){
66
- if(S("color=16m")||S("color=full")||S("color=truecolor"))return 3;if(S("color=256"))return 2}
67
- if("TF_BUILD"in $&&"AGENT_NAME"in $)return 1;if(t&&!e&&void 0===s)return 0;const n=s||0;if("dumb"===$.TERM)return n
68
- ;if("win32"===c.platform){const t=m.release().split(".")
69
- ;return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}
70
- if("CI"in $)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(t=>t in $)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(t=>t in $)||"codeship"===$.CI_NAME?1:n
71
- ;if("TEAMCITY_VERSION"in $)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test($.TEAMCITY_VERSION)?1:0
72
- ;if("truecolor"===$.COLORTERM)return 3;if("xterm-kitty"===$.TERM)return 3;if("xterm-ghostty"===$.TERM)return 3
73
- ;if("wezterm"===$.TERM)return 3;if("TERM_PROGRAM"in $){
74
- const t=Number.parseInt(($.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch($.TERM_PROGRAM){case"iTerm.app":
75
- return t>=3?3:2;case"Apple_Terminal":return 2}}
76
- return/-256(color)?$/i.test($.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test($.TERM)||"COLORTERM"in $?1:n
77
- }function I(t,e={}){return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(k(t,{
78
- streamIsTTY:t&&t.isTTY,...e}))}
79
- S("no-color")||S("no-colors")||S("color=false")||S("color=never")?P=0:(S("color")||S("colors")||S("color=true")||S("color=always"))&&(P=1)
80
- ;const R={stdout:I({isTTY:p.isatty(1)}),stderr:I({isTTY:p.isatty(2)})};function H(t,e,i){let r=t.indexOf(e)
81
- ;if(-1===r)return t;const s=e.length;let n=0,o="";do{o+=t.slice(n,r)+e+i,n=r+s,r=t.indexOf(e,n)}while(-1!==r)
82
- ;return o+=t.slice(n),o}
83
- const{stdout:M,stderr:V}=R,j=Symbol("GENERATOR"),G=Symbol("STYLER"),W=Symbol("IS_EMPTY"),B=["ansi","ansi","ansi256","ansi16m"],F=Object.create(null)
84
- ;const N=t=>{const e=(...t)=>t.join(" ");return((t,e={})=>{
85
- if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3")
86
- ;const i=M?M.level:0;t.level=void 0===e.level?i:e.level})(e,t),Object.setPrototypeOf(e,D.prototype),e};function D(t){
87
- return N(t)}Object.setPrototypeOf(D.prototype,Function.prototype);for(const[t,e]of Object.entries(A))F[t]={get(){
88
- const i=J(this,q(e.open,e.close,this[G]),this[W]);return Object.defineProperty(this,t,{value:i}),i}};F.visible={get(){
89
- const t=J(this,this[G],!0);return Object.defineProperty(this,"visible",{value:t}),t}}
90
- ;const L=(t,e,i,...r)=>"rgb"===t?"ansi16m"===e?A[i].ansi16m(...r):"ansi256"===e?A[i].ansi256(A.rgbToAnsi256(...r)):A[i].ansi(A.rgbToAnsi(...r)):"hex"===t?L("rgb",e,i,...A.hexToRgb(...r)):A[i][t](...r),U=["rgb","hex","ansi256"]
91
- ;for(const t of U){F[t]={get(){const{level:e}=this;return function(...i){
92
- const r=q(L(t,B[e],"color",...i),A.color.close,this[G]);return J(this,r,this[W])}}}
93
- ;F["bg"+t[0].toUpperCase()+t.slice(1)]={get(){const{level:e}=this;return function(...i){
94
- const r=q(L(t,B[e],"bgColor",...i),A.bgColor.close,this[G]);return J(this,r,this[W])}}}}
95
- const Y=Object.defineProperties(()=>{},{...F,level:{enumerable:!0,get(){return this[j].level},set(t){this[j].level=t}}
96
- }),q=(t,e,i)=>{let r,s;return void 0===i?(r=t,s=e):(r=i.openAll+t,s=e+i.closeAll),{open:t,close:e,openAll:r,closeAll:s,
97
- parent:i}},J=(t,e,i)=>{const r=(...t)=>z(r,1===t.length?""+t[0]:t.join(" "));return Object.setPrototypeOf(r,Y),r[j]=t,
98
- r[G]=e,r[W]=i,r},z=(t,e)=>{if(t.level<=0||!e)return t[W]?"":e;let i=t[G];if(void 0===i)return e
99
- ;const{openAll:r,closeAll:s}=i;if(e.includes(""))for(;void 0!==i;)e=H(e,i.close,i.open),i=i.parent
100
- ;const n=e.indexOf("\n");return-1!==n&&(e=function(t,e,i,r){let s=0,n="";do{const o="\r"===t[r-1]
101
- ;n+=t.slice(s,o?r-1:r)+e+(o?"\r\n":"\n")+i,s=r+1,r=t.indexOf("\n",s)}while(-1!==r);return n+=t.slice(s),n}(e,s,r,n)),
102
- r+e+s};Object.defineProperties(D.prototype,F);const K=D(),Q=(D({level:V?V.level:0}),K),X=(t,e,i,r)=>{
103
- if("length"===i||"prototype"===i)return;if("arguments"===i||"caller"===i)return
104
- ;const s=Object.getOwnPropertyDescriptor(t,i),n=Object.getOwnPropertyDescriptor(e,i)
105
- ;!Z(s,n)&&r||Object.defineProperty(t,i,n)},Z=function(t,e){
106
- return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)
107
- },tt=(t,e)=>`/* Wrapped ${t}*/\n${e}`,et=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),it=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name")
108
- ;function rt(t,e,{ignoreNonConfigurable:i=!1}={}){const{name:r}=t;for(const r of Reflect.ownKeys(e))X(t,e,r,i)
109
- ;return((t,e)=>{const i=Object.getPrototypeOf(e);i!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,i)})(t,e),
110
- ((t,e,i)=>{const r=""===i?"":`with ${i.trim()}() `,s=tt.bind(null,r,e.toString());Object.defineProperty(s,"name",it)
111
- ;const{writable:n,enumerable:o,configurable:a}=et;Object.defineProperty(t,"toString",{value:s,writable:n,enumerable:o,
112
- configurable:a})})(t,e,r),t}const st=new WeakMap,nt=(t,e={})=>{
113
- if("function"!=typeof t)throw new TypeError("Expected a function");let i,r=0
114
- ;const s=t.displayName||t.name||"<anonymous>",n=function(...o){if(st.set(n,++r),1===r)i=t.apply(this,o),
115
- t=void 0;else if(!0===e.throw)throw new Error(`Function \`${s}\` can only be called once`);return i};return rt(n,t),
116
- st.set(n,r),n};nt.callCount=t=>{
117
- if(!st.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`)
118
- ;return st.get(t)};const ot=nt,at=[]
119
- ;at.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&at.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),
120
- "linux"===process.platform&&at.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")
121
- ;const lt=t=>!!t&&"object"==typeof t&&"function"==typeof t.removeListener&&"function"==typeof t.emit&&"function"==typeof t.reallyExit&&"function"==typeof t.listeners&&"function"==typeof t.kill&&"number"==typeof t.pid&&"function"==typeof t.on,ht=Symbol.for("signal-exit emitter"),ct=globalThis,ut=Object.defineProperty.bind(Object)
122
- ;class mt{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){
123
- if(ct[ht])return ct[ht];ut(ct,ht,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,e){
124
- this.listeners[t].push(e)}removeListener(t,e){const i=this.listeners[t],r=i.indexOf(e)
125
- ;-1!==r&&(0===r&&1===i.length?i.length=0:i.splice(r,1))}emit(t,e,i){if(this.emitted[t])return!1;this.emitted[t]=!0
126
- ;let r=!1;for(const s of this.listeners[t])r=!0===s(e,i)||r;return"exit"===t&&(r=this.emit("afterExit",e,i)||r),r}}
127
- class pt{}const dt=globalThis.process,{onExit:ft,load:gt,unload:_t}=(vt=lt(dt)?new class extends pt{
128
- #t="win32"===dt.platform?"SIGINT":"SIGHUP";#e=new mt;#i;#r;#s;#n={};#o=!1;constructor(t){super(),this.#i=t,this.#n={}
129
- ;for(const e of at)this.#n[e]=()=>{const i=this.#i.listeners(e);let{count:r}=this.#e;const s=t
130
- ;if("object"==typeof s.__signal_exit_emitter__&&"number"==typeof s.__signal_exit_emitter__.count&&(r+=s.__signal_exit_emitter__.count),
131
- i.length===r){this.unload();const i=this.#e.emit("exit",null,e),r="SIGHUP"===e?this.#t:e;i||t.kill(t.pid,r)}}
132
- ;this.#s=t.reallyExit,this.#r=t.emit}onExit(t,e){if(!lt(this.#i))return()=>{};!1===this.#o&&this.load()
133
- ;const i=e?.alwaysLast?"afterExit":"exit";return this.#e.on(i,t),()=>{this.#e.removeListener(i,t),
134
- 0===this.#e.listeners.exit.length&&0===this.#e.listeners.afterExit.length&&this.unload()}}load(){if(!this.#o){
135
- this.#o=!0,this.#e.count+=1;for(const t of at)try{const e=this.#n[t];e&&this.#i.on(t,e)}catch(t){}
136
- this.#i.emit=(t,...e)=>this.#a(t,...e),this.#i.reallyExit=t=>this.#l(t)}}unload(){this.#o&&(this.#o=!1,at.forEach(t=>{
137
- const e=this.#n[t];if(!e)throw new Error("Listener not defined for signal: "+t);try{this.#i.removeListener(t,e)
138
- }catch(t){}}),this.#i.emit=this.#r,this.#i.reallyExit=this.#s,this.#e.count-=1)}#l(t){
139
- return lt(this.#i)?(this.#i.exitCode=t||0,this.#e.emit("exit",this.#i.exitCode,null),
140
- this.#s.call(this.#i,this.#i.exitCode)):0}#a(t,...e){const i=this.#r;if("exit"===t&&lt(this.#i)){
141
- "number"==typeof e[0]&&(this.#i.exitCode=e[0]);const r=i.call(this.#i,t,...e)
142
- ;return this.#e.emit("exit",this.#i.exitCode,null),r}return i.call(this.#i,t,...e)}}(dt):new class extends pt{onExit(){
143
- return()=>{}}load(){}unload(){}},{onExit:(t,e)=>vt.onExit(t,e),load:()=>vt.load(),unload:()=>vt.unload()});var vt
144
- ;const bt=c.stderr.isTTY?c.stderr:c.stdout.isTTY?c.stdout:void 0,Ot=bt?ot(()=>{ft(()=>{bt.write("[?25h")},{
145
- alwaysLast:!0})}):()=>{};let xt=!1;const yt={show:(t=c.stderr)=>{t.isTTY&&(xt=!1,t.write("[?25h"))},
146
- hide:(t=c.stderr)=>{t.isTTY&&(Ot(),xt=!0,t.write("[?25l"))},toggle:(t,e)=>{void 0!==t&&(xt=t),xt?yt.show(e):yt.hide(e)}
147
- },wt=yt,Ct=JSON.parse('{"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":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots14":{"interval":80,"frames":["⠉⠉","⠈⠙","⠀⠹","⠀⢸","⠀⣰","⢀⣠","⣀⣀","⣄⡀","⣆⠀","⡇⠀","⠏⠀","⠋⠁"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"dotsCircle":{"interval":80,"frames":["⢎ ","⠎⠁","⠊⠑","⠈⠱"," ⡱","⢀⡰","⢄⡠","⢆⡀"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"rollingLine":{"interval":80,"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":[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]},"fish":{"interval":80,"frames":["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","º> ~~~~~~~~~~~~~~~~~","(º> ~~~~~~~~~~~~~~~~","((º> ~~~~~~~~~~~~~~~","<((º> ~~~~~~~~~~~~~~","><((º> ~~~~~~~~~~~~~"," ><((º> ~~~~~~~~~~~~","~ ><((º> ~~~~~~~~~~~","~~ <>((º> ~~~~~~~~~~","~~~ ><((º> ~~~~~~~~~","~~~~ <>((º> ~~~~~~~~","~~~~~ ><((º> ~~~~~~~","~~~~~~ <>((º> ~~~~~~","~~~~~~~ ><((º> ~~~~~","~~~~~~~~ <>((º> ~~~~","~~~~~~~~~ ><((º> ~~~","~~~~~~~~~~ <>((º> ~~","~~~~~~~~~~~ ><((º> ~","~~~~~~~~~~~~ <>((º> ","~~~~~~~~~~~~~ ><((º>","~~~~~~~~~~~~~~ <>((º","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}}')
148
- ;const Tt=Ct;Object.keys(Ct);const Et=p?.WriteStream?.prototype?.hasColors?.()??!1,At=(t,e)=>{if(!Et)return t=>t
149
- ;const i=`[${t}m`,r=`[${e}m`;return t=>{const s=t+"";let n=s.indexOf(r);if(-1===n)return i+s+r;let o=i,a=0
150
- ;const l=(22===e?r:"")+i;for(;-1!==n;)o+=s.slice(a,n)+l,a=n+r.length,n=s.indexOf(r,a);return o+=s.slice(a)+r,o}
151
- },St=(At(0,0),At(1,22),At(2,22),At(3,23),At(4,24),At(53,55),At(7,27),At(8,28),At(9,29),At(30,39),
152
- At(31,39)),$t=At(32,39),Pt=At(33,39),kt=At(34,39);At(35,39),At(36,39),At(37,39),At(90,39),At(40,49),At(41,49),At(42,49),
153
- At(43,49),At(44,49),At(45,49),At(46,49),At(47,49),At(100,49),At(91,39),At(92,39),At(93,39),At(94,39),At(95,39),
154
- At(96,39),At(97,39),At(101,49),At(102,49),At(103,49),At(104,49),At(105,49),At(106,49),At(107,49);function It(){
155
- const{env:t}=c,{TERM:e,TERM_PROGRAM:i}=t
156
- ;return"win32"!==c.platform?"linux"!==e:Boolean(t.WT_SESSION)||Boolean(t.TERMINUS_SUBLIME)||"{cmd::Cmder}"===t.ConEmuTask||"Terminus-Sublime"===i||"vscode"===i||"xterm-256color"===e||"alacritty"===e||"rxvt-unicode"===e||"rxvt-unicode-256color"===e||"JetBrains-JediTerm"===t.TERMINAL_EMULATOR
157
- }const Rt=It(),Ht=kt(Rt?"ℹ":"i"),Mt=$t(Rt?"✔":"√"),Vt=Pt(Rt?"⚠":"‼"),jt=St(Rt?"✖":"×")
158
- ;const Gt=function({onlyFirst:t=!1}={}){
159
- return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",t?void 0:"g")
160
- }()
161
- ;const Wt=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],Bt=[12288,12288,65281,65376,65504,65510],Ft=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],Nt=(t,e)=>{
162
- let i=0,r=Math.floor(t.length/2)-1;for(;i<=r;){const s=Math.floor((i+r)/2),n=2*s;if(e<t[n])r=s-1;else{
163
- if(!(e>t[n+1]))return!0;i=s+1}}return!1};const[Dt,Lt]=Ut(Ft);function Ut(t){let e=t[0],i=t[1]
164
- ;for(let r=0;r<t.length;r+=2){const s=t[r],n=t[r+1];if(19968>=s&&19968<=n)return[s,n];n-s>i-e&&(e=s,i=n)}return[e,i]}
165
- const Yt=t=>!(t<161||t>1114109)&&Nt(Wt,t),qt=t=>!(t<12288||t>65510)&&Nt(Bt,t),Jt=t=>t>=Dt&&t<=Lt||!(t<4352||t>262141)&&Nt(Ft,t)
166
- ;function zt(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}
167
- function Kt(t,{ambiguousAsWide:e=!1}={}){return zt(t),qt(t)||Jt(t)||e&&Yt(t)?2:1}
168
- const Qt=new Intl.Segmenter,Xt=/^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v,Zt=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v,te=/^\p{RGI_Emoji}$/v,ee=/^[\d#*]\u20E3$/,ie=/\p{Extended_Pictographic}/gu
169
- ;function re(t){if(t.length>50)return!1;if(ee.test(t))return!0;if(t.includes("")){const e=t.match(ie)
170
- ;return null!==e&&e.length>=2}return!1}function se(t){return t.replace(Zt,"")}function ne(t){return Xt.test(t)}
171
- function oe(t){return t>=4352&&t<=4447||t>=43360&&t<=43388}function ae(t){return t>=4448&&t<=4519||t>=55216&&t<=55238}
172
- function le(t){return t>=4520&&t<=4607||t>=55243&&t<=55291}function he(t){return oe(t)||ae(t)||le(t)}function ce(t,e){
173
- const i=[];for(const e of t)Xt.test(e)||i.push(e.codePointAt(0));if(0===i.length)return;let r=0
174
- ;for(let t=0;t<i.length;t++){const s=i[t];if(!he(s)){if(0===r)return;for(let s=t;s<i.length;s++)r+=Kt(i[s],e);return r}
175
- oe(s)&&ae(i[t+1])?(r+=2,t+=le(i[t+2])?2:1):r+=Kt(s,e)}return r}function ue(t,e){let i=0,r=!0
176
- ;for(const s of t)r?r=!1:s>=""&&s<=""&&(i+=Kt(s.codePointAt(0),e));return i}function me(t,e={}){
177
- if("string"!=typeof t||0===t.length)return 0;const{ambiguousIsNarrow:i=!0,countAnsiEscapeCodes:r=!1}=e;let s=t
178
- ;if(r||!s.includes("")&&!s.includes("›")||(s=function(t){
179
- if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``)
180
- ;return t.includes("")||t.includes("›")?t.replace(Gt,""):t}(s)),0===s.length)return 0
181
- ;if(/^[\u0020-\u007E]*$/.test(s))return s.length;let n=0;const o={ambiguousAsWide:!i}
182
- ;for(const{segment:t}of Qt.segment(s)){if(ne(t))continue;if(te.test(t)||re(t)){n+=2;continue}const e=se(t),i=ce(e,o)
183
- ;if(void 0!==i){n+=i;continue}n+=Kt(e.codePointAt(0),o),n+=ue(e,o)}return n}const pe=new class{#h=0;#c;#u=!1;#m=!1
184
- ;#p=t=>{if(!t?.length)return;3===("string"==typeof t?t.codePointAt(0):t[0])&&c.kill(c.pid,"SIGINT")};start(){this.#h++,
185
- 1===this.#h&&this.#d()}stop(){0!==this.#h&&0===--this.#h&&this.#f()}#d(){const{stdin:t}=c
186
- ;"win32"!==c.platform&&t?.isTTY&&"function"==typeof t.setRawMode?(this.#c=t,this.#u=t.isPaused(),
187
- this.#m=Boolean(t.isRaw),t.setRawMode(!0),t.prependListener("data",this.#p),this.#u&&t.resume()):this.#c=void 0}#f(){
188
- if(!this.#c)return;const t=this.#c;t.off("data",this.#p),t.isTTY&&t.setRawMode?.(this.#m),this.#u&&t.pause(),
189
- this.#c=void 0,this.#u=!1,this.#m=!1}
190
- },de=Object.freeze(pe),fe=new Map,ge=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"])
191
- ;class _e{#g=0;#_=-1;#v=0;#b;#O;#x;#y;#w=new Map;#C=!1;#T;#E;#A=!1;#S;#$(t){this.#C=!0;try{return t()}finally{this.#C=!1
192
- }}#P(){this.isSpinning&&this.render()}#k(t,e){if(null==t)return"";if("string"==typeof t)return t
193
- ;if(Buffer.isBuffer(t)||ArrayBuffer.isView(t)){const i="string"==typeof e&&e&&"buffer"!==e?e:"utf8"
194
- ;return Buffer.from(t).toString(i)}return String(t)}#I(t){if(!t)return!1;const e=t.at(-1);return"\n"===e||"\r"===e}#R(){
195
- this.#E||(this.#E=setTimeout(()=>{this.#E=void 0,this.isSpinning&&this.#P()},200),
196
- "function"==typeof this.#E?.unref&&this.#E.unref())}#H(){this.#E&&(clearTimeout(this.#E),this.#E=void 0)}#M(t,e,i,r){
197
- return this.#V(i," ")+t+("string"==typeof e?(t?" ":"")+e:"")+this.#j(r," ")}constructor(t){if("string"==typeof t&&(t={
198
- text:t}),this.#b={color:"cyan",stream:c.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#b.color,
199
- this.#x=this.#b.stream,"boolean"!=typeof this.#b.isEnabled&&(this.#b.isEnabled=function({stream:t=process.stdout}={}){
200
- return Boolean(t&&t.isTTY&&"dumb"!==process.env.TERM&&!("CI"in process.env))}({stream:this.#x})),
201
- "boolean"!=typeof this.#b.isSilent&&(this.#b.isSilent=!1),
202
- void 0!==this.#b.interval&&!(Number.isInteger(this.#b.interval)&&this.#b.interval>0))throw new Error("The `interval` option must be a positive integer")
203
- ;const e=this.#b.interval;this.spinner=this.#b.spinner,this.#b.interval=e,this.text=this.#b.text,
204
- this.prefixText=this.#b.prefixText,this.suffixText=this.#b.suffixText,this.indent=this.#b.indent}get indent(){
205
- return this.#b.indent}set indent(t=0){
206
- if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#b.indent=t
207
- }get interval(){return this.#b.interval??this.#O.interval??100}get spinner(){return this.#O}set spinner(t){
208
- if(this.#_=-1,this.#b.interval=void 0,"object"==typeof t){
209
- if(!Array.isArray(t.frames)||0===t.frames.length||t.frames.some(t=>"string"!=typeof t))throw new Error("The given spinner must have a non-empty `frames` array of strings")
210
- ;if(void 0!==t.interval&&!(Number.isInteger(t.interval)&&t.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided")
211
- ;this.#O=t}else if(It())if(void 0===t)this.#O=Tt.dots;else{
212
- if("default"===t||!Tt[t])throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)
213
- ;this.#O=Tt[t]}else this.#O=Tt.line}get text(){return this.#b.text}set text(t=""){this.#b.text=t}get prefixText(){
214
- return this.#b.prefixText}set prefixText(t=""){this.#b.prefixText=t}get suffixText(){return this.#b.suffixText}
215
- set suffixText(t=""){this.#b.suffixText=t}get isSpinning(){return void 0!==this.#y}#G(t,e,i=!1){
216
- const r="function"==typeof t?t():t;return"string"==typeof r&&""!==r?i?e+r:r+e:""}#V(t=this.#b.prefixText,e=" "){
217
- return this.#G(t,e,!1)}#j(t=this.#b.suffixText,e=" "){return this.#G(t,e,!0)}#W(t,e){let i=0
218
- ;for(const r of u(t).split("\n"))i+=Math.max(1,Math.ceil(me(r)/e));return i}get color(){return this.#S}set color(t){
219
- if(void 0!==t&&!1!==t&&!ge.has(t))throw new Error("The `color` option must be a valid color or `false` to disable")
220
- ;this.#S=t}get isEnabled(){return this.#b.isEnabled&&!this.#b.isSilent}set isEnabled(t){
221
- if("boolean"!=typeof t)throw new TypeError("The `isEnabled` option must be a boolean");this.#b.isEnabled=t}
222
- get isSilent(){return this.#b.isSilent}set isSilent(t){
223
- if("boolean"!=typeof t)throw new TypeError("The `isSilent` option must be a boolean");this.#b.isSilent=t}frame(){
224
- const t=Date.now();(-1===this.#_||t-this.#v>=this.interval)&&(this.#_=(this.#_+1)%this.#O.frames.length,this.#v=t)
225
- ;const{frames:e}=this.#O;let i=e[this.#_];this.#S&&(i=Q[this.#S](i))
226
- ;return this.#V(this.#b.prefixText," ")+i+("string"==typeof this.text?" "+this.text:"")+this.#j(this.#b.suffixText," ")}
227
- clear(){return this.isEnabled&&this.#x.isTTY?(this.#$(()=>{this.#x.cursorTo(0)
228
- ;for(let t=0;t<this.#g;t++)t>0&&this.#x.moveCursor(0,-1),this.#x.clearLine(1)
229
- ;this.#b.indent&&this.#x.cursorTo(this.#b.indent)}),this.#g=0,this):this}#B(t){
230
- if(!t||this.#w.has(t)||!t.isTTY||"function"!=typeof t.write)return
231
- ;fe.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.")
232
- ;const e=t.write;this.#w.set(t,e),fe.set(t,this),t.write=(i,r,s)=>this.#F(t,e,i,r,s)}#N(){
233
- if(!this.isEnabled||this.#w.size>0)return;const t=new Set([this.#x,c.stdout,c.stderr]);for(const e of t)this.#B(e)}#D(){
234
- for(const[t,e]of this.#w)t.write=e,fe.get(t)===this&&fe.delete(t);this.#w.clear()}#F(t,e,i,r,s){
235
- if("function"==typeof r&&(s=r,r=void 0),this.#C)return e.call(t,i,r,s);this.clear()
236
- ;const n=this.#k(i,r),o=this.#I(n),a=e.call(t,i,r,s);return o?this.#H():n.length>0&&this.#R(),
237
- this.isSpinning&&!this.#E&&this.render(),a}render(){if(!this.isEnabled||this.#T||this.#E)return this
238
- ;const t=this.#x.isTTY;let e=!1;try{t&&(this.#$(()=>this.#x.write("[?2026h")),e=!0),this.clear();let i=this.frame()
239
- ;const r=this.#x.columns??80,s=this.#W(i,r),n=this.#x.rows;if(n&&n>1&&s>n){const t=i.split("\n"),e=n-1
240
- ;i=[...t.slice(0,e),"... (content truncated to fit terminal)"].join("\n")}
241
- !1===this.#$(()=>this.#x.write(i))&&this.#x.isTTY&&(this.#T=()=>{this.#T=void 0,this.#P()},
242
- this.#x.once("drain",this.#T)),this.#g=this.#W(i,r)}finally{e&&this.#$(()=>this.#x.write("[?2026l"))}return this}
243
- start(t){if(void 0!==t&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){
244
- const t=this.text?"-":"",e=" ".repeat(this.#b.indent)+this.#M(t,this.text,this.#b.prefixText,this.#b.suffixText)
245
- ;return""!==e.trim()&&this.#$(()=>this.#x.write(e+"\n")),this}
246
- return this.isSpinning||(this.#b.hideCursor&&wt.hide(this.#x),this.#b.discardStdin&&c.stdin.isTTY&&(de.start(),
247
- this.#A=!0),this.#N(),this.render(),this.#y=setInterval(this.render.bind(this),this.interval)),this}stop(){
248
- return clearInterval(this.#y),this.#y=void 0,this.#_=-1,this.#v=0,this.#H(),this.#D(),
249
- this.#T&&(this.#x.removeListener("drain",this.#T),this.#T=void 0),this.isEnabled&&(this.clear(),
250
- this.#b.hideCursor&&wt.show(this.#x)),this.#A&&(this.#A=!1,de.stop()),this}succeed(t){return this.stopAndPersist({
251
- symbol:Mt,text:t})}fail(t){return this.stopAndPersist({symbol:jt,text:t})}warn(t){return this.stopAndPersist({symbol:Vt,
252
- text:t})}info(t){return this.stopAndPersist({symbol:Ht,text:t})}stopAndPersist(t={}){if(this.isSilent)return this
253
- ;const e=t.symbol??" ",i=t.text??this.text,r=t.prefixText??this.#b.prefixText,s=t.suffixText??this.#b.suffixText,n=this.#M(e,i,r,s)+"\n"
254
- ;return this.stop(),this.#$(()=>this.#x.write(n)),this}}function ve(t){return new _e(t)}var be=O(991),Oe=O.n(be)
255
- ;class xe extends Error{constructor(t,e,i){super(i),Error.captureStackTrace(this,this.constructor),
256
- this.name=this.constructor.name,this.code=e,this.exitCode=t,this.nestedError=void 0}}class ye extends xe{constructor(t){
28
+ bgCyanBright:e("",""),bgWhiteBright:e("","")}};t.exports=a(),t.exports.createColors=a},84(t,e,i){
29
+ "use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}}
30
+ ;Object.defineProperty(e,"__esModule",{value:!0}),e.build=function({rootPath:t}){return async()=>{const e=".mahameru"
31
+ ;const i=(0,l.join)(t,e);console.log(`${(0,n.bold)((0,n.cyan)("▲ Mahameru"))} ${(0,n.dim)(`CLI v${s.version}`)}\n`)
32
+ ;const r=(0,o.default)((0,n.cyan)(" Checking environment...")).start(),{tscJsPath:f,tscAliasJsPath:g}=(0,
33
+ h.ensureDevEnvironment)();try{r.text=(0,n.cyan)(" Starting build...\n"),await(0,c.deleteDirIfExists)(i),await(0,
34
+ p.buildConfigJson)(),await(0,m.generateRouteTypes)((0,l.join)(t,"routes"),(0,l.join)(i,"types","routes.d.ts"))
35
+ ;const e="tsconfig.build.json",s=(0,l.join)(t,e),o=(0,l.join)(t,"tsconfig.json"),h=await(0,a.readFile)(o,"utf8")
36
+ ;let _=null;try{_=JSON.parse(h),_.compilerOptions.outDir=".mahameru",await(0,a.writeFile)(s,JSON.stringify(_,null,2))
37
+ }catch(t){console.error(`Error parsing ${o}: ${t}`),process.exit(1)}const v=await(0,
38
+ u.runNodeScript)(f,["--project",e],t);0!==v&&(r.fail((0,n.red)(" Build failed!")),await(0,c.deleteDirIfExists)(i),
39
+ process.exit(v));const b=await(0,u.runNodeScript)(g,["--project",e],t);0!==b&&(r.fail((0,n.red)(" tsc-alias failed.")),
40
+ await(0,c.deleteDirIfExists)(i),process.exit(b));const w=(0,d.findUnresolvedAliases)(i);if(w.length>0){r.fail((0,
41
+ n.red)(" Build produced unresolved path aliases.")),
42
+ console.error((0,n.yellow)("Please use tsconfig path aliases such as @/* and avoid package.json imports for app source files."))
43
+ ;for(const t of w)console.error((0,n.red)(` - ${t}`));process.exit(1)}await(0,c.deleteDirIfExists)(s),r.succeed((0,
44
+ n.green)(" Build success."))}catch(t){r.fail((0,n.red)(" Internal error.")),console.error(t),process.exit(1)}}}
45
+ ;const s=i(330),n=i(943),o=r(i(920)),a=i(455),l=i(760),h=i(140),c=i(185),u=i(110),d=i(428),m=i(713),p=i(854)},
46
+ 855(t,e,i){"use strict";e.dev=function({version:t}){return async({host:e,port:i})=>{console.clear();const o=(0,
47
+ r.ensureDevEnvironment)();(0,s.printCliBanner)(t),await(0,n.startWatchedDevServer)({version:t,environment:o,host:e,
48
+ port:i})}};const r=i(140),s=i(911),n=i(842)},700(t,e,i){"use strict";var r=this&&this.__importDefault||function(t){
49
+ return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),
50
+ e.start=function({rootPath:t,version:e}){return async({host:i,port:r})=>{let h=!1;const c=(0,
51
+ n.join)(t,"node_modules","mahameru","dist","server.js");(0,l.printCliBanner)(e),(0,
52
+ o.existsSync)(c)||(console.error(`${a.default.red("[Mahameru]")} Cannot find Mahameru node package. Please install it by running: \`npm i mahameru\``),
53
+ process.exit(1));const u={workerPath:c,configFileName:"mahameru.config.json",dev:!1,host:i,port:r,rootPath:t
54
+ },d=new s.App(u);await d.start();const m=async(t=0)=>{h||(h=!0,await d.stop(),process.exit(t))}
55
+ ;process.once("SIGINT",()=>{m(0)}),process.once("SIGTERM",()=>{m(0)})}}
56
+ ;const s=i(859),n=i(760),o=i(24),a=r(i(991)),l=i(911)},859(t,e,i){"use strict"
57
+ ;var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}}
58
+ ;Object.defineProperty(e,"__esModule",{value:!0}),e.App=void 0;const s=r(i(139)),n=i(633),o=r(i(991)),a=i(24)
59
+ ;e.App=class{initialized=!1;options;worker;appEnv;handleOnExit;constructor(t){if(this.options=t,
60
+ this.appEnv=this.buildAppEnv(),
61
+ !(0,a.existsSync)(this.options.workerPath))throw new Error("Cannot find Mahameru worker.");s.default.setupPrimary({
62
+ exec:this.options.workerPath,cwd:this.options.rootPath,stdio:["inherit","inherit","inherit","ipc"]})}async start(){
63
+ if(this.initialized)throw new Error("App has already been started.");this.worker=s.default.fork(this.appEnv),
64
+ this.initialized=!0,this.setupListeners()}stop(){return new Promise(t=>{
65
+ if(!this.worker||this.worker.isDead()||!this.initialized)return this.initialized=!1,void t()
66
+ ;this.handleOnExit&&this.worker.removeListener("exit",this.handleOnExit);let e=null;this.worker.once("message",i=>{
67
+ "SHUTDOWN_DONE"===i.type&&(e&&clearTimeout(e),this.initialized=!1,this.worker=void 0,t())}),this.worker.send({
68
+ type:"SHUTDOWN"
69
+ }),void 0!==this.options.gracefulShutdownTimeout&&this.options.gracefulShutdownTimeout>0&&(e=setTimeout(()=>{
70
+ this.worker&&!this.worker.isDead()&&(console.warn(o.default.yellow("[Mahameru] Graceful shutdown timed out, killing worker.")),
71
+ this.worker.disconnect(),this.worker.kill(),t())},this.options.gracefulShutdownTimeout))})}async devHRM(t){
72
+ this.worker&&this.worker.send({type:"DEV_HRM",data:{changedFile:t}})}generateTypes(){return new Promise((t,e)=>{
73
+ this.worker?(this.worker.once("message",e=>{"GENERATE_ROUTE_TYPES_DONE"===e.type&&t()}),this.worker.send({
74
+ type:"GENERATE_ROUTE_TYPES"})):e(new Error("Worker is not initialized."))})}setupListeners(){if(!this.worker)return
75
+ ;const t=this.options.onMessage?this.options.onMessage:t=>{switch(t.type){case"READY":(0,n.printServerReady)({dev:!0,
76
+ mode:t.data.mode,host:t.data?.host??"localhost",port:t.data?.port??3e3});break;case"ERROR":
77
+ console.error(o.default.red("\n[Mahameru]"),t.data.message,t.data.stack??"",t.data.code??"");break;case"LOG":
78
+ console.log(t.data)}},e=this.options.onError?this.options.onError:t=>console.error(t)
79
+ ;this.handleOnExit=this.options.onExit?this.options.onExit:t=>{
80
+ console.error(o.default.red(`[Mahameru] Dev server exited with code ${Number(t)}.`)),0!==t&&process.exit(t)},
81
+ this.worker.on("message",t),this.worker.on("error",e),this.worker.on("exit",this.handleOnExit)}buildAppEnv(){return{
82
+ MAHAMERU__ROOT_PATH:this.options.rootPath,...this.options.dev?{MAHAMERU__MODE:"development"}:{
83
+ MAHAMERU__MODE:"production"},...this.options.configFileName?{MAHAMERU__CONFIG_FILE:this.options.configFileName.trim()
84
+ }:{},...this.options.host?{MAHAMERU__HTTP_LISTEN_HOST:this.options.host.trim()}:{},...this.options.port?{
85
+ MAHAMERU__HTTP_LISTEN_PORT:this.options.port.toString().trim()}:{}}}}},854(t,e,i){"use strict"
86
+ ;e.buildConfigJson=async function(){const t=(0,r.createRequire)(__filename),{mahameruDefaultConfig:e}=t((0,
87
+ n.join)(process.cwd(),"node_modules","mahameru","dist","mahameru.js")),i=t((0,
88
+ n.join)(process.cwd(),"mahameru.config.ts")).default,o=await i(e),a=JSON.stringify(o,null,2),l=(0,
89
+ n.join)(process.cwd(),".mahameru",".mahameru.config.json");return await(0,s.mkdir)((0,n.dirname)(l),{recursive:!0}),
90
+ await(0,s.writeFile)(l,a,"utf-8"),i};const r=i(339),s=i(455),n=i(760)},140(t,e,i){"use strict"
91
+ ;e.ensureDevEnvironment=function(){const t=process.cwd(),e=(0,s.join)(t,"node_modules","tsx","dist","cli.mjs"),i=(0,
92
+ s.join)(t,"node_modules","typescript","bin","tsc"),o=(0,s.join)(t,"node_modules","tsc-alias","dist","bin","index.js")
93
+ ;!(0,n.existsSync)((0,s.join)(t,"package.json"))&&(0,n.existsSync)((0,s.join)(t,"node_modules"))&&(console.error((0,
94
+ r.red)("Current directory is not a Node.js project.")),process.exit(1));(0,n.existsSync)(e)||(console.error((0,
95
+ r.red)("Error: Runner 'tsx' is not installed.")),
96
+ console.error((0,r.yellow)("Please install it by running: npm install -D tsx")),process.exit(1));(0,
97
+ n.existsSync)(i)||(console.error((0,r.red)("Error: TypeScript compiler (tsc) is not installed in this project.")),
98
+ console.error((0,r.yellow)("Please install it by running: npm install -D typescript")),process.exit(1));(0,
99
+ n.existsSync)(o)||(console.error((0,r.red)("Error: tsc-alias not installed.")),console.error((0,
100
+ r.yellow)("Please install it by running: npm install -D tsc-alias")),process.exit(1));return{rootPath:t,tsxJsPath:e,
101
+ tscJsPath:i,tscAliasJsPath:o}};const r=i(943),s=i(760),n=i(24)},428(t,e,i){"use strict"
102
+ ;e.findUnresolvedAliases=function(t){if(!(0,r.existsSync)(t))return[];const e=[t],i=new Set;for(;e.length>0;){
103
+ const t=e.pop();for(const n of(0,r.readdirSync)(t)){const o=(0,s.join)(t,n);if((0,r.statSync)(o).isDirectory()){
104
+ e.push(o);continue}if(!o.endsWith(".js"))continue;const a=(0,r.readFileSync)(o,"utf8")
105
+ ;(a.includes("'@/")||a.includes('"@/'))&&i.add(o)}}return[...i]};const r=i(24),s=i(760)},713(t,e,i){"use strict"
106
+ ;e.generateRouteTypes=async function(t,e){const i=[];await async function t(e,o=""){if(!(0,r.existsSync)(e))return
107
+ ;const a=await(0,s.readdir)(e);for(const r of a){const a=(0,n.join)(e,r);if((await(0,s.stat)(a)).isDirectory()){
108
+ const e=r.startsWith("[")&&r.endsWith("]")?`:${r.slice(1,-1)}`:r;await t(a,`${o}/${e}`)
109
+ }else"route.ts"!==r&&"route.js"!==r||i.push(""===o?"/":o)}}(t)
110
+ ;const o=`// Do not edit this file, it is generated by MahameruJS\n\ntype MahameruGeneratedRoutes = ${i.map(t=>`'${t}'`).join(" | ")||"string"};\n`,a=(0,
111
+ n.join)(process.cwd(),"mahameru.d.ts");await(0,s.mkdir)((0,n.dirname)(e),{recursive:!0}),await(0,
112
+ s.writeFile)(e,o.trim()),
113
+ await(0,s.writeFile)(a,'/// <reference path="./.mahameru/types/routes.d.ts" />\n\n// Do not edit this file, it is generated by MahameruJS\n')
114
+ };const r=i(24),s=i(455),n=i(760)},943(t,e,i){"use strict";e.green=e.yellow=e.red=e.dim=e.cyan=e.bold=void 0
115
+ ;const r=i(991);Object.defineProperty(e,"bold",{enumerable:!0,get:function(){return r.bold}}),
116
+ Object.defineProperty(e,"cyan",{enumerable:!0,get:function(){return r.cyan}}),Object.defineProperty(e,"dim",{
117
+ enumerable:!0,get:function(){return r.dim}}),Object.defineProperty(e,"red",{enumerable:!0,get:function(){return r.red}
118
+ }),Object.defineProperty(e,"yellow",{enumerable:!0,get:function(){return r.yellow}}),Object.defineProperty(e,"green",{
119
+ enumerable:!0,get:function(){return r.green}})},911(t,e,i){"use strict";e.printCliBanner=function(t){console.log(`${(0,
120
+ r.bold)((0,r.cyan)("▲ Mahameru"))} ${(0,r.dim)(`CLI v${t}`)}\n`)};const r=i(943)},633(t,e){"use strict"
121
+ ;e.printServerReady=function({mode:t,dev:e,host:i,port:r}){console.log(" Mahameru Server Ready!"),
122
+ console.log(` Mode: ${t}`),console.log(` Local: http://${i}:${r}`),
123
+ console.log(` Host: ${i}`),console.log(` Port: ${r}\n`),
124
+ console.log("Press Ctrl+C to stop the server\n")}},110(t,e,i){"use strict";e.runNodeScript=function(t,e,i){
125
+ return new Promise((s,n)=>{const o=(0,r.spawn)(process.execPath,[t,...e],{stdio:"inherit",cwd:i})
126
+ ;o.on("message",t=>console.log(t)),o.on("close",t=>s(t??1)),o.on("error",n)})};const r=i(421)},842(t,e,i){"use strict"
127
+ ;var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}}
128
+ ;Object.defineProperty(e,"__esModule",{value:!0
129
+ }),e.startWatchedDevServer=async function({environment:t,host:e,port:i,version:r}){
130
+ let u,C=null,T=!1,E=null,A=!1,S=!0,P=!1,$=0
131
+ ;const k=new Set,R=new Set,M=(0,o.join)(p,"node_modules","mahameru","dist","server.js");(0,
132
+ s.existsSync)(b)||(console.error(`${(0,l.red)("[Mahameru]")} ${(0,o.relative)(p,b)} does not exist!`),process.exit(1))
133
+ ;await(0,n.mkdir)(f,{recursive:!0});const j=(0,a.default)({
134
+ text:`${(0,l.cyan)("[Mahameru]")} Starting TypeScript watch...`,spinner:"triangle"}).start();await(0,
135
+ d.generateRouteTypes)((0,o.join)(p,"routes"),(0,o.join)(f,"types","routes.d.ts"));const H={workerPath:M,
136
+ configFileName:"mahameru.config.ts",dev:!0,host:e,port:i,rootPath:p};u=new c.App(H),
137
+ C=await async function({spinner:t,onBuildStart:e,onBuildSuccess:i,onBuildFailure:r}){const a=(0,o.resolve)((0,
138
+ o.join)(p,"node_modules","typescript")),{createWatchCompilerHost:h,createWatchProgram:c,formatDiagnosticsWithColorAndContext:u,formatDiagnostic:d,sys:b,createEmitAndSemanticDiagnosticsBuilderProgram:y}=m(a),C={
139
+ getCanonicalFileName:t=>t,getCurrentDirectory:()=>p,getNewLine:()=>b.newLine};let T=!1,E=!1,A=0
140
+ ;const S=new Map,P=new Map;let $,k,R=Promise.resolve();const M=new Promise((t,e)=>{$=t,k=e}),j=h(v,{outDir:f},b,y,t=>{
141
+ E=!0;const e=t.file?u([t],C):d(t,C);process.stderr.write(e.endsWith("\n")?e:`${e}\n`)},t=>{
142
+ const i=t.messageText.toString().trim();(function(t){
143
+ return t.includes("Starting compilation in watch mode...")||t.includes("File change detected. Starting incremental compilation...")
144
+ })(i)&&(A+=1,S.set(A,Date.now()),P.set(A,{emittedRuntimeFiles:new Set,changedRuntimeSourceFiles:new Set}),E=!1,e()),
145
+ function(t){
146
+ return["Starting compilation in watch mode...","File change detected. Starting incremental compilation...","Found 0 errors. Watching for file changes.","Watching for file changes."].some(e=>t.includes(e))
147
+ }(i)||console.log(`${(0,l.yellow)("[Mahameru TSC]")} ${i}`)}),H=O((0,o.resolve)((0,o.join)(f,"types"))),I=t=>{
148
+ const e=O((0,o.resolve)(t));return e===H||e.startsWith(`${H}/`)},D=j.watchFile?.bind(j)
149
+ ;D&&(j.watchFile=(t,e,i,r)=>I(t)?{close(){}}:D(t,e,i,r));const W=j.watchDirectory?.bind(j)
150
+ ;W&&(j.watchDirectory=(t,e,i,r)=>I(t)?{close(){}}:W(t,e,i,r));const F=j,B=F.writeFile?.bind(F)??b.writeFile.bind(b)
151
+ ;F.writeFile=(t,e,i,r,s,n)=>{B?.(t,e,i,r,s,n),L(t,s)};const G=j.afterProgramCreate;j.afterProgramCreate=t=>{G?.(t)
152
+ ;const e=0===A?1:A;A=e,R=R.then(()=>V(t,e)).catch(t=>{
153
+ console.error((0,l.red)("[Mahameru Dev] Build lifecycle failed.")),console.error(t)})};const N=c(j)
154
+ ;async function V(e,a){const h=S.get(a)??Date.now(),c=P.get(a)??{emittedRuntimeFiles:new Set,
155
+ changedRuntimeSourceFiles:new Set}
156
+ ;if(E)return T||(T=!0,t.fail(`${(0,l.red)("[Mahameru]")} Initial TypeScript build failed.`),
157
+ k(new Error("Initial TypeScript build failed."))),P.delete(a),S.delete(a),void r();try{if(T)await async function(t){
158
+ if(0===t.length)return;const e=await async function(){if(!w){const t=(0,o.resolve)((0,
159
+ o.join)(p,"node_modules","tsc-alias")),{prepareSingleFileReplaceTscAliasPaths:e}=m(t);w=e({configFile:v,outDir:f})}
160
+ return w}();for(const i of t){if(!(0,s.existsSync)(i))continue;const t=await(0,n.readFile)(i,"utf8"),r=e({
161
+ fileContents:t,filePath:i});r!==t&&await(0,n.writeFile)(i,r)}}([...c.emittedRuntimeFiles]);else{
162
+ await async function(t=3e4){const e=Date.now();for(;Date.now()-e<t;){if((0,s.existsSync)(g))return void await x(200)
163
+ ;await x(100)}throw new Error("Timed out waiting for emitted dev runtime artifacts.")}();const t=(0,o.resolve)((0,
164
+ o.join)(p,"node_modules","tsc-alias")),{replaceTscAliasPaths:e}=m(t);await e({configFile:v,outDir:f})}}catch(e){
165
+ return console.error((0,l.red)("[Mahameru Alias] Alias rewrite failed.")),console.error(e),T||(T=!0,t.fail(`${(0,
166
+ l.red)("[Mahameru]")} Initial alias rewrite failed.`),k(e instanceof Error?e:new Error(String(e)))),P.delete(a),
167
+ S.delete(a),void r()}const u=Date.now()-h;try{await i({durationMs:u,emittedRuntimeFiles:[...c.emittedRuntimeFiles],
168
+ changedRuntimeSourceFiles:[...c.changedRuntimeSourceFiles],initialBuild:!T})}catch(t){return console.error((0,
169
+ l.red)("[Mahameru Alias] Alias rewrite failed.")),console.error(t),void r()}finally{P.delete(a),S.delete(a)}T||(T=!0,
170
+ $())}function L(t,e){const i=(0,o.resolve)(t),r=O(i),s=P.get(A);if(s&&function(t){const e=`${O((0,o.resolve)(g))}/`
171
+ ;return t.startsWith(e)&&t.endsWith(".js")&&!t.endsWith(".d.ts")&&!t.endsWith(".map")}(r)){s.emittedRuntimeFiles.add(i)
172
+ ;for(const t of function(t){if(!t)return[];const e=`${O((0,o.resolve)(_))}/`;return t.map(t=>(0,
173
+ o.resolve)(t.fileName)).filter(t=>{const i=O(t);return i.startsWith(e)&&i.endsWith(".ts")&&!i.endsWith(".d.ts")})
174
+ }(e))s.changedRuntimeSourceFiles.add(t)}}try{return await M,N}catch(t){throw N.close(),t}}({spinner:j,onBuildStart:()=>{
175
+ S=!0},onBuildSuccess:({durationMs:t,emittedRuntimeFiles:e,changedRuntimeSourceFiles:i,initialBuild:r})=>{if($=t,S=!1,
176
+ !r){for(const t of e)k.add(t);for(const t of i)R.add(t)}S||!u?.initialized||T||(A||P||0!==k.size)&&F()},
177
+ onBuildFailure:()=>{S=!1,$=0,P=!1,k.clear(),R.clear(),E&&(clearTimeout(E),E=null)}}),j.succeed(`${(0,
178
+ l.green)("[Mahameru]")} Initial build completed.\n`),await u.start();const I=new h.Watchman([f,b]),D=new h.Watchman(_)
179
+ ;let W=Promise.resolve();const F=()=>{E&&clearTimeout(E),E=setTimeout(()=>{W=W.then(async()=>{if(T||!u)return
180
+ ;if(S)return void F();const t=[...k],e=[...R],i=P,r=A;if(A=!1,P=!1,k.clear(),R.clear(),E=null,r)return console.log((0,
181
+ l.yellow)("\n [Mahameru] Config file changed. Reloading server...\n")),await u.stop(),u=new c.App(H),console.clear(),
182
+ void await u.start();if(0===t.length&&!i)return;const s=t[t.length-1],n=e[e.length-1]??(s?y(s):(0,
183
+ o.resolve)(_)),a=Date.now();i?await u.devHRM():await u.devHRM(s);const h=Date.now()-a,d=$+h;console.log(`${(0,
184
+ l.green)("[Mahameru Dev]")} Rebuilt ${(0,
185
+ o.relative)(p,n).replace(/\\/g,"/")} build: ${$}ms runtime: ${h}ms total: ${d}ms`)}).catch(t=>{console.error((0,
186
+ l.red)("[Mahameru Dev] Hot reload failed.")),console.error(t)})},250)};I.on("all",({event:t,filePath:e})=>{
187
+ const i=function(t){const e=(0,o.resolve)(t),i=O(e),r=O((0,o.resolve)(f)),s=O((0,o.resolve)(g)),n=O((0,o.resolve)(b))
188
+ ;if(!i.startsWith(`${r}/`)&&i!==n)return null
189
+ ;if(i.endsWith(".d.ts")||i.endsWith(".map")||i.endsWith(".tsbuildinfo"))return null;if(i===n)return"config"
190
+ ;if(!i.endsWith(".js"))return null;if(i.startsWith(`${s}/`))return"runtime";return null}(e)
191
+ ;i&&("runtime"===i&&"delete"!==t&&"rename"!==t||((t,e)=>{"config"===t?A=!0:(k.add(e),R.add(y(e))),S||F()})(i,e))}),
192
+ D.on("all",async({event:t,filePath:e,oldFilePath:i})=>{if("delete"!==t&&"rename"!==t)return;const r="rename"===t&&i?i:e
193
+ ;(function(t){const e=`${O((0,o.resolve)(_))}/`;return O((0,o.resolve)(t)).startsWith(e)})(r)&&(await async function(t){
194
+ const e=(0,o.resolve)(t),i=(0,o.relative)(_,e);if(i.startsWith(".."))return;if(/\.[^\\/]+$/.test(i)){
195
+ const t=function(t){const e=(0,o.relative)(_,t);return(0,o.resolve)(g,e.replace(/\.ts$/i,".js"))}(e)
196
+ ;return void await Promise.all([(0,n.rm)(t,{force:!0}).catch(()=>{}),(0,n.rm)(`${t}.map`,{force:!0}).catch(()=>{}),(0,
197
+ n.rm)(t.replace(/\.js$/i,".d.ts"),{force:!0}).catch(()=>{}),(0,n.rm)(t.replace(/\.js$/i,".d.ts.map"),{force:!0
198
+ }).catch(()=>{})])}await(0,n.rm)((0,o.resolve)(g,i),{recursive:!0,force:!0}).catch(()=>{})}(r),P=!0,R.add((0,
199
+ o.resolve)(r)),S||F())}),await I.start(),await D.start();const B=async(t=0)=>{T||(T=!0,E&&(clearTimeout(E),E=null),
200
+ I.stop(),D.stop(),await u.stop(),C?.close(),process.exit(t))};process.once("SIGINT",()=>{B(0)}),
201
+ process.once("SIGTERM",()=>{B(0)}),await new Promise(()=>{})}
202
+ ;const s=i(24),n=i(455),o=i(760),a=r(i(920)),l=i(943),h=i(411),c=i(859),u=i(995),d=i(713),m=(0,
203
+ u.createRequire)(__filename),p=process.cwd(),f=(0,o.join)(p,".mahameru"),g=f,_=(0,o.join)(p,"src"),v=(0,
204
+ o.join)(p,"tsconfig.json"),b=(0,o.join)(p,"mahameru.config.ts");let w=null;function y(t){const e=(0,o.relative)(g,t)
205
+ ;return(0,o.resolve)(_,e.replace(/\.js$/i,".ts"))}function O(t){return t.replace(/\\/g,"/")}function x(t){
206
+ return new Promise(e=>{setTimeout(e,t)})}},185(t,e,i){"use strict";e.deleteDirIfExists=async function(t){return await(0,
207
+ r.rm)(t,{recursive:!0,force:!0})},e.parsePort=function(t){const e=parseInt(t,10);return isNaN(e)?void 0:e}
208
+ ;const r=i(455),s=i(161)},411(t,e,i){"use strict";var r=this&&this.__importDefault||function(t){
209
+ return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Watchman=void 0
210
+ ;const s=i(261),n=i(896),o=i(324),a=r(i(928)),l=/[*?[\]{}]/;class h extends s.EventEmitter{targets;abortControllers=[]
211
+ ;renameBuffer=[];bufferTimeout=null;recentEvents=new Map;constructor(t){super();const e=Array.isArray(t)?t:[t]
212
+ ;this.targets=e.map(t=>this.createTarget(t))}async start(){this.stop();const t=this.resolveWatchRoots()
213
+ ;if(0!==t.length)for(const e of t){const t=new AbortController;this.abortControllers.push(t);const{signal:i}=t
214
+ ;(async()=>{try{const t=(0,o.watch)(e.watchPath,{recursive:e.recursive,signal:i});for await(const i of t){
215
+ const{eventType:t,filename:r}=i;if(!r)continue;const s=a.default.resolve(e.watchPath,r)
216
+ ;this.matchesTarget(s)&&("change"!==t?"rename"===t&&this.handleRenameEvent(r,e.watchPath):this.emitEvent({
217
+ event:"change",filePath:s}))}}catch(t){
218
+ "AbortError"!==t.name&&console.error(`[Watchman] Watch error at ${e.watchPath}:`,t)}})()
219
+ }else console.warn("[Watchman] No files or directories matched the configured watch targets.")}stop(){
220
+ for(const t of this.abortControllers)t.abort();this.abortControllers=[],this.recentEvents.clear(),
221
+ this.bufferTimeout&&(clearTimeout(this.bufferTimeout),this.bufferTimeout=null),this.renameBuffer=[]}createTarget(t){
222
+ const e=this.normalizePath(t),i=a.default.resolve(t);if(l.test(e))return{original:t,normalized:e,absolute:i,kind:"glob"}
223
+ ;return{original:t,normalized:e,absolute:i,kind:(0,n.existsSync)(i)&&(0,n.statSync)(i).isDirectory()?"directory":"file"}
224
+ }resolveWatchRoots(){const t=new Map;for(const e of this.targets){
225
+ const i="glob"===e.kind?this.getGlobBasePath(e.normalized):"directory"===e.kind?e.absolute:a.default.dirname(e.absolute),r=a.default.resolve(i),s="file"!==e.kind,o=`${r}::${s}`
226
+ ;(0,n.existsSync)(r)&&(t.has(o)||t.set(o,{watchPath:r,recursive:s}))}return Array.from(t.values())}matchesTarget(t){
227
+ const e=this.normalizePath(a.default.resolve(t))
228
+ ;return this.targets.some(t=>"directory"===t.kind?e===t.normalized||e.startsWith(`${t.normalized}/`):"file"===t.kind?e===t.normalized:a.default.matchesGlob(e,t.normalized))
229
+ }emitEvent(t){this.shouldDeduplicate(t)||(this.emit(t.event,t),this.emit("all",t))}shouldDeduplicate(t){
230
+ const e=this.normalizePath(a.default.resolve(t.filePath)),i=`${t.event}:${e}:${t.oldFilePath?this.normalizePath(a.default.resolve(t.oldFilePath)):""}`,r=Date.now(),s=this.recentEvents.get(i)
231
+ ;this.recentEvents.set(i,r);for(const[t,e]of this.recentEvents)r-e>80&&this.recentEvents.delete(t)
232
+ ;return"number"==typeof s&&r-s<=80}handleRenameEvent(t,e){this.renameBuffer.push({filename:t,timestamp:Date.now(),
233
+ watcherRoot:e}),this.bufferTimeout&&clearTimeout(this.bufferTimeout),this.bufferTimeout=setTimeout(()=>{
234
+ this.processRenameBuffer(),this.renameBuffer=[]},20)}processRenameBuffer(){const t=this.renameBuffer.map(t=>({...t,
235
+ fullPath:a.default.resolve(t.watcherRoot,t.filename)})).filter(t=>this.matchesTarget(t.fullPath));if(2===t.length){
236
+ const[e,i]=t,r=(0,n.existsSync)(e.fullPath),s=(0,n.existsSync)(i.fullPath);if(!r&&s)return void this.emitEvent({
237
+ event:"rename",oldFilePath:e.fullPath,filePath:i.fullPath});if(r&&!s)return void this.emitEvent({event:"rename",
238
+ oldFilePath:i.fullPath,filePath:e.fullPath})}for(const e of t)(0,n.existsSync)(e.fullPath)?this.emitEvent({
239
+ event:"create",filePath:e.fullPath}):this.emitEvent({event:"delete",filePath:e.fullPath})}getGlobBasePath(t){
240
+ const e=t.split("/"),i=[];for(const t of e){if(l.test(t))break;i.push(t)}
241
+ return 0===i.length?a.default.dirname(t):i.join("/")}normalizePath(t){return t.replace(/\\/g,"/")}}e.Watchman=h},261(t){
242
+ "use strict";t.exports=require("events")},896(t){"use strict";t.exports=require("fs")},324(t){"use strict"
243
+ ;t.exports=require("fs/promises")},339(t){"use strict";t.exports=require("module")},421(t){"use strict"
244
+ ;t.exports=require("node:child_process")},139(t){"use strict";t.exports=require("node:cluster")},24(t){"use strict"
245
+ ;t.exports=require("node:fs")},455(t){"use strict";t.exports=require("node:fs/promises")},995(t){"use strict"
246
+ ;t.exports=require("node:module")},161(t){"use strict";t.exports=require("node:os")},760(t){"use strict"
247
+ ;t.exports=require("node:path")},708(t){"use strict";t.exports=require("node:process")},975(t){"use strict"
248
+ ;t.exports=require("node:util")},928(t){"use strict";t.exports=require("path")},757(t,e,i){"use strict";i.d(e,{
249
+ Command:()=>v});class r extends Error{constructor(t,e,i){super(i),Error.captureStackTrace(this,this.constructor),
250
+ this.name=this.constructor.name,this.code=e,this.exitCode=t,this.nestedError=void 0}}class s extends r{constructor(t){
257
251
  super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}
258
- class we{constructor(t,e){switch(this.description=e||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,
252
+ class n{constructor(t,e){switch(this.description=e||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,
259
253
  this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break
260
254
  ;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t}
261
255
  this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}
262
256
  _collectValue(t,e){return e!==this.defaultValue&&Array.isArray(e)?(e.push(t),e):[t]}default(t,e){
263
257
  return this.defaultValue=t,this.defaultValueDescription=e,this}argParser(t){return this.parseArg=t,this}choices(t){
264
258
  return this.argChoices=t.slice(),this.parseArg=(t,e)=>{
265
- if(!this.argChoices.includes(t))throw new ye(`Allowed choices are ${this.argChoices.join(", ")}.`)
259
+ if(!this.argChoices.includes(t))throw new s(`Allowed choices are ${this.argChoices.join(", ")}.`)
266
260
  ;return this.variadic?this._collectValue(t,e):t},this}argRequired(){return this.required=!0,this}argOptional(){
267
- return this.required=!1,this}}function Ce(t){const e=t.name()+(!0===t.variadic?"...":"")
268
- ;return t.required?"<"+e+">":"["+e+"]"}class Te{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,
269
- this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){
270
- this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){
261
+ return this.required=!1,this}}function o(t){const e=t.name()+(!0===t.variadic?"...":"")
262
+ ;return t.required?"<"+e+">":"["+e+"]"}const a=require("node:events");var l=i(421),h=i(760),c=i(24),u=i(708),d=i(975)
263
+ ;class m{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,
264
+ this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){
271
265
  const e=t.commands.filter(t=>!t._hidden),i=t._getHelpCommand();return i&&!i._hidden&&e.push(i),
272
266
  this.sortSubcommands&&e.sort((t,e)=>t.name().localeCompare(e.name())),e}compareOptions(t,e){
273
267
  const i=t=>t.short?t.short.replace(/^-/,""):t.long.replace(/^--/,"");return i(t).localeCompare(i(e))}visibleOptions(t){
@@ -280,7 +274,7 @@ return this.sortOptions&&e.sort(this.compareOptions),e}visibleArguments(t){
280
274
  return t._argsDescription&&t.registeredArguments.forEach(e=>{
281
275
  e.description=e.description||t._argsDescription[e.name()]||""
282
276
  }),t.registeredArguments.find(t=>t.description)?t.registeredArguments:[]}subcommandTerm(t){
283
- const e=t.registeredArguments.map(t=>Ce(t)).join(" ")
277
+ const e=t.registeredArguments.map(t=>o(t)).join(" ")
284
278
  ;return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(e?" "+e:"")}optionTerm(t){
285
279
  return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,e){
286
280
  return e.visibleCommands(t).reduce((t,i)=>Math.max(t,this.displayWidth(e.styleSubcommandTerm(e.subcommandTerm(i)))),0)}
@@ -315,8 +309,8 @@ const i=e.visibleGlobalOptions(t).map(t=>s(e.styleOptionTerm(e.optionTerm(t)),e.
315
309
  ;n=n.concat(this.formatItemList("Global Options:",i,e))}
316
310
  return this.groupItems(t.commands,e.visibleCommands(t),t=>t.helpGroup()||"Commands:").forEach((t,i)=>{
317
311
  const r=t.map(t=>s(e.styleSubcommandTerm(e.subcommandTerm(t)),e.styleSubcommandDescription(e.subcommandDescription(t))))
318
- ;n=n.concat(this.formatItemList(i,r,e))}),n.join("\n")}displayWidth(t){return u(t).length}styleTitle(t){return t}
319
- styleUsage(t){
312
+ ;n=n.concat(this.formatItemList(i,r,e))}),n.join("\n")}displayWidth(t){return(0,d.stripVTControlCharacters)(t).length}
313
+ styleTitle(t){return t}styleUsage(t){
320
314
  return t.split(" ").map(t=>"[options]"===t?this.styleOptionText(t):"[command]"===t?this.styleSubcommandText(t):"["===t[0]||"<"===t[0]?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")
321
315
  }styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){
322
316
  return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}
@@ -333,7 +327,7 @@ return s+n+" ".repeat(2)+a.replace(/\n/g,`\n${s}`)}boxWrap(t,e){if(e<this.minWid
333
327
  ;const i=t.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,s=[];return i.forEach(t=>{const i=t.match(r)
334
328
  ;if(null===i)return void s.push("");let n=[i.shift()],o=this.displayWidth(n[0]);i.forEach(t=>{
335
329
  const i=this.displayWidth(t);if(o+i<=e)return n.push(t),void(o+=i);s.push(n.join(""));const r=t.trimStart();n=[r],
336
- o=this.displayWidth(r)}),s.push(n.join(""))}),s.join("\n")}}class Ee{constructor(t,e){this.flags=t,
330
+ o=this.displayWidth(r)}),s.push(n.join(""))}),s.join("\n")}}class p{constructor(t,e){this.flags=t,
337
331
  this.description=e||"",this.required=t.includes("<"),this.optional=t.includes("["),
338
332
  this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;const i=function(t){let e,i
339
333
  ;const r=/^-[^-]$/,s=/^--[^-]/,n=t.split(/[ |,]+/).concat("guard");r.test(n[0])&&(e=n.shift())
@@ -353,17 +347,17 @@ return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflic
353
347
  this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){
354
348
  return this.hidden=!!t,this}_collectValue(t,e){return e!==this.defaultValue&&Array.isArray(e)?(e.push(t),e):[t]}
355
349
  choices(t){return this.argChoices=t.slice(),this.parseArg=(t,e)=>{
356
- if(!this.argChoices.includes(t))throw new ye(`Allowed choices are ${this.argChoices.join(", ")}.`)
350
+ if(!this.argChoices.includes(t))throw new s(`Allowed choices are ${this.argChoices.join(", ")}.`)
357
351
  ;return this.variadic?this._collectValue(t,e):t},this}name(){
358
352
  return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){
359
- return this.negate?Se(this.name().replace(/^no-/,"")):Se(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}
360
- is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class Ae{
353
+ return this.negate?g(this.name().replace(/^no-/,"")):g(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}
354
+ is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class f{
361
355
  constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(t=>{
362
356
  t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),
363
357
  this.negativeOptions.forEach((t,e)=>{this.positiveOptions.has(e)&&this.dualOptions.add(e)})}valueFromOption(t,e){
364
358
  const i=e.attributeName();if(!this.dualOptions.has(i))return!0
365
- ;const r=this.negativeOptions.get(i).presetArg,s=void 0!==r&&r;return e.negate===(s===t)}}function Se(t){
366
- return t.split("-").reduce((t,e)=>t+e[0].toUpperCase()+e.slice(1))}function $e(t,e){if(!e||0===e.length)return""
359
+ ;const r=this.negativeOptions.get(i).presetArg,s=void 0!==r&&r;return e.negate===(s===t)}}function g(t){
360
+ return t.split("-").reduce((t,e)=>t+e[0].toUpperCase()+e.slice(1))}function _(t,e){if(!e||0===e.length)return""
367
361
  ;e=Array.from(new Set(e));const i=t.startsWith("--");i&&(t=t.slice(2),e=e.map(t=>t.slice(2)));let r=[],s=3
368
362
  ;return e.forEach(e=>{if(e.length<=1)return;const i=function(t,e){
369
363
  if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);const i=[];for(let e=0;e<=t.length;e++)i[e]=[e]
@@ -373,7 +367,7 @@ i[s][r]=Math.min(i[s-1][r]+1,i[s][r-1]+1,i[s-1][r-1]+n),s>1&&r>1&&t[s-1]===e[r-2
373
367
  }return i[t.length][e.length]}(t,e),n=Math.max(t.length,e.length);(n-i)/n>.4&&(i<s?(s=i,r=[e]):i===s&&r.push(e))}),
374
368
  r.sort((t,e)=>t.localeCompare(e)),
375
369
  i&&(r=r.map(t=>`--${t}`)),r.length>1?`\n(Did you mean one of ${r.join(", ")}?)`:1===r.length?`\n(Did you mean ${r[0]}?)`:""
376
- }class Pe extends f{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,
370
+ }class v extends a.EventEmitter{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,
377
371
  this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],
378
372
  this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,
379
373
  this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,
@@ -381,16 +375,16 @@ this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,th
381
375
  this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,
382
376
  this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,
383
377
  this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,
384
- this._savedState=null,this._outputConfiguration={writeOut:t=>c.stdout.write(t),writeErr:t=>c.stderr.write(t),
385
- outputError:(t,e)=>e(t),getOutHelpWidth:()=>c.stdout.isTTY?c.stdout.columns:void 0,
386
- getErrHelpWidth:()=>c.stderr.isTTY?c.stderr.columns:void 0,
387
- getOutHasColors:()=>Ie()??(c.stdout.isTTY&&c.stdout.hasColors?.()),
388
- getErrHasColors:()=>Ie()??(c.stderr.isTTY&&c.stderr.hasColors?.()),stripColor:t=>u(t)},this._hidden=!1,
389
- this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},
390
- this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){
391
- return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,
392
- this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,
393
- this._storeOptionsAsProperties=t._storeOptionsAsProperties,
378
+ this._savedState=null,this._outputConfiguration={writeOut:t=>u.stdout.write(t),writeErr:t=>u.stderr.write(t),
379
+ outputError:(t,e)=>e(t),getOutHelpWidth:()=>u.stdout.isTTY?u.stdout.columns:void 0,
380
+ getErrHelpWidth:()=>u.stderr.isTTY?u.stderr.columns:void 0,
381
+ getOutHasColors:()=>w()??(u.stdout.isTTY&&u.stdout.hasColors?.()),
382
+ getErrHasColors:()=>w()??(u.stderr.isTTY&&u.stderr.hasColors?.()),stripColor:t=>(0,d.stripVTControlCharacters)(t)},
383
+ this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,
384
+ this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,
385
+ this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,
386
+ this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,
387
+ this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,
394
388
  this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,
395
389
  this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,
396
390
  this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){const t=[]
@@ -398,15 +392,15 @@ this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAn
398
392
  s=s||{};const[,n,o]=t.match(/([^ ]+) *(.*)/),a=this.createCommand(n);return r&&(a.description(r),
399
393
  a._executableHandler=!0),s.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!s.noHelp&&!s.hidden),
400
394
  a._executableFile=s.executableFile||null,o&&a.arguments(o),this._registerCommand(a),a.parent=this,
401
- a.copyInheritedSettings(this),r?this:a}createCommand(t){return new Pe(t)}createHelp(){
402
- return Object.assign(new Te,this.configureHelp())}configureHelp(t){
395
+ a.copyInheritedSettings(this),r?this:a}createCommand(t){return new v(t)}createHelp(){
396
+ return Object.assign(new m,this.configureHelp())}configureHelp(t){
403
397
  return void 0===t?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){
404
398
  return void 0===t?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}
405
399
  showHelpAfterError(t=!0){return"string"!=typeof t&&(t=!!t),this._showHelpAfterError=t,this}
406
400
  showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,e){
407
401
  if(!t._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()")
408
402
  ;return(e=e||{}).isDefault&&(this._defaultCommandName=t._name),(e.noHelp||e.hidden)&&(t._hidden=!0),
409
- this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,e){return new we(t,e)}
403
+ this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,e){return new n(t,e)}
410
404
  argument(t,e,i,r){const s=this.createArgument(t,e);return"function"==typeof i?s.default(r).argParser(i):s.default(i),
411
405
  this.addArgument(s),this}arguments(t){return t.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(t){
412
406
  const e=this.registeredArguments.slice(-1)[0]
@@ -424,13 +418,12 @@ this._helpCommand):null}hook(t,e){const i=["preSubcommand","preAction","postActi
424
418
  ;if(!i.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.\nExpecting one of '${i.join("', '")}'`)
425
419
  ;return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(e):this._lifeCycleHooks[t]=[e],this}exitOverride(t){
426
420
  return this._exitCallback=t||(t=>{if("commander.executeSubCommandAsync"!==t.code)throw t}),this}_exit(t,e,i){
427
- this._exitCallback&&this._exitCallback(new xe(t,e,i)),c.exit(t)}action(t){return this._actionHandler=e=>{
421
+ this._exitCallback&&this._exitCallback(new r(t,e,i)),u.exit(t)}action(t){return this._actionHandler=e=>{
428
422
  const i=this.registeredArguments.length,r=e.slice(0,i);return this._storeOptionsAsProperties?r[i]=this:r[i]=this.opts(),
429
- r.push(this),t.apply(this,r)},this}createOption(t,e){return new Ee(t,e)}_callParseArg(t,e,i,r){try{
430
- return t.parseArg(e,i)}catch(t){if("commander.invalidArgument"===t.code){const e=`${r} ${t.message}`;this.error(e,{
431
- exitCode:t.exitCode,code:t.code})}throw t}}_registerOption(t){
432
- const e=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(e){
433
- const i=t.long&&this._findOption(t.long)?t.long:t.short
423
+ r.push(this),t.apply(this,r)},this}createOption(t,e){return new p(t,e)}_callParseArg(t,e,i,r){try{return t.parseArg(e,i)
424
+ }catch(t){if("commander.invalidArgument"===t.code){const e=`${r} ${t.message}`;this.error(e,{exitCode:t.exitCode,
425
+ code:t.code})}throw t}}_registerOption(t){const e=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long)
426
+ ;if(e){const i=t.long&&this._findOption(t.long)?t.long:t.short
434
427
  ;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'\n- already used by option '${e.flags}'`)
435
428
  }this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){
436
429
  const e=t=>[t.name()].concat(t.aliases()),i=e(t).find(t=>this._findCommand(t));if(i){
@@ -445,7 +438,7 @@ null==e&&(e=!t.negate&&(!(!t.isBoolean()&&!t.optional)||"")),this.setOptionValue
445
438
  t.envVar&&this.on("optionEnv:"+e,e=>{
446
439
  const i=`error: option '${t.flags}' value '${e}' from env '${t.envVar}' is invalid.`;r(e,i,"env")}),this}
447
440
  _optionEx(t,e,i,r,s){
448
- if("object"==typeof e&&e instanceof Ee)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")
441
+ if("object"==typeof e&&e instanceof p)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")
449
442
  ;const n=this.createOption(e,i)
450
443
  ;if(n.makeOptionMandatory(!!t.mandatory),"function"==typeof r)n.default(s).argParser(r);else if(r instanceof RegExp){
451
444
  const t=r;r=(e,i)=>{const r=t.exec(e);return r?r[0]:i},n.default(s).argParser(r)}else n.default(r)
@@ -467,10 +460,10 @@ getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceW
467
460
  ;return this._getCommandAndAncestors().forEach(i=>{void 0!==i.getOptionValueSource(t)&&(e=i.getOptionValueSource(t))}),e
468
461
  }_prepareUserArgs(t,e){
469
462
  if(void 0!==t&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(e=e||{},
470
- void 0===t&&void 0===e.from){c.versions?.electron&&(e.from="electron");const t=c.execArgv??[]
463
+ void 0===t&&void 0===e.from){u.versions?.electron&&(e.from="electron");const t=u.execArgv??[]
471
464
  ;(t.includes("-e")||t.includes("--eval")||t.includes("-p")||t.includes("--print"))&&(e.from="eval")}let i
472
- ;switch(void 0===t&&(t=c.argv),this.rawArgs=t.slice(),e.from){case void 0:case"node":this._scriptPath=t[1],i=t.slice(2)
473
- ;break;case"electron":c.defaultApp?(this._scriptPath=t[1],i=t.slice(2)):i=t.slice(1);break;case"user":i=t.slice(0);break
465
+ ;switch(void 0===t&&(t=u.argv),this.rawArgs=t.slice(),e.from){case void 0:case"node":this._scriptPath=t[1],i=t.slice(2)
466
+ ;break;case"electron":u.defaultApp?(this._scriptPath=t[1],i=t.slice(2)):i=t.slice(1);break;case"user":i=t.slice(0);break
474
467
  ;case"eval":i=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${e.from}' }`)}
475
468
  return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}
476
469
  parse(t,e){this._prepareForParse();const i=this._prepareUserArgs(t,e);return this._parseCommand([],i),this}
@@ -484,24 +477,24 @@ restoreStateBeforeParse(){
484
477
  if(this._storeOptionsAsProperties)throw new Error("Can not call parse again when storeOptionsAsProperties is true.\n- either make a new Command for each call to parse, or stop storing options as properties")
485
478
  ;this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={
486
479
  ...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],
487
- this.processedArgs=[]}_checkForMissingExecutable(t,e,i){if(n.existsSync(t))return
480
+ this.processedArgs=[]}_checkForMissingExecutable(t,e,i){if(c.existsSync(t))return
488
481
  ;throw new Error(`'${t}' does not exist\n - if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${e?`searched for local subcommand relative to directory '${e}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory"}`)
489
- }_executeSubCommand(e,r){r=r.slice();const s=[".js",".ts",".tsx",".mjs",".cjs"];function o(t,e){const r=i.resolve(t,e)
490
- ;if(n.existsSync(r))return r;if(s.includes(i.extname(e)))return;const o=s.find(t=>n.existsSync(`${r}${t}`))
491
- ;return o?`${r}${o}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions()
492
- ;let a=e._executableFile||`${this._name}-${e._name}`,l=this._executableDir||"";if(this._scriptPath){let t;try{
493
- t=n.realpathSync(this._scriptPath)}catch{t=this._scriptPath}l=i.resolve(i.dirname(t),l)}if(l){let t=o(l,a)
494
- ;if(!t&&!e._executableFile&&this._scriptPath){const r=i.basename(this._scriptPath,i.extname(this._scriptPath))
495
- ;r!==this._name&&(t=o(l,`${r}-${e._name}`))}a=t||a}const h=s.includes(i.extname(a));let u
496
- ;if("win32"!==c.platform?h?(r.unshift(a),r=ke(c.execArgv).concat(r),u=t.spawn(c.argv[0],r,{stdio:"inherit"
497
- })):u=t.spawn(a,r,{stdio:"inherit"}):(this._checkForMissingExecutable(a,l,e._name),r.unshift(a),
498
- r=ke(c.execArgv).concat(r),u=t.spawn(c.execPath,r,{stdio:"inherit"})),!u.killed){
499
- ["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(t=>{c.on(t,()=>{!1===u.killed&&null===u.exitCode&&u.kill(t)})
500
- })}const m=this._exitCallback;u.on("close",t=>{
501
- t=t??1,m?m(new xe(t,"commander.executeSubCommandAsync","(close)")):c.exit(t)}),u.on("error",t=>{
502
- if("ENOENT"===t.code)this._checkForMissingExecutable(a,l,e._name);else if("EACCES"===t.code)throw new Error(`'${a}' not executable`)
503
- ;if(m){const e=new xe(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,m(e)}else c.exit(1)}),
504
- this.runningCommand=u}_dispatchSubcommand(t,e,i){const r=this._findCommand(t);let s;return r||this.help({error:!0}),
482
+ }_executeSubCommand(t,e){e=e.slice();const i=[".js",".ts",".tsx",".mjs",".cjs"];function s(t,e){const r=h.resolve(t,e)
483
+ ;if(c.existsSync(r))return r;if(i.includes(h.extname(e)))return;const s=i.find(t=>c.existsSync(`${r}${t}`))
484
+ ;return s?`${r}${s}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions()
485
+ ;let n=t._executableFile||`${this._name}-${t._name}`,o=this._executableDir||"";if(this._scriptPath){let t;try{
486
+ t=c.realpathSync(this._scriptPath)}catch{t=this._scriptPath}o=h.resolve(h.dirname(t),o)}if(o){let e=s(o,n)
487
+ ;if(!e&&!t._executableFile&&this._scriptPath){const i=h.basename(this._scriptPath,h.extname(this._scriptPath))
488
+ ;i!==this._name&&(e=s(o,`${i}-${t._name}`))}n=e||n}const a=i.includes(h.extname(n));let d
489
+ ;if("win32"!==u.platform?a?(e.unshift(n),e=b(u.execArgv).concat(e),d=l.spawn(u.argv[0],e,{stdio:"inherit"
490
+ })):d=l.spawn(n,e,{stdio:"inherit"}):(this._checkForMissingExecutable(n,o,t._name),e.unshift(n),
491
+ e=b(u.execArgv).concat(e),d=l.spawn(u.execPath,e,{stdio:"inherit"})),!d.killed){
492
+ ["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(t=>{u.on(t,()=>{!1===d.killed&&null===d.exitCode&&d.kill(t)})
493
+ })}const m=this._exitCallback;d.on("close",t=>{
494
+ t=t??1,m?m(new r(t,"commander.executeSubCommandAsync","(close)")):u.exit(t)}),d.on("error",e=>{
495
+ if("ENOENT"===e.code)this._checkForMissingExecutable(n,o,t._name);else if("EACCES"===e.code)throw new Error(`'${n}' not executable`)
496
+ ;if(m){const t=new r(1,"commander.executeSubCommandAsync","(error)");t.nestedError=e,m(t)}else u.exit(1)}),
497
+ this.runningCommand=d}_dispatchSubcommand(t,e,i){const r=this._findCommand(t);let s;return r||this.help({error:!0}),
505
498
  r._prepareForParse(),s=this._chainOrCallSubCommandHook(s,r,"preSubcommand"),s=this._chainOrCall(s,()=>{
506
499
  if(!r._executableHandler)return r._parseCommand(e,i);this._executeSubCommand(r,e.concat(i))}),s}_dispatchHelpCommand(t){
507
500
  t||this.help();const e=this._findCommand(t);return e&&!e._executableHandler&&e.help(),
@@ -566,10 +559,10 @@ return this._getCommandAndAncestors().reduce((t,e)=>Object.assign(t,e.opts()),{}
566
559
  this._outputConfiguration.outputError(`${t}\n`,this._outputConfiguration.writeErr),
567
560
  "string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),
568
561
  this.outputHelp({error:!0}));const i=e||{},r=i.exitCode||1,s=i.code||"commander.error";this._exit(r,s,t)}
569
- _parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in c.env){const e=t.attributeName()
570
- ;(void 0===this.getOptionValue(e)||["default","config","env"].includes(this.getOptionValueSource(e)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,c.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))
562
+ _parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in u.env){const e=t.attributeName()
563
+ ;(void 0===this.getOptionValue(e)||["default","config","env"].includes(this.getOptionValueSource(e)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,u.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))
571
564
  }})}_parseOptionsImplied(){
572
- const t=new Ae(this.options),e=t=>void 0!==this.getOptionValue(t)&&!["default","implied"].includes(this.getOptionValueSource(t))
565
+ const t=new f(this.options),e=t=>void 0!==this.getOptionValue(t)&&!["default","implied"].includes(this.getOptionValueSource(t))
573
566
  ;this.options.filter(i=>void 0!==i.implied&&e(i.attributeName())&&t.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(t=>{
574
567
  Object.keys(t.implied).filter(t=>!e(t)).forEach(e=>{this.setOptionValueWithSource(e,t.implied[e],"implied")})})}
575
568
  missingArgument(t){const e=`error: missing required argument '${t}'`;this.error(e,{code:"commander.missingArgument"})}
@@ -584,12 +577,12 @@ const e=i(t),r=e.attributeName()
584
577
  },s=`error: ${r(t)} cannot be used with ${r(e)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(t){
585
578
  if(this._allowUnknownOption)return;let e="";if(t.startsWith("--")&&this._showSuggestionAfterError){let i=[],r=this;do{
586
579
  const t=r.createHelp().visibleOptions(r).filter(t=>t.long).map(t=>t.long);i=i.concat(t),r=r.parent
587
- }while(r&&!r._enablePositionalOptions);e=$e(t,i)}const i=`error: unknown option '${t}'${e}`;this.error(i,{
580
+ }while(r&&!r._enablePositionalOptions);e=_(t,i)}const i=`error: unknown option '${t}'${e}`;this.error(i,{
588
581
  code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return
589
582
  ;const e=this.registeredArguments.length,i=1===e?"":"s",r=t.length,s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${e} argument${i} but got ${r}: ${t.join(", ")}.`
590
583
  ;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){const t=this.args[0];let e=""
591
584
  ;if(this._showSuggestionAfterError){const i=[];this.createHelp().visibleCommands(this).forEach(t=>{i.push(t.name()),
592
- t.alias()&&i.push(t.alias())}),e=$e(t,i)}const i=`error: unknown command '${t}'${e}`;this.error(i,{
585
+ t.alias()&&i.push(t.alias())}),e=_(t,i)}const i=`error: unknown command '${t}'${e}`;this.error(i,{
593
586
  code:"commander.unknownCommand"})}version(t,e,i){if(void 0===t)return this._version;this._version=t,
594
587
  e=e||"-V, --version",i=i||"output the version number";const r=this.createOption(e,i)
595
588
  ;return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{
@@ -601,7 +594,7 @@ t===e._name)throw new Error("Command alias can't be the same as its name");const
601
594
  const e=[i.name()].concat(i.aliases()).join("|")
602
595
  ;throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${e}'`)}
603
596
  return e._aliases.push(t),this}aliases(t){return void 0===t?this._aliases:(t.forEach(t=>this.alias(t)),this)}usage(t){
604
- if(void 0===t){if(this._usage)return this._usage;const t=this.registeredArguments.map(t=>Ce(t))
597
+ if(void 0===t){if(this._usage)return this._usage;const t=this.registeredArguments.map(t=>o(t))
605
598
  ;return[].concat(this.options.length||null!==this._helpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")
606
599
  }return this._usage=t,this}name(t){return void 0===t?this._name:(this._name=t,this)}helpGroup(t){
607
600
  return void 0===t?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){
@@ -609,7 +602,7 @@ return void 0===t?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,thi
609
602
  return void 0===t?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){
610
603
  this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){
611
604
  this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){
612
- return this._name=i.basename(t,i.extname(t)),this}executableDir(t){
605
+ return this._name=h.basename(t,h.extname(t)),this}executableDir(t){
613
606
  return void 0===t?this._executableDir:(this._executableDir=t,this)}helpInformation(t){
614
607
  const e=this.createHelp(),i=this._getOutputContext(t);e.prepareContext({error:i.error,helpWidth:i.helpWidth,
615
608
  outputHasColors:i.hasColors});const r=e.formatHelp(this,e);return i.hasColors?r:this._outputConfiguration.stripColor(r)}
@@ -629,88 +622,255 @@ this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._he
629
622
  this):(this._helpOption=this.createOption(t??"-h, --help",e??"display help for command"),
630
623
  (t||e)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){
631
624
  return void 0===this._helpOption&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){
632
- return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let e=Number(c.exitCode??0)
625
+ return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let e=Number(u.exitCode??0)
633
626
  ;0===e&&t&&"function"!=typeof t&&t.error&&(e=1),this._exit(e,"commander.help","(outputHelp)")}addHelpText(t,e){
634
627
  const i=["beforeAll","before","after","afterAll"]
635
628
  ;if(!i.includes(t))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${i.join("', '")}'`)
636
629
  ;const r=`${t}Help`;return this.on(r,t=>{let i;i="function"==typeof e?e({error:t.error,command:t.command}):e,
637
630
  i&&t.write(`${i}\n`)}),this}_outputHelpIfRequested(t){const e=this._getHelpOption()
638
- ;e&&t.find(t=>e.is(t))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}function ke(t){
631
+ ;e&&t.find(t=>e.is(t))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}function b(t){
639
632
  return t.map(t=>{if(!t.startsWith("--inspect"))return t;let e,i,r="127.0.0.1",s="9229"
640
633
  ;return null!==(i=t.match(/^(--inspect(-brk)?)$/))?e=i[1]:null!==(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(e=i[1],
641
634
  /^\d+$/.test(i[3])?s=i[3]:r=i[3]):null!==(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(e=i[1],r=i[3],
642
- s=i[4]),e&&"0"!==s?`${e}=${r}:${parseInt(s)+1}`:t})}function Ie(){
643
- return!c.env.NO_COLOR&&"0"!==c.env.FORCE_COLOR&&"false"!==c.env.FORCE_COLOR&&(!(!c.env.FORCE_COLOR&&void 0===c.env.CLICOLOR_FORCE)||void 0)
644
- }new Pe;const Re=process.cwd();async function He(t){return await _(t,{recursive:!0,force:!0})}function Me(){
645
- return o(r(Re,"package.json"))&&o(r(Re,"node_modules"))}function Ve(t){
646
- return`\n import mahameru from "mahameru";\n\n mahameru(${JSON.stringify(t)}).then(app =>\n app.initialize().then(() => {\n console.log("\\x1b[32m Mahameru Server Ready! 🚀\\x1b[0m");\n console.log(" \\x1b[1mMode:\\x1b[22m \\x1b[36m${t.dev?"Development":"Production"}\\x1b[0m");\n console.log(" \\x1b[1mLocal:\\x1b[22m \\x1b[36mhttp://${t.host}:${t.port}\\x1b[0m");\n console.log(" \\x1b[1mHost:\\x1b[22m ${t.host}");\n console.log(" \\x1b[1mPort:\\x1b[22m ${t.port}\\n");\n console.log("\\x1b[90mPress Ctrl+C to stop server\\x1b[0m\\n");\n }).catch(error => {\n console.error(error);\n process.exitCode = 1;\n })\n ).catch(error => {\n console.error(error);\n process.exitCode = 1;\n });\n `
647
- }function je(t){console.log(`${Oe().bold(Oe().cyan("▲ Mahameru"))} ${Oe().dim(`CLI v${t}`)}\n`)}function Ge(t){
648
- const e=parseInt(t,10);if(!isNaN(e))return e}function We(t,i,r){return new Promise((s,n)=>{
649
- const o=e(process.execPath,[t,...i],{stdio:"inherit",cwd:r});o.on("close",t=>s(t??1)),o.on("error",n)})}function Be(t){
650
- return new Promise(e=>{t&&null===t.exitCode&&!t.killed?(t.once("close",()=>e()),t.kill("SIGTERM")):e()})}function Fe(){
651
- const t=new Map,e=r(Re,"mahameru.config.ts");o(e)&&t.set(e,function(t){const e=h(t);return`${e.mtimeMs}:${e.size}`}(e))
652
- ;const i=r(Re,"src");if(!o(i))return t;const s=[i];for(;s.length>0;){const e=s.pop();for(const i of l(e)){
653
- if(i.startsWith("."))continue;const n=r(e,i),o=h(n);o.isDirectory()?s.push(n):t.set(n,`${o.mtimeMs}:${o.size}`)}}
654
- return t}function Ne(t){return s(Re,t)||t}(async()=>{const t=new Pe,{rE:i}=x;try{
655
- t.name("mahameru").description(`${Oe().bold(Oe().cyan("▲ Mahameru"))} ${Oe().dim(`CLI v${i}`)}`).version(i,"-v, --version","Display help for command"),
656
- t.command("dev").option("-p, --port <number>","Port to run the server on",Ge).option("-h, --host <string>","Host to run the server on").action(async({host:t,port:s})=>{
657
- Me()||(console.error(Oe().red(" Current directory is not a Node.js project.")),process.exit(1));const n=function(){
658
- const t="mahameru.config.ts",e=r(Re,t);o(e)||(console.error(Oe().red(`❌ Error: Config file '${t}' is not found.`)),
659
- console.error(Oe().yellow("Please create project by running: npm create mahameru")),process.exit(1))
660
- ;const i=r(Re,"node_modules","tsx","dist","cli.mjs")
661
- ;o(i)||(console.error(Oe().red("❌ Error: Runner 'tsx' is not installed.")),
662
- console.error(Oe().yellow("Please install it by running: npm install -D tsx")),process.exit(1))
663
- ;const s=r(Re,"node_modules","tsx","dist","esm","api")
664
- ;o(s)||(console.error(Oe().red("❌ Error: Runner 'tsx' API is not installed.")),
665
- console.error(Oe().yellow("Please install it by running: npm install -D tsx")),process.exit(1));return{configFileName:t,
666
- configFilePath:e,tsxJsPath:i}}();console.clear(),je(i),await async function({environment:t,host:i,port:s}){
667
- let n=null,o=null,a=null,l=!1,h=!1,c=!1,u=0,m=Fe();const p=async o=>{if(!h){l=!0,o&&(console.clear(),
668
- console.log(Oe().yellow(`\nFile changed (${o.replaceAll("\\","/")}), restarting dev server...\n`))),await Be(n),n=null
669
- ;try{n=await async function({environment:t,host:i,port:s}){const n=await async function(t,{host:e,port:i}){
670
- const s=await import("tsx/esm/api").catch(()=>{console.error(Oe().red("❌ Error: Runner 'tsx' api is not installed.")),
671
- console.error(Oe().yellow("Please install it by running: npm install -D tsx")),process.exit(1)
672
- }),n=d(t.configFilePath).href;let o=(await s.tsImport(n,"file:///F:/Projects/@mahameru/cli/src/index.ts")).default
673
- ;return o={...o,dev:!0,appPath:r(Re,"src"),port:void 0!==i?i:void 0!==o.port?o.port:3e3,
674
- host:void 0!==e?e:void 0!==o.host?o.host:"localhost",modulesPath:r(Re,"src","modules"),routesPath:r(Re,"src","routes")},
675
- o}(t,{host:i,port:s}),o=Ve(n);return function(t,i,r,s){return e(process.execPath,[t,...i],{stdio:"inherit",cwd:r,env:s})
676
- }(t.tsxJsPath,["-e",o],Re,{...process.env,NODE_ENV:"development"})}({environment:t,host:i,port:s}),u+=1,
677
- n.once("exit",(t,e)=>{
678
- h||l||(e?console.error(Oe().red(`Mahameru dev server stopped by signal ${e}.`)):"number"==typeof t&&0!==t&&console.error(Oe().red(`Mahameru dev server exited with code ${t}. Watching for changes...`)))
679
- })}catch(t){console.error(Oe().red("Failed to start dev server. Watching for changes...")),console.error(t),
680
- 0===u&&console.log(Oe().dim("Fix the error above and save a file to try again.\n"))}finally{l=!1}}},f=t=>{
681
- h||(o&&clearTimeout(o),o=setTimeout(()=>{p(t)},200))},g=()=>{if(!h&&!c){c=!0;try{const t=Fe(),e=function(t,e){
682
- for(const[i,r]of e){if(!t.has(i))return Ne(i);if(t.get(i)!==r)return Ne(i)}
683
- for(const i of t.keys())if(!e.has(i))return Ne(i);return null}(m,t);m=t,e&&f(e)}finally{c=!1}}},_=async(t=0)=>{h||(h=!0,
684
- o&&clearTimeout(o),a&&clearInterval(a),await Be(n),process.exit(t))};process.once("SIGINT",()=>{_(0)}),
685
- process.once("SIGTERM",()=>{_(0)
686
- }),a=setInterval(g,300),console.log(Oe().dim("Watching src/** and mahameru.config.ts for changes...\n")),await p(),
687
- await new Promise(()=>{})}({environment:n,host:t,port:s})
688
- }),t.command("build").description("Build Mahameru production application.").action(async()=>{
689
- console.log(`${Oe().bold(Oe().cyan("▲ Mahameru"))} ${Oe().dim(`CLI v${i}`)}\n`)
690
- ;const t=ve(Oe().cyan(" Checking environment...")).start()
691
- ;Me()||(t.fail(Oe().red(" Current directory is not a Node.js project.")),process.exit(1))
692
- ;const e=r(Re,"node_modules","typescript","bin","tsc")
693
- ;o(e)||(t.fail(Oe().red(" TypeScript compiler (tsc) is not installed in this project.")),process.exit(1))
694
- ;const s=r(Re,"node_modules","tsc-alias","dist","bin","index.js");o(s)||(t.fail(Oe().red(" tsc-alias not installed.")),
695
- process.exit(1));try{t.text=Oe().cyan(" Starting build...");const i=r(Re,".mahameru"),n=r(Re,"dist");o(n)&&await He(n),
696
- o(i)&&await He(i);const c=await We(e,["--project","tsconfig.json"],Re);0!==c&&(t.fail(Oe().red(" Build failed!")),
697
- await He(r(Re,".mahameru")),process.exit(c))
698
- ;0!==await We(e,["--project","config.tsconfig.json"],Re)&&(t.fail(Oe().red(" Build failed!")),
699
- await He(r(Re,".mahameru")),process.exit(c));const u=await We(s,["-p","tsconfig.json"],Re)
700
- ;0!==u&&(t.fail(Oe().red(" tsc-alias failed.")),await He(r(Re,".mahameru")),process.exit(u));const m=function(t){
701
- if(!o(t))return[];const e=[t],i=new Set;for(;e.length>0;){const t=e.pop();for(const s of l(t)){const n=r(t,s)
702
- ;if(h(n).isDirectory()){e.push(n);continue}if(!n.endsWith(".js"))continue;const o=a(n,"utf8")
703
- ;(o.includes("'@/")||o.includes('"@/')||o.includes("'#/")||o.includes('"#/'))&&i.add(n)}}return[...i]
704
- }(r(Re,".mahameru"));if(m.length>0){t.fail(Oe().red(" Build produced unresolved path aliases.")),
705
- console.error(Oe().yellow("Please use tsconfig path aliases such as @/* and avoid package.json imports for app source files."))
706
- ;for(const t of m)console.error(Oe().red(` - ${t}`));process.exit(1)}await g(r(Re,"dist"),r(Re,".mahameru")),
707
- t.succeed(Oe().green(" Build success."))}catch(e){t.fail(Oe().red(" Terjadi kesalahan internal.")),console.error(e),
708
- process.exit(1)}
709
- }),t.command("start").description("Start Mahameru production server.").option("-p, --port <number>","Port to run the server on",Ge).option("-h, --host <string>","Host to run the server on").action(async({host:t,port:s})=>{
710
- const n=r(Re,".mahameru","mahameru.config.js"),o=d(n).href;let a=(await import(o).catch(()=>{
711
- console.error(Oe().red("❌ Error: mahameru.config.js is not found.")),process.exit(1)})).default;a={...a,
712
- appPath:r(Re,".mahameru"),port:void 0!==s?s:void 0!==a.port?a.port:3e3,
713
- host:void 0!==t?t:void 0!==a.host?a.host:"localhost",modulesPath:r(Re,".mahameru","modules"),
714
- routesPath:r(Re,".mahameru","routes")};const l=Ve(a);je(i),e(process.execPath,["-e",l],{stdio:"inherit",cwd:Re,env:{
715
- ...process.env,NODE_ENV:"production"}}).on("exit",t=>{0!==t&&process.exit(t)}).on("error",t=>{console.error(t)
716
- }).on("message",t=>{console.log(t)})}),await t.parseAsync(process.argv)}catch(t){console.error(t),process.exit(1)}})();
635
+ s=i[4]),e&&"0"!==s?`${e}=${r}:${parseInt(s)+1}`:t})}function w(){
636
+ return!u.env.NO_COLOR&&"0"!==u.env.FORCE_COLOR&&"false"!==u.env.FORCE_COLOR&&(!(!u.env.FORCE_COLOR&&void 0===u.env.CLICOLOR_FORCE)||void 0)
637
+ }new v},920(t,e,i){"use strict";i.r(e),i.d(e,{default:()=>re,oraPromise:()=>se,spinners:()=>ct});var r=i(708),s=i(975)
638
+ ;const n=(t=0)=>e=>`[${e+t}m`,o=(t=0)=>e=>`[${38+t};5;${e}m`,a=(t=0)=>(e,i,r)=>`[${38+t};2;${e};${i};${r}m`,l={
639
+ modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],
640
+ hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],
641
+ magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],
642
+ greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]
643
+ },bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],
644
+ bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],
645
+ bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],
646
+ bgWhiteBright:[107,49]}};Object.keys(l.modifier),Object.keys(l.color),Object.keys(l.bgColor);const h=function(){
647
+ const t=new Map;for(const[e,i]of Object.entries(l)){for(const[e,r]of Object.entries(i))l[e]={open:`[${r[0]}m`,
648
+ close:`[${r[1]}m`},i[e]=l[e],t.set(r[0],r[1]);Object.defineProperty(l,e,{value:i,enumerable:!1})}
649
+ return Object.defineProperty(l,"codes",{value:t,enumerable:!1}),l.color.close="",l.bgColor.close="",
650
+ l.color.ansi=n(),l.color.ansi256=o(),l.color.ansi16m=a(),l.bgColor.ansi=n(10),l.bgColor.ansi256=o(10),
651
+ l.bgColor.ansi16m=a(10),Object.defineProperties(l,{rgbToAnsi256:{
652
+ value:(t,e,i)=>t===e&&e===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(i/255*5),
653
+ enumerable:!1},hexToRgb:{value(t){const e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!e)return[0,0,0];let[i]=e
654
+ ;3===i.length&&(i=[...i].map(t=>t+t).join(""));const r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,255&r]},
655
+ enumerable:!1},hexToAnsi256:{value:t=>l.rgbToAnsi256(...l.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){
656
+ if(t<8)return 30+t;if(t<16)return t-8+90;let e,i,r;if(t>=232)e=(10*(t-232)+8)/255,i=e,r=e;else{const s=(t-=16)%36
657
+ ;e=Math.floor(t/36)/5,i=Math.floor(s/6)/5,r=s%6/5}const s=2*Math.max(e,i,r);if(0===s)return 30
658
+ ;let n=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(e));return 2===s&&(n+=60),n},enumerable:!1},rgbToAnsi:{
659
+ value:(t,e,i)=>l.ansi256ToAnsi(l.rgbToAnsi256(t,e,i)),enumerable:!1},hexToAnsi:{
660
+ value:t=>l.ansi256ToAnsi(l.hexToAnsi256(t)),enumerable:!1}}),l}(),c=h;var u=i(161);const d=require("node:tty")
661
+ ;function m(t,e=(globalThis.Deno?globalThis.Deno.args:r.argv)){
662
+ const i=t.startsWith("-")?"":1===t.length?"-":"--",s=e.indexOf(i+t),n=e.indexOf("--");return-1!==s&&(-1===n||s<n)}
663
+ const{env:p}=r;let f;function g(t,{streamIsTTY:e,sniffFlags:i=!0}={}){const s=function(){
664
+ if("FORCE_COLOR"in p)return"true"===p.FORCE_COLOR?1:"false"===p.FORCE_COLOR?0:0===p.FORCE_COLOR.length?1:Math.min(Number.parseInt(p.FORCE_COLOR,10),3)
665
+ }();void 0!==s&&(f=s);const n=i?f:s;if(0===n)return 0;if(i){
666
+ if(m("color=16m")||m("color=full")||m("color=truecolor"))return 3;if(m("color=256"))return 2}
667
+ if("TF_BUILD"in p&&"AGENT_NAME"in p)return 1;if(t&&!e&&void 0===n)return 0;const o=n||0;if("dumb"===p.TERM)return o
668
+ ;if("win32"===r.platform){const t=u.release().split(".")
669
+ ;return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}
670
+ if("CI"in p)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(t=>t in p)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(t=>t in p)||"codeship"===p.CI_NAME?1:o
671
+ ;if("TEAMCITY_VERSION"in p)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(p.TEAMCITY_VERSION)?1:0
672
+ ;if("truecolor"===p.COLORTERM)return 3;if("xterm-kitty"===p.TERM)return 3;if("xterm-ghostty"===p.TERM)return 3
673
+ ;if("wezterm"===p.TERM)return 3;if("TERM_PROGRAM"in p){
674
+ const t=Number.parseInt((p.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(p.TERM_PROGRAM){case"iTerm.app":
675
+ return t>=3?3:2;case"Apple_Terminal":return 2}}
676
+ return/-256(color)?$/i.test(p.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(p.TERM)||"COLORTERM"in p?1:o
677
+ }function _(t,e={}){return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(g(t,{
678
+ streamIsTTY:t&&t.isTTY,...e}))}
679
+ m("no-color")||m("no-colors")||m("color=false")||m("color=never")?f=0:(m("color")||m("colors")||m("color=true")||m("color=always"))&&(f=1)
680
+ ;const v={stdout:_({isTTY:d.isatty(1)}),stderr:_({isTTY:d.isatty(2)})};function b(t,e,i){let r=t.indexOf(e)
681
+ ;if(-1===r)return t;const s=e.length;let n=0,o="";do{o+=t.slice(n,r)+e+i,n=r+s,r=t.indexOf(e,n)}while(-1!==r)
682
+ ;return o+=t.slice(n),o}
683
+ const{stdout:w,stderr:y}=v,O=Symbol("GENERATOR"),x=Symbol("STYLER"),C=Symbol("IS_EMPTY"),T=["ansi","ansi","ansi256","ansi16m"],E=Object.create(null)
684
+ ;const A=t=>{const e=(...t)=>t.join(" ");return((t,e={})=>{
685
+ if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3")
686
+ ;const i=w?w.level:0;t.level=void 0===e.level?i:e.level})(e,t),Object.setPrototypeOf(e,S.prototype),e};function S(t){
687
+ return A(t)}Object.setPrototypeOf(S.prototype,Function.prototype);for(const[t,e]of Object.entries(c))E[t]={get(){
688
+ const i=M(this,R(e.open,e.close,this[x]),this[C]);return Object.defineProperty(this,t,{value:i}),i}};E.visible={get(){
689
+ const t=M(this,this[x],!0);return Object.defineProperty(this,"visible",{value:t}),t}}
690
+ ;const P=(t,e,i,...r)=>"rgb"===t?"ansi16m"===e?c[i].ansi16m(...r):"ansi256"===e?c[i].ansi256(c.rgbToAnsi256(...r)):c[i].ansi(c.rgbToAnsi(...r)):"hex"===t?P("rgb",e,i,...c.hexToRgb(...r)):c[i][t](...r),$=["rgb","hex","ansi256"]
691
+ ;for(const t of $){E[t]={get(){const{level:e}=this;return function(...i){
692
+ const r=R(P(t,T[e],"color",...i),c.color.close,this[x]);return M(this,r,this[C])}}}
693
+ ;E["bg"+t[0].toUpperCase()+t.slice(1)]={get(){const{level:e}=this;return function(...i){
694
+ const r=R(P(t,T[e],"bgColor",...i),c.bgColor.close,this[x]);return M(this,r,this[C])}}}}
695
+ const k=Object.defineProperties(()=>{},{...E,level:{enumerable:!0,get(){return this[O].level},set(t){this[O].level=t}}
696
+ }),R=(t,e,i)=>{let r,s;return void 0===i?(r=t,s=e):(r=i.openAll+t,s=e+i.closeAll),{open:t,close:e,openAll:r,closeAll:s,
697
+ parent:i}},M=(t,e,i)=>{const r=(...t)=>j(r,1===t.length?""+t[0]:t.join(" "));return Object.setPrototypeOf(r,k),r[O]=t,
698
+ r[x]=e,r[C]=i,r},j=(t,e)=>{if(t.level<=0||!e)return t[C]?"":e;let i=t[x];if(void 0===i)return e
699
+ ;const{openAll:r,closeAll:s}=i;if(e.includes(""))for(;void 0!==i;)e=b(e,i.close,i.open),i=i.parent
700
+ ;const n=e.indexOf("\n");return-1!==n&&(e=function(t,e,i,r){let s=0,n="";do{const o="\r"===t[r-1]
701
+ ;n+=t.slice(s,o?r-1:r)+e+(o?"\r\n":"\n")+i,s=r+1,r=t.indexOf("\n",s)}while(-1!==r);return n+=t.slice(s),n}(e,s,r,n)),
702
+ r+e+s};Object.defineProperties(S.prototype,E);const H=S(),I=(S({level:y?y.level:0}),H),D=(t,e,i,r)=>{
703
+ if("length"===i||"prototype"===i)return;if("arguments"===i||"caller"===i)return
704
+ ;const s=Object.getOwnPropertyDescriptor(t,i),n=Object.getOwnPropertyDescriptor(e,i)
705
+ ;!W(s,n)&&r||Object.defineProperty(t,i,n)},W=function(t,e){
706
+ return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)
707
+ },F=(t,e)=>`/* Wrapped ${t}*/\n${e}`,B=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),G=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name")
708
+ ;function N(t,e,{ignoreNonConfigurable:i=!1}={}){const{name:r}=t;for(const r of Reflect.ownKeys(e))D(t,e,r,i)
709
+ ;return((t,e)=>{const i=Object.getPrototypeOf(e);i!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,i)})(t,e),
710
+ ((t,e,i)=>{const r=""===i?"":`with ${i.trim()}() `,s=F.bind(null,r,e.toString());Object.defineProperty(s,"name",G)
711
+ ;const{writable:n,enumerable:o,configurable:a}=B;Object.defineProperty(t,"toString",{value:s,writable:n,enumerable:o,
712
+ configurable:a})})(t,e,r),t}const V=new WeakMap,L=(t,e={})=>{
713
+ if("function"!=typeof t)throw new TypeError("Expected a function");let i,r=0
714
+ ;const s=t.displayName||t.name||"<anonymous>",n=function(...o){if(V.set(n,++r),1===r)i=t.apply(this,o),
715
+ t=void 0;else if(!0===e.throw)throw new Error(`Function \`${s}\` can only be called once`);return i};return N(n,t),
716
+ V.set(n,r),n};L.callCount=t=>{
717
+ if(!V.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`)
718
+ ;return V.get(t)};const q=L,U=[]
719
+ ;U.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&U.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),
720
+ "linux"===process.platform&&U.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")
721
+ ;const Y=t=>!!t&&"object"==typeof t&&"function"==typeof t.removeListener&&"function"==typeof t.emit&&"function"==typeof t.reallyExit&&"function"==typeof t.listeners&&"function"==typeof t.kill&&"number"==typeof t.pid&&"function"==typeof t.on,z=Symbol.for("signal-exit emitter"),J=globalThis,K=Object.defineProperty.bind(Object)
722
+ ;class Q{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){
723
+ if(J[z])return J[z];K(J,z,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,e){this.listeners[t].push(e)}
724
+ removeListener(t,e){const i=this.listeners[t],r=i.indexOf(e);-1!==r&&(0===r&&1===i.length?i.length=0:i.splice(r,1))}
725
+ emit(t,e,i){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(const s of this.listeners[t])r=!0===s(e,i)||r
726
+ ;return"exit"===t&&(r=this.emit("afterExit",e,i)||r),r}}class X{}
727
+ const Z=globalThis.process,{onExit:tt,load:et,unload:it}=(rt=Y(Z)?new class extends X{
728
+ #t="win32"===Z.platform?"SIGINT":"SIGHUP";#e=new Q;#i;#r;#s;#n={};#o=!1;constructor(t){super(),this.#i=t,this.#n={}
729
+ ;for(const e of U)this.#n[e]=()=>{const i=this.#i.listeners(e);let{count:r}=this.#e;const s=t
730
+ ;if("object"==typeof s.__signal_exit_emitter__&&"number"==typeof s.__signal_exit_emitter__.count&&(r+=s.__signal_exit_emitter__.count),
731
+ i.length===r){this.unload();const i=this.#e.emit("exit",null,e),r="SIGHUP"===e?this.#t:e;i||t.kill(t.pid,r)}}
732
+ ;this.#s=t.reallyExit,this.#r=t.emit}onExit(t,e){if(!Y(this.#i))return()=>{};!1===this.#o&&this.load()
733
+ ;const i=e?.alwaysLast?"afterExit":"exit";return this.#e.on(i,t),()=>{this.#e.removeListener(i,t),
734
+ 0===this.#e.listeners.exit.length&&0===this.#e.listeners.afterExit.length&&this.unload()}}load(){if(!this.#o){
735
+ this.#o=!0,this.#e.count+=1;for(const t of U)try{const e=this.#n[t];e&&this.#i.on(t,e)}catch(t){}
736
+ this.#i.emit=(t,...e)=>this.#a(t,...e),this.#i.reallyExit=t=>this.#l(t)}}unload(){this.#o&&(this.#o=!1,U.forEach(t=>{
737
+ const e=this.#n[t];if(!e)throw new Error("Listener not defined for signal: "+t);try{this.#i.removeListener(t,e)
738
+ }catch(t){}}),this.#i.emit=this.#r,this.#i.reallyExit=this.#s,this.#e.count-=1)}#l(t){
739
+ return Y(this.#i)?(this.#i.exitCode=t||0,this.#e.emit("exit",this.#i.exitCode,null),
740
+ this.#s.call(this.#i,this.#i.exitCode)):0}#a(t,...e){const i=this.#r;if("exit"===t&&Y(this.#i)){
741
+ "number"==typeof e[0]&&(this.#i.exitCode=e[0]);const r=i.call(this.#i,t,...e)
742
+ ;return this.#e.emit("exit",this.#i.exitCode,null),r}return i.call(this.#i,t,...e)}}(Z):new class extends X{onExit(){
743
+ return()=>{}}load(){}unload(){}},{onExit:(t,e)=>rt.onExit(t,e),load:()=>rt.load(),unload:()=>rt.unload()});var rt
744
+ ;const st=r.stderr.isTTY?r.stderr:r.stdout.isTTY?r.stdout:void 0,nt=st?q(()=>{tt(()=>{st.write("[?25h")},{alwaysLast:!0
745
+ })}):()=>{};let ot=!1;const at={show:(t=r.stderr)=>{t.isTTY&&(ot=!1,t.write("[?25h"))},hide:(t=r.stderr)=>{
746
+ t.isTTY&&(nt(),ot=!0,t.write("[?25l"))},toggle:(t,e)=>{void 0!==t&&(ot=t),ot?at.show(e):at.hide(e)}
747
+ },lt=at,ht=JSON.parse('{"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":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots14":{"interval":80,"frames":["⠉⠉","⠈⠙","⠀⠹","⠀⢸","⠀⣰","⢀⣠","⣀⣀","⣄⡀","⣆⠀","⡇⠀","⠏⠀","⠋⠁"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"dotsCircle":{"interval":80,"frames":["⢎ ","⠎⠁","⠊⠑","⠈⠱"," ⡱","⢀⡰","⢄⡠","⢆⡀"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"rollingLine":{"interval":80,"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":[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]},"fish":{"interval":80,"frames":["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","º> ~~~~~~~~~~~~~~~~~","(º> ~~~~~~~~~~~~~~~~","((º> ~~~~~~~~~~~~~~~","<((º> ~~~~~~~~~~~~~~","><((º> ~~~~~~~~~~~~~"," ><((º> ~~~~~~~~~~~~","~ ><((º> ~~~~~~~~~~~","~~ <>((º> ~~~~~~~~~~","~~~ ><((º> ~~~~~~~~~","~~~~ <>((º> ~~~~~~~~","~~~~~ ><((º> ~~~~~~~","~~~~~~ <>((º> ~~~~~~","~~~~~~~ ><((º> ~~~~~","~~~~~~~~ <>((º> ~~~~","~~~~~~~~~ ><((º> ~~~","~~~~~~~~~~ <>((º> ~~","~~~~~~~~~~~ ><((º> ~","~~~~~~~~~~~~ <>((º> ","~~~~~~~~~~~~~ ><((º>","~~~~~~~~~~~~~~ <>((º","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}}')
748
+ ;const ct=ht;Object.keys(ht);const ut=d?.WriteStream?.prototype?.hasColors?.()??!1,dt=(t,e)=>{if(!ut)return t=>t
749
+ ;const i=`[${t}m`,r=`[${e}m`;return t=>{const s=t+"";let n=s.indexOf(r);if(-1===n)return i+s+r;let o=i,a=0
750
+ ;const l=(22===e?r:"")+i;for(;-1!==n;)o+=s.slice(a,n)+l,a=n+r.length,n=s.indexOf(r,a);return o+=s.slice(a)+r,o}
751
+ },mt=(dt(0,0),dt(1,22),dt(2,22),dt(3,23),dt(4,24),dt(53,55),dt(7,27),dt(8,28),dt(9,29),dt(30,39),
752
+ dt(31,39)),pt=dt(32,39),ft=dt(33,39),gt=dt(34,39);dt(35,39),dt(36,39),dt(37,39),dt(90,39),dt(40,49),dt(41,49),dt(42,49),
753
+ dt(43,49),dt(44,49),dt(45,49),dt(46,49),dt(47,49),dt(100,49),dt(91,39),dt(92,39),dt(93,39),dt(94,39),dt(95,39),
754
+ dt(96,39),dt(97,39),dt(101,49),dt(102,49),dt(103,49),dt(104,49),dt(105,49),dt(106,49),dt(107,49);function _t(){
755
+ const{env:t}=r,{TERM:e,TERM_PROGRAM:i}=t
756
+ ;return"win32"!==r.platform?"linux"!==e:Boolean(t.WT_SESSION)||Boolean(t.TERMINUS_SUBLIME)||"{cmd::Cmder}"===t.ConEmuTask||"Terminus-Sublime"===i||"vscode"===i||"xterm-256color"===e||"alacritty"===e||"rxvt-unicode"===e||"rxvt-unicode-256color"===e||"JetBrains-JediTerm"===t.TERMINAL_EMULATOR
757
+ }const vt=_t(),bt=gt(vt?"ℹ":"i"),wt=pt(vt?"✔":"√"),yt=ft(vt?"⚠":"‼"),Ot=mt(vt?"✖":"×")
758
+ ;const xt=function({onlyFirst:t=!1}={}){
759
+ return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",t?void 0:"g")
760
+ }()
761
+ ;const Ct=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],Tt=[12288,12288,65281,65376,65504,65510],Et=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],At=(t,e)=>{
762
+ let i=0,r=Math.floor(t.length/2)-1;for(;i<=r;){const s=Math.floor((i+r)/2),n=2*s;if(e<t[n])r=s-1;else{
763
+ if(!(e>t[n+1]))return!0;i=s+1}}return!1};const[St,Pt]=$t(Et);function $t(t){let e=t[0],i=t[1]
764
+ ;for(let r=0;r<t.length;r+=2){const s=t[r],n=t[r+1];if(19968>=s&&19968<=n)return[s,n];n-s>i-e&&(e=s,i=n)}return[e,i]}
765
+ const kt=t=>!(t<161||t>1114109)&&At(Ct,t),Rt=t=>!(t<12288||t>65510)&&At(Tt,t),Mt=t=>t>=St&&t<=Pt||!(t<4352||t>262141)&&At(Et,t)
766
+ ;function jt(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}
767
+ function Ht(t,{ambiguousAsWide:e=!1}={}){return jt(t),Rt(t)||Mt(t)||e&&kt(t)?2:1}
768
+ const It=new Intl.Segmenter,Dt=/^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v,Wt=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v,Ft=/^\p{RGI_Emoji}$/v,Bt=/^[\d#*]\u20E3$/,Gt=/\p{Extended_Pictographic}/gu
769
+ ;function Nt(t){if(t.length>50)return!1;if(Bt.test(t))return!0;if(t.includes("‍")){const e=t.match(Gt)
770
+ ;return null!==e&&e.length>=2}return!1}function Vt(t){return t.replace(Wt,"")}function Lt(t){return Dt.test(t)}
771
+ function qt(t){return t>=4352&&t<=4447||t>=43360&&t<=43388}function Ut(t){return t>=4448&&t<=4519||t>=55216&&t<=55238}
772
+ function Yt(t){return t>=4520&&t<=4607||t>=55243&&t<=55291}function zt(t){return qt(t)||Ut(t)||Yt(t)}function Jt(t,e){
773
+ const i=[];for(const e of t)Dt.test(e)||i.push(e.codePointAt(0));if(0===i.length)return;let r=0
774
+ ;for(let t=0;t<i.length;t++){const s=i[t];if(!zt(s)){if(0===r)return;for(let s=t;s<i.length;s++)r+=Ht(i[s],e);return r}
775
+ qt(s)&&Ut(i[t+1])?(r+=2,t+=Yt(i[t+2])?2:1):r+=Ht(s,e)}return r}function Kt(t,e){let i=0,r=!0
776
+ ;for(const s of t)r?r=!1:s>="＀"&&s<="￯"&&(i+=Ht(s.codePointAt(0),e));return i}function Qt(t,e={}){
777
+ if("string"!=typeof t||0===t.length)return 0;const{ambiguousIsNarrow:i=!0,countAnsiEscapeCodes:r=!1}=e;let s=t
778
+ ;if(r||!s.includes("")&&!s.includes("›")||(s=function(t){
779
+ if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``)
780
+ ;return t.includes("")||t.includes("›")?t.replace(xt,""):t}(s)),0===s.length)return 0
781
+ ;if(/^[\u0020-\u007E]*$/.test(s))return s.length;let n=0;const o={ambiguousAsWide:!i}
782
+ ;for(const{segment:t}of It.segment(s)){if(Lt(t))continue;if(Ft.test(t)||Nt(t)){n+=2;continue}const e=Vt(t),i=Jt(e,o)
783
+ ;if(void 0!==i){n+=i;continue}n+=Ht(e.codePointAt(0),o),n+=Kt(e,o)}return n}const Xt=new class{#h=0;#c;#u=!1;#d=!1
784
+ ;#m=t=>{if(!t?.length)return;3===("string"==typeof t?t.codePointAt(0):t[0])&&r.kill(r.pid,"SIGINT")};start(){this.#h++,
785
+ 1===this.#h&&this.#p()}stop(){0!==this.#h&&0===--this.#h&&this.#f()}#p(){const{stdin:t}=r
786
+ ;"win32"!==r.platform&&t?.isTTY&&"function"==typeof t.setRawMode?(this.#c=t,this.#u=t.isPaused(),
787
+ this.#d=Boolean(t.isRaw),t.setRawMode(!0),t.prependListener("data",this.#m),this.#u&&t.resume()):this.#c=void 0}#f(){
788
+ if(!this.#c)return;const t=this.#c;t.off("data",this.#m),t.isTTY&&t.setRawMode?.(this.#d),this.#u&&t.pause(),
789
+ this.#c=void 0,this.#u=!1,this.#d=!1}
790
+ },Zt=Object.freeze(Xt),te=new Map,ee=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"])
791
+ ;class ie{#g=0;#_=-1;#v=0;#b;#w;#y;#O;#x=new Map;#C=!1;#T;#E;#A=!1;#S;#P(t){this.#C=!0;try{return t()}finally{this.#C=!1
792
+ }}#$(){this.isSpinning&&this.render()}#k(t,e){if(null==t)return"";if("string"==typeof t)return t
793
+ ;if(Buffer.isBuffer(t)||ArrayBuffer.isView(t)){const i="string"==typeof e&&e&&"buffer"!==e?e:"utf8"
794
+ ;return Buffer.from(t).toString(i)}return String(t)}#R(t){if(!t)return!1;const e=t.at(-1);return"\n"===e||"\r"===e}#M(){
795
+ this.#E||(this.#E=setTimeout(()=>{this.#E=void 0,this.isSpinning&&this.#$()},200),
796
+ "function"==typeof this.#E?.unref&&this.#E.unref())}#j(){this.#E&&(clearTimeout(this.#E),this.#E=void 0)}#H(t,e,i,r){
797
+ return this.#I(i," ")+t+("string"==typeof e?(t?" ":"")+e:"")+this.#D(r," ")}constructor(t){if("string"==typeof t&&(t={
798
+ text:t}),this.#b={color:"cyan",stream:r.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#b.color,
799
+ this.#y=this.#b.stream,"boolean"!=typeof this.#b.isEnabled&&(this.#b.isEnabled=function({stream:t=process.stdout}={}){
800
+ return Boolean(t&&t.isTTY&&"dumb"!==process.env.TERM&&!("CI"in process.env))}({stream:this.#y})),
801
+ "boolean"!=typeof this.#b.isSilent&&(this.#b.isSilent=!1),
802
+ void 0!==this.#b.interval&&!(Number.isInteger(this.#b.interval)&&this.#b.interval>0))throw new Error("The `interval` option must be a positive integer")
803
+ ;const e=this.#b.interval;this.spinner=this.#b.spinner,this.#b.interval=e,this.text=this.#b.text,
804
+ this.prefixText=this.#b.prefixText,this.suffixText=this.#b.suffixText,this.indent=this.#b.indent}get indent(){
805
+ return this.#b.indent}set indent(t=0){
806
+ if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#b.indent=t
807
+ }get interval(){return this.#b.interval??this.#w.interval??100}get spinner(){return this.#w}set spinner(t){
808
+ if(this.#_=-1,this.#b.interval=void 0,"object"==typeof t){
809
+ if(!Array.isArray(t.frames)||0===t.frames.length||t.frames.some(t=>"string"!=typeof t))throw new Error("The given spinner must have a non-empty `frames` array of strings")
810
+ ;if(void 0!==t.interval&&!(Number.isInteger(t.interval)&&t.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided")
811
+ ;this.#w=t}else if(_t())if(void 0===t)this.#w=ct.dots;else{
812
+ if("default"===t||!ct[t])throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)
813
+ ;this.#w=ct[t]}else this.#w=ct.line}get text(){return this.#b.text}set text(t=""){this.#b.text=t}get prefixText(){
814
+ return this.#b.prefixText}set prefixText(t=""){this.#b.prefixText=t}get suffixText(){return this.#b.suffixText}
815
+ set suffixText(t=""){this.#b.suffixText=t}get isSpinning(){return void 0!==this.#O}#W(t,e,i=!1){
816
+ const r="function"==typeof t?t():t;return"string"==typeof r&&""!==r?i?e+r:r+e:""}#I(t=this.#b.prefixText,e=" "){
817
+ return this.#W(t,e,!1)}#D(t=this.#b.suffixText,e=" "){return this.#W(t,e,!0)}#F(t,e){let i=0;for(const r of(0,
818
+ s.stripVTControlCharacters)(t).split("\n"))i+=Math.max(1,Math.ceil(Qt(r)/e));return i}get color(){return this.#S}
819
+ set color(t){
820
+ if(void 0!==t&&!1!==t&&!ee.has(t))throw new Error("The `color` option must be a valid color or `false` to disable")
821
+ ;this.#S=t}get isEnabled(){return this.#b.isEnabled&&!this.#b.isSilent}set isEnabled(t){
822
+ if("boolean"!=typeof t)throw new TypeError("The `isEnabled` option must be a boolean");this.#b.isEnabled=t}
823
+ get isSilent(){return this.#b.isSilent}set isSilent(t){
824
+ if("boolean"!=typeof t)throw new TypeError("The `isSilent` option must be a boolean");this.#b.isSilent=t}frame(){
825
+ const t=Date.now();(-1===this.#_||t-this.#v>=this.interval)&&(this.#_=(this.#_+1)%this.#w.frames.length,this.#v=t)
826
+ ;const{frames:e}=this.#w;let i=e[this.#_];this.#S&&(i=I[this.#S](i))
827
+ ;return this.#I(this.#b.prefixText," ")+i+("string"==typeof this.text?" "+this.text:"")+this.#D(this.#b.suffixText," ")}
828
+ clear(){return this.isEnabled&&this.#y.isTTY?(this.#P(()=>{this.#y.cursorTo(0)
829
+ ;for(let t=0;t<this.#g;t++)t>0&&this.#y.moveCursor(0,-1),this.#y.clearLine(1)
830
+ ;this.#b.indent&&this.#y.cursorTo(this.#b.indent)}),this.#g=0,this):this}#B(t){
831
+ if(!t||this.#x.has(t)||!t.isTTY||"function"!=typeof t.write)return
832
+ ;te.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.")
833
+ ;const e=t.write;this.#x.set(t,e),te.set(t,this),t.write=(i,r,s)=>this.#G(t,e,i,r,s)}#N(){
834
+ if(!this.isEnabled||this.#x.size>0)return;const t=new Set([this.#y,r.stdout,r.stderr]);for(const e of t)this.#B(e)}#V(){
835
+ for(const[t,e]of this.#x)t.write=e,te.get(t)===this&&te.delete(t);this.#x.clear()}#G(t,e,i,r,s){
836
+ if("function"==typeof r&&(s=r,r=void 0),this.#C)return e.call(t,i,r,s);this.clear()
837
+ ;const n=this.#k(i,r),o=this.#R(n),a=e.call(t,i,r,s);return o?this.#j():n.length>0&&this.#M(),
838
+ this.isSpinning&&!this.#E&&this.render(),a}render(){if(!this.isEnabled||this.#T||this.#E)return this
839
+ ;const t=this.#y.isTTY;let e=!1;try{t&&(this.#P(()=>this.#y.write("[?2026h")),e=!0),this.clear();let i=this.frame()
840
+ ;const r=this.#y.columns??80,s=this.#F(i,r),n=this.#y.rows;if(n&&n>1&&s>n){const t=i.split("\n"),e=n-1
841
+ ;i=[...t.slice(0,e),"... (content truncated to fit terminal)"].join("\n")}
842
+ !1===this.#P(()=>this.#y.write(i))&&this.#y.isTTY&&(this.#T=()=>{this.#T=void 0,this.#$()},
843
+ this.#y.once("drain",this.#T)),this.#g=this.#F(i,r)}finally{e&&this.#P(()=>this.#y.write("[?2026l"))}return this}
844
+ start(t){if(void 0!==t&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){
845
+ const t=this.text?"-":"",e=" ".repeat(this.#b.indent)+this.#H(t,this.text,this.#b.prefixText,this.#b.suffixText)
846
+ ;return""!==e.trim()&&this.#P(()=>this.#y.write(e+"\n")),this}
847
+ return this.isSpinning||(this.#b.hideCursor&&lt.hide(this.#y),this.#b.discardStdin&&r.stdin.isTTY&&(Zt.start(),
848
+ this.#A=!0),this.#N(),this.render(),this.#O=setInterval(this.render.bind(this),this.interval)),this}stop(){
849
+ return clearInterval(this.#O),this.#O=void 0,this.#_=-1,this.#v=0,this.#j(),this.#V(),
850
+ this.#T&&(this.#y.removeListener("drain",this.#T),this.#T=void 0),this.isEnabled&&(this.clear(),
851
+ this.#b.hideCursor&&lt.show(this.#y)),this.#A&&(this.#A=!1,Zt.stop()),this}succeed(t){return this.stopAndPersist({
852
+ symbol:wt,text:t})}fail(t){return this.stopAndPersist({symbol:Ot,text:t})}warn(t){return this.stopAndPersist({symbol:yt,
853
+ text:t})}info(t){return this.stopAndPersist({symbol:bt,text:t})}stopAndPersist(t={}){if(this.isSilent)return this
854
+ ;const e=t.symbol??" ",i=t.text??this.text,r=t.prefixText??this.#b.prefixText,s=t.suffixText??this.#b.suffixText,n=this.#H(e,i,r,s)+"\n"
855
+ ;return this.stop(),this.#P(()=>this.#y.write(n)),this}}function re(t){return new ie(t)}async function se(t,e){
856
+ const i="function"==typeof t
857
+ ;if(!i&&!("function"==typeof t?.then))throw new TypeError("Parameter `action` must be a Function or a Promise")
858
+ ;const{successText:r,failText:s,successSymbol:n,failSymbol:o}="object"==typeof e&&null!==e?e:{},a=re(e).start();try{
859
+ const e=i?t(a):t,s=await e,o=void 0===r?void 0:"string"==typeof r?r:r(s)
860
+ ;return void 0===n?a.succeed(o):a.stopAndPersist({symbol:n,text:o}),s}catch(t){
861
+ const e=void 0===s?void 0:"string"==typeof s?s:s(t);throw void 0===o?a.fail(e):a.stopAndPersist({symbol:o,text:e}),t}}},
862
+ 330(t){"use strict";t.exports={version:"0.0.16"}}};const e={};function i(r){const s=e[r];if(void 0!==s)return s.exports
863
+ ;const n=e[r]={exports:{}};return t[r].call(n.exports,n,n.exports,i),n.exports}i.d=(t,e)=>{
864
+ if(Array.isArray(e))for(var r=0;r<e.length;){var s=e[r++],n=e[r++];i.o(t,s)?0===n&&r++:0===n?Object.defineProperty(t,s,{
865
+ enumerable:!0,value:e[r++]}):Object.defineProperty(t,s,{enumerable:!0,get:n})
866
+ }else for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},
867
+ i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{
868
+ Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{
869
+ value:!0})};(()=>{"use strict";const t=i(757),e=i(943),r=i(330),s=i(855),n=i(84),o=i(700),a=i(185),l=new t.Command;try{
870
+ const t=process.cwd();l.name("mahameru").description(`${(0,e.bold)((0,e.cyan)("▲ Mahameru"))} ${(0,
871
+ e.dim)(`CLI v${r.version}`)}`).version(r.version,"-v, --version","Display help for command"),
872
+ l.command("dev").option("-p, --port <number>","Port to run the server on",a.parsePort).option("-h, --host <string>","Host to run the server on").action((0,
873
+ s.dev)({version:r.version})),l.command("build").description("Build Mahameru production application.").action((0,
874
+ n.build)({rootPath:t
875
+ })),l.command("start").description("Start Mahameru production server.").option("-p, --port <number>","Port to run the server on",a.parsePort).option("-h, --host <string>","Host to run the server on").action((0,
876
+ o.start)({rootPath:t,version:r.version})),l.parse(process.argv)}catch(t){console.error(t),process.exit(1)}})()})();