@nice-move/cli 0.11.22 → 0.11.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-move/cli",
3
- "version": "0.11.22",
3
+ "version": "0.11.23",
4
4
  "description": "Frontend develop helper for frontend development",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -44,7 +44,7 @@
44
44
  "@commitlint/format": "^19.8.1",
45
45
  "@commitlint/lint": "^19.8.1",
46
46
  "execa": "^9.5.3",
47
- "lint-staged": "^16.0.0",
47
+ "lint-staged": "^15.5.2",
48
48
  "settingz": "^0.2.0"
49
49
  },
50
50
  "engines": {
package/dist/284.mjs DELETED
@@ -1 +0,0 @@
1
- export const __webpack_id__=284;export const __webpack_ids__=[284];export const __webpack_modules__={303:(t,e,s)=>{const r=s(1811);t.exports=(t,e={})=>{const s=(t,i={})=>{const n=e.escapeInvalid&&r.isInvalidBrace(i),o=!0===t.invalid&&!0===e.escapeInvalid;let a="";if(t.value)return(n||o)&&r.isOpenOrClose(t)?"\\"+t.value:t.value;if(t.value)return t.value;if(t.nodes)for(const e of t.nodes)a+=s(e);return a};return s(t)}},433:(t,e,s)=>{var r=s(857),i=s(2775);t.exports=function(t){i("ps",["-A","-o","ppid,pid"],(function(e,s,i){if(e)return t(e);if(0!==i)return t(new Error("pidtree ps command exited with code "+i));try{s=s.split(r.EOL);for(var n=[],o=1;o<s.length;o++)s[o]=s[o].trim(),s[o]&&(s[o]=s[o].split(/\s+/),s[o][0]=parseInt(s[o][0],10),s[o][1]=parseInt(s[o][1],10),n.push(s[o]));t(null,n)}catch(e){t(e)}}))}},803:t=>{t.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"}},1754:(t,e,s)=>{const r=s(857),i=s(4891),n=process.env;let o;function a(t){const e=function(t){if(!1===o)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(t&&!t.isTTY&&!0!==o)return 0;const e=o?1:0;if("win32"===process.platform){const t=r.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in n)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((t=>t in n))||"codeship"===n.CI_NAME?1:e;if("TEAMCITY_VERSION"in n)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(n.TEAMCITY_VERSION)?1:0;if("truecolor"===n.COLORTERM)return 3;if("TERM_PROGRAM"in n){const t=parseInt((n.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(n.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(n.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(n.TERM)||"COLORTERM"in n?1:(n.TERM,e)}(t);return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(e)}i("no-color")||i("no-colors")||i("color=false")?o=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=!0),"FORCE_COLOR"in n&&(o=0===n.FORCE_COLOR.length||0!==parseInt(n.FORCE_COLOR,10)),t.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},1811:(t,e)=>{e.isInteger=t=>"number"==typeof t?Number.isInteger(t):"string"==typeof t&&""!==t.trim()&&Number.isInteger(Number(t)),e.find=(t,e)=>t.nodes.find((t=>t.type===e)),e.exceedsLimit=(t,s,r=1,i)=>!1!==i&&!(!e.isInteger(t)||!e.isInteger(s))&&(Number(s)-Number(t))/Number(r)>=i,e.escapeNode=(t,e=0,s)=>{const r=t.nodes[e];r&&(s&&r.type===s||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},e.encloseBrace=t=>!("brace"!==t.type||t.commas>>0+t.ranges||(t.invalid=!0,0)),e.isInvalidBrace=t=>!("brace"!==t.type||!0!==t.invalid&&!t.dollar&&(t.commas>>0+t.ranges&&!0===t.open&&!0===t.close||(t.invalid=!0,0))),e.isOpenOrClose=t=>"open"===t.type||"close"===t.type||!0===t.open||!0===t.close,e.reduce=t=>t.reduce(((t,e)=>("text"===e.type&&t.push(e.value),"range"===e.type&&(e.type="text"),t)),[]),e.flatten=(...t)=>{const e=[],s=t=>{for(let r=0;r<t.length;r++){const i=t[r];Array.isArray(i)?s(i):void 0!==i&&e.push(i)}return e};return s(t),e}},2411:(t,e,s)=>{const r=s(9023),i=s(4710),n=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),o=t=>"number"==typeof t||"string"==typeof t&&""!==t,a=t=>Number.isInteger(+t),l=t=>{let e=`${t}`,s=-1;if("-"===e[0]&&(e=e.slice(1)),"0"===e)return!1;for(;"0"===e[++s];);return s>0},c=(t,e,s)=>{if(e>0){let s="-"===t[0]?"-":"";s&&(t=t.slice(1)),t=s+t.padStart(s?e-1:e,"0")}return!1===s?String(t):t},u=(t,e)=>{let s="-"===t[0]?"-":"";for(s&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return s?"-"+t:t},p=(t,e,s,r)=>{if(s)return i(t,e,{wrap:!1,...r});let n=String.fromCharCode(t);return t===e?n:`[${n}-${String.fromCharCode(e)}]`},h=(t,e,s)=>{if(Array.isArray(t)){let e=!0===s.wrap,r=s.capture?"":"?:";return e?`(${r}${t.join("|")})`:t.join("|")}return i(t,e,s)},d=(...t)=>new RangeError("Invalid range arguments: "+r.inspect(...t)),f=(t,e,s)=>{if(!0===s.strictRanges)throw d([t,e]);return[]},g=(t,e,s,r={})=>{if(null==e&&o(t))return[t];if(!o(t)||!o(e))return f(t,e,r);if("function"==typeof s)return g(t,e,1,{transform:s});if(n(s))return g(t,e,0,s);let i={...r};return!0===i.capture&&(i.wrap=!0),s=s||i.step||1,a(s)?a(t)&&a(e)?((t,e,s=1,r={})=>{let i=Number(t),n=Number(e);if(!Number.isInteger(i)||!Number.isInteger(n)){if(!0===r.strictRanges)throw d([t,e]);return[]}0===i&&(i=0),0===n&&(n=0);let o=i>n,a=String(t),f=String(e),g=String(s);s=Math.max(Math.abs(s),1);let m=l(a)||l(f)||l(g),y=m?Math.max(a.length,f.length,g.length):0,E=!1===m&&!1===((t,e,s)=>"string"==typeof t||"string"==typeof e||!0===s.stringify)(t,e,r),b=r.transform||(t=>e=>!0===t?Number(e):String(e))(E);if(r.toRegex&&1===s)return p(u(t,y),u(e,y),!0,r);let R={negatives:[],positives:[]},A=[],w=0;for(;o?i>=n:i<=n;)!0===r.toRegex&&s>1?R[(C=i)<0?"negatives":"positives"].push(Math.abs(C)):A.push(c(b(i,w),y,E)),i=o?i-s:i+s,w++;var C;return!0===r.toRegex?s>1?((t,e,s)=>{t.negatives.sort(((t,e)=>t<e?-1:t>e?1:0)),t.positives.sort(((t,e)=>t<e?-1:t>e?1:0));let r,i=e.capture?"":"?:",n="",o="";return t.positives.length&&(n=t.positives.map((t=>u(String(t),s))).join("|")),t.negatives.length&&(o=`-(${i}${t.negatives.map((t=>u(String(t),s))).join("|")})`),r=n&&o?`${n}|${o}`:n||o,e.wrap?`(${i}${r})`:r})(R,r,y):h(A,null,{wrap:!1,...r}):A})(t,e,s,i):((t,e,s=1,r={})=>{if(!a(t)&&t.length>1||!a(e)&&e.length>1)return f(t,e,r);let i=r.transform||(t=>String.fromCharCode(t)),n=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),l=n>o,c=Math.min(n,o),u=Math.max(n,o);if(r.toRegex&&1===s)return p(c,u,!1,r);let d=[],g=0;for(;l?n>=o:n<=o;)d.push(i(n,g)),n=l?n-s:n+s,g++;return!0===r.toRegex?h(d,null,{wrap:!1,options:r}):d})(t,e,Math.max(Math.abs(s),1),i):null==s||n(s)?g(t,e,1,s):((t,e)=>{if(!0===e.strictRanges)throw new TypeError(`Expected step "${t}" to be a number`);return[]})(s,i)};t.exports=g},2728:(t,e,s)=>{const r=s(2018),i=s(9023);e.init=function(t){t.inspectOpts={};const s=Object.keys(e.inspectOpts);for(let r=0;r<s.length;r++)t.inspectOpts[s[r]]=e.inspectOpts[s[r]]},e.log=function(...t){return process.stderr.write(i.formatWithOptions(e.inspectOpts,...t)+"\n")},e.formatArgs=function(s){const{namespace:r,useColors:i}=this;if(i){const e=this.color,i="\x1b[3"+(e<8?e:"8;5;"+e),n=` ${i};1m${r} \x1b[0m`;s[0]=n+s[0].split("\n").join("\n"+n),s.push(i+"m+"+t.exports.humanize(this.diff)+"\x1b[0m")}else s[0]=(e.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+r+" "+s[0]},e.save=function(t){t?process.env.DEBUG=t:delete process.env.DEBUG},e.load=function(){return process.env.DEBUG},e.useColors=function(){return"colors"in e.inspectOpts?Boolean(e.inspectOpts.colors):r.isatty(process.stderr.fd)},e.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{const t=s(1754);t&&(t.stderr||t).level>=2&&(e.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(t){}e.inspectOpts=Object.keys(process.env).filter((t=>/^debug_/i.test(t))).reduce(((t,e)=>{const s=e.substring(6).toLowerCase().replace(/_([a-z])/g,((t,e)=>e.toUpperCase()));let r=process.env[e];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),t[s]=r,t}),{}),t.exports=s(9565)(e);const{formatters:n}=t.exports;n.o=function(t){return this.inspectOpts.colors=this.useColors,i.inspect(t,this.inspectOpts).split("\n").map((t=>t.trim())).join(" ")},n.O=function(t){return this.inspectOpts.colors=this.useColors,i.inspect(t,this.inspectOpts)}},2775:(t,e,s)=>{var r=s(5317).spawn;t.exports=function(t,e,s,i){"function"==typeof s&&(i=s,s=void 0);var n=!1,o=r(t,e,s),a="",l="";o.stdout.on("data",(function(t){a+=t.toString()})),o.stderr.on("data",(function(t){l+=t.toString()})),o.on("error",(function(t){n||(n=!0,i(new Error(t)))})),o.on("close",(function(t){if(!n){if(n=!0,l=function(t){if(t)return(t=(t=t.trim()).replace(/your \d+x\d+ screen size is bogus\. expect trouble/gi,"")).trim()}(l))return i(new Error(l));i(null,a,t)}}))}},3297:(t,e,s)=>{const r=s(6927),{CHAR_ASTERISK:i,CHAR_AT:n,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_PLUS:f,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:E}=s(4751),b=t=>t===u||t===o,R=t=>{!0!==t.isPrefix&&(t.depth=t.isGlobstar?1/0:1)};t.exports=(t,e)=>{const s=e||{},A=t.length-1,w=!0===s.parts||!0===s.scanToEnd,C=[],S=[],v=[];let T,O,_=t,k=-1,x=0,L=0,P=!1,$=!1,I=!1,H=!1,B=!1,F=!1,D=!1,M=!1,N=!1,U=!1,j=0,G={value:"",depth:0,isGlob:!1};const K=()=>k>=A,W=()=>(T=O,_.charCodeAt(++k));for(;k<A;){let t;if(O=W(),O!==o){if(!0===F||O===p){for(j++;!0!==K()&&(O=W());)if(O!==o)if(O!==p){if(!0!==F&&O===l&&(O=W())===l){if(P=G.isBrace=!0,I=G.isGlob=!0,U=!0,!0===w)continue;break}if(!0!==F&&O===a){if(P=G.isBrace=!0,I=G.isGlob=!0,U=!0,!0===w)continue;break}if(O===m&&(j--,0===j)){F=!1,P=G.isBrace=!0,U=!0;break}}else j++;else D=G.backslashes=!0,W();if(!0===w)continue;break}if(O!==u){if(!0!==s.noext&&!0==(O===f||O===n||O===i||O===g||O===c)&&_.charCodeAt(k+1)===h){if(I=G.isGlob=!0,H=G.isExtglob=!0,U=!0,O===c&&k===x&&(N=!0),!0===w){for(;!0!==K()&&(O=W());)if(O!==o){if(O===y){I=G.isGlob=!0,U=!0;break}}else D=G.backslashes=!0,O=W();continue}break}if(O===i){if(T===i&&(B=G.isGlobstar=!0),I=G.isGlob=!0,U=!0,!0===w)continue;break}if(O===g){if(I=G.isGlob=!0,U=!0,!0===w)continue;break}if(O===d){for(;!0!==K()&&(t=W());)if(t!==o){if(t===E){$=G.isBracket=!0,I=G.isGlob=!0,U=!0;break}}else D=G.backslashes=!0,W();if(!0===w)continue;break}if(!0===s.nonegate||O!==c||k!==x){if(!0!==s.noparen&&O===h){if(I=G.isGlob=!0,!0===w){for(;!0!==K()&&(O=W());)if(O!==h){if(O===y){U=!0;break}}else D=G.backslashes=!0,O=W();continue}break}if(!0===I){if(U=!0,!0===w)continue;break}}else M=G.negated=!0,x++}else{if(C.push(k),S.push(G),G={value:"",depth:0,isGlob:!1},!0===U)continue;if(T===l&&k===x+1){x+=2;continue}L=k+1}}else D=G.backslashes=!0,O=W(),O===p&&(F=!0)}!0===s.noext&&(H=!1,I=!1);let Y=_,z="",q="";x>0&&(z=_.slice(0,x),_=_.slice(x),L-=x),Y&&!0===I&&L>0?(Y=_.slice(0,L),q=_.slice(L)):!0===I?(Y="",q=_):Y=_,Y&&""!==Y&&"/"!==Y&&Y!==_&&b(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),!0===s.unescape&&(q&&(q=r.removeBackslashes(q)),Y&&!0===D&&(Y=r.removeBackslashes(Y)));const Q={prefix:z,input:t,start:x,base:Y,glob:q,isBrace:P,isBracket:$,isGlob:I,isExtglob:H,isGlobstar:B,negated:M,negatedExtglob:N};if(!0===s.tokens&&(Q.maxDepth=0,b(O)||S.push(G),Q.tokens=S),!0===s.parts||!0===s.tokens){let e;for(let r=0;r<C.length;r++){const i=e?e+1:x,n=C[r],o=t.slice(i,n);s.tokens&&(0===r&&0!==x?(S[r].isPrefix=!0,S[r].value=z):S[r].value=o,R(S[r]),Q.maxDepth+=S[r].depth),0===r&&""===o||v.push(o),e=n}if(e&&e+1<t.length){const r=t.slice(e+1);v.push(r),s.tokens&&(S[S.length-1].value=r,R(S[S.length-1]),Q.maxDepth+=S[S.length-1].depth)}Q.slashes=C,Q.parts=v}return Q}},3298:(t,e,s)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;e.splice(1,0,s,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,s)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.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;let t;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&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})(),e.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"],e.log=console.debug||console.log||(()=>{}),t.exports=s(9565)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},3585:(t,e,s)=>{const r=s(303),{MAX_LENGTH:i,CHAR_BACKSLASH:n,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:u,CHAR_LEFT_CURLY_BRACE:p,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:g,CHAR_SINGLE_QUOTE:m,CHAR_NO_BREAK_SPACE:y,CHAR_ZERO_WIDTH_NOBREAK_SPACE:E}=s(803);t.exports=(t,e={})=>{if("string"!=typeof t)throw new TypeError("Expected a string");const s=e||{},b="number"==typeof s.maxLength?Math.min(i,s.maxLength):i;if(t.length>b)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${b})`);const R={type:"root",input:t,nodes:[]},A=[R];let w=R,C=R,S=0;const v=t.length;let T,O=0,_=0;const k=()=>t[O++],x=t=>{if("text"===t.type&&"dot"===C.type&&(C.type="text"),!C||"text"!==C.type||"text"!==t.type)return w.nodes.push(t),t.parent=w,t.prev=C,C=t,t;C.value+=t.value};for(x({type:"bos"});O<v;)if(w=A[A.length-1],T=k(),T!==E&&T!==y)if(T!==n)if(T!==f)if(T!==d)if(T!==c)if(T!==u)if(T!==g&&T!==m&&T!==o)if(T!==p)if(T!==h)if(T===a&&_>0){if(w.ranges>0){w.ranges=0;const t=w.nodes.shift();w.nodes=[t,{type:"text",value:r(w)}]}x({type:"comma",value:T}),w.commas++}else if(T===l&&_>0&&0===w.commas){const t=w.nodes;if(0===_||0===t.length){x({type:"text",value:T});continue}if("dot"===C.type){if(w.range=[],C.value+=T,C.type="range",3!==w.nodes.length&&5!==w.nodes.length){w.invalid=!0,w.ranges=0,C.type="text";continue}w.ranges++,w.args=[];continue}if("range"===C.type){t.pop();const e=t[t.length-1];e.value+=C.value+T,C=e,w.ranges--;continue}x({type:"dot",value:T})}else x({type:"text",value:T});else{if("brace"!==w.type){x({type:"text",value:T});continue}const t="close";w=A.pop(),w.close=!0,x({type:t,value:T}),_--,w=A[A.length-1]}else{_++;const t=C.value&&"$"===C.value.slice(-1)||!0===w.dollar;w=x({type:"brace",open:!0,close:!1,dollar:t,depth:_,commas:0,ranges:0,nodes:[]}),A.push(w),x({type:"open",value:T})}else{const t=T;let s;for(!0!==e.keepQuotes&&(T="");O<v&&(s=k());)if(s!==n){if(s===t){!0===e.keepQuotes&&(T+=s);break}T+=s}else T+=s+k();x({type:"text",value:T})}else{if("paren"!==w.type){x({type:"text",value:T});continue}w=A.pop(),x({type:"text",value:T}),w=A[A.length-1]}else w=x({type:"paren",nodes:[]}),A.push(w),x({type:"text",value:T});else{let t;for(S++;O<v&&(t=k());)if(T+=t,t!==d)if(t!==n){if(t===f&&(S--,0===S))break}else T+=k();else S++;x({type:"text",value:T})}else x({type:"text",value:"\\"+T});else x({type:"text",value:(e.keepEscaping?T:"")+k()});do{if(w=A.pop(),"root"!==w.type){w.nodes.forEach((t=>{t.nodes||("open"===t.type&&(t.isOpen=!0),"close"===t.type&&(t.isClose=!0),t.nodes||(t.type="text"),t.invalid=!0)}));const t=A[A.length-1],e=t.nodes.indexOf(w);t.nodes.splice(e,1,...w.nodes)}}while(A.length>0);return x({type:"eos"}),R}},3866:t=>{var e=1e3,s=60*e,r=60*s,i=24*r,n=7*i;function o(t,e,s,r){var i=e>=1.5*s;return Math.round(t/s)+" "+r+(i?"s":"")}t.exports=function(t,a){a=a||{};var l,c,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*n;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*s;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(t);if("number"===u&&isFinite(t))return a.long?(l=t,(c=Math.abs(l))>=i?o(l,c,i,"day"):c>=r?o(l,c,r,"hour"):c>=s?o(l,c,s,"minute"):c>=e?o(l,c,e,"second"):l+" ms"):function(t){var n=Math.abs(t);return n>=i?Math.round(t/i)+"d":n>=r?Math.round(t/r)+"h":n>=s?Math.round(t/s)+"m":n>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},4078:(t,e,s)=>{const r=s(303),i=s(5111),n=s(9288),o=s(3585),a=(t,e={})=>{let s=[];if(Array.isArray(t))for(const r of t){const t=a.create(r,e);Array.isArray(t)?s.push(...t):s.push(t)}else s=[].concat(a.create(t,e));return e&&!0===e.expand&&!0===e.nodupes&&(s=[...new Set(s)]),s};a.parse=(t,e={})=>o(t,e),a.stringify=(t,e={})=>r("string"==typeof t?a.parse(t,e):t,e),a.compile=(t,e={})=>("string"==typeof t&&(t=a.parse(t,e)),i(t,e)),a.expand=(t,e={})=>{"string"==typeof t&&(t=a.parse(t,e));let s=n(t,e);return!0===e.noempty&&(s=s.filter(Boolean)),!0===e.nodupes&&(s=[...new Set(s)]),s},a.create=(t,e={})=>""===t||t.length<3?[t]:!0!==e.expand?a.compile(t,e):a.expand(t,e),t.exports=a},4182:(t,e,s)=>{var r=s(857),i={ps:()=>s(433),wmic:()=>s(7868)},n=r.platform();n.startsWith("win")&&(n="win");var o={darwin:"ps",sunos:"ps",freebsd:"ps",netbsd:"ps",win:"wmic",linux:"ps",aix:"ps"}[n];t.exports=function(t){void 0===o&&t(new Error(r.platform()+" is not supported yet, please open an issue (https://github.com/simonepri/pidtree)")),i[o]()(t)}},4710:(t,e,s)=>{const r=s(9789),i=(t,e,s)=>{if(!1===r(t))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===e||t===e)return String(t);if(!1===r(e))throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...s};"boolean"==typeof n.strictZeros&&(n.relaxZeros=!1===n.strictZeros);let l=t+":"+e+"="+String(n.relaxZeros)+String(n.shorthand)+String(n.capture)+String(n.wrap);if(i.cache.hasOwnProperty(l))return i.cache[l].result;let c=Math.min(t,e),u=Math.max(t,e);if(1===Math.abs(c-u)){let s=t+"|"+e;return n.capture?`(${s})`:!1===n.wrap?s:`(?:${s})`}let p=d(t)||d(e),h={min:t,max:e,a:c,b:u},f=[],g=[];return p&&(h.isPadded=p,h.maxLen=String(h.max).length),c<0&&(g=o(u<0?Math.abs(u):1,Math.abs(c),h,n),c=h.a=0),u>=0&&(f=o(c,u,h,n)),h.negatives=g,h.positives=f,h.result=function(t,e){let s=a(t,e,"-",!1)||[],r=a(e,t,"",!1)||[],i=a(t,e,"-?",!0)||[];return s.concat(i).concat(r).join("|")}(g,f),!0===n.capture?h.result=`(${h.result})`:!1!==n.wrap&&f.length+g.length>1&&(h.result=`(?:${h.result})`),i.cache[l]=h,h.result};function n(t,e,s){if(t===e)return{pattern:t,count:[],digits:0};let r=function(t,e){let s=[];for(let r=0;r<t.length;r++)s.push([t[r],e[r]]);return s}(t,e),i=r.length,n="",o=0;for(let t=0;t<i;t++){let[e,s]=r[t];e===s?n+=e:"0"!==e||"9"!==s?n+=`[${a=e}${(l=s)-a==1?"":"-"}${l}]`:o++}var a,l;return o&&(n+=!0===s.shorthand?"\\d":"[0-9]"),{pattern:n,count:[o],digits:i}}function o(t,e,s,r){let i,o=function(t,e){let s=1,r=1,i=u(t,s),n=new Set([e]);for(;t<=i&&i<=e;)n.add(i),s+=1,i=u(t,s);for(i=p(e+1,r)-1;t<i&&i<=e;)n.add(i),r+=1,i=p(e+1,r)-1;return n=[...n],n.sort(l),n}(t,e),a=[],c=t;for(let t=0;t<o.length;t++){let e=o[t],l=n(String(c),String(e),r),u="";s.isPadded||!i||i.pattern!==l.pattern?(s.isPadded&&(u=f(e,s,r)),l.string=u+l.pattern+h(l.count),a.push(l),c=e+1,i=l):(i.count.length>1&&i.count.pop(),i.count.push(l.count[0]),i.string=i.pattern+h(i.count),c=e+1)}return a}function a(t,e,s,r,i){let n=[];for(let i of t){let{string:t}=i;r||c(e,"string",t)||n.push(s+t),r&&c(e,"string",t)&&n.push(s+t)}return n}function l(t,e){return t>e?1:e>t?-1:0}function c(t,e,s){return t.some((t=>t[e]===s))}function u(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function p(t,e){return t-t%Math.pow(10,e)}function h(t){let[e=0,s=""]=t;return s||e>1?`{${e+(s?","+s:"")}}`:""}function d(t){return/^-?(0+)\d/.test(t)}function f(t,e,s){if(!e.isPadded)return t;let r=Math.abs(e.maxLen-String(t).length),i=!1!==s.relaxZeros;switch(r){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${r}}`:`0{${r}}`}}i.cache={},i.clearCache=()=>i.cache={},t.exports=i},4751:(t,e,s)=>{const r=s(6928),i="\\\\/",n=`[^${i}]`,o="\\.",a="\\/",l="[^/]",c=`(?:${a}|$)`,u=`(?:^|${a})`,p=`${o}{1,2}${c}`,h={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:a,ONE_CHAR:"(?=.)",QMARK:l,END_ANCHOR:c,DOTS_SLASH:p,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${u}${p})`,NO_DOT_SLASH:`(?!${o}{0,1}${c})`,NO_DOTS_SLASH:`(?!${p})`,QMARK_NO_DOT:`[^.${a}]`,STAR:`${l}*?`,START_ANCHOR:u},d={...h,SLASH_LITERAL:`[${i}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${o}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${i}])${o}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`};t.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:r.sep,extglobChars:t=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:t=>!0===t?d:h}},4891:t=>{t.exports=(t,e)=>{e=e||process.argv;const s=t.startsWith("-")?"":1===t.length?"-":"--",r=e.indexOf(s+t),i=e.indexOf("--");return-1!==r&&(-1===i||r<i)}},5111:(t,e,s)=>{const r=s(2411),i=s(1811);t.exports=(t,e={})=>{const s=(t,n={})=>{const o=i.isInvalidBrace(n),a=!0===t.invalid&&!0===e.escapeInvalid,l=!0===o||!0===a,c=!0===e.escapeInvalid?"\\":"";let u="";if(!0===t.isOpen)return c+t.value;if(!0===t.isClose)return console.log("node.isClose",c,t.value),c+t.value;if("open"===t.type)return l?c+t.value:"(";if("close"===t.type)return l?c+t.value:")";if("comma"===t.type)return"comma"===t.prev.type?"":l?t.value:"|";if(t.value)return t.value;if(t.nodes&&t.ranges>0){const s=i.reduce(t.nodes),n=r(...s,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==n.length)return s.length>1&&n.length>1?`(${n})`:n}if(t.nodes)for(const e of t.nodes)u+=s(e,t);return u};return s(t)}},5453:(t,e,s)=>{const r=s(4751),i=s(6927),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:c}=r,u=(t,e)=>{if("function"==typeof e.expandRange)return e.expandRange(...t,e);t.sort();const s=`[${t.join("-")}]`;try{new RegExp(s)}catch(e){return t.map((t=>i.escapeRegex(t))).join("..")}return s},p=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,h=(t,e)=>{if("string"!=typeof t)throw new TypeError("Expected a string");t=c[t]||t;const s={...e},d="number"==typeof s.maxLength?Math.min(n,s.maxLength):n;let f=t.length;if(f>d)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${d}`);const g={type:"bos",value:"",output:s.prepend||""},m=[g],y=s.capture?"":"?:",E=i.isWindows(e),b=r.globChars(E),R=r.extglobChars(b),{DOT_LITERAL:A,PLUS_LITERAL:w,SLASH_LITERAL:C,ONE_CHAR:S,DOTS_SLASH:v,NO_DOT:T,NO_DOT_SLASH:O,NO_DOTS_SLASH:_,QMARK:k,QMARK_NO_DOT:x,STAR:L,START_ANCHOR:P}=b,$=t=>`(${y}(?:(?!${P}${t.dot?v:A}).)*?)`,I=s.dot?"":T,H=s.dot?k:x;let B=!0===s.bash?$(s):L;s.capture&&(B=`(${B})`),"boolean"==typeof s.noext&&(s.noextglob=s.noext);const F={input:t,index:-1,start:0,dot:!0===s.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:m};t=i.removePrefix(t,F),f=t.length;const D=[],M=[],N=[];let U,j=g;const G=()=>F.index===f-1,K=F.peek=(e=1)=>t[F.index+e],W=F.advance=()=>t[++F.index]||"",Y=()=>t.slice(F.index+1),z=(t="",e=0)=>{F.consumed+=t,F.index+=e},q=t=>{F.output+=null!=t.output?t.output:t.value,z(t.value)},Q=()=>{let t=1;for(;"!"===K()&&("("!==K(2)||"?"===K(3));)W(),F.start++,t++;return t%2!=0&&(F.negated=!0,F.start++,!0)},V=t=>{F[t]++,N.push(t)},X=t=>{F[t]--,N.pop()},Z=t=>{if("globstar"===j.type){const e=F.braces>0&&("comma"===t.type||"brace"===t.type),s=!0===t.extglob||D.length&&("pipe"===t.type||"paren"===t.type);"slash"===t.type||"paren"===t.type||e||s||(F.output=F.output.slice(0,-j.output.length),j.type="star",j.value="*",j.output=B,F.output+=j.output)}if(D.length&&"paren"!==t.type&&(D[D.length-1].inner+=t.value),(t.value||t.output)&&q(t),j&&"text"===j.type&&"text"===t.type)return j.value+=t.value,void(j.output=(j.output||"")+t.value);t.prev=j,m.push(t),j=t},J=(t,e)=>{const r={...R[e],conditions:1,inner:""};r.prev=j,r.parens=F.parens,r.output=F.output;const i=(s.capture?"(":"")+r.open;V("parens"),Z({type:t,value:e,output:F.output?"":S}),Z({type:"paren",extglob:!0,value:W(),output:i}),D.push(r)},tt=t=>{let r,i=t.close+(s.capture?")":"");if("negate"===t.type){let n=B;if(t.inner&&t.inner.length>1&&t.inner.includes("/")&&(n=$(s)),(n!==B||G()||/^\)+$/.test(Y()))&&(i=t.close=`)$))${n}`),t.inner.includes("*")&&(r=Y())&&/^\.[^\\/.]+$/.test(r)){const s=h(r,{...e,fastpaths:!1}).output;i=t.close=`)${s})${n})`}"bos"===t.prev.type&&(F.negatedExtglob=!0)}Z({type:"paren",extglob:!0,value:U,output:i}),X("parens")};if(!1!==s.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(t)){let r=!1,n=t.replace(l,((t,e,s,i,n,o)=>"\\"===i?(r=!0,t):"?"===i?e?e+i+(n?k.repeat(n.length):""):0===o?H+(n?k.repeat(n.length):""):k.repeat(s.length):"."===i?A.repeat(s.length):"*"===i?e?e+i+(n?B:""):B:e?t:`\\${t}`));return!0===r&&(n=!0===s.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,(t=>t.length%2==0?"\\\\":t?"\\":""))),n===t&&!0===s.contains?(F.output=t,F):(F.output=i.wrapOutput(n,F,e),F)}for(;!G();){if(U=W(),"\0"===U)continue;if("\\"===U){const t=K();if("/"===t&&!0!==s.bash)continue;if("."===t||";"===t)continue;if(!t){U+="\\",Z({type:"text",value:U});continue}const e=/^\\+/.exec(Y());let r=0;if(e&&e[0].length>2&&(r=e[0].length,F.index+=r,r%2!=0&&(U+="\\")),!0===s.unescape?U=W():U+=W(),0===F.brackets){Z({type:"text",value:U});continue}}if(F.brackets>0&&("]"!==U||"["===j.value||"[^"===j.value)){if(!1!==s.posix&&":"===U){const t=j.value.slice(1);if(t.includes("[")&&(j.posix=!0,t.includes(":"))){const t=j.value.lastIndexOf("["),e=j.value.slice(0,t),s=j.value.slice(t+2),r=o[s];if(r){j.value=e+r,F.backtrack=!0,W(),g.output||1!==m.indexOf(j)||(g.output=S);continue}}}("["===U&&":"!==K()||"-"===U&&"]"===K())&&(U=`\\${U}`),"]"!==U||"["!==j.value&&"[^"!==j.value||(U=`\\${U}`),!0===s.posix&&"!"===U&&"["===j.value&&(U="^"),j.value+=U,q({value:U});continue}if(1===F.quotes&&'"'!==U){U=i.escapeRegex(U),j.value+=U,q({value:U});continue}if('"'===U){F.quotes=1===F.quotes?0:1,!0===s.keepQuotes&&Z({type:"text",value:U});continue}if("("===U){V("parens"),Z({type:"paren",value:U});continue}if(")"===U){if(0===F.parens&&!0===s.strictBrackets)throw new SyntaxError(p("opening","("));const t=D[D.length-1];if(t&&F.parens===t.parens+1){tt(D.pop());continue}Z({type:"paren",value:U,output:F.parens?")":"\\)"}),X("parens");continue}if("["===U){if(!0!==s.nobracket&&Y().includes("]"))V("brackets");else{if(!0!==s.nobracket&&!0===s.strictBrackets)throw new SyntaxError(p("closing","]"));U=`\\${U}`}Z({type:"bracket",value:U});continue}if("]"===U){if(!0===s.nobracket||j&&"bracket"===j.type&&1===j.value.length){Z({type:"text",value:U,output:`\\${U}`});continue}if(0===F.brackets){if(!0===s.strictBrackets)throw new SyntaxError(p("opening","["));Z({type:"text",value:U,output:`\\${U}`});continue}X("brackets");const t=j.value.slice(1);if(!0===j.posix||"^"!==t[0]||t.includes("/")||(U=`/${U}`),j.value+=U,q({value:U}),!1===s.literalBrackets||i.hasRegexChars(t))continue;const e=i.escapeRegex(j.value);if(F.output=F.output.slice(0,-j.value.length),!0===s.literalBrackets){F.output+=e,j.value=e;continue}j.value=`(${y}${e}|${j.value})`,F.output+=j.value;continue}if("{"===U&&!0!==s.nobrace){V("braces");const t={type:"brace",value:U,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};M.push(t),Z(t);continue}if("}"===U){const t=M[M.length-1];if(!0===s.nobrace||!t){Z({type:"text",value:U,output:U});continue}let e=")";if(!0===t.dots){const t=m.slice(),r=[];for(let e=t.length-1;e>=0&&(m.pop(),"brace"!==t[e].type);e--)"dots"!==t[e].type&&r.unshift(t[e].value);e=u(r,s),F.backtrack=!0}if(!0!==t.comma&&!0!==t.dots){const s=F.output.slice(0,t.outputIndex),r=F.tokens.slice(t.tokensIndex);t.value=t.output="\\{",U=e="\\}",F.output=s;for(const t of r)F.output+=t.output||t.value}Z({type:"brace",value:U,output:e}),X("braces"),M.pop();continue}if("|"===U){D.length>0&&D[D.length-1].conditions++,Z({type:"text",value:U});continue}if(","===U){let t=U;const e=M[M.length-1];e&&"braces"===N[N.length-1]&&(e.comma=!0,t="|"),Z({type:"comma",value:U,output:t});continue}if("/"===U){if("dot"===j.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",m.pop(),j=g;continue}Z({type:"slash",value:U,output:C});continue}if("."===U){if(F.braces>0&&"dot"===j.type){"."===j.value&&(j.output=A);const t=M[M.length-1];j.type="dots",j.output+=U,j.value+=U,t.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==j.type&&"slash"!==j.type){Z({type:"text",value:U,output:A});continue}Z({type:"dot",value:U,output:A});continue}if("?"===U){if((!j||"("!==j.value)&&!0!==s.noextglob&&"("===K()&&"?"!==K(2)){J("qmark",U);continue}if(j&&"paren"===j.type){const t=K();let e=U;if("<"===t&&!i.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===j.value&&!/[!=<:]/.test(t)||"<"===t&&!/<([!=]|\w+>)/.test(Y()))&&(e=`\\${U}`),Z({type:"text",value:U,output:e});continue}if(!0!==s.dot&&("slash"===j.type||"bos"===j.type)){Z({type:"qmark",value:U,output:x});continue}Z({type:"qmark",value:U,output:k});continue}if("!"===U){if(!0!==s.noextglob&&"("===K()&&("?"!==K(2)||!/[!=<:]/.test(K(3)))){J("negate",U);continue}if(!0!==s.nonegate&&0===F.index){Q();continue}}if("+"===U){if(!0!==s.noextglob&&"("===K()&&"?"!==K(2)){J("plus",U);continue}if(j&&"("===j.value||!1===s.regex){Z({type:"plus",value:U,output:w});continue}if(j&&("bracket"===j.type||"paren"===j.type||"brace"===j.type)||F.parens>0){Z({type:"plus",value:U});continue}Z({type:"plus",value:w});continue}if("@"===U){if(!0!==s.noextglob&&"("===K()&&"?"!==K(2)){Z({type:"at",extglob:!0,value:U,output:""});continue}Z({type:"text",value:U});continue}if("*"!==U){"$"!==U&&"^"!==U||(U=`\\${U}`);const t=a.exec(Y());t&&(U+=t[0],F.index+=t[0].length),Z({type:"text",value:U});continue}if(j&&("globstar"===j.type||!0===j.star)){j.type="star",j.star=!0,j.value+=U,j.output=B,F.backtrack=!0,F.globstar=!0,z(U);continue}let e=Y();if(!0!==s.noextglob&&/^\([^?]/.test(e)){J("star",U);continue}if("star"===j.type){if(!0===s.noglobstar){z(U);continue}const r=j.prev,i=r.prev,n="slash"===r.type||"bos"===r.type,o=i&&("star"===i.type||"globstar"===i.type);if(!0===s.bash&&(!n||e[0]&&"/"!==e[0])){Z({type:"star",value:U,output:""});continue}const a=F.braces>0&&("comma"===r.type||"brace"===r.type),l=D.length&&("pipe"===r.type||"paren"===r.type);if(!n&&"paren"!==r.type&&!a&&!l){Z({type:"star",value:U,output:""});continue}for(;"/**"===e.slice(0,3);){const s=t[F.index+4];if(s&&"/"!==s)break;e=e.slice(3),z("/**",3)}if("bos"===r.type&&G()){j.type="globstar",j.value+=U,j.output=$(s),F.output=j.output,F.globstar=!0,z(U);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!o&&G()){F.output=F.output.slice(0,-(r.output+j.output).length),r.output=`(?:${r.output}`,j.type="globstar",j.output=$(s)+(s.strictSlashes?")":"|$)"),j.value+=U,F.globstar=!0,F.output+=r.output+j.output,z(U);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===e[0]){const t=void 0!==e[1]?"|$":"";F.output=F.output.slice(0,-(r.output+j.output).length),r.output=`(?:${r.output}`,j.type="globstar",j.output=`${$(s)}${C}|${C}${t})`,j.value+=U,F.output+=r.output+j.output,F.globstar=!0,z(U+W()),Z({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===e[0]){j.type="globstar",j.value+=U,j.output=`(?:^|${C}|${$(s)}${C})`,F.output=j.output,F.globstar=!0,z(U+W()),Z({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-j.output.length),j.type="globstar",j.output=$(s),j.value+=U,F.output+=j.output,F.globstar=!0,z(U);continue}const r={type:"star",value:U,output:B};!0!==s.bash?!j||"bracket"!==j.type&&"paren"!==j.type||!0!==s.regex?(F.index!==F.start&&"slash"!==j.type&&"dot"!==j.type||("dot"===j.type?(F.output+=O,j.output+=O):!0===s.dot?(F.output+=_,j.output+=_):(F.output+=I,j.output+=I),"*"!==K()&&(F.output+=S,j.output+=S)),Z(r)):(r.output=U,Z(r)):(r.output=".*?","bos"!==j.type&&"slash"!==j.type||(r.output=I+r.output),Z(r))}for(;F.brackets>0;){if(!0===s.strictBrackets)throw new SyntaxError(p("closing","]"));F.output=i.escapeLast(F.output,"["),X("brackets")}for(;F.parens>0;){if(!0===s.strictBrackets)throw new SyntaxError(p("closing",")"));F.output=i.escapeLast(F.output,"("),X("parens")}for(;F.braces>0;){if(!0===s.strictBrackets)throw new SyntaxError(p("closing","}"));F.output=i.escapeLast(F.output,"{"),X("braces")}if(!0===s.strictSlashes||"star"!==j.type&&"bracket"!==j.type||Z({type:"maybe_slash",value:"",output:`${C}?`}),!0===F.backtrack){F.output="";for(const t of F.tokens)F.output+=null!=t.output?t.output:t.value,t.suffix&&(F.output+=t.suffix)}return F};h.fastpaths=(t,e)=>{const s={...e},o="number"==typeof s.maxLength?Math.min(n,s.maxLength):n,a=t.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);t=c[t]||t;const l=i.isWindows(e),{DOT_LITERAL:u,SLASH_LITERAL:p,ONE_CHAR:h,DOTS_SLASH:d,NO_DOT:f,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:E}=r.globChars(l),b=s.dot?g:f,R=s.dot?m:f,A=s.capture?"":"?:";let w=!0===s.bash?".*?":y;s.capture&&(w=`(${w})`);const C=t=>!0===t.noglobstar?w:`(${A}(?:(?!${E}${t.dot?d:u}).)*?)`,S=t=>{switch(t){case"*":return`${b}${h}${w}`;case".*":return`${u}${h}${w}`;case"*.*":return`${b}${w}${u}${h}${w}`;case"*/*":return`${b}${w}${p}${h}${R}${w}`;case"**":return b+C(s);case"**/*":return`(?:${b}${C(s)}${p})?${R}${h}${w}`;case"**/*.*":return`(?:${b}${C(s)}${p})?${R}${w}${u}${h}${w}`;case"**/.*":return`(?:${b}${C(s)}${p})?${u}${h}${w}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const s=S(e[1]);if(!s)return;return s+u+e[2]}}},v=i.removePrefix(t,{negated:!1,prefix:""});let T=S(v);return T&&!0!==s.strictSlashes&&(T+=`${p}?`),T},t.exports=h},5562:(t,e,s)=>{t.exports=s(8996)},6179:(t,e,s)=>{var r=s(4182);t.exports=function(t,e,s){"function"==typeof e&&(s=e,e={}),"object"!=typeof e&&(e={}),t=parseInt(t,10),isNaN(t)||t<-1?s(new TypeError("The pid provided is invalid")):r((function(r,i){if(r)s(r);else if(-1!==t){for(var n,o=0;o<i.length;o++){if(i[o][1]===t){n=e.advanced?{ppid:i[o][0],pid:t}:t;break}i[o][0]===t&&(n=e.advanced?{pid:t}:t)}if(n){for(var a={};i.length>0;){var l=i.pop();a[l[0]]?a[l[0]].push(l[1]):a[l[0]]=[l[1]]}for(var c=0,u=[n];c<u.length;){var p=e.advanced?u[c++].pid:u[c++];if(a[p]){for(var h=a[p].length,d=0;d<h;d++)u.push(e.advanced?{ppid:p,pid:a[p][d]}:a[p][d]);delete a[p]}}e.root||u.shift(),s(null,u)}else s(new Error("No matching pid found"))}else{for(var f=0;f<i.length;f++)i[f]=e.advanced?{ppid:i[f][0],pid:i[f][1]}:i[f]=i[f][1];s(null,i)}}))}},6296:t=>{var e=Object.prototype.hasOwnProperty,s="~";function r(){}function i(t,e,s){this.fn=t,this.context=e,this.once=s||!1}function n(t,e,r,n,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,n||t,o),l=s?s+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],a]:t._events[l].push(a):(t._events[l]=a,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),a.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(s?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},a.prototype.listeners=function(t){var e=s?s+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,n=r.length,o=new Array(n);i<n;i++)o[i]=r[i].fn;return o},a.prototype.listenerCount=function(t){var e=s?s+t:t,r=this._events[e];return r?r.fn?1:r.length:0},a.prototype.emit=function(t,e,r,i,n,o){var a=s?s+t:t;if(!this._events[a])return!1;var l,c,u=this._events[a],p=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),p){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,r),!0;case 4:return u.fn.call(u.context,e,r,i),!0;case 5:return u.fn.call(u.context,e,r,i,n),!0;case 6:return u.fn.call(u.context,e,r,i,n,o),!0}for(c=1,l=new Array(p-1);c<p;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var h,d=u.length;for(c=0;c<d;c++)switch(u[c].once&&this.removeListener(t,u[c].fn,void 0,!0),p){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,e);break;case 3:u[c].fn.call(u[c].context,e,r);break;case 4:u[c].fn.call(u[c].context,e,r,i);break;default:if(!l)for(h=1,l=new Array(p-1);h<p;h++)l[h-1]=arguments[h];u[c].fn.apply(u[c].context,l)}}return!0},a.prototype.on=function(t,e,s){return n(this,t,e,s,!1)},a.prototype.once=function(t,e,s){return n(this,t,e,s,!0)},a.prototype.removeListener=function(t,e,r,i){var n=s?s+t:t;if(!this._events[n])return this;if(!e)return o(this,n),this;var a=this._events[n];if(a.fn)a.fn!==e||i&&!a.once||r&&a.context!==r||o(this,n);else{for(var l=0,c=[],u=a.length;l<u;l++)(a[l].fn!==e||i&&!a[l].once||r&&a[l].context!==r)&&c.push(a[l]);c.length?this._events[n]=1===c.length?c[0]:c:o(this,n)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=s?s+t:t,this._events[e]&&o(this,e)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=s,a.EventEmitter=a,t.exports=a},6454:(t,e,s)=>{String.prototype.startsWith||(String.prototype.startsWith=function(t){return this.substring(0,t.length)===t});var r=s(6179);t.exports=function(t,e,s){var i,n,o;if("function"==typeof e&&(s=e,e=void 0),"function"!=typeof s)return i=r,n=t,o=e,new Promise((function(t,e){i(n,o,(function(s,r){if(s)return e(s);t(r)}))}));r(t,e,s)}},6927:(t,e,s)=>{const r=s(6928),i="win32"===process.platform,{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:l}=s(4751);e.isObject=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),e.hasRegexChars=t=>a.test(t),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=t=>t.replace(l,"\\$1"),e.toPosixSlashes=t=>t.replace(n,"/"),e.removeBackslashes=t=>t.replace(o,(t=>"\\"===t?"":t)),e.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);return 3===t.length&&t[0]>=9||8===t[0]&&t[1]>=10},e.isWindows=t=>t&&"boolean"==typeof t.windows?t.windows:!0===i||"\\"===r.sep,e.escapeLast=(t,s,r)=>{const i=t.lastIndexOf(s,r);return-1===i?t:"\\"===t[i-1]?e.escapeLast(t,s,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(t,e={})=>{let s=t;return s.startsWith("./")&&(s=s.slice(2),e.prefix="./"),s},e.wrapOutput=(t,e={},s={})=>{let r=`${s.contains?"":"^"}(?:${t})${s.contains?"":"$"}`;return!0===e.negated&&(r=`(?:^(?!${r}).*$)`),r}},7498:(t,e,s)=>{const r=s(9023),i=s(4078),n=s(5562),o=s(6927),a=t=>""===t||"./"===t,l=t=>{const e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},c=(t,e,s)=>{e=[].concat(e),t=[].concat(t);let r=new Set,i=new Set,o=new Set,a=0,l=t=>{o.add(t.output),s&&s.onResult&&s.onResult(t)};for(let o=0;o<e.length;o++){let c=n(String(e[o]),{...s,onResult:l},!0),u=c.state.negated||c.state.negatedExtglob;u&&a++;for(let e of t){let t=c(e,!0);(u?!t.isMatch:t.isMatch)&&(u?r.add(t.output):(r.delete(t.output),i.add(t.output)))}}let c=(a===e.length?[...o]:[...i]).filter((t=>!r.has(t)));if(s&&0===c.length){if(!0===s.failglob)throw new Error(`No matches found for "${e.join(", ")}"`);if(!0===s.nonull||!0===s.nullglob)return s.unescape?e.map((t=>t.replace(/\\/g,""))):e}return c};c.match=c,c.matcher=(t,e)=>n(t,e),c.any=c.isMatch=(t,e,s)=>n(e,s)(t),c.not=(t,e,s={})=>{e=[].concat(e).map(String);let r=new Set,i=[],n=new Set(c(t,e,{...s,onResult:t=>{s.onResult&&s.onResult(t),i.push(t.output)}}));for(let t of i)n.has(t)||r.add(t);return[...r]},c.contains=(t,e,s)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${r.inspect(t)}"`);if(Array.isArray(e))return e.some((e=>c.contains(t,e,s)));if("string"==typeof e){if(a(t)||a(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return c.isMatch(t,e,{...s,contains:!0})},c.matchKeys=(t,e,s)=>{if(!o.isObject(t))throw new TypeError("Expected the first argument to be an object");let r=c(Object.keys(t),e,s),i={};for(let e of r)i[e]=t[e];return i},c.some=(t,e,s)=>{let r=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),s);if(r.some((t=>e(t))))return!0}return!1},c.every=(t,e,s)=>{let r=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),s);if(!r.every((t=>e(t))))return!1}return!0},c.all=(t,e,s)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${r.inspect(t)}"`);return[].concat(e).every((e=>n(e,s)(t)))},c.capture=(t,e,s)=>{let r=o.isWindows(s),i=n.makeRe(String(t),{...s,capture:!0}).exec(r?o.toPosixSlashes(e):e);if(i)return i.slice(1).map((t=>void 0===t?"":t))},c.makeRe=(...t)=>n.makeRe(...t),c.scan=(...t)=>n.scan(...t),c.parse=(t,e)=>{let s=[];for(let r of[].concat(t||[]))for(let t of i(String(r),e))s.push(n.parse(t,e));return s},c.braces=(t,e)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return e&&!0===e.nobrace||!l(t)?[t]:i(t,e)},c.braceExpand=(t,e)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return c.braces(t,{...e,expand:!0})},c.hasBraces=l,t.exports=c},7868:(t,e,s)=>{var r=s(857),i=s(2775);t.exports=function(t){i("wmic",["PROCESS","get","ParentProcessId,ProcessId"],{windowsHide:!0,windowsVerbatimArguments:!0},(function(e,s,i){if(e)t(e);else if(0===i)try{s=s.split(r.EOL);for(var n=[],o=1;o<s.length;o++)s[o]=s[o].trim(),s[o]&&(s[o]=s[o].split(/\s+/),s[o][0]=parseInt(s[o][0],10),s[o][1]=parseInt(s[o][1],10),n.push(s[o]));t(null,n)}catch(e){t(e)}else t(new Error("pidtree wmic command exited with code "+i))}))}},8729:(t,e,s)=>{t.exports=s.p+"../../node_modules/.pnpm/lint-staged@16.0.0_patch_hash=c3594b9a865a9ce29084d773f4b9b07cc07efc27a806e0c04709fa6b66d5f315/node_modules/lint-staged/package.json"},8770:(t,e,s)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=s(3298):t.exports=s(2728)},8996:(t,e,s)=>{const r=s(6928),i=s(3297),n=s(5453),o=s(6927),a=s(4751),l=(t,e,s=!1)=>{if(Array.isArray(t)){const r=t.map((t=>l(t,e,s))),i=t=>{for(const e of r){const s=e(t);if(s)return s}return!1};return i}const r=(i=t)&&"object"==typeof i&&!Array.isArray(i)&&t.tokens&&t.input;var i;if(""===t||"string"!=typeof t&&!r)throw new TypeError("Expected pattern to be a non-empty string");const n=e||{},a=o.isWindows(e),c=r?l.compileRe(t,e):l.makeRe(t,e,!1,!0),u=c.state;delete c.state;let p=()=>!1;if(n.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};p=l(n.ignore,t,s)}const h=(s,r=!1)=>{const{isMatch:i,match:o,output:h}=l.test(s,c,e,{glob:t,posix:a}),d={glob:t,state:u,regex:c,posix:a,input:s,output:h,match:o,isMatch:i};return"function"==typeof n.onResult&&n.onResult(d),!1===i?(d.isMatch=!1,!!r&&d):p(s)?("function"==typeof n.onIgnore&&n.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof n.onMatch&&n.onMatch(d),!r||d)};return s&&(h.state=u),h};l.test=(t,e,s,{glob:r,posix:i}={})=>{if("string"!=typeof t)throw new TypeError("Expected input to be a string");if(""===t)return{isMatch:!1,output:""};const n=s||{},a=n.format||(i?o.toPosixSlashes:null);let c=t===r,u=c&&a?a(t):t;return!1===c&&(u=a?a(t):t,c=u===r),!1!==c&&!0!==n.capture||(c=!0===n.matchBase||!0===n.basename?l.matchBase(t,e,s,i):e.exec(u)),{isMatch:Boolean(c),match:c,output:u}},l.matchBase=(t,e,s,i=o.isWindows(s))=>(e instanceof RegExp?e:l.makeRe(e,s)).test(r.basename(t)),l.isMatch=(t,e,s)=>l(e,s)(t),l.parse=(t,e)=>Array.isArray(t)?t.map((t=>l.parse(t,e))):n(t,{...e,fastpaths:!1}),l.scan=(t,e)=>i(t,e),l.compileRe=(t,e,s=!1,r=!1)=>{if(!0===s)return t.output;const i=e||{},n=i.contains?"":"^",o=i.contains?"":"$";let a=`${n}(?:${t.output})${o}`;t&&!0===t.negated&&(a=`^(?!${a}).*$`);const c=l.toRegex(a,e);return!0===r&&(c.state=t),c},l.makeRe=(t,e={},s=!1,r=!1)=>{if(!t||"string"!=typeof t)throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1===e.fastpaths||"."!==t[0]&&"*"!==t[0]||(i.output=n.fastpaths(t,e)),i.output||(i=n(t,e)),l.compileRe(i,e,s,r)},l.toRegex=(t,e)=>{try{const s=e||{};return new RegExp(t,s.flags||(s.nocase?"i":""))}catch(t){if(e&&!0===e.debug)throw t;return/$^/}},l.constants=a,t.exports=l},9018:t=>{function e(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}t.exports=function(t){if((t=t||{}).circles)return function(t){const s=[],r=[],i=new Map;if(i.set(Date,(t=>new Date(t))),i.set(Map,((t,e)=>new Map(o(Array.from(t),e)))),i.set(Set,((t,e)=>new Set(o(Array.from(t),e)))),t.constructorHandlers)for(const e of t.constructorHandlers)i.set(e[0],e[1]);let n=null;return t.proto?function t(a){if("object"!=typeof a||null===a)return a;if(Array.isArray(a))return o(a,t);if(a.constructor!==Object&&(n=i.get(a.constructor)))return n(a,t);const l={};s.push(a),r.push(l);for(const o in a){const c=a[o];if("object"!=typeof c||null===c)l[o]=c;else if(c.constructor!==Object&&(n=i.get(c.constructor)))l[o]=n(c,t);else if(ArrayBuffer.isView(c))l[o]=e(c);else{const e=s.indexOf(c);l[o]=-1!==e?r[e]:t(c)}}return s.pop(),r.pop(),l}:function t(a){if("object"!=typeof a||null===a)return a;if(Array.isArray(a))return o(a,t);if(a.constructor!==Object&&(n=i.get(a.constructor)))return n(a,t);const l={};s.push(a),r.push(l);for(const o in a){if(!1===Object.hasOwnProperty.call(a,o))continue;const c=a[o];if("object"!=typeof c||null===c)l[o]=c;else if(c.constructor!==Object&&(n=i.get(c.constructor)))l[o]=n(c,t);else if(ArrayBuffer.isView(c))l[o]=e(c);else{const e=s.indexOf(c);l[o]=-1!==e?r[e]:t(c)}}return s.pop(),r.pop(),l};function o(t,o){const a=Object.keys(t),l=new Array(a.length);for(let c=0;c<a.length;c++){const u=a[c],p=t[u];if("object"!=typeof p||null===p)l[u]=p;else if(p.constructor!==Object&&(n=i.get(p.constructor)))l[u]=n(p,o);else if(ArrayBuffer.isView(p))l[u]=e(p);else{const t=s.indexOf(p);l[u]=-1!==t?r[t]:o(p)}}return l}}(t);const s=new Map;if(s.set(Date,(t=>new Date(t))),s.set(Map,((t,e)=>new Map(i(Array.from(t),e)))),s.set(Set,((t,e)=>new Set(i(Array.from(t),e)))),t.constructorHandlers)for(const e of t.constructorHandlers)s.set(e[0],e[1]);let r=null;return t.proto?function t(n){if("object"!=typeof n||null===n)return n;if(Array.isArray(n))return i(n,t);if(n.constructor!==Object&&(r=s.get(n.constructor)))return r(n,t);const o={};for(const i in n){const a=n[i];"object"!=typeof a||null===a?o[i]=a:a.constructor!==Object&&(r=s.get(a.constructor))?o[i]=r(a,t):ArrayBuffer.isView(a)?o[i]=e(a):o[i]=t(a)}return o}:function t(n){if("object"!=typeof n||null===n)return n;if(Array.isArray(n))return i(n,t);if(n.constructor!==Object&&(r=s.get(n.constructor)))return r(n,t);const o={};for(const i in n){if(!1===Object.hasOwnProperty.call(n,i))continue;const a=n[i];"object"!=typeof a||null===a?o[i]=a:a.constructor!==Object&&(r=s.get(a.constructor))?o[i]=r(a,t):ArrayBuffer.isView(a)?o[i]=e(a):o[i]=t(a)}return o};function i(t,i){const n=Object.keys(t),o=new Array(n.length);for(let a=0;a<n.length;a++){const l=n[a],c=t[l];"object"!=typeof c||null===c?o[l]=c:c.constructor!==Object&&(r=s.get(c.constructor))?o[l]=r(c,i):ArrayBuffer.isView(c)?o[l]=e(c):o[l]=i(c)}return o}}},9284:(t,e,s)=>{s.d(e,{default:()=>Br});var r=s(8770),i=s(1708),n=s(7975);var o=s(6760),a=s(3136);const l=({Path:t="",PATH:e=t,...s},r)=>{const i=e.split(o.delimiter);return{...s,PATH:[...c([],o.resolve(r)).map((t=>o.join(t,"node_modules/.bin"))).filter((t=>!i.includes(t))),e].filter(Boolean).join(o.delimiter)}},c=(t,e)=>t.at(-1)===e?t:c([...t,e],o.resolve(e,".."));var u=s(1421),p=s(8474),h=s(1455);const d=(t,e,{Path:s="",PATH:r=s})=>E.some((e=>t.toLowerCase().endsWith(e)))||y(t,e,r),f={},g=t=>(...e)=>f[e.join("\0")]??=t(...e),m=g(h.access),y=g((async(t,e,s)=>{const r=s.split(o.delimiter).filter(Boolean).map((t=>t.replace(/^"(.*)"$/,"$1")));try{await Promise.any([e,...r].flatMap((e=>E.map((s=>m(`${o.resolve(e,t)}${s}`))))))}catch{return!1}return!0})),E=[".exe",".com"],b=t=>t.replaceAll(/([()\][%!^"`<>&|;, *?])/g,"^$1"),R=(t,e,s)=>Object.assign(A(t,s),C(e),S(s)),A=(t,{command:e})=>t instanceof w?t:new w(`Command failed: ${e}`,{cause:t});class w extends Error{name="SubprocessError"}const C=({exitCode:t,signalCode:e})=>({...t<1?{}:{exitCode:t},...null===e?{}:{signalName:e}}),S=({state:{stdout:t,stderr:e,output:s},command:r,start:n})=>({stdout:v(t),stderr:v(e),output:v(s),command:r,durationMs:Number(i.hrtime.bigint()-n)/1e6}),v=t=>"\n"===t.at(-1)?t.slice(0,"\r"===t.at(-2)?-2:-1):t,T=async(t,e,s,r)=>{try{["node","node.exe"].includes(t.toLowerCase())&&(t=i.execPath,e=[...i.execArgv.filter((t=>!t.startsWith("--inspect"))),...e]),[t,e,s]=await(async(t,e,s)=>await(async(t,{shell:e,cwd:s,env:r=i.env})=>"win32"===i.platform&&!e&&!await d(t,s,r))(t,s)?[b(t),e.map((t=>(t=>b(b(`"${t.replaceAll(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`)))(t))),{...s,shell:!0}]:[t,e,s])(t,e,s),[t,e,s]=O(t,e,s);const n=(0,u.spawn)(t,e,s);return _(n.stdout,r,"stdout"),_(n.stderr,r,"stderr"),n.once("error",(()=>{})),await(0,p.once)(n,"spawn"),n}catch(t){throw R(t,{},r)}},O=(t,e,s)=>s.shell&&e.length>0?[[t,...e].join(" "),[],s]:[t,e,s],_=(t,{state:e},s)=>{t&&(t.setEncoding("utf8"),e.isIterating||(e.isIterating=!1,t.on("data",(t=>{e[s]+=t,e.output+=t}))))};var k=s(6466);const x=async t=>{try{const[{stdout:e},{stdin:s}]=await Promise.all(t.map((({nodeChildProcess:t})=>t)));if(null===s)throw new Error('The "stdin" option must be set on the first "spawn()" call in the pipeline.');if(null===e)throw new Error('The "stdout" option must be set on the last "spawn()" call in the pipeline.');(0,k.pipeline)(e,s).catch((()=>{}))}catch(e){throw await Promise.allSettled(t.map((({nodeChildProcess:t})=>L(t)))),e}},L=async t=>{const{stdin:e}=await t;e.end()};var P=s(6848);const $=async function*(t,{state:e},s){if(!1===e.isIterating)throw new Error("The subprocess must be iterated right away, for example:\n\tfor await (const line of spawn(...)) { ... }");e.isIterating=!0;try{const{[s]:e}=await t.nodeChildProcess;if(!e)return;yield*P.createInterface({input:e})}finally{await t}},I=async t=>{try{return await t.next()}catch(e){await t.throw(e)}};function H(t,e,s,r){const[c=[],u={}]=Array.isArray(e)?[e,s]:[[],e],h=(d=[t,...c],{start:i.hrtime.bigint(),command:d.map((t=>(t=>/[^\w./-]/.test(t)?`'${t.replaceAll("'","'\\''")}'`:t)((0,n.stripVTControlCharacters)(t)))).join(" "),state:{stdout:"",stderr:"",output:""}});var d;const f=(({stdin:t,stdout:e,stderr:s,stdio:r=[t,e,s],env:n,preferLocal:c,cwd:u=".",...p})=>{const h=u instanceof URL?(0,a.fileURLToPath)(u):o.resolve(u),d=n?{...i.env,...n}:void 0,f=r[0]?.string;return{...p,input:f,stdio:void 0===f?r:["pipe",...r.slice(1)],env:c?l(d??i.env,h):d,cwd:h}})(u),g=T(t,c,f,h);let m=(async(t,{input:e},s)=>{const r=await t;void 0!==e&&r.stdin.end(e);const i=(0,p.once)(r,"close");try{return await Promise.race([i,...r.stdio.filter(Boolean).map((t=>(async t=>{for await(const[e]of(0,p.on)(t,"error"))if(!["ERR_STREAM_PREMATURE_CLOSE","EPIPE"].includes(e?.code))throw e})(t)))]),(({command:t},{exitCode:e,signalName:s})=>{if(void 0!==s)throw new w(`Command was terminated with ${s}: ${t}`);if(void 0!==e)throw new w(`Command failed with exit code ${e}: ${t}`)})(s,C(r)),S(s)}catch(t){throw await Promise.allSettled([i]),R(t,r,s)}})(g,f,h);Object.assign(m,{nodeChildProcess:g}),m=r?(async t=>{const[[e,s]]=await Promise.all([Promise.allSettled(t),x(t)]);if(s.reason)throw s.reason.pipedFrom=e.reason??e.value,s.reason;if(e.reason)throw e.reason;return{...s.value,pipedFrom:e.value}})([r,m]):m;const y=$(m,h,"stdout"),E=$(m,h,"stderr");return Object.assign(m,{nodeChildProcess:g,stdout:y,stderr:E,[Symbol.asyncIterator]:()=>async function*(...t){try{let e=[];for(;t.length>0;){e=t.map(((t,s)=>e[s]??I(t)));const[{value:s,done:r},i]=await Promise.race(e.map(((t,e)=>Promise.all([t,e])))),[n]=t.splice(i,1);e.splice(i,1),r||(t.push(n),yield s)}}finally{await Promise.all(t.map((t=>t.return())))}}(y,E),pipe:(t,e,s)=>H(t,e,s,m)})}const B=r("lint-staged:execGit"),F=["-c","submodule.recurse=false"],D=async(t,e)=>{B("Running git command",t);try{return(await H("git",[...F,...t],{...e,cwd:e?.cwd??process.cwd(),stdin:"ignore"})).stdout}catch(t){if(t instanceof w)throw new Error(t.output,{cause:t});throw t}};var M=s(8127);const N=s(6296);var U=s(2018),j=s.t(U,2);const{env:G={},argv:K=[],platform:W=""}="undefined"==typeof process?{}:process,Y="NO_COLOR"in G||K.includes("--no-color"),z="FORCE_COLOR"in G||K.includes("--color"),q="win32"===W,Q="dumb"===G.TERM,V=j&&U.isatty&&U.isatty(1)&&G.TERM&&!Q,X=!Y&&(z||q&&!Q||V||"CI"in G&&("GITHUB_ACTIONS"in G||"GITLAB_CI"in G||"CIRCLECI"in G)),Z=(t,e,s,r,i=e.substring(0,t)+r,n=e.substring(t+s.length),o=n.indexOf(s))=>i+(o<0?n:Z(o,n,s,r)),J=(t,e,s)=>((t,e,s=t,r=t.length+1)=>i=>i||""!==i&&void 0!==i?((t,e,s,r,i)=>t<0?s+e+r:s+Z(t,e,r,i)+r)((""+i).indexOf(e,r),i,t,e,s):"")(`\x1b[${t}m`,`\x1b[${e}m`,s),tt={reset:J(0,0),bold:J(1,22,"\x1b[22m\x1b[1m"),dim:J(2,22,"\x1b[22m\x1b[2m"),italic:J(3,23),underline:J(4,24),inverse:J(7,27),hidden:J(8,28),strikethrough:J(9,29),black:J(30,39),red:J(31,39),green:J(32,39),yellow:J(33,39),blue:J(34,39),magenta:J(35,39),cyan:J(36,39),white:J(37,39),gray:J(90,39),bgBlack:J(40,49),bgRed:J(41,49),bgGreen:J(42,49),bgYellow:J(43,49),bgBlue:J(44,49),bgMagenta:J(45,49),bgCyan:J(46,49),bgWhite:J(47,49),blackBright:J(90,39),redBright:J(91,39),greenBright:J(92,39),yellowBright:J(93,39),blueBright:J(94,39),magentaBright:J(95,39),cyanBright:J(96,39),whiteBright:J(97,39),bgBlackBright:J(100,49),bgRedBright:J(101,49),bgGreenBright:J(102,49),bgYellowBright:J(103,49),bgBlueBright:J(104,49),bgMagentaBright:J(105,49),bgCyanBright:J(106,49),bgWhiteBright:J(107,49)},et=({useColor:t=X}={})=>t?tt:Object.keys(tt).reduce(((t,e)=>({...t,[e]:String})),{}),{reset:st,bold:rt,dim:it,italic:nt,underline:ot,inverse:at,hidden:lt,strikethrough:ct,black:ut,red:pt,green:ht,yellow:dt,blue:ft,magenta:gt,cyan:mt,white:yt,gray:Et,bgBlack:bt,bgRed:Rt,bgGreen:At,bgYellow:wt,bgBlue:Ct,bgMagenta:St,bgCyan:vt,bgWhite:Tt,blackBright:Ot,redBright:_t,greenBright:kt,yellowBright:xt,blueBright:Lt,magentaBright:Pt,cyanBright:$t,whiteBright:It,bgBlackBright:Ht,bgRedBright:Bt,bgGreenBright:Ft,bgYellowBright:Dt,bgBlueBright:Mt,bgMagentaBright:Nt,bgCyanBright:Ut,bgWhiteBright:jt}=et();var Gt=s(9023),Kt=s(857),Wt=s(3193),Yt=s(2203),zt=s(9018),qt=s(6982),Qt=Object.defineProperty,Vt=(t,e)=>Qt(t,"name",{value:e,configurable:!0}),Xt="\x1b[?25l",Zt="\x1b[?25h",Jt=(t=>(t.WAITING="WAITING",t.STARTED="STARTED",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.SKIPPED="SKIPPED",t.ROLLING_BACK="ROLLING_BACK",t.ROLLED_BACK="ROLLED_BACK",t.RETRY="RETRY",t.PAUSED="PAUSED",t.PROMPT="PROMPT",t.PROMPT_COMPLETED="PROMPT_COMPLETED",t.PROMPT_FAILED="PROMPT_FAILED",t))(Jt||{}),te=class{static{Vt(this,"EventManager")}emitter=new N;emit(t,e){this.emitter.emit(t,e)}on(t,e){this.emitter.addListener(t,e)}once(t,e){this.emitter.once(t,e)}off(t,e){this.emitter.off(t,e)}complete(){this.emitter.removeAllListeners()}};function ee(t){return!!t&&"object"==typeof t&&"function"==typeof t.subscribe}function se(t){return!!t&&"object"==typeof t&&!0===t.readable&&"function"==typeof t.read&&"function"==typeof t.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}(class{static{Vt(this,"BaseEventMap")}}),Vt(ee,"isObservable"),Vt(se,"isReadable"),Vt(re,"isUnicodeSupported");var ie=/\u0007/;function ne(t){return String(t).replace(new RegExp("(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+","gmi"),"").replace(new RegExp(ie,"gmi"),"").trim()}Vt(ne,"cleanseAnsi");var oe=et();function ae(t,e){return t.replace(/^(?!\s*$)/gm," ".repeat(e))}Vt(ae,"indent");var le={warning:"\u26a0",cross:"\u2716",arrowDown:"\u2193",tick:"\u2714",arrowRight:"\u2192",pointer:"\u276f",checkboxOn:"\u2612",arrowLeft:"\u2190",squareSmallFilled:"\u25fc",pointerSmall:"\u203a"},ce={...le,warning:"\u203c",cross:"\xd7",tick:"\u221a",pointer:">",checkboxOn:"[\xd7]",squareSmallFilled:"\u25a0"},ue=re()?le:ce;function pe(t,...e){return(0,Gt.format)(String(t),...e)}Vt(pe,"splat");var he={STARTED:ue.pointer,FAILED:ue.cross,SKIPPED:ue.arrowDown,COMPLETED:ue.tick,OUTPUT:ue.pointerSmall,TITLE:ue.arrowRight,RETRY:ue.warning,ROLLBACK:ue.arrowLeft,PAUSED:ue.squareSmallFilled},de={STARTED:oe.yellow,FAILED:oe.red,SKIPPED:oe.yellow,COMPLETED:oe.green,RETRY:oe.yellowBright,ROLLBACK:oe.redBright,PAUSED:oe.yellowBright},fe=["RETRY","ROLLBACK","FAILED"],ge=class{constructor(t){this.options=t,this.options={useIcons:!0,toStderr:[],...t??{}},this.options.fields??={},this.options.fields.prefix??=[],this.options.fields.suffix??=[],this.process=this.options.processOutput??new Ee}static{Vt(this,"ListrLogger")}process;log(t,e,s){const r=this.format(t,e,s);this.options.toStderr.includes(t)?this.process.toStderr(r):this.process.toStdout(r)}toStdout(t,e,s=!0){this.process.toStdout(this.format(null,t,e),s)}toStderr(t,e,s=!0){this.process.toStderr(this.format(null,t,e),s)}wrap(t,e){return t?this.applyFormat(`[${t}]`,e):t}splat(...t){const e=t.shift()??"";return 0===t.length?e:pe(e,t)}suffix(t,...e){return e.filter(Boolean).forEach((e=>{if(t+=this.spacing(t),"string"==typeof e)t+=this.wrap(e);else if("object"==typeof e){if(e.args??=[],"function"==typeof e.condition?!e.condition(...e.args):!(e.condition??1))return t;t+=this.wrap("function"==typeof e.field?e.field(...e.args):e.field,{format:e?.format(...e.args)})}})),t}prefix(t,...e){return e.filter(Boolean).forEach((e=>{if(t=this.spacing(t)+t,"string"==typeof e)t=this.wrap(e)+t;else if("object"==typeof e){if(e.args??=[],"function"==typeof e.condition?!e.condition(...e.args):!(e.condition??1))return t;t=this.wrap("function"==typeof e.field?e.field(...e.args):e.field,{format:e?.format()})+t}})),t}fields(t,e){return this.options?.fields?.prefix&&(t=this.prefix(t,...this.options.fields.prefix)),e?.prefix&&(t=this.prefix(t,...e.prefix)),e?.suffix&&(t=this.suffix(t,...e.suffix)),this.options?.fields?.suffix&&(t=this.suffix(t,...this.options.fields.suffix)),t}icon(t,e){if(!t)return null;if(!e){const s=this.options.icon?.[t];e="function"==typeof s?s():s}const s=this.options.color?.[t];return e&&s&&(e=s(e)),e}format(t,e,s){return Array.isArray(e)||(e=[e]),this.splat(e.shift(),...e).toString().split(Kt.EOL).filter((t=>!t||""!==t.trim())).map((e=>this.style(t,this.fields(e,{prefix:Array.isArray(s?.prefix)?s.prefix:[s?.prefix],suffix:Array.isArray(s?.suffix)?s.suffix:[s?.suffix]})))).join(Kt.EOL)}style(t,e){if(!t||!e)return e;const s=this.icon(t,!this.options.useIcons&&this.wrap(t));return s&&(e=s+" "+e),e}applyFormat(t,e){return e?.format?e.format(t):t}spacing(t){return void 0===t||""===t.trim()?"":" "}},me=class{constructor(t){this.options=t}static{Vt(this,"ProcessOutputBuffer")}buffer=[];decoder=new Wt.StringDecoder;get all(){return this.buffer}get last(){return this.buffer.at(-1)}get length(){return this.buffer.length}write(t,...e){const s=e[e.length-1];return this.buffer.push({time:Date.now(),stream:this.options?.stream,entry:this.decoder.write("string"==typeof t?Buffer.from(t,"string"==typeof e[0]?e[0]:void 0):Buffer.from(t))}),this.options?.limit&&(this.buffer=this.buffer.slice(-this.options.limit)),"function"==typeof s&&s(),!0}reset(){this.buffer=[]}},ye=class{constructor(t){this.stream=t,this.method=t.write,this.buffer=new me({stream:t})}static{Vt(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 t=[...this.buffer.all];return this.buffer.reset(),t}write(...t){return this.method.apply(this.stream,t)}},Ee=class{constructor(t,e,s){this.options=s,this.stream={stdout:new ye(t??process.stdout),stderr:new ye(e??process.stderr)},this.options={dump:["stdout","stderr"],leaveEmptyLine:!0,...s}}static{Vt(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(Xt),Object.values(this.stream).forEach((t=>t.hijack())),this.active=!0}release(){const t=Object.entries(this.stream).map((([t,e])=>({name:t,buffer:e.release()}))).filter((t=>this.options.dump.includes(t.name))).flatMap((t=>t.buffer)).sort(((t,e)=>t.time-e.time)).map((t=>({...t,entry:ne(t.entry)}))).filter((t=>t.entry));t.length>0&&(this.options.leaveEmptyLine&&this.stdout.write(Kt.EOL),t.forEach((t=>{(t.stream??this.stdout).write(t.entry+Kt.EOL)}))),this.stream.stdout.write(Zt),this.active=!1}toStdout(t,e=!0){return e&&(t+=Kt.EOL),this.stream.stdout.write(t)}toStderr(t,e=!0){return e&&(t+=Kt.EOL),this.stream.stderr.write(t)}};function be(t){const e=new Yt.Writable;return e.rows=1/0,e.columns=1/0,e.write=e=>(t(e.toString()),!0),e}Vt(be,"createWritable"),class{constructor(t,e){this.task=t,this.wrapper=e}static{Vt(this,"ListrPromptAdapter")}state;reportStarted(){if(this.state=this.task.state,this.task.prompt)throw new Ue("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 Re=class{static{Vt(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(t,e=100){this.id=setInterval((()=>{this.spin(),t&&t()}),e)}stop(){clearInterval(this.id)}},Ae={SKIPPED_WITH_COLLAPSE:ue.arrowDown,SKIPPED_WITHOUT_COLLAPSE:ue.warning,OUTPUT:ue.pointerSmall,OUTPUT_WITH_BOTTOMBAR:ue.pointerSmall,PENDING:ue.pointer,COMPLETED:ue.tick,COMPLETED_WITH_FAILED_SUBTASKS:ue.warning,COMPLETED_WITH_SISTER_TASKS_FAILED:ue.squareSmallFilled,RETRY:ue.warning,ROLLING_BACK:ue.warning,ROLLED_BACK:ue.arrowLeft,FAILED:ue.cross,FAILED_WITH_SUBTASKS:ue.pointer,WAITING:ue.squareSmallFilled,PAUSED:ue.squareSmallFilled},we={SKIPPED_WITH_COLLAPSE:oe.yellow,SKIPPED_WITHOUT_COLLAPSE:oe.yellow,PENDING:oe.yellow,COMPLETED:oe.green,COMPLETED_WITH_FAILED_SUBTASKS:oe.yellow,COMPLETED_WITH_SISTER_TASKS_FAILED:oe.red,RETRY:oe.yellowBright,ROLLING_BACK:oe.redBright,ROLLED_BACK:oe.redBright,FAILED:oe.red,FAILED_WITH_SUBTASKS:oe.red,WAITING:oe.dim,PAUSED:oe.yellowBright};function Ce(t){const e=Math.floor(t/1e3),s=Math.floor(e/60);let r;return 0===e&&0===s&&(r=`0.${Math.floor(t/100)}s`),e>0&&(r=e%60+"s"),s>0&&(r=`${s}m${r}`),r}Vt(Ce,"parseTimer");var Se={condition:!0,field:Ce,format:Vt((()=>oe.dim),"format")};Vt((function(){const t=new Date;return String(t.getHours()).padStart(2,"0")+":"+String(t.getMinutes()).padStart(2,"0")+":"+String(t.getSeconds()).padStart(2,"0")}),"parseTimestamp");var ve=class t{constructor(e,s,r){this.tasks=e,this.options=s,this.events=r,this.options={...t.rendererOptions,...this.options,icon:{...Ae,...s?.icon??{}},color:{...we,...s?.color??{}}},this.spinner=this.options.spinner??new Re,this.logger=this.options.logger??new ge({useIcons:!0,toStderr:[]}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color}static{Vt(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:{...Se,format:Vt((()=>oe.yellowBright),"format")}};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:t}=await Promise.all([s.e(799),s.e(782),s.e(216)]).then(s.bind(s,2216)),{default:e}=await Promise.all([s.e(799),s.e(145)]).then(s.bind(s,5145)),{default:r}=await Promise.all([s.e(799),s.e(782)]).then(s.bind(s,782));this.updater=t(this.logger.process.stdout),this.truncate=e,this.wrap=r,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(t){t={tasks:!0,bottomBar:!0,prompt:!0,...t};const e=[],s=this.renderer(this.tasks),r=this.renderBottomBar(),i=this.renderPrompt();return t.tasks&&s.length>0&&e.push(...s),t.bottomBar&&r.length>0&&(e.length>0&&e.push(""),e.push(...r)),t.prompt&&i.length>0&&(e.length>0&&e.push(""),e.push(...i)),e.join(Kt.EOL)}style(t,e=!1){const s=this.cache.rendererOptions.get(t.id);if(t.isSkipped()){if(e||s.collapseSkips)return this.logger.icon("SKIPPED_WITH_COLLAPSE");if(!1===s.collapseSkips)return this.logger.icon("SKIPPED_WITHOUT_COLLAPSE")}if(e)return this.shouldOutputToBottomBar(t)?this.logger.icon("OUTPUT_WITH_BOTTOMBAR"):this.logger.icon("OUTPUT");if(t.hasSubtasks()){if(t.isStarted()||t.isPrompt()&&!1!==s.showSubtasks&&!t.subtasks.every((t=>!t.hasTitle())))return this.logger.icon("PENDING");if(t.isCompleted()&&t.subtasks.some((t=>t.hasFailed())))return this.logger.icon("COMPLETED_WITH_FAILED_SUBTASKS");if(t.hasFailed())return this.logger.icon("FAILED_WITH_SUBTASKS")}return t.isStarted()||t.isPrompt()?this.logger.icon("PENDING",!this.options?.lazy&&this.spinner.fetch()):t.isCompleted()?this.logger.icon("COMPLETED"):t.isRetrying()?this.logger.icon("RETRY",!this.options?.lazy&&this.spinner.fetch()):t.isRollingBack()?this.logger.icon("ROLLING_BACK",!this.options?.lazy&&this.spinner.fetch()):t.hasRolledBack()?this.logger.icon("ROLLED_BACK"):t.hasFailed()?this.logger.icon("FAILED"):t.isPaused()?this.logger.icon("PAUSED"):this.logger.icon("WAITING")}format(t,e,s){if(""===t.trim())return[];let r;e&&(t=e+" "+t);const i=(process.stdout.columns??80)-s*this.options.indentation-2;switch(this.options.formatOutput){case"truncate":r=t.split(Kt.EOL).map(((t,e)=>this.truncate(this.indent(t,e),i)));break;case"wrap":r=this.wrap(t,i,{hard:!0,trim:!1}).split(Kt.EOL).map(((t,e)=>this.indent(t,e)));break;default:throw new Ne("Format option for the renderer is wrong.")}return this.options.removeEmptyLines&&(r=r.filter(Boolean)),r.map((t=>ae(t,s*this.options.indentation)))}shouldOutputToOutputBar(t){const e=this.cache.rendererTaskOptions.get(t.id).outputBar;return"number"==typeof e&&0!==e||"boolean"==typeof e&&!1!==e}shouldOutputToBottomBar(t){const e=this.cache.rendererTaskOptions.get(t.id).bottomBar;return"number"==typeof e&&0!==e||"boolean"==typeof e&&!1!==e||!t.hasTitle()}renderer(t,e=0){return t.flatMap((s=>{if(!s.isEnabled())return[];if(this.cache.render.has(s.id))return this.cache.render.get(s.id);this.calculate(s),this.setupBuffer(s);const r=this.cache.rendererOptions.get(s.id),i=this.cache.rendererTaskOptions.get(s.id),n=[];if(s.isPrompt()){if(this.activePrompt&&this.activePrompt!==s.id)throw new Ne("Only one prompt can be active at the given time, please re-evaluate your task design.");this.activePrompt||(s.on("PROMPT",(t=>{const e=ne(t);e&&(this.prompt=e)})),s.on("STATE",(t=>{("PROMPT_COMPLETED"===t||s.hasFinalized()||s.hasReset())&&(this.prompt=null,this.activePrompt=null,s.off("PROMPT"))})),this.activePrompt=s.id)}if(s.hasTitle()&&(!t.some((t=>t.hasFailed()))||s.hasFailed()||!1===s.options.exitOnError||s.isCompleted()||s.isSkipped()?s.hasFailed()&&r.collapseErrors?n.push(...this.format(!s.hasSubtasks()&&s.message.error&&r.showErrorMessage?s.message.error:s.title,this.style(s),e)):s.isSkipped()&&r.collapseSkips?n.push(...this.format(this.logger.suffix(s.message.skip&&r.showSkipMessage?s.message.skip:s.title,{field:"SKIPPED",condition:r.suffixSkips,format:Vt((()=>oe.dim),"format")}),this.style(s),e)):s.isRetrying()?n.push(...this.format(this.logger.suffix(s.title,{field:`RETRY:${s.message.retry.count}`,format:Vt((()=>oe.yellow),"format"),condition:r.suffixRetries}),this.style(s),e)):s.isCompleted()&&s.hasTitle()&&Ie(i.timer?.condition,s.message.duration)?n.push(...this.format(this.logger.suffix(s?.title,{...i.timer,args:[s.message.duration]}),this.style(s),e)):s.isPaused()?n.push(...this.format(this.logger.suffix(s.title,{...r.pausedTimer,args:[s.message.paused-Date.now()]}),this.style(s),e)):n.push(...this.format(s.title,this.style(s),e)):n.push(...this.format(s.title,this.logger.icon("COMPLETED_WITH_SISTER_TASKS_FAILED"),e))),s.hasSubtasks()&&r.showSubtasks||(!s.hasFailed()||!1!==r.collapseErrors||!r.showErrorMessage&&r.showSubtasks?!s.isSkipped()||!1!==r.collapseSkips||!r.showSkipMessage&&r.showSubtasks||n.push(...this.dump(s,e,"SKIPPED")):n.push(...this.dump(s,e,"FAILED"))),(s.isPending()||i.persistentOutput)&&n.push(...this.renderOutputBar(s,e)),!1!==r.showSubtasks&&s.hasSubtasks()&&(s.isPending()||s.hasFinalized()&&!s.hasTitle()||s.isCompleted()&&!1===r.collapseSubtasks&&!s.subtasks.some((t=>!0===this.cache.rendererOptions.get(t.id)?.collapseSubtasks))||s.subtasks.some((t=>!1===this.cache.rendererOptions.get(t.id)?.collapseSubtasks))||s.subtasks.some((t=>t.hasFailed()))||s.subtasks.some((t=>t.hasRolledBack())))){const t=s.hasTitle()?e+1:e,r=this.renderer(s.subtasks,t);n.push(...r)}return s.hasFinalized()&&(i.persistentOutput||(this.buffer.bottom.delete(s.id),this.buffer.output.delete(s.id))),s.isClosed()&&(this.cache.render.set(s.id,n),this.reset(s)),n}))}renderOutputBar(t,e){const s=this.buffer.output.get(t.id);return s?s.all.flatMap((s=>this.dump(t,e,"OUTPUT",s.entry))):[]}renderBottomBar(){return 0===this.buffer.bottom.size?[]:Array.from(this.buffer.bottom.values()).flatMap((t=>t.all)).sort(((t,e)=>t.time-e.time)).map((t=>t.entry))}renderPrompt(){return this.prompt?[this.prompt]:[]}calculate(e){if(this.cache.rendererOptions.has(e.id)&&this.cache.rendererTaskOptions.has(e.id))return;const s={...this.options,...e.rendererOptions};this.cache.rendererOptions.set(e.id,s),this.cache.rendererTaskOptions.set(e.id,{...t.rendererTaskOptions,timer:s.timer,...e.rendererTaskOptions})}setupBuffer(t){if(this.buffer.bottom.has(t.id)||this.buffer.output.has(t.id))return;const e=this.cache.rendererTaskOptions.get(t.id);this.shouldOutputToBottomBar(t)&&!this.buffer.bottom.has(t.id)?(this.buffer.bottom.set(t.id,new me({limit:"number"==typeof e.bottomBar?e.bottomBar:1})),t.on("OUTPUT",(e=>{const s=this.dump(t,-1,"OUTPUT",e);this.buffer.bottom.get(t.id).write(s.join(Kt.EOL))})),t.on("STATE",(e=>{"RETRY"===e&&this.buffer.bottom.delete(t.id)}))):this.shouldOutputToOutputBar(t)&&!this.buffer.output.has(t.id)&&(this.buffer.output.set(t.id,new me({limit:"number"==typeof e.outputBar?e.outputBar:1})),t.on("OUTPUT",(e=>{this.buffer.output.get(t.id).write(e)})),t.on("STATE",(e=>{"RETRY"===e&&this.buffer.output.delete(t.id)})))}reset(t){this.cache.rendererOptions.delete(t.id),this.cache.rendererTaskOptions.delete(t.id),this.buffer.output.delete(t.id)}dump(t,e,s="OUTPUT",r){if(!r)switch(s){case"OUTPUT":r=t.output;break;case"SKIPPED":r=t.message.skip;break;case"FAILED":r=t.message.error}return t.hasTitle()&&"FAILED"===s&&r===t.title||"string"!=typeof r?[]:("OUTPUT"===s&&(r=ne(r)),this.format(r,this.style(t,!0),e+1))}indent(t,e){return e>0?ae(t.trimEnd(),this.options.indentation):t.trimEnd()}},Te=class{constructor(t,e){this.tasks=t,this.options=e}static{Vt(this,"SilentRenderer")}static nonTTY=!0;static rendererOptions;static rendererTaskOptions;render(){}end(){}},Oe=class t{constructor(e,s){this.tasks=e,this.options=s,this.options={...t.rendererOptions,...s,icon:{...he,...s?.icon??{}},color:{...de,...s?.color??{}}},this.logger=this.options.logger??new ge({useIcons:!0,toStderr:fe}),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{Vt(this,"SimpleRenderer")}static nonTTY=!0;static rendererOptions={pausedTimer:{...Se,field:Vt((t=>`PAUSED:${t}`),"field"),format:Vt((()=>oe.yellowBright),"format")}};static rendererTaskOptions={};logger;cache={rendererOptions:new Map,rendererTaskOptions:new Map};end(){}render(){this.renderer(this.tasks)}renderer(t){t.forEach((t=>{this.calculate(t),t.once("CLOSED",(()=>{this.reset(t)}));const e=this.cache.rendererOptions.get(t.id),s=this.cache.rendererTaskOptions.get(t.id);t.on("SUBTASK",(t=>{this.renderer(t)})),t.on("STATE",(e=>{if(t.hasTitle())if("STARTED"===e)this.logger.log("STARTED",t.title);else if("COMPLETED"===e){const e=s?.timer;this.logger.log("COMPLETED",t.title,e&&{suffix:{...e,condition:!!t.message?.duration&&e.condition,args:[t.message.duration]}})}else"PROMPT"===e?(this.logger.process.hijack(),t.on("PROMPT",(t=>{this.logger.process.toStderr(t,!1)}))):"PROMPT_COMPLETED"===e&&(t.off("PROMPT"),this.logger.process.release())})),t.on("OUTPUT",(t=>{this.logger.log("OUTPUT",t)})),t.on("MESSAGE",(s=>{if(s.error)this.logger.log("FAILED",t.title,{suffix:{field:`FAILED: ${s.error}`,format:Vt((()=>oe.red),"format")}});else if(s.skip)this.logger.log("SKIPPED",t.title,{suffix:{field:`SKIPPED: ${s.skip}`,format:Vt((()=>oe.yellow),"format")}});else if(s.rollback)this.logger.log("ROLLBACK",t.title,{suffix:{field:`ROLLBACK: ${s.rollback}`,format:Vt((()=>oe.red),"format")}});else if(s.retry)this.logger.log("RETRY",t.title,{suffix:{field:`RETRY:${s.retry.count}`,format:Vt((()=>oe.red),"format")}});else if(s.paused){const r=e?.pausedTimer;this.logger.log("PAUSED",t.title,r&&{suffix:{...r,condition:!!s?.paused&&r.condition,args:[s.paused-Date.now()]}})}}))}))}calculate(e){if(this.cache.rendererOptions.has(e.id)&&this.cache.rendererTaskOptions.has(e.id))return;const s={...this.options,...e.rendererOptions};this.cache.rendererOptions.set(e.id,s),this.cache.rendererTaskOptions.set(e.id,{...t.rendererTaskOptions,timer:s.timer,...e.rendererTaskOptions})}reset(t){this.cache.rendererOptions.delete(t.id),this.cache.rendererTaskOptions.delete(t.id)}},_e=class{constructor(t){this.options=t}static{Vt(this,"TestRendererSerializer")}serialize(t,e,s){return JSON.stringify(this.generate(t,e,s))}generate(t,e,s){const r={event:t,data:e};if("boolean"!=typeof this.options?.task){const t=Object.fromEntries(this.options.task.map((t=>{const e=s[t];return"function"==typeof e?[t,e.call(s)]:[t,e]})));Object.keys(s).length>0&&(r.task=t)}return r}},ke=class t{constructor(e,s){this.tasks=e,this.options=s,this.options={...t.rendererOptions,...this.options},this.logger=this.options.logger??new ge({useIcons:!1}),this.serializer=new _e(this.options)}static{Vt(this,"TestRenderer")}static nonTTY=!0;static rendererOptions={subtasks:!0,state:Object.values(Jt),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(t){t.forEach((t=>{this.options.subtasks&&t.on("SUBTASK",(t=>{this.renderer(t)})),this.options.state&&t.on("STATE",(e=>{this.logger.toStdout(this.serializer.serialize("STATE",e,t))})),this.options.output&&t.on("OUTPUT",(e=>{this.logger.toStdout(this.serializer.serialize("OUTPUT",e,t))})),this.options.prompt&&t.on("PROMPT",(e=>{this.logger.toStdout(this.serializer.serialize("PROMPT",e,t))})),this.options.title&&t.on("TITLE",(e=>{this.logger.toStdout(this.serializer.serialize("TITLE",e,t))})),t.on("MESSAGE",(e=>{const s=Object.fromEntries(Object.entries(e).map((([t,e])=>{if(this.options.messages.includes(t))return[t,e]})).filter(Boolean));if(Object.keys(s).length>0){const e=this.serializer.serialize("MESSAGE",s,t);this.options.messagesToStderr.some((t=>Object.keys(s).includes(t)))?this.logger.toStderr(e):this.logger.toStdout(e)}}))}))}},xe={default:ve,simple:Oe,verbose:class t{constructor(e,s){this.tasks=e,this.options=s,this.options={...t.rendererOptions,...this.options,icon:{...he,...s?.icon??{}},color:{...de,...s?.color??{}}},this.logger=this.options.logger??new ge({useIcons:!1,toStderr:fe}),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{Vt(this,"VerboseRenderer")}static nonTTY=!0;static rendererOptions={logTitleChange:!1,pausedTimer:{...Se,format:Vt((()=>oe.yellowBright),"format")}};static rendererTaskOptions;logger;cache={rendererOptions:new Map,rendererTaskOptions:new Map};render(){this.renderer(this.tasks)}end(){}renderer(t){t.forEach((t=>{this.calculate(t),t.once("CLOSED",(()=>{this.reset(t)}));const e=this.cache.rendererOptions.get(t.id),s=this.cache.rendererTaskOptions.get(t.id);t.on("SUBTASK",(t=>{this.renderer(t)})),t.on("STATE",(e=>{if(t.hasTitle())if("STARTED"===e)this.logger.log("STARTED",t.title);else if("COMPLETED"===e){const e=s.timer;this.logger.log("COMPLETED",t.title,e&&{suffix:{...e,condition:!!t.message?.duration&&e.condition,args:[t.message.duration]}})}})),t.on("OUTPUT",(t=>{this.logger.log("OUTPUT",t)})),t.on("PROMPT",(t=>{const e=ne(t);e&&this.logger.log("PROMPT",e)})),!1!==this.options?.logTitleChange&&t.on("TITLE",(t=>{this.logger.log("TITLE",t)})),t.on("MESSAGE",(s=>{if(s?.error)this.logger.log("FAILED",s.error);else if(s?.skip)this.logger.log("SKIPPED",s.skip);else if(s?.rollback)this.logger.log("ROLLBACK",s.rollback);else if(s?.retry)this.logger.log("RETRY",t.title,{suffix:s.retry.count.toString()});else if(s?.paused){const r=e?.pausedTimer;this.logger.log("PAUSED",t.title,r&&{suffix:{...r,condition:!!s?.paused&&r.condition,args:[s.paused-Date.now()]}})}}))}))}calculate(e){if(this.cache.rendererOptions.has(e.id)&&this.cache.rendererTaskOptions.has(e.id))return;const s={...this.options,...e.rendererOptions};this.cache.rendererOptions.set(e.id,s),this.cache.rendererTaskOptions.set(e.id,{...t.rendererTaskOptions,timer:s.timer,...e.rendererTaskOptions})}reset(t){this.cache.rendererOptions.delete(t.id),this.cache.rendererTaskOptions.delete(t.id)}},test:ke,silent:Te};function Le(t){return!0===process.stdout.isTTY||!0===t.nonTTY}function Pe(t){return"string"==typeof t?xe[t]??xe.default:"function"==typeof t?t:xe.default}function $e(t){if(Ie(t?.silentRendererCondition))return{renderer:Pe("silent"),selection:"SILENT"};const e={renderer:Pe(t.renderer),options:t.rendererOptions,selection:"PRIMARY"};return!Le(e.renderer)||Ie(t?.fallbackRendererCondition)?{renderer:Pe(t.fallbackRenderer),options:t.fallbackRendererOptions,selection:"SECONDARY"}:e}function Ie(t,...e){return"function"==typeof t?t(...e):t}Vt(Le,"isRendererSupported"),Vt(Pe,"getRendererClass"),Vt($e,"getRenderer"),Vt(Ie,"assertFunctionOrSelf");var He=zt({circles:!0});function Be(t){return He(t)}Vt(Be,"cloneObject");var Fe=class{static{Vt(this,"Concurrency")}concurrency;count;queue;constructor(t){this.concurrency=t.concurrency,this.count=0,this.queue=new Set}add(t){return this.count<this.concurrency?this.run(t):new Promise((e=>{const s=Vt((()=>e(this.run(t))),"callback");this.queue.add(s)}))}flush(){for(const t of this.queue){if(this.count>=this.concurrency)break;this.queue.delete(t),t()}}run(t){this.count++;const e=t(),s=Vt((()=>{this.count--,this.flush()}),"cleanup");return e.then(s,(()=>{this.queue.clear()})),e}};function De(t){return new Promise((e=>{setTimeout(e,t)}))}Vt(De,"delay");var Me=class extends Error{constructor(t,e,s){super(t.message),this.error=t,this.type=e,this.task=s,this.name="ListrError",this.path=s.path,"full"===s?.options.collectErrors&&(this.task=Be(s),this.ctx=Be(s.listr.ctx)),this.stack=t?.stack}static{Vt(this,"ListrError")}path;ctx},Ne=class extends Error{static{Vt(this,"ListrRendererError")}},Ue=class extends Error{static{Vt(this,"PromptError")}},je=class{constructor(t){this.task=t}static{Vt(this,"TaskWrapper")}get title(){return this.task.title}set title(t){t=Array.isArray(t)?t:[t],this.task.title$=pe(t.shift(),...t)}get output(){return this.task.output}set output(t){t=Array.isArray(t)?t:[t],this.task.output$=pe(t.shift(),...t)}set promptOutput(t){this.task.promptOutput$=t}newListr(t,e){let s;return s="function"==typeof t?t(this):t,new Ye(s,e,this.task)}report(t,e){!1!==this.task.options.collectErrors&&this.task.listr.errors.push(new Me(t,e,this.task)),this.task.message$={error:t.message??this.task?.title}}skip(t,...e){this.task.state$="SKIPPED",t&&(this.task.message$={skip:t?pe(t,...e):this.task?.title})}isRetrying(){return this.task.isRetrying()?this.task.retry:{count:0}}prompt(t){return this.task.prompt?this.task.prompt:new t(this.task,this)}stdout(t){return be((e=>{"PROMPT"===t?this.promptOutput=e:this.output=e}))}run(t){return this.task.run(t,this)}},Ge=class extends te{static{Vt(this,"ListrTaskEventManager")}},Ke=class extends Ge{constructor(t,e,s,r,i){if(super(),this.listr=t,this.task=e,this.options=s,this.rendererOptions=r,this.rendererTaskOptions=i,e.title){const t=Array.isArray(e?.title)?e.title:[e.title];this.title=pe(t.shift(),...t),this.initialTitle=this.title}this.taskFn=e.task,this.parent=t.parentTask}static{Vt(this,"Task")}id=(0,qt.randomUUID)();state="WAITING";subtasks;title;initialTitle;output;retry;message={};prompt;parent;enabled;taskFn;closed;set state$(t){if(this.state=t,this.emit("STATE",t),this.hasSubtasks()&&this.hasFailed())for(const t of this.subtasks)"STARTED"===t.state&&(t.state$="FAILED");this.listr.events.emit("SHOUD_REFRESH_RENDER")}set output$(t){this.output=t,this.emit("OUTPUT",t),this.listr.events.emit("SHOUD_REFRESH_RENDER")}set promptOutput$(t){this.emit("PROMPT",t),ne(t)&&this.listr.events.emit("SHOUD_REFRESH_RENDER")}set message$(t){this.message={...this.message,...t},this.emit("MESSAGE",t),this.listr.events.emit("SHOUD_REFRESH_RENDER")}set title$(t){this.title=t,this.emit("TITLE",t),this.listr.events.emit("SHOUD_REFRESH_RENDER")}get path(){return[...this.listr.path,this.initialTitle]}async check(t){return"WAITING"===this.state&&(this.enabled=await Ie(this.task?.enabled??!0,t),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(t){const e=this.state;this.state$="PAUSED",this.message$={paused:Date.now()+t},await De(t),this.state$=e,this.message$={paused:null}}async run(t,e){const s=Vt((e=>(e instanceof Ye?(e.options={...this.options,...e.options},e.rendererClass=Pe("silent"),this.subtasks=e.tasks,e.errors=this.listr.errors,this.emit("SUBTASK",this.subtasks),e=e.run(t)):e instanceof Promise?e=e.then(s):se(e)?e=new Promise(((t,s)=>{e.on("data",(t=>{this.output$=t.toString()})),e.on("error",(t=>s(t))),e.on("end",(()=>t(null)))})):ee(e)&&(e=new Promise(((t,s)=>{e.subscribe({next:Vt((t=>{this.output$=t}),"next"),error:s,complete:t})}))),e)),"handleResult"),r=Date.now();this.state$="STARTED";const i=await Ie(this.task?.skip??!1,t);if(i)return"string"==typeof i?this.message$={skip:i}:this.hasTitle()?this.message$={skip:this.title}:this.message$={skip:"Skipped task without a title."},void(this.state$="SKIPPED");try{const i="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,n="object"==typeof this.task.retry&&this.task.retry.delay;for(let r=1;r<=i;r++)try{await s(this.taskFn(t,e));break}catch(t){if(r===i)throw t;this.retry={count:r,error:t},this.message$={retry:this.retry},this.title$=this.initialTitle,this.output=void 0,e.report(t,"WILL_RETRY"),this.state$="RETRY",n&&await this.pause(n)}(this.isStarted()||this.isRetrying())&&(this.message$={duration:Date.now()-r},this.state$="COMPLETED")}catch(s){if(this.prompt instanceof Ue&&(s=this.prompt),this.task?.rollback){e.report(s,"WILL_ROLLBACK");try{this.state$="ROLLING_BACK",await this.task.rollback(t,e),this.message$={rollback:this.title},this.state$="ROLLED_BACK"}catch(t){throw this.state$="FAILED",e.report(t,"HAS_FAILED_TO_ROLLBACK"),this.close(),t}if(!1!==this.listr.options?.exitAfterRollback)throw this.close(),s}else{if(this.state$="FAILED",!1!==this.listr.options.exitOnError&&!1!==await Ie(this.task?.exitOnError,t))throw e.report(s,"HAS_FAILED"),this.close(),s;this.hasSubtasks()||e.report(s,"HAS_FAILED_WITHOUT_ERROR")}}finally{this.close()}}close(){this.emit("CLOSED"),this.listr.events.emit("SHOUD_REFRESH_RENDER"),this.complete()}},We=class extends te{static{Vt(this,"ListrEventManager")}},Ye=class{constructor(t,e,s){this.task=t,this.options=e,this.parentTask=s,this.options={concurrent:!1,renderer:"default",fallbackRenderer:"simple",exitOnError:!0,exitAfterRollback:!0,collectErrors:!1,registerSignalListeners:!0,...this.parentTask?.options??{},...e},!0===this.options.concurrent?this.options.concurrent=1/0:"number"!=typeof this.options.concurrent&&(this.options.concurrent=1),this.concurrency=new Fe({concurrency:this.options.concurrent}),s&&(this.path=[...s.listr.path,s.title],this.errors=s.listr.errors),this.parentTask?.listr.events instanceof We?this.events=this.parentTask.listr.events:this.events=new We,(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");const r=$e({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=r.renderer,this.rendererClassOptions=r.options,this.rendererSelection=r.selection,this.add(t??[]),this.options.registerSignalListeners&&(this.boundSignalHandler=this.signalHandler.bind(this),process.once("SIGINT",this.boundSignalHandler).setMaxListeners(0))}static{Vt(this,"Listr")}tasks=[];errors=[];ctx;events;path=[];rendererClass;rendererClassOptions;rendererSelection;boundSignalHandler;concurrency;renderer;isRoot(){return!this.parentTask}isSubtask(){return!!this.parentTask}add(t){this.tasks.push(...this.generate(t))}async run(t){this.renderer||(this.renderer=new this.rendererClass(this.tasks,this.rendererClassOptions,this.events)),await this.renderer.render(),this.ctx=this.options?.ctx??t??{},await Promise.all(this.tasks.map((t=>t.check(this.ctx))));try{await Promise.all(this.tasks.map((t=>this.concurrency.add((()=>this.runTask(t)))))),this.renderer.end(),this.removeSignalHandler()}catch(t){if(!1!==this.options.exitOnError)throw this.renderer.end(t),this.removeSignalHandler(),t}return this.ctx}generate(t){return(t=Array.isArray(t)?t:[t]).map((t=>{let e;return"PRIMARY"===this.rendererSelection?e=t.rendererOptions:"SECONDARY"===this.rendererSelection&&(e=t.fallbackRendererOptions),new Ke(this,t,this.options,this.rendererClassOptions,e)}))}async runTask(t){if(await t.check(this.ctx))return new je(t).run(this.ctx)}signalHandler(){this.tasks?.forEach((async t=>{t.isPending()&&(t.state$="FAILED")})),this.isRoot()&&(this.renderer?.end(new Error("Interrupted.")),process.exit(127))}removeSignalHandler(){this.boundSignalHandler&&process.removeListener("SIGINT",this.boundSignalHandler)}};const ze=M.Ay.blue(ue.arrowRight),qe=M.Ay.redBright(ue.cross),Qe=M.Ay.yellow(ue.warning),Ve=(t,e,s)=>`${M.Ay.redBright(`${qe} Validation Error:`)}\n\n Invalid value for '${M.Ay.bold(t)}': ${M.Ay.bold((0,n.inspect)(s))}\n\n ${e}`,Xe=M.Ay.redBright(`${qe} Current directory is not a git directory!`),Ze=M.Ay.redBright(`${qe} Failed to get staged files!`),Je=`${qe} No valid configuration found.`,ts=`${ze} No staged files found.`,es=`${ze} No staged files match any configured task.`,ss=M.Ay.yellow(`${Qe} 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`),rs="Skipped because of errors from tasks.",is=`\n ${M.Ay.redBright(`${qe} lint-staged failed due to a git error.`)}`,ns=`\n ${M.Ay.yellow(`${Qe} lint-staged prevented an empty git commit.\n Use the --allow-empty option to continue, or check your task configuration`)}\n`,os=(M.Ay.redBright(`${qe} Failed to read config from stdin.`),(t,e)=>`${M.Ay.redBright(`${e} Failed to parse config from file "${t}".`)}\n\n${e}\n\nSee https://github.com/okonet/lint-staged#configuration.`),as=(t={},e)=>{if(!Array.isArray(t.output))return;const s=t.errors?.size>0?e.error:e.log;for(const e of t.output)s(e)},ls=t=>{if(t===o.posix.sep||t===o.win32.sep)return o.posix.sep;let e=t.split(/[/\\]+/).join(o.posix.sep);return(t.startsWith("\\\\?\\")||t.startsWith("\\\\.\\"))&&(e=e.replace(/^\/(\.|\?)/,"//$1")),e.endsWith(o.posix.sep)&&(e=e.slice(0,-1)),e},cs=r("lint-staged:chunkFiles"),us=({files:t,baseDir:e,maxArgLength:s=null,relative:r=!1})=>{const i=t.map((t=>ls(r||!e?t:o.resolve(e,t))));if(!s)return cs("Skip chunking files because of undefined maxArgLength"),[i];const n=i.join(" ").length;cs(`Resolved an argument string length of ${n} characters from ${i.length} files`);const a=Math.min(Math.ceil(n/s),i.length);return cs(`Creating ${a} chunks for maxArgLength of ${s}`),((t,e)=>{if(1===e)return[t];const s=[];let r=0;for(let i=0;i<e;i++){const n=Math.ceil((t.length-r)/(e-i));s.push([]),s[i]=t.slice(r,n+r),r+=n}return s})(i,a)};var ps=s(7498);const hs=r("lint-staged:generateTasks"),ds=({config:t,cwd:e=process.cwd(),files:s,relative:r=!1})=>{hs("Generating linter tasks");const i=s.map((t=>ls(o.relative(e,t))));return Object.entries(t).map((([t,s])=>{const n=t.startsWith("../"),a=i.filter((t=>!!n||!t.startsWith("..")&&!o.isAbsolute(t))),l=ps(a,t,{cwd:e,dot:!0,matchBase:!t.includes("/"),posixSlashes:!0,strictBrackets:!0}),c={pattern:t,commands:s,fileList:l.map((t=>ls(r?t:o.resolve(e,t))))};return hs("Generated task: \n%O",c),c}))};var fs=s(6454);function gs(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var s=0;s<t.length;s++){var r=t[s];if("string"==typeof r)return r}}var ms=s(4434);const ys=Symbol("ApplyEmptyCommitError"),Es=new Error("Configuration could not be found"),bs=new Error("Configuration should be an object or a function"),Rs=new Error("Configuration should not be empty"),As=Symbol("GetBackupStashError"),ws=Symbol("GetStagedFilesError"),Cs=Symbol("GitError"),Ss=Symbol("GitRepoError"),vs=Symbol("HideUnstagedChangesError"),Ts=new Error("Invalid Options"),Os=Symbol("RestoreMergeStatusError"),_s=Symbol("RestoreOriginalStateError"),ks=Symbol("RestoreUnstagedChangesError"),xs=Symbol("TaskError"),Ls=({quiet:t=!1}={})=>({hasPartiallyStagedFiles:null,shouldBackup:null,backupHash:null,shouldHidePartiallyStaged:!0,errors:new Set([]),events:new ms,output:[],quiet:t}),Ps=t=>t.hasPartiallyStagedFiles&&t.shouldHidePartiallyStaged,$s=t=>!!t.shouldBackup&&(t.errors.has(Cs)?is:t.errors.has(xs)?rs:void 0),Is=t=>t.errors.has(Cs)?is:t.errors.has(xs)?rs:void 0,Hs=t=>t.shouldBackup&&(t.errors.has(xs)||t.errors.has(ks)),Bs=t=>{if(t.errors.has(Cs)&&!t.errors.has(ks))return is},Fs=t=>t.shouldBackup,Ds=t=>Bs(t)||t.errors.has(_s)?is:void 0,Ms="lint-staged:taskError",Ns=r("lint-staged:getSpawnedTask"),Us=t=>t.signalName??"FAILED",js=(t,e,s,r=!1)=>{if(e.output){const i=r?M.Ay.redBright(`${qe} ${t}:`):`${ze} ${t}:`,n=[...s.quiet?[]:["",i],e.output];s.output.push(n.join("\n"))}else if(r){const r=Us(e),i=M.Ay.redBright(`\n${qe} ${t} failed without output (${r}).`);s.quiet||s.output.push(i)}},Gs=(t,e,s)=>{s.errors.add(xs),s.events.emit(Ms,xs),js(t,e,s,!0);const r=Us(e);return new Error(`${M.Ay.redBright(t)} ${M.Ay.dim(`[${r}]`)}`)},Ks=({command:t,cwd:e=process.cwd(),files:s,topLevelDir:r,isFn:i,verbose:n=!1})=>{const[o,...a]=function(t){var e,s=/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi,r=t,i=[];do{null!==(e=s.exec(r))&&i.push(gs(e[1],e[6],e[0]))}while(null!==e);return i}(t);Ns("cmd:",o),Ns("args:",a);const l={cwd:/^git(\.exe)?/i.test(o)?r:e,preferLocal:!0,stdin:"ignore"};return Ns("Spawn options:",l),async(e=Ls())=>{const r=H(o,i?a:a.concat(s),l),c=((t,e)=>{let s;const r=async()=>{s=(async t=>{const e=await t.nodeChildProcess;try{const t=await fs(e.pid);for(const e of t)try{process.kill(e)}catch(t){Ns('Failed to kill process with pid "%d": %o',e,t)}}catch(t){Ns('Failed to kill process with pid "%d": %o',e.pid,t)}e.kill("SIGKILL")})(e),await s};return t.events.on(Ms,r,{once:!0}),async()=>{t.events.off(Ms,r),await s}})(e,r);try{const s=await r;n&&js(t,s,e)}catch(s){throw Gs(t,s,e)}finally{await c()}}},Ws=r("lint-staged:getFunctionTasks"),Ys=async(t,e)=>(Ws("Creating Listr tasks for function %o",t),[{title:t.title,task:async s=>{try{await t.task(e)}catch(e){throw Gs(t.title,e,s)}}}]);var zs=s(8161),qs=s(7075);const Qs=new RegExp(zs.EOL+"$"),Vs=t=>new qs.Writable({write:function(e,s,r){t(e.toString().replace(Qs,"")),r()}}),Xs=({renderer:t},{FORCE_COLOR:e})=>"silent"===t||"test"===t||Number(e)>0?t:"verbose",Zs=(t,e,s=process.env)=>{const r=(({debug:t,quiet:e},s,r)=>e?{renderer:"silent"}:"test"===r.NODE_ENV?{renderer:"test",rendererOptions:{logger:new ge({processOutput:new Ee(Vs(s.log),Vs(s.error))})}}:t||"dumb"===r.TERM?{renderer:"verbose"}:{renderer:"update",rendererOptions:{formatOutput:"truncate"}})(t,e,s);return{...r,fallbackRenderer:Xs(r,s)}},Js=r("lint-staged:getSpawnedTasks"),tr=async({commands:t,cwd:e,files:s,topLevelDir:r,verbose:i})=>{Js("Creating Listr tasks for commands %o",t);const n=[],o=Array.isArray(t)?t:[t];for(const t of o){const o="function"==typeof t,a=o?await t([...s]):t,l=Array.isArray(a)?a:[a];for(const t of l){if(o&&"string"!=typeof t)throw new Error(Ve("[Function]","Function task should return a string or an array of strings",a));const l=Ks({command:t,cwd:e,files:s,topLevelDir:r,isFn:o,verbose:i});n.push({title:t,command:t,task:l})}}return n},er=(t,e)=>["diff",`--diff-filter=${void 0!==e?e.trim():"ACMR"}`,...void 0!==t?t.trim().split(" "):["--staged"]],sr=t=>t?t.replace(/\u0000$/,"").split("\0"):[],rr=r("lint-staged:file"),ir=async(t,e=!0)=>{rr("Reading file `%s`",t);try{return await h.readFile(t)}catch(s){if(e&&"ENOENT"===s.code)return rr("File `%s` doesn't exist, ignoring...",t),null;throw s}},nr=async(t,e=!0)=>{rr("Removing file `%s`",t);try{await h.unlink(t)}catch(s){if(!e||"ENOENT"!==s.code)throw s;rr("File `%s` doesn't exist, ignoring...",t)}},or=async(t,e)=>{rr("Writing file `%s`",t),await h.writeFile(t,e)},ar=r("lint-staged:GitWorkflow"),lr=/\x00/,cr=(t,e=!0)=>t.reduce(((t,s)=>{if(lr.test(s)){const[r,i]=s.split(lr);e&&t.push(i),t.push(r)}else t.push(s);return t}),[]),ur="lint-staged automatic backup",pr="lint-staged_unstaged.patch",hr=["--binary","--unified=0","--no-color","--no-ext-diff","--src-prefix=a/","--dst-prefix=b/","--patch","--submodule=short"],dr=["-v","--whitespace=nowarn","--recount","--unidiff-zero"],fr=(t,e,s)=>{throw e.errors.add(Cs),s&&e.errors.add(s),t};class gr{constructor({allowEmpty:t,gitConfigDir:e,topLevelDir:s,matchedFileChunks:r,diff:i,diffFilter:n}){this.execGit=(t,e={})=>D(t,{...e,cwd:s}),this.deletedFiles=[],this.gitConfigDir=e,this.topLevelDir=s,this.diff=i,this.diffFilter=n,this.allowEmpty=t,this.matchedFileChunks=r,this.mergeHeadFilename=o.resolve(e,"MERGE_HEAD"),this.mergeModeFilename=o.resolve(e,"MERGE_MODE"),this.mergeMsgFilename=o.resolve(e,"MERGE_MSG")}getHiddenFilepath(t){return o.resolve(this.gitConfigDir,`./${t}`)}async getBackupStash(t){const e=(await this.execGit(["stash","list"])).split("\n").findIndex((e=>e.includes(ur)&&e.includes(t.backupHash)));if(-1===e)throw t.errors.add(As),new Error("lint-staged automatic backup is missing!");return String(e)}async getDeletedFiles(){ar("Getting deleted files...");const t=(await this.execGit(["ls-files","--deleted"])).split("\n").filter(Boolean).map((t=>o.resolve(this.topLevelDir,t)));return ar("Found deleted files:",t),t}async backupMergeStatus(){ar("Backing up merge state..."),await Promise.all([ir(this.mergeHeadFilename).then((t=>this.mergeHeadBuffer=t)),ir(this.mergeModeFilename).then((t=>this.mergeModeBuffer=t)),ir(this.mergeMsgFilename).then((t=>this.mergeMsgBuffer=t))]),ar("Done backing up merge state!")}async restoreMergeStatus(t){ar("Restoring merge state...");try{await Promise.all([this.mergeHeadBuffer&&or(this.mergeHeadFilename,this.mergeHeadBuffer),this.mergeModeBuffer&&or(this.mergeModeFilename,this.mergeModeBuffer),this.mergeMsgBuffer&&or(this.mergeMsgFilename,this.mergeMsgBuffer)]),ar("Done restoring merge state!")}catch(e){ar("Failed restoring merge state with error:"),ar(e),fr(new Error("Merge state could not be restored due to an error!"),t,Os)}}async getPartiallyStagedFiles(){ar("Getting partially staged files...");const t=(await this.execGit(["status","-z"])).split(/\x00(?=[ AMDRCU?!]{2} |$)/).filter((t=>{const[e,s]=t;return" "!==e&&" "!==s&&"?"!==e&&"?"!==s})).map((t=>t.substr(3))).filter(Boolean);return ar("Found partially staged files:",t),t.length?t:null}async prepare(t,e){try{if(ar(e.title),this.partiallyStagedFiles=await this.getPartiallyStagedFiles(),this.partiallyStagedFiles){t.hasPartiallyStagedFiles=!0;const e=this.getHiddenFilepath(pr),s=cr(this.partiallyStagedFiles);await this.execGit(["diff",...hr,"--output",e,"--",...s])}else t.hasPartiallyStagedFiles=!1;if(!t.shouldBackup)return;await this.backupMergeStatus(),this.deletedFiles=await this.getDeletedFiles();const s=await this.execGit(["stash","create"]);t.backupHash=await this.execGit(["rev-parse","--short",s]),await this.execGit(["stash","store","--quiet","--message",`${ur} (${t.backupHash})`,t.backupHash]),e.title=`Backed up original state in git stash (${t.backupHash})`,ar(e.title)}catch(e){fr(e,t)}}async hideUnstagedChanges(t){try{const t=cr(this.partiallyStagedFiles,!1);await this.execGit(["checkout","--force","--",...t])}catch(e){fr(e,t,vs)}}async applyModifications(t){ar("Adding task modifications to index...");for(const t of this.matchedFileChunks)await this.execGit(["add","--",...t]);ar("Done adding task modifications to index!"),await this.execGit([...er(this.diff,this.diffFilter),"--name-only","-z"])||this.allowEmpty||fr(new Error("Prevented an empty git commit!"),t,ys)}async restoreUnstagedChanges(t){ar("Restoring unstaged changes...");const e=this.getHiddenFilepath(pr);try{await this.execGit(["apply",...dr,e])}catch(s){ar("Error while restoring changes:"),ar(s),ar("Retrying with 3-way merge");try{await this.execGit(["apply",...dr,"--3way",e])}catch(e){ar("Error while restoring unstaged changes using 3-way merge:"),ar(e),fr(new Error("Unstaged changes could not be restored due to a merge conflict!"),t,ks)}}}async restoreOriginalState(t){try{ar("Restoring original state..."),await this.execGit(["reset","--hard","HEAD"]),await this.execGit(["stash","apply","--quiet","--index",await this.getBackupStash(t)]),await this.restoreMergeStatus(t),await Promise.all(this.deletedFiles.map((t=>nr(t)))),await nr(this.getHiddenFilepath(pr)),ar("Done restoring original state!")}catch(e){fr(e,t,_s)}}async cleanup(t){try{ar("Dropping backup stash..."),await this.execGit(["stash","drop","--quiet",await this.getBackupStash(t)]),ar("Done dropping backup stash!")}catch(e){fr(e,t)}}}const mr=r("lint-staged:groupFilesByConfig"),yr=r("lint-staged:resolveGitRepo"),Er=["package.json","package.yaml","package.yml",".lintstagedrc",".lintstagedrc.json",".lintstagedrc.yaml",".lintstagedrc.yml",".lintstagedrc.mjs",".lintstagedrc.mts",".lintstagedrc.js",".lintstagedrc.ts",".lintstagedrc.cjs",".lintstagedrc.cts","lint-staged.config.mjs","lint-staged.config.mts","lint-staged.config.js","lint-staged.config.ts","lint-staged.config.cjs","lint-staged.config.cts"],br=async()=>{},Rr=/(?<![\\$])({)(?:(?!(?<!\\),|\.\.|\{|\}).)*?(?<!\\)(})/g,Ar=/{{[^}{]*}}/,wr=r("lint-staged:validateConfig"),Cr=(t,e,s)=>{try{return((t,e,s)=>{if(wr("Validating config from `%s`...",e),!t||"object"!=typeof t&&"function"!=typeof t)throw bs;if("function"==typeof t)return{"*":t};if(0===Object.entries(t).length)throw Rs;const r=[],i=Object.entries(t).reduce(((t,[e,i])=>{Array.isArray(i)?i.some((t=>"string"!=typeof t&&"function"!=typeof t))&&r.push(Ve(e,"Should be an array of strings or functions.",i)):"object"==typeof i?"string"==typeof i.title&&"function"==typeof i.task||r.push(Ve(e,"Function task should contain `title` and `task` fields, where `title` should be a string and `task` should be a function.",i)):"string"!=typeof i&&"function"!=typeof i&&r.push(Ve(e,"Should be a string, a function, an object or an array of strings and functions.",i));const n=((t,e)=>{const s=(t=>{let e=`${t}`;const s=Ar.exec(t)?.[0];if(s){const t=s.replace("{{","{").replace("}}","}");e=e.replace(s,t)}return e})((t=>{let e=`${t}`,s=null;for(;s=Rr.exec(t);){const t=s[0],r=t.replace(/{/,"").replace(/}/,"");e=e.replace(t,r)}return e})(t));var r,i;return s!==t&&e.warn((r=t,i=s,M.Ay.yellow(`${Qe} Detected incorrect braces with only single value: \`${r}\`. Reformatted as: \`${i}\`\n`))),s})(e,s);return Object.assign(t,{[n]:i})}),{});if(r.length){const t=r.join("\n\n");throw s.error(os(e,t)),new Error(t)}return wr("Validated config from `%s`:",e),wr((0,n.inspect)(t,{compact:!1})),i})(t,e,s)}catch(t){throw s.error(os(e,t)),t}},Sr=r("lint-staged:searchConfigs"),vr=["ls-files","-z","--full-name","-t"],Tr=t=>Er.includes(o.basename(t)),Or=t=>t.split("/").length,_r=(t,e)=>Or(t)>Or(e)?-1:1,kr=r("lint-staged:runAll"),xr=t=>Object.assign(new Error("lint-staged failed"),{ctx:t}),Lr=async({allowEmpty:t=!1,concurrent:e=!0,configObject:s,configPath:r,cwd:i,debug:n=!1,diff:a,diffFilter:l,maxArgLength:c,quiet:u=!1,relative:p=!1,stash:h=void 0===a,hidePartiallyStaged:d=h,verbose:f=!1},g=console)=>{kr("Running all linter scripts...");const m=!!i;i=m?o.resolve(i):process.cwd(),kr("Using working directory `%s`",i);const y=Ls({quiet:u}),{topLevelDir:E,gitConfigDir:b}=await(async(t=process.cwd())=>{try{yr("Resolving git repo from `%s`",t),yr("Unset GIT_DIR (was `%s`)",process.env.GIT_DIR),delete process.env.GIT_DIR,yr("Unset GIT_WORK_TREE (was `%s`)",process.env.GIT_WORK_TREE),delete process.env.GIT_WORK_TREE;const e=await D(["rev-parse","--show-cdup"],{cwd:t}),s=ls(o.join(t,e));yr("Resolved git repository top-level directory to be `%s`",s);const r=await(async t=>{const e=D(["rev-parse","--show-toplevel"],{cwd:t}),s=D(["rev-parse","--absolute-git-dir"],{cwd:t}),[r,i]=await Promise.all([e,s]);return o.relative(r,i)})(t),i=ls(o.join(s,r));return yr("Resolved git config directory to be `%s`",i),{topLevelDir:s,gitConfigDir:i}}catch(t){return yr("Failed to resolve git repo with error:",t),{error:t,topLevelDir:null,gitConfigDir:null}}})(i);if(!E)throw u||y.output.push(Xe),y.errors.add(Ss),xr(y);const R=await D(["log","-1"],{cwd:E}).then((()=>!0)).catch((()=>!1));y.shouldBackup=R&&h,y.shouldBackup||u||g.warn(((t,e)=>{const s=void 0!==e?"`--diff` was used":t?"`--no-stash` was used":"there\u2019s no initial commit yet";return M.Ay.yellow(`${Qe} Skipping backup because ${s}.\n`)})(R,a)),y.shouldHidePartiallyStaged=d,y.shouldHidePartiallyStaged||u||g.warn(((t,e)=>{const s=void 0!==e?"`--diff` was used":t?"`--no-hide-partially-staged` was used":"`--no-stash` was used";return M.Ay.yellow(`${Qe} Skipping hiding unstaged changes from partially staged files because ${s}.\n`)})(R&&h,a));const A=await(async({cwd:t=process.cwd(),diff:e,diffFilter:s}={})=>{try{const r=await D([...er(e,s),"--raw","-z"],{cwd:t});return r?r.slice(1).split("\0:").map(sr).flatMap((([e,s,r])=>{const[,i,,,,]=e.split(" ");if("160000"===i)return[];const n=r??s;return[ls(o.resolve(t,n))]})):[]}catch{return null}})({cwd:E,diff:a,diffFilter:l});if(!A)throw u||y.output.push(Ze),y.errors.add(ws),xr(y);if(kr("Loaded list of staged files in git:\n%O",A),0===A.length)return u||y.output.push(ts),y;const w=await(async({configObject:t,configPath:e,cwd:s=process.cwd(),topLevelDir:r=s},i)=>{if(Sr("Searching for configuration files..."),t)return Sr("Using single direct configuration object..."),{"":Cr(t,"config object",i)};if(e){Sr("Using single configuration path...");const{config:t,filepath:s}=await br();return t?{[e]:Cr(t,s,i)}:{}}const[n,a]=await Promise.all([D(vr,{cwd:r}).then(sr),D([...vr,"--others","--exclude-standard"],{cwd:r}).then(sr)]),l=[...n,...a].flatMap((t=>t.startsWith("S ")?[]:[t.replace(/^[HSMRCK?U] /,"")])).filter(Tr).map((t=>ls(o.join(r,t)))).filter((c=s,t=>t.startsWith(ls(c)))).sort(_r);var c;Sr("Found possible config files:",l);const u=l.reduce(((t,e)=>Object.assign(t,{[e]:null})),{});await Promise.all(Object.keys(u).map((t=>br().then((({config:e,filepath:s})=>{e&&(t!==s&&Sr('Config file "%s" resolved to "%s"',t,s),u[t]=Cr(e,s,i))})))));const p=Object.entries(u).filter((([,t])=>!!t)).reduce(((t,[e,s])=>Object.assign(t,{[e]:s})),{});if(!Object.keys(p).length){Sr('Could not find config files inside "%s"',s);const{config:t,filepath:e}=await br();t?(Sr('Found parent configuration file from "%s"',e),p[e]=Cr(t,e,i)):Sr('Could not find parent configuration files from "%s"',s)}return Sr("Found %d config files",Object.keys(p).length),p})({configObject:s,configPath:r,cwd:i,topLevelDir:E},g),C=Object.keys(w).length;if(0===C)throw y.errors.add(Es),xr(y);const S=await(async({configs:t,files:e,singleConfigMode:s})=>{mr("Grouping %d files by %d configurations",e.length,Object.keys(t).length);const r=new Set(e),i={};for(const[n,a]of Object.entries(t)){if(s){i[n]={config:a,files:e};break}const t=o.normalize(o.dirname(n)),l=e=>{const s=o.relative(t,e);return s&&!s.startsWith("..")&&!o.isAbsolute(s)},c=Object.keys(a).some((t=>t.startsWith(".."))),u=new Set(c?r:void 0);c||r.forEach((t=>{l(t)&&u.add(t)})),u.forEach((t=>{r.delete(t)})),i[n]={config:a,files:Array.from(u)}}return i})({configs:w,files:A,singleConfigMode:s||void 0!==r}),v=C>1;let T=!1;const O={ctx:y,exitOnError:!1,registerSignalListeners:!1,...Zs({debug:n,quiet:u},g)};let _=0;const k=[],x=new Set;for(const[t,{config:s,files:r}]of Object.entries(S)){const n=t?ls(o.relative(i,t)):"Config object",a=us({baseDir:E,files:r,maxArgLength:c,relative:p}),l=v&&!m?o.dirname(t):i,u=a.length;u>1&&kr("Chunked staged files from `%s` into %d part",t,u);for(const[t,r]of a.entries()){const i=await Promise.all(ds({config:s,cwd:l,files:r,relative:p}).map((t=>{return(e=t.commands,"object"!=typeof e||Array.isArray(e)?tr({commands:t.commands,cwd:l,files:t.fileList,topLevelDir:E,verbose:f}):Ys(t.commands,r)).then((e=>{t.fileList.forEach((t=>{const e=o.isAbsolute(t)?t:ls(o.join(l,t));x.add(e)})),T=T||e.some((t=>"git add"===t.command));const s=t.fileList.length;return{title:`${t.pattern}${M.Ay.dim(` \u2014 ${s} ${1===s?"file":"files"}`)}`,task:async(t,s)=>s.newListr(e,{concurrent:!1,exitOnError:!0}),skip:()=>0===s&&`${t.pattern}${M.Ay.dim(" \u2014 no files")}`}}));var e})));_+=i.length,k.push({title:`${n}${M.Ay.dim(` \u2014 ${r.length} ${r.length>1?"files":"file"}`)}`+(u>1?M.Ay.dim(` (chunk ${t+1}/${u})...`):""),task:(t,s)=>s.newListr(i,{concurrent:e,exitOnError:!0}),skip:()=>y.errors.has(Cs)?"Skipped because of previous git error.":!!i.every((t=>t.skip()))&&`${n}${M.Ay.dim(" \u2014 no tasks to run")}`})}}if(T&&!u&&g.warn(ss),k.every((t=>t.skip())))return u||y.output.push(es),y;const L=us({baseDir:i,files:Array.from(x),maxArgLength:c,relative:!1}),P=new gr({allowEmpty:t,gitConfigDir:b,topLevelDir:E,matchedFileChunks:L,diff:a,diffFilter:l}),$=new Ye([{title:y.shouldBackup?"Backing up original state...":"Preparing lint-staged...",task:(t,e)=>P.prepare(t,e)},{title:"Hiding unstaged changes to partially staged files...",task:t=>P.hideUnstagedChanges(t),enabled:Ps},{title:`Running tasks for ${a?"changed":"staged"} files...`,task:(t,s)=>s.newListr(k,{concurrent:e}),skip:()=>k.every((t=>t.skip()))},{title:"Applying modifications from tasks...",task:t=>P.applyModifications(t),skip:$s},{title:"Restoring unstaged changes to partially staged files...",task:t=>P.restoreUnstagedChanges(t),enabled:Ps,skip:Is},{title:"Reverting to original state because of errors...",task:t=>P.restoreOriginalState(t),enabled:Hs,skip:Bs},{title:"Cleaning up temporary files...",task:t=>P.cleanup(t),enabled:Fs,skip:Ds}],O);if(kr("Set max event listeners to the number of tasks: %i",_),y.events.setMaxListeners(_),await $.run(),y.errors.size>0)throw xr(y);return y};var Pr=s(3024);const $r=r("lint-staged:validateOptions"),Ir=r("lint-staged"),Hr=()=>{switch(process.platform){case"darwin":return 262144;case"win32":return 8191;default:return 131072}},Br=async({allowEmpty:t=!1,concurrent:e=!0,config:i,configPath:n,cwd:a,debug:l=!1,diff:c,diffFilter:u,maxArgLength:p=Hr()/2,quiet:d=!1,relative:f=!1,stash:g=void 0===c,hidePartiallyStaged:m=g,verbose:y=!1}={},E=console)=>{l&&(r.enable("lint-staged*"),Ir("Running `lint-staged@%s` on Node.js %s (%s)",await(async()=>JSON.parse(await h.readFile(new URL(s(8729),s.b))).version)(),process.version,process.platform));const b=await D(["version","--build-options"],{cwd:a});Ir("%s",b);const R={allowEmpty:t,concurrent:e,configObject:i,configPath:n,cwd:a,debug:l,diff:c,diffFilter:u,maxArgLength:p,quiet:d,relative:f,stash:g,hidePartiallyStaged:m,verbose:y};await(async(t={},e)=>{if($r("Validating options..."),"string"==typeof t.cwd)try{const e=o.resolve(t.cwd);await h.access(e,Pr.constants.F_OK)}catch(i){throw $r("Failed to validate options: %o",t),e.error((s=t.cwd,r=i.message,`${M.Ay.redBright(`${qe} Validation Error:`)}\n\n Invalid value for option '${M.Ay.bold("cwd")}': ${M.Ay.bold(s)}\n\n ${r}\n\nSee https://github.com/okonet/lint-staged#command-line-flags`)),Ts}var s,r;$r("Validated options: %o",t)})(R,E),Ir("Unset GIT_LITERAL_PATHSPECS (was `%s`)",process.env.GIT_LITERAL_PATHSPECS),delete process.env.GIT_LITERAL_PATHSPECS;try{const t=await Lr(R,E);return Ir("Tasks were executed successfully!"),as(t,E),!0}catch(t){if(t?.ctx?.errors){const{ctx:e}=t;return e.errors.has(Es)?E.error(Je):e.errors.has(ys)?E.warn(ns):!e.errors.has(Cs)&&!Ds(e)||e.errors.has(As)||(E.error(is),e.shouldBackup&&E.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")),as(e,E),!1}throw t}}},9288:(t,e,s)=>{const r=s(2411),i=s(303),n=s(1811),o=(t="",e="",s=!1)=>{const r=[];if(t=[].concat(t),!(e=[].concat(e)).length)return t;if(!t.length)return s?n.flatten(e).map((t=>`{${t}}`)):e;for(const i of t)if(Array.isArray(i))for(const t of i)r.push(o(t,e,s));else for(let t of e)!0===s&&"string"==typeof t&&(t=`{${t}}`),r.push(Array.isArray(t)?o(i,t,s):i+t);return n.flatten(r)};t.exports=(t,e={})=>{const s=void 0===e.rangeLimit?1e3:e.rangeLimit,a=(t,l={})=>{t.queue=[];let c=l,u=l.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,u=c.queue;if(t.invalid||t.dollar)return void u.push(o(u.pop(),i(t,e)));if("brace"===t.type&&!0!==t.invalid&&2===t.nodes.length)return void u.push(o(u.pop(),["{}"]));if(t.nodes&&t.ranges>0){const a=n.reduce(t.nodes);if(n.exceedsLimit(...a,e.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let l=r(...a,e);return 0===l.length&&(l=i(t,e)),u.push(o(u.pop(),l)),void(t.nodes=[])}const p=n.encloseBrace(t);let h=t.queue,d=t;for(;"brace"!==d.type&&"root"!==d.type&&d.parent;)d=d.parent,h=d.queue;for(let e=0;e<t.nodes.length;e++){const s=t.nodes[e];"comma"!==s.type||"brace"!==t.type?"close"!==s.type?s.value&&"open"!==s.type?h.push(o(h.pop(),s.value)):s.nodes&&a(s,t):u.push(o(u.pop(),h,p)):(1===e&&h.push(""),h.push(""))}return h};return n.flatten(a(t))}},9565:(t,e,s)=>{t.exports=function(t){function e(t){let s,i,n,o=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),n=i-(s||i);r.diff=n,r.prev=s,r.curr=i,s=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((s,i)=>{if("%%"===s)return"%";o++;const n=e.formatters[i];if("function"==typeof n){const e=t[o];s=n.call(r,e),t.splice(o,1),o--}return s})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==e.namespaces&&(i=e.namespaces,n=e.enabled(t)),n),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,s){const r=e(this.namespace+(void 0===s?":":s)+t);return r.log=this.log,r}function i(t,e){let s=0,r=0,i=-1,n=0;for(;s<t.length;)if(r<e.length&&(e[r]===t[s]||"*"===e[r]))"*"===e[r]?(i=r,n=s,r++):(s++,r++);else{if(-1===i)return!1;r=i+1,n++,s=n}for(;r<e.length&&"*"===e[r];)r++;return r===e.length}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names,...e.skips.map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){e.save(t),e.namespaces=t,e.names=[],e.skips=[];const s=("string"==typeof t?t:"").trim().replace(" ",",").split(",").filter(Boolean);for(const t of s)"-"===t[0]?e.skips.push(t.slice(1)):e.names.push(t)},e.enabled=function(t){for(const s of e.skips)if(i(t,s))return!1;for(const s of e.names)if(i(t,s))return!0;return!1},e.humanize=s(3866),e.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(t).forEach((s=>{e[s]=t[s]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let s=0;for(let e=0;e<t.length;e++)s=(s<<5)-s+t.charCodeAt(e),s|=0;return e.colors[Math.abs(s)%e.colors.length]},e.enable(e.load()),e}},9789:t=>{t.exports=function(t){return"number"==typeof t?t-t==0:"string"==typeof t&&""!==t.trim()&&(Number.isFinite?Number.isFinite(+t):isFinite(+t))}}};