@dypnb/dev-tools 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,63 @@
1
+ import e from"path";import t from"fs";import n from"os";import r from"util";import o from"tty";import s from"child_process";import a from"assert";import i from"events";import l from"buffer";import c from"stream";import{fileURLToPath as u}from"node:url";import{dirname as p}from"node:path";var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}
2
+ /*!
3
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
4
+ *
5
+ * Copyright (c) 2014-2016, Jon Schlinkert.
6
+ * Licensed under the MIT License.
7
+ */var h,g,m,y,b=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1},v={"{":"}","(":")","[":"]"},A=function(e){if("!"===e[0])return!0;for(var t=0,n=-2,r=-2,o=-2,s=-2,a=-2;t<e.length;){if("*"===e[t])return!0;if("?"===e[t+1]&&/[\].+)]/.test(e[t]))return!0;if(-1!==r&&"["===e[t]&&"]"!==e[t+1]&&(r<t&&(r=e.indexOf("]",t)),r>t)){if(-1===a||a>r)return!0;if(-1===(a=e.indexOf("\\",t))||a>r)return!0}if(-1!==o&&"{"===e[t]&&"}"!==e[t+1]&&(o=e.indexOf("}",t))>t&&(-1===(a=e.indexOf("\\",t))||a>o))return!0;if(-1!==s&&"("===e[t]&&"?"===e[t+1]&&/[:!=]/.test(e[t+2])&&")"!==e[t+3]&&(s=e.indexOf(")",t))>t&&(-1===(a=e.indexOf("\\",t))||a>s))return!0;if(-1!==n&&"("===e[t]&&"|"!==e[t+1]&&(n<t&&(n=e.indexOf("|",t)),-1!==n&&")"!==e[n+1]&&(s=e.indexOf(")",n))>n&&(-1===(a=e.indexOf("\\",n))||a>s)))return!0;if("\\"===e[t]){var i=e[t+1];t+=2;var l=v[i];if(l){var c=e.indexOf(l,t);-1!==c&&(t=c+1)}if("!"===e[t])return!0}else t++}return!1},E=function(e){if("!"===e[0])return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if("\\"===e[t]){var n=e[t+1];t+=2;var r=v[n];if(r){var o=e.indexOf(r,t);-1!==o&&(t=o+1)}if("!"===e[t])return!0}else t++}return!1},x={exports:{}};
8
+ /*!
9
+ * is-glob <https://github.com/jonschlinkert/is-glob>
10
+ *
11
+ * Copyright (c) 2014-2017, Jon Schlinkert.
12
+ * Released under the MIT License.
13
+ */var R=n;void 0!==R.homedir?x.exports=R.homedir:x.exports=function(){if(y)return m;y=1;var e=t,n=function(){if(g)return h;function e(e,t){if(!e||!e.length||"#"===e.charAt(0))return null;var n=e.split(":");return{username:n[0],password:n[1],uid:n[2],gid:n[3],gecos:n[4],homedir:n[5],shell:n[6]}}return g=1,h=function(t){if("string"!=typeof t)throw new Error("expected a string");return t.split("\n").map(e).filter(Boolean)}}();return m=function(){if("win32"===process.platform)return process.env.USERPROFILE?process.env.USERPROFILE:process.env.HOMEDRIVE&&process.env.HOMEPATH?process.env.HOMEDRIVE+process.env.HOMEPATH:process.env.HOME?process.env.HOME:null;if(process.env.HOME)return process.env.HOME;var t=function(t){try{return e.readFileSync(t,"utf8")}catch(e){return""}}("/etc/passwd"),r=function(e,t){for(var n=e.length,r=0;r<n;r++)if(+e[r].uid===t)return e[r].homedir}(n(t),"function"==typeof process.geteuid?process.geteuid():process.getuid());if(r)return r;var o=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return o?"darwin"===process.platform?"/Users/"+o:"/home/"+o:null}}();var C=x.exports,S=C,_=e,w=function(e){var t=S();return 126===e.charCodeAt(0)?43===e.charCodeAt(1)?_.join(process.cwd(),e.slice(2)):t?_.join(t,e.slice(1)):e:e},T={exports:{}},O={exports:{}},I={};
14
+ /*!
15
+ * expand-tilde <https://github.com/jonschlinkert/expand-tilde>
16
+ *
17
+ * Copyright (c) 2015 Jon Schlinkert.
18
+ * Licensed under the MIT license.
19
+ */I.parse=I.decode=function(e){var t={},n=t,r=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach((function(e,s,a){if(e&&!e.match(/^\s*[;#]/)){var i=e.match(o);if(i){if(void 0!==i[1])return"__proto__"===(r=P(i[1]))?void(n={}):void(n=t[r]=t[r]||{});var l=P(i[2]);if("__proto__"!==l){var c=!i[3]||P(i[4]);switch(c){case"true":case"false":case"null":c=JSON.parse(c)}if(l.length>2&&"[]"===l.slice(-2)){if("__proto__"===(l=l.substring(0,l.length-2)))return;n[l]?Array.isArray(n[l])||(n[l]=[n[l]]):n[l]=[]}Array.isArray(n[l])?n[l].push(c):n[l]=c}}}})),Object.keys(t).filter((function(e,n,r){if(!t[e]||"object"!=typeof t[e]||Array.isArray(t[e]))return!1;var o=k(e),s=t,a=o.pop(),i=a.replace(/\\\./g,".");return o.forEach((function(e,t,n){"__proto__"!==e&&(s[e]&&"object"==typeof s[e]||(s[e]={}),s=s[e])})),(s!==t||i!==a)&&(s[i]=t[e],!0)})).forEach((function(e,n,r){delete t[e]})),t},I.stringify=I.encode=function e(t,n){var r=[],o="";"string"==typeof n?n={section:n,whitespace:!1}:(n=n||{}).whitespace=!0===n.whitespace;var s=n.whitespace?" = ":"=";Object.keys(t).forEach((function(e,n,a){var i=t[e];i&&Array.isArray(i)?i.forEach((function(t){o+=H(e+"[]")+s+H(t)+"\n"})):i&&"object"==typeof i?r.push(e):o+=H(e)+s+H(i)+$})),n.section&&o.length&&(o="["+H(n.section)+"]"+$+o);return r.forEach((function(r,s,a){var i=k(r).join("\\."),l=(n.section?n.section+".":"")+i,c=e(t[r],{section:l,whitespace:n.whitespace});o.length&&c.length&&(o+=$),o+=c})),o},I.safe=H,I.unsafe=P;var $="undefined"!=typeof process&&"win32"===process.platform?"\r\n":"\n";function k(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function L(e){return'"'===e.charAt(0)&&'"'===e.slice(-1)||"'"===e.charAt(0)&&"'"===e.slice(-1)}function H(e){return"string"!=typeof e||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&L(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function P(e,t){if(!L(e=(e||"").trim())){for(var n=!1,r="",o=0,s=e.length;o<s;o++){var a=e.charAt(o);if(n)-1!=="\\;#".indexOf(a)?r+=a:r+="\\"+a,n=!1;else{if(-1!==";#".indexOf(a))break;"\\"===a?n=!0:r+=a}}return n&&(r+="\\"),r.trim()}"'"===e.charAt(0)&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch(e){}return e}var M,N,B={exports:{}};
20
+ /*!
21
+ * is-windows <https://github.com/jonschlinkert/is-windows>
22
+ *
23
+ * Copyright © 2015-2018, Jon Schlinkert.
24
+ * Released under the MIT License.
25
+ */M=B,N=B.exports,function(e){N?M.exports=e():"undefined"!=typeof window?window.isWindows=e():void 0!==f?f.isWindows=e():"undefined"!=typeof self?self.isWindows=e():this.isWindows=e()}((function(){return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}}));var G,D,j,U,F,K=B.exports;F="win32"===process.platform||f.TESTING_WINDOWS?function(){if(D)return G;D=1,G=r,r.sync=function(t,r){return n(e.statSync(t),t,r)};var e=t;function n(e,t,n){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var n=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!n)return!0;if(-1!==(n=n.split(";")).indexOf(""))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,n)}function r(t,r,o){e.stat(t,(function(e,s){o(e,!e&&n(s,t,r))}))}return G}():function(){if(U)return j;U=1,j=n,n.sync=function(t,n){return r(e.statSync(t),n)};var e=t;function n(t,n,o){e.stat(t,(function(e,t){o(e,!e&&r(t,n))}))}function r(e,t){return e.isFile()&&function(e,t){var n=e.mode,r=e.uid,o=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),a=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),i=parseInt("100",8),l=parseInt("010",8);return n&parseInt("001",8)||n&l&&o===a||n&i&&r===s||n&(i|l)&&0===s}(e,t)}return j}();var q,W,J=X;function X(e,t,n){if("function"==typeof t&&(n=t,t={}),!n){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(n,r){X(e,t||{},(function(e,t){e?r(e):n(t)}))}))}F(e,t||{},(function(e,r){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)}))}X.sync=function(e,t){try{return F.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}},function(n){var r,o=t,s=e,a=w,i=C,l=I;function c(){if(process.env.PREFIX)r=process.env.PREFIX;else{var t=i();if(t){var n=s.resolve(t,".npmrc");r=u(n)}if(!r){var l=function(){try{return o.realpathSync(function(){if(W)return q;W=1,q=i,i.sync=function(e,t){for(var r=a(e,t=t||{}),i=r.env,l=r.ext,c=r.extExe,u=[],p=0,f=i.length;p<f;p++){var d=i[p];'"'===d.charAt(0)&&'"'===d.slice(-1)&&(d=d.slice(1,-1));var h=n.join(d,e);!d&&/^\.[\\\/]/.test(e)&&(h=e.slice(0,2)+h);for(var g=0,m=l.length;g<m;g++){var y=h+l[g];try{if(o.sync(y,{pathExt:c})){if(!t.all)return y;u.push(y)}}catch(e){}}}if(t.all&&u.length)return u;if(t.nothrow)return null;throw s(e)};var t="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,n=e,r=t?";":":",o=J;function s(e){var t=new Error("not found: "+e);return t.code="ENOENT",t}function a(e,n){var o=n.colon||r,s=n.path||process.env.PATH||"",a=[""];s=s.split(o);var i="";return t&&(s.unshift(process.cwd()),a=(i=n.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM").split(o),-1!==e.indexOf(".")&&""!==a[0]&&a.unshift("")),(e.match(/\//)||t&&e.match(/\\/))&&(s=[""]),{env:s,ext:a,extExe:i}}function i(e,t,r){"function"==typeof t&&(r=t,t={});var i=a(e,t),l=i.env,c=i.ext,u=i.extExe,p=[];!function a(i,f){if(i===f)return t.all&&p.length?r(null,p):r(s(e));var d=l[i];'"'===d.charAt(0)&&'"'===d.slice(-1)&&(d=d.slice(1,-1));var h=n.join(d,e);!d&&/^\.[\\\/]/.test(e)&&(h=e.slice(0,2)+h),function e(n,s){if(n===s)return a(i+1,f);var l=c[n];o(h+l,{pathExt:u},(function(o,a){if(!o&&a){if(!t.all)return r(null,h+l);p.push(h+l)}return e(n+1,s)}))}(0,c.length)}(0,l.length)}return q}
26
+ /*!
27
+ * global-prefix <https://github.com/jonschlinkert/global-prefix>
28
+ *
29
+ * Copyright (c) 2015-2017 Jon Schlinkert.
30
+ * Licensed under the MIT license.
31
+ */().sync("npm"))}catch(e){}return null}();if(l){var c=s.resolve(l,"..","..","npmrc");if(r=u(c)){var p=s.resolve(r,"etc","npmrc");r=u(p)||r}}r||function(){var e=K;e()?r=process.env.APPDATA?s.join(process.env.APPDATA,"npm"):s.dirname(process.execPath):(r=s.dirname(s.dirname(process.execPath)),process.env.DESTDIR&&(r=s.join(process.env.DESTDIR,r)))}()}}if(r)return a(r)}function u(e){try{var t=o.readFileSync(e,"utf-8"),n=l.parse(t);if(n.prefix)return n.prefix}catch(e){}return null}Object.defineProperty(n,"exports",{enumerable:!0,get:function(){return r||(r=c())}})}(O);var Q=O.exports;
32
+ /*!
33
+ * global-modules <https://github.com/jonschlinkert/global-modules>
34
+ *
35
+ * Copyright (c) 2015-2017 Jon Schlinkert.
36
+ * Licensed under the MIT license.
37
+ */!function(t){var n,r=e,o=Q,s=K;Object.defineProperty(t,"exports",{enumerable:!0,get:function(){return n||(n=s()?r.resolve(o,"node_modules"):r.resolve(o,"lib/node_modules"))}})}(T);var z=e,V=w,Y=T.exports,Z=t,ee=e;
38
+ /*!
39
+ * resolve-dir <https://github.com/jonschlinkert/resolve-dir>
40
+ *
41
+ * Copyright (c) 2015, Jon Schlinkert.
42
+ * Licensed under the MIT License.
43
+ */var te={};!function(e){e.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find((e=>e.type===t)),e.exceedsLimit=(t,n,r=1,o)=>!1!==o&&(!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=o),e.escapeNode=(e,t=0,n)=>{let r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.escaped=!0)},e.encloseBrace=e=>"brace"===e.type&&(e.commas>>0+e.ranges>>0==0&&(e.invalid=!0,!0)),e.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges>>0==0||!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0)),e.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),e.reduce=e=>e.reduce(((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e)),[]),e.flatten=(...e)=>{const t=[],n=e=>{for(let r=0;r<e.length;r++){let o=e[r];Array.isArray(o)?n(o):void 0!==o&&t.push(o)}return t};return n(e),t}}(te);const ne=te;var re=(e,t={})=>{let n=(e,r={})=>{let o=t.escapeInvalid&&ne.isInvalidBrace(r),s=!0===e.invalid&&!0===t.escapeInvalid,a="";if(e.value)return(o||s)&&ne.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)a+=n(t);return a};return n(e)};
44
+ /*!
45
+ * is-number <https://github.com/jonschlinkert/is-number>
46
+ *
47
+ * Copyright (c) 2014-present, Jon Schlinkert.
48
+ * Released under the MIT License.
49
+ */
50
+ /*!
51
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
52
+ *
53
+ * Copyright (c) 2015-present, Jon Schlinkert.
54
+ * Released under the MIT License.
55
+ */
56
+ const oe=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))},se=(e,t,n)=>{if(!1===oe(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===oe(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let r={relaxZeros:!0,...n};"boolean"==typeof r.strictZeros&&(r.relaxZeros=!1===r.strictZeros);let o=e+":"+t+"="+String(r.relaxZeros)+String(r.shorthand)+String(r.capture)+String(r.wrap);if(se.cache.hasOwnProperty(o))return se.cache[o].result;let s=Math.min(e,t),a=Math.max(e,t);if(1===Math.abs(s-a)){let n=e+"|"+t;return r.capture?`(${n})`:!1===r.wrap?n:`(?:${n})`}let i=ge(e)||ge(t),l={min:e,max:t,a:s,b:a},c=[],u=[];if(i&&(l.isPadded=i,l.maxLen=String(l.max).length),s<0){u=ie(a<0?Math.abs(a):1,Math.abs(s),l,r),s=l.a=0}return a>=0&&(c=ie(s,a,l,r)),l.negatives=u,l.positives=c,l.result=function(e,t,n){let r=le(e,t,"-",!1)||[],o=le(t,e,"",!1)||[],s=le(e,t,"-?",!0)||[];return r.concat(s).concat(o).join("|")}(u,c),!0===r.capture?l.result=`(${l.result})`:!1!==r.wrap&&c.length+u.length>1&&(l.result=`(?:${l.result})`),se.cache[o]=l,l.result};function ae(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),o=r.length,s="",a=0;for(let e=0;e<o;e++){let[t,n]=r[e];t===n?s+=t:"0"!==t||"9"!==n?s+=he(t,n):a++}return a&&(s+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:s,count:[a],digits:o}}function ie(e,t,n,r){let o,s=function(e,t){let n=1,r=1,o=pe(e,n),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),n+=1,o=pe(e,n);for(o=fe(t+1,r)-1;e<o&&o<=t;)s.add(o),r+=1,o=fe(t+1,r)-1;return s=[...s],s.sort(ce),s}(e,t),a=[],i=e;for(let e=0;e<s.length;e++){let t=s[e],l=ae(String(i),String(t),r),c="";n.isPadded||!o||o.pattern!==l.pattern?(n.isPadded&&(c=me(t,n,r)),l.string=c+l.pattern+de(l.count),a.push(l),i=t+1,o=l):(o.count.length>1&&o.count.pop(),o.count.push(l.count[0]),o.string=o.pattern+de(o.count),i=t+1)}return a}function le(e,t,n,r,o){let s=[];for(let o of e){let{string:e}=o;r||ue(t,"string",e)||s.push(n+e),r&&ue(t,"string",e)&&s.push(n+e)}return s}function ce(e,t){return e>t?1:t>e?-1:0}function ue(e,t,n){return e.some((e=>e[t]===n))}function pe(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function fe(e,t){return e-e%Math.pow(10,t)}function de(e){let[t=0,n=""]=e;return n||t>1?`{${t+(n?","+n:"")}}`:""}function he(e,t,n){return`[${e}${t-e==1?"":"-"}${t}]`}function ge(e){return/^-?(0+)\d/.test(e)}function me(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),o=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${r}}`:`0{${r}}`}}se.cache={},se.clearCache=()=>se.cache={};
57
+ /*!
58
+ * fill-range <https://github.com/jonschlinkert/fill-range>
59
+ *
60
+ * Copyright (c) 2014-present, Jon Schlinkert.
61
+ * Licensed under the MIT License.
62
+ */
63
+ const ye=r,be=se,ve=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),Ae=e=>"number"==typeof e||"string"==typeof e&&""!==e,Ee=e=>Number.isInteger(+e),xe=e=>{let t=`${e}`,n=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++n];);return n>0},Re=(e,t,n)=>{if(t>0){let n="-"===e[0]?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return!1===n?String(e):e},Ce=(e,t)=>{let n="-"===e[0]?"-":"";for(n&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return n?"-"+e:e},Se=(e,t,n,r)=>{if(n)return be(e,t,{wrap:!1,...r});let o=String.fromCharCode(e);return e===t?o:`[${o}-${String.fromCharCode(t)}]`},_e=(e,t,n)=>{if(Array.isArray(e)){let t=!0===n.wrap,r=n.capture?"":"?:";return t?`(${r}${e.join("|")})`:e.join("|")}return be(e,t,n)},we=(...e)=>new RangeError("Invalid range arguments: "+ye.inspect(...e)),Te=(e,t,n)=>{if(!0===n.strictRanges)throw we([e,t]);return[]},Oe=(e,t,n=1,r={})=>{let o=Number(e),s=Number(t);if(!Number.isInteger(o)||!Number.isInteger(s)){if(!0===r.strictRanges)throw we([e,t]);return[]}0===o&&(o=0),0===s&&(s=0);let a=o>s,i=String(e),l=String(t),c=String(n);n=Math.max(Math.abs(n),1);let u=xe(i)||xe(l)||xe(c),p=u?Math.max(i.length,l.length,c.length):0,f=!1===u&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),d=r.transform||(e=>t=>!0===e?Number(t):String(t))(f);if(r.toRegex&&1===n)return Se(Ce(e,p),Ce(t,p),!0,r);let h={negatives:[],positives:[]},g=[],m=0;for(;a?o>=s:o<=s;)!0===r.toRegex&&n>1?h[(y=o)<0?"negatives":"positives"].push(Math.abs(y)):g.push(Re(d(o,m),p,f)),o=a?o-n:o+n,m++;var y;return!0===r.toRegex?n>1?((e,t)=>{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?"":"?:",o="",s="";return e.positives.length&&(o=e.positives.join("|")),e.negatives.length&&(s=`-(${r}${e.negatives.join("|")})`),n=o&&s?`${o}|${s}`:o||s,t.wrap?`(${r}${n})`:n})(h,r):_e(g,null,{wrap:!1,...r}):g},Ie=(e,t,n,r={})=>{if(null==t&&Ae(e))return[e];if(!Ae(e)||!Ae(t))return Te(e,t,r);if("function"==typeof n)return Ie(e,t,1,{transform:n});if(ve(n))return Ie(e,t,0,n);let o={...r};return!0===o.capture&&(o.wrap=!0),n=n||o.step||1,Ee(n)?Ee(e)&&Ee(t)?Oe(e,t,n,o):((e,t,n=1,r={})=>{if(!Ee(e)&&e.length>1||!Ee(t)&&t.length>1)return Te(e,t,r);let o=r.transform||(e=>String.fromCharCode(e)),s=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),i=s>a,l=Math.min(s,a),c=Math.max(s,a);if(r.toRegex&&1===n)return Se(l,c,!1,r);let u=[],p=0;for(;i?s>=a:s<=a;)u.push(o(s,p)),s=i?s-n:s+n,p++;return!0===r.toRegex?_e(u,null,{wrap:!1,options:r}):u})(e,t,Math.max(Math.abs(n),1),o):null==n||ve(n)?Ie(e,t,1,n):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(n,o)};const $e=Ie,ke=te;var Le=(e,t={})=>{let n=(e,r={})=>{let o=ke.isInvalidBrace(r),s=!0===e.invalid&&!0===t.escapeInvalid,a=!0===o||!0===s,i=!0===t.escapeInvalid?"\\":"",l="";if(!0===e.isOpen)return i+e.value;if(!0===e.isClose)return i+e.value;if("open"===e.type)return a?i+e.value:"(";if("close"===e.type)return a?i+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":a?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let n=ke.reduce(e.nodes),r=$e(...n,{...t,wrap:!1,toRegex:!0});if(0!==r.length)return n.length>1&&r.length>1?`(${r})`:r}if(e.nodes)for(let t of e.nodes)l+=n(t,e);return l};return n(e)};const He=Ie,Pe=re,Me=te,Ne=(e="",t="",n=!1)=>{let r=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return n?Me.flatten(t).map((e=>`{${e}}`)):t;for(let o of e)if(Array.isArray(o))for(let e of o)r.push(Ne(e,t,n));else for(let e of t)!0===n&&"string"==typeof e&&(e=`{${e}}`),r.push(Array.isArray(e)?Ne(o,e,n):o+e);return Me.flatten(r)};var Be=(e,t={})=>{let n=void 0===t.rangeLimit?1e3:t.rangeLimit,r=(e,o={})=>{e.queue=[];let s=o,a=o.queue;for(;"brace"!==s.type&&"root"!==s.type&&s.parent;)s=s.parent,a=s.queue;if(e.invalid||e.dollar)return void a.push(Ne(a.pop(),Pe(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void a.push(Ne(a.pop(),["{}"]));if(e.nodes&&e.ranges>0){let r=Me.reduce(e.nodes);if(Me.exceedsLimit(...r,t.step,n))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let o=He(...r,t);return 0===o.length&&(o=Pe(e,t)),a.push(Ne(a.pop(),o)),void(e.nodes=[])}let i=Me.encloseBrace(e),l=e.queue,c=e;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,l=c.queue;for(let t=0;t<e.nodes.length;t++){let n=e.nodes[t];"comma"!==n.type||"brace"!==e.type?"close"!==n.type?n.value&&"open"!==n.type?l.push(Ne(l.pop(),n.value)):n.nodes&&r(n,e):a.push(Ne(a.pop(),l,i)):(1===t&&l.push(""),l.push(""))}return l};return Me.flatten(r(e))};const Ge=re,{MAX_LENGTH:De,CHAR_BACKSLASH:je,CHAR_BACKTICK:Ue,CHAR_COMMA:Fe,CHAR_DOT:Ke,CHAR_LEFT_PARENTHESES:qe,CHAR_RIGHT_PARENTHESES:We,CHAR_LEFT_CURLY_BRACE:Je,CHAR_RIGHT_CURLY_BRACE:Xe,CHAR_LEFT_SQUARE_BRACKET:Qe,CHAR_RIGHT_SQUARE_BRACKET:ze,CHAR_DOUBLE_QUOTE:Ve,CHAR_SINGLE_QUOTE:Ye,CHAR_NO_BREAK_SPACE:Ze,CHAR_ZERO_WIDTH_NOBREAK_SPACE:et}={MAX_LENGTH:65536,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:" ",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"};var tt=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let n=t||{},r="number"==typeof n.maxLength?Math.min(De,n.maxLength):De;if(e.length>r)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${r})`);let o,s={type:"root",input:e,nodes:[]},a=[s],i=s,l=s,c=0,u=e.length,p=0,f=0;const d=()=>e[p++],h=e=>{if("text"===e.type&&"dot"===l.type&&(l.type="text"),!l||"text"!==l.type||"text"!==e.type)return i.nodes.push(e),e.parent=i,e.prev=l,l=e,e;l.value+=e.value};for(h({type:"bos"});p<u;)if(i=a[a.length-1],o=d(),o!==et&&o!==Ze)if(o!==je)if(o!==ze)if(o!==Qe)if(o!==qe)if(o!==We)if(o!==Ve&&o!==Ye&&o!==Ue)if(o!==Je)if(o!==Xe)if(o===Fe&&f>0){if(i.ranges>0){i.ranges=0;let e=i.nodes.shift();i.nodes=[e,{type:"text",value:Ge(i)}]}h({type:"comma",value:o}),i.commas++}else if(o===Ke&&f>0&&0===i.commas){let e=i.nodes;if(0===f||0===e.length){h({type:"text",value:o});continue}if("dot"===l.type){if(i.range=[],l.value+=o,l.type="range",3!==i.nodes.length&&5!==i.nodes.length){i.invalid=!0,i.ranges=0,l.type="text";continue}i.ranges++,i.args=[];continue}if("range"===l.type){e.pop();let t=e[e.length-1];t.value+=l.value+o,l=t,i.ranges--;continue}h({type:"dot",value:o})}else h({type:"text",value:o});else{if("brace"!==i.type){h({type:"text",value:o});continue}let e="close";i=a.pop(),i.close=!0,h({type:e,value:o}),f--,i=a[a.length-1]}else{f++;let e=l.value&&"$"===l.value.slice(-1)||!0===i.dollar;i=h({type:"brace",open:!0,close:!1,dollar:e,depth:f,commas:0,ranges:0,nodes:[]}),a.push(i),h({type:"open",value:o})}else{let e,n=o;for(!0!==t.keepQuotes&&(o="");p<u&&(e=d());)if(e!==je){if(e===n){!0===t.keepQuotes&&(o+=e);break}o+=e}else o+=e+d();h({type:"text",value:o})}else{if("paren"!==i.type){h({type:"text",value:o});continue}i=a.pop(),h({type:"text",value:o}),i=a[a.length-1]}else i=h({type:"paren",nodes:[]}),a.push(i),h({type:"text",value:o});else{let e;for(c++;p<u&&(e=d());)if(o+=e,e!==Qe)if(e!==je){if(e===ze&&(c--,0===c))break}else o+=d();else c++;h({type:"text",value:o})}else h({type:"text",value:"\\"+o});else h({type:"text",value:(t.keepEscaping?o:"")+d()});do{if(i=a.pop(),"root"!==i.type){i.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)}));let e=a[a.length-1],t=e.nodes.indexOf(i);e.nodes.splice(t,1,...i.nodes)}}while(a.length>0);return h({type:"eos"}),s};const nt=re,rt=Le,ot=Be,st=tt,at=(e,t={})=>{let n=[];if(Array.isArray(e))for(let r of e){let e=at.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(at.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};at.parse=(e,t={})=>st(e,t),at.stringify=(e,t={})=>nt("string"==typeof e?at.parse(e,t):e,t),at.compile=(e,t={})=>("string"==typeof e&&(e=at.parse(e,t)),rt(e,t)),at.expand=(e,t={})=>{"string"==typeof e&&(e=at.parse(e,t));let n=ot(e,t);return!0===t.noempty&&(n=n.filter(Boolean)),!0===t.nodupes&&(n=[...new Set(n)]),n},at.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?at.compile(e,t):at.expand(e,t);var it=at,lt={};const ct=e,ut="\\\\/",pt=`[^${ut}]`,ft="\\.",dt="\\/",ht="[^/]",gt=`(?:${dt}|$)`,mt=`(?:^|${dt})`,yt=`${ft}{1,2}${gt}`,bt={DOT_LITERAL:ft,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:dt,ONE_CHAR:"(?=.)",QMARK:ht,END_ANCHOR:gt,DOTS_SLASH:yt,NO_DOT:`(?!${ft})`,NO_DOTS:`(?!${mt}${yt})`,NO_DOT_SLASH:`(?!${ft}{0,1}${gt})`,NO_DOTS_SLASH:`(?!${yt})`,QMARK_NO_DOT:`[^.${dt}]`,STAR:`${ht}*?`,START_ANCHOR:mt},vt={...bt,SLASH_LITERAL:`[${ut}]`,QMARK:pt,STAR:`${pt}*?`,DOTS_SLASH:`${ft}{1,2}(?:[${ut}]|$)`,NO_DOT:`(?!${ft})`,NO_DOTS:`(?!(?:^|[${ut}])${ft}{1,2}(?:[${ut}]|$))`,NO_DOT_SLASH:`(?!${ft}{0,1}(?:[${ut}]|$))`,NO_DOTS_SLASH:`(?!${ft}{1,2}(?:[${ut}]|$))`,QMARK_NO_DOT:`[^.${ut}]`,START_ANCHOR:`(?:^|[${ut}])`,END_ANCHOR:`(?:[${ut}]|$)`};var At={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:ct.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?vt:bt};!function(t){const n=e,r="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:i}=At;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(i,"\\$1"),t.toPosixSlashes=e=>e.replace(o,"/"),t.removeBackslashes=e=>e.replace(s,(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,n,r)=>{const o=e.lastIndexOf(n,r);return-1===o?e:"\\"===e[o-1]?t.escapeLast(e,n,o-1):`${e.slice(0,o)}\\${e.slice(o)}`},t.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},t.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(lt);const Et=lt,{CHAR_ASTERISK:xt,CHAR_AT:Rt,CHAR_BACKWARD_SLASH:Ct,CHAR_COMMA:St,CHAR_DOT:_t,CHAR_EXCLAMATION_MARK:wt,CHAR_FORWARD_SLASH:Tt,CHAR_LEFT_CURLY_BRACE:Ot,CHAR_LEFT_PARENTHESES:It,CHAR_LEFT_SQUARE_BRACKET:$t,CHAR_PLUS:kt,CHAR_QUESTION_MARK:Lt,CHAR_RIGHT_CURLY_BRACE:Ht,CHAR_RIGHT_PARENTHESES:Pt,CHAR_RIGHT_SQUARE_BRACKET:Mt}=At,Nt=e=>e===Tt||e===Ct,Bt=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};var Gt=(e,t)=>{const n=t||{},r=e.length-1,o=!0===n.parts||!0===n.scanToEnd,s=[],a=[],i=[];let l,c,u=e,p=-1,f=0,d=0,h=!1,g=!1,m=!1,y=!1,b=!1,v=!1,A=!1,E=!1,x=!1,R=!1,C=0,S={value:"",depth:0,isGlob:!1};const _=()=>p>=r,w=()=>(l=c,u.charCodeAt(++p));for(;p<r;){let e;if(c=w(),c!==Ct){if(!0===v||c===Ot){for(C++;!0!==_()&&(c=w());)if(c!==Ct)if(c!==Ot){if(!0!==v&&c===_t&&(c=w())===_t){if(h=S.isBrace=!0,m=S.isGlob=!0,R=!0,!0===o)continue;break}if(!0!==v&&c===St){if(h=S.isBrace=!0,m=S.isGlob=!0,R=!0,!0===o)continue;break}if(c===Ht&&(C--,0===C)){v=!1,h=S.isBrace=!0,R=!0;break}}else C++;else A=S.backslashes=!0,w();if(!0===o)continue;break}if(c!==Tt){if(!0!==n.noext){if(!0===(c===kt||c===Rt||c===xt||c===Lt||c===wt)&&u.charCodeAt(p+1)===It){if(m=S.isGlob=!0,y=S.isExtglob=!0,R=!0,c===wt&&p===f&&(x=!0),!0===o){for(;!0!==_()&&(c=w());)if(c!==Ct){if(c===Pt){m=S.isGlob=!0,R=!0;break}}else A=S.backslashes=!0,c=w();continue}break}}if(c===xt){if(l===xt&&(b=S.isGlobstar=!0),m=S.isGlob=!0,R=!0,!0===o)continue;break}if(c===Lt){if(m=S.isGlob=!0,R=!0,!0===o)continue;break}if(c===$t){for(;!0!==_()&&(e=w());)if(e!==Ct){if(e===Mt){g=S.isBracket=!0,m=S.isGlob=!0,R=!0;break}}else A=S.backslashes=!0,w();if(!0===o)continue;break}if(!0===n.nonegate||c!==wt||p!==f){if(!0!==n.noparen&&c===It){if(m=S.isGlob=!0,!0===o){for(;!0!==_()&&(c=w());)if(c!==It){if(c===Pt){R=!0;break}}else A=S.backslashes=!0,c=w();continue}break}if(!0===m){if(R=!0,!0===o)continue;break}}else E=S.negated=!0,f++}else{if(s.push(p),a.push(S),S={value:"",depth:0,isGlob:!1},!0===R)continue;if(l===_t&&p===f+1){f+=2;continue}d=p+1}}else A=S.backslashes=!0,c=w(),c===Ot&&(v=!0)}!0===n.noext&&(y=!1,m=!1);let T=u,O="",I="";f>0&&(O=u.slice(0,f),u=u.slice(f),d-=f),T&&!0===m&&d>0?(T=u.slice(0,d),I=u.slice(d)):!0===m?(T="",I=u):T=u,T&&""!==T&&"/"!==T&&T!==u&&Nt(T.charCodeAt(T.length-1))&&(T=T.slice(0,-1)),!0===n.unescape&&(I&&(I=Et.removeBackslashes(I)),T&&!0===A&&(T=Et.removeBackslashes(T)));const $={prefix:O,input:e,start:f,base:T,glob:I,isBrace:h,isBracket:g,isGlob:m,isExtglob:y,isGlobstar:b,negated:E,negatedExtglob:x};if(!0===n.tokens&&($.maxDepth=0,Nt(c)||a.push(S),$.tokens=a),!0===n.parts||!0===n.tokens){let t;for(let r=0;r<s.length;r++){const o=t?t+1:f,l=s[r],c=e.slice(o,l);n.tokens&&(0===r&&0!==f?(a[r].isPrefix=!0,a[r].value=O):a[r].value=c,Bt(a[r]),$.maxDepth+=a[r].depth),0===r&&""===c||i.push(c),t=l}if(t&&t+1<e.length){const r=e.slice(t+1);i.push(r),n.tokens&&(a[a.length-1].value=r,Bt(a[a.length-1]),$.maxDepth+=a[a.length-1].depth)}$.slashes=s,$.parts=i}return $};const Dt=At,jt=lt,{MAX_LENGTH:Ut,POSIX_REGEX_SOURCE:Ft,REGEX_NON_SPECIAL_CHARS:Kt,REGEX_SPECIAL_CHARS_BACKREF:qt,REPLACEMENTS:Wt}=Dt,Jt=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const n=`[${e.join("-")}]`;try{new RegExp(n)}catch(t){return e.map((e=>jt.escapeRegex(e))).join("..")}return n},Xt=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Qt=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=Wt[e]||e;const n={...t},r="number"==typeof n.maxLength?Math.min(Ut,n.maxLength):Ut;let o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);const s={type:"bos",value:"",output:n.prepend||""},a=[s],i=n.capture?"":"?:",l=jt.isWindows(t),c=Dt.globChars(l),u=Dt.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:f,SLASH_LITERAL:d,ONE_CHAR:h,DOTS_SLASH:g,NO_DOT:m,NO_DOT_SLASH:y,NO_DOTS_SLASH:b,QMARK:v,QMARK_NO_DOT:A,STAR:E,START_ANCHOR:x}=c,R=e=>`(${i}(?:(?!${x}${e.dot?g:p}).)*?)`,C=n.dot?"":m,S=n.dot?v:A;let _=!0===n.bash?R(n):E;n.capture&&(_=`(${_})`),"boolean"==typeof n.noext&&(n.noextglob=n.noext);const w={input:e,index:-1,start:0,dot:!0===n.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};e=jt.removePrefix(e,w),o=e.length;const T=[],O=[],I=[];let $,k=s;const L=()=>w.index===o-1,H=w.peek=(t=1)=>e[w.index+t],P=w.advance=()=>e[++w.index]||"",M=()=>e.slice(w.index+1),N=(e="",t=0)=>{w.consumed+=e,w.index+=t},B=e=>{w.output+=null!=e.output?e.output:e.value,N(e.value)},G=()=>{let e=1;for(;"!"===H()&&("("!==H(2)||"?"===H(3));)P(),w.start++,e++;return e%2!=0&&(w.negated=!0,w.start++,!0)},D=e=>{w[e]++,I.push(e)},j=e=>{w[e]--,I.pop()},U=e=>{if("globstar"===k.type){const t=w.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||T.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(w.output=w.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=_,w.output+=k.output)}if(T.length&&"paren"!==e.type&&(T[T.length-1].inner+=e.value),(e.value||e.output)&&B(e),k&&"text"===k.type&&"text"===e.type)return k.value+=e.value,void(k.output=(k.output||"")+e.value);e.prev=k,a.push(e),k=e},F=(e,t)=>{const r={...u[t],conditions:1,inner:""};r.prev=k,r.parens=w.parens,r.output=w.output;const o=(n.capture?"(":"")+r.open;D("parens"),U({type:e,value:t,output:w.output?"":h}),U({type:"paren",extglob:!0,value:P(),output:o}),T.push(r)},K=e=>{let r,o=e.close+(n.capture?")":"");if("negate"===e.type){let s=_;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(s=R(n)),(s!==_||L()||/^\)+$/.test(M()))&&(o=e.close=`)$))${s}`),e.inner.includes("*")&&(r=M())&&/^\.[^\\/.]+$/.test(r)){const n=Qt(r,{...t,fastpaths:!1}).output;o=e.close=`)${n})${s})`}"bos"===e.prev.type&&(w.negatedExtglob=!0)}U({type:"paren",extglob:!0,value:$,output:o}),j("parens")};if(!1!==n.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let r=!1,o=e.replace(qt,((e,t,n,o,s,a)=>"\\"===o?(r=!0,e):"?"===o?t?t+o+(s?v.repeat(s.length):""):0===a?S+(s?v.repeat(s.length):""):v.repeat(n.length):"."===o?p.repeat(n.length):"*"===o?t?t+o+(s?_:""):_:t?e:`\\${e}`));return!0===r&&(o=!0===n.unescape?o.replace(/\\/g,""):o.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),o===e&&!0===n.contains?(w.output=e,w):(w.output=jt.wrapOutput(o,w,t),w)}for(;!L();){if($=P(),"\0"===$)continue;if("\\"===$){const e=H();if("/"===e&&!0!==n.bash)continue;if("."===e||";"===e)continue;if(!e){$+="\\",U({type:"text",value:$});continue}const t=/^\\+/.exec(M());let r=0;if(t&&t[0].length>2&&(r=t[0].length,w.index+=r,r%2!=0&&($+="\\")),!0===n.unescape?$=P():$+=P(),0===w.brackets){U({type:"text",value:$});continue}}if(w.brackets>0&&("]"!==$||"["===k.value||"[^"===k.value)){if(!1!==n.posix&&":"===$){const e=k.value.slice(1);if(e.includes("[")&&(k.posix=!0,e.includes(":"))){const e=k.value.lastIndexOf("["),t=k.value.slice(0,e),n=k.value.slice(e+2),r=Ft[n];if(r){k.value=t+r,w.backtrack=!0,P(),s.output||1!==a.indexOf(k)||(s.output=h);continue}}}("["===$&&":"!==H()||"-"===$&&"]"===H())&&($=`\\${$}`),"]"!==$||"["!==k.value&&"[^"!==k.value||($=`\\${$}`),!0===n.posix&&"!"===$&&"["===k.value&&($="^"),k.value+=$,B({value:$});continue}if(1===w.quotes&&'"'!==$){$=jt.escapeRegex($),k.value+=$,B({value:$});continue}if('"'===$){w.quotes=1===w.quotes?0:1,!0===n.keepQuotes&&U({type:"text",value:$});continue}if("("===$){D("parens"),U({type:"paren",value:$});continue}if(")"===$){if(0===w.parens&&!0===n.strictBrackets)throw new SyntaxError(Xt("opening","("));const e=T[T.length-1];if(e&&w.parens===e.parens+1){K(T.pop());continue}U({type:"paren",value:$,output:w.parens?")":"\\)"}),j("parens");continue}if("["===$){if(!0!==n.nobracket&&M().includes("]"))D("brackets");else{if(!0!==n.nobracket&&!0===n.strictBrackets)throw new SyntaxError(Xt("closing","]"));$=`\\${$}`}U({type:"bracket",value:$});continue}if("]"===$){if(!0===n.nobracket||k&&"bracket"===k.type&&1===k.value.length){U({type:"text",value:$,output:`\\${$}`});continue}if(0===w.brackets){if(!0===n.strictBrackets)throw new SyntaxError(Xt("opening","["));U({type:"text",value:$,output:`\\${$}`});continue}j("brackets");const e=k.value.slice(1);if(!0===k.posix||"^"!==e[0]||e.includes("/")||($=`/${$}`),k.value+=$,B({value:$}),!1===n.literalBrackets||jt.hasRegexChars(e))continue;const t=jt.escapeRegex(k.value);if(w.output=w.output.slice(0,-k.value.length),!0===n.literalBrackets){w.output+=t,k.value=t;continue}k.value=`(${i}${t}|${k.value})`,w.output+=k.value;continue}if("{"===$&&!0!==n.nobrace){D("braces");const e={type:"brace",value:$,output:"(",outputIndex:w.output.length,tokensIndex:w.tokens.length};O.push(e),U(e);continue}if("}"===$){const e=O[O.length-1];if(!0===n.nobrace||!e){U({type:"text",value:$,output:$});continue}let t=")";if(!0===e.dots){const e=a.slice(),r=[];for(let t=e.length-1;t>=0&&(a.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=Jt(r,n),w.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=w.output.slice(0,e.outputIndex),r=w.tokens.slice(e.tokensIndex);e.value=e.output="\\{",$=t="\\}",w.output=n;for(const e of r)w.output+=e.output||e.value}U({type:"brace",value:$,output:t}),j("braces"),O.pop();continue}if("|"===$){T.length>0&&T[T.length-1].conditions++,U({type:"text",value:$});continue}if(","===$){let e=$;const t=O[O.length-1];t&&"braces"===I[I.length-1]&&(t.comma=!0,e="|"),U({type:"comma",value:$,output:e});continue}if("/"===$){if("dot"===k.type&&w.index===w.start+1){w.start=w.index+1,w.consumed="",w.output="",a.pop(),k=s;continue}U({type:"slash",value:$,output:d});continue}if("."===$){if(w.braces>0&&"dot"===k.type){"."===k.value&&(k.output=p);const e=O[O.length-1];k.type="dots",k.output+=$,k.value+=$,e.dots=!0;continue}if(w.braces+w.parens===0&&"bos"!==k.type&&"slash"!==k.type){U({type:"text",value:$,output:p});continue}U({type:"dot",value:$,output:p});continue}if("?"===$){if(!(k&&"("===k.value)&&!0!==n.noextglob&&"("===H()&&"?"!==H(2)){F("qmark",$);continue}if(k&&"paren"===k.type){const e=H();let t=$;if("<"===e&&!jt.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===k.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(M()))&&(t=`\\${$}`),U({type:"text",value:$,output:t});continue}if(!0!==n.dot&&("slash"===k.type||"bos"===k.type)){U({type:"qmark",value:$,output:A});continue}U({type:"qmark",value:$,output:v});continue}if("!"===$){if(!0!==n.noextglob&&"("===H()&&("?"!==H(2)||!/[!=<:]/.test(H(3)))){F("negate",$);continue}if(!0!==n.nonegate&&0===w.index){G();continue}}if("+"===$){if(!0!==n.noextglob&&"("===H()&&"?"!==H(2)){F("plus",$);continue}if(k&&"("===k.value||!1===n.regex){U({type:"plus",value:$,output:f});continue}if(k&&("bracket"===k.type||"paren"===k.type||"brace"===k.type)||w.parens>0){U({type:"plus",value:$});continue}U({type:"plus",value:f});continue}if("@"===$){if(!0!==n.noextglob&&"("===H()&&"?"!==H(2)){U({type:"at",extglob:!0,value:$,output:""});continue}U({type:"text",value:$});continue}if("*"!==$){"$"!==$&&"^"!==$||($=`\\${$}`);const e=Kt.exec(M());e&&($+=e[0],w.index+=e[0].length),U({type:"text",value:$});continue}if(k&&("globstar"===k.type||!0===k.star)){k.type="star",k.star=!0,k.value+=$,k.output=_,w.backtrack=!0,w.globstar=!0,N($);continue}let t=M();if(!0!==n.noextglob&&/^\([^?]/.test(t)){F("star",$);continue}if("star"===k.type){if(!0===n.noglobstar){N($);continue}const r=k.prev,o=r.prev,s="slash"===r.type||"bos"===r.type,a=o&&("star"===o.type||"globstar"===o.type);if(!0===n.bash&&(!s||t[0]&&"/"!==t[0])){U({type:"star",value:$,output:""});continue}const i=w.braces>0&&("comma"===r.type||"brace"===r.type),l=T.length&&("pipe"===r.type||"paren"===r.type);if(!s&&"paren"!==r.type&&!i&&!l){U({type:"star",value:$,output:""});continue}for(;"/**"===t.slice(0,3);){const n=e[w.index+4];if(n&&"/"!==n)break;t=t.slice(3),N("/**",3)}if("bos"===r.type&&L()){k.type="globstar",k.value+=$,k.output=R(n),w.output=k.output,w.globstar=!0,N($);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!a&&L()){w.output=w.output.slice(0,-(r.output+k.output).length),r.output=`(?:${r.output}`,k.type="globstar",k.output=R(n)+(n.strictSlashes?")":"|$)"),k.value+=$,w.globstar=!0,w.output+=r.output+k.output,N($);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";w.output=w.output.slice(0,-(r.output+k.output).length),r.output=`(?:${r.output}`,k.type="globstar",k.output=`${R(n)}${d}|${d}${e})`,k.value+=$,w.output+=r.output+k.output,w.globstar=!0,N($+P()),U({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===t[0]){k.type="globstar",k.value+=$,k.output=`(?:^|${d}|${R(n)}${d})`,w.output=k.output,w.globstar=!0,N($+P()),U({type:"slash",value:"/",output:""});continue}w.output=w.output.slice(0,-k.output.length),k.type="globstar",k.output=R(n),k.value+=$,w.output+=k.output,w.globstar=!0,N($);continue}const r={type:"star",value:$,output:_};!0!==n.bash?!k||"bracket"!==k.type&&"paren"!==k.type||!0!==n.regex?(w.index!==w.start&&"slash"!==k.type&&"dot"!==k.type||("dot"===k.type?(w.output+=y,k.output+=y):!0===n.dot?(w.output+=b,k.output+=b):(w.output+=C,k.output+=C),"*"!==H()&&(w.output+=h,k.output+=h)),U(r)):(r.output=$,U(r)):(r.output=".*?","bos"!==k.type&&"slash"!==k.type||(r.output=C+r.output),U(r))}for(;w.brackets>0;){if(!0===n.strictBrackets)throw new SyntaxError(Xt("closing","]"));w.output=jt.escapeLast(w.output,"["),j("brackets")}for(;w.parens>0;){if(!0===n.strictBrackets)throw new SyntaxError(Xt("closing",")"));w.output=jt.escapeLast(w.output,"("),j("parens")}for(;w.braces>0;){if(!0===n.strictBrackets)throw new SyntaxError(Xt("closing","}"));w.output=jt.escapeLast(w.output,"{"),j("braces")}if(!0===n.strictSlashes||"star"!==k.type&&"bracket"!==k.type||U({type:"maybe_slash",value:"",output:`${d}?`}),!0===w.backtrack){w.output="";for(const e of w.tokens)w.output+=null!=e.output?e.output:e.value,e.suffix&&(w.output+=e.suffix)}return w};Qt.fastpaths=(e,t)=>{const n={...t},r="number"==typeof n.maxLength?Math.min(Ut,n.maxLength):Ut,o=e.length;if(o>r)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${r}`);e=Wt[e]||e;const s=jt.isWindows(t),{DOT_LITERAL:a,SLASH_LITERAL:i,ONE_CHAR:l,DOTS_SLASH:c,NO_DOT:u,NO_DOTS:p,NO_DOTS_SLASH:f,STAR:d,START_ANCHOR:h}=Dt.globChars(s),g=n.dot?p:u,m=n.dot?f:u,y=n.capture?"":"?:";let b=!0===n.bash?".*?":d;n.capture&&(b=`(${b})`);const v=e=>!0===e.noglobstar?b:`(${y}(?:(?!${h}${e.dot?c:a}).)*?)`,A=e=>{switch(e){case"*":return`${g}${l}${b}`;case".*":return`${a}${l}${b}`;case"*.*":return`${g}${b}${a}${l}${b}`;case"*/*":return`${g}${b}${i}${l}${m}${b}`;case"**":return g+v(n);case"**/*":return`(?:${g}${v(n)}${i})?${m}${l}${b}`;case"**/*.*":return`(?:${g}${v(n)}${i})?${m}${b}${a}${l}${b}`;case"**/.*":return`(?:${g}${v(n)}${i})?${a}${l}${b}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=A(t[1]);if(!n)return;return n+a+t[2]}}},E=jt.removePrefix(e,{negated:!1,prefix:""});let x=A(E);return x&&!0!==n.strictSlashes&&(x+=`${i}?`),x};const zt=e,Vt=Gt,Yt=Qt,Zt=lt,en=At,tn=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map((e=>tn(e,t,n))),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const r=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const s=t||{},a=Zt.isWindows(t),i=r?tn.compileRe(e,t):tn.makeRe(e,t,!1,!0),l=i.state;delete i.state;let c=()=>!1;if(s.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};c=tn(s.ignore,e,n)}const u=(n,r=!1)=>{const{isMatch:o,match:u,output:p}=tn.test(n,i,t,{glob:e,posix:a}),f={glob:e,state:l,regex:i,posix:a,input:n,output:p,match:u,isMatch:o};return"function"==typeof s.onResult&&s.onResult(f),!1===o?(f.isMatch=!1,!!r&&f):c(n)?("function"==typeof s.onIgnore&&s.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof s.onMatch&&s.onMatch(f),!r||f)};return n&&(u.state=l),u};tn.test=(e,t,n,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const s=n||{},a=s.format||(o?Zt.toPosixSlashes:null);let i=e===r,l=i&&a?a(e):e;return!1===i&&(l=a?a(e):e,i=l===r),!1!==i&&!0!==s.capture||(i=!0===s.matchBase||!0===s.basename?tn.matchBase(e,t,n,o):t.exec(l)),{isMatch:Boolean(i),match:i,output:l}},tn.matchBase=(e,t,n,r=Zt.isWindows(n))=>(t instanceof RegExp?t:tn.makeRe(t,n)).test(zt.basename(e)),tn.isMatch=(e,t,n)=>tn(t,n)(e),tn.parse=(e,t)=>Array.isArray(e)?e.map((e=>tn.parse(e,t))):Yt(e,{...t,fastpaths:!1}),tn.scan=(e,t)=>Vt(e,t),tn.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const o=t||{},s=o.contains?"":"^",a=o.contains?"":"$";let i=`${s}(?:${e.output})${a}`;e&&!0===e.negated&&(i=`^(?!${i}).*$`);const l=tn.toRegex(i,t);return!0===r&&(l.state=e),l},tn.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=Yt.fastpaths(e,t)),o.output||(o=Yt(e,t)),tn.compileRe(o,t,n,r)},tn.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},tn.constants=en;const nn=r,rn=it,on=tn,sn=lt,an=e=>""===e||"./"===e,ln=(e,t,n)=>{t=[].concat(t),e=[].concat(e);let r=new Set,o=new Set,s=new Set,a=0,i=e=>{s.add(e.output),n&&n.onResult&&n.onResult(e)};for(let s=0;s<t.length;s++){let l=on(String(t[s]),{...n,onResult:i},!0),c=l.state.negated||l.state.negatedExtglob;c&&a++;for(let t of e){let e=l(t,!0);(c?!e.isMatch:e.isMatch)&&(c?r.add(e.output):(r.delete(e.output),o.add(e.output)))}}let l=(a===t.length?[...s]:[...o]).filter((e=>!r.has(e)));if(n&&0===l.length){if(!0===n.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===n.nonull||!0===n.nullglob)return n.unescape?t.map((e=>e.replace(/\\/g,""))):t}return l};ln.match=ln,ln.matcher=(e,t)=>on(e,t),ln.any=ln.isMatch=(e,t,n)=>on(t,n)(e),ln.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,o=[],s=new Set(ln(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),o.push(e.output)}}));for(let e of o)s.has(e)||r.add(e);return[...r]},ln.contains=(e,t,n)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${nn.inspect(e)}"`);if(Array.isArray(t))return t.some((t=>ln.contains(e,t,n)));if("string"==typeof t){if(an(e)||an(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return ln.isMatch(e,t,{...n,contains:!0})},ln.matchKeys=(e,t,n)=>{if(!sn.isObject(e))throw new TypeError("Expected the first argument to be an object");let r=ln(Object.keys(e),t,n),o={};for(let t of r)o[t]=e[t];return o},ln.some=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=on(String(e),n);if(r.some((e=>t(e))))return!0}return!1},ln.every=(e,t,n)=>{let r=[].concat(e);for(let e of[].concat(t)){let t=on(String(e),n);if(!r.every((e=>t(e))))return!1}return!0},ln.all=(e,t,n)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${nn.inspect(e)}"`);return[].concat(t).every((t=>on(t,n)(e)))},ln.capture=(e,t,n)=>{let r=sn.isWindows(n),o=on.makeRe(String(e),{...n,capture:!0}).exec(r?sn.toPosixSlashes(t):t);if(o)return o.slice(1).map((e=>void 0===e?"":e))},ln.makeRe=(...e)=>on.makeRe(...e),ln.scan=(...e)=>on.scan(...e),ln.parse=(e,t)=>{let n=[];for(let r of[].concat(e||[]))for(let e of rn(String(r),t))n.push(on.parse(e,t));return n},ln.braces=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return t&&!0===t.nobrace||!/\{.*\}/.test(e)?[e]:rn(e,t)},ln.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return ln.braces(e,{...t,expand:!0})};var cn=t,un=e,pn=function(e,t){if("string"!=typeof e||""===e)return!1;if(b(e))return!0;var n=A;return t&&!1===t.strict&&(n=E),n(e)},fn=function(e){return"~"===e.charAt(0)&&(e=V(e)),"@"===e.charAt(0)&&(e=z.join(Y,e.slice(1))),e},dn=function(e,t){return e&&"string"==typeof e?Z.existsSync(e)?ee.resolve(e):!0===(t=t||{}).nocase?function(e){e=ee.resolve(e);var t=function(e){var t={path:e,files:[]};try{return t.files=Z.readdirSync(e),t}catch(e){}try{return t.path=ee.dirname(e),t.files=Z.readdirSync(t.path),t}catch(e){}return null}(e);if(null===t)return null;if(t.path===e)return t.path;var n=e.toUpperCase(),r=t.files.length,o=-1;for(;++o<r;){var s=ee.resolve(t.path,t.files[o]);if(e===s||n===s)return s;var a=s.toUpperCase();if(e===a||n===a)return s}return null}(e):null:null},hn=ln;function gn(e,t,n){for(var r,o=t.length,s=-1;++s<o;)if(r=pn(t[s])?mn(e,t[s],n):yn(e,t[s],n))return r;var a=un.dirname(e);return a===e?null:gn(a,t,n)}function mn(e,t,n){for(var r=hn.matcher(t,n),o=function(e){try{return cn.readdirSync(e)}catch(e){}return[]}(e),s=o.length,a=-1;++a<s;){var i=o[a],l=un.join(e,i);if(r(i)||r(l))return l}return null}function yn(e,t,n){var r=un.resolve(e,t);return dn(r,n)}var bn,vn,An,En,xn,Rn,Cn,Sn,_n=d((function(e,t){t=t||{};var n=un.resolve(fn(t.cwd||""));if("string"==typeof e)return gn(n,[e],t);if(!Array.isArray(e))throw new TypeError("findup-sync expects a string or array as the first argument.");return gn(n,e,t)})),wn={exports:{}};function Tn(){if(En)return An;En=1;const e=vn?bn:(vn=1,bn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};An=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),s=Math.max(t,n,r),a=s-o;let i,l;s===o?i=0:t===s?i=(n-r)/a:n===s?i=2+(r-t)/a:r===s&&(i=4+(t-n)/a),i=Math.min(60*i,360),i<0&&(i+=360);const c=(o+s)/2;return l=s===o?0:c<=.5?a/(s+o):a/(2-s-o),[i,100*l,100*c]},n.rgb.hsv=function(e){let t,n,r,o,s;const a=e[0]/255,i=e[1]/255,l=e[2]/255,c=Math.max(a,i,l),u=c-Math.min(a,i,l),p=function(e){return(c-e)/6/u+.5};return 0===u?(o=0,s=0):(s=u/c,t=p(a),n=p(i),r=p(l),a===c?o=r-n:i===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*s,100*c]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const s=n.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[s,100*a,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const r=t[n];if(r)return r;let o,s=1/0;for(const t of Object.keys(e)){const r=e[t],l=(i=r,((a=n)[0]-i[0])**2+(a[1]-i[1])**2+(a[2]-i[2])**2);l<s&&(s=l,o=t)}var a,i;return o},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],s=t[2];r/=95.047,o/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;return[116*o-16,500*(r-o),200*(o-s)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,s,a;if(0===n)return a=255*r,[a,a,a];o=r<.5?r*(1+n):r+n-r*n;const i=2*r-o,l=[0,0,0];for(let e=0;e<3;e++)s=t+1/3*-(e-1),s<0&&s++,s>1&&s--,a=6*s<1?i+6*(o-i)*s:2*s<1?o:3*s<2?i+(o-i)*(2/3-s)*6:i,l[e]=255*a;return l},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=s<=1?s:2-s;return[t,100*(0===r?2*o/(s+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,s=t-Math.floor(t),a=255*r*(1-n),i=255*r*(1-n*s),l=255*r*(1-n*(1-s));switch(r*=255,o){case 0:return[r,l,a];case 1:return[i,r,a];case 2:return[a,r,l];case 3:return[a,i,r];case 4:return[l,a,r];case 5:return[r,a,i]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let s,a;a=(2-n)*r;const i=(2-n)*o;return s=n*o,s/=i<=1?i:2-i,s=s||0,a/=2,[t,100*s,100*a]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let s;o>1&&(n/=o,r/=o);const a=Math.floor(6*t),i=1-r;s=6*t-a,0!=(1&a)&&(s=1-s);const l=n+s*(i-n);let c,u,p;switch(a){default:case 6:case 0:c=i,u=l,p=n;break;case 1:c=l,u=i,p=n;break;case 2:c=n,u=i,p=l;break;case 3:c=n,u=l,p=i;break;case 4:c=l,u=n,p=i;break;case 5:c=i,u=n,p=l}return[255*c,255*u,255*p]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,s,a;return o=3.2406*t+-1.5372*n+-.4986*r,s=-.9689*t+1.8758*n+.0415*r,a=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[255*o,255*s,255*a]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,s=t**3,a=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,s]=e;let a=null===t?n.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let i=30+(Math.round(s/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(i+=60),i},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),s=Math.min(Math.min(t,n),r),a=o-s;let i,l;return i=a<1?s/(1-a):0,l=a<=0?0:o===t?(n-r)/a%6:o===n?2+(r-t)/a:4+(t-n)/a,l/=6,l%=1,[360*l,100*a,100*i]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],s=t%1*6,a=s%1,i=1-a;let l=0;switch(Math.floor(s)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=i,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=i,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=i}return l=(1-n)*r,[255*(n*o[0]+l),255*(n*o[1]+l),255*(n*o[2]+l)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},An}function On(){if(Rn)return xn;Rn=1;const e=Tn();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,s=0;s<e;s++){const e=o[s],a=n[e];-1===a.distance&&(a.distance=n[t].distance+1,a.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let s=e[r[t].parent][t],a=r[t].parent;for(;r[a].parent;)o.unshift(r[a].parent),s=n(e[r[a].parent][a],s),a=r[a].parent;return s.conversion=o,s}return xn=function(e){const n=t(e),o={},s=Object.keys(n);for(let e=s.length,t=0;t<e;t++){const e=s[t];null!==n[e].parent&&(o[e]=r(e,n))}return o}}function In(){if(Sn)return Cn;Sn=1;const e=Tn(),t=On(),n={};return Object.keys(e).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach((e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),Cn=n}!function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},o=e=>e,s=(e,t,n)=>[e,t,n],a=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let i;const l=(e,t,n,r)=>{void 0===i&&(i=In());const o=r?10:0,s={};for(const[r,a]of Object.entries(i)){const i="ansi16"===r?"ansi":r;r===t?s[i]=e(n,o):"object"==typeof a&&(s[i]=e(a[t],o))}return s};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.gray=i.color.blackBright,i.bgColor.bgGray=i.bgColor.bgBlackBright,i.color.grey=i.color.blackBright,i.bgColor.bgGrey=i.bgColor.bgBlackBright;for(const[t,n]of Object.entries(i)){for(const[t,r]of Object.entries(n))i[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=i[t],e.set(r[0],r[1]);Object.defineProperty(i,t,{value:n,enumerable:!1})}return Object.defineProperty(i,"codes",{value:e,enumerable:!1}),i.color.close="",i.bgColor.close="",a(i.color,"ansi",(()=>l(t,"ansi16",o,!1))),a(i.color,"ansi256",(()=>l(n,"ansi256",o,!1))),a(i.color,"ansi16m",(()=>l(r,"rgb",s,!1))),a(i.bgColor,"ansi",(()=>l(t,"ansi16",o,!0))),a(i.bgColor,"ansi256",(()=>l(n,"ansi256",o,!0))),a(i.bgColor,"ansi16m",(()=>l(r,"rgb",s,!0))),i}})}(wn);var $n=wn.exports;const kn=n,Ln=o,Hn=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return-1!==r&&(-1===o||r<o)},{env:Pn}=process;let Mn;function Nn(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Bn(e,t){if(0===Mn)return 0;if(Hn("color=16m")||Hn("color=full")||Hn("color=truecolor"))return 3;if(Hn("color=256"))return 2;if(e&&!t&&void 0===Mn)return 0;const n=Mn||0;if("dumb"===Pn.TERM)return n;if("win32"===process.platform){const e=kn.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Pn)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in Pn))||"codeship"===Pn.CI_NAME?1:n;if("TEAMCITY_VERSION"in Pn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Pn.TEAMCITY_VERSION)?1:0;if("truecolor"===Pn.COLORTERM)return 3;if("TERM_PROGRAM"in Pn){const e=parseInt((Pn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Pn.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Pn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Pn.TERM)||"COLORTERM"in Pn?1:n}Hn("no-color")||Hn("no-colors")||Hn("color=false")||Hn("color=never")?Mn=0:(Hn("color")||Hn("colors")||Hn("color=true")||Hn("color=always"))&&(Mn=1),"FORCE_COLOR"in Pn&&(Mn="true"===Pn.FORCE_COLOR?1:"false"===Pn.FORCE_COLOR?0:0===Pn.FORCE_COLOR.length?1:Math.min(parseInt(Pn.FORCE_COLOR,10),3));var Gn={supportsColor:function(e){return Nn(Bn(e,e&&e.isTTY))},stdout:Nn(Bn(!0,Ln.isatty(1))),stderr:Nn(Bn(!0,Ln.isatty(2)))};var Dn,jn,Un={stringReplaceAll:(e,t,n)=>{let r=e.indexOf(t);if(-1===r)return e;const o=t.length;let s=0,a="";do{a+=e.substr(s,r-s)+t+n,s=r+o,r=e.indexOf(t,s)}while(-1!==r);return a+=e.substr(s),a},stringEncaseCRLFWithFirstIndex:(e,t,n,r)=>{let o=0,s="";do{const a="\r"===e[r-1];s+=e.substr(o,(a?r-1:r)-o)+t+(a?"\r\n":"\n")+n,o=r+1,r=e.indexOf("\n",o)}while(-1!==r);return s+=e.substr(o),s}};const Fn=$n,{stdout:Kn,stderr:qn}=Gn,{stringReplaceAll:Wn,stringEncaseCRLFWithFirstIndex:Jn}=Un,{isArray:Xn}=Array,Qn=["ansi","ansi","ansi256","ansi16m"],zn=Object.create(null);class Vn{constructor(e){return Yn(e)}}const Yn=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=Kn?Kn.level:0;e.level=void 0===t.level?n:t.level})(t,e),t.template=(...e)=>ar(t.template,...e),Object.setPrototypeOf(t,Zn.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Vn,t.template};function Zn(e){return Yn(e)}for(const[e,t]of Object.entries(Fn))zn[e]={get(){const n=rr(this,nr(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:n}),n}};zn.visible={get(){const e=rr(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const er=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of er)zn[e]={get(){const{level:t}=this;return function(...n){const r=nr(Fn.color[Qn[t]][e](...n),Fn.color.close,this._styler);return rr(this,r,this._isEmpty)}}};for(const e of er){zn["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=nr(Fn.bgColor[Qn[t]][e](...n),Fn.bgColor.close,this._styler);return rr(this,r,this._isEmpty)}}}}const tr=Object.defineProperties((()=>{}),{...zn,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),nr=(e,t,n)=>{let r,o;return void 0===n?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},rr=(e,t,n)=>{const r=(...e)=>Xn(e[0])&&Xn(e[0].raw)?or(r,ar(r,...e)):or(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,tr),r._generator=e,r._styler=t,r._isEmpty=n,r},or=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(void 0===n)return t;const{openAll:r,closeAll:o}=n;if(-1!==t.indexOf(""))for(;void 0!==n;)t=Wn(t,n.close,n.open),n=n.parent;const s=t.indexOf("\n");return-1!==s&&(t=Jn(t,o,r,s)),r+t+o};let sr;const ar=(e,...t)=>{const[n]=t;if(!Xn(n)||!Xn(n.raw))return t.join(" ");const r=t.slice(1),o=[n.raw[0]];for(let e=1;e<n.length;e++)o.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]));return void 0===sr&&(sr=function(){if(jn)return Dn;jn=1;const e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,t=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,r=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function s(e){const t="u"===e[0],n="{"===e[1];return t&&!n&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function a(e,t){const o=[],a=t.trim().split(/\s*,\s*/g);let i;for(const t of a){const a=Number(t);if(Number.isNaN(a)){if(!(i=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);o.push(i[2].replace(r,((e,t,n)=>t?s(t):n)))}else o.push(a)}return o}function i(e){t.lastIndex=0;const n=[];let r;for(;null!==(r=t.exec(e));){const e=r[1];if(r[2]){const t=a(e,r[2]);n.push([e].concat(t))}else n.push([e])}return n}function l(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const[e,t]of Object.entries(n))if(Array.isArray(t)){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=t.length>0?r[e](...t):r[e]}return r}return Dn=(t,n)=>{const r=[],o=[];let a=[];if(n.replace(e,((e,n,c,u,p,f)=>{if(n)a.push(s(n));else if(u){const e=a.join("");a=[],o.push(0===r.length?e:l(t,r)(e)),r.push({inverse:c,styles:i(u)})}else if(p){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");o.push(l(t,r)(a.join(""))),a=[],r.pop()}else a.push(f)})),o.push(a.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return o.join("")},Dn}()),sr(e,o.join(""))};Object.defineProperties(Zn.prototype,zn);const ir=Zn();ir.supportsColor=Kn,ir.stderr=Zn({level:qn?qn.level:0}),ir.stderr.supportsColor=qn;var lr=d(ir),cr={exports:{}},ur={exports:{}};const pr="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,fr=e,dr=pr?";":":",hr=J,gr=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),mr=(e,t)=>{const n=t.colon||dr,r=e.match(/\//)||pr&&e.match(/\\/)?[""]:[...pr?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=pr?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=pr?o.split(n):[""];return pr&&-1!==e.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:o}},yr=(e,t,n)=>{"function"==typeof t&&(n=t,t={}),t||(t={});const{pathEnv:r,pathExt:o,pathExtExe:s}=mr(e,t),a=[],i=n=>new Promise(((o,s)=>{if(n===r.length)return t.all&&a.length?o(a):s(gr(e));const i=r[n],c=/^".*"$/.test(i)?i.slice(1,-1):i,u=fr.join(c,e),p=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;o(l(p,n,0))})),l=(e,n,r)=>new Promise(((c,u)=>{if(r===o.length)return c(i(n+1));const p=o[r];hr(e+p,{pathExt:s},((o,s)=>{if(!o&&s){if(!t.all)return c(e+p);a.push(e+p)}return c(l(e,n,r+1))}))}));return n?i(0).then((e=>n(null,e)),n):i(0)};var br=yr;yr.sync=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:o}=mr(e,t),s=[];for(let a=0;a<n.length;a++){const i=n[a],l=/^".*"$/.test(i)?i.slice(1,-1):i,c=fr.join(l,e),u=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let e=0;e<r.length;e++){const n=u+r[e];try{if(hr.sync(n,{pathExt:o})){if(!t.all)return n;s.push(n)}}catch(e){}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw gr(e)};var vr={exports:{}};const Ar=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};vr.exports=Ar,vr.exports.default=Ar;var Er=vr.exports;const xr=e,Rr=br,Cr=Er;function Sr(e,t){const n=e.options.env||process.env,r=process.cwd(),o=null!=e.options.cwd,s=o&&void 0!==process.chdir&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch(e){}let a;try{a=Rr.sync(e.command,{path:n[Cr({env:n})],pathExt:t?xr.delimiter:void 0})}catch(e){}finally{s&&process.chdir(r)}return a&&(a=xr.resolve(o?e.options.cwd:"",a)),a}var _r=function(e){return Sr(e)||Sr(e,!0)},wr={};const Tr=/([()\][%!^"`<>&|;, *?])/g;wr.command=function(e){return e=e.replace(Tr,"^$1")},wr.argument=function(e,t){return e=(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(Tr,"^$1"),t&&(e=e.replace(Tr,"^$1")),e};const Or=/^#!(.*)/;const Ir=t,$r=(e="")=>{const t=e.match(Or);if(!t)return null;const[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return"env"===o?r:r?`${o} ${r}`:o};var kr=function(e){const t=Buffer.alloc(150);let n;try{n=Ir.openSync(e,"r"),Ir.readSync(n,t,0,150,0),Ir.closeSync(n)}catch(e){}return $r(t.toString())};const Lr=e,Hr=_r,Pr=wr,Mr=kr,Nr="win32"===process.platform,Br=/\.(?:com|exe)$/i,Gr=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Dr(e){if(!Nr)return e;const t=function(e){e.file=Hr(e);const t=e.file&&Mr(e.file);return t?(e.args.unshift(e.file),e.command=t,Hr(e)):e.file}(e),n=!Br.test(t);if(e.options.forceShell||n){const n=Gr.test(t);e.command=Lr.normalize(e.command),e.command=Pr.command(e.command),e.args=e.args.map((e=>Pr.argument(e,n)));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}var jr=function(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null);const r={command:e,args:t=t?t.slice(0):[],options:n=Object.assign({},n),file:void 0,original:{command:e,args:t}};return n.shell?r:Dr(r)};const Ur="win32"===process.platform;function Fr(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 Kr(e,t){return Ur&&1===e&&!t.file?Fr(t.original,"spawn"):null}var qr={hookChildProcess:function(e,t){if(!Ur)return;const n=e.emit;e.emit=function(r,o){if("exit"===r){const r=Kr(o,t);if(r)return n.call(e,"error",r)}return n.apply(e,arguments)}},verifyENOENT:Kr,verifyENOENTSync:function(e,t){return Ur&&1===e&&!t.file?Fr(t.original,"spawnSync"):null},notFoundError:Fr};const Wr=s,Jr=jr,Xr=qr;function Qr(e,t,n){const r=Jr(e,t,n),o=Wr.spawn(r.command,r.args,r.options);return Xr.hookChildProcess(o,r),o}ur.exports=Qr,ur.exports.spawn=Qr,ur.exports.sync=function(e,t,n){const r=Jr(e,t,n),o=Wr.spawnSync(r.command,r.args,r.options);return o.error=o.error||Xr.verifyENOENTSync(o.status,r),o},ur.exports._parse=Jr,ur.exports._enoent=Xr;var zr=ur.exports,Vr={exports:{}};!function(t){const n=e,r=Er,o=e=>{let t;e={cwd:process.cwd(),path:process.env[r()],execPath:process.execPath,...e};let o=n.resolve(e.cwd);const s=[];for(;t!==o;)s.push(n.join(o,"node_modules/.bin")),t=o,o=n.resolve(o,"..");const a=n.resolve(e.cwd,e.execPath,"..");return s.push(a),s.concat(e.path).join(n.delimiter)};t.exports=o,t.exports.default=o,t.exports.env=e=>{const n={...(e={env:process.env,...e}).env},o=r({env:n});return e.path=n[o],n[o]=t.exports(e),n}}(Vr);var Yr=Vr.exports,Zr={exports:{}},eo={exports:{}};const to=(e,t)=>{for(const n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};eo.exports=to,eo.exports.default=to;const no=eo.exports,ro=new WeakMap,oo=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,r=0;const o=e.displayName||e.name||"<anonymous>",s=function(...a){if(ro.set(s,++r),1===r)n=e.apply(this,a),e=null;else if(!0===t.throw)throw new Error(`Function \`${o}\` can only be called once`);return n};return no(s,e),ro.set(s,r),s};Zr.exports=oo,Zr.exports.default=oo,Zr.exports.callCount=e=>{if(!ro.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ro.get(e)};var so=Zr.exports,ao={},io={},lo={};Object.defineProperty(lo,"__esModule",{value:!0}),lo.SIGNALS=void 0;lo.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var co={};Object.defineProperty(co,"__esModule",{value:!0}),co.SIGRTMAX=co.getRealtimeSignals=void 0;co.getRealtimeSignals=function(){const e=fo-po+1;return Array.from({length:e},uo)};const uo=function(e,t){return{name:`SIGRT${t+1}`,number:po+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},po=34,fo=64;co.SIGRTMAX=fo,Object.defineProperty(io,"__esModule",{value:!0}),io.getSignals=void 0;var ho=n,go=lo,mo=co;io.getSignals=function(){const e=(0,mo.getRealtimeSignals)();return[...go.SIGNALS,...e].map(yo)};const yo=function({name:e,number:t,description:n,action:r,forced:o=!1,standard:s}){const{signals:{[e]:a}}=ho.constants,i=void 0!==a;return{name:e,number:i?a:t,description:n,supported:i,action:r,forced:o,standard:s}};Object.defineProperty(ao,"__esModule",{value:!0}),ao.signalsByNumber=ao.signalsByName=void 0;var bo=n,vo=io,Ao=co;const Eo=function(e,{name:t,number:n,description:r,supported:o,action:s,forced:a,standard:i}){return{...e,[t]:{name:t,number:n,description:r,supported:o,action:s,forced:a,standard:i}}},xo=(0,vo.getSignals)().reduce(Eo,{});ao.signalsByName=xo;const Ro=function(e,t){const n=Co(e,t);if(void 0===n)return{};const{name:r,description:o,supported:s,action:a,forced:i,standard:l}=n;return{[e]:{name:r,number:e,description:o,supported:s,action:a,forced:i,standard:l}}},Co=function(e,t){const n=t.find((({name:t})=>bo.constants.signals[t]===e));return void 0!==n?n:t.find((t=>t.number===e))},So=function(){const e=(0,vo.getSignals)(),t=Ao.SIGRTMAX+1,n=Array.from({length:t},((t,n)=>Ro(n,e)));return Object.assign({},...n)}();ao.signalsByNumber=So;const{signalsByName:_o}=ao;var wo=({stdout:e,stderr:t,all:n,error:r,signal:o,exitCode:s,command:a,escapedCommand:i,timedOut:l,isCanceled:c,killed:u,parsed:{options:{timeout:p}}})=>{s=null===s?void 0:s;const f=void 0===(o=null===o?void 0:o)?void 0:_o[o].description,d=(({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:s,isCanceled:a})=>e?`timed out after ${t} milliseconds`:a?"was canceled":void 0!==n?`failed with ${n}`:void 0!==r?`was killed with ${r} (${o})`:void 0!==s?`failed with exit code ${s}`:"failed")({timedOut:l,timeout:p,errorCode:r&&r.code,signal:o,signalDescription:f,exitCode:s,isCanceled:c}),h=`Command ${d}: ${a}`,g="[object Error]"===Object.prototype.toString.call(r),m=g?`${h}\n${r.message}`:h,y=[m,t,e].filter(Boolean).join("\n");return g?(r.originalMessage=r.message,r.message=y):r=new Error(y),r.shortMessage=m,r.command=a,r.escapedCommand=i,r.exitCode=s,r.signal=o,r.signalDescription=f,r.stdout=e,r.stderr=t,void 0!==n&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=Boolean(l),r.isCanceled=c,r.killed=u&&!l,r},To={exports:{}};const Oo=["stdin","stdout","stderr"],Io=e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return Oo.map((t=>e[t]));if((e=>Oo.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Oo.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 n=Math.max(t.length,Oo.length);return Array.from({length:n},((e,n)=>t[n]))};To.exports=Io,To.exports.node=e=>{const t=Io(e);return"ipc"===t?"ipc":void 0===t||"string"==typeof t?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]};var $o,ko=To.exports,Lo={exports:{}},Ho={exports:{}};var Po=f.process;const Mo=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(Mo(Po)){var No,Bo=a,Go=($o||($o=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(Ho)),Ho.exports),Do=/^win/i.test(Po.platform),jo=i;"function"!=typeof jo&&(jo=jo.EventEmitter),Po.__signal_exit_emitter__?No=Po.__signal_exit_emitter__:((No=Po.__signal_exit_emitter__=new jo).count=0,No.emitted={}),No.infinite||(No.setMaxListeners(1/0),No.infinite=!0),Lo.exports=function(e,t){if(!Mo(f.process))return function(){};Bo.equal(typeof e,"function","a callback must be provided for exit handler"),!1===qo&&Wo();var n="exit";t&&t.alwaysLast&&(n="afterexit");return No.on(n,e),function(){No.removeListener(n,e),0===No.listeners("exit").length&&0===No.listeners("afterexit").length&&Uo()}};var Uo=function(){qo&&Mo(f.process)&&(qo=!1,Go.forEach((function(e){try{Po.removeListener(e,Ko[e])}catch(e){}})),Po.emit=Qo,Po.reallyExit=Jo,No.count-=1)};Lo.exports.unload=Uo;var Fo=function(e,t,n){No.emitted[e]||(No.emitted[e]=!0,No.emit(e,t,n))},Ko={};Go.forEach((function(e){Ko[e]=function(){Mo(f.process)&&(Po.listeners(e).length===No.count&&(Uo(),Fo("exit",null,e),Fo("afterexit",null,e),Do&&"SIGHUP"===e&&(e="SIGINT"),Po.kill(Po.pid,e)))}})),Lo.exports.signals=function(){return Go};var qo=!1,Wo=function(){!qo&&Mo(f.process)&&(qo=!0,No.count+=1,Go=Go.filter((function(e){try{return Po.on(e,Ko[e]),!0}catch(e){return!1}})),Po.emit=zo,Po.reallyExit=Xo)};Lo.exports.load=Wo;var Jo=Po.reallyExit,Xo=function(e){Mo(f.process)&&(Po.exitCode=e||0,Fo("exit",Po.exitCode,null),Fo("afterexit",Po.exitCode,null),Jo.call(Po,Po.exitCode))},Qo=Po.emit,zo=function(e,t){if("exit"===e&&Mo(f.process)){void 0!==t&&(Po.exitCode=t);var n=Qo.apply(this,arguments);return Fo("exit",Po.exitCode,null),Fo("afterexit",Po.exitCode,null),n}return Qo.apply(this,arguments)}}else Lo.exports=function(){return function(){}};var Vo=Lo.exports;const Yo=n,Zo=Vo,es=(e,t,n,r)=>{if(!ts(t,n,r))return;const o=rs(n),s=setTimeout((()=>{e("SIGKILL")}),o);s.unref&&s.unref()},ts=(e,{forceKillAfterTimeout:t},n)=>ns(e)&&!1!==t&&n,ns=e=>e===Yo.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),rs=({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};var os={spawnedKill:(e,t="SIGTERM",n={})=>{const r=e(t);return es(e,t,n,r),r},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(0===t||void 0===t)return r;let o;const s=new Promise(((r,s)=>{o=setTimeout((()=>{((e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,n,s)}),t)})),a=r.finally((()=>{clearTimeout(o)}));return Promise.race([s,a])},validateTimeout:({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})`)},setExitHandler:async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;const o=Zo((()=>{e.kill()}));return r.finally((()=>{o()}))}};const ss=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;ss.writable=e=>ss(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,ss.readable=e=>ss(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,ss.duplex=e=>ss.writable(e)&&ss.readable(e),ss.transform=e=>ss.duplex(e)&&"function"==typeof e._transform;var as=ss,is={exports:{}};const{PassThrough:ls}=c;const{constants:cs}=l,us=c,{promisify:ps}=r,fs=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const r="buffer"===n;let o=!1;t?o=!(n||r):n=n||"utf8",r&&(n=null);const s=new ls({objectMode:o});n&&s.setEncoding(n);let a=0;const i=[];return s.on("data",(e=>{i.push(e),o?a=i.length:a+=e.length})),s.getBufferedValue=()=>t?i:r?Buffer.concat(i,a):i.join(""),s.getBufferedLength=()=>a,s},ds=ps(us.pipeline);class hs extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function gs(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:n}=t,r=fs(t);return await new Promise(((t,o)=>{const s=e=>{e&&r.getBufferedLength()<=cs.MAX_LENGTH&&(e.bufferedData=r.getBufferedValue()),o(e)};(async()=>{try{await ds(e,r),t()}catch(e){s(e)}})(),r.on("data",(()=>{r.getBufferedLength()>n&&s(new hs)}))})),r.getBufferedValue()}is.exports=gs,is.exports.buffer=(e,t)=>gs(e,{...t,encoding:"buffer"}),is.exports.array=(e,t)=>gs(e,{...t,array:!0}),is.exports.MaxBufferError=hs;var ms=is.exports;const{PassThrough:ys}=c;const bs=as,vs=ms,As=function(){var e=[],t=new ys({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=function(){return 0==e.length},t.on("unpipe",r),Array.prototype.slice.call(arguments).forEach(n),t;function n(o){return Array.isArray(o)?(o.forEach(n),this):(e.push(o),o.once("end",r.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}function r(n){!(e=e.filter((function(e){return e!==n}))).length&&t.readable&&t.end()}},Es=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},xs=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t?vs(e,{encoding:t,maxBuffer:r}):vs.buffer(e,{maxBuffer:r})};var Rs={handleInput:(e,t)=>{void 0!==t&&void 0!==e.stdin&&(bs(t)?t.pipe(e.stdin):e.stdin.end(t))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const n=As();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},getSpawnedResult:async({stdout:e,stderr:t,all:n},{encoding:r,buffer:o,maxBuffer:s},a)=>{const i=xs(e,{encoding:r,buffer:o,maxBuffer:s}),l=xs(t,{encoding:r,buffer:o,maxBuffer:s}),c=xs(n,{encoding:r,buffer:o,maxBuffer:2*s});try{return await Promise.all([a,i,l,c])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},Es(e,i),Es(t,l),Es(n,c)])}},validateInputSync:({input:e})=>{if(bs(e))throw new TypeError("The `input` option cannot be a stream in sync mode")}};const Cs=(async()=>{})().constructor.prototype,Ss=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Cs,e)]));var _s={mergePromise:(e,t)=>{for(const[n,r]of Ss){const o="function"==typeof t?(...e)=>Reflect.apply(r.value,t(),e):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}return e},getSpawnedPromise:e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})})),e.on("error",(e=>{n(e)})),e.stdin&&e.stdin.on("error",(e=>{n(e)}))}))};const ws=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Ts=/^[\w.-]+$/,Os=/"/g,Is=/ +/g;var $s={joinCommand:(e,t)=>ws(e,t).join(" "),getEscapedCommand:(e,t)=>ws(e,t).map((e=>(e=>"string"!=typeof e||Ts.test(e)?e:`"${e.replace(Os,'\\"')}"`)(e))).join(" "),parseCommand:e=>{const t=[];for(const n of e.trim().split(Is)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${n}`:t.push(n)}return t}};const ks=e,Ls=s,Hs=zr,Ps=e=>{const t="string"==typeof e?"\n":"\n".charCodeAt(),n="string"==typeof e?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e},Ms=Yr,Ns=so,Bs=wo,Gs=ko,{spawnedKill:Ds,spawnedCancel:js,setupTimeout:Us,validateTimeout:Fs,setExitHandler:Ks}=os,{handleInput:qs,getSpawnedResult:Ws,makeAllStream:Js,validateInputSync:Xs}=Rs,{mergePromise:Qs,getSpawnedPromise:zs}=_s,{joinCommand:Vs,parseCommand:Ys,getEscapedCommand:Zs}=$s,ea=(e,t,n={})=>{const r=Hs._parse(e,t,n);return e=r.command,t=r.args,(n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(n=r.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n}).env=(({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{const s=t?{...process.env,...e}:e;return n?Ms.env({env:s,cwd:r,execPath:o}):s})(n),n.stdio=Gs(n),"win32"===process.platform&&"cmd"===ks.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},ta=(e,t,n)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?Ps(t):t:void 0===n?void 0:"",na=(e,t,n)=>{const r=ea(e,t,n),o=Vs(e,t),s=Zs(e,t);let a;Fs(r.options);try{a=Ls.spawn(r.file,r.args,r.options)}catch(e){const t=new Ls.ChildProcess,n=Promise.reject(Bs({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return Qs(t,n)}const i=zs(a),l=Us(a,r.options,i),c=Ks(a,r.options,l),u={isCanceled:!1};a.kill=Ds.bind(null,a.kill.bind(a)),a.cancel=js.bind(null,a,u);const p=Ns((async()=>{const[{error:e,exitCode:t,signal:n,timedOut:i},l,p,f]=await Ws(a,r.options,c),d=ta(r.options,l),h=ta(r.options,p),g=ta(r.options,f);if(e||0!==t||null!==n){const l=Bs({error:e,exitCode:t,signal:n,stdout:d,stderr:h,all:g,command:o,escapedCommand:s,parsed:r,timedOut:i,isCanceled:u.isCanceled,killed:a.killed});if(!r.options.reject)return l;throw l}return{command:o,escapedCommand:s,exitCode:0,stdout:d,stderr:h,all:g,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return qs(a,r.options.input),a.all=Js(a,r.options),Qs(a,p)};function ra(e,t){return sa("blue",e,t)}function oa(e,t=""){return sa("red",e,t)}function sa(e,t,n=""){return n?console.log(lr[e](`${t}`),n):console.log(lr[e](`${t}`))}cr.exports=na,cr.exports.sync=(e,t,n)=>{const r=ea(e,t,n),o=Vs(e,t),s=Zs(e,t);let a;Xs(r.options);try{a=Ls.spawnSync(r.file,r.args,r.options)}catch(e){throw Bs({error:e,stdout:"",stderr:"",all:"",command:o,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}const i=ta(r.options,a.stdout,a.error),l=ta(r.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=Bs({stdout:i,stderr:l,error:a.error,signal:a.signal,exitCode:a.status,command:o,escapedCommand:s,parsed:r,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!r.options.reject)return e;throw e}return{command:o,escapedCommand:s,exitCode:0,stdout:i,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},cr.exports.command=(e,t)=>{const[n,...r]=Ys(e);return na(n,r,t)},cr.exports.commandSync=(e,t)=>{const[n,...r]=Ys(e);return na.sync(n,r,t)},cr.exports.node=(e,t,n={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(n=t,t=[]);const r=Gs.node(n),o=process.execArgv.filter((e=>!e.startsWith("--inspect"))),{nodePath:s=process.execPath,nodeOptions:a=o}=n;return na(s,[...a,e,...Array.isArray(t)?t:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})};var aa=(e={})=>{const{name:t}=e;return`<template>\n <div class="app-container">\n <CoustomTable\n :queryFormJson="queryFormJson"\n :pageButtonsJson="pageButtonsJson"\n :tableJson="tableJson"\n :tableData="tableData"\n @onPageButton="handlerPageButton"\n @onButton="handlerButton"\n @onSearch="handlerSearch"\n @onTableRowClick="handlerTableRowClick"\n >\n </CoustomTable>\n\n <CoustomFormDialog\n ref="formDialog"\n :visible.sync="dialogVisible"\n :dialogJson="dialogJson"\n :initData="initFormData"\n @onSubmit="handlerSubmit"\n ></CoustomFormDialog>\n </div>\n</template>\n<script>\nimport CoustomTable from "@/components/CoustomTable";\nimport CoustomFormDialog from "@/components/CoustomFormDialog";\nimport { TableJson, QueryFormJson, PageButtonsJson, DialogJson } from "./constants";\nimport { \n getDevApiIotClassesList, \n postDevApiIotClasses, \n getDevApiIotClassesClassId, \n deleteDevApiIotClassesClassId,\n putDevApiIotClasses\n } from "@/api/iot/classes-controller.js";\n import {\n getDevApiIotPackagesList,\n} from "@/api/iot/packages-controller.js";\nexport default {\n name: '${t.toLowerCase().replace(/( |^)[a-z]/g,(e=>e.toUpperCase()))}',\n components: {\n CoustomTable,\n CoustomFormDialog\n },\n data() {\n return {\n queryFormJson: QueryFormJson,\n pageButtonsJson: PageButtonsJson,\n tableJson: TableJson,\n dialogJson: DialogJson,\n tableData: [],\n // 总条数\n total: 0,\n // 查询参数\n queryParams: {\n pageNum: 1,\n pageSize: 10,\n },\n dialogVisible: false,\n initFormData: {},\n }\n },\n created() {\n },\n mounted() {\n this.getList();\n },\n computed: {\n packageName() {\n const { query } = this.$route;\n return query.packageName\n }\n },\n methods: {\n async getPackageData() {\n try {\n const { rows = [] } = await getDevApiIotPackagesList();\n return rows.map(item => {\n return {\n value: item.packageCode,\n label: item.packageDispname,\n }\n })\n } catch (error) {\n return []\n }\n },\n\n async handlerSubmit(formData) {\n let params = {\n ...formData,\n packageName: this.packageName\n };\n let msgText = '新增';\n let func = postDevApiIotClasses;\n if (this.dialogJson.type === 'Edit') {\n params.classId = this.initFormData.classId;\n msgText = '编辑';\n func = putDevApiIotClasses;\n }\n try {\n const { code } = await func(params);\n if (code === 200) {\n this.dialogVisible = false;\n this.getList();\n this.$modal.msgSuccess(msgText + "成功");\n }\n this.$refs.formDialog.resetLoading();\n } catch (error) {\n // 接口调用失败重置 loading\n this.$refs.formDialog.resetLoading();\n }\n },\n\n /** 查询表集合 */\n getList(queryParams = {}) {\n this.loading = true;\n let queryData = {\n ...queryParams,\n ...this.queryParams,\n packageName: this.packageName\n }\n getDevApiIotClassesList(queryData).then(response => {\n this.tableData = response.rows;\n this.total = response.total;\n this.loading = false;\n });\n },\n\n handlerTableRowClick(item) {\n console.log('object :>>item ', item);\n this.$router.push({\n path: '/iot/packages/classes/detail',\n query: {\n classId: item.classId\n }\n })\n },\n\n // 搜索事件\n handlerSearch(searchParams) {\n this.queryParams = {\n pageNum: 1,\n pageSize: 10,\n },\n this.getList(searchParams);\n },\n\n //新增按钮事件\n async handlerPageButton(item) {\n const { type } = item;\n if (type === 'Add') {\n this.initFormData = {};\n this.dialogJson.type = 'Add';\n const packageData = await this.getPackageData()\n this.$set(this.dialogJson.formJson.formItemJson[0], 'option',packageData )\n console.log('object :>> ', this.dialogJson);\n this.dialogVisible = true;\n }\n\n if (type === 'Delete') {\n const tableIds = row.tableId || this.ids;\n this.$modal.confirm('是否确认删除表编号为"' + tableIds + '"的数据项?').then(function () {\n return delTable(tableIds);\n }).then(() => {\n this.getList();\n this.$modal.msgSuccess("删除成功");\n }).catch(() => { });\n }\n },\n\n async getInfo(id) {\n const { code, data } = await getDevApiIotClassesClassId(id);\n if (code === 200) {\n\n this.initFormData = data;\n this.dialogJson.type = 'Edit';\n this.dialogVisible = true;\n }\n },\n\n deleteItem(id) {\n this.$modal.confirm('是否确认删除该数据项?').then(function () {\n return deleteDevApiIotClassesClassId(id);\n }).then(() => {\n this.getList();\n this.$modal.msgSuccess("删除成功");\n }).catch(() => { });\n },\n\n handlerButton(btnItem) {\n const { row, item } = btnItem;\n const { type } = item;\n if (type === 'Edit') {\n this.getInfo(row.classId);\n }\n\n if (type === 'Delete') {\n this.deleteItem(row.classId);\n }\n },\n },\n}\n<\/script>\n<style scoped lang='scss'></style>`},ia=()=>'export const QueryFormJson = {\n formOption: {\n inline: true,\n labelWidth: "100px",\n size: \'small\',\n },\n formItemJson: [\n {\n label: "类中文名称",\n prop: "classDispname",\n type: "Input",\n isEnter: true,\n options: {\n clearable: true,\n placeholder: \'请输入类名称\',\n }\n }\n ],\n buttonJson: {\n type: \'Search\',\n list: [\n {\n label: "搜索",\n type: \'Query\',\n options: {\n icon: "el-icon-search",\n size: "mini",\n type: "primary"\n }\n },\n {\n label: "重置",\n type: \'Reset\',\n options: {\n icon: "el-icon-refresh",\n size: "mini",\n }\n },\n ]\n\n }\n}\n\nexport const PageButtonsJson = {\n rowJson: {\n gutter: 10,\n },\n buttonList: [\n {\n span: 1.5,\n label: \'新增\',\n permi: \'\',\n type: \'Add\',\n options: [\n {\n icon: "el-icon-plus",\n plain: true,\n size: "mini",\n type: "primary",\n },\n \n ]\n }\n ]\n}\n\nexport const TableJson = {\n columnJson: {\n showSelect: false,\n showIndex: true,\n data: [\n {\n type: "index",\n width: "55",\n align: "left",\n headerAlign: "left",\n label: "序号" \n },\n {\n align: "left",\n headerAlign: "left",\n label: "类中文名称",\n prop: "classDispname",\n showOverflowTooltip: true,\n isLink: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "类英文名称",\n prop: "classCode",\n showOverflowTooltip: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "类类型",\n prop: "classesType",\n showOverflowTooltip: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "访问类型",\n prop: "accessType",\n showOverflowTooltip: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "实例存储表名称",\n prop: "delFlag",\n showOverflowTooltip: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "备注",\n prop: "remark",\n showOverflowTooltip: true,\n },\n {\n align: "left",\n headerAlign: "left",\n label: "创建时间",\n prop: "createTime",\n showOverflowTooltip: true,\n },\n {\n align: "center",\n headerAlign: "center",\n label: "操作",\n type: "func",\n buttonList: [\n {\n label: "编辑",\n type: \'Edit\',\n permi: \'\',\n options: {\n icon: "el-icon-edit",\n size: "mini",\n type: "text",\n }\n },\n {\n label: "删除",\n type: \'Delete\',\n permi: \'\',\n options: {\n icon: "el-icon-delete",\n size: "mini",\n type: "text",\n }\n },\n ],\n },\n ],\n },\n};\n\nexport const DialogJson = {\n type: \'Add\',\n title: "类",\n options: {\n width: "600px",\n appendToBody: true,\n destroyOnClose: true,\n closeOnClickModal: false,\n },\n buttonList: [\n {\n label: "确定",\n type: \'Ok\',\n permi: \'\',\n options: {\n type: "primary",\n }\n },\n {\n label: "取消",\n type: \'Cancel\',\n permi: \'\',\n options: {\n type: "",\n }\n },\n ],\n formJson: {\n // 表单设置\n formOption: {\n inline: false,\n labelWidth: "120px",\n size: \'small\',\n },\n // 表单项\n formItemJson: [\n // {\n // label: "包编码",\n // prop: "packageCode",\n // type: "Select",\n // rules: [{ required: true, message: "请选择包编码", trigger: "change" }],\n // options: {\n // clearable: true,\n // placeholder: "请选择包编码",\n // },\n // option: [],\n // },\n {\n label: "类中文名称",\n prop: "classDispname",\n type: "Input",\n rules: [\n { required: true, message: \'请输入类中文名称\', trigger: \'blur\' },\n ],\n options: {\n clearable: true,\n placeholder: \'请输入类中文名称\',\n }\n },\n {\n label: "类英文名称",\n prop: "className",\n type: "Input",\n rules: [\n { required: true, message: \'请输入类英文名称\', trigger: \'blur\' },\n {\n required: true,\n validator: (rule, value, callback) => {\n const reg = /^[a-zA-Z]{1}w*$/;\n if (!reg.test(value)) {\n callback(\n new Error(\n "请输入以字母(不区分大小写)、数字、下划线(_)随意组合的字符串"\n )\n );\n }\n callback();\n },\n trigger: ["blur"],\n },\n ],\n options: {\n clearable: true,\n placeholder: \'请输入类英文名称\',\n }\n },\n {\n label: "类类型",\n prop: "classesType",\n type: "Select",\n rules: [{ required: true, message: "请选择类类型", trigger: "change" }],\n options: {\n clearable: true,\n placeholder: "请选择类型",\n },\n option: [\n {\n value: \'继承\',\n label: \'继承\',\n },\n {\n value: \'虚类\',\n label: \'虚类\',\n },\n {\n value: \'实体类\',\n label: \'实体类\',\n },\n ],\n },\n {\n label: "继承父类code",\n prop: "classesExtends",\n type: "Input",\n rules: [\n { required: true, message: \'请输入继承父类code\', trigger: \'blur\' },\n ],\n options: {\n clearable: true,\n placeholder: \'请输入继承父类code\',\n }\n },\n {\n label: "访问类型",\n prop: "accessType",\n type: "Select",\n rules: [{ required: true, message: "请选择访问类型", trigger: "change" }],\n options: {\n clearable: true,\n placeholder: "请选择访问类型",\n },\n option: [\n {\n value: \'default\',\n label: \'default\',\n },\n {\n value: \'public\',\n label: \'public\',\n },\n {\n value: \'protected\',\n label: \'protected\',\n },\n {\n value: \'private\',\n label: \'private\',\n },\n ],\n },\n {\n label: "实例存储表名称",\n prop: "objTableName",\n type: "Input",\n rules: [\n { required: true, message: \'请输入实例存储表名称\', trigger: \'blur\' },\n ],\n options: {\n clearable: true,\n placeholder: \'请输入实例存储表名称\',\n }\n },\n {\n label: "视图样式",\n prop: "viewStyle",\n type: "Input",\n rules: [\n { required: false, message: \'请输入视图样式\', trigger: \'blur\' },\n ],\n options: {\n clearable: true,\n placeholder: \'请输入视图样式\',\n }\n },\n {\n label: "备注",\n prop: "remark",\n type: "Input",\n rules: [],\n options: {\n clearable: true,\n placeholder: \'请输入备注\',\n type: \'textarea\',\n row: 4\n }\n },\n ],\n }\n\n}',la={isEnter:!0,name:"genPageTable",path:"dome",child:[{name:"index.vue",template:(e={})=>aa({title:"pageTable",...e}),templateConfig:{}},{name:"constants.js",template:(e={})=>ia({title:"pageTable",...e}),templateConfig:{title:""}}]};const ca=p(u(import.meta.url)),ua=(...t)=>e.resolve(ca,...t);(async function(){return await async function(e){const t=_n("dyp.config.js",{cwd:process.env.PWD}),n=await import(t);return e?n.default[e]:n.default}("genPageConfig")})().then((e=>{const t=e||la;var n;t||oa("全局模板未配置,使用默认配置"),(n=t).isEnter?(ra("请输入要生成的页面组件名称、会生成在 views/目录下"),process.stdin.on("data",(async e=>{const t=String(e).trim().toString();ha(n,t),process.stdin.emit("end")})),process.stdin.on("end",(()=>{ra("exit"),process.exit()}))):ha(n)}));const pa=(e,n)=>{t.existsSync(e)?oa(`${e}文件已存在`):t.writeFileSync(e,n,"utf8",(e=>{e?(oa(e.message),reject(e)):ua(!0)}))};function fa(e){return new Promise((t=>{da(e,(function(){t(!0)}))}))}function da(n,r){t.existsSync(n)?r():da(e.dirname(n),(function(){t.mkdirSync(n),r()}))}async function ha(e,n){const r=n||e.name,o=e.path?`${process.env.PWD}/src/views/${e.path}`:`${process.env.PWD}/src/views`,s=ua(o,r);if(t.existsSync(s))return oa(`${r}页面已存在`),void(r&&process.stdin.emit("end"));ra(`正在生成${r}目录 ${s}`),await fa(s);try{e.child.forEach((e=>{const t=ua(s,e.name);ra(`正在生成子文件${e.name} ${t}`),pa(t,e.template({name:r}))})),function(e,t=""){sa("green",e,t)}("生成成功")}catch(e){oa(e.message)}}