@nice-move/cli 0.11.13 → 0.11.15

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/368.mjs DELETED
@@ -1 +0,0 @@
1
- export const id=368;export const ids=[368];export const modules={4078:(e,t,r)=>{const s=r(303),n=r(5111),i=r(9288),o=r(3585),a=(e,t={})=>{let r=[];if(Array.isArray(e))for(const s of e){const e=a.create(s,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(a.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};a.parse=(e,t={})=>o(e,t),a.stringify=(e,t={})=>s("string"==typeof e?a.parse(e,t):e,t),a.compile=(e,t={})=>("string"==typeof e&&(e=a.parse(e,t)),n(e,t)),a.expand=(e,t={})=>{"string"==typeof e&&(e=a.parse(e,t));let r=i(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},a.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?a.compile(e,t):a.expand(e,t),e.exports=a},5111:(e,t,r)=>{const s=r(2411),n=r(1811);e.exports=(e,t={})=>{const r=(e,i={})=>{const o=n.isInvalidBrace(i),a=!0===e.invalid&&!0===t.escapeInvalid,c=!0===o||!0===a,l=!0===t.escapeInvalid?"\\":"";let u="";if(!0===e.isOpen)return l+e.value;if(!0===e.isClose)return console.log("node.isClose",l,e.value),l+e.value;if("open"===e.type)return c?l+e.value:"(";if("close"===e.type)return c?l+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":c?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){const r=n.reduce(e.nodes),i=s(...r,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return r.length>1&&i.length>1?`(${i})`:i}if(e.nodes)for(const t of e.nodes)u+=r(t,e);return u};return r(e)}},803:e=>{e.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:"\xa0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},9288:(e,t,r)=>{const s=r(2411),n=r(303),i=r(1811),o=(e="",t="",r=!1)=>{const s=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return r?i.flatten(t).map((e=>`{${e}}`)):t;for(const n of e)if(Array.isArray(n))for(const e of n)s.push(o(e,t,r));else for(let e of t)!0===r&&"string"==typeof e&&(e=`{${e}}`),s.push(Array.isArray(e)?o(n,e,r):n+e);return i.flatten(s)};e.exports=(e,t={})=>{const r=void 0===t.rangeLimit?1e3:t.rangeLimit,a=(e,c={})=>{e.queue=[];let l=c,u=c.queue;for(;"brace"!==l.type&&"root"!==l.type&&l.parent;)l=l.parent,u=l.queue;if(e.invalid||e.dollar)return void u.push(o(u.pop(),n(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void u.push(o(u.pop(),["{}"]));if(e.nodes&&e.ranges>0){const a=i.reduce(e.nodes);if(i.exceedsLimit(...a,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=s(...a,t);return 0===c.length&&(c=n(e,t)),u.push(o(u.pop(),c)),void(e.nodes=[])}const p=i.encloseBrace(e);let d=e.queue,h=e;for(;"brace"!==h.type&&"root"!==h.type&&h.parent;)h=h.parent,d=h.queue;for(let t=0;t<e.nodes.length;t++){const r=e.nodes[t];"comma"!==r.type||"brace"!==e.type?"close"!==r.type?r.value&&"open"!==r.type?d.push(o(d.pop(),r.value)):r.nodes&&a(r,e):u.push(o(u.pop(),d,p)):(1===t&&d.push(""),d.push(""))}return d};return i.flatten(a(e))}},3585:(e,t,r)=>{const s=r(303),{MAX_LENGTH:n,CHAR_BACKSLASH:i,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_LEFT_PARENTHESES:l,CHAR_RIGHT_PARENTHESES:u,CHAR_LEFT_CURLY_BRACE:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:g,CHAR_SINGLE_QUOTE:m,CHAR_NO_BREAK_SPACE:y,CHAR_ZERO_WIDTH_NOBREAK_SPACE:E}=r(803);e.exports=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");const r=t||{},b="number"==typeof r.maxLength?Math.min(n,r.maxLength):n;if(e.length>b)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${b})`);const w={type:"root",input:e,nodes:[]},S=[w];let A=w,R=w,C=0;const v=e.length;let T,O=0,x=0;const k=()=>e[O++],_=e=>{if("text"===e.type&&"dot"===R.type&&(R.type="text"),!R||"text"!==R.type||"text"!==e.type)return A.nodes.push(e),e.parent=A,e.prev=R,R=e,e;R.value+=e.value};for(_({type:"bos"});O<v;)if(A=S[S.length-1],T=k(),T!==E&&T!==y)if(T!==i)if(T!==f)if(T!==h)if(T!==l)if(T!==u)if(T!==g&&T!==m&&T!==o)if(T!==p)if(T!==d)if(T===a&&x>0){if(A.ranges>0){A.ranges=0;const e=A.nodes.shift();A.nodes=[e,{type:"text",value:s(A)}]}_({type:"comma",value:T}),A.commas++}else if(T===c&&x>0&&0===A.commas){const e=A.nodes;if(0===x||0===e.length){_({type:"text",value:T});continue}if("dot"===R.type){if(A.range=[],R.value+=T,R.type="range",3!==A.nodes.length&&5!==A.nodes.length){A.invalid=!0,A.ranges=0,R.type="text";continue}A.ranges++,A.args=[];continue}if("range"===R.type){e.pop();const t=e[e.length-1];t.value+=R.value+T,R=t,A.ranges--;continue}_({type:"dot",value:T})}else _({type:"text",value:T});else{if("brace"!==A.type){_({type:"text",value:T});continue}const e="close";A=S.pop(),A.close=!0,_({type:e,value:T}),x--,A=S[S.length-1]}else{x++;const e=R.value&&"$"===R.value.slice(-1)||!0===A.dollar;A=_({type:"brace",open:!0,close:!1,dollar:e,depth:x,commas:0,ranges:0,nodes:[]}),S.push(A),_({type:"open",value:T})}else{const e=T;let r;for(!0!==t.keepQuotes&&(T="");O<v&&(r=k());)if(r!==i){if(r===e){!0===t.keepQuotes&&(T+=r);break}T+=r}else T+=r+k();_({type:"text",value:T})}else{if("paren"!==A.type){_({type:"text",value:T});continue}A=S.pop(),_({type:"text",value:T}),A=S[S.length-1]}else A=_({type:"paren",nodes:[]}),S.push(A),_({type:"text",value:T});else{let e;for(C++;O<v&&(e=k());)if(T+=e,e!==h)if(e!==i){if(e===f&&(C--,0===C))break}else T+=k();else C++;_({type:"text",value:T})}else _({type:"text",value:"\\"+T});else _({type:"text",value:(t.keepEscaping?T:"")+k()});do{if(A=S.pop(),"root"!==A.type){A.nodes.forEach((e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)}));const e=S[S.length-1],t=e.nodes.indexOf(A);e.nodes.splice(t,1,...A.nodes)}}while(S.length>0);return _({type:"eos"}),w}},303:(e,t,r)=>{const s=r(1811);e.exports=(e,t={})=>{const r=(e,n={})=>{const i=t.escapeInvalid&&s.isInvalidBrace(n),o=!0===e.invalid&&!0===t.escapeInvalid;let a="";if(e.value)return(i||o)&&s.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(const t of e.nodes)a+=r(t);return a};return r(e)}},1811:(e,t)=>{t.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),t.find=(e,t)=>e.nodes.find((e=>e.type===t)),t.exceedsLimit=(e,r,s=1,n)=>!1!==n&&(!(!t.isInteger(e)||!t.isInteger(r))&&(Number(r)-Number(e))/Number(s)>=n),t.escapeNode=(e,t=0,r)=>{const s=e.nodes[t];s&&(r&&s.type===r||"open"===s.type||"close"===s.type)&&!0!==s.escaped&&(s.value="\\"+s.value,s.escaped=!0)},t.encloseBrace=e=>"brace"===e.type&&(!(e.commas>>0+e.ranges)&&(e.invalid=!0,!0)),t.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges?(!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0):(e.invalid=!0,!0))),t.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),t.reduce=e=>e.reduce(((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e)),[]),t.flatten=(...e)=>{const t=[],r=e=>{for(let s=0;s<e.length;s++){const n=e[s];Array.isArray(n)?r(n):void 0!==n&&t.push(n)}return t};return r(e),t}},526:(e,t,r)=>{const s=r(5317),n=r(4705),i=r(2369);function o(e,t,r){const o=n(e,t,r),a=s.spawn(o.command,o.args,o.options);return i.hookChildProcess(a,o),a}e.exports=o,e.exports.spawn=o,e.exports.sync=function(e,t,r){const o=n(e,t,r),a=s.spawnSync(o.command,o.args,o.options);return a.error=a.error||i.verifyENOENTSync(a.status,o),a},e.exports._parse=n,e.exports._enoent=i},2369:e=>{const t="win32"===process.platform;function r(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 s(e,s){return t&&1===e&&!s.file?r(s.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;const n=e.emit;e.emit=function(t,i){if("exit"===t){const t=s(i,r);if(t)return n.call(e,"error",t)}return n.apply(e,arguments)}},verifyENOENT:s,verifyENOENTSync:function(e,s){return t&&1===e&&!s.file?r(s.original,"spawnSync"):null},notFoundError:r}},4705:(e,t,r)=>{const s=r(6928),n=r(6694),i=r(1192),o=r(3179),a="win32"===process.platform,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function u(e){if(!a)return e;const t=function(e){e.file=n(e);const t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(e),r=!c.test(t);if(e.options.forceShell||r){const r=l.test(t);e.command=s.normalize(e.command),e.command=i.command(e.command),e.args=e.args.map((e=>i.argument(e,r)));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const s={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?s:u(s)}},1192:e=>{const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e=e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},3179:(e,t,r)=>{const s=r(9896),n=r(600);e.exports=function(e){const t=Buffer.alloc(150);let r;try{r=s.openSync(e,"r"),s.readSync(r,t,0,150,0),s.closeSync(r)}catch(e){}return n(t.toString())}},6694:(e,t,r)=>{const s=r(6928),n=r(1905),i=r(9695);function o(e,t){const r=e.options.env||process.env,o=process.cwd(),a=null!=e.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}let l;try{l=n.sync(e.command,{path:r[i({env:r})],pathExt:t?s.delimiter:void 0})}catch(e){}finally{c&&process.chdir(o)}return l&&(l=s.resolve(a?e.options.cwd:"",l)),l}e.exports=function(e){return o(e)||o(e,!0)}},6800:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let s=0,n=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(s++,"%c"===e&&(n=s))})),t.splice(n,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(415)(t);const{formatters:s}=e.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},415:(e,t,r)=>{e.exports=function(e){function t(e){let r,n,i,o=null;function a(...e){if(!a.enabled)return;const s=a,n=Number(new Date),i=n-(r||n);s.diff=i,s.prev=r,s.curr=n,r=n,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,n)=>{if("%%"===r)return"%";o++;const i=t.formatters[n];if("function"==typeof i){const t=e[o];r=i.call(s,t),e.splice(o,1),o--}return r})),t.formatArgs.call(s,e);(s.log||t.log).apply(s,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=s,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(n!==t.namespaces&&(n=t.namespaces,i=t.enabled(e)),i),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function s(e,r){const s=t(this.namespace+(void 0===r?":":r)+e);return s.log=this.log,s}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const s=("string"==typeof e?e:"").split(/[\s,]+/),n=s.length;for(r=0;r<n;r++)s[r]&&("-"===(e=s[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,s;for(r=0,s=t.skips.length;r<s;r++)if(t.skips[r].test(e))return!1;for(r=0,s=t.names.length;r<s;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(7821),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},7124:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(6800):e.exports=r(7698)},7698:(e,t,r)=>{const s=r(2018),n=r(9023);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let s=0;s<r.length;s++)e.inspectOpts[r[s]]=t.inspectOpts[r[s]]},t.log=function(...e){return process.stderr.write(n.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(r){const{namespace:s,useColors:n}=this;if(n){const t=this.color,n="\x1b[3"+(t<8?t:"8;5;"+t),i=` ${n};1m${s} \x1b[0m`;r[0]=i+r[0].split("\n").join("\n"+i),r.push(n+"m+"+e.exports.humanize(this.diff)+"\x1b[0m")}else r[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+s+" "+r[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):s.isatty(process.stderr.fd)},t.destroy=n.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=r(1754);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let s=process.env[t];return s=!!/^(yes|on|true|enabled)$/i.test(s)||!/^(no|off|false|disabled)$/i.test(s)&&("null"===s?null:Number(s)),e[r]=s,e}),{}),e.exports=r(415)(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts)}},6296:e=>{var t=Object.prototype.hasOwnProperty,r="~";function s(){}function n(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,s,i,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var a=new n(s,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new s:delete e._events[t]}function a(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,s,n=[];if(0===this._eventsCount)return n;for(s in e=this._events)t.call(e,s)&&n.push(r?s.slice(1):s);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},a.prototype.listeners=function(e){var t=r?r+e:e,s=this._events[t];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,i=s.length,o=new Array(i);n<i;n++)o[n]=s[n].fn;return o},a.prototype.listenerCount=function(e){var t=r?r+e:e,s=this._events[t];return s?s.fn?1:s.length:0},a.prototype.emit=function(e,t,s,n,i,o){var a=r?r+e:e;if(!this._events[a])return!1;var c,l,u=this._events[a],p=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),p){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,s),!0;case 4:return u.fn.call(u.context,t,s,n),!0;case 5:return u.fn.call(u.context,t,s,n,i),!0;case 6:return u.fn.call(u.context,t,s,n,i,o),!0}for(l=1,c=new Array(p-1);l<p;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var d,h=u.length;for(l=0;l<h;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),p){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,s);break;case 4:u[l].fn.call(u[l].context,t,s,n);break;default:if(!c)for(d=1,c=new Array(p-1);d<p;d++)c[d-1]=arguments[d];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,s,n){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return o(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||n&&!a.once||s&&a.context!==s||o(this,i);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||n&&!a[c].once||s&&a[c].context!==s)&&l.push(a[c]);l.length?this._events[i]=1===l.length?l[0]:l:o(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&o(this,t)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},2411:(e,t,r)=>{const s=r(9023),n=r(4710),i=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),o=e=>"number"==typeof e||"string"==typeof e&&""!==e,a=e=>Number.isInteger(+e),c=e=>{let t=`${e}`,r=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++r];);return r>0},l=(e,t,r)=>{if(t>0){let r="-"===e[0]?"-":"";r&&(e=e.slice(1)),e=r+e.padStart(r?t-1:t,"0")}return!1===r?String(e):e},u=(e,t)=>{let r="-"===e[0]?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},p=(e,t,r,s)=>{if(r)return n(e,t,{wrap:!1,...s});let i=String.fromCharCode(e);return e===t?i:`[${i}-${String.fromCharCode(t)}]`},d=(e,t,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,s=r.capture?"":"?:";return t?`(${s}${e.join("|")})`:e.join("|")}return n(e,t,r)},h=(...e)=>new RangeError("Invalid range arguments: "+s.inspect(...e)),f=(e,t,r)=>{if(!0===r.strictRanges)throw h([e,t]);return[]},g=(e,t,r=1,s={})=>{let n=Number(e),i=Number(t);if(!Number.isInteger(n)||!Number.isInteger(i)){if(!0===s.strictRanges)throw h([e,t]);return[]}0===n&&(n=0),0===i&&(i=0);let o=n>i,a=String(e),f=String(t),g=String(r);r=Math.max(Math.abs(r),1);let m=c(a)||c(f)||c(g),y=m?Math.max(a.length,f.length,g.length):0,E=!1===m&&!1===((e,t,r)=>"string"==typeof e||"string"==typeof t||!0===r.stringify)(e,t,s),b=s.transform||(e=>t=>!0===e?Number(t):String(t))(E);if(s.toRegex&&1===r)return p(u(e,y),u(t,y),!0,s);let w={negatives:[],positives:[]},S=[],A=0;for(;o?n>=i:n<=i;)!0===s.toRegex&&r>1?w[(R=n)<0?"negatives":"positives"].push(Math.abs(R)):S.push(l(b(n,A),y,E)),n=o?n-r:n+r,A++;var R;return!0===s.toRegex?r>1?((e,t,r)=>{e.negatives.sort(((e,t)=>e<t?-1:e>t?1:0)),e.positives.sort(((e,t)=>e<t?-1:e>t?1:0));let s,n=t.capture?"":"?:",i="",o="";return e.positives.length&&(i=e.positives.map((e=>u(String(e),r))).join("|")),e.negatives.length&&(o=`-(${n}${e.negatives.map((e=>u(String(e),r))).join("|")})`),s=i&&o?`${i}|${o}`:i||o,t.wrap?`(${n}${s})`:s})(w,s,y):d(S,null,{wrap:!1,...s}):S},m=(e,t,r,s={})=>{if(null==t&&o(e))return[e];if(!o(e)||!o(t))return f(e,t,s);if("function"==typeof r)return m(e,t,1,{transform:r});if(i(r))return m(e,t,0,r);let n={...s};return!0===n.capture&&(n.wrap=!0),r=r||n.step||1,a(r)?a(e)&&a(t)?g(e,t,r,n):((e,t,r=1,s={})=>{if(!a(e)&&e.length>1||!a(t)&&t.length>1)return f(e,t,s);let n=s.transform||(e=>String.fromCharCode(e)),i=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),c=i>o,l=Math.min(i,o),u=Math.max(i,o);if(s.toRegex&&1===r)return p(l,u,!1,s);let h=[],g=0;for(;c?i>=o:i<=o;)h.push(n(i,g)),i=c?i-r:i+r,g++;return!0===s.toRegex?d(h,null,{wrap:!1,options:s}):h})(e,t,Math.max(Math.abs(r),1),n):null==r||i(r)?m(e,t,1,r):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(r,n)};e.exports=m},4891:e=>{e.exports=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",s=t.indexOf(r+e),n=t.indexOf("--");return-1!==s&&(-1===n||s<n)}},9789:e=>{e.exports=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}},9344:(e,t,r)=>{var s;r(9896);function n(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,s){n(e,t||{},(function(e,t){e?s(e):r(t)}))}))}s(e,t||{},(function(e,s){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,s=!1),r(e,s)}))}s="win32"===process.platform||global.TESTING_WINDOWS?r(8541):r(709),e.exports=n,n.sync=function(e,t){try{return s.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},709:(e,t,r)=>{e.exports=n,n.sync=function(e,t){return i(s.statSync(e),t)};var s=r(9896);function n(e,t,r){s.stat(e,(function(e,s){r(e,!e&&i(s,t))}))}function i(e,t){return e.isFile()&&function(e,t){var r=e.mode,s=e.uid,n=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),o=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c;return r&l||r&c&&n===o||r&a&&s===i||r&u&&0===i}(e,t)}},8541:(e,t,r)=>{e.exports=i,i.sync=function(e,t){return n(s.statSync(e),e,t)};var s=r(9896);function n(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var s=0;s<r.length;s++){var n=r[s].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}(t,r)}function i(e,t,r){s.stat(e,(function(s,i){r(s,!s&&n(i,e,t))}))}},1404:(e,t,r)=>{const{PassThrough:s}=r(2203);e.exports=function(){var e=[],t=new s({objectMode:!0});return t.setMaxListeners(0),t.add=r,t.isEmpty=function(){return 0==e.length},t.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(r),t;function r(s){return Array.isArray(s)?(s.forEach(r),this):(e.push(s),s.once("end",n.bind(null,s)),s.once("error",t.emit.bind(t,"error")),s.pipe(t,{end:!1}),this)}function n(r){!(e=e.filter((function(e){return e!==r}))).length&&t.readable&&t.end()}}},1723:(e,t,r)=>{const s=r(9023),n=r(4078),i=r(5562),o=r(6927),a=e=>""===e||"./"===e,c=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let s=new Set,n=new Set,o=new Set,a=0,c=e=>{o.add(e.output),r&&r.onResult&&r.onResult(e)};for(let o=0;o<t.length;o++){let l=i(String(t[o]),{...r,onResult:c},!0),u=l.state.negated||l.state.negatedExtglob;u&&a++;for(let t of e){let e=l(t,!0);(u?!e.isMatch:e.isMatch)&&(u?s.add(e.output):(s.delete(e.output),n.add(e.output)))}}let l=(a===t.length?[...o]:[...n]).filter((e=>!s.has(e)));if(r&&0===l.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map((e=>e.replace(/\\/g,""))):t}return l};c.match=c,c.matcher=(e,t)=>i(e,t),c.any=c.isMatch=(e,t,r)=>i(t,r)(e),c.not=(e,t,r={})=>{t=[].concat(t).map(String);let s=new Set,n=[],i=new Set(c(e,t,{...r,onResult:e=>{r.onResult&&r.onResult(e),n.push(e.output)}}));for(let e of n)i.has(e)||s.add(e);return[...s]},c.contains=(e,t,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${s.inspect(e)}"`);if(Array.isArray(t))return t.some((t=>c.contains(e,t,r)));if("string"==typeof t){if(a(e)||a(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return c.isMatch(e,t,{...r,contains:!0})},c.matchKeys=(e,t,r)=>{if(!o.isObject(e))throw new TypeError("Expected the first argument to be an object");let s=c(Object.keys(e),t,r),n={};for(let t of s)n[t]=e[t];return n},c.some=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),r);if(s.some((e=>t(e))))return!0}return!1},c.every=(e,t,r)=>{let s=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),r);if(!s.every((e=>t(e))))return!1}return!0},c.all=(e,t,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${s.inspect(e)}"`);return[].concat(t).every((t=>i(t,r)(e)))},c.capture=(e,t,r)=>{let s=o.isWindows(r),n=i.makeRe(String(e),{...r,capture:!0}).exec(s?o.toPosixSlashes(t):t);if(n)return n.slice(1).map((e=>void 0===e?"":e))},c.makeRe=(...e)=>i.makeRe(...e),c.scan=(...e)=>i.scan(...e),c.parse=(e,t)=>{let r=[];for(let s of[].concat(e||[]))for(let e of n(String(s),t))r.push(i.parse(e,t));return r},c.braces=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return t&&!0===t.nobrace||!/\{.*\}/.test(e)?[e]:n(e,t)},c.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return c.braces(e,{...t,expand:!0})},e.exports=c},7821:e=>{var t=1e3,r=60*t,s=60*r,n=24*s,i=7*n,o=365.25*n;function a(e,t,r,s){var n=t>=1.5*r;return Math.round(e/r)+" "+s+(n?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*n;case"hours":case"hour":case"hrs":case"hr":case"h":return c*s;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var i=Math.abs(e);if(i>=n)return a(e,i,n,"day");if(i>=s)return a(e,i,s,"hour");if(i>=r)return a(e,i,r,"minute");if(i>=t)return a(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=n)return Math.round(e/n)+"d";if(i>=s)return Math.round(e/s)+"h";if(i>=r)return Math.round(e/r)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9695:e=>{const t=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};e.exports=t,e.exports.default=t},5562:(e,t,r)=>{e.exports=r(8996)},4751:(e,t,r)=>{const s=r(6928),n="\\\\/",i=`[^${n}]`,o="\\.",a="\\/",c="[^/]",l=`(?:${a}|$)`,u=`(?:^|${a})`,p=`${o}{1,2}${l}`,d={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:a,ONE_CHAR:"(?=.)",QMARK:c,END_ANCHOR:l,DOTS_SLASH:p,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${u}${p})`,NO_DOT_SLASH:`(?!${o}{0,1}${l})`,NO_DOTS_SLASH:`(?!${p})`,QMARK_NO_DOT:`[^.${a}]`,STAR:`${c}*?`,START_ANCHOR:u},h={...d,SLASH_LITERAL:`[${n}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${o}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${n}])${o}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?h:d}},5453:(e,t,r)=>{const s=r(4751),n=r(6927),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:l}=s,u=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>n.escapeRegex(e))).join("..")}return r},p=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=l[e]||e;const r={...t},h="number"==typeof r.maxLength?Math.min(i,r.maxLength):i;let f=e.length;if(f>h)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${h}`);const g={type:"bos",value:"",output:r.prepend||""},m=[g],y=r.capture?"":"?:",E=n.isWindows(t),b=s.globChars(E),w=s.extglobChars(b),{DOT_LITERAL:S,PLUS_LITERAL:A,SLASH_LITERAL:R,ONE_CHAR:C,DOTS_SLASH:v,NO_DOT:T,NO_DOT_SLASH:O,NO_DOTS_SLASH:x,QMARK:k,QMARK_NO_DOT:_,STAR:L,START_ANCHOR:P}=b,I=e=>`(${y}(?:(?!${P}${e.dot?v:S}).)*?)`,$=r.dot?"":T,B=r.dot?k:_;let D=!0===r.bash?I(r):L;r.capture&&(D=`(${D})`),"boolean"==typeof r.noext&&(r.noextglob=r.noext);const F={input:e,index:-1,start:0,dot:!0===r.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:m};e=n.removePrefix(e,F),f=e.length;const H=[],M=[],N=[];let G,U=g;const j=()=>F.index===f-1,K=F.peek=(t=1)=>e[F.index+t],W=F.advance=()=>e[++F.index]||"",z=()=>e.slice(F.index+1),Y=(e="",t=0)=>{F.consumed+=e,F.index+=t},q=e=>{F.output+=null!=e.output?e.output:e.value,Y(e.value)},V=()=>{let e=1;for(;"!"===K()&&("("!==K(2)||"?"===K(3));)W(),F.start++,e++;return e%2!=0&&(F.negated=!0,F.start++,!0)},X=e=>{F[e]++,N.push(e)},Q=e=>{F[e]--,N.pop()},Z=e=>{if("globstar"===U.type){const t=F.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||H.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(F.output=F.output.slice(0,-U.output.length),U.type="star",U.value="*",U.output=D,F.output+=U.output)}if(H.length&&"paren"!==e.type&&(H[H.length-1].inner+=e.value),(e.value||e.output)&&q(e),U&&"text"===U.type&&"text"===e.type)return U.value+=e.value,void(U.output=(U.output||"")+e.value);e.prev=U,m.push(e),U=e},J=(e,t)=>{const s={...w[t],conditions:1,inner:""};s.prev=U,s.parens=F.parens,s.output=F.output;const n=(r.capture?"(":"")+s.open;X("parens"),Z({type:e,value:t,output:F.output?"":C}),Z({type:"paren",extglob:!0,value:W(),output:n}),H.push(s)},ee=e=>{let s,n=e.close+(r.capture?")":"");if("negate"===e.type){let i=D;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(i=I(r)),(i!==D||j()||/^\)+$/.test(z()))&&(n=e.close=`)$))${i}`),e.inner.includes("*")&&(s=z())&&/^\.[^\\/.]+$/.test(s)){const r=d(s,{...t,fastpaths:!1}).output;n=e.close=`)${r})${i})`}"bos"===e.prev.type&&(F.negatedExtglob=!0)}Z({type:"paren",extglob:!0,value:G,output:n}),Q("parens")};if(!1!==r.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let s=!1,i=e.replace(c,((e,t,r,n,i,o)=>"\\"===n?(s=!0,e):"?"===n?t?t+n+(i?k.repeat(i.length):""):0===o?B+(i?k.repeat(i.length):""):k.repeat(r.length):"."===n?S.repeat(r.length):"*"===n?t?t+n+(i?D:""):D:t?e:`\\${e}`));return!0===s&&(i=!0===r.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),i===e&&!0===r.contains?(F.output=e,F):(F.output=n.wrapOutput(i,F,t),F)}for(;!j();){if(G=W(),"\0"===G)continue;if("\\"===G){const e=K();if("/"===e&&!0!==r.bash)continue;if("."===e||";"===e)continue;if(!e){G+="\\",Z({type:"text",value:G});continue}const t=/^\\+/.exec(z());let s=0;if(t&&t[0].length>2&&(s=t[0].length,F.index+=s,s%2!=0&&(G+="\\")),!0===r.unescape?G=W():G+=W(),0===F.brackets){Z({type:"text",value:G});continue}}if(F.brackets>0&&("]"!==G||"["===U.value||"[^"===U.value)){if(!1!==r.posix&&":"===G){const e=U.value.slice(1);if(e.includes("[")&&(U.posix=!0,e.includes(":"))){const e=U.value.lastIndexOf("["),t=U.value.slice(0,e),r=U.value.slice(e+2),s=o[r];if(s){U.value=t+s,F.backtrack=!0,W(),g.output||1!==m.indexOf(U)||(g.output=C);continue}}}("["===G&&":"!==K()||"-"===G&&"]"===K())&&(G=`\\${G}`),"]"!==G||"["!==U.value&&"[^"!==U.value||(G=`\\${G}`),!0===r.posix&&"!"===G&&"["===U.value&&(G="^"),U.value+=G,q({value:G});continue}if(1===F.quotes&&'"'!==G){G=n.escapeRegex(G),U.value+=G,q({value:G});continue}if('"'===G){F.quotes=1===F.quotes?0:1,!0===r.keepQuotes&&Z({type:"text",value:G});continue}if("("===G){X("parens"),Z({type:"paren",value:G});continue}if(")"===G){if(0===F.parens&&!0===r.strictBrackets)throw new SyntaxError(p("opening","("));const e=H[H.length-1];if(e&&F.parens===e.parens+1){ee(H.pop());continue}Z({type:"paren",value:G,output:F.parens?")":"\\)"}),Q("parens");continue}if("["===G){if(!0!==r.nobracket&&z().includes("]"))X("brackets");else{if(!0!==r.nobracket&&!0===r.strictBrackets)throw new SyntaxError(p("closing","]"));G=`\\${G}`}Z({type:"bracket",value:G});continue}if("]"===G){if(!0===r.nobracket||U&&"bracket"===U.type&&1===U.value.length){Z({type:"text",value:G,output:`\\${G}`});continue}if(0===F.brackets){if(!0===r.strictBrackets)throw new SyntaxError(p("opening","["));Z({type:"text",value:G,output:`\\${G}`});continue}Q("brackets");const e=U.value.slice(1);if(!0===U.posix||"^"!==e[0]||e.includes("/")||(G=`/${G}`),U.value+=G,q({value:G}),!1===r.literalBrackets||n.hasRegexChars(e))continue;const t=n.escapeRegex(U.value);if(F.output=F.output.slice(0,-U.value.length),!0===r.literalBrackets){F.output+=t,U.value=t;continue}U.value=`(${y}${t}|${U.value})`,F.output+=U.value;continue}if("{"===G&&!0!==r.nobrace){X("braces");const e={type:"brace",value:G,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};M.push(e),Z(e);continue}if("}"===G){const e=M[M.length-1];if(!0===r.nobrace||!e){Z({type:"text",value:G,output:G});continue}let t=")";if(!0===e.dots){const e=m.slice(),s=[];for(let t=e.length-1;t>=0&&(m.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&s.unshift(e[t].value);t=u(s,r),F.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=F.output.slice(0,e.outputIndex),s=F.tokens.slice(e.tokensIndex);e.value=e.output="\\{",G=t="\\}",F.output=r;for(const e of s)F.output+=e.output||e.value}Z({type:"brace",value:G,output:t}),Q("braces"),M.pop();continue}if("|"===G){H.length>0&&H[H.length-1].conditions++,Z({type:"text",value:G});continue}if(","===G){let e=G;const t=M[M.length-1];t&&"braces"===N[N.length-1]&&(t.comma=!0,e="|"),Z({type:"comma",value:G,output:e});continue}if("/"===G){if("dot"===U.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",m.pop(),U=g;continue}Z({type:"slash",value:G,output:R});continue}if("."===G){if(F.braces>0&&"dot"===U.type){"."===U.value&&(U.output=S);const e=M[M.length-1];U.type="dots",U.output+=G,U.value+=G,e.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==U.type&&"slash"!==U.type){Z({type:"text",value:G,output:S});continue}Z({type:"dot",value:G,output:S});continue}if("?"===G){if(!(U&&"("===U.value)&&!0!==r.noextglob&&"("===K()&&"?"!==K(2)){J("qmark",G);continue}if(U&&"paren"===U.type){const e=K();let t=G;if("<"===e&&!n.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===U.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(z()))&&(t=`\\${G}`),Z({type:"text",value:G,output:t});continue}if(!0!==r.dot&&("slash"===U.type||"bos"===U.type)){Z({type:"qmark",value:G,output:_});continue}Z({type:"qmark",value:G,output:k});continue}if("!"===G){if(!0!==r.noextglob&&"("===K()&&("?"!==K(2)||!/[!=<:]/.test(K(3)))){J("negate",G);continue}if(!0!==r.nonegate&&0===F.index){V();continue}}if("+"===G){if(!0!==r.noextglob&&"("===K()&&"?"!==K(2)){J("plus",G);continue}if(U&&"("===U.value||!1===r.regex){Z({type:"plus",value:G,output:A});continue}if(U&&("bracket"===U.type||"paren"===U.type||"brace"===U.type)||F.parens>0){Z({type:"plus",value:G});continue}Z({type:"plus",value:A});continue}if("@"===G){if(!0!==r.noextglob&&"("===K()&&"?"!==K(2)){Z({type:"at",extglob:!0,value:G,output:""});continue}Z({type:"text",value:G});continue}if("*"!==G){"$"!==G&&"^"!==G||(G=`\\${G}`);const e=a.exec(z());e&&(G+=e[0],F.index+=e[0].length),Z({type:"text",value:G});continue}if(U&&("globstar"===U.type||!0===U.star)){U.type="star",U.star=!0,U.value+=G,U.output=D,F.backtrack=!0,F.globstar=!0,Y(G);continue}let t=z();if(!0!==r.noextglob&&/^\([^?]/.test(t)){J("star",G);continue}if("star"===U.type){if(!0===r.noglobstar){Y(G);continue}const s=U.prev,n=s.prev,i="slash"===s.type||"bos"===s.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===r.bash&&(!i||t[0]&&"/"!==t[0])){Z({type:"star",value:G,output:""});continue}const a=F.braces>0&&("comma"===s.type||"brace"===s.type),c=H.length&&("pipe"===s.type||"paren"===s.type);if(!i&&"paren"!==s.type&&!a&&!c){Z({type:"star",value:G,output:""});continue}for(;"/**"===t.slice(0,3);){const r=e[F.index+4];if(r&&"/"!==r)break;t=t.slice(3),Y("/**",3)}if("bos"===s.type&&j()){U.type="globstar",U.value+=G,U.output=I(r),F.output=U.output,F.globstar=!0,Y(G);continue}if("slash"===s.type&&"bos"!==s.prev.type&&!o&&j()){F.output=F.output.slice(0,-(s.output+U.output).length),s.output=`(?:${s.output}`,U.type="globstar",U.output=I(r)+(r.strictSlashes?")":"|$)"),U.value+=G,F.globstar=!0,F.output+=s.output+U.output,Y(G);continue}if("slash"===s.type&&"bos"!==s.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";F.output=F.output.slice(0,-(s.output+U.output).length),s.output=`(?:${s.output}`,U.type="globstar",U.output=`${I(r)}${R}|${R}${e})`,U.value+=G,F.output+=s.output+U.output,F.globstar=!0,Y(G+W()),Z({type:"slash",value:"/",output:""});continue}if("bos"===s.type&&"/"===t[0]){U.type="globstar",U.value+=G,U.output=`(?:^|${R}|${I(r)}${R})`,F.output=U.output,F.globstar=!0,Y(G+W()),Z({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-U.output.length),U.type="globstar",U.output=I(r),U.value+=G,F.output+=U.output,F.globstar=!0,Y(G);continue}const s={type:"star",value:G,output:D};!0!==r.bash?!U||"bracket"!==U.type&&"paren"!==U.type||!0!==r.regex?(F.index!==F.start&&"slash"!==U.type&&"dot"!==U.type||("dot"===U.type?(F.output+=O,U.output+=O):!0===r.dot?(F.output+=x,U.output+=x):(F.output+=$,U.output+=$),"*"!==K()&&(F.output+=C,U.output+=C)),Z(s)):(s.output=G,Z(s)):(s.output=".*?","bos"!==U.type&&"slash"!==U.type||(s.output=$+s.output),Z(s))}for(;F.brackets>0;){if(!0===r.strictBrackets)throw new SyntaxError(p("closing","]"));F.output=n.escapeLast(F.output,"["),Q("brackets")}for(;F.parens>0;){if(!0===r.strictBrackets)throw new SyntaxError(p("closing",")"));F.output=n.escapeLast(F.output,"("),Q("parens")}for(;F.braces>0;){if(!0===r.strictBrackets)throw new SyntaxError(p("closing","}"));F.output=n.escapeLast(F.output,"{"),Q("braces")}if(!0===r.strictSlashes||"star"!==U.type&&"bracket"!==U.type||Z({type:"maybe_slash",value:"",output:`${R}?`}),!0===F.backtrack){F.output="";for(const e of F.tokens)F.output+=null!=e.output?e.output:e.value,e.suffix&&(F.output+=e.suffix)}return F};d.fastpaths=(e,t)=>{const r={...t},o="number"==typeof r.maxLength?Math.min(i,r.maxLength):i,a=e.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);e=l[e]||e;const c=n.isWindows(t),{DOT_LITERAL:u,SLASH_LITERAL:p,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:f,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:E}=s.globChars(c),b=r.dot?g:f,w=r.dot?m:f,S=r.capture?"":"?:";let A=!0===r.bash?".*?":y;r.capture&&(A=`(${A})`);const R=e=>!0===e.noglobstar?A:`(${S}(?:(?!${E}${e.dot?h:u}).)*?)`,C=e=>{switch(e){case"*":return`${b}${d}${A}`;case".*":return`${u}${d}${A}`;case"*.*":return`${b}${A}${u}${d}${A}`;case"*/*":return`${b}${A}${p}${d}${w}${A}`;case"**":return b+R(r);case"**/*":return`(?:${b}${R(r)}${p})?${w}${d}${A}`;case"**/*.*":return`(?:${b}${R(r)}${p})?${w}${A}${u}${d}${A}`;case"**/.*":return`(?:${b}${R(r)}${p})?${u}${d}${A}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=C(t[1]);if(!r)return;return r+u+t[2]}}},v=n.removePrefix(e,{negated:!1,prefix:""});let T=C(v);return T&&!0!==r.strictSlashes&&(T+=`${p}?`),T},e.exports=d},8996:(e,t,r)=>{const s=r(6928),n=r(3297),i=r(5453),o=r(6927),a=r(4751),c=(e,t,r=!1)=>{if(Array.isArray(e)){const s=e.map((e=>c(e,t,r))),n=e=>{for(const t of s){const r=t(e);if(r)return r}return!1};return n}const s=(n=e)&&"object"==typeof n&&!Array.isArray(n)&&e.tokens&&e.input;var n;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},a=o.isWindows(t),l=s?c.compileRe(e,t):c.makeRe(e,t,!1,!0),u=l.state;delete l.state;let p=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};p=c(i.ignore,e,r)}const d=(r,s=!1)=>{const{isMatch:n,match:o,output:d}=c.test(r,l,t,{glob:e,posix:a}),h={glob:e,state:u,regex:l,posix:a,input:r,output:d,match:o,isMatch:n};return"function"==typeof i.onResult&&i.onResult(h),!1===n?(h.isMatch=!1,!!s&&h):p(r)?("function"==typeof i.onIgnore&&i.onIgnore(h),h.isMatch=!1,!!s&&h):("function"==typeof i.onMatch&&i.onMatch(h),!s||h)};return r&&(d.state=u),d};c.test=(e,t,r,{glob:s,posix:n}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const i=r||{},a=i.format||(n?o.toPosixSlashes:null);let l=e===s,u=l&&a?a(e):e;return!1===l&&(u=a?a(e):e,l=u===s),!1!==l&&!0!==i.capture||(l=!0===i.matchBase||!0===i.basename?c.matchBase(e,t,r,n):t.exec(u)),{isMatch:Boolean(l),match:l,output:u}},c.matchBase=(e,t,r,n=o.isWindows(r))=>(t instanceof RegExp?t:c.makeRe(t,r)).test(s.basename(e)),c.isMatch=(e,t,r)=>c(t,r)(e),c.parse=(e,t)=>Array.isArray(e)?e.map((e=>c.parse(e,t))):i(e,{...t,fastpaths:!1}),c.scan=(e,t)=>n(e,t),c.compileRe=(e,t,r=!1,s=!1)=>{if(!0===r)return e.output;const n=t||{},i=n.contains?"":"^",o=n.contains?"":"$";let a=`${i}(?:${e.output})${o}`;e&&!0===e.negated&&(a=`^(?!${a}).*$`);const l=c.toRegex(a,t);return!0===s&&(l.state=e),l},c.makeRe=(e,t={},r=!1,s=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(n.output=i.fastpaths(e,t)),n.output||(n=i(e,t)),c.compileRe(n,t,r,s)},c.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},c.constants=a,e.exports=c},3297:(e,t,r)=>{const s=r(6927),{CHAR_ASTERISK:n,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:l,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:f,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:E}=r(4751),b=e=>e===u||e===o,w=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const r=t||{},S=e.length-1,A=!0===r.parts||!0===r.scanToEnd,R=[],C=[],v=[];let T,O,x=e,k=-1,_=0,L=0,P=!1,I=!1,$=!1,B=!1,D=!1,F=!1,H=!1,M=!1,N=!1,G=!1,U=0,j={value:"",depth:0,isGlob:!1};const K=()=>k>=S,W=()=>(T=O,x.charCodeAt(++k));for(;k<S;){let e;if(O=W(),O!==o){if(!0===F||O===p){for(U++;!0!==K()&&(O=W());)if(O!==o)if(O!==p){if(!0!==F&&O===c&&(O=W())===c){if(P=j.isBrace=!0,$=j.isGlob=!0,G=!0,!0===A)continue;break}if(!0!==F&&O===a){if(P=j.isBrace=!0,$=j.isGlob=!0,G=!0,!0===A)continue;break}if(O===m&&(U--,0===U)){F=!1,P=j.isBrace=!0,G=!0;break}}else U++;else H=j.backslashes=!0,W();if(!0===A)continue;break}if(O!==u){if(!0!==r.noext){if(!0===(O===f||O===i||O===n||O===g||O===l)&&x.charCodeAt(k+1)===d){if($=j.isGlob=!0,B=j.isExtglob=!0,G=!0,O===l&&k===_&&(N=!0),!0===A){for(;!0!==K()&&(O=W());)if(O!==o){if(O===y){$=j.isGlob=!0,G=!0;break}}else H=j.backslashes=!0,O=W();continue}break}}if(O===n){if(T===n&&(D=j.isGlobstar=!0),$=j.isGlob=!0,G=!0,!0===A)continue;break}if(O===g){if($=j.isGlob=!0,G=!0,!0===A)continue;break}if(O===h){for(;!0!==K()&&(e=W());)if(e!==o){if(e===E){I=j.isBracket=!0,$=j.isGlob=!0,G=!0;break}}else H=j.backslashes=!0,W();if(!0===A)continue;break}if(!0===r.nonegate||O!==l||k!==_){if(!0!==r.noparen&&O===d){if($=j.isGlob=!0,!0===A){for(;!0!==K()&&(O=W());)if(O!==d){if(O===y){G=!0;break}}else H=j.backslashes=!0,O=W();continue}break}if(!0===$){if(G=!0,!0===A)continue;break}}else M=j.negated=!0,_++}else{if(R.push(k),C.push(j),j={value:"",depth:0,isGlob:!1},!0===G)continue;if(T===c&&k===_+1){_+=2;continue}L=k+1}}else H=j.backslashes=!0,O=W(),O===p&&(F=!0)}!0===r.noext&&(B=!1,$=!1);let z=x,Y="",q="";_>0&&(Y=x.slice(0,_),x=x.slice(_),L-=_),z&&!0===$&&L>0?(z=x.slice(0,L),q=x.slice(L)):!0===$?(z="",q=x):z=x,z&&""!==z&&"/"!==z&&z!==x&&b(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),!0===r.unescape&&(q&&(q=s.removeBackslashes(q)),z&&!0===H&&(z=s.removeBackslashes(z)));const V={prefix:Y,input:e,start:_,base:z,glob:q,isBrace:P,isBracket:I,isGlob:$,isExtglob:B,isGlobstar:D,negated:M,negatedExtglob:N};if(!0===r.tokens&&(V.maxDepth=0,b(O)||C.push(j),V.tokens=C),!0===r.parts||!0===r.tokens){let t;for(let s=0;s<R.length;s++){const n=t?t+1:_,i=R[s],o=e.slice(n,i);r.tokens&&(0===s&&0!==_?(C[s].isPrefix=!0,C[s].value=Y):C[s].value=o,w(C[s]),V.maxDepth+=C[s].depth),0===s&&""===o||v.push(o),t=i}if(t&&t+1<e.length){const s=e.slice(t+1);v.push(s),r.tokens&&(C[C.length-1].value=s,w(C[C.length-1]),V.maxDepth+=C[C.length-1].depth)}V.slashes=R,V.parts=v}return V}},6927:(e,t,r)=>{const s=r(6928),n="win32"===process.platform,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=r(4751);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>a.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(c,"\\$1"),t.toPosixSlashes=e=>e.replace(i,"/"),t.removeBackslashes=e=>e.replace(o,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===n||"\\"===s.sep,t.escapeLast=(e,r,s)=>{const n=e.lastIndexOf(r,s);return-1===n?e:"\\"===e[n-1]?t.escapeLast(e,r,n-1):`${e.slice(0,n)}\\${e.slice(n)}`},t.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},t.wrapOutput=(e,t={},r={})=>{let s=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s}},6454:(e,t,r)=>{String.prototype.startsWith||(String.prototype.startsWith=function(e){return this.substring(0,e.length)===e});var s=r(6179);e.exports=function(e,t,r){var n,i,o;if("function"==typeof t&&(r=t,t=void 0),"function"!=typeof r)return n=s,i=e,o=t,new Promise((function(e,t){n(i,o,(function(r,s){if(r)return t(r);e(s)}))}));s(e,t,r)}},2775:(e,t,r)=>{var s=r(5317).spawn;e.exports=function(e,t,r,n){"function"==typeof r&&(n=r,r=void 0);var i=!1,o=s(e,t,r),a="",c="";o.stdout.on("data",(function(e){a+=e.toString()})),o.stderr.on("data",(function(e){c+=e.toString()})),o.on("error",(function(e){i||(i=!0,n(new Error(e)))})),o.on("close",(function(e){if(!i){if(i=!0,c=function(e){if(e)return(e=(e=e.trim()).replace(/your \d+x\d+ screen size is bogus\. expect trouble/gi,"")).trim()}(c))return n(new Error(c));n(null,a,e)}}))}},4182:(e,t,r)=>{var s=r(857),n={ps:()=>r(433),wmic:()=>r(7868)},i=s.platform();i.startsWith("win")&&(i="win");var o={darwin:"ps",sunos:"ps",freebsd:"ps",netbsd:"ps",win:"wmic",linux:"ps",aix:"ps"}[i];e.exports=function(e){void 0===o&&e(new Error(s.platform()+" is not supported yet, please open an issue (https://github.com/simonepri/pidtree)")),n[o]()(e)}},6179:(e,t,r)=>{var s=r(4182);e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),"object"!=typeof t&&(t={}),e=parseInt(e,10),isNaN(e)||e<-1?r(new TypeError("The pid provided is invalid")):s((function(s,n){if(s)r(s);else if(-1!==e){for(var i,o=0;o<n.length;o++){if(n[o][1]===e){i=t.advanced?{ppid:n[o][0],pid:e}:e;break}n[o][0]===e&&(i=t.advanced?{pid:e}:e)}if(i){for(var a={};n.length>0;){var c=n.pop();a[c[0]]?a[c[0]].push(c[1]):a[c[0]]=[c[1]]}for(var l=0,u=[i];l<u.length;){var p=t.advanced?u[l++].pid:u[l++];if(a[p]){for(var d=a[p].length,h=0;h<d;h++)u.push(t.advanced?{ppid:p,pid:a[p][h]}:a[p][h]);delete a[p]}}t.root||u.shift(),r(null,u)}else r(new Error("No matching pid found"))}else{for(var f=0;f<n.length;f++)n[f]=t.advanced?{ppid:n[f][0],pid:n[f][1]}:n[f]=n[f][1];r(null,n)}}))}},433:(e,t,r)=>{var s=r(857),n=r(2775);e.exports=function(e){n("ps",["-A","-o","ppid,pid"],(function(t,r,n){if(t)return e(t);if(0!==n)return e(new Error("pidtree ps command exited with code "+n));try{r=r.split(s.EOL);for(var i=[],o=1;o<r.length;o++)r[o]=r[o].trim(),r[o]&&(r[o]=r[o].split(/\s+/),r[o][0]=parseInt(r[o][0],10),r[o][1]=parseInt(r[o][1],10),i.push(r[o]));e(null,i)}catch(t){e(t)}}))}},7868:(e,t,r)=>{var s=r(857),n=r(2775);e.exports=function(e){n("wmic",["PROCESS","get","ParentProcessId,ProcessId"],{windowsHide:!0,windowsVerbatimArguments:!0},(function(t,r,n){if(t)e(t);else if(0===n)try{r=r.split(s.EOL);for(var i=[],o=1;o<r.length;o++)r[o]=r[o].trim(),r[o]&&(r[o]=r[o].split(/\s+/),r[o][0]=parseInt(r[o][0],10),r[o][1]=parseInt(r[o][1],10),i.push(r[o]));e(null,i)}catch(t){e(t)}else e(new Error("pidtree wmic command exited with code "+n))}))}},1135:e=>{function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){return(e=e||{}).circles?function(e){var r=[],s=[];return e.proto?function e(i){if("object"!=typeof i||null===i)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return n(i,e);if(i instanceof Map)return new Map(n(Array.from(i),e));if(i instanceof Set)return new Set(n(Array.from(i),e));var o={};for(var a in r.push(i),s.push(o),i){var c=i[a];if("object"!=typeof c||null===c)o[a]=c;else if(c instanceof Date)o[a]=new Date(c);else if(c instanceof Map)o[a]=new Map(n(Array.from(c),e));else if(c instanceof Set)o[a]=new Set(n(Array.from(c),e));else if(ArrayBuffer.isView(c))o[a]=t(c);else{var l=r.indexOf(c);o[a]=-1!==l?s[l]:e(c)}}return r.pop(),s.pop(),o}:function e(i){if("object"!=typeof i||null===i)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return n(i,e);if(i instanceof Map)return new Map(n(Array.from(i),e));if(i instanceof Set)return new Set(n(Array.from(i),e));var o={};for(var a in r.push(i),s.push(o),i)if(!1!==Object.hasOwnProperty.call(i,a)){var c=i[a];if("object"!=typeof c||null===c)o[a]=c;else if(c instanceof Date)o[a]=new Date(c);else if(c instanceof Map)o[a]=new Map(n(Array.from(c),e));else if(c instanceof Set)o[a]=new Set(n(Array.from(c),e));else if(ArrayBuffer.isView(c))o[a]=t(c);else{var l=r.indexOf(c);o[a]=-1!==l?s[l]:e(c)}}return r.pop(),s.pop(),o};function n(e,n){for(var i=Object.keys(e),o=new Array(i.length),a=0;a<i.length;a++){var c=i[a],l=e[c];if("object"!=typeof l||null===l)o[c]=l;else if(l instanceof Date)o[c]=new Date(l);else if(ArrayBuffer.isView(l))o[c]=t(l);else{var u=r.indexOf(l);o[c]=-1!==u?s[u]:n(l)}}return o}}(e):e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,e);if(s instanceof Map)return new Map(r(Array.from(s),e));if(s instanceof Set)return new Set(r(Array.from(s),e));var n={};for(var i in s){var o=s[i];"object"!=typeof o||null===o?n[i]=o:o instanceof Date?n[i]=new Date(o):o instanceof Map?n[i]=new Map(r(Array.from(o),e)):o instanceof Set?n[i]=new Set(r(Array.from(o),e)):ArrayBuffer.isView(o)?n[i]=t(o):n[i]=e(o)}return n}:function e(s){if("object"!=typeof s||null===s)return s;if(s instanceof Date)return new Date(s);if(Array.isArray(s))return r(s,e);if(s instanceof Map)return new Map(r(Array.from(s),e));if(s instanceof Set)return new Set(r(Array.from(s),e));var n={};for(var i in s)if(!1!==Object.hasOwnProperty.call(s,i)){var o=s[i];"object"!=typeof o||null===o?n[i]=o:o instanceof Date?n[i]=new Date(o):o instanceof Map?n[i]=new Map(r(Array.from(o),e)):o instanceof Set?n[i]=new Set(r(Array.from(o),e)):ArrayBuffer.isView(o)?n[i]=t(o):n[i]=e(o)}return n};function r(e,r){for(var s=Object.keys(e),n=new Array(s.length),i=0;i<s.length;i++){var o=s[i],a=e[o];"object"!=typeof a||null===a?n[o]=a:a instanceof Date?n[o]=new Date(a):ArrayBuffer.isView(a)?n[o]=t(a):n[o]=r(a)}return n}}},600:(e,t,r)=>{const s=r(7257);e.exports=(e="")=>{const t=e.match(s);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return"env"===i?n:n?`${i} ${n}`:i}},7257:e=>{e.exports=/^#!(.*)/},1754:(e,t,r)=>{const s=r(857),n=r(4891),i=process.env;let o;function a(e){const t=function(e){if(!1===o)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(e&&!e.isTTY&&!0!==o)return 0;const t=o?1:0;if("win32"===process.platform){const e=s.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in i))||"codeship"===i.CI_NAME?1:t;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:(i.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}n("no-color")||n("no-colors")||n("color=false")?o=!1:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(o=!0),"FORCE_COLOR"in i&&(o=0===i.FORCE_COLOR.length||0!==parseInt(i.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},4710:(e,t,r)=>{const s=r(9789),n=(e,t,r)=>{if(!1===s(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===s(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...r};"boolean"==typeof i.strictZeros&&(i.relaxZeros=!1===i.strictZeros);let c=e+":"+t+"="+String(i.relaxZeros)+String(i.shorthand)+String(i.capture)+String(i.wrap);if(n.cache.hasOwnProperty(c))return n.cache[c].result;let l=Math.min(e,t),u=Math.max(e,t);if(1===Math.abs(l-u)){let r=e+"|"+t;return i.capture?`(${r})`:!1===i.wrap?r:`(?:${r})`}let p=f(e)||f(t),d={min:e,max:t,a:l,b:u},h=[],g=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),l<0){g=o(u<0?Math.abs(u):1,Math.abs(l),d,i),l=d.a=0}return u>=0&&(h=o(l,u,d,i)),d.negatives=g,d.positives=h,d.result=function(e,t,r){let s=a(e,t,"-",!1,r)||[],n=a(t,e,"",!1,r)||[],i=a(e,t,"-?",!0,r)||[];return s.concat(i).concat(n).join("|")}(g,h,i),!0===i.capture?d.result=`(${d.result})`:!1!==i.wrap&&h.length+g.length>1&&(d.result=`(?:${d.result})`),n.cache[c]=d,d.result};function i(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let s=function(e,t){let r=[];for(let s=0;s<e.length;s++)r.push([e[s],t[s]]);return r}(e,t),n=s.length,i="",o=0;for(let e=0;e<n;e++){let[t,n]=s[e];t===n?i+=t:"0"!==t||"9"!==n?i+=h(t,n,r):o++}return o&&(i+=!0===r.shorthand?"\\d":"[0-9]"),{pattern:i,count:[o],digits:n}}function o(e,t,r,s){let n,o=function(e,t){let r=1,s=1,n=u(e,r),i=new Set([t]);for(;e<=n&&n<=t;)i.add(n),r+=1,n=u(e,r);for(n=p(t+1,s)-1;e<n&&n<=t;)i.add(n),s+=1,n=p(t+1,s)-1;return i=[...i],i.sort(c),i}(e,t),a=[],l=e;for(let e=0;e<o.length;e++){let t=o[e],c=i(String(l),String(t),s),u="";r.isPadded||!n||n.pattern!==c.pattern?(r.isPadded&&(u=g(t,r,s)),c.string=u+c.pattern+d(c.count),a.push(c),l=t+1,n=c):(n.count.length>1&&n.count.pop(),n.count.push(c.count[0]),n.string=n.pattern+d(n.count),l=t+1)}return a}function a(e,t,r,s,n){let i=[];for(let n of e){let{string:e}=n;s||l(t,"string",e)||i.push(r+e),s&&l(t,"string",e)&&i.push(r+e)}return i}function c(e,t){return e>t?1:t>e?-1:0}function l(e,t,r){return e.some((e=>e[t]===r))}function u(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function p(e,t){return e-e%Math.pow(10,t)}function d(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function h(e,t,r){return`[${e}${t-e==1?"":"-"}${t}]`}function f(e){return/^-?(0+)\d/.test(e)}function g(e,t,r){if(!t.isPadded)return e;let s=Math.abs(t.maxLen-String(e).length),n=!1!==r.relaxZeros;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${s}}`:`0{${s}}`}}n.cache={},n.clearCache=()=>n.cache={},e.exports=n},1905:(e,t,r)=>{const s="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,n=r(6928),i=s?";":":",o=r(9344),a=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),c=(e,t)=>{const r=t.colon||i,n=e.match(/\//)||s&&e.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=s?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=s?o.split(r):[""];return s&&-1!==e.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:n,pathExt:a,pathExtExe:o}},l=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:s,pathExt:i,pathExtExe:l}=c(e,t),u=[],p=r=>new Promise(((i,o)=>{if(r===s.length)return t.all&&u.length?i(u):o(a(e));const c=s[r],l=/^".*"$/.test(c)?c.slice(1,-1):c,p=n.join(l,e),h=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;i(d(h,r,0))})),d=(e,r,s)=>new Promise(((n,a)=>{if(s===i.length)return n(p(r+1));const c=i[s];o(e+c,{pathExt:l},((i,o)=>{if(!i&&o){if(!t.all)return n(e+c);u.push(e+c)}return n(d(e,r,s+1))}))}));return r?p(0).then((e=>r(null,e)),r):p(0)};e.exports=l,l.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:s,pathExtExe:i}=c(e,t),l=[];for(let a=0;a<r.length;a++){const c=r[a],u=/^".*"$/.test(c)?c.slice(1,-1):c,p=n.join(u,e),d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;for(let e=0;e<s.length;e++){const r=d+s[e];try{if(o.sync(r,{pathExt:i})){if(!t.all)return r;l.push(r)}}catch(e){}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw a(e)}},4368:(e,t,r)=>{r.d(t,{default:()=>ii});var s=r(7124),n=r(7975),i=r(5441);const o=r(6296);var a=r(2018),c=r.t(a,2);const{env:l={},argv:u=[],platform:p=""}="undefined"==typeof process?{}:process,d="NO_COLOR"in l||u.includes("--no-color"),h="FORCE_COLOR"in l||u.includes("--color"),f="win32"===p,g="dumb"===l.TERM,m=c&&a.isatty&&a.isatty(1)&&l.TERM&&!g,y=!d&&(h||f&&!g||m||"CI"in l&&("GITHUB_ACTIONS"in l||"GITLAB_CI"in l||"CIRCLECI"in l)),E=(e,t,r,s,n=t.substring(0,e)+s,i=t.substring(e+r.length),o=i.indexOf(r))=>n+(o<0?i:E(o,i,r,s)),b=(e,t,r=e,s=e.length+1)=>n=>n||""!==n&&void 0!==n?((e,t,r,s,n)=>e<0?r+t+s:r+E(e,t,s,n)+s)((""+n).indexOf(t,s),n,e,t,r):"",w=(e,t,r)=>b(`\x1b[${e}m`,`\x1b[${t}m`,r),S={reset:w(0,0),bold:w(1,22,"\x1b[22m\x1b[1m"),dim:w(2,22,"\x1b[22m\x1b[2m"),italic:w(3,23),underline:w(4,24),inverse:w(7,27),hidden:w(8,28),strikethrough:w(9,29),black:w(30,39),red:w(31,39),green:w(32,39),yellow:w(33,39),blue:w(34,39),magenta:w(35,39),cyan:w(36,39),white:w(37,39),gray:w(90,39),bgBlack:w(40,49),bgRed:w(41,49),bgGreen:w(42,49),bgYellow:w(43,49),bgBlue:w(44,49),bgMagenta:w(45,49),bgCyan:w(46,49),bgWhite:w(47,49),blackBright:w(90,39),redBright:w(91,39),greenBright:w(92,39),yellowBright:w(93,39),blueBright:w(94,39),magentaBright:w(95,39),cyanBright:w(96,39),whiteBright:w(97,39),bgBlackBright:w(100,49),bgRedBright:w(101,49),bgGreenBright:w(102,49),bgYellowBright:w(103,49),bgBlueBright:w(104,49),bgMagentaBright:w(105,49),bgCyanBright:w(106,49),bgWhiteBright:w(107,49)},A=({useColor:e=y}={})=>e?S:Object.keys(S).reduce(((e,t)=>({...e,[t]:String})),{}),{reset:R,bold:C,dim:v,italic:T,underline:O,inverse:x,hidden:k,strikethrough:_,black:L,red:P,green:I,yellow:$,blue:B,magenta:D,cyan:F,white:H,gray:M,bgBlack:N,bgRed:G,bgGreen:U,bgYellow:j,bgBlue:K,bgMagenta:W,bgCyan:z,bgWhite:Y,blackBright:q,redBright:V,greenBright:X,yellowBright:Q,blueBright:Z,magentaBright:J,cyanBright:ee,whiteBright:te,bgBlackBright:re,bgRedBright:se,bgGreenBright:ne,bgYellowBright:ie,bgBlueBright:oe,bgMagentaBright:ae,bgCyanBright:ce,bgWhiteBright:le}=A();var ue=r(9023),pe=r(857),de=r(3193),he=r(2203),fe=r(1135),ge=r(6982),me=Object.defineProperty,ye=(e,t)=>me(e,"name",{value:t,configurable:!0}),Ee={CURSOR_HIDE:"\x1b[?25l",CURSOR_SHOW:"\x1b[?25h"},be=(e=>(e.WAITING="WAITING",e.STARTED="STARTED",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.SKIPPED="SKIPPED",e.ROLLING_BACK="ROLLING_BACK",e.ROLLED_BACK="ROLLED_BACK",e.RETRY="RETRY",e.PAUSED="PAUSED",e.PROMPT="PROMPT",e.PROMPT_COMPLETED="PROMPT_COMPLETED",e.PROMPT_FAILED="PROMPT_FAILED",e))(be||{}),we=class{static{ye(this,"EventManager")}emitter=new o;emit(e,t){this.emitter.emit(e,t)}on(e,t){this.emitter.addListener(e,t)}once(e,t){this.emitter.once(e,t)}off(e,t){this.emitter.off(e,t)}complete(){this.emitter.removeAllListeners()}};(class{static{ye(this,"BaseEventMap")}});function Se(e){return!!e&&"object"==typeof e&&"function"==typeof e.lift&&"function"==typeof e.subscribe}function Ae(e){return!!e&&"object"==typeof e&&!0===e.readable&&"function"==typeof e.read&&"function"==typeof e.on}function Re(){return!!process.env.LISTR_FORCE_UNICODE||"win32"!==process.platform||!!process.env.CI||!!process.env.WT_SESSION||"vscode"===process.env.TERM_PROGRAM||"xterm-256color"===process.env.TERM||"alacritty"===process.env.TERM}ye(Se,"isObservable"),ye(Ae,"isReadable"),ye(Re,"isUnicodeSupported");var Ce=/\u0007/;function ve(e){return String(e).replace(new RegExp("(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+","gmi"),"").replace(new RegExp(Ce,"gmi"),"").trim()}ye(ve,"cleanseAnsi");var Te=A();function Oe(e,t){return e.replace(/^(?!\s*$)/gm," ".repeat(t))}ye(Oe,"indent");var xe={warning:"\u26a0",cross:"\u2716",arrowDown:"\u2193",tick:"\u2714",arrowRight:"\u2192",pointer:"\u276f",checkboxOn:"\u2612",arrowLeft:"\u2190",squareSmallFilled:"\u25fc",pointerSmall:"\u203a"},ke={...xe,warning:"\u203c",cross:"\xd7",tick:"\u221a",pointer:">",checkboxOn:"[\xd7]",squareSmallFilled:"\u25a0"},_e=Re()?xe:ke;function Le(e,...t){return(0,ue.format)(String(e),...t)}ye(Le,"splat");var Pe={STARTED:_e.pointer,FAILED:_e.cross,SKIPPED:_e.arrowDown,COMPLETED:_e.tick,OUTPUT:_e.pointerSmall,TITLE:_e.arrowRight,RETRY:_e.warning,ROLLBACK:_e.arrowLeft,PAUSED:_e.squareSmallFilled},Ie={STARTED:Te.yellow,FAILED:Te.red,SKIPPED:Te.yellow,COMPLETED:Te.green,RETRY:Te.yellowBright,ROLLBACK:Te.redBright,PAUSED:Te.yellowBright},$e=["RETRY","ROLLBACK","FAILED"],Be=class{constructor(e){this.options=e,this.options={useIcons:!0,toStderr:[],...e??{}},this.options.fields??={},this.options.fields.prefix??=[],this.options.fields.suffix??=[],this.process=this.options.processOutput??new He}static{ye(this,"ListrLogger")}process;log(e,t,r){const s=this.format(e,t,r);this.options.toStderr.includes(e)?this.process.toStderr(s):this.process.toStdout(s)}toStdout(e,t,r=!0){this.process.toStdout(this.format(null,e,t),r)}toStderr(e,t,r=!0){this.process.toStderr(this.format(null,e,t),r)}wrap(e,t){return e?this.applyFormat(`[${e}]`,t):e}splat(...e){const t=e.shift()??"";return 0===e.length?t:Le(t,e)}suffix(e,...t){return t.filter(Boolean).forEach((t=>{if(e+=this.spacing(e),"string"==typeof t)e+=this.wrap(t);else if("object"==typeof t){if(t.args??=[],"function"==typeof t.condition?!t.condition(...t.args):!(t.condition??1))return e;e+=this.wrap("function"==typeof t.field?t.field(...t.args):t.field,{format:t?.format(...t.args)})}})),e}prefix(e,...t){return t.filter(Boolean).forEach((t=>{if(e=this.spacing(e)+e,"string"==typeof t)e=this.wrap(t)+e;else if("object"==typeof t){if(t.args??=[],"function"==typeof t.condition?!t.condition(...t.args):!(t.condition??1))return e;e=this.wrap("function"==typeof t.field?t.field(...t.args):t.field,{format:t?.format()})+e}})),e}fields(e,t){return this.options?.fields?.prefix&&(e=this.prefix(e,...this.options.fields.prefix)),t?.prefix&&(e=this.prefix(e,...t.prefix)),t?.suffix&&(e=this.suffix(e,...t.suffix)),this.options?.fields?.suffix&&(e=this.suffix(e,...this.options.fields.suffix)),e}icon(e,t){if(!e)return null;t||=this.options.icon?.[e];const r=this.options.color?.[e];return t&&r&&(t=r(t)),t}format(e,t,r){return Array.isArray(t)||(t=[t]),t=this.splat(t.shift(),...t).toString().split(pe.EOL).filter((e=>!e||""!==e.trim())).map((t=>this.style(e,this.fields(t,{prefix:Array.isArray(r?.prefix)?r.prefix:[r?.prefix],suffix:Array.isArray(r?.suffix)?r.suffix:[r?.suffix]})))).join(pe.EOL)}style(e,t){if(!e||!t)return t;const r=this.icon(e,!this.options.useIcons&&this.wrap(e));return r&&(t=r+" "+t),t}applyFormat(e,t){return t?.format?t.format(e):e}spacing(e){return void 0===e||""===e.trim()?"":" "}},De=class{constructor(e){this.options=e}static{ye(this,"ProcessOutputBuffer")}buffer=[];decoder=new de.StringDecoder;get all(){return this.buffer}get last(){return this.buffer.at(-1)}get length(){return this.buffer.length}write(e,...t){const r=t[t.length-1];return this.buffer.push({time:Date.now(),stream:this.options?.stream,entry:this.decoder.write("string"==typeof e?Buffer.from(e,"string"==typeof t[0]?t[0]:void 0):Buffer.from(e))}),this.options?.limit&&(this.buffer=this.buffer.slice(-this.options.limit)),"function"==typeof r&&r(),!0}reset(){this.buffer=[]}},Fe=class{constructor(e){this.stream=e,this.method=e.write,this.buffer=new De({stream:e})}static{ye(this,"ProcessOutputStream")}method;buffer;get out(){return Object.assign({},this.stream,{write:this.write.bind(this)})}hijack(){this.stream.write=this.buffer.write.bind(this.buffer)}release(){this.stream.write=this.method;const e=[...this.buffer.all];return this.buffer.reset(),e}write(...e){return this.method.apply(this.stream,e)}},He=class{constructor(e,t,r){this.options=r,this.stream={stdout:new Fe(e??process.stdout),stderr:new Fe(t??process.stderr)},this.options={dump:["stdout","stderr"],leaveEmptyLine:!0,...r}}static{ye(this,"ProcessOutput")}stream;active;get stdout(){return this.stream.stdout.out}get stderr(){return this.stream.stderr.out}hijack(){if(this.active)throw new Error("ProcessOutput has been already hijacked!");this.stream.stdout.write(Ee.CURSOR_HIDE),Object.values(this.stream).forEach((e=>e.hijack())),this.active=!0}release(){const e=Object.entries(this.stream).map((([e,t])=>({name:e,buffer:t.release()}))).filter((e=>this.options.dump.includes(e.name))).flatMap((e=>e.buffer)).sort(((e,t)=>e.time-t.time)).map((e=>({...e,entry:ve(e.entry)}))).filter((e=>e.entry));e.length>0&&(this.options.leaveEmptyLine&&this.stdout.write(pe.EOL),e.forEach((e=>{(e.stream??this.stdout).write(e.entry+pe.EOL)}))),this.stream.stdout.write(Ee.CURSOR_SHOW),this.active=!1}toStdout(e,t=!0){return t&&(e+=pe.EOL),this.stream.stdout.write(e)}toStderr(e,t=!0){return t&&(e+=pe.EOL),this.stream.stderr.write(e)}};function Me(e){const t=new he.Writable;return t.write=t=>(e(t.toString()),!0),t}ye(Me,"createWritable");(class{constructor(e,t){this.task=e,this.wrapper=t}static{ye(this,"ListrPromptAdapter")}state;reportStarted(){if(this.state=this.task.state,this.task.prompt)throw new ct("There is already an active prompt attached to this task which may not be cleaned up properly.");this.task.prompt=this,this.task.state$="PROMPT"}reportFailed(){this.task.state$="PROMPT_FAILED",this.restoreState()}reportCompleted(){this.task.state$="PROMPT_COMPLETED",this.restoreState()}restoreState(){this.task.prompt=void 0,this.state&&(this.task.state=this.state)}});var Ne=class{static{ye(this,"Spinner")}spinner=Re()?["\u280b","\u2819","\u2839","\u2838","\u283c","\u2834","\u2826","\u2827","\u2807","\u280f"]:["-","\\","|","/"];id;spinnerPosition=0;spin(){this.spinnerPosition=++this.spinnerPosition%this.spinner.length}fetch(){return this.spinner[this.spinnerPosition]}isRunning(){return!!this.id}start(e,t=100){this.id=setInterval((()=>{this.spin(),e&&e()}),t)}stop(){clearInterval(this.id)}},Ge={SKIPPED_WITH_COLLAPSE:_e.arrowDown,SKIPPED_WITHOUT_COLLAPSE:_e.warning,OUTPUT:_e.pointerSmall,OUTPUT_WITH_BOTTOMBAR:_e.pointerSmall,PENDING:_e.pointer,COMPLETED:_e.tick,COMPLETED_WITH_FAILED_SUBTASKS:_e.warning,COMPLETED_WITH_SISTER_TASKS_FAILED:_e.squareSmallFilled,RETRY:_e.warning,ROLLING_BACK:_e.warning,ROLLED_BACK:_e.arrowLeft,FAILED:_e.cross,FAILED_WITH_SUBTASKS:_e.pointer,WAITING:_e.squareSmallFilled,PAUSED:_e.squareSmallFilled},Ue={SKIPPED_WITH_COLLAPSE:Te.yellow,SKIPPED_WITHOUT_COLLAPSE:Te.yellow,PENDING:Te.yellow,COMPLETED:Te.green,COMPLETED_WITH_FAILED_SUBTASKS:Te.yellow,COMPLETED_WITH_SISTER_TASKS_FAILED:Te.red,RETRY:Te.yellowBright,ROLLING_BACK:Te.redBright,ROLLED_BACK:Te.redBright,FAILED:Te.red,FAILED_WITH_SUBTASKS:Te.red,WAITING:Te.dim,PAUSED:Te.yellowBright};function je(e){const t=Math.floor(e/1e3),r=Math.floor(t/60);let s;return 0===t&&0===r&&(s=`0.${Math.floor(e/100)}s`),t>0&&(s=t%60+"s"),r>0&&(s=`${r}m${s}`),s}ye(je,"parseTimer");var Ke={condition:!0,field:je,format:()=>Te.dim};function We(){const e=new Date;return String(e.getHours()).padStart(2,"0")+":"+String(e.getMinutes()).padStart(2,"0")+":"+String(e.getSeconds()).padStart(2,"0")}ye(We,"parseTimestamp");var ze=class e{constructor(t,r,s){this.tasks=t,this.options=r,this.events=s,this.options={...e.rendererOptions,...this.options,icon:{...Ge,...r?.icon??{}},color:{...Ue,...r?.color??{}}},this.spinner=this.options.spinner??new Ne,this.logger=this.options.logger??new Be({useIcons:!0,toStderr:[]}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color}static{ye(this,"DefaultRenderer")}static nonTTY=!1;static rendererOptions={indentation:2,clearOutput:!1,showSubtasks:!0,collapseSubtasks:!0,collapseSkips:!0,showSkipMessage:!0,suffixSkips:!1,collapseErrors:!0,showErrorMessage:!0,suffixRetries:!0,lazy:!1,removeEmptyLines:!0,formatOutput:"wrap",pausedTimer:{...Ke,format:()=>Te.yellowBright}};static rendererTaskOptions={outputBar:!0};prompt;activePrompt;spinner;logger;updater;truncate;wrap;buffer={output:new Map,bottom:new Map};cache={render:new Map,rendererOptions:new Map,rendererTaskOptions:new Map};async render(){const{createLogUpdate:e}=await Promise.all([r.e(421),r.e(782),r.e(445)]).then(r.bind(r,9445)),{default:t}=await Promise.all([r.e(421),r.e(145)]).then(r.bind(r,5145)),{default:s}=await Promise.all([r.e(421),r.e(782)]).then(r.bind(r,782));this.updater=e(this.logger.process.stdout),this.truncate=t,this.wrap=s,this.logger.process.hijack(),this.options?.lazy||this.spinner.start((()=>{this.update()})),this.events.on("SHOUD_REFRESH_RENDER",(()=>{this.update()}))}update(){this.updater(this.create())}end(){this.spinner.stop(),this.updater.clear(),this.updater.done(),this.options.clearOutput||this.logger.process.toStdout(this.create({prompt:!1})),this.logger.process.release()}create(e){e={tasks:!0,bottomBar:!0,prompt:!0,...e};const t=[],r=this.renderer(this.tasks),s=this.renderBottomBar(),n=this.renderPrompt();return e.tasks&&r.length>0&&t.push(...r),e.bottomBar&&s.length>0&&(t.length>0&&t.push(""),t.push(...s)),e.prompt&&n.length>0&&(t.length>0&&t.push(""),t.push(...n)),t.join(pe.EOL)}style(e,t=!1){const r=this.cache.rendererOptions.get(e.id);if(e.isSkipped()){if(t||r.collapseSkips)return this.logger.icon("SKIPPED_WITH_COLLAPSE");if(!1===r.collapseSkips)return this.logger.icon("SKIPPED_WITHOUT_COLLAPSE")}if(t)return this.shouldOutputToBottomBar(e)?this.logger.icon("OUTPUT_WITH_BOTTOMBAR"):this.logger.icon("OUTPUT");if(e.hasSubtasks()){if(e.isStarted()||e.isPrompt()&&!1!==r.showSubtasks&&!e.subtasks.every((e=>!e.hasTitle())))return this.logger.icon("PENDING");if(e.isCompleted()&&e.subtasks.some((e=>e.hasFailed())))return this.logger.icon("COMPLETED_WITH_FAILED_SUBTASKS");if(e.hasFailed())return this.logger.icon("FAILED_WITH_SUBTASKS")}return e.isStarted()||e.isPrompt()?this.logger.icon("PENDING",!this.options?.lazy&&this.spinner.fetch()):e.isCompleted()?this.logger.icon("COMPLETED"):e.isRetrying()?this.logger.icon("RETRY",!this.options?.lazy&&this.spinner.fetch()):e.isRollingBack()?this.logger.icon("ROLLING_BACK",!this.options?.lazy&&this.spinner.fetch()):e.hasRolledBack()?this.logger.icon("ROLLED_BACK"):e.hasFailed()?this.logger.icon("FAILED"):e.isPaused()?this.logger.icon("PAUSED"):this.logger.icon("WAITING")}format(e,t,r){if(""===e.trim())return[];let s;t&&(e=t+" "+e);const n=(process.stdout.columns??80)-r*this.options.indentation-2;switch(this.options.formatOutput){case"truncate":s=e.split(pe.EOL).map(((e,t)=>this.truncate(this.indent(e,t),n)));break;case"wrap":s=this.wrap(e,n,{hard:!0}).split(pe.EOL).map(((e,t)=>this.indent(e,t)));break;default:throw new at("Format option for the renderer is wrong.")}return this.options.removeEmptyLines&&(s=s.filter(Boolean)),s.map((e=>Oe(e,r*this.options.indentation)))}shouldOutputToOutputBar(e){const t=this.cache.rendererTaskOptions.get(e.id).outputBar;return"number"==typeof t&&0!==t||"boolean"==typeof t&&!1!==t}shouldOutputToBottomBar(e){const t=this.cache.rendererTaskOptions.get(e.id).bottomBar;return"number"==typeof t&&0!==t||"boolean"==typeof t&&!1!==t||!e.hasTitle()}renderer(e,t=0){return e.flatMap((r=>{if(!r.isEnabled())return[];if(this.cache.render.has(r.id))return this.cache.render.get(r.id);this.calculate(r),this.setupBuffer(r);const s=this.cache.rendererOptions.get(r.id),n=this.cache.rendererTaskOptions.get(r.id),i=[];if(r.isPrompt()){if(this.activePrompt&&this.activePrompt!==r.id)throw new at("Only one prompt can be active at the given time, please re-evaluate your task design.");this.activePrompt||(r.on("PROMPT",(e=>{const t=ve(e);t&&(this.prompt=t)})),r.on("STATE",(e=>{("PROMPT_COMPLETED"===e||r.hasFinalized()||r.hasReset())&&(this.prompt=null,this.activePrompt=null,r.off("PROMPT"))})),this.activePrompt=r.id)}if(r.hasTitle()&&(!e.some((e=>e.hasFailed()))||r.hasFailed()||!1===r.options.exitOnError||r.isCompleted()||r.isSkipped()?r.hasFailed()&&s.collapseErrors?i.push(...this.format(!r.hasSubtasks()&&r.message.error&&s.showErrorMessage?r.message.error:r.title,this.style(r),t)):r.isSkipped()&&s.collapseSkips?i.push(...this.format(this.logger.suffix(r.message.skip&&s.showSkipMessage?r.message.skip:r.title,{field:"SKIPPED",condition:s.suffixSkips,format:()=>Te.dim}),this.style(r),t)):r.isRetrying()?i.push(...this.format(this.logger.suffix(r.title,{field:`RETRY:${r.message.retry.count}`,format:()=>Te.yellow,condition:s.suffixRetries}),this.style(r),t)):r.isCompleted()&&r.hasTitle()&&tt(n.timer?.condition,r.message.duration)?i.push(...this.format(this.logger.suffix(r?.title,{...n.timer,args:[r.message.duration]}),this.style(r),t)):r.isPaused()?i.push(...this.format(this.logger.suffix(r.title,{...s.pausedTimer,args:[r.message.paused-Date.now()]}),this.style(r),t)):i.push(...this.format(r.title,this.style(r),t)):i.push(...this.format(r.title,this.logger.icon("COMPLETED_WITH_SISTER_TASKS_FAILED"),t))),r.hasSubtasks()&&s.showSubtasks||(!r.hasFailed()||!1!==s.collapseErrors||!s.showErrorMessage&&s.showSubtasks?!r.isSkipped()||!1!==s.collapseSkips||!s.showSkipMessage&&s.showSubtasks||i.push(...this.dump(r,t,"SKIPPED")):i.push(...this.dump(r,t,"FAILED"))),(r.isPending()||n.persistentOutput)&&i.push(...this.renderOutputBar(r,t)),!1!==s.showSubtasks&&r.hasSubtasks()&&(r.isPending()||r.hasFinalized()&&!r.hasTitle()||r.isCompleted()&&!1===s.collapseSubtasks&&!r.subtasks.some((e=>!0===this.cache.rendererOptions.get(e.id)?.collapseSubtasks))||r.subtasks.some((e=>!1===this.cache.rendererOptions.get(e.id)?.collapseSubtasks))||r.subtasks.some((e=>e.hasFailed()))||r.subtasks.some((e=>e.hasRolledBack())))){const e=r.hasTitle()?t+1:t,s=this.renderer(r.subtasks,e);i.push(...s)}return r.hasFinalized()&&(n.persistentOutput||(this.buffer.bottom.delete(r.id),this.buffer.output.delete(r.id))),r.isClosed()&&(this.cache.render.set(r.id,i),this.reset(r)),i}))}renderOutputBar(e,t){const r=this.buffer.output.get(e.id);return r?r.all.flatMap((r=>this.dump(e,t,"OUTPUT",r.entry))):[]}renderBottomBar(){return 0===this.buffer.bottom.size?[]:Array.from(this.buffer.bottom.values()).flatMap((e=>e.all)).sort(((e,t)=>e.time-t.time)).map((e=>e.entry))}renderPrompt(){return this.prompt?[this.prompt]:[]}calculate(t){if(this.cache.rendererOptions.has(t.id)&&this.cache.rendererTaskOptions.has(t.id))return;const r={...this.options,...t.rendererOptions};this.cache.rendererOptions.set(t.id,r),this.cache.rendererTaskOptions.set(t.id,{...e.rendererTaskOptions,timer:r.timer,...t.rendererTaskOptions})}setupBuffer(e){if(this.buffer.bottom.has(e.id)||this.buffer.output.has(e.id))return;const t=this.cache.rendererTaskOptions.get(e.id);this.shouldOutputToBottomBar(e)&&!this.buffer.bottom.has(e.id)?(this.buffer.bottom.set(e.id,new De({limit:"number"==typeof t.bottomBar?t.bottomBar:1})),e.on("OUTPUT",(t=>{const r=this.dump(e,-1,"OUTPUT",t);this.buffer.bottom.get(e.id).write(r.join(pe.EOL))})),e.on("STATE",(t=>{if("RETRY"===t)this.buffer.bottom.delete(e.id)}))):this.shouldOutputToOutputBar(e)&&!this.buffer.output.has(e.id)&&(this.buffer.output.set(e.id,new De({limit:"number"==typeof t.outputBar?t.outputBar:1})),e.on("OUTPUT",(t=>{this.buffer.output.get(e.id).write(t)})),e.on("STATE",(t=>{if("RETRY"===t)this.buffer.output.delete(e.id)})))}reset(e){this.cache.rendererOptions.delete(e.id),this.cache.rendererTaskOptions.delete(e.id),this.buffer.output.delete(e.id)}dump(e,t,r="OUTPUT",s){if(!s)switch(r){case"OUTPUT":s=e.output;break;case"SKIPPED":s=e.message.skip;break;case"FAILED":s=e.message.error}return e.hasTitle()&&"FAILED"===r&&s===e.title||"string"!=typeof s?[]:("OUTPUT"===r&&(s=ve(s)),this.format(s,this.style(e,!0),t+1))}indent(e,t){return t>0?Oe(e.trim(),this.options.indentation):e.trim()}},Ye=class{constructor(e,t){this.tasks=e,this.options=t}static{ye(this,"SilentRenderer")}static nonTTY=!0;static rendererOptions;static rendererTaskOptions;render(){}end(){}},qe=class e{constructor(t,r){this.tasks=t,this.options=r,this.options={...e.rendererOptions,...r,icon:{...Pe,...r?.icon??{}},color:{...Ie,...r?.color??{}}},this.logger=this.options.logger??new Be({useIcons:!0,toStderr:$e}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color,this.options.timestamp&&this.logger.options.fields.prefix.unshift(this.options.timestamp)}static{ye(this,"SimpleRenderer")}static nonTTY=!0;static rendererOptions={pausedTimer:{...Ke,field:e=>`PAUSED:${e}`,format:()=>Te.yellowBright}};static rendererTaskOptions={};logger;cache={rendererOptions:new Map,rendererTaskOptions:new Map};end(){}render(){this.renderer(this.tasks)}renderer(e){e.forEach((e=>{this.calculate(e),e.once("CLOSED",(()=>{this.reset(e)}));const t=this.cache.rendererOptions.get(e.id),r=this.cache.rendererTaskOptions.get(e.id);e.on("SUBTASK",(e=>{this.renderer(e)})),e.on("STATE",(t=>{if(e.hasTitle())if("STARTED"===t)this.logger.log("STARTED",e.title);else if("COMPLETED"===t){const t=r?.timer;this.logger.log("COMPLETED",e.title,t&&{suffix:{...t,condition:!!e.message?.duration&&t.condition,args:[e.message.duration]}})}else"PROMPT"===t?(this.logger.process.hijack(),e.on("PROMPT",(e=>{this.logger.process.toStderr(e,!1)}))):"PROMPT_COMPLETED"===t&&(e.off("PROMPT"),this.logger.process.release())})),e.on("OUTPUT",(e=>{this.logger.log("OUTPUT",e)})),e.on("MESSAGE",(r=>{if(r.error)this.logger.log("FAILED",e.title,{suffix:{field:`FAILED: ${r.error}`,format:()=>Te.red}});else if(r.skip)this.logger.log("SKIPPED",e.title,{suffix:{field:`SKIPPED: ${r.skip}`,format:()=>Te.yellow}});else if(r.rollback)this.logger.log("ROLLBACK",e.title,{suffix:{field:`ROLLBACK: ${r.rollback}`,format:()=>Te.red}});else if(r.retry)this.logger.log("RETRY",e.title,{suffix:{field:`RETRY:${r.retry.count}`,format:()=>Te.red}});else if(r.paused){const s=t?.pausedTimer;this.logger.log("PAUSED",e.title,s&&{suffix:{...s,condition:!!r?.paused&&s.condition,args:[r.paused-Date.now()]}})}}))}))}calculate(t){if(this.cache.rendererOptions.has(t.id)&&this.cache.rendererTaskOptions.has(t.id))return;const r={...this.options,...t.rendererOptions};this.cache.rendererOptions.set(t.id,r),this.cache.rendererTaskOptions.set(t.id,{...e.rendererTaskOptions,timer:r.timer,...t.rendererTaskOptions})}reset(e){this.cache.rendererOptions.delete(e.id),this.cache.rendererTaskOptions.delete(e.id)}},Ve=class{constructor(e){this.options=e}static{ye(this,"TestRendererSerializer")}serialize(e,t,r){return JSON.stringify(this.generate(e,t,r))}generate(e,t,r){const s={event:e,data:t};if("boolean"!=typeof this.options?.task){const e=Object.fromEntries(this.options.task.map((e=>{const t=r[e];return"function"==typeof t?[e,t.call(r)]:[e,t]})));Object.keys(r).length>0&&(s.task=e)}return s}},Xe=class e{constructor(t,r){this.tasks=t,this.options=r,this.options={...e.rendererOptions,...this.options},this.logger=this.options.logger??new Be({useIcons:!1}),this.serializer=new Ve(this.options)}static{ye(this,"TestRenderer")}static nonTTY=!0;static rendererOptions={subtasks:!0,state:Object.values(be),output:!0,prompt:!0,title:!0,messages:["skip","error","retry","rollback","paused"],messagesToStderr:["error","rollback","retry"],task:["hasRolledBack","isRollingBack","isCompleted","isSkipped","hasFinalized","hasSubtasks","title","hasReset","hasTitle","isPrompt","isPaused","isPending","isSkipped","isStarted","hasFailed","isEnabled","isRetrying","path"]};static rendererTaskOptions;logger;serializer;render(){this.renderer(this.tasks)}end(){}renderer(e){e.forEach((e=>{this.options.subtasks&&e.on("SUBTASK",(e=>{this.renderer(e)})),this.options.state&&e.on("STATE",(t=>{this.logger.toStdout(this.serializer.serialize("STATE",t,e))})),this.options.output&&e.on("OUTPUT",(t=>{this.logger.toStdout(this.serializer.serialize("OUTPUT",t,e))})),this.options.prompt&&e.on("PROMPT",(t=>{this.logger.toStdout(this.serializer.serialize("PROMPT",t,e))})),this.options.title&&e.on("TITLE",(t=>{this.logger.toStdout(this.serializer.serialize("TITLE",t,e))})),e.on("MESSAGE",(t=>{const r=Object.fromEntries(Object.entries(t).map((([e,t])=>{if(this.options.messages.includes(e))return[e,t]})).filter(Boolean));if(Object.keys(r).length>0){const t=this.serializer.serialize("MESSAGE",r,e);this.options.messagesToStderr.some((e=>Object.keys(r).includes(e)))?this.logger.toStderr(t):this.logger.toStdout(t)}}))}))}},Qe={default:ze,simple:qe,verbose:class e{constructor(t,r){this.tasks=t,this.options=r,this.options={...e.rendererOptions,...this.options,icon:{...Pe,...r?.icon??{}},color:{...Ie,...r?.color??{}}},this.logger=this.options.logger??new Be({useIcons:!1,toStderr:$e}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color,this.options.timestamp&&this.logger.options.fields.prefix.unshift(this.options.timestamp)}static{ye(this,"VerboseRenderer")}static nonTTY=!0;static rendererOptions={logTitleChange:!1,pausedTimer:{...Ke,format:()=>Te.yellowBright}};static rendererTaskOptions;logger;cache={rendererOptions:new Map,rendererTaskOptions:new Map};render(){this.renderer(this.tasks)}end(){}renderer(e){e.forEach((e=>{this.calculate(e),e.once("CLOSED",(()=>{this.reset(e)}));const t=this.cache.rendererOptions.get(e.id),r=this.cache.rendererTaskOptions.get(e.id);e.on("SUBTASK",(e=>{this.renderer(e)})),e.on("STATE",(t=>{if(e.hasTitle())if("STARTED"===t)this.logger.log("STARTED",e.title);else if("COMPLETED"===t){const t=r.timer;this.logger.log("COMPLETED",e.title,t&&{suffix:{...t,condition:!!e.message?.duration&&t.condition,args:[e.message.duration]}})}})),e.on("OUTPUT",(e=>{this.logger.log("OUTPUT",e)})),e.on("PROMPT",(e=>{const t=ve(e);t&&this.logger.log("PROMPT",t)})),!1!==this.options?.logTitleChange&&e.on("TITLE",(e=>{this.logger.log("TITLE",e)})),e.on("MESSAGE",(r=>{if(r?.error)this.logger.log("FAILED",r.error);else if(r?.skip)this.logger.log("SKIPPED",r.skip);else if(r?.rollback)this.logger.log("ROLLBACK",r.rollback);else if(r?.retry)this.logger.log("RETRY",e.title,{suffix:r.retry.count.toString()});else if(r?.paused){const s=t?.pausedTimer;this.logger.log("PAUSED",e.title,s&&{suffix:{...s,condition:!!r?.paused&&s.condition,args:[r.paused-Date.now()]}})}}))}))}calculate(t){if(this.cache.rendererOptions.has(t.id)&&this.cache.rendererTaskOptions.has(t.id))return;const r={...this.options,...t.rendererOptions};this.cache.rendererOptions.set(t.id,r),this.cache.rendererTaskOptions.set(t.id,{...e.rendererTaskOptions,timer:r.timer,...t.rendererTaskOptions})}reset(e){this.cache.rendererOptions.delete(e.id),this.cache.rendererTaskOptions.delete(e.id)}},test:Xe,silent:Ye};function Ze(e){return!0===process.stdout.isTTY||!0===e.nonTTY}function Je(e){return"string"==typeof e?Qe[e]??Qe.default:"function"==typeof e?e:Qe.default}function et(e){if(tt(e?.silentRendererCondition))return{renderer:Je("silent"),selection:"SILENT"};const t={renderer:Je(e.renderer),options:e.rendererOptions,selection:"PRIMARY"};return!Ze(t.renderer)||tt(e?.fallbackRendererCondition)?{renderer:Je(e.fallbackRenderer),options:e.fallbackRendererOptions,selection:"SECONDARY"}:t}function tt(e,...t){return"function"==typeof e?e(...t):e}ye(Ze,"isRendererSupported"),ye(Je,"getRendererClass"),ye(et,"getRenderer"),ye(tt,"assertFunctionOrSelf");var rt=fe({circles:!0});function st(e){return rt(e)}ye(st,"cloneObject");var nt=class{static{ye(this,"Concurrency")}concurrency;count;queue;constructor(e){this.concurrency=e.concurrency,this.count=0,this.queue=new Set}add(e){return this.count<this.concurrency?this.run(e):new Promise((t=>{const r=ye((()=>t(this.run(e))),"callback");this.queue.add(r)}))}flush(){for(const e of this.queue){if(this.count>=this.concurrency)break;this.queue.delete(e),e()}}run(e){this.count++;const t=e(),r=ye((()=>{this.count--,this.flush()}),"cleanup");return t.then(r,(()=>{this.queue.clear()})),t}};function it(e){return new Promise((t=>{setTimeout(t,e)}))}ye(it,"delay");var ot=class extends Error{constructor(e,t,r){super(e.message),this.error=e,this.type=t,this.task=r,this.name="ListrError",this.path=r.path,"full"===r?.options.collectErrors&&(this.task=st(r),this.ctx=st(r.listr.ctx)),this.stack=e?.stack}static{ye(this,"ListrError")}path;ctx},at=class extends Error{static{ye(this,"ListrRendererError")}},ct=class extends Error{static{ye(this,"PromptError")}},lt=class{constructor(e){this.task=e}static{ye(this,"TaskWrapper")}get title(){return this.task.title}set title(e){e=Array.isArray(e)?e:[e],this.task.title$=Le(e.shift(),...e)}get output(){return this.task.output}set output(e){e=Array.isArray(e)?e:[e],this.task.output$=Le(e.shift(),...e)}set promptOutput(e){this.task.promptOutput$=e}newListr(e,t){let r;return r="function"==typeof e?e(this):e,new ht(r,t,this.task)}report(e,t){!1!==this.task.options.collectErrors&&this.task.listr.errors.push(new ot(e,t,this.task)),this.task.message$={error:e.message??this.task?.title}}skip(e,...t){this.task.state$="SKIPPED",e&&(this.task.message$={skip:e?Le(e,...t):this.task?.title})}isRetrying(){return this.task.isRetrying()?this.task.retry:{count:0}}prompt(e){return this.task.prompt?this.task.prompt:new e(this.task,this)}stdout(e){return Me((t=>{if("PROMPT"===e)this.promptOutput=t;else this.output=t}))}run(e){return this.task.run(e,this)}},ut=class extends we{static{ye(this,"ListrTaskEventManager")}},pt=class extends ut{constructor(e,t,r,s,n){if(super(),this.listr=e,this.task=t,this.options=r,this.rendererOptions=s,this.rendererTaskOptions=n,t.title){const e=Array.isArray(t?.title)?t.title:[t.title];this.title=Le(e.shift(),...e),this.initialTitle=this.title}this.taskFn=t.task,this.parent=e.parentTask}static{ye(this,"Task")}id=(0,ge.randomUUID)();state="WAITING";subtasks;title;initialTitle;output;retry;message={};prompt;parent;enabled;taskFn;closed;set state$(e){if(this.state=e,this.emit("STATE",e),this.hasSubtasks()&&this.hasFailed())for(const e of this.subtasks)"STARTED"===e.state&&(e.state$="FAILED");this.listr.events.emit("SHOUD_REFRESH_RENDER")}set output$(e){this.output=e,this.emit("OUTPUT",e),this.listr.events.emit("SHOUD_REFRESH_RENDER")}set promptOutput$(e){this.emit("PROMPT",e),ve(e)&&this.listr.events.emit("SHOUD_REFRESH_RENDER")}set message$(e){this.message={...this.message,...e},this.emit("MESSAGE",e),this.listr.events.emit("SHOUD_REFRESH_RENDER")}set title$(e){this.title=e,this.emit("TITLE",e),this.listr.events.emit("SHOUD_REFRESH_RENDER")}get path(){return[...this.listr.path,this.initialTitle]}async check(e){return"WAITING"===this.state&&(this.enabled=await tt(this.task?.enabled??!0,e),this.emit("ENABLED",this.enabled),this.listr.events.emit("SHOUD_REFRESH_RENDER")),this.enabled}hasSubtasks(){return this.subtasks?.length>0}hasFinalized(){return this.isCompleted()||this.hasFailed()||this.isSkipped()||this.hasRolledBack()}isPending(){return this.isStarted()||this.isPrompt()||this.hasReset()}isStarted(){return"STARTED"===this.state}isSkipped(){return"SKIPPED"===this.state}isCompleted(){return"COMPLETED"===this.state}hasFailed(){return"FAILED"===this.state}isRollingBack(){return"ROLLING_BACK"===this.state}hasRolledBack(){return"ROLLED_BACK"===this.state}isRetrying(){return"RETRY"===this.state}hasReset(){return"RETRY"===this.state||"ROLLING_BACK"===this.state}isEnabled(){return this.enabled}hasTitle(){return"string"==typeof this?.title}isPrompt(){return"PROMPT"===this.state||"PROMPT_COMPLETED"===this.state}isPaused(){return"PAUSED"===this.state}isClosed(){return this.closed}async pause(e){const t=this.state;this.state$="PAUSED",this.message$={paused:Date.now()+e},await it(e),this.state$=t,this.message$={paused:null}}async run(e,t){const r=ye((t=>(t instanceof ht?(t.options={...this.options,...t.options},t.rendererClass=Je("silent"),this.subtasks=t.tasks,t.errors=this.listr.errors,this.emit("SUBTASK",this.subtasks),t=t.run(e)):t instanceof Promise?t=t.then(r):Ae(t)?t=new Promise(((e,r)=>{t.on("data",(e=>{this.output$=e.toString()})),t.on("error",(e=>r(e))),t.on("end",(()=>e(null)))})):Se(t)&&(t=new Promise(((e,r)=>{t.subscribe({next:e=>{this.output$=e},error:r,complete:e})}))),t)),"handleResult"),s=Date.now();this.state$="STARTED";const n=await tt(this.task?.skip??!1,e);if(n)return"string"==typeof n?this.message$={skip:n}:this.hasTitle()?this.message$={skip:this.title}:this.message$={skip:"Skipped task without a title."},void(this.state$="SKIPPED");try{const n="number"==typeof this.task?.retry&&this.task.retry>0?this.task.retry+1:"object"==typeof this.task?.retry&&this.task.retry.tries>0?this.task.retry.tries+1:1,i="object"==typeof this.task.retry&&this.task.retry.delay;for(let s=1;s<=n;s++)try{await r(this.taskFn(e,t));break}catch(e){if(s===n)throw e;this.retry={count:s,error:e},this.message$={retry:this.retry},this.title$=this.initialTitle,this.output=void 0,t.report(e,"WILL_RETRY"),this.state$="RETRY",i&&await this.pause(i)}(this.isStarted()||this.isRetrying())&&(this.message$={duration:Date.now()-s},this.state$="COMPLETED")}catch(r){if(this.prompt instanceof ct&&(r=this.prompt),this.task?.rollback){t.report(r,"WILL_ROLLBACK");try{this.state$="ROLLING_BACK",await this.task.rollback(e,t),this.message$={rollback:this.title},this.state$="ROLLED_BACK"}catch(e){throw this.state$="FAILED",t.report(e,"HAS_FAILED_TO_ROLLBACK"),this.close(),e}if(!1!==this.listr.options?.exitAfterRollback)throw this.close(),r}else{if(this.state$="FAILED",!1!==this.listr.options.exitOnError&&!1!==await tt(this.task?.exitOnError,e))throw t.report(r,"HAS_FAILED"),this.close(),r;this.hasSubtasks()||t.report(r,"HAS_FAILED_WITHOUT_ERROR")}}finally{this.close()}}close(){this.emit("CLOSED"),this.listr.events.emit("SHOUD_REFRESH_RENDER"),this.complete()}},dt=class extends we{static{ye(this,"ListrEventManager")}},ht=class{constructor(e,t,r){this.task=e,this.options=t,this.parentTask=r,this.options={concurrent:!1,renderer:"default",fallbackRenderer:"simple",exitOnError:!0,exitAfterRollback:!0,collectErrors:!1,registerSignalListeners:!0,...this.parentTask?.options??{},...t},!0===this.options.concurrent?this.options.concurrent=1/0:"number"!=typeof this.options.concurrent&&(this.options.concurrent=1),this.concurrency=new nt({concurrency:this.options.concurrent}),r&&(this.path=[...r.listr.path,r.title],this.errors=r.listr.errors),this.parentTask?.listr.events instanceof dt?this.events=this.parentTask.listr.events:this.events=new dt;const s=et({renderer:this.options.renderer,rendererOptions:this.options.rendererOptions,fallbackRenderer:this.options.fallbackRenderer,fallbackRendererOptions:this.options.fallbackRendererOptions,fallbackRendererCondition:this.options?.fallbackRendererCondition,silentRendererCondition:this.options?.silentRendererCondition});this.rendererClass=s.renderer,this.rendererClassOptions=s.options,this.rendererSelection=s.selection,this.add(e??[]),this.options.registerSignalListeners&&(this.boundSignalHandler=this.signalHandler.bind(this),process.once("SIGINT",this.boundSignalHandler).setMaxListeners(0)),(this.options?.forceTTY||process.env.LISTR_FORCE_TTY)&&(process.stdout.isTTY=!0,process.stderr.isTTY=!0),this.options?.forceUnicode&&(process.env.LISTR_FORCE_UNICODE="1")}static{ye(this,"Listr")}tasks=[];errors=[];ctx;events;path=[];rendererClass;rendererClassOptions;rendererSelection;boundSignalHandler;concurrency;renderer;isRoot(){return!this.parentTask}isSubtask(){return!!this.parentTask}add(e){this.tasks.push(...this.generate(e))}async run(e){this.renderer||(this.renderer=new this.rendererClass(this.tasks,this.rendererClassOptions,this.events)),await this.renderer.render(),this.ctx=this.options?.ctx??e??{},await Promise.all(this.tasks.map((e=>e.check(this.ctx))));try{await Promise.all(this.tasks.map((e=>this.concurrency.add((()=>this.runTask(e)))))),this.renderer.end(),this.removeSignalHandler()}catch(e){if(!1!==this.options.exitOnError)throw this.renderer.end(e),this.removeSignalHandler(),e}return this.ctx}generate(e){return(e=Array.isArray(e)?e:[e]).map((e=>{let t;return"PRIMARY"===this.rendererSelection?t=e.rendererOptions:"SECONDARY"===this.rendererSelection&&(t=e.fallbackRendererOptions),new pt(this,e,this.options,this.rendererClassOptions,t)}))}async runTask(e){if(await e.check(this.ctx))return new lt(e).run(this.ctx)}signalHandler(){this.tasks?.forEach((async e=>{e.isPending()&&(e.state$="FAILED")})),this.isRoot()&&(this.renderer.end(new Error("Interrupted.")),process.exit(127))}removeSignalHandler(){this.boundSignalHandler&&process.removeListener("SIGINT",this.boundSignalHandler)}};const ft=i.Ay.blue(_e.arrowRight),gt=i.Ay.redBright(_e.cross),mt=i.Ay.yellow(_e.warning),yt=(e,t,r)=>`${i.Ay.redBright(`${gt} Validation Error:`)}\n\n Invalid value for '${i.Ay.bold(e)}': ${i.Ay.bold((0,n.inspect)(r))}\n\n ${t}`,Et=i.Ay.redBright(`${gt} Current directory is not a git directory!`),bt=i.Ay.redBright(`${gt} Failed to get staged files!`),wt=`${gt} No valid configuration found.`,St=`${ft} No staged files found.`,At=`${ft} No staged files match any configured task.`,Rt=i.Ay.yellow(`${mt} Some of your tasks use \`git add\` command. Please remove it from the config since all modifications made by tasks will be automatically added to the git commit index.\n`),Ct="Skipped because of errors from tasks.",vt=`\n ${i.Ay.redBright(`${gt} lint-staged failed due to a git error.`)}`,Tt=(e,t,r)=>`${i.Ay.redBright(`${gt} Validation Error:`)}\n\n Invalid value for option '${i.Ay.bold(e)}': ${i.Ay.bold(t)}\n\n ${r}\n\nSee https://github.com/okonet/lint-staged#command-line-flags`,Ot=`\n ${i.Ay.yellow(`${mt} lint-staged prevented an empty git commit.\n Use the --allow-empty option to continue, or check your task configuration`)}\n`,xt=(i.Ay.redBright(`${gt} Failed to read config from stdin.`),(e,t)=>`${i.Ay.redBright(`${t} Failed to parse config from file "${e}".`)}\n\n${t}\n\nSee https://github.com/okonet/lint-staged#configuration.`),kt=(e={},t)=>{if(!Array.isArray(e.output))return;const r=e.errors?.size>0?t.error:t.log;for(const t of e.output)r(t)};var _t=r(6760);const Lt=e=>{if(e===_t.posix.sep||e===_t.win32.sep)return _t.posix.sep;let t=e.split(/[/\\]+/).join(_t.posix.sep);return(e.startsWith("\\\\?\\")||e.startsWith("\\\\.\\"))&&(t=t.replace(/^\/(\.|\?)/,"//$1")),t.endsWith(_t.posix.sep)&&(t=t.slice(0,-1)),t},Pt=s("lint-staged:chunkFiles"),It=({files:e,baseDir:t,maxArgLength:r=null,relative:s=!1})=>{const n=e.map((e=>Lt(s||!t?e:_t.resolve(t,e))));if(!r)return Pt("Skip chunking files because of undefined maxArgLength"),[n];const i=n.join(" ").length;Pt(`Resolved an argument string length of ${i} characters from ${n.length} files`);const o=Math.min(Math.ceil(i/r),n.length);return Pt(`Creating ${o} chunks for maxArgLength of ${r}`),((e,t)=>{if(1===t)return[e];const r=[];let s=0;for(let n=0;n<t;n++){const i=Math.ceil((e.length-s)/(t-n));r.push([]),r[n]=e.slice(s,i+s),s+=i}return r})(n,o)};var $t=r(4573),Bt=r(1421),Dt=r(1708),Ft=r(526);var Ht=r(5190);const Mt=(e,t,r,s)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const n=Object.getOwnPropertyDescriptor(e,r),i=Object.getOwnPropertyDescriptor(t,r);!Nt(n,i)&&s||Object.defineProperty(e,r,i)},Nt=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Gt=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Ut=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),jt=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");function Kt(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:s}=e;for(const s of Reflect.ownKeys(t))Mt(e,t,s,r);return((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,t),((e,t,r)=>{const s=""===r?"":`with ${r.trim()}() `,n=Gt.bind(null,s,t.toString());Object.defineProperty(n,"name",jt),Object.defineProperty(e,"toString",{...Ut,value:n})})(e,t,s),e}const Wt=new WeakMap,zt=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,s=0;const n=e.displayName||e.name||"<anonymous>",i=function(...o){if(Wt.set(i,++s),1===s)r=e.apply(this,o),e=null;else if(!0===t.throw)throw new Error(`Function \`${n}\` can only be called once`);return r};return Kt(i,e),Wt.set(i,s),i};zt.callCount=e=>{if(!Wt.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Wt.get(e)};const Yt=zt;var qt=r(8161);const Vt=(e,t)=>({name:`SIGRT${t+1}`,number:Xt+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Xt=34,Qt=64,Zt=[{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"}],Jt=()=>{const e=(()=>{const e=Qt-Xt+1;return Array.from({length:e},Vt)})();return[...Zt,...e].map(er)},er=({name:e,number:t,description:r,action:s,forced:n=!1,standard:i})=>{const{signals:{[e]:o}}=qt.constants,a=void 0!==o;return{name:e,number:a?o:t,description:r,supported:a,action:s,forced:n,standard:i}},tr=({name:e,number:t,description:r,supported:s,action:n,forced:i,standard:o})=>[e,{name:e,number:t,description:r,supported:s,action:n,forced:i,standard:o}],rr=(()=>{const e=Jt();return Object.fromEntries(e.map(tr))})(),sr=(e,t)=>{const r=nr(e,t);if(void 0===r)return{};const{name:s,description:n,supported:i,action:o,forced:a,standard:c}=r;return{[e]:{name:s,number:e,description:n,supported:i,action:o,forced:a,standard:c}}},nr=(e,t)=>{const r=t.find((({name:t})=>qt.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))},ir=((()=>{const e=Jt(),t=Qt+1,r=Array.from({length:t},((t,r)=>sr(r,e)));Object.assign({},...r)})(),({stdout:e,stderr:t,all:r,error:s,signal:n,exitCode:i,command:o,escapedCommand:a,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:p,cwd:d=Dt.cwd()}}})=>{i=null===i?void 0:i;const h=void 0===(n=null===n?void 0:n)?void 0:rr[n].description,f=(({timedOut:e,timeout:t,errorCode:r,signal:s,signalDescription:n,exitCode:i,isCanceled:o})=>e?`timed out after ${t} milliseconds`:o?"was canceled":void 0!==r?`failed with ${r}`:void 0!==s?`was killed with ${s} (${n})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:c,timeout:p,errorCode:s&&s.code,signal:n,signalDescription:h,exitCode:i,isCanceled:l}),g=`Command ${f}: ${o}`,m="[object Error]"===Object.prototype.toString.call(s),y=m?`${g}\n${s.message}`:g,E=[y,t,e].filter(Boolean).join("\n");return m?(s.originalMessage=s.message,s.message=E):s=new Error(E),s.shortMessage=y,s.command=o,s.escapedCommand=a,s.exitCode=i,s.signal=n,s.signalDescription=h,s.stdout=e,s.stderr=t,s.cwd=d,void 0!==r&&(s.all=r),"bufferedData"in s&&delete s.bufferedData,s.failed=!0,s.timedOut=Boolean(c),s.isCanceled=l,s.killed=u&&!c,s}),or=["stdin","stdout","stderr"],ar=e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return or.map((t=>e[t]));if((e=>or.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${or.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);const r=Math.max(t.length,or.length);return Array.from({length:r},((e,r)=>t[r]))};var cr=r(7017);const lr=(e,t="SIGTERM",r={})=>{const s=e(t);return ur(e,t,r,s),s},ur=(e,t,r,s)=>{if(!pr(t,r,s))return;const n=hr(r),i=setTimeout((()=>{e("SIGKILL")}),n);i.unref&&i.unref()},pr=(e,{forceKillAfterTimeout:t},r)=>dr(e)&&!1!==t&&r,dr=e=>e===qt.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),hr=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;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},fr=(e,t)=>{e.kill()&&(t.isCanceled=!0)},gr=(e,{timeout:t,killSignal:r="SIGTERM"},s)=>{if(0===t||void 0===t)return s;let n;const i=new Promise(((s,i)=>{n=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)}),t)})),o=s.finally((()=>{clearTimeout(n)}));return Promise.race([i,o])},mr=({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},yr=async(e,{cleanup:t,detached:r},s)=>{if(!t||r)return s;const n=(0,cr.cf)((()=>{e.kill()}));return s.finally((()=>{n()}))};var Er=r(3024);function br(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function wr(e){return br(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}const Sr=(e,t,r)=>{if("string"==typeof r)return e[t].pipe((0,Er.createWriteStream)(r)),e;if(wr(r))return e[t].pipe(r),e;if(!(e=>e instanceof Bt.ChildProcess&&"function"==typeof e.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!wr(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r},Ar=e=>{null!==e.stdout&&(e.pipeStdout=Sr.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=Sr.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=Sr.bind(void 0,e,"all"))};var Rr=r(8500);const Cr=async(e,{init:t,convertChunk:r,getSize:s,truncateChunk:n,addChunk:i,getFinalChunk:o,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{if(!xr(e))throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");const l=t();l.length=0;try{for await(const t of e){const e=r[kr(t)](t,l);Tr({convertedChunk:e,state:l,getSize:s,truncateChunk:n,addChunk:i,maxBuffer:c})}return vr({state:l,convertChunk:r,getSize:s,truncateChunk:n,addChunk:i,getFinalChunk:o,maxBuffer:c}),a(l)}catch(e){throw e.bufferedData=a(l),e}},vr=({state:e,getSize:t,truncateChunk:r,addChunk:s,getFinalChunk:n,maxBuffer:i})=>{const o=n(e);void 0!==o&&Tr({convertedChunk:o,state:e,getSize:t,truncateChunk:r,addChunk:s,maxBuffer:i})},Tr=({convertedChunk:e,state:t,getSize:r,truncateChunk:s,addChunk:n,maxBuffer:i})=>{const o=r(e),a=t.length+o;if(a<=i)return void Or(e,t,n,a);const c=s(e,i-t.length);throw void 0!==c&&Or(c,t,n,i),new Lr},Or=(e,t,r,s)=>{t.contents=r(e,t,s),t.length=s},xr=e=>"object"==typeof e&&null!==e&&"function"==typeof e[Symbol.asyncIterator],kr=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=_r.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===_r.call(e.buffer)?"typedArray":"others"},{toString:_r}=Object.prototype;class Lr extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const Pr=e=>e,Ir=()=>{},$r=({contents:e})=>e,Br=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Dr=e=>e.length;const Fr=new TextEncoder,Hr=e=>new Uint8Array(e),Mr=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Nr=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(Ur(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},Gr=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:Ur(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},Ur=e=>jr**Math.ceil(Math.log(e)/Math.log(jr)),jr=2,Kr=()=>"resize"in ArrayBuffer.prototype,Wr={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>Fr.encode(e),buffer:Hr,arrayBuffer:Hr,dataView:Mr,typedArray:Mr,others:Br},getSize:Dr,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},s)=>{const n=Kr()?Gr(t,s):Nr(t,s);return new Uint8Array(n).set(e,r),n},getFinalChunk:Ir,finalize:({contents:e,length:t})=>Kr()?e:e.slice(0,t)};async function zr(e,t){if(!("Buffer"in globalThis))throw new Error("getStreamAsBuffer() is only supported in Node.js");try{return Yr(await async function(e,t){return Cr(e,Wr,t)}(e,t))}catch(e){throw void 0!==e.bufferedData&&(e.bufferedData=Yr(e.bufferedData)),e}}const Yr=e=>globalThis.Buffer.from(e);const qr=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),Vr={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:Pr,buffer:qr,arrayBuffer:qr,dataView:qr,typedArray:qr,others:Br},getSize:Dr,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:$r};var Xr=r(1404);const Qr=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},Zr=e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Qr(e),(0,Er.readFileSync)(t)))(e);if(br(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t},Jr=(e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Qr(e),(0,Er.createReadStream)(t)))(t);void 0!==r&&(br(r)?r.pipe(e.stdin):e.stdin.end(r))},es=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=Xr();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},ts=async(e,t)=>{if(e&&void 0!==t){await(0,Rr.setTimeout)(0),e.destroy();try{return await t}catch(e){return e.bufferedData}}},rs=(e,{encoding:t,buffer:r,maxBuffer:s})=>{if(e&&r)return"utf8"===t||"utf-8"===t?async function(e,t){return Cr(e,Vr,t)}(e,{maxBuffer:s}):null===t||"buffer"===t?zr(e,{maxBuffer:s}):ss(e,s,t)},ss=async(e,t,r)=>(await zr(e,{maxBuffer:t})).toString(r),ns=async({stdout:e,stderr:t,all:r},{encoding:s,buffer:n,maxBuffer:i},o)=>{const a=rs(e,{encoding:s,buffer:n,maxBuffer:i}),c=rs(t,{encoding:s,buffer:n,maxBuffer:i}),l=rs(r,{encoding:s,buffer:n,maxBuffer:2*i});try{return await Promise.all([o,a,c,l])}catch(s){return Promise.all([{error:s,signal:s.signal,timedOut:s.timedOut},ts(e,a),ts(t,c),ts(r,l)])}},is=(async()=>{})().constructor.prototype,os=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(is,e)])),as=(e,t)=>{for(const[r,s]of os){const n="function"==typeof t?(...e)=>Reflect.apply(s.value,t(),e):s.value.bind(t);Reflect.defineProperty(e,r,{...s,value:n})}},cs=e=>new Promise(((t,r)=>{e.on("exit",((e,r)=>{t({exitCode:e,signal:r})})),e.on("error",(e=>{r(e)})),e.stdin&&e.stdin.on("error",(e=>{r(e)}))})),ls=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],us=/^[\w.-]+$/,ps=(e,t)=>ls(e,t).join(" "),ds=(e,t)=>ls(e,t).map((e=>(e=>"string"!=typeof e||us.test(e)?e:`"${e.replaceAll('"','\\"')}"`)(e))).join(" "),hs=/ +/g,fs=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if("object"===t&&null!==e&&!(e instanceof Bt.ChildProcess)&&"stdout"in e){const t=typeof e.stdout;if("string"===t)return e.stdout;if($t.Buffer.isBuffer(e.stdout))return e.stdout.toString();throw new TypeError(`Unexpected "${t}" stdout in template expression`)}throw new TypeError(`Unexpected "${t}" in template expression`)},gs=(e,t,r)=>r||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],ms=({templates:e,expressions:t,tokens:r,index:s,template:n})=>{const i=n??e.raw[s],o=i.split(hs).filter(Boolean),a=gs(r,o,i.startsWith(" "));if(s===t.length)return a;const c=t[s],l=Array.isArray(c)?c.map((e=>fs(e))):[fs(c)];return gs(a,l,i.endsWith(" "))},ys=(e,t)=>{let r=[];for(const[s,n]of e.entries())r=ms({templates:e,expressions:t,tokens:r,index:s,template:n});return r},Es=(0,n.debuglog)("execa").enabled,bs=(e,t)=>String(e).padStart(t,"0"),ws=(e,{verbose:t})=>{t&&Dt.stderr.write(`[${(()=>{const e=new Date;return`${bs(e.getHours(),2)}:${bs(e.getMinutes(),2)}:${bs(e.getSeconds(),2)}.${bs(e.getMilliseconds(),3)}`})()}] ${e}\n`)},Ss=(e,t,r={})=>{const s=Ft._parse(e,t,r);return e=s.command,t=s.args,(r={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(r=s.options).cwd||Dt.cwd(),execPath:Dt.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Es,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:s,execPath:n})=>{const i=t?{...Dt.env,...e}:e;return r?(0,Ht.V)({env:i,cwd:s,execPath:n}):i})(r),r.stdio=ar(r),"win32"===Dt.platform&&"cmd"===_t.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:s}},As=(e,t,r)=>"string"==typeof t||$t.Buffer.isBuffer(t)?e.stripFinalNewline?function(e){const t="string"==typeof e?"\n":"\n".charCodeAt(),r="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===r&&(e=e.slice(0,-1)),e}(t):t:void 0===r?void 0:"";function Rs(e,t,r){const s=Ss(e,t,r),n=ps(e,t),i=ds(e,t);let o;ws(i,s.options),mr(s.options);try{o=Bt.spawn(s.file,s.args,s.options)}catch(e){const t=new Bt.ChildProcess,r=Promise.reject(ir({error:e,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:s,timedOut:!1,isCanceled:!1,killed:!1}));return as(t,r),t}const a=cs(o),c=gr(o,s.options,a),l=yr(o,s.options,c),u={isCanceled:!1};o.kill=lr.bind(null,o.kill.bind(o)),o.cancel=fr.bind(null,o,u);const p=Yt((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,p,d]=await ns(o,s.options,l),h=As(s.options,c),f=As(s.options,p),g=As(s.options,d);if(e||0!==t||null!==r){const c=ir({error:e,exitCode:t,signal:r,stdout:h,stderr:f,all:g,command:n,escapedCommand:i,parsed:s,timedOut:a,isCanceled:u.isCanceled||!!s.options.signal&&s.options.signal.aborted,killed:o.killed});if(!s.options.reject)return c;throw c}return{command:n,escapedCommand:i,exitCode:0,stdout:h,stderr:f,all:g,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return Jr(o,s.options),o.all=es(o,s.options),Ar(o),as(o,p),o}function Cs(e,t,r){const s=Ss(e,t,r),n=ps(e,t),i=ds(e,t);ws(i,s.options);const o=Zr(s.options);let a;try{a=Bt.spawnSync(s.file,s.args,{...s.options,input:o})}catch(e){throw ir({error:e,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:s,timedOut:!1,isCanceled:!1,killed:!1})}const c=As(s.options,a.stdout,a.error),l=As(s.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=ir({stdout:c,stderr:l,error:a.error,signal:a.signal,exitCode:a.status,command:n,escapedCommand:i,parsed:s,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!s.options.reject)return e;throw e}return{command:n,escapedCommand:i,exitCode:0,stdout:c,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}const vs=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{},Ts=(e={})=>({preferLocal:!0,...vs(e),...e});(function e(t){function r(r,...s){if(!Array.isArray(r))return e({...t,...r});const[n,...i]=ys(r,s);return Rs(n,i,Ts(t))}return r.sync=(e,...r)=>{if(!Array.isArray(e))throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");const[s,...n]=ys(e,r);return Cs(s,n,Ts(t))},r})();function Os(e,t){const[r,...s]=(e=>{const t=[];for(const r of e.trim().split(hs)){const e=t.at(-1);e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t})(e);return Rs(r,s,t)}const xs=s("lint-staged:execGit"),ks=["-c","submodule.recurse=false"],_s=async(e,t={})=>{xs("Running git command",e);try{const{stdout:r}=await Rs("git",ks.concat(e),{...t,all:!0,cwd:t.cwd||process.cwd(),stdin:"ignore"});return r}catch({all:e}){throw new Error(e)}};var Ls=r(1723);const Ps=s("lint-staged:generateTasks"),Is=({config:e,cwd:t=process.cwd(),files:r,relative:s=!1})=>{Ps("Generating linter tasks");const n=r.map((e=>Lt(_t.relative(t,e))));return Object.entries(e).map((([e,r])=>{const i=e.startsWith("../"),o=n.filter((e=>!!i||!e.startsWith("..")&&!_t.isAbsolute(e))),a=Ls(o,e,{cwd:t,dot:!0,matchBase:!e.includes("/"),posixSlashes:!0,strictBrackets:!0}),c={pattern:e,commands:r,fileList:a.map((e=>Lt(s?e:_t.resolve(t,e))))};return Ps("Generated task: \n%O",c),c}))};var $s=r(7075);const Bs=new RegExp(qt.EOL+"$"),Ds=e=>new $s.Writable({write:function(t,r,s){e(t.toString().replace(Bs,"")),s()}}),Fs=({renderer:e},{FORCE_COLOR:t})=>"silent"===e||"test"===e||Number(t)>0?e:"verbose",Hs=(e,t,r=process.env)=>{const s=(({debug:e,quiet:t},r,s)=>t?{renderer:"silent"}:"test"===s.NODE_ENV?{renderer:"test",rendererOptions:{logger:new Be({processOutput:new He(Ds(r.log),Ds(r.error))})}}:e||"dumb"===s.TERM?{renderer:"verbose"}:{renderer:"update",rendererOptions:{formatOutput:"truncate"}})(e,t,r);return{...s,fallbackRenderer:Fs(s,r)}};function Ms(e,t){return["diff","--name-only","-z",`--diff-filter=${void 0!==t?t.trim():"ACMR"}`,...void 0!==e?e.trim().split(" "):["--staged"]]}const Ns=e=>e?e.replace(/\u0000$/,"").split("\0"):[];var Gs=r(1455);const Us=s("lint-staged:file"),js=async(e,t=!0)=>{Us("Reading file `%s`",e);try{return await Gs.readFile(e)}catch(r){if(t&&"ENOENT"===r.code)return Us("File `%s` doesn't exist, ignoring...",e),null;throw r}},Ks=async(e,t=!0)=>{Us("Removing file `%s`",e);try{await Gs.unlink(e)}catch(r){if(!t||"ENOENT"!==r.code)throw r;Us("File `%s` doesn't exist, ignoring...",e)}},Ws=async(e,t)=>{Us("Writing file `%s`",e),await Gs.writeFile(e,t)},zs=Symbol("ApplyEmptyCommitError"),Ys=new Error("Configuration could not be found"),qs=new Error("Configuration should be an object or a function"),Vs=new Error("Configuration should not be empty"),Xs=Symbol("GetBackupStashError"),Qs=Symbol("GetStagedFilesError"),Zs=Symbol("GitError"),Js=Symbol("GitRepoError"),en=Symbol("HideUnstagedChangesError"),tn=new Error("Invalid Options"),rn=Symbol("RestoreMergeStatusError"),sn=Symbol("RestoreOriginalStateError"),nn=Symbol("RestoreUnstagedChangesError"),on=Symbol("TaskError"),an=s("lint-staged:GitWorkflow"),cn=/\x00/,ln=(e,t=!0)=>e.reduce(((e,r)=>{if(cn.test(r)){const[s,n]=r.split(cn);t&&e.push(n),e.push(s)}else e.push(r);return e}),[]),un="lint-staged automatic backup",pn="lint-staged_unstaged.patch",dn=["--binary","--unified=0","--no-color","--no-ext-diff","--src-prefix=a/","--dst-prefix=b/","--patch","--submodule=short"],hn=["-v","--whitespace=nowarn","--recount","--unidiff-zero"],fn=(e,t,r)=>{throw t.errors.add(Zs),r&&t.errors.add(r),e};class gn{constructor({allowEmpty:e,gitConfigDir:t,gitDir:r,matchedFileChunks:s,diff:n,diffFilter:i}){this.execGit=(e,t={})=>_s(e,{...t,cwd:r}),this.deletedFiles=[],this.gitConfigDir=t,this.gitDir=r,this.diff=n,this.diffFilter=i,this.allowEmpty=e,this.matchedFileChunks=s,this.mergeHeadFilename=_t.resolve(t,"MERGE_HEAD"),this.mergeModeFilename=_t.resolve(t,"MERGE_MODE"),this.mergeMsgFilename=_t.resolve(t,"MERGE_MSG")}getHiddenFilepath(e){return _t.resolve(this.gitConfigDir,`./${e}`)}async getBackupStash(e){const t=(await this.execGit(["stash","list"])).split("\n").findIndex((e=>e.includes(un)));if(-1===t)throw e.errors.add(Xs),new Error("lint-staged automatic backup is missing!");return String(t)}async getDeletedFiles(){an("Getting deleted files...");const e=(await this.execGit(["ls-files","--deleted"])).split("\n").filter(Boolean).map((e=>_t.resolve(this.gitDir,e)));return an("Found deleted files:",e),e}async backupMergeStatus(){an("Backing up merge state..."),await Promise.all([js(this.mergeHeadFilename).then((e=>this.mergeHeadBuffer=e)),js(this.mergeModeFilename).then((e=>this.mergeModeBuffer=e)),js(this.mergeMsgFilename).then((e=>this.mergeMsgBuffer=e))]),an("Done backing up merge state!")}async restoreMergeStatus(e){an("Restoring merge state...");try{await Promise.all([this.mergeHeadBuffer&&Ws(this.mergeHeadFilename,this.mergeHeadBuffer),this.mergeModeBuffer&&Ws(this.mergeModeFilename,this.mergeModeBuffer),this.mergeMsgBuffer&&Ws(this.mergeMsgFilename,this.mergeMsgBuffer)]),an("Done restoring merge state!")}catch(t){an("Failed restoring merge state with error:"),an(t),fn(new Error("Merge state could not be restored due to an error!"),e,rn)}}async getPartiallyStagedFiles(){an("Getting partially staged files...");const e=(await this.execGit(["status","-z"])).split(/\x00(?=[ AMDRCU?!]{2} |$)/).filter((e=>{const[t,r]=e;return" "!==t&&" "!==r&&"?"!==t&&"?"!==r})).map((e=>e.substr(3))).filter(Boolean);return an("Found partially staged files:",e),e.length?e:null}async prepare(e){try{if(an("Backing up original state..."),this.partiallyStagedFiles=await this.getPartiallyStagedFiles(),this.partiallyStagedFiles){e.hasPartiallyStagedFiles=!0;const t=this.getHiddenFilepath(pn),r=ln(this.partiallyStagedFiles);await this.execGit(["diff",...dn,"--output",t,"--",...r])}else e.hasPartiallyStagedFiles=!1;if(!e.shouldBackup)return;await this.backupMergeStatus(),this.deletedFiles=await this.getDeletedFiles();const t=await this.execGit(["stash","create"]);await this.execGit(["stash","store","--quiet","--message",un,t]),an("Done backing up original state!")}catch(t){fn(t,e)}}async hideUnstagedChanges(e){try{const e=ln(this.partiallyStagedFiles,!1);await this.execGit(["checkout","--force","--",...e])}catch(t){fn(t,e,en)}}async applyModifications(e){an("Adding task modifications to index...");for(const e of this.matchedFileChunks)await this.execGit(["add","--",...e]);an("Done adding task modifications to index!");await this.execGit(Ms(this.diff,this.diffFilter))||this.allowEmpty||fn(new Error("Prevented an empty git commit!"),e,zs)}async restoreUnstagedChanges(e){an("Restoring unstaged changes...");const t=this.getHiddenFilepath(pn);try{await this.execGit(["apply",...hn,t])}catch(r){an("Error while restoring changes:"),an(r),an("Retrying with 3-way merge");try{await this.execGit(["apply",...hn,"--3way",t])}catch(t){an("Error while restoring unstaged changes using 3-way merge:"),an(t),fn(new Error("Unstaged changes could not be restored due to a merge conflict!"),e,nn)}}}async restoreOriginalState(e){try{an("Restoring original state..."),await this.execGit(["reset","--hard","HEAD"]),await this.execGit(["stash","apply","--quiet","--index",await this.getBackupStash(e)]),await this.restoreMergeStatus(e),await Promise.all(this.deletedFiles.map((e=>Ks(e)))),await Ks(this.getHiddenFilepath(pn)),an("Done restoring original state!")}catch(t){fn(t,e,sn)}}async cleanup(e){try{an("Dropping backup stash..."),await this.execGit(["stash","drop","--quiet",await this.getBackupStash(e)]),an("Done dropping backup stash!")}catch(t){fn(t,e)}}}const mn=s("lint-staged:groupFilesByConfig");function yn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0;r<e.length;r++){var s=e[r];if("string"==typeof s)return s}}var En=r(6454),bn=r(4434);const wn=({quiet:e=!1}={})=>({hasPartiallyStagedFiles:null,shouldBackup:null,shouldHidePartiallyStaged:!0,errors:new Set([]),events:new bn,output:[],quiet:e}),Sn=e=>e.hasPartiallyStagedFiles&&e.shouldHidePartiallyStaged,An=e=>!!e.shouldBackup&&(e.errors.has(Zs)?vt:e.errors.has(on)?Ct:void 0),Rn=e=>e.errors.has(Zs)?vt:e.errors.has(on)?Ct:void 0,Cn=e=>e.shouldBackup&&(e.errors.has(on)||e.errors.has(zs)||e.errors.has(nn)),vn=e=>{if(e.errors.has(Zs)&&!e.errors.has(zs)&&!e.errors.has(nn))return vt},Tn=e=>e.shouldBackup,On=e=>!e.errors.has(Zs)||e.errors.has(zs)||e.errors.has(nn)?e.errors.has(sn)?vt:void 0:vt,xn="lint-staged:taskError",kn=s("lint-staged:resolveTaskFn"),_n=({code:e,killed:t,signal:r})=>(t?"KILLED":r)||e||"FAILED",Ln=(e,t,r,s=!1)=>{const{stderr:n,stdout:o}=t;if(!!n||!!o){const t=s?i.Ay.redBright(`${gt} ${e}:`):`${ft} ${e}:`,a=[].concat(r.quiet?[]:["",t]).concat(n||[]).concat(o||[]);r.output.push(a.join("\n"))}else if(s){const s=_n(t),n=i.Ay.redBright(`\n${gt} ${e} failed without output (${s}).`);r.quiet||r.output.push(n)}},Pn=(e,t)=>{let r;const s=async()=>{r=(async e=>{try{const t=await En(e.pid);for(const e of t)try{process.kill(e)}catch(t){kn('Failed to kill process with pid "%d": %o',e,t)}}catch(t){kn('Failed to kill process with pid "%d": %o',e.pid,t)}e.kill()})(t),await r};return e.events.on(xn,s,{once:!0}),async()=>{e.events.off(xn,s),await r}},In=({command:e,cwd:t=process.cwd(),files:r,gitDir:s,isFn:n,shell:o=!1,verbose:a=!1})=>{const[c,...l]=function(e,t,r){var s,n=/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi,i=e,o=[];t&&o.push(t),r&&o.push(r);do{null!==(s=n.exec(i))&&o.push(yn(s[1],s[6],s[0]))}while(null!==s);return o}(e);kn("cmd:",c),kn("args:",l);const u={cwd:/^git(\.exe)?/i.test(c)?s:t,preferLocal:!0,reject:!1,shell:o,stdin:"ignore"};return kn("execaOptions:",u),async(t=wn())=>{const s=o?Os(n?e:`${e} ${r.join(" ")}`,u):Rs(c,n?l:l.concat(r),u),p=Pn(t,s),d=await s;if(await p(),d.failed||d.killed||null!=d.signal)throw((e,t,r)=>{r.errors.add(on),r.events.emit(xn,on),Ln(e,t,r,!0);const s=_n(t);return new Error(`${i.Ay.redBright(e)} ${i.Ay.dim(`[${s}]`)}`)})(e,d,t);a&&Ln(e,d,t)}},$n=s("lint-staged:makeCmdTasks"),Bn=async({commands:e,cwd:t,files:r,gitDir:s,shell:n,verbose:i})=>{$n("Creating listr tasks for commands %o",e);const o=Array.isArray(e)?e:[e],a=[];for(const e of o){const o="function"==typeof e,c=o?await e([...r]):e,l=Array.isArray(c)?c:[c];for(const e of l){if(o&&"string"!=typeof e)throw new Error(yt("[Function]","Function task should return a string or an array of strings",c));const l=In({command:e,cwd:t,files:r,gitDir:s,isFn:o,shell:n,verbose:i});a.push({title:e,command:e,task:l})}}return a},Dn=s("lint-staged:resolveGitRepo"),Fn=async(e=process.cwd())=>{try{Dn("Resolving git repo from `%s`",e),Dn("Unset GIT_DIR (was `%s`)",process.env.GIT_DIR),delete process.env.GIT_DIR,Dn("Unset GIT_WORK_TREE (was `%s`)",process.env.GIT_WORK_TREE),delete process.env.GIT_WORK_TREE;const t=Lt(await _s(["rev-parse","--show-prefix"],{cwd:e})),r=Lt(((e,t)=>(t&&t.endsWith(_t.sep)&&(t=t.slice(0,-1)),t?e.substring(0,e.lastIndexOf(t)):e))(Lt(e),t)),s=Lt(await(async e=>{const t=_t.join(e,".git"),r=await Gs.lstat(t);if(r.isDirectory())return t;if(r.isSymbolicLink())return await Gs.realpath(e);const s=(await js(t)).toString();return _t.resolve(e,s.replace(/^gitdir: /,"")).trim()})(r));return Dn("Resolved git directory to be `%s`",r),Dn("Resolved git config directory to be `%s`",s),{gitDir:r,gitConfigDir:s}}catch(e){return Dn("Failed to resolve git repo with error:",e),{error:e,gitDir:null,gitConfigDir:null}}},Hn=async()=>{},Mn=/(?<![\\$])({)(?:(?!(?<!\\),|\.\.|\{|\}).)*?(?<!\\)(})/g,Nn=/{{[^}{]*}}/,Gn=(e,t)=>{const r=(e=>{let t=`${e}`;const r=Nn.exec(e)?.[0];if(r){const e=r.replace("{{","{").replace("}}","}");t=t.replace(r,e)}return t})((e=>{let t=`${e}`,r=null;for(;r=Mn.exec(e);){const e=r[0],s=e.replace(/{/,"").replace(/}/,"");t=t.replace(e,s)}return t})(e));var s,n;return r!==e&&t.warn((s=e,n=r,i.Ay.yellow(`${mt} Detected incorrect braces with only single value: \`${s}\`. Reformatted as: \`${n}\`\n`))),r},Un=s("lint-staged:validateConfig"),jn=e=>e&&"object"==typeof e&&!Array.isArray(e),Kn=new Map([["concurrent",e=>"boolean"==typeof e],["chunkSize",e=>"number"==typeof e],["globOptions",jn],["linters",jn],["ignore",e=>Array.isArray(e)],["subTaskConcurrency",e=>"number"==typeof e],["renderer",e=>"string"==typeof e],["relative",e=>"boolean"==typeof e]]),Wn=(e,t,r)=>{try{return((e,t,r)=>{if(Un("Validating config from `%s`...",t),!e||"object"!=typeof e&&"function"!=typeof e)throw qs;if("function"==typeof e)return{"*":e};if(0===Object.entries(e).length)throw Vs;const s=[],i=Object.entries(e).reduce(((e,[t,n])=>{if(Kn.has(t))return Kn.get(t)(n)&&s.push(yt(t,"Advanced configuration has been deprecated.",n)),e;Array.isArray(n)&&!n.some((e=>"string"!=typeof e&&"function"!=typeof e))||"string"==typeof n||"function"==typeof n||s.push(yt(t,"Should be a string, a function, or an array of strings and functions.",n));const i=Gn(t,r);return{...e,[i]:n}}),{});if(s.length){const e=s.join("\n\n");throw r.error(xt(t,e)),new Error(e)}return Un("Validated config from `%s`:",t),Un((0,n.inspect)(e,{compact:!1})),i})(e,t,r)}catch(e){throw r.error(xt(t,e)),e}},zn=["package.json","package.yaml","package.yml",".lintstagedrc",".lintstagedrc.json",".lintstagedrc.yaml",".lintstagedrc.yml",".lintstagedrc.mjs",".lintstagedrc.js",".lintstagedrc.cjs","lint-staged.config.mjs","lint-staged.config.js","lint-staged.config.cjs"],Yn=s("lint-staged:searchConfigs"),qn=["ls-files","-z","--full-name","-t"],Vn=e=>zn.includes(_t.basename(e)),Xn=e=>e.split("/").length,Qn=(e,t)=>Xn(e)>Xn(t)?-1:1,Zn=async({configObject:e,configPath:t,cwd:r=process.cwd(),gitDir:s=r},n)=>{if(Yn("Searching for configuration files..."),e)return Yn("Using single direct configuration object..."),{"":Wn(e,"config object",n)};if(t){Yn("Using single configuration path...");const{config:e,filepath:r}=await Hn();return e?{[t]:Wn(e,r,n)}:{}}const[i,o]=await Promise.all([_s(qn,{cwd:s}).then(Ns),_s([...qn,"--others","--exclude-standard"],{cwd:s}).then(Ns)]),a=[...i,...o].flatMap((e=>e.startsWith("S ")?[]:[e.replace(/^[HSMRCK?U] /,"")])).filter(Vn).map((e=>Lt(_t.join(s,e)))).filter((c=r,e=>e.startsWith(Lt(c)))).sort(Qn);var c;Yn("Found possible config files:",a);const l=a.reduce(((e,t)=>Object.assign(e,{[t]:null})),{});await Promise.all(Object.keys(l).map((e=>Hn().then((({config:t,filepath:r})=>{t&&(e!==r&&Yn('Config file "%s" resolved to "%s"',e,r),l[e]=Wn(t,r,n))})))));const u=Object.entries(l).filter((([,e])=>!!e)).reduce(((e,[t,r])=>({...e,[t]:r})),{});if(!Object.keys(u).length){Yn('Could not find config files inside "%s"',r);const{config:e,filepath:t}=await Hn();e?(Yn('Found parent configuration file from "%s"',t),u[t]=Wn(e,t,n)):Yn('Could not find parent configuration files from "%s"',r)}return Yn("Found %d config files",Object.keys(u).length),u},Jn=s("lint-staged:runAll"),ei=e=>Object.assign(new Error("lint-staged failed"),{ctx:e}),ti=async({allowEmpty:e=!1,concurrent:t=!0,configObject:r,configPath:s,cwd:n,debug:o=!1,diff:a,diffFilter:c,maxArgLength:l,quiet:u=!1,relative:p=!1,shell:d=!1,stash:h=void 0===a,hidePartiallyStaged:f=h,verbose:g=!1},m=console)=>{Jn("Running all linter scripts...");const y=!!n;n=y?_t.resolve(n):process.cwd(),Jn("Using working directory `%s`",n);const E=wn({quiet:u}),{gitDir:b,gitConfigDir:w}=await Fn(n);if(!b)throw u||E.output.push(Et),E.errors.add(Js),ei(E);const S=await _s(["log","-1"],{cwd:b}).then((()=>!0)).catch((()=>!1));E.shouldBackup=S&&h,E.shouldBackup||u||m.warn(((e,t)=>{const r=void 0!==t?"`--diff` was used":e?"`--no-stash` was used":"there\u2019s no initial commit yet";return i.Ay.yellow(`${mt} Skipping backup because ${r}.\n`)})(S,a)),E.shouldHidePartiallyStaged=f,E.shouldHidePartiallyStaged||u||m.warn(((e,t)=>{const r=void 0!==t?"`--diff` was used":e?"`--no-hide-partially-staged` was used":"`--no-stash` was used";return i.Ay.yellow(`${mt} Skipping hiding unstaged changes from partially staged files because ${r}.\n`)})(S&&h,a));const A=await(async({cwd:e=process.cwd(),diff:t,diffFilter:r}={})=>{try{const s=await _s(Ms(t,r),{cwd:e});return s?Ns(s).map((t=>Lt(_t.resolve(e,t)))):[]}catch{return null}})({cwd:b,diff:a,diffFilter:c});if(!A)throw u||E.output.push(bt),E.errors.add(Qs),ei(E);if(Jn("Loaded list of staged files in git:\n%O",A),0===A.length)return u||E.output.push(St),E;const R=await Zn({configObject:r,configPath:s,cwd:n,gitDir:b},m),C=Object.keys(R).length;if(0===C)throw E.errors.add(Ys),ei(E);const v=await(async({configs:e,files:t,singleConfigMode:r})=>{mn("Grouping %d files by %d configurations",t.length,Object.keys(e).length);const s=new Set(t),n={};for(const[i,o]of Object.entries(e)){if(r){n[i]={config:o,files:t};break}const e=_t.normalize(_t.dirname(i)),a=t=>{const r=_t.relative(e,t);return r&&!r.startsWith("..")&&!_t.isAbsolute(r)},c=Object.keys(o).some((e=>e.startsWith(".."))),l=new Set(c?s:void 0);c||s.forEach((e=>{a(e)&&l.add(e)})),l.forEach((e=>{s.delete(e)})),n[i]={config:o,files:Array.from(l)}}return n})({configs:R,files:A,singleConfigMode:r||void 0!==s}),T=C>1;let O=!1;const x={ctx:E,exitOnError:!1,registerSignalListeners:!1,...Hs({debug:o,quiet:u},m)},k=[],_=new Set;for(const[e,{config:r,files:s}]of Object.entries(v)){const o=e?Lt(_t.relative(n,e)):"Config object",a=It({baseDir:b,files:s,maxArgLength:l,relative:p}),c=T&&!y?_t.dirname(e):n,u=a.length;u>1&&Jn("Chunked staged files from `%s` into %d part",e,u);for(const[e,s]of a.entries()){const n=await Promise.all(Is({config:r,cwd:c,files:s,relative:p}).map((e=>Bn({commands:e.commands,cwd:c,files:e.fileList,gitDir:b,shell:d,verbose:g}).then((t=>{e.fileList.forEach((e=>{const t=_t.isAbsolute(e)?e:Lt(_t.join(c,e));_.add(t)})),O=O||t.some((e=>"git add"===e.command));const r=e.fileList.length;return{title:`${e.pattern}${i.Ay.dim(` \u2014 ${r} ${1===r?"file":"files"}`)}`,task:async(e,r)=>r.newListr(t,{concurrent:!1,exitOnError:!0}),skip:()=>0===r&&`${e.pattern}${i.Ay.dim(" \u2014 no files")}`}})))));k.push({title:`${o}${i.Ay.dim(` \u2014 ${s.length} ${s.length>1?"files":"file"}`)}`+(u>1?i.Ay.dim(` (chunk ${e+1}/${u})...`):""),task:(e,r)=>r.newListr(n,{concurrent:t,exitOnError:!0}),skip:()=>E.errors.has(Zs)?"Skipped because of previous git error.":!!n.every((e=>e.skip()))&&`${o}${i.Ay.dim(" \u2014 no tasks to run")}`})}}if(O&&!u&&m.warn(Rt),k.every((e=>e.skip())))return u||E.output.push(At),E;const L=It({baseDir:n,files:Array.from(_),maxArgLength:l,relative:!1}),P=new gn({allowEmpty:e,gitConfigDir:w,gitDir:b,matchedFileChunks:L,diff:a,diffFilter:c}),I=new ht([{title:"Preparing lint-staged...",task:e=>P.prepare(e)},{title:"Hiding unstaged changes to partially staged files...",task:e=>P.hideUnstagedChanges(e),enabled:Sn},{title:`Running tasks for ${a?"changed":"staged"} files...`,task:(e,r)=>r.newListr(k,{concurrent:t}),skip:()=>k.every((e=>e.skip()))},{title:"Applying modifications from tasks...",task:e=>P.applyModifications(e),skip:An},{title:"Restoring unstaged changes to partially staged files...",task:e=>P.restoreUnstagedChanges(e),enabled:Sn,skip:Rn},{title:"Reverting to original state because of errors...",task:e=>P.restoreOriginalState(e),enabled:Cn,skip:vn},{title:"Cleaning up temporary files...",task:e=>P.cleanup(e),enabled:Tn,skip:On}],x);if(await I.run(),E.errors.size>0)throw ei(E);return E},ri=s("lint-staged:validateOptions"),si=s("lint-staged"),ni=()=>{switch(process.platform){case"darwin":return 262144;case"win32":return 8191;default:return 131072}},ii=async({allowEmpty:e=!1,concurrent:t=!0,config:r,configPath:s,cwd:n,debug:i=!1,diff:o,diffFilter:a,maxArgLength:c=ni()/2,quiet:l=!1,relative:u=!1,shell:p=!1,stash:d=void 0===o,hidePartiallyStaged:h=d,verbose:f=!1}={},g=console)=>{await(async(e={},t)=>{if(ri("Validating options..."),"string"==typeof e.cwd)try{const t=_t.resolve(e.cwd);await Gs.access(t,Er.constants.F_OK)}catch(r){throw t.error(Tt("cwd",e.cwd,r.message)),tn}if("string"==typeof e.shell)try{await Gs.access(e.shell,Er.constants.X_OK)}catch(r){throw t.error(Tt("shell",e.shell,r.message)),tn}ri("Validated options!")})({cwd:n,shell:p},g),si("Unset GIT_LITERAL_PATHSPECS (was `%s`)",process.env.GIT_LITERAL_PATHSPECS),delete process.env.GIT_LITERAL_PATHSPECS;const m={allowEmpty:e,concurrent:t,configObject:r,configPath:s,cwd:n,debug:i,diff:o,diffFilter:a,maxArgLength:c,quiet:l,relative:u,shell:p,stash:d,hidePartiallyStaged:h,verbose:f};try{const e=await ti(m,g);return si("Tasks were executed successfully!"),kt(e,g),!0}catch(e){if(e?.ctx?.errors){const{ctx:t}=e;return t.errors.has(Ys)?g.error(wt):t.errors.has(zs)?g.warn(Ot):t.errors.has(Zs)&&!t.errors.has(Xs)&&(g.error(vt),t.shouldBackup&&g.error(" Any lost modifications can be restored from a git stash:\n\n > git stash list\n stash@{0}: automatic lint-staged backup\n > git stash apply --index stash@{0}\n")),kt(t,g),!1}throw e}}},5190:(e,t,r)=>{r.d(t,{V:()=>l});var s=r(1708),n=r(6760),i=r(3136);function o(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}const a=(e,t)=>{let r;for(;r!==t;)e.push(n.join(t,"node_modules/.bin")),r=t,t=n.resolve(t,"..")},c=(e,t,r)=>{const s=t instanceof URL?(0,i.fileURLToPath)(t):t;e.push(n.resolve(r,s,".."))},l=({env:e=s.env,...t}={})=>{const r=o({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=s.cwd(),path:t=s.env[o()],preferLocal:r=!0,execPath:l=s.execPath,addExecPath:u=!0}={})=>{const p=e instanceof URL?(0,i.fileURLToPath)(e):e,d=n.resolve(p),h=[];return r&&a(h,d),u&&c(h,l,d),[...h,t].join(n.delimiter)})(t),e}},7017:(e,t,r)=>{r.d(t,{cf:()=>p});const s=[];s.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&s.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&s.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const n=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,i=Symbol.for("signal-exit emitter"),o=globalThis,a=Object.defineProperty.bind(Object);class c{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(o[i])return o[i];a(o,i,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],s=r.indexOf(t);-1!==s&&(0===s&&1===r.length?r.length=0:r.splice(s,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let s=!1;for(const n of this.listeners[e])s=!0===n(t,r)||s;return"exit"===e&&(s=this.emit("afterExit",t,r)||s),s}}class l{}const u=globalThis.process,{onExit:p,load:d,unload:h}=(f=n(u)?new class extends l{#e="win32"===u.platform?"SIGINT":"SIGHUP";#t=new c;#r;#s;#n;#i={};#o=!1;constructor(e){super(),this.#r=e,this.#i={};for(const t of s)this.#i[t]=()=>{const r=this.#r.listeners(t);let{count:s}=this.#t;const n=e;if("object"==typeof n.__signal_exit_emitter__&&"number"==typeof n.__signal_exit_emitter__.count&&(s+=n.__signal_exit_emitter__.count),r.length===s){this.unload();const r=this.#t.emit("exit",null,t),s="SIGHUP"===t?this.#e:t;r||e.kill(e.pid,s)}};this.#n=e.reallyExit,this.#s=e.emit}onExit(e,t){if(!n(this.#r))return()=>{};!1===this.#o&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#t.on(r,e),()=>{this.#t.removeListener(r,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(const e of s)try{const t=this.#i[e];t&&this.#r.on(e,t)}catch(e){}this.#r.emit=(e,...t)=>this.#a(e,...t),this.#r.reallyExit=e=>this.#c(e)}}unload(){this.#o&&(this.#o=!1,s.forEach((e=>{const t=this.#i[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#r.removeListener(e,t)}catch(e){}})),this.#r.emit=this.#s,this.#r.reallyExit=this.#n,this.#t.count-=1)}#c(e){return n(this.#r)?(this.#r.exitCode=e||0,this.#t.emit("exit",this.#r.exitCode,null),this.#n.call(this.#r,this.#r.exitCode)):0}#a(e,...t){const r=this.#s;if("exit"===e&&n(this.#r)){"number"==typeof t[0]&&(this.#r.exitCode=t[0]);const s=r.call(this.#r,e,...t);return this.#t.emit("exit",this.#r.exitCode,null),s}return r.call(this.#r,e,...t)}}(u):new class extends l{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>f.onExit(e,t),load:()=>f.load(),unload:()=>f.unload()});var f}};
package/dist/421.mjs DELETED
@@ -1 +0,0 @@
1
- export const id=421;export const ids=[421];export const modules={3490:(D,u,F)=>{F.d(u,{Ay:()=>A});const C=(D=0)=>u=>`\x1b[${u+D}m`,E=(D=0)=>u=>`\x1b[${38+D};5;${u}m`,B=(D=0)=>(u,F,C)=>`\x1b[${38+D};2;${u};${F};${C}m`,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(e.modifier),Object.keys(e.color),Object.keys(e.bgColor);const A=function(){const D=new Map;for(const[u,F]of Object.entries(e)){for(const[u,C]of Object.entries(F))e[u]={open:`\x1b[${C[0]}m`,close:`\x1b[${C[1]}m`},F[u]=e[u],D.set(C[0],C[1]);Object.defineProperty(e,u,{value:F,enumerable:!1})}return Object.defineProperty(e,"codes",{value:D,enumerable:!1}),e.color.close="\x1b[39m",e.bgColor.close="\x1b[49m",e.color.ansi=C(),e.color.ansi256=E(),e.color.ansi16m=B(),e.bgColor.ansi=C(10),e.bgColor.ansi256=E(10),e.bgColor.ansi16m=B(10),Object.defineProperties(e,{rgbToAnsi256:{value:(D,u,F)=>D===u&&u===F?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(u/255*5)+Math.round(F/255*5),enumerable:!1},hexToRgb:{value:D=>{const u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!u)return[0,0,0];let[F]=u;3===F.length&&(F=[...F].map((D=>D+D)).join(""));const C=Number.parseInt(F,16);return[C>>16&255,C>>8&255,255&C]},enumerable:!1},hexToAnsi256:{value:D=>e.rgbToAnsi256(...e.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value:D=>{if(D<8)return 30+D;if(D<16)return D-8+90;let u,F,C;if(D>=232)u=(10*(D-232)+8)/255,F=u,C=u;else{const E=(D-=16)%36;u=Math.floor(D/36)/5,F=Math.floor(E/6)/5,C=E%6/5}const E=2*Math.max(u,F,C);if(0===E)return 30;let B=30+(Math.round(C)<<2|Math.round(F)<<1|Math.round(u));return 2===E&&(B+=60),B},enumerable:!1},rgbToAnsi:{value:(D,u,F)=>e.ansi256ToAnsi(e.rgbToAnsi256(D,u,F)),enumerable:!1},hexToAnsi:{value:D=>e.ansi256ToAnsi(e.hexToAnsi256(D)),enumerable:!1}}),e}()},3860:(D,u,F)=>{function C(D){return 161===D||164===D||167===D||168===D||170===D||173===D||174===D||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||198===D||208===D||215===D||216===D||D>=222&&D<=225||230===D||D>=232&&D<=234||236===D||237===D||240===D||242===D||243===D||D>=247&&D<=250||252===D||254===D||257===D||273===D||275===D||283===D||294===D||295===D||299===D||D>=305&&D<=307||312===D||D>=319&&D<=322||324===D||D>=328&&D<=331||333===D||338===D||339===D||358===D||359===D||363===D||462===D||464===D||466===D||468===D||470===D||472===D||474===D||476===D||593===D||609===D||708===D||711===D||D>=713&&D<=715||717===D||720===D||D>=728&&D<=731||733===D||735===D||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||1025===D||D>=1040&&D<=1103||1105===D||8208===D||D>=8211&&D<=8214||8216===D||8217===D||8220===D||8221===D||D>=8224&&D<=8226||D>=8228&&D<=8231||8240===D||8242===D||8243===D||8245===D||8251===D||8254===D||8308===D||8319===D||D>=8321&&D<=8324||8364===D||8451===D||8453===D||8457===D||8467===D||8470===D||8481===D||8482===D||8486===D||8491===D||8531===D||8532===D||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||8585===D||D>=8592&&D<=8601||8632===D||8633===D||8658===D||8660===D||8679===D||8704===D||8706===D||8707===D||8711===D||8712===D||8715===D||8719===D||8721===D||8725===D||8730===D||D>=8733&&D<=8736||8739===D||8741===D||D>=8743&&D<=8748||8750===D||D>=8756&&D<=8759||8764===D||8765===D||8776===D||8780===D||8786===D||8800===D||8801===D||D>=8804&&D<=8807||8810===D||8811===D||8814===D||8815===D||8834===D||8835===D||8838===D||8839===D||8853===D||8857===D||8869===D||8895===D||8978===D||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||9632===D||9633===D||D>=9635&&D<=9641||9650===D||9651===D||9654===D||9655===D||9660===D||9661===D||9664===D||9665===D||D>=9670&&D<=9672||9675===D||D>=9678&&D<=9681||D>=9698&&D<=9701||9711===D||9733===D||9734===D||9737===D||9742===D||9743===D||9756===D||9758===D||9792===D||9794===D||9824===D||9825===D||D>=9827&&D<=9829||D>=9831&&D<=9834||9836===D||9837===D||9839===D||9886===D||9887===D||9919===D||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||9955===D||9960===D||9961===D||D>=9963&&D<=9969||9972===D||D>=9974&&D<=9977||9979===D||9980===D||9982===D||9983===D||10045===D||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||65533===D||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||127375===D||127376===D||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}function E(D){return 12288===D||D>=65281&&D<=65376||D>=65504&&D<=65510}function B(D){return D>=4352&&D<=4447||8986===D||8987===D||9001===D||9002===D||D>=9193&&D<=9196||9200===D||9203===D||9725===D||9726===D||9748===D||9749===D||D>=9800&&D<=9811||9855===D||9875===D||9889===D||9898===D||9899===D||9917===D||9918===D||9924===D||9925===D||9934===D||9940===D||9962===D||9970===D||9971===D||9973===D||9978===D||9981===D||9989===D||9994===D||9995===D||10024===D||10060===D||10062===D||D>=10067&&D<=10069||10071===D||D>=10133&&D<=10135||10160===D||10175===D||11035===D||11036===D||11088===D||11093===D||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12771||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=19903||D>=19968&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||94192===D||94193===D||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101632&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||110589===D||110590===D||D>=110592&&D<=110882||110898===D||D>=110928&&D<=110930||110933===D||D>=110948&&D<=110951||D>=110960&&D<=111355||126980===D||127183===D||127374===D||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||127568===D||127569===D||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||127988===D||D>=127992&&D<=128062||128064===D||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||128378===D||128405===D||128406===D||128420===D||D>=128507&&D<=128591||D>=128640&&D<=128709||128716===D||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||128747===D||128748===D||D>=128756&&D<=128764||D>=128992&&D<=129003||129008===D||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129672||D>=129680&&D<=129725||D>=129727&&D<=129733||D>=129742&&D<=129755||D>=129760&&D<=129768||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}function e(D){if(!Number.isSafeInteger(D))throw new TypeError(`Expected a code point, got \`${typeof D}\`.`)}function A(D,{ambiguousAsWide:u=!1}={}){return e(D),E(D)||B(D)||u&&C(D)?2:1}F.d(u,{Q1:()=>A})},7316:(D,u,F)=>{F.d(u,{A:()=>A});var C=F(5340),E=F(3860);const B=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,e=new Intl.Segmenter;function A(D,u={}){if("string"!=typeof D||0===D.length)return 0;const{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:A=!1}=u;if(A||(D=(0,C.A)(D)),0===D.length)return 0;let n=0;const r={ambiguousAsWide:!F};for(const{segment:u}of e.segment(D)){const D=u.codePointAt(0);D<=31||D>=127&&D<=159||(D>=768&&D<=879||(B().test(u)?n+=2:n+=(0,E.Q1)(D,r)))}return n}},5340:(D,u,F)=>{F.d(u,{A:()=>E});const C=function({onlyFirst:D=!1}={}){const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}();function E(D){if("string"!=typeof D)throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(C,"")}}};
package/dist/445.mjs DELETED
@@ -1 +0,0 @@
1
- export const id=445;export const ids=[445];export const modules={6283:e=>{const t=(e,t)=>{for(const n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};e.exports=t,e.exports.default=t},7862:(e,t,n)=>{const r=n(6283),o=new WeakMap,i=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,i=0;const s=e.displayName||e.name||"<anonymous>",c=function(...r){if(o.set(c,++i),1===i)n=e.apply(this,r),e=null;else if(!0===t.throw)throw new Error(`Function \`${s}\` can only be called once`);return n};return r(c,e),o.set(c,i),c};e.exports=i,e.exports.default=i,e.exports.callCount=e=>{if(!o.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return o.get(e)}},112:(e,t,n)=>{var r=global.process;const o=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(o(r)){var i,s=n(2613),c=n(7401),l=/^win/i.test(r.platform),a=n(4434);"function"!=typeof a&&(a=a.EventEmitter),r.__signal_exit_emitter__?i=r.__signal_exit_emitter__:((i=r.__signal_exit_emitter__=new a).count=0,i.emitted={}),i.infinite||(i.setMaxListeners(1/0),i.infinite=!0),e.exports=function(e,t){if(!o(global.process))return function(){};s.equal(typeof e,"function","a callback must be provided for exit handler"),!1===p&&h();var n="exit";t&&t.alwaysLast&&(n="afterexit");return i.on(n,e),function(){i.removeListener(n,e),0===i.listeners("exit").length&&0===i.listeners("afterexit").length&&u()}};var u=function(){p&&o(global.process)&&(p=!1,c.forEach((function(e){try{r.removeListener(e,d[e])}catch(e){}})),r.emit=y,r.reallyExit=w,i.count-=1)};e.exports.unload=u;var f=function(e,t,n){i.emitted[e]||(i.emitted[e]=!0,i.emit(e,t,n))},d={};c.forEach((function(e){d[e]=function(){o(global.process)&&(r.listeners(e).length===i.count&&(u(),f("exit",null,e),f("afterexit",null,e),l&&"SIGHUP"===e&&(e="SIGINT"),r.kill(r.pid,e)))}})),e.exports.signals=function(){return c};var p=!1,h=function(){!p&&o(global.process)&&(p=!0,i.count+=1,c=c.filter((function(e){try{return r.on(e,d[e]),!0}catch(e){return!1}})),r.emit=g,r.reallyExit=x)};e.exports.load=h;var w=r.reallyExit,x=function(e){o(global.process)&&(r.exitCode=e||0,f("exit",r.exitCode,null),f("afterexit",r.exitCode,null),w.call(r,r.exitCode))},y=r.emit,g=function(e,t){if("exit"===e&&o(global.process)){void 0!==t&&(r.exitCode=t);var n=y.apply(this,arguments);return f("exit",r.exitCode,null),f("afterexit",r.exitCode,null),n}return y.apply(this,arguments)}}else e.exports=function(){return function(){}}},7401:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")},9445:(e,t,n)=>{n.d(t,{createLogUpdate:()=>j});var r=n(1708);const o="\x1b[",i="\x1b]",s="\x07",c=";",l="undefined"!=typeof window&&void 0!==window.document,a=!l&&"Apple_Terminal"===r.env.TERM_PROGRAM,u=!l&&"win32"===r.platform,f=l?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:r.cwd,d={cursorTo:(e,t)=>{if("number"!=typeof e)throw new TypeError("The `x` argument is required");return"number"!=typeof t?o+(e+1)+"G":o+(t+1)+c+(e+1)+"H"},cursorMove:(e,t)=>{if("number"!=typeof e)throw new TypeError("The `x` argument is required");let n="";return e<0?n+=o+-e+"D":e>0&&(n+=o+e+"C"),t<0?n+=o+-t+"A":t>0&&(n+=o+t+"B"),n},cursorUp:(e=1)=>o+e+"A",cursorDown:(e=1)=>o+e+"B",cursorForward:(e=1)=>o+e+"C",cursorBackward:(e=1)=>o+e+"D",cursorLeft:"\x1b[G"};d.cursorSavePosition=a?"\x1b7":"\x1b[s",d.cursorRestorePosition=a?"\x1b8":"\x1b[u",d.cursorGetPosition="\x1b[6n",d.cursorNextLine="\x1b[E",d.cursorPrevLine="\x1b[F",d.cursorHide="\x1b[?25l",d.cursorShow="\x1b[?25h",d.eraseLines=e=>{let t="";for(let n=0;n<e;n++)t+=d.eraseLine+(n<e-1?d.cursorUp():"");return e&&(t+=d.cursorLeft),t},d.eraseEndLine="\x1b[K",d.eraseStartLine="\x1b[1K",d.eraseLine="\x1b[2K",d.eraseDown="\x1b[J",d.eraseUp="\x1b[1J",d.eraseScreen="\x1b[2J",d.scrollUp="\x1b[S",d.scrollDown="\x1b[T",d.clearScreen="\x1bc",d.clearTerminal=u?`${d.eraseScreen}${o}0f`:`${d.eraseScreen}${o}3J${o}H`,d.enterAlternativeScreen="\x1b[?1049h",d.exitAlternativeScreen="\x1b[?1049l",d.beep=s,d.link=(e,t)=>[i,"8",c,c,t,s,e,i,"8",c,c,s].join(""),d.image=(e,t={})=>{let n=`${i}1337;File=inline=1`;return t.width&&(n+=`;width=${t.width}`),t.height&&(n+=`;height=${t.height}`),!1===t.preserveAspectRatio&&(n+=";preserveAspectRatio=0"),n+":"+e.toString("base64")+s},d.iTerm={setCwd:(e=f())=>`${i}50;CurrentDir=${e}${s}`,annotation(e,t={}){let n=`${i}1337;`;const r=void 0!==t.x,o=void 0!==t.y;if((r||o)&&(!r||!o||void 0===t.length))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),n+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?n+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):n+=e,n+s}};const p=d;var h=n(7862),w=n(112);const x=h((()=>{w((()=>{r.stderr.write("\x1b[?25h")}),{alwaysLast:!0})}));let y=!1;const g={show:(e=r.stderr)=>{e.isTTY&&(y=!1,e.write("\x1b[?25h"))},hide:(e=r.stderr)=>{e.isTTY&&(x(),y=!0,e.write("\x1b[?25l"))},toggle:(e,t)=>{void 0!==e&&(y=e),y?g.show(t):g.hide(t)}},m=g;var S=n(782),v=n(3490),I=n(3860);function A(e){return!!Number.isInteger(e)&&2===(0,I.Q1)(e)}const T=new Set([27,155]),b="0".codePointAt(0),G="9".codePointAt(0),L=new Set,E=new Map;for(const[e,t]of v.Ay.codes)L.add(v.Ay.color.ansi(t)),E.set(v.Ay.color.ansi(e),v.Ay.color.ansi(t));function _(e){if(L.has(e))return e;if(E.has(e))return E.get(e);(e=e.slice(2)).includes(";")&&(e=e[0]+"0");const t=v.Ay.codes.get(Number.parseInt(e,10));return t?v.Ay.color.ansi(t):v.Ay.reset.open}function C(e,t){const n=function(e){for(let t=0;t<e.length;t++){const n=e.codePointAt(t);if(n>=b&&n<=G)return t}return-1}(e=e.slice(t,t+19));if(-1!==n){let t=e.indexOf("m",n);return-1===t&&(t=e.length),e.slice(0,t+1)}}function P(e){let t=[];for(const n of e)n.code===v.Ay.reset.open?t=[]:L.has(n.code)?t=t.filter((e=>e.endCode!==n.code)):(t=t.filter((e=>e.endCode!==n.endCode)),t.push(n));return t}function R(e,t,n){const r=function(e,t=Number.POSITIVE_INFINITY){const n=[];let r=0,o=0;for(;r<e.length;){const i=e.codePointAt(r);if(T.has(i)){const t=C(e,r);if(t){n.push({type:"ansi",code:t,endCode:_(t)}),r+=t.length;continue}}const s=A(i),c=String.fromCodePoint(i);if(n.push({type:"character",value:c,isFullWidth:s}),r+=c.length,o+=s?2:c.length,o>=t)break}return n}(e,n);let o=[],i=0,s="",c=!1;for(const e of r){if(void 0!==n&&i>=n)break;"ansi"===e.type?(o.push(e),c&&(s+=e.code)):(!c&&i>=t&&(c=!0,o=P(o),s=o.map((({code:e})=>e)).join("")),c&&(s+=e.value),i+=e.isFullWidth?2:e.value.length)}return s+=P(o).map((({endCode:e})=>e)).reverse().join(""),s}var $=n(5340);const U=e=>{const{columns:t}=e;return t||80},N=(e,t)=>{const n=e.rows??24,r=t.split("\n"),o=r.length-n;return o<=0?t:R(t,(0,$.A)(r.slice(0,o).join("\n")).length+1)};function j(e,{showCursor:t=!1}={}){let n=0,r=U(e),o="";const i=(...i)=>{t||m.hide();let s=i.join(" ")+"\n";s=N(e,s);const c=U(e);s===o&&r===c||(o=s,r=c,s=(0,S.default)(s,c,{trim:!1,hard:!0,wordWrap:!1}),e.write(p.eraseLines(n)+s),n=s.split("\n").length)};return i.clear=()=>{e.write(p.eraseLines(n)),o="",r=U(e),n=0},i.done=()=>{o="",r=U(e),n=0,t||m.show()},i}j(r.stdout),j(r.stderr)}};