updates 17.0.0 → 17.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist-1Hfp2p5V.js +21 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +9 -32
- package/dist/ini-Dgvcztfv.js +4 -0
- package/dist/rc-DlHsBps6.js +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function e(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function t(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
|
|
2
|
+
`,e===t&&(i+=` `.repeat(a+n+2),i+=`^
|
|
3
|
+
`))}return i}var n=class extends Error{line;column;codeblock;constructor(n,r){let[i,a]=e(r.toml,r.ptr),o=t(r.toml,i,a);super(`Invalid TOML document: ${n}\n\n${o}`,r),this.line=i,this.column=a,this.codeblock=o}};function r(e,t){let n=0;for(;e[t-++n]===`\\`;);return--n&&n%2}function i(e,t=0,n=e.length){let r=e.indexOf(`
|
|
4
|
+
`,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}function a(e,t){for(let r=t;r<e.length;r++){let i=e[r];if(i===`
|
|
5
|
+
`)return r;if(i===`\r`&&e[r+1]===`
|
|
6
|
+
`)return r+1;if(i<` `&&i!==` `||i===``)throw new n(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function o(e,t,n,r){let i;for(;(i=e[t])===` `||i===` `||!n&&(i===`
|
|
7
|
+
`||i===`\r`&&e[t+1]===`
|
|
8
|
+
`);)t++;return r||i!==`#`?t:o(e,a(e,t),n)}function s(e,t,r,a,o=!1){if(!a)return t=i(e,t),t<0?e.length:t;for(let n=t;n<e.length;n++){let t=e[n];if(t===`#`)n=i(e,n);else if(t===r)return n+1;else if(t===a||o&&(t===`
|
|
9
|
+
`||t===`\r`&&e[n+1]===`
|
|
10
|
+
`))return n}throw new n(`cannot find end of structure`,{toml:e,ptr:t})}function c(e,t){let n=e[t],i=n===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):n;t+=i.length-1;do t=e.indexOf(i,++t);while(t>-1&&n!==`'`&&r(e,t));return t>-1&&(t+=i.length,i.length>1&&(e[t]===n&&t++,e[t]===n&&t++)),t}let l=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;var u=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(l);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}};let d=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,f=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,p=/^[+-]?0[0-9_]/,m=/^[0-9a-f]{4,8}$/i,h={b:`\b`,t:` `,n:`
|
|
11
|
+
`,f:`\f`,r:`\r`,'"':`"`,"\\":`\\`};function g(e,t=0,r=e.length){let i=e[t]===`'`,a=e[t++]===e[t]&&e[t]===e[t+1];a&&(r-=2,e[t+=2]===`\r`&&t++,e[t]===`
|
|
12
|
+
`&&t++);let s=0,c,l=``,u=t;for(;t<r-1;){let r=e[t++];if(r===`
|
|
13
|
+
`||r===`\r`&&e[t]===`
|
|
14
|
+
`){if(!a)throw new n(`newlines are not allowed in strings`,{toml:e,ptr:t-1})}else if(r<` `&&r!==` `||r===``)throw new n(`control characters are not allowed in strings`,{toml:e,ptr:t-1});if(c){if(c=!1,r===`u`||r===`U`){let i=e.slice(t,t+=r===`u`?4:8);if(!m.test(i))throw new n(`invalid unicode escape`,{toml:e,ptr:s});try{l+=String.fromCodePoint(parseInt(i,16))}catch{throw new n(`invalid unicode escape`,{toml:e,ptr:s})}}else if(a&&(r===`
|
|
15
|
+
`||r===` `||r===` `||r===`\r`)){if(t=o(e,t-1,!0),e[t]!==`
|
|
16
|
+
`&&e[t]!==`\r`)throw new n(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:s});t=o(e,t)}else if(r in h)l+=h[r];else throw new n(`unrecognized escape sequence`,{toml:e,ptr:s});u=t}else !i&&r===`\\`&&(s=t-1,c=!0,l+=e.slice(u,s))}return l+e.slice(u,r-1)}function _(e,t,r,i){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return i?0n:0;let a=d.test(e);if(a||f.test(e)){if(p.test(e))throw new n(`leading zeroes are not allowed`,{toml:t,ptr:r});e=e.replace(/_/g,``);let o=+e;if(isNaN(o))throw new n(`invalid number`,{toml:t,ptr:r});if(a){if((a=!Number.isSafeInteger(o))&&!i)throw new n(`integer value cannot be represented losslessly`,{toml:t,ptr:r});(a||i===!0)&&(o=BigInt(e))}return o}let o=new u(e);if(!o.isValid())throw new n(`invalid value`,{toml:t,ptr:r});return o}function v(e,t,r,i){let o=e.slice(t,r),s=o.indexOf(`#`);s>-1&&(a(e,s),o=o.slice(0,s));let c=o.trimEnd();if(!i){let r=o.indexOf(`
|
|
17
|
+
`,c.length);if(r>-1)throw new n(`newlines are not allowed in inline tables`,{toml:e,ptr:t+r})}return[c,s]}function y(e,t,r,a,l){if(a===0)throw new n(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let u=e[t];if(u===`[`||u===`{`){let[o,c]=u===`[`?C(e,t,a,l):S(e,t,a,l),d=r?s(e,c,`,`,r):c;if(c-d&&r===`}`){let t=i(e,c,d);if(t>-1)throw new n(`newlines are not allowed in inline tables`,{toml:e,ptr:t})}return[o,d]}let d;if(u===`"`||u===`'`){d=c(e,t);let i=g(e,t,d);if(r){if(d=o(e,d,r!==`]`),e[d]&&e[d]!==`,`&&e[d]!==r&&e[d]!==`
|
|
18
|
+
`&&e[d]!==`\r`)throw new n(`unexpected character encountered`,{toml:e,ptr:d});d+=+(e[d]===`,`)}return[i,d]}d=s(e,t,`,`,r);let f=v(e,t,d-+(e[d-1]===`,`),r===`]`);if(!f[0])throw new n(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return r&&f[1]>-1&&(d=o(e,t+f[1]),d+=+(e[d]===`,`)),[_(f[0],e,t,l),d]}let b=/^[a-zA-Z0-9-_]+[ \t]*$/;function x(e,t,r=`=`){let a=t-1,s=[],l=e.indexOf(r,t);if(l<0)throw new n(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++a];if(o!==` `&&o!==` `)if(o===`"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new n(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let u=c(e,t);if(u<0)throw new n(`unfinished string encountered`,{toml:e,ptr:t});a=e.indexOf(`.`,u);let d=e.slice(u,a<0||a>l?l:a),f=i(d);if(f>-1)throw new n(`newlines are not allowed in keys`,{toml:e,ptr:t+a+f});if(d.trimStart())throw new n(`found extra tokens after the string part`,{toml:e,ptr:u});if(l<u&&(l=e.indexOf(r,u),l<0))throw new n(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});s.push(g(e,t,u))}else{a=e.indexOf(`.`,t);let r=e.slice(t,a<0||a>l?l:a);if(!b.test(r))throw new n(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});s.push(r.trimEnd())}}while(a+1&&a<l);return[s,o(e,l+1,!0,!0)]}function S(e,t,r,i){let a={},o=new Set,s,c=0;for(t++;(s=e[t++])!==`}`&&s;){let l={toml:e,ptr:t-1};if(s===`
|
|
19
|
+
`)throw new n(`newlines are not allowed in inline tables`,l);if(s===`#`)throw new n(`inline tables cannot contain comments`,l);if(s===`,`)throw new n(`expected key-value, found comma`,l);if(s!==` `&&s!==` `){let s,l=a,u=!1,[d,f]=x(e,t-1);for(let r=0;r<d.length;r++){if(r&&(l=u?l[s]:l[s]={}),s=d[r],(u=Object.hasOwn(l,s))&&(typeof l[s]!=`object`||o.has(l[s])))throw new n(`trying to redefine an already defined value`,{toml:e,ptr:t});!u&&s===`__proto__`&&Object.defineProperty(l,s,{enumerable:!0,configurable:!0,writable:!0})}if(u)throw new n(`trying to redefine an already defined value`,{toml:e,ptr:t});let[p,m]=y(e,f,`}`,r-1,i);o.add(p),l[s]=p,t=m,c=e[t-1]===`,`?t-1:0}}if(c)throw new n(`trailing commas are not allowed in inline tables`,{toml:e,ptr:c});if(!s)throw new n(`unfinished table encountered`,{toml:e,ptr:t});return[a,t]}function C(e,t,r,i){let o=[],s;for(t++;(s=e[t++])!==`]`&&s;)if(s===`,`)throw new n(`expected value, found comma`,{toml:e,ptr:t-1});else if(s===`#`)t=a(e,t);else if(s!==` `&&s!==` `&&s!==`
|
|
20
|
+
`&&s!==`\r`){let n=y(e,t-1,`]`,r-1,i);o.push(n[0]),t=n[1]}if(!s)throw new n(`unfinished array encountered`,{toml:e,ptr:t});return[o,t]}function w(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function T(e,{maxDepth:t=1e3,integersAsBigInt:r}={}){let i={},a={},s=i,c=a;for(let l=o(e,0);l<e.length;){if(e[l]===`[`){let t=e[++l]===`[`,r=x(e,l+=+t,`]`);if(t){if(e[r[1]-1]!==`]`)throw new n(`expected end of table declaration`,{toml:e,ptr:r[1]-1});r[1]++}let o=w(r[0],i,a,t?2:1);if(!o)throw new n(`trying to redefine an already defined table or value`,{toml:e,ptr:l});c=o[2],s=o[1],l=r[1]}else{let i=x(e,l),a=w(i[0],s,c,0);if(!a)throw new n(`trying to redefine an already defined table or value`,{toml:e,ptr:l});let o=y(e,i[1],void 0,t,r);a[1][a[0]]=o[0],l=o[1]}if(l=o(e,l,!0),e[l]&&e[l]!==`
|
|
21
|
+
`&&e[l]!==`\r`)throw new n(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:l});l=o(e,l)}return i}export{T as parse};
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,5 @@ type Config = {
|
|
|
12
12
|
/** Minimum package age in days */
|
|
13
13
|
cooldown?: number;
|
|
14
14
|
};
|
|
15
|
-
declare function canIncludeByDate(date: string | undefined, cooldownDays: number, now: number): boolean;
|
|
16
15
|
//#endregion
|
|
17
|
-
export { Config
|
|
16
|
+
export { Config };
|
package/dist/index.js
CHANGED
|
@@ -1,36 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
3
|
-
`:`
|
|
4
|
-
`;function n(e,i){var a=[],s=``;typeof i==`string`?i={section:i,whitespace:!1}:(i||={},i.whitespace=i.whitespace===!0);var c=i.whitespace?` = `:`=`;return Object.keys(e).forEach(function(n,r,i){var l=e[n];l&&Array.isArray(l)?l.forEach(function(e){s+=o(n+`[]`)+c+o(e)+`
|
|
5
|
-
`}):l&&typeof l==`object`?a.push(n):s+=o(n)+c+o(l)+t}),i.section&&s.length&&(s=`[`+o(i.section)+`]`+t+s),a.forEach(function(a,o,c){var l=r(a).join(`\\.`),u=(i.section?i.section+`.`:``)+l,d=n(e[a],{section:u,whitespace:i.whitespace});s.length&&d.length&&(s+=t),s+=d}),s}function r(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 i(e){var t={},n=t,i=null,a=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach(function(e,r,o){if(!(!e||e.match(/^\s*[;#]/))){var c=e.match(a);if(c){if(c[1]!==void 0){if(i=s(c[1]),i===`__proto__`){n={};return}n=t[i]=t[i]||{};return}var l=s(c[2]);if(l!==`__proto__`){var u=c[3]?s(c[4]):!0;switch(u){case`true`:case`false`:case`null`:u=JSON.parse(u)}if(l.length>2&&l.slice(-2)===`[]`){if(l=l.substring(0,l.length-2),l===`__proto__`)return;n[l]?Array.isArray(n[l])||(n[l]=[n[l]]):n[l]=[]}Array.isArray(n[l])?n[l].push(u):n[l]=u}}}}),Object.keys(t).filter(function(e,n,i){if(!t[e]||typeof t[e]!=`object`||Array.isArray(t[e]))return!1;var a=r(e),o=t,s=a.pop(),c=s.replace(/\\\./g,`.`);return a.forEach(function(e,t,n){e!==`__proto__`&&((!o[e]||typeof o[e]!=`object`)&&(o[e]={}),o=o[e])}),o===t&&c===s?!1:(o[c]=t[e],!0)}).forEach(function(e,n,r){delete t[e]}),t}function a(e){return e.charAt(0)===`"`&&e.slice(-1)===`"`||e.charAt(0)===`'`&&e.slice(-1)===`'`}function o(e){return typeof e!=`string`||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&a(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,`\\;`).replace(/#/g,`\\#`)}function s(e,t){if(e=(e||``).trim(),a(e)){e.charAt(0)===`'`&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch{}}else{for(var n=!1,r=``,i=0,o=e.length;i<o;i++){var s=e.charAt(i);if(n)`\\;#`.indexOf(s)===-1?r+=`\\`+s:r+=s,n=!1;else if(`;#`.indexOf(s)!==-1)break;else s===`\\`?n=!0:r+=s}return n&&(r+=`\\`),r.trim()}return e}})),de=A(((e,t)=>{var n=1,r=2;function i(){return``}function a(e,t,n){return e.slice(t,n).replace(/\S/g,` `)}t.exports=function(e,t){t||={};for(var o,s,c=!1,l=!1,u=0,d=``,f=t.whitespace===!1?i:a,p=0;p<e.length;p++)if(o=e[p],s=e[p+1],!l&&o===`"`&&(e[p-1]===`\\`&&e[p-2]!==`\\`||(c=!c)),!c){if(!l&&o+s===`//`)d+=e.slice(u,p),u=p,l=n,p++;else if(l===n&&o+s===`\r
|
|
6
|
-
`){p++,l=!1,d+=f(e,u,p),u=p;continue}else if(l===n&&o===`
|
|
7
|
-
`)l=!1,d+=f(e,u,p),u=p;else if(!l&&o+s===`/*`){d+=e.slice(u,p),u=p,l=r,p++;continue}else if(l===r&&o+s===`*/`){p++,l=!1,d+=f(e,u,p+1),u=p+1;continue}}return d+(l?f(e.substr(u)):e.substr(u))}})),fe=A((e=>{var t=j(`fs`),n=ue(),r=j(`path`),i=de(),a=e.parse=function(e){return/^\s*{/.test(e)?JSON.parse(i(e)):n.parse(e)},o=e.file=function(){var e=[].slice.call(arguments).filter(function(e){return e!=null});for(var n in e)if(typeof e[n]!=`string`)return;var i=r.join.apply(null,e);try{return t.readFileSync(i,`utf-8`)}catch{return}};e.json=function(){var e=o.apply(null,arguments);return e?a(e):null},e.env=function(e,t){t||=process.env;var n={},r=e.length;for(var i in t)if(i.toLowerCase().indexOf(e.toLowerCase())===0){for(var a=i.substring(r).split(`__`),o;(o=a.indexOf(``))>-1;)a.splice(o,1);var s=n;a.forEach(function(e,n){!e||typeof s!=`object`||(n===a.length-1&&(s[e]=t[i]),s[e]===void 0&&(s[e]={}),s=s[e])})}return n},e.find=function(){var e=r.join.apply(null,[].slice.call(arguments));function n(e,i){var a=r.join(e,i);try{return t.statSync(a),a}catch{if(r.dirname(e)!==e)return n(r.dirname(e),i)}}return n(process.cwd(),e)}})),pe=A(((e,t)=>{function n(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof Buffer){var t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);return e.copy(t),t}else if(e instanceof Date)return new Date(e.getTime());else if(e instanceof RegExp)return new RegExp(e);else throw Error(`Unexpected situation`)}function i(e){var t=[];return e.forEach(function(e,a){typeof e==`object`&&e?Array.isArray(e)?t[a]=i(e):n(e)?t[a]=r(e):t[a]=o({},e):t[a]=e}),t}function a(e,t){return t===`__proto__`?void 0:e[t]}var o=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=`object`)return!1;if(arguments.length<2)return arguments[0];var e=arguments[0],t=Array.prototype.slice.call(arguments,1),s,c;return t.forEach(function(t){typeof t!=`object`||!t||Array.isArray(t)||Object.keys(t).forEach(function(l){if(c=a(e,l),s=a(t,l),s!==e)if(typeof s!=`object`||!s){e[l]=s;return}else if(Array.isArray(s)){e[l]=i(s);return}else if(n(s)){e[l]=r(s);return}else if(typeof c!=`object`||!c||Array.isArray(c)){e[l]=o({},s);return}else{e[l]=o(c,s);return}})}),e}})),me=A(((e,t)=>{function n(e,t){var n=e;return t.slice(0,-1).forEach(function(e){n=n[e]||{}}),t[t.length-1]in n}function r(e){return typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function i(e,t){return t===`constructor`&&typeof e[t]==`function`||t===`__proto__`}t.exports=function(e,t){t||={};var a={bools:{},strings:{},unknownFn:null};typeof t.unknown==`function`&&(a.unknownFn=t.unknown),typeof t.boolean==`boolean`&&t.boolean?a.allBools=!0:[].concat(t.boolean).filter(Boolean).forEach(function(e){a.bools[e]=!0});var o={};function s(e){return o[e].some(function(e){return a.bools[e]})}Object.keys(t.alias||{}).forEach(function(e){o[e]=[].concat(t.alias[e]),o[e].forEach(function(t){o[t]=[e].concat(o[e].filter(function(e){return t!==e}))})}),[].concat(t.string).filter(Boolean).forEach(function(e){a.strings[e]=!0,o[e]&&[].concat(o[e]).forEach(function(e){a.strings[e]=!0})});var c=t.default||{},l={_:[]};function u(e,t){return a.allBools&&/^--[^=]+$/.test(t)||a.strings[e]||a.bools[e]||o[e]}function d(e,t,n){for(var r=e,o=0;o<t.length-1;o++){var s=t[o];if(i(r,s))return;r[s]===void 0&&(r[s]={}),(r[s]===Object.prototype||r[s]===Number.prototype||r[s]===String.prototype)&&(r[s]={}),r[s]===Array.prototype&&(r[s]=[]),r=r[s]}var c=t[t.length-1];i(r,c)||((r===Object.prototype||r===Number.prototype||r===String.prototype)&&(r={}),r===Array.prototype&&(r=[]),r[c]===void 0||a.bools[c]||typeof r[c]==`boolean`?r[c]=n:Array.isArray(r[c])?r[c].push(n):r[c]=[r[c],n])}function f(e,t,n){if(!(n&&a.unknownFn&&!u(e,n)&&a.unknownFn(n)===!1)){var i=!a.strings[e]&&r(t)?Number(t):t;d(l,e.split(`.`),i),(o[e]||[]).forEach(function(e){d(l,e.split(`.`),i)})}}Object.keys(a.bools).forEach(function(e){f(e,c[e]===void 0?!1:c[e])});var p=[];e.indexOf(`--`)!==-1&&(p=e.slice(e.indexOf(`--`)+1),e=e.slice(0,e.indexOf(`--`)));for(var m=0;m<e.length;m++){var h=e[m],g,_;if(/^--.+=/.test(h)){var v=h.match(/^--([^=]+)=([\s\S]*)$/);g=v[1];var y=v[2];a.bools[g]&&(y=y!==`false`),f(g,y,h)}else if(/^--no-.+/.test(h))g=h.match(/^--no-(.+)/)[1],f(g,!1,h);else if(/^--.+/.test(h))g=h.match(/^--(.+)/)[1],_=e[m+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!a.bools[g]&&!a.allBools&&(!o[g]||!s(g))?(f(g,_,h),m+=1):/^(true|false)$/.test(_)?(f(g,_===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h);else if(/^-[^-]+/.test(h)){for(var b=h.slice(1,-1).split(``),x=!1,S=0;S<b.length;S++){if(_=h.slice(S+2),_===`-`){f(b[S],_,h);continue}if(/[A-Za-z]/.test(b[S])&&_[0]===`=`){f(b[S],_.slice(1),h),x=!0;break}if(/[A-Za-z]/.test(b[S])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){f(b[S],_,h),x=!0;break}if(b[S+1]&&b[S+1].match(/\W/)){f(b[S],h.slice(S+2),h),x=!0;break}else f(b[S],a.strings[b[S]]?``:!0,h)}g=h.slice(-1)[0],!x&&g!==`-`&&(e[m+1]&&!/^(-|--)[^-]/.test(e[m+1])&&!a.bools[g]&&(!o[g]||!s(g))?(f(g,e[m+1],h),m+=1):e[m+1]&&/^(true|false)$/.test(e[m+1])?(f(g,e[m+1]===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h))}else if((!a.unknownFn||a.unknownFn(h)!==!1)&&l._.push(a.strings._||!r(h)?h:Number(h)),t.stopEarly){l._.push.apply(l._,e.slice(m+1));break}}return Object.keys(c).forEach(function(e){n(l,e.split(`.`))||(d(l,e.split(`.`),c[e]),(o[e]||[]).forEach(function(t){d(l,t.split(`.`),c[e])}))}),t[`--`]?l[`--`]=p.slice():p.forEach(function(e){l._.push(e)}),l}})),he=A(((e,t)=>{var n=fe(),r=j(`path`).join,i=pe(),a=`/etc`,o=process.platform===`win32`,s=o?process.env.USERPROFILE:process.env.HOME;t.exports=function(e,t,c,l){if(typeof e!=`string`)throw Error(`rc(name): name *must* be string`);c||=me()(process.argv.slice(2)),t=(typeof t==`string`?n.json(t):t)||{},l||=n.parse;var u=n.env(e+`_`),d=[t],f=[];function p(e){if(!(f.indexOf(e)>=0)){var t=n.file(e);t&&(d.push(l(t)),f.push(e))}}return o||[r(a,e,`config`),r(a,e+`rc`)].forEach(p),s&&[r(s,`.config`,e,`config`),r(s,`.config`,e),r(s,`.`+e,`config`),r(s,`.`+e+`rc`)].forEach(p),p(n.find(`.`+e+`rc`)),u.config&&p(u.config),c.config&&p(c.config),i.apply(null,d.concat([u,c,f.length?{configs:f,config:f[f.length-1]}:void 0]))}})),ge=A(((e,t)=>{var n=j(`constants`),r=process.cwd,i=null,a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return i||=r.call(process),i};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var o=process.chdir;process.chdir=function(e){i=null,o.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,o)}t.exports=s;function s(e){n.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),a===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,function(t,n){if(t){i&&i(t);return}e.fchmod(n,r,function(t){e.close(n,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),a=!0,o;try{o=e.fchmodSync(i,r),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function r(e){n.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,r,i,a){e.open(t,n.O_SYMLINK,function(t,n){if(t){a&&a(t);return}e.futimes(n,r,i,function(t){e.close(n,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,r,i){var a=e.openSync(t,n.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,r,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function o(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),_e=A(((e,t)=>{var n=j(`stream`).Stream;t.exports=r;function r(e){return{ReadStream:t,WriteStream:r};function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this);var a=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function r(t,i){if(!(this instanceof r))return new r(t,i);n.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw Error(`start must be >= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),ve=A(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),ye=A(((e,t)=>{var n=j(`fs`),r=ge(),i=_e(),a=ve(),o=j(`util`),s,c;typeof Symbol==`function`&&typeof Symbol.for==`function`?(s=Symbol.for(`graceful-fs.queue`),c=Symbol.for(`graceful-fs.previous`)):(s=`___graceful-fs.queue`,c=`___graceful-fs.previous`);function l(){}function u(e,t){Object.defineProperty(e,s,{get:function(){return t}})}var d=l;o.debuglog?d=o.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(d=function(){var e=o.format.apply(o,arguments);e=`GFS4: `+e.split(/\n/).join(`
|
|
8
|
-
GFS4: `),console.error(e)}),n[s]||(u(n,global[s]||[]),n.close=(function(e){function t(t,r){return e.call(n,t,function(e){e||h(),typeof r==`function`&&r.apply(this,arguments)})}return Object.defineProperty(t,c,{value:e}),t})(n.close),n.closeSync=(function(e){function t(t){e.apply(n,arguments),h()}return Object.defineProperty(t,c,{value:e}),t})(n.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){d(n[s]),j(`assert`).equal(n[s].length,0)})),global[s]||u(global,n[s]),t.exports=f(a(n)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched&&(t.exports=f(n),n.__patched=!0);function f(e){r(e),e.gracefulify=f,e.createReadStream=T,e.createWriteStream=E;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?p([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var a=e.writeFile;e.writeFile=o;function o(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,o){return a(e,t,n,function(a){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?p([i,[e,t,n,r],a,o||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var m=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=m.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?p([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=i(e);x=g.ReadStream,C=g.WriteStream}var _=e.ReadStream;_&&(x.prototype=Object.create(_.prototype),x.prototype.open=S);var v=e.WriteStream;v&&(C.prototype=Object.create(v.prototype),C.prototype.open=w),Object.defineProperty(e,`ReadStream`,{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,`WriteStream`,{get:function(){return C},set:function(e){C=e},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(e,`FileReadStream`,{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var b=C;Object.defineProperty(e,`FileWriteStream`,{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});function x(e,t){return this instanceof x?(_.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function C(e,t){return this instanceof C?(v.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function w(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function T(t,n){return new e.ReadStream(t,n)}function E(t,n){return new e.WriteStream(t,n)}var D=e.open;e.open=O;function O(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return D(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function p(e){d(`ENQUEUE`,e[0].name,e[1]),n[s].push(e),g()}var m;function h(){for(var e=Date.now(),t=0;t<n[s].length;++t)n[s][t].length>2&&(n[s][t][3]=e,n[s][t][4]=e);g()}function g(){if(clearTimeout(m),m=void 0,n[s].length!==0){var e=n[s].shift(),t=e[0],r=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)d(`RETRY`,t.name,r),t.apply(null,r);else if(Date.now()-a>=6e4){d(`TIMEOUT`,t.name,r);var c=r.pop();typeof c==`function`&&c.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(d(`RETRY`,t.name,r),t.apply(null,r.concat([a]))):n[s].push(e)}m===void 0&&(m=setTimeout(g,0))}}})),be=A((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.readCAFileSync=void 0;let n=t(ye());function r(e){try{let t=n.default.readFileSync(e,`utf8`),r=`-----END CERTIFICATE-----`;return t.split(r).filter(e=>!!e.trim()).map(e=>`${e.trimLeft()}${r}`)}catch(e){if(e.code===`ENOENT`)return;throw e}}e.readCAFileSync=r})),xe=A((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(be(),e)})),Se=A(((e,t)=>{t.exports=r;function n(e,t){if(typeof Object.setPrototypeOf==`function`)return Object.setPrototypeOf(e,t);e.__proto__=t}function r(){this.list=[];var e=null;Object.defineProperty(this,`root`,{get:function(){return e},set:function(t){e=t,this.list.length&&n(this.list[this.list.length-1],t)},enumerable:!0,configurable:!0})}r.prototype={get length(){return this.list.length},get keys(){var e=[];for(var t in this.list[0])e.push(t);return e},get snapshot(){var e={};return this.keys.forEach(function(t){e[t]=this.get(t)},this),e},get store(){return this.list[0]},push:function(e){return typeof e!=`object`&&(e={valueOf:e}),this.list.length>=1&&n(this.list[this.list.length-1],e),n(e,this.root),this.list.push(e)},pop:function(){return this.list.length>=2&&n(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(e){return n(e,this.list[0]||this.root),this.list.unshift(e)},shift:function(){return this.list.length===1&&n(this.list[0],this.root),this.list.shift()},get:function(e){return this.list[0][e]},set:function(e,t,n){return this.length||this.push({}),n&&this.list[0].hasOwnProperty(e)&&this.push({}),this.list[0][e]=t},forEach:function(e,t){for(var n in this.list[0])e.call(t,n,this.list[0][n])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var e=this.list.splice.apply(this.list,arguments),t=0,r=this.list.length;t<r;t++)n(this.list[t],this.list[t+1]||this.root);return e}}})),Ce=A(((e,t)=>{var n=Se(),r=j(`path`),i=j(`fs`),a=ue(),o=j(`events`).EventEmitter,s=j(`url`),c=j(`http`),l=t.exports=function(){for(var e=[].slice.call(arguments),t=new f;e.length;){var n=e.shift();n&&t.push(typeof n==`string`?d(n):n)}return t};l.find=function(){var e=r.join.apply(null,[].slice.call(arguments));function t(e,n){var a=r.join(e,n);try{return i.statSync(a),a}catch{if(r.dirname(e)!==e)return t(r.dirname(e),n)}}return t(__dirname,e)};var u=l.parse=function(e,t,n){if(e=``+e,n)if(n===`json`)if(this.emit)try{return JSON.parse(e)}catch(e){this.emit(`error`,e)}else return JSON.parse(e);else return a.parse(e);else try{return JSON.parse(e)}catch{return a.parse(e)}},d=l.json=function(){var e=[].slice.call(arguments).filter(function(e){return e!=null}),t=r.join.apply(null,e),n;try{n=i.readFileSync(t,`utf-8`)}catch{return}return u(n,t,`json`)};l.env=function(e,t){t||=process.env;var n={},r=e.length;for(var i in t)i.indexOf(e)===0&&(n[i.substring(r)]=t[i]);return n},l.ConfigChain=f;function f(){o.apply(this),n.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var p={constructor:{value:f}};Object.keys(o.prototype).forEach(function(e){p[e]=Object.getOwnPropertyDescriptor(o.prototype,e)}),f.prototype=Object.create(n.prototype,p),f.prototype.del=function(e,t){if(t){var n=this.sources[t];if(n&&=n.data,!n)return this.emit(`error`,Error(`not found `+t));delete n[e]}else for(var r=0,i=this.list.length;r<i;r++)delete this.list[r][e];return this},f.prototype.set=function(e,t,n){var r;if(n){if(r=this.sources[n],r&&=r.data,!r)return this.emit(`error`,Error(`not found `+n))}else if(r=this.list[0],!r)return this.emit(`error`,Error(`cannot set, no confs!`));return r[e]=t,this},f.prototype.get=function(e,t){return t?(t=this.sources[t],t&&=t.data,t&&Object.hasOwnProperty.call(t,e)?t[e]:void 0):this.list[0][e]},f.prototype.save=function(e,t,n){typeof t==`function`&&(n=t,t=null);var r=this.sources[e];if(!r||!(r.path||r.source)||!r.data)return this.emit(`error`,Error(`bad save target: `+e));if(r.source){var o=r.prefix||``;return Object.keys(r.data).forEach(function(e){r.source[o+e]=r.data[e]}),this}var t=t||r.type,s=r.data;return s=r.type===`json`?JSON.stringify(s):a.stringify(s),this._saving++,i.writeFile(r.path,s,`utf8`,function(e){if(this._saving--,e)return n?n(e):this.emit(`error`,e);this._saving===0&&(n&&n(),this.emit(`save`))}.bind(this)),this},f.prototype.addFile=function(e,t,n){n||=e;var r={__source__:n};return this.sources[n]={path:e,type:t},this.push(r),this._await(),i.readFile(e,`utf8`,function(n,i){n&&this.emit(`error`,n),this.addString(i,e,t,r)}.bind(this)),this},f.prototype.addEnv=function(e,t,n){n||=`env`;var r=l.env(e,t);return this.sources[n]={data:r,source:t,prefix:e},this.add(r,n)},f.prototype.addUrl=function(e,t,n){this._await();var r=s.format(e);n||=r;var i={__source__:n};return this.sources[n]={href:r,type:t},this.push(i),c.request(e,function(e){var n=[],a=e.headers[`content-type`];t||(t=a.indexOf(`json`)===-1?a.indexOf(`ini`)===-1?r.match(/\.json$/)?`json`:r.match(/\.ini$/)?`ini`:null:`ini`:`json`,i.type=t),e.on(`data`,n.push.bind(n)).on(`end`,function(){this.addString(Buffer.concat(n),r,t,i)}.bind(this)).on(`error`,this.emit.bind(this,`error`))}.bind(this)).on(`error`,this.emit.bind(this,`error`)).end(),this},f.prototype.addString=function(e,t,n,r){return e=this.parse(e,t,n),this.add(e,r),this},f.prototype.add=function(e,t){if(t&&typeof t==`object`){var n=this.list.indexOf(t);if(n===-1)return this.emit(`error`,Error(`bad marker`));this.splice(n,1,e),t=t.__source__,this.sources[t]=this.sources[t]||{},this.sources[t].data=e,this._resolve()}else typeof t==`string`&&(this.sources[t]=this.sources[t]||{},this.sources[t].data=e),this._await(),this.push(e),process.nextTick(this._resolve.bind(this));return this},f.prototype.parse=l.parse,f.prototype._await=function(){this._awaiting++},f.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit(`load`,this)}})),we=A(((e,t)=>{t.exports=function(e){let t=e.indexOf(`:`);if(t===-1)return n(e);let r=e.substr(0,t),i=e.substr(t+1);return`${n(r)}:${n(i)}`};function n(e){if(e=e.toLowerCase(),e===`_authtoken`)return`_authToken`;let t=e[0];for(let n=1;n<e.length;n++)t+=e[n]===`_`?`-`:e[n];return t}})),Te=A((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.envReplace=void 0;let t=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function n(e,n){return e.replace(t,r.bind(null,n))}e.envReplace=n;function r(e,t,n,r){if(n.length%2)return t.slice((n.length+1)/2);let i=a(e,r);if(i===void 0)throw Error(`Failed to replace env in config: ${t}`);return`${n.slice(n.length/2)}${i}`}let i=/([^:-]+)(:?)-(.+)/;function a(e,t){let n=t.match(i);if(!n)return e[t];let[,r,a,o]=n;return Object.prototype.hasOwnProperty.call(e,r)?!e[r]&&a?o:e[r]:o}})),Ee=A((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.envReplace=void 0;var t=Te();Object.defineProperty(e,`envReplace`,{enumerable:!0,get:function(){return t.envReplace}})})),De=A((e=>{let t=j(`fs`),n=j(`path`),{envReplace:r}=Ee();e.envReplace=r,e.findPrefix=e=>{e=n.resolve(e);let r=!1;for(;n.basename(e)===`node_modules`;)e=n.dirname(e),r=!0;if(r)return e;let i=(e,r)=>{if(e===`/`||process.platform===`win32`&&/^[a-zA-Z]:(\\|\/)?$/.test(e))return r;try{let a=t.readdirSync(e);if(a.includes(`node_modules`)||a.includes(`package.json`)||a.includes(`package.json5`)||a.includes(`package.yaml`)||a.includes(`pnpm-workspace.yaml`))return e;let o=n.dirname(e);return o===e?r:i(o,r)}catch(t){if(e===r){if(t.code===`ENOENT`)return r;throw t}return r}};return i(e,e)},e.parseField=(e,t,i)=>{if(typeof t!=`string`)return t;let a=[].concat(e[i]),o=a.indexOf(n)!==-1,s=a.indexOf(Boolean)!==-1,c=a.indexOf(String)!==-1,l=a.indexOf(Number)!==-1;if(t=`${t}`.trim(),/^".*"$/.test(t))try{t=JSON.parse(t)}catch{throw Error(`Failed parsing JSON config key ${i}: ${t}`)}if(s&&!c&&t===``)return!0;switch(t){case`true`:return!0;case`false`:return!1;case`null`:return null;case`undefined`:return}return t=r(t,process.env),o&&((process.platform===`win32`?/^~(\/|\\)/:/^~\//).test(t)&&process.env.HOME&&(t=n.resolve(process.env.HOME,t.substr(2))),t=n.resolve(t)),l&&!isNaN(t)&&(t=Number(t)),t},e.parseKey=e=>typeof e==`string`?r(e,process.env):e})),Oe=A((e=>{let t=j(`path`),n=j(`stream`).Stream,r=j(`url`),i=()=>{},a=()=>[],o=()=>{};e.types={access:[null,`restricted`,`public`],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,`dev`,`development`],audit:Boolean,"auth-type":[`legacy`,`sso`,`saml`,`oauth`],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:t,cache:t,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:[`always`,Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:t,"global-style":Boolean,group:[Number,String],"https-proxy":[null,r],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":t,"init-author-name":String,"init-author-email":String,"init-author-url":[``,r],"init-license":String,"init-version":o,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":a(),loglevel:[`silent`,`error`,`warn`,`notice`,`http`,`timing`,`info`,`verbose`,`silly`],logstream:n,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,o],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,`dev`,`development`,`prod`,`production`],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:t,production:Boolean,progress:Boolean,proxy:[null,!1,r],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,r],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,`auto`,`warn-only`],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,`oauth`,`saml`],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:t,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:t,umask:i,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}})),ke=A(((e,t)=>{let{readCAFileSync:n}=xe(),r=j(`fs`),i=j(`path`),{ConfigChain:a}=Ce(),o=we(),s=De();var c=class extends a{constructor(e,t){super(e),this.root=e,this._parseField=s.parseField.bind(null,t||Oe())}add(e,t){try{for(let[t,n]of Object.entries(e)){let r=s.parseKey(t);r!==t&&delete e[t],e[r]=this._parseField(n,r)}}catch(e){throw e}return super.add(e,t)}addFile(e,t){t||=e;let n={__source__:t};this.sources[t]={path:e,type:`ini`},this.push(n),this._await();try{let t=r.readFileSync(e,`utf8`);this.addString(t,e,`ini`,n)}catch(t){if(t.code===`ENOENT`)this.add({},n);else if(t.code!==`EISDIR`)return`Issue while reading "${e}". ${t.message}`}}addEnv(e){e||=process.env;let t={};return Object.keys(e).filter(e=>/^npm_config_/i.test(e)).forEach(n=>{if(!e[n])return;let r=o(n.substr(11)),i=e[n];t[r]=l(r,i)}),super.addEnv(``,t,`env`)}loadPrefix(){let e=this.list[0];Object.defineProperty(this,`prefix`,{enumerable:!0,set:e=>{let t=this.get(`global`);this[t?`globalPrefix`:`localPrefix`]=e},get:()=>this.get(`global`)?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,`globalPrefix`,{enumerable:!0,set:e=>{this.set(`prefix`,e)},get:()=>i.resolve(this.get(`prefix`))});let t;if(Object.defineProperty(this,`localPrefix`,{enumerable:!0,set:e=>{t=e},get:()=>t}),Object.prototype.hasOwnProperty.call(e,`prefix`))t=i.resolve(e.prefix);else try{t=s.findPrefix(process.cwd())}catch(e){throw e}return t}loadCAFile(e){if(!e)return;let t=n(e);t&&this.set(`ca`,t)}loadUser(){let e=this.root;if(this.get(`global`))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}let t=i.resolve(this.get(`prefix`));try{e.user=r.statSync(t).uid}catch(e){if(e.code===`ENOENT`)return;throw e}}};function l(e,t){function n(e){return e.indexOf(`
|
|
2
|
+
import{a as e,i as t,n,r,t as i}from"./ini-Dgvcztfv.js";import{cwd as a,env as o,exit as s,platform as c,stderr as l,stdout as u,versions as d}from"node:process";import{basename as f,dirname as p,join as m,resolve as h}from"node:path";import{accessSync as g,lstatSync as _,readFileSync as v,truncateSync as y,writeFileSync as b}from"node:fs";import{parseArgs as x,stripVTControlCharacters as S,styleText as C}from"node:util";import{execFileSync as w}from"node:child_process";import{EOL as T,availableParallelism as E,cpus as D}from"node:os";var O=class extends Error{constructor(e){super(),this.name=`AbortError`,this.message=e}};const k=e=>globalThis.DOMException===void 0?new O(e):new DOMException(e),A=e=>{let t=e.reason===void 0?k(`This operation was aborted.`):e.reason;return t instanceof Error?t:k(t)};async function ee(e,t,{concurrency:n=1/0,stopOnError:r=!0,signal:i}={}){return new Promise((a,o)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!=`function`)throw TypeError(`Mapper function is required`);if(!((Number.isSafeInteger(n)||n===1/0)&&n>=1))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let s=[],c=[],l=new Map,u=!1,d=!1,f=!1,p=0,m=0,h=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=e=>{u=!0,d=!0,o(e)};i&&(i.aborted&&g(A(i)),i.addEventListener(`abort`,()=>{g(A(i))}));let _=async()=>{if(d)return;let e=await h.next(),n=m;if(m++,e.done){if(f=!0,p===0&&!d){if(!r&&c.length>0){g(AggregateError(c));return}if(d=!0,l.size===0){a(s);return}let e=[];for(let[t,n]of s.entries())l.get(t)!==te&&e.push(n);a(e)}return}p++,(async()=>{try{let r=await e.value;if(d)return;let i=await t(r,n);i===te&&l.set(n,i),s[n]=i,p--,await _()}catch(e){if(r)g(e);else{c.push(e),p--;try{await _()}catch(e){g(e)}}}})()};(async()=>{for(let e=0;e<n;e++){try{await _()}catch(e){g(e);break}if(f||u)break}})()})}const te=Symbol(`skip`);async function ne(e,t){return ee(e,e=>e(),t)}var re=`17.0.2`,ie=n(((e,t)=>{var n=r(`constants`),i=process.cwd,a=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return a||=i.call(process),a};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var s=process.chdir;process.chdir=function(e){a=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}t.exports=c;function c(e){n.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),o===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,function(t,n){if(t){i&&i(t);return}e.fchmod(n,r,function(t){e.close(n,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),a=!0,o;try{o=e.fchmodSync(i,r),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function r(e){n.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,r,i,a){e.open(t,n.O_SYMLINK,function(t,n){if(t){a&&a(t);return}e.futimes(n,r,i,function(t){e.close(n,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,r,i){var a=e.openSync(t,n.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,r,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function a(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),ae=n(((e,t)=>{var n=r(`stream`).Stream;t.exports=i;function i(e){return{ReadStream:t,WriteStream:r};function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this);var a=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function r(t,i){if(!(this instanceof r))return new r(t,i);n.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw Error(`start must be >= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),oe=n(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),se=n(((e,t)=>{var n=r(`fs`),i=ie(),a=ae(),o=oe(),s=r(`util`),c,l;typeof Symbol==`function`&&typeof Symbol.for==`function`?(c=Symbol.for(`graceful-fs.queue`),l=Symbol.for(`graceful-fs.previous`)):(c=`___graceful-fs.queue`,l=`___graceful-fs.previous`);function u(){}function d(e,t){Object.defineProperty(e,c,{get:function(){return t}})}var f=u;s.debuglog?f=s.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(f=function(){var e=s.format.apply(s,arguments);e=`GFS4: `+e.split(/\n/).join(`
|
|
3
|
+
GFS4: `),console.error(e)}),n[c]||(d(n,global[c]||[]),n.close=(function(e){function t(t,r){return e.call(n,t,function(e){e||g(),typeof r==`function`&&r.apply(this,arguments)})}return Object.defineProperty(t,l,{value:e}),t})(n.close),n.closeSync=(function(e){function t(t){e.apply(n,arguments),g()}return Object.defineProperty(t,l,{value:e}),t})(n.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){f(n[c]),r(`assert`).equal(n[c].length,0)})),global[c]||d(global,n[c]),t.exports=p(o(n)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched&&(t.exports=p(n),n.__patched=!0);function p(e){i(e),e.gracefulify=p,e.createReadStream=T,e.createWriteStream=E;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?m([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=o;function o(e,t,n,i){return typeof n==`function`&&(i=n,n=null),a(e,t,n,i);function a(e,t,n,i,o){return r(e,t,n,function(r){r&&(r.code===`EMFILE`||r.code===`ENFILE`)?m([a,[e,t,n,i],r,o||Date.now(),Date.now()]):typeof i==`function`&&i.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var f=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=f.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?m([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=a(e);x=g.ReadStream,C=g.WriteStream}var _=e.ReadStream;_&&(x.prototype=Object.create(_.prototype),x.prototype.open=S);var v=e.WriteStream;v&&(C.prototype=Object.create(v.prototype),C.prototype.open=w),Object.defineProperty(e,`ReadStream`,{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,`WriteStream`,{get:function(){return C},set:function(e){C=e},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(e,`FileReadStream`,{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var b=C;Object.defineProperty(e,`FileWriteStream`,{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});function x(e,t){return this instanceof x?(_.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function C(e,t){return this instanceof C?(v.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function w(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function T(t,n){return new e.ReadStream(t,n)}function E(t,n){return new e.WriteStream(t,n)}var D=e.open;e.open=O;function O(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return D(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function m(e){f(`ENQUEUE`,e[0].name,e[1]),n[c].push(e),_()}var h;function g(){for(var e=Date.now(),t=0;t<n[c].length;++t)n[c][t].length>2&&(n[c][t][3]=e,n[c][t][4]=e);_()}function _(){if(clearTimeout(h),h=void 0,n[c].length!==0){var e=n[c].shift(),t=e[0],r=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)f(`RETRY`,t.name,r),t.apply(null,r);else if(Date.now()-a>=6e4){f(`TIMEOUT`,t.name,r);var s=r.pop();typeof s==`function`&&s.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(f(`RETRY`,t.name,r),t.apply(null,r.concat([a]))):n[c].push(e)}h===void 0&&(h=setTimeout(_,0))}}})),ce=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.readCAFileSync=void 0;let n=t(se());function r(e){try{let t=n.default.readFileSync(e,`utf8`),r=`-----END CERTIFICATE-----`;return t.split(r).filter(e=>!!e.trim()).map(e=>`${e.trimLeft()}${r}`)}catch(e){if(e.code===`ENOENT`)return;throw e}}e.readCAFileSync=r})),le=n((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(ce(),e)})),ue=n(((e,t)=>{t.exports=r;function n(e,t){if(typeof Object.setPrototypeOf==`function`)return Object.setPrototypeOf(e,t);e.__proto__=t}function r(){this.list=[];var e=null;Object.defineProperty(this,`root`,{get:function(){return e},set:function(t){e=t,this.list.length&&n(this.list[this.list.length-1],t)},enumerable:!0,configurable:!0})}r.prototype={get length(){return this.list.length},get keys(){var e=[];for(var t in this.list[0])e.push(t);return e},get snapshot(){var e={};return this.keys.forEach(function(t){e[t]=this.get(t)},this),e},get store(){return this.list[0]},push:function(e){return typeof e!=`object`&&(e={valueOf:e}),this.list.length>=1&&n(this.list[this.list.length-1],e),n(e,this.root),this.list.push(e)},pop:function(){return this.list.length>=2&&n(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(e){return n(e,this.list[0]||this.root),this.list.unshift(e)},shift:function(){return this.list.length===1&&n(this.list[0],this.root),this.list.shift()},get:function(e){return this.list[0][e]},set:function(e,t,n){return this.length||this.push({}),n&&this.list[0].hasOwnProperty(e)&&this.push({}),this.list[0][e]=t},forEach:function(e,t){for(var n in this.list[0])e.call(t,n,this.list[0][n])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var e=this.list.splice.apply(this.list,arguments),t=0,r=this.list.length;t<r;t++)n(this.list[t],this.list[t+1]||this.root);return e}}})),de=n(((e,t)=>{var n=ue(),a=r(`path`),o=r(`fs`),s=i(),c=r(`events`).EventEmitter,l=r(`url`),u=r(`http`),d=t.exports=function(){for(var e=[].slice.call(arguments),t=new m;e.length;){var n=e.shift();n&&t.push(typeof n==`string`?p(n):n)}return t};d.find=function(){var e=a.join.apply(null,[].slice.call(arguments));function t(e,n){var r=a.join(e,n);try{return o.statSync(r),r}catch{if(a.dirname(e)!==e)return t(a.dirname(e),n)}}return t(__dirname,e)};var f=d.parse=function(e,t,n){if(e=``+e,n)if(n===`json`)if(this.emit)try{return JSON.parse(e)}catch(e){this.emit(`error`,e)}else return JSON.parse(e);else return s.parse(e);else try{return JSON.parse(e)}catch{return s.parse(e)}},p=d.json=function(){var e=[].slice.call(arguments).filter(function(e){return e!=null}),t=a.join.apply(null,e),n;try{n=o.readFileSync(t,`utf-8`)}catch{return}return f(n,t,`json`)};d.env=function(e,t){t||=process.env;var n={},r=e.length;for(var i in t)i.indexOf(e)===0&&(n[i.substring(r)]=t[i]);return n},d.ConfigChain=m;function m(){c.apply(this),n.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var h={constructor:{value:m}};Object.keys(c.prototype).forEach(function(e){h[e]=Object.getOwnPropertyDescriptor(c.prototype,e)}),m.prototype=Object.create(n.prototype,h),m.prototype.del=function(e,t){if(t){var n=this.sources[t];if(n&&=n.data,!n)return this.emit(`error`,Error(`not found `+t));delete n[e]}else for(var r=0,i=this.list.length;r<i;r++)delete this.list[r][e];return this},m.prototype.set=function(e,t,n){var r;if(n){if(r=this.sources[n],r&&=r.data,!r)return this.emit(`error`,Error(`not found `+n))}else if(r=this.list[0],!r)return this.emit(`error`,Error(`cannot set, no confs!`));return r[e]=t,this},m.prototype.get=function(e,t){return t?(t=this.sources[t],t&&=t.data,t&&Object.hasOwnProperty.call(t,e)?t[e]:void 0):this.list[0][e]},m.prototype.save=function(e,t,n){typeof t==`function`&&(n=t,t=null);var r=this.sources[e];if(!r||!(r.path||r.source)||!r.data)return this.emit(`error`,Error(`bad save target: `+e));if(r.source){var i=r.prefix||``;return Object.keys(r.data).forEach(function(e){r.source[i+e]=r.data[e]}),this}var t=t||r.type,a=r.data;return a=r.type===`json`?JSON.stringify(a):s.stringify(a),this._saving++,o.writeFile(r.path,a,`utf8`,function(e){if(this._saving--,e)return n?n(e):this.emit(`error`,e);this._saving===0&&(n&&n(),this.emit(`save`))}.bind(this)),this},m.prototype.addFile=function(e,t,n){n||=e;var r={__source__:n};return this.sources[n]={path:e,type:t},this.push(r),this._await(),o.readFile(e,`utf8`,function(n,i){n&&this.emit(`error`,n),this.addString(i,e,t,r)}.bind(this)),this},m.prototype.addEnv=function(e,t,n){n||=`env`;var r=d.env(e,t);return this.sources[n]={data:r,source:t,prefix:e},this.add(r,n)},m.prototype.addUrl=function(e,t,n){this._await();var r=l.format(e);n||=r;var i={__source__:n};return this.sources[n]={href:r,type:t},this.push(i),u.request(e,function(e){var n=[],a=e.headers[`content-type`];t||(t=a.indexOf(`json`)===-1?a.indexOf(`ini`)===-1?r.match(/\.json$/)?`json`:r.match(/\.ini$/)?`ini`:null:`ini`:`json`,i.type=t),e.on(`data`,n.push.bind(n)).on(`end`,function(){this.addString(Buffer.concat(n),r,t,i)}.bind(this)).on(`error`,this.emit.bind(this,`error`))}.bind(this)).on(`error`,this.emit.bind(this,`error`)).end(),this},m.prototype.addString=function(e,t,n,r){return e=this.parse(e,t,n),this.add(e,r),this},m.prototype.add=function(e,t){if(t&&typeof t==`object`){var n=this.list.indexOf(t);if(n===-1)return this.emit(`error`,Error(`bad marker`));this.splice(n,1,e),t=t.__source__,this.sources[t]=this.sources[t]||{},this.sources[t].data=e,this._resolve()}else typeof t==`string`&&(this.sources[t]=this.sources[t]||{},this.sources[t].data=e),this._await(),this.push(e),process.nextTick(this._resolve.bind(this));return this},m.prototype.parse=d.parse,m.prototype._await=function(){this._awaiting++},m.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit(`load`,this)}})),fe=n(((e,t)=>{t.exports=function(e){let t=e.indexOf(`:`);if(t===-1)return n(e);let r=e.substr(0,t),i=e.substr(t+1);return`${n(r)}:${n(i)}`};function n(e){if(e=e.toLowerCase(),e===`_authtoken`)return`_authToken`;let t=e[0];for(let n=1;n<e.length;n++)t+=e[n]===`_`?`-`:e[n];return t}})),pe=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.envReplace=void 0;let t=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function n(e,n){return e.replace(t,r.bind(null,n))}e.envReplace=n;function r(e,t,n,r){if(n.length%2)return t.slice((n.length+1)/2);let i=a(e,r);if(i===void 0)throw Error(`Failed to replace env in config: ${t}`);return`${n.slice(n.length/2)}${i}`}let i=/([^:-]+)(:?)-(.+)/;function a(e,t){let n=t.match(i);if(!n)return e[t];let[,r,a,o]=n;return Object.prototype.hasOwnProperty.call(e,r)?!e[r]&&a?o:e[r]:o}})),me=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.envReplace=void 0;var t=pe();Object.defineProperty(e,`envReplace`,{enumerable:!0,get:function(){return t.envReplace}})})),he=n((e=>{let t=r(`fs`),n=r(`path`),{envReplace:i}=me();e.envReplace=i,e.findPrefix=e=>{e=n.resolve(e);let r=!1;for(;n.basename(e)===`node_modules`;)e=n.dirname(e),r=!0;if(r)return e;let i=(e,r)=>{if(e===`/`||process.platform===`win32`&&/^[a-zA-Z]:(\\|\/)?$/.test(e))return r;try{let a=t.readdirSync(e);if(a.includes(`node_modules`)||a.includes(`package.json`)||a.includes(`package.json5`)||a.includes(`package.yaml`)||a.includes(`pnpm-workspace.yaml`))return e;let o=n.dirname(e);return o===e?r:i(o,r)}catch(t){if(e===r){if(t.code===`ENOENT`)return r;throw t}return r}};return i(e,e)},e.parseField=(e,t,r)=>{if(typeof t!=`string`)return t;let a=[].concat(e[r]),o=a.indexOf(n)!==-1,s=a.indexOf(Boolean)!==-1,c=a.indexOf(String)!==-1,l=a.indexOf(Number)!==-1;if(t=`${t}`.trim(),/^".*"$/.test(t))try{t=JSON.parse(t)}catch{throw Error(`Failed parsing JSON config key ${r}: ${t}`)}if(s&&!c&&t===``)return!0;switch(t){case`true`:return!0;case`false`:return!1;case`null`:return null;case`undefined`:return}return t=i(t,process.env),o&&((process.platform===`win32`?/^~(\/|\\)/:/^~\//).test(t)&&process.env.HOME&&(t=n.resolve(process.env.HOME,t.substr(2))),t=n.resolve(t)),l&&!isNaN(t)&&(t=Number(t)),t},e.parseKey=e=>typeof e==`string`?i(e,process.env):e})),ge=n((e=>{let t=r(`path`),n=r(`stream`).Stream,i=r(`url`),a=()=>{},o=()=>[],s=()=>{};e.types={access:[null,`restricted`,`public`],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,`dev`,`development`],audit:Boolean,"auth-type":[`legacy`,`sso`,`saml`,`oauth`],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:t,cache:t,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:[`always`,Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:t,"global-style":Boolean,group:[Number,String],"https-proxy":[null,i],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":t,"init-author-name":String,"init-author-email":String,"init-author-url":[``,i],"init-license":String,"init-version":s,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":o(),loglevel:[`silent`,`error`,`warn`,`notice`,`http`,`timing`,`info`,`verbose`,`silly`],logstream:n,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,s],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,`dev`,`development`,`prod`,`production`],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:t,production:Boolean,progress:Boolean,proxy:[null,!1,i],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,i],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,`auto`,`warn-only`],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,`oauth`,`saml`],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:t,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:t,umask:a,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}})),_e=n(((e,t)=>{let{readCAFileSync:n}=le(),i=r(`fs`),a=r(`path`),{ConfigChain:o}=de(),s=fe(),c=he();var l=class extends o{constructor(e,t){super(e),this.root=e,this._parseField=c.parseField.bind(null,t||ge())}add(e,t){try{for(let[t,n]of Object.entries(e)){let r=c.parseKey(t);r!==t&&delete e[t],e[r]=this._parseField(n,r)}}catch(e){throw e}return super.add(e,t)}addFile(e,t){t||=e;let n={__source__:t};this.sources[t]={path:e,type:`ini`},this.push(n),this._await();try{let t=i.readFileSync(e,`utf8`);this.addString(t,e,`ini`,n)}catch(t){if(t.code===`ENOENT`)this.add({},n);else if(t.code!==`EISDIR`)return`Issue while reading "${e}". ${t.message}`}}addEnv(e){e||=process.env;let t={};return Object.keys(e).filter(e=>/^npm_config_/i.test(e)).forEach(n=>{if(!e[n])return;let r=s(n.substr(11)),i=e[n];t[r]=u(r,i)}),super.addEnv(``,t,`env`)}loadPrefix(){let e=this.list[0];Object.defineProperty(this,`prefix`,{enumerable:!0,set:e=>{let t=this.get(`global`);this[t?`globalPrefix`:`localPrefix`]=e},get:()=>this.get(`global`)?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,`globalPrefix`,{enumerable:!0,set:e=>{this.set(`prefix`,e)},get:()=>a.resolve(this.get(`prefix`))});let t;if(Object.defineProperty(this,`localPrefix`,{enumerable:!0,set:e=>{t=e},get:()=>t}),Object.prototype.hasOwnProperty.call(e,`prefix`))t=a.resolve(e.prefix);else try{t=c.findPrefix(process.cwd())}catch(e){throw e}return t}loadCAFile(e){if(!e)return;let t=n(e);t&&this.set(`ca`,t)}loadUser(){let e=this.root;if(this.get(`global`))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}let t=a.resolve(this.get(`prefix`));try{e.user=i.statSync(t).uid}catch(e){if(e.code===`ENOENT`)return;throw e}}};function u(e,t){function n(e){return e.indexOf(`
|
|
9
4
|
|
|
10
5
|
`)?e.split(`
|
|
11
6
|
|
|
12
|
-
`):e.split(`,`)}switch(e){case`hoist-pattern`:case`public-hoist-pattern`:return n(t)}return t}t.exports=c})),Ae=A((e=>{let t=j(`os`),n=j(`path`),r=t.tmpdir(),i=process.getuid?process.getuid():process.pid,a=()=>!0,o=process.platform===`win32`,s={editor:()=>process.env.EDITOR||process.env.VISUAL||(o?`notepad.exe`:`vi`),shell:()=>o?process.env.COMSPEC||`cmd.exe`:process.env.SHELL||`/bin/bash`},c={fromString:()=>process.umask()},l=t.homedir();l?process.env.HOME=l:l=n.resolve(r,`npm-`+i);let u=process.platform===`win32`?`npm-cache`:`.npm`,d=process.platform===`win32`&&process.env.APPDATA||l,f=n.resolve(d,u),p,m;Object.defineProperty(e,`defaults`,{get:function(){return p||(process.env.PREFIX?m=process.env.PREFIX:process.platform===`win32`?m=n.dirname(process.execPath):(m=n.dirname(n.dirname(process.execPath)),process.env.DESTDIR&&(m=n.join(process.env.DESTDIR,m))),p={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":`legacy`,"bin-links":!0,browser:null,ca:null,cafile:null,cache:f,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:s.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:`git`,"git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:n.resolve(m,`etc`,`npmrc`),"global-style":!1,group:process.platform===`win32`?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:`npm`,"if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":n.resolve(l,`.npm-init.js`),"init-author-name":``,"init-author-email":``,"init-author-url":``,"init-version":`1.0.0`,"init-license":`ISC`,json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:`notice`,logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:`%s`,"metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:m,production:process.env.NODE_ENV===`production`,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":`npm/{npm-version} node/{node-version} {platform} {arch}`,"read-only":!1,"rebuild-bundle":!0,registry:`https://registry.npmjs.org/`,rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":`^`,"save-prod":!1,scope:``,"script-shell":null,"scripts-prepend-node-path":`warn-only`,searchopts:``,searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:s.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":`oauth`,"strict-ssl":!0,tag:`latest`,"tag-version-prefix":`v`,timing:!1,tmp:r,unicode:a(),"unsafe-perm":process.platform===`win32`||process.platform===`cygwin`||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform===`win32`?0:`nobody`,userconfig:n.resolve(l,`.npmrc`),umask:process.umask?process.umask():c.fromString(`022`),version:!1,versions:!1,viewer:process.platform===`win32`?`browser`:`man`,_exit:!0},p)}})})),je=A(((e,t)=>{let n=j(`path`),r=ke(),i=Ae();t.exports=(e,t,a)=>{let o=new r(Object.assign({},i.defaults,a),t);o.add(Object.assign({},e),`cli`);let s=[],c=!1;if(j.resolve.paths){let e=j.resolve.paths(`npm`),t;try{t=j.resolve(`npm`,{paths:e.slice(-1)})}catch{c=!0}t&&s.push(o.addFile(n.resolve(n.dirname(t),`..`,`npmrc`),`builtin`))}o.addEnv(),o.loadPrefix();let l=n.resolve(o.localPrefix,`.npmrc`),u=o.get(`userconfig`);if(!o.get(`global`)&&l!==u?s.push(o.addFile(l,`project`)):o.add({},`project`),o.get(`workspace-prefix`)&&o.get(`workspace-prefix`)!==l){let e=n.resolve(o.get(`workspace-prefix`),`.npmrc`);s.push(o.addFile(e,`workspace`))}if(s.push(o.addFile(o.get(`userconfig`),`user`)),o.get(`prefix`)){let e=n.resolve(o.get(`prefix`),`etc`);o.root.globalconfig=n.resolve(e,`npmrc`),o.root.globalignorefile=n.resolve(e,`npmignore`)}s.push(o.addFile(o.get(`globalconfig`),`global`)),o.loadUser();let d=o.get(`cafile`);return d&&o.loadCAFile(d),{config:o,warnings:s.filter(Boolean),failedToLoadBuiltInConfig:c}},Object.defineProperty(t.exports,`defaults`,{get(){return i.defaults},enumerable:!0})})),Me=A(((e,t)=>{let n=je();t.exports=function(){let e,t;arguments.length>=2?(e=arguments[0],t=Object.assign({},arguments[1])):typeof arguments[0]==`string`?e=arguments[0]:t=Object.assign({},arguments[0]),t||={};let r=t.npmrc;return t.npmrc=(t.npmrc?{config:{get:e=>r[e]}}:n()).config,e=e||t.npmrc.get(`registry`)||n.defaults.registry,i(e,t)||a(t.npmrc)};function r(e,t){let n=new URL(t,new URL(e.startsWith(`//`)?`./${e}`:e,`resolve://`));if(n.protocol===`resolve:`){let{pathname:e,search:t,hash:r}=n;return e+t+r}return n.toString()}function i(e,t){let n=e instanceof URL?e:new URL(e.startsWith(`//`)?`http:${e}`:e),a;for(;a!==`/`&&n.pathname!==a;){a=n.pathname||`/`;let c=s(`//`+n.host+a.replace(/\/$/,``),t.npmrc);if(c)return c;if(!t.recursive)return/\/$/.test(e)?void 0:i(new URL(`./`,n),t);n.pathname=r(o(a),`..`)||`/`}}function a(e){if(e.get(`_auth`))return{token:c(e.get(`_auth`)),type:`Basic`}}function o(e){return e[e.length-1]===`/`?e:e+`/`}function s(e,t){let n=l(t.get(e+`:_authToken`)||t.get(e+`/:_authToken`));if(n)return n;let r=u(t.get(e+`:username`)||t.get(e+`/:username`),t.get(e+`:_password`)||t.get(e+`/:_password`));if(r)return r;let i=d(t.get(e+`:_auth`)||t.get(e+`/:_auth`));if(i)return i}function c(e){return e.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function l(e){if(e)return{token:c(e),type:`Bearer`}}function u(e,t){if(!e||!t)return;let n=Buffer.from(c(t),`base64`).toString(`utf8`);return{token:Buffer.from(e+`:`+n,`utf8`).toString(`base64`),type:`Basic`,password:n,username:e}}function d(e){if(e)return{token:c(e),type:`Basic`}}}));function Ne(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function Pe(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
|
|
13
|
-
|
|
14
|
-
`))}return i}var M=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=Ne(t.toml,t.ptr),i=Pe(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}};function Fe(e,t){let n=0;for(;e[t-++n]===`\\`;);return--n&&n%2}function N(e,t=0,n=e.length){let r=e.indexOf(`
|
|
15
|
-
`,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}function Ie(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
|
|
16
|
-
`)return n;if(r===`\r`&&e[n+1]===`
|
|
17
|
-
`)return n+1;if(r<` `&&r!==` `||r===``)throw new M(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function P(e,t,n,r){let i;for(;(i=e[t])===` `||i===` `||!n&&(i===`
|
|
18
|
-
`||i===`\r`&&e[t+1]===`
|
|
19
|
-
`);)t++;return r||i!==`#`?t:P(e,Ie(e,t),n)}function Le(e,t,n,r,i=!1){if(!r)return t=N(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=N(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
|
|
20
|
-
`||t===`\r`&&e[a+1]===`
|
|
21
|
-
`))return a}throw new M(`cannot find end of structure`,{toml:e,ptr:t})}function Re(e,t){let n=e[t],r=n===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):n;t+=r.length-1;do t=e.indexOf(r,++t);while(t>-1&&n!==`'`&&Fe(e,t));return t>-1&&(t+=r.length,r.length>1&&(e[t]===n&&t++,e[t]===n&&t++)),t}let ze=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;var Be=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(ze);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}};let Ve=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,He=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Ue=/^[+-]?0[0-9_]/,We=/^[0-9a-f]{4,8}$/i,Ge={b:`\b`,t:` `,n:`
|
|
22
|
-
`,f:`\f`,r:`\r`,'"':`"`,"\\":`\\`};function Ke(e,t=0,n=e.length){let r=e[t]===`'`,i=e[t++]===e[t]&&e[t]===e[t+1];i&&(n-=2,e[t+=2]===`\r`&&t++,e[t]===`
|
|
23
|
-
`&&t++);let a=0,o,s=``,c=t;for(;t<n-1;){let n=e[t++];if(n===`
|
|
24
|
-
`||n===`\r`&&e[t]===`
|
|
25
|
-
`){if(!i)throw new M(`newlines are not allowed in strings`,{toml:e,ptr:t-1})}else if(n<` `&&n!==` `||n===``)throw new M(`control characters are not allowed in strings`,{toml:e,ptr:t-1});if(o){if(o=!1,n===`u`||n===`U`){let r=e.slice(t,t+=n===`u`?4:8);if(!We.test(r))throw new M(`invalid unicode escape`,{toml:e,ptr:a});try{s+=String.fromCodePoint(parseInt(r,16))}catch{throw new M(`invalid unicode escape`,{toml:e,ptr:a})}}else if(i&&(n===`
|
|
26
|
-
`||n===` `||n===` `||n===`\r`)){if(t=P(e,t-1,!0),e[t]!==`
|
|
27
|
-
`&&e[t]!==`\r`)throw new M(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:a});t=P(e,t)}else if(n in Ge)s+=Ge[n];else throw new M(`unrecognized escape sequence`,{toml:e,ptr:a});c=t}else !r&&n===`\\`&&(a=t-1,o=!0,s+=e.slice(c,a))}return s+e.slice(c,n-1)}function qe(e,t,n,r){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return r?0n:0;let i=Ve.test(e);if(i||He.test(e)){if(Ue.test(e))throw new M(`leading zeroes are not allowed`,{toml:t,ptr:n});e=e.replace(/_/g,``);let a=+e;if(isNaN(a))throw new M(`invalid number`,{toml:t,ptr:n});if(i){if((i=!Number.isSafeInteger(a))&&!r)throw new M(`integer value cannot be represented losslessly`,{toml:t,ptr:n});(i||r===!0)&&(a=BigInt(e))}return a}let a=new Be(e);if(!a.isValid())throw new M(`invalid value`,{toml:t,ptr:n});return a}function Je(e,t,n,r){let i=e.slice(t,n),a=i.indexOf(`#`);a>-1&&(Ie(e,a),i=i.slice(0,a));let o=i.trimEnd();if(!r){let n=i.indexOf(`
|
|
28
|
-
`,o.length);if(n>-1)throw new M(`newlines are not allowed in inline tables`,{toml:e,ptr:t+n})}return[o,a]}function Ye(e,t,n,r,i){if(r===0)throw new M(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let a=e[t];if(a===`[`||a===`{`){let[o,s]=a===`[`?$e(e,t,r,i):Qe(e,t,r,i),c=n?Le(e,s,`,`,n):s;if(s-c&&n===`}`){let t=N(e,s,c);if(t>-1)throw new M(`newlines are not allowed in inline tables`,{toml:e,ptr:t})}return[o,c]}let o;if(a===`"`||a===`'`){o=Re(e,t);let r=Ke(e,t,o);if(n){if(o=P(e,o,n!==`]`),e[o]&&e[o]!==`,`&&e[o]!==n&&e[o]!==`
|
|
29
|
-
`&&e[o]!==`\r`)throw new M(`unexpected character encountered`,{toml:e,ptr:o});o+=+(e[o]===`,`)}return[r,o]}o=Le(e,t,`,`,n);let s=Je(e,t,o-+(e[o-1]===`,`),n===`]`);if(!s[0])throw new M(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return n&&s[1]>-1&&(o=P(e,t+s[1]),o+=+(e[o]===`,`)),[qe(s[0],e,t,i),o]}let Xe=/^[a-zA-Z0-9-_]+[ \t]*$/;function Ze(e,t,n=`=`){let r=t-1,i=[],a=e.indexOf(n,t);if(a<0)throw new M(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++r];if(o!==` `&&o!==` `)if(o===`"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new M(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let s=Re(e,t);if(s<0)throw new M(`unfinished string encountered`,{toml:e,ptr:t});r=e.indexOf(`.`,s);let c=e.slice(s,r<0||r>a?a:r),l=N(c);if(l>-1)throw new M(`newlines are not allowed in keys`,{toml:e,ptr:t+r+l});if(c.trimStart())throw new M(`found extra tokens after the string part`,{toml:e,ptr:s});if(a<s&&(a=e.indexOf(n,s),a<0))throw new M(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});i.push(Ke(e,t,s))}else{r=e.indexOf(`.`,t);let n=e.slice(t,r<0||r>a?a:r);if(!Xe.test(n))throw new M(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});i.push(n.trimEnd())}}while(r+1&&r<a);return[i,P(e,a+1,!0,!0)]}function Qe(e,t,n,r){let i={},a=new Set,o,s=0;for(t++;(o=e[t++])!==`}`&&o;){let c={toml:e,ptr:t-1};if(o===`
|
|
30
|
-
`)throw new M(`newlines are not allowed in inline tables`,c);if(o===`#`)throw new M(`inline tables cannot contain comments`,c);if(o===`,`)throw new M(`expected key-value, found comma`,c);if(o!==` `&&o!==` `){let o,c=i,l=!1,[u,d]=Ze(e,t-1);for(let n=0;n<u.length;n++){if(n&&(c=l?c[o]:c[o]={}),o=u[n],(l=Object.hasOwn(c,o))&&(typeof c[o]!=`object`||a.has(c[o])))throw new M(`trying to redefine an already defined value`,{toml:e,ptr:t});!l&&o===`__proto__`&&Object.defineProperty(c,o,{enumerable:!0,configurable:!0,writable:!0})}if(l)throw new M(`trying to redefine an already defined value`,{toml:e,ptr:t});let[f,p]=Ye(e,d,`}`,n-1,r);a.add(f),c[o]=f,t=p,s=e[t-1]===`,`?t-1:0}}if(s)throw new M(`trailing commas are not allowed in inline tables`,{toml:e,ptr:s});if(!o)throw new M(`unfinished table encountered`,{toml:e,ptr:t});return[i,t]}function $e(e,t,n,r){let i=[],a;for(t++;(a=e[t++])!==`]`&&a;)if(a===`,`)throw new M(`expected value, found comma`,{toml:e,ptr:t-1});else if(a===`#`)t=Ie(e,t);else if(a!==` `&&a!==` `&&a!==`
|
|
31
|
-
`&&a!==`\r`){let a=Ye(e,t-1,`]`,n-1,r);i.push(a[0]),t=a[1]}if(!a)throw new M(`unfinished array encountered`,{toml:e,ptr:t});return[i,t]}function et(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function tt(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=P(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=Ze(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new M(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=et(n[0],r,i,t?2:1);if(!c)throw new M(`trying to redefine an already defined table or value`,{toml:e,ptr:s});o=c[2],a=c[1],s=n[1]}else{let r=Ze(e,s),i=et(r[0],a,o,0);if(!i)throw new M(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=Ye(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=P(e,s,!0),e[s]&&e[s]!==`
|
|
32
|
-
`&&e[s]!==`\r`)throw new M(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=P(e,s)}return r}var nt=A(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),rt=A(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),F=A(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=nt(),a=rt();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),it=A(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),at=A(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),I=A(((e,t)=>{let n=rt(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=nt(),{safeRe:a,t:o}=F(),s=it(),{compareIdentifiers:c}=at();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),L=A(((e,t)=>{let n=I();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),ot=A(((e,t)=>{let n=L();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),st=A(((e,t)=>{let n=L();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),ct=A(((e,t)=>{let n=I();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),lt=A(((e,t)=>{let n=L();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),ut=A(((e,t)=>{let n=I();t.exports=(e,t)=>new n(e,t).major})),dt=A(((e,t)=>{let n=I();t.exports=(e,t)=>new n(e,t).minor})),ft=A(((e,t)=>{let n=I();t.exports=(e,t)=>new n(e,t).patch})),pt=A(((e,t)=>{let n=L();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),R=A(((e,t)=>{let n=I();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),mt=A(((e,t)=>{let n=R();t.exports=(e,t,r)=>n(t,e,r)})),ht=A(((e,t)=>{let n=R();t.exports=(e,t)=>n(e,t,!0)})),gt=A(((e,t)=>{let n=I();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),_t=A(((e,t)=>{let n=gt();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),vt=A(((e,t)=>{let n=gt();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),z=A(((e,t)=>{let n=R();t.exports=(e,t,r)=>n(e,t,r)>0})),yt=A(((e,t)=>{let n=R();t.exports=(e,t,r)=>n(e,t,r)<0})),bt=A(((e,t)=>{let n=R();t.exports=(e,t,r)=>n(e,t,r)===0})),xt=A(((e,t)=>{let n=R();t.exports=(e,t,r)=>n(e,t,r)!==0})),St=A(((e,t)=>{let n=R();t.exports=(e,t,r)=>n(e,t,r)>=0})),Ct=A(((e,t)=>{let n=R();t.exports=(e,t,r)=>n(e,t,r)<=0})),wt=A(((e,t)=>{let n=bt(),r=xt(),i=z(),a=St(),o=yt(),s=Ct();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),Tt=A(((e,t)=>{let n=I(),r=L(),{safeRe:i,t:a}=F();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),Et=A(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),B=A(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,O(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>D(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(k(this.set[t],e,this.options))return!0;return!1}};let r=new(Et()),i=it(),a=Dt(),o=rt(),s=I(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=F(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=nt(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=S(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=w(e,t),o(`xrange`,e),e=E(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(` `),C=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},w=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>T(e,t)).join(` `)),T=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},E=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),D=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),O=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),k=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),Dt=A(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=it(),{safeRe:i,t:a}=F(),o=wt(),s=rt(),c=I(),l=B()})),Ot=A(((e,t)=>{let n=B();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),kt=A(((e,t)=>{let n=B();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),At=A(((e,t)=>{let n=I(),r=B();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),jt=A(((e,t)=>{let n=I(),r=B();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),Mt=A(((e,t)=>{let n=I(),r=B(),i=z();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),Nt=A(((e,t)=>{let n=B();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),Pt=A(((e,t)=>{let n=I(),r=Dt(),{ANY:i}=r,a=B(),o=Ot(),s=z(),c=yt(),l=Ct(),u=St();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),Ft=A(((e,t)=>{let n=Pt();t.exports=(e,t,r)=>n(e,t,`>`,r)})),It=A(((e,t)=>{let n=Pt();t.exports=(e,t,r)=>n(e,t,`<`,r)})),Lt=A(((e,t)=>{let n=B();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),Rt=A(((e,t)=>{let n=Ot(),r=R();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),zt=A(((e,t)=>{let n=B(),r=Dt(),{ANY:i}=r,a=Ot(),o=R(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),V=A(((e,t)=>{let n=F(),r=nt(),i=I(),a=at();t.exports={parse:L(),valid:ot(),clean:st(),inc:ct(),diff:lt(),major:ut(),minor:dt(),patch:ft(),prerelease:pt(),compare:R(),rcompare:mt(),compareLoose:ht(),compareBuild:gt(),sort:_t(),rsort:vt(),gt:z(),lt:yt(),eq:bt(),neq:xt(),gte:St(),lte:Ct(),cmp:wt(),coerce:Tt(),Comparator:Dt(),Range:B(),satisfies:Ot(),toComparators:kt(),maxSatisfying:At(),minSatisfying:jt(),minVersion:Mt(),validRange:Nt(),outside:Pt(),gtr:Ft(),ltr:It(),intersects:Lt(),simplifyRange:Rt(),subset:zt(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}))(),Bt=ne(Me(),1),Vt=ne(he(),1);const Ht=[[1e3,6e4,`sec`],[6e4,36e5,`min`],[36e5,864e5,`hour`],[864e5,6048e5,`day`],[6048e5,2628e6,`week`],[2628e6,31536e6,`month`],[31536e6,1/0,`year`]],Ut={"1 day ago":`yesterday`,"1 week ago":`last week`,"1 month ago":`last month`,"1 year ago":`last year`,"in 1 day":`tomorrow`,"in 1 week":`next week`,"in 1 month":`next month`,"in 1 year":`next year`},Wt={sec:`second`,min:`minute`};function Gt(e){return e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e}function Kt(e,{now:t,noAffix:n=!1,times:r=Ht,nowThreshold:i=2e3,nowString:a=`now`,unknownString:o=``,aliases:s=!1,aliasesMap:c=Ut,longUnits:l=!1}={}){let u=Gt(e);if(t=t===void 0?Date.now():Gt(t),Number.isNaN(u))return o||String(e);let d=!1,f=t-u;if(f<0&&(d=!0,f=Math.abs(f)),f<i)return a;let p=0,m=``;for(let e=0,t=r.length;e<t;e++){let t=r[e];if(!(f>=t[1])){p=Math.floor(f/t[0]),m=(l&&Wt[t[2]]||t[2])+(p>1?`s`:``);break}}let h=`${d&&!n?`in `:``}${p} ${m}${!d&&!n?` ago`:``}`;return s?c[h]??h:h}function qt(e){let t=[];for(let n of e){let[e,r]=n.replaceAll(/\s+/g,``).split(/[<>=~]+/);e&&/^[0-9.a-z]+$/.test(r)&&t.push({name:e,version:r})}return t}const Jt=[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`,`resolutions`,`packageManager`],Yt=[`node`,`deno`,`bun`],Xt=[`tool.poetry.dependencies`,`tool.poetry.dev-dependencies`,`tool.poetry.test-dependencies`,`tool.poetry.group.dev.dependencies`,`tool.poetry.group.test.dependencies`],Zt=[`project.dependencies`,`project.optional-dependencies`,`dependency-groups.dev`,`dependency-groups.lint`,`dependency-groups.test`],Qt=[`deps`];(await import(`node:util`)).inspect.defaultOptions.depth=4;const $t=C?.()??w().length??4;s?.uv&&$t>4&&(n.UV_THREADPOOL_SIZE=String($t));const en=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,tn=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,nn=/^[0-9a-f]{7,}$/i,rn=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,an=/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,H=e=>e.replace(/[|\\{}()[\]^$+*?.-]/g,`\\$&`),U=e=>e.endsWith(`/`)?e.substring(0,e.length-1):e,on=le||`0.0.0`,sn={"package.json":`npm`,"pyproject.toml":`pypi`,"go.mod":`go`},cn={"allow-downgrade":{short:`d`,type:`string`,multiple:!0},"error-on-outdated":{short:`E`,type:`boolean`},"error-on-unchanged":{short:`U`,type:`boolean`},exclude:{short:`e`,type:`string`,multiple:!0},file:{short:`f`,type:`string`,multiple:!0},githubapi:{type:`string`},greatest:{short:`g`,type:`string`,multiple:!0},help:{short:`h`,type:`boolean`},include:{short:`i`,type:`string`,multiple:!0},json:{short:`j`,type:`boolean`},cooldown:{short:`C`,type:`string`},minor:{short:`m`,type:`string`,multiple:!0},modes:{short:`M`,type:`string`,multiple:!0},color:{short:`c`,type:`boolean`},"no-color":{short:`n`,type:`boolean`},patch:{short:`P`,type:`string`,multiple:!0},prerelease:{short:`p`,type:`string`,multiple:!0},pypiapi:{type:`string`},registry:{short:`r`,type:`string`},release:{short:`R`,type:`string`,multiple:!0},sockets:{short:`s`,type:`string`},types:{short:`t`,type:`string`,multiple:!0},update:{short:`u`,type:`boolean`},verbose:{short:`V`,type:`boolean`},version:{short:`v`,type:`boolean`}};function W(e){return Array.isArray(e)&&e.every(e=>e===!0)?!0:Array.isArray(e)?new Set(e.flatMap(e=>typeof e==`string`?Sn(e):``).filter(Boolean)):typeof e==`string`?new Set([e]):typeof e==`boolean`?e:!1}function ln(e){for(let[t,{short:n}]of Object.entries(cn))if(t===e||n===e)return t;return``}const G=_({strict:!1,allowPositionals:!0,tokens:!0,options:cn});for(let[e,t]of G.tokens.entries())if(t.kind===`option`&&t.value?.startsWith(`-`)){let n=ln(t.value.substring(1)),r=G.tokens[e+1];G.values[t.name]=[!0],G.values[n]||(G.values[n]=[]),r.kind===`positional`&&r.value?G.values[n].push(r.value):G.values[n].push(!0)}const K=G.values,[un,q,dn]=[`magenta`,`red`,`green`].map(e=>K[`no-color`]?String:t=>y(e,String(t))),J=$(W(K.greatest)),fn=$(W(K.prerelease)),pn=$(W(K.release)),mn=$(W(K.patch)),hn=$(W(K.minor)),gn=$(W(K[`allow-downgrade`])),_n=W(K.modes)||new Set([`npm`,`pypi`]),vn=typeof K.githubapi==`string`?U(K.githubapi):`https://api.github.com`,yn=typeof K.pypiapi==`string`?U(K.pypiapi):`https://pypi.org`,Y=e=>e.replace(/^v/,``);function X(e,t){for(let n of t instanceof Set?t:[])if(n.test(e))return!0;return!1}function bn(e,t){let n=t[`${e}:registry`]||t.registry;return n.endsWith(`/`)?n:`${n}/`}function xn(e,t){return t.split(`.`).reduce((e,t)=>e?.[t]??null,e)}function Sn(e){return e.split(`,`).filter(Boolean)}function Cn(e,t){let n=u(t,e);try{return f(n),n}catch{}let r=l(t);return r===t?null:Cn(e,r)}function wn(e,t,n,r){if(e.startsWith(`@`)){let i=(/@[a-z0-9][\w-.]+/.exec(e)||[``])[0],a=U(bn(i,r));if(a!==t)try{let e=(0,Bt.default)(a,n);if(e?.token)return{auth:e,registry:a}}catch{}return{auth:(0,Bt.default)(t,n),registry:t}}else return{auth:(0,Bt.default)(t,n),registry:t}}function Tn(e,t,n){return{...Object.keys(e).length&&{agentOpts:e},headers:{"user-agent":`updates/${on}`,...n&&{Authorization:`${t} ${n}`}}}}function En(){let e=new Date;return[e.getFullYear(),`-`,String(e.getMonth()+1).padStart(2,`0`),`-`,String(e.getDate()).padStart(2,`0`),` `,String(e.getHours()).padStart(2,`0`),`:`,String(e.getMinutes()).padStart(2,`0`),`:`,String(e.getSeconds()).padStart(2,`0`)].join(``)}function Dn(e){console.error(`${En()} ${e}`)}async function On(e,t){K.verbose&&Dn(`${un(`fetch`)} ${e}`);let n=await fetch(e,t);return K.verbose&&Dn(`${n.ok?dn(n.status):q(n.status)} ${e}`),n}async function kn(e,t,n,r,i,a){let{auth:o,registry:s}=wn(e,n,i,a),l=`${s}/${(t===`resolutions`?c(e):e).replace(/\//g,`%2f`)}`,u=await On(l,Tn(r,o?.type,o?.token));if(u?.ok)return[await u.json(),t,s,e];throw u?.status&&u?.statusText?Error(`Received ${u.status} ${u.statusText} from ${l}`):Error(`Unable to fetch ${e} from ${s}`)}async function An(e,t,n){let r=`${yn}/pypi/${e}/json`,i=await On(r,Tn(n));if(i?.ok)return[await i.json(),t,null,e];throw i?.status&&i?.statusText?Error(`Received ${i.status} ${i.statusText} from ${r}`):Error(`Unable to fetch ${e} from ${yn}`)}function jn(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)}function Mn(e,t){let n=`[${b(`go`,[`list`,`-u`,`-mod=readonly`,`-json`,`-m`,...Object.keys(e.go).map(e=>e.split(`\0`)[1])],{stdio:`pipe`,encoding:`utf8`,cwd:t}).replaceAll(`${S}}`,`${S}},`)}]`.replaceAll(`},${S}]`,`}${S}]`),r=[];for(let{Main:e,Indirect:t,Version:i,Update:a,Path:o,Time:s}of JSON.parse(n))e||t||r.push([{old:i,new:a?.Version||i,Time:a?.Time||s},`deps`,null,o]);return r}function Nn(e){return e=e.replace(`git@`,``).replace(/.+?\/\//,`https://`).replace(/\.git$/,``),/^[a-z]+:[a-z0-9-]\/[a-z0-9-]$/.test(e)?e.replace(/^(.+?):/,(e,t)=>`https://${t}.com/`):/^[a-z0-9-]\/[a-z0-9-]$/.test(e)?`https://github.com/${e}`:e}function Pn(e){return e.startsWith(`https://bitbucket.org`)?`src/HEAD`:`tree/HEAD`}function Fn({repository:e,homepage:t,info:n},r,i){n&&(e=n.project_urls.repository||n.project_urls.Repository||n.project_urls.repo||n.project_urls.Repo||n.project_urls.source||n.project_urls.Source||n.project_urls[`source code`]||n.project_urls[`Source code`]||n.project_urls[`Source Code`]||n.project_urls.homepage||n.project_urls.Homepage||`https://pypi.org/project/${i}/`);let a=``;return r===`https://npm.pkg.github.com`?`https://github.com/${i.replace(/^@/,``)}`:(e&&(a=Nn(typeof e==`string`?e:e.url),a&&typeof e!=`string`&&e.directory&&(a=`${a}/${Pn(a)}/${e.directory}`)),a||t||``)}async function In(e){console.info(K.json?JSON.stringify({message:e}):e),await Z()}async function Z(e,t){if(e){let t=e.stack??e.message,n=e.cause;K.json?console.info(JSON.stringify({error:t,cause:n})):(console.info(q(t)),n&&console.info(q(`Caused by: ${n}`)))}i===`win32`&&Number(s?.node?.split(`.`)[0])>=23&&await new Promise(e=>setTimeout(e,50)),r(t||e?1:0)}function Ln(e={}){for(let t of Object.keys(e))for(let n of Object.values(e[t]))typeof n.oldPrint==`string`&&(n.old=n.oldPrint),typeof n.newPrint==`string`&&(n.new=n.newPrint),typeof n.oldOriginal==`string`&&(n.old=n.oldOriginal),delete n.oldPrint,delete n.newPrint,delete n.oldOriginal,delete n.date;let t=0;for(let n of Object.keys(e))t+=Object.keys(e[n]).length;if(K.json){let t={results:{}};for(let n of Object.keys(e))for(let[r,i]of Object.entries(e[n])){let[e,a]=r.split(`\0`);t.results[n]||(t.results[n]={}),t.results[n][e]||(t.results[n][e]={}),t.results[n][e][a]=i}console.info(JSON.stringify(t))}else t&&console.info(Un(e));return K[`error-on-outdated`]?t?2:0:K[`error-on-unchanged`]?t?0:2:0}function Rn(e,t){i===`win32`&&h(e,0),g(e,t,i===`win32`?{flag:`r+`}:void 0)}function zn(e,t,n){if(e===t)return e;let r=e.split(/\./),i=t.split(/\./),a=/^[0-9a-zA-Z-.]+$/,o=``;for(let e=0;e<r.length;e++)if(r[e]!==i[e]){a.test(r[e])?o+=n(r.slice(e).join(`.`)):o+=r[e].split(``).map(e=>a.test(e)?n(e):e).join(``)+n(`.${r.slice(e+1).join(`.`)}`.replace(/\.$/,``));break}else o+=`${r[e]}.`;return o.replace(/\.$/,``)}const Bn=e=>v(e).length;function Vn(e,t=` `){let n=``,r=Array(e[0].length).fill(0);for(let t of e)for(let[e,n]of t.entries()){let t=Bn(n);t>r[e]&&(r[e]=t)}for(let[i,a]of e.entries()){for(let[e,i]of a.entries()){e>0&&(n+=t);let o=` `.repeat(r[e]-Bn(i));n+=i+(e===a.length-1?``:o)}i<e.length-1&&(n+=`
|
|
33
|
-
`)}return n}function Hn(e){return/\/v[0-9]$/.test(e)&&(e=l(e)),e}function Un(e){let t=[[`NAME`,`OLD`,`NEW`,`AGE`,`INFO`]],n=new Set;for(let r of Object.keys(e))for(let[i,a]of Object.entries(e[r])){let e=i.split(`\0`)[1],o=`${r}|${e}`;n.has(o)||(n.add(o),t.push([r===`go`?Hn(e):e,zn(a.old,a.new,q),zn(a.new,a.old,dn),a.age||``,a.info||``]))}return Vn(t)}function Wn(e,t){let n=e;for(let[e,{old:r,oldOriginal:i}]of Object.entries(t)){let[a,o]=e.split(`\0`),s=i||r;if(a===`packageManager`){let r=RegExp(`"${H(a)}": *"${o}@${H(s)}"`,`g`);n=n.replace(r,`"${a}": "${o}@${t[e].new}"`)}else{let r=RegExp(`"${H(o)}": *"${H(s)}"`,`g`);n=n.replace(r,`"${o}": "${t[e].new}"`)}}return n}function Gn(e,t){let n=e;for(let[e,{old:r,oldOriginal:i}]of Object.entries(t)){let[a,o]=e.split(`\0`),s=i||r;n=n.replace(RegExp(`${H(o)} *= *"${H(s)}"`,`g`),`${o} = "${t[e].new}"`),n=n.replace(RegExp(`("${H(o)} *[<>=~]+ *)${H(s)}(")`,`g`),(n,r,i)=>`${r}${t[e].new}${i}`)}return n}function Kn(e,t,n){let r=e.replace(an,t);if(n&&n!==e&&/^[\^~]/.test(r)){let e=n.substring(1).split(`.`),t=r.substring(1).split(`.`);e.length!==t.length&&(r=`${r[0]}${t.slice(0,e.length).join(`.`)}`)}return r}function qn(e){let t=(0,V.parse)(e);return t?!!t.prerelease.length:!1}function Jn(e){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(e)}function Q(e){try{return(0,V.coerce)(e)?.version??``}catch{return``}}function Yn(e,t,{range:n,semvers:r,usePre:i,useRel:a,useGreatest:o}){let s=Q(n);if(!s)return s;i=Jn(n)||i,i&&(r.add(`prerelease`),r.has(`patch`)&&r.add(`prepatch`),r.has(`minor`)&&r.add(`preminor`),r.has(`major`)&&r.add(`premajor`));let c=0,l=s;for(let n of t){let t=(0,V.parse)(n);if(!t?.version||t.prerelease.length&&(!i||a))continue;let s=t.version,u=(0,V.diff)(l,s);if(!(!u||!r.has(u)))if(o||!(`time`in e))(0,V.gte)(Q(s),l)&&(l=s);else{let t=new Date(e.time[n]).getTime();t>=0&&t>c&&(l=s,c=t)}}return l||null}function Xn(e,{mode:t,range:n,useGreatest:r,useRel:i,usePre:a,semvers:o}){if(n===`*`||n.includes(`||`))return null;let s=[];if(t===`pypi`)s=Object.keys(e.releases).filter(e=>(0,V.valid)(e));else if(t===`npm`)s=Object.keys(e.versions).filter(e=>(0,V.valid)(e));else if(t===`go`)return e.new;let c=Yn(e,s,{range:n,semvers:o,usePre:a,useRel:i,useGreatest:r});if(!c)return null;if(r)return c;{let r=``,s=``;t===`pypi`?(s=e.info.version,r=Q(e.info.version)):r=e[`dist-tags`].latest;let l=Q(n),u=Jn(n),d=qn(c),f=qn(r),p=(0,V.gt)(c,l);if(!i&&a||u&&d||i&&!p&&u&&!d||u&&!d&&p)return c;if(u&&!d&&!p)return null;let m=(0,V.diff)(l,r);return m&&m!==`prerelease`&&!o.has(m.replace(/^pre/,``))||i&&qn(r)?c:(0,V.lt)(r,l)&&!f?gn===!0||X(e.name,gn)?r:null:s||r}}function Zn(e){let t={},r=n.UPDATES_GITHUB_API_TOKEN||n.GITHUB_API_TOKEN||n.GH_TOKEN||n.GITHUB_TOKEN||n.HOMEBREW_GITHUB_API_TOKEN;return r&&(t.headers={Authorization:`Bearer ${r}`}),On(e,t)}async function Qn(e,t){let n=await Zn(`${vn}/repos/${e}/${t}/commits`);if(!n?.ok)return{hash:``,commit:{}};let{sha:r,commit:i}=(await n.json())[0];return{hash:r,commit:i}}async function $n(e,t){let n=await Zn(`${vn}/repos/${e}/${t}/git/refs/tags`);return n?.ok?(await n.json()).map(e=>e.ref.replace(/^refs\/tags\//,``)):[]}function er(e,t,n){let r=Y(t);if(!(0,V.valid)(r))return null;if(n){let n=t,i=Y(t);for(let t of e){let e=Y(t);(0,V.valid)(e)&&(!n||(0,V.gt)(e,i))&&(n=t,i=e)}if((0,V.neq)(r,i))return n}else{let t=e.at(-1);if(!t)return null;let n=Y(t);if(!(0,V.valid)(n))return null;if((0,V.neq)(r,n))return t}return null}async function tr(e,t,n){let r=t.old.replace(en,``),[i,a,o,s]=tn.exec(r)||[];if(!a||!o||!s)return null;if(nn.test(s)){let{hash:n,commit:r}=await Qn(a,o);if(!n)return null;let i=r?.committer?.date??r?.author?.date,c=n.substring(0,s.length);if(s!==c)return{key:e,newRange:t.old.replace(s,c),user:a,repo:o,oldRef:s,newRef:c,newDate:i}}else{let t=er(await $n(a,o),s,n);if(t)return{key:e,newRange:t,user:a,repo:o,oldRef:s,newRef:t}}return null}function nr(e){return e.replace(/-.*/,``)}function rr(e){let t=e.match(rn);return t?.length===1?e.replace(rn,Q(t[0])):e}function ir(e){return Array.from(e.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}function ar(e){return Array.from(e.matchAll(/(----BEGIN [^]+?PRIVATE KEY----)/g),e=>e[0])}function or(e,t){return RegExp(`^${H(e).replaceAll(`\\*`,`.*`)}$`,t?`i`:``)}function sr(e,t,n){return t&&typeof e==`string`?/^\/.+\/$/.test(e)?new RegExp(e.slice(1,-1)):or(e,n):e instanceof RegExp?e:or(e,n)}function $(e){if(e instanceof Set){let t=new Set;for(let n of e)t.add(sr(n,!0,!1));return t}return e}function cr(e,t){let n=new Set;for(let t of e||[])n.add(sr(t,!0,!0));for(let e of t||[])n.add(sr(e,!1,!0));return n}function lr(e,t,n,r,i){if(i===`engines`&&Yt.includes(e)||t===`pypi`&&e===`python`)return!1;if(!n.size&&!r.size)return!0;for(let t of r)if(t.test(e))return!1;for(let t of n)if(t.test(e))return!0;return!n.size}function ur(e,t,n){return!e||!t?!0:(n-Date.parse(e))/(24*3600*1e3)>=t}function dr(e){let n=new Set,r=new Set;if(e)for(let t of e){let e;try{e=p(t)}catch(e){throw Error(`Unable to open ${t}: ${e.message}`)}if(e?.isFile()){let e=d(t);n.add(e),r.add(e)}else if(e?.isDirectory())for(let e of Object.keys(sn)){let r=u(t,e),i=null;try{i=p(r)}catch{}i?.isFile()&&n.add(d(r))}else throw Error(`${t} is neither a file nor directory`)}else for(let e of Object.keys(sn)){let r=Cn(e,t());r&&n.add(d(r))}return[n,r]}async function fr(e){let t=[];for(let e of[``,`.config/`])for(let n of[`js`,`ts`,`mjs`,`mts`])t.push(`${e}updates${e?``:`.config`}.${n}`);let n={};try{({default:n}=await Promise.any(t.map(t=>import(u(e,...t.split(`/`))))))}catch{}return n}async function pr(){for(let e of[o,a])e?._handle?.setBlocking?.(!0);let e=typeof K.sockets==`number`?K.sockets:96,{help:t,version:n,file:r,types:i,update:s}=K;t&&(o.write(`usage: updates [options]
|
|
7
|
+
`):e.split(`,`)}switch(e){case`hoist-pattern`:case`public-hoist-pattern`:return n(t)}return t}t.exports=l})),ve=n((e=>{let t=r(`os`),n=r(`path`),i=t.tmpdir(),a=process.getuid?process.getuid():process.pid,o=()=>!0,s=process.platform===`win32`,c={editor:()=>process.env.EDITOR||process.env.VISUAL||(s?`notepad.exe`:`vi`),shell:()=>s?process.env.COMSPEC||`cmd.exe`:process.env.SHELL||`/bin/bash`},l={fromString:()=>process.umask()},u=t.homedir();u?process.env.HOME=u:u=n.resolve(i,`npm-`+a);let d=process.platform===`win32`?`npm-cache`:`.npm`,f=process.platform===`win32`&&process.env.APPDATA||u,p=n.resolve(f,d),m,h;Object.defineProperty(e,`defaults`,{get:function(){return m||(process.env.PREFIX?h=process.env.PREFIX:process.platform===`win32`?h=n.dirname(process.execPath):(h=n.dirname(n.dirname(process.execPath)),process.env.DESTDIR&&(h=n.join(process.env.DESTDIR,h))),m={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":`legacy`,"bin-links":!0,browser:null,ca:null,cafile:null,cache:p,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:c.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:`git`,"git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:n.resolve(h,`etc`,`npmrc`),"global-style":!1,group:process.platform===`win32`?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:`npm`,"if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":n.resolve(u,`.npm-init.js`),"init-author-name":``,"init-author-email":``,"init-author-url":``,"init-version":`1.0.0`,"init-license":`ISC`,json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:`notice`,logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:`%s`,"metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:h,production:process.env.NODE_ENV===`production`,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":`npm/{npm-version} node/{node-version} {platform} {arch}`,"read-only":!1,"rebuild-bundle":!0,registry:`https://registry.npmjs.org/`,rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":`^`,"save-prod":!1,scope:``,"script-shell":null,"scripts-prepend-node-path":`warn-only`,searchopts:``,searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:c.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":`oauth`,"strict-ssl":!0,tag:`latest`,"tag-version-prefix":`v`,timing:!1,tmp:i,unicode:o(),"unsafe-perm":process.platform===`win32`||process.platform===`cygwin`||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform===`win32`?0:`nobody`,userconfig:n.resolve(u,`.npmrc`),umask:process.umask?process.umask():l.fromString(`022`),version:!1,versions:!1,viewer:process.platform===`win32`?`browser`:`man`,_exit:!0},m)}})})),ye=n(((e,t)=>{let n=r(`path`),i=_e(),a=ve();t.exports=(e,t,o)=>{let s=new i(Object.assign({},a.defaults,o),t);s.add(Object.assign({},e),`cli`);let c=[],l=!1;if(r.resolve.paths){let e=r.resolve.paths(`npm`),t;try{t=r.resolve(`npm`,{paths:e.slice(-1)})}catch{l=!0}t&&c.push(s.addFile(n.resolve(n.dirname(t),`..`,`npmrc`),`builtin`))}s.addEnv(),s.loadPrefix();let u=n.resolve(s.localPrefix,`.npmrc`),d=s.get(`userconfig`);if(!s.get(`global`)&&u!==d?c.push(s.addFile(u,`project`)):s.add({},`project`),s.get(`workspace-prefix`)&&s.get(`workspace-prefix`)!==u){let e=n.resolve(s.get(`workspace-prefix`),`.npmrc`);c.push(s.addFile(e,`workspace`))}if(c.push(s.addFile(s.get(`userconfig`),`user`)),s.get(`prefix`)){let e=n.resolve(s.get(`prefix`),`etc`);s.root.globalconfig=n.resolve(e,`npmrc`),s.root.globalignorefile=n.resolve(e,`npmignore`)}c.push(s.addFile(s.get(`globalconfig`),`global`)),s.loadUser();let f=s.get(`cafile`);return f&&s.loadCAFile(f),{config:s,warnings:c.filter(Boolean),failedToLoadBuiltInConfig:l}},Object.defineProperty(t.exports,`defaults`,{get(){return a.defaults},enumerable:!0})})),be=n(((e,t)=>{let n=ye();t.exports=function(){let e,t;arguments.length>=2?(e=arguments[0],t=Object.assign({},arguments[1])):typeof arguments[0]==`string`?e=arguments[0]:t=Object.assign({},arguments[0]),t||={};let r=t.npmrc;return t.npmrc=(t.npmrc?{config:{get:e=>r[e]}}:n()).config,e=e||t.npmrc.get(`registry`)||n.defaults.registry,i(e,t)||a(t.npmrc)};function r(e,t){let n=new URL(t,new URL(e.startsWith(`//`)?`./${e}`:e,`resolve://`));if(n.protocol===`resolve:`){let{pathname:e,search:t,hash:r}=n;return e+t+r}return n.toString()}function i(e,t){let n=e instanceof URL?e:new URL(e.startsWith(`//`)?`http:${e}`:e),a;for(;a!==`/`&&n.pathname!==a;){a=n.pathname||`/`;let c=s(`//`+n.host+a.replace(/\/$/,``),t.npmrc);if(c)return c;if(!t.recursive)return/\/$/.test(e)?void 0:i(new URL(`./`,n),t);n.pathname=r(o(a),`..`)||`/`}}function a(e){if(e.get(`_auth`))return{token:c(e.get(`_auth`)),type:`Basic`}}function o(e){return e[e.length-1]===`/`?e:e+`/`}function s(e,t){let n=l(t.get(e+`:_authToken`)||t.get(e+`/:_authToken`));if(n)return n;let r=u(t.get(e+`:username`)||t.get(e+`/:username`),t.get(e+`:_password`)||t.get(e+`/:_password`));if(r)return r;let i=d(t.get(e+`:_auth`)||t.get(e+`/:_auth`));if(i)return i}function c(e){return e.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function l(e){if(e)return{token:c(e),type:`Bearer`}}function u(e,t){if(!e||!t)return;let n=Buffer.from(c(t),`base64`).toString(`utf8`);return{token:Buffer.from(e+`:`+n,`utf8`).toString(`base64`),type:`Basic`,password:n,username:e}}function d(e){if(e)return{token:c(e),type:`Basic`}}})),j=n(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),M=n(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),N=n(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=j(),a=M();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),xe=n(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),Se=n(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),P=n(((e,t)=>{let n=M(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=j(),{safeRe:a,t:o}=N(),s=xe(),{compareIdentifiers:c}=Se();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),F=n(((e,t)=>{let n=P();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),Ce=n(((e,t)=>{let n=F();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),we=n(((e,t)=>{let n=F();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),Te=n(((e,t)=>{let n=P();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),Ee=n(((e,t)=>{let n=F();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),De=n(((e,t)=>{let n=P();t.exports=(e,t)=>new n(e,t).major})),Oe=n(((e,t)=>{let n=P();t.exports=(e,t)=>new n(e,t).minor})),ke=n(((e,t)=>{let n=P();t.exports=(e,t)=>new n(e,t).patch})),Ae=n(((e,t)=>{let n=F();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),I=n(((e,t)=>{let n=P();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),je=n(((e,t)=>{let n=I();t.exports=(e,t,r)=>n(t,e,r)})),Me=n(((e,t)=>{let n=I();t.exports=(e,t)=>n(e,t,!0)})),Ne=n(((e,t)=>{let n=P();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),Pe=n(((e,t)=>{let n=Ne();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),Fe=n(((e,t)=>{let n=Ne();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),Ie=n(((e,t)=>{let n=I();t.exports=(e,t,r)=>n(e,t,r)>0})),Le=n(((e,t)=>{let n=I();t.exports=(e,t,r)=>n(e,t,r)<0})),Re=n(((e,t)=>{let n=I();t.exports=(e,t,r)=>n(e,t,r)===0})),ze=n(((e,t)=>{let n=I();t.exports=(e,t,r)=>n(e,t,r)!==0})),Be=n(((e,t)=>{let n=I();t.exports=(e,t,r)=>n(e,t,r)>=0})),Ve=n(((e,t)=>{let n=I();t.exports=(e,t,r)=>n(e,t,r)<=0})),He=n(((e,t)=>{let n=Re(),r=ze(),i=Ie(),a=Be(),o=Le(),s=Ve();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),Ue=n(((e,t)=>{let n=P(),r=F(),{safeRe:i,t:a}=N();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),We=n(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),L=n(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,O(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>D(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(k(this.set[t],e,this.options))return!0;return!1}};let r=new(We()),i=xe(),a=R(),o=M(),s=P(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=N(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=j(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=S(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=w(e,t),o(`xrange`,e),e=E(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(` `),C=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},w=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>T(e,t)).join(` `)),T=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},E=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),D=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),O=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),k=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),R=n(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=xe(),{safeRe:i,t:a}=N(),o=He(),s=M(),c=P(),l=L()})),z=n(((e,t)=>{let n=L();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),Ge=n(((e,t)=>{let n=L();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),Ke=n(((e,t)=>{let n=P(),r=L();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),qe=n(((e,t)=>{let n=P(),r=L();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),Je=n(((e,t)=>{let n=P(),r=L(),i=Ie();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),Ye=n(((e,t)=>{let n=L();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),Xe=n(((e,t)=>{let n=P(),r=R(),{ANY:i}=r,a=L(),o=z(),s=Ie(),c=Le(),l=Ve(),u=Be();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),Ze=n(((e,t)=>{let n=Xe();t.exports=(e,t,r)=>n(e,t,`>`,r)})),Qe=n(((e,t)=>{let n=Xe();t.exports=(e,t,r)=>n(e,t,`<`,r)})),$e=n(((e,t)=>{let n=L();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),et=n(((e,t)=>{let n=z(),r=I();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),tt=n(((e,t)=>{let n=L(),r=R(),{ANY:i}=r,a=z(),o=I(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),B=n(((e,t)=>{let n=N(),r=j(),i=P(),a=Se();t.exports={parse:F(),valid:Ce(),clean:we(),inc:Te(),diff:Ee(),major:De(),minor:Oe(),patch:ke(),prerelease:Ae(),compare:I(),rcompare:je(),compareLoose:Me(),compareBuild:Ne(),sort:Pe(),rsort:Fe(),gt:Ie(),lt:Le(),eq:Re(),neq:ze(),gte:Be(),lte:Ve(),cmp:He(),coerce:Ue(),Comparator:R(),Range:L(),satisfies:z(),toComparators:Ge(),maxSatisfying:Ke(),minSatisfying:qe(),minVersion:Je(),validRange:Ye(),outside:Xe(),gtr:Ze(),ltr:Qe(),intersects:$e(),simplifyRange:et(),subset:tt(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}))(),nt=e(be(),1);const rt=[[1e3,6e4,`sec`],[6e4,36e5,`min`],[36e5,864e5,`hour`],[864e5,6048e5,`day`],[6048e5,2628e6,`week`],[2628e6,31536e6,`month`],[31536e6,1/0,`year`]],it={"1 day ago":`yesterday`,"1 week ago":`last week`,"1 month ago":`last month`,"1 year ago":`last year`,"in 1 day":`tomorrow`,"in 1 week":`next week`,"in 1 month":`next month`,"in 1 year":`next year`},at={sec:`second`,min:`minute`};function ot(e){return e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e}function st(e,{now:t,noAffix:n=!1,times:r=rt,nowThreshold:i=2e3,nowString:a=`now`,unknownString:o=``,aliases:s=!1,aliasesMap:c=it,longUnits:l=!1}={}){let u=ot(e);if(t=t===void 0?Date.now():ot(t),Number.isNaN(u))return o||String(e);let d=!1,f=t-u;if(f<0&&(d=!0,f=Math.abs(f)),f<i)return a;let p=0,m=``;for(let e=0,t=r.length;e<t;e++){let t=r[e];if(!(f>=t[1])){p=Math.floor(f/t[0]),m=(l&&at[t[2]]||t[2])+(p>1?`s`:``);break}}let h=`${d&&!n?`in `:``}${p} ${m}${!d&&!n?` ago`:``}`;return s?c[h]??h:h}function ct(e){let t=[];for(let n of e){let[e,r]=n.replaceAll(/\s+/g,``).split(/[<>=~]+/);e&&/^[0-9.a-z]+$/.test(r)&&t.push({name:e,version:r})}return t}const lt=[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`,`resolutions`,`packageManager`],ut=[`node`,`deno`,`bun`],dt=[`tool.poetry.dependencies`,`tool.poetry.dev-dependencies`,`tool.poetry.test-dependencies`,`tool.poetry.group.dev.dependencies`,`tool.poetry.group.test.dependencies`],ft=[`project.dependencies`,`project.optional-dependencies`,`dependency-groups.dev`,`dependency-groups.lint`,`dependency-groups.test`],pt=[`deps`],mt=E?.()??D().length??4;d?.uv&&mt>4&&(o.UV_THREADPOOL_SIZE=String(mt));const ht=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,gt=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,_t=/^[0-9a-f]{7,}$/i,vt=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,yt=/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,V=e=>e.replace(/[|\\{}()[\]^$+*?.-]/g,`\\$&`),H=e=>e.endsWith(`/`)?e.substring(0,e.length-1):e,bt=re||`0.0.0`,xt={"package.json":`npm`,"pyproject.toml":`pypi`,"go.mod":`go`},St={"allow-downgrade":{short:`d`,type:`string`,multiple:!0},"error-on-outdated":{short:`E`,type:`boolean`},"error-on-unchanged":{short:`U`,type:`boolean`},exclude:{short:`e`,type:`string`,multiple:!0},file:{short:`f`,type:`string`,multiple:!0},githubapi:{type:`string`},greatest:{short:`g`,type:`string`,multiple:!0},help:{short:`h`,type:`boolean`},include:{short:`i`,type:`string`,multiple:!0},json:{short:`j`,type:`boolean`},cooldown:{short:`C`,type:`string`},minor:{short:`m`,type:`string`,multiple:!0},modes:{short:`M`,type:`string`,multiple:!0},color:{short:`c`,type:`boolean`},"no-color":{short:`n`,type:`boolean`},patch:{short:`P`,type:`string`,multiple:!0},prerelease:{short:`p`,type:`string`,multiple:!0},pypiapi:{type:`string`},registry:{short:`r`,type:`string`},release:{short:`R`,type:`string`,multiple:!0},sockets:{short:`s`,type:`string`},types:{short:`t`,type:`string`,multiple:!0},update:{short:`u`,type:`boolean`},verbose:{short:`V`,type:`boolean`},version:{short:`v`,type:`boolean`}};function U(e){return Array.isArray(e)&&e.every(e=>e===!0)?!0:Array.isArray(e)?new Set(e.flatMap(e=>typeof e==`string`?It(e):``).filter(Boolean)):typeof e==`string`?new Set([e]):typeof e==`boolean`?e:!1}function Ct(e){for(let[t,{short:n}]of Object.entries(St))if(t===e||n===e)return t;return``}const W=x({strict:!1,allowPositionals:!0,tokens:!0,options:St});for(let[e,t]of W.tokens.entries())if(t.kind===`option`&&t.value?.startsWith(`-`)){let n=Ct(t.value.substring(1)),r=W.tokens[e+1];W.values[t.name]=[!0],W.values[n]||(W.values[n]=[]),r.kind===`positional`&&r.value?W.values[n].push(r.value):W.values[n].push(!0)}const G=W.values,[wt,K,Tt]=[`magenta`,`red`,`green`].map(e=>G[`no-color`]?String:t=>C(e,String(t))),q=Q(U(G.greatest)),Et=Q(U(G.prerelease)),Dt=Q(U(G.release)),Ot=Q(U(G.patch)),kt=Q(U(G.minor)),At=Q(U(G[`allow-downgrade`])),jt=U(G.modes)||new Set([`npm`,`pypi`]),Mt=typeof G.githubapi==`string`?H(G.githubapi):`https://api.github.com`,Nt=typeof G.pypiapi==`string`?H(G.pypiapi):`https://pypi.org`,J=e=>e.replace(/^v/,``);function Y(e,t){for(let n of t instanceof Set?t:[])if(n.test(e))return!0;return!1}function Pt(e,t){let n=t[`${e}:registry`]||t.registry;return n.endsWith(`/`)?n:`${n}/`}function Ft(e,t){return t.split(`.`).reduce((e,t)=>e?.[t]??null,e)}function It(e){return e.split(`,`).filter(Boolean)}function Lt(e,t){let n=m(t,e);try{return g(n),n}catch{}let r=p(t);return r===t?null:Lt(e,r)}function Rt(e,t,n,r){if(e.startsWith(`@`)){let i=(/@[a-z0-9][\w-.]+/.exec(e)||[``])[0],a=H(Pt(i,r));if(a!==t)try{let e=(0,nt.default)(a,n);if(e?.token)return{auth:e,registry:a}}catch{}return{auth:(0,nt.default)(t,n),registry:t}}else return{auth:(0,nt.default)(t,n),registry:t}}function zt(e,t){return{headers:{"user-agent":`updates/${bt}`,...t&&{Authorization:`${e} ${t}`}}}}function Bt(){let e=new Date;return[e.getFullYear(),`-`,String(e.getMonth()+1).padStart(2,`0`),`-`,String(e.getDate()).padStart(2,`0`),` `,String(e.getHours()).padStart(2,`0`),`:`,String(e.getMinutes()).padStart(2,`0`),`:`,String(e.getSeconds()).padStart(2,`0`)].join(``)}function Vt(e){console.error(`${Bt()} ${e}`)}async function Ht(e,t){G.verbose&&Vt(`${wt(`fetch`)} ${e}`);let n=await fetch(e,t);return G.verbose&&Vt(`${n.ok?Tt(n.status):K(n.status)} ${e}`),n}async function Ut(e,t,n,r,i){let{auth:a,registry:o}=Rt(e,n,r,i),s=`${o}/${(t===`resolutions`?f(e):e).replace(/\//g,`%2f`)}`,c=await Ht(s,zt(a?.type,a?.token));if(c?.ok)return[await c.json(),t,o,e];throw c?.status&&c?.statusText?Error(`Received ${c.status} ${c.statusText} from ${s}`):Error(`Unable to fetch ${e} from ${o}`)}async function Wt(e,t){let n=`${Nt}/pypi/${e}/json`,r=await Ht(n);if(r?.ok)return[await r.json(),t,null,e];throw r?.status&&r?.statusText?Error(`Received ${r.status} ${r.statusText} from ${n}`):Error(`Unable to fetch ${e} from ${Nt}`)}function Gt(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)}function Kt(e,t){let n=`[${w(`go`,[`list`,`-u`,`-mod=readonly`,`-json`,`-m`,...Object.keys(e.go).map(e=>e.split(`\0`)[1])],{stdio:`pipe`,encoding:`utf8`,cwd:t}).replaceAll(`${T}}`,`${T}},`)}]`.replaceAll(`},${T}]`,`}${T}]`),r=[];for(let{Main:e,Indirect:t,Version:i,Update:a,Path:o,Time:s}of JSON.parse(n))e||t||r.push([{old:i,new:a?.Version||i,Time:a?.Time||s},`deps`,null,o]);return r}function qt(e){return e=e.replace(`git@`,``).replace(/.+?\/\//,`https://`).replace(/\.git$/,``),/^[a-z]+:[a-z0-9-]\/[a-z0-9-]$/.test(e)?e.replace(/^(.+?):/,(e,t)=>`https://${t}.com/`):/^[a-z0-9-]\/[a-z0-9-]$/.test(e)?`https://github.com/${e}`:e}function Jt(e){return e.startsWith(`https://bitbucket.org`)?`src/HEAD`:`tree/HEAD`}function Yt({repository:e,homepage:t,info:n},r,i){n&&(e=n.project_urls.repository||n.project_urls.Repository||n.project_urls.repo||n.project_urls.Repo||n.project_urls.source||n.project_urls.Source||n.project_urls[`source code`]||n.project_urls[`Source code`]||n.project_urls[`Source Code`]||n.project_urls.homepage||n.project_urls.Homepage||`https://pypi.org/project/${i}/`);let a=``;return r===`https://npm.pkg.github.com`?`https://github.com/${i.replace(/^@/,``)}`:(e&&(a=qt(typeof e==`string`?e:e.url),a&&typeof e!=`string`&&e.directory&&(a=`${a}/${Jt(a)}/${e.directory}`)),a||t||``)}async function Xt(e){console.info(G.json?JSON.stringify({message:e}):e),await X()}async function X(e,t){if(e){let t=e.stack??e.message,n=e.cause;G.json?console.info(JSON.stringify({error:t,cause:n})):(console.info(K(t)),n&&console.info(K(`Caused by: ${n}`)))}c===`win32`&&Number(d?.node?.split(`.`)[0])>=23&&await new Promise(e=>setTimeout(e,50)),s(t||e?1:0)}function Zt(e={}){for(let t of Object.keys(e))for(let n of Object.values(e[t]))typeof n.oldPrint==`string`&&(n.old=n.oldPrint),typeof n.newPrint==`string`&&(n.new=n.newPrint),typeof n.oldOriginal==`string`&&(n.old=n.oldOriginal),delete n.oldPrint,delete n.newPrint,delete n.oldOriginal,delete n.date;let t=0;for(let n of Object.keys(e))t+=Object.keys(e[n]).length;if(G.json){let t={results:{}};for(let n of Object.keys(e))for(let[r,i]of Object.entries(e[n])){let[e,a]=r.split(`\0`);t.results[n]||(t.results[n]={}),t.results[n][e]||(t.results[n][e]={}),t.results[n][e][a]=i}console.info(JSON.stringify(t))}else t&&console.info(rn(e));return G[`error-on-outdated`]?t?2:0:G[`error-on-unchanged`]?t?0:2:0}function Qt(e,t){c===`win32`&&y(e,0),b(e,t,c===`win32`?{flag:`r+`}:void 0)}function $t(e,t,n){if(e===t)return e;let r=e.split(/\./),i=t.split(/\./),a=/^[0-9a-zA-Z-.]+$/,o=``;for(let e=0;e<r.length;e++)if(r[e]!==i[e]){a.test(r[e])?o+=n(r.slice(e).join(`.`)):o+=r[e].split(``).map(e=>a.test(e)?n(e):e).join(``)+n(`.${r.slice(e+1).join(`.`)}`.replace(/\.$/,``));break}else o+=`${r[e]}.`;return o.replace(/\.$/,``)}const en=e=>S(e).length;function tn(e,t=` `){let n=``,r=Array(e[0].length).fill(0);for(let t of e)for(let[e,n]of t.entries()){let t=en(n);t>r[e]&&(r[e]=t)}for(let[i,a]of e.entries()){for(let[e,i]of a.entries()){e>0&&(n+=t);let o=` `.repeat(r[e]-en(i));n+=i+(e===a.length-1?``:o)}i<e.length-1&&(n+=`
|
|
8
|
+
`)}return n}function nn(e){return/\/v[0-9]$/.test(e)&&(e=p(e)),e}function rn(e){let t=[[`NAME`,`OLD`,`NEW`,`AGE`,`INFO`]],n=new Set;for(let r of Object.keys(e))for(let[i,a]of Object.entries(e[r])){let e=i.split(`\0`)[1],o=`${r}|${e}`;n.has(o)||(n.add(o),t.push([r===`go`?nn(e):e,$t(a.old,a.new,K),$t(a.new,a.old,Tt),a.age||``,a.info||``]))}return tn(t)}function an(e,t){let n=e;for(let[e,{old:r,oldOriginal:i}]of Object.entries(t)){let[a,o]=e.split(`\0`),s=i||r;if(a===`packageManager`){let r=RegExp(`"${V(a)}": *"${o}@${V(s)}"`,`g`);n=n.replace(r,`"${a}": "${o}@${t[e].new}"`)}else{let r=RegExp(`"${V(o)}": *"${V(s)}"`,`g`);n=n.replace(r,`"${o}": "${t[e].new}"`)}}return n}function on(e,t){let n=e;for(let[e,{old:r,oldOriginal:i}]of Object.entries(t)){let[a,o]=e.split(`\0`),s=i||r;n=n.replace(RegExp(`${V(o)} *= *"${V(s)}"`,`g`),`${o} = "${t[e].new}"`),n=n.replace(RegExp(`("${V(o)} *[<>=~]+ *)${V(s)}(")`,`g`),(n,r,i)=>`${r}${t[e].new}${i}`)}return n}function sn(e,t,n){let r=e.replace(yt,t);if(n&&n!==e&&/^[\^~]/.test(r)){let e=n.substring(1).split(`.`),t=r.substring(1).split(`.`);e.length!==t.length&&(r=`${r[0]}${t.slice(0,e.length).join(`.`)}`)}return r}function cn(e){let t=(0,B.parse)(e);return t?!!t.prerelease.length:!1}function ln(e){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(e)}function Z(e){try{return(0,B.coerce)(e)?.version??``}catch{return``}}function un(e,t,{range:n,semvers:r,usePre:i,useRel:a,useGreatest:o}){let s=Z(n);if(!s)return s;i=ln(n)||i,i&&(r.add(`prerelease`),r.has(`patch`)&&r.add(`prepatch`),r.has(`minor`)&&r.add(`preminor`),r.has(`major`)&&r.add(`premajor`));let c=0,l=s;for(let n of t){let t=(0,B.parse)(n);if(!t?.version||t.prerelease.length&&(!i||a))continue;let s=t.version,u=(0,B.diff)(l,s);if(!(!u||!r.has(u)))if(o||!(`time`in e))(0,B.gte)(Z(s),l)&&(l=s);else{let t=new Date(e.time[n]).getTime();t>=0&&t>c&&(l=s,c=t)}}return l||null}function dn(e,{mode:t,range:n,useGreatest:r,useRel:i,usePre:a,semvers:o}){if(n===`*`||n.includes(`||`))return null;let s=[];if(t===`pypi`)s=Object.keys(e.releases).filter(e=>(0,B.valid)(e));else if(t===`npm`)s=Object.keys(e.versions).filter(e=>(0,B.valid)(e));else if(t===`go`)return e.new;let c=un(e,s,{range:n,semvers:o,usePre:a,useRel:i,useGreatest:r});if(!c)return null;if(r)return c;{let r=``,s=``;t===`pypi`?(s=e.info.version,r=Z(e.info.version)):r=e[`dist-tags`].latest;let l=Z(n),u=ln(n),d=cn(c),f=cn(r),p=(0,B.gt)(c,l);if(!i&&a||u&&d||i&&!p&&u&&!d||u&&!d&&p)return c;if(u&&!d&&!p)return null;let m=(0,B.diff)(l,r);return m&&m!==`prerelease`&&!o.has(m.replace(/^pre/,``))||i&&cn(r)?c:(0,B.lt)(r,l)&&!f?At===!0||Y(e.name,At)?r:null:s||r}}function fn(e){let t={},n=o.UPDATES_GITHUB_API_TOKEN||o.GITHUB_API_TOKEN||o.GH_TOKEN||o.GITHUB_TOKEN||o.HOMEBREW_GITHUB_API_TOKEN;return n&&(t.headers={Authorization:`Bearer ${n}`}),Ht(e,t)}async function pn(e,t){let n=await fn(`${Mt}/repos/${e}/${t}/commits`);if(!n?.ok)return{hash:``,commit:{}};let{sha:r,commit:i}=(await n.json())[0];return{hash:r,commit:i}}async function mn(e,t){let n=await fn(`${Mt}/repos/${e}/${t}/git/refs/tags`);return n?.ok?(await n.json()).map(e=>e.ref.replace(/^refs\/tags\//,``)):[]}function hn(e,t,n){let r=J(t);if(!(0,B.valid)(r))return null;if(n){let n=t,i=J(t);for(let t of e){let e=J(t);(0,B.valid)(e)&&(!n||(0,B.gt)(e,i))&&(n=t,i=e)}if((0,B.neq)(r,i))return n}else{let t=e.at(-1);if(!t)return null;let n=J(t);if(!(0,B.valid)(n))return null;if((0,B.neq)(r,n))return t}return null}async function gn(e,t,n){let r=t.old.replace(ht,``),[i,a,o,s]=gt.exec(r)||[];if(!a||!o||!s)return null;if(_t.test(s)){let{hash:n,commit:r}=await pn(a,o);if(!n)return null;let i=r?.committer?.date??r?.author?.date,c=n.substring(0,s.length);if(s!==c)return{key:e,newRange:t.old.replace(s,c),user:a,repo:o,oldRef:s,newRef:c,newDate:i}}else{let t=hn(await mn(a,o),s,n);if(t)return{key:e,newRange:t,user:a,repo:o,oldRef:s,newRef:t}}return null}function _n(e){return e.replace(/-.*/,``)}function vn(e){let t=e.match(vt);return t?.length===1?e.replace(vt,Z(t[0])):e}function yn(e,t){return RegExp(`^${V(e).replaceAll(`\\*`,`.*`)}$`,t?`i`:``)}function bn(e,t,n){return t&&typeof e==`string`?/^\/.+\/$/.test(e)?new RegExp(e.slice(1,-1)):yn(e,n):e instanceof RegExp?e:yn(e,n)}function Q(e){if(e instanceof Set){let t=new Set;for(let n of e)t.add(bn(n,!0,!1));return t}return e}function xn(e,t){let n=new Set;for(let t of e||[])n.add(bn(t,!0,!0));for(let e of t||[])n.add(bn(e,!1,!0));return n}function $(e,t,n,r,i){if(i===`engines`&&ut.includes(e)||t===`pypi`&&e===`python`)return!1;if(!n.size&&!r.size)return!0;for(let t of r)if(t.test(e))return!1;for(let t of n)if(t.test(e))return!0;return!n.size}function Sn(e,t,n){return!e||!t?!0:(n-Date.parse(e))/(24*3600*1e3)>=t}function Cn(e){let t=new Set,n=new Set;if(e)for(let r of e){let e;try{e=_(r)}catch(e){throw Error(`Unable to open ${r}: ${e.message}`)}if(e?.isFile()){let e=h(r);t.add(e),n.add(e)}else if(e?.isDirectory())for(let e of Object.keys(xt)){let n=m(r,e),i=null;try{i=_(n)}catch{}i?.isFile()&&t.add(h(n))}else throw Error(`${r} is neither a file nor directory`)}else for(let e of Object.keys(xt)){let n=Lt(e,a());n&&t.add(h(n))}return[t,n]}async function wn(e){let t=[];for(let e of[``,`.config/`])for(let n of[`js`,`ts`,`mjs`,`mts`])t.push(`${e}updates${e?``:`.config`}.${n}`);let n={};try{({default:n}=await Promise.any(t.map(t=>import(m(e,...t.split(`/`))))))}catch{}return n}async function Tn(){for(let e of[u,l])e?._handle?.setBlocking?.(!0);let e=typeof G.sockets==`number`?G.sockets:96,{help:n,version:r,file:i,types:a,update:o}=G;n&&(u.write(`usage: updates [options]
|
|
34
9
|
|
|
35
10
|
Options:
|
|
36
11
|
-u, --update Update versions and write package file
|
|
@@ -44,7 +19,7 @@ GFS4: `),console.error(e)}),n[s]||(u(n,global[s]||[]),n.close=(function(e){funct
|
|
|
44
19
|
-P, --patch [<pkg,...>] Consider only up to semver-patch
|
|
45
20
|
-m, --minor [<pkg,...>] Consider only up to semver-minor
|
|
46
21
|
-d, --allow-downgrade [<pkg,...>] Allow version downgrades when using latest version
|
|
47
|
-
-
|
|
22
|
+
-C, --cooldown <days> Minimum package age in days
|
|
48
23
|
-E, --error-on-outdated Exit with code 2 when updates are available and 0 when not
|
|
49
24
|
-U, --error-on-unchanged Exit with code 0 when updates are available and 2 when not
|
|
50
25
|
-r, --registry <url> Override npm registry URL
|
|
@@ -59,8 +34,10 @@ GFS4: `),console.error(e)}),n[s]||(u(n,global[s]||[]),n.close=(function(e){funct
|
|
|
59
34
|
Examples:
|
|
60
35
|
$ updates
|
|
61
36
|
$ updates -u
|
|
62
|
-
$ updates -
|
|
37
|
+
$ updates -C 7
|
|
38
|
+
$ updates -e react,react-dom
|
|
63
39
|
$ updates -e '/^react-(dom)?/'
|
|
64
40
|
$ updates -f package.json
|
|
65
41
|
$ updates -f pyproject.toml
|
|
66
|
-
|
|
42
|
+
$ updates -f go.mod
|
|
43
|
+
`),await X()),r&&(console.info(bt),await X());let s={},c={},d={},m={},g=Date.now(),_=0,[y,b]=Cn(U(i));for(let n of y){let r=p(h(n)),i=xt[f(n)];if(!jt.has(i)&&!b.has(n))continue;m[i]=n,s[i]||(s[i]={});let o=await wn(r),l=[],u=[];Array.isArray(G.include)&&(l=G.include.filter(e=>typeof e==`string`).flatMap(e=>It(e))),Array.isArray(G.exclude)&&(u=G.exclude.filter(e=>typeof e==`string`).flatMap(e=>It(e)));let y=xn(l,o?.include??[]),x=xn(u,o?.exclude??[]),{default:S}=await import(`./rc-DlHsBps6.js`).then(t(1)),C=S(`npm`,{registry:`https://registry.npmjs.org`})||{},T={npmrc:C,recursive:!0},E=[];Array.isArray(a)?E=a.filter(e=>typeof e==`string`):`types`in o&&Array.isArray(o.types)?E=o.types:i===`npm`?E=lt:i===`pypi`?E=[...ft,...dt]:i===`go`&&(E=Array.from(pt));let D={};if(i===`go`)d[i]=w(`go`,[`list`,`-m`,`-f`,`{{if not .Indirect}}{{.Path}}@{{.Version}}{{end}}`,`all`],{stdio:`pipe`,encoding:`utf8`,cwd:r});else try{d[i]=v(n,`utf8`)}catch(e){throw Error(`Unable to open ${n}: ${e.message}`)}try{if(i===`npm`)D=JSON.parse(d[i]);else if(i===`pypi`){let{parse:e}=await import(`./dist-1Hfp2p5V.js`);D=e(d[i])}else{D.deps={};for(let e of Gt(d[i])){let[t,n]=e.split(`@`);n&&(D.deps[t]=n)}}}catch(e){throw Error(`Error parsing ${n}: ${e.message}`)}for(let e of E){let t;if(t=i===`npm`||i===`go`?D[e]||{}:Ft(D,e)||{},Array.isArray(t)&&i===`pypi`)for(let{name:n,version:r}of ct(t))$(n,i,y,x,e)&&(s[i][`${e}${n}`]={old:vn(r),oldOriginal:r});else if(typeof t==`string`){let[n,r]=t.split(`@`);s[i][`${e}${n}`]={old:vn(r),oldOriginal:r}}else for(let[n,r]of Object.entries(t))i!==`go`&&(0,B.validRange)(r)&&$(n,i,y,x,e)?s[i][`${e}${n}`]={old:vn(r),oldOriginal:r}:i===`npm`&&$(n,i,y,x,e)?c[`${e}${n}`]={old:r}:i===`go`&&$(n,i,y,x,e)&&(s[i][`${e}${n}`]={old:_n(r),oldOriginal:r})}if(_+=Object.keys(s[i]).length+Object.keys(c).length,!_)continue;let O;i===`npm`&&(O=H((typeof G.registry==`string`?G.registry:!1)||o.registry||C.registry));let k=[];k=i===`go`?Kt(s,r):(await ne(Object.keys(s[i]).map(e=>async()=>{let[t,n]=e.split(`\0`);return i===`npm`?Ut(n,t,O,T,C):i===`pypi`?Wt(n,t):null}),{concurrency:e})).filter(Boolean);for(let[e,t,n,r]of k){if(e?.error)throw Error(e.error);let a=typeof q==`boolean`?q:Y(e.name,q),o=typeof Et==`boolean`?Et:Y(e.name,Et),c=typeof Dt==`boolean`?Dt:Y(e.name,Dt),l;l=Ot===!0||Y(e.name,Ot)?new Set([`patch`]):kt===!0||Y(e.name,kt)?new Set([`patch`,`minor`]):new Set([`patch`,`minor`,`major`]);let u=`${t}${r}`,d=s[i][u].old,f=s[i][u].oldOriginal,p=dn(e,{usePre:o,useRel:c,useGreatest:a,semvers:l,range:d,mode:i}),m=``;if([`go`,`pypi`].includes(i)&&p?m=p:p&&(m=sn(d,p,f)),!p||f&&f===m){delete s[i][u];continue}let h=``;i===`npm`&&e.time?.[p]?h=e.time[p]:i===`pypi`&&e.releases?.[p]?.[0]?.upload_time_iso_8601?h=e.releases[p][0].upload_time_iso_8601:i===`go`&&e.Time&&(h=e.Time),s[i][u].new=m,i===`npm`?s[i][u].info=Yt(e?.versions?.[p],n,e.name):i===`pypi`?s[i][u].info=Yt(e,n,e.info.name):i===`go`&&(s[i][u].info=`https://${nn(r)}`),h&&(s[i][u].date=h,s[i][u].age=st(h,{noAffix:!0}))}if(Object.keys(c).length){let t=(await ne(Object.entries(c).map(([e,t])=>()=>{let n=e.split(`\0`)[1];return gn(e,t,typeof q==`boolean`?q:Y(n,q))}),{concurrency:e})).filter(e=>e!==null);for(let e of t){let{key:t,newRange:n,user:r,repo:a,oldRef:o,newRef:l,newDate:u}=e;s[i][t]={old:c[t].old,new:n,oldPrint:_t.test(o)?o.substring(0,7):o,newPrint:_t.test(l)?l.substring(0,7):l,info:`https://github.com/${r}/${a}`,...u?{age:st(u,{noAffix:!0})}:{}}}}let A=G.cooldown??o.cooldown;if(A){for(let e of Object.keys(s))for(let[t,{date:n}]of Object.entries(s[e]))if(!Sn(n,Number(A),g)){delete s[e][t];continue}}}_===0&&Xt(`No dependencies found, nothing to do.`);let x=0;for(let e of Object.keys(s))x+=Object.keys(s[e]).length;x||Xt(`All dependencies are up to date.`);let S=Zt(s);if(o){for(let e of Object.keys(s))if(Object.keys(s[e]).length){try{let t=e===`npm`?an:on;Qt(m[e],t(d[e],s[e]))}catch(t){throw Error(`Error writing ${f(m[e])}: ${t.message}`)}console.info(Tt(`✨ ${f(m[e])} updated`))}}await X(void 0,S)}try{await Tn()}catch(e){await X(e)}export{};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{createRequire as e}from"node:module";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),u=e=>t=>l(t.default,e),d=e(import.meta.url),f=s((e=>{e.parse=e.decode=i,e.stringify=e.encode=n,e.safe=o,e.unsafe=s;var t=typeof process<`u`&&process.platform===`win32`?`\r
|
|
2
|
+
`:`
|
|
3
|
+
`;function n(e,i){var a=[],s=``;typeof i==`string`?i={section:i,whitespace:!1}:(i||={},i.whitespace=i.whitespace===!0);var c=i.whitespace?` = `:`=`;return Object.keys(e).forEach(function(n,r,i){var l=e[n];l&&Array.isArray(l)?l.forEach(function(e){s+=o(n+`[]`)+c+o(e)+`
|
|
4
|
+
`}):l&&typeof l==`object`?a.push(n):s+=o(n)+c+o(l)+t}),i.section&&s.length&&(s=`[`+o(i.section)+`]`+t+s),a.forEach(function(a,o,c){var l=r(a).join(`\\.`),u=(i.section?i.section+`.`:``)+l,d=n(e[a],{section:u,whitespace:i.whitespace});s.length&&d.length&&(s+=t),s+=d}),s}function r(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 i(e){var t={},n=t,i=null,a=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach(function(e,r,o){if(!(!e||e.match(/^\s*[;#]/))){var c=e.match(a);if(c){if(c[1]!==void 0){if(i=s(c[1]),i===`__proto__`){n={};return}n=t[i]=t[i]||{};return}var l=s(c[2]);if(l!==`__proto__`){var u=c[3]?s(c[4]):!0;switch(u){case`true`:case`false`:case`null`:u=JSON.parse(u)}if(l.length>2&&l.slice(-2)===`[]`){if(l=l.substring(0,l.length-2),l===`__proto__`)return;n[l]?Array.isArray(n[l])||(n[l]=[n[l]]):n[l]=[]}Array.isArray(n[l])?n[l].push(u):n[l]=u}}}}),Object.keys(t).filter(function(e,n,i){if(!t[e]||typeof t[e]!=`object`||Array.isArray(t[e]))return!1;var a=r(e),o=t,s=a.pop(),c=s.replace(/\\\./g,`.`);return a.forEach(function(e,t,n){e!==`__proto__`&&((!o[e]||typeof o[e]!=`object`)&&(o[e]={}),o=o[e])}),o===t&&c===s?!1:(o[c]=t[e],!0)}).forEach(function(e,n,r){delete t[e]}),t}function a(e){return e.charAt(0)===`"`&&e.slice(-1)===`"`||e.charAt(0)===`'`&&e.slice(-1)===`'`}function o(e){return typeof e!=`string`||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&a(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,`\\;`).replace(/#/g,`\\#`)}function s(e,t){if(e=(e||``).trim(),a(e)){e.charAt(0)===`'`&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch{}}else{for(var n=!1,r=``,i=0,o=e.length;i<o;i++){var s=e.charAt(i);if(n)`\\;#`.indexOf(s)===-1?r+=`\\`+s:r+=s,n=!1;else if(`;#`.indexOf(s)!==-1)break;else s===`\\`?n=!0:r+=s}return n&&(r+=`\\`),r.trim()}return e}}));export{l as a,u as i,s as n,d as r,f as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./ini-Dgvcztfv.js";var r=e(((e,t)=>{var n=1,r=2;function i(){return``}function a(e,t,n){return e.slice(t,n).replace(/\S/g,` `)}t.exports=function(e,t){t||={};for(var o,s,c=!1,l=!1,u=0,d=``,f=t.whitespace===!1?i:a,p=0;p<e.length;p++)if(o=e[p],s=e[p+1],!l&&o===`"`&&(e[p-1]===`\\`&&e[p-2]!==`\\`||(c=!c)),!c){if(!l&&o+s===`//`)d+=e.slice(u,p),u=p,l=n,p++;else if(l===n&&o+s===`\r
|
|
2
|
+
`){p++,l=!1,d+=f(e,u,p),u=p;continue}else if(l===n&&o===`
|
|
3
|
+
`)l=!1,d+=f(e,u,p),u=p;else if(!l&&o+s===`/*`){d+=e.slice(u,p),u=p,l=r,p++;continue}else if(l===r&&o+s===`*/`){p++,l=!1,d+=f(e,u,p+1),u=p+1;continue}}return d+(l?f(e.substr(u)):e.substr(u))}})),i=e((e=>{var i=t(`fs`),a=n(),o=t(`path`),s=r(),c=e.parse=function(e){return/^\s*{/.test(e)?JSON.parse(s(e)):a.parse(e)},l=e.file=function(){var e=[].slice.call(arguments).filter(function(e){return e!=null});for(var t in e)if(typeof e[t]!=`string`)return;var n=o.join.apply(null,e);try{return i.readFileSync(n,`utf-8`)}catch{return}};e.json=function(){var e=l.apply(null,arguments);return e?c(e):null},e.env=function(e,t){t||=process.env;var n={},r=e.length;for(var i in t)if(i.toLowerCase().indexOf(e.toLowerCase())===0){for(var a=i.substring(r).split(`__`),o;(o=a.indexOf(``))>-1;)a.splice(o,1);var s=n;a.forEach(function(e,n){!e||typeof s!=`object`||(n===a.length-1&&(s[e]=t[i]),s[e]===void 0&&(s[e]={}),s=s[e])})}return n},e.find=function(){var e=o.join.apply(null,[].slice.call(arguments));function t(e,n){var r=o.join(e,n);try{return i.statSync(r),r}catch{if(o.dirname(e)!==e)return t(o.dirname(e),n)}}return t(process.cwd(),e)}})),a=e(((e,t)=>{function n(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof Buffer){var t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);return e.copy(t),t}else if(e instanceof Date)return new Date(e.getTime());else if(e instanceof RegExp)return new RegExp(e);else throw Error(`Unexpected situation`)}function i(e){var t=[];return e.forEach(function(e,a){typeof e==`object`&&e?Array.isArray(e)?t[a]=i(e):n(e)?t[a]=r(e):t[a]=o({},e):t[a]=e}),t}function a(e,t){return t===`__proto__`?void 0:e[t]}var o=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=`object`)return!1;if(arguments.length<2)return arguments[0];var e=arguments[0],t=Array.prototype.slice.call(arguments,1),s,c;return t.forEach(function(t){typeof t!=`object`||!t||Array.isArray(t)||Object.keys(t).forEach(function(l){if(c=a(e,l),s=a(t,l),s!==e)if(typeof s!=`object`||!s){e[l]=s;return}else if(Array.isArray(s)){e[l]=i(s);return}else if(n(s)){e[l]=r(s);return}else if(typeof c!=`object`||!c||Array.isArray(c)){e[l]=o({},s);return}else{e[l]=o(c,s);return}})}),e}})),o=e(((e,t)=>{function n(e,t){var n=e;return t.slice(0,-1).forEach(function(e){n=n[e]||{}}),t[t.length-1]in n}function r(e){return typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function i(e,t){return t===`constructor`&&typeof e[t]==`function`||t===`__proto__`}t.exports=function(e,t){t||={};var a={bools:{},strings:{},unknownFn:null};typeof t.unknown==`function`&&(a.unknownFn=t.unknown),typeof t.boolean==`boolean`&&t.boolean?a.allBools=!0:[].concat(t.boolean).filter(Boolean).forEach(function(e){a.bools[e]=!0});var o={};function s(e){return o[e].some(function(e){return a.bools[e]})}Object.keys(t.alias||{}).forEach(function(e){o[e]=[].concat(t.alias[e]),o[e].forEach(function(t){o[t]=[e].concat(o[e].filter(function(e){return t!==e}))})}),[].concat(t.string).filter(Boolean).forEach(function(e){a.strings[e]=!0,o[e]&&[].concat(o[e]).forEach(function(e){a.strings[e]=!0})});var c=t.default||{},l={_:[]};function u(e,t){return a.allBools&&/^--[^=]+$/.test(t)||a.strings[e]||a.bools[e]||o[e]}function d(e,t,n){for(var r=e,o=0;o<t.length-1;o++){var s=t[o];if(i(r,s))return;r[s]===void 0&&(r[s]={}),(r[s]===Object.prototype||r[s]===Number.prototype||r[s]===String.prototype)&&(r[s]={}),r[s]===Array.prototype&&(r[s]=[]),r=r[s]}var c=t[t.length-1];i(r,c)||((r===Object.prototype||r===Number.prototype||r===String.prototype)&&(r={}),r===Array.prototype&&(r=[]),r[c]===void 0||a.bools[c]||typeof r[c]==`boolean`?r[c]=n:Array.isArray(r[c])?r[c].push(n):r[c]=[r[c],n])}function f(e,t,n){if(!(n&&a.unknownFn&&!u(e,n)&&a.unknownFn(n)===!1)){var i=!a.strings[e]&&r(t)?Number(t):t;d(l,e.split(`.`),i),(o[e]||[]).forEach(function(e){d(l,e.split(`.`),i)})}}Object.keys(a.bools).forEach(function(e){f(e,c[e]===void 0?!1:c[e])});var p=[];e.indexOf(`--`)!==-1&&(p=e.slice(e.indexOf(`--`)+1),e=e.slice(0,e.indexOf(`--`)));for(var m=0;m<e.length;m++){var h=e[m],g,_;if(/^--.+=/.test(h)){var v=h.match(/^--([^=]+)=([\s\S]*)$/);g=v[1];var y=v[2];a.bools[g]&&(y=y!==`false`),f(g,y,h)}else if(/^--no-.+/.test(h))g=h.match(/^--no-(.+)/)[1],f(g,!1,h);else if(/^--.+/.test(h))g=h.match(/^--(.+)/)[1],_=e[m+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!a.bools[g]&&!a.allBools&&(!o[g]||!s(g))?(f(g,_,h),m+=1):/^(true|false)$/.test(_)?(f(g,_===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h);else if(/^-[^-]+/.test(h)){for(var b=h.slice(1,-1).split(``),x=!1,S=0;S<b.length;S++){if(_=h.slice(S+2),_===`-`){f(b[S],_,h);continue}if(/[A-Za-z]/.test(b[S])&&_[0]===`=`){f(b[S],_.slice(1),h),x=!0;break}if(/[A-Za-z]/.test(b[S])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){f(b[S],_,h),x=!0;break}if(b[S+1]&&b[S+1].match(/\W/)){f(b[S],h.slice(S+2),h),x=!0;break}else f(b[S],a.strings[b[S]]?``:!0,h)}g=h.slice(-1)[0],!x&&g!==`-`&&(e[m+1]&&!/^(-|--)[^-]/.test(e[m+1])&&!a.bools[g]&&(!o[g]||!s(g))?(f(g,e[m+1],h),m+=1):e[m+1]&&/^(true|false)$/.test(e[m+1])?(f(g,e[m+1]===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h))}else if((!a.unknownFn||a.unknownFn(h)!==!1)&&l._.push(a.strings._||!r(h)?h:Number(h)),t.stopEarly){l._.push.apply(l._,e.slice(m+1));break}}return Object.keys(c).forEach(function(e){n(l,e.split(`.`))||(d(l,e.split(`.`),c[e]),(o[e]||[]).forEach(function(t){d(l,t.split(`.`),c[e])}))}),t[`--`]?l[`--`]=p.slice():p.forEach(function(e){l._.push(e)}),l}})),s=e(((e,n)=>{var r=i(),s=t(`path`).join,c=a(),l=`/etc`,u=process.platform===`win32`,d=u?process.env.USERPROFILE:process.env.HOME;n.exports=function(e,t,n,i){if(typeof e!=`string`)throw Error(`rc(name): name *must* be string`);n||=o()(process.argv.slice(2)),t=(typeof t==`string`?r.json(t):t)||{},i||=r.parse;var a=r.env(e+`_`),f=[t],p=[];function m(e){if(!(p.indexOf(e)>=0)){var t=r.file(e);t&&(f.push(i(t)),p.push(e))}}return u||[s(l,e,`config`),s(l,e+`rc`)].forEach(m),d&&[s(d,`.config`,e,`config`),s(d,`.config`,e),s(d,`.`+e,`config`),s(d,`.`+e+`rc`)].forEach(m),m(r.find(`.`+e+`rc`)),a.config&&m(a.config),n.config&&m(n.config),c.apply(null,f.concat([a,n,p.length?{configs:p,config:p[p.length-1]}:void 0]))}}));export default s();export{};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "updates",
|
|
3
|
-
"version": "17.0.
|
|
4
|
-
"description": "Flexible
|
|
3
|
+
"version": "17.0.2",
|
|
4
|
+
"description": " Flexible dependency update tool",
|
|
5
5
|
"author": "silverwind",
|
|
6
6
|
"repository": "silverwind/updates",
|
|
7
7
|
"license": "BSD-2-Clause",
|