@nice-move/cli 0.11.15 → 0.11.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/216.mjs +1 -1
- package/dist/598.mjs +1 -0
- package/dist/799.mjs +1 -1
- package/dist/909.mjs +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/cmd/git.mjs +1 -1
- package/dist/cmd/lint.mjs +1 -1
- package/package.json +4 -4
- package/dist/190.mjs +0 -1
- package/dist/564.mjs +0 -1
- package/dist/744.mjs +0 -1
package/dist/190.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const id=190;export const ids=[190];export const modules={4078:(e,t,s)=>{const n=s(303),r=s(5111),i=s(9288),o=s(3585),a=(e,t={})=>{let s=[];if(Array.isArray(e))for(const n of e){const e=a.create(n,t);Array.isArray(e)?s.push(...e):s.push(e)}else s=[].concat(a.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(s=[...new Set(s)]),s};a.parse=(e,t={})=>o(e,t),a.stringify=(e,t={})=>n("string"==typeof e?a.parse(e,t):e,t),a.compile=(e,t={})=>("string"==typeof e&&(e=a.parse(e,t)),r(e,t)),a.expand=(e,t={})=>{"string"==typeof e&&(e=a.parse(e,t));let s=i(e,t);return!0===t.noempty&&(s=s.filter(Boolean)),!0===t.nodupes&&(s=[...new Set(s)]),s},a.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?a.compile(e,t):a.expand(e,t),e.exports=a},5111:(e,t,s)=>{const n=s(2411),r=s(1811);e.exports=(e,t={})=>{const s=(e,i={})=>{const o=r.isInvalidBrace(i),a=!0===e.invalid&&!0===t.escapeInvalid,c=!0===o||!0===a,l=!0===t.escapeInvalid?"\\":"";let u="";if(!0===e.isOpen)return l+e.value;if(!0===e.isClose)return console.log("node.isClose",l,e.value),l+e.value;if("open"===e.type)return c?l+e.value:"(";if("close"===e.type)return c?l+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":c?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){const s=r.reduce(e.nodes),i=n(...s,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return s.length>1&&i.length>1?`(${i})`:i}if(e.nodes)for(const t of e.nodes)u+=s(t,e);return u};return s(e)}},803:e=>{e.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:"\xa0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},9288:(e,t,s)=>{const n=s(2411),r=s(303),i=s(1811),o=(e="",t="",s=!1)=>{const n=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return s?i.flatten(t).map((e=>`{${e}}`)):t;for(const r of e)if(Array.isArray(r))for(const e of r)n.push(o(e,t,s));else for(let e of t)!0===s&&"string"==typeof e&&(e=`{${e}}`),n.push(Array.isArray(e)?o(r,e,s):r+e);return i.flatten(n)};e.exports=(e,t={})=>{const s=void 0===t.rangeLimit?1e3:t.rangeLimit,a=(e,c={})=>{e.queue=[];let l=c,u=c.queue;for(;"brace"!==l.type&&"root"!==l.type&&l.parent;)l=l.parent,u=l.queue;if(e.invalid||e.dollar)return void u.push(o(u.pop(),r(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void u.push(o(u.pop(),["{}"]));if(e.nodes&&e.ranges>0){const a=i.reduce(e.nodes);if(i.exceedsLimit(...a,t.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=n(...a,t);return 0===c.length&&(c=r(e,t)),u.push(o(u.pop(),c)),void(e.nodes=[])}const p=i.encloseBrace(e);let f=e.queue,h=e;for(;"brace"!==h.type&&"root"!==h.type&&h.parent;)h=h.parent,f=h.queue;for(let t=0;t<e.nodes.length;t++){const s=e.nodes[t];"comma"!==s.type||"brace"!==e.type?"close"!==s.type?s.value&&"open"!==s.type?f.push(o(f.pop(),s.value)):s.nodes&&a(s,e):u.push(o(u.pop(),f,p)):(1===t&&f.push(""),f.push(""))}return f};return i.flatten(a(e))}},3585:(e,t,s)=>{const n=s(303),{MAX_LENGTH:r,CHAR_BACKSLASH:i,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_LEFT_PARENTHESES:l,CHAR_RIGHT_PARENTHESES:u,CHAR_LEFT_CURLY_BRACE:p,CHAR_RIGHT_CURLY_BRACE:f,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:m,CHAR_SINGLE_QUOTE:g,CHAR_NO_BREAK_SPACE:y,CHAR_ZERO_WIDTH_NOBREAK_SPACE:b}=s(803);e.exports=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");const s=t||{},w="number"==typeof s.maxLength?Math.min(r,s.maxLength):r;if(e.length>w)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${w})`);const E={type:"root",input:e,nodes:[]},S=[E];let v=E,A=E,k=0;const C=e.length;let O,T=0,x=0;const R=()=>e[T++],L=e=>{if("text"===e.type&&"dot"===A.type&&(A.type="text"),!A||"text"!==A.type||"text"!==e.type)return v.nodes.push(e),e.parent=v,e.prev=A,A=e,e;A.value+=e.value};for(L({type:"bos"});T<C;)if(v=S[S.length-1],O=R(),O!==b&&O!==y)if(O!==i)if(O!==d)if(O!==h)if(O!==l)if(O!==u)if(O!==m&&O!==g&&O!==o)if(O!==p)if(O!==f)if(O===a&&x>0){if(v.ranges>0){v.ranges=0;const e=v.nodes.shift();v.nodes=[e,{type:"text",value:n(v)}]}L({type:"comma",value:O}),v.commas++}else if(O===c&&x>0&&0===v.commas){const e=v.nodes;if(0===x||0===e.length){L({type:"text",value:O});continue}if("dot"===A.type){if(v.range=[],A.value+=O,A.type="range",3!==v.nodes.length&&5!==v.nodes.length){v.invalid=!0,v.ranges=0,A.type="text";continue}v.ranges++,v.args=[];continue}if("range"===A.type){e.pop();const t=e[e.length-1];t.value+=A.value+O,A=t,v.ranges--;continue}L({type:"dot",value:O})}else L({type:"text",value:O});else{if("brace"!==v.type){L({type:"text",value:O});continue}const e="close";v=S.pop(),v.close=!0,L({type:e,value:O}),x--,v=S[S.length-1]}else{x++;const e=A.value&&"$"===A.value.slice(-1)||!0===v.dollar;v=L({type:"brace",open:!0,close:!1,dollar:e,depth:x,commas:0,ranges:0,nodes:[]}),S.push(v),L({type:"open",value:O})}else{const e=O;let s;for(!0!==t.keepQuotes&&(O="");T<C&&(s=R());)if(s!==i){if(s===e){!0===t.keepQuotes&&(O+=s);break}O+=s}else O+=s+R();L({type:"text",value:O})}else{if("paren"!==v.type){L({type:"text",value:O});continue}v=S.pop(),L({type:"text",value:O}),v=S[S.length-1]}else v=L({type:"paren",nodes:[]}),S.push(v),L({type:"text",value:O});else{let e;for(k++;T<C&&(e=R());)if(O+=e,e!==h)if(e!==i){if(e===d&&(k--,0===k))break}else O+=R();else k++;L({type:"text",value:O})}else L({type:"text",value:"\\"+O});else L({type:"text",value:(t.keepEscaping?O:"")+R()});do{if(v=S.pop(),"root"!==v.type){v.nodes.forEach((e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)}));const e=S[S.length-1],t=e.nodes.indexOf(v);e.nodes.splice(t,1,...v.nodes)}}while(S.length>0);return L({type:"eos"}),E}},303:(e,t,s)=>{const n=s(1811);e.exports=(e,t={})=>{const s=(e,r={})=>{const i=t.escapeInvalid&&n.isInvalidBrace(r),o=!0===e.invalid&&!0===t.escapeInvalid;let a="";if(e.value)return(i||o)&&n.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(const t of e.nodes)a+=s(t);return a};return s(e)}},1811:(e,t)=>{t.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),t.find=(e,t)=>e.nodes.find((e=>e.type===t)),t.exceedsLimit=(e,s,n=1,r)=>!1!==r&&!(!t.isInteger(e)||!t.isInteger(s))&&(Number(s)-Number(e))/Number(n)>=r,t.escapeNode=(e,t=0,s)=>{const n=e.nodes[t];n&&(s&&n.type===s||"open"===n.type||"close"===n.type)&&!0!==n.escaped&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>!("brace"!==e.type||e.commas>>0+e.ranges||(e.invalid=!0,0)),t.isInvalidBrace=e=>!("brace"!==e.type||!0!==e.invalid&&!e.dollar&&(e.commas>>0+e.ranges&&!0===e.open&&!0===e.close||(e.invalid=!0,0))),t.isOpenOrClose=e=>"open"===e.type||"close"===e.type||!0===e.open||!0===e.close,t.reduce=e=>e.reduce(((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e)),[]),t.flatten=(...e)=>{const t=[],s=e=>{for(let n=0;n<e.length;n++){const r=e[n];Array.isArray(r)?s(r):void 0!==r&&t.push(r)}return t};return s(e),t}},526:(e,t,s)=>{const n=s(5317),r=s(4705),i=s(2369);function o(e,t,s){const o=r(e,t,s),a=n.spawn(o.command,o.args,o.options);return i.hookChildProcess(a,o),a}e.exports=o,e.exports.spawn=o,e.exports.sync=function(e,t,s){const o=r(e,t,s),a=n.spawnSync(o.command,o.args,o.options);return a.error=a.error||i.verifyENOENTSync(a.status,o),a},e.exports._parse=r,e.exports._enoent=i},2369:e=>{const t="win32"===process.platform;function s(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function n(e,n){return t&&1===e&&!n.file?s(n.original,"spawn"):null}e.exports={hookChildProcess:function(e,s){if(!t)return;const r=e.emit;e.emit=function(t,i){if("exit"===t){const t=n(i,s);if(t)return r.call(e,"error",t)}return r.apply(e,arguments)}},verifyENOENT:n,verifyENOENTSync:function(e,n){return t&&1===e&&!n.file?s(n.original,"spawnSync"):null},notFoundError:s}},4705:(e,t,s)=>{const n=s(6928),r=s(6694),i=s(1192),o=s(3179),a="win32"===process.platform,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,s){t&&!Array.isArray(t)&&(s=t,t=null);const u={command:e,args:t=t?t.slice(0):[],options:s=Object.assign({},s),file:void 0,original:{command:e,args:t}};return s.shell?u:function(e){if(!a)return e;const t=function(e){e.file=r(e);const t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,r(e)):e.file}(e),s=!c.test(t);if(e.options.forceShell||s){const s=l.test(t);e.command=n.normalize(e.command),e.command=i.command(e.command),e.args=e.args.map((e=>i.argument(e,s)));const r=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${r}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(u)}},1192:e=>{const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,s){return e=(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(t,"^$1"),s&&(e=e.replace(t,"^$1")),e}},3179:(e,t,s)=>{const n=s(9896),r=s(600);e.exports=function(e){const t=Buffer.alloc(150);let s;try{s=n.openSync(e,"r"),n.readSync(s,t,0,150,0),n.closeSync(s)}catch(e){}return r(t.toString())}},6694:(e,t,s)=>{const n=s(6928),r=s(1905),i=s(9695);function o(e,t){const s=e.options.env||process.env,o=process.cwd(),a=null!=e.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}let l;try{l=r.sync(e.command,{path:s[i({env:s})],pathExt:t?n.delimiter:void 0})}catch(e){}finally{c&&process.chdir(o)}return l&&(l=n.resolve(a?e.options.cwd:"",l)),l}e.exports=function(e){return o(e)||o(e,!0)}},7214:(e,t,s)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;t.splice(1,0,s,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(r=n))})),t.splice(r,0,s)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=s(1)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},1:(e,t,s)=>{e.exports=function(e){function t(e){let s,r,i,o=null;function a(...e){if(!a.enabled)return;const n=a,r=Number(new Date),i=r-(s||r);n.diff=i,n.prev=s,n.curr=r,s=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((s,r)=>{if("%%"===s)return"%";o++;const i=t.formatters[r];if("function"==typeof i){const t=e[o];s=i.call(n,t),e.splice(o,1),o--}return s})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==t.namespaces&&(r=t.namespaces,i=t.enabled(e)),i),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,s){const n=t(this.namespace+(void 0===s?":":s)+e);return n.log=this.log,n}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let s;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(s=0;s<r;s++)n[s]&&("-"===(e=n[s].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let s,n;for(s=0,n=t.skips.length;s<n;s++)if(t.skips[s].test(e))return!1;for(s=0,n=t.names.length;s<n;s++)if(t.names[s].test(e))return!0;return!1},t.humanize=s(3866),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((s=>{t[s]=e[s]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let s=0;for(let t=0;t<e.length;t++)s=(s<<5)-s+e.charCodeAt(t),s|=0;return t.colors[Math.abs(s)%t.colors.length]},t.enable(t.load()),t}},8894:(e,t,s)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=s(7214):e.exports=s(6804)},6804:(e,t,s)=>{const n=s(2018),r=s(9023);t.init=function(e){e.inspectOpts={};const s=Object.keys(t.inspectOpts);for(let n=0;n<s.length;n++)e.inspectOpts[s[n]]=t.inspectOpts[s[n]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(s){const{namespace:n,useColors:r}=this;if(r){const t=this.color,r="\x1b[3"+(t<8?t:"8;5;"+t),i=` ${r};1m${n} \x1b[0m`;s[0]=i+s[0].split("\n").join("\n"+i),s.push(r+"m+"+e.exports.humanize(this.diff)+"\x1b[0m")}else s[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+s[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=s(1754);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const s=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[s]=n,e}),{}),e.exports=s(1)(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}},6296:e=>{var t=Object.prototype.hasOwnProperty,s="~";function n(){}function r(e,t,s){this.fn=e,this.context=t,this.once=s||!1}function i(e,t,n,i,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new r(n,i||e,o),c=s?s+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(s=!1)),a.prototype.eventNames=function(){var e,n,r=[];if(0===this._eventsCount)return r;for(n in e=this._events)t.call(e,n)&&r.push(s?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=s?s+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r<i;r++)o[r]=n[r].fn;return o},a.prototype.listenerCount=function(e){var t=s?s+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,r,i,o){var a=s?s+e:e;if(!this._events[a])return!1;var c,l,u=this._events[a],p=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),p){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,r),!0;case 5:return u.fn.call(u.context,t,n,r,i),!0;case 6:return u.fn.call(u.context,t,n,r,i,o),!0}for(l=1,c=new Array(p-1);l<p;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var f,h=u.length;for(l=0;l<h;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),p){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,n);break;case 4:u[l].fn.call(u[l].context,t,n,r);break;default:if(!c)for(f=1,c=new Array(p-1);f<p;f++)c[f-1]=arguments[f];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(e,t,s){return i(this,e,t,s,!1)},a.prototype.once=function(e,t,s){return i(this,e,t,s,!0)},a.prototype.removeListener=function(e,t,n,r){var i=s?s+e:e;if(!this._events[i])return this;if(!t)return o(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||r&&!a.once||n&&a.context!==n||o(this,i);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||r&&!a[c].once||n&&a[c].context!==n)&&l.push(a[c]);l.length?this._events[i]=1===l.length?l[0]:l:o(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=s?s+e:e,this._events[t]&&o(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=s,a.EventEmitter=a,e.exports=a},2411:(e,t,s)=>{const n=s(9023),r=s(4710),i=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),o=e=>"number"==typeof e||"string"==typeof e&&""!==e,a=e=>Number.isInteger(+e),c=e=>{let t=`${e}`,s=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++s];);return s>0},l=(e,t,s)=>{if(t>0){let s="-"===e[0]?"-":"";s&&(e=e.slice(1)),e=s+e.padStart(s?t-1:t,"0")}return!1===s?String(e):e},u=(e,t)=>{let s="-"===e[0]?"-":"";for(s&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return s?"-"+e:e},p=(e,t,s,n)=>{if(s)return r(e,t,{wrap:!1,...n});let i=String.fromCharCode(e);return e===t?i:`[${i}-${String.fromCharCode(t)}]`},f=(e,t,s)=>{if(Array.isArray(e)){let t=!0===s.wrap,n=s.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return r(e,t,s)},h=(...e)=>new RangeError("Invalid range arguments: "+n.inspect(...e)),d=(e,t,s)=>{if(!0===s.strictRanges)throw h([e,t]);return[]},m=(e,t,s,n={})=>{if(null==t&&o(e))return[e];if(!o(e)||!o(t))return d(e,t,n);if("function"==typeof s)return m(e,t,1,{transform:s});if(i(s))return m(e,t,0,s);let r={...n};return!0===r.capture&&(r.wrap=!0),s=s||r.step||1,a(s)?a(e)&&a(t)?((e,t,s=1,n={})=>{let r=Number(e),i=Number(t);if(!Number.isInteger(r)||!Number.isInteger(i)){if(!0===n.strictRanges)throw h([e,t]);return[]}0===r&&(r=0),0===i&&(i=0);let o=r>i,a=String(e),d=String(t),m=String(s);s=Math.max(Math.abs(s),1);let g=c(a)||c(d)||c(m),y=g?Math.max(a.length,d.length,m.length):0,b=!1===g&&!1===((e,t,s)=>"string"==typeof e||"string"==typeof t||!0===s.stringify)(e,t,n),w=n.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(n.toRegex&&1===s)return p(u(e,y),u(t,y),!0,n);let E={negatives:[],positives:[]},S=[],v=0;for(;o?r>=i:r<=i;)!0===n.toRegex&&s>1?E[(A=r)<0?"negatives":"positives"].push(Math.abs(A)):S.push(l(w(r,v),y,b)),r=o?r-s:r+s,v++;var A;return!0===n.toRegex?s>1?((e,t,s)=>{e.negatives.sort(((e,t)=>e<t?-1:e>t?1:0)),e.positives.sort(((e,t)=>e<t?-1:e>t?1:0));let n,r=t.capture?"":"?:",i="",o="";return e.positives.length&&(i=e.positives.map((e=>u(String(e),s))).join("|")),e.negatives.length&&(o=`-(${r}${e.negatives.map((e=>u(String(e),s))).join("|")})`),n=i&&o?`${i}|${o}`:i||o,t.wrap?`(${r}${n})`:n})(E,n,y):f(S,null,{wrap:!1,...n}):S})(e,t,s,r):((e,t,s=1,n={})=>{if(!a(e)&&e.length>1||!a(t)&&t.length>1)return d(e,t,n);let r=n.transform||(e=>String.fromCharCode(e)),i=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),c=i>o,l=Math.min(i,o),u=Math.max(i,o);if(n.toRegex&&1===s)return p(l,u,!1,n);let h=[],m=0;for(;c?i>=o:i<=o;)h.push(r(i,m)),i=c?i-s:i+s,m++;return!0===n.toRegex?f(h,null,{wrap:!1,options:n}):h})(e,t,Math.max(Math.abs(s),1),r):null==s||i(s)?m(e,t,1,s):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(s,r)};e.exports=m},4891:e=>{e.exports=(e,t)=>{t=t||process.argv;const s=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(s+e),r=t.indexOf("--");return-1!==n&&(-1===r||n<r)}},9789:e=>{e.exports=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}},9344:(e,t,s)=>{var n;function r(e,t,s){if("function"==typeof t&&(s=t,t={}),!s){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(s,n){r(e,t||{},(function(e,t){e?n(e):s(t)}))}))}n(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),s(e,n)}))}s(9896),n="win32"===process.platform||global.TESTING_WINDOWS?s(8541):s(709),e.exports=r,r.sync=function(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},709:(e,t,s)=>{e.exports=r,r.sync=function(e,t){return i(n.statSync(e),t)};var n=s(9896);function r(e,t,s){n.stat(e,(function(e,n){s(e,!e&&i(n,t))}))}function i(e,t){return e.isFile()&&function(e,t){var s=e.mode,n=e.uid,r=e.gid,i=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),o=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8);return s&parseInt("001",8)||s&c&&r===o||s&a&&n===i||s&(a|c)&&0===i}(e,t)}},8541:(e,t,s)=>{e.exports=i,i.sync=function(e,t){return r(n.statSync(e),e,t)};var n=s(9896);function r(e,t,s){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var s=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!s)return!0;if(-1!==(s=s.split(";")).indexOf(""))return!0;for(var n=0;n<s.length;n++){var r=s[n].toLowerCase();if(r&&e.substr(-r.length).toLowerCase()===r)return!0}return!1}(t,s)}function i(e,t,s){n.stat(e,(function(n,i){s(n,!n&&r(i,e,t))}))}},1404:(e,t,s)=>{const{PassThrough:n}=s(2203);e.exports=function(){var e=[],t=new n({objectMode:!0});return t.setMaxListeners(0),t.add=s,t.isEmpty=function(){return 0==e.length},t.on("unpipe",r),Array.prototype.slice.call(arguments).forEach(s),t;function s(n){return Array.isArray(n)?(n.forEach(s),this):(e.push(n),n.once("end",r.bind(null,n)),n.once("error",t.emit.bind(t,"error")),n.pipe(t,{end:!1}),this)}function r(s){!(e=e.filter((function(e){return e!==s}))).length&&t.readable&&t.end()}}},7498:(e,t,s)=>{const n=s(9023),r=s(4078),i=s(5562),o=s(6927),a=e=>""===e||"./"===e,c=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},l=(e,t,s)=>{t=[].concat(t),e=[].concat(e);let n=new Set,r=new Set,o=new Set,a=0,c=e=>{o.add(e.output),s&&s.onResult&&s.onResult(e)};for(let o=0;o<t.length;o++){let l=i(String(t[o]),{...s,onResult:c},!0),u=l.state.negated||l.state.negatedExtglob;u&&a++;for(let t of e){let e=l(t,!0);(u?!e.isMatch:e.isMatch)&&(u?n.add(e.output):(n.delete(e.output),r.add(e.output)))}}let l=(a===t.length?[...o]:[...r]).filter((e=>!n.has(e)));if(s&&0===l.length){if(!0===s.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===s.nonull||!0===s.nullglob)return s.unescape?t.map((e=>e.replace(/\\/g,""))):t}return l};l.match=l,l.matcher=(e,t)=>i(e,t),l.any=l.isMatch=(e,t,s)=>i(t,s)(e),l.not=(e,t,s={})=>{t=[].concat(t).map(String);let n=new Set,r=[],i=new Set(l(e,t,{...s,onResult:e=>{s.onResult&&s.onResult(e),r.push(e.output)}}));for(let e of r)i.has(e)||n.add(e);return[...n]},l.contains=(e,t,s)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${n.inspect(e)}"`);if(Array.isArray(t))return t.some((t=>l.contains(e,t,s)));if("string"==typeof t){if(a(e)||a(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return l.isMatch(e,t,{...s,contains:!0})},l.matchKeys=(e,t,s)=>{if(!o.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=l(Object.keys(e),t,s),r={};for(let t of n)r[t]=e[t];return r},l.some=(e,t,s)=>{let n=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),s);if(n.some((e=>t(e))))return!0}return!1},l.every=(e,t,s)=>{let n=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),s);if(!n.every((e=>t(e))))return!1}return!0},l.all=(e,t,s)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${n.inspect(e)}"`);return[].concat(t).every((t=>i(t,s)(e)))},l.capture=(e,t,s)=>{let n=o.isWindows(s),r=i.makeRe(String(e),{...s,capture:!0}).exec(n?o.toPosixSlashes(t):t);if(r)return r.slice(1).map((e=>void 0===e?"":e))},l.makeRe=(...e)=>i.makeRe(...e),l.scan=(...e)=>i.scan(...e),l.parse=(e,t)=>{let s=[];for(let n of[].concat(e||[]))for(let e of r(String(n),t))s.push(i.parse(e,t));return s},l.braces=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return t&&!0===t.nobrace||!c(e)?[e]:r(e,t)},l.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return l.braces(e,{...t,expand:!0})},l.hasBraces=c,e.exports=l},3866:e=>{var t=1e3,s=60*t,n=60*s,r=24*n,i=7*r;function o(e,t,s,n){var r=t>=1.5*s;return Math.round(e/s)+" "+n+(r?"s":"")}e.exports=function(e,a){a=a||{};var c,l,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).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(e);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*i;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;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*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===u&&isFinite(e))return a.long?(c=e,(l=Math.abs(c))>=r?o(c,l,r,"day"):l>=n?o(c,l,n,"hour"):l>=s?o(c,l,s,"minute"):l>=t?o(c,l,t,"second"):c+" ms"):function(e){var i=Math.abs(e);return i>=r?Math.round(e/r)+"d":i>=n?Math.round(e/n)+"h":i>=s?Math.round(e/s)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9695:e=>{const t=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};e.exports=t,e.exports.default=t},5562:(e,t,s)=>{e.exports=s(8996)},4751:(e,t,s)=>{const n=s(6928),r="\\\\/",i=`[^${r}]`,o="\\.",a="\\/",c="[^/]",l=`(?:${a}|$)`,u=`(?:^|${a})`,p=`${o}{1,2}${l}`,f={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:a,ONE_CHAR:"(?=.)",QMARK:c,END_ANCHOR:l,DOTS_SLASH:p,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${u}${p})`,NO_DOT_SLASH:`(?!${o}{0,1}${l})`,NO_DOTS_SLASH:`(?!${p})`,QMARK_NO_DOT:`[^.${a}]`,STAR:`${c}*?`,START_ANCHOR:u},h={...f,SLASH_LITERAL:`[${r}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${o}{1,2}(?:[${r}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${r}])${o}{1,2}(?:[${r}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${r}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${r}]|$))`,QMARK_NO_DOT:`[^.${r}]`,START_ANCHOR:`(?:^|[${r}])`,END_ANCHOR:`(?:[${r}]|$)`};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:n.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?h:f}},5453:(e,t,s)=>{const n=s(4751),r=s(6927),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:l}=n,u=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const s=`[${e.join("-")}]`;try{new RegExp(s)}catch(t){return e.map((e=>r.escapeRegex(e))).join("..")}return s},p=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,f=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=l[e]||e;const s={...t},h="number"==typeof s.maxLength?Math.min(i,s.maxLength):i;let d=e.length;if(d>h)throw new SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${h}`);const m={type:"bos",value:"",output:s.prepend||""},g=[m],y=s.capture?"":"?:",b=r.isWindows(t),w=n.globChars(b),E=n.extglobChars(w),{DOT_LITERAL:S,PLUS_LITERAL:v,SLASH_LITERAL:A,ONE_CHAR:k,DOTS_SLASH:C,NO_DOT:O,NO_DOT_SLASH:T,NO_DOTS_SLASH:x,QMARK:R,QMARK_NO_DOT:L,STAR:_,START_ANCHOR:I}=w,N=e=>`(${y}(?:(?!${I}${e.dot?C:S}).)*?)`,P=s.dot?"":O,$=s.dot?R:L;let B=!0===s.bash?N(s):_;s.capture&&(B=`(${B})`),"boolean"==typeof s.noext&&(s.noextglob=s.noext);const M={input:e,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:g};e=r.removePrefix(e,M),d=e.length;const D=[],F=[],H=[];let j,U=m;const K=()=>M.index===d-1,G=M.peek=(t=1)=>e[M.index+t],q=M.advance=()=>e[++M.index]||"",Y=()=>e.slice(M.index+1),W=(e="",t=0)=>{M.consumed+=e,M.index+=t},V=e=>{M.output+=null!=e.output?e.output:e.value,W(e.value)},z=()=>{let e=1;for(;"!"===G()&&("("!==G(2)||"?"===G(3));)q(),M.start++,e++;return e%2!=0&&(M.negated=!0,M.start++,!0)},Q=e=>{M[e]++,H.push(e)},J=e=>{M[e]--,H.pop()},X=e=>{if("globstar"===U.type){const t=M.braces>0&&("comma"===e.type||"brace"===e.type),s=!0===e.extglob||D.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||s||(M.output=M.output.slice(0,-U.output.length),U.type="star",U.value="*",U.output=B,M.output+=U.output)}if(D.length&&"paren"!==e.type&&(D[D.length-1].inner+=e.value),(e.value||e.output)&&V(e),U&&"text"===U.type&&"text"===e.type)return U.value+=e.value,void(U.output=(U.output||"")+e.value);e.prev=U,g.push(e),U=e},Z=(e,t)=>{const n={...E[t],conditions:1,inner:""};n.prev=U,n.parens=M.parens,n.output=M.output;const r=(s.capture?"(":"")+n.open;Q("parens"),X({type:e,value:t,output:M.output?"":k}),X({type:"paren",extglob:!0,value:q(),output:r}),D.push(n)},ee=e=>{let n,r=e.close+(s.capture?")":"");if("negate"===e.type){let i=B;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(i=N(s)),(i!==B||K()||/^\)+$/.test(Y()))&&(r=e.close=`)$))${i}`),e.inner.includes("*")&&(n=Y())&&/^\.[^\\/.]+$/.test(n)){const s=f(n,{...t,fastpaths:!1}).output;r=e.close=`)${s})${i})`}"bos"===e.prev.type&&(M.negatedExtglob=!0)}X({type:"paren",extglob:!0,value:j,output:r}),J("parens")};if(!1!==s.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(c,((e,t,s,r,i,o)=>"\\"===r?(n=!0,e):"?"===r?t?t+r+(i?R.repeat(i.length):""):0===o?$+(i?R.repeat(i.length):""):R.repeat(s.length):"."===r?S.repeat(s.length):"*"===r?t?t+r+(i?B:""):B:t?e:`\\${e}`));return!0===n&&(i=!0===s.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),i===e&&!0===s.contains?(M.output=e,M):(M.output=r.wrapOutput(i,M,t),M)}for(;!K();){if(j=q(),"\0"===j)continue;if("\\"===j){const e=G();if("/"===e&&!0!==s.bash)continue;if("."===e||";"===e)continue;if(!e){j+="\\",X({type:"text",value:j});continue}const t=/^\\+/.exec(Y());let n=0;if(t&&t[0].length>2&&(n=t[0].length,M.index+=n,n%2!=0&&(j+="\\")),!0===s.unescape?j=q():j+=q(),0===M.brackets){X({type:"text",value:j});continue}}if(M.brackets>0&&("]"!==j||"["===U.value||"[^"===U.value)){if(!1!==s.posix&&":"===j){const e=U.value.slice(1);if(e.includes("[")&&(U.posix=!0,e.includes(":"))){const e=U.value.lastIndexOf("["),t=U.value.slice(0,e),s=U.value.slice(e+2),n=o[s];if(n){U.value=t+n,M.backtrack=!0,q(),m.output||1!==g.indexOf(U)||(m.output=k);continue}}}("["===j&&":"!==G()||"-"===j&&"]"===G())&&(j=`\\${j}`),"]"!==j||"["!==U.value&&"[^"!==U.value||(j=`\\${j}`),!0===s.posix&&"!"===j&&"["===U.value&&(j="^"),U.value+=j,V({value:j});continue}if(1===M.quotes&&'"'!==j){j=r.escapeRegex(j),U.value+=j,V({value:j});continue}if('"'===j){M.quotes=1===M.quotes?0:1,!0===s.keepQuotes&&X({type:"text",value:j});continue}if("("===j){Q("parens"),X({type:"paren",value:j});continue}if(")"===j){if(0===M.parens&&!0===s.strictBrackets)throw new SyntaxError(p("opening","("));const e=D[D.length-1];if(e&&M.parens===e.parens+1){ee(D.pop());continue}X({type:"paren",value:j,output:M.parens?")":"\\)"}),J("parens");continue}if("["===j){if(!0!==s.nobracket&&Y().includes("]"))Q("brackets");else{if(!0!==s.nobracket&&!0===s.strictBrackets)throw new SyntaxError(p("closing","]"));j=`\\${j}`}X({type:"bracket",value:j});continue}if("]"===j){if(!0===s.nobracket||U&&"bracket"===U.type&&1===U.value.length){X({type:"text",value:j,output:`\\${j}`});continue}if(0===M.brackets){if(!0===s.strictBrackets)throw new SyntaxError(p("opening","["));X({type:"text",value:j,output:`\\${j}`});continue}J("brackets");const e=U.value.slice(1);if(!0===U.posix||"^"!==e[0]||e.includes("/")||(j=`/${j}`),U.value+=j,V({value:j}),!1===s.literalBrackets||r.hasRegexChars(e))continue;const t=r.escapeRegex(U.value);if(M.output=M.output.slice(0,-U.value.length),!0===s.literalBrackets){M.output+=t,U.value=t;continue}U.value=`(${y}${t}|${U.value})`,M.output+=U.value;continue}if("{"===j&&!0!==s.nobrace){Q("braces");const e={type:"brace",value:j,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};F.push(e),X(e);continue}if("}"===j){const e=F[F.length-1];if(!0===s.nobrace||!e){X({type:"text",value:j,output:j});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=u(n,s),M.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const s=M.output.slice(0,e.outputIndex),n=M.tokens.slice(e.tokensIndex);e.value=e.output="\\{",j=t="\\}",M.output=s;for(const e of n)M.output+=e.output||e.value}X({type:"brace",value:j,output:t}),J("braces"),F.pop();continue}if("|"===j){D.length>0&&D[D.length-1].conditions++,X({type:"text",value:j});continue}if(","===j){let e=j;const t=F[F.length-1];t&&"braces"===H[H.length-1]&&(t.comma=!0,e="|"),X({type:"comma",value:j,output:e});continue}if("/"===j){if("dot"===U.type&&M.index===M.start+1){M.start=M.index+1,M.consumed="",M.output="",g.pop(),U=m;continue}X({type:"slash",value:j,output:A});continue}if("."===j){if(M.braces>0&&"dot"===U.type){"."===U.value&&(U.output=S);const e=F[F.length-1];U.type="dots",U.output+=j,U.value+=j,e.dots=!0;continue}if(M.braces+M.parens===0&&"bos"!==U.type&&"slash"!==U.type){X({type:"text",value:j,output:S});continue}X({type:"dot",value:j,output:S});continue}if("?"===j){if((!U||"("!==U.value)&&!0!==s.noextglob&&"("===G()&&"?"!==G(2)){Z("qmark",j);continue}if(U&&"paren"===U.type){const e=G();let t=j;if("<"===e&&!r.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===U.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(Y()))&&(t=`\\${j}`),X({type:"text",value:j,output:t});continue}if(!0!==s.dot&&("slash"===U.type||"bos"===U.type)){X({type:"qmark",value:j,output:L});continue}X({type:"qmark",value:j,output:R});continue}if("!"===j){if(!0!==s.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){Z("negate",j);continue}if(!0!==s.nonegate&&0===M.index){z();continue}}if("+"===j){if(!0!==s.noextglob&&"("===G()&&"?"!==G(2)){Z("plus",j);continue}if(U&&"("===U.value||!1===s.regex){X({type:"plus",value:j,output:v});continue}if(U&&("bracket"===U.type||"paren"===U.type||"brace"===U.type)||M.parens>0){X({type:"plus",value:j});continue}X({type:"plus",value:v});continue}if("@"===j){if(!0!==s.noextglob&&"("===G()&&"?"!==G(2)){X({type:"at",extglob:!0,value:j,output:""});continue}X({type:"text",value:j});continue}if("*"!==j){"$"!==j&&"^"!==j||(j=`\\${j}`);const e=a.exec(Y());e&&(j+=e[0],M.index+=e[0].length),X({type:"text",value:j});continue}if(U&&("globstar"===U.type||!0===U.star)){U.type="star",U.star=!0,U.value+=j,U.output=B,M.backtrack=!0,M.globstar=!0,W(j);continue}let t=Y();if(!0!==s.noextglob&&/^\([^?]/.test(t)){Z("star",j);continue}if("star"===U.type){if(!0===s.noglobstar){W(j);continue}const n=U.prev,r=n.prev,i="slash"===n.type||"bos"===n.type,o=r&&("star"===r.type||"globstar"===r.type);if(!0===s.bash&&(!i||t[0]&&"/"!==t[0])){X({type:"star",value:j,output:""});continue}const a=M.braces>0&&("comma"===n.type||"brace"===n.type),c=D.length&&("pipe"===n.type||"paren"===n.type);if(!i&&"paren"!==n.type&&!a&&!c){X({type:"star",value:j,output:""});continue}for(;"/**"===t.slice(0,3);){const s=e[M.index+4];if(s&&"/"!==s)break;t=t.slice(3),W("/**",3)}if("bos"===n.type&&K()){U.type="globstar",U.value+=j,U.output=N(s),M.output=U.output,M.globstar=!0,W(j);continue}if("slash"===n.type&&"bos"!==n.prev.type&&!o&&K()){M.output=M.output.slice(0,-(n.output+U.output).length),n.output=`(?:${n.output}`,U.type="globstar",U.output=N(s)+(s.strictSlashes?")":"|$)"),U.value+=j,M.globstar=!0,M.output+=n.output+U.output,W(j);continue}if("slash"===n.type&&"bos"!==n.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";M.output=M.output.slice(0,-(n.output+U.output).length),n.output=`(?:${n.output}`,U.type="globstar",U.output=`${N(s)}${A}|${A}${e})`,U.value+=j,M.output+=n.output+U.output,M.globstar=!0,W(j+q()),X({type:"slash",value:"/",output:""});continue}if("bos"===n.type&&"/"===t[0]){U.type="globstar",U.value+=j,U.output=`(?:^|${A}|${N(s)}${A})`,M.output=U.output,M.globstar=!0,W(j+q()),X({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-U.output.length),U.type="globstar",U.output=N(s),U.value+=j,M.output+=U.output,M.globstar=!0,W(j);continue}const n={type:"star",value:j,output:B};!0!==s.bash?!U||"bracket"!==U.type&&"paren"!==U.type||!0!==s.regex?(M.index!==M.start&&"slash"!==U.type&&"dot"!==U.type||("dot"===U.type?(M.output+=T,U.output+=T):!0===s.dot?(M.output+=x,U.output+=x):(M.output+=P,U.output+=P),"*"!==G()&&(M.output+=k,U.output+=k)),X(n)):(n.output=j,X(n)):(n.output=".*?","bos"!==U.type&&"slash"!==U.type||(n.output=P+n.output),X(n))}for(;M.brackets>0;){if(!0===s.strictBrackets)throw new SyntaxError(p("closing","]"));M.output=r.escapeLast(M.output,"["),J("brackets")}for(;M.parens>0;){if(!0===s.strictBrackets)throw new SyntaxError(p("closing",")"));M.output=r.escapeLast(M.output,"("),J("parens")}for(;M.braces>0;){if(!0===s.strictBrackets)throw new SyntaxError(p("closing","}"));M.output=r.escapeLast(M.output,"{"),J("braces")}if(!0===s.strictSlashes||"star"!==U.type&&"bracket"!==U.type||X({type:"maybe_slash",value:"",output:`${A}?`}),!0===M.backtrack){M.output="";for(const e of M.tokens)M.output+=null!=e.output?e.output:e.value,e.suffix&&(M.output+=e.suffix)}return M};f.fastpaths=(e,t)=>{const s={...t},o="number"==typeof s.maxLength?Math.min(i,s.maxLength):i,a=e.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);e=l[e]||e;const c=r.isWindows(t),{DOT_LITERAL:u,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:h,NO_DOT:d,NO_DOTS:m,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:b}=n.globChars(c),w=s.dot?m:d,E=s.dot?g:d,S=s.capture?"":"?:";let v=!0===s.bash?".*?":y;s.capture&&(v=`(${v})`);const A=e=>!0===e.noglobstar?v:`(${S}(?:(?!${b}${e.dot?h:u}).)*?)`,k=e=>{switch(e){case"*":return`${w}${f}${v}`;case".*":return`${u}${f}${v}`;case"*.*":return`${w}${v}${u}${f}${v}`;case"*/*":return`${w}${v}${p}${f}${E}${v}`;case"**":return w+A(s);case"**/*":return`(?:${w}${A(s)}${p})?${E}${f}${v}`;case"**/*.*":return`(?:${w}${A(s)}${p})?${E}${v}${u}${f}${v}`;case"**/.*":return`(?:${w}${A(s)}${p})?${u}${f}${v}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const s=k(t[1]);if(!s)return;return s+u+t[2]}}},C=r.removePrefix(e,{negated:!1,prefix:""});let O=k(C);return O&&!0!==s.strictSlashes&&(O+=`${p}?`),O},e.exports=f},8996:(e,t,s)=>{const n=s(6928),r=s(3297),i=s(5453),o=s(6927),a=s(4751),c=(e,t,s=!1)=>{if(Array.isArray(e)){const n=e.map((e=>c(e,t,s))),r=e=>{for(const t of n){const s=t(e);if(s)return s}return!1};return r}const n=(r=e)&&"object"==typeof r&&!Array.isArray(r)&&e.tokens&&e.input;var r;if(""===e||"string"!=typeof e&&!n)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},a=o.isWindows(t),l=n?c.compileRe(e,t):c.makeRe(e,t,!1,!0),u=l.state;delete l.state;let p=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};p=c(i.ignore,e,s)}const f=(s,n=!1)=>{const{isMatch:r,match:o,output:f}=c.test(s,l,t,{glob:e,posix:a}),h={glob:e,state:u,regex:l,posix:a,input:s,output:f,match:o,isMatch:r};return"function"==typeof i.onResult&&i.onResult(h),!1===r?(h.isMatch=!1,!!n&&h):p(s)?("function"==typeof i.onIgnore&&i.onIgnore(h),h.isMatch=!1,!!n&&h):("function"==typeof i.onMatch&&i.onMatch(h),!n||h)};return s&&(f.state=u),f};c.test=(e,t,s,{glob:n,posix:r}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const i=s||{},a=i.format||(r?o.toPosixSlashes:null);let l=e===n,u=l&&a?a(e):e;return!1===l&&(u=a?a(e):e,l=u===n),!1!==l&&!0!==i.capture||(l=!0===i.matchBase||!0===i.basename?c.matchBase(e,t,s,r):t.exec(u)),{isMatch:Boolean(l),match:l,output:u}},c.matchBase=(e,t,s,r=o.isWindows(s))=>(t instanceof RegExp?t:c.makeRe(t,s)).test(n.basename(e)),c.isMatch=(e,t,s)=>c(t,s)(e),c.parse=(e,t)=>Array.isArray(e)?e.map((e=>c.parse(e,t))):i(e,{...t,fastpaths:!1}),c.scan=(e,t)=>r(e,t),c.compileRe=(e,t,s=!1,n=!1)=>{if(!0===s)return e.output;const r=t||{},i=r.contains?"":"^",o=r.contains?"":"$";let a=`${i}(?:${e.output})${o}`;e&&!0===e.negated&&(a=`^(?!${a}).*$`);const l=c.toRegex(a,t);return!0===n&&(l.state=e),l},c.makeRe=(e,t={},s=!1,n=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let r={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(r.output=i.fastpaths(e,t)),r.output||(r=i(e,t)),c.compileRe(r,t,s,n)},c.toRegex=(e,t)=>{try{const s=t||{};return new RegExp(e,s.flags||(s.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},c.constants=a,e.exports=c},3297:(e,t,s)=>{const n=s(6927),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:l,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:d,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:b}=s(4751),w=e=>e===u||e===o,E=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const s=t||{},S=e.length-1,v=!0===s.parts||!0===s.scanToEnd,A=[],k=[],C=[];let O,T,x=e,R=-1,L=0,_=0,I=!1,N=!1,P=!1,$=!1,B=!1,M=!1,D=!1,F=!1,H=!1,j=!1,U=0,K={value:"",depth:0,isGlob:!1};const G=()=>R>=S,q=()=>(O=T,x.charCodeAt(++R));for(;R<S;){let e;if(T=q(),T!==o){if(!0===M||T===p){for(U++;!0!==G()&&(T=q());)if(T!==o)if(T!==p){if(!0!==M&&T===c&&(T=q())===c){if(I=K.isBrace=!0,P=K.isGlob=!0,j=!0,!0===v)continue;break}if(!0!==M&&T===a){if(I=K.isBrace=!0,P=K.isGlob=!0,j=!0,!0===v)continue;break}if(T===g&&(U--,0===U)){M=!1,I=K.isBrace=!0,j=!0;break}}else U++;else D=K.backslashes=!0,q();if(!0===v)continue;break}if(T!==u){if(!0!==s.noext&&!0==(T===d||T===i||T===r||T===m||T===l)&&x.charCodeAt(R+1)===f){if(P=K.isGlob=!0,$=K.isExtglob=!0,j=!0,T===l&&R===L&&(H=!0),!0===v){for(;!0!==G()&&(T=q());)if(T!==o){if(T===y){P=K.isGlob=!0,j=!0;break}}else D=K.backslashes=!0,T=q();continue}break}if(T===r){if(O===r&&(B=K.isGlobstar=!0),P=K.isGlob=!0,j=!0,!0===v)continue;break}if(T===m){if(P=K.isGlob=!0,j=!0,!0===v)continue;break}if(T===h){for(;!0!==G()&&(e=q());)if(e!==o){if(e===b){N=K.isBracket=!0,P=K.isGlob=!0,j=!0;break}}else D=K.backslashes=!0,q();if(!0===v)continue;break}if(!0===s.nonegate||T!==l||R!==L){if(!0!==s.noparen&&T===f){if(P=K.isGlob=!0,!0===v){for(;!0!==G()&&(T=q());)if(T!==f){if(T===y){j=!0;break}}else D=K.backslashes=!0,T=q();continue}break}if(!0===P){if(j=!0,!0===v)continue;break}}else F=K.negated=!0,L++}else{if(A.push(R),k.push(K),K={value:"",depth:0,isGlob:!1},!0===j)continue;if(O===c&&R===L+1){L+=2;continue}_=R+1}}else D=K.backslashes=!0,T=q(),T===p&&(M=!0)}!0===s.noext&&($=!1,P=!1);let Y=x,W="",V="";L>0&&(W=x.slice(0,L),x=x.slice(L),_-=L),Y&&!0===P&&_>0?(Y=x.slice(0,_),V=x.slice(_)):!0===P?(Y="",V=x):Y=x,Y&&""!==Y&&"/"!==Y&&Y!==x&&w(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),!0===s.unescape&&(V&&(V=n.removeBackslashes(V)),Y&&!0===D&&(Y=n.removeBackslashes(Y)));const z={prefix:W,input:e,start:L,base:Y,glob:V,isBrace:I,isBracket:N,isGlob:P,isExtglob:$,isGlobstar:B,negated:F,negatedExtglob:H};if(!0===s.tokens&&(z.maxDepth=0,w(T)||k.push(K),z.tokens=k),!0===s.parts||!0===s.tokens){let t;for(let n=0;n<A.length;n++){const r=t?t+1:L,i=A[n],o=e.slice(r,i);s.tokens&&(0===n&&0!==L?(k[n].isPrefix=!0,k[n].value=W):k[n].value=o,E(k[n]),z.maxDepth+=k[n].depth),0===n&&""===o||C.push(o),t=i}if(t&&t+1<e.length){const n=e.slice(t+1);C.push(n),s.tokens&&(k[k.length-1].value=n,E(k[k.length-1]),z.maxDepth+=k[k.length-1].depth)}z.slashes=A,z.parts=C}return z}},6927:(e,t,s)=>{const n=s(6928),r="win32"===process.platform,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=s(4751);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>a.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(c,"\\$1"),t.toPosixSlashes=e=>e.replace(i,"/"),t.removeBackslashes=e=>e.replace(o,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===r||"\\"===n.sep,t.escapeLast=(e,s,n)=>{const r=e.lastIndexOf(s,n);return-1===r?e:"\\"===e[r-1]?t.escapeLast(e,s,r-1):`${e.slice(0,r)}\\${e.slice(r)}`},t.removePrefix=(e,t={})=>{let s=e;return s.startsWith("./")&&(s=s.slice(2),t.prefix="./"),s},t.wrapOutput=(e,t={},s={})=>{let n=`${s.contains?"":"^"}(?:${e})${s.contains?"":"$"}`;return!0===t.negated&&(n=`(?:^(?!${n}).*$)`),n}},6454:(e,t,s)=>{String.prototype.startsWith||(String.prototype.startsWith=function(e){return this.substring(0,e.length)===e});var n=s(6179);e.exports=function(e,t,s){var r,i,o;if("function"==typeof t&&(s=t,t=void 0),"function"!=typeof s)return r=n,i=e,o=t,new Promise((function(e,t){r(i,o,(function(s,n){if(s)return t(s);e(n)}))}));n(e,t,s)}},2775:(e,t,s)=>{var n=s(5317).spawn;e.exports=function(e,t,s,r){"function"==typeof s&&(r=s,s=void 0);var i=!1,o=n(e,t,s),a="",c="";o.stdout.on("data",(function(e){a+=e.toString()})),o.stderr.on("data",(function(e){c+=e.toString()})),o.on("error",(function(e){i||(i=!0,r(new Error(e)))})),o.on("close",(function(e){if(!i){if(i=!0,c=function(e){if(e)return(e=(e=e.trim()).replace(/your \d+x\d+ screen size is bogus\. expect trouble/gi,"")).trim()}(c))return r(new Error(c));r(null,a,e)}}))}},4182:(e,t,s)=>{var n=s(857),r={ps:()=>s(433),wmic:()=>s(7868)},i=n.platform();i.startsWith("win")&&(i="win");var o={darwin:"ps",sunos:"ps",freebsd:"ps",netbsd:"ps",win:"wmic",linux:"ps",aix:"ps"}[i];e.exports=function(e){void 0===o&&e(new Error(n.platform()+" is not supported yet, please open an issue (https://github.com/simonepri/pidtree)")),r[o]()(e)}},6179:(e,t,s)=>{var n=s(4182);e.exports=function(e,t,s){"function"==typeof t&&(s=t,t={}),"object"!=typeof t&&(t={}),e=parseInt(e,10),isNaN(e)||e<-1?s(new TypeError("The pid provided is invalid")):n((function(n,r){if(n)s(n);else if(-1!==e){for(var i,o=0;o<r.length;o++){if(r[o][1]===e){i=t.advanced?{ppid:r[o][0],pid:e}:e;break}r[o][0]===e&&(i=t.advanced?{pid:e}:e)}if(i){for(var a={};r.length>0;){var c=r.pop();a[c[0]]?a[c[0]].push(c[1]):a[c[0]]=[c[1]]}for(var l=0,u=[i];l<u.length;){var p=t.advanced?u[l++].pid:u[l++];if(a[p]){for(var f=a[p].length,h=0;h<f;h++)u.push(t.advanced?{ppid:p,pid:a[p][h]}:a[p][h]);delete a[p]}}t.root||u.shift(),s(null,u)}else s(new Error("No matching pid found"))}else{for(var d=0;d<r.length;d++)r[d]=t.advanced?{ppid:r[d][0],pid:r[d][1]}:r[d]=r[d][1];s(null,r)}}))}},433:(e,t,s)=>{var n=s(857),r=s(2775);e.exports=function(e){r("ps",["-A","-o","ppid,pid"],(function(t,s,r){if(t)return e(t);if(0!==r)return e(new Error("pidtree ps command exited with code "+r));try{s=s.split(n.EOL);for(var i=[],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),i.push(s[o]));e(null,i)}catch(t){e(t)}}))}},7868:(e,t,s)=>{var n=s(857),r=s(2775);e.exports=function(e){r("wmic",["PROCESS","get","ParentProcessId,ProcessId"],{windowsHide:!0,windowsVerbatimArguments:!0},(function(t,s,r){if(t)e(t);else if(0===r)try{s=s.split(n.EOL);for(var i=[],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),i.push(s[o]));e(null,i)}catch(t){e(t)}else e(new Error("pidtree wmic command exited with code "+r))}))}},9018:e=>{function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles)return function(e){const s=[],n=[],r=new Map;if(r.set(Date,(e=>new Date(e))),r.set(Map,((e,t)=>new Map(o(Array.from(e),t)))),r.set(Set,((e,t)=>new Set(o(Array.from(e),t)))),e.constructorHandlers)for(const t of e.constructorHandlers)r.set(t[0],t[1]);let i=null;return e.proto?function e(a){if("object"!=typeof a||null===a)return a;if(Array.isArray(a))return o(a,e);if(a.constructor!==Object&&(i=r.get(a.constructor)))return i(a,e);const c={};s.push(a),n.push(c);for(const o in a){const l=a[o];if("object"!=typeof l||null===l)c[o]=l;else if(l.constructor!==Object&&(i=r.get(l.constructor)))c[o]=i(l,e);else if(ArrayBuffer.isView(l))c[o]=t(l);else{const t=s.indexOf(l);c[o]=-1!==t?n[t]:e(l)}}return s.pop(),n.pop(),c}:function e(a){if("object"!=typeof a||null===a)return a;if(Array.isArray(a))return o(a,e);if(a.constructor!==Object&&(i=r.get(a.constructor)))return i(a,e);const c={};s.push(a),n.push(c);for(const o in a){if(!1===Object.hasOwnProperty.call(a,o))continue;const l=a[o];if("object"!=typeof l||null===l)c[o]=l;else if(l.constructor!==Object&&(i=r.get(l.constructor)))c[o]=i(l,e);else if(ArrayBuffer.isView(l))c[o]=t(l);else{const t=s.indexOf(l);c[o]=-1!==t?n[t]:e(l)}}return s.pop(),n.pop(),c};function o(e,o){const a=Object.keys(e),c=new Array(a.length);for(let l=0;l<a.length;l++){const u=a[l],p=e[u];if("object"!=typeof p||null===p)c[u]=p;else if(p.constructor!==Object&&(i=r.get(p.constructor)))c[u]=i(p,o);else if(ArrayBuffer.isView(p))c[u]=t(p);else{const e=s.indexOf(p);c[u]=-1!==e?n[e]:o(p)}}return c}}(e);const s=new Map;if(s.set(Date,(e=>new Date(e))),s.set(Map,((e,t)=>new Map(r(Array.from(e),t)))),s.set(Set,((e,t)=>new Set(r(Array.from(e),t)))),e.constructorHandlers)for(const t of e.constructorHandlers)s.set(t[0],t[1]);let n=null;return e.proto?function e(i){if("object"!=typeof i||null===i)return i;if(Array.isArray(i))return r(i,e);if(i.constructor!==Object&&(n=s.get(i.constructor)))return n(i,e);const o={};for(const r in i){const a=i[r];"object"!=typeof a||null===a?o[r]=a:a.constructor!==Object&&(n=s.get(a.constructor))?o[r]=n(a,e):ArrayBuffer.isView(a)?o[r]=t(a):o[r]=e(a)}return o}:function e(i){if("object"!=typeof i||null===i)return i;if(Array.isArray(i))return r(i,e);if(i.constructor!==Object&&(n=s.get(i.constructor)))return n(i,e);const o={};for(const r in i){if(!1===Object.hasOwnProperty.call(i,r))continue;const a=i[r];"object"!=typeof a||null===a?o[r]=a:a.constructor!==Object&&(n=s.get(a.constructor))?o[r]=n(a,e):ArrayBuffer.isView(a)?o[r]=t(a):o[r]=e(a)}return o};function r(e,r){const i=Object.keys(e),o=new Array(i.length);for(let a=0;a<i.length;a++){const c=i[a],l=e[c];"object"!=typeof l||null===l?o[c]=l:l.constructor!==Object&&(n=s.get(l.constructor))?o[c]=n(l,r):ArrayBuffer.isView(l)?o[c]=t(l):o[c]=r(l)}return o}}},600:(e,t,s)=>{const n=s(7257);e.exports=(e="")=>{const t=e.match(n);if(!t)return null;const[s,r]=t[0].replace(/#! ?/,"").split(" "),i=s.split("/").pop();return"env"===i?r:r?`${i} ${r}`:i}},7257:e=>{e.exports=/^#!(.*)/},1754:(e,t,s)=>{const n=s(857),r=s(4891),i=process.env;let o;function a(e){const t=function(e){if(!1===o)return 0;if(r("color=16m")||r("color=full")||r("color=truecolor"))return 3;if(r("color=256"))return 2;if(e&&!e.isTTY&&!0!==o)return 0;const t=o?1:0;if("win32"===process.platform){const e=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in i))||"codeship"===i.CI_NAME?1:t;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:(i.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}r("no-color")||r("no-colors")||r("color=false")?o=!1:(r("color")||r("colors")||r("color=true")||r("color=always"))&&(o=!0),"FORCE_COLOR"in i&&(o=0===i.FORCE_COLOR.length||0!==parseInt(i.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},4710:(e,t,s)=>{const n=s(9789),r=(e,t,s)=>{if(!1===n(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===n(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...s};"boolean"==typeof i.strictZeros&&(i.relaxZeros=!1===i.strictZeros);let c=e+":"+t+"="+String(i.relaxZeros)+String(i.shorthand)+String(i.capture)+String(i.wrap);if(r.cache.hasOwnProperty(c))return r.cache[c].result;let l=Math.min(e,t),u=Math.max(e,t);if(1===Math.abs(l-u)){let s=e+"|"+t;return i.capture?`(${s})`:!1===i.wrap?s:`(?:${s})`}let p=h(e)||h(t),f={min:e,max:t,a:l,b:u},d=[],m=[];return p&&(f.isPadded=p,f.maxLen=String(f.max).length),l<0&&(m=o(u<0?Math.abs(u):1,Math.abs(l),f,i),l=f.a=0),u>=0&&(d=o(l,u,f,i)),f.negatives=m,f.positives=d,f.result=function(e,t){let s=a(e,t,"-",!1)||[],n=a(t,e,"",!1)||[],r=a(e,t,"-?",!0)||[];return s.concat(r).concat(n).join("|")}(m,d),!0===i.capture?f.result=`(${f.result})`:!1!==i.wrap&&d.length+m.length>1&&(f.result=`(?:${f.result})`),r.cache[c]=f,f.result};function i(e,t,s){if(e===t)return{pattern:e,count:[],digits:0};let n=function(e,t){let s=[];for(let n=0;n<e.length;n++)s.push([e[n],t[n]]);return s}(e,t),r=n.length,i="",o=0;for(let e=0;e<r;e++){let[t,s]=n[e];t===s?i+=t:"0"!==t||"9"!==s?i+=`[${a=t}${(c=s)-a==1?"":"-"}${c}]`:o++}var a,c;return o&&(i+=!0===s.shorthand?"\\d":"[0-9]"),{pattern:i,count:[o],digits:r}}function o(e,t,s,n){let r,o=function(e,t){let s=1,n=1,r=u(e,s),i=new Set([t]);for(;e<=r&&r<=t;)i.add(r),s+=1,r=u(e,s);for(r=p(t+1,n)-1;e<r&&r<=t;)i.add(r),n+=1,r=p(t+1,n)-1;return i=[...i],i.sort(c),i}(e,t),a=[],l=e;for(let e=0;e<o.length;e++){let t=o[e],c=i(String(l),String(t),n),u="";s.isPadded||!r||r.pattern!==c.pattern?(s.isPadded&&(u=d(t,s,n)),c.string=u+c.pattern+f(c.count),a.push(c),l=t+1,r=c):(r.count.length>1&&r.count.pop(),r.count.push(c.count[0]),r.string=r.pattern+f(r.count),l=t+1)}return a}function a(e,t,s,n,r){let i=[];for(let r of e){let{string:e}=r;n||l(t,"string",e)||i.push(s+e),n&&l(t,"string",e)&&i.push(s+e)}return i}function c(e,t){return e>t?1:t>e?-1:0}function l(e,t,s){return e.some((e=>e[t]===s))}function u(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function p(e,t){return e-e%Math.pow(10,t)}function f(e){let[t=0,s=""]=e;return s||t>1?`{${t+(s?","+s:"")}}`:""}function h(e){return/^-?(0+)\d/.test(e)}function d(e,t,s){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),r=!1!==s.relaxZeros;switch(n){case 0:return"";case 1:return r?"0?":"0";case 2:return r?"0{0,2}":"00";default:return r?`0{0,${n}}`:`0{${n}}`}}r.cache={},r.clearCache=()=>r.cache={},e.exports=r},1905:(e,t,s)=>{const n="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,r=s(6928),i=n?";":":",o=s(9344),a=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),c=(e,t)=>{const s=t.colon||i,r=e.match(/\//)||n&&e.match(/\\/)?[""]:[...n?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(s)],o=n?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=n?o.split(s):[""];return n&&-1!==e.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:r,pathExt:a,pathExtExe:o}},l=(e,t,s)=>{"function"==typeof t&&(s=t,t={}),t||(t={});const{pathEnv:n,pathExt:i,pathExtExe:l}=c(e,t),u=[],p=s=>new Promise(((i,o)=>{if(s===n.length)return t.all&&u.length?i(u):o(a(e));const c=n[s],l=/^".*"$/.test(c)?c.slice(1,-1):c,p=r.join(l,e),h=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;i(f(h,s,0))})),f=(e,s,n)=>new Promise(((r,a)=>{if(n===i.length)return r(p(s+1));const c=i[n];o(e+c,{pathExt:l},((i,o)=>{if(!i&&o){if(!t.all)return r(e+c);u.push(e+c)}return r(f(e,s,n+1))}))}));return s?p(0).then((e=>s(null,e)),s):p(0)};e.exports=l,l.sync=(e,t)=>{t=t||{};const{pathEnv:s,pathExt:n,pathExtExe:i}=c(e,t),l=[];for(let a=0;a<s.length;a++){const c=s[a],u=/^".*"$/.test(c)?c.slice(1,-1):c,p=r.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p;for(let e=0;e<n.length;e++){const s=f+n[e];try{if(o.sync(s,{pathExt:i})){if(!t.all)return s;l.push(s)}}catch(e){}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw a(e)}},7880:(e,t,s)=>{var n=s(9414),r=s(3268),i=s(1501),o=s(9400),a=s(6744),c=s(1341),l=s(9897);function u(e,t,s,n,r,i){const o="block-map"===s.type?a.resolveBlockMap(e,t,s,n,i):"block-seq"===s.type?c.resolveBlockSeq(e,t,s,n,i):l.resolveFlowCollection(e,t,s,n,i),u=o.constructor;return"!"===r||r===u.tagName?(o.tag=u.tagName,o):(r&&(o.tag=r),o)}t.composeCollection=function(e,t,s,a,c){const l=a.tag,p=l?t.directives.tagName(l.source,(e=>c(l,"TAG_RESOLVE_FAILED",e))):null;if("block-seq"===s.type){const{anchor:e,newlineAfterProp:t}=a,s=e&&l?e.offset>l.offset?e:l:e??l;s&&(!t||t.offset<s.offset)&&c(s,"MISSING_CHAR","Missing newline after block sequence props")}const f="block-map"===s.type?"map":"block-seq"===s.type?"seq":"{"===s.start.source?"map":"seq";if(!l||!p||"!"===p||p===i.YAMLMap.tagName&&"map"===f||p===o.YAMLSeq.tagName&&"seq"===f)return u(e,t,s,c,p);let h=t.schema.tags.find((e=>e.tag===p&&e.collection===f));if(!h){const n=t.schema.knownTags[p];if(!n||n.collection!==f)return n?.collection?c(l,"BAD_COLLECTION_TYPE",`${n.tag} used for ${f} collection, but expects ${n.collection}`,!0):c(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${p}`,!0),u(e,t,s,c,p);t.schema.tags.push(Object.assign({},n,{default:!1})),h=n}const d=u(e,t,s,c,p,h),m=h.resolve?.(d,(e=>c(l,"TAG_RESOLVE_FAILED",e)),t.options)??d,g=n.isNode(m)?m:new r.Scalar(m);return g.range=d.range,g.tag=p,h?.format&&(g.format=h.format),g}},751:(e,t,s)=>{var n=s(5604),r=s(6936),i=s(1511),o=s(8044);t.composeDoc=function(e,t,{offset:s,start:a,value:c,end:l},u){const p=Object.assign({_directives:t},e),f=new n.Document(void 0,p),h={atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},d=o.resolveProps(a,{indicator:"doc-start",next:c??l?.[0],offset:s,onError:u,parentIndent:0,startOnNewline:!0});d.found&&(f.directives.docStart=!0,!c||"block-map"!==c.type&&"block-seq"!==c.type||d.hasNewline||u(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=c?r.composeNode(h,c,d,u):r.composeEmptyNode(h,d.end,a,null,d,u);const m=f.contents.range[2],g=i.resolveEnd(l,m,!1,u);return g.comment&&(f.comment=g.comment),f.range=[s,m,g.offset],f}},6936:(e,t,s)=>{var n=s(8702),r=s(7880),i=s(2724),o=s(1511),a=s(3734);const c={composeNode:l,composeEmptyNode:u};function l(e,t,s,a){const{spaceBefore:l,comment:p,anchor:f,tag:h}=s;let d,m=!0;switch(t.type){case"alias":d=function({options:e},{offset:t,source:s,end:r},i){const a=new n.Alias(s.substring(1));""===a.source&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&i(t+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+s.length,l=o.resolveEnd(r,c,e.strict,i);return a.range=[t,c,l.offset],l.comment&&(a.comment=l.comment),a}(e,t,a),(f||h)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":d=i.composeScalar(e,t,h,a),f&&(d.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":d=r.composeCollection(c,e,t,s,a),f&&(d.anchor=f.source.substring(1));break;default:a(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),d=u(e,t.offset,void 0,null,s,a),m=!1}return f&&""===d.anchor&&a(f,"BAD_ALIAS","Anchor cannot be an empty string"),l&&(d.spaceBefore=!0),p&&("scalar"===t.type&&""===t.source?d.comment=p:d.commentBefore=p),e.options.keepSourceTokens&&m&&(d.srcToken=t),d}function u(e,t,s,n,{spaceBefore:r,comment:o,anchor:c,tag:l,end:u},p){const f={type:"scalar",offset:a.emptyScalarPosition(t,s,n),indent:-1,source:""},h=i.composeScalar(e,f,l,p);return c&&(h.anchor=c.source.substring(1),""===h.anchor&&p(c,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(h.spaceBefore=!0),o&&(h.comment=o,h.range[2]=u),h}t.composeEmptyNode=u,t.composeNode=l},2724:(e,t,s)=>{var n=s(9414),r=s(3268),i=s(2052),o=s(5481);t.composeScalar=function(e,t,s,a){const{value:c,type:l,comment:u,range:p}="block-scalar"===t.type?i.resolveBlockScalar(e,t,a):o.resolveFlowScalar(t,e.options.strict,a),f=s?e.directives.tagName(s.source,(e=>a(s,"TAG_RESOLVE_FAILED",e))):null,h=s&&f?function(e,t,s,r,i){if("!"===s)return e[n.SCALAR];const o=[];for(const t of e.tags)if(!t.collection&&t.tag===s){if(!t.default||!t.test)return t;o.push(t)}for(const e of o)if(e.test?.test(t))return e;const a=e.knownTags[s];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,"tag:yaml.org,2002:str"!==s),e[n.SCALAR])}(e.schema,c,f,s,a):"scalar"===t.type?function({directives:e,schema:t},s,r,i){const o=t.tags.find((e=>e.default&&e.test?.test(s)))||t[n.SCALAR];if(t.compat){const a=t.compat.find((e=>e.default&&e.test?.test(s)))??t[n.SCALAR];o.tag!==a.tag&&i(r,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${e.tagString(o.tag)} or ${e.tagString(a.tag)}`,!0)}return o}(e,c,t,a):e.schema[n.SCALAR];let d;try{const i=h.resolve(c,(e=>a(s??t,"TAG_RESOLVE_FAILED",e)),e.options);d=n.isScalar(i)?i:new r.Scalar(i)}catch(e){const n=e instanceof Error?e.message:String(e);a(s??t,"TAG_RESOLVE_FAILED",n),d=new r.Scalar(c)}return d.range=p,d.source=c,l&&(d.type=l),f&&(d.tag=f),h.format&&(d.format=h.format),u&&(d.comment=u),d}},2501:(e,t,s)=>{var n=s(4683),r=s(5604),i=s(829),o=s(9414),a=s(751),c=s(1511);function l(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:s}=e;return[t,t+("string"==typeof s?s.length:1)]}function u(e){let t="",s=!1,n=!1;for(let r=0;r<e.length;++r){const i=e[r];switch(i[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(i.substring(1)||" "),s=!0,n=!1;break;case"%":"#"!==e[r+1]?.[0]&&(r+=1),s=!1;break;default:s||(n=!0),s=!1}}return{comment:t,afterEmptyLine:n}}t.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,s,n)=>{const r=l(e);n?this.warnings.push(new i.YAMLWarning(r,t,s)):this.errors.push(new i.YAMLParseError(r,t,s))},this.directives=new n.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:s,afterEmptyLine:n}=u(this.prelude);if(s){const r=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${s}`:s;else if(n||e.directives.docStart||!r)e.commentBefore=s;else if(o.isCollection(r)&&!r.flow&&r.items.length>0){let e=r.items[0];o.isPair(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${s}\n${t}`:s}else{const e=r.commentBefore;r.commentBefore=e?`${s}\n${e}`:s}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:u(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(const t of e)yield*this.next(t);yield*this.end(t,s)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,((t,s,n)=>{const r=l(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",s,n)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=a.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new i.YAMLParseError(l(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new i.YAMLParseError(l(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=c.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new i.YAMLParseError(l(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),s=new r.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,t,t],this.decorate(s,!1),yield s}}}},6744:(e,t,s)=>{var n=s(6120),r=s(1501),i=s(8044),o=s(6328),a=s(5478),c=s(8171);const l="All mapping items must start at the same column";t.resolveBlockMap=function({composeNode:e,composeEmptyNode:t},s,u,p,f){const h=new(f?.nodeClass??r.YAMLMap)(s.schema);s.atRoot&&(s.atRoot=!1);let d=u.offset,m=null;for(const r of u.items){const{start:f,key:g,sep:y,value:b}=r,w=i.resolveProps(f,{indicator:"explicit-key-ind",next:g??y?.[0],offset:d,onError:p,parentIndent:u.indent,startOnNewline:!0}),E=!w.found;if(E){if(g&&("block-seq"===g.type?p(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==u.indent&&p(d,"BAD_INDENT",l)),!w.anchor&&!w.tag&&!y){m=w.end,w.comment&&(h.comment?h.comment+="\n"+w.comment:h.comment=w.comment);continue}(w.newlineAfterProp||o.containsNewline(g))&&p(g??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else w.found?.indent!==u.indent&&p(d,"BAD_INDENT",l);const S=w.end,v=g?e(s,g,w,p):t(s,S,f,null,w,p);s.schema.compat&&a.flowIndentCheck(u.indent,g,p),c.mapIncludes(s,h.items,v)&&p(S,"DUPLICATE_KEY","Map keys must be unique");const A=i.resolveProps(y??[],{indicator:"map-value-ind",next:b,offset:v.range[2],onError:p,parentIndent:u.indent,startOnNewline:!g||"block-scalar"===g.type});if(d=A.end,A.found){E&&("block-map"!==b?.type||A.hasNewline||p(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),s.options.strict&&w.start<A.found.offset-1024&&p(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const i=b?e(s,b,A,p):t(s,d,y,null,A,p);s.schema.compat&&a.flowIndentCheck(u.indent,b,p),d=i.range[2];const o=new n.Pair(v,i);s.options.keepSourceTokens&&(o.srcToken=r),h.items.push(o)}else{E&&p(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),A.comment&&(v.comment?v.comment+="\n"+A.comment:v.comment=A.comment);const e=new n.Pair(v);s.options.keepSourceTokens&&(e.srcToken=r),h.items.push(e)}}return m&&m<d&&p(m,"IMPOSSIBLE","Map comment with trailing content"),h.range=[u.offset,d,m??d],h}},2052:(e,t,s)=>{var n=s(3268);t.resolveBlockScalar=function(e,t,s){const r=t.offset,i=function({offset:e,props:t},s,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:r}=t[0],i=r[0];let o=0,a="",c=-1;for(let t=1;t<r.length;++t){const s=r[t];if(a||"-"!==s&&"+"!==s){const n=Number(s);!o&&n?o=n:-1===c&&(c=e+t)}else a=s}-1!==c&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let l=!1,u="",p=r.length;for(let e=1;e<t.length;++e){const r=t[e];switch(r.type){case"space":l=!0;case"newline":p+=r.source.length;break;case"comment":s&&!l&&n(r,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=r.source.length,u=r.source.substring(1);break;case"error":n(r,"UNEXPECTED_TOKEN",r.message),p+=r.source.length;break;default:{n(r,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${r.type}`);const e=r.source;e&&"string"==typeof e&&(p+=e.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:p}}(t,e.options.strict,s);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const o=">"===i.mode?n.Scalar.BLOCK_FOLDED:n.Scalar.BLOCK_LITERAL,a=t.source?function(e){const t=e.split(/\n( *)/),s=t[0],n=s.match(/^( *)/),r=[n?.[1]?[n[1],s.slice(n[1].length)]:["",s]];for(let e=1;e<t.length;e+=2)r.push([t[e],t[e+1]]);return r}(t.source):[];let c=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;c=e}if(0===c){const e="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let s=r+i.length;return t.source&&(s+=t.source.length),{value:e,type:o,comment:i.comment,range:[r,s,s]}}let l=t.indent+i.indent,u=t.offset+i.length,p=0;for(let t=0;t<c;++t){const[n,r]=a[t];if(""!==r&&"\r"!==r){if(n.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";s(u+n.length,"MISSING_CHAR",e)}0===i.indent&&(l=n.length),p=t,0!==l||e.atRoot||s(u,"BAD_INDENT","Block scalar values in collections must be indented");break}0===i.indent&&n.length>l&&(l=n.length),u+=n.length+r.length+1}for(let e=a.length-1;e>=c;--e)a[e][0].length>l&&(c=e+1);let f="",h="",d=!1;for(let e=0;e<p;++e)f+=a[e][0].slice(l)+"\n";for(let e=p;e<c;++e){let[t,r]=a[e];u+=t.length+r.length+1;const c="\r"===r[r.length-1];if(c&&(r=r.slice(0,-1)),r&&t.length<l){const e="Block scalar lines must not be less indented than their "+(i.indent?"explicit indentation indicator":"first line");s(u-r.length-(c?2:1),"BAD_INDENT",e),t=""}o===n.Scalar.BLOCK_LITERAL?(f+=h+t.slice(l)+r,h="\n"):t.length>l||"\t"===r[0]?(" "===h?h="\n":d||"\n"!==h||(h="\n\n"),f+=h+t.slice(l)+r,h="\n",d=!0):""===r?"\n"===h?f+="\n":h="\n":(f+=h+r,h=" ",d=!1)}switch(i.chomp){case"-":break;case"+":for(let e=c;e<a.length;++e)f+="\n"+a[e][0].slice(l);"\n"!==f[f.length-1]&&(f+="\n");break;default:f+="\n"}const m=r+i.length+t.source.length;return{value:f,type:o,comment:i.comment,range:[r,m,m]}}},1341:(e,t,s)=>{var n=s(9400),r=s(8044),i=s(5478);t.resolveBlockSeq=function({composeNode:e,composeEmptyNode:t},s,o,a,c){const l=new(c?.nodeClass??n.YAMLSeq)(s.schema);s.atRoot&&(s.atRoot=!1);let u=o.offset,p=null;for(const{start:n,value:c}of o.items){const f=r.resolveProps(n,{indicator:"seq-item-ind",next:c,offset:u,onError:a,parentIndent:o.indent,startOnNewline:!0});if(!f.found){if(!(f.anchor||f.tag||c)){p=f.end,f.comment&&(l.comment=f.comment);continue}c&&"block-seq"===c.type?a(f.end,"BAD_INDENT","All sequence items must start at the same column"):a(u,"MISSING_CHAR","Sequence item without - indicator")}const h=c?e(s,c,f,a):t(s,f.end,n,null,f,a);s.schema.compat&&i.flowIndentCheck(o.indent,c,a),u=h.range[2],l.items.push(h)}return l.range=[o.offset,u,p??u],l}},1511:(e,t)=>{t.resolveEnd=function(e,t,s,n){let r="";if(e){let i=!1,o="";for(const a of e){const{source:e,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{s&&!i&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";r?r+=o+t:r=t,o="";break}case"newline":r&&(o+=e),i=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=e.length}}return{comment:r,offset:t}}},9897:(e,t,s)=>{var n=s(9414),r=s(6120),i=s(1501),o=s(9400),a=s(1511),c=s(8044),l=s(6328),u=s(8171);const p="Block collections are not allowed within flow collections",f=e=>e&&("block-map"===e.type||"block-seq"===e.type);t.resolveFlowCollection=function({composeNode:e,composeEmptyNode:t},s,h,d,m){const g="{"===h.start.source,y=g?"flow map":"flow sequence",b=new(m?.nodeClass??(g?i.YAMLMap:o.YAMLSeq))(s.schema);b.flow=!0;const w=s.atRoot;w&&(s.atRoot=!1);let E=h.offset+h.start.source.length;for(let o=0;o<h.items.length;++o){const a=h.items[o],{start:m,key:w,sep:S,value:v}=a,A=c.resolveProps(m,{flow:y,indicator:"explicit-key-ind",next:w??S?.[0],offset:E,onError:d,parentIndent:h.indent,startOnNewline:!1});if(!A.found){if(!(A.anchor||A.tag||S||v)){0===o&&A.comma?d(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):o<h.items.length-1&&d(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),A.comment&&(b.comment?b.comment+="\n"+A.comment:b.comment=A.comment),E=A.end;continue}!g&&s.options.strict&&l.containsNewline(w)&&d(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===o)A.comma&&d(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(A.comma||d(A.start,"MISSING_CHAR",`Missing , between ${y} items`),A.comment){let e="";e:for(const t of m)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=b.items[b.items.length-1];n.isPair(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,A.comment=A.comment.substring(e.length+1)}}if(g||S||A.found){const n=A.end,o=w?e(s,w,A,d):t(s,n,m,null,A,d);f(w)&&d(o.range,"BLOCK_IN_FLOW",p);const l=c.resolveProps(S??[],{flow:y,indicator:"map-value-ind",next:v,offset:o.range[2],onError:d,parentIndent:h.indent,startOnNewline:!1});if(l.found){if(!g&&!A.found&&s.options.strict){if(S)for(const e of S){if(e===l.found)break;if("newline"===e.type){d(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<l.found.offset-1024&&d(l.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else v&&("source"in v&&v.source&&":"===v.source[0]?d(v,"MISSING_CHAR",`Missing space after : in ${y}`):d(l.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const k=v?e(s,v,l,d):l.found?t(s,l.end,S,null,l,d):null;k?f(v)&&d(k.range,"BLOCK_IN_FLOW",p):l.comment&&(o.comment?o.comment+="\n"+l.comment:o.comment=l.comment);const C=new r.Pair(o,k);if(s.options.keepSourceTokens&&(C.srcToken=a),g){const e=b;u.mapIncludes(s,e.items,o)&&d(n,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(C)}else{const e=new i.YAMLMap(s.schema);e.flow=!0,e.items.push(C);const t=(k??o).range;e.range=[o.range[0],t[1],t[2]],b.items.push(e)}E=k?k.range[2]:l.end}else{const n=v?e(s,v,A,d):t(s,A.end,S,null,A,d);b.items.push(n),E=n.range[2],f(v)&&d(n.range,"BLOCK_IN_FLOW",p)}}const S=g?"}":"]",[v,...A]=h.end;let k=E;if(v&&v.source===S)k=v.offset+v.source.length;else{const e=y[0].toUpperCase()+y.substring(1);d(E,w?"MISSING_CHAR":"BAD_INDENT",w?`${e} must end with a ${S}`:`${e} in block collection must be sufficiently indented and end with a ${S}`),v&&1!==v.source.length&&A.unshift(v)}if(A.length>0){const e=a.resolveEnd(A,k,s.options.strict,d);e.comment&&(b.comment?b.comment+="\n"+e.comment:b.comment=e.comment),b.range=[h.offset,k,e.offset]}else b.range=[h.offset,k,k];return b}},5481:(e,t,s)=>{var n=s(3268),r=s(1511);function i(e){let t,s;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),s=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,s=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let r=n[1],i=" ",o=t.lastIndex;for(s.lastIndex=o;n=s.exec(e);)""===n[1]?"\n"===i?r+=i:i="\n":(r+=i+n[1],i=" "),o=s.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(e),r+i+(n?.[1]??"")}function o(e,t){let s="",n=e[t+1];for(;!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||"\r"===n&&"\n"!==e[t+2]);)"\n"===n&&(s+="\n"),n=e[(t+=1)+1];return s||(s=" "),{fold:s,offset:t}}const a={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xa0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function c(e,t,s,n){const r=e.substr(t,s),i=r.length===s&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;if(isNaN(i)){const r=e.substr(t-2,s+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),r}return String.fromCodePoint(i)}t.resolveFlowScalar=function(e,t,s){const{offset:l,type:u,source:p,end:f}=e;let h,d;const m=(e,t,n)=>s(l+e,t,n);switch(u){case"scalar":h=n.Scalar.PLAIN,d=function(e,t){let s="";switch(e[0]){case"\t":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":s=`block scalar indicator ${e[0]}`;break;case"@":case"`":s=`reserved character ${e[0]}`}return s&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`),i(e)}(p,m);break;case"single-quoted-scalar":h=n.Scalar.QUOTE_SINGLE,d=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),i(e.slice(1,-1)).replace(/''/g,"'")}(p,m);break;case"double-quoted-scalar":h=n.Scalar.QUOTE_DOUBLE,d=function(e,t){let s="";for(let n=1;n<e.length-1;++n){const r=e[n];if("\r"!==r||"\n"!==e[n+1])if("\n"===r){const{fold:t,offset:r}=o(e,n);s+=t,n=r}else if("\\"===r){let r=e[++n];const i=a[r];if(i)s+=i;else if("\n"===r)for(r=e[n+1];" "===r||"\t"===r;)r=e[1+ ++n];else if("\r"===r&&"\n"===e[n+1])for(r=e[1+ ++n];" "===r||"\t"===r;)r=e[1+ ++n];else if("x"===r||"u"===r||"U"===r){const i={x:2,u:4,U:8}[r];s+=c(e,n+1,i,t),n+=i}else{const r=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),s+=r}}else if(" "===r||"\t"===r){const t=n;let i=e[n+1];for(;" "===i||"\t"===i;)i=e[1+ ++n];"\n"===i||"\r"===i&&"\n"===e[n+2]||(s+=n>t?e.slice(t,n+1):r)}else s+=r}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),s}(p,m);break;default:return s(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[l,l+p.length,l+p.length]}}const g=l+p.length,y=r.resolveEnd(f,g,t,s);return{value:d,type:h,comment:y.comment,range:[l,g,y.offset]}}},8044:(e,t)=>{t.resolveProps=function(e,{flow:t,indicator:s,next:n,offset:r,onError:i,parentIndent:o,startOnNewline:a}){let c=!1,l=a,u=a,p="",f="",h=!1,d=!1,m=null,g=null,y=null,b=null,w=null,E=null,S=null;for(const r of e)switch(d&&("space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d=!1),m&&(l&&"comment"!==r.type&&"newline"!==r.type&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),r.type){case"space":t||"doc-start"===s&&"flow-collection"===n?.type||!r.source.includes("\t")||(m=r),u=!0;break;case"comment":{u||i(r,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=r.source.substring(1)||" ";p?p+=f+e:p=e,f="",l=!1;break}case"newline":l?p?p+=r.source:c=!0:f+=r.source,l=!0,h=!0,(g||y)&&(b=r),u=!0;break;case"anchor":g&&i(r,"MULTIPLE_ANCHORS","A node can have at most one anchor"),r.source.endsWith(":")&&i(r.offset+r.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=r,null===S&&(S=r.offset),l=!1,u=!1,d=!0;break;case"tag":y&&i(r,"MULTIPLE_TAGS","A node can have at most one tag"),y=r,null===S&&(S=r.offset),l=!1,u=!1,d=!0;break;case s:(g||y)&&i(r,"BAD_PROP_ORDER",`Anchors and tags must be after the ${r.source} indicator`),E&&i(r,"UNEXPECTED_TOKEN",`Unexpected ${r.source} in ${t??"collection"}`),E=r,l="seq-item-ind"===s||"explicit-key-ind"===s,u=!1;break;case"comma":if(t){w&&i(r,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),w=r,l=!1,u=!1;break}default:i(r,"UNEXPECTED_TOKEN",`Unexpected ${r.type} token`),l=!1,u=!1}const v=e[e.length-1],A=v?v.offset+v.source.length:r;return d&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(l&&m.indent<=o||"block-map"===n?.type||"block-seq"===n?.type)&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:E,spaceBefore:c,comment:p,hasNewline:h,anchor:g,tag:y,newlineAfterProp:b,end:A,start:S??A}}},6328:(e,t)=>{t.containsNewline=function e(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return!0;if(t.end)for(const e of t.end)if("newline"===e.type)return!0;return!1;case"flow-collection":for(const s of t.items){for(const e of s.start)if("newline"===e.type)return!0;if(s.sep)for(const e of s.sep)if("newline"===e.type)return!0;if(e(s.key)||e(s.value))return!0}return!1;default:return!0}}},3734:(e,t)=>{t.emptyScalarPosition=function(e,t,s){if(t){null===s&&(s=t.length);for(let n=s-1;n>=0;--n){let s=t[n];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++n];"space"===s?.type;)e+=s.source.length,s=t[++n];break}}return e}},5478:(e,t,s)=>{var n=s(6328);t.flowIndentCheck=function(e,t,s){if("flow-collection"===t?.type){const r=t.end[0];r.indent!==e||"]"!==r.source&&"}"!==r.source||!n.containsNewline(t)||s(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}},8171:(e,t,s)=>{var n=s(9414);t.mapIncludes=function(e,t,s){const{uniqueKeys:r}=e.options;if(!1===r)return!1;const i="function"==typeof r?r:(t,s)=>t===s||n.isScalar(t)&&n.isScalar(s)&&t.value===s.value&&!("<<"===t.value&&e.schema.merge);return t.some((e=>i(e.key,s)))}},5604:(e,t,s)=>{var n=s(8702),r=s(552),i=s(9414),o=s(6120),a=s(9694),c=s(2447),l=s(3698),u=s(2663),p=s(3860),f=s(9101),h=s(4683);class d{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,i.NODE_TYPE,{value:i.DOC});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===s&&t&&(s=t,t=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},s);this.options=r;let{version:o}=r;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new h.Directives({version:o}),this.setSchema(o,s),this.contents=void 0===e?null:this.createNode(e,n,s)}clone(){const e=Object.create(d.prototype,{[i.NODE_TYPE]:{value:i.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=i.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){m(this.contents)&&this.contents.add(e)}addIn(e,t){m(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=u.anchorNames(this);e.anchor=!t||s.has(t)?u.findNewAnchor(t||"a",s):t}return new n.Alias(e.anchor)}createNode(e,t,s){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,s=t.filter(e).map(String);s.length>0&&(t=t.concat(s)),n=t}else void 0===s&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:c,onTagObj:l,tag:p}=s??{},{onAnchor:h,setAnchors:d,sourceObjects:m}=u.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:r??!0,keepUndefined:c??!1,onAnchor:h,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m},y=f.createNode(e,p,g);return a&&i.isCollection(y)&&(y.flow=!0),d(),y}createPair(e,t,s={}){const n=this.createNode(e,null,s),r=this.createNode(t,null,s);return new o.Pair(n,r)}delete(e){return!!m(this.contents)&&this.contents.delete(e)}deleteIn(e){return r.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!m(this.contents)&&this.contents.deleteIn(e)}get(e,t){return i.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return r.isEmptyPath(e)?!t&&i.isScalar(this.contents)?this.contents.value:this.contents:i.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!i.isCollection(this.contents)&&this.contents.has(e)}hasIn(e){return r.isEmptyPath(e)?void 0!==this.contents:!!i.isCollection(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=r.collectionFromPath(this.schema,[e],t):m(this.contents)&&this.contents.set(e,t)}setIn(e,t){r.isEmptyPath(e)?this.contents=t:null==this.contents?this.contents=r.collectionFromPath(this.schema,Array.from(e),t):m(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let s;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new h.Directives({version:"1.1"}),s={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new h.Directives({version:e}),s={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!s)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new c.Schema(Object.assign(s,t))}}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:n,onAnchor:r,reviver:i}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===s,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},c=a.toJS(this.contents,t??"",o);if("function"==typeof r)for(const{count:e,res:t}of o.anchors.values())r(t,e);return"function"==typeof i?p.applyReviver(i,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return l.stringifyDocument(this,e)}}function m(e){if(i.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}t.Document=d},2663:(e,t,s)=>{var n=s(9414),r=s(5695);function i(e){const t=new Set;return r.visit(e,{Value(e,s){s.anchor&&t.add(s.anchor)}}),t}function o(e,t){for(let s=1;;++s){const n=`${e}${s}`;if(!t.has(n))return n}}t.anchorIsValid=function(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0},t.anchorNames=i,t.createNodeAnchors=function(e,t){const s=[],r=new Map;let a=null;return{onAnchor:n=>{s.push(n),a||(a=i(e));const r=o(t,a);return a.add(r),r},setAnchors:()=>{for(const e of s){const t=r.get(e);if("object"!=typeof t||!t.anchor||!n.isScalar(t.node)&&!n.isCollection(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:r}},t.findNewAnchor=o},3860:(e,t)=>{t.applyReviver=function e(t,s,n,r){if(r&&"object"==typeof r)if(Array.isArray(r))for(let s=0,n=r.length;s<n;++s){const n=r[s],i=e(t,r,String(s),n);void 0===i?delete r[s]:i!==n&&(r[s]=i)}else if(r instanceof Map)for(const s of Array.from(r.keys())){const n=r.get(s),i=e(t,r,s,n);void 0===i?r.delete(s):i!==n&&r.set(s,i)}else if(r instanceof Set)for(const s of Array.from(r)){const n=e(t,r,s,s);void 0===n?r.delete(s):n!==s&&(r.delete(s),r.add(n))}else for(const[s,n]of Object.entries(r)){const i=e(t,r,s,n);void 0===i?delete r[s]:i!==n&&(r[s]=i)}return t.call(s,n,r)}},9101:(e,t,s)=>{var n=s(8702),r=s(9414),i=s(3268);t.createNode=function(e,t,s){if(r.isDocument(e)&&(e=e.contents),r.isNode(e))return e;if(r.isPair(e)){const t=s.schema[r.MAP].createNode?.(s.schema,null,s);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:o,onAnchor:a,onTagObj:c,schema:l,sourceObjects:u}=s;let p;if(o&&e&&"object"==typeof e){if(p=u.get(e),p)return p.anchor||(p.anchor=a(e)),new n.Alias(p.anchor);p={anchor:null,node:null},u.set(e,p)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let f=function(e,t,s){if(t){const e=s.filter((e=>e.tag===t)),n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return s.find((t=>t.identify?.(e)&&!t.format))}(e,t,l.tags);if(!f){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new i.Scalar(e);return p&&(p.node=t),t}f=e instanceof Map?l[r.MAP]:Symbol.iterator in Object(e)?l[r.SEQ]:l[r.MAP]}c&&(c(f),delete s.onTagObj);const h=f?.createNode?f.createNode(s.schema,e,s):"function"==typeof f?.nodeClass?.from?f.nodeClass.from(s.schema,e,s):new i.Scalar(e);return t?h.tag=t:f.default||(h.tag=f.tag),p&&(p.node=h),h}},4683:(e,t,s)=>{var n=s(9414),r=s(5695);const i={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class o{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},o.defaultYaml,e),this.tags=Object.assign({},o.defaultTags,t)}clone(){const e=new o(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new o(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:o.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},o.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:o.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},o.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),n=s.shift();switch(n){case"%TAG":{if(2!==s.length&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[e,n]=s;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==s.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=s;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const s=e.slice(2,-1);return"!"===s||"!!"===s?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),s)}const[,s,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const r=this.tags[s];if(r)try{return r+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===s?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+e.substring(s.length).replace(/[!,[\]{}]/g,(e=>i[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let i;if(e&&s.length>0&&n.isNode(e.contents)){const t={};r.visit(e.contents,((e,s)=>{n.isNode(s)&&s.tag&&(t[s.tag]=!0)})),i=Object.keys(t)}else i=[];for(const[n,r]of s)"!!"===n&&"tag:yaml.org,2002:"===r||e&&!i.some((e=>e.startsWith(r)))||t.push(`%TAG ${n} ${r}`);return t.join("\n")}}o.defaultYaml={explicit:!1,version:"1.2"},o.defaultTags={"!!":"tag:yaml.org,2002:"},t.Directives=o},829:(e,t)=>{class s extends Error{constructor(e,t,s,n){super(),this.name=e,this.code=s,this.message=n,this.pos=t}}t.YAMLError=s,t.YAMLParseError=class extends s{constructor(e,t,s){super("YAMLParseError",e,t,s)}},t.YAMLWarning=class extends s{constructor(e,t,s){super("YAMLWarning",e,t,s)}},t.prettifyError=(e,t)=>s=>{if(-1===s.pos[0])return;s.linePos=s.pos.map((e=>t.linePos(e)));const{line:n,col:r}=s.linePos[0];s.message+=` at line ${n}, column ${r}`;let i=r-1,o=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const e=Math.min(i-39,o.length-79);o="\u2026"+o.substring(e),i-=e-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(o.substring(0,i))){let s=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);s.length>80&&(s=s.substring(0,79)+"\u2026\n"),o=s+o}if(/[^ ]/.test(o)){let e=1;const t=s.linePos[1];t&&t.line===n&&t.col>r&&(e=Math.max(1,Math.min(t.col-r,80-i)));const a=" ".repeat(i)+"^".repeat(e);s.message+=`:\n\n${o}\n${a}\n`}}},3132:(e,t,s)=>{var n=s(2501),r=s(5604),i=s(2447),o=s(829),a=s(8702),c=s(9414),l=s(6120),u=s(3268),p=s(1501),f=s(9400),h=s(990),d=s(5970),m=s(9993),g=s(9005),y=s(2282),b=s(5695);t.Composer=n.Composer,t.Document=r.Document,t.Schema=i.Schema,t.YAMLError=o.YAMLError,t.YAMLParseError=o.YAMLParseError,t.YAMLWarning=o.YAMLWarning,t.Alias=a.Alias,t.isAlias=c.isAlias,t.isCollection=c.isCollection,t.isDocument=c.isDocument,t.isMap=c.isMap,t.isNode=c.isNode,t.isPair=c.isPair,t.isScalar=c.isScalar,t.isSeq=c.isSeq,t.Pair=l.Pair,t.Scalar=u.Scalar,t.YAMLMap=p.YAMLMap,t.YAMLSeq=f.YAMLSeq,t.CST=h,t.Lexer=d.Lexer,t.LineCounter=m.LineCounter,t.Parser=g.Parser,t.parse=y.parse,t.parseAllDocuments=y.parseAllDocuments,t.parseDocument=y.parseDocument,t.stringify=y.stringify,t.visit=b.visit,t.visitAsync=b.visitAsync},9430:(e,t)=>{t.debug=function(e,...t){"debug"===e&&console.log(...t)},t.warn=function(e,t){"debug"!==e&&"warn"!==e||("undefined"!=typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}},8702:(e,t,s)=>{var n=s(2663),r=s(5695),i=s(9414),o=s(8808),a=s(9694);class c extends o.NodeBase{constructor(e){super(i.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return r.visit(e,{Node:(e,s)=>{if(s===this)return r.visit.BREAK;s.anchor===this.source&&(t=s)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:s,doc:n,maxAliasCount:r}=t,i=this.resolve(n);if(!i){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let o=s.get(i);if(o||(a.toJS(i,null,t),o=s.get(i)),!o||void 0===o.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(r>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=l(n,i,s)),o.count*o.aliasCount>r))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return o.res}toString(e,t,s){const r=`*${this.source}`;if(e){if(n.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${r} `}return r}}function l(e,t,s){if(i.isAlias(t)){const n=t.resolve(e),r=s&&n&&s.get(n);return r?r.count*r.aliasCount:0}if(i.isCollection(t)){let n=0;for(const r of t.items){const t=l(e,r,s);t>n&&(n=t)}return n}if(i.isPair(t)){const n=l(e,t.key,s),r=l(e,t.value,s);return Math.max(n,r)}return 1}t.Alias=c},552:(e,t,s)=>{var n=s(9101),r=s(9414),i=s(8808);function o(e,t,s){let r=s;for(let e=t.length-1;e>=0;--e){const s=t[e];if("number"==typeof s&&Number.isInteger(s)&&s>=0){const e=[];e[s]=r,r=e}else r=new Map([[s,r]])}return n.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const a=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class c extends i.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>r.isNode(t)||r.isPair(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(a(e))this.add(t);else{const[s,...n]=e,i=this.get(s,!0);if(r.isCollection(i))i.addIn(n,t);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${n}`);this.set(s,o(this.schema,n,t))}}}deleteIn(e){const[t,...s]=e;if(0===s.length)return this.delete(t);const n=this.get(t,!0);if(r.isCollection(n))return n.deleteIn(s);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){const[s,...n]=e,i=this.get(s,!0);return 0===n.length?!t&&r.isScalar(i)?i.value:i:r.isCollection(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!r.isPair(t))return!1;const s=t.value;return null==s||e&&r.isScalar(s)&&null==s.value&&!s.commentBefore&&!s.comment&&!s.tag}))}hasIn(e){const[t,...s]=e;if(0===s.length)return this.has(t);const n=this.get(t,!0);return!!r.isCollection(n)&&n.hasIn(s)}setIn(e,t){const[s,...n]=e;if(0===n.length)this.set(s,t);else{const e=this.get(s,!0);if(r.isCollection(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${s}. Remaining path: ${n}`);this.set(s,o(this.schema,n,t))}}}}t.Collection=c,t.collectionFromPath=o,t.isEmptyPath=a},8808:(e,t,s)=>{var n=s(3860),r=s(9414),i=s(9694);t.NodeBase=class{constructor(e){Object.defineProperty(this,r.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:o,reviver:a}={}){if(!r.isDocument(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof s?s:100},l=i.toJS(this,"",c);if("function"==typeof o)for(const{count:e,res:t}of c.anchors.values())o(t,e);return"function"==typeof a?n.applyReviver(a,{"":l},"",l):l}}},6120:(e,t,s)=>{var n=s(9101),r=s(5827),i=s(8473),o=s(9414);class a{constructor(e,t=null){Object.defineProperty(this,o.NODE_TYPE,{value:o.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return o.isNode(t)&&(t=t.clone(e)),o.isNode(s)&&(s=s.clone(e)),new a(t,s)}toJSON(e,t){const s=t?.mapAsMap?new Map:{};return i.addPairToJSMap(t,s,this)}toString(e,t,s){return e?.doc?r.stringifyPair(this,e,t,s):JSON.stringify(this)}}t.Pair=a,t.createPair=function(e,t,s){const r=n.createNode(e,void 0,s),i=n.createNode(t,void 0,s);return new a(r,i)}},3268:(e,t,s)=>{var n=s(9414),r=s(8808),i=s(9694);class o extends r.NodeBase{constructor(e){super(n.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:i.toJS(this.value,e,t)}toString(){return String(this.value)}}o.BLOCK_FOLDED="BLOCK_FOLDED",o.BLOCK_LITERAL="BLOCK_LITERAL",o.PLAIN="PLAIN",o.QUOTE_DOUBLE="QUOTE_DOUBLE",o.QUOTE_SINGLE="QUOTE_SINGLE",t.Scalar=o,t.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e},1501:(e,t,s)=>{var n=s(6627),r=s(8473),i=s(552),o=s(9414),a=s(6120),c=s(3268);function l(e,t){const s=o.isScalar(t)?t.value:t;for(const n of e)if(o.isPair(n)){if(n.key===t||n.key===s)return n;if(o.isScalar(n.key)&&n.key.value===s)return n}}class u extends i.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o.MAP,e),this.items=[]}static from(e,t,s){const{keepUndefined:n,replacer:r}=s,i=new this(e),o=(e,o)=>{if("function"==typeof r)o=r.call(t,e,o);else if(Array.isArray(r)&&!r.includes(e))return;(void 0!==o||n)&&i.items.push(a.createPair(e,o,s))};if(t instanceof Map)for(const[e,s]of t)o(e,s);else if(t&&"object"==typeof t)for(const e of Object.keys(t))o(e,t[e]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){let s;s=o.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new a.Pair(e.key,e.value):new a.Pair(e,e?.value);const n=l(this.items,s.key),r=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${s.key} already set`);o.isScalar(n.value)&&c.isScalarValue(s.value)?n.value.value=s.value:n.value=s.value}else if(r){const e=this.items.findIndex((e=>r(s,e)<0));-1===e?this.items.push(s):this.items.splice(e,0,s)}else this.items.push(s)}delete(e){const t=l(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const s=l(this.items,e),n=s?.value;return(!t&&o.isScalar(n)?n.value:n)??void 0}has(e){return!!l(this.items,e)}set(e,t){this.add(new a.Pair(e,t),!0)}toJSON(e,t,s){const n=s?new s:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const e of this.items)r.addPairToJSMap(t,n,e);return n}toString(e,t,s){if(!e)return JSON.stringify(this);for(const e of this.items)if(!o.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),n.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}t.YAMLMap=u,t.findPair=l},9400:(e,t,s)=>{var n=s(9101),r=s(6627),i=s(552),o=s(9414),a=s(3268),c=s(9694);class l extends i.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(o.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=u(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const s=u(e);if("number"!=typeof s)return;const n=this.items[s];return!t&&o.isScalar(n)?n.value:n}has(e){const t=u(e);return"number"==typeof t&&t<this.items.length}set(e,t){const s=u(e);if("number"!=typeof s)throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[s];o.isScalar(n)&&a.isScalarValue(t)?n.value=t:this.items[s]=t}toJSON(e,t){const s=[];t?.onCreate&&t.onCreate(s);let n=0;for(const e of this.items)s.push(c.toJS(e,String(n++),t));return s}toString(e,t,s){return e?r.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t}):JSON.stringify(this)}static from(e,t,s){const{replacer:r}=s,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let o of t){if("function"==typeof r){const s=t instanceof Set?o:String(e++);o=r.call(t,s,o)}i.items.push(n.createNode(o,void 0,s))}}return i}}function u(e){let t=o.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}t.YAMLSeq=l},8473:(e,t,s)=>{var n=s(9430),r=s(8551),i=s(9414),o=s(3268),a=s(9694);function c(e,t,s){const n=e&&i.isAlias(s)?s.resolve(e.doc):s;if(!i.isMap(n))throw new Error("Merge sources must be maps or map aliases");const r=n.toJSON(null,e,Map);for(const[e,s]of r)t instanceof Map?t.has(e)||t.set(e,s):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:s,writable:!0,enumerable:!0,configurable:!0});return t}t.addPairToJSMap=function(e,t,{key:s,value:l}){if(e?.doc.schema.merge&&(e=>"<<"===e||i.isScalar(e)&&"<<"===e.value&&(!e.type||e.type===o.Scalar.PLAIN))(s))if(l=i.isAlias(l)?l.resolve(e.doc):l,i.isSeq(l))for(const s of l.items)c(e,t,s);else if(Array.isArray(l))for(const s of l)c(e,t,s);else c(e,t,l);else{const o=a.toJS(s,"",e);if(t instanceof Map)t.set(o,a.toJS(l,o,e));else if(t instanceof Set)t.add(o);else{const c=function(e,t,s){if(null===t)return"";if("object"!=typeof t)return String(t);if(i.isNode(e)&&s?.doc){const t=r.createStringifyContext(s.doc,{});t.anchors=new Set;for(const e of s.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const i=e.toString(t);if(!s.mapKeyWarned){let e=JSON.stringify(i);e.length>40&&(e=e.substring(0,36)+'..."'),n.warn(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return i}return JSON.stringify(t)}(s,o,e),u=a.toJS(l,c,e);c in t?Object.defineProperty(t,c,{value:u,writable:!0,enumerable:!0,configurable:!0}):t[c]=u}}return t}},9414:(e,t)=>{const s=Symbol.for("yaml.alias"),n=Symbol.for("yaml.document"),r=Symbol.for("yaml.map"),i=Symbol.for("yaml.pair"),o=Symbol.for("yaml.scalar"),a=Symbol.for("yaml.seq"),c=Symbol.for("yaml.node.type"),l=e=>!!e&&"object"==typeof e&&e[c]===o;function u(e){if(e&&"object"==typeof e)switch(e[c]){case r:case a:return!0}return!1}t.ALIAS=s,t.DOC=n,t.MAP=r,t.NODE_TYPE=c,t.PAIR=i,t.SCALAR=o,t.SEQ=a,t.hasAnchor=e=>(l(e)||u(e))&&!!e.anchor,t.isAlias=e=>!!e&&"object"==typeof e&&e[c]===s,t.isCollection=u,t.isDocument=e=>!!e&&"object"==typeof e&&e[c]===n,t.isMap=e=>!!e&&"object"==typeof e&&e[c]===r,t.isNode=function(e){if(e&&"object"==typeof e)switch(e[c]){case s:case r:case o:case a:return!0}return!1},t.isPair=e=>!!e&&"object"==typeof e&&e[c]===i,t.isScalar=l,t.isSeq=e=>!!e&&"object"==typeof e&&e[c]===a},9694:(e,t,s)=>{var n=s(9414);t.toJS=function e(t,s,r){if(Array.isArray(t))return t.map(((t,s)=>e(t,String(s),r)));if(t&&"function"==typeof t.toJSON){if(!r||!n.hasAnchor(t))return t.toJSON(s,r);const e={aliasCount:0,count:1,res:void 0};r.anchors.set(t,e),r.onCreate=t=>{e.res=t,delete r.onCreate};const i=t.toJSON(s,r);return r.onCreate&&r.onCreate(i),i}return"bigint"!=typeof t||r?.keep?t:Number(t)}},4635:(e,t,s)=>{var n=s(2052),r=s(5481),i=s(829),o=s(5170);function a(e,t){if(t)for(const s of t)switch(s.type){case"space":case"comment":e.push(s);break;case"newline":return e.push(s),!0}return!1}function c(e,t,s){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=s,e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let r=t.length;"block-scalar-header"===e.props[0].type&&(r-=e.props[0].source.length);for(const e of n)e.offset+=r;delete e.props,Object.assign(e,{type:s,source:t,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:s,source:t,end:[n]});break}default:{const n="indent"in e?e.indent:-1,r="end"in e&&Array.isArray(e.end)?e.end.filter((e=>"space"===e.type||"comment"===e.type||"newline"===e.type)):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:s,indent:n,source:t,end:r})}}}t.createScalarToken=function(e,t){const{implicitKey:s=!1,indent:n,inFlow:r=!1,offset:i=-1,type:c="PLAIN"}=t,l=o.stringifyString({type:c,value:e},{implicitKey:s,indent:n>0?" ".repeat(n):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),u=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(l[0]){case"|":case">":{const e=l.indexOf("\n"),t=l.substring(0,e),s=l.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:i,indent:n,source:t}];return a(r,u)||r.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:i,indent:n,props:r,source:s}}case'"':return{type:"double-quoted-scalar",offset:i,indent:n,source:l,end:u};case"'":return{type:"single-quoted-scalar",offset:i,indent:n,source:l,end:u};default:return{type:"scalar",offset:i,indent:n,source:l,end:u}}},t.resolveAsScalar=function(e,t=!0,s){if(e){const o=(e,t,n)=>{const r="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!s)throw new i.YAMLParseError([r,r+1],t,n);s(r,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return r.resolveFlowScalar(e,t,o);case"block-scalar":return n.resolveBlockScalar({options:{strict:t}},e,o)}}return null},t.setScalarValue=function(e,t,s={}){let{afterKey:n=!1,implicitKey:r=!1,inFlow:i=!1,type:l}=s,u="indent"in e?e.indent:null;if(n&&"number"==typeof u&&(u+=2),!l)switch(e.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");l=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}const p=o.stringifyString({type:l,value:t},{implicitKey:r||null===u,indent:null!==u&&u>0?" ".repeat(u):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(p[0]){case"|":case">":!function(e,t){const s=t.indexOf("\n"),n=t.substring(0,s),r=t.substring(s+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=n,e.source=r}else{const{offset:t}=e,s="indent"in e?e.indent:-1,i=[{type:"block-scalar-header",offset:t,indent:s,source:n}];a(i,"end"in e?e.end:void 0)||i.push({type:"newline",offset:-1,indent:s,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:s,props:i,source:r})}}(e,p);break;case'"':c(e,p,"double-quoted-scalar");break;case"'":c(e,p,"single-quoted-scalar");break;default:c(e,p,"scalar")}}},6002:(e,t)=>{function s(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=s(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const s of e.items)t+=n(s);return t}case"flow-collection":{let t=e.start.source;for(const s of e.items)t+=n(s);for(const s of e.end)t+=s.source;return t}case"document":{let t=n(e);if(e.end)for(const s of e.end)t+=s.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const s of e.end)t+=s.source;return t}}}function n({start:e,key:t,sep:n,value:r}){let i="";for(const t of e)i+=t.source;if(t&&(i+=s(t)),n)for(const e of n)i+=e.source;return r&&(i+=s(r)),i}t.stringify=e=>"type"in e?s(e):n(e)},7336:(e,t)=>{const s=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove item");function i(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),o(Object.freeze([]),e,t)}function o(e,t,n){let i=n(t,e);if("symbol"==typeof i)return i;for(const a of["key","value"]){const c=t[a];if(c&&"items"in c){for(let t=0;t<c.items.length;++t){const i=o(Object.freeze(e.concat([[a,t]])),c.items[t],n);if("number"==typeof i)t=i-1;else{if(i===s)return s;i===r&&(c.items.splice(t,1),t-=1)}}"function"==typeof i&&"key"===a&&(i=i(t,e))}}return"function"==typeof i?i(t,e):i}i.BREAK=s,i.SKIP=n,i.REMOVE=r,i.itemAtPath=(e,t)=>{let s=e;for(const[e,n]of t){const t=s?.[e];if(!t||!("items"in t))return;s=t.items[n]}return s},i.parentCollection=(e,t)=>{const s=i.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],r=s?.[n];if(r&&"items"in r)return r;throw new Error("Parent collection not found")},t.visit=i},990:(e,t,s)=>{var n=s(4635),r=s(6002),i=s(7336);t.createScalarToken=n.createScalarToken,t.resolveAsScalar=n.resolveAsScalar,t.setScalarValue=n.setScalarValue,t.stringify=r.stringify,t.visit=i.visit,t.BOM="\ufeff",t.DOCUMENT="\x02",t.FLOW_END="\x18",t.SCALAR="\x1f",t.isCollection=e=>!!e&&"items"in e,t.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),t.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"\x02":return"<DOC>";case"\x18":return"<FLOW_END>";case"\x1f":return"<SCALAR>";default:return JSON.stringify(e)}},t.tokenType=function(e){switch(e){case"\ufeff":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}},5970:(e,t,s)=>{var n=s(990);function r(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const i=new Set("0123456789ABCDEFabcdef"),o=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),a=new Set(",[]{}"),c=new Set(" ,[]{}\n\r\t"),l=e=>!e||c.has(e);t.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let s=this.next??"stream";for(;s&&(t||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;for(;" "===t;)t=this.buffer[++s+e];if("\r"===t){const t=this.buffer[s+e+1];if("\n"===t||!t&&!this.atEnd)return e+s+1}return"\n"===t||s>=this.indentNext||!t&&!this.atEnd?e+s:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&r(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===n.BOM&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,s=e.indexOf("#");for(;-1!==s;){const n=e[s-1];if(" "===n||"\t"===n){t=s-1;break}s=e.indexOf("#",s+1)}for(;;){const s=e[t-1];if(" "!==s&&"\t"!==s)break;t-=1}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield n.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&r(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!r(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&r(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(l),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,s=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=s=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const i=this.getLine();if(null===i)return this.setNext("flow");if((-1!==s&&s<this.indentNext&&"#"!==i[0]||0===s&&(i.startsWith("---")||i.startsWith("..."))&&r(i[3]))&&(s!==this.indentNext-1||1!==this.flowLevel||"]"!==i[0]&&"}"!==i[0]))return this.flowLevel=0,yield n.FLOW_END,yield*this.parseLineStart();let o=0;for(;","===i[o];)o+=(yield*this.pushCount(1)),o+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(o+=(yield*this.pushIndicators()),i[o]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(l),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||r(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const s=this.buffer.substring(0,t);let n=s.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){const e=this.continueScalar(n+1);if(-1===e)break;n=s.indexOf("\n",e)}-1!==n&&(t=n-("\r"===s[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil((e=>r(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,s=0;e:for(let n=this.pos;e=this.buffer[n];++n)switch(e){case" ":s+=1;break;case"\n":t=n,s=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(s>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=s:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let r=t+1;for(e=this.buffer[r];" "===e;)e=this.buffer[++r];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++r];t=r-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const r=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+s>r))break;t=e}return yield n.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,s=this.pos-1,i=this.pos-1;for(;t=this.buffer[++i];)if(":"===t){const t=this.buffer[i+1];if(r(t)||e&&a.has(t))break;s=i}else if(r(t)){let n=this.buffer[i+1];if("\r"===t&&("\n"===n?(i+=1,t="\n",n=this.buffer[i+1]):s=i),"#"===n||e&&a.has(n))break;if("\n"===t){const e=this.continueScalar(i+1);if(-1===e)break;i=Math.max(i,e-2)}}else{if(e&&a.has(t))break;s=i}return t||this.atEnd?(yield n.SCALAR,yield*this.pushToIndex(s+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(l))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(r(t)||e&&a.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!r(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(o.has(t))t=this.buffer[++e];else{if("%"!==t||!i.has(this.buffer[e+1])||!i.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,s=this.pos-1;do{t=this.buffer[++s]}while(" "===t||e&&"\t"===t);const n=s-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=s),n}*pushUntil(e){let t=this.pos,s=this.buffer[t];for(;!e(s);)s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}},9993:(e,t)=>{t.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t<s;){const n=t+s>>1;this.lineStarts[n]<e?t=n+1:s=n}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}},9005:(e,t,s)=>{var n=s(990),r=s(5970);function i(e,t){for(let s=0;s<e.length;++s)if(e[s].type===t)return!0;return!1}function o(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function a(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function c(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function l(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function u(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||i(t.start,"explicit-key-ind")||i(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,a(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}t.Parser=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new r.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,process.env.LOG_TOKENS&&console.log("|",n.prettyToken(e)),this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=n.tokenType(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&u(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const s=e.items[e.items.length-1];if(s.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!s.sep)return Object.assign(s,{key:t,sep:[]}),void(this.onKeyLine=!s.explicitKey);s.value=t;break}case"block-seq":{const s=e.items[e.items.length-1];s.value?e.items.push({start:[],value:t}):s.value=t;break}case"flow-collection":{const s=e.items[e.items.length-1];return void(!s||s.value?e.items.push({start:[],key:t,sep:[]}):s.sep?s.value=t:Object.assign(s,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const s=t.items[t.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&-1===o(s.start)&&(0===t.indent||s.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=s.start:e.items.push({start:s.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==o(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=l(c(this.peek(2)));let s;e.end?(s=e.end,s.push(this.sourceToken),delete e.end):s=[this.sourceToken];const n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const s="end"in t.value?t.value.end:void 0,n=Array.isArray(s)?s[s.length-1]:void 0;"comment"===n?.type?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const s=e.items[e.items.length-2],n=s?.value?.end;if(Array.isArray(n))return Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const s=!this.onKeyLine&&this.indent===e.indent,n=s&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let r=[];if(n&&t.sep&&!t.value){const s=[];for(let n=0;n<t.sep.length;++n){const r=t.sep[n];switch(r.type){case"newline":s.push(n);break;case"space":break;case"comment":r.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(r=t.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":return void(n||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?n||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(i(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(a(t.key)&&!i(t.sep,"newline")){const e=l(t.start),s=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:s,sep:n}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(i(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=l(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:r,key:null,sep:[this.sourceToken]}):i(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);return void(n||t.value?(e.items.push({start:r,key:s,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(s):(Object.assign(t,{key:s,sep:[]}),this.onKeyLine=!0))}default:{const t=this.startBlockValue(e);if(t)return s&&"block-seq"!==t.type&&e.items.push({start:r}),void this.stack.push(t)}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const s="end"in t.value?t.value.end:void 0,n=Array.isArray(s)?s[s.length-1]:void 0;"comment"===n?.type?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const s=e.items[e.items.length-2],n=s?.value?.end;if(Array.isArray(n))return Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||i(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:s,sep:[]}):t.sep?this.stack.push(s):Object.assign(t,{key:s,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const s=l(c(t));u(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=l(c(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=l(c(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}},2282:(e,t,s)=>{var n=s(2501),r=s(5604),i=s(829),o=s(9430),a=s(9993),c=s(9005);function l(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new a.LineCounter||null,prettyErrors:t}}function u(e,t={}){const{lineCounter:s,prettyErrors:r}=l(t),o=new c.Parser(s?.addNewLine),a=new n.Composer(t);let u=null;for(const t of a.compose(o.parse(e),!0,e.length))if(u){if("silent"!==u.options.logLevel){u.errors.push(new i.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else u=t;return r&&s&&(u.errors.forEach(i.prettifyError(e,s)),u.warnings.forEach(i.prettifyError(e,s))),u}t.parse=function(e,t,s){let n;"function"==typeof t?n=t:void 0===s&&t&&"object"==typeof t&&(s=t);const r=u(e,s);if(!r)return null;if(r.warnings.forEach((e=>o.warn(r.options.logLevel,e))),r.errors.length>0){if("silent"!==r.options.logLevel)throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:n},s))},t.parseAllDocuments=function(e,t={}){const{lineCounter:s,prettyErrors:r}=l(t),o=new c.Parser(s?.addNewLine),a=new n.Composer(t),u=Array.from(a.compose(o.parse(e)));if(r&&s)for(const t of u)t.errors.forEach(i.prettifyError(e,s)),t.warnings.forEach(i.prettifyError(e,s));return u.length>0?u:Object.assign([],{empty:!0},a.streamInfo())},t.parseDocument=u,t.stringify=function(e,t,s){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===s&&t&&(s=t),"string"==typeof s&&(s=s.length),"number"==typeof s){const e=Math.round(s);s=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=s??t??{};if(!e)return}return new r.Document(e,n,s).toString(s)}},2447:(e,t,s)=>{var n=s(9414),r=s(520),i=s(5117),o=s(3561),a=s(1733);const c=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class l{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:l,schema:u,sortMapEntries:p,toStringDefaults:f}){this.compat=Array.isArray(e)?a.getTags(e,"compat"):e?a.getTags(null,e):null,this.merge=!!s,this.name="string"==typeof u&&u||"core",this.knownTags=l?a.coreKnownTags:{},this.tags=a.getTags(t,this.name),this.toStringOptions=f??null,Object.defineProperty(this,n.MAP,{value:r.map}),Object.defineProperty(this,n.SCALAR,{value:o.string}),Object.defineProperty(this,n.SEQ,{value:i.seq}),this.sortMapEntries="function"==typeof p?p:!0===p?c:null}clone(){const e=Object.create(l.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}t.Schema=l},520:(e,t,s)=>{var n=s(9414),r=s(1501);const i={collection:"map",default:!0,nodeClass:r.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(n.isMap(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,s)=>r.YAMLMap.from(e,t,s)};t.map=i},6465:(e,t,s)=>{var n=s(3268);const r={identify:e=>null==e,createNode:()=>new n.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new n.Scalar(null),stringify:({source:e},t)=>"string"==typeof e&&r.test.test(e)?e:t.options.nullStr};t.nullTag=r},5117:(e,t,s)=>{var n=s(9414),r=s(9400);const i={collection:"seq",default:!0,nodeClass:r.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(n.isSeq(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,s)=>r.YAMLSeq.from(e,t,s)};t.seq=i},3561:(e,t,s)=>{var n=s(5170);const r={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,s,r)=>(t=Object.assign({actualString:!0},t),n.stringifyString(e,t,s,r))};t.string=r},658:(e,t,s)=>{var n=s(3268);const r={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new n.Scalar("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},s)=>e&&r.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?s.options.trueStr:s.options.falseStr};t.boolTag=r},8570:(e,t,s)=>{var n=s(3268),r=s(1522);const i={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:r.stringifyNumber},o={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():r.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new n.Scalar(parseFloat(e)),s=e.indexOf(".");return-1!==s&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-s-1),t},stringify:r.stringifyNumber};t.float=a,t.floatExp=o,t.floatNaN=i},2205:(e,t,s)=>{var n=s(1522);const r=e=>"bigint"==typeof e||Number.isInteger(e),i=(e,t,s,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),s);function o(e,t,s){const{value:i}=e;return r(i)&&i>=0?s+i.toString(t):n.stringifyNumber(e)}const a={identify:e=>r(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,s)=>i(e,2,8,s),stringify:e=>o(e,8,"0o")},c={identify:r,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,s)=>i(e,0,10,s),stringify:n.stringifyNumber},l={identify:e=>r(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,s)=>i(e,2,16,s),stringify:e=>o(e,16,"0x")};t.int=c,t.intHex=l,t.intOct=a},101:(e,t,s)=>{var n=s(520),r=s(6465),i=s(5117),o=s(3561),a=s(658),c=s(8570),l=s(2205);const u=[n.map,i.seq,o.string,r.nullTag,a.boolTag,l.intOct,l.int,l.intHex,c.floatNaN,c.floatExp,c.float];t.schema=u},5386:(e,t,s)=>{var n=s(3268),r=s(520),i=s(5117);function o(e){return"bigint"==typeof e||Number.isInteger(e)}const a=({value:e})=>JSON.stringify(e),c=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:a},{identify:e=>null==e,createNode:()=>new n.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:a},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:a},{identify:o,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:s})=>s?BigInt(e):parseInt(e,10),stringify:({value:e})=>o(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:a}],l={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},u=[r.map,i.seq].concat(c,l);t.schema=u},1733:(e,t,s)=>{var n=s(520),r=s(6465),i=s(5117),o=s(3561),a=s(658),c=s(8570),l=s(2205),u=s(101),p=s(5386),f=s(4510),h=s(1026),d=s(8622),m=s(7392),g=s(9703),y=s(8879);const b=new Map([["core",u.schema],["failsafe",[n.map,i.seq,o.string]],["json",p.schema],["yaml11",m.schema],["yaml-1.1",m.schema]]),w={binary:f.binary,bool:a.boolTag,float:c.float,floatExp:c.floatExp,floatNaN:c.floatNaN,floatTime:y.floatTime,int:l.int,intHex:l.intHex,intOct:l.intOct,intTime:y.intTime,map:n.map,null:r.nullTag,omap:h.omap,pairs:d.pairs,seq:i.seq,set:g.set,timestamp:y.timestamp},E={"tag:yaml.org,2002:binary":f.binary,"tag:yaml.org,2002:omap":h.omap,"tag:yaml.org,2002:pairs":d.pairs,"tag:yaml.org,2002:set":g.set,"tag:yaml.org,2002:timestamp":y.timestamp};t.coreKnownTags=E,t.getTags=function(e,t){let s=b.get(t);if(!s){if(!Array.isArray(e)){const e=Array.from(b.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}s=[]}if(Array.isArray(e))for(const t of e)s=s.concat(t);else"function"==typeof e&&(s=e(s.slice()));return s.map((e=>{if("string"!=typeof e)return e;const t=w[e];if(t)return t;const s=Object.keys(w).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${s}`)}))}},4510:(e,t,s)=>{var n=s(3268),r=s(5170);const i={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof Buffer)return Buffer.from(e,"base64");if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let e=0;e<t.length;++e)s[e]=t.charCodeAt(e);return s}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:s},i,o,a){const c=s;let l;if("function"==typeof Buffer)l=c instanceof Buffer?c.toString("base64"):Buffer.from(c.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<c.length;++t)e+=String.fromCharCode(c[t]);l=btoa(e)}}if(t||(t=n.Scalar.BLOCK_LITERAL),t!==n.Scalar.QUOTE_DOUBLE){const e=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),s=Math.ceil(l.length/e),r=new Array(s);for(let t=0,n=0;t<s;++t,n+=e)r[t]=l.substr(n,e);l=r.join(t===n.Scalar.BLOCK_LITERAL?"\n":" ")}return r.stringifyString({comment:e,type:t,value:l},i,o,a)}};t.binary=i},8599:(e,t,s)=>{var n=s(3268);function r({value:e,source:t},s){return t&&(e?i:o).test.test(t)?t:e?s.options.trueStr:s.options.falseStr}const i={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new n.Scalar(!0),stringify:r},o={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new n.Scalar(!1),stringify:r};t.falseTag=o,t.trueTag=i},2229:(e,t,s)=>{var n=s(3268),r=s(1522);const i={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:r.stringifyNumber},o={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():r.stringifyNumber(e)}},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new n.Scalar(parseFloat(e.replace(/_/g,""))),s=e.indexOf(".");if(-1!==s){const n=e.substring(s+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:r.stringifyNumber};t.float=a,t.floatExp=o,t.floatNaN=i},6930:(e,t,s)=>{var n=s(1522);const r=e=>"bigint"==typeof e||Number.isInteger(e);function i(e,t,s,{intAsBigInt:n}){const r=e[0];if("-"!==r&&"+"!==r||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(s){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===r?BigInt(-1)*t:t}const i=parseInt(e,s);return"-"===r?-1*i:i}function o(e,t,s){const{value:i}=e;if(r(i)){const e=i.toString(t);return i<0?"-"+s+e.substr(1):s+e}return n.stringifyNumber(e)}const a={identify:r,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,s)=>i(e,2,2,s),stringify:e=>o(e,2,"0b")},c={identify:r,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,s)=>i(e,1,8,s),stringify:e=>o(e,8,"0")},l={identify:r,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,s)=>i(e,0,10,s),stringify:n.stringifyNumber},u={identify:r,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,s)=>i(e,2,16,s),stringify:e=>o(e,16,"0x")};t.int=l,t.intBin=a,t.intHex=u,t.intOct=c},1026:(e,t,s)=>{var n=s(9414),r=s(9694),i=s(1501),o=s(9400),a=s(8622);class c extends o.YAMLSeq{constructor(){super(),this.add=i.YAMLMap.prototype.add.bind(this),this.delete=i.YAMLMap.prototype.delete.bind(this),this.get=i.YAMLMap.prototype.get.bind(this),this.has=i.YAMLMap.prototype.has.bind(this),this.set=i.YAMLMap.prototype.set.bind(this),this.tag=c.tag}toJSON(e,t){if(!t)return super.toJSON(e);const s=new Map;t?.onCreate&&t.onCreate(s);for(const e of this.items){let i,o;if(n.isPair(e)?(i=r.toJS(e.key,"",t),o=r.toJS(e.value,i,t)):i=r.toJS(e,"",t),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(e,t,s){const n=a.createPairs(e,t,s),r=new this;return r.items=n.items,r}}c.tag="tag:yaml.org,2002:omap";const l={collection:"seq",identify:e=>e instanceof Map,nodeClass:c,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const s=a.resolvePairs(e,t),r=[];for(const{key:e}of s.items)n.isScalar(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new c,s)},createNode:(e,t,s)=>c.from(e,t,s)};t.YAMLOMap=c,t.omap=l},8622:(e,t,s)=>{var n=s(9414),r=s(6120),i=s(3268),o=s(9400);function a(e,t){if(n.isSeq(e))for(let s=0;s<e.items.length;++s){let o=e.items[s];if(!n.isPair(o)){if(n.isMap(o)){o.items.length>1&&t("Each pair must have its own sequence indicator");const e=o.items[0]||new r.Pair(new i.Scalar(null));if(o.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${o.commentBefore}\n${e.key.commentBefore}`:o.commentBefore),o.comment){const t=e.value??e.key;t.comment=t.comment?`${o.comment}\n${t.comment}`:o.comment}o=e}e.items[s]=n.isPair(o)?o:new r.Pair(o)}}else t("Expected a sequence for this tag");return e}function c(e,t,s){const{replacer:n}=s,i=new o.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let o,c;if("function"==typeof n&&(e=n.call(t,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);o=e[0],c=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);o=t[0],c=e[o]}else o=e;i.items.push(r.createPair(o,c,s))}return i}const l={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:a,createNode:c};t.createPairs=c,t.pairs=l,t.resolvePairs=a},7392:(e,t,s)=>{var n=s(520),r=s(6465),i=s(5117),o=s(3561),a=s(4510),c=s(8599),l=s(2229),u=s(6930),p=s(1026),f=s(8622),h=s(9703),d=s(8879);const m=[n.map,i.seq,o.string,r.nullTag,c.trueTag,c.falseTag,u.intBin,u.intOct,u.int,u.intHex,l.floatNaN,l.floatExp,l.float,a.binary,p.omap,f.pairs,h.set,d.intTime,d.floatTime,d.timestamp];t.schema=m},9703:(e,t,s)=>{var n=s(9414),r=s(6120),i=s(1501);class o extends i.YAMLMap{constructor(e){super(e),this.tag=o.tag}add(e){let t;t=n.isPair(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new r.Pair(e.key,null):new r.Pair(e,null),i.findPair(this.items,t.key)||this.items.push(t)}get(e,t){const s=i.findPair(this.items,e);return!t&&n.isPair(s)?n.isScalar(s.key)?s.key.value:s.key:s}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const s=i.findPair(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new r.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw new Error("Set items must all have null values")}static from(e,t,s){const{replacer:n}=s,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),i.items.push(r.createPair(e,null,s));return i}}o.tag="tag:yaml.org,2002:set";const a={collection:"map",identify:e=>e instanceof Set,nodeClass:o,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,s)=>o.from(e,t,s),resolve(e,t){if(n.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new o,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};t.YAMLSet=o,t.set=a},8879:(e,t,s)=>{var n=s(1522);function r(e,t){const s=e[0],n="-"===s||"+"===s?e.substring(1):e,r=e=>t?BigInt(e):Number(e),i=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*r(60)+r(t)),r(0));return"-"===s?r(-1)*i:i}function i(e){let{value:t}=e,s=e=>e;if("bigint"==typeof t)s=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return n.stringifyNumber(e);let r="";t<0&&(r="-",t*=s(-1));const i=s(60),o=[t%i];return t<60?o.unshift(0):(t=(t-o[0])/i,o.unshift(t%i),t>=60&&(t=(t-o[0])/i,o.unshift(t))),r+o.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const o={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:s})=>r(e,s),stringify:i},a={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>r(e,!1),stringify:i},c={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(c.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,s,n,i,o,a,l]=t.map(Number),u=t[7]?Number((t[7]+"00").substr(1,3)):0;let p=Date.UTC(s,n-1,i,o||0,a||0,l||0,u);const f=t[8];if(f&&"Z"!==f){let e=r(f,!1);Math.abs(e)<30&&(e*=60),p-=6e4*e}return new Date(p)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};t.floatTime=a,t.intTime=o,t.timestamp=c},8592:(e,t)=>{const s="block",n="quoted";function r(e,t,s){let n=t,r=t+1,i=e[r];for(;" "===i||"\t"===i;)if(t<r+s)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);n=t,r=t+1,i=e[r]}return n}t.FOLD_BLOCK=s,t.FOLD_FLOW="flow",t.FOLD_QUOTED=n,t.foldFlowLines=function(e,t,i="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:c=20,onFold:l,onOverflow:u}={}){if(!a||a<0)return e;a<c&&(c=0);const p=Math.max(1+c,1+a-t.length);if(e.length<=p)return e;const f=[],h={};let d,m,g=a-t.length;"number"==typeof o&&(o>a-Math.max(2,c)?f.push(0):g=a-o);let y=!1,b=-1,w=-1,E=-1;i===s&&(b=r(e,b,t.length),-1!==b&&(g=b+p));for(let o;o=e[b+=1];){if(i===n&&"\\"===o){switch(w=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}E=b}if("\n"===o)i===s&&(b=r(e,b,t.length)),g=b+t.length+p,d=void 0;else{if(" "===o&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const t=e[b+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(d=b)}if(b>=g)if(d)f.push(d),g=d+p,d=void 0;else if(i===n){for(;" "===m||"\t"===m;)m=o,o=e[b+=1],y=!0;const t=b>E+1?b-2:w-1;if(h[t])return e;f.push(t),h[t]=!0,g=t+p,d=void 0}else y=!0}m=o}if(y&&u&&u(),0===f.length)return e;l&&l();let S=e.slice(0,f[0]);for(let s=0;s<f.length;++s){const r=f[s],o=f[s+1]||e.length;0===r?S=`\n${t}${e.slice(0,o)}`:(i===n&&h[r]&&(S+=`${e[r]}\\`),S+=`\n${t}${e.slice(r+1,o)}`)}return S}},8551:(e,t,s)=>{var n=s(2663),r=s(9414),i=s(6214),o=s(5170);t.createStringifyContext=function(e,t){const s=Object.assign({blockQuote:!0,commentString:i.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(s.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof s.indent?" ".repeat(s.indent):" ",inFlow:n,options:s}},t.stringify=function(e,t,s,i){if(r.isPair(e))return e.toString(t,s,i);if(r.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a;const c=r.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a||(a=function(e,t){if(t.tag){const s=e.filter((e=>e.tag===t.tag));if(s.length>0)return s.find((e=>e.format===t.format))??s[0]}let s,n;if(r.isScalar(t)){n=t.value;const r=e.filter((e=>e.identify?.(n)));s=r.find((e=>e.format===t.format))??r.find((e=>!e.format))}else n=t,s=e.find((e=>e.nodeClass&&n instanceof e.nodeClass));if(!s)throw new Error(`Tag not resolved for ${n?.constructor?.name??typeof n} value`);return s}(t.doc.schema.tags,c));const l=function(e,t,{anchors:s,doc:i}){if(!i.directives)return"";const o=[],a=(r.isScalar(e)||r.isCollection(e))&&e.anchor;a&&n.anchorIsValid(a)&&(s.add(a),o.push(`&${a}`));const c=e.tag?e.tag:t.default?null:t.tag;return c&&o.push(i.directives.tagString(c)),o.join(" ")}(c,a,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);const u="function"==typeof a.stringify?a.stringify(c,t,s,i):r.isScalar(c)?o.stringifyString(c,t,s,i):c.toString(t,s,i);return l?r.isScalar(c)||"{"===u[0]||"["===u[0]?`${l} ${u}`:`${l}\n${t.indent}${u}`:u}},6627:(e,t,s)=>{var n=s(9414),r=s(8551),i=s(6214);function o({comment:e,items:t},s,{blockItemPrefix:o,flowChars:a,itemIndent:l,onChompKeep:u,onComment:p}){const{indent:f,options:{commentString:h}}=s,d=Object.assign({},s,{indent:l,type:null});let m=!1;const g=[];for(let e=0;e<t.length;++e){const a=t[e];let u=null;if(n.isNode(a))!m&&a.spaceBefore&&g.push(""),c(s,g,a.commentBefore,m),a.comment&&(u=a.comment);else if(n.isPair(a)){const e=n.isNode(a.key)?a.key:null;e&&(!m&&e.spaceBefore&&g.push(""),c(s,g,e.commentBefore,m))}m=!1;let p=r.stringify(a,d,(()=>u=null),(()=>m=!0));u&&(p+=i.lineComment(p,l,h(u))),m&&u&&(m=!1),g.push(o+p)}let y;if(0===g.length)y=a.start+a.end;else{y=g[0];for(let e=1;e<g.length;++e){const t=g[e];y+=t?`\n${f}${t}`:"\n"}}return e?(y+="\n"+i.indentComment(h(e),f),p&&p()):m&&u&&u(),y}function a({items:e},t,{flowChars:s,itemIndent:o}){const{indent:a,indentStep:l,flowCollectionPadding:u,options:{commentString:p}}=t;o+=l;const f=Object.assign({},t,{indent:o,inFlow:!0,type:null});let h=!1,d=0;const m=[];for(let s=0;s<e.length;++s){const a=e[s];let l=null;if(n.isNode(a))a.spaceBefore&&m.push(""),c(t,m,a.commentBefore,!1),a.comment&&(l=a.comment);else if(n.isPair(a)){const e=n.isNode(a.key)?a.key:null;e&&(e.spaceBefore&&m.push(""),c(t,m,e.commentBefore,!1),e.comment&&(h=!0));const s=n.isNode(a.value)?a.value:null;s?(s.comment&&(l=s.comment),s.commentBefore&&(h=!0)):null==a.value&&e?.comment&&(l=e.comment)}l&&(h=!0);let u=r.stringify(a,f,(()=>l=null));s<e.length-1&&(u+=","),l&&(u+=i.lineComment(u,o,p(l))),!h&&(m.length>d||u.includes("\n"))&&(h=!0),m.push(u),d=m.length}const{start:g,end:y}=s;if(0===m.length)return g+y;if(!h){const e=m.reduce(((e,t)=>e+t.length+2),2);h=t.options.lineWidth>0&&e>t.options.lineWidth}if(h){let e=g;for(const t of m)e+=t?`\n${l}${a}${t}`:"\n";return`${e}\n${a}${y}`}return`${g}${u}${m.join(" ")}${u}${y}`}function c({indent:e,options:{commentString:t}},s,n,r){if(n&&r&&(n=n.replace(/^\n+/,"")),n){const r=i.indentComment(t(n),e);s.push(r.trimStart())}}t.stringifyCollection=function(e,t,s){return(t.inFlow??e.flow?a:o)(e,t,s)}},6214:(e,t)=>{function s(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}t.indentComment=s,t.lineComment=(e,t,n)=>e.endsWith("\n")?s(n,t):n.includes("\n")?"\n"+s(n,t):(e.endsWith(" ")?"":" ")+n,t.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#")},3698:(e,t,s)=>{var n=s(9414),r=s(8551),i=s(6214);t.stringifyDocument=function(e,t){const s=[];let o=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(s.push(t),o=!0):e.directives.docStart&&(o=!0)}o&&s.push("---");const a=r.createStringifyContext(e,t),{commentString:c}=a.options;if(e.commentBefore){1!==s.length&&s.unshift("");const t=c(e.commentBefore);s.unshift(i.indentComment(t,""))}let l=!1,u=null;if(e.contents){if(n.isNode(e.contents)){if(e.contents.spaceBefore&&o&&s.push(""),e.contents.commentBefore){const t=c(e.contents.commentBefore);s.push(i.indentComment(t,""))}a.forceBlockIndent=!!e.comment,u=e.contents.comment}const t=u?void 0:()=>l=!0;let p=r.stringify(e.contents,a,(()=>u=null),t);u&&(p+=i.lineComment(p,"",c(u))),"|"!==p[0]&&">"!==p[0]||"---"!==s[s.length-1]?s.push(p):s[s.length-1]=`--- ${p}`}else s.push(r.stringify(e.contents,a));if(e.directives?.docEnd)if(e.comment){const t=c(e.comment);t.includes("\n")?(s.push("..."),s.push(i.indentComment(t,""))):s.push(`... ${t}`)}else s.push("...");else{let t=e.comment;t&&l&&(t=t.replace(/^\n+/,"")),t&&(l&&!u||""===s[s.length-1]||s.push(""),s.push(i.indentComment(c(t),"")))}return s.join("\n")+"\n"}},1522:(e,t)=>{t.stringifyNumber=function({format:e,minFractionDigits:t,tag:s,value:n}){if("bigint"==typeof n)return String(n);const r="number"==typeof n?n:Number(n);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=JSON.stringify(n);if(!e&&t&&(!s||"tag:yaml.org,2002:float"===s)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let s=t-(i.length-e-1);for(;s-- >0;)i+="0"}return i}},5827:(e,t,s)=>{var n=s(9414),r=s(3268),i=s(8551),o=s(6214);t.stringifyPair=function({key:e,value:t},s,a,c){const{allNullValues:l,doc:u,indent:p,indentStep:f,options:{commentString:h,indentSeq:d,simpleKeys:m}}=s;let g=n.isNode(e)&&e.comment||null;if(m){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(n.isCollection(e)||!n.isNode(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let y=!m&&(!e||g&&null==t&&!s.inFlow||n.isCollection(e)||(n.isScalar(e)?e.type===r.Scalar.BLOCK_FOLDED||e.type===r.Scalar.BLOCK_LITERAL:"object"==typeof e));s=Object.assign({},s,{allNullValues:!1,implicitKey:!y&&(m||!l),indent:p+f});let b,w,E,S=!1,v=!1,A=i.stringify(e,s,(()=>S=!0),(()=>v=!0));if(!y&&!s.inFlow&&A.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(s.inFlow){if(l||null==t)return S&&a&&a(),""===A?"?":y?`? ${A}`:A}else if(l&&!m||null==t&&y)return A=`? ${A}`,g&&!S?A+=o.lineComment(A,s.indent,h(g)):v&&c&&c(),A;S&&(g=null),y?(g&&(A+=o.lineComment(A,s.indent,h(g))),A=`? ${A}\n${p}:`):(A=`${A}:`,g&&(A+=o.lineComment(A,s.indent,h(g)))),n.isNode(t)?(b=!!t.spaceBefore,w=t.commentBefore,E=t.comment):(b=!1,w=null,E=null,t&&"object"==typeof t&&(t=u.createNode(t))),s.implicitKey=!1,y||g||!n.isScalar(t)||(s.indentAtStart=A.length+1),v=!1,d||!(f.length>=2)||s.inFlow||y||!n.isSeq(t)||t.flow||t.tag||t.anchor||(s.indent=s.indent.substring(2));let k=!1;const C=i.stringify(t,s,(()=>k=!0),(()=>v=!0));let O=" ";if(g||b||w){if(O=b?"\n":"",w){const e=h(w);O+=`\n${o.indentComment(e,s.indent)}`}""!==C||s.inFlow?O+=`\n${s.indent}`:"\n"===O&&(O="\n\n")}else if(!y&&n.isCollection(t)){const e=C[0],n=C.indexOf("\n"),r=-1!==n,i=s.inFlow??t.flow??0===t.items.length;if(r||!i){let t=!1;if(r&&("&"===e||"!"===e)){let s=C.indexOf(" ");"&"===e&&-1!==s&&s<n&&"!"===C[s+1]&&(s=C.indexOf(" ",s+1)),(-1===s||n<s)&&(t=!0)}t||(O=`\n${s.indent}`)}}else""!==C&&"\n"!==C[0]||(O="");return A+=O+C,s.inFlow?k&&a&&a():E&&!k?A+=o.lineComment(A,s.indent,h(E)):v&&c&&c(),A}},5170:(e,t,s)=>{var n=s(3268),r=s(8592);const i=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),o=e=>/^(%|---|\.\.\.)/m.test(e);function a(e,t){const s=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return s;const{implicitKey:n}=t,a=t.options.doubleQuotedMinMultiLineLength,c=t.indent||(o(e)?" ":"");let l="",u=0;for(let e=0,t=s[e];t;t=s[++e])if(" "===t&&"\\"===s[e+1]&&"n"===s[e+2]&&(l+=s.slice(u,e)+"\\ ",e+=1,u=e,t="\\"),"\\"===t)switch(s[e+1]){case"u":{l+=s.slice(u,e);const t=s.substr(e+2,4);switch(t){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:"00"===t.substr(0,2)?l+="\\x"+t.substr(2):l+=s.substr(e,6)}e+=5,u=e+1}break;case"n":if(n||'"'===s[e+2]||s.length<a)e+=1;else{for(l+=s.slice(u,e)+"\n\n";"\\"===s[e+2]&&"n"===s[e+3]&&'"'!==s[e+4];)l+="\n",e+=2;l+=c," "===s[e+2]&&(l+="\\"),e+=1,u=e+1}break;default:e+=1}return l=u?l+s.slice(u):s,n?l:r.foldFlowLines(l,c,r.FOLD_QUOTED,i(t,!1))}function c(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return a(e,t);const s=t.indent||(o(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${s}`)+"'";return t.implicitKey?n:r.foldFlowLines(n,s,r.FOLD_FLOW,i(t,!1))}function l(e,t){const{singleQuote:s}=t.options;let n;if(!1===s)n=a;else{const t=e.includes('"'),r=e.includes("'");n=t&&!r?c:r&&!t?a:s?c:a}return n(e,t)}let u;try{u=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{u=/\n+(?!\n|$)/g}function p({comment:e,type:t,value:s},a,c,p){const{blockQuote:f,commentString:h,lineWidth:d}=a.options;if(!f||/\n[\t ]+$/.test(s)||/^\s*$/.test(s))return l(s,a);const m=a.indent||(a.forceBlockIndent||o(s)?" ":""),g="literal"===f||"folded"!==f&&t!==n.Scalar.BLOCK_FOLDED&&(t===n.Scalar.BLOCK_LITERAL||!function(e,t,s){if(!t||t<0)return!1;const n=t-s,r=e.length;if(r<=n)return!1;for(let t=0,s=0;t<r;++t)if("\n"===e[t]){if(t-s>n)return!0;if(s=t+1,r-s<=n)return!1}return!0}(s,d,m.length));if(!s)return g?"|\n":">\n";let y,b;for(b=s.length;b>0;--b){const e=s[b-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let w=s.substring(b);const E=w.indexOf("\n");-1===E?y="-":s===w||E!==w.length-1?(y="+",p&&p()):y="",w&&(s=s.slice(0,-w.length),"\n"===w[w.length-1]&&(w=w.slice(0,-1)),w=w.replace(u,`$&${m}`));let S,v=!1,A=-1;for(S=0;S<s.length;++S){const e=s[S];if(" "===e)v=!0;else{if("\n"!==e)break;A=S}}let k=s.substring(0,A<S?A+1:S);k&&(s=s.substring(k.length),k=k.replace(/\n+/g,`$&${m}`));let C=(g?"|":">")+(v?m?"2":"1":"")+y;return e&&(C+=" "+h(e.replace(/ ?[\r\n]+/g," ")),c&&c()),g?`${C}\n${m}${k}${s=s.replace(/\n+/g,`$&${m}`)}${w}`:(s=s.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`),`${C}\n${m}${r.foldFlowLines(`${k}${s}${w}`,m,r.FOLD_BLOCK,i(a,!0))}`)}t.stringifyString=function(e,t,s,u){const{implicitKey:f,inFlow:h}=t,d="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:m}=e;m!==n.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(m=n.Scalar.QUOTE_DOUBLE);const g=e=>{switch(e){case n.Scalar.BLOCK_FOLDED:case n.Scalar.BLOCK_LITERAL:return f||h?l(d.value,t):p(d,t,s,u);case n.Scalar.QUOTE_DOUBLE:return a(d.value,t);case n.Scalar.QUOTE_SINGLE:return c(d.value,t);case n.Scalar.PLAIN:return function(e,t,s,a){const{type:c,value:u}=e,{actualString:f,implicitKey:h,indent:d,indentStep:m,inFlow:g}=t;if(h&&u.includes("\n")||g&&/[[\]{},]/.test(u))return l(u,t);if(!u||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return h||g||!u.includes("\n")?l(u,t):p(e,t,s,a);if(!h&&!g&&c!==n.Scalar.PLAIN&&u.includes("\n"))return p(e,t,s,a);if(o(u)){if(""===d)return t.forceBlockIndent=!0,p(e,t,s,a);if(h&&d===m)return l(u,t)}const y=u.replace(/\n+/g,`$&\n${d}`);if(f){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(y),{compat:s,tags:n}=t.doc.schema;if(n.some(e)||s?.some(e))return l(u,t)}return h?y:r.foldFlowLines(y,d,r.FOLD_FLOW,i(t,!1))}(d,t,s,u);default:return null}};let y=g(m);if(null===y){const{defaultKeyType:e,defaultStringType:s}=t.options,n=f&&e||s;if(y=g(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y}},5695:(e,t,s)=>{var n=s(9414);const r=Symbol("break visit"),i=Symbol("skip children"),o=Symbol("remove node");function a(e,t){const s=p(t);n.isDocument(e)?c(null,e.contents,s,Object.freeze([e]))===o&&(e.contents=null):c(null,e,s,Object.freeze([]))}function c(e,t,s,i){const a=f(e,t,s,i);if(n.isNode(a)||n.isPair(a))return h(e,i,a),c(e,a,s,i);if("symbol"!=typeof a)if(n.isCollection(t)){i=Object.freeze(i.concat(t));for(let e=0;e<t.items.length;++e){const n=c(e,t.items[e],s,i);if("number"==typeof n)e=n-1;else{if(n===r)return r;n===o&&(t.items.splice(e,1),e-=1)}}}else if(n.isPair(t)){i=Object.freeze(i.concat(t));const e=c("key",t.key,s,i);if(e===r)return r;e===o&&(t.key=null);const n=c("value",t.value,s,i);if(n===r)return r;n===o&&(t.value=null)}return a}async function l(e,t){const s=p(t);n.isDocument(e)?await u(null,e.contents,s,Object.freeze([e]))===o&&(e.contents=null):await u(null,e,s,Object.freeze([]))}async function u(e,t,s,i){const a=await f(e,t,s,i);if(n.isNode(a)||n.isPair(a))return h(e,i,a),u(e,a,s,i);if("symbol"!=typeof a)if(n.isCollection(t)){i=Object.freeze(i.concat(t));for(let e=0;e<t.items.length;++e){const n=await u(e,t.items[e],s,i);if("number"==typeof n)e=n-1;else{if(n===r)return r;n===o&&(t.items.splice(e,1),e-=1)}}}else if(n.isPair(t)){i=Object.freeze(i.concat(t));const e=await u("key",t.key,s,i);if(e===r)return r;e===o&&(t.key=null);const n=await u("value",t.value,s,i);if(n===r)return r;n===o&&(t.value=null)}return a}function p(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function f(e,t,s,r){return"function"==typeof s?s(e,t,r):n.isMap(t)?s.Map?.(e,t,r):n.isSeq(t)?s.Seq?.(e,t,r):n.isPair(t)?s.Pair?.(e,t,r):n.isScalar(t)?s.Scalar?.(e,t,r):n.isAlias(t)?s.Alias?.(e,t,r):void 0}function h(e,t,s){const r=t[t.length-1];if(n.isCollection(r))r.items[e]=s;else if(n.isPair(r))"key"===e?r.key=s:r.value=s;else{if(!n.isDocument(r)){const e=n.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}r.contents=s}}a.BREAK=r,a.SKIP=i,a.REMOVE=o,l.BREAK=r,l.SKIP=i,l.REMOVE=o,t.visit=a,t.visitAsync=l},4190:(e,t,s)=>{s.d(t,{default:()=>ti});var n=s(8894),r=s(4573),i=s(6760),o=s(1421),a=s(1708),c=s(526),l=s(5190);const u=(e,t,s,n)=>{if("length"===s||"prototype"===s)return;if("arguments"===s||"caller"===s)return;const r=Object.getOwnPropertyDescriptor(e,s),i=Object.getOwnPropertyDescriptor(t,s);!p(r,i)&&n||Object.defineProperty(e,s,i)},p=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},f=(e,t)=>`/* Wrapped ${e}*/\n${t}`,h=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),d=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");const m=new WeakMap,g=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let s,n=0;const r=e.displayName||e.name||"<anonymous>",i=function(...o){if(m.set(i,++n),1===n)s=e.apply(this,o),e=null;else if(!0===t.throw)throw new Error(`Function \`${r}\` can only be called once`);return s};return function(e,t,{ignoreNonConfigurable:s=!1}={}){const{name:n}=e;for(const n of Reflect.ownKeys(t))u(e,t,n,s);((e,t)=>{const s=Object.getPrototypeOf(t);s!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,s)})(e,t),((e,t,s)=>{const n=""===s?"":`with ${s.trim()}() `,r=f.bind(null,n,t.toString());Object.defineProperty(r,"name",d),Object.defineProperty(e,"toString",{...h,value:r})})(e,t,n)}(i,e),m.set(i,n),i};g.callCount=e=>{if(!m.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return m.get(e)};const y=g;var b=s(8161);const w=(e,t)=>({name:`SIGRT${t+1}`,number:E+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),E=34,S=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],v=()=>{const e=(()=>{const e=64-E+1;return Array.from({length:e},w)})();return[...S,...e].map(A)},A=({name:e,number:t,description:s,action:n,forced:r=!1,standard:i})=>{const{signals:{[e]:o}}=b.constants,a=void 0!==o;return{name:e,number:a?o:t,description:s,supported:a,action:n,forced:r,standard:i}},k=({name:e,number:t,description:s,supported:n,action:r,forced:i,standard:o})=>[e,{name:e,number:t,description:s,supported:n,action:r,forced:i,standard:o}],C=(()=>{const e=v();return Object.fromEntries(e.map(k))})(),O=(e,t)=>{const s=t.find((({name:t})=>b.constants.signals[t]===e));return void 0!==s?s:t.find((t=>t.number===e))},T=((()=>{const e=v(),t=Array.from({length:65},((t,s)=>((e,t)=>{const s=O(e,t);if(void 0===s)return{};const{name:n,description:r,supported:i,action:o,forced:a,standard:c}=s;return{[e]:{name:n,number:e,description:r,supported:i,action:o,forced:a,standard:c}}})(s,e)));Object.assign({},...t)})(),({stdout:e,stderr:t,all:s,error:n,signal:r,exitCode:i,command:o,escapedCommand:c,timedOut:l,isCanceled:u,killed:p,parsed:{options:{timeout:f,cwd:h=a.cwd()}}})=>{i=null===i?void 0:i;const d=void 0===(r=null===r?void 0:r)?void 0:C[r].description,m=(({timedOut:e,timeout:t,errorCode:s,signal:n,signalDescription:r,exitCode:i,isCanceled:o})=>e?`timed out after ${t} milliseconds`:o?"was canceled":void 0!==s?`failed with ${s}`:void 0!==n?`was killed with ${n} (${r})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:f,errorCode:n&&n.code,signal:r,signalDescription:d,exitCode:i,isCanceled:u}),g=`Command ${m}: ${o}`,y="[object Error]"===Object.prototype.toString.call(n),b=y?`${g}\n${n.message}`:g,w=[b,t,e].filter(Boolean).join("\n");return y?(n.originalMessage=n.message,n.message=w):n=new Error(w),n.shortMessage=b,n.command=o,n.escapedCommand=c,n.exitCode=i,n.signal=r,n.signalDescription=d,n.stdout=e,n.stderr=t,n.cwd=h,void 0!==s&&(n.all=s),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=Boolean(l),n.isCanceled=u,n.killed=p&&!l,n}),x=["stdin","stdout","stderr"];var R=s(7017);const L=(e,t="SIGTERM",s={})=>{const n=e(t);return _(e,t,s,n),n},_=(e,t,s,n)=>{if(!I(t,s,n))return;const r=P(s),i=setTimeout((()=>{e("SIGKILL")}),r);i.unref&&i.unref()},I=(e,{forceKillAfterTimeout:t},s)=>N(e)&&!1!==t&&s,N=e=>e===b.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),P=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},$=(e,t)=>{e.kill()&&(t.isCanceled=!0)},B=(e,{timeout:t,killSignal:s="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let r;const i=new Promise(((n,i)=>{r=setTimeout((()=>{((e,t,s)=>{e.kill(t),s(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,s,i)}),t)})),o=n.finally((()=>{clearTimeout(r)}));return Promise.race([i,o])},M=({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},D=async(e,{cleanup:t,detached:s},n)=>{if(!t||s)return n;const r=(0,R.cf)((()=>{e.kill()}));return n.finally((()=>{r()}))};var F=s(3024);function H(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function j(e){return H(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}const U=(e,t,s)=>{if("string"==typeof s)return e[t].pipe((0,F.createWriteStream)(s)),e;if(j(s))return e[t].pipe(s),e;if(!(e=>e instanceof o.ChildProcess&&"function"==typeof e.then)(s))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!j(s.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(s.stdin),s},K=e=>{null!==e.stdout&&(e.pipeStdout=U.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=U.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=U.bind(void 0,e,"all"))};var G=s(8500);const q=async(e,{init:t,convertChunk:s,getSize:n,truncateChunk:r,addChunk:i,getFinalChunk:o,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{if(!z(e))throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");const l=t();l.length=0;try{for await(const t of e){const e=s[Q(t)](t,l);W({convertedChunk:e,state:l,getSize:n,truncateChunk:r,addChunk:i,maxBuffer:c})}return Y({state:l,convertChunk:s,getSize:n,truncateChunk:r,addChunk:i,getFinalChunk:o,maxBuffer:c}),a(l)}catch(e){throw e.bufferedData=a(l),e}},Y=({state:e,getSize:t,truncateChunk:s,addChunk:n,getFinalChunk:r,maxBuffer:i})=>{const o=r(e);void 0!==o&&W({convertedChunk:o,state:e,getSize:t,truncateChunk:s,addChunk:n,maxBuffer:i})},W=({convertedChunk:e,state:t,getSize:s,truncateChunk:n,addChunk:r,maxBuffer:i})=>{const o=s(e),a=t.length+o;if(a<=i)return void V(e,t,r,a);const c=n(e,i-t.length);throw void 0!==c&&V(c,t,r,i),new X},V=(e,t,s,n)=>{t.contents=s(e,t,n),t.length=n},z=e=>"object"==typeof e&&null!==e&&"function"==typeof e[Symbol.asyncIterator],Q=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const s=J.call(e);return"[object ArrayBuffer]"===s?"arrayBuffer":"[object DataView]"===s?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===J.call(e.buffer)?"typedArray":"others"},{toString:J}=Object.prototype;class X extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const Z=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},ee=e=>e.length,te=new TextEncoder,se=e=>new Uint8Array(e),ne=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),re=e=>ie**Math.ceil(Math.log(e)/Math.log(ie)),ie=2,oe=()=>"resize"in ArrayBuffer.prototype,ae={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>te.encode(e),buffer:se,arrayBuffer:se,dataView:ne,typedArray:ne,others:Z},getSize:ee,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:s},n)=>{const r=oe()?((e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const s=new ArrayBuffer(t,{maxByteLength:re(t)});return new Uint8Array(s).set(new Uint8Array(e),0),s})(t,n):((e,t)=>{if(t<=e.byteLength)return e;const s=new ArrayBuffer(re(t));return new Uint8Array(s).set(new Uint8Array(e),0),s})(t,n);return new Uint8Array(r).set(e,s),r},getFinalChunk:()=>{},finalize:({contents:e,length:t})=>oe()?e:e.slice(0,t)};async function ce(e,t){if(!("Buffer"in globalThis))throw new Error("getStreamAsBuffer() is only supported in Node.js");try{return le(await async function(e,t){return q(e,ae,t)}(e,t))}catch(e){throw void 0!==e.bufferedData&&(e.bufferedData=le(e.bufferedData)),e}}const le=e=>globalThis.Buffer.from(e),ue=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),pe={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:e=>e,buffer:ue,arrayBuffer:ue,dataView:ue,typedArray:ue,others:Z},getSize:ee,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:({contents:e})=>e};var fe=s(1404);const he=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},de=(e,t)=>{const s=(({input:e,inputFile:t})=>"string"!=typeof t?e:(he(e),(0,F.createReadStream)(t)))(t);void 0!==s&&(H(s)?s.pipe(e.stdin):e.stdin.end(s))},me=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const s=fe();return e.stdout&&s.add(e.stdout),e.stderr&&s.add(e.stderr),s},ge=async(e,t)=>{if(e&&void 0!==t){await(0,G.setTimeout)(0),e.destroy();try{return await t}catch(e){return e.bufferedData}}},ye=(e,{encoding:t,buffer:s,maxBuffer:n})=>{if(e&&s)return"utf8"===t||"utf-8"===t?async function(e,t){return q(e,pe,t)}(e,{maxBuffer:n}):null===t||"buffer"===t?ce(e,{maxBuffer:n}):be(e,n,t)},be=async(e,t,s)=>(await ce(e,{maxBuffer:t})).toString(s),we=async({stdout:e,stderr:t,all:s},{encoding:n,buffer:r,maxBuffer:i},o)=>{const a=ye(e,{encoding:n,buffer:r,maxBuffer:i}),c=ye(t,{encoding:n,buffer:r,maxBuffer:i}),l=ye(s,{encoding:n,buffer:r,maxBuffer:2*i});try{return await Promise.all([o,a,c,l])}catch(n){return Promise.all([{error:n,signal:n.signal,timedOut:n.timedOut},ge(e,a),ge(t,c),ge(s,l)])}},Ee=(async()=>{})().constructor.prototype,Se=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Ee,e)])),ve=(e,t)=>{for(const[s,n]of Se){const r="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,s,{...n,value:r})}},Ae=e=>new Promise(((t,s)=>{e.on("exit",((e,s)=>{t({exitCode:e,signal:s})})),e.on("error",(e=>{s(e)})),e.stdin&&e.stdin.on("error",(e=>{s(e)}))})),ke=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Ce=/^[\w.-]+$/,Oe=(e,t)=>ke(e,t).join(" "),Te=(e,t)=>ke(e,t).map((e=>(e=>"string"!=typeof e||Ce.test(e)?e:`"${e.replaceAll('"','\\"')}"`)(e))).join(" "),xe=/ +/g,Re=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if("object"===t&&null!==e&&!(e instanceof o.ChildProcess)&&"stdout"in e){const t=typeof e.stdout;if("string"===t)return e.stdout;if(r.Buffer.isBuffer(e.stdout))return e.stdout.toString();throw new TypeError(`Unexpected "${t}" stdout in template expression`)}throw new TypeError(`Unexpected "${t}" in template expression`)},Le=(e,t,s)=>s||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],_e=({templates:e,expressions:t,tokens:s,index:n,template:r})=>{const i=r??e.raw[n],o=i.split(xe).filter(Boolean),a=Le(s,o,i.startsWith(" "));if(n===t.length)return a;const c=t[n],l=Array.isArray(c)?c.map((e=>Re(e))):[Re(c)];return Le(a,l,i.endsWith(" "))},Ie=(e,t)=>{let s=[];for(const[n,r]of e.entries())s=_e({templates:e,expressions:t,tokens:s,index:n,template:r});return s};var Ne=s(7975);const Pe=(0,Ne.debuglog)("execa").enabled,$e=(e,t)=>String(e).padStart(t,"0"),Be=(e,{verbose:t})=>{t&&a.stderr.write(`[${(()=>{const e=new Date;return`${$e(e.getHours(),2)}:${$e(e.getMinutes(),2)}:${$e(e.getSeconds(),2)}.${$e(e.getMilliseconds(),3)}`})()}] ${e}\n`)},Me=(e,t,s={})=>{const n=c._parse(e,t,s);return e=n.command,t=n.args,(s={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(s=n.options).cwd||a.cwd(),execPath:a.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Pe,...s}).env=(({env:e,extendEnv:t,preferLocal:s,localDir:n,execPath:r})=>{const i=t?{...a.env,...e}:e;return s?(0,l.V)({env:i,cwd:n,execPath:r}):i})(s),s.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return x.map((t=>e[t]));if((e=>x.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${x.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof t)return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);const s=Math.max(t.length,x.length);return Array.from({length:s},((e,s)=>t[s]))})(s),"win32"===a.platform&&"cmd"===i.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:s,parsed:n}},De=(e,t,s)=>"string"==typeof t||r.Buffer.isBuffer(t)?e.stripFinalNewline?function(e){const t="string"==typeof e?"\n":"\n".charCodeAt(),s="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===s&&(e=e.slice(0,-1)),e}(t):t:void 0===s?void 0:"";function Fe(e,t,s){const n=Me(e,t,s),r=Oe(e,t),i=Te(e,t);let a;Be(i,n.options),M(n.options);try{a=o.spawn(n.file,n.args,n.options)}catch(e){const t=new o.ChildProcess,s=Promise.reject(T({error:e,stdout:"",stderr:"",all:"",command:r,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return ve(t,s),t}const c=Ae(a),l=B(a,n.options,c),u=D(a,n.options,l),p={isCanceled:!1};a.kill=L.bind(null,a.kill.bind(a)),a.cancel=$.bind(null,a,p);const f=y((async()=>{const[{error:e,exitCode:t,signal:s,timedOut:o},c,l,f]=await we(a,n.options,u),h=De(n.options,c),d=De(n.options,l),m=De(n.options,f);if(e||0!==t||null!==s){const c=T({error:e,exitCode:t,signal:s,stdout:h,stderr:d,all:m,command:r,escapedCommand:i,parsed:n,timedOut:o,isCanceled:p.isCanceled||!!n.options.signal&&n.options.signal.aborted,killed:a.killed});if(!n.options.reject)return c;throw c}return{command:r,escapedCommand:i,exitCode:0,stdout:h,stderr:d,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return de(a,n.options),a.all=me(a,n.options),K(a),ve(a,f),a}function He(e,t,s){const n=Me(e,t,s),r=Oe(e,t),i=Te(e,t);Be(i,n.options);const a=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(he(e),(0,F.readFileSync)(t)))(e);if(H(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(n.options);let c;try{c=o.spawnSync(n.file,n.args,{...n.options,input:a})}catch(e){throw T({error:e,stdout:"",stderr:"",all:"",command:r,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const l=De(n.options,c.stdout,c.error),u=De(n.options,c.stderr,c.error);if(c.error||0!==c.status||null!==c.signal){const e=T({stdout:l,stderr:u,error:c.error,signal:c.signal,exitCode:c.status,command:r,escapedCommand:i,parsed:n,timedOut:c.error&&"ETIMEDOUT"===c.error.code,isCanceled:!1,killed:null!==c.signal});if(!n.options.reject)return e;throw e}return{command:r,escapedCommand:i,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}const je=({input:e,inputFile:t,stdio:s})=>void 0===e&&void 0===t&&void 0===s?{stdin:"inherit"}:{},Ue=(e={})=>({preferLocal:!0,...je(e),...e});!function e(t){function s(s,...n){if(!Array.isArray(s))return e({...t,...s});const[r,...i]=Ie(s,n);return Fe(r,i,Ue(t))}return s.sync=(e,...s)=>{if(!Array.isArray(e))throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");const[n,...r]=Ie(e,s);return He(n,r,Ue(t))},s}();const Ke=n("lint-staged:execGit"),Ge=["-c","submodule.recurse=false"],qe=async(e,t={})=>{Ke("Running git command",e);try{const{stdout:s}=await Fe("git",Ge.concat(e),{...t,all:!0,cwd:t.cwd||process.cwd(),stdin:"ignore"});return s}catch({all:e}){throw new Error(e)}};var Ye=s(5441);const We=s(6296);var Ve=s(2018),ze=s.t(Ve,2);const{env:Qe={},argv:Je=[],platform:Xe=""}="undefined"==typeof process?{}:process,Ze="NO_COLOR"in Qe||Je.includes("--no-color"),et="FORCE_COLOR"in Qe||Je.includes("--color"),tt="win32"===Xe,st="dumb"===Qe.TERM,nt=ze&&Ve.isatty&&Ve.isatty(1)&&Qe.TERM&&!st,rt=!Ze&&(et||tt&&!st||nt||"CI"in Qe&&("GITHUB_ACTIONS"in Qe||"GITLAB_CI"in Qe||"CIRCLECI"in Qe)),it=(e,t,s,n,r=t.substring(0,e)+n,i=t.substring(e+s.length),o=i.indexOf(s))=>r+(o<0?i:it(o,i,s,n)),ot=(e,t,s)=>((e,t,s=e,n=e.length+1)=>r=>r||""!==r&&void 0!==r?((e,t,s,n,r)=>e<0?s+t+n:s+it(e,t,n,r)+n)((""+r).indexOf(t,n),r,e,t,s):"")(`\x1b[${e}m`,`\x1b[${t}m`,s),at={reset:ot(0,0),bold:ot(1,22,"\x1b[22m\x1b[1m"),dim:ot(2,22,"\x1b[22m\x1b[2m"),italic:ot(3,23),underline:ot(4,24),inverse:ot(7,27),hidden:ot(8,28),strikethrough:ot(9,29),black:ot(30,39),red:ot(31,39),green:ot(32,39),yellow:ot(33,39),blue:ot(34,39),magenta:ot(35,39),cyan:ot(36,39),white:ot(37,39),gray:ot(90,39),bgBlack:ot(40,49),bgRed:ot(41,49),bgGreen:ot(42,49),bgYellow:ot(43,49),bgBlue:ot(44,49),bgMagenta:ot(45,49),bgCyan:ot(46,49),bgWhite:ot(47,49),blackBright:ot(90,39),redBright:ot(91,39),greenBright:ot(92,39),yellowBright:ot(93,39),blueBright:ot(94,39),magentaBright:ot(95,39),cyanBright:ot(96,39),whiteBright:ot(97,39),bgBlackBright:ot(100,49),bgRedBright:ot(101,49),bgGreenBright:ot(102,49),bgYellowBright:ot(103,49),bgBlueBright:ot(104,49),bgMagentaBright:ot(105,49),bgCyanBright:ot(106,49),bgWhiteBright:ot(107,49)},ct=({useColor:e=rt}={})=>e?at:Object.keys(at).reduce(((e,t)=>({...e,[t]:String})),{}),{reset:lt,bold:ut,dim:pt,italic:ft,underline:ht,inverse:dt,hidden:mt,strikethrough:gt,black:yt,red:bt,green:wt,yellow:Et,blue:St,magenta:vt,cyan:At,white:kt,gray:Ct,bgBlack:Ot,bgRed:Tt,bgGreen:xt,bgYellow:Rt,bgBlue:Lt,bgMagenta:_t,bgCyan:It,bgWhite:Nt,blackBright:Pt,redBright:$t,greenBright:Bt,yellowBright:Mt,blueBright:Dt,magentaBright:Ft,cyanBright:Ht,whiteBright:jt,bgBlackBright:Ut,bgRedBright:Kt,bgGreenBright:Gt,bgYellowBright:qt,bgBlueBright:Yt,bgMagentaBright:Wt,bgCyanBright:Vt,bgWhiteBright:zt}=ct();var Qt=s(9023),Jt=s(857),Xt=s(3193),Zt=s(2203),es=s(9018),ts=s(6982),ss=Object.defineProperty,ns=(e,t)=>ss(e,"name",{value:t,configurable:!0}),rs="\x1b[?25l",is="\x1b[?25h",os=(e=>(e.WAITING="WAITING",e.STARTED="STARTED",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.SKIPPED="SKIPPED",e.ROLLING_BACK="ROLLING_BACK",e.ROLLED_BACK="ROLLED_BACK",e.RETRY="RETRY",e.PAUSED="PAUSED",e.PROMPT="PROMPT",e.PROMPT_COMPLETED="PROMPT_COMPLETED",e.PROMPT_FAILED="PROMPT_FAILED",e))(os||{}),as=class{static{ns(this,"EventManager")}emitter=new We;emit(e,t){this.emitter.emit(e,t)}on(e,t){this.emitter.addListener(e,t)}once(e,t){this.emitter.once(e,t)}off(e,t){this.emitter.off(e,t)}complete(){this.emitter.removeAllListeners()}};function cs(e){return!!e&&"object"==typeof e&&"function"==typeof e.lift&&"function"==typeof e.subscribe}function ls(e){return!!e&&"object"==typeof e&&!0===e.readable&&"function"==typeof e.read&&"function"==typeof e.on}function us(){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{ns(this,"BaseEventMap")}}),ns(cs,"isObservable"),ns(ls,"isReadable"),ns(us,"isUnicodeSupported");var ps=/\u0007/;function fs(e){return String(e).replace(new RegExp("(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+","gmi"),"").replace(new RegExp(ps,"gmi"),"").trim()}ns(fs,"cleanseAnsi");var hs=ct();function ds(e,t){return e.replace(/^(?!\s*$)/gm," ".repeat(t))}ns(ds,"indent");var ms={warning:"\u26a0",cross:"\u2716",arrowDown:"\u2193",tick:"\u2714",arrowRight:"\u2192",pointer:"\u276f",checkboxOn:"\u2612",arrowLeft:"\u2190",squareSmallFilled:"\u25fc",pointerSmall:"\u203a"},gs={...ms,warning:"\u203c",cross:"\xd7",tick:"\u221a",pointer:">",checkboxOn:"[\xd7]",squareSmallFilled:"\u25a0"},ys=us()?ms:gs;function bs(e,...t){return(0,Qt.format)(String(e),...t)}ns(bs,"splat");var ws={STARTED:ys.pointer,FAILED:ys.cross,SKIPPED:ys.arrowDown,COMPLETED:ys.tick,OUTPUT:ys.pointerSmall,TITLE:ys.arrowRight,RETRY:ys.warning,ROLLBACK:ys.arrowLeft,PAUSED:ys.squareSmallFilled},Es={STARTED:hs.yellow,FAILED:hs.red,SKIPPED:hs.yellow,COMPLETED:hs.green,RETRY:hs.yellowBright,ROLLBACK:hs.redBright,PAUSED:hs.yellowBright},Ss=["RETRY","ROLLBACK","FAILED"],vs=class{constructor(e){this.options=e,this.options={useIcons:!0,toStderr:[],...e??{}},this.options.fields??={},this.options.fields.prefix??=[],this.options.fields.suffix??=[],this.process=this.options.processOutput??new Cs}static{ns(this,"ListrLogger")}process;log(e,t,s){const n=this.format(e,t,s);this.options.toStderr.includes(e)?this.process.toStderr(n):this.process.toStdout(n)}toStdout(e,t,s=!0){this.process.toStdout(this.format(null,e,t),s)}toStderr(e,t,s=!0){this.process.toStderr(this.format(null,e,t),s)}wrap(e,t){return e?this.applyFormat(`[${e}]`,t):e}splat(...e){const t=e.shift()??"";return 0===e.length?t:bs(t,e)}suffix(e,...t){return t.filter(Boolean).forEach((t=>{if(e+=this.spacing(e),"string"==typeof t)e+=this.wrap(t);else if("object"==typeof t){if(t.args??=[],"function"==typeof t.condition?!t.condition(...t.args):!(t.condition??1))return e;e+=this.wrap("function"==typeof t.field?t.field(...t.args):t.field,{format:t?.format(...t.args)})}})),e}prefix(e,...t){return t.filter(Boolean).forEach((t=>{if(e=this.spacing(e)+e,"string"==typeof t)e=this.wrap(t)+e;else if("object"==typeof t){if(t.args??=[],"function"==typeof t.condition?!t.condition(...t.args):!(t.condition??1))return e;e=this.wrap("function"==typeof t.field?t.field(...t.args):t.field,{format:t?.format()})+e}})),e}fields(e,t){return this.options?.fields?.prefix&&(e=this.prefix(e,...this.options.fields.prefix)),t?.prefix&&(e=this.prefix(e,...t.prefix)),t?.suffix&&(e=this.suffix(e,...t.suffix)),this.options?.fields?.suffix&&(e=this.suffix(e,...this.options.fields.suffix)),e}icon(e,t){if(!e)return null;t||=this.options.icon?.[e];const s=this.options.color?.[e];return t&&s&&(t=s(t)),t}format(e,t,s){return Array.isArray(t)||(t=[t]),this.splat(t.shift(),...t).toString().split(Jt.EOL).filter((e=>!e||""!==e.trim())).map((t=>this.style(e,this.fields(t,{prefix:Array.isArray(s?.prefix)?s.prefix:[s?.prefix],suffix:Array.isArray(s?.suffix)?s.suffix:[s?.suffix]})))).join(Jt.EOL)}style(e,t){if(!e||!t)return t;const s=this.icon(e,!this.options.useIcons&&this.wrap(e));return s&&(t=s+" "+t),t}applyFormat(e,t){return t?.format?t.format(e):e}spacing(e){return void 0===e||""===e.trim()?"":" "}},As=class{constructor(e){this.options=e}static{ns(this,"ProcessOutputBuffer")}buffer=[];decoder=new Xt.StringDecoder;get all(){return this.buffer}get last(){return this.buffer.at(-1)}get length(){return this.buffer.length}write(e,...t){const s=t[t.length-1];return this.buffer.push({time:Date.now(),stream:this.options?.stream,entry:this.decoder.write("string"==typeof e?Buffer.from(e,"string"==typeof t[0]?t[0]:void 0):Buffer.from(e))}),this.options?.limit&&(this.buffer=this.buffer.slice(-this.options.limit)),"function"==typeof s&&s(),!0}reset(){this.buffer=[]}},ks=class{constructor(e){this.stream=e,this.method=e.write,this.buffer=new As({stream:e})}static{ns(this,"ProcessOutputStream")}method;buffer;get out(){return Object.assign({},this.stream,{write:this.write.bind(this)})}hijack(){this.stream.write=this.buffer.write.bind(this.buffer)}release(){this.stream.write=this.method;const e=[...this.buffer.all];return this.buffer.reset(),e}write(...e){return this.method.apply(this.stream,e)}},Cs=class{constructor(e,t,s){this.options=s,this.stream={stdout:new ks(e??process.stdout),stderr:new ks(t??process.stderr)},this.options={dump:["stdout","stderr"],leaveEmptyLine:!0,...s}}static{ns(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(rs),Object.values(this.stream).forEach((e=>e.hijack())),this.active=!0}release(){const e=Object.entries(this.stream).map((([e,t])=>({name:e,buffer:t.release()}))).filter((e=>this.options.dump.includes(e.name))).flatMap((e=>e.buffer)).sort(((e,t)=>e.time-t.time)).map((e=>({...e,entry:fs(e.entry)}))).filter((e=>e.entry));e.length>0&&(this.options.leaveEmptyLine&&this.stdout.write(Jt.EOL),e.forEach((e=>{(e.stream??this.stdout).write(e.entry+Jt.EOL)}))),this.stream.stdout.write(is),this.active=!1}toStdout(e,t=!0){return t&&(e+=Jt.EOL),this.stream.stdout.write(e)}toStderr(e,t=!0){return t&&(e+=Jt.EOL),this.stream.stderr.write(e)}};function Os(e){const t=new Zt.Writable;return t.rows=1/0,t.columns=1/0,t.write=t=>(e(t.toString()),!0),t}ns(Os,"createWritable"),class{constructor(e,t){this.task=e,this.wrapper=t}static{ns(this,"ListrPromptAdapter")}state;reportStarted(){if(this.state=this.task.state,this.task.prompt)throw new Vs("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 Ts=class{static{ns(this,"Spinner")}spinner=us()?["\u280b","\u2819","\u2839","\u2838","\u283c","\u2834","\u2826","\u2827","\u2807","\u280f"]:["-","\\","|","/"];id;spinnerPosition=0;spin(){this.spinnerPosition=++this.spinnerPosition%this.spinner.length}fetch(){return this.spinner[this.spinnerPosition]}isRunning(){return!!this.id}start(e,t=100){this.id=setInterval((()=>{this.spin(),e&&e()}),t)}stop(){clearInterval(this.id)}},xs={SKIPPED_WITH_COLLAPSE:ys.arrowDown,SKIPPED_WITHOUT_COLLAPSE:ys.warning,OUTPUT:ys.pointerSmall,OUTPUT_WITH_BOTTOMBAR:ys.pointerSmall,PENDING:ys.pointer,COMPLETED:ys.tick,COMPLETED_WITH_FAILED_SUBTASKS:ys.warning,COMPLETED_WITH_SISTER_TASKS_FAILED:ys.squareSmallFilled,RETRY:ys.warning,ROLLING_BACK:ys.warning,ROLLED_BACK:ys.arrowLeft,FAILED:ys.cross,FAILED_WITH_SUBTASKS:ys.pointer,WAITING:ys.squareSmallFilled,PAUSED:ys.squareSmallFilled},Rs={SKIPPED_WITH_COLLAPSE:hs.yellow,SKIPPED_WITHOUT_COLLAPSE:hs.yellow,PENDING:hs.yellow,COMPLETED:hs.green,COMPLETED_WITH_FAILED_SUBTASKS:hs.yellow,COMPLETED_WITH_SISTER_TASKS_FAILED:hs.red,RETRY:hs.yellowBright,ROLLING_BACK:hs.redBright,ROLLED_BACK:hs.redBright,FAILED:hs.red,FAILED_WITH_SUBTASKS:hs.red,WAITING:hs.dim,PAUSED:hs.yellowBright};function Ls(e){const t=Math.floor(e/1e3),s=Math.floor(t/60);let n;return 0===t&&0===s&&(n=`0.${Math.floor(e/100)}s`),t>0&&(n=t%60+"s"),s>0&&(n=`${s}m${n}`),n}ns(Ls,"parseTimer");var _s={condition:!0,field:Ls,format:ns((()=>hs.dim),"format")};ns((function(){const e=new Date;return String(e.getHours()).padStart(2,"0")+":"+String(e.getMinutes()).padStart(2,"0")+":"+String(e.getSeconds()).padStart(2,"0")}),"parseTimestamp");var Is=class e{constructor(t,s,n){this.tasks=t,this.options=s,this.events=n,this.options={...e.rendererOptions,...this.options,icon:{...xs,...s?.icon??{}},color:{...Rs,...s?.color??{}}},this.spinner=this.options.spinner??new Ts,this.logger=this.options.logger??new vs({useIcons:!0,toStderr:[]}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color}static{ns(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:{..._s,format:ns((()=>hs.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:e}=await Promise.all([s.e(799),s.e(782),s.e(216)]).then(s.bind(s,2216)),{default:t}=await Promise.all([s.e(799),s.e(145)]).then(s.bind(s,5145)),{default:n}=await Promise.all([s.e(799),s.e(782)]).then(s.bind(s,782));this.updater=e(this.logger.process.stdout),this.truncate=t,this.wrap=n,this.logger.process.hijack(),this.options?.lazy||this.spinner.start((()=>{this.update()})),this.events.on("SHOUD_REFRESH_RENDER",(()=>{this.update()}))}update(){this.updater(this.create())}end(){this.spinner.stop(),this.updater.clear(),this.updater.done(),this.options.clearOutput||this.logger.process.toStdout(this.create({prompt:!1})),this.logger.process.release()}create(e){e={tasks:!0,bottomBar:!0,prompt:!0,...e};const t=[],s=this.renderer(this.tasks),n=this.renderBottomBar(),r=this.renderPrompt();return e.tasks&&s.length>0&&t.push(...s),e.bottomBar&&n.length>0&&(t.length>0&&t.push(""),t.push(...n)),e.prompt&&r.length>0&&(t.length>0&&t.push(""),t.push(...r)),t.join(Jt.EOL)}style(e,t=!1){const s=this.cache.rendererOptions.get(e.id);if(e.isSkipped()){if(t||s.collapseSkips)return this.logger.icon("SKIPPED_WITH_COLLAPSE");if(!1===s.collapseSkips)return this.logger.icon("SKIPPED_WITHOUT_COLLAPSE")}if(t)return this.shouldOutputToBottomBar(e)?this.logger.icon("OUTPUT_WITH_BOTTOMBAR"):this.logger.icon("OUTPUT");if(e.hasSubtasks()){if(e.isStarted()||e.isPrompt()&&!1!==s.showSubtasks&&!e.subtasks.every((e=>!e.hasTitle())))return this.logger.icon("PENDING");if(e.isCompleted()&&e.subtasks.some((e=>e.hasFailed())))return this.logger.icon("COMPLETED_WITH_FAILED_SUBTASKS");if(e.hasFailed())return this.logger.icon("FAILED_WITH_SUBTASKS")}return e.isStarted()||e.isPrompt()?this.logger.icon("PENDING",!this.options?.lazy&&this.spinner.fetch()):e.isCompleted()?this.logger.icon("COMPLETED"):e.isRetrying()?this.logger.icon("RETRY",!this.options?.lazy&&this.spinner.fetch()):e.isRollingBack()?this.logger.icon("ROLLING_BACK",!this.options?.lazy&&this.spinner.fetch()):e.hasRolledBack()?this.logger.icon("ROLLED_BACK"):e.hasFailed()?this.logger.icon("FAILED"):e.isPaused()?this.logger.icon("PAUSED"):this.logger.icon("WAITING")}format(e,t,s){if(""===e.trim())return[];let n;t&&(e=t+" "+e);const r=(process.stdout.columns??80)-s*this.options.indentation-2;switch(this.options.formatOutput){case"truncate":n=e.split(Jt.EOL).map(((e,t)=>this.truncate(this.indent(e,t),r)));break;case"wrap":n=this.wrap(e,r,{hard:!0}).split(Jt.EOL).map(((e,t)=>this.indent(e,t)));break;default:throw new Ws("Format option for the renderer is wrong.")}return this.options.removeEmptyLines&&(n=n.filter(Boolean)),n.map((e=>ds(e,s*this.options.indentation)))}shouldOutputToOutputBar(e){const t=this.cache.rendererTaskOptions.get(e.id).outputBar;return"number"==typeof t&&0!==t||"boolean"==typeof t&&!1!==t}shouldOutputToBottomBar(e){const t=this.cache.rendererTaskOptions.get(e.id).bottomBar;return"number"==typeof t&&0!==t||"boolean"==typeof t&&!1!==t||!e.hasTitle()}renderer(e,t=0){return e.flatMap((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 n=this.cache.rendererOptions.get(s.id),r=this.cache.rendererTaskOptions.get(s.id),i=[];if(s.isPrompt()){if(this.activePrompt&&this.activePrompt!==s.id)throw new Ws("Only one prompt can be active at the given time, please re-evaluate your task design.");this.activePrompt||(s.on("PROMPT",(e=>{const t=fs(e);t&&(this.prompt=t)})),s.on("STATE",(e=>{("PROMPT_COMPLETED"===e||s.hasFinalized()||s.hasReset())&&(this.prompt=null,this.activePrompt=null,s.off("PROMPT"))})),this.activePrompt=s.id)}if(s.hasTitle()&&(!e.some((e=>e.hasFailed()))||s.hasFailed()||!1===s.options.exitOnError||s.isCompleted()||s.isSkipped()?s.hasFailed()&&n.collapseErrors?i.push(...this.format(!s.hasSubtasks()&&s.message.error&&n.showErrorMessage?s.message.error:s.title,this.style(s),t)):s.isSkipped()&&n.collapseSkips?i.push(...this.format(this.logger.suffix(s.message.skip&&n.showSkipMessage?s.message.skip:s.title,{field:"SKIPPED",condition:n.suffixSkips,format:ns((()=>hs.dim),"format")}),this.style(s),t)):s.isRetrying()?i.push(...this.format(this.logger.suffix(s.title,{field:`RETRY:${s.message.retry.count}`,format:ns((()=>hs.yellow),"format"),condition:n.suffixRetries}),this.style(s),t)):s.isCompleted()&&s.hasTitle()&&js(r.timer?.condition,s.message.duration)?i.push(...this.format(this.logger.suffix(s?.title,{...r.timer,args:[s.message.duration]}),this.style(s),t)):s.isPaused()?i.push(...this.format(this.logger.suffix(s.title,{...n.pausedTimer,args:[s.message.paused-Date.now()]}),this.style(s),t)):i.push(...this.format(s.title,this.style(s),t)):i.push(...this.format(s.title,this.logger.icon("COMPLETED_WITH_SISTER_TASKS_FAILED"),t))),s.hasSubtasks()&&n.showSubtasks||(!s.hasFailed()||!1!==n.collapseErrors||!n.showErrorMessage&&n.showSubtasks?!s.isSkipped()||!1!==n.collapseSkips||!n.showSkipMessage&&n.showSubtasks||i.push(...this.dump(s,t,"SKIPPED")):i.push(...this.dump(s,t,"FAILED"))),(s.isPending()||r.persistentOutput)&&i.push(...this.renderOutputBar(s,t)),!1!==n.showSubtasks&&s.hasSubtasks()&&(s.isPending()||s.hasFinalized()&&!s.hasTitle()||s.isCompleted()&&!1===n.collapseSubtasks&&!s.subtasks.some((e=>!0===this.cache.rendererOptions.get(e.id)?.collapseSubtasks))||s.subtasks.some((e=>!1===this.cache.rendererOptions.get(e.id)?.collapseSubtasks))||s.subtasks.some((e=>e.hasFailed()))||s.subtasks.some((e=>e.hasRolledBack())))){const e=s.hasTitle()?t+1:t,n=this.renderer(s.subtasks,e);i.push(...n)}return s.hasFinalized()&&(r.persistentOutput||(this.buffer.bottom.delete(s.id),this.buffer.output.delete(s.id))),s.isClosed()&&(this.cache.render.set(s.id,i),this.reset(s)),i}))}renderOutputBar(e,t){const s=this.buffer.output.get(e.id);return s?s.all.flatMap((s=>this.dump(e,t,"OUTPUT",s.entry))):[]}renderBottomBar(){return 0===this.buffer.bottom.size?[]:Array.from(this.buffer.bottom.values()).flatMap((e=>e.all)).sort(((e,t)=>e.time-t.time)).map((e=>e.entry))}renderPrompt(){return this.prompt?[this.prompt]:[]}calculate(t){if(this.cache.rendererOptions.has(t.id)&&this.cache.rendererTaskOptions.has(t.id))return;const s={...this.options,...t.rendererOptions};this.cache.rendererOptions.set(t.id,s),this.cache.rendererTaskOptions.set(t.id,{...e.rendererTaskOptions,timer:s.timer,...t.rendererTaskOptions})}setupBuffer(e){if(this.buffer.bottom.has(e.id)||this.buffer.output.has(e.id))return;const t=this.cache.rendererTaskOptions.get(e.id);this.shouldOutputToBottomBar(e)&&!this.buffer.bottom.has(e.id)?(this.buffer.bottom.set(e.id,new As({limit:"number"==typeof t.bottomBar?t.bottomBar:1})),e.on("OUTPUT",(t=>{const s=this.dump(e,-1,"OUTPUT",t);this.buffer.bottom.get(e.id).write(s.join(Jt.EOL))})),e.on("STATE",(t=>{"RETRY"===t&&this.buffer.bottom.delete(e.id)}))):this.shouldOutputToOutputBar(e)&&!this.buffer.output.has(e.id)&&(this.buffer.output.set(e.id,new As({limit:"number"==typeof t.outputBar?t.outputBar:1})),e.on("OUTPUT",(t=>{this.buffer.output.get(e.id).write(t)})),e.on("STATE",(t=>{"RETRY"===t&&this.buffer.output.delete(e.id)})))}reset(e){this.cache.rendererOptions.delete(e.id),this.cache.rendererTaskOptions.delete(e.id),this.buffer.output.delete(e.id)}dump(e,t,s="OUTPUT",n){if(!n)switch(s){case"OUTPUT":n=e.output;break;case"SKIPPED":n=e.message.skip;break;case"FAILED":n=e.message.error}return e.hasTitle()&&"FAILED"===s&&n===e.title||"string"!=typeof n?[]:("OUTPUT"===s&&(n=fs(n)),this.format(n,this.style(e,!0),t+1))}indent(e,t){return t>0?ds(e.trim(),this.options.indentation):e.trim()}},Ns=class{constructor(e,t){this.tasks=e,this.options=t}static{ns(this,"SilentRenderer")}static nonTTY=!0;static rendererOptions;static rendererTaskOptions;render(){}end(){}},Ps=class e{constructor(t,s){this.tasks=t,this.options=s,this.options={...e.rendererOptions,...s,icon:{...ws,...s?.icon??{}},color:{...Es,...s?.color??{}}},this.logger=this.options.logger??new vs({useIcons:!0,toStderr:Ss}),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{ns(this,"SimpleRenderer")}static nonTTY=!0;static rendererOptions={pausedTimer:{..._s,field:ns((e=>`PAUSED:${e}`),"field"),format:ns((()=>hs.yellowBright),"format")}};static rendererTaskOptions={};logger;cache={rendererOptions:new Map,rendererTaskOptions:new Map};end(){}render(){this.renderer(this.tasks)}renderer(e){e.forEach((e=>{this.calculate(e),e.once("CLOSED",(()=>{this.reset(e)}));const t=this.cache.rendererOptions.get(e.id),s=this.cache.rendererTaskOptions.get(e.id);e.on("SUBTASK",(e=>{this.renderer(e)})),e.on("STATE",(t=>{if(e.hasTitle())if("STARTED"===t)this.logger.log("STARTED",e.title);else if("COMPLETED"===t){const t=s?.timer;this.logger.log("COMPLETED",e.title,t&&{suffix:{...t,condition:!!e.message?.duration&&t.condition,args:[e.message.duration]}})}else"PROMPT"===t?(this.logger.process.hijack(),e.on("PROMPT",(e=>{this.logger.process.toStderr(e,!1)}))):"PROMPT_COMPLETED"===t&&(e.off("PROMPT"),this.logger.process.release())})),e.on("OUTPUT",(e=>{this.logger.log("OUTPUT",e)})),e.on("MESSAGE",(s=>{if(s.error)this.logger.log("FAILED",e.title,{suffix:{field:`FAILED: ${s.error}`,format:ns((()=>hs.red),"format")}});else if(s.skip)this.logger.log("SKIPPED",e.title,{suffix:{field:`SKIPPED: ${s.skip}`,format:ns((()=>hs.yellow),"format")}});else if(s.rollback)this.logger.log("ROLLBACK",e.title,{suffix:{field:`ROLLBACK: ${s.rollback}`,format:ns((()=>hs.red),"format")}});else if(s.retry)this.logger.log("RETRY",e.title,{suffix:{field:`RETRY:${s.retry.count}`,format:ns((()=>hs.red),"format")}});else if(s.paused){const n=t?.pausedTimer;this.logger.log("PAUSED",e.title,n&&{suffix:{...n,condition:!!s?.paused&&n.condition,args:[s.paused-Date.now()]}})}}))}))}calculate(t){if(this.cache.rendererOptions.has(t.id)&&this.cache.rendererTaskOptions.has(t.id))return;const s={...this.options,...t.rendererOptions};this.cache.rendererOptions.set(t.id,s),this.cache.rendererTaskOptions.set(t.id,{...e.rendererTaskOptions,timer:s.timer,...t.rendererTaskOptions})}reset(e){this.cache.rendererOptions.delete(e.id),this.cache.rendererTaskOptions.delete(e.id)}},$s=class{constructor(e){this.options=e}static{ns(this,"TestRendererSerializer")}serialize(e,t,s){return JSON.stringify(this.generate(e,t,s))}generate(e,t,s){const n={event:e,data:t};if("boolean"!=typeof this.options?.task){const e=Object.fromEntries(this.options.task.map((e=>{const t=s[e];return"function"==typeof t?[e,t.call(s)]:[e,t]})));Object.keys(s).length>0&&(n.task=e)}return n}},Bs=class e{constructor(t,s){this.tasks=t,this.options=s,this.options={...e.rendererOptions,...this.options},this.logger=this.options.logger??new vs({useIcons:!1}),this.serializer=new $s(this.options)}static{ns(this,"TestRenderer")}static nonTTY=!0;static rendererOptions={subtasks:!0,state:Object.values(os),output:!0,prompt:!0,title:!0,messages:["skip","error","retry","rollback","paused"],messagesToStderr:["error","rollback","retry"],task:["hasRolledBack","isRollingBack","isCompleted","isSkipped","hasFinalized","hasSubtasks","title","hasReset","hasTitle","isPrompt","isPaused","isPending","isSkipped","isStarted","hasFailed","isEnabled","isRetrying","path"]};static rendererTaskOptions;logger;serializer;render(){this.renderer(this.tasks)}end(){}renderer(e){e.forEach((e=>{this.options.subtasks&&e.on("SUBTASK",(e=>{this.renderer(e)})),this.options.state&&e.on("STATE",(t=>{this.logger.toStdout(this.serializer.serialize("STATE",t,e))})),this.options.output&&e.on("OUTPUT",(t=>{this.logger.toStdout(this.serializer.serialize("OUTPUT",t,e))})),this.options.prompt&&e.on("PROMPT",(t=>{this.logger.toStdout(this.serializer.serialize("PROMPT",t,e))})),this.options.title&&e.on("TITLE",(t=>{this.logger.toStdout(this.serializer.serialize("TITLE",t,e))})),e.on("MESSAGE",(t=>{const s=Object.fromEntries(Object.entries(t).map((([e,t])=>{if(this.options.messages.includes(e))return[e,t]})).filter(Boolean));if(Object.keys(s).length>0){const t=this.serializer.serialize("MESSAGE",s,e);this.options.messagesToStderr.some((e=>Object.keys(s).includes(e)))?this.logger.toStderr(t):this.logger.toStdout(t)}}))}))}},Ms={default:Is,simple:Ps,verbose:class e{constructor(t,s){this.tasks=t,this.options=s,this.options={...e.rendererOptions,...this.options,icon:{...ws,...s?.icon??{}},color:{...Es,...s?.color??{}}},this.logger=this.options.logger??new vs({useIcons:!1,toStderr:Ss}),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{ns(this,"VerboseRenderer")}static nonTTY=!0;static rendererOptions={logTitleChange:!1,pausedTimer:{..._s,format:ns((()=>hs.yellowBright),"format")}};static rendererTaskOptions;logger;cache={rendererOptions:new Map,rendererTaskOptions:new Map};render(){this.renderer(this.tasks)}end(){}renderer(e){e.forEach((e=>{this.calculate(e),e.once("CLOSED",(()=>{this.reset(e)}));const t=this.cache.rendererOptions.get(e.id),s=this.cache.rendererTaskOptions.get(e.id);e.on("SUBTASK",(e=>{this.renderer(e)})),e.on("STATE",(t=>{if(e.hasTitle())if("STARTED"===t)this.logger.log("STARTED",e.title);else if("COMPLETED"===t){const t=s.timer;this.logger.log("COMPLETED",e.title,t&&{suffix:{...t,condition:!!e.message?.duration&&t.condition,args:[e.message.duration]}})}})),e.on("OUTPUT",(e=>{this.logger.log("OUTPUT",e)})),e.on("PROMPT",(e=>{const t=fs(e);t&&this.logger.log("PROMPT",t)})),!1!==this.options?.logTitleChange&&e.on("TITLE",(e=>{this.logger.log("TITLE",e)})),e.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",e.title,{suffix:s.retry.count.toString()});else if(s?.paused){const n=t?.pausedTimer;this.logger.log("PAUSED",e.title,n&&{suffix:{...n,condition:!!s?.paused&&n.condition,args:[s.paused-Date.now()]}})}}))}))}calculate(t){if(this.cache.rendererOptions.has(t.id)&&this.cache.rendererTaskOptions.has(t.id))return;const s={...this.options,...t.rendererOptions};this.cache.rendererOptions.set(t.id,s),this.cache.rendererTaskOptions.set(t.id,{...e.rendererTaskOptions,timer:s.timer,...t.rendererTaskOptions})}reset(e){this.cache.rendererOptions.delete(e.id),this.cache.rendererTaskOptions.delete(e.id)}},test:Bs,silent:Ns};function Ds(e){return!0===process.stdout.isTTY||!0===e.nonTTY}function Fs(e){return"string"==typeof e?Ms[e]??Ms.default:"function"==typeof e?e:Ms.default}function Hs(e){if(js(e?.silentRendererCondition))return{renderer:Fs("silent"),selection:"SILENT"};const t={renderer:Fs(e.renderer),options:e.rendererOptions,selection:"PRIMARY"};return!Ds(t.renderer)||js(e?.fallbackRendererCondition)?{renderer:Fs(e.fallbackRenderer),options:e.fallbackRendererOptions,selection:"SECONDARY"}:t}function js(e,...t){return"function"==typeof e?e(...t):e}ns(Ds,"isRendererSupported"),ns(Fs,"getRendererClass"),ns(Hs,"getRenderer"),ns(js,"assertFunctionOrSelf");var Us=es({circles:!0});function Ks(e){return Us(e)}ns(Ks,"cloneObject");var Gs=class{static{ns(this,"Concurrency")}concurrency;count;queue;constructor(e){this.concurrency=e.concurrency,this.count=0,this.queue=new Set}add(e){return this.count<this.concurrency?this.run(e):new Promise((t=>{const s=ns((()=>t(this.run(e))),"callback");this.queue.add(s)}))}flush(){for(const e of this.queue){if(this.count>=this.concurrency)break;this.queue.delete(e),e()}}run(e){this.count++;const t=e(),s=ns((()=>{this.count--,this.flush()}),"cleanup");return t.then(s,(()=>{this.queue.clear()})),t}};function qs(e){return new Promise((t=>{setTimeout(t,e)}))}ns(qs,"delay");var Ys=class extends Error{constructor(e,t,s){super(e.message),this.error=e,this.type=t,this.task=s,this.name="ListrError",this.path=s.path,"full"===s?.options.collectErrors&&(this.task=Ks(s),this.ctx=Ks(s.listr.ctx)),this.stack=e?.stack}static{ns(this,"ListrError")}path;ctx},Ws=class extends Error{static{ns(this,"ListrRendererError")}},Vs=class extends Error{static{ns(this,"PromptError")}},zs=class{constructor(e){this.task=e}static{ns(this,"TaskWrapper")}get title(){return this.task.title}set title(e){e=Array.isArray(e)?e:[e],this.task.title$=bs(e.shift(),...e)}get output(){return this.task.output}set output(e){e=Array.isArray(e)?e:[e],this.task.output$=bs(e.shift(),...e)}set promptOutput(e){this.task.promptOutput$=e}newListr(e,t){let s;return s="function"==typeof e?e(this):e,new Zs(s,t,this.task)}report(e,t){!1!==this.task.options.collectErrors&&this.task.listr.errors.push(new Ys(e,t,this.task)),this.task.message$={error:e.message??this.task?.title}}skip(e,...t){this.task.state$="SKIPPED",e&&(this.task.message$={skip:e?bs(e,...t):this.task?.title})}isRetrying(){return this.task.isRetrying()?this.task.retry:{count:0}}prompt(e){return this.task.prompt?this.task.prompt:new e(this.task,this)}stdout(e){return Os((t=>{"PROMPT"===e?this.promptOutput=t:this.output=t}))}run(e){return this.task.run(e,this)}},Qs=class extends as{static{ns(this,"ListrTaskEventManager")}},Js=class extends Qs{constructor(e,t,s,n,r){if(super(),this.listr=e,this.task=t,this.options=s,this.rendererOptions=n,this.rendererTaskOptions=r,t.title){const e=Array.isArray(t?.title)?t.title:[t.title];this.title=bs(e.shift(),...e),this.initialTitle=this.title}this.taskFn=t.task,this.parent=e.parentTask}static{ns(this,"Task")}id=(0,ts.randomUUID)();state="WAITING";subtasks;title;initialTitle;output;retry;message={};prompt;parent;enabled;taskFn;closed;set state$(e){if(this.state=e,this.emit("STATE",e),this.hasSubtasks()&&this.hasFailed())for(const e of this.subtasks)"STARTED"===e.state&&(e.state$="FAILED");this.listr.events.emit("SHOUD_REFRESH_RENDER")}set output$(e){this.output=e,this.emit("OUTPUT",e),this.listr.events.emit("SHOUD_REFRESH_RENDER")}set promptOutput$(e){this.emit("PROMPT",e),fs(e)&&this.listr.events.emit("SHOUD_REFRESH_RENDER")}set message$(e){this.message={...this.message,...e},this.emit("MESSAGE",e),this.listr.events.emit("SHOUD_REFRESH_RENDER")}set title$(e){this.title=e,this.emit("TITLE",e),this.listr.events.emit("SHOUD_REFRESH_RENDER")}get path(){return[...this.listr.path,this.initialTitle]}async check(e){return"WAITING"===this.state&&(this.enabled=await js(this.task?.enabled??!0,e),this.emit("ENABLED",this.enabled),this.listr.events.emit("SHOUD_REFRESH_RENDER")),this.enabled}hasSubtasks(){return this.subtasks?.length>0}hasFinalized(){return this.isCompleted()||this.hasFailed()||this.isSkipped()||this.hasRolledBack()}isPending(){return this.isStarted()||this.isPrompt()||this.hasReset()}isStarted(){return"STARTED"===this.state}isSkipped(){return"SKIPPED"===this.state}isCompleted(){return"COMPLETED"===this.state}hasFailed(){return"FAILED"===this.state}isRollingBack(){return"ROLLING_BACK"===this.state}hasRolledBack(){return"ROLLED_BACK"===this.state}isRetrying(){return"RETRY"===this.state}hasReset(){return"RETRY"===this.state||"ROLLING_BACK"===this.state}isEnabled(){return this.enabled}hasTitle(){return"string"==typeof this?.title}isPrompt(){return"PROMPT"===this.state||"PROMPT_COMPLETED"===this.state}isPaused(){return"PAUSED"===this.state}isClosed(){return this.closed}async pause(e){const t=this.state;this.state$="PAUSED",this.message$={paused:Date.now()+e},await qs(e),this.state$=t,this.message$={paused:null}}async run(e,t){const s=ns((t=>(t instanceof Zs?(t.options={...this.options,...t.options},t.rendererClass=Fs("silent"),this.subtasks=t.tasks,t.errors=this.listr.errors,this.emit("SUBTASK",this.subtasks),t=t.run(e)):t instanceof Promise?t=t.then(s):ls(t)?t=new Promise(((e,s)=>{t.on("data",(e=>{this.output$=e.toString()})),t.on("error",(e=>s(e))),t.on("end",(()=>e(null)))})):cs(t)&&(t=new Promise(((e,s)=>{t.subscribe({next:ns((e=>{this.output$=e}),"next"),error:s,complete:e})}))),t)),"handleResult"),n=Date.now();this.state$="STARTED";const r=await js(this.task?.skip??!1,e);if(r)return"string"==typeof r?this.message$={skip:r}:this.hasTitle()?this.message$={skip:this.title}:this.message$={skip:"Skipped task without a title."},void(this.state$="SKIPPED");try{const r="number"==typeof this.task?.retry&&this.task.retry>0?this.task.retry+1:"object"==typeof this.task?.retry&&this.task.retry.tries>0?this.task.retry.tries+1:1,i="object"==typeof this.task.retry&&this.task.retry.delay;for(let n=1;n<=r;n++)try{await s(this.taskFn(e,t));break}catch(e){if(n===r)throw e;this.retry={count:n,error:e},this.message$={retry:this.retry},this.title$=this.initialTitle,this.output=void 0,t.report(e,"WILL_RETRY"),this.state$="RETRY",i&&await this.pause(i)}(this.isStarted()||this.isRetrying())&&(this.message$={duration:Date.now()-n},this.state$="COMPLETED")}catch(s){if(this.prompt instanceof Vs&&(s=this.prompt),this.task?.rollback){t.report(s,"WILL_ROLLBACK");try{this.state$="ROLLING_BACK",await this.task.rollback(e,t),this.message$={rollback:this.title},this.state$="ROLLED_BACK"}catch(e){throw this.state$="FAILED",t.report(e,"HAS_FAILED_TO_ROLLBACK"),this.close(),e}if(!1!==this.listr.options?.exitAfterRollback)throw this.close(),s}else{if(this.state$="FAILED",!1!==this.listr.options.exitOnError&&!1!==await js(this.task?.exitOnError,e))throw t.report(s,"HAS_FAILED"),this.close(),s;this.hasSubtasks()||t.report(s,"HAS_FAILED_WITHOUT_ERROR")}}finally{this.close()}}close(){this.emit("CLOSED"),this.listr.events.emit("SHOUD_REFRESH_RENDER"),this.complete()}},Xs=class extends as{static{ns(this,"ListrEventManager")}},Zs=class{constructor(e,t,s){this.task=e,this.options=t,this.parentTask=s,this.options={concurrent:!1,renderer:"default",fallbackRenderer:"simple",exitOnError:!0,exitAfterRollback:!0,collectErrors:!1,registerSignalListeners:!0,...this.parentTask?.options??{},...t},!0===this.options.concurrent?this.options.concurrent=1/0:"number"!=typeof this.options.concurrent&&(this.options.concurrent=1),this.concurrency=new Gs({concurrency:this.options.concurrent}),s&&(this.path=[...s.listr.path,s.title],this.errors=s.listr.errors),this.parentTask?.listr.events instanceof Xs?this.events=this.parentTask.listr.events:this.events=new Xs;const n=Hs({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=n.renderer,this.rendererClassOptions=n.options,this.rendererSelection=n.selection,this.add(e??[]),this.options.registerSignalListeners&&(this.boundSignalHandler=this.signalHandler.bind(this),process.once("SIGINT",this.boundSignalHandler).setMaxListeners(0)),(this.options?.forceTTY||process.env.LISTR_FORCE_TTY)&&(process.stdout.isTTY=!0,process.stderr.isTTY=!0),this.options?.forceUnicode&&(process.env.LISTR_FORCE_UNICODE="1")}static{ns(this,"Listr")}tasks=[];errors=[];ctx;events;path=[];rendererClass;rendererClassOptions;rendererSelection;boundSignalHandler;concurrency;renderer;isRoot(){return!this.parentTask}isSubtask(){return!!this.parentTask}add(e){this.tasks.push(...this.generate(e))}async run(e){this.renderer||(this.renderer=new this.rendererClass(this.tasks,this.rendererClassOptions,this.events)),await this.renderer.render(),this.ctx=this.options?.ctx??e??{},await Promise.all(this.tasks.map((e=>e.check(this.ctx))));try{await Promise.all(this.tasks.map((e=>this.concurrency.add((()=>this.runTask(e)))))),this.renderer.end(),this.removeSignalHandler()}catch(e){if(!1!==this.options.exitOnError)throw this.renderer.end(e),this.removeSignalHandler(),e}return this.ctx}generate(e){return(e=Array.isArray(e)?e:[e]).map((e=>{let t;return"PRIMARY"===this.rendererSelection?t=e.rendererOptions:"SECONDARY"===this.rendererSelection&&(t=e.fallbackRendererOptions),new Js(this,e,this.options,this.rendererClassOptions,t)}))}async runTask(e){if(await e.check(this.ctx))return new zs(e).run(this.ctx)}signalHandler(){this.tasks?.forEach((async e=>{e.isPending()&&(e.state$="FAILED")})),this.isRoot()&&(this.renderer.end(new Error("Interrupted.")),process.exit(127))}removeSignalHandler(){this.boundSignalHandler&&process.removeListener("SIGINT",this.boundSignalHandler)}};const en=Ye.Ay.blue(ys.arrowRight),tn=Ye.Ay.redBright(ys.cross),sn=Ye.Ay.yellow(ys.warning),nn=(e,t,s)=>`${Ye.Ay.redBright(`${tn} Validation Error:`)}\n\n Invalid value for '${Ye.Ay.bold(e)}': ${Ye.Ay.bold((0,Ne.inspect)(s))}\n\n ${t}`,rn=Ye.Ay.redBright(`${tn} Current directory is not a git directory!`),on=Ye.Ay.redBright(`${tn} Failed to get staged files!`),an=`${tn} No valid configuration found.`,cn=`${en} No staged files found.`,ln=`${en} No staged files match any configured task.`,un=Ye.Ay.yellow(`${sn} 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`),pn="Skipped because of errors from tasks.",fn=`\n ${Ye.Ay.redBright(`${tn} lint-staged failed due to a git error.`)}`,hn=(e,t,s)=>`${Ye.Ay.redBright(`${tn} Validation Error:`)}\n\n Invalid value for option '${Ye.Ay.bold(e)}': ${Ye.Ay.bold(t)}\n\n ${s}\n\nSee https://github.com/okonet/lint-staged#command-line-flags`,dn=`\n ${Ye.Ay.yellow(`${sn} lint-staged prevented an empty git commit.\n Use the --allow-empty option to continue, or check your task configuration`)}\n`,mn=(Ye.Ay.redBright(`${tn} Failed to read config from stdin.`),e=>Ye.Ay.redBright(`${tn} Failed to read config from file "${e}".`)),gn=(e,t)=>`${Ye.Ay.redBright(`${t} Failed to parse config from file "${e}".`)}\n\n${t}\n\nSee https://github.com/okonet/lint-staged#configuration.`,yn=(e={},t)=>{if(!Array.isArray(e.output))return;const s=e.errors?.size>0?t.error:t.log;for(const t of e.output)s(t)},bn=e=>{if(e===i.posix.sep||e===i.win32.sep)return i.posix.sep;let t=e.split(/[/\\]+/).join(i.posix.sep);return(e.startsWith("\\\\?\\")||e.startsWith("\\\\.\\"))&&(t=t.replace(/^\/(\.|\?)/,"//$1")),t.endsWith(i.posix.sep)&&(t=t.slice(0,-1)),t},wn=n("lint-staged:chunkFiles"),En=({files:e,baseDir:t,maxArgLength:s=null,relative:n=!1})=>{const r=e.map((e=>bn(n||!t?e:i.resolve(t,e))));if(!s)return wn("Skip chunking files because of undefined maxArgLength"),[r];const o=r.join(" ").length;wn(`Resolved an argument string length of ${o} characters from ${r.length} files`);const a=Math.min(Math.ceil(o/s),r.length);return wn(`Creating ${a} chunks for maxArgLength of ${s}`),((e,t)=>{if(1===t)return[e];const s=[];let n=0;for(let r=0;r<t;r++){const i=Math.ceil((e.length-n)/(t-r));s.push([]),s[r]=e.slice(n,i+n),n+=i}return s})(r,a)};var Sn=s(7498);const vn=n("lint-staged:generateTasks"),An=({config:e,cwd:t=process.cwd(),files:s,relative:n=!1})=>{vn("Generating linter tasks");const r=s.map((e=>bn(i.relative(t,e))));return Object.entries(e).map((([e,s])=>{const o=e.startsWith("../"),a=r.filter((e=>!!o||!e.startsWith("..")&&!i.isAbsolute(e))),c=Sn(a,e,{cwd:t,dot:!0,matchBase:!e.includes("/"),posixSlashes:!0,strictBrackets:!0}),l={pattern:e,commands:s,fileList:c.map((e=>bn(n?e:i.resolve(t,e))))};return vn("Generated task: \n%O",l),l}))};var kn=s(7075);const Cn=new RegExp(b.EOL+"$"),On=e=>new kn.Writable({write:function(t,s,n){e(t.toString().replace(Cn,"")),n()}}),Tn=({renderer:e},{FORCE_COLOR:t})=>"silent"===e||"test"===e||Number(t)>0?e:"verbose",xn=(e,t,s=process.env)=>{const n=(({debug:e,quiet:t},s,n)=>t?{renderer:"silent"}:"test"===n.NODE_ENV?{renderer:"test",rendererOptions:{logger:new vs({processOutput:new Cs(On(s.log),On(s.error))})}}:e||"dumb"===n.TERM?{renderer:"verbose"}:{renderer:"update",rendererOptions:{formatOutput:"truncate"}})(e,t,s);return{...n,fallbackRenderer:Tn(n,s)}};function Rn(e,t){return["diff","--name-only","-z",`--diff-filter=${void 0!==t?t.trim():"ACMR"}`,...void 0!==e?e.trim().split(" "):["--staged"]]}const Ln=e=>e?e.replace(/\u0000$/,"").split("\0"):[];var _n=s(1455);const In=n("lint-staged:file"),Nn=async(e,t=!0)=>{In("Reading file `%s`",e);try{return await _n.readFile(e)}catch(s){if(t&&"ENOENT"===s.code)return In("File `%s` doesn't exist, ignoring...",e),null;throw s}},Pn=async(e,t=!0)=>{In("Removing file `%s`",e);try{await _n.unlink(e)}catch(s){if(!t||"ENOENT"!==s.code)throw s;In("File `%s` doesn't exist, ignoring...",e)}},$n=async(e,t)=>{In("Writing file `%s`",e),await _n.writeFile(e,t)},Bn=Symbol("ApplyEmptyCommitError"),Mn=new Error("Configuration could not be found"),Dn=new Error("Configuration should be an object or a function"),Fn=new Error("Configuration should not be empty"),Hn=Symbol("GetBackupStashError"),jn=Symbol("GetStagedFilesError"),Un=Symbol("GitError"),Kn=Symbol("GitRepoError"),Gn=Symbol("HideUnstagedChangesError"),qn=new Error("Invalid Options"),Yn=Symbol("RestoreMergeStatusError"),Wn=Symbol("RestoreOriginalStateError"),Vn=Symbol("RestoreUnstagedChangesError"),zn=Symbol("TaskError"),Qn=n("lint-staged:GitWorkflow"),Jn=/\x00/,Xn=(e,t=!0)=>e.reduce(((e,s)=>{if(Jn.test(s)){const[n,r]=s.split(Jn);t&&e.push(r),e.push(n)}else e.push(s);return e}),[]),Zn="lint-staged automatic backup",er="lint-staged_unstaged.patch",tr=["--binary","--unified=0","--no-color","--no-ext-diff","--src-prefix=a/","--dst-prefix=b/","--patch","--submodule=short"],sr=["-v","--whitespace=nowarn","--recount","--unidiff-zero"],nr=(e,t,s)=>{throw t.errors.add(Un),s&&t.errors.add(s),e};class rr{constructor({allowEmpty:e,gitConfigDir:t,topLevelDir:s,matchedFileChunks:n,diff:r,diffFilter:o}){this.execGit=(e,t={})=>qe(e,{...t,cwd:s}),this.deletedFiles=[],this.gitConfigDir=t,this.topLevelDir=s,this.diff=r,this.diffFilter=o,this.allowEmpty=e,this.matchedFileChunks=n,this.mergeHeadFilename=i.resolve(t,"MERGE_HEAD"),this.mergeModeFilename=i.resolve(t,"MERGE_MODE"),this.mergeMsgFilename=i.resolve(t,"MERGE_MSG")}getHiddenFilepath(e){return i.resolve(this.gitConfigDir,`./${e}`)}async getBackupStash(e){const t=(await this.execGit(["stash","list"])).split("\n").findIndex((e=>e.includes(Zn)));if(-1===t)throw e.errors.add(Hn),new Error("lint-staged automatic backup is missing!");return String(t)}async getDeletedFiles(){Qn("Getting deleted files...");const e=(await this.execGit(["ls-files","--deleted"])).split("\n").filter(Boolean).map((e=>i.resolve(this.topLevelDir,e)));return Qn("Found deleted files:",e),e}async backupMergeStatus(){Qn("Backing up merge state..."),await Promise.all([Nn(this.mergeHeadFilename).then((e=>this.mergeHeadBuffer=e)),Nn(this.mergeModeFilename).then((e=>this.mergeModeBuffer=e)),Nn(this.mergeMsgFilename).then((e=>this.mergeMsgBuffer=e))]),Qn("Done backing up merge state!")}async restoreMergeStatus(e){Qn("Restoring merge state...");try{await Promise.all([this.mergeHeadBuffer&&$n(this.mergeHeadFilename,this.mergeHeadBuffer),this.mergeModeBuffer&&$n(this.mergeModeFilename,this.mergeModeBuffer),this.mergeMsgBuffer&&$n(this.mergeMsgFilename,this.mergeMsgBuffer)]),Qn("Done restoring merge state!")}catch(t){Qn("Failed restoring merge state with error:"),Qn(t),nr(new Error("Merge state could not be restored due to an error!"),e,Yn)}}async getPartiallyStagedFiles(){Qn("Getting partially staged files...");const e=(await this.execGit(["status","-z"])).split(/\x00(?=[ AMDRCU?!]{2} |$)/).filter((e=>{const[t,s]=e;return" "!==t&&" "!==s&&"?"!==t&&"?"!==s})).map((e=>e.substr(3))).filter(Boolean);return Qn("Found partially staged files:",e),e.length?e:null}async prepare(e){try{if(Qn("Backing up original state..."),this.partiallyStagedFiles=await this.getPartiallyStagedFiles(),this.partiallyStagedFiles){e.hasPartiallyStagedFiles=!0;const t=this.getHiddenFilepath(er),s=Xn(this.partiallyStagedFiles);await this.execGit(["diff",...tr,"--output",t,"--",...s])}else e.hasPartiallyStagedFiles=!1;if(!e.shouldBackup)return;await this.backupMergeStatus(),this.deletedFiles=await this.getDeletedFiles();const t=await this.execGit(["stash","create"]);await this.execGit(["stash","store","--quiet","--message",Zn,t]),Qn("Done backing up original state!")}catch(t){nr(t,e)}}async hideUnstagedChanges(e){try{const e=Xn(this.partiallyStagedFiles,!1);await this.execGit(["checkout","--force","--",...e])}catch(t){nr(t,e,Gn)}}async applyModifications(e){Qn("Adding task modifications to index...");for(const e of this.matchedFileChunks)await this.execGit(["add","--",...e]);Qn("Done adding task modifications to index!"),await this.execGit(Rn(this.diff,this.diffFilter))||this.allowEmpty||nr(new Error("Prevented an empty git commit!"),e,Bn)}async restoreUnstagedChanges(e){Qn("Restoring unstaged changes...");const t=this.getHiddenFilepath(er);try{await this.execGit(["apply",...sr,t])}catch(s){Qn("Error while restoring changes:"),Qn(s),Qn("Retrying with 3-way merge");try{await this.execGit(["apply",...sr,"--3way",t])}catch(t){Qn("Error while restoring unstaged changes using 3-way merge:"),Qn(t),nr(new Error("Unstaged changes could not be restored due to a merge conflict!"),e,Vn)}}}async restoreOriginalState(e){try{Qn("Restoring original state..."),await this.execGit(["reset","--hard","HEAD"]),await this.execGit(["stash","apply","--quiet","--index",await this.getBackupStash(e)]),await this.restoreMergeStatus(e),await Promise.all(this.deletedFiles.map((e=>Pn(e)))),await Pn(this.getHiddenFilepath(er)),Qn("Done restoring original state!")}catch(t){nr(t,e,Wn)}}async cleanup(e){try{Qn("Dropping backup stash..."),await this.execGit(["stash","drop","--quiet",await this.getBackupStash(e)]),Qn("Done dropping backup stash!")}catch(t){nr(t,e)}}}const ir=n("lint-staged:groupFilesByConfig");var or=s(6454);function ar(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var s=0;s<e.length;s++){var n=e[s];if("string"==typeof n)return n}}var cr=s(4434);const lr=({quiet:e=!1}={})=>({hasPartiallyStagedFiles:null,shouldBackup:null,shouldHidePartiallyStaged:!0,errors:new Set([]),events:new cr,output:[],quiet:e}),ur=e=>e.hasPartiallyStagedFiles&&e.shouldHidePartiallyStaged,pr=e=>!!e.shouldBackup&&(e.errors.has(Un)?fn:e.errors.has(zn)?pn:void 0),fr=e=>e.errors.has(Un)?fn:e.errors.has(zn)?pn:void 0,hr=e=>e.shouldBackup&&(e.errors.has(zn)||e.errors.has(Bn)||e.errors.has(Vn)),dr=e=>{if(e.errors.has(Un)&&!e.errors.has(Bn)&&!e.errors.has(Vn))return fn},mr=e=>e.shouldBackup,gr=e=>!e.errors.has(Un)||e.errors.has(Bn)||e.errors.has(Vn)?e.errors.has(Wn)?fn:void 0:fn,yr="lint-staged:taskError",br=n("lint-staged:resolveTaskFn"),wr=({code:e,killed:t,signal:s})=>(t?"KILLED":s)||e||"FAILED",Er=(e,t,s,n=!1)=>{const{stderr:r,stdout:i}=t;if(r||i){const t=n?Ye.Ay.redBright(`${tn} ${e}:`):`${en} ${e}:`,o=[].concat(s.quiet?[]:["",t]).concat(r||[]).concat(i||[]);s.output.push(o.join("\n"))}else if(n){const n=wr(t),r=Ye.Ay.redBright(`\n${tn} ${e} failed without output (${n}).`);s.quiet||s.output.push(r)}},Sr=({command:e,cwd:t=process.cwd(),files:s,topLevelDir:n,isFn:r,shell:i=!1,verbose:o=!1})=>{const[a,...c]=function(e){var t,s=/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi,n=e,r=[];do{null!==(t=s.exec(n))&&r.push(ar(t[1],t[6],t[0]))}while(null!==t);return r}(e);br("cmd:",a),br("args:",c);const l={cwd:/^git(\.exe)?/i.test(a)?n:t,preferLocal:!0,reject:!1,shell:i,stdin:"ignore"};return br("execaOptions:",l),async(t=lr())=>{const n=i?function(e,t){const[s,...n]=(e=>{const t=[];for(const s of e.trim().split(xe)){const e=t.at(-1);e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${s}`:t.push(s)}return t})(e);return Fe(s,n,t)}(r?e:`${e} ${s.join(" ")}`,l):Fe(a,r?c:c.concat(s),l),u=((e,t)=>{let s;const n=async()=>{s=(async e=>{try{const t=await or(e.pid);for(const e of t)try{process.kill(e)}catch(t){br('Failed to kill process with pid "%d": %o',e,t)}}catch(t){br('Failed to kill process with pid "%d": %o',e.pid,t)}e.kill()})(t),await s};return e.events.on(yr,n,{once:!0}),async()=>{e.events.off(yr,n),await s}})(t,n),p=await n;if(await u(),p.failed||p.killed||null!=p.signal)throw((e,t,s)=>{s.errors.add(zn),s.events.emit(yr,zn),Er(e,t,s,!0);const n=wr(t);return new Error(`${Ye.Ay.redBright(e)} ${Ye.Ay.dim(`[${n}]`)}`)})(e,p,t);o&&Er(e,p,t)}},vr=n("lint-staged:makeCmdTasks"),Ar=async({commands:e,cwd:t,files:s,topLevelDir:n,shell:r,verbose:i})=>{vr("Creating listr tasks for commands %o",e);const o=Array.isArray(e)?e:[e],a=[];for(const e of o){const o="function"==typeof e,c=o?await e([...s]):e,l=Array.isArray(c)?c:[c];for(const e of l){if(o&&"string"!=typeof e)throw new Error(nn("[Function]","Function task should return a string or an array of strings",c));const l=Sr({command:e,cwd:t,files:s,topLevelDir:n,isFn:o,shell:r,verbose:i});a.push({title:e,command:e,task:l})}}return a},kr=n("lint-staged:resolveGitRepo"),Cr="lint-staged",Or="package.json",Tr=["package.yaml","package.yml"],xr=[Or,...Tr,".lintstagedrc",".lintstagedrc.json",".lintstagedrc.yaml",".lintstagedrc.yml",".lintstagedrc.mjs",".lintstagedrc.js",".lintstagedrc.cjs","lint-staged.config.mjs","lint-staged.config.js","lint-staged.config.cjs"];var Rr=s(3132),Lr=s(3136);const _r=e=>s(4363)((0,Lr.pathToFileURL)(e)).then((e=>e.default)),Ir=(0,s(8995).createRequire)(import.meta.url),Nr=n("lint-staged:loadConfig"),Pr=(e,t)=>{const s=Tr.includes(i.basename(e));try{const e=Rr.parse(t);return s?e[Cr]:e}catch(n){if(s)return void Nr("Ignoring invalid package file `%s` with content:\n%s",e,t);throw n}},$r="noExt",Br={".js":_r,".json":(e,t)=>{const s=Or.includes(i.basename(e));try{const e=JSON.parse(t);return s?e[Cr]:e}catch(s){if(i.basename(e)===Or)return void Nr("Ignoring invalid package file `%s` with content:\n%s",e,t);throw s}},".mjs":_r,".cjs":_r,".yaml":Pr,".yml":Pr,[$r]:Pr},Mr=async({configPath:e,cwd:t},n)=>{try{let n;if(e)Nr("Loading configuration from `%s`...",e),n=await(async e=>{e=i.resolve(e);const t=i.extname(e)||$r,s=Br[t],n=s.length>1?await(async e=>{const t=i.resolve(e),s=await _n.readFile(t);return await s.toString()})(e):void 0;return{config:await s(e,n),filepath:e}})(function(e){try{return Ir.resolve(e)}catch{return e}}(e));else{Nr("Searching for configuration from `%s`...",t);const{lilconfig:e}=await Promise.resolve().then(s.bind(s,7845)),r=e(Cr,{searchPlaces:xr,loaders:Br});n=await r.search(t)}if(!n)return{};const r=await n.config??null,o=n.filepath;return Nr("Successfully loaded config from `%s`:\n%O",o,r),{config:r,filepath:o}}catch(t){return Nr("Failed to load configuration from `%s` with error:\n",e,t),n.error(mn(e)),{}}},Dr=/(?<![\\$])({)(?:(?!(?<!\\),|\.\.|\{|\}).)*?(?<!\\)(})/g,Fr=/{{[^}{]*}}/,Hr=n("lint-staged:validateConfig"),jr=e=>e&&"object"==typeof e&&!Array.isArray(e),Ur=new Map([["concurrent",e=>"boolean"==typeof e],["chunkSize",e=>"number"==typeof e],["globOptions",jr],["linters",jr],["ignore",e=>Array.isArray(e)],["subTaskConcurrency",e=>"number"==typeof e],["renderer",e=>"string"==typeof e],["relative",e=>"boolean"==typeof e]]),Kr=(e,t,s)=>{try{return((e,t,s)=>{if(Hr("Validating config from `%s`...",t),!e||"object"!=typeof e&&"function"!=typeof e)throw Dn;if("function"==typeof e)return{"*":e};if(0===Object.entries(e).length)throw Fn;const n=[],r=Object.entries(e).reduce(((e,[t,r])=>{if(Ur.has(t))return Ur.get(t)(r)&&n.push(nn(t,"Advanced configuration has been deprecated.",r)),e;Array.isArray(r)&&!r.some((e=>"string"!=typeof e&&"function"!=typeof e))||"string"==typeof r||"function"==typeof r||n.push(nn(t,"Should be a string, a function, or an array of strings and functions.",r));const i=((e,t)=>{const s=(e=>{let t=`${e}`;const s=Fr.exec(e)?.[0];if(s){const e=s.replace("{{","{").replace("}}","}");t=t.replace(s,e)}return t})((e=>{let t=`${e}`,s=null;for(;s=Dr.exec(e);){const e=s[0],n=e.replace(/{/,"").replace(/}/,"");t=t.replace(e,n)}return t})(e));var n,r;return s!==e&&t.warn((n=e,r=s,Ye.Ay.yellow(`${sn} Detected incorrect braces with only single value: \`${n}\`. Reformatted as: \`${r}\`\n`))),s})(t,s);return{...e,[i]:r}}),{});if(n.length){const e=n.join("\n\n");throw s.error(gn(t,e)),new Error(e)}return Hr("Validated config from `%s`:",t),Hr((0,Ne.inspect)(e,{compact:!1})),r})(e,t,s)}catch(e){throw s.error(gn(t,e)),e}},Gr=n("lint-staged:searchConfigs"),qr=["ls-files","-z","--full-name","-t"],Yr=e=>xr.includes(i.basename(e)),Wr=e=>e.split("/").length,Vr=(e,t)=>Wr(e)>Wr(t)?-1:1,zr=n("lint-staged:runAll"),Qr=e=>Object.assign(new Error("lint-staged failed"),{ctx:e}),Jr=async({allowEmpty:e=!1,concurrent:t=!0,configObject:s,configPath:n,cwd:r,debug:o=!1,diff:a,diffFilter:c,maxArgLength:l,quiet:u=!1,relative:p=!1,shell:f=!1,stash:h=void 0===a,hidePartiallyStaged:d=h,verbose:m=!1},g=console)=>{zr("Running all linter scripts...");const y=!!r;r=y?i.resolve(r):process.cwd(),zr("Using working directory `%s`",r);const b=lr({quiet:u}),{topLevelDir:w,gitConfigDir:E}=await(async(e=process.cwd())=>{try{kr("Resolving git repo from `%s`",e),kr("Unset GIT_DIR (was `%s`)",process.env.GIT_DIR),delete process.env.GIT_DIR,kr("Unset GIT_WORK_TREE (was `%s`)",process.env.GIT_WORK_TREE),delete process.env.GIT_WORK_TREE;const t=await qe(["rev-parse","--show-cdup"],{cwd:e}),s=bn(i.join(e,t));kr("Resolved git repository top-level directory to be `%s`",s);const n=await(async e=>{const t=qe(["rev-parse","--show-toplevel"],{cwd:e}),s=qe(["rev-parse","--absolute-git-dir"],{cwd:e}),[n,r]=await Promise.all([t,s]);return i.relative(n,r)})(e),r=bn(i.join(s,n));return kr("Resolved git config directory to be `%s`",r),{topLevelDir:s,gitConfigDir:r}}catch(e){return kr("Failed to resolve git repo with error:",e),{error:e,topLevelDir:null,gitConfigDir:null}}})(r);if(!w)throw u||b.output.push(rn),b.errors.add(Kn),Qr(b);const S=await qe(["log","-1"],{cwd:w}).then((()=>!0)).catch((()=>!1));b.shouldBackup=S&&h,b.shouldBackup||u||g.warn(((e,t)=>{const s=void 0!==t?"`--diff` was used":e?"`--no-stash` was used":"there\u2019s no initial commit yet";return Ye.Ay.yellow(`${sn} Skipping backup because ${s}.\n`)})(S,a)),b.shouldHidePartiallyStaged=d,b.shouldHidePartiallyStaged||u||g.warn(((e,t)=>{const s=void 0!==t?"`--diff` was used":e?"`--no-hide-partially-staged` was used":"`--no-stash` was used";return Ye.Ay.yellow(`${sn} Skipping hiding unstaged changes from partially staged files because ${s}.\n`)})(S&&h,a));const v=await(async({cwd:e=process.cwd(),diff:t,diffFilter:s}={})=>{try{const n=await qe(Rn(t,s),{cwd:e});return n?Ln(n).map((t=>bn(i.resolve(e,t)))):[]}catch{return null}})({cwd:w,diff:a,diffFilter:c});if(!v)throw u||b.output.push(on),b.errors.add(jn),Qr(b);if(zr("Loaded list of staged files in git:\n%O",v),0===v.length)return u||b.output.push(cn),b;const A=await(async({configObject:e,configPath:t,cwd:s=process.cwd(),topLevelDir:n=s},r)=>{if(Gr("Searching for configuration files..."),e)return Gr("Using single direct configuration object..."),{"":Kr(e,"config object",r)};if(t){Gr("Using single configuration path...");const{config:e,filepath:s}=await Mr({configPath:t},r);return e?{[t]:Kr(e,s,r)}:{}}const[o,a]=await Promise.all([qe(qr,{cwd:n}).then(Ln),qe([...qr,"--others","--exclude-standard"],{cwd:n}).then(Ln)]),c=[...o,...a].flatMap((e=>e.startsWith("S ")?[]:[e.replace(/^[HSMRCK?U] /,"")])).filter(Yr).map((e=>bn(i.join(n,e)))).filter((l=s,e=>e.startsWith(bn(l)))).sort(Vr);var l;Gr("Found possible config files:",c);const u=c.reduce(((e,t)=>Object.assign(e,{[t]:null})),{});await Promise.all(Object.keys(u).map((e=>Mr({configPath:e},r).then((({config:t,filepath:s})=>{t&&(e!==s&&Gr('Config file "%s" resolved to "%s"',e,s),u[e]=Kr(t,s,r))})))));const p=Object.entries(u).filter((([,e])=>!!e)).reduce(((e,[t,s])=>({...e,[t]:s})),{});if(!Object.keys(p).length){Gr('Could not find config files inside "%s"',s);const{config:e,filepath:t}=await Mr({cwd:s},r);e?(Gr('Found parent configuration file from "%s"',t),p[t]=Kr(e,t,r)):Gr('Could not find parent configuration files from "%s"',s)}return Gr("Found %d config files",Object.keys(p).length),p})({configObject:s,configPath:n,cwd:r,topLevelDir:w},g),k=Object.keys(A).length;if(0===k)throw b.errors.add(Mn),Qr(b);const C=await(async({configs:e,files:t,singleConfigMode:s})=>{ir("Grouping %d files by %d configurations",t.length,Object.keys(e).length);const n=new Set(t),r={};for(const[o,a]of Object.entries(e)){if(s){r[o]={config:a,files:t};break}const e=i.normalize(i.dirname(o)),c=t=>{const s=i.relative(e,t);return s&&!s.startsWith("..")&&!i.isAbsolute(s)},l=Object.keys(a).some((e=>e.startsWith(".."))),u=new Set(l?n:void 0);l||n.forEach((e=>{c(e)&&u.add(e)})),u.forEach((e=>{n.delete(e)})),r[o]={config:a,files:Array.from(u)}}return r})({configs:A,files:v,singleConfigMode:s||void 0!==n}),O=k>1;let T=!1;const x={ctx:b,exitOnError:!1,registerSignalListeners:!1,...xn({debug:o,quiet:u},g)};let R=0;const L=[],_=new Set;for(const[e,{config:s,files:n}]of Object.entries(C)){const o=e?bn(i.relative(r,e)):"Config object",a=En({baseDir:w,files:n,maxArgLength:l,relative:p}),c=O&&!y?i.dirname(e):r,u=a.length;u>1&&zr("Chunked staged files from `%s` into %d part",e,u);for(const[e,n]of a.entries()){const r=await Promise.all(An({config:s,cwd:c,files:n,relative:p}).map((e=>Ar({commands:e.commands,cwd:c,files:e.fileList,topLevelDir:w,shell:f,verbose:m}).then((t=>{e.fileList.forEach((e=>{const t=i.isAbsolute(e)?e:bn(i.join(c,e));_.add(t)})),T=T||t.some((e=>"git add"===e.command));const s=e.fileList.length;return{title:`${e.pattern}${Ye.Ay.dim(` \u2014 ${s} ${1===s?"file":"files"}`)}`,task:async(e,s)=>s.newListr(t,{concurrent:!1,exitOnError:!0}),skip:()=>0===s&&`${e.pattern}${Ye.Ay.dim(" \u2014 no files")}`}})))));R+=r.length,L.push({title:`${o}${Ye.Ay.dim(` \u2014 ${n.length} ${n.length>1?"files":"file"}`)}`+(u>1?Ye.Ay.dim(` (chunk ${e+1}/${u})...`):""),task:(e,s)=>s.newListr(r,{concurrent:t,exitOnError:!0}),skip:()=>b.errors.has(Un)?"Skipped because of previous git error.":!!r.every((e=>e.skip()))&&`${o}${Ye.Ay.dim(" \u2014 no tasks to run")}`})}}if(T&&!u&&g.warn(un),L.every((e=>e.skip())))return u||b.output.push(ln),b;const I=En({baseDir:r,files:Array.from(_),maxArgLength:l,relative:!1}),N=new rr({allowEmpty:e,gitConfigDir:E,topLevelDir:w,matchedFileChunks:I,diff:a,diffFilter:c}),P=new Zs([{title:"Preparing lint-staged...",task:e=>N.prepare(e)},{title:"Hiding unstaged changes to partially staged files...",task:e=>N.hideUnstagedChanges(e),enabled:ur},{title:`Running tasks for ${a?"changed":"staged"} files...`,task:(e,s)=>s.newListr(L,{concurrent:t}),skip:()=>L.every((e=>e.skip()))},{title:"Applying modifications from tasks...",task:e=>N.applyModifications(e),skip:pr},{title:"Restoring unstaged changes to partially staged files...",task:e=>N.restoreUnstagedChanges(e),enabled:ur,skip:fr},{title:"Reverting to original state because of errors...",task:e=>N.restoreOriginalState(e),enabled:hr,skip:dr},{title:"Cleaning up temporary files...",task:e=>N.cleanup(e),enabled:mr,skip:gr}],x);if(zr("Set max event listeners to the number of tasks: %i",R),b.events.setMaxListeners(R),await P.run(),b.errors.size>0)throw Qr(b);return b},Xr=n("lint-staged:validateOptions"),Zr=n("lint-staged"),ei=()=>{switch(process.platform){case"darwin":return 262144;case"win32":return 8191;default:return 131072}},ti=async({allowEmpty:e=!1,concurrent:t=!0,config:s,configPath:n,cwd:r,debug:o=!1,diff:a,diffFilter:c,maxArgLength:l=ei()/2,quiet:u=!1,relative:p=!1,shell:f=!1,stash:h=void 0===a,hidePartiallyStaged:d=h,verbose:m=!1}={},g=console)=>{const y=await qe(["version","--build-options"],{cwd:r});Zr("%s",y);const b={allowEmpty:e,concurrent:t,configObject:s,configPath:n,cwd:r,debug:o,diff:a,diffFilter:c,maxArgLength:l,quiet:u,relative:p,shell:f,stash:h,hidePartiallyStaged:d,verbose:m};await(async(e={},t)=>{if(Xr("Validating options..."),"string"==typeof e.cwd)try{const t=i.resolve(e.cwd);await _n.access(t,F.constants.F_OK)}catch(s){throw Xr("Failed to validate options: %o",e),t.error(hn("cwd",e.cwd,s.message)),qn}if("string"==typeof e.shell)try{await _n.access(e.shell,F.constants.X_OK)}catch(s){throw Xr("Failed to validate options: %o",e),t.error(hn("shell",e.shell,s.message)),qn}Xr("Validated options: %o",e)})(b,g),Zr("Unset GIT_LITERAL_PATHSPECS (was `%s`)",process.env.GIT_LITERAL_PATHSPECS),delete process.env.GIT_LITERAL_PATHSPECS;try{const e=await Jr(b,g);return Zr("Tasks were executed successfully!"),yn(e,g),!0}catch(e){if(e?.ctx?.errors){const{ctx:t}=e;return t.errors.has(Mn)?g.error(an):t.errors.has(Bn)?g.warn(dn):t.errors.has(Un)&&!t.errors.has(Hn)&&(g.error(fn),t.shouldBackup&&g.error(" Any lost modifications can be restored from a git stash:\n\n > git stash list\n stash@{0}: automatic lint-staged backup\n > git stash apply --index stash@{0}\n")),yn(t,g),!1}throw e}}},5190:(e,t,s)=>{s.d(t,{V:()=>a});var n=s(1708),r=s(6760),i=s(3136);function o(e={}){const{env:t=process.env,platform:s=process.platform}=e;return"win32"!==s?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"}const a=({env:e=n.env,...t}={})=>{const s=o({env:e={...e}});return t.path=e[s],e[s]=(({cwd:e=n.cwd(),path:t=n.env[o()],preferLocal:s=!0,execPath:a=n.execPath,addExecPath:c=!0}={})=>{const l=e instanceof URL?(0,i.fileURLToPath)(e):e,u=r.resolve(l),p=[];return s&&((e,t)=>{let s;for(;s!==t;)e.push(r.join(t,"node_modules/.bin")),s=t,t=r.resolve(t,"..")})(p,u),c&&((e,t,s)=>{const n=t instanceof URL?(0,i.fileURLToPath)(t):t;e.push(r.resolve(s,n,".."))})(p,a,u),[...p,t].join(r.delimiter)})(t),e}},7017:(e,t,s)=>{s.d(t,{cf:()=>p});const n=[];n.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&n.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&n.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const r=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,i=Symbol.for("signal-exit emitter"),o=globalThis,a=Object.defineProperty.bind(Object);class c{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(o[i])return o[i];a(o,i,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const s=this.listeners[e],n=s.indexOf(t);-1!==n&&(0===n&&1===s.length?s.length=0:s.splice(n,1))}emit(e,t,s){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const r of this.listeners[e])n=!0===r(t,s)||n;return"exit"===e&&(n=this.emit("afterExit",t,s)||n),n}}class l{}const u=globalThis.process,{onExit:p,load:f,unload:h}=(d=r(u)?new class extends l{#e="win32"===u.platform?"SIGINT":"SIGHUP";#t=new c;#s;#n;#r;#i={};#o=!1;constructor(e){super(),this.#s=e,this.#i={};for(const t of n)this.#i[t]=()=>{const s=this.#s.listeners(t);let{count:n}=this.#t;const r=e;if("object"==typeof r.__signal_exit_emitter__&&"number"==typeof r.__signal_exit_emitter__.count&&(n+=r.__signal_exit_emitter__.count),s.length===n){this.unload();const s=this.#t.emit("exit",null,t),n="SIGHUP"===t?this.#e:t;s||e.kill(e.pid,n)}};this.#r=e.reallyExit,this.#n=e.emit}onExit(e,t){if(!r(this.#s))return()=>{};!1===this.#o&&this.load();const s=t?.alwaysLast?"afterExit":"exit";return this.#t.on(s,e),()=>{this.#t.removeListener(s,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(const e of n)try{const t=this.#i[e];t&&this.#s.on(e,t)}catch(e){}this.#s.emit=(e,...t)=>this.#a(e,...t),this.#s.reallyExit=e=>this.#c(e)}}unload(){this.#o&&(this.#o=!1,n.forEach((e=>{const t=this.#i[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#s.removeListener(e,t)}catch(e){}})),this.#s.emit=this.#n,this.#s.reallyExit=this.#r,this.#t.count-=1)}#c(e){return r(this.#s)?(this.#s.exitCode=e||0,this.#t.emit("exit",this.#s.exitCode,null),this.#r.call(this.#s,this.#s.exitCode)):0}#a(e,...t){const s=this.#n;if("exit"===e&&r(this.#s)){"number"==typeof t[0]&&(this.#s.exitCode=t[0]);const n=s.call(this.#s,e,...t);return this.#t.emit("exit",this.#s.exitCode,null),n}return s.call(this.#s,e,...t)}}(u):new class extends l{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>d.onExit(e,t),load:()=>d.load(),unload:()=>d.unload()});var d}};
|