aronrepo 1.4.7 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/index CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- var vi=Object.create;var Rt=Object.defineProperty;var Ei=Object.getOwnPropertyDescriptor;var Ti=Object.getOwnPropertyNames;var Pi=Object.getPrototypeOf,_i=Object.prototype.hasOwnProperty;var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ii=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ti(t))!_i.call(e,i)&&i!==n&&Rt(e,i,{get:()=>t[i],enumerable:!(r=Ei(t,i))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?vi(Pi(e)):{},Ii(t||!e||!e.__esModule?Rt(n,"default",{value:e,enumerable:!0}):n,e));var Wt=E((Ra,qt)=>{qt.exports=Ut;Ut.sync=Ai;var Lt=require("fs");function Ci(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function Dt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Ci(t,n)}function Ut(e,t,n){Lt.stat(e,function(r,i){n(r,r?!1:Dt(i,e,t))})}function Ai(e,t){return Dt(Lt.statSync(e),e,t)}});var Vt=E(($a,Xt)=>{Xt.exports=Ht;Ht.sync=Ni;var zt=require("fs");function Ht(e,t,n){zt.stat(e,function(r,i){n(r,r?!1:Kt(i,t))})}function Ni(e,t){return Kt(zt.statSync(e),t)}function Kt(e,t){return e.isFile()&&ki(e,t)}function ki(e,t){var n=e.mode,r=e.uid,i=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),f=a|c,l=n&u||n&c&&i===s||n&a&&r===o||n&f&&o===0;return l}});var Jt=E((Ba,Yt)=>{var Fa=require("fs"),he;process.platform==="win32"||global.TESTING_WINDOWS?he=Wt():he=Vt();Yt.exports=Me;Me.sync=Gi;function Me(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,i){Me(e,t||{},function(o,s){o?i(o):r(s)})})}he(e,t||{},function(r,i){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,i=!1),n(r,i)})}function Gi(e,t){try{return he.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var on=E((Ma,rn)=>{var z=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Zt=require("path"),Ri=z?";":":",Qt=Jt(),en=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),tn=(e,t)=>{let n=t.colon||Ri,r=e.match(/\//)||z&&e.match(/\\/)?[""]:[...z?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],i=z?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=z?i.split(n):[""];return z&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:r,pathExt:o,pathExtExe:i}},nn=(e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:i,pathExtExe:o}=tn(e,t),s=[],a=u=>new Promise((f,l)=>{if(u===r.length)return t.all&&s.length?f(s):l(en(e));let p=r[u],m=/^".*"$/.test(p)?p.slice(1,-1):p,d=Zt.join(m,e),y=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;f(c(y,u,0))}),c=(u,f,l)=>new Promise((p,m)=>{if(l===i.length)return p(a(f+1));let d=i[l];Qt(u+d,{pathExt:o},(y,g)=>{if(!y&&g)if(t.all)s.push(u+d);else return p(u+d);return p(c(u,f,l+1))})});return n?a(0).then(u=>n(null,u),n):a(0)},$i=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:i}=tn(e,t),o=[];for(let s=0;s<n.length;s++){let a=n[s],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=Zt.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let l=0;l<r.length;l++){let p=f+r[l];try{if(Qt.sync(p,{pathExt:i}))if(t.all)o.push(p);else return p}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw en(e)};rn.exports=nn;nn.sync=$i});var an=E((La,Le)=>{"use strict";var sn=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};Le.exports=sn;Le.exports.default=sn});var ln=E((Da,fn)=>{"use strict";var cn=require("path"),Fi=on(),Bi=an();function un(e,t){let n=e.options.env||process.env,r=process.cwd(),i=e.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let s;try{s=Fi.sync(e.command,{path:n[Bi({env:n})],pathExt:t?cn.delimiter:void 0})}catch{}finally{o&&process.chdir(r)}return s&&(s=cn.resolve(i?e.options.cwd:"",s)),s}function Mi(e){return un(e)||un(e,!0)}fn.exports=Mi});var dn=E((Ua,Ue)=>{"use strict";var De=/([()\][%!^"`<>&|;, *?])/g;function Li(e){return e=e.replace(De,"^$1"),e}function Di(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(De,"^$1"),t&&(e=e.replace(De,"^$1")),e}Ue.exports.command=Li;Ue.exports.argument=Di});var mn=E((qa,pn)=>{"use strict";pn.exports=/^#!(.*)/});var hn=E((Wa,gn)=>{"use strict";var Ui=mn();gn.exports=(e="")=>{let t=e.match(Ui);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return i==="env"?r:r?`${i} ${r}`:i}});var xn=E((za,yn)=>{"use strict";var qe=require("fs"),qi=hn();function Wi(e){let n=Buffer.alloc(150),r;try{r=qe.openSync(e,"r"),qe.readSync(r,n,0,150,0),qe.closeSync(r)}catch{}return qi(n.toString())}yn.exports=Wi});var vn=E((Ha,wn)=>{"use strict";var zi=require("path"),bn=ln(),Sn=dn(),Hi=xn(),Ki=process.platform==="win32",Xi=/\.(?:com|exe)$/i,Vi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Yi(e){e.file=bn(e);let t=e.file&&Hi(e.file);return t?(e.args.unshift(e.file),e.command=t,bn(e)):e.file}function Ji(e){if(!Ki)return e;let t=Yi(e),n=!Xi.test(t);if(e.options.forceShell||n){let r=Vi.test(t);e.command=zi.normalize(e.command),e.command=Sn.command(e.command),e.args=e.args.map(o=>Sn.argument(o,r));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Zi(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:Ji(r)}wn.exports=Zi});var Pn=E((Ka,Tn)=>{"use strict";var We=process.platform==="win32";function ze(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Qi(e,t){if(!We)return;let n=e.emit;e.emit=function(r,i){if(r==="exit"){let o=En(i,t,"spawn");if(o)return n.call(e,"error",o)}return n.apply(e,arguments)}}function En(e,t){return We&&e===1&&!t.file?ze(t.original,"spawn"):null}function eo(e,t){return We&&e===1&&!t.file?ze(t.original,"spawnSync"):null}Tn.exports={hookChildProcess:Qi,verifyENOENT:En,verifyENOENTSync:eo,notFoundError:ze}});var jn=E((Xa,H)=>{"use strict";var _n=require("child_process"),He=vn(),Ke=Pn();function In(e,t,n){let r=He(e,t,n),i=_n.spawn(r.command,r.args,r.options);return Ke.hookChildProcess(i,r),i}function to(e,t,n){let r=He(e,t,n),i=_n.spawnSync(r.command,r.args,r.options);return i.error=i.error||Ke.verifyENOENTSync(i.status,r),i}H.exports=In;H.exports.spawn=In;H.exports.sync=to;H.exports._parse=He;H.exports._enoent=Ke});var Ln=E((mc,Se)=>{Se.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Se.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Se.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var zn=E((gc,Y)=>{var w=global.process,B=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};B(w)?(Dn=require("assert"),X=Ln(),Un=/^win/i.test(w.platform),re=require("events"),typeof re!="function"&&(re=re.EventEmitter),w.__signal_exit_emitter__?T=w.__signal_exit_emitter__:(T=w.__signal_exit_emitter__=new re,T.count=0,T.emitted={}),T.infinite||(T.setMaxListeners(1/0),T.infinite=!0),Y.exports=function(e,t){if(!B(global.process))return function(){};Dn.equal(typeof e,"function","a callback must be provided for exit handler"),V===!1&&Qe();var n="exit";t&&t.alwaysLast&&(n="afterexit");var r=function(){T.removeListener(n,e),T.listeners("exit").length===0&&T.listeners("afterexit").length===0&&we()};return T.on(n,e),r},we=function(){!V||!B(global.process)||(V=!1,X.forEach(function(t){try{w.removeListener(t,ve[t])}catch{}}),w.emit=Ee,w.reallyExit=et,T.count-=1)},Y.exports.unload=we,M=function(t,n,r){T.emitted[t]||(T.emitted[t]=!0,T.emit(t,n,r))},ve={},X.forEach(function(e){ve[e]=function(){if(B(global.process)){var n=w.listeners(e);n.length===T.count&&(we(),M("exit",null,e),M("afterexit",null,e),Un&&e==="SIGHUP"&&(e="SIGINT"),w.kill(w.pid,e))}}}),Y.exports.signals=function(){return X},V=!1,Qe=function(){V||!B(global.process)||(V=!0,T.count+=1,X=X.filter(function(t){try{return w.on(t,ve[t]),!0}catch{return!1}}),w.emit=Wn,w.reallyExit=qn)},Y.exports.load=Qe,et=w.reallyExit,qn=function(t){B(global.process)&&(w.exitCode=t||0,M("exit",w.exitCode,null),M("afterexit",w.exitCode,null),et.call(w,w.exitCode))},Ee=w.emit,Wn=function(t,n){if(t==="exit"&&B(global.process)){n!==void 0&&(w.exitCode=n);var r=Ee.apply(this,arguments);return M("exit",w.exitCode,null),M("afterexit",w.exitCode,null),r}else return Ee.apply(this,arguments)}):Y.exports=function(){return function(){}};var Dn,X,Un,re,T,we,M,ve,V,Qe,et,qn,Ee,Wn});var tr=E((xc,er)=>{"use strict";var{PassThrough:_o}=require("stream");er.exports=e=>{e={...e};let{array:t}=e,{encoding:n}=e,r=n==="buffer",i=!1;t?i=!(n||r):n=n||"utf8",r&&(n=null);let o=new _o({objectMode:i});n&&o.setEncoding(n);let s=0,a=[];return o.on("data",c=>{a.push(c),i?s=a.length:s+=c.length}),o.getBufferedValue=()=>t?a:r?Buffer.concat(a,s):a.join(""),o.getBufferedLength=()=>s,o}});var nr=E((bc,ie)=>{"use strict";var{constants:Io}=require("buffer"),jo=require("stream"),{promisify:Oo}=require("util"),Co=tr(),Ao=Oo(jo.pipeline),Te=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function tt(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:n}=t,r=Co(t);return await new Promise((i,o)=>{let s=a=>{a&&r.getBufferedLength()<=Io.MAX_LENGTH&&(a.bufferedData=r.getBufferedValue()),o(a)};(async()=>{try{await Ao(e,r),i()}catch(a){s(a)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new Te)})}),r.getBufferedValue()}ie.exports=tt;ie.exports.buffer=(e,t)=>tt(e,{...t,encoding:"buffer"});ie.exports.array=(e,t)=>tt(e,{...t,array:!0});ie.exports.MaxBufferError=Te});var ir=E((Sc,rr)=>{"use strict";var{PassThrough:No}=require("stream");rr.exports=function(){var e=[],t=new No({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(n),t;function n(o){return Array.isArray(o)?(o.forEach(n),this):(e.push(o),o.once("end",i.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}function r(){return e.length==0}function i(o){e=e.filter(function(s){return s!==o}),!e.length&&t.readable&&t.end()}}});var bt=E(Pr=>{var gt="2.0.1",vr,Pe,Er,yt,xt,J,ce,ae,ht,Z,_,Tr=[].slice,Ho=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},Ko={}.hasOwnProperty;ce=require("path");Er=function(e){return typeof e=="function"};yt=function(e){return typeof e=="string"||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"};_=Pr;_.VERSION=typeof gt<"u"&&gt!==null?gt:"NO-VERSION";Z=function(e){return e=e.replace(/\\/g,"/"),e=e.replace(/(?<!^)\/+/g,"/"),e};for(ae in ce)ht=ce[ae],Er(ht)?_[ae]=function(e){return function(){var t,n;return t=1<=arguments.length?Tr.call(arguments,0):[],t=t.map(function(r){return yt(r)?Z(r):r}),n=ce[e].apply(ce,t),yt(n)?Z(n):n}}(ae):_[ae]=ht;_.sep="/";Pe={toUnix:Z,normalizeSafe:function(e){var t;return e=Z(e),t=_.normalize(e),e.startsWith("./")&&!t.startsWith("./")&&!t.startsWith("..")?t="./"+t:e.startsWith("//")&&!t.startsWith("//")&&(e.startsWith("//./")?t="//."+t:t="/"+t),t},normalizeTrim:function(e){return e=_.normalizeSafe(e),e.endsWith("/")?e.slice(0,+(e.length-2)+1||9e9):e},joinSafe:function(){var e,t,n;return e=1<=arguments.length?Tr.call(arguments,0):[],n=_.join.apply(null,e),e.length>0&&(t=Z(e[0]),t.startsWith("./")&&!n.startsWith("./")&&!n.startsWith("..")?n="./"+n:t.startsWith("//")&&!n.startsWith("//")&&(t.startsWith("//./")?n="//."+n:n="/"+n)),n},addExt:function(e,t){return t?(t[0]!=="."&&(t="."+t),e+(e.endsWith(t)?"":t)):e},trimExt:function(e,t,n){var r;return n==null&&(n=7),r=_.extname(e),xt(r,t,n)?e.slice(0,+(e.length-r.length-1)+1||9e9):e},removeExt:function(e,t){return t?(t=t[0]==="."?t:"."+t,_.extname(e)===t?_.trimExt(e,[],t.length):e):e},changeExt:function(e,t,n,r){return r==null&&(r=7),_.trimExt(e,n,r)+(t?t[0]==="."?t:"."+t:"")},defaultExt:function(e,t,n,r){var i;return r==null&&(r=7),i=_.extname(e),xt(i,n,r)?e:_.addExt(e,t)}};xt=function(e,t,n){return t==null&&(t=[]),e&&e.length<=n&&Ho.call(t.map(function(r){return(r&&r[0]!=="."?".":"")+r}),e)<0};for(J in Pe)if(Ko.call(Pe,J)){if(vr=Pe[J],_[J]!==void 0)throw new Error("path."+J+" already exists.");_[J]=vr}});var jr=E((Yc,Ir)=>{Ir.exports=function(e,t){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var n=e.length;if(n<=1)return e;var r="";if(n>4&&e[3]==="\\"){var i=e[2];(i==="?"||i===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),r="//")}var o=e.split(/[/\\]+/);return t!==!1&&o[o.length-1]===""&&o.pop(),r+o.join("/")}});var ui=E((ue,ee)=>{var Zo=200,Ct="__lodash_hash_undefined__",Ge=1,Lr=2,Dr=9007199254740991,Ie="[object Arguments]",Et="[object Array]",Qo="[object AsyncFunction]",Ur="[object Boolean]",qr="[object Date]",Wr="[object Error]",zr="[object Function]",es="[object GeneratorFunction]",je="[object Map]",Hr="[object Number]",ts="[object Null]",Q="[object Object]",Or="[object Promise]",ns="[object Proxy]",Kr="[object RegExp]",Oe="[object Set]",Xr="[object String]",rs="[object Symbol]",is="[object Undefined]",Tt="[object WeakMap]",Vr="[object ArrayBuffer]",Ce="[object DataView]",os="[object Float32Array]",ss="[object Float64Array]",as="[object Int8Array]",cs="[object Int16Array]",us="[object Int32Array]",fs="[object Uint8Array]",ls="[object Uint8ClampedArray]",ds="[object Uint16Array]",ps="[object Uint32Array]",ms=/[\\^$.*+?()[\]{}|]/g,gs=/^\[object .+?Constructor\]$/,hs=/^(?:0|[1-9]\d*)$/,S={};S[os]=S[ss]=S[as]=S[cs]=S[us]=S[fs]=S[ls]=S[ds]=S[ps]=!0;S[Ie]=S[Et]=S[Vr]=S[Ur]=S[Ce]=S[qr]=S[Wr]=S[zr]=S[je]=S[Hr]=S[Q]=S[Kr]=S[Oe]=S[Xr]=S[Tt]=!1;var Yr=typeof global=="object"&&global&&global.Object===Object&&global,ys=typeof self=="object"&&self&&self.Object===Object&&self,N=Yr||ys||Function("return this")(),Jr=typeof ue=="object"&&ue&&!ue.nodeType&&ue,Cr=Jr&&typeof ee=="object"&&ee&&!ee.nodeType&&ee,Zr=Cr&&Cr.exports===Jr,St=Zr&&Yr.process,Ar=function(){try{return St&&St.binding&&St.binding("util")}catch{}}(),Nr=Ar&&Ar.isTypedArray;function xs(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function bs(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ss(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ws(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function vs(e){return function(t){return e(t)}}function Es(e,t){return e.has(t)}function Ts(e,t){return e?.[t]}function Ps(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function _s(e,t){return function(n){return e(t(n))}}function Is(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var js=Array.prototype,Os=Function.prototype,Re=Object.prototype,wt=N["__core-js_shared__"],Qr=Os.toString,C=Re.hasOwnProperty,kr=function(){var e=/[^.]+$/.exec(wt&&wt.keys&&wt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ei=Re.toString,Cs=RegExp("^"+Qr.call(C).replace(ms,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gr=Zr?N.Buffer:void 0,Ae=N.Symbol,Rr=N.Uint8Array,ti=Re.propertyIsEnumerable,As=js.splice,L=Ae?Ae.toStringTag:void 0,$r=Object.getOwnPropertySymbols,Ns=Gr?Gr.isBuffer:void 0,ks=_s(Object.keys,Object),Pt=te(N,"DataView"),fe=te(N,"Map"),_t=te(N,"Promise"),It=te(N,"Set"),jt=te(N,"WeakMap"),le=te(Object,"create"),Gs=q(Pt),Rs=q(fe),$s=q(_t),Fs=q(It),Bs=q(jt),Fr=Ae?Ae.prototype:void 0,vt=Fr?Fr.valueOf:void 0;function D(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ms(){this.__data__=le?le(null):{},this.size=0}function Ls(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Ds(e){var t=this.__data__;if(le){var n=t[e];return n===Ct?void 0:n}return C.call(t,e)?t[e]:void 0}function Us(e){var t=this.__data__;return le?t[e]!==void 0:C.call(t,e)}function qs(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=le&&t===void 0?Ct:t,this}D.prototype.clear=Ms;D.prototype.delete=Ls;D.prototype.get=Ds;D.prototype.has=Us;D.prototype.set=qs;function k(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ws(){this.__data__=[],this.size=0}function zs(e){var t=this.__data__,n=$e(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():As.call(t,n,1),--this.size,!0}function Hs(e){var t=this.__data__,n=$e(t,e);return n<0?void 0:t[n][1]}function Ks(e){return $e(this.__data__,e)>-1}function Xs(e,t){var n=this.__data__,r=$e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}k.prototype.clear=Ws;k.prototype.delete=zs;k.prototype.get=Hs;k.prototype.has=Ks;k.prototype.set=Xs;function U(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vs(){this.size=0,this.__data__={hash:new D,map:new(fe||k),string:new D}}function Ys(e){var t=Fe(this,e).delete(e);return this.size-=t?1:0,t}function Js(e){return Fe(this,e).get(e)}function Zs(e){return Fe(this,e).has(e)}function Qs(e,t){var n=Fe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}U.prototype.clear=Vs;U.prototype.delete=Ys;U.prototype.get=Js;U.prototype.has=Zs;U.prototype.set=Qs;function Ne(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new U;++t<n;)this.add(e[t])}function ea(e){return this.__data__.set(e,Ct),this}function ta(e){return this.__data__.has(e)}Ne.prototype.add=Ne.prototype.push=ea;Ne.prototype.has=ta;function F(e){var t=this.__data__=new k(e);this.size=t.size}function na(){this.__data__=new k,this.size=0}function ra(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ia(e){return this.__data__.get(e)}function oa(e){return this.__data__.has(e)}function sa(e,t){var n=this.__data__;if(n instanceof k){var r=n.__data__;if(!fe||r.length<Zo-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new U(r)}return n.set(e,t),this.size=n.size,this}F.prototype.clear=na;F.prototype.delete=ra;F.prototype.get=ia;F.prototype.has=oa;F.prototype.set=sa;function aa(e,t){var n=ke(e),r=!n&&va(e),i=!n&&!r&&Ot(e),o=!n&&!r&&!i&&ci(e),s=n||r||i||o,a=s?ws(e.length,String):[],c=a.length;for(var u in e)(t||C.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ya(u,c)))&&a.push(u);return a}function $e(e,t){for(var n=e.length;n--;)if(ii(e[n][0],t))return n;return-1}function ca(e,t,n){var r=t(e);return ke(e)?r:bs(r,n(e))}function pe(e){return e==null?e===void 0?is:ts:L&&L in Object(e)?ga(e):wa(e)}function Br(e){return de(e)&&pe(e)==Ie}function ni(e,t,n,r,i){return e===t?!0:e==null||t==null||!de(e)&&!de(t)?e!==e&&t!==t:ua(e,t,n,r,ni,i)}function ua(e,t,n,r,i,o){var s=ke(e),a=ke(t),c=s?Et:$(e),u=a?Et:$(t);c=c==Ie?Q:c,u=u==Ie?Q:u;var f=c==Q,l=u==Q,p=c==u;if(p&&Ot(e)){if(!Ot(t))return!1;s=!0,f=!1}if(p&&!f)return o||(o=new F),s||ci(e)?ri(e,t,n,r,i,o):pa(e,t,c,n,r,i,o);if(!(n&Ge)){var m=f&&C.call(e,"__wrapped__"),d=l&&C.call(t,"__wrapped__");if(m||d){var y=m?e.value():e,g=d?t.value():t;return o||(o=new F),i(y,g,n,r,o)}}return p?(o||(o=new F),ma(e,t,n,r,i,o)):!1}function fa(e){if(!ai(e)||ba(e))return!1;var t=oi(e)?Cs:gs;return t.test(q(e))}function la(e){return de(e)&&si(e.length)&&!!S[pe(e)]}function da(e){if(!Sa(e))return ks(e);var t=[];for(var n in Object(e))C.call(e,n)&&n!="constructor"&&t.push(n);return t}function ri(e,t,n,r,i,o){var s=n&Ge,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var f=-1,l=!0,p=n&Lr?new Ne:void 0;for(o.set(e,t),o.set(t,e);++f<a;){var m=e[f],d=t[f];if(r)var y=s?r(d,m,f,t,e,o):r(m,d,f,e,t,o);if(y!==void 0){if(y)continue;l=!1;break}if(p){if(!Ss(t,function(g,h){if(!Es(p,h)&&(m===g||i(m,g,n,r,o)))return p.push(h)})){l=!1;break}}else if(!(m===d||i(m,d,n,r,o))){l=!1;break}}return o.delete(e),o.delete(t),l}function pa(e,t,n,r,i,o,s){switch(n){case Ce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vr:return!(e.byteLength!=t.byteLength||!o(new Rr(e),new Rr(t)));case Ur:case qr:case Hr:return ii(+e,+t);case Wr:return e.name==t.name&&e.message==t.message;case Kr:case Xr:return e==t+"";case je:var a=Ps;case Oe:var c=r&Ge;if(a||(a=Is),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=Lr,s.set(e,t);var f=ri(a(e),a(t),r,i,o,s);return s.delete(e),f;case rs:if(vt)return vt.call(e)==vt.call(t)}return!1}function ma(e,t,n,r,i,o){var s=n&Ge,a=Mr(e),c=a.length,u=Mr(t),f=u.length;if(c!=f&&!s)return!1;for(var l=c;l--;){var p=a[l];if(!(s?p in t:C.call(t,p)))return!1}var m=o.get(e);if(m&&o.get(t))return m==t;var d=!0;o.set(e,t),o.set(t,e);for(var y=s;++l<c;){p=a[l];var g=e[p],h=t[p];if(r)var b=s?r(h,g,p,t,e,o):r(g,h,p,e,t,o);if(!(b===void 0?g===h||i(g,h,n,r,o):b)){d=!1;break}y||(y=p=="constructor")}if(d&&!y){var I=e.constructor,P=t.constructor;I!=P&&"constructor"in e&&"constructor"in t&&!(typeof I=="function"&&I instanceof I&&typeof P=="function"&&P instanceof P)&&(d=!1)}return o.delete(e),o.delete(t),d}function Mr(e){return ca(e,Pa,ha)}function Fe(e,t){var n=e.__data__;return xa(t)?n[typeof t=="string"?"string":"hash"]:n.map}function te(e,t){var n=Ts(e,t);return fa(n)?n:void 0}function ga(e){var t=C.call(e,L),n=e[L];try{e[L]=void 0;var r=!0}catch{}var i=ei.call(e);return r&&(t?e[L]=n:delete e[L]),i}var ha=$r?function(e){return e==null?[]:(e=Object(e),xs($r(e),function(t){return ti.call(e,t)}))}:_a,$=pe;(Pt&&$(new Pt(new ArrayBuffer(1)))!=Ce||fe&&$(new fe)!=je||_t&&$(_t.resolve())!=Or||It&&$(new It)!=Oe||jt&&$(new jt)!=Tt)&&($=function(e){var t=pe(e),n=t==Q?e.constructor:void 0,r=n?q(n):"";if(r)switch(r){case Gs:return Ce;case Rs:return je;case $s:return Or;case Fs:return Oe;case Bs:return Tt}return t});function ya(e,t){return t=t??Dr,!!t&&(typeof e=="number"||hs.test(e))&&e>-1&&e%1==0&&e<t}function xa(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ba(e){return!!kr&&kr in e}function Sa(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Re;return e===n}function wa(e){return ei.call(e)}function q(e){if(e!=null){try{return Qr.call(e)}catch{}try{return e+""}catch{}}return""}function ii(e,t){return e===t||e!==e&&t!==t}var va=Br(function(){return arguments}())?Br:function(e){return de(e)&&C.call(e,"callee")&&!ti.call(e,"callee")},ke=Array.isArray;function Ea(e){return e!=null&&si(e.length)&&!oi(e)}var Ot=Ns||Ia;function Ta(e,t){return ni(e,t)}function oi(e){if(!ai(e))return!1;var t=pe(e);return t==zr||t==es||t==Qo||t==ns}function si(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Dr}function ai(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function de(e){return e!=null&&typeof e=="object"}var ci=Nr?vs(Nr):la;function Pa(e){return Ea(e)?aa(e):da(e)}function _a(){return[]}function Ia(){return!1}ee.exports=Ta});var kt=require("commander"),wi=x(require("path"));var Ft=require("commander"),Bt=x(require("fast-glob")),Be=x(require("fs-extra")),Mt=x(require("path")),A=x(require("@techor/log"));var $t=x(require("fs-extra"));function W(e="./package.json"){return $t.default.readJSONSync(e,{throws:!1})||{}}var ji=W(),Oi={workspaces:ji.workspaces};Ft.program.command("version <version>").description("Bump to specific version for workspace's packages").option("-p, --prefix <symbol>","Version prefix `^`, `~`, `>`, `>=`, `<`, `<=` ","^").option("-w, --workspaces <paths>","Specific your workspaces",Oi.workspaces).option("-ls, --list","List current bumpable dependency tree in workspaces",!1).action((e,{prefix:t,list:n,workspaces:r})=>{let i=t+e,o={},s={},a=r.map(f=>Mt.default.join(f,"*package.json")),c=(f,l)=>{let p=!1;for(let m in f)m in s&&f[m]===""&&(f[m]=i,p=!0);return p};for(let f of Bt.default.sync(a)){let l=Be.default.readJSONSync(f);l.private||(o[f]=l,s[l.name]=l,l.version=e)}for(let f in o){let l=o[f],{dependencies:p,peerDependencies:m}=o[f];p&&c(p,"dependencies"),m&&c(m,"peerDependencies"),n||Be.default.writeJSONSync(f,l)}let u={};for(let f in s){let{dependencies:l,peerDependencies:p}=s[f],m=u[(0,A.paint)("**"+f+"**")]={},d=(y,g)=>{if(y){m[g]={};for(let h in y)if(h in s){let b=y[h];m[g][(0,A.paint)("**"+h+"**")]=b===i?null:i}}};d(l,"dependencies"),d(p,"peerDependencies"),Object.keys(u[(0,A.paint)("**"+f+"**")]).length||(u[(0,A.paint)("**"+f+"**")]=null)}A.default`📦`,A.default.tree(u),A.default.success`bump version to +${i}+ for ${Object.keys(s).length} packages in all workspace`});var hi=require("commander"),yi=x(require("fast-glob"));var mr=require("node:buffer"),gr=x(require("node:path"),1),at=x(require("node:child_process"),1),oe=x(require("node:process"),1),hr=x(jn(),1);function Xe(e){let t=typeof e=="string"?`
2
+ var Lo=Object.create;var Mt=Object.defineProperty;var Do=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var qo=Object.getPrototypeOf,Wo=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var zo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Uo(t))!Wo.call(e,o)&&o!==n&&Mt(e,o,{get:()=>t[o],enumerable:!(r=Do(t,o))||r.enumerable});return e};var y=(e,t,n)=>(n=e!=null?Lo(qo(e)):{},zo(t||!e||!e.__esModule?Mt(n,"default",{value:e,enumerable:!0}):n,e));var Xt=v((nc,Kt)=>{Kt.exports=Ht;Ht.sync=Vo;var Wt=require("fs");function Xo(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function zt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Xo(t,n)}function Ht(e,t,n){Wt.stat(e,function(r,o){n(r,r?!1:zt(o,e,t))})}function Vo(e,t){return zt(Wt.statSync(e),e,t)}});var Qt=v((rc,Zt)=>{Zt.exports=Yt;Yt.sync=Yo;var Vt=require("fs");function Yt(e,t,n){Vt.stat(e,function(r,o){n(r,r?!1:Jt(o,t))})}function Yo(e,t){return Jt(Vt.statSync(e),t)}function Jt(e,t){return e.isFile()&&Jo(e,t)}function Jo(e,t){var n=e.mode,r=e.uid,o=e.gid,i=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),a=parseInt("001",8),f=u|c,p=n&a||n&c&&o===s||n&u&&r===i||n&f&&i===0;return p}});var tn=v((ic,en)=>{var oc=require("fs"),xe;process.platform==="win32"||global.TESTING_WINDOWS?xe=Xt():xe=Qt();en.exports=Ue;Ue.sync=Zo;function Ue(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,o){Ue(e,t||{},function(i,s){i?o(i):r(s)})})}xe(e,t||{},function(r,o){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,o=!1),n(r,o)})}function Zo(e,t){try{return xe.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var un=v((sc,cn)=>{var H=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",nn=require("path"),Qo=H?";":":",rn=tn(),on=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),sn=(e,t)=>{let n=t.colon||Qo,r=e.match(/\//)||H&&e.match(/\\/)?[""]:[...H?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=H?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=H?o.split(n):[""];return H&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:o}},an=(e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:o,pathExtExe:i}=sn(e,t),s=[],u=a=>new Promise((f,p)=>{if(a===r.length)return t.all&&s.length?f(s):p(on(e));let l=r[a],m=/^".*"$/.test(l)?l.slice(1,-1):l,d=nn.join(m,e),h=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;f(c(h,a,0))}),c=(a,f,p)=>new Promise((l,m)=>{if(p===o.length)return l(u(f+1));let d=o[p];rn(a+d,{pathExt:i},(h,g)=>{if(!h&&g)if(t.all)s.push(a+d);else return l(a+d);return l(c(a,f,p+1))})});return n?u(0).then(a=>n(null,a),n):u(0)},ei=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:o}=sn(e,t),i=[];for(let s=0;s<n.length;s++){let u=n[s],c=/^".*"$/.test(u)?u.slice(1,-1):u,a=nn.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+a:a;for(let p=0;p<r.length;p++){let l=f+r[p];try{if(rn.sync(l,{pathExt:o}))if(t.all)i.push(l);else return l}catch{}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw on(e)};cn.exports=an;an.sync=ei});var ln=v((ac,qe)=>{"use strict";var fn=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};qe.exports=fn;qe.exports.default=fn});var gn=v((cc,mn)=>{"use strict";var dn=require("path"),ti=un(),ni=ln();function pn(e,t){let n=e.options.env||process.env,r=process.cwd(),o=e.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=ti.sync(e.command,{path:n[ni({env:n})],pathExt:t?dn.delimiter:void 0})}catch{}finally{i&&process.chdir(r)}return s&&(s=dn.resolve(o?e.options.cwd:"",s)),s}function ri(e){return pn(e)||pn(e,!0)}mn.exports=ri});var hn=v((uc,ze)=>{"use strict";var We=/([()\][%!^"`<>&|;, *?])/g;function oi(e){return e=e.replace(We,"^$1"),e}function ii(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(We,"^$1"),t&&(e=e.replace(We,"^$1")),e}ze.exports.command=oi;ze.exports.argument=ii});var xn=v((fc,yn)=>{"use strict";yn.exports=/^#!(.*)/});var wn=v((lc,bn)=>{"use strict";var si=xn();bn.exports=(e="")=>{let t=e.match(si);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return o==="env"?r:r?`${o} ${r}`:o}});var vn=v((dc,Sn)=>{"use strict";var He=require("fs"),ai=wn();function ci(e){let n=Buffer.alloc(150),r;try{r=He.openSync(e,"r"),He.readSync(r,n,0,150,0),He.closeSync(r)}catch{}return ai(n.toString())}Sn.exports=ci});var _n=v((pc,Pn)=>{"use strict";var ui=require("path"),En=gn(),Tn=hn(),fi=vn(),li=process.platform==="win32",di=/\.(?:com|exe)$/i,pi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function mi(e){e.file=En(e);let t=e.file&&fi(e.file);return t?(e.args.unshift(e.file),e.command=t,En(e)):e.file}function gi(e){if(!li)return e;let t=mi(e),n=!di.test(t);if(e.options.forceShell||n){let r=pi.test(t);e.command=ui.normalize(e.command),e.command=Tn.command(e.command),e.args=e.args.map(i=>Tn.argument(i,r));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function hi(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:gi(r)}Pn.exports=hi});var On=v((mc,jn)=>{"use strict";var Ke=process.platform==="win32";function Xe(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function yi(e,t){if(!Ke)return;let n=e.emit;e.emit=function(r,o){if(r==="exit"){let i=In(o,t,"spawn");if(i)return n.call(e,"error",i)}return n.apply(e,arguments)}}function In(e,t){return Ke&&e===1&&!t.file?Xe(t.original,"spawn"):null}function xi(e,t){return Ke&&e===1&&!t.file?Xe(t.original,"spawnSync"):null}jn.exports={hookChildProcess:yi,verifyENOENT:In,verifyENOENTSync:xi,notFoundError:Xe}});var Nn=v((gc,K)=>{"use strict";var Cn=require("child_process"),Ve=_n(),Ye=On();function An(e,t,n){let r=Ve(e,t,n),o=Cn.spawn(r.command,r.args,r.options);return Ye.hookChildProcess(o,r),o}function bi(e,t,n){let r=Ve(e,t,n),o=Cn.spawnSync(r.command,r.args,r.options);return o.error=o.error||Ye.verifyENOENTSync(o.status,r),o}K.exports=An;K.exports.spawn=An;K.exports.sync=bi;K.exports._parse=Ve;K.exports._enoent=Ye});var Wn=v((Fc,ve)=>{ve.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&ve.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ve.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Vn=v(($c,J)=>{var S=global.process,M=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};M(S)?(zn=require("assert"),V=Wn(),Hn=/^win/i.test(S.platform),oe=require("events"),typeof oe!="function"&&(oe=oe.EventEmitter),S.__signal_exit_emitter__?T=S.__signal_exit_emitter__:(T=S.__signal_exit_emitter__=new oe,T.count=0,T.emitted={}),T.infinite||(T.setMaxListeners(1/0),T.infinite=!0),J.exports=function(e,t){if(!M(global.process))return function(){};zn.equal(typeof e,"function","a callback must be provided for exit handler"),Y===!1&&nt();var n="exit";t&&t.alwaysLast&&(n="afterexit");var r=function(){T.removeListener(n,e),T.listeners("exit").length===0&&T.listeners("afterexit").length===0&&Ee()};return T.on(n,e),r},Ee=function(){!Y||!M(global.process)||(Y=!1,V.forEach(function(t){try{S.removeListener(t,Te[t])}catch{}}),S.emit=Pe,S.reallyExit=rt,T.count-=1)},J.exports.unload=Ee,L=function(t,n,r){T.emitted[t]||(T.emitted[t]=!0,T.emit(t,n,r))},Te={},V.forEach(function(e){Te[e]=function(){if(M(global.process)){var n=S.listeners(e);n.length===T.count&&(Ee(),L("exit",null,e),L("afterexit",null,e),Hn&&e==="SIGHUP"&&(e="SIGINT"),S.kill(S.pid,e))}}}),J.exports.signals=function(){return V},Y=!1,nt=function(){Y||!M(global.process)||(Y=!0,T.count+=1,V=V.filter(function(t){try{return S.on(t,Te[t]),!0}catch{return!1}}),S.emit=Xn,S.reallyExit=Kn)},J.exports.load=nt,rt=S.reallyExit,Kn=function(t){M(global.process)&&(S.exitCode=t||0,L("exit",S.exitCode,null),L("afterexit",S.exitCode,null),rt.call(S,S.exitCode))},Pe=S.emit,Xn=function(t,n){if(t==="exit"&&M(global.process)){n!==void 0&&(S.exitCode=n);var r=Pe.apply(this,arguments);return L("exit",S.exitCode,null),L("afterexit",S.exitCode,null),r}else return Pe.apply(this,arguments)}):J.exports=function(){return function(){}};var zn,V,Hn,oe,T,Ee,L,Te,Y,nt,rt,Kn,Pe,Xn});var ir=v((Mc,or)=>{"use strict";var{PassThrough:qi}=require("stream");or.exports=e=>{e={...e};let{array:t}=e,{encoding:n}=e,r=n==="buffer",o=!1;t?o=!(n||r):n=n||"utf8",r&&(n=null);let i=new qi({objectMode:o});n&&i.setEncoding(n);let s=0,u=[];return i.on("data",c=>{u.push(c),o?s=u.length:s+=c.length}),i.getBufferedValue=()=>t?u:r?Buffer.concat(u,s):u.join(""),i.getBufferedLength=()=>s,i}});var sr=v((Lc,ie)=>{"use strict";var{constants:Wi}=require("buffer"),zi=require("stream"),{promisify:Hi}=require("util"),Ki=ir(),Xi=Hi(zi.pipeline),_e=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function ot(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:n}=t,r=Ki(t);return await new Promise((o,i)=>{let s=u=>{u&&r.getBufferedLength()<=Wi.MAX_LENGTH&&(u.bufferedData=r.getBufferedValue()),i(u)};(async()=>{try{await Xi(e,r),o()}catch(u){s(u)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new _e)})}),r.getBufferedValue()}ie.exports=ot;ie.exports.buffer=(e,t)=>ot(e,{...t,encoding:"buffer"});ie.exports.array=(e,t)=>ot(e,{...t,array:!0});ie.exports.MaxBufferError=_e});var cr=v((Dc,ar)=>{"use strict";var{PassThrough:Vi}=require("stream");ar.exports=function(){var e=[],t=new Vi({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),t;function n(i){return Array.isArray(i)?(i.forEach(n),this):(e.push(i),i.once("end",o.bind(null,i)),i.once("error",t.emit.bind(t,"error")),i.pipe(t,{end:!1}),this)}function r(){return e.length==0}function o(i){e=e.filter(function(s){return s!==i}),!e.length&&t.readable&&t.end()}}});var fe=v(Or=>{var xt="2.0.1",_r,Ie,Ir,wt,St,Z,ue,ce,bt,Q,_,jr=[].slice,us=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},fs={}.hasOwnProperty;ue=require("path");Ir=function(e){return typeof e=="function"};wt=function(e){return typeof e=="string"||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"};_=Or;_.VERSION=typeof xt<"u"&&xt!==null?xt:"NO-VERSION";Q=function(e){return e=e.replace(/\\/g,"/"),e=e.replace(/(?<!^)\/+/g,"/"),e};for(ce in ue)bt=ue[ce],Ir(bt)?_[ce]=function(e){return function(){var t,n;return t=1<=arguments.length?jr.call(arguments,0):[],t=t.map(function(r){return wt(r)?Q(r):r}),n=ue[e].apply(ue,t),wt(n)?Q(n):n}}(ce):_[ce]=bt;_.sep="/";Ie={toUnix:Q,normalizeSafe:function(e){var t;return e=Q(e),t=_.normalize(e),e.startsWith("./")&&!t.startsWith("./")&&!t.startsWith("..")?t="./"+t:e.startsWith("//")&&!t.startsWith("//")&&(e.startsWith("//./")?t="//."+t:t="/"+t),t},normalizeTrim:function(e){return e=_.normalizeSafe(e),e.endsWith("/")?e.slice(0,+(e.length-2)+1||9e9):e},joinSafe:function(){var e,t,n;return e=1<=arguments.length?jr.call(arguments,0):[],n=_.join.apply(null,e),e.length>0&&(t=Q(e[0]),t.startsWith("./")&&!n.startsWith("./")&&!n.startsWith("..")?n="./"+n:t.startsWith("//")&&!n.startsWith("//")&&(t.startsWith("//./")?n="//."+n:n="/"+n)),n},addExt:function(e,t){return t?(t[0]!=="."&&(t="."+t),e+(e.endsWith(t)?"":t)):e},trimExt:function(e,t,n){var r;return n==null&&(n=7),r=_.extname(e),St(r,t,n)?e.slice(0,+(e.length-r.length-1)+1||9e9):e},removeExt:function(e,t){return t?(t=t[0]==="."?t:"."+t,_.extname(e)===t?_.trimExt(e,[],t.length):e):e},changeExt:function(e,t,n,r){return r==null&&(r=7),_.trimExt(e,n,r)+(t?t[0]==="."?t:"."+t:"")},defaultExt:function(e,t,n,r){var o;return r==null&&(r=7),o=_.extname(e),St(o,n,r)?e:_.addExt(e,t)}};St=function(e,t,n){return t==null&&(t=[]),e&&e.length<=n&&us.call(t.map(function(r){return(r&&r[0]!=="."?".":"")+r}),e)<0};for(Z in Ie)if(fs.call(Ie,Z)){if(_r=Ie[Z],_[Z]!==void 0)throw new Error("path."+Z+" already exists.");_[Z]=_r}});var Nr=v((yu,Ar)=>{Ar.exports=function(e,t){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var n=e.length;if(n<=1)return e;var r="";if(n>4&&e[3]==="\\"){var o=e[2];(o==="?"||o===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),r="//")}var i=e.split(/[/\\]+/);return t!==!1&&i[i.length-1]===""&&i.pop(),r+i.join("/")}});var mo=v((le,te)=>{var gs=200,Nt="__lodash_hash_undefined__",$e=1,Wr=2,zr=9007199254740991,Oe="[object Arguments]",Pt="[object Array]",hs="[object AsyncFunction]",Hr="[object Boolean]",Kr="[object Date]",Xr="[object Error]",Vr="[object Function]",ys="[object GeneratorFunction]",Ce="[object Map]",Yr="[object Number]",xs="[object Null]",ee="[object Object]",kr="[object Promise]",bs="[object Proxy]",Jr="[object RegExp]",Ae="[object Set]",Zr="[object String]",ws="[object Symbol]",Ss="[object Undefined]",_t="[object WeakMap]",Qr="[object ArrayBuffer]",Ne="[object DataView]",vs="[object Float32Array]",Es="[object Float64Array]",Ts="[object Int8Array]",Ps="[object Int16Array]",_s="[object Int32Array]",Is="[object Uint8Array]",js="[object Uint8ClampedArray]",Os="[object Uint16Array]",Cs="[object Uint32Array]",As=/[\\^$.*+?()[\]{}|]/g,Ns=/^\[object .+?Constructor\]$/,ks=/^(?:0|[1-9]\d*)$/,w={};w[vs]=w[Es]=w[Ts]=w[Ps]=w[_s]=w[Is]=w[js]=w[Os]=w[Cs]=!0;w[Oe]=w[Pt]=w[Qr]=w[Hr]=w[Ne]=w[Kr]=w[Xr]=w[Vr]=w[Ce]=w[Yr]=w[ee]=w[Jr]=w[Ae]=w[Zr]=w[_t]=!1;var eo=typeof global=="object"&&global&&global.Object===Object&&global,Rs=typeof self=="object"&&self&&self.Object===Object&&self,N=eo||Rs||Function("return this")(),to=typeof le=="object"&&le&&!le.nodeType&&le,Rr=to&&typeof te=="object"&&te&&!te.nodeType&&te,no=Rr&&Rr.exports===to,vt=no&&eo.process,Fr=function(){try{return vt&&vt.binding&&vt.binding("util")}catch{}}(),$r=Fr&&Fr.isTypedArray;function Fs(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}function $s(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Bs(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Gs(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ms(e){return function(t){return e(t)}}function Ls(e,t){return e.has(t)}function Ds(e,t){return e?.[t]}function Us(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function qs(e,t){return function(n){return e(t(n))}}function Ws(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var zs=Array.prototype,Hs=Function.prototype,Be=Object.prototype,Et=N["__core-js_shared__"],ro=Hs.toString,C=Be.hasOwnProperty,Br=function(){var e=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),oo=Be.toString,Ks=RegExp("^"+ro.call(C).replace(As,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gr=no?N.Buffer:void 0,ke=N.Symbol,Mr=N.Uint8Array,io=Be.propertyIsEnumerable,Xs=zs.splice,D=ke?ke.toStringTag:void 0,Lr=Object.getOwnPropertySymbols,Vs=Gr?Gr.isBuffer:void 0,Ys=qs(Object.keys,Object),It=ne(N,"DataView"),de=ne(N,"Map"),jt=ne(N,"Promise"),Ot=ne(N,"Set"),Ct=ne(N,"WeakMap"),pe=ne(Object,"create"),Js=W(It),Zs=W(de),Qs=W(jt),ea=W(Ot),ta=W(Ct),Dr=ke?ke.prototype:void 0,Tt=Dr?Dr.valueOf:void 0;function U(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function na(){this.__data__=pe?pe(null):{},this.size=0}function ra(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function oa(e){var t=this.__data__;if(pe){var n=t[e];return n===Nt?void 0:n}return C.call(t,e)?t[e]:void 0}function ia(e){var t=this.__data__;return pe?t[e]!==void 0:C.call(t,e)}function sa(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pe&&t===void 0?Nt:t,this}U.prototype.clear=na;U.prototype.delete=ra;U.prototype.get=oa;U.prototype.has=ia;U.prototype.set=sa;function k(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function aa(){this.__data__=[],this.size=0}function ca(e){var t=this.__data__,n=Ge(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xs.call(t,n,1),--this.size,!0}function ua(e){var t=this.__data__,n=Ge(t,e);return n<0?void 0:t[n][1]}function fa(e){return Ge(this.__data__,e)>-1}function la(e,t){var n=this.__data__,r=Ge(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}k.prototype.clear=aa;k.prototype.delete=ca;k.prototype.get=ua;k.prototype.has=fa;k.prototype.set=la;function q(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function da(){this.size=0,this.__data__={hash:new U,map:new(de||k),string:new U}}function pa(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t}function ma(e){return Me(this,e).get(e)}function ga(e){return Me(this,e).has(e)}function ha(e,t){var n=Me(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}q.prototype.clear=da;q.prototype.delete=pa;q.prototype.get=ma;q.prototype.has=ga;q.prototype.set=ha;function Re(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new q;++t<n;)this.add(e[t])}function ya(e){return this.__data__.set(e,Nt),this}function xa(e){return this.__data__.has(e)}Re.prototype.add=Re.prototype.push=ya;Re.prototype.has=xa;function G(e){var t=this.__data__=new k(e);this.size=t.size}function ba(){this.__data__=new k,this.size=0}function wa(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Sa(e){return this.__data__.get(e)}function va(e){return this.__data__.has(e)}function Ea(e,t){var n=this.__data__;if(n instanceof k){var r=n.__data__;if(!de||r.length<gs-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new q(r)}return n.set(e,t),this.size=n.size,this}G.prototype.clear=ba;G.prototype.delete=wa;G.prototype.get=Sa;G.prototype.has=va;G.prototype.set=Ea;function Ta(e,t){var n=Fe(e),r=!n&&Ma(e),o=!n&&!r&&At(e),i=!n&&!r&&!o&&po(e),s=n||r||o||i,u=s?Gs(e.length,String):[],c=u.length;for(var a in e)(t||C.call(e,a))&&!(s&&(a=="length"||o&&(a=="offset"||a=="parent")||i&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||Ra(a,c)))&&u.push(a);return u}function Ge(e,t){for(var n=e.length;n--;)if(co(e[n][0],t))return n;return-1}function Pa(e,t,n){var r=t(e);return Fe(e)?r:$s(r,n(e))}function ge(e){return e==null?e===void 0?Ss:xs:D&&D in Object(e)?Na(e):Ga(e)}function Ur(e){return me(e)&&ge(e)==Oe}function so(e,t,n,r,o){return e===t?!0:e==null||t==null||!me(e)&&!me(t)?e!==e&&t!==t:_a(e,t,n,r,so,o)}function _a(e,t,n,r,o,i){var s=Fe(e),u=Fe(t),c=s?Pt:B(e),a=u?Pt:B(t);c=c==Oe?ee:c,a=a==Oe?ee:a;var f=c==ee,p=a==ee,l=c==a;if(l&&At(e)){if(!At(t))return!1;s=!0,f=!1}if(l&&!f)return i||(i=new G),s||po(e)?ao(e,t,n,r,o,i):Ca(e,t,c,n,r,o,i);if(!(n&$e)){var m=f&&C.call(e,"__wrapped__"),d=p&&C.call(t,"__wrapped__");if(m||d){var h=m?e.value():e,g=d?t.value():t;return i||(i=new G),o(h,g,n,r,i)}}return l?(i||(i=new G),Aa(e,t,n,r,o,i)):!1}function Ia(e){if(!lo(e)||$a(e))return!1;var t=uo(e)?Ks:Ns;return t.test(W(e))}function ja(e){return me(e)&&fo(e.length)&&!!w[ge(e)]}function Oa(e){if(!Ba(e))return Ys(e);var t=[];for(var n in Object(e))C.call(e,n)&&n!="constructor"&&t.push(n);return t}function ao(e,t,n,r,o,i){var s=n&$e,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var a=i.get(e);if(a&&i.get(t))return a==t;var f=-1,p=!0,l=n&Wr?new Re:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var m=e[f],d=t[f];if(r)var h=s?r(d,m,f,t,e,i):r(m,d,f,e,t,i);if(h!==void 0){if(h)continue;p=!1;break}if(l){if(!Bs(t,function(g,x){if(!Ls(l,x)&&(m===g||o(m,g,n,r,i)))return l.push(x)})){p=!1;break}}else if(!(m===d||o(m,d,n,r,i))){p=!1;break}}return i.delete(e),i.delete(t),p}function Ca(e,t,n,r,o,i,s){switch(n){case Ne:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Qr:return!(e.byteLength!=t.byteLength||!i(new Mr(e),new Mr(t)));case Hr:case Kr:case Yr:return co(+e,+t);case Xr:return e.name==t.name&&e.message==t.message;case Jr:case Zr:return e==t+"";case Ce:var u=Us;case Ae:var c=r&$e;if(u||(u=Ws),e.size!=t.size&&!c)return!1;var a=s.get(e);if(a)return a==t;r|=Wr,s.set(e,t);var f=ao(u(e),u(t),r,o,i,s);return s.delete(e),f;case ws:if(Tt)return Tt.call(e)==Tt.call(t)}return!1}function Aa(e,t,n,r,o,i){var s=n&$e,u=qr(e),c=u.length,a=qr(t),f=a.length;if(c!=f&&!s)return!1;for(var p=c;p--;){var l=u[p];if(!(s?l in t:C.call(t,l)))return!1}var m=i.get(e);if(m&&i.get(t))return m==t;var d=!0;i.set(e,t),i.set(t,e);for(var h=s;++p<c;){l=u[p];var g=e[l],x=t[l];if(r)var b=s?r(x,g,l,t,e,i):r(g,x,l,e,t,i);if(!(b===void 0?g===x||o(g,x,n,r,i):b)){d=!1;break}h||(h=l=="constructor")}if(d&&!h){var I=e.constructor,P=t.constructor;I!=P&&"constructor"in e&&"constructor"in t&&!(typeof I=="function"&&I instanceof I&&typeof P=="function"&&P instanceof P)&&(d=!1)}return i.delete(e),i.delete(t),d}function qr(e){return Pa(e,Ua,ka)}function Me(e,t){var n=e.__data__;return Fa(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ne(e,t){var n=Ds(e,t);return Ia(n)?n:void 0}function Na(e){var t=C.call(e,D),n=e[D];try{e[D]=void 0;var r=!0}catch{}var o=oo.call(e);return r&&(t?e[D]=n:delete e[D]),o}var ka=Lr?function(e){return e==null?[]:(e=Object(e),Fs(Lr(e),function(t){return io.call(e,t)}))}:qa,B=ge;(It&&B(new It(new ArrayBuffer(1)))!=Ne||de&&B(new de)!=Ce||jt&&B(jt.resolve())!=kr||Ot&&B(new Ot)!=Ae||Ct&&B(new Ct)!=_t)&&(B=function(e){var t=ge(e),n=t==ee?e.constructor:void 0,r=n?W(n):"";if(r)switch(r){case Js:return Ne;case Zs:return Ce;case Qs:return kr;case ea:return Ae;case ta:return _t}return t});function Ra(e,t){return t=t??zr,!!t&&(typeof e=="number"||ks.test(e))&&e>-1&&e%1==0&&e<t}function Fa(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $a(e){return!!Br&&Br in e}function Ba(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Be;return e===n}function Ga(e){return oo.call(e)}function W(e){if(e!=null){try{return ro.call(e)}catch{}try{return e+""}catch{}}return""}function co(e,t){return e===t||e!==e&&t!==t}var Ma=Ur(function(){return arguments}())?Ur:function(e){return me(e)&&C.call(e,"callee")&&!io.call(e,"callee")},Fe=Array.isArray;function La(e){return e!=null&&fo(e.length)&&!uo(e)}var At=Vs||Wa;function Da(e,t){return so(e,t)}function uo(e){if(!lo(e))return!1;var t=ge(e);return t==Vr||t==ys||t==hs||t==bs}function fo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zr}function lo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function me(e){return e!=null&&typeof e=="object"}var po=$r?Ms($r):ja;function Ua(e){return La(e)?Ta(e):Oa(e)}function qa(){return[]}function Wa(){return!1}te.exports=Da});var wo=v((wu,kt)=>{"use strict";var bo=require("module"),za=require("path");kt.exports=function(t,n,r){if(typeof n=="object"&&(r=n,n=void 0),r=r||{},n=n||"",r.appendPaths=r.appendPaths||[],r.prependPaths=r.prependPaths||[],typeof t!="string")throw new Error("code must be a string, not "+typeof t);var o=bo._nodeModulePaths(za.dirname(n)),i=kt.parent,s=new bo(n,i);s.filename=n,s.paths=[].concat(r.prependPaths).concat(o).concat(r.appendPaths),s._compile(t,n);var u=s.exports;return i&&i.children&&i.children.splice(i.children.indexOf(s),1),u}});var Bt=require("commander"),Mo=y(require("path"));var Dt=require("commander"),Ut=y(require("fast-glob")),De=y(require("fs-extra")),qt=y(require("path")),A=y(require("@techor/log"));var Lt=y(require("fs-extra"));function z(e="./package.json"){return Lt.default.readJSONSync(e,{throws:!1})||{}}var Ho=z(),Ko={workspaces:Ho.workspaces};Dt.program.command("version <version>").description("Bump to specific version for workspace's packages").option("-p, --prefix <symbol>","Version prefix `^`, `~`, `>`, `>=`, `<`, `<=` ","^").option("-w, --workspaces <paths>","Specific your workspaces",Ko.workspaces).option("-ls, --list","List current bumpable dependency tree in workspaces",!1).action((e,{prefix:t,list:n,workspaces:r})=>{let o=t+e,i={},s={},u=r.map(f=>qt.default.join(f,"*package.json")),c=(f,p)=>{let l=!1;for(let m in f)m in s&&f[m]===""&&(f[m]=o,l=!0);return l};for(let f of Ut.default.sync(u)){let p=De.default.readJSONSync(f);p.private||(i[f]=p,s[p.name]=p,p.version=e)}for(let f in i){let p=i[f],{dependencies:l,peerDependencies:m}=i[f];l&&c(l,"dependencies"),m&&c(m,"peerDependencies"),n||De.default.writeJSONSync(f,p)}let a={};for(let f in s){let{dependencies:p,peerDependencies:l}=s[f],m=a[(0,A.paint)("**"+f+"**")]={},d=(h,g)=>{if(h){m[g]={};for(let x in h)if(x in s){let b=h[x];m[g][(0,A.paint)("**"+x+"**")]=b===o?null:o}}};d(p,"dependencies"),d(l,"peerDependencies"),Object.keys(a[(0,A.paint)("**"+f+"**")]).length||(a[(0,A.paint)("**"+f+"**")]=null)}A.default`📦`,A.default.tree(a),A.default.success`bump version to +${o}+ for ${Object.keys(s).length} packages in all workspace`});var Ro=require("commander"),Fo=y(require("fast-glob"));var xr=require("node:buffer"),br=y(require("node:path"),1),ft=y(require("node:child_process"),1),se=y(require("node:process"),1),wr=y(Nn(),1);function Je(e){let t=typeof e=="string"?`
3
3
  `:`
4
- `.charCodeAt(),n=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}var ne=x(require("node:process"),1),K=x(require("node:path"),1),On=x(require("node:url"),1);function ye(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}function no(e={}){let{cwd:t=ne.default.cwd(),path:n=ne.default.env[ye()],execPath:r=ne.default.execPath}=e,i,o=t instanceof URL?On.default.fileURLToPath(t):t,s=K.default.resolve(o),a=[];for(;i!==s;)a.push(K.default.join(s,"node_modules/.bin")),i=s,s=K.default.resolve(s,"..");return a.push(K.default.resolve(o,r,"..")),[...a,n].join(K.default.delimiter)}function Cn({env:e=ne.default.env,...t}={}){e={...e};let n=ye({env:e});return t.path=e[n],e[n]=no(t),e}var ro=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let i=Object.getOwnPropertyDescriptor(e,n),o=Object.getOwnPropertyDescriptor(t,n);!io(i,o)&&r||Object.defineProperty(e,n,o)},io=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},oo=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},so=(e,t)=>`/* Wrapped ${e}*/
5
- ${t}`,ao=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),co=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),uo=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,i=so.bind(null,r,t.toString());Object.defineProperty(i,"name",co),Object.defineProperty(e,"toString",{...ao,value:i})};function Ve(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let i of Reflect.ownKeys(t))ro(e,t,i,n);return oo(e,t),uo(e,t,r),e}var xe=new WeakMap,An=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,i=e.displayName||e.name||"<anonymous>",o=function(...s){if(xe.set(o,++r),r===1)n=e.apply(this,s),e=null;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return n};return Ve(o,e),xe.set(o,r),o};An.callCount=e=>{if(!xe.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return xe.get(e)};var Nn=An;var Fn=require("os");var kn=function(){let e=Ye-Gn+1;return Array.from({length:e},fo)},fo=function(e,t){return{name:`SIGRT${t+1}`,number:Gn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},Gn=34,Ye=64;var $n=require("os");var Rn=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var Je=function(){let e=kn();return[...Rn,...e].map(lo)},lo=function({name:e,number:t,description:n,action:r,forced:i=!1,standard:o}){let{signals:{[e]:s}}=$n.constants,a=s!==void 0;return{name:e,number:a?s:t,description:n,supported:a,action:r,forced:i,standard:o}};var po=function(){return Je().reduce(mo,{})},mo=function(e,{name:t,number:n,description:r,supported:i,action:o,forced:s,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:i,action:o,forced:s,standard:a}}},Bn=po(),go=function(){let e=Je(),t=64+1,n=Array.from({length:t},(r,i)=>ho(i,e));return Object.assign({},...n)},ho=function(e,t){let n=yo(e,t);if(n===void 0)return{};let{name:r,description:i,supported:o,action:s,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:o,action:s,forced:a,standard:c}}},yo=function(e,t){let n=t.find(({name:r})=>Fn.constants.signals[r]===e);return n!==void 0?n:t.find(r=>r.number===e)},uc=go();var xo=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:o,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":n!==void 0?`failed with ${n}`:r!==void 0?`was killed with ${r} (${i})`:o!==void 0?`failed with exit code ${o}`:"failed",Ze=({stdout:e,stderr:t,all:n,error:r,signal:i,exitCode:o,command:s,escapedCommand:a,timedOut:c,isCanceled:u,killed:f,parsed:{options:{timeout:l}}})=>{o=o===null?void 0:o,i=i===null?void 0:i;let p=i===void 0?void 0:Bn[i].description,m=r&&r.code,y=`Command ${xo({timedOut:c,timeout:l,errorCode:m,signal:i,signalDescription:p,exitCode:o,isCanceled:u})}: ${s}`,g=Object.prototype.toString.call(r)==="[object Error]",h=g?`${y}
6
- ${r.message}`:y,b=[h,t,e].filter(Boolean).join(`
7
- `);return g?(r.originalMessage=r.message,r.message=b):r=new Error(b),r.shortMessage=h,r.command=s,r.escapedCommand=a,r.exitCode=o,r.signal=i,r.signalDescription=p,r.stdout=e,r.stderr=t,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!c,r.isCanceled=u,r.killed=f&&!c,r};var be=["stdin","stdout","stderr"],bo=e=>be.some(t=>e[t]!==void 0),Mn=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return be.map(r=>e[r]);if(bo(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${be.map(r=>`\`${r}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let n=Math.max(t.length,be.length);return Array.from({length:n},(r,i)=>t[i])};var Hn=x(require("node:os"),1),Kn=x(zn(),1),So=1e3*5,Xn=(e,t="SIGTERM",n={})=>{let r=e(t);return wo(e,t,n,r),r},wo=(e,t,n,r)=>{if(!vo(t,n,r))return;let i=To(n),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},vo=(e,{forceKillAfterTimeout:t},n)=>Eo(e)&&t!==!1&&n,Eo=e=>e===Hn.default.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",To=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return So;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Vn=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Po=(e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},Yn=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===void 0)return r;let i,o=new Promise((a,c)=>{i=setTimeout(()=>{Po(e,n,c)},t)}),s=r.finally(()=>{clearTimeout(i)});return Promise.race([o,s])},Jn=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Zn=async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let i=(0,Kn.default)(()=>{e.kill()});return r.finally(()=>{i()})};function Qn(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}var it=x(nr(),1),or=x(ir(),1),sr=(e,t)=>{t===void 0||e.stdin===void 0||(Qn(t)?t.pipe(e.stdin):e.stdin.end(t))},ar=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=(0,or.default)();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},nt=async(e,t)=>{if(e){e.destroy();try{return await t}catch(n){return n.bufferedData}}},rt=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!(!e||!n))return t?(0,it.default)(e,{encoding:t,maxBuffer:r}):it.default.buffer(e,{maxBuffer:r})},cr=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:o},s)=>{let a=rt(e,{encoding:r,buffer:i,maxBuffer:o}),c=rt(t,{encoding:r,buffer:i,maxBuffer:o}),u=rt(n,{encoding:r,buffer:i,maxBuffer:o*2});try{return await Promise.all([s,a,c,u])}catch(f){return Promise.all([{error:f,signal:f.signal,timedOut:f.timedOut},nt(e,a),nt(t,c),nt(n,u)])}};var ko=(async()=>{})().constructor.prototype,Go=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(ko,e)]),ot=(e,t)=>{for(let[n,r]of Go){let i=typeof t=="function"?(...o)=>Reflect.apply(r.value,t(),o):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:i})}return e},ur=e=>new Promise((t,n)=>{e.on("exit",(r,i)=>{t({exitCode:r,signal:i})}),e.on("error",r=>{n(r)}),e.stdin&&e.stdin.on("error",r=>{n(r)})});var fr=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Ro=/^[\w.-]+$/,$o=/"/g,Fo=e=>typeof e!="string"||Ro.test(e)?e:`"${e.replace($o,'\\"')}"`,lr=(e,t)=>fr(e,t).join(" "),dr=(e,t)=>fr(e,t).map(n=>Fo(n)).join(" "),Bo=/ +/g,pr=e=>{let t=[];for(let n of e.trim().split(Bo)){let r=t[t.length-1];r&&r.endsWith("\\")?t[t.length-1]=`${r.slice(0,-1)} ${n}`:t.push(n)}return t};var Mo=1e3*1e3*100,Lo=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{let o=t?{...oe.default.env,...e}:e;return n?Cn({env:o,cwd:r,execPath:i}):o},Do=(e,t,n={})=>{let r=hr.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:Mo,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||oe.default.cwd(),execPath:oe.default.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=Lo(n),n.stdio=Mn(n),oe.default.platform==="win32"&&gr.default.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},st=(e,t,n)=>typeof t!="string"&&!mr.Buffer.isBuffer(t)?n===void 0?void 0:"":e.stripFinalNewline?Xe(t):t;function Uo(e,t,n){let r=Do(e,t,n),i=lr(e,t),o=dr(e,t);Jn(r.options);let s;try{s=at.default.spawn(r.file,r.args,r.options)}catch(m){let d=new at.default.ChildProcess,y=Promise.reject(Ze({error:m,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return ot(d,y)}let a=ur(s),c=Yn(s,r.options,a),u=Zn(s,r.options,c),f={isCanceled:!1};s.kill=Xn.bind(null,s.kill.bind(s)),s.cancel=Vn.bind(null,s,f);let p=Nn(async()=>{let[{error:m,exitCode:d,signal:y,timedOut:g},h,b,I]=await cr(s,r.options,u),P=st(r.options,h),j=st(r.options,b),ge=st(r.options,I);if(m||d!==0||y!==null){let Gt=Ze({error:m,exitCode:d,signal:y,stdout:P,stderr:j,all:ge,command:i,escapedCommand:o,parsed:r,timedOut:g,isCanceled:f.isCanceled||(r.options.signal?r.options.signal.aborted:!1),killed:s.killed});if(!r.options.reject)return Gt;throw Gt}return{command:i,escapedCommand:o,exitCode:0,stdout:P,stderr:j,all:ge,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return sr(s,r.options.input),s.all=ar(s,r.options),ot(s,p)}function yr(e,t){let[n,...r]=pr(e);return Uo(n,r,t)}var xi=require("esbuild");function ct(e,t=1,n={}){let{indent:r=" ",includeEmptyLines:i=!1}=n;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof r!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(t===0)return e;let o=i?/^/gm:/^(?!\s*$)/gm;return e.replace(o,r.repeat(t))}var ft=x(require("os"),1);function ut(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var xr=/\s+at.*[(\s](.*)\)?/,qo=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,Wo=typeof ft.default.homedir>"u"?"":ft.default.homedir().replace(/\\/g,"/");function lt(e,{pretty:t=!1,basePath:n}={}){let r=n&&new RegExp(`(at | \\()${ut(n.replace(/\\/g,"/"))}`,"g");if(typeof e=="string")return e.replace(/\\/g,"/").split(`
8
- `).filter(i=>{let o=i.match(xr);if(o===null||!o[1])return!0;let s=o[1];return s.includes(".app/Contents/Resources/electron.asar")||s.includes(".app/Contents/Resources/default_app.asar")||s.includes("node_modules/electron/dist/resources/electron.asar")||s.includes("node_modules/electron/dist/resources/default_app.asar")?!1:!qo.test(s)}).filter(i=>i.trim()!=="").map(i=>(r&&(i=i.replace(r,"$1")),t&&(i=i.replace(xr,(o,s)=>o.replace(s,s.replace(Wo,"~")))),i)).join(`
9
- `)}var zo=e=>e.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,""),se=class extends Error{#e;name="AggregateError";constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);t=t.map(r=>r instanceof Error?r:r!==null&&typeof r=="object"?Object.assign(new Error(r.message),r):new Error(r));let n=t.map(r=>typeof r.stack=="string"&&r.stack.length>0?zo(lt(r.stack)):String(r)).join(`
4
+ `.charCodeAt(),n=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}var re=y(require("node:process"),1),X=y(require("node:path"),1),kn=y(require("node:url"),1);function be(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}function wi(e={}){let{cwd:t=re.default.cwd(),path:n=re.default.env[be()],execPath:r=re.default.execPath}=e,o,i=t instanceof URL?kn.default.fileURLToPath(t):t,s=X.default.resolve(i),u=[];for(;o!==s;)u.push(X.default.join(s,"node_modules/.bin")),o=s,s=X.default.resolve(s,"..");return u.push(X.default.resolve(i,r,"..")),[...u,n].join(X.default.delimiter)}function Rn({env:e=re.default.env,...t}={}){e={...e};let n=be({env:e});return t.path=e[n],e[n]=wi(t),e}var Si=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!vi(o,i)&&r||Object.defineProperty(e,n,i)},vi=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Ei=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},Ti=(e,t)=>`/* Wrapped ${e}*/
5
+ ${t}`,Pi=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),_i=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Ii=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=Ti.bind(null,r,t.toString());Object.defineProperty(o,"name",_i),Object.defineProperty(e,"toString",{...Pi,value:o})};function Ze(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let o of Reflect.ownKeys(t))Si(e,t,o,n);return Ei(e,t),Ii(e,t,r),e}var we=new WeakMap,Fn=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,o=e.displayName||e.name||"<anonymous>",i=function(...s){if(we.set(i,++r),r===1)n=e.apply(this,s),e=null;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return Ze(i,e),we.set(i,r),i};Fn.callCount=e=>{if(!we.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return we.get(e)};var $n=Fn;var Dn=require("os");var Bn=function(){let e=Qe-Gn+1;return Array.from({length:e},ji)},ji=function(e,t){return{name:`SIGRT${t+1}`,number:Gn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},Gn=34,Qe=64;var Ln=require("os");var Mn=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var et=function(){let e=Bn();return[...Mn,...e].map(Oi)},Oi=function({name:e,number:t,description:n,action:r,forced:o=!1,standard:i}){let{signals:{[e]:s}}=Ln.constants,u=s!==void 0;return{name:e,number:u?s:t,description:n,supported:u,action:r,forced:o,standard:i}};var Ci=function(){return et().reduce(Ai,{})},Ai=function(e,{name:t,number:n,description:r,supported:o,action:i,forced:s,standard:u}){return{...e,[t]:{name:t,number:n,description:r,supported:o,action:i,forced:s,standard:u}}},Un=Ci(),Ni=function(){let e=et(),t=64+1,n=Array.from({length:t},(r,o)=>ki(o,e));return Object.assign({},...n)},ki=function(e,t){let n=Ri(e,t);if(n===void 0)return{};let{name:r,description:o,supported:i,action:s,forced:u,standard:c}=n;return{[e]:{name:r,number:e,description:o,supported:i,action:s,forced:u,standard:c}}},Ri=function(e,t){let n=t.find(({name:r})=>Dn.constants.signals[r]===e);return n!==void 0?n:t.find(r=>r.number===e)},Cc=Ni();var Fi=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":n!==void 0?`failed with ${n}`:r!==void 0?`was killed with ${r} (${o})`:i!==void 0?`failed with exit code ${i}`:"failed",tt=({stdout:e,stderr:t,all:n,error:r,signal:o,exitCode:i,command:s,escapedCommand:u,timedOut:c,isCanceled:a,killed:f,parsed:{options:{timeout:p}}})=>{i=i===null?void 0:i,o=o===null?void 0:o;let l=o===void 0?void 0:Un[o].description,m=r&&r.code,h=`Command ${Fi({timedOut:c,timeout:p,errorCode:m,signal:o,signalDescription:l,exitCode:i,isCanceled:a})}: ${s}`,g=Object.prototype.toString.call(r)==="[object Error]",x=g?`${h}
6
+ ${r.message}`:h,b=[x,t,e].filter(Boolean).join(`
7
+ `);return g?(r.originalMessage=r.message,r.message=b):r=new Error(b),r.shortMessage=x,r.command=s,r.escapedCommand=u,r.exitCode=i,r.signal=o,r.signalDescription=l,r.stdout=e,r.stderr=t,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!c,r.isCanceled=a,r.killed=f&&!c,r};var Se=["stdin","stdout","stderr"],$i=e=>Se.some(t=>e[t]!==void 0),qn=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return Se.map(r=>e[r]);if($i(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Se.map(r=>`\`${r}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let n=Math.max(t.length,Se.length);return Array.from({length:n},(r,o)=>t[o])};var Yn=y(require("node:os"),1),Jn=y(Vn(),1),Bi=1e3*5,Zn=(e,t="SIGTERM",n={})=>{let r=e(t);return Gi(e,t,n,r),r},Gi=(e,t,n,r)=>{if(!Mi(t,n,r))return;let o=Di(n),i=setTimeout(()=>{e("SIGKILL")},o);i.unref&&i.unref()},Mi=(e,{forceKillAfterTimeout:t},n)=>Li(e)&&t!==!1&&n,Li=e=>e===Yn.default.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Di=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return Bi;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Qn=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Ui=(e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},er=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===void 0)return r;let o,i=new Promise((u,c)=>{o=setTimeout(()=>{Ui(e,n,c)},t)}),s=r.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},tr=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},nr=async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let o=(0,Jn.default)(()=>{e.kill()});return r.finally(()=>{o()})};function rr(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}var at=y(sr(),1),ur=y(cr(),1),fr=(e,t)=>{t===void 0||e.stdin===void 0||(rr(t)?t.pipe(e.stdin):e.stdin.end(t))},lr=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=(0,ur.default)();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},it=async(e,t)=>{if(e){e.destroy();try{return await t}catch(n){return n.bufferedData}}},st=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!(!e||!n))return t?(0,at.default)(e,{encoding:t,maxBuffer:r}):at.default.buffer(e,{maxBuffer:r})},dr=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:o,maxBuffer:i},s)=>{let u=st(e,{encoding:r,buffer:o,maxBuffer:i}),c=st(t,{encoding:r,buffer:o,maxBuffer:i}),a=st(n,{encoding:r,buffer:o,maxBuffer:i*2});try{return await Promise.all([s,u,c,a])}catch(f){return Promise.all([{error:f,signal:f.signal,timedOut:f.timedOut},it(e,u),it(t,c),it(n,a)])}};var Yi=(async()=>{})().constructor.prototype,Ji=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Yi,e)]),ct=(e,t)=>{for(let[n,r]of Ji){let o=typeof t=="function"?(...i)=>Reflect.apply(r.value,t(),i):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}return e},pr=e=>new Promise((t,n)=>{e.on("exit",(r,o)=>{t({exitCode:r,signal:o})}),e.on("error",r=>{n(r)}),e.stdin&&e.stdin.on("error",r=>{n(r)})});var mr=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Zi=/^[\w.-]+$/,Qi=/"/g,es=e=>typeof e!="string"||Zi.test(e)?e:`"${e.replace(Qi,'\\"')}"`,gr=(e,t)=>mr(e,t).join(" "),hr=(e,t)=>mr(e,t).map(n=>es(n)).join(" "),ts=/ +/g,yr=e=>{let t=[];for(let n of e.trim().split(ts)){let r=t[t.length-1];r&&r.endsWith("\\")?t[t.length-1]=`${r.slice(0,-1)} ${n}`:t.push(n)}return t};var ns=1e3*1e3*100,rs=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{let i=t?{...se.default.env,...e}:e;return n?Rn({env:i,cwd:r,execPath:o}):i},os=(e,t,n={})=>{let r=wr.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:ns,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||se.default.cwd(),execPath:se.default.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=rs(n),n.stdio=qn(n),se.default.platform==="win32"&&br.default.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},ut=(e,t,n)=>typeof t!="string"&&!xr.Buffer.isBuffer(t)?n===void 0?void 0:"":e.stripFinalNewline?Je(t):t;function is(e,t,n){let r=os(e,t,n),o=gr(e,t),i=hr(e,t);tr(r.options);let s;try{s=ft.default.spawn(r.file,r.args,r.options)}catch(m){let d=new ft.default.ChildProcess,h=Promise.reject(tt({error:m,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return ct(d,h)}let u=pr(s),c=er(s,r.options,u),a=nr(s,r.options,c),f={isCanceled:!1};s.kill=Zn.bind(null,s.kill.bind(s)),s.cancel=Qn.bind(null,s,f);let l=$n(async()=>{let[{error:m,exitCode:d,signal:h,timedOut:g},x,b,I]=await dr(s,r.options,a),P=ut(r.options,x),j=ut(r.options,b),ye=ut(r.options,I);if(m||d!==0||h!==null){let Gt=tt({error:m,exitCode:d,signal:h,stdout:P,stderr:j,all:ye,command:o,escapedCommand:i,parsed:r,timedOut:g,isCanceled:f.isCanceled||(r.options.signal?r.options.signal.aborted:!1),killed:s.killed});if(!r.options.reject)return Gt;throw Gt}return{command:o,escapedCommand:i,exitCode:0,stdout:P,stderr:j,all:ye,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return fr(s,r.options.input),s.all=lr(s,r.options),ct(s,l)}function Sr(e,t){let[n,...r]=yr(e);return is(n,r,t)}var $o=require("esbuild");function lt(e,t=1,n={}){let{indent:r=" ",includeEmptyLines:o=!1}=n;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof r!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(t===0)return e;let i=o?/^/gm:/^(?!\s*$)/gm;return e.replace(i,r.repeat(t))}var pt=y(require("os"),1);function dt(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var vr=/\s+at.*[(\s](.*)\)?/,ss=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,as=typeof pt.default.homedir>"u"?"":pt.default.homedir().replace(/\\/g,"/");function mt(e,{pretty:t=!1,basePath:n}={}){let r=n&&new RegExp(`(at | \\()${dt(n.replace(/\\/g,"/"))}`,"g");if(typeof e=="string")return e.replace(/\\/g,"/").split(`
8
+ `).filter(o=>{let i=o.match(vr);if(i===null||!i[1])return!0;let s=i[1];return s.includes(".app/Contents/Resources/electron.asar")||s.includes(".app/Contents/Resources/default_app.asar")||s.includes("node_modules/electron/dist/resources/electron.asar")||s.includes("node_modules/electron/dist/resources/default_app.asar")?!1:!ss.test(s)}).filter(o=>o.trim()!=="").map(o=>(r&&(o=o.replace(r,"$1")),t&&(o=o.replace(vr,(i,s)=>i.replace(s,s.replace(as,"~")))),o)).join(`
9
+ `)}var cs=e=>e.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,""),ae=class extends Error{#e;name="AggregateError";constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);t=t.map(r=>r instanceof Error?r:r!==null&&typeof r=="object"?Object.assign(new Error(r.message),r):new Error(r));let n=t.map(r=>typeof r.stack=="string"&&r.stack.length>0?cs(mt(r.stack)):String(r)).join(`
10
10
  `);n=`
11
- `+ct(n,4),super(n),this.#e=t}get errors(){return this.#e.slice()}};var dt=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}},br=e=>globalThis.DOMException===void 0?new dt(e):new DOMException(e),Sr=e=>{let t=e.reason===void 0?br("This operation was aborted."):e.reason;return t instanceof Error?t:br(t)};async function pt(e,t,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:i}={}){return new Promise((o,s)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(n)||n===Number.POSITIVE_INFINITY)&&n>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let a=[],c=[],u=new Map,f=!1,l=!1,p=!1,m=0,d=0,y=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=b=>{f=!0,l=!0,s(b)};i&&(i.aborted&&g(Sr(i)),i.addEventListener("abort",()=>{g(Sr(i))}));let h=async()=>{if(l)return;let b=await y.next(),I=d;if(d++,b.done){if(p=!0,m===0&&!l){if(!r&&c.length>0){g(new se(c));return}if(l=!0,u.size===0){o(a);return}let P=[];for(let[j,ge]of a.entries())u.get(j)!==wr&&P.push(ge);o(P)}return}m++,(async()=>{try{let P=await b.value;if(l)return;let j=await t(P,I);j===wr&&u.set(I,j),a[I]=j,m--,await h()}catch(P){if(r)g(P);else{c.push(P),m--;try{await h()}catch(j){g(j)}}}})()};(async()=>{for(let b=0;b<n;b++){try{await h()}catch(I){g(I);break}if(p||f)break}})()})}var wr=Symbol("skip");async function mt(e,t){return pt(e,n=>n(),t)}var O=x(require("@techor/log")),R=x(bt());var me=x(require("to-line"));var Xo=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Vo=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Yo=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Jo=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],_r=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function _e(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,...t};let n=t.bits?t.binary?Jo:Yo:t.binary?Vo:Xo;if(t.signed&&e===0)return` 0 ${n[0]}`;let r=e<0,i=r?"-":t.signed?"+":"";r&&(e=-e);let o;if(t.minimumFractionDigits!==void 0&&(o={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(o={maximumFractionDigits:t.maximumFractionDigits,...o}),e<1){let u=_r(e,t.locale,o);return i+u+" "+n[0]}let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,o||(e=e.toPrecision(3));let a=_r(Number(e),t.locale,o),c=n[s];return i+a+" "+c}var bi=x(jr()),At=x(require("fs")),Si=x(ui());var fi=["sourcemap","legalComments","sourceRoot","sourcesContent","format","globalName","target","supported","platform","mangleProps","reserveProps","mangleQuoted","mangleCache","drop","minify","minifyWhitespace","minifyIdentifiers","minifySyntax","charset","treeShaking","ignoreAnnotations","jsx","jsxFactory","jsxFragment","jsxImportSource","jsxDev","jsxSideEffects","define","pure","keepNames","color","logLevel","logLimit","logOverride","bundle","splitting","preserveSymlinks","outfile","metafile","outdir","outbase","external","packages","alias","loader","resolveExtensions","mainFields","conditions","write","allowOverwrite","tsconfig","outExtension","publicPath","entryNames","chunkNames","assetNames","inject","banner","footer","incremental","entryPoints","stdin","plugins","absWorkingDir","nodePaths","watch"];var li=x(require("fs")),di=x(require("fast-glob")),G=x(bt());function pi(e=".js",t="src"){let n=G.default.resolve(t);return{name:"fill-module-ext",setup(r){let i={};i.promise=new Promise(o=>{i.resolve=o}),r.onStart(()=>{i.resolve(!0)}),r.onLoad({filter:/\.(?:ts|tsx|js|jsx|mjs|mts)$/},async o=>{if(await i.promise===!0){let s=await li.default.promises.readFile(o.path,{encoding:"utf8"}),a=G.default.dirname(o.path);return{contents:s.replace(/((?:(?:import|export)(?:.*from | ))|(?:(?:import))\()'((\.(?:\.)?\/.*)|\.)'/gmi,(...c)=>{let u=c[2],f=G.default.parse(u);if(f.ext)return c[1];let l=G.default.resolve(a,u),p=di.default.sync([l+".{ts,js,mjs,jsx,tsx,mjs,mts}",G.default.join(l,"index.{ts,js,mjs,jsx,tsx,mjs,mts}")])[0];if(!p)return c[0];let m=G.default.relative(n,G.default.changeExt(p,e)),d=G.default.parse(m);return u==="."||u==="./"?m="./index"+e:d.name===f.name?m=u+e:m=u+"/index"+e,`${c[1]}'${m}'`}),loader:"tsx"}}})}}}var ja={js:"cjs",cjs:"cjs",mjs:"esm",css:"css"},v=W(),{dependencies:mi,peerDependencies:gi}=v,Nt=[];mi&&Nt.push(...Object.keys(mi));gi&&Nt.push(...Object.keys(gi));hi.program.command("pack [entryPaths...]").option("-f, --format [formats...]","The output format for the generated JavaScript files `iife`, `cjs`, `esm`",["cjs","esm"]).option("-t, --shakable-format [formats...]","Tree-shakable module's formats",["cjs","esm"]).option("--shakable","Enable outputting tree-shakable modules",!1).option("-w, --watch","Rebuild whenever a file changes",!1).option("-s, --sourcemap","Emit a source map",process.env.NODE_ENV==="production").option("-p, --platform <node,browser,neutral>","Platform target","browser").option("-t, --type","Emit typescript declarations",v.types).option("-o, --outdir <dir>","The output directory for the build operation","dist").option("-o, --serve","Serve mode starts a web server that serves your code to your browser on your device",!1).option("-e, --external <packages...>","External packages to exclude from the build",Nt).option("-ee, --extra-external <packages...>","Extra external packages to exclude from the build",[]).option("-re, --resolve-extensions [extensions...]","The resolution algorithm used by node supports implicit file extensions",[".tsx",".ts",".jsx",".js",".css",".json"]).option("-kn, --keep-names","Keep JavaScript function/class names",!1).option("--cjs-ext","Specify CommonJS default file extension",".js").option("--iife-ext","Specify CommonJS default file extension",".js").option("--esm-ext","Specify CommonJS default file extension",".mjs").option("--srcdir <dir>","The source directory","src").option("--target","This sets the target environment for the generated JavaScript and/or CSS code.","esnext").option("--mangle-props","Pass a regular expression to esbuild to tell esbuild to automatically rename all properties that match this regular expression","^_").option("--no-bundle","OFF: Inline any imported dependencies into the file itself",!0).option("--no-minify","OFF: Minify the generated code").option("--no-clean","OFF: Clean up the previous output directory before the build starts").action(async function(e,t,n){t.clean&&At.default.existsSync(t.outdir)&&(At.default.rmSync(t.outdir,{force:!0,recursive:!0}),console.log(""),O.default.d`Cleaned up the **${t.outdir}** output directory`);let r=[],i=(a,c)=>{let u=R.default.relative(t.outdir,a),f=R.default.join(t.srcdir,u);return R.default.changeExt(f,c)},o=async(a,c)=>{let u=c.format==="css",f=c.ext||c.outFile&&R.default.extname(c.outFile)||void 0,l=[...t.external,...t.extraExternal],p=c.outdir||t.outdir;t.bundle,c.softBundle&&l.push(".*");let m=[];c.softBundle&&c.format==="esm"&&m.push(pi(t.esmExt));let d={...t,outExtension:u?{".css":".css"}:{".js":f||{cjs:t.cjsExt,esm:t.esmExt,iife:t.iifeExt}[c.format]},external:l,logLevel:"info",outdir:p,outbase:t.srcdir,platform:c.platform||t.platform,metafile:!0,format:u?void 0:c.format,keepNames:t.keepNames,resolveExtensions:t.resolveExtensions,mangleProps:t.mangleProps?new RegExp(t.mangleProps):void 0,target:t.target,sourcemap:t.sourcemap,plugins:m};delete d.watch,delete d.serve;for(let g in d)fi.includes(g)||delete d[g];d.entryPoints=yi.default.sync([...new Set(a)].map(g=>(0,bi.default)(g))).filter(g=>!r.find(h=>h.options.entryPoints.includes(g)&&h.options.format===d.format&&(0,Si.default)(h.options.outExtension,d.outExtension)&&h.options.outdir===d.outdir));let y={options:d,run:async()=>{let g=await(0,xi.context)(d),{metafile:h}=await g.rebuild();if(h){console.log(""),y.metafile=h;for(let b in h.outputs){let I=h.outputs[b],P=_e(I.bytes).replace(/ /g,""),j=h.outputs[b].format=c.format;O.default`${O.chalk.dim("\u2502")} $t [${j}] **${b}** ${P} (${Object.keys(I.inputs).length} inputs)`}O.default.tree({entries:d.entryPoints,external:d.external,outdir:d.outdir,format:d.format,platform:d.platform,[Object.keys(d).filter(b=>d[b]===!0).map(b=>O.chalk.green("\u2713 ")+b).join(", ")]:null})}t.watch?await g.watch():await g.dispose(),t.serve&&await g.serve()}};d.entryPoints.length&&r.push(y)};if(t.shakable&&t.shakableFormat.length&&t.shakableFormat.forEach(a=>o([R.default.join(t.srcdir,"**/*.{js,ts,jsx,tsx,mjs,mts}")],{format:a,platform:"node",outdir:R.default.join(t.outdir,a),softBundle:!0})),v.exports&&function a(c,u,f){if(typeof c=="string"){let l=R.default.extname(c);o([i(c,".{js,ts,jsx,tsx,mjs,mts}")],{format:f.format||ja[l],outFile:f.outFile||c,platform:f.platform})}else for(let l in c){let p=c[l],m,d;switch(u){case"node":d="node";break;case"browser":d="browser";break;case"require":m="cjs";break;case"import":m="esm";break}if(l.startsWith("."))a(p,l);else switch(l){case"node":a(p,l,{platform:"node",format:m});break;case"browser":a(p,l,{platform:"browser",format:m});break;case"default":a(p,l,{platform:d,format:m});break;case"require":a(p,l,{platform:d,format:"cjs"});break;case"import":a(p,l,{platform:d,format:"esm"});break}}}(v.exports,""),v.style&&o([i(v.main,".css")],{format:"css"}),v.main&&!v.main.endsWith(".css")&&o([i(v.main,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",outFile:v.main}),v.module&&o([i(v.module,".{js,ts,jsx,tsx,mjs,mts}")],{format:"esm",outFile:v.module}),v.browser&&o([i(v.browser,".{js,ts,jsx,tsx,mjs,mts}")],{format:"iife",platform:"browser",outFile:v.browser}),v.bin)if(typeof v.bin=="string")o([i(v.bin,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",platform:"node",outFile:v.bin});else for(let a in v.bin){let c=v.bin[a];o([i(c,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",platform:"node",outFile:c})}e.length&&(e.find(c=>c.includes(".css"))?o(e,{format:"css"}):t.format.map(c=>o(e,{format:c}))),r.length||t.format.map(a=>o([R.default.join(t.srcdir,"index.ts")],{format:a}));let s;t.type&&(s={outFile:"declarations",options:{platform:"type",format:"dts"},run:()=>new Promise(a=>{let c=()=>yr(me.default`
11
+ `+lt(n,4),super(n),this.#e=t}get errors(){return this.#e.slice()}};var gt=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}},Er=e=>globalThis.DOMException===void 0?new gt(e):new DOMException(e),Tr=e=>{let t=e.reason===void 0?Er("This operation was aborted."):e.reason;return t instanceof Error?t:Er(t)};async function ht(e,t,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:o}={}){return new Promise((i,s)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(n)||n===Number.POSITIVE_INFINITY)&&n>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let u=[],c=[],a=new Map,f=!1,p=!1,l=!1,m=0,d=0,h=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=b=>{f=!0,p=!0,s(b)};o&&(o.aborted&&g(Tr(o)),o.addEventListener("abort",()=>{g(Tr(o))}));let x=async()=>{if(p)return;let b=await h.next(),I=d;if(d++,b.done){if(l=!0,m===0&&!p){if(!r&&c.length>0){g(new ae(c));return}if(p=!0,a.size===0){i(u);return}let P=[];for(let[j,ye]of u.entries())a.get(j)!==Pr&&P.push(ye);i(P)}return}m++,(async()=>{try{let P=await b.value;if(p)return;let j=await t(P,I);j===Pr&&a.set(I,j),u[I]=j,m--,await x()}catch(P){if(r)g(P);else{c.push(P),m--;try{await x()}catch(j){g(j)}}}})()};(async()=>{for(let b=0;b<n;b++){try{await x()}catch(I){g(I);break}if(l||f)break}})()})}var Pr=Symbol("skip");async function yt(e,t){return ht(e,n=>n(),t)}var O=y(require("@techor/log")),$=y(fe());var he=y(require("to-line"));var ls=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],ds=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],ps=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],ms=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Cr=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function je(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,...t};let n=t.bits?t.binary?ms:ps:t.binary?ds:ls;if(t.signed&&e===0)return` 0 ${n[0]}`;let r=e<0,o=r?"-":t.signed?"+":"";r&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){let a=Cr(e,t.locale,i);return o+a+" "+n[0]}let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,i||(e=e.toPrecision(3));let u=Cr(Number(e),t.locale,i),c=n[s];return o+u+" "+c}var Bo=y(Nr()),Ft=y(require("fs")),Go=y(mo());var go=["sourcemap","legalComments","sourceRoot","sourcesContent","format","globalName","target","supported","platform","mangleProps","reserveProps","mangleQuoted","mangleCache","drop","minify","minifyWhitespace","minifyIdentifiers","minifySyntax","charset","treeShaking","ignoreAnnotations","jsx","jsxFactory","jsxFragment","jsxImportSource","jsxDev","jsxSideEffects","define","pure","keepNames","color","logLevel","logLimit","logOverride","bundle","splitting","preserveSymlinks","outfile","metafile","outdir","outbase","external","packages","alias","loader","resolveExtensions","mainFields","conditions","write","allowOverwrite","tsconfig","outExtension","publicPath","entryNames","chunkNames","assetNames","inject","banner","footer","incremental","entryPoints","stdin","plugins","absWorkingDir","nodePaths","watch"];var ho=y(require("fs")),yo=y(require("fast-glob")),R=y(fe());function xo(e=".js",t="src"){let n=R.default.resolve(t);return{name:"fill-module-ext",setup(r){let o={};o.promise=new Promise(i=>{o.resolve=i}),r.onStart(()=>{o.resolve(!0)}),r.onLoad({filter:/\.(?:ts|tsx|js|jsx|mjs|mts)$/},async i=>{if(await o.promise===!0){let s=await ho.default.promises.readFile(i.path,{encoding:"utf8"}),u=R.default.dirname(i.path);return{contents:s.replace(/((?:(?:import|export)(?:.*from | ))|(?:(?:import))\()'((\.(?:\.)?\/.*)|\.)'/gmi,(...c)=>{let a=c[2],f=R.default.parse(a);if(f.ext)return c[1];let p=R.default.resolve(u,a),l=yo.default.sync([p+".{ts,js,mjs,jsx,tsx,mjs,mts}",R.default.join(p,"index.{ts,js,mjs,jsx,tsx,mjs,mts}")])[0];if(!l)return c[0];let m=R.default.relative(n,R.default.changeExt(l,e)),d=R.default.parse(m);return a==="."||a==="./"?m="./index"+e:d.name===f.name?m=a+e:m=a+"/index"+e,`${c[1]}'${m}'`}),loader:"tsx"}}})}}}var Oo=y(fe(),1),Le=y(require("@techor/log"),1),Co=y(require("fast-glob"),1);var Rt=y(fe(),1),Po=y(wo(),1),_o=y(require("fast-glob"),1);function vo(e){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&e instanceof t||e instanceof Date||e instanceof RegExp)}function Eo(e){if(typeof Buffer<"u"&&Buffer&&e instanceof Buffer){let t=Buffer.alloc(e.length);return e.copy(t),t}else{if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}}function To(e){let t=[];return e.forEach(function(n,r){typeof n=="object"&&n!==null?Array.isArray(n)?t[r]=To(n):vo(n)?t[r]=Eo(n):t[r]=F({},n):t[r]=n}),t}function So(e,t){return t==="__proto__"?void 0:e[t]}function F(...e){let t={},n,r;return e.forEach(function(o){typeof o!="object"||o===null||Array.isArray(o)||Object.keys(o).forEach(function(i){if(r=So(t,i),n=So(o,i),n!==t)if(typeof n!="object"||n===null){t[i]=n;return}else if(Array.isArray(n)){t[i]=To(n);return}else if(vo(n)){t[i]=Eo(n);return}else if(typeof r!="object"||r===null||Array.isArray(r)){t[i]=F({},n);return}else{t[i]=F(r,n);return}})}),t}var Io=require("esbuild");function jo(e,t){if(t=F({cwd:process.cwd()},t),!e)return;let n=_o.default.sync(e,t)[0];if(!n)return;let r=Rt.default.resolve(t.cwd,n),o=(0,Io.buildSync)({entryPoints:[r],logLevel:"silent",bundle:!0,format:"cjs",write:!1,target:"esnext"}),{text:i}=o.outputFiles[0];return(0,Po.default)(i,Rt.default.changeExt(r,".js"))}var Ha={cwd:process.cwd()},Ka=Ha,Ao=class{options;constructor(...e){this.options=F(Ka,...e)}logConfigFound=e=>Le.default.ok`**${e}** config file found`;logConfigNotFound=e=>Le.default.i`No **${e}** config file found`;readConfig(e="config"){let{config:t,cwd:n}=this.options;if(typeof t=="object")return t;let r;try{let o=this.configPath;if(o){let i=jo(o,{cwd:n});r=(e?i[e]:void 0)||i.default||i,this.logConfigFound(o)}else this.logConfigNotFound(o)}catch(o){Le.default.error(o)}return r}get configPath(){let{cwd:e,config:t}=this.options;if(!(!t||typeof t!="string"))return Co.default.sync(t,{cwd:e})[0]}get resolvedConfigPath(){let e=this.configPath;return e?Oo.default.resolve(this.options.cwd,e):""}};var Xa=new Ao({config:"aron.{js,ts,cjs,mjs}"}),Va={js:"cjs",cjs:"cjs",mjs:"esm",css:"css"},E=z(),{dependencies:No,peerDependencies:ko}=E,$t=[];No&&$t.push(...Object.keys(No));ko&&$t.push(...Object.keys(ko));Ro.program.command("pack [entryPaths...]").option("-f, --format [formats...]","The output format for the generated JavaScript files `iife`, `cjs`, `esm`",["cjs","esm"]).option("-t, --shakable-format [formats...]","Tree-shakable module's formats",["cjs","esm"]).option("--shakable","Enable outputting tree-shakable modules",!1).option("-w, --watch","Rebuild whenever a file changes",!1).option("-s, --sourcemap","Emit a source map",process.env.NODE_ENV==="production").option("-p, --platform <node,browser,neutral>","Platform target","browser").option("-t, --type","Emit typescript declarations",E.types).option("-o, --outdir <dir>","The output directory for the build operation","dist").option("-o, --serve","Serve mode starts a web server that serves your code to your browser on your device",!1).option("-e, --external <packages...>","External packages to exclude from the build",$t).option("-ee, --extra-external <packages...>","Extra external packages to exclude from the build",[]).option("-re, --resolve-extensions [extensions...]","The resolution algorithm used by node supports implicit file extensions",[".tsx",".ts",".jsx",".js",".css",".json"]).option("-kn, --keep-names","Keep JavaScript function/class names",!1).option("--cjs-ext","Specify CommonJS default file extension",".js").option("--iife-ext","Specify CommonJS default file extension",".js").option("--esm-ext","Specify CommonJS default file extension",".mjs").option("--srcdir <dir>","The source directory","src").option("--target","This sets the target environment for the generated JavaScript and/or CSS code.","esnext").option("--mangle-props","Pass a regular expression to esbuild to tell esbuild to automatically rename all properties that match this regular expression","^_").option("--no-bundle","OFF: Inline any imported dependencies into the file itself",!0).option("--no-minify","OFF: Minify the generated code").option("--no-clean","OFF: Clean up the previous output directory before the build starts").action(async function(e,t,n){t.clean&&Ft.default.existsSync(t.outdir)&&(Ft.default.rmSync(t.outdir,{force:!0,recursive:!0}),console.log(""),O.default.d`Cleaned up the **${t.outdir}** output directory`);let r=Xa.readConfig(null),o=[],i=(c,a)=>{let f=$.default.relative(t.outdir,c),p=$.default.join(t.srcdir,f);return $.default.changeExt(p,a)},s=async(c,a)=>{let f=a.format==="css",p=a.ext||a.outFile&&$.default.extname(a.outFile)||void 0,l=[...t.external,...t.extraExternal],m=a.outdir||t.outdir;t.bundle,a.softBundle&&l.push(".*");let d=F(t,{outExtension:f?{".css":".css"}:{".js":p||{cjs:t.cjsExt,esm:t.esmExt,iife:t.iifeExt}[a.format]},external:l,logLevel:"info",outdir:m,outbase:t.srcdir,platform:a.platform||t.platform,metafile:!0,format:f?void 0:a.format,keepNames:t.keepNames,resolveExtensions:t.resolveExtensions,mangleProps:t.mangleProps?new RegExp(t.mangleProps):void 0,target:t.target,sourcemap:t.sourcemap,plugins:[]},r?.pack);a.softBundle&&a.format==="esm"&&d.plugins.push(xo(t.esmExt)),delete d.watch,delete d.serve;for(let g in d)go.includes(g)||delete d[g];d.entryPoints=Fo.default.sync([...new Set(c)].map(g=>(0,Bo.default)(g))).filter(g=>!o.find(x=>x.options.entryPoints.includes(g)&&x.options.format===d.format&&(0,Go.default)(x.options.outExtension,d.outExtension)&&x.options.outdir===d.outdir));let h={options:d,run:async()=>{let g=await(0,$o.context)(d),{metafile:x}=await g.rebuild();if(x){console.log(""),h.metafile=x;for(let b in x.outputs){let I=x.outputs[b],P=je(I.bytes).replace(/ /g,""),j=x.outputs[b].format=a.format;O.default`${O.chalk.dim("\u2502")} $t [${j}] **${b}** ${P} (${Object.keys(I.inputs).length} inputs)`}O.default.tree({entries:d.entryPoints,external:d.external,outdir:d.outdir,format:d.format,platform:d.platform,[Object.keys(d).filter(b=>d[b]===!0).map(b=>O.chalk.green("\u2713 ")+b).join(", ")]:null})}t.watch?await g.watch():await g.dispose(),t.serve&&await g.serve()}};d.entryPoints.length&&o.push(h)};if(t.shakable&&t.shakableFormat.length&&t.shakableFormat.forEach(c=>s([$.default.join(t.srcdir,"**/*.{js,ts,jsx,tsx,mjs,mts}")],{format:c,platform:"node",outdir:$.default.join(t.outdir,c),softBundle:!0})),E.exports&&function c(a,f,p){if(typeof a=="string"){let l=$.default.extname(a);s([i(a,".{js,ts,jsx,tsx,mjs,mts}")],{format:p.format||Va[l],outFile:p.outFile||a,platform:p.platform})}else for(let l in a){let m=a[l],d,h;switch(f){case"node":h="node";break;case"browser":h="browser";break;case"require":d="cjs";break;case"import":d="esm";break}if(l.startsWith("."))c(m,l);else switch(l){case"node":c(m,l,{platform:"node",format:d});break;case"browser":c(m,l,{platform:"browser",format:d});break;case"default":c(m,l,{platform:h,format:d});break;case"require":c(m,l,{platform:h,format:"cjs"});break;case"import":c(m,l,{platform:h,format:"esm"});break}}}(E.exports,""),E.style&&s([i(E.main,".css")],{format:"css"}),E.main&&!E.main.endsWith(".css")&&s([i(E.main,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",outFile:E.main}),E.module&&s([i(E.module,".{js,ts,jsx,tsx,mjs,mts}")],{format:"esm",outFile:E.module}),E.browser&&s([i(E.browser,".{js,ts,jsx,tsx,mjs,mts}")],{format:"iife",platform:"browser",outFile:E.browser}),E.bin)if(typeof E.bin=="string")s([i(E.bin,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",platform:"node",outFile:E.bin});else for(let c in E.bin){let a=E.bin[c];s([i(a,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",platform:"node",outFile:a})}e.length&&(e.find(a=>a.includes(".css"))?s(e,{format:"css"}):t.format.map(a=>s(e,{format:a}))),o.length||t.format.map(c=>s([$.default.join(t.srcdir,"index.ts")],{format:c}));let u;t.type&&(u={outFile:"declarations",options:{platform:"type",format:"dts"},run:()=>new Promise(c=>{let a=()=>Sr(he.default`
12
12
  npx tsc --emitDeclarationOnly --preserveWatchOutput --declaration
13
13
  --outDir ${t.outdir}
14
14
  ${t.watch&&"--watch"}
15
- `,{stdio:"inherit",stripFinalNewline:!1}).catch(u=>{process.exit()}).finally(a);t.watch?setTimeout(c,100):c()})},t.watch||r.push(s)),await mt(r.map(({run:a})=>a)),console.log(""),t.watch&&s&&r.push(s);for(let a of r)a.metafile?Object.keys(a.metafile.outputs).forEach(c=>{let u=a.metafile.outputs[c],f=_e(u.bytes).replace(/ /g,""),l=u.format;O.default.ok(me.l`[${a.options.platform}] **${c}** ${f} (${l})`)}):O.default.ok(me.l`[${a.options.format}] **${a.outFile}** (${a.options.format})`);console.log(""),t.watch?O.default`Start watching ${r.length} build tasks`:O.default.success`${r.length} build tasks`,console.log(""),t.watch&&s&&await s.run()});var{version:Oa,name:Ca,description:Aa}=W(wi.default.join(__dirname,"../../package.json"));kt.program.name(Ca).description(Aa).version(Oa);kt.program.parse();
15
+ `,{stdio:"inherit",stripFinalNewline:!1}).catch(f=>{process.exit()}).finally(c);t.watch?setTimeout(a,100):a()})},t.watch||o.push(u)),await yt(o.map(({run:c})=>c)),console.log(""),t.watch&&u&&o.push(u);for(let c of o)c.metafile?Object.keys(c.metafile.outputs).forEach(a=>{let f=c.metafile.outputs[a],p=je(f.bytes).replace(/ /g,""),l=f.format;O.default.ok(he.l`[${c.options.platform}] **${a}** ${p} (${l})`)}):O.default.ok(he.l`[${c.options.format}] **${c.outFile}** (${c.options.format})`);console.log(""),t.watch?O.default`Start watching ${o.length} build tasks`:O.default.success`${o.length} build tasks`,console.log(""),t.watch&&u&&await u.run()});var{version:Ya,name:Ja,description:Za}=z(Mo.default.join(__dirname,"../../package.json"));Bt.program.name(Ja).description(Za).version(Ya);Bt.program.parse();
16
16
  /*! Bundled license information:
17
17
 
18
18
  normalize-path/index.js: