aronrepo 1.4.4 → 1.4.5

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 xi=Object.create;var kt=Object.defineProperty;var bi=Object.getOwnPropertyDescriptor;var Si=Object.getOwnPropertyNames;var wi=Object.getPrototypeOf,vi=Object.prototype.hasOwnProperty;var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ei=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Si(t))!vi.call(e,i)&&i!==n&&kt(e,i,{get:()=>t[i],enumerable:!(r=bi(t,i))||r.enumerable});return e};var b=(e,t,n)=>(n=e!=null?xi(wi(e)):{},Ei(t||!e||!e.__esModule?kt(n,"default",{value:e,enumerable:!0}):n,e));var Ut=E((Aa,Dt)=>{Dt.exports=Mt;Mt.sync=Ii;var Bt=require("fs");function Pi(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 Lt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Pi(t,n)}function Mt(e,t,n){Bt.stat(e,function(r,i){n(r,r?!1:Lt(i,e,t))})}function Ii(e,t){return Lt(Bt.statSync(e),e,t)}});var Kt=E((Na,Ht)=>{Ht.exports=Wt;Wt.sync=Oi;var qt=require("fs");function Wt(e,t,n){qt.stat(e,function(r,i){n(r,r?!1:zt(i,t))})}function Oi(e,t){return zt(qt.statSync(e),t)}function zt(e,t){return e.isFile()&&ji(e,t)}function ji(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 Vt=E((Ga,Xt)=>{var ka=require("fs"),ge;process.platform==="win32"||global.TESTING_WINDOWS?ge=Ut():ge=Kt();Xt.exports=Be;Be.sync=Ci;function Be(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){Be(e,t||{},function(o,s){o?i(o):r(s)})})}ge(e,t||{},function(r,i){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,i=!1),n(r,i)})}function Ci(e,t){try{return ge.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var nn=E((Ra,tn)=>{var W=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Yt=require("path"),Ai=W?";":":",Jt=Vt(),Zt=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Qt=(e,t)=>{let n=t.colon||Ai,r=e.match(/\//)||W&&e.match(/\\/)?[""]:[...W?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],i=W?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=W?i.split(n):[""];return W&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:r,pathExt:o,pathExtExe:i}},en=(e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:i,pathExtExe:o}=Qt(e,t),s=[],a=u=>new Promise((f,l)=>{if(u===r.length)return t.all&&s.length?f(s):l(Zt(e));let p=r[u],m=/^".*"$/.test(p)?p.slice(1,-1):p,d=Yt.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];Jt(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)},Ni=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:i}=Qt(e,t),o=[];for(let s=0;s<n.length;s++){let a=n[s],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=Yt.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(Jt.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 Zt(e)};tn.exports=en;en.sync=Ni});var on=E(($a,Le)=>{"use strict";var rn=(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=rn;Le.exports.default=rn});var un=E((Fa,cn)=>{"use strict";var sn=require("path"),ki=nn(),Gi=on();function an(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=ki.sync(e.command,{path:n[Gi({env:n})],pathExt:t?sn.delimiter:void 0})}catch{}finally{o&&process.chdir(r)}return s&&(s=sn.resolve(i?e.options.cwd:"",s)),s}function Ri(e){return an(e)||an(e,!0)}cn.exports=Ri});var fn=E((Ba,De)=>{"use strict";var Me=/([()\][%!^"`<>&|;, *?])/g;function $i(e){return e=e.replace(Me,"^$1"),e}function Fi(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(Me,"^$1"),t&&(e=e.replace(Me,"^$1")),e}De.exports.command=$i;De.exports.argument=Fi});var dn=E((La,ln)=>{"use strict";ln.exports=/^#!(.*)/});var mn=E((Ma,pn)=>{"use strict";var Bi=dn();pn.exports=(e="")=>{let t=e.match(Bi);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return i==="env"?r:r?`${i} ${r}`:i}});var hn=E((Da,gn)=>{"use strict";var Ue=require("fs"),Li=mn();function Mi(e){let n=Buffer.alloc(150),r;try{r=Ue.openSync(e,"r"),Ue.readSync(r,n,0,150,0),Ue.closeSync(r)}catch{}return Li(n.toString())}gn.exports=Mi});var Sn=E((Ua,bn)=>{"use strict";var Di=require("path"),yn=un(),xn=fn(),Ui=hn(),qi=process.platform==="win32",Wi=/\.(?:com|exe)$/i,zi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Hi(e){e.file=yn(e);let t=e.file&&Ui(e.file);return t?(e.args.unshift(e.file),e.command=t,yn(e)):e.file}function Ki(e){if(!qi)return e;let t=Hi(e),n=!Wi.test(t);if(e.options.forceShell||n){let r=zi.test(t);e.command=Di.normalize(e.command),e.command=xn.command(e.command),e.args=e.args.map(o=>xn.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 Xi(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:Ki(r)}bn.exports=Xi});var En=E((qa,vn)=>{"use strict";var qe=process.platform==="win32";function We(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 Vi(e,t){if(!qe)return;let n=e.emit;e.emit=function(r,i){if(r==="exit"){let o=wn(i,t,"spawn");if(o)return n.call(e,"error",o)}return n.apply(e,arguments)}}function wn(e,t){return qe&&e===1&&!t.file?We(t.original,"spawn"):null}function Yi(e,t){return qe&&e===1&&!t.file?We(t.original,"spawnSync"):null}vn.exports={hookChildProcess:Vi,verifyENOENT:wn,verifyENOENTSync:Yi,notFoundError:We}});var Pn=E((Wa,z)=>{"use strict";var Tn=require("child_process"),ze=Sn(),He=En();function _n(e,t,n){let r=ze(e,t,n),i=Tn.spawn(r.command,r.args,r.options);return He.hookChildProcess(i,r),i}function Ji(e,t,n){let r=ze(e,t,n),i=Tn.spawnSync(r.command,r.args,r.options);return i.error=i.error||He.verifyENOENTSync(i.status,r),i}z.exports=_n;z.exports.spawn=_n;z.exports.sync=Ji;z.exports._parse=ze;z.exports._enoent=He});var Bn=E((fc,be)=>{be.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&be.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&be.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var qn=E((lc,V)=>{var w=global.process,F=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"};F(w)?(Ln=require("assert"),K=Bn(),Mn=/^win/i.test(w.platform),ne=require("events"),typeof ne!="function"&&(ne=ne.EventEmitter),w.__signal_exit_emitter__?T=w.__signal_exit_emitter__:(T=w.__signal_exit_emitter__=new ne,T.count=0,T.emitted={}),T.infinite||(T.setMaxListeners(1/0),T.infinite=!0),V.exports=function(e,t){if(!F(global.process))return function(){};Ln.equal(typeof e,"function","a callback must be provided for exit handler"),X===!1&&Ze();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&&Se()};return T.on(n,e),r},Se=function(){!X||!F(global.process)||(X=!1,K.forEach(function(t){try{w.removeListener(t,we[t])}catch{}}),w.emit=ve,w.reallyExit=Qe,T.count-=1)},V.exports.unload=Se,B=function(t,n,r){T.emitted[t]||(T.emitted[t]=!0,T.emit(t,n,r))},we={},K.forEach(function(e){we[e]=function(){if(F(global.process)){var n=w.listeners(e);n.length===T.count&&(Se(),B("exit",null,e),B("afterexit",null,e),Mn&&e==="SIGHUP"&&(e="SIGINT"),w.kill(w.pid,e))}}}),V.exports.signals=function(){return K},X=!1,Ze=function(){X||!F(global.process)||(X=!0,T.count+=1,K=K.filter(function(t){try{return w.on(t,we[t]),!0}catch{return!1}}),w.emit=Un,w.reallyExit=Dn)},V.exports.load=Ze,Qe=w.reallyExit,Dn=function(t){F(global.process)&&(w.exitCode=t||0,B("exit",w.exitCode,null),B("afterexit",w.exitCode,null),Qe.call(w,w.exitCode))},ve=w.emit,Un=function(t,n){if(t==="exit"&&F(global.process)){n!==void 0&&(w.exitCode=n);var r=ve.apply(this,arguments);return B("exit",w.exitCode,null),B("afterexit",w.exitCode,null),r}else return ve.apply(this,arguments)}):V.exports=function(){return function(){}};var Ln,K,Mn,ne,T,Se,B,we,X,Ze,Qe,Dn,ve,Un});var Qn=E((mc,Zn)=>{"use strict";var{PassThrough:vo}=require("stream");Zn.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 vo({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 er=E((gc,re)=>{"use strict";var{constants:Eo}=require("buffer"),To=require("stream"),{promisify:_o}=require("util"),Po=Qn(),Io=_o(To.pipeline),Ee=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function et(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:n}=t,r=Po(t);return await new Promise((i,o)=>{let s=a=>{a&&r.getBufferedLength()<=Eo.MAX_LENGTH&&(a.bufferedData=r.getBufferedValue()),o(a)};(async()=>{try{await Io(e,r),i()}catch(a){s(a)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new Ee)})}),r.getBufferedValue()}re.exports=et;re.exports.buffer=(e,t)=>et(e,{...t,encoding:"buffer"});re.exports.array=(e,t)=>et(e,{...t,array:!0});re.exports.MaxBufferError=Ee});var nr=E((hc,tr)=>{"use strict";var{PassThrough:Oo}=require("stream");tr.exports=function(){var e=[],t=new Oo({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 Tr=E(Er=>{var mt="2.0.1",Sr,Te,wr,ht,yt,Y,ae,se,gt,J,P,vr=[].slice,Uo=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},qo={}.hasOwnProperty;ae=require("path");wr=function(e){return typeof e=="function"};ht=function(e){return typeof e=="string"||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"};P=Er;P.VERSION=typeof mt<"u"&&mt!==null?mt:"NO-VERSION";J=function(e){return e=e.replace(/\\/g,"/"),e=e.replace(/(?<!^)\/+/g,"/"),e};for(se in ae)gt=ae[se],wr(gt)?P[se]=function(e){return function(){var t,n;return t=1<=arguments.length?vr.call(arguments,0):[],t=t.map(function(r){return ht(r)?J(r):r}),n=ae[e].apply(ae,t),ht(n)?J(n):n}}(se):P[se]=gt;P.sep="/";Te={toUnix:J,normalizeSafe:function(e){var t;return e=J(e),t=P.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=P.normalizeSafe(e),e.endsWith("/")?e.slice(0,+(e.length-2)+1||9e9):e},joinSafe:function(){var e,t,n;return e=1<=arguments.length?vr.call(arguments,0):[],n=P.join.apply(null,e),e.length>0&&(t=J(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=P.extname(e),yt(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,P.extname(e)===t?P.trimExt(e,[],t.length):e):e},changeExt:function(e,t,n,r){return r==null&&(r=7),P.trimExt(e,n,r)+(t?t[0]==="."?t:"."+t:"")},defaultExt:function(e,t,n,r){var i;return r==null&&(r=7),i=P.extname(e),yt(i,n,r)?e:P.addExt(e,t)}};yt=function(e,t,n){return t==null&&(t=[]),e&&e.length<=n&&Uo.call(t.map(function(r){return(r&&r[0]!=="."?".":"")+r}),e)<0};for(Y in Te)if(qo.call(Te,Y)){if(Sr=Te[Y],P[Y]!==void 0)throw new Error("path."+Y+" already exists.");P[Y]=Sr}});var Ir=E((Hc,Pr)=>{Pr.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 ci=E((ce,Q)=>{var Xo=200,Ot="__lodash_hash_undefined__",ke=1,Lr=2,Mr=9007199254740991,Pe="[object Arguments]",wt="[object Array]",Vo="[object AsyncFunction]",Dr="[object Boolean]",Ur="[object Date]",qr="[object Error]",Wr="[object Function]",Yo="[object GeneratorFunction]",Ie="[object Map]",zr="[object Number]",Jo="[object Null]",Z="[object Object]",Or="[object Promise]",Zo="[object Proxy]",Hr="[object RegExp]",Oe="[object Set]",Kr="[object String]",Qo="[object Symbol]",es="[object Undefined]",vt="[object WeakMap]",Xr="[object ArrayBuffer]",je="[object DataView]",ts="[object Float32Array]",ns="[object Float64Array]",rs="[object Int8Array]",is="[object Int16Array]",os="[object Int32Array]",ss="[object Uint8Array]",as="[object Uint8ClampedArray]",cs="[object Uint16Array]",us="[object Uint32Array]",fs=/[\\^$.*+?()[\]{}|]/g,ls=/^\[object .+?Constructor\]$/,ds=/^(?:0|[1-9]\d*)$/,S={};S[ts]=S[ns]=S[rs]=S[is]=S[os]=S[ss]=S[as]=S[cs]=S[us]=!0;S[Pe]=S[wt]=S[Xr]=S[Dr]=S[je]=S[Ur]=S[qr]=S[Wr]=S[Ie]=S[zr]=S[Z]=S[Hr]=S[Oe]=S[Kr]=S[vt]=!1;var Vr=typeof global=="object"&&global&&global.Object===Object&&global,ps=typeof self=="object"&&self&&self.Object===Object&&self,N=Vr||ps||Function("return this")(),Yr=typeof ce=="object"&&ce&&!ce.nodeType&&ce,jr=Yr&&typeof Q=="object"&&Q&&!Q.nodeType&&Q,Jr=jr&&jr.exports===Yr,xt=Jr&&Vr.process,Cr=function(){try{return xt&&xt.binding&&xt.binding("util")}catch{}}(),Ar=Cr&&Cr.isTypedArray;function ms(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 gs(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function hs(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 ys(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function xs(e){return function(t){return e(t)}}function bs(e,t){return e.has(t)}function Ss(e,t){return e?.[t]}function ws(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function vs(e,t){return function(n){return e(t(n))}}function Es(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Ts=Array.prototype,_s=Function.prototype,Ge=Object.prototype,bt=N["__core-js_shared__"],Zr=_s.toString,C=Ge.hasOwnProperty,Nr=function(){var e=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Qr=Ge.toString,Ps=RegExp("^"+Zr.call(C).replace(fs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kr=Jr?N.Buffer:void 0,Ce=N.Symbol,Gr=N.Uint8Array,ei=Ge.propertyIsEnumerable,Is=Ts.splice,L=Ce?Ce.toStringTag:void 0,Rr=Object.getOwnPropertySymbols,Os=kr?kr.isBuffer:void 0,js=vs(Object.keys,Object),Et=ee(N,"DataView"),ue=ee(N,"Map"),Tt=ee(N,"Promise"),_t=ee(N,"Set"),Pt=ee(N,"WeakMap"),fe=ee(Object,"create"),Cs=U(Et),As=U(ue),Ns=U(Tt),ks=U(_t),Gs=U(Pt),$r=Ce?Ce.prototype:void 0,St=$r?$r.valueOf:void 0;function M(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 Rs(){this.__data__=fe?fe(null):{},this.size=0}function $s(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Fs(e){var t=this.__data__;if(fe){var n=t[e];return n===Ot?void 0:n}return C.call(t,e)?t[e]:void 0}function Bs(e){var t=this.__data__;return fe?t[e]!==void 0:C.call(t,e)}function Ls(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fe&&t===void 0?Ot:t,this}M.prototype.clear=Rs;M.prototype.delete=$s;M.prototype.get=Fs;M.prototype.has=Bs;M.prototype.set=Ls;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 Ms(){this.__data__=[],this.size=0}function Ds(e){var t=this.__data__,n=Re(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Is.call(t,n,1),--this.size,!0}function Us(e){var t=this.__data__,n=Re(t,e);return n<0?void 0:t[n][1]}function qs(e){return Re(this.__data__,e)>-1}function Ws(e,t){var n=this.__data__,r=Re(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}k.prototype.clear=Ms;k.prototype.delete=Ds;k.prototype.get=Us;k.prototype.has=qs;k.prototype.set=Ws;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 zs(){this.size=0,this.__data__={hash:new M,map:new(ue||k),string:new M}}function Hs(e){var t=$e(this,e).delete(e);return this.size-=t?1:0,t}function Ks(e){return $e(this,e).get(e)}function Xs(e){return $e(this,e).has(e)}function Vs(e,t){var n=$e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}D.prototype.clear=zs;D.prototype.delete=Hs;D.prototype.get=Ks;D.prototype.has=Xs;D.prototype.set=Vs;function Ae(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new D;++t<n;)this.add(e[t])}function Ys(e){return this.__data__.set(e,Ot),this}function Js(e){return this.__data__.has(e)}Ae.prototype.add=Ae.prototype.push=Ys;Ae.prototype.has=Js;function $(e){var t=this.__data__=new k(e);this.size=t.size}function Zs(){this.__data__=new k,this.size=0}function Qs(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ea(e){return this.__data__.get(e)}function ta(e){return this.__data__.has(e)}function na(e,t){var n=this.__data__;if(n instanceof k){var r=n.__data__;if(!ue||r.length<Xo-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new D(r)}return n.set(e,t),this.size=n.size,this}$.prototype.clear=Zs;$.prototype.delete=Qs;$.prototype.get=ea;$.prototype.has=ta;$.prototype.set=na;function ra(e,t){var n=Ne(e),r=!n&&xa(e),i=!n&&!r&&It(e),o=!n&&!r&&!i&&ai(e),s=n||r||i||o,a=s?ys(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")||pa(u,c)))&&a.push(u);return a}function Re(e,t){for(var n=e.length;n--;)if(ri(e[n][0],t))return n;return-1}function ia(e,t,n){var r=t(e);return Ne(e)?r:gs(r,n(e))}function de(e){return e==null?e===void 0?es:Jo:L&&L in Object(e)?la(e):ya(e)}function Fr(e){return le(e)&&de(e)==Pe}function ti(e,t,n,r,i){return e===t?!0:e==null||t==null||!le(e)&&!le(t)?e!==e&&t!==t:oa(e,t,n,r,ti,i)}function oa(e,t,n,r,i,o){var s=Ne(e),a=Ne(t),c=s?wt:R(e),u=a?wt:R(t);c=c==Pe?Z:c,u=u==Pe?Z:u;var f=c==Z,l=u==Z,p=c==u;if(p&&It(e)){if(!It(t))return!1;s=!0,f=!1}if(p&&!f)return o||(o=new $),s||ai(e)?ni(e,t,n,r,i,o):ua(e,t,c,n,r,i,o);if(!(n&ke)){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 $),i(y,g,n,r,o)}}return p?(o||(o=new $),fa(e,t,n,r,i,o)):!1}function sa(e){if(!si(e)||ga(e))return!1;var t=ii(e)?Ps:ls;return t.test(U(e))}function aa(e){return le(e)&&oi(e.length)&&!!S[de(e)]}function ca(e){if(!ha(e))return js(e);var t=[];for(var n in Object(e))C.call(e,n)&&n!="constructor"&&t.push(n);return t}function ni(e,t,n,r,i,o){var s=n&ke,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 Ae: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(!hs(t,function(g,h){if(!bs(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 ua(e,t,n,r,i,o,s){switch(n){case je:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Xr:return!(e.byteLength!=t.byteLength||!o(new Gr(e),new Gr(t)));case Dr:case Ur:case zr:return ri(+e,+t);case qr:return e.name==t.name&&e.message==t.message;case Hr:case Kr:return e==t+"";case Ie:var a=ws;case Oe:var c=r&ke;if(a||(a=Es),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=ni(a(e),a(t),r,i,o,s);return s.delete(e),f;case Qo:if(St)return St.call(e)==St.call(t)}return!1}function fa(e,t,n,r,i,o){var s=n&ke,a=Br(e),c=a.length,u=Br(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 x=s?r(h,g,p,t,e,o):r(g,h,p,e,t,o);if(!(x===void 0?g===h||i(g,h,n,r,o):x)){d=!1;break}y||(y=p=="constructor")}if(d&&!y){var I=e.constructor,_=t.constructor;I!=_&&"constructor"in e&&"constructor"in t&&!(typeof I=="function"&&I instanceof I&&typeof _=="function"&&_ instanceof _)&&(d=!1)}return o.delete(e),o.delete(t),d}function Br(e){return ia(e,wa,da)}function $e(e,t){var n=e.__data__;return ma(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ee(e,t){var n=Ss(e,t);return sa(n)?n:void 0}function la(e){var t=C.call(e,L),n=e[L];try{e[L]=void 0;var r=!0}catch{}var i=Qr.call(e);return r&&(t?e[L]=n:delete e[L]),i}var da=Rr?function(e){return e==null?[]:(e=Object(e),ms(Rr(e),function(t){return ei.call(e,t)}))}:va,R=de;(Et&&R(new Et(new ArrayBuffer(1)))!=je||ue&&R(new ue)!=Ie||Tt&&R(Tt.resolve())!=Or||_t&&R(new _t)!=Oe||Pt&&R(new Pt)!=vt)&&(R=function(e){var t=de(e),n=t==Z?e.constructor:void 0,r=n?U(n):"";if(r)switch(r){case Cs:return je;case As:return Ie;case Ns:return Or;case ks:return Oe;case Gs:return vt}return t});function pa(e,t){return t=t??Mr,!!t&&(typeof e=="number"||ds.test(e))&&e>-1&&e%1==0&&e<t}function ma(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ga(e){return!!Nr&&Nr in e}function ha(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Ge;return e===n}function ya(e){return Qr.call(e)}function U(e){if(e!=null){try{return Zr.call(e)}catch{}try{return e+""}catch{}}return""}function ri(e,t){return e===t||e!==e&&t!==t}var xa=Fr(function(){return arguments}())?Fr:function(e){return le(e)&&C.call(e,"callee")&&!ei.call(e,"callee")},Ne=Array.isArray;function ba(e){return e!=null&&oi(e.length)&&!ii(e)}var It=Os||Ea;function Sa(e,t){return ti(e,t)}function ii(e){if(!si(e))return!1;var t=de(e);return t==Wr||t==Yo||t==Vo||t==Zo}function oi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Mr}function si(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function le(e){return e!=null&&typeof e=="object"}var ai=Ar?xs(Ar):aa;function wa(e){return ba(e)?ra(e):ca(e)}function va(){return[]}function Ea(){return!1}Q.exports=Sa});var At=require("commander"),yi=b(require("path"));var Rt=require("commander"),$t=b(require("fast-glob")),Fe=b(require("fs-extra")),Ft=b(require("path")),A=b(require("@techor/log"));var Gt=b(require("fs-extra"));function q(e="./package.json"){return Gt.default.readJSONSync(e,{throws:!1})||{}}var Ti=q(),_i={workspaces:Ti.workspaces};Rt.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",_i.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=>Ft.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 $t.default.sync(a)){let l=Fe.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||Fe.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 x=y[h];m[g][(0,A.paint)("**"+h+"**")]=x===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 di=require("commander"),pi=b(require("fast-glob"));var dr=require("node:buffer"),pr=b(require("node:path"),1),st=b(require("node:child_process"),1),ie=b(require("node:process"),1),mr=b(Pn(),1);function Ke(e){let t=typeof e=="string"?`
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"?`
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 te=b(require("node:process"),1),H=b(require("node:path"),1),In=b(require("node:url"),1);function he(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 Zi(e={}){let{cwd:t=te.default.cwd(),path:n=te.default.env[he()],execPath:r=te.default.execPath}=e,i,o=t instanceof URL?In.default.fileURLToPath(t):t,s=H.default.resolve(o),a=[];for(;i!==s;)a.push(H.default.join(s,"node_modules/.bin")),i=s,s=H.default.resolve(s,"..");return a.push(H.default.resolve(o,r,"..")),[...a,n].join(H.default.delimiter)}function On({env:e=te.default.env,...t}={}){e={...e};let n=he({env:e});return t.path=e[n],e[n]=Zi(t),e}var Qi=(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);!eo(i,o)&&r||Object.defineProperty(e,n,o)},eo=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)},to=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},no=(e,t)=>`/* Wrapped ${e}*/
5
- ${t}`,ro=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),io=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),oo=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,i=no.bind(null,r,t.toString());Object.defineProperty(i,"name",io),Object.defineProperty(e,"toString",{...ro,value:i})};function Xe(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let i of Reflect.ownKeys(t))Qi(e,t,i,n);return to(e,t),oo(e,t,r),e}var ye=new WeakMap,jn=(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(ye.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 Xe(o,e),ye.set(o,r),o};jn.callCount=e=>{if(!ye.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ye.get(e)};var Cn=jn;var Rn=require("os");var An=function(){let e=Ve-Nn+1;return Array.from({length:e},so)},so=function(e,t){return{name:`SIGRT${t+1}`,number:Nn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},Nn=34,Ve=64;var Gn=require("os");var kn=[{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 Ye=function(){let e=An();return[...kn,...e].map(ao)},ao=function({name:e,number:t,description:n,action:r,forced:i=!1,standard:o}){let{signals:{[e]:s}}=Gn.constants,a=s!==void 0;return{name:e,number:a?s:t,description:n,supported:a,action:r,forced:i,standard:o}};var co=function(){return Ye().reduce(uo,{})},uo=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}}},$n=co(),fo=function(){let e=Ye(),t=64+1,n=Array.from({length:t},(r,i)=>lo(i,e));return Object.assign({},...n)},lo=function(e,t){let n=po(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}}},po=function(e,t){let n=t.find(({name:r})=>Rn.constants.signals[r]===e);return n!==void 0?n:t.find(r=>r.number===e)},oc=fo();var mo=({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",Je=({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:$n[i].description,m=r&&r.code,y=`Command ${mo({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,x=[h,t,e].filter(Boolean).join(`
7
- `);return g?(r.originalMessage=r.message,r.message=x):r=new Error(x),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 xe=["stdin","stdout","stderr"],go=e=>xe.some(t=>e[t]!==void 0),Fn=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return xe.map(r=>e[r]);if(go(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${xe.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,xe.length);return Array.from({length:n},(r,i)=>t[i])};var Wn=b(require("node:os"),1),zn=b(qn(),1),ho=1e3*5,Hn=(e,t="SIGTERM",n={})=>{let r=e(t);return yo(e,t,n,r),r},yo=(e,t,n,r)=>{if(!xo(t,n,r))return;let i=So(n),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},xo=(e,{forceKillAfterTimeout:t},n)=>bo(e)&&t!==!1&&n,bo=e=>e===Wn.default.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",So=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return ho;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},Kn=(e,t)=>{e.kill()&&(t.isCanceled=!0)},wo=(e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},Xn=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===void 0)return r;let i,o=new Promise((a,c)=>{i=setTimeout(()=>{wo(e,n,c)},t)}),s=r.finally(()=>{clearTimeout(i)});return Promise.race([o,s])},Vn=({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})`)},Yn=async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let i=(0,zn.default)(()=>{e.kill()});return r.finally(()=>{i()})};function Jn(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}var rt=b(er(),1),rr=b(nr(),1),ir=(e,t)=>{t===void 0||e.stdin===void 0||(Jn(t)?t.pipe(e.stdin):e.stdin.end(t))},or=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=(0,rr.default)();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},tt=async(e,t)=>{if(e){e.destroy();try{return await t}catch(n){return n.bufferedData}}},nt=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!(!e||!n))return t?(0,rt.default)(e,{encoding:t,maxBuffer:r}):rt.default.buffer(e,{maxBuffer:r})},sr=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:o},s)=>{let a=nt(e,{encoding:r,buffer:i,maxBuffer:o}),c=nt(t,{encoding:r,buffer:i,maxBuffer:o}),u=nt(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},tt(e,a),tt(t,c),tt(n,u)])}};var jo=(async()=>{})().constructor.prototype,Co=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(jo,e)]),it=(e,t)=>{for(let[n,r]of Co){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},ar=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 cr=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Ao=/^[\w.-]+$/,No=/"/g,ko=e=>typeof e!="string"||Ao.test(e)?e:`"${e.replace(No,'\\"')}"`,ur=(e,t)=>cr(e,t).join(" "),fr=(e,t)=>cr(e,t).map(n=>ko(n)).join(" "),Go=/ +/g,lr=e=>{let t=[];for(let n of e.trim().split(Go)){let r=t[t.length-1];r&&r.endsWith("\\")?t[t.length-1]=`${r.slice(0,-1)} ${n}`:t.push(n)}return t};var Ro=1e3*1e3*100,$o=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{let o=t?{...ie.default.env,...e}:e;return n?On({env:o,cwd:r,execPath:i}):o},Fo=(e,t,n={})=>{let r=mr.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:Ro,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||ie.default.cwd(),execPath:ie.default.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=$o(n),n.stdio=Fn(n),ie.default.platform==="win32"&&pr.default.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},ot=(e,t,n)=>typeof t!="string"&&!dr.Buffer.isBuffer(t)?n===void 0?void 0:"":e.stripFinalNewline?Ke(t):t;function Bo(e,t,n){let r=Fo(e,t,n),i=ur(e,t),o=fr(e,t);Vn(r.options);let s;try{s=st.default.spawn(r.file,r.args,r.options)}catch(m){let d=new st.default.ChildProcess,y=Promise.reject(Je({error:m,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return it(d,y)}let a=ar(s),c=Xn(s,r.options,a),u=Yn(s,r.options,c),f={isCanceled:!1};s.kill=Hn.bind(null,s.kill.bind(s)),s.cancel=Kn.bind(null,s,f);let p=Cn(async()=>{let[{error:m,exitCode:d,signal:y,timedOut:g},h,x,I]=await sr(s,r.options,u),_=ot(r.options,h),O=ot(r.options,x),me=ot(r.options,I);if(m||d!==0||y!==null){let Nt=Je({error:m,exitCode:d,signal:y,stdout:_,stderr:O,all:me,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 Nt;throw Nt}return{command:i,escapedCommand:o,exitCode:0,stdout:_,stderr:O,all:me,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return ir(s,r.options.input),s.all=or(s,r.options),it(s,p)}function gr(e,t){let[n,...r]=lr(e);return Bo(n,r,t)}var mi=require("esbuild");function at(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 ut=b(require("os"),1);function ct(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var hr=/\s+at.*[(\s](.*)\)?/,Lo=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,Mo=typeof ut.default.homedir>"u"?"":ut.default.homedir().replace(/\\/g,"/");function ft(e,{pretty:t=!1,basePath:n}={}){let r=n&&new RegExp(`(at | \\()${ct(n.replace(/\\/g,"/"))}`,"g");if(typeof e=="string")return e.replace(/\\/g,"/").split(`
8
- `).filter(i=>{let o=i.match(hr);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:!Lo.test(s)}).filter(i=>i.trim()!=="").map(i=>(r&&(i=i.replace(r,"$1")),t&&(i=i.replace(hr,(o,s)=>o.replace(s,s.replace(Mo,"~")))),i)).join(`
9
- `)}var Do=e=>e.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,""),oe=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?Do(ft(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 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(`
10
10
  `);n=`
11
- `+at(n,4),super(n),this.#e=t}get errors(){return this.#e.slice()}};var lt=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}},yr=e=>globalThis.DOMException===void 0?new lt(e):new DOMException(e),xr=e=>{let t=e.reason===void 0?yr("This operation was aborted."):e.reason;return t instanceof Error?t:yr(t)};async function dt(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=x=>{f=!0,l=!0,s(x)};i&&(i.aborted&&g(xr(i)),i.addEventListener("abort",()=>{g(xr(i))}));let h=async()=>{if(l)return;let x=await y.next(),I=d;if(d++,x.done){if(p=!0,m===0&&!l){if(!r&&c.length>0){g(new oe(c));return}if(l=!0,u.size===0){o(a);return}let _=[];for(let[O,me]of a.entries())u.get(O)!==br&&_.push(me);o(_)}return}m++,(async()=>{try{let _=await x.value;if(l)return;let O=await t(_,I);O===br&&u.set(I,O),a[I]=O,m--,await h()}catch(_){if(r)g(_);else{c.push(_),m--;try{await h()}catch(O){g(O)}}}})()};(async()=>{for(let x=0;x<n;x++){try{await h()}catch(I){g(I);break}if(p||f)break}})()})}var br=Symbol("skip");async function pt(e,t){return dt(e,n=>n(),t)}var j=b(require("@techor/log")),G=b(Tr());var pe=b(require("to-line"));var Wo=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],zo=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Ho=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Ko=["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?Ko:Ho:t.binary?zo:Wo;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 gi=b(Ir()),jt=b(require("fs")),hi=b(ci());var ui=["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 Ta={js:"cjs",cjs:"cjs",mjs:"esm",css:"css"},v=q(),{dependencies:fi,peerDependencies:li}=v,Ct=[];fi&&Ct.push(...Object.keys(fi));li&&Ct.push(...Object.keys(li));di.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",Ct).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",".mjs",".cjs",".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&&jt.default.existsSync(t.outdir)&&(jt.default.rmSync(t.outdir,{force:!0,recursive:!0}),console.log(""),j.default.d`Cleaned up the **${t.outdir}** output directory`);let r=[],i=(a,c)=>{let u=G.default.relative(t.outdir,a),f=G.default.join(t.srcdir,u);return G.default.changeExt(f,c)},o=async(a,c)=>{let u=c.format==="css",f=c.ext||c.outFile&&G.default.extname(c.outFile)||void 0,l=[...t.external,...t.extraExternal],p=c.outdir||t.outdir;t.bundle,c.softBundle&&l.push(".*");let m=[],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)ui.includes(g)||delete d[g];d.entryPoints=pi.default.sync([...new Set(a)].map(g=>(0,gi.default)(g))).filter(g=>!r.find(h=>h.options.entryPoints.includes(g)&&h.options.format===d.format&&(0,hi.default)(h.options.outExtension,d.outExtension)&&h.options.outdir===d.outdir));let y={options:d,run:async()=>{let g=await(0,mi.context)(d),{metafile:h}=await g.rebuild();if(h){console.log(""),y.metafile=h;for(let x in h.outputs){let I=h.outputs[x],_=_e(I.bytes).replace(/ /g,""),O=h.outputs[x].format=c.format;j.default`${j.chalk.dim("\u2502")} $t [${O}] **${x}** ${_} (${Object.keys(I.inputs).length} inputs)`}j.default.tree({entries:d.entryPoints,external:d.external,outdir:d.outdir,format:d.format,platform:d.platform,[Object.keys(d).filter(x=>d[x]===!0).map(x=>j.chalk.green("\u2713 ")+x).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([G.default.join(t.srcdir,"**/*.{js,ts,jsx,tsx}")],{format:a,platform:"node",outdir:G.default.join(t.outdir,a),softBundle:!0})),v.exports&&function a(c,u,f){if(typeof c=="string"){let l=G.default.extname(c);o([i(c,".{js,ts,jsx,tsx}")],{format:f.format||Ta[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}")],{format:"cjs",outFile:v.main}),v.module&&o([i(v.module,".{js,ts,jsx,tsx}")],{format:"esm",outFile:v.module}),v.browser&&o([i(v.browser,".{js,ts,jsx,tsx}")],{format:"iife",platform:"browser",outFile:v.browser}),v.bin)if(typeof v.bin=="string")o([i(v.bin,".{js,ts,jsx,tsx}")],{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}")],{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([G.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=()=>gr(pe.default`
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$/},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}",G.default.join(l,"index.{ts,js,mjs,jsx,tsx}")])[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:"ts"}}})}}}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",".js").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=[];t.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}")],{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}")],{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}")],{format:"cjs",outFile:v.main}),v.module&&o([i(v.module,".{js,ts,jsx,tsx}")],{format:"esm",outFile:v.module}),v.browser&&o([i(v.browser,".{js,ts,jsx,tsx}")],{format:"iife",platform:"browser",outFile:v.browser}),v.bin)if(typeof v.bin=="string")o([i(v.bin,".{js,ts,jsx,tsx}")],{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}")],{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`
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 pt(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;j.default.ok(pe.l`[${a.options.platform}] **${c}** ${f} (${l})`)}):j.default.ok(pe.l`[${a.options.format}] **${a.outFile}** (${a.options.format})`);console.log(""),t.watch?j.default`Start watching ${r.length} build tasks`:j.default.success`${r.length} build tasks`,console.log(""),t.watch&&s&&await s.run()});var{version:_a,name:Pa,description:Ia}=q(yi.default.join(__dirname,"../../package.json"));At.program.name(Pa).description(Ia).version(_a);At.program.parse();
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();
16
16
  /*! Bundled license information:
17
17
 
18
18
  normalize-path/index.js: