aronrepo 1.2.0 → 1.3.0

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