vbapm 0.6.14 → 0.7.0
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/README.md +46 -0
- package/addins/build/vbapm.xlam +0 -0
- package/lib/_commonjsHelpers-Bjf42z7h.js +1 -0
- package/lib/actions/add-source.d.ts +11 -0
- package/lib/add-source-_Z4tr2ea.js +17 -0
- package/lib/bin/vbapm-add.d.ts +2 -0
- package/lib/build-project-CIZanDh1.js +3 -0
- package/lib/build-target-B03OPzeI.js +9 -0
- package/lib/crc32-Cc3OMFYk.js +1 -0
- package/lib/create-project-CTAlegO8.js +10 -0
- package/lib/debug.js +1 -1
- package/lib/errors.d.ts +4 -0
- package/lib/export-project-DdTYRyAw.js +4 -0
- package/lib/export-target-CEupP86g.js +4 -0
- package/lib/{get-target-e760a439.js → get-target-Ba_ZoGUl.js} +1 -1
- package/lib/index-BlteXxjY.js +1 -0
- package/lib/index-CB6KQLC7.js +13 -0
- package/lib/index-CEojr58e.js +2 -0
- package/lib/index-Cwtynogk.js +54 -0
- package/lib/index-DSgWshzu.js +2 -0
- package/lib/index-_8uEunjn.js +6 -0
- package/lib/index-mBZsirl0.js +14 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/init-project-BY-a8CIk.js +15 -0
- package/lib/installer-C0iBwEpK.js +9 -0
- package/lib/{load-from-project-acf7400a.js → load-from-project-wNJg8fme.js} +1 -1
- package/lib/once-fkpTAKD3.js +1 -0
- package/lib/one_ini_bg.wasm +0 -0
- package/lib/project-DFh-2QTw.js +20 -0
- package/lib/run-macro-Ck_8Iku3.js +1 -0
- package/lib/sat-solver-CqS8Vf6C.js +1 -0
- package/lib/string_decoder-CW-j4E6X.js +1 -0
- package/lib/test-project-CM-XUOdH.js +1 -0
- package/lib/tmp-C7yJT4iq.js +8 -0
- package/lib/toml-patch-r8oqFm0h.js +3 -0
- package/lib/transform-target-DJmqMjY0.js +2 -0
- package/lib/vbapm-add-QPN5uEGK.js +16 -0
- package/lib/vbapm-build-BKtQ6OeP.js +9 -0
- package/lib/vbapm-export-4H_qDinP.js +7 -0
- package/lib/{vbapm-init-5c8eb026.js → vbapm-init-BMY4x_xq.js} +2 -2
- package/lib/vbapm-new-DLW9SdvJ.js +17 -0
- package/lib/vbapm-run-DzRxAhlD.js +10 -0
- package/lib/{vbapm-test-a7b30592.js → vbapm-test-DInh0MDC.js} +1 -1
- package/lib/vbapm-version-3Xv7JjGv.js +8 -0
- package/lib/vbapm.js +11 -10
- package/package.json +124 -137
- package/lib/_commonjsHelpers-553b27b3.js +0 -1
- package/lib/build-project-eb8454f0.js +0 -3
- package/lib/build-target-dbcc69c7.js +0 -9
- package/lib/create-project-3154aace.js +0 -10
- package/lib/export-project-bc13c1ae.js +0 -4
- package/lib/export-target-5d28d188.js +0 -4
- package/lib/index-4ce3d28b.js +0 -6
- package/lib/index-72c1a91d.js +0 -3
- package/lib/index-c5b5f6d1.js +0 -2
- package/lib/index-ddd39b65.js +0 -5
- package/lib/init-project-ceecd718.js +0 -15
- package/lib/installer-dbc2c34a.js +0 -21
- package/lib/once-5205b917.js +0 -1
- package/lib/project-43370ed3.js +0 -29
- package/lib/run-macro-4f1375ca.js +0 -1
- package/lib/sat-solver-f9155891.js +0 -1
- package/lib/test-project-669dfcfb.js +0 -1
- package/lib/tmp-14f9d850.js +0 -9
- package/lib/toml-patch.es-6bd2145d.js +0 -3
- package/lib/vbapm-build-8ff58485.js +0 -9
- package/lib/vbapm-export-96798f4f.js +0 -7
- package/lib/vbapm-new-cd174cbb.js +0 -17
- package/lib/vbapm-run-2f17fb22.js +0 -10
- package/lib/vbapm-version-c5f3d55a.js +0 -8
- package/lib/workbook-xml-a61269f4.js +0 -2
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";var t,e,r=require("./_commonjsHelpers-Bjf42z7h.js"),i=require("fs"),n=require("events"),s=require("./transform-target-DJmqMjY0.js"),o=require("path"),a=require("./installer-C0iBwEpK.js"),l=require("util"),u=require("stream"),h=require("./string_decoder-CW-j4E6X.js"),c=require("buffer"),f=require("./index-CEojr58e.js"),d=require("node:url"),p=require("node:path"),y=require("node:fs"),b=require("node:fs/promises"),m=require("node:events"),g=require("node:stream"),w=require("node:string_decoder"),v=require("./crc32-Cc3OMFYk.js"),S=require("zlib");function E(t,e){return e.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(r){if("default"!==r&&!(r in t)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}})}),Object.freeze(t)}function x(){if(e)return t;e=1,t=d;const r=i,{EventEmitter:a}=n,{Minimatch:l}=s.requireCommonjs(),{resolve:u}=o;function h(t,e){return new Promise((i,n)=>{(e?r.stat:r.lstat)(t,(r,n)=>{if(r)if("ENOENT"===r.code)i(e?h(t,!1):null);else i(null);else i(n)})})}async function*c(t,e,i,n,s,o){let a=await function(t,e){return new Promise((i,n)=>{r.readdir(t,{withFileTypes:!0},(t,r)=>{if(t)switch(t.code){case"ENOTDIR":e?n(t):i([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":i([]);break;default:n(t)}else i(r)})})}(e+t,o);for(const r of a){let o=r.name;void 0===o&&(o=r,n=!0);const a=t+"/"+o,l=a.slice(1),u=e+"/"+l;let f=null;(n||i)&&(f=await h(u,i)),f||void 0===r.name||(f=r),null===f&&(f={isDirectory:()=>!1}),f.isDirectory()?s(l)||(yield{relative:l,absolute:u,stats:f},yield*c(a,e,i,n,s,!1)):yield{relative:l,absolute:u,stats:f}}}class f extends a{constructor(t,e,r){if(super(),"function"==typeof e&&(r=e,e=null),this.options=function(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}(e||{}),this.matchers=[],this.options.pattern){const t=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=t.map(t=>new l(t,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){const t=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=t.map(t=>new l(t,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){const t=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=t.map(t=>new l(t,{dot:!0}))}this.iterator=async function*(t,e,r,i){yield*c("",t,e,r,i,!0)}(u(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,r&&(this._matches=[],this.on("match",t=>this._matches.push(this.options.absolute?t.absolute:t.relative)),this.on("error",t=>r(t)),this.on("end",()=>r(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(t){return this.skipMatchers.some(e=>e.match(t))}_fileMatches(t,e){const r=t+(e?"/":"");return(0===this.matchers.length||this.matchers.some(t=>t.match(r)))&&!this.ignoreMatchers.some(t=>t.match(r))&&(!this.options.nodir||!e)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then(t=>{if(t.done)this.emit("end");else{const e=t.value.stats.isDirectory();if(this._fileMatches(t.value.relative,e)){let r=t.value.relative,i=t.value.absolute;this.options.mark&&e&&(r+="/",i+="/"),this.options.stat?this.emit("match",{relative:r,absolute:i,stat:t.value.stats}):this.emit("match",{relative:r,absolute:i})}this._next(this.iterator)}}).catch(t=>{this.abort(),this.emit("error",t),t.code||this.options.silent||console.error(t)})}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}}function d(t,e,r){return new f(t,e,r)}return d.ReaddirGlob=f,t}function k(t,...e){return(...r)=>t(...e,...r)}function T(t){return function(...e){var r=e.pop();return t.call(this,e,r)}}var R="function"==typeof queueMicrotask&&queueMicrotask,A="function"==typeof setImmediate&&setImmediate,L="object"==typeof process&&"function"==typeof process.nextTick;function O(t){setTimeout(t,0)}function I(t){return(e,...r)=>t(()=>e(...r))}var P=I(R?queueMicrotask:A?setImmediate:L?process.nextTick:O);function D(t){return N(t)?function(...e){const r=e.pop();return M(t.apply(this,e),r)}:T(function(e,r){var i;try{i=t.apply(this,e)}catch(t){return r(t)}if(i&&"function"==typeof i.then)return M(i,r);r(null,i)})}function M(t,e){return t.then(t=>{C(e,null,t)},t=>{C(e,t&&(t instanceof Error||t.message)?t:new Error(t))})}function C(t,e,r){try{t(e,r)}catch(t){P(t=>{throw t},t)}}function N(t){return"AsyncFunction"===t[Symbol.toStringTag]}function j(t){if("function"!=typeof t)throw new Error("expected a function");return N(t)?D(t):t}function F(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[e-1]?t.apply(this,r):new Promise((i,n)=>{r[e-1]=(t,...e)=>{if(t)return n(t);i(e.length>1?e:e[0])},t.apply(this,r)})}}function B(t){return function(e,...r){return F(function(i){var n=this;return t(e,(t,e)=>{j(t).apply(n,r.concat(e))},i)})}}function z(t,e,r,i){e=e||[];var n=[],s=0,o=j(r);return t(e,(t,e,r)=>{var i=s++;o(t,(t,e)=>{n[i]=e,r(t)})},t=>{i(t,n)})}function W(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0}const U={};function G(t){function e(...e){if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e}function q(t){if(W(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e,r,i,n,s=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}(t);return s?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(s):(r=(e=t)?Object.keys(e):[],i=-1,n=r.length,function t(){var s=r[++i];return"__proto__"===s?t():i<n?{value:e[s],key:s}:null})}function H(t){return function(...e){if(null===t)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}function $(t,e,r,i){let n=!1,s=!1,o=!1,a=0,l=0;function u(){a>=e||o||n||(o=!0,t.next().then(({value:t,done:e})=>{if(!s&&!n){if(o=!1,e)return n=!0,void(a<=0&&i(null));a++,r(t,l,h),l++,u()}}).catch(c))}function h(t,e){if(a-=1,!s)return t?c(t):!1===t?(n=!0,void(s=!0)):e===U||n&&a<=0?(n=!0,i(null)):void u()}function c(t){s||(o=!1,n=!0,i(t))}u()}var V=t=>(e,r,i)=>{if(i=G(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if("AsyncGenerator"===e[Symbol.toStringTag])return $(e,t,r,i);if(function(t){return"function"==typeof t[Symbol.asyncIterator]}(e))return $(e[Symbol.asyncIterator](),t,r,i);var n=q(e),s=!1,o=!1,a=0,l=!1;function u(t,e){if(!o)if(a-=1,t)s=!0,i(t);else if(!1===t)s=!0,o=!0;else{if(e===U||s&&a<=0)return s=!0,i(null);l||h()}}function h(){for(l=!0;a<t&&!s;){var e=n();if(null===e)return s=!0,void(a<=0&&i(null));a+=1,r(e.value,e.key,H(u))}l=!1}h()};var Z=F(function(t,e,r,i){return V(e)(t,j(r),i)},4);function Y(t,e,r){r=G(r);var i=0,n=0,{length:s}=t,o=!1;function a(t,e){!1===t&&(o=!0),!0!==o&&(t?r(t):++n!==s&&e!==U||r(null))}for(0===s&&r(null);i<s;i++)e(t[i],i,H(a))}function Q(t,e,r){return Z(t,1/0,e,r)}var K=F(function(t,e,r){return(W(t)?Y:Q)(t,j(e),r)},3);var X=F(function(t,e,r){return z(K,t,e,r)},3),J=B(X);var tt=F(function(t,e,r){return Z(t,1,e,r)},3);var et=F(function(t,e,r){return z(tt,t,e,r)},3),rt=B(et);const it=Symbol("promiseCallback");function nt(){let t,e;function r(r,...i){if(r)return e(r);t(i.length>1?i:i[0])}return r[it]=new Promise((r,i)=>{t=r,e=i}),r}function st(t,e,r){"number"!=typeof e&&(r=e,e=null),r=G(r||nt());var i=Object.keys(t).length;if(!i)return r(null);e||(e=i);var n={},s=0,o=!1,a=!1,l=Object.create(null),u=[],h=[],c={};function f(t,e){u.push(()=>function(t,e){if(a)return;var i=H((e,...i)=>{if(s--,!1!==e)if(i.length<2&&([i]=i),e){var u={};if(Object.keys(n).forEach(t=>{u[t]=n[t]}),u[t]=i,a=!0,l=Object.create(null),o)return;r(e,u)}else n[t]=i,(l[t]||[]).forEach(t=>t()),d();else o=!0});s++;var u=j(e[e.length-1]);e.length>1?u(n,i):u(i)}(t,e))}function d(){if(!o){if(0===u.length&&0===s)return r(null,n);for(;u.length&&s<e;){u.shift()()}}}function p(e){var r=[];return Object.keys(t).forEach(i=>{const n=t[i];Array.isArray(n)&&n.indexOf(e)>=0&&r.push(i)}),r}return Object.keys(t).forEach(e=>{var r=t[e];if(!Array.isArray(r))return f(e,[r]),void h.push(e);var i=r.slice(0,r.length-1),n=i.length;if(0===n)return f(e,r),void h.push(e);c[e]=n,i.forEach(s=>{if(!t[s])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+s+"` in "+i.join(", "));!function(t,e){var r=l[t];r||(r=l[t]=[]);r.push(e)}(s,()=>{0===--n&&f(e,r)})})}),function(){var t=0;for(;h.length;)t++,p(h.pop()).forEach(t=>{0===--c[t]&&h.push(t)});if(t!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d(),r[it]}var ot=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,at=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,lt=/,/,ut=/(=.+)?(\s*)$/;function ht(t,e){var r={};return Object.keys(t).forEach(e=>{var i,n=t[e],s=N(n),o=!s&&1===n.length||s&&0===n.length;if(Array.isArray(n))i=[...n],n=i.pop(),r[e]=i.concat(i.length>0?a:n);else if(o)r[e]=n;else{if(i=function(t){const e=function(t){let e="",r=0,i=t.indexOf("*/");for(;r<t.length;)if("/"===t[r]&&"/"===t[r+1]){let e=t.indexOf("\n",r);r=-1===e?t.length:e}else if(-1!==i&&"/"===t[r]&&"*"===t[r+1]){let n=t.indexOf("*/",r);-1!==n?(r=n+2,i=t.indexOf("*/",r)):(e+=t[r],r++)}else e+=t[r],r++;return e}(t.toString());let r=e.match(ot);if(r||(r=e.match(at)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+e);let[,i]=r;return i.replace(/\s/g,"").split(lt).map(t=>t.replace(ut,"").trim())}(n),0===n.length&&!s&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");s||i.pop(),r[e]=i.concat(a)}function a(t,e){var r=i.map(e=>t[e]);r.push(e),j(n)(...r)}}),st(r,e)}class ct{constructor(){this.head=this.tail=null,this.length=0}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1}insertBefore(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1}unshift(t){this.head?this.insertBefore(this.head,t):ft(this,t)}push(t){this.tail?this.insertAfter(this.tail,t):ft(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next}remove(t){for(var e=this.head;e;){var{next:r}=e;t(e)&&this.removeLink(e),e=r}return this}}function ft(t,e){t.length=1,t.head=t.tail=e}function dt(t,e,r){if(null==e)e=1;else if(0===e)throw new RangeError("Concurrency must not be zero");var i=j(t),n=0,s=[];const o={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(t,e){return t?e?void(o[t]=o[t].filter(t=>t!==e)):o[t]=[]:Object.keys(o).forEach(t=>o[t]=[])}function l(t,...e){o[t].forEach(t=>t(...e))}var u=!1;function h(t,e,r,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");var n,s;function o(t,...e){return t?r?s(t):n():e.length<=1?n(e[0]):void n(e)}y.started=!0;var a=y._createTaskItem(t,r?o:i||o);if(e?y._tasks.unshift(a):y._tasks.push(a),u||(u=!0,P(()=>{u=!1,y.process()})),r||!i)return new Promise((t,e)=>{n=t,s=e})}function c(t){return function(e,...r){n-=1;for(var i=0,o=t.length;i<o;i++){var a=t[i],u=s.indexOf(a);0===u?s.shift():u>0&&s.splice(u,1),a.callback(e,...r),null!=e&&l("error",e,a.data)}n<=y.concurrency-y.buffer&&l("unsaturated"),y.idle()&&l("drain"),y.process()}}function f(t){return!(0!==t.length||!y.idle())&&(P(()=>l("drain")),!0)}const d=t=>e=>{if(!e)return new Promise((e,r)=>{!function(t,e){const r=(...i)=>{a(t,r),e(...i)};o[t].push(r)}(t,(t,i)=>{if(t)return r(t);e(i)})});a(t),function(t,e){o[t].push(e)}(t,e)};var p=!1,y={_tasks:new ct,_createTaskItem:(t,e)=>({data:t,callback:e}),*[Symbol.iterator](){yield*y._tasks[Symbol.iterator]()},concurrency:e,payload:r,buffer:e/4,started:!1,paused:!1,push(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!1,!1,e))}return h(t,!1,!1,e)},pushAsync(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!1,!0,e))}return h(t,!1,!0,e)},kill(){a(),y._tasks.empty()},unshift(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!0,!1,e))}return h(t,!0,!1,e)},unshiftAsync(t,e){if(Array.isArray(t)){if(f(t))return;return t.map(t=>h(t,!0,!0,e))}return h(t,!0,!0,e)},remove(t){y._tasks.remove(t)},process(){if(!p){for(p=!0;!y.paused&&n<y.concurrency&&y._tasks.length;){var t=[],e=[],r=y._tasks.length;y.payload&&(r=Math.min(r,y.payload));for(var o=0;o<r;o++){var a=y._tasks.shift();t.push(a),s.push(a),e.push(a.data)}n+=1,0===y._tasks.length&&l("empty"),n===y.concurrency&&l("saturated");var u=H(c(t));i(e,u)}p=!1}},length:()=>y._tasks.length,running:()=>n,workersList:()=>s,idle:()=>y._tasks.length+n===0,pause(){y.paused=!0},resume(){!1!==y.paused&&(y.paused=!1,P(y.process))}};return Object.defineProperties(y,{saturated:{writable:!1,value:d("saturated")},unsaturated:{writable:!1,value:d("unsaturated")},empty:{writable:!1,value:d("empty")},drain:{writable:!1,value:d("drain")},error:{writable:!1,value:d("error")}}),y}function pt(t,e){return dt(t,1,e)}function yt(t,e,r){return dt(t,e,r)}var bt=F(function(t,e,r,i){i=G(i);var n=j(r);return tt(t,(t,r,i)=>{n(e,t,(t,r)=>{e=r,i(t)})},t=>i(t,e))},4);function mt(...t){var e=t.map(j);return function(...t){var r=this,i=t[t.length-1];return"function"==typeof i?t.pop():i=nt(),bt(e,t,(t,e,i)=>{e.apply(r,t.concat((t,...e)=>{i(t,e)}))},(t,e)=>i(t,...e)),i[it]}}function gt(...t){return mt(...t.reverse())}var _t=F(function(t,e,r,i){return z(V(e),t,r,i)},4);var wt=F(function(t,e,r,i){var n=j(r);return _t(t,e,(t,e)=>{n(t,(t,...r)=>t?e(t):e(t,r))},(t,e)=>{for(var r=[],n=0;n<e.length;n++)e[n]&&(r=r.concat(...e[n]));return i(t,r)})},4);var vt=F(function(t,e,r){return wt(t,1/0,e,r)},3);var St=F(function(t,e,r){return wt(t,1,e,r)},3);function Et(...t){return function(...e){return e.pop()(null,...t)}}function xt(t,e){return(r,i,n,s)=>{var o,a=!1;const l=j(n);r(i,(r,i,n)=>{l(r,(i,s)=>i||!1===i?n(i):t(s)&&!o?(a=!0,o=e(!0,r),n(null,U)):void n())},t=>{if(t)return s(t);s(null,a?o:e(!1))})}}var kt=F(function(t,e,r){return xt(t=>t,(t,e)=>e)(K,t,e,r)},3);var Tt=F(function(t,e,r,i){return xt(t=>t,(t,e)=>e)(V(e),t,r,i)},4);var Rt=F(function(t,e,r){return xt(t=>t,(t,e)=>e)(V(1),t,e,r)},3);function At(t){return(e,...r)=>j(e)(...r,(e,...r)=>{"object"==typeof console&&(e?console.error&&console.error(e):console[t]&&r.forEach(e=>console[t](e)))})}var Lt=At("dir");var Ot=F(function(t,e,r){r=H(r);var i,n=j(t),s=j(e);function o(t,...e){if(t)return r(t);!1!==t&&(i=e,s(...e,a))}function a(t,e){return t?r(t):!1!==t?e?void n(o):r(null,...i):void 0}return a(null,!0)},3);function It(t,e,r){const i=j(e);return Ot(t,(...t)=>{const e=t.pop();i(...t,(t,r)=>e(t,!r))},r)}function Pt(t){return(e,r,i)=>t(e,i)}var Dt=F(function(t,e,r){return K(t,Pt(j(e)),r)},3);var Mt=F(function(t,e,r,i){return V(e)(t,Pt(j(r)),i)},4);var Ct=F(function(t,e,r){return Mt(t,1,e,r)},3);function Nt(t){return N(t)?t:function(...e){var r=e.pop(),i=!0;e.push((...t)=>{i?P(()=>r(...t)):r(...t)}),t.apply(this,e),i=!1}}var jt=F(function(t,e,r){return xt(t=>!t,t=>!t)(K,t,e,r)},3);var Ft=F(function(t,e,r,i){return xt(t=>!t,t=>!t)(V(e),t,r,i)},4);var Bt=F(function(t,e,r){return xt(t=>!t,t=>!t)(tt,t,e,r)},3);function zt(t,e,r,i){var n=new Array(e.length);t(e,(t,e,i)=>{r(t,(t,r)=>{n[e]=!!r,i(t)})},t=>{if(t)return i(t);for(var r=[],s=0;s<e.length;s++)n[s]&&r.push(e[s]);i(null,r)})}function Wt(t,e,r,i){var n=[];t(e,(t,e,i)=>{r(t,(r,s)=>{if(r)return i(r);s&&n.push({index:e,value:t}),i(r)})},t=>{if(t)return i(t);i(null,n.sort((t,e)=>t.index-e.index).map(t=>t.value))})}function Ut(t,e,r,i){return(W(e)?zt:Wt)(t,e,j(r),i)}var Gt=F(function(t,e,r){return Ut(K,t,e,r)},3);var qt=F(function(t,e,r,i){return Ut(V(e),t,r,i)},4);var Ht=F(function(t,e,r){return Ut(tt,t,e,r)},3);var $t=F(function(t,e){var r=H(e),i=j(Nt(t));return function t(e){if(e)return r(e);!1!==e&&i(t)}()},2);var Vt=F(function(t,e,r,i){var n=j(r);return _t(t,e,(t,e)=>{n(t,(r,i)=>r?e(r):e(r,{key:i,val:t}))},(t,e)=>{for(var r={},{hasOwnProperty:n}=Object.prototype,s=0;s<e.length;s++)if(e[s]){var{key:o}=e[s],{val:a}=e[s];n.call(r,o)?r[o].push(a):r[o]=[a]}return i(t,r)})},4);function Zt(t,e,r){return Vt(t,1/0,e,r)}function Yt(t,e,r){return Vt(t,1,e,r)}var Qt=At("log");var Kt=F(function(t,e,r,i){i=G(i);var n={},s=j(r);return V(e)(t,(t,e,r)=>{s(t,e,(t,i)=>{if(t)return r(t);n[e]=i,r(t)})},t=>i(t,n))},4);function Xt(t,e,r){return Kt(t,1/0,e,r)}function Jt(t,e,r){return Kt(t,1,e,r)}function te(t,e=t=>t){var r=Object.create(null),i=Object.create(null),n=j(t),s=T((t,s)=>{var o=e(...t);o in r?P(()=>s(null,...r[o])):o in i?i[o].push(s):(i[o]=[s],n(...t,(t,...e)=>{t||(r[o]=e);var n=i[o];delete i[o];for(var s=0,a=n.length;s<a;s++)n[s](t,...e)}))});return s.memo=r,s.unmemoized=t,s}var ee=I(L?process.nextTick:A?setImmediate:O),re=F((t,e,r)=>{var i=W(e)?[]:{};t(e,(t,e,r)=>{j(t)((t,...n)=>{n.length<2&&([n]=n),i[e]=n,r(t)})},t=>r(t,i))},3);function ie(t,e){return re(K,t,e)}function ne(t,e,r){return re(V(e),t,r)}function se(t,e){var r=j(t);return dt((t,e)=>{r(t[0],e)},e,1)}class oe{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let e;for(;t>0&&ue(this.heap[t],this.heap[e=le(t)]);){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}percDown(t){let e;for(;(e=ae(t))<this.heap.length&&(e+1<this.heap.length&&ue(this.heap[e+1],this.heap[e])&&(e+=1),!ue(this.heap[t],this.heap[e]));){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}push(t){t.pushCount=++this.pushCount,this.heap.push(t),this.percUp(this.heap.length-1)}unshift(t){return this.heap.push(t)}shift(){let[t]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),t}toArray(){return[...this]}*[Symbol.iterator](){for(let t=0;t<this.heap.length;t++)yield this.heap[t].data}remove(t){let e=0;for(let r=0;r<this.heap.length;r++)t(this.heap[r])||(this.heap[e]=this.heap[r],e++);this.heap.splice(e);for(let t=le(this.heap.length-1);t>=0;t--)this.percDown(t);return this}}function ae(t){return 1+(t<<1)}function le(t){return(t+1>>1)-1}function ue(t,e){return t.priority!==e.priority?t.priority<e.priority:t.pushCount<e.pushCount}function he(t,e){var r=se(t,e),{push:i,pushAsync:n}=r;function s(t,e){return Array.isArray(t)?t.map(t=>({data:t,priority:e})):{data:t,priority:e}}return r._tasks=new oe,r._createTaskItem=({data:t,priority:e},r)=>({data:t,priority:e,callback:r}),r.push=function(t,e=0,r){return i(s(t,e),r)},r.pushAsync=function(t,e=0,r){return n(s(t,e),r)},delete r.unshift,delete r.unshiftAsync,r}var ce=F(function(t,e){if(e=G(e),!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var r=0,i=t.length;r<i;r++)j(t[r])(e)},2);function fe(t,e,r,i){var n=[...t].reverse();return bt(n,e,r,i)}function de(t){var e=j(t);return T(function(t,r){return t.push((t,...e)=>{let i={};if(t&&(i.error=t),e.length>0){var n=e;e.length<=1&&([n]=e),i.value=n}r(null,i)}),e.apply(this,t)})}function pe(t){var e;return Array.isArray(t)?e=t.map(de):(e={},Object.keys(t).forEach(r=>{e[r]=de.call(this,t[r])})),e}function ye(t,e,r,i){const n=j(r);return Ut(t,e,(t,e)=>{n(t,(t,r)=>{e(t,!r)})},i)}var be=F(function(t,e,r){return ye(K,t,e,r)},3);var me=F(function(t,e,r,i){return ye(V(e),t,r,i)},4);var ge=F(function(t,e,r){return ye(tt,t,e,r)},3);function _e(t){return function(){return t}}function we(t,e,r){var i={times:5,intervalFunc:_e(0)};if(arguments.length<3&&"function"==typeof t?(r=e||nt(),e=t):(!function(t,e){if("object"==typeof e)t.times=+e.times||5,t.intervalFunc="function"==typeof e.interval?e.interval:_e(+e.interval||0),t.errorFilter=e.errorFilter;else{if("number"!=typeof e&&"string"!=typeof e)throw new Error("Invalid arguments for async.retry");t.times=+e||5}}(i,t),r=r||nt()),"function"!=typeof e)throw new Error("Invalid arguments for async.retry");var n=j(e),s=1;return function t(){n((e,...n)=>{!1!==e&&(e&&s++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(e))?setTimeout(t,i.intervalFunc(s-1)):r(e,...n))})}(),r[it]}function ve(t,e){e||(e=t,t=null);let r=t&&t.arity||e.length;N(e)&&(r+=1);var i=j(e);return T((e,n)=>{function s(t){i(...e,t)}return(e.length<r-1||null==n)&&(e.push(n),n=nt()),t?we(t,s,n):we(s,n),n[it]})}function Se(t,e){return re(tt,t,e)}var Ee=F(function(t,e,r){return xt(Boolean,t=>t)(K,t,e,r)},3);var xe=F(function(t,e,r,i){return xt(Boolean,t=>t)(V(e),t,r,i)},4);var ke=F(function(t,e,r){return xt(Boolean,t=>t)(tt,t,e,r)},3);var Te=F(function(t,e,r){var i=j(e);return X(t,(t,e)=>{i(t,(r,i)=>{if(r)return e(r);e(r,{value:t,criteria:i})})},(t,e)=>{if(t)return r(t);r(null,e.sort(n).map(t=>t.value))});function n(t,e){var r=t.criteria,i=e.criteria;return r<i?-1:r>i?1:0}},3);function Re(t,e,r){var i=j(t);return T((n,s)=>{var o,a=!1;n.push((...t)=>{a||(s(...t),clearTimeout(o))}),o=setTimeout(function(){var e=t.name||"anonymous",i=new Error('Callback function "'+e+'" timed out.');i.code="ETIMEDOUT",r&&(i.info=r),a=!0,s(i)},e),i(...n)})}function Ae(t,e,r,i){var n=j(r);return _t(function(t){for(var e=Array(t);t--;)e[t]=t;return e}(t),e,n,i)}function Le(t,e,r){return Ae(t,1/0,e,r)}function Oe(t,e,r){return Ae(t,1,e,r)}function Ie(t,e,r,i){arguments.length<=3&&"function"==typeof e&&(i=r,r=e,e=Array.isArray(t)?[]:{}),i=G(i||nt());var n=j(r);return K(t,(t,r,i)=>{n(e,t,r,i)},t=>i(t,e)),i[it]}var Pe=F(function(t,e){var r,i=null;return Ct(t,(t,e)=>{j(t)((t,...n)=>{if(!1===t)return e(t);n.length<2?[r]=n:r=n,i=t,e(t?null:{})})},()=>e(i,r))});function De(t){return(...e)=>(t.unmemoized||t)(...e)}var Me=F(function(t,e,r){r=H(r);var i=j(e),n=j(t),s=[];function o(t,...e){if(t)return r(t);s=e,!1!==t&&n(a)}function a(t,e){return t?r(t):!1!==t?e?void i(o):r(null,...s):void 0}return n(a)},3);function Ce(t,e,r){const i=j(t);return Me(t=>i((e,r)=>t(e,!r)),e,r)}var Ne,je,Fe=F(function(t,e){if(e=G(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function i(e){j(t[r++])(...e,H(n))}function n(n,...s){if(!1!==n)return n||r===t.length?e(n,...s):void i(s)}i([])}),Be={apply:k,applyEach:J,applyEachSeries:rt,asyncify:D,auto:st,autoInject:ht,cargo:pt,cargoQueue:yt,compose:gt,concat:vt,concatLimit:wt,concatSeries:St,constant:Et,detect:kt,detectLimit:Tt,detectSeries:Rt,dir:Lt,doUntil:It,doWhilst:Ot,each:Dt,eachLimit:Mt,eachOf:K,eachOfLimit:Z,eachOfSeries:tt,eachSeries:Ct,ensureAsync:Nt,every:jt,everyLimit:Ft,everySeries:Bt,filter:Gt,filterLimit:qt,filterSeries:Ht,forever:$t,groupBy:Zt,groupByLimit:Vt,groupBySeries:Yt,log:Qt,map:X,mapLimit:_t,mapSeries:et,mapValues:Xt,mapValuesLimit:Kt,mapValuesSeries:Jt,memoize:te,nextTick:ee,parallel:ie,parallelLimit:ne,priorityQueue:he,queue:se,race:ce,reduce:bt,reduceRight:fe,reflect:de,reflectAll:pe,reject:be,rejectLimit:me,rejectSeries:ge,retry:we,retryable:ve,seq:mt,series:Se,setImmediate:P,some:Ee,someLimit:xe,someSeries:ke,sortBy:Te,timeout:Re,times:Le,timesLimit:Ae,timesSeries:Oe,transform:Ie,tryEach:Pe,unmemoize:De,until:Ce,waterfall:Fe,whilst:Me,all:jt,allLimit:Ft,allSeries:Bt,any:Ee,anyLimit:xe,anySeries:ke,find:kt,findLimit:Tt,findSeries:Rt,flatMap:vt,flatMapLimit:wt,flatMapSeries:St,forEach:Dt,forEachSeries:Ct,forEachLimit:Mt,forEachOf:K,forEachOfSeries:tt,forEachOfLimit:Z,inject:bt,foldl:bt,foldr:fe,select:Gt,selectLimit:qt,selectSeries:Ht,wrapSync:D,during:Me,doDuring:Ot},ze=Object.freeze({__proto__:null,all:jt,allLimit:Ft,allSeries:Bt,any:Ee,anyLimit:xe,anySeries:ke,apply:k,applyEach:J,applyEachSeries:rt,asyncify:D,auto:st,autoInject:ht,cargo:pt,cargoQueue:yt,compose:gt,concat:vt,concatLimit:wt,concatSeries:St,constant:Et,default:Be,detect:kt,detectLimit:Tt,detectSeries:Rt,dir:Lt,doDuring:Ot,doUntil:It,doWhilst:Ot,during:Me,each:Dt,eachLimit:Mt,eachOf:K,eachOfLimit:Z,eachOfSeries:tt,eachSeries:Ct,ensureAsync:Nt,every:jt,everyLimit:Ft,everySeries:Bt,filter:Gt,filterLimit:qt,filterSeries:Ht,find:kt,findLimit:Tt,findSeries:Rt,flatMap:vt,flatMapLimit:wt,flatMapSeries:St,foldl:bt,foldr:fe,forEach:Dt,forEachLimit:Mt,forEachOf:K,forEachOfLimit:Z,forEachOfSeries:tt,forEachSeries:Ct,forever:$t,groupBy:Zt,groupByLimit:Vt,groupBySeries:Yt,inject:bt,log:Qt,map:X,mapLimit:_t,mapSeries:et,mapValues:Xt,mapValuesLimit:Kt,mapValuesSeries:Jt,memoize:te,nextTick:ee,parallel:ie,parallelLimit:ne,priorityQueue:he,queue:se,race:ce,reduce:bt,reduceRight:fe,reflect:de,reflectAll:pe,reject:be,rejectLimit:me,rejectSeries:ge,retry:we,retryable:ve,select:Gt,selectLimit:qt,selectSeries:Ht,seq:mt,series:Se,setImmediate:P,some:Ee,someLimit:xe,someSeries:ke,sortBy:Te,timeout:Re,times:Le,timesLimit:Ae,timesSeries:Oe,transform:Ie,tryEach:Pe,unmemoize:De,until:Ce,waterfall:Fe,whilst:Me,wrapSync:D}),We=r.getAugmentedNamespace(ze),Ue={exports:{}};var Ge,qe,He={exports:{}};function $e(){return qe?Ge:(qe=1,Ge=u)}var Ve,Ze={exports:{}};function Ye(){return Ve||(Ve=1,function(t,e){var r=c,i=r.Buffer;function n(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(n(r,e),e.Buffer=s),n(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(Ze,Ze.exports)),Ze.exports}var Qe,Ke,Xe,Je,tr,er,rr,ir,nr,sr,or,ar,lr,ur,hr,cr,fr,dr,pr,yr,br,mr,gr,_r,wr,vr,Sr,Er,xr,kr,Tr,Rr,Ar,Lr,Or,Ir,Pr,Dr,Mr,Cr,Nr,jr,Fr,Br,zr,Wr,Ur,Gr,qr,Hr,$r,Vr,Zr,Yr,Qr,Kr,Xr,Jr,ti,ei,ri,ii,ni,si,oi,ai,li,ui,hi,ci,fi,di,pi,yi,bi,mi,gi,_i,wi,vi,Si,Ei,xi,ki,Ti,Ri,Ai={exports:{}};function Li(){return Qe||(Qe=1,function(t){var e=Ye().Buffer,r=l;function i(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return e.alloc(0);for(var r=e.allocUnsafe(t>>>0),n=this.head,s=0;n;)i(n.data,r,s),s+=n.data.length,n=n.next;return r},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})}(Ai)),Ai.exports}function Oi(){if(Xe)return Ke;Xe=1;var t=h.requireProcessNextickArgs();function e(t,e){t.emit("error",e)}return Ke={destroy:function(r,i){var n=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(i?i(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(e,this,r)):t.nextTick(e,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(r){!i&&r?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,t.nextTick(e,n,r)):t.nextTick(e,n,r):i&&i(r)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}function Ii(){if(tr)return Je;tr=1;var t=h.requireProcessNextickArgs();function e(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}(e,t)}}Je=b;var i,n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:t.nextTick;b.WritableState=y;var s=Object.create(h.requireUtil());s.inherits=f.requireInherits();var o={deprecate:h.requireNode()},a=$e(),l=Ye().Buffer,u=(void 0!==r.commonjsGlobal?r.commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,d=Oi();function p(){}function y(r,s){i=i||Pi(),r=r||{};var o=s instanceof i;this.objectMode=!!r.objectMode,o&&(this.objectMode=this.objectMode||!!r.writableObjectMode);var a=r.highWaterMark,l=r.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:o&&(l||0===l)?l:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===r.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,r){var i=e._writableState,s=i.sync,o=i.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),r)!function(e,r,i,n,s){--r.pendingcb,i?(t.nextTick(s,n),t.nextTick(S,e,r),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),S(e,r))}(e,i,s,r,o);else{var a=w(i);a||i.corked||i.bufferProcessing||!i.bufferedRequest||_(e,i),s?n(g,e,i,a,o):g(e,i,a,o)}}(s,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function b(t){if(i=i||Pi(),!(c.call(b,this)||this instanceof i))return new b(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function m(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function g(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),S(t,e)}function _(t,r){r.bufferProcessing=!0;var i=r.bufferedRequest;if(t._writev&&i&&i.next){var n=r.bufferedRequestCount,s=new Array(n),o=r.corkedRequestsFree;o.entry=i;for(var a=0,l=!0;i;)s[a]=i,i.isBuf||(l=!1),i=i.next,a+=1;s.allBuffers=l,m(t,r,!0,r.length,s,"",o.finish),r.pendingcb++,r.lastBufferedRequest=null,o.next?(r.corkedRequestsFree=o.next,o.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;i;){var u=i.chunk,h=i.encoding,c=i.callback;if(m(t,r,!1,r.objectMode?1:u.length,u,h,c),i=i.next,r.bufferedRequestCount--,r.writing)break}null===i&&(r.lastBufferedRequest=null)}r.bufferedRequest=i,r.bufferProcessing=!1}function w(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function v(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)})}function S(e,r){var i=w(r);return i&&(!function(e,r){r.prefinished||r.finalCalled||("function"==typeof e._final?(r.pendingcb++,r.finalCalled=!0,t.nextTick(v,e,r)):(r.prefinished=!0,e.emit("prefinish")))}(e,r),0===r.pendingcb&&(r.finished=!0,e.emit("finish"))),i}return s.inherits(b,a),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===b&&(t&&t._writableState instanceof y)}})):c=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,r,i){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,l.isBuffer(n)||n instanceof u);return a&&!l.isBuffer(e)&&(e=function(t){return l.from(t)}(e)),"function"==typeof r&&(i=r,r=null),a?r="buffer":r||(r=s.defaultEncoding),"function"!=typeof i&&(i=p),s.ended?function(e,r){var i=new Error("write after end");e.emit("error",i),t.nextTick(r,i)}(this,i):(a||function(e,r,i,n){var s=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||r.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),t.nextTick(n,o),s=!1),s}(this,s,e,i))&&(s.pendingcb++,o=function(t,e,r,i,n,s){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,r));return e}(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else m(t,e,!1,a,i,n,s);return u}(this,s,a,e,r,i)),o},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||_(this,t))},b.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,r,i){var n=this._writableState;"function"==typeof e?(i=e,e=null,r=null):"function"==typeof r&&(i=r,r=null),null!=e&&this.write(e,r),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,r,i){r.ending=!0,S(e,r),i&&(r.finished?t.nextTick(i):e.once("finish",i));r.ended=!0,e.writable=!1}(this,n,i)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=d.destroy,b.prototype._undestroy=d.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)},Je}function Pi(){if(rr)return er;rr=1;var t=h.requireProcessNextickArgs(),e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};er=l;var r=Object.create(h.requireUtil());r.inherits=f.requireInherits();var i=Di(),n=Ii();r.inherits(l,i);for(var s=e(n.prototype),o=0;o<s.length;o++){var a=s[o];l.prototype[a]||(l.prototype[a]=n.prototype[a])}function l(t){if(!(this instanceof l))return new l(t);i.call(this,t),n.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||t.nextTick(c,this)}function c(t){t.end()}return Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(e,r){this.push(null),this.end(),t.nextTick(r,e)},er}function Di(){if(nr)return ir;nr=1;var t=h.requireProcessNextickArgs();ir=w;var e,i=h.requireIsarray();w.ReadableState=_,n.EventEmitter;var s=function(t,e){return t.listeners(e).length},o=$e(),a=Ye().Buffer,u=(void 0!==r.commonjsGlobal?r.commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c=Object.create(h.requireUtil());c.inherits=f.requireInherits();var d=l,p=void 0;p=d&&d.debuglog?d.debuglog("stream"):function(){};var y,b=Li(),m=Oi();c.inherits(w,o);var g=["error","close","destroy","pause","resume"];function _(t,r){t=t||{};var i=r instanceof(e=e||Pi());this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,s=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(y||(y=h.requireString_decoder().StringDecoder),this.decoder=new y(t.encoding),this.encoding=t.encoding)}function w(t){if(e=e||Pi(),!(this instanceof w))return new w(t);this._readableState=new _(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function v(t,e,r,i,n){var s,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,k(t)}(t,o)):(n||(s=function(t,e){var r;i=e,a.isBuffer(i)||i instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(o,e)),s?t.emit("error",s):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),i?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):S(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?S(t,o,e,!1):R(t,o)):S(t,o,e,!1))):i||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function S(t,e,r,i){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),R(t,e)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(t,e){this.push(null),e(t)},w.prototype.push=function(t,e){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof t&&((e=e||i.defaultEncoding)!==i.encoding&&(t=a.from(t,e),e=""),r=!0),v(this,t,e,!1,r)},w.prototype.unshift=function(t){return v(this,t,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return y||(y=h.requireString_decoder().StringDecoder),this._readableState.decoder=new y(t),this._readableState.encoding=t,this};var E=8388608;function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(p("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?t.nextTick(T,e):T(e))}function T(t){p("emit readable"),t.emit("readable"),I(t)}function R(e,r){r.readingMore||(r.readingMore=!0,t.nextTick(A,e,r))}function A(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function L(t){p("readable nexttick read 0"),t.read(0)}function O(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),I(t),e.flowing&&!e.reading&&t.read(0)}function I(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function P(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):i=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,i=1,n=r.data;t-=n.length;for(;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?n+=s:n+=s.slice(0,t),0===(t-=o)){o===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=a.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var s=i.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),0===(t-=o)){o===s.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=s.slice(o));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function D(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,t.nextTick(M,r,e))}function M(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function C(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}return w.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&D(this),null;var i,n=e.needReadable;return p("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",n=!0),e.ended||e.reading?p("reading or ended",n=!1):n&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(i=t>0?P(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==i&&this.emit("data",i),i},w.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,r){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,r);var a=(!r||!1!==r.end)&&e!==process.stdout&&e!==process.stderr?u:g;function l(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",b),e.removeListener("finish",m),e.removeListener("drain",h),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",d),c=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){p("onend"),e.end()}o.endEmitted?t.nextTick(a):n.once("end",a),e.on("unpipe",l);var h=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,I(t))}}(n);e.on("drain",h);var c=!1;var f=!1;function d(t){p("ondata"),f=!1,!1!==e.write(t)||f||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==C(o.pipes,e))&&!c&&(p("false write response, pause",o.awaitDrain),o.awaitDrain++,f=!0),n.pause())}function y(t){p("onerror",t),g(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",m),g()}function m(){p("onfinish"),e.removeListener("close",b),g()}function g(){p("unpipe"),n.unpipe(e)}return n.on("data",d),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?i(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(e,"error",y),e.once("close",b),e.once("finish",m),e.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),e},w.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=C(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},w.prototype.on=function(e,r){var i=o.prototype.on.call(this,e,r);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):t.nextTick(L,this))}return i},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(O,e,r))}(this,e)),this},w.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(n){(p("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))}),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<g.length;s++)t.on(g[s],this.emit.bind(this,g[s]));return this._read=function(e){p("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=P,ir}function Mi(){if(or)return sr;or=1,sr=i;var t=Pi(),e=Object.create(h.requireUtil());function r(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);t.call(this,e),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",n)}function n(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(this,null,null)}function s(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}return e.inherits=f.requireInherits(),e.inherits(i,t),i.prototype.push=function(e,r){return this._transformState.needTransform=!1,t.prototype.push.call(this,e,r)},i.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},i.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},i.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},i.prototype._destroy=function(e,r){var i=this;t.prototype._destroy.call(this,e,function(t){r(t),i.emit("close")})},sr}function Ci(){return ur||(ur=1,t=He,e=He.exports,(r=u)?(t.exports=r,(e=t.exports=r.Readable).Readable=r.Readable,e.Writable=r.Writable,e.Duplex=r.Duplex,e.Transform=r.Transform,e.PassThrough=r.PassThrough,e.Stream=r):((e=t.exports=Di()).Stream=r||e,e.Readable=e,e.Writable=Ii(),e.Duplex=Pi(),e.Transform=Mi(),e.PassThrough=function(){if(lr)return ar;lr=1,ar=r;var t=Mi(),e=Object.create(h.requireUtil());function r(e){if(!(this instanceof r))return new r(e);t.call(this,e)}return e.inherits=f.requireInherits(),e.inherits(r,t),r.prototype._transform=function(t,e,r){r(null,t)},ar}())),He.exports;var t,e,r}function Ni(){if(dr)return fr;dr=1;var t=l,e=cr?hr:(cr=1,hr=Ci().PassThrough);function r(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function i(t,n){if(!(this instanceof i))return new i(t,n);e.call(this,n),r(this,"_read",function(){var e=t.call(this,n),r=this.emit.bind(this,"error");e.on("error",r),e.pipe(this)}),this.emit("readable")}function n(t,i){if(!(this instanceof n))return new n(t,i);e.call(this,i),r(this,"_write",function(){var e=t.call(this,i),r=this.emit.bind(this,"error");e.on("error",r),this.pipe(e)}),this.emit("writable")}return fr={Readable:i,Writable:n},t.inherits(i,e),t.inherits(n,e),fr}
|
|
2
|
+
/*!
|
|
3
|
+
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
6
|
+
* Released under the MIT License.
|
|
7
|
+
*/function ji(){return yr?pr:(yr=1,pr=function(t,e){if("string"!=typeof t)throw new TypeError("expected path to be a string");if("\\"===t||"/"===t)return"/";var r=t.length;if(r<=1)return t;var i="";if(r>4&&"\\"===t[3]){var n=t[2];"?"!==n&&"."!==n||"\\\\"!==t.slice(0,2)||(t=t.slice(2),i="//")}var s=t.split(/[/\\]+/);return!1!==e&&""===s[s.length-1]&&s.pop(),i+s.join("/")})}function Fi(){if(mr)return br;return mr=1,br=function(t){return t}}function Bi(){if(vr)return wr;vr=1;var t=_r?gr:(_r=1,gr=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}),e=Math.max;return wr=function(r,i,n){return i=e(void 0===i?r.length-1:i,0),function(){for(var s=arguments,o=-1,a=e(s.length-i,0),l=Array(a);++o<a;)l[o]=s[i+o];o=-1;for(var u=Array(i+1);++o<i;)u[o]=s[o];return u[i]=n(l),t(r,this,u)}},wr}function zi(){if(kr)return xr;kr=1;var t="object"==typeof r.commonjsGlobal&&r.commonjsGlobal&&r.commonjsGlobal.Object===Object&&r.commonjsGlobal;return xr=t}function Wi(){if(Rr)return Tr;Rr=1;var t=zi(),e="object"==typeof self&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return Tr=r}function Ui(){if(Lr)return Ar;Lr=1;var t=Wi().Symbol;return Ar=t}function Gi(){if(Cr)return Mr;Cr=1;var t=Ui(),e=function(){if(Ir)return Or;Ir=1;var t=Ui(),e=Object.prototype,r=e.hasOwnProperty,i=e.toString,n=t?t.toStringTag:void 0;return Or=function(t){var e=r.call(t,n),s=t[n];try{t[n]=void 0;var o=!0}catch(t){}var a=i.call(t);return o&&(e?t[n]=s:delete t[n]),a}}(),r=function(){if(Dr)return Pr;Dr=1;var t=Object.prototype.toString;return Pr=function(e){return t.call(e)}}(),i=t?t.toStringTag:void 0;return Mr=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":i&&i in Object(t)?e(t):r(t)}}function qi(){if(jr)return Nr;return jr=1,Nr=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function Hi(){if(Br)return Fr;Br=1;var t=Gi(),e=qi();return Fr=function(r){if(!e(r))return!1;var i=t(r);return"[object Function]"==i||"[object GeneratorFunction]"==i||"[object AsyncFunction]"==i||"[object Proxy]"==i}}function $i(){if(Gr)return Ur;Gr=1;var t,e=function(){if(Wr)return zr;Wr=1;var t=Wi()["__core-js_shared__"];return zr=t}(),r=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return Ur=function(t){return!!r&&r in t}}function Vi(){if(Vr)return $r;Vr=1;var t=Hi(),e=$i(),r=qi(),i=function(){if(Hr)return qr;Hr=1;var t=Function.prototype.toString;return qr=function(e){if(null!=e){try{return t.call(e)}catch(t){}try{return e+""}catch(t){}}return""}}(),n=/^\[object .+?Constructor\]$/,s=Function.prototype,o=Object.prototype,a=s.toString,l=o.hasOwnProperty,u=RegExp("^"+a.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return $r=function(s){return!(!r(s)||e(s))&&(t(s)?u:n).test(i(s))}}function Zi(){if(Kr)return Qr;Kr=1;var t=Vi(),e=Yr?Zr:(Yr=1,Zr=function(t,e){return null==t?void 0:t[e]});return Qr=function(r,i){var n=e(r,i);return t(n)?n:void 0}}function Yi(){if(ei)return ti;ei=1;var t=Er?Sr:(Er=1,Sr=function(t){return function(){return t}}),e=function(){if(Jr)return Xr;Jr=1;var t=Zi(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();return Xr=e}(),r=Fi();return ti=e?function(r,i){return e(r,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:r}function Qi(){if(si)return ni;si=1;var t=Yi(),e=function(){if(ii)return ri;ii=1;var t=Date.now;return ri=function(e){var r=0,i=0;return function(){var n=t(),s=16-(n-i);if(i=n,s>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}},ri}(),r=e(t);return ni=r}function Ki(){if(ai)return oi;ai=1;var t=Fi(),e=Bi(),r=Qi();return oi=function(i,n){return r(e(i,n,t),i+"")}}function Xi(){if(ui)return li;return ui=1,li=function(t,e){return t===e||t!=t&&e!=e}}function Ji(){if(ci)return hi;ci=1;return hi=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function tn(){if(di)return fi;di=1;var t=Hi(),e=Ji();return fi=function(r){return null!=r&&e(r.length)&&!t(r)}}function en(){if(yi)return pi;yi=1;var t=/^(?:0|[1-9]\d*)$/;return pi=function(e,r){var i=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<r}}function rn(){if(vi)return wi;return vi=1,wi=function(t){return null!=t&&"object"==typeof t}}function nn(){if(ki)return xi;ki=1;var t=function(){if(Ei)return Si;Ei=1;var t=Gi(),e=rn();return Si=function(r){return e(r)&&"[object Arguments]"==t(r)}}(),e=rn(),r=Object.prototype,i=r.hasOwnProperty,n=r.propertyIsEnumerable,s=t(function(){return arguments}())?t:function(t){return e(t)&&i.call(t,"callee")&&!n.call(t,"callee")};return xi=s}function sn(){if(Ri)return Ti;Ri=1;var t=Array.isArray;return Ti=t}var on,an,ln,un,hn,cn,fn,dn={exports:{}};function pn(){return ln||(ln=1,function(t,e){var r=Wi(),i=an?on:(an=1,on=function(){return!1}),n=e&&!e.nodeType&&e,s=n&&t&&!t.nodeType&&t,o=s&&s.exports===n?r.Buffer:void 0,a=(o?o.isBuffer:void 0)||i;t.exports=a}(dn,dn.exports)),dn.exports}function yn(){if(fn)return cn;return fn=1,cn=function(t){return function(e){return t(e)}}}var bn,mn,gn,_n,wn,vn,Sn,En,xn,kn,Tn,Rn,An,Ln,On,In={exports:{}};function Pn(){if(gn)return mn;gn=1;var t=function(){if(hn)return un;hn=1;var t=Gi(),e=Ji(),r=rn(),i={};return i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,un=function(n){return r(n)&&e(n.length)&&!!i[t(n)]}}(),e=yn(),r=function(){return bn||(bn=1,t=In,e=In.exports,r=zi(),i=e&&!e.nodeType&&e,n=i&&t&&!t.nodeType&&t,s=n&&n.exports===i&&r.process,o=function(){try{return n&&n.require&&n.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}(),t.exports=o),In.exports;var t,e,r,i,n,s,o}(),i=r&&r.isTypedArray,n=i?e(i):t;return mn=n}function Dn(){if(wn)return _n;wn=1;var t=(_i||(_i=1,gi=function(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}),gi),e=nn(),r=sn(),i=pn(),n=en(),s=Pn(),o=Object.prototype.hasOwnProperty;return _n=function(a,l){var u=r(a),h=!u&&e(a),c=!u&&!h&&i(a),f=!u&&!h&&!c&&s(a),d=u||h||c||f,p=d?t(a.length,String):[],y=p.length;for(var b in a)!l&&!o.call(a,b)||d&&("length"==b||c&&("offset"==b||"parent"==b)||f&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||n(b,y))||p.push(b);return p}}function Mn(){if(Tn)return kn;Tn=1;var t=qi(),e=function(){if(Sn)return vn;Sn=1;var t=Object.prototype;return vn=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}}(),r=xn?En:(xn=1,En=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}),i=Object.prototype.hasOwnProperty;return kn=function(n){if(!t(n))return r(n);var s=e(n),o=[];for(var a in n)("constructor"!=a||!s&&i.call(n,a))&&o.push(a);return o}}function Cn(){if(On)return Ln;On=1;var t=Ki(),e=Xi(),r=function(){if(mi)return bi;mi=1;var t=Xi(),e=tn(),r=en(),i=qi();return bi=function(n,s,o){if(!i(o))return!1;var a=typeof s;return!!("number"==a?e(o)&&r(s,o.length):"string"==a&&s in o)&&t(o[s],n)},bi}(),i=function(){if(An)return Rn;An=1;var t=Dn(),e=Mn(),r=tn();return Rn=function(i){return r(i)?t(i,!0):e(i)}}(),n=Object.prototype,s=n.hasOwnProperty,o=t(function(t,o){t=Object(t);var a=-1,l=o.length,u=l>2?o[2]:void 0;for(u&&r(o[0],o[1],u)&&(l=1);++a<l;)for(var h=o[a],c=i(h),f=-1,d=c.length;++f<d;){var p=c[f],y=t[p];(void 0===y||e(y,n[p])&&!s.call(t,p))&&(t[p]=h[p])}return t});return Ln=o}var Nn,jn,Fn={exports:{}},Bn={exports:{}};function zn(){if(jn)return Nn;jn=1;class t extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError("Expected input to be an Array, got "+typeof t);let e="";for(let r=0;r<t.length;r++)e+=` ${t[r].stack}\n`;super(e),this.name="AggregateError",this.errors=t}}return Nn={AggregateError:t,ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,e)=>t.includes(e),ArrayPrototypeIndexOf:(t,e)=>t.indexOf(e),ArrayPrototypeJoin:(t,e)=>t.join(e),ArrayPrototypeMap:(t,e)=>t.map(e),ArrayPrototypePop:(t,e)=>t.pop(e),ArrayPrototypePush:(t,e)=>t.push(e),ArrayPrototypeSlice:(t,e,r)=>t.slice(e,r),Error:Error,FunctionPrototypeCall:(t,e,...r)=>t.call(e,...r),FunctionPrototypeSymbolHasInstance:(t,e)=>Function.prototype[Symbol.hasInstance].call(t,e),MathFloor:Math.floor,Number:Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,e)=>Object.defineProperties(t,e),ObjectDefineProperty:(t,e,r)=>Object.defineProperty(t,e,r),ObjectGetOwnPropertyDescriptor:(t,e)=>Object.getOwnPropertyDescriptor(t,e),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,e)=>Object.setPrototypeOf(t,e),Promise:Promise,PromisePrototypeCatch:(t,e)=>t.catch(e),PromisePrototypeThen:(t,e,r)=>t.then(e,r),PromiseReject:t=>Promise.reject(t),PromiseResolve:t=>Promise.resolve(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,e)=>t.test(e),SafeSet:Set,String:String,StringPrototypeSlice:(t,e,r)=>t.slice(e,r),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(t,e,r)=>t.set(e,r),Boolean:Boolean,Uint8Array:Uint8Array}}var Wn,Un,Gn,qn,Hn={exports:{}};function $n(){return Un?Wn:(Un=1,Wn={format:(t,...e)=>t.replace(/%([sdifj])/g,function(...[t,r]){const i=e.shift();if("f"===r)return i.toFixed(6);if("j"===r)return JSON.stringify(i);if("s"===r&&"object"==typeof i){return`${i.constructor!==Object?i.constructor.name:""} {}`.trim()}return i.toString()}),inspect(t){switch(typeof t){case"string":if(t.includes("'")){if(!t.includes('"'))return`"${t}"`;if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}})}function Vn(){if(qn)return Gn;qn=1;const{format:t,inspect:e}=$n(),{AggregateError:r}=zn(),i=globalThis.AggregateError||r,n=Symbol("kIsNodeError"),s=["string","function","number","object","Function","Object","boolean","bigint","symbol"],o=/^([A-Z][a-z0-9]*)+$/,a={};function l(t,e){if(!t)throw new a.ERR_INTERNAL_ASSERTION(e)}function u(t){let e="",r=t.length;const i="-"===t[0]?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function h(e,r,i){i||(i=Error);class s extends i{constructor(...i){super(function(e,r,i){if("function"==typeof r)return l(r.length<=i.length,`Code: ${e}; The provided arguments length (${i.length}) does not match the required ones (${r.length}).`),r(...i);const n=(r.match(/%[dfijoOs]/g)||[]).length;return l(n===i.length,`Code: ${e}; The provided arguments length (${i.length}) does not match the required ones (${n}).`),0===i.length?r:t(r,...i)}(e,r,i))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(s.prototype,{name:{value:i.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),s.prototype.code=e,s.prototype[n]=!0,a[e]=s}function c(t){const e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t}class f extends Error{constructor(t="The operation was aborted",e=void 0){if(void 0!==e&&"object"!=typeof e)throw new a.ERR_INVALID_ARG_TYPE("options","Object",e);super(t,e),this.code="ABORT_ERR",this.name="AbortError"}}return h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",(t,r,i)=>{l("string"==typeof t,"'name' must be a string"),Array.isArray(r)||(r=[r]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";const a=[],u=[],h=[];for(const t of r)l("string"==typeof t,"All expected entries have to be of type string"),s.includes(t)?a.push(t.toLowerCase()):o.test(t)?u.push(t):(l("object"!==t,'The value "object" should be written as "Object"'),h.push(t));if(u.length>0){const t=a.indexOf("object");-1!==t&&(a.splice(a,t,1),u.push("Object"))}if(a.length>0){switch(a.length){case 1:n+=`of type ${a[0]}`;break;case 2:n+=`one of type ${a[0]} or ${a[1]}`;break;default:{const t=a.pop();n+=`one of type ${a.join(", ")}, or ${t}`}}(u.length>0||h.length>0)&&(n+=" or ")}if(u.length>0){switch(u.length){case 1:n+=`an instance of ${u[0]}`;break;case 2:n+=`an instance of ${u[0]} or ${u[1]}`;break;default:{const t=u.pop();n+=`an instance of ${u.join(", ")}, or ${t}`}}h.length>0&&(n+=" or ")}switch(h.length){case 0:break;case 1:h[0].toLowerCase()!==h[0]&&(n+="an "),n+=`${h[0]}`;break;case 2:n+=`one of ${h[0]} or ${h[1]}`;break;default:{const t=h.pop();n+=`one of ${h.join(", ")}, or ${t}`}}if(null==i)n+=`. Received ${i}`;else if("function"==typeof i&&i.name)n+=`. Received function ${i.name}`;else if("object"==typeof i){var c;if(null!==(c=i.constructor)&&void 0!==c&&c.name)n+=`. Received an instance of ${i.constructor.name}`;else{n+=`. Received ${e(i,{depth:-1})}`}}else{let t=e(i,{colors:!1});t.length>25&&(t=`${t.slice(0,25)}...`),n+=`. Received type ${typeof i} (${t})`}return n},TypeError),h("ERR_INVALID_ARG_VALUE",(t,r,i="is invalid")=>{let n=e(r);n.length>128&&(n=n.slice(0,128)+"...");return`The ${t.includes(".")?"property":"argument"} '${t}' ${i}. Received ${n}`},TypeError),h("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var i;return`Expected ${t} to be returned from the "${e}" function but got ${null!=r&&null!==(i=r.constructor)&&void 0!==i&&i.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`},TypeError),h("ERR_MISSING_ARGS",(...t)=>{let e;l(t.length>0,"At least one arg needs to be specified");const r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(t=>`"${t}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const r=t.pop();e+=`The ${t.join(", ")}, and ${r} arguments`}}return`${e} must be specified`},TypeError),h("ERR_OUT_OF_RANGE",(t,r,i)=>{let n;if(l(r,'Missing "range" argument'),Number.isInteger(i)&&Math.abs(i)>2**32)n=u(String(i));else if("bigint"==typeof i){n=String(i);const t=BigInt(2)**BigInt(32);(i>t||i<-t)&&(n=u(n)),n+="n"}else n=e(i);return`The value of "${t}" is out of range. It must be ${r}. Received ${n}`},RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),Gn={AbortError:f,aggregateTwoErrors:c(function(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const r=new i([e,t],e.message);return r.code=e.code,r}return t||e}),hideStackFrames:c,codes:a}}
|
|
8
|
+
/**
|
|
9
|
+
* @author Toru Nagashima <https://github.com/mysticatea>
|
|
10
|
+
* @copyright 2015 Toru Nagashima. All rights reserved.
|
|
11
|
+
* See LICENSE file in root directory for full license.
|
|
12
|
+
*/const Zn=new WeakMap,Yn=new WeakMap;function Qn(t){const e=Zn.get(t);return console.assert(null!=e,"'this' is expected an Event object, but got",t),e}function Kn(t){null==t.passiveListener?t.event.cancelable&&(t.canceled=!0,"function"==typeof t.event.preventDefault&&t.event.preventDefault()):"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",t.passiveListener)}function Xn(t,e){Zn.set(this,{eventTarget:t,event:e,eventPhase:2,currentTarget:t,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:e.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const r=Object.keys(e);for(let t=0;t<r.length;++t){const e=r[t];e in this||Object.defineProperty(this,e,Jn(e))}}function Jn(t){return{get(){return Qn(this).event[t]},set(e){Qn(this).event[t]=e},configurable:!0,enumerable:!0}}function ts(t){return{value(){const e=Qn(this).event;return e[t].apply(e,arguments)},configurable:!0,enumerable:!0}}function es(t){if(null==t||t===Object.prototype)return Xn;let e=Yn.get(t);return null==e&&(e=function(t,e){const r=Object.keys(e);if(0===r.length)return t;function i(e,r){t.call(this,e,r)}i.prototype=Object.create(t.prototype,{constructor:{value:i,configurable:!0,writable:!0}});for(let n=0;n<r.length;++n){const s=r[n];if(!(s in t.prototype)){const t="function"==typeof Object.getOwnPropertyDescriptor(e,s).value;Object.defineProperty(i.prototype,s,t?ts(s):Jn(s))}}return i}(es(Object.getPrototypeOf(t)),t),Yn.set(t,e)),e}function rs(t){return Qn(t).immediateStopped}function is(t,e){Qn(t).passiveListener=e}Xn.prototype={get type(){return Qn(this).event.type},get target(){return Qn(this).eventTarget},get currentTarget(){return Qn(this).currentTarget},composedPath(){const t=Qn(this).currentTarget;return null==t?[]:[t]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return Qn(this).eventPhase},stopPropagation(){const t=Qn(this);t.stopped=!0,"function"==typeof t.event.stopPropagation&&t.event.stopPropagation()},stopImmediatePropagation(){const t=Qn(this);t.stopped=!0,t.immediateStopped=!0,"function"==typeof t.event.stopImmediatePropagation&&t.event.stopImmediatePropagation()},get bubbles(){return Boolean(Qn(this).event.bubbles)},get cancelable(){return Boolean(Qn(this).event.cancelable)},preventDefault(){Kn(Qn(this))},get defaultPrevented(){return Qn(this).canceled},get composed(){return Boolean(Qn(this).event.composed)},get timeStamp(){return Qn(this).timeStamp},get srcElement(){return Qn(this).eventTarget},get cancelBubble(){return Qn(this).stopped},set cancelBubble(t){if(!t)return;const e=Qn(this);e.stopped=!0,"boolean"==typeof e.event.cancelBubble&&(e.event.cancelBubble=!0)},get returnValue(){return!Qn(this).canceled},set returnValue(t){t||Kn(Qn(this))},initEvent(){}},Object.defineProperty(Xn.prototype,"constructor",{value:Xn,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.Event&&(Object.setPrototypeOf(Xn.prototype,window.Event.prototype),Yn.set(window.Event.prototype,Xn));const ns=new WeakMap;function ss(t){return null!==t&&"object"==typeof t}function os(t){const e=ns.get(t);if(null==e)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return e}function as(t,e){Object.defineProperty(t,`on${e}`,function(t){return{get(){let e=os(this).get(t);for(;null!=e;){if(3===e.listenerType)return e.listener;e=e.next}return null},set(e){"function"==typeof e||ss(e)||(e=null);const r=os(this);let i=null,n=r.get(t);for(;null!=n;)3===n.listenerType?null!==i?i.next=n.next:null!==n.next?r.set(t,n.next):r.delete(t):i=n,n=n.next;if(null!==e){const n={listener:e,listenerType:3,passive:!1,once:!1,next:null};null===i?r.set(t,n):i.next=n}},configurable:!0,enumerable:!0}}(e))}function ls(t){function e(){us.call(this)}e.prototype=Object.create(us.prototype,{constructor:{value:e,configurable:!0,writable:!0}});for(let r=0;r<t.length;++r)as(e.prototype,t[r]);return e}function us(){if(!(this instanceof us)){if(1===arguments.length&&Array.isArray(arguments[0]))return ls(arguments[0]);if(arguments.length>0){const t=new Array(arguments.length);for(let e=0;e<arguments.length;++e)t[e]=arguments[e];return ls(t)}throw new TypeError("Cannot call a class as a function")}ns.set(this,new Map)}us.prototype={addEventListener(t,e,r){if(null==e)return;if("function"!=typeof e&&!ss(e))throw new TypeError("'listener' should be a function or an object.");const i=os(this),n=ss(r),s=(n?Boolean(r.capture):Boolean(r))?1:2,o={listener:e,listenerType:s,passive:n&&Boolean(r.passive),once:n&&Boolean(r.once),next:null};let a=i.get(t);if(void 0===a)return void i.set(t,o);let l=null;for(;null!=a;){if(a.listener===e&&a.listenerType===s)return;l=a,a=a.next}l.next=o},removeEventListener(t,e,r){if(null==e)return;const i=os(this),n=(ss(r)?Boolean(r.capture):Boolean(r))?1:2;let s=null,o=i.get(t);for(;null!=o;){if(o.listener===e&&o.listenerType===n)return void(null!==s?s.next=o.next:null!==o.next?i.set(t,o.next):i.delete(t));s=o,o=o.next}},dispatchEvent(t){if(null==t||"string"!=typeof t.type)throw new TypeError('"event.type" should be a string.');const e=os(this),r=t.type;let i=e.get(r);if(null==i)return!0;const n=function(t,e){return new(es(Object.getPrototypeOf(e)))(t,e)}(this,t);let s=null;for(;null!=i;){if(i.once?null!==s?s.next=i.next:null!==i.next?e.set(r,i.next):e.delete(r):s=i,is(n,i.passive?i.listener:null),"function"==typeof i.listener)try{i.listener.call(this,n)}catch(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t)}else 3!==i.listenerType&&"function"==typeof i.listener.handleEvent&&i.listener.handleEvent(n);if(rs(n))break;i=i.next}return is(n,null),function(t,e){Qn(t).eventPhase=e}(n,0),function(t,e){Qn(t).currentTarget=e}(n,null),!n.defaultPrevented}},Object.defineProperty(us.prototype,"constructor",{value:us,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.EventTarget&&Object.setPrototypeOf(us.prototype,window.EventTarget.prototype);class hs extends us{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const t=cs.get(this);if("boolean"!=typeof t)throw new TypeError("Expected 'this' to be an 'AbortSignal' object, but got "+(null===this?"null":typeof this));return t}}as(hs.prototype,"abort");const cs=new WeakMap;Object.defineProperties(hs.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(hs.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class fs{constructor(){ds.set(this,function(){const t=Object.create(hs.prototype);return us.call(t),cs.set(t,!1),t}())}get signal(){return ps(this)}abort(){var t;t=ps(this),!1===cs.get(t)&&(cs.set(t,!0),t.dispatchEvent({type:"abort"}))}}const ds=new WeakMap;function ps(t){const e=ds.get(t);if(null==e)throw new TypeError("Expected 'this' to be an 'AbortController' object, but got "+(null===t?"null":typeof t));return e}Object.defineProperties(fs.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(fs.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});var ys,bs=Object.freeze({__proto__:null,AbortController:fs,AbortSignal:hs,default:fs}),ms=r.getAugmentedNamespace(bs);function gs(){return ys||(ys=1,function(t){const e=c,{format:r,inspect:i}=$n(),{codes:{ERR_INVALID_ARG_TYPE:s}}=Vn(),{kResistStopPropagation:o,AggregateError:a,SymbolDispose:l}=zn(),u=globalThis.AbortSignal||ms.AbortSignal,h=globalThis.AbortController||ms.AbortController,f=Object.getPrototypeOf(async function(){}).constructor,d=globalThis.Blob||e.Blob,p=void 0!==d?function(t){return t instanceof d}:function(t){return!1},y=(t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new s(e,"AbortSignal",t)};t.exports={AggregateError:a,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((r,i)=>{t=r,e=i}),resolve:t,reject:e}},promisify:t=>new Promise((e,r)=>{t((t,...i)=>t?r(t):e(...i))}),debuglog:()=>function(){},format:r,inspect:i,types:{isAsyncFunction:t=>t instanceof f,isArrayBufferView:t=>ArrayBuffer.isView(t)},isBlob:p,deprecate:(t,e)=>t,addAbortListener:n.addAbortListener||function(t,e){if(void 0===t)throw new s("signal","AbortSignal",t);let r;return y(t,"signal"),((t,e)=>{if("function"!=typeof t)throw new s(e,"Function",t)})(e,"listener"),t.aborted?queueMicrotask(()=>e()):(t.addEventListener("abort",e,{__proto__:null,once:!0,[o]:!0}),r=()=>{t.removeEventListener("abort",e)}),{__proto__:null,[l](){var t;null===(t=r)||void 0===t||t()}}},AbortSignalAny:u.any||function(t){if(1===t.length)return t[0];const e=new h,r=()=>e.abort();return t.forEach(t=>{y(t,"signals"),t.addEventListener("abort",r,{once:!0})}),e.signal.addEventListener("abort",()=>{t.forEach(t=>t.removeEventListener("abort",r))},{once:!0}),e.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}(Hn)),Hn.exports}var _s,ws,vs={};function Ss(){if(ws)return _s;ws=1;const{ArrayIsArray:t,ArrayPrototypeIncludes:e,ArrayPrototypeJoin:r,ArrayPrototypeMap:i,NumberIsInteger:n,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:o,NumberMIN_SAFE_INTEGER:a,NumberParseInt:l,ObjectPrototypeHasOwnProperty:u,RegExpPrototypeExec:h,String:c,StringPrototypeToUpperCase:f,StringPrototypeTrim:d}=zn(),{hideStackFrames:p,codes:{ERR_SOCKET_BAD_PORT:y,ERR_INVALID_ARG_TYPE:b,ERR_INVALID_ARG_VALUE:m,ERR_OUT_OF_RANGE:g,ERR_UNKNOWN_SIGNAL:_}}=Vn(),{normalizeEncoding:w}=gs(),{isAsyncFunction:v,isArrayBufferView:S}=gs().types,E={};const x=/^[0-7]+$/;const k=p((t,e,r=a,i=o)=>{if("number"!=typeof t)throw new b(e,"number",t);if(!n(t))throw new g(e,"an integer",t);if(t<r||t>i)throw new g(e,`>= ${r} && <= ${i}`,t)}),T=p((t,e,r=-2147483648,i=2147483647)=>{if("number"!=typeof t)throw new b(e,"number",t);if(!n(t))throw new g(e,"an integer",t);if(t<r||t>i)throw new g(e,`>= ${r} && <= ${i}`,t)}),R=p((t,e,r=!1)=>{if("number"!=typeof t)throw new b(e,"number",t);if(!n(t))throw new g(e,"an integer",t);const i=r?1:0,s=4294967295;if(t<i||t>s)throw new g(e,`>= ${i} && <= ${s}`,t)});function A(t,e){if("string"!=typeof t)throw new b(e,"string",t)}const L=p((t,n,s)=>{if(!e(s,t)){const e=r(i(s,t=>"string"==typeof t?`'${t}'`:c(t)),", ");throw new m(n,t,"must be one of: "+e)}});function O(t,e){if("boolean"!=typeof t)throw new b(e,"boolean",t)}function I(t,e,r){return null!=t&&u(t,e)?t[e]:r}const P=p((e,r,i=null)=>{const n=I(i,"allowArray",!1),s=I(i,"allowFunction",!1);if(!I(i,"nullable",!1)&&null===e||!n&&t(e)||"object"!=typeof e&&(!s||"function"!=typeof e))throw new b(r,"Object",e)}),D=p((t,e)=>{if(null!=t&&"object"!=typeof t&&"function"!=typeof t)throw new b(e,"a dictionary",t)}),M=p((e,r,i=0)=>{if(!t(e))throw new b(r,"Array",e);if(e.length<i){throw new m(r,e,`must be longer than ${i}`)}});const C=p((t,e="buffer")=>{if(!S(t))throw new b(e,["Buffer","TypedArray","DataView"],t)});const N=p((t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new b(e,"AbortSignal",t)}),j=p((t,e)=>{if("function"!=typeof t)throw new b(e,"Function",t)}),F=p((t,e)=>{if("function"!=typeof t||v(t))throw new b(e,"Function",t)}),B=p((t,e)=>{if(void 0!==t)throw new b(e,"undefined",t)});const z=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function W(t,e){if(void 0===t||!h(z,t))throw new m(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}return _s={isInt32:function(t){return t===(0|t)},isUint32:function(t){return t===t>>>0},parseFileMode:function(t,e,r){if(void 0===t&&(t=r),"string"==typeof t){if(null===h(x,t))throw new m(e,t,"must be a 32-bit unsigned integer or an octal string");t=l(t,8)}return R(t,e),t},validateArray:M,validateStringArray:function(t,e){M(t,e);for(let r=0;r<t.length;r++)A(t[r],`${e}[${r}]`)},validateBooleanArray:function(t,e){M(t,e);for(let r=0;r<t.length;r++)O(t[r],`${e}[${r}]`)},validateAbortSignalArray:function(t,e){M(t,e);for(let r=0;r<t.length;r++){const i=t[r],n=`${e}[${r}]`;if(null==i)throw new b(n,"AbortSignal",i);N(i,n)}},validateBoolean:O,validateBuffer:C,validateDictionary:D,validateEncoding:function(t,e){const r=w(e),i=t.length;if("hex"===r&&i%2!=0)throw new m("encoding",e,`is invalid for data of length ${i}`)},validateFunction:j,validateInt32:T,validateInteger:k,validateNumber:function(t,e,r=void 0,i){if("number"!=typeof t)throw new b(e,"number",t);if(null!=r&&t<r||null!=i&&t>i||(null!=r||null!=i)&&s(t))throw new g(e,`${null!=r?`>= ${r}`:""}${null!=r&&null!=i?" && ":""}${null!=i?`<= ${i}`:""}`,t)},validateObject:P,validateOneOf:L,validatePlainFunction:F,validatePort:function(t,e="Port",r=!0){if("number"!=typeof t&&"string"!=typeof t||"string"==typeof t&&0===d(t).length||+t!==+t>>>0||t>65535||0===t&&!r)throw new y(e,t,r);return 0|t},validateSignalName:function(t,e="signal"){if(A(t,e),void 0===E[t]){if(void 0!==E[f(t)])throw new _(t+" (signals must use all capital letters)");throw new _(t)}},validateString:A,validateUint32:R,validateUndefined:B,validateUnion:function(t,i,n){if(!e(n,t))throw new b(i,`('${r(n,"|")}')`,t)},validateAbortSignal:N,validateLinkHeaderValue:function(e){if("string"==typeof e)return W(e,"hints"),e;if(t(e)){const t=e.length;let r="";if(0===t)return r;for(let i=0;i<t;i++){const n=e[i];W(n,"hints"),r+=n,i!==t-1&&(r+=", ")}return r}throw new m("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}}var Es,xs,ks,Ts,Rs,As,Ls,Os,Is,Ps={exports:{}};function Ds(){return xs?Es:(xs=1,Es=r.commonjsGlobal.process)}function Ms(){if(Ts)return ks;Ts=1;const{SymbolAsyncIterator:t,SymbolIterator:e,SymbolFor:r}=zn(),i=r("nodejs.stream.destroyed"),n=r("nodejs.stream.errored"),s=r("nodejs.stream.readable"),o=r("nodejs.stream.writable"),a=r("nodejs.stream.disturbed"),l=r("nodejs.webstream.isClosedPromise"),u=r("nodejs.webstream.controllerErrorFunction");function h(t,e=!1){var r;return!(!t||"function"!=typeof t.pipe||"function"!=typeof t.on||e&&("function"!=typeof t.pause||"function"!=typeof t.resume)||t._writableState&&!1===(null===(r=t._readableState)||void 0===r?void 0:r.readable)||t._writableState&&!t._readableState)}function c(t){var e;return!(!t||"function"!=typeof t.write||"function"!=typeof t.on||t._readableState&&!1===(null===(e=t._writableState)||void 0===e?void 0:e.writable))}function f(t){return t&&(t._readableState||t._writableState||"function"==typeof t.write&&"function"==typeof t.on||"function"==typeof t.pipe&&"function"==typeof t.on)}function d(t){return!(!t||f(t)||"function"!=typeof t.pipeThrough||"function"!=typeof t.getReader||"function"!=typeof t.cancel)}function p(t){return!(!t||f(t)||"function"!=typeof t.getWriter||"function"!=typeof t.abort)}function y(t){return!(!t||f(t)||"object"!=typeof t.readable||"object"!=typeof t.writable)}function b(t){if(!f(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[i]||null!=n&&n.destroyed)}function m(t){if(!c(t))return null;if(!0===t.writableEnded)return!0;const e=t._writableState;return(null==e||!e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)}function g(t,e){if(!h(t))return null;const r=t._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===e&&!0===r.ended&&0===r.length))}function _(t){return t&&null!=t[s]?t[s]:"boolean"!=typeof(null==t?void 0:t.readable)?null:!b(t)&&(h(t)&&t.readable&&!g(t))}function w(t){return t&&null!=t[o]?t[o]:"boolean"!=typeof(null==t?void 0:t.writable)?null:!b(t)&&(c(t)&&t.writable&&!m(t))}function v(t){return"boolean"==typeof t._closed&&"boolean"==typeof t._defaultKeepAlive&&"boolean"==typeof t._removedConnection&&"boolean"==typeof t._removedContLen}function S(t){return"boolean"==typeof t._sent100&&v(t)}return ks={isDestroyed:b,kIsDestroyed:i,isDisturbed:function(t){var e;return!(!t||!(null!==(e=t[a])&&void 0!==e?e:t.readableDidRead||t.readableAborted))},kIsDisturbed:a,isErrored:function(t){var e,r,i,s,o,a,l,u,h,c;return!(!t||!(null!==(e=null!==(r=null!==(i=null!==(s=null!==(o=null!==(a=t[n])&&void 0!==a?a:t.readableErrored)&&void 0!==o?o:t.writableErrored)&&void 0!==s?s:null===(l=t._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==i?i:null===(u=t._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(h=t._readableState)||void 0===h?void 0:h.errored)&&void 0!==e?e:null===(c=t._writableState)||void 0===c?void 0:c.errored))},kIsErrored:n,isReadable:_,kIsReadable:s,kIsClosedPromise:l,kControllerErrorFunction:u,kIsWritable:o,isClosed:function(t){if(!f(t))return null;if("boolean"==typeof t.closed)return t.closed;const e=t._writableState,r=t._readableState;return"boolean"==typeof(null==e?void 0:e.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==e?void 0:e.closed)||(null==r?void 0:r.closed):"boolean"==typeof t._closed&&v(t)?t._closed:null},isDuplexNodeStream:function(t){return!(!t||"function"!=typeof t.pipe||!t._readableState||"function"!=typeof t.on||"function"!=typeof t.write)},isFinished:function(t,e){return f(t)?!!b(t)||(!1===(null==e?void 0:e.readable)||!_(t))&&(!1===(null==e?void 0:e.writable)||!w(t)):null},isIterable:function(r,i){return null!=r&&(!0===i?"function"==typeof r[t]:!1===i?"function"==typeof r[e]:"function"==typeof r[t]||"function"==typeof r[e])},isReadableNodeStream:h,isReadableStream:d,isReadableEnded:function(t){if(!h(t))return null;if(!0===t.readableEnded)return!0;const e=t._readableState;return!(!e||e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)},isReadableFinished:g,isReadableErrored:function(t){var e,r;return f(t)?t.readableErrored?t.readableErrored:null!==(e=null===(r=t._readableState)||void 0===r?void 0:r.errored)&&void 0!==e?e:null:null},isNodeStream:f,isWebStream:function(t){return d(t)||p(t)||y(t)},isWritable:w,isWritableNodeStream:c,isWritableStream:p,isWritableEnded:m,isWritableFinished:function(t,e){if(!c(t))return null;if(!0===t.writableFinished)return!0;const r=t._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===e&&!0===r.ended&&0===r.length))},isWritableErrored:function(t){var e,r;return f(t)?t.writableErrored?t.writableErrored:null!==(e=null===(r=t._writableState)||void 0===r?void 0:r.errored)&&void 0!==e?e:null:null},isServerRequest:function(t){var e;return"boolean"==typeof t._consuming&&"boolean"==typeof t._dumped&&void 0===(null===(e=t.req)||void 0===e?void 0:e.upgradeOrConnect)},isServerResponse:S,willEmitClose:function(t){if(!f(t))return null;const e=t._writableState,r=t._readableState,i=e||r;return!i&&S(t)||!!(i&&i.autoDestroy&&i.emitClose&&!1===i.closed)},isTransformStream:y},ks}function Cs(){if(Rs)return Ps.exports;Rs=1;const t=Ds(),{AbortError:e,codes:r}=Vn(),{ERR_INVALID_ARG_TYPE:i,ERR_STREAM_PREMATURE_CLOSE:n}=r,{kEmptyObject:s,once:o}=gs(),{validateAbortSignal:a,validateFunction:l,validateObject:u,validateBoolean:h}=Ss(),{Promise:c,PromisePrototypeThen:f,SymbolDispose:d}=zn(),{isClosed:p,isReadable:y,isReadableNodeStream:b,isReadableStream:m,isReadableFinished:g,isReadableErrored:_,isWritable:w,isWritableNodeStream:v,isWritableStream:S,isWritableFinished:E,isWritableErrored:x,isNodeStream:k,willEmitClose:T,kIsClosedPromise:R}=Ms();let A;const L=()=>{};function O(r,h,c){var O,I;if(2===arguments.length?(c=h,h=s):null==h?h=s:u(h,"options"),l(c,"callback"),a(h.signal,"options.signal"),c=o(c),m(r)||S(r))return function(r,i,n){let s=!1,a=L;if(i.signal)if(a=()=>{s=!0,n.call(r,new e(void 0,{cause:i.signal.reason}))},i.signal.aborted)t.nextTick(a);else{A=A||gs().addAbortListener;const t=A(i.signal,a),e=n;n=o((...i)=>{t[d](),e.apply(r,i)})}const l=(...e)=>{s||t.nextTick(()=>n.apply(r,e))};return f(r[R].promise,l,l),L}(r,h,c);if(!k(r))throw new i("stream",["ReadableStream","WritableStream","Stream"],r);const P=null!==(O=h.readable)&&void 0!==O?O:b(r),D=null!==(I=h.writable)&&void 0!==I?I:v(r),M=r._writableState,C=r._readableState,N=()=>{r.writable||B()};let j=T(r)&&b(r)===P&&v(r)===D,F=E(r,!1);const B=()=>{F=!0,r.destroyed&&(j=!1),(!j||r.readable&&!P)&&(P&&!z||c.call(r))};let z=g(r,!1);const W=()=>{z=!0,r.destroyed&&(j=!1),(!j||r.writable&&!D)&&(D&&!F||c.call(r))},U=t=>{c.call(r,t)};let G=p(r);const q=()=>{G=!0;const t=x(r)||_(r);return t&&"boolean"!=typeof t?c.call(r,t):P&&!z&&b(r,!0)&&!g(r,!1)?c.call(r,new n):!D||F||E(r,!1)?void c.call(r):c.call(r,new n)},H=()=>{G=!0;const t=x(r)||_(r);if(t&&"boolean"!=typeof t)return c.call(r,t);c.call(r)},$=()=>{r.req.on("finish",B)};!function(t){return t.setHeader&&"function"==typeof t.abort}(r)?D&&!M&&(r.on("end",N),r.on("close",N)):(r.on("complete",B),j||r.on("abort",q),r.req?$():r.on("request",$)),j||"boolean"!=typeof r.aborted||r.on("aborted",q),r.on("end",W),r.on("finish",B),!1!==h.error&&r.on("error",U),r.on("close",q),G?t.nextTick(q):null!=M&&M.errorEmitted||null!=C&&C.errorEmitted?j||t.nextTick(H):(P||j&&!y(r)||!F&&!1!==w(r))&&(D||j&&!w(r)||!z&&!1!==y(r))?C&&r.req&&r.aborted&&t.nextTick(H):t.nextTick(H);const V=()=>{c=L,r.removeListener("aborted",q),r.removeListener("complete",B),r.removeListener("abort",q),r.removeListener("request",$),r.req&&r.req.removeListener("finish",B),r.removeListener("end",N),r.removeListener("close",N),r.removeListener("finish",B),r.removeListener("end",W),r.removeListener("error",U),r.removeListener("close",q)};if(h.signal&&!G){const i=()=>{const t=c;V(),t.call(r,new e(void 0,{cause:h.signal.reason}))};if(h.signal.aborted)t.nextTick(i);else{A=A||gs().addAbortListener;const t=A(h.signal,i),e=c;c=o((...i)=>{t[d](),e.apply(r,i)})}}return V}return Ps.exports=O,Ps.exports.finished=function(t,e){var r;let i=!1;return null===e&&(e=s),null!==(r=e)&&void 0!==r&&r.cleanup&&(h(e.cleanup,"cleanup"),i=e.cleanup),new c((r,n)=>{const s=O(t,e,t=>{i&&s(),t?n(t):r()})})},Ps.exports}function Ns(){if(Ls)return As;Ls=1;const t=Ds(),{aggregateTwoErrors:e,codes:{ERR_MULTIPLE_CALLBACK:r},AbortError:i}=Vn(),{Symbol:n}=zn(),{kIsDestroyed:s,isDestroyed:o,isFinished:a,isServerRequest:l}=Ms(),u=n("kDestroy"),h=n("kConstruct");function c(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function f(e,r,i){let n=!1;function s(r){if(n)return;n=!0;const s=e._readableState,o=e._writableState;c(r,o,s),o&&(o.closed=!0),s&&(s.closed=!0),"function"==typeof i&&i(r),r?t.nextTick(d,e,r):t.nextTick(p,e)}try{e._destroy(r||null,s)}catch(r){s(r)}}function d(t,e){y(t,e),p(t)}function p(t){const e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(null!=r&&r.emitClose||null!=e&&e.emitClose)&&t.emit("close")}function y(t,e){const r=t._readableState,i=t._writableState;null!=i&&i.errorEmitted||null!=r&&r.errorEmitted||(i&&(i.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function b(e,r,i){const n=e._readableState,s=e._writableState;if(null!=s&&s.destroyed||null!=n&&n.destroyed)return this;null!=n&&n.autoDestroy||null!=s&&s.autoDestroy?e.destroy(r):r&&(r.stack,s&&!s.errored&&(s.errored=r),n&&!n.errored&&(n.errored=r),i?t.nextTick(y,e,r):y(e,r))}function m(e){let i=!1;function n(n){if(i)return void b(e,null!=n?n:new r);i=!0;const s=e._readableState,o=e._writableState,a=o||s;s&&(s.constructed=!0),o&&(o.constructed=!0),a.destroyed?e.emit(u,n):n?b(e,n,!0):t.nextTick(g,e)}try{e._construct(e=>{t.nextTick(n,e)})}catch(e){t.nextTick(n,e)}}function g(t){t.emit(h)}function _(t){return(null==t?void 0:t.setHeader)&&"function"==typeof t.abort}function w(t){t.emit("close")}function v(e,r){e.emit("error",r),t.nextTick(w,e)}return As={construct:function(e,r){if("function"!=typeof e._construct)return;const i=e._readableState,n=e._writableState;i&&(i.constructed=!1),n&&(n.constructed=!1),e.once(h,r),e.listenerCount(h)>1||t.nextTick(m,e)},destroyer:function(e,r){e&&!o(e)&&(r||a(e)||(r=new i),l(e)?(e.socket=null,e.destroy(r)):_(e)?e.abort():_(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(r):"function"==typeof e.close?e.close():r?t.nextTick(v,e,r):t.nextTick(w,e),e.destroyed||(e[s]=!0))},destroy:function(t,r){const i=this._readableState,n=this._writableState,s=n||i;return null!=n&&n.destroyed||null!=i&&i.destroyed?("function"==typeof r&&r(),this):(c(t,n,i),n&&(n.destroyed=!0),i&&(i.destroyed=!0),s.constructed?f(this,t,r):this.once(u,function(i){f(this,e(i,t),r)}),this)},undestroy:function(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=!1===t.readable,t.endEmitted=!1===t.readable),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=!1===e.writable,e.ending=!1===e.writable,e.finished=!1===e.writable)},errorOrDestroy:b},As}function js(){if(Is)return Os;Is=1;const{ArrayIsArray:t,ObjectSetPrototypeOf:e}=zn(),{EventEmitter:r}=n;function i(t){r.call(this,t)}function s(e,r,i){if("function"==typeof e.prependListener)return e.prependListener(r,i);e._events&&e._events[r]?t(e._events[r])?e._events[r].unshift(i):e._events[r]=[i,e._events[r]]:e.on(r,i)}return e(i.prototype,r.prototype),e(i,r),i.prototype.pipe=function(t,e){const i=this;function n(e){t.writable&&!1===t.write(e)&&i.pause&&i.pause()}function o(){i.readable&&i.resume&&i.resume()}i.on("data",n),t.on("drain",o),t._isStdio||e&&!1===e.end||(i.on("end",l),i.on("close",u));let a=!1;function l(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function h(t){c(),0===r.listenerCount(this,"error")&&this.emit("error",t)}function c(){i.removeListener("data",n),t.removeListener("drain",o),i.removeListener("end",l),i.removeListener("close",u),i.removeListener("error",h),t.removeListener("error",h),i.removeListener("end",c),i.removeListener("close",c),t.removeListener("close",c)}return s(i,"error",h),s(t,"error",h),i.on("end",c),i.on("close",c),t.on("close",c),t.emit("pipe",i),t},Os={Stream:i,prependListener:s}}var Fs,Bs,zs,Ws,Us,Gs={exports:{}};function qs(){return Fs||(Fs=1,function(t){const{SymbolDispose:e}=zn(),{AbortError:r,codes:i}=Vn(),{isNodeStream:n,isWebStream:s,kControllerErrorFunction:o}=Ms(),a=Cs(),{ERR_INVALID_ARG_TYPE:l}=i;let u;t.exports.addAbortSignal=function(e,r){if(((t,e)=>{if("object"!=typeof t||!("aborted"in t))throw new l(e,"AbortSignal",t)})(e,"signal"),!n(r)&&!s(r))throw new l("stream",["ReadableStream","WritableStream","Stream"],r);return t.exports.addAbortSignalNoValidate(e,r)},t.exports.addAbortSignalNoValidate=function(t,i){if("object"!=typeof t||!("aborted"in t))return i;const s=n(i)?()=>{i.destroy(new r(void 0,{cause:t.reason}))}:()=>{i[o](new r(void 0,{cause:t.reason}))};if(t.aborted)s();else{u=u||gs().addAbortListener;const r=u(t,s);a(i,r[e])}return i}}(Gs)),Gs.exports}function Hs(){if(zs)return Bs;zs=1;const{StringPrototypeSlice:t,SymbolIterator:e,TypedArrayPrototypeSet:r,Uint8Array:i}=zn(),{Buffer:n}=c,{inspect:s}=gs();return Bs=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){const e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}shift(){if(0===this.length)return;const t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(0===this.length)return"";let e=this.head,r=""+e.data;for(;null!==(e=e.next);)r+=t+e.data;return r}concat(t){if(0===this.length)return n.alloc(0);const e=n.allocUnsafe(t>>>0);let i=this.head,s=0;for(;i;)r(e,i.data,s),s+=i.data.length,i=i.next;return e}consume(t,e){const r=this.head.data;if(t<r.length){const e=r.slice(0,t);return this.head.data=r.slice(t),e}return t===r.length?this.shift():e?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[e](){for(let t=this.head;t;t=t.next)yield t.data}_getString(e){let r="",i=this.head,n=0;do{const s=i.data;if(!(e>s.length)){e===s.length?(r+=s,++n,i.next?this.head=i.next:this.head=this.tail=null):(r+=t(s,0,e),this.head=i,i.data=t(s,e));break}r+=s,e-=s.length,++n}while(null!==(i=i.next));return this.length-=n,r}_getBuffer(t){const e=n.allocUnsafe(t),s=t;let o=this.head,a=0;do{const n=o.data;if(!(t>n.length)){t===n.length?(r(e,n,s-t),++a,o.next?this.head=o.next:this.head=this.tail=null):(r(e,new i(n.buffer,n.byteOffset,t),s-t),this.head=o,o.data=n.slice(t));break}r(e,n,s-t),t-=n.length,++a}while(null!==(o=o.next));return this.length-=a,e}[Symbol.for("nodejs.util.inspect.custom")](t,e){return s(this,{...e,depth:0,customInspect:!1})}}}function $s(){if(Us)return Ws;Us=1;const{MathFloor:t,NumberIsInteger:e}=zn(),{validateInteger:r}=Ss(),{ERR_INVALID_ARG_VALUE:i}=Vn().codes;let n=16384,s=16;function o(t){return t?s:n}return Ws={getHighWaterMark:function(r,n,s,a){const l=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(n,a,s);if(null!=l){if(!e(l)||l<0){throw new i(a?`options.${s}`:"options.highWaterMark",l)}return t(l)}return o(r.objectMode)},getDefaultHighWaterMark:o,setDefaultHighWaterMark:function(t,e){r(e,"value",0),t?s=e:n=e}}}var Vs,Zs,Ys,Qs,Ks,Xs,Js,to,eo,ro,io,no,so,oo,ao,lo,uo,ho,co,fo,po,yo,bo,mo,go={};function _o(){if(Vs)return go;Vs=1;var t=f.requireSafeBuffer().Buffer,e=t.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(r){var i;switch(this.encoding=function(r){var i=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(r);if("string"!=typeof i&&(t.isEncoding===e||!e(r)))throw new Error("Unknown encoding: "+r);return i||r}(r),this.encoding){case"utf16le":this.text=s,this.end=o,i=4;break;case"utf8":this.fillLast=n,i=4;break;case"base64":this.text=a,this.end=l,i=3;break;default:return this.write=u,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(i)}function i(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function n(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function o(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function a(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function h(t){return t&&t.length?this.write(t):""}return go.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},r.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},r.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var s=i(e[n]);if(s>=0)return s>0&&(t.lastNeed=s-1),s;if(--n<r||-2===s)return 0;if(s=i(e[n]),s>=0)return s>0&&(t.lastNeed=s-2),s;if(--n<r||-2===s)return 0;if(s=i(e[n]),s>=0)return s>0&&(2===s?s=0:t.lastNeed=s-3),s;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},go}function wo(){if(Ys)return Zs;Ys=1;const t=Ds(),{PromisePrototypeThen:e,SymbolAsyncIterator:r,SymbolIterator:i}=zn(),{Buffer:n}=c,{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:o}=Vn().codes;return Zs=function(a,l,u){let h,c;if("string"==typeof l||l instanceof n)return new a({objectMode:!0,...u,read(){this.push(l),this.push(null)}});if(l&&l[r])c=!0,h=l[r]();else{if(!l||!l[i])throw new s("iterable",["Iterable"],l);c=!1,h=l[i]()}const f=new a({objectMode:!0,highWaterMark:1,...u});let d=!1;return f._read=function(){d||(d=!0,async function(){for(;;){try{const{value:t,done:e}=c?await h.next():h.next();if(e)f.push(null);else{const e=t&&"function"==typeof t.then?await t:t;if(null===e)throw d=!1,new o;if(f.push(e))continue;d=!1}}catch(t){f.destroy(t)}break}}())},f._destroy=function(r,i){e(async function(t){const e=null!=t,r="function"==typeof h.throw;if(e&&r){const{value:e,done:r}=await h.throw(t);if(await e,r)return}if("function"==typeof h.return){const{value:t}=await h.return();await t}}(r),()=>t.nextTick(i,r),e=>t.nextTick(i,e||r))},f},Zs}function vo(){if(Ks)return Qs;Ks=1;const t=Ds(),{ArrayPrototypeIndexOf:e,NumberIsInteger:r,NumberIsNaN:i,NumberParseInt:s,ObjectDefineProperties:o,ObjectKeys:a,ObjectSetPrototypeOf:l,Promise:u,SafeSet:h,SymbolAsyncDispose:f,SymbolAsyncIterator:d,Symbol:p}=zn();Qs=$,$.ReadableState=H;const{EventEmitter:y}=n,{Stream:b,prependListener:m}=js(),{Buffer:g}=c,{addAbortSignal:_}=qs(),w=Cs();let v=gs().debuglog("stream",t=>{v=t});const S=Hs(),E=Ns(),{getHighWaterMark:x,getDefaultHighWaterMark:k}=$s(),{aggregateTwoErrors:T,codes:{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_OUT_OF_RANGE:L,ERR_STREAM_PUSH_AFTER_EOF:O,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:I},AbortError:P}=Vn(),{validateObject:D}=Ss(),M=p("kPaused"),{StringDecoder:C}=_o(),N=wo();l($.prototype,b.prototype),l($,b);const j=()=>{},{errorOrDestroy:F}=E,B=1,z=16,W=32,U=2048,G=4096;function q(t){return{enumerable:!1,get(){return 0!==(this.state&t)},set(e){e?this.state|=t:this.state&=~t}}}function H(t,e,r){"boolean"!=typeof r&&(r=e instanceof xo()),this.state=U|G|z|W,t&&t.objectMode&&(this.state|=B),r&&t&&t.readableObjectMode&&(this.state|=B),this.highWaterMark=t?x(this,t,"readableHighWaterMark",r):k(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[M]=null,t&&!1===t.emitClose&&(this.state&=~U),t&&!1===t.autoDestroy&&(this.state&=~G),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new C(t.encoding),this.encoding=t.encoding)}function $(t){if(!(this instanceof $))return new $(t);const e=this instanceof xo();this._readableState=new H(t,this,e),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!e&&_(t.signal,this)),b.call(this,t),E.construct(this,()=>{this._readableState.needReadable&&X(this,this._readableState)})}function V(t,e,r,i){v("readableAddChunk",e);const n=t._readableState;let s;if(0===(n.state&B)&&("string"==typeof e?(r=r||n.defaultEncoding,n.encoding!==r&&(i&&n.encoding?e=g.from(e,r).toString(n.encoding):(e=g.from(e,r),r=""))):e instanceof g?r="":b._isUint8Array(e)?(e=b._uint8ArrayToBuffer(e),r=""):null!=e&&(s=new R("chunk",["string","Buffer","Uint8Array"],e))),s)F(t,s);else if(null===e)n.state&=-9,function(t,e){if(v("onEofChunk"),e.ended)return;if(e.decoder){const t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,e.sync?Q(t):(e.needReadable=!1,e.emittedReadable=!0,K(t))}(t,n);else if(0!==(n.state&B)||e&&e.length>0)if(i)if(4&n.state)F(t,new I);else{if(n.destroyed||n.errored)return!1;Z(t,n,e,!0)}else if(n.ended)F(t,new O);else{if(n.destroyed||n.errored)return!1;n.state&=-9,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||0!==e.length?Z(t,n,e,!1):X(t,n)):Z(t,n,e,!1)}else i||(n.state&=-9,X(t,n));return!n.ended&&(n.length<n.highWaterMark||0===n.length)}function Z(t,e,r,i){e.flowing&&0===e.length&&!e.sync&&t.listenerCount("data")>0?(65536&e.state?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),64&e.state&&Q(t)),X(t,e)}o(H.prototype,{objectMode:q(B),ended:q(2),endEmitted:q(4),reading:q(8),constructed:q(z),sync:q(W),needReadable:q(64),emittedReadable:q(128),readableListening:q(256),resumeScheduled:q(512),errorEmitted:q(1024),emitClose:q(U),autoDestroy:q(G),destroyed:q(8192),closed:q(16384),closeEmitted:q(32768),multiAwaitDrain:q(65536),readingMore:q(1<<17),dataEmitted:q(1<<18)}),$.prototype.destroy=E.destroy,$.prototype._undestroy=E.undestroy,$.prototype._destroy=function(t,e){e(t)},$.prototype[y.captureRejectionSymbol]=function(t){this.destroy(t)},$.prototype[f]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new P,this.destroy(t)),new u((e,r)=>w(this,i=>i&&i!==t?r(i):e(null)))},$.prototype.push=function(t,e){return V(this,t,e,!1)},$.prototype.unshift=function(t,e){return V(this,t,e,!0)},$.prototype.isPaused=function(){const t=this._readableState;return!0===t[M]||!1===t.flowing},$.prototype.setEncoding=function(t){const e=new C(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let i="";for(const t of r)i+=e.write(t);return r.clear(),""!==i&&r.push(i),this._readableState.length=i.length,this};function Y(t,e){return t<=0||0===e.length&&e.ended?0:0!==(e.state&B)?1:i(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}function Q(e){const r=e._readableState;v("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(v("emitReadable",r.flowing),r.emittedReadable=!0,t.nextTick(K,e))}function K(t){const e=t._readableState;v("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||e.errored||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,it(t)}function X(e,r){!r.readingMore&&r.constructed&&(r.readingMore=!0,t.nextTick(J,e,r))}function J(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){const r=e.length;if(v("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function tt(t){const e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!1===e[M]?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function et(t){v("readable nexttick read 0"),t.read(0)}function rt(t,e){v("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),it(t),e.flowing&&!e.reading&&t.read(0)}function it(t){const e=t._readableState;for(v("flow",e.flowing);e.flowing&&null!==t.read(););}function nt(t,e){"function"!=typeof t.read&&(t=$.wrap(t,{objectMode:!0}));const r=async function*(t,e){let r,i=j;function n(e){this===t?(i(),i=j):i=e}t.on("readable",n);const s=w(t,{writable:!1},t=>{r=t?T(r,t):null,i(),i=j});try{for(;;){const e=t.destroyed?null:t.read();if(null!==e)yield e;else{if(r)throw r;if(null===r)return;await new u(n)}}}catch(t){throw r=T(r,t),r}finally{!r&&!1===(null==e?void 0:e.destroyOnReturn)||void 0!==r&&!t._readableState.autoDestroy?(t.off("readable",n),s()):E.destroyer(t,null)}}(t,e);return r.stream=t,r}function st(t,e){if(0===e.length)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ot(e){const r=e._readableState;v("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,t.nextTick(at,r,e))}function at(e,r){if(v("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,r.emit("end"),r.writable&&!1===r.allowHalfOpen)t.nextTick(lt,r);else if(e.autoDestroy){const t=r._writableState;(!t||t.autoDestroy&&(t.finished||!1===t.writable))&&r.destroy()}}function lt(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}let ut;function ht(){return void 0===ut&&(ut={}),ut}return $.prototype.read=function(t){v("read",t),void 0===t?t=NaN:r(t)||(t=s(t,10));const e=this._readableState,i=t;if(t>e.highWaterMark&&(e.highWaterMark=function(t){if(t>1073741824)throw new L("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,++t}(t)),0!==t&&(e.state&=-129),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return v("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?ot(this):Q(this),null;if(0===(t=Y(t,e))&&e.ended)return 0===e.length&&ot(this),null;let n,o=!!(64&e.state);if(v("need readable",o),(0===e.length||e.length-t<e.highWaterMark)&&(o=!0,v("length less than watermark",o)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)o=!1,v("reading, ended or constructing",o);else if(o){v("do read"),e.state|=8|W,0===e.length&&(e.state|=64);try{this._read(e.highWaterMark)}catch(t){F(this,t)}e.state&=~W,e.reading||(t=Y(i,e))}return n=t>0?st(t,e):null,null===n?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&ot(this)),null===n||e.errorEmitted||e.closeEmitted||(e.dataEmitted=!0,this.emit("data",n)),n},$.prototype._read=function(t){throw new A("_read()")},$.prototype.pipe=function(e,r){const i=this,n=this._readableState;1===n.pipes.length&&(n.multiAwaitDrain||(n.multiAwaitDrain=!0,n.awaitDrainWriters=new h(n.awaitDrainWriters?[n.awaitDrainWriters]:[]))),n.pipes.push(e),v("pipe count=%d opts=%j",n.pipes.length,r);const s=(!r||!1!==r.end)&&e!==t.stdout&&e!==t.stderr?a:b;function o(t,r){v("onunpipe"),t===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,function(){v("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),l&&e.removeListener("drain",l);e.removeListener("error",d),e.removeListener("unpipe",o),i.removeListener("end",a),i.removeListener("end",b),i.removeListener("data",f),u=!0,l&&n.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&l()}())}function a(){v("onend"),e.end()}let l;n.endEmitted?t.nextTick(s):i.once("end",s),e.on("unpipe",o);let u=!1;function c(){u||(1===n.pipes.length&&n.pipes[0]===e?(v("false write response, pause",0),n.awaitDrainWriters=e,n.multiAwaitDrain=!1):n.pipes.length>1&&n.pipes.includes(e)&&(v("false write response, pause",n.awaitDrainWriters.size),n.awaitDrainWriters.add(e)),i.pause()),l||(l=function(t,e){return function(){const r=t._readableState;r.awaitDrainWriters===e?(v("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(v("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(e)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!t.listenerCount("data")||t.resume()}}(i,e),e.on("drain",l))}function f(t){v("ondata");const r=e.write(t);v("dest.write",r),!1===r&&c()}function d(t){if(v("onerror",t),b(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?F(e,t):e.emit("error",t)}}function p(){e.removeListener("finish",y),b()}function y(){v("onfinish"),e.removeListener("close",p),b()}function b(){v("unpipe"),i.unpipe(e)}return i.on("data",f),m(e,"error",d),e.once("close",p),e.once("finish",y),e.emit("pipe",i),!0===e.writableNeedDrain?c():n.flowing||(v("pipe resume"),i.resume()),e},$.prototype.unpipe=function(t){const r=this._readableState;if(0===r.pipes.length)return this;if(!t){const t=r.pipes;r.pipes=[],this.pause();for(let e=0;e<t.length;e++)t[e].emit("unpipe",this,{hasUnpiped:!1});return this}const i=e(r.pipes,t);return-1===i||(r.pipes.splice(i,1),0===r.pipes.length&&this.pause(),t.emit("unpipe",this,{hasUnpiped:!1})),this},$.prototype.on=function(e,r){const i=b.prototype.on.call(this,e,r),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,v("on readable",n.length,n.reading),n.length?Q(this):n.reading||t.nextTick(et,this))),i},$.prototype.addListener=$.prototype.on,$.prototype.removeListener=function(e,r){const i=b.prototype.removeListener.call(this,e,r);return"readable"===e&&t.nextTick(tt,this),i},$.prototype.off=$.prototype.removeListener,$.prototype.removeAllListeners=function(e){const r=b.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||t.nextTick(tt,this),r},$.prototype.resume=function(){const e=this._readableState;return e.flowing||(v("resume"),e.flowing=!e.readableListening,function(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(rt,e,r))}(this,e)),e[M]=!1,this},$.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[M]=!0,this},$.prototype.wrap=function(t){let e=!1;t.on("data",r=>{!this.push(r)&&t.pause&&(e=!0,t.pause())}),t.on("end",()=>{this.push(null)}),t.on("error",t=>{F(this,t)}),t.on("close",()=>{this.destroy()}),t.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};const r=a(t);for(let e=1;e<r.length;e++){const i=r[e];void 0===this[i]&&"function"==typeof t[i]&&(this[i]=t[i].bind(t))}return this},$.prototype[d]=function(){return nt(this)},$.prototype.iterator=function(t){return void 0!==t&&D(t,"options"),nt(this,t)},o($.prototype,{readable:{__proto__:null,get(){const t=this._readableState;return!(!t||!1===t.readable||t.destroyed||t.errorEmitted||t.endEmitted)},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),o(H.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[M]},set(t){this[M]=!!t}}}),$._fromList=st,$.from=function(t,e){return N($,t,e)},$.fromWeb=function(t,e){return ht().newStreamReadableFromReadableStream(t,e)},$.toWeb=function(t,e){return ht().newReadableStreamFromStreamReadable(t,e)},$.wrap=function(t,e){var r,i;return new $({objectMode:null===(r=null!==(i=t.readableObjectMode)&&void 0!==i?i:t.objectMode)||void 0===r||r,...e,destroy(e,r){E.destroyer(t,e),r(e)}}).wrap(t)},Qs}function So(){if(Js)return Xs;Js=1;const t=Ds(),{ArrayPrototypeSlice:e,Error:r,FunctionPrototypeSymbolHasInstance:i,ObjectDefineProperty:s,ObjectDefineProperties:o,ObjectSetPrototypeOf:a,StringPrototypeToLowerCase:l,Symbol:u,SymbolHasInstance:h}=zn();Xs=D,D.WritableState=I;const{EventEmitter:f}=n,d=js().Stream,{Buffer:p}=c,y=Ns(),{addAbortSignal:b}=qs(),{getHighWaterMark:m,getDefaultHighWaterMark:g}=$s(),{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:v,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:E,ERR_STREAM_ALREADY_FINISHED:x,ERR_STREAM_NULL_VALUES:k,ERR_STREAM_WRITE_AFTER_END:T,ERR_UNKNOWN_ENCODING:R}=Vn().codes,{errorOrDestroy:A}=y;function L(){}a(D.prototype,d.prototype),a(D,d);const O=u("kOnFinished");function I(t,e,r){"boolean"!=typeof r&&(r=e instanceof xo()),this.objectMode=!(!t||!t.objectMode),r&&(this.objectMode=this.objectMode||!(!t||!t.writableObjectMode)),this.highWaterMark=t?m(this,t,"writableHighWaterMark",r):g(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!t||!1!==t.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=j.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,P(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[O]=[]}function P(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}function D(t){const e=this instanceof xo();if(!e&&!i(D,this))return new D(t);this._writableState=new I(t,this,e),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&b(t.signal,this)),d.call(this,t),y.construct(this,()=>{const t=this._writableState;t.writing||W(this,t),q(this,t)})}function M(e,r,i,n){const s=e._writableState;if("function"==typeof i)n=i,i=s.defaultEncoding;else{if(i){if("buffer"!==i&&!p.isEncoding(i))throw new R(i)}else i=s.defaultEncoding;"function"!=typeof n&&(n=L)}if(null===r)throw new k;if(!s.objectMode)if("string"==typeof r)!1!==s.decodeStrings&&(r=p.from(r,i),i="buffer");else if(r instanceof p)i="buffer";else{if(!d._isUint8Array(r))throw new _("chunk",["string","Buffer","Uint8Array"],r);r=d._uint8ArrayToBuffer(r),i="buffer"}let o;return s.ending?o=new T:s.destroyed&&(o=new E("write")),o?(t.nextTick(n,o),A(e,o,!0),o):(s.pendingcb++,function(t,e,r,i,n){const s=e.objectMode?1:r.length;e.length+=s;const o=e.length<e.highWaterMark;o||(e.needDrain=!0);e.writing||e.corked||e.errored||!e.constructed?(e.buffered.push({chunk:r,encoding:i,callback:n}),e.allBuffers&&"buffer"!==i&&(e.allBuffers=!1),e.allNoop&&n!==L&&(e.allNoop=!1)):(e.writelen=s,e.writecb=n,e.writing=!0,e.sync=!0,t._write(r,i,e.onwrite),e.sync=!1);return o&&!e.errored&&!e.destroyed}(e,s,r,i,n))}function C(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new E("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function N(t,e,r,i){--e.pendingcb,i(r),z(e),A(t,r)}function j(e,r){const i=e._writableState,n=i.sync,s=i.writecb;"function"==typeof s?(i.writing=!1,i.writecb=null,i.length-=i.writelen,i.writelen=0,r?(r.stack,i.errored||(i.errored=r),e._readableState&&!e._readableState.errored&&(e._readableState.errored=r),n?t.nextTick(N,e,i,r,s):N(e,i,r,s)):(i.buffered.length>i.bufferedIndex&&W(e,i),n?null!==i.afterWriteTickInfo&&i.afterWriteTickInfo.cb===s?i.afterWriteTickInfo.count++:(i.afterWriteTickInfo={count:1,cb:s,stream:e,state:i},t.nextTick(F,i.afterWriteTickInfo)):B(e,i,1,s))):A(e,new v)}function F({stream:t,state:e,count:r,cb:i}){return e.afterWriteTickInfo=null,B(t,e,r,i)}function B(t,e,r,i){for(!e.ending&&!t.destroyed&&0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));r-- >0;)e.pendingcb--,i();e.destroyed&&z(e),q(t,e)}function z(t){if(t.writing)return;for(let r=t.bufferedIndex;r<t.buffered.length;++r){var e;const{chunk:i,callback:n}=t.buffered[r],s=t.objectMode?1:i.length;t.length-=s,n(null!==(e=t.errored)&&void 0!==e?e:new E("write"))}const r=t[O].splice(0);for(let e=0;e<r.length;e++){var i;r[e](null!==(i=t.errored)&&void 0!==i?i:new E("end"))}P(t)}function W(t,r){if(r.corked||r.bufferProcessing||r.destroyed||!r.constructed)return;const{buffered:i,bufferedIndex:n,objectMode:s}=r,o=i.length-n;if(!o)return;let a=n;if(r.bufferProcessing=!0,o>1&&t._writev){r.pendingcb-=o-1;const n=r.allNoop?L:t=>{for(let e=a;e<i.length;++e)i[e].callback(t)},s=r.allNoop&&0===a?i:e(i,a);s.allBuffers=r.allBuffers,C(t,r,!0,r.length,s,"",n),P(r)}else{do{const{chunk:e,encoding:n,callback:o}=i[a];i[a++]=null;C(t,r,!1,s?1:e.length,e,n,o)}while(a<i.length&&!r.writing);a===i.length?P(r):a>256?(i.splice(0,a),r.bufferedIndex=0):r.bufferedIndex=a}r.bufferProcessing=!1}function U(t){return t.ending&&!t.destroyed&&t.constructed&&0===t.length&&!t.errored&&0===t.buffered.length&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function G(e,r){r.prefinished||r.finalCalled||("function"!=typeof e._final||r.destroyed?(r.prefinished=!0,e.emit("prefinish")):(r.finalCalled=!0,function(e,r){let i=!1;function n(n){if(i)A(e,null!=n?n:v());else if(i=!0,r.pendingcb--,n){const t=r[O].splice(0);for(let e=0;e<t.length;e++)t[e](n);A(e,n,r.sync)}else U(r)&&(r.prefinished=!0,e.emit("prefinish"),r.pendingcb++,t.nextTick(H,e,r))}r.sync=!0,r.pendingcb++;try{e._final(n)}catch(t){n(t)}r.sync=!1}(e,r)))}function q(e,r,i){U(r)&&(G(e,r),0===r.pendingcb&&(i?(r.pendingcb++,t.nextTick((t,e)=>{U(e)?H(t,e):e.pendingcb--},e,r)):U(r)&&(r.pendingcb++,H(e,r))))}function H(t,e){e.pendingcb--,e.finished=!0;const r=e[O].splice(0);for(let t=0;t<r.length;t++)r[t]();if(t.emit("finish"),e.autoDestroy){const e=t._readableState;(!e||e.autoDestroy&&(e.endEmitted||!1===e.readable))&&t.destroy()}}I.prototype.getBuffer=function(){return e(this.buffered,this.bufferedIndex)},s(I.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),s(D,h,{__proto__:null,value:function(t){return!!i(this,t)||this===D&&(t&&t._writableState instanceof I)}}),D.prototype.pipe=function(){A(this,new S)},D.prototype.write=function(t,e,r){return!0===M(this,t,e,r)},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){const t=this._writableState;t.corked&&(t.corked--,t.writing||W(this,t))},D.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=l(t)),!p.isEncoding(t))throw new R(t);return this._writableState.defaultEncoding=t,this},D.prototype._write=function(t,e,r){if(!this._writev)throw new w("_write()");this._writev([{chunk:t,encoding:e}],r)},D.prototype._writev=null,D.prototype.end=function(e,i,n){const s=this._writableState;let o;if("function"==typeof e?(n=e,e=null,i=null):"function"==typeof i&&(n=i,i=null),null!=e){const t=M(this,e,i);t instanceof r&&(o=t)}return s.corked&&(s.corked=1,this.uncork()),o||(s.errored||s.ending?s.finished?o=new x("end"):s.destroyed&&(o=new E("end")):(s.ending=!0,q(this,s,!0),s.ended=!0)),"function"==typeof n&&(o||s.finished?t.nextTick(n,o):s[O].push(n)),this},o(D.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){const t=this._writableState;return!(!t||!1===t.writable||t.destroyed||t.errored||t.ending||t.ended)},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const t=this._writableState;return!!t&&(!t.destroyed&&!t.ending&&t.needDrain)}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const $=y.destroy;let V;function Z(){return void 0===V&&(V={}),V}return D.prototype.destroy=function(e,r){const i=this._writableState;return!i.destroyed&&(i.bufferedIndex<i.buffered.length||i[O].length)&&t.nextTick(z,i),$.call(this,e,r),this},D.prototype._undestroy=y.undestroy,D.prototype._destroy=function(t,e){e(t)},D.prototype[f.captureRejectionSymbol]=function(t){this.destroy(t)},D.fromWeb=function(t,e){return Z().newStreamWritableFromWritableStream(t,e)},D.toWeb=function(t){return Z().newWritableStreamFromStreamWritable(t)},Xs}function Eo(){if(eo)return to;eo=1;const t=Ds(),e=c,{isReadable:r,isWritable:i,isIterable:n,isNodeStream:s,isReadableNodeStream:o,isWritableNodeStream:a,isDuplexNodeStream:l,isReadableStream:u,isWritableStream:h}=Ms(),f=Cs(),{AbortError:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:y}}=Vn(),{destroyer:b}=Ns(),m=xo(),g=vo(),_=So(),{createDeferredPromise:w}=gs(),v=wo(),S=globalThis.Blob||e.Blob,E=void 0!==S?function(t){return t instanceof S}:function(t){return!1},x=globalThis.AbortController||ms.AbortController,{FunctionPrototypeCall:k}=zn();class T extends m{constructor(t){super(t),!1===(null==t?void 0:t.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==t?void 0:t.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function R(t){const e=t.readable&&"function"!=typeof t.readable.read?g.wrap(t.readable):t.readable,n=t.writable;let s,o,a,l,u,h=!!r(e),c=!!i(n);function p(t){const e=l;l=null,e?e(t):t&&u.destroy(t)}return u=new T({readableObjectMode:!(null==e||!e.readableObjectMode),writableObjectMode:!(null==n||!n.writableObjectMode),readable:h,writable:c}),c&&(f(n,t=>{c=!1,t&&b(e,t),p(t)}),u._write=function(t,e,r){n.write(t,e)?r():s=r},u._final=function(t){n.end(),o=t},n.on("drain",function(){if(s){const t=s;s=null,t()}}),n.on("finish",function(){if(o){const t=o;o=null,t()}})),h&&(f(e,t=>{h=!1,t&&b(e,t),p(t)}),e.on("readable",function(){if(a){const t=a;a=null,t()}}),e.on("end",function(){u.push(null)}),u._read=function(){for(;;){const t=e.read();if(null===t)return void(a=u._read);if(!u.push(t))return}}),u._destroy=function(t,r){t||null===l||(t=new d),a=null,s=null,o=null,null===l?r(t):(l=r,b(n,t),b(e,t))},u}return to=function e(r,i){if(l(r))return r;if(o(r))return R({readable:r});if(a(r))return R({writable:r});if(s(r))return R({writable:!1,readable:!1});if(u(r))return R({readable:g.fromWeb(r)});if(h(r))return R({writable:_.fromWeb(r)});if("function"==typeof r){const{value:e,write:s,final:o,destroy:a}=function(e){let{promise:r,resolve:i}=w();const n=new x,s=n.signal,o=e(async function*(){for(;;){const e=r;r=null;const{chunk:n,done:o,cb:a}=await e;if(t.nextTick(a),o)return;if(s.aborted)throw new d(void 0,{cause:s.reason});({promise:r,resolve:i}=w()),yield n}}(),{signal:s});return{value:o,write(t,e,r){const n=i;i=null,n({chunk:t,done:!1,cb:r})},final(t){const e=i;i=null,e({done:!0,cb:t})},destroy(t,e){n.abort(),e(t)}}}(r);if(n(e))return v(T,e,{objectMode:!0,write:s,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let r;const i=k(l,e,t=>{if(null!=t)throw new y("nully","body",t)},t=>{b(r,t)});return r=new T({objectMode:!0,readable:!1,write:s,final(e){o(async()=>{try{await i,t.nextTick(e,null)}catch(r){t.nextTick(e,r)}})},destroy:a})}throw new y("Iterable, AsyncIterable or AsyncFunction",i,e)}if(E(r))return e(r.arrayBuffer());if(n(r))return v(T,r,{objectMode:!0,writable:!1});if(u(null==r?void 0:r.readable)&&h(null==r?void 0:r.writable))return T.fromWeb(r);if("object"==typeof(null==r?void 0:r.writable)||"object"==typeof(null==r?void 0:r.readable)){return R({readable:null!=r&&r.readable?o(null==r?void 0:r.readable)?null==r?void 0:r.readable:e(r.readable):void 0,writable:null!=r&&r.writable?a(null==r?void 0:r.writable)?null==r?void 0:r.writable:e(r.writable):void 0})}const c=null==r?void 0:r.then;if("function"==typeof c){let t;return k(c,r,e=>{null!=e&&t.push(e),t.push(null)},e=>{b(t,e)}),t=new T({objectMode:!0,writable:!1,read(){}})}throw new p(i,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],r)}}function xo(){if(io)return ro;io=1;const{ObjectDefineProperties:t,ObjectGetOwnPropertyDescriptor:e,ObjectKeys:r,ObjectSetPrototypeOf:i}=zn();ro=o;const n=vo(),s=So();i(o.prototype,n.prototype),i(o,n);{const t=r(s.prototype);for(let e=0;e<t.length;e++){const r=t[e];o.prototype[r]||(o.prototype[r]=s.prototype[r])}}function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),s.call(this,t),t?(this.allowHalfOpen=!1!==t.allowHalfOpen,!1===t.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===t.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let a,l;function u(){return void 0===a&&(a={}),a}return t(o.prototype,{writable:{__proto__:null,...e(s.prototype,"writable")},writableHighWaterMark:{__proto__:null,...e(s.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...e(s.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...e(s.prototype,"writableBuffer")},writableLength:{__proto__:null,...e(s.prototype,"writableLength")},writableFinished:{__proto__:null,...e(s.prototype,"writableFinished")},writableCorked:{__proto__:null,...e(s.prototype,"writableCorked")},writableEnded:{__proto__:null,...e(s.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...e(s.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}}),o.fromWeb=function(t,e){return u().newStreamDuplexFromReadableWritablePair(t,e)},o.toWeb=function(t){return u().newReadableWritablePairFromDuplex(t)},o.from=function(t){return l||(l=Eo()),l(t,"body")},ro}function ko(){if(so)return no;so=1;const{ObjectSetPrototypeOf:t,Symbol:e}=zn();no=o;const{ERR_METHOD_NOT_IMPLEMENTED:r}=Vn().codes,i=xo(),{getHighWaterMark:n}=$s();t(o.prototype,i.prototype),t(o,i);const s=e("kCallback");function o(t){if(!(this instanceof o))return new o(t);const e=t?n(this,t,"readableHighWaterMark",!0):null;0===e&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),i.call(this,t),this._readableState.sync=!1,this[s]=null,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",l)}function a(t){"function"!=typeof this._flush||this.destroyed?(this.push(null),t&&t()):this._flush((e,r)=>{e?t?t(e):this.destroy(e):(null!=r&&this.push(r),this.push(null),t&&t())})}function l(){this._final!==a&&a.call(this)}return o.prototype._final=a,o.prototype._transform=function(t,e,i){throw new r("_transform()")},o.prototype._write=function(t,e,r){const i=this._readableState,n=this._writableState,o=i.length;this._transform(t,e,(t,e)=>{t?r(t):(null!=e&&this.push(e),n.ended||o===i.length||i.length<i.highWaterMark?r():this[s]=r)})},o.prototype._read=function(){if(this[s]){const t=this[s];this[s]=null,t()}},no}function To(){if(ao)return oo;ao=1;const{ObjectSetPrototypeOf:t}=zn();oo=r;const e=ko();function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return t(r.prototype,e.prototype),t(r,e),r.prototype._transform=function(t,e,r){r(null,t)},oo}function Ro(){if(uo)return lo;uo=1;const t=Ds(),{ArrayIsArray:e,Promise:r,SymbolAsyncIterator:i,SymbolDispose:n}=zn(),s=Cs(),{once:o}=gs(),a=Ns(),l=xo(),{aggregateTwoErrors:u,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:c,ERR_MISSING_ARGS:f,ERR_STREAM_DESTROYED:d,ERR_STREAM_PREMATURE_CLOSE:p},AbortError:y}=Vn(),{validateFunction:b,validateAbortSignal:m}=Ss(),{isIterable:g,isReadable:_,isReadableNodeStream:w,isNodeStream:v,isTransformStream:S,isWebStream:E,isReadableStream:x,isReadableFinished:k}=Ms(),T=globalThis.AbortController||ms.AbortController;let R,A,L;function O(t,e,r){let i=!1;t.on("close",()=>{i=!0});return{destroy:e=>{i||(i=!0,a.destroyer(t,e||new d("pipe")))},cleanup:s(t,{readable:e,writable:r},t=>{i=!t})}}function I(t){if(g(t))return t;if(w(t))return async function*(t){A||(A=vo());yield*A.prototype[i].call(t)}(t);throw new h("val",["Readable","Iterable","AsyncIterable"],t)}async function P(t,e,i,{end:n}){let o,a=null;const l=t=>{if(t&&(o=t),a){const t=a;a=null,t()}},h=()=>new r((t,e)=>{o?e(o):a=()=>{o?e(o):t()}});e.on("drain",l);const c=s(e,{readable:!1},l);try{e.writableNeedDrain&&await h();for await(const r of t)e.write(r)||await h();n&&(e.end(),await h()),i()}catch(t){i(o!==t?u(o,t):t)}finally{c(),e.off("drain",l)}}async function D(t,e,r,{end:i}){S(e)&&(e=e.writable);const n=e.getWriter();try{for await(const e of t)await n.ready,n.write(e).catch(()=>{});await n.ready,i&&await n.close(),r()}catch(t){try{await n.abort(t),r(t)}catch(t){r(t)}}}function M(r,i,s){if(1===r.length&&e(r[0])&&(r=r[0]),r.length<2)throw new f("streams");const o=new T,a=o.signal,u=null==s?void 0:s.signal,d=[];function p(){B(new y)}let b,k,A;m(u,"options.signal"),L=L||gs().addAbortListener,u&&(b=L(u,p));const M=[];let N,j=0;function F(t){B(t,0===--j)}function B(e,r){var s;if(!e||k&&"ERR_STREAM_PREMATURE_CLOSE"!==k.code||(k=e),k||r){for(;M.length;)M.shift()(k);null===(s=b)||void 0===s||s[n](),o.abort(),r&&(k||d.forEach(t=>t()),t.nextTick(i,k,A))}}for(let U=0;U<r.length;U++){const G=r[U],q=U<r.length-1,H=U>0,$=q||!1!==(null==s?void 0:s.end),V=U===r.length-1;if(v(G)){if($){const{destroy:Y,cleanup:Q}=O(G,q,H);M.push(Y),_(G)&&V&&d.push(Q)}function Z(t){t&&"AbortError"!==t.name&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code&&F(t)}G.on("error",Z),_(G)&&V&&d.push(()=>{G.removeListener("error",Z)})}if(0===U)if("function"==typeof G){if(N=G({signal:a}),!g(N))throw new c("Iterable, AsyncIterable or Stream","source",N)}else N=g(G)||w(G)||S(G)?G:l.from(G);else if("function"==typeof G){var z;if(S(N))N=I(null===(z=N)||void 0===z?void 0:z.readable);else N=I(N);if(N=G(N,{signal:a}),q){if(!g(N,!0))throw new c("AsyncIterable",`transform[${U-1}]`,N)}else{var W;R||(R=To());const K=new R({objectMode:!0}),X=null===(W=N)||void 0===W?void 0:W.then;if("function"==typeof X)j++,X.call(N,e=>{A=e,null!=e&&K.write(e),$&&K.end(),t.nextTick(F)},e=>{K.destroy(e),t.nextTick(F,e)});else if(g(N,!0))j++,P(N,K,F,{end:$});else{if(!x(N)&&!S(N))throw new c("AsyncIterable or Promise","destination",N);{const et=N.readable||N;j++,P(et,K,F,{end:$})}}N=K;const{destroy:J,cleanup:tt}=O(N,!1,!0);M.push(J),V&&d.push(tt)}}else if(v(G)){if(w(N)){j+=2;const rt=C(N,G,F,{end:$});_(G)&&V&&d.push(rt)}else if(S(N)||x(N)){const it=N.readable||N;j++,P(it,G,F,{end:$})}else{if(!g(N))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);j++,P(N,G,F,{end:$})}N=G}else if(E(G)){if(w(N))j++,D(I(N),G,F,{end:$});else if(x(N)||g(N))j++,D(N,G,F,{end:$});else{if(!S(N))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);j++,D(N.readable,G,F,{end:$})}N=G}else N=l.from(G)}return(null!=a&&a.aborted||null!=u&&u.aborted)&&t.nextTick(p),N}function C(e,r,i,{end:n}){let o=!1;if(r.on("close",()=>{o||i(new p)}),e.pipe(r,{end:!1}),n){function a(){o=!0,r.end()}k(e)?t.nextTick(a):e.once("end",a)}else i();return s(e,{readable:!0,writable:!1},t=>{const r=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&r&&r.ended&&!r.errored&&!r.errorEmitted?e.once("end",i).once("error",i):i(t)}),s(r,{readable:!1,writable:!0},i)}return lo={pipelineImpl:M,pipeline:function(...t){return M(t,o(function(t){return b(t[t.length-1],"streams[stream.length - 1]"),t.pop()}(t)))}}}function Ao(){if(co)return ho;co=1;const{pipeline:t}=Ro(),e=xo(),{destroyer:r}=Ns(),{isNodeStream:i,isReadable:n,isWritable:s,isWebStream:o,isTransformStream:a,isWritableStream:l,isReadableStream:u}=Ms(),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:c,ERR_MISSING_ARGS:f}}=Vn(),d=Cs();return ho=function(...p){if(0===p.length)throw new f("streams");if(1===p.length)return e.from(p[0]);const y=[...p];if("function"==typeof p[0]&&(p[0]=e.from(p[0])),"function"==typeof p[p.length-1]){const t=p.length-1;p[t]=e.from(p[t])}for(let t=0;t<p.length;++t)if(i(p[t])||o(p[t])){if(t<p.length-1&&!(n(p[t])||u(p[t])||a(p[t])))throw new c(`streams[${t}]`,y[t],"must be readable");if(t>0&&!(s(p[t])||l(p[t])||a(p[t])))throw new c(`streams[${t}]`,y[t],"must be writable")}let b,m,g,_,w;const v=p[0],S=t(p,function(t){const e=_;_=null,e?e(t):t?w.destroy(t):x||E||w.destroy()}),E=!!(s(v)||l(v)||a(v)),x=!!(n(S)||u(S)||a(S));if(w=new e({writableObjectMode:!(null==v||!v.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:E,readable:x}),E){if(i(v))w._write=function(t,e,r){v.write(t,e)?r():b=r},w._final=function(t){v.end(),m=t},v.on("drain",function(){if(b){const t=b;b=null,t()}});else if(o(v)){const t=(a(v)?v.writable:v).getWriter();w._write=async function(e,r,i){try{await t.ready,t.write(e).catch(()=>{}),i()}catch(t){i(t)}},w._final=async function(e){try{await t.ready,t.close().catch(()=>{}),m=e}catch(t){e(t)}}}const t=a(S)?S.readable:S;d(t,()=>{if(m){const t=m;m=null,t()}})}if(x)if(i(S))S.on("readable",function(){if(g){const t=g;g=null,t()}}),S.on("end",function(){w.push(null)}),w._read=function(){for(;;){const t=S.read();if(null===t)return void(g=w._read);if(!w.push(t))return}};else if(o(S)){const t=(a(S)?S.readable:S).getReader();w._read=async function(){for(;;)try{const{value:e,done:r}=await t.read();if(!w.push(e))return;if(r)return void w.push(null)}catch{return}}}return w._destroy=function(t,e){t||null===_||(t=new h),g=null,b=null,m=null,null===_?e(t):(_=e,i(S)&&r(S,t))},w},ho}function Lo(){if(yo)return po;yo=1;const{ArrayPrototypePop:t,Promise:e}=zn(),{isIterable:r,isNodeStream:i,isWebStream:n}=Ms(),{pipelineImpl:s}=Ro(),{finished:o}=Cs();return Oo(),po={finished:o,pipeline:function(...o){return new e((e,a)=>{let l,u;const h=o[o.length-1];if(h&&"object"==typeof h&&!i(h)&&!r(h)&&!n(h)){const e=t(o);l=e.signal,u=e.end}s(o,(t,r)=>{t?a(t):e(r)},{signal:l,end:u})})}},po}function Oo(){if(bo)return Bn.exports;bo=1;const{Buffer:t}=c,{ObjectDefineProperty:e,ObjectKeys:r,ReflectApply:i}=zn(),{promisify:{custom:n}}=gs(),{streamReturningOperators:s,promiseReturningOperators:o}=function(){if(fo)return vs;fo=1;const t=globalThis.AbortController||ms.AbortController,{codes:{ERR_INVALID_ARG_VALUE:e,ERR_INVALID_ARG_TYPE:r,ERR_MISSING_ARGS:i,ERR_OUT_OF_RANGE:n},AbortError:s}=Vn(),{validateAbortSignal:o,validateInteger:a,validateObject:l}=Ss(),u=zn().Symbol("kWeak"),h=zn().Symbol("kResistStopPropagation"),{finished:c}=Cs(),f=Ao(),{addAbortSignalNoValidate:d}=qs(),{isWritable:p,isNodeStream:y}=Ms(),{deprecate:b}=gs(),{ArrayPrototypePush:m,Boolean:g,MathFloor:_,Number:w,NumberIsNaN:v,Promise:S,PromiseReject:E,PromiseResolve:x,PromisePrototypeThen:k,Symbol:T}=zn(),R=T("kEmpty"),A=T("kEof");function L(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&o(e.signal,"options.signal");let i=1;null!=(null==e?void 0:e.concurrency)&&(i=_(e.concurrency));let n=i-1;return null!=(null==e?void 0:e.highWaterMark)&&(n=_(e.highWaterMark)),a(i,"options.concurrency",1),a(n,"options.highWaterMark",0),n+=i,async function*(){const r=gs().AbortSignalAny([null==e?void 0:e.signal].filter(g)),o=this,a=[],l={signal:r};let u,h,c=!1,f=0;function d(){c=!0,p()}function p(){f-=1,y()}function y(){h&&!c&&f<i&&a.length<n&&(h(),h=null)}!async function(){try{for await(let e of o){if(c)return;if(r.aborted)throw new s;try{if(e=t(e,l),e===R)continue;e=x(e)}catch(t){e=E(t)}f+=1,k(e,p,d),a.push(e),u&&(u(),u=null),!c&&(a.length>=n||f>=i)&&await new S(t=>{h=t})}a.push(A)}catch(t){const e=E(t);k(e,p,d),a.push(e)}finally{c=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const t=await a[0];if(t===A)return;if(r.aborted)throw new s;t!==R&&(yield t),a.shift(),y()}await new S(t=>{u=t})}}finally{c=!0,h&&(h(),h=null)}}.call(this)}async function O(t,e=void 0){for await(const r of I.call(this,t,e))return!0;return!1}function I(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);return L.call(this,async function(e,r){return await t(e,r)?e:R},e)}class P extends i{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function D(t){if(t=w(t),v(t))return 0;if(t<0)throw new n("number",">= 0",t);return t}return vs.streamReturningOperators={asIndexedPairs:b(function(t=void 0){return null!=t&&l(t,"options"),null!=(null==t?void 0:t.signal)&&o(t.signal,"options.signal"),async function*(){let e=0;for await(const i of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new s({cause:t.signal.reason});yield[e++,i]}}.call(this)},"readable.asIndexedPairs will be removed in a future version."),drop:function(t,e=void 0){return null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&o(e.signal,"options.signal"),t=D(t),async function*(){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new s;for await(const r of this){var i;if(null!=e&&null!==(i=e.signal)&&void 0!==i&&i.aborted)throw new s;t--<=0&&(yield r)}}.call(this)},filter:I,flatMap:function(t,e){const r=L.call(this,t,e);return async function*(){for await(const t of r)yield*t}.call(this)},map:L,take:function(t,e=void 0){return null!=e&&l(e,"options"),null!=(null==e?void 0:e.signal)&&o(e.signal,"options.signal"),t=D(t),async function*(){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new s;for await(const r of this){var i;if(null!=e&&null!==(i=e.signal)&&void 0!==i&&i.aborted)throw new s;if(t-- >0&&(yield r),t<=0)return}}.call(this)},compose:function(t,r){if(null!=r&&l(r,"options"),null!=(null==r?void 0:r.signal)&&o(r.signal,"options.signal"),y(t)&&!p(t))throw new e("stream",t,"must be writable");const i=f(this,t);return null!=r&&r.signal&&d(r.signal,i),i}},vs.promiseReturningOperators={every:async function(t,e=void 0){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);return!await O.call(this,async(...e)=>!await t(...e),e)},forEach:async function(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);for await(const r of L.call(this,async function(e,r){return await t(e,r),R},e));},reduce:async function(e,i,n){var a;if("function"!=typeof e)throw new r("reducer",["Function","AsyncFunction"],e);null!=n&&l(n,"options"),null!=(null==n?void 0:n.signal)&&o(n.signal,"options.signal");let f=arguments.length>1;if(null!=n&&null!==(a=n.signal)&&void 0!==a&&a.aborted){const t=new s(void 0,{cause:n.signal.reason});throw this.once("error",()=>{}),await c(this.destroy(t)),t}const d=new t,p=d.signal;if(null!=n&&n.signal){const t={once:!0,[u]:this,[h]:!0};n.signal.addEventListener("abort",()=>d.abort(),t)}let y=!1;try{for await(const t of this){var b;if(y=!0,null!=n&&null!==(b=n.signal)&&void 0!==b&&b.aborted)throw new s;f?i=await e(i,t,{signal:p}):(i=t,f=!0)}if(!y&&!f)throw new P}finally{d.abort()}return i},toArray:async function(t){null!=t&&l(t,"options"),null!=(null==t?void 0:t.signal)&&o(t.signal,"options.signal");const e=[];for await(const i of this){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new s(void 0,{cause:t.signal.reason});m(e,i)}return e},some:O,find:async function(t,e){for await(const r of I.call(this,t,e))return r}},vs}(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:a}}=Vn(),l=Ao(),{setDefaultHighWaterMark:u,getDefaultHighWaterMark:h}=$s(),{pipeline:f}=Ro(),{destroyer:d}=Ns(),p=Cs(),y=Lo(),b=Ms(),m=Bn.exports=js().Stream;m.isDestroyed=b.isDestroyed,m.isDisturbed=b.isDisturbed,m.isErrored=b.isErrored,m.isReadable=b.isReadable,m.isWritable=b.isWritable,m.Readable=vo();for(const _ of r(s)){const w=s[_];function v(...t){if(new.target)throw a();return m.Readable.from(i(w,this,t))}e(v,"name",{__proto__:null,value:w.name}),e(v,"length",{__proto__:null,value:w.length}),e(m.Readable.prototype,_,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}for(const S of r(o)){const E=o[S];function x(...t){if(new.target)throw a();return i(E,this,t)}e(x,"name",{__proto__:null,value:E.name}),e(x,"length",{__proto__:null,value:E.length}),e(m.Readable.prototype,S,{__proto__:null,value:x,enumerable:!1,configurable:!0,writable:!0})}m.Writable=So(),m.Duplex=xo(),m.Transform=ko(),m.PassThrough=To(),m.pipeline=f;const{addAbortSignal:g}=qs();return m.addAbortSignal=g,m.finished=p,m.destroy=d,m.compose=l,m.setDefaultHighWaterMark=u,m.getDefaultHighWaterMark=h,e(m,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),e(f,n,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),e(p,n,{__proto__:null,enumerable:!0,get:()=>y.finished}),m.Stream=m,m._isUint8Array=function(t){return t instanceof Uint8Array},m._uint8ArrayToBuffer=function(e){return t.from(e.buffer,e.byteOffset,e.byteLength)},Bn.exports}function Io(){return mo||(mo=1,function(t){const e=u;if(e){const r=e.promises;t.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,t.exports._isUint8Array=e._isUint8Array,t.exports.isDisturbed=e.isDisturbed,t.exports.isErrored=e.isErrored,t.exports.isReadable=e.isReadable,t.exports.Readable=e.Readable,t.exports.Writable=e.Writable,t.exports.Duplex=e.Duplex,t.exports.Transform=e.Transform,t.exports.PassThrough=e.PassThrough,t.exports.addAbortSignal=e.addAbortSignal,t.exports.finished=e.finished,t.exports.destroy=e.destroy,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,"promises",{configurable:!0,enumerable:!0,get:()=>r}),t.exports.Stream=e.Stream}else{const e=Oo(),r=Lo(),i=e.Readable.destroy;t.exports=e.Readable,t.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,t.exports._isUint8Array=e._isUint8Array,t.exports.isDisturbed=e.isDisturbed,t.exports.isErrored=e.isErrored,t.exports.isReadable=e.isReadable,t.exports.Readable=e.Readable,t.exports.Writable=e.Writable,t.exports.Duplex=e.Duplex,t.exports.Transform=e.Transform,t.exports.PassThrough=e.PassThrough,t.exports.addAbortSignal=e.addAbortSignal,t.exports.finished=e.finished,t.exports.destroy=e.destroy,t.exports.destroy=i,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,"promises",{configurable:!0,enumerable:!0,get:()=>r}),t.exports.Stream=e.Stream}t.exports.default=t.exports}(Fn)),Fn.exports}var Po,Do,Mo,Co,No,jo,Fo,Bo,zo,Wo,Uo,Go,qo,Ho,$o,Vo,Zo,Yo,Qo,Ko,Xo,Jo,ta,ea,ra,ia,na,sa,oa,aa,la,ua,ha,ca,fa,da,pa,ya,ba,ma,ga,_a,wa,va,Sa,Ea,xa,ka,Ta,Ra,Aa,La,Oa,Ia,Pa,Da,Ma,Ca,Na,ja,Fa,Ba,za,Wa,Ua,Ga,qa,Ha,$a,Va,Za,Ya,Qa,Ka,Xa,Ja,tl,el,rl,il,nl,sl,ol,al,ll,ul,hl,cl,fl,dl,pl,yl,bl,ml,gl,_l,wl,vl,Sl,El,xl={exports:{}};function kl(){if(jo)return No;jo=1;var t=(Do||(Do=1,Po=function(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}),Po),e=function(){if(Co)return Mo;Co=1;var t=Ui(),e=nn(),r=sn(),i=t?t.isConcatSpreadable:void 0;return Mo=function(t){return r(t)||e(t)||!!(i&&t&&t[i])}}();return No=function r(i,n,s,o,a){var l=-1,u=i.length;for(s||(s=e),a||(a=[]);++l<u;){var h=i[l];n>0&&s(h)?n>1?r(h,n-1,s,o,a):t(a,h):o||(a[a.length]=h)}return a},No}function Tl(){if(Wo)return zo;Wo=1;var t=Zi()(Object,"create");return zo=t}function Rl(){if(Jo)return Xo;Jo=1;var t=function(){if(Go)return Uo;Go=1;var t=Tl();return Uo=function(){this.__data__=t?t(null):{},this.size=0}}(),e=Ho?qo:(Ho=1,qo=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),r=function(){if(Vo)return $o;Vo=1;var t=Tl(),e=Object.prototype.hasOwnProperty;return $o=function(r){var i=this.__data__;if(t){var n=i[r];return"__lodash_hash_undefined__"===n?void 0:n}return e.call(i,r)?i[r]:void 0}}(),i=function(){if(Yo)return Zo;Yo=1;var t=Tl(),e=Object.prototype.hasOwnProperty;return Zo=function(r){var i=this.__data__;return t?void 0!==i[r]:e.call(i,r)}}(),n=function(){if(Ko)return Qo;Ko=1;var t=Tl();return Qo=function(e,r){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=t&&void 0===r?"__lodash_hash_undefined__":r,this}}();function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=r,s.prototype.has=i,s.prototype.set=n,Xo=s}function Al(){if(ia)return ra;ia=1;var t=Xi();return ra=function(e,r){for(var i=e.length;i--;)if(t(e[i][0],r))return i;return-1}}function Ll(){if(da)return fa;da=1;var t=ea?ta:(ea=1,ta=function(){this.__data__=[],this.size=0}),e=function(){if(sa)return na;sa=1;var t=Al(),e=Array.prototype.splice;return na=function(r){var i=this.__data__,n=t(i,r);return!(n<0||(n==i.length-1?i.pop():e.call(i,n,1),--this.size,0))},na}(),r=function(){if(aa)return oa;aa=1;var t=Al();return oa=function(e){var r=this.__data__,i=t(r,e);return i<0?void 0:r[i][1]},oa}(),i=function(){if(ua)return la;ua=1;var t=Al();return la=function(e){return t(this.__data__,e)>-1}}(),n=function(){if(ca)return ha;ca=1;var t=Al();return ha=function(e,r){var i=this.__data__,n=t(i,e);return n<0?(++this.size,i.push([e,r])):i[n][1]=r,this},ha}();function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=r,s.prototype.has=i,s.prototype.set=n,fa=s}function Ol(){if(ma)return ba;ma=1;var t=Rl(),e=Ll(),r=function(){if(ya)return pa;ya=1;var t=Zi()(Wi(),"Map");return pa=t}();return ba=function(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}}function Il(){if(va)return wa;va=1;var t=_a?ga:(_a=1,ga=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t});return wa=function(e,r){var i=e.__data__;return t(r)?i["string"==typeof r?"string":"hash"]:i.map},wa}function Pl(){if(Ia)return Oa;Ia=1;var t=Ol(),e=function(){if(Ea)return Sa;Ea=1;var t=Il();return Sa=function(e){var r=t(this,e).delete(e);return this.size-=r?1:0,r}}(),r=function(){if(ka)return xa;ka=1;var t=Il();return xa=function(e){return t(this,e).get(e)}}(),i=function(){if(Ra)return Ta;Ra=1;var t=Il();return Ta=function(e){return t(this,e).has(e)}}(),n=function(){if(La)return Aa;La=1;var t=Il();return Aa=function(e,r){var i=t(this,e),n=i.size;return i.set(e,r),this.size+=i.size==n?0:1,this}}();function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=r,s.prototype.has=i,s.prototype.set=n,Oa=s}function Dl(){if(ja)return Na;ja=1;var t=Pl(),e=Da?Pa:(Da=1,Pa=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),r=Ca?Ma:(Ca=1,Ma=function(t){return this.__data__.has(t)});function i(e){var r=-1,i=null==e?0:e.length;for(this.__data__=new t;++r<i;)this.add(e[r])}return i.prototype.add=i.prototype.push=e,i.prototype.has=r,Na=i}function Ml(){if(Ha)return qa;Ha=1;var t=(Ba||(Ba=1,Fa=function(t,e,r,i){for(var n=t.length,s=r+(i?1:-1);i?s--:++s<n;)if(e(t[s],s,t))return s;return-1}),Fa),e=Wa?za:(Wa=1,za=function(t){return t!=t}),r=(Ga||(Ga=1,Ua=function(t,e,r){for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}),Ua);return qa=function(i,n,s){return n==n?r(i,n,s):t(i,e,s)}}function Cl(){if(Va)return $a;Va=1;var t=Ml();return $a=function(e,r){return!!(null==e?0:e.length)&&t(e,r,0)>-1}}function Nl(){if(Ya)return Za;return Ya=1,Za=function(t,e,r){for(var i=-1,n=null==t?0:t.length;++i<n;)if(r(e,t[i]))return!0;return!1},Za}function jl(){if(Ja)return Xa;return Ja=1,Xa=function(t,e){return t.has(e)}}function Fl(){if(el)return tl;el=1;var t=Dl(),e=Cl(),r=Nl(),i=(Ka||(Ka=1,Qa=function(t,e){for(var r=-1,i=null==t?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}),Qa),n=yn(),s=jl();return tl=function(o,a,l,u){var h=-1,c=e,f=!0,d=o.length,p=[],y=a.length;if(!d)return p;l&&(a=i(a,n(l))),u?(c=r,f=!1):a.length>=200&&(c=s,f=!1,a=new t(a));t:for(;++h<d;){var b=o[h],m=null==l?b:l(b);if(b=u||0!==b?b:0,f&&m==m){for(var g=y;g--;)if(a[g]===m)continue t;p.push(b)}else c(a,m,u)||p.push(b)}return p},tl}function Bl(){if(il)return rl;il=1;var t=tn(),e=rn();return rl=function(r){return e(r)&&t(r)}}function zl(){if(cl)return hl;return cl=1,hl=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r},hl}function Wl(){if(dl)return fl;dl=1;var t=function(){if(al)return ol;al=1;var t=Zi()(Wi(),"Set");return ol=t}(),e=ul?ll:(ul=1,ll=function(){}),r=zl(),i=t&&1/r(new t([,-0]))[1]==1/0?function(e){return new t(e)}:e;return fl=i}function Ul(){if(ml)return bl;ml=1;var t=kl(),e=Ki(),r=function(){if(yl)return pl;yl=1;var t=Dl(),e=Cl(),r=Nl(),i=jl(),n=Wl(),s=zl();return pl=function(o,a,l){var u=-1,h=e,c=o.length,f=!0,d=[],p=d;if(l)f=!1,h=r;else if(c>=200){var y=a?null:n(o);if(y)return s(y);f=!1,h=i,p=new t}else p=a?[]:d;t:for(;++u<c;){var b=o[u],m=a?a(b):b;if(b=l||0!==b?b:0,f&&m==m){for(var g=p.length;g--;)if(p[g]===m)continue t;a&&p.push(m),d.push(b)}else h(p,m,l)||(p!==d&&p.push(m),d.push(b))}return d},pl}(),i=Bl(),n=e(function(e){return r(t(e,1,i,!0))});return bl=n}function Gl(){if(vl)return wl;vl=1;var t=(_l||(_l=1,gl=function(t,e){return function(r){return t(e(r))}}),gl),e=t(Object.getPrototypeOf,Object);return wl=e}var ql,Hl={},$l={},Vl={},Zl={};function Yl(){if(ql)return Zl;ql=1,Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.LRUCache=void 0;const t="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,e=new Set,r="object"==typeof process&&process?process:{},i=(t,e,i,n)=>{"function"==typeof r.emitWarning?r.emitWarning(t,e,i,n):console.error(`[${i}] ${e}: ${t}`)};let n=globalThis.AbortController,s=globalThis.AbortSignal;if(void 0===n){s=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},n=class{constructor(){e()}signal=new s;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==r.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{t&&(t=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const o=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),a=t=>o(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?l:null:null;class l extends Array{constructor(t){super(t),this.fill(0)}}class u{heap;length;static#t=!1;static create(t){const e=a(t);if(!e)return[];u.#t=!0;const r=new u(t,e);return u.#t=!1,r}constructor(t,e){if(!u.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class h{#e;#r;#i;#n;#s;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#l;#u;#h;#c;#f;#d;#p;#y;#b;#m;#g;#_;#w;#v;#S;#E;static unsafeExposeInternals(t){return{starts:t.#_,ttls:t.#w,sizes:t.#g,keyMap:t.#u,keyList:t.#h,valList:t.#c,next:t.#f,prev:t.#d,get head(){return t.#p},get tail(){return t.#y},free:t.#b,isBackgroundFetch:e=>t.#x(e),backgroundFetch:(e,r,i,n)=>t.#k(e,r,i,n),moveToTail:e=>t.#T(e),indexes:e=>t.#R(e),rindexes:e=>t.#A(e),isStale:e=>t.#L(e)}}get max(){return this.#e}get maxSize(){return this.#r}get calculatedSize(){return this.#l}get size(){return this.#a}get fetchMethod(){return this.#s}get memoMethod(){return this.#o}get dispose(){return this.#i}get disposeAfter(){return this.#n}constructor(t){const{max:r=0,ttl:n,ttlResolution:s=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:f,allowStale:d,dispose:p,disposeAfter:y,noDisposeOnSet:b,noUpdateTTL:m,maxSize:g=0,maxEntrySize:_=0,sizeCalculation:w,fetchMethod:v,memoMethod:S,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:T,ignoreFetchAbort:R}=t;if(0!==r&&!o(r))throw new TypeError("max option must be a nonnegative integer");const A=r?a(r):Array;if(!A)throw new Error("invalid max value: "+r);if(this.#e=r,this.#r=g,this.maxEntrySize=_||this.#r,this.sizeCalculation=w,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==S&&"function"!=typeof S)throw new TypeError("memoMethod must be a function if defined");if(this.#o=S,void 0!==v&&"function"!=typeof v)throw new TypeError("fetchMethod must be a function if specified");if(this.#s=v,this.#S=!!v,this.#u=new Map,this.#h=new Array(r).fill(void 0),this.#c=new Array(r).fill(void 0),this.#f=new A(r),this.#d=new A(r),this.#p=0,this.#y=0,this.#b=u.create(r),this.#a=0,this.#l=0,"function"==typeof p&&(this.#i=p),"function"==typeof y?(this.#n=y,this.#m=[]):(this.#n=void 0,this.#m=void 0),this.#v=!!this.#i,this.#E=!!this.#n,this.noDisposeOnSet=!!b,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!R,0!==this.maxEntrySize){if(0!==this.#r&&!o(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!o(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#O()}if(this.allowStale=!!d,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!f,this.ttlResolution=o(s)||0===s?s:1,this.ttlAutopurge=!!l,this.ttl=n||0,this.ttl){if(!o(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#I()}if(0===this.#e&&0===this.ttl&&0===this.#r)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#r){const t="LRU_CACHE_UNBOUNDED";if((t=>!e.has(t))(t)){e.add(t);i("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,h)}}}getRemainingTTL(t){return this.#u.has(t)?1/0:0}#I(){const e=new l(this.#e),r=new l(this.#e);this.#w=e,this.#_=r,this.#P=(i,n,s=t.now())=>{if(r[i]=0!==n?s:0,e[i]=n,0!==n&&this.ttlAutopurge){const t=setTimeout(()=>{this.#L(i)&&this.#D(this.#h[i],"expire")},n+1);t.unref&&t.unref()}},this.#M=i=>{r[i]=0!==e[i]?t.now():0},this.#C=(t,s)=>{if(e[s]){const o=e[s],a=r[s];if(!o||!a)return;t.ttl=o,t.start=a,t.now=i||n();const l=t.now-a;t.remainingTTL=o-l}};let i=0;const n=()=>{const e=t.now();if(this.ttlResolution>0){i=e;const t=setTimeout(()=>i=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=t=>{const s=this.#u.get(t);if(void 0===s)return 0;const o=e[s],a=r[s];if(!o||!a)return 1/0;return o-((i||n())-a)},this.#L=t=>{const s=r[t],o=e[t];return!!o&&!!s&&(i||n())-s>o}}#M=()=>{};#C=()=>{};#P=()=>{};#L=()=>!1;#O(){const t=new l(this.#e);this.#l=0,this.#g=t,this.#N=e=>{this.#l-=t[e],t[e]=0},this.#j=(t,e,r,i)=>{if(this.#x(e))return 0;if(!o(r)){if(!i)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(r=i(e,t),!o(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.#F=(e,r,i)=>{if(t[e]=r,this.#r){const r=this.#r-t[e];for(;this.#l>r;)this.#B(!0)}this.#l+=t[e],i&&(i.entrySize=r,i.totalCalculatedSize=this.#l)}}#N=t=>{};#F=(t,e,r)=>{};#j=(t,e,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:t=this.allowStale}={}){if(this.#a)for(let e=this.#y;this.#z(e)&&(!t&&this.#L(e)||(yield e),e!==this.#p);)e=this.#d[e]}*#A({allowStale:t=this.allowStale}={}){if(this.#a)for(let e=this.#p;this.#z(e)&&(!t&&this.#L(e)||(yield e),e!==this.#y);)e=this.#f[e]}#z(t){return void 0!==t&&this.#u.get(this.#h[t])===t}*entries(){for(const t of this.#R())void 0===this.#c[t]||void 0===this.#h[t]||this.#x(this.#c[t])||(yield[this.#h[t],this.#c[t]])}*rentries(){for(const t of this.#A())void 0===this.#c[t]||void 0===this.#h[t]||this.#x(this.#c[t])||(yield[this.#h[t],this.#c[t]])}*keys(){for(const t of this.#R()){const e=this.#h[t];void 0===e||this.#x(this.#c[t])||(yield e)}}*rkeys(){for(const t of this.#A()){const e=this.#h[t];void 0===e||this.#x(this.#c[t])||(yield e)}}*values(){for(const t of this.#R()){void 0===this.#c[t]||this.#x(this.#c[t])||(yield this.#c[t])}}*rvalues(){for(const t of this.#A()){void 0===this.#c[t]||this.#x(this.#c[t])||(yield this.#c[t])}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const r of this.#R()){const i=this.#c[r],n=this.#x(i)?i.__staleWhileFetching:i;if(void 0!==n&&t(n,this.#h[r],this))return this.get(this.#h[r],e)}}forEach(t,e=this){for(const r of this.#R()){const i=this.#c[r],n=this.#x(i)?i.__staleWhileFetching:i;void 0!==n&&t.call(e,n,this.#h[r],this)}}rforEach(t,e=this){for(const r of this.#A()){const i=this.#c[r],n=this.#x(i)?i.__staleWhileFetching:i;void 0!==n&&t.call(e,n,this.#h[r],this)}}purgeStale(){let t=!1;for(const e of this.#A({allowStale:!0}))this.#L(e)&&(this.#D(this.#h[e],"expire"),t=!0);return t}info(e){const r=this.#u.get(e);if(void 0===r)return;const i=this.#c[r],n=this.#x(i)?i.__staleWhileFetching:i;if(void 0===n)return;const s={value:n};if(this.#w&&this.#_){const e=this.#w[r],i=this.#_[r];if(e&&i){const r=e-(t.now()-i);s.ttl=r,s.start=Date.now()}}return this.#g&&(s.size=this.#g[r]),s}dump(){const e=[];for(const r of this.#R({allowStale:!0})){const i=this.#h[r],n=this.#c[r],s=this.#x(n)?n.__staleWhileFetching:n;if(void 0===s||void 0===i)continue;const o={value:s};if(this.#w&&this.#_){o.ttl=this.#w[r];const e=t.now()-this.#_[r];o.start=Math.floor(Date.now()-e)}this.#g&&(o.size=this.#g[r]),e.unshift([i,o])}return e}load(e){this.clear();for(const[r,i]of e){if(i.start){const e=Date.now()-i.start;i.start=t.now()-e}this.set(r,i.value,i)}}set(t,e,r={}){if(void 0===e)return this.delete(t),this;const{ttl:i=this.ttl,start:n,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=r;let{noUpdateTTL:l=this.noUpdateTTL}=r;const u=this.#j(t,e,r.size||0,o);if(this.maxEntrySize&&u>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#D(t,"set"),this;let h=0===this.#a?void 0:this.#u.get(t);if(void 0===h)h=0===this.#a?this.#y:0!==this.#b.length?this.#b.pop():this.#a===this.#e?this.#B(!1):this.#a,this.#h[h]=t,this.#c[h]=e,this.#u.set(t,h),this.#f[this.#y]=h,this.#d[h]=this.#y,this.#y=h,this.#a++,this.#F(h,u,a),a&&(a.set="add"),l=!1;else{this.#T(h);const r=this.#c[h];if(e!==r){if(this.#S&&this.#x(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=r;void 0===e||s||(this.#v&&this.#i?.(e,t,"set"),this.#E&&this.#m?.push([e,t,"set"]))}else s||(this.#v&&this.#i?.(r,t,"set"),this.#E&&this.#m?.push([r,t,"set"]));if(this.#N(h),this.#F(h,u,a),this.#c[h]=e,a){a.set="replace";const t=r&&this.#x(r)?r.__staleWhileFetching:r;void 0!==t&&(a.oldValue=t)}}else a&&(a.set="update")}if(0===i||this.#w||this.#I(),this.#w&&(l||this.#P(h,i,n),a&&this.#C(a,h)),!s&&this.#E&&this.#m){const t=this.#m;let e;for(;e=t?.shift();)this.#n?.(...e)}return this}pop(){try{for(;this.#a;){const t=this.#c[this.#p];if(this.#B(!0),this.#x(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#E&&this.#m){const t=this.#m;let e;for(;e=t?.shift();)this.#n?.(...e)}}}#B(t){const e=this.#p,r=this.#h[e],i=this.#c[e];return this.#S&&this.#x(i)?i.__abortController.abort(new Error("evicted")):(this.#v||this.#E)&&(this.#v&&this.#i?.(i,r,"evict"),this.#E&&this.#m?.push([i,r,"evict"])),this.#N(e),t&&(this.#h[e]=void 0,this.#c[e]=void 0,this.#b.push(e)),1===this.#a?(this.#p=this.#y=0,this.#b.length=0):this.#p=this.#f[e],this.#u.delete(r),this.#a--,e}has(t,e={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=e,n=this.#u.get(t);if(void 0!==n){const t=this.#c[n];if(this.#x(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#L(n))return r&&this.#M(n),i&&(i.has="hit",this.#C(i,n)),!0;i&&(i.has="stale",this.#C(i,n))}else i&&(i.has="miss");return!1}peek(t,e={}){const{allowStale:r=this.allowStale}=e,i=this.#u.get(t);if(void 0===i||!r&&this.#L(i))return;const n=this.#c[i];return this.#x(n)?n.__staleWhileFetching:n}#k(t,e,r,i){const s=void 0===e?void 0:this.#c[e];if(this.#x(s))return s;const o=new n,{signal:a}=r;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});const l={signal:o.signal,options:r,context:i},u=(i,n=!1)=>{const{aborted:s}=o.signal,a=r.ignoreFetchAbort&&void 0!==i;if(r.status&&(s&&!n?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,a&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),s&&!a&&!n)return h(o.signal.reason);const u=c;return this.#c[e]===c&&(void 0===i?u.__staleWhileFetching?this.#c[e]=u.__staleWhileFetching:this.#D(t,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(t,i,l.options))),i},h=i=>{const{aborted:n}=o.signal,s=n&&r.allowStaleOnFetchAbort,a=s||r.allowStaleOnFetchRejection,l=a||r.noDeleteOnFetchRejection,u=c;if(this.#c[e]===c){!l||void 0===u.__staleWhileFetching?this.#D(t,"fetch"):s||(this.#c[e]=u.__staleWhileFetching)}if(a)return r.status&&void 0!==u.__staleWhileFetching&&(r.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw i};r.status&&(r.status.fetchDispatched=!0);const c=new Promise((e,i)=>{const n=this.#s?.(t,s,l);n&&n instanceof Promise&&n.then(t=>e(void 0===t?void 0:t),i),o.signal.addEventListener("abort",()=>{r.ignoreFetchAbort&&!r.allowStaleOnFetchAbort||(e(void 0),r.allowStaleOnFetchAbort&&(e=t=>u(t,!0)))})}).then(u,t=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=t),h(t))),f=Object.assign(c,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return void 0===e?(this.set(t,f,{...l.options,status:void 0}),e=this.#u.get(t)):this.#c[e]=f,f}#x(t){if(!this.#S)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof n}async fetch(t,e={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:p,forceRefresh:y=!1,status:b,signal:m}=e;if(!this.#S)return b&&(b.fetch="get"),this.get(t,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:b});const g={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:s,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:d,ignoreFetchAbort:f,status:b,signal:m};let _=this.#u.get(t);if(void 0===_){b&&(b.fetch="miss");const e=this.#k(t,_,g,p);return e.__returned=e}{const e=this.#c[_];if(this.#x(e)){const t=r&&void 0!==e.__staleWhileFetching;return b&&(b.fetch="inflight",t&&(b.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}const n=this.#L(_);if(!y&&!n)return b&&(b.fetch="hit"),this.#T(_),i&&this.#M(_),b&&this.#C(b,_),e;const s=this.#k(t,_,g,p),o=void 0!==s.__staleWhileFetching&&r;return b&&(b.fetch=n?"stale":"refresh",o&&n&&(b.returnedStale=!0)),o?s.__staleWhileFetching:s.__returned=s}}async forceFetch(t,e={}){const r=await this.fetch(t,e);if(void 0===r)throw new Error("fetch() returned undefined");return r}memo(t,e={}){const r=this.#o;if(!r)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:n,...s}=e,o=this.get(t,s);if(!n&&void 0!==o)return o;const a=r(t,o,{options:s,context:i});return this.set(t,a,s),a}get(t,e={}){const{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:s}=e,o=this.#u.get(t);if(void 0!==o){const e=this.#c[o],a=this.#x(e);return s&&this.#C(s,o),this.#L(o)?(s&&(s.get="stale"),a?(s&&r&&void 0!==e.__staleWhileFetching&&(s.returnedStale=!0),r?e.__staleWhileFetching:void 0):(n||this.#D(t,"expire"),s&&r&&(s.returnedStale=!0),r?e:void 0)):(s&&(s.get="hit"),a?e.__staleWhileFetching:(this.#T(o),i&&this.#M(o),e))}s&&(s.get="miss")}#W(t,e){this.#d[e]=t,this.#f[t]=e}#T(t){t!==this.#y&&(t===this.#p?this.#p=this.#f[t]:this.#W(this.#d[t],this.#f[t]),this.#W(this.#y,t),this.#y=t)}delete(t){return this.#D(t,"delete")}#D(t,e){let r=!1;if(0!==this.#a){const i=this.#u.get(t);if(void 0!==i)if(r=!0,1===this.#a)this.#U(e);else{this.#N(i);const r=this.#c[i];if(this.#x(r)?r.__abortController.abort(new Error("deleted")):(this.#v||this.#E)&&(this.#v&&this.#i?.(r,t,e),this.#E&&this.#m?.push([r,t,e])),this.#u.delete(t),this.#h[i]=void 0,this.#c[i]=void 0,i===this.#y)this.#y=this.#d[i];else if(i===this.#p)this.#p=this.#f[i];else{const t=this.#d[i];this.#f[t]=this.#f[i];const e=this.#f[i];this.#d[e]=this.#d[i]}this.#a--,this.#b.push(i)}}if(this.#E&&this.#m?.length){const t=this.#m;let e;for(;e=t?.shift();)this.#n?.(...e)}return r}clear(){return this.#U("delete")}#U(t){for(const e of this.#A({allowStale:!0})){const r=this.#c[e];if(this.#x(r))r.__abortController.abort(new Error("deleted"));else{const i=this.#h[e];this.#v&&this.#i?.(r,i,t),this.#E&&this.#m?.push([r,i,t])}}if(this.#u.clear(),this.#c.fill(void 0),this.#h.fill(void 0),this.#w&&this.#_&&(this.#w.fill(0),this.#_.fill(0)),this.#g&&this.#g.fill(0),this.#p=0,this.#y=0,this.#b.length=0,this.#l=0,this.#a=0,this.#E&&this.#m){const t=this.#m;let e;for(;e=t?.shift();)this.#n?.(...e)}}}return Zl.LRUCache=h,Zl}var Ql,Kl,Xl={};function Jl(){return Ql||(Ql=1,function(t){var e=Xl&&Xl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.Minipass=t.isWritable=t.isReadable=t.isStream=void 0;const r="object"==typeof process&&process?process:{stdout:null,stderr:null},i=m,n=e(g),s=w;t.isStream=e=>!!e&&"object"==typeof e&&(e instanceof q||e instanceof n.default||(0,t.isReadable)(e)||(0,t.isWritable)(e));t.isReadable=t=>!!t&&"object"==typeof t&&t instanceof i.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==n.default.Writable.prototype.pipe;t.isWritable=t=>!!t&&"object"==typeof t&&t instanceof i.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end;const o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),u=Symbol("emittingEnd"),h=Symbol("emittedError"),c=Symbol("closed"),f=Symbol("read"),d=Symbol("flush"),p=Symbol("flushChunk"),y=Symbol("encoding"),b=Symbol("decoder"),_=Symbol("flowing"),v=Symbol("paused"),S=Symbol("resume"),E=Symbol("buffer"),x=Symbol("pipes"),k=Symbol("bufferLength"),T=Symbol("bufferPush"),R=Symbol("bufferShift"),A=Symbol("objectMode"),L=Symbol("destroyed"),O=Symbol("error"),I=Symbol("emitData"),P=Symbol("emitEnd"),D=Symbol("emitEnd2"),M=Symbol("async"),C=Symbol("abort"),N=Symbol("aborted"),j=Symbol("signal"),F=Symbol("dataListeners"),B=Symbol("discarded"),z=t=>Promise.resolve().then(t),W=t=>t();class U{src;dest;opts;ondrain;constructor(t,e,r){this.src=t,this.dest=e,this.opts=r,this.ondrain=()=>t[S](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class G extends U{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,r){super(t,e,r),this.proxyErrors=t=>this.dest.emit("error",t),t.on("error",this.proxyErrors)}}class q extends i.EventEmitter{[_]=!1;[v]=!1;[x]=[];[E]=[];[A];[y];[M];[b];[o]=!1;[l]=!1;[u]=!1;[c]=!1;[h]=null;[k]=0;[L]=!1;[j];[N]=!1;[F]=0;[B]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[A]=!0,this[y]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[y]=e.encoding,this[A]=!1):(this[A]=!1,this[y]=null),this[M]=!!e.async,this[b]=this[y]?new s.StringDecoder(this[y]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[E]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[x]});const{signal:r}=e;r&&(this[j]=r,r.aborted?this[C]():r.addEventListener("abort",()=>this[C]()))}get bufferLength(){return this[k]}get encoding(){return this[y]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[A]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[M]}set async(t){this[M]=this[M]||!!t}[C](){this[N]=!0,this.emit("abort",this[j]?.reason),this.destroy(this[j]?.reason)}get aborted(){return this[N]}set aborted(t){}write(t,e,r){if(this[N])return!1;if(this[o])throw new Error("write after end");if(this[L])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(r=e,e="utf8"),e||(e="utf8");const i=this[M]?z:W;if(!this[A]&&!Buffer.isBuffer(t))if(n=t,!Buffer.isBuffer(n)&&ArrayBuffer.isView(n))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var n;return this[A]?(this[_]&&0!==this[k]&&this[d](!0),this[_]?this.emit("data",t):this[T](t),0!==this[k]&&this.emit("readable"),r&&i(r),this[_]):t.length?("string"!=typeof t||e===this[y]&&!this[b]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[y]&&(t=this[b].write(t)),this[_]&&0!==this[k]&&this[d](!0),this[_]?this.emit("data",t):this[T](t),0!==this[k]&&this.emit("readable"),r&&i(r),this[_]):(0!==this[k]&&this.emit("readable"),r&&i(r),this[_])}read(t){if(this[L])return null;if(this[B]=!1,0===this[k]||0===t||t&&t>this[k])return this[a](),null;this[A]&&(t=null),this[E].length>1&&!this[A]&&(this[E]=[this[y]?this[E].join(""):Buffer.concat(this[E],this[k])]);const e=this[f](t||null,this[E][0]);return this[a](),e}[f](t,e){if(this[A])this[R]();else{const r=e;t===r.length||null===t?this[R]():"string"==typeof r?(this[E][0]=r.slice(t),e=r.slice(0,t),this[k]-=t):(this[E][0]=r.subarray(t),e=r.subarray(0,t),this[k]-=t)}return this.emit("data",e),this[E].length||this[o]||this.emit("drain"),e}end(t,e,r){return"function"==typeof t&&(r=t,t=void 0),"function"==typeof e&&(r=e,e="utf8"),void 0!==t&&this.write(t,e),r&&this.once("end",r),this[o]=!0,this.writable=!1,!this[_]&&this[v]||this[a](),this}[S](){this[L]||(this[F]||this[x].length||(this[B]=!0),this[v]=!1,this[_]=!0,this.emit("resume"),this[E].length?this[d]():this[o]?this[a]():this.emit("drain"))}resume(){return this[S]()}pause(){this[_]=!1,this[v]=!0,this[B]=!1}get destroyed(){return this[L]}get flowing(){return this[_]}get paused(){return this[v]}[T](t){this[A]?this[k]+=1:this[k]+=t.length,this[E].push(t)}[R](){return this[A]?this[k]-=1:this[k]-=this[E][0].length,this[E].shift()}[d](t=!1){do{}while(this[p](this[R]())&&this[E].length);t||this[E].length||this[o]||this.emit("drain")}[p](t){return this.emit("data",t),this[_]}pipe(t,e){if(this[L])return t;this[B]=!1;const i=this[l];return e=e||{},t===r.stdout||t===r.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,i?e.end&&t.end():(this[x].push(e.proxyErrors?new G(this,t,e):new U(this,t,e)),this[M]?z(()=>this[S]()):this[S]()),t}unpipe(t){const e=this[x].find(e=>e.dest===t);e&&(1===this[x].length?(this[_]&&0===this[F]&&(this[_]=!1),this[x]=[]):this[x].splice(this[x].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const r=super.on(t,e);if("data"===t)this[B]=!1,this[F]++,this[x].length||this[_]||this[S]();else if("readable"===t&&0!==this[k])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[l])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[h]){const t=e;this[M]?z(()=>t.call(this,this[h])):t.call(this,this[h])}return r}removeListener(t,e){return this.off(t,e)}off(t,e){const r=super.off(t,e);return"data"===t&&(this[F]=this.listeners("data").length,0!==this[F]||this[B]||this[x].length||(this[_]=!1)),r}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[F]=0,this[B]||this[x].length||(this[_]=!1)),e}get emittedEnd(){return this[l]}[a](){this[u]||this[l]||this[L]||0!==this[E].length||!this[o]||(this[u]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[c]&&this.emit("close"),this[u]=!1)}emit(t,...e){const r=e[0];if("error"!==t&&"close"!==t&&t!==L&&this[L])return!1;if("data"===t)return!(!this[A]&&!r)&&(this[M]?(z(()=>this[I](r)),!0):this[I](r));if("end"===t)return this[P]();if("close"===t){if(this[c]=!0,!this[l]&&!this[L])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[h]=r,super.emit(O,r);const t=!(this[j]&&!this.listeners("error").length)&&super.emit("error",r);return this[a](),t}if("resume"===t){const t=super.emit("resume");return this[a](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const i=super.emit(t,...e);return this[a](),i}[I](t){for(const e of this[x])!1===e.dest.write(t)&&this.pause();const e=!this[B]&&super.emit("data",t);return this[a](),e}[P](){return!this[l]&&(this[l]=!0,this.readable=!1,this[M]?(z(()=>this[D]()),!0):this[D]())}[D](){if(this[b]){const t=this[b].end();if(t){for(const e of this[x])e.dest.write(t);this[B]||super.emit("data",t)}}for(const t of this[x])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[A]||(t.dataLength=0);const e=this.promise();return this.on("data",e=>{t.push(e),this[A]||(t.dataLength+=e.length)}),await e,t}async concat(){if(this[A])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[y]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(L,()=>e(new Error("stream destroyed"))),this.on("error",t=>e(t)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[B]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const r=this.read();if(null!==r)return Promise.resolve({done:!1,value:r});if(this[o])return e();let i,n;const s=t=>{this.off("data",a),this.off("end",l),this.off(L,u),e(),n(t)},a=t=>{this.off("error",s),this.off("end",l),this.off(L,u),this.pause(),i({value:t,done:!!this[o]})},l=()=>{this.off("error",s),this.off("data",a),this.off(L,u),e(),i({done:!0,value:void 0})},u=()=>s(new Error("stream destroyed"));return new Promise((t,e)=>{n=e,i=t,this.once(L,u),this.once("error",s),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[B]=!1;let t=!1;const e=()=>(this.pause(),this.off(O,e),this.off(L,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(O,e),this.once(L,e),{next:()=>{if(t)return e();const r=this.read();return null===r?e():{done:!1,value:r}},throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[L])return t?this.emit("error",t):this.emit(L),this;this[L]=!0,this[B]=!0,this[E].length=0,this[k]=0;return"function"!=typeof this.close||this[c]||this.close(),t?this.emit("error",t):this.emit(L),this}static get isStream(){return t.isStream}}t.Minipass=q}(Xl)),Xl}function tu(){if(Kl)return Vl;Kl=1;var t=Vl&&Vl.__createBinding||(Object.create?function(t,e,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);n&&!("get"in n?!e.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){void 0===i&&(i=r),t[i]=e[r]}),e=Vl&&Vl.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=Vl&&Vl.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(null!=r)for(var n in r)"default"!==n&&Object.prototype.hasOwnProperty.call(r,n)&&t(i,r,n);return e(i,r),i};Object.defineProperty(Vl,"__esModule",{value:!0}),Vl.PathScurry=Vl.Path=Vl.PathScurryDarwin=Vl.PathScurryPosix=Vl.PathScurryWin32=Vl.PathScurryBase=Vl.PathPosix=Vl.PathWin32=Vl.PathBase=Vl.ChildrenCache=Vl.ResolveCache=void 0;const n=Yl(),s=p,o=d,a=i,l=r(y),u=a.realpathSync.native,h=b,c=Jl(),f={lstatSync:a.lstatSync,readdir:a.readdir,readdirSync:a.readdirSync,readlinkSync:a.readlinkSync,realpathSync:u,promises:{lstat:h.lstat,readdir:h.readdir,readlink:h.readlink,realpath:h.realpath}},m=t=>t&&t!==f&&t!==l?{...f,...t,promises:{...f.promises,...t.promises||{}}}:f,g=/^\\\\\?\\([a-z]:)\\?$/i,_=/[\\\/]/,w=10,v=15,S=-16,E=128,x=256,k=512,T=t=>t.isFile()?8:t.isDirectory()?4:t.isSymbolicLink()?w:t.isCharacterDevice()?2:t.isBlockDevice()?6:t.isSocket()?12:t.isFIFO()?1:0,R=new Map,A=t=>{const e=R.get(t);if(e)return e;const r=t.normalize("NFKD");return R.set(t,r),r},L=new Map,O=t=>{const e=L.get(t);if(e)return e;const r=A(t.toLowerCase());return L.set(t,r),r};class I extends n.LRUCache{constructor(){super({max:256})}}Vl.ResolveCache=I;class P extends n.LRUCache{constructor(t=16384){super({maxSize:t,sizeCalculation:t=>t.length+1})}}Vl.ChildrenCache=P;const D=Symbol("PathScurry setAsCwd");class M{name;root;roots;parent;nocase;isCWD=!1;#G;#q;get dev(){return this.#q}#H;get mode(){return this.#H}#$;get nlink(){return this.#$}#V;get uid(){return this.#V}#Z;get gid(){return this.#Z}#Y;get rdev(){return this.#Y}#Q;get blksize(){return this.#Q}#K;get ino(){return this.#K}#a;get size(){return this.#a}#X;get blocks(){return this.#X}#J;get atimeMs(){return this.#J}#tt;get mtimeMs(){return this.#tt}#et;get ctimeMs(){return this.#et}#rt;get birthtimeMs(){return this.#rt}#it;get atime(){return this.#it}#nt;get mtime(){return this.#nt}#st;get ctime(){return this.#st}#ot;get birthtime(){return this.#ot}#at;#lt;#ut;#ht;#ct;#ft;#dt;#pt;#yt;#bt;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=0,r,i,n,s,o){this.name=t,this.#at=n?O(t):A(t),this.#dt=1023&e,this.nocase=n,this.roots=i,this.root=r||this,this.#pt=s,this.#ut=o.fullpath,this.#ct=o.relative,this.#ft=o.relativePosix,this.parent=o.parent,this.parent?this.#G=this.parent.#G:this.#G=m(o.fs)}depth(){return void 0!==this.#lt?this.#lt:this.parent?this.#lt=this.parent.depth()+1:this.#lt=0}childrenCache(){return this.#pt}resolve(t){if(!t)return this;const e=this.getRootString(t),r=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#mt(r):this.#mt(r)}#mt(t){let e=this;for(const r of t)e=e.child(r);return e}children(){const t=this.#pt.get(this);if(t)return t;const e=Object.assign([],{provisional:0});return this.#pt.set(this,e),this.#dt&=-17,e}child(t,e){if(""===t||"."===t)return this;if(".."===t)return this.parent||this;const r=this.children(),i=this.nocase?O(t):A(t);for(const t of r)if(t.#at===i)return t;const n=this.parent?this.sep:"",s=this.#ut?this.#ut+n+t:void 0,o=this.newChild(t,0,{...e,parent:this,fullpath:s});return this.canReaddir()||(o.#dt|=E),r.push(o),o}relative(){if(this.isCWD)return"";if(void 0!==this.#ct)return this.#ct;const t=this.name,e=this.parent;if(!e)return this.#ct=this.name;const r=e.relative();return r+(r&&e.parent?this.sep:"")+t}relativePosix(){if("/"===this.sep)return this.relative();if(this.isCWD)return"";if(void 0!==this.#ft)return this.#ft;const t=this.name,e=this.parent;if(!e)return this.#ft=this.fullpathPosix();const r=e.relativePosix();return r+(r&&e.parent?"/":"")+t}fullpath(){if(void 0!==this.#ut)return this.#ut;const t=this.name,e=this.parent;if(!e)return this.#ut=this.name;const r=e.fullpath()+(e.parent?this.sep:"")+t;return this.#ut=r}fullpathPosix(){if(void 0!==this.#ht)return this.#ht;if("/"===this.sep)return this.#ht=this.fullpath();if(!this.parent){const t=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(t)?this.#ht=`//?/${t}`:this.#ht=t}const t=this.parent,e=t.fullpathPosix(),r=e+(e&&t.parent?"/":"")+this.name;return this.#ht=r}isUnknown(){return 0===(this.#dt&v)}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return 8===(this.#dt&v)}isDirectory(){return 4===(this.#dt&v)}isCharacterDevice(){return 2===(this.#dt&v)}isBlockDevice(){return 6===(this.#dt&v)}isFIFO(){return 1===(this.#dt&v)}isSocket(){return 12===(this.#dt&v)}isSymbolicLink(){return(this.#dt&w)===w}lstatCached(){return 32&this.#dt?this:void 0}readlinkCached(){return this.#yt}realpathCached(){return this.#bt}readdirCached(){const t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#yt)return!0;if(!this.parent)return!1;const t=this.#dt&v;return!(0!==t&&t!==w||this.#dt&x||this.#dt&E)}calledReaddir(){return!!(16&this.#dt)}isENOENT(){return!!(this.#dt&E)}isNamed(t){return this.nocase?this.#at===O(t):this.#at===A(t)}async readlink(){const t=this.#yt;if(t)return t;if(this.canReadlink()&&this.parent)try{const t=await this.#G.promises.readlink(this.fullpath()),e=(await this.parent.realpath())?.resolve(t);if(e)return this.#yt=e}catch(t){return void this.#gt(t.code)}}readlinkSync(){const t=this.#yt;if(t)return t;if(this.canReadlink()&&this.parent)try{const t=this.#G.readlinkSync(this.fullpath()),e=this.parent.realpathSync()?.resolve(t);if(e)return this.#yt=e}catch(t){return void this.#gt(t.code)}}#_t(t){this.#dt|=16;for(let e=t.provisional;e<t.length;e++){const r=t[e];r&&r.#wt()}}#wt(){this.#dt&E||(this.#dt=(this.#dt|E)&S,this.#vt())}#vt(){const t=this.children();t.provisional=0;for(const e of t)e.#wt()}#St(){this.#dt|=k,this.#Et()}#Et(){if(64&this.#dt)return;let t=this.#dt;4===(t&v)&&(t&=S),this.#dt=64|t,this.#vt()}#xt(t=""){"ENOTDIR"===t||"EPERM"===t?this.#Et():"ENOENT"===t?this.#wt():this.children().provisional=0}#kt(t=""){if("ENOTDIR"===t){this.parent.#Et()}else"ENOENT"===t&&this.#wt()}#gt(t=""){let e=this.#dt;e|=x,"ENOENT"===t&&(e|=E),"EINVAL"!==t&&"UNKNOWN"!==t||(e&=S),this.#dt=e,"ENOTDIR"===t&&this.parent&&this.parent.#Et()}#Tt(t,e){return this.#Rt(t,e)||this.#At(t,e)}#At(t,e){const r=T(t),i=this.newChild(t.name,r,{parent:this}),n=i.#dt&v;return 4!==n&&n!==w&&0!==n&&(i.#dt|=64),e.unshift(i),e.provisional++,i}#Rt(t,e){for(let r=e.provisional;r<e.length;r++){const i=e[r];if((this.nocase?O(t.name):A(t.name))===i.#at)return this.#Lt(t,i,r,e)}}#Lt(t,e,r,i){const n=e.name;return e.#dt=e.#dt&S|T(t),n!==t.name&&(e.name=t.name),r!==i.provisional&&(r===i.length-1?i.pop():i.splice(r,1),i.unshift(e)),i.provisional++,e}async lstat(){if(0===(this.#dt&E))try{return this.#Ot(await this.#G.promises.lstat(this.fullpath())),this}catch(t){this.#kt(t.code)}}lstatSync(){if(0===(this.#dt&E))try{return this.#Ot(this.#G.lstatSync(this.fullpath())),this}catch(t){this.#kt(t.code)}}#Ot(t){const{atime:e,atimeMs:r,birthtime:i,birthtimeMs:n,blksize:s,blocks:o,ctime:a,ctimeMs:l,dev:u,gid:h,ino:c,mode:f,mtime:d,mtimeMs:p,nlink:y,rdev:b,size:m,uid:g}=t;this.#it=e,this.#J=r,this.#ot=i,this.#rt=n,this.#Q=s,this.#X=o,this.#st=a,this.#et=l,this.#q=u,this.#Z=h,this.#K=c,this.#H=f,this.#nt=d,this.#tt=p,this.#$=y,this.#Y=b,this.#a=m,this.#V=g;const _=T(t);this.#dt=this.#dt&S|_|32,0!==_&&4!==_&&_!==w&&(this.#dt|=64)}#It=[];#Pt=!1;#Dt(t){this.#Pt=!1;const e=this.#It.slice();this.#It.length=0,e.forEach(e=>e(null,t))}readdirCB(t,e=!1){if(!this.canReaddir())return void(e?t(null,[]):queueMicrotask(()=>t(null,[])));const r=this.children();if(this.calledReaddir()){const i=r.slice(0,r.provisional);return void(e?t(null,i):queueMicrotask(()=>t(null,i)))}if(this.#It.push(t),this.#Pt)return;this.#Pt=!0;const i=this.fullpath();this.#G.readdir(i,{withFileTypes:!0},(t,e)=>{if(t)this.#xt(t.code),r.provisional=0;else{for(const t of e)this.#Tt(t,r);this.#_t(r)}this.#Dt(r.slice(0,r.provisional))})}#Mt;async readdir(){if(!this.canReaddir())return[];const t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);const e=this.fullpath();if(this.#Mt)await this.#Mt;else{let r=()=>{};this.#Mt=new Promise(t=>r=t);try{for(const r of await this.#G.promises.readdir(e,{withFileTypes:!0}))this.#Tt(r,t);this.#_t(t)}catch(e){this.#xt(e.code),t.provisional=0}this.#Mt=void 0,r()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];const t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);const e=this.fullpath();try{for(const r of this.#G.readdirSync(e,{withFileTypes:!0}))this.#Tt(r,t);this.#_t(t)}catch(e){this.#xt(e.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(704&this.#dt)return!1;const t=v&this.#dt;return 0===t||4===t||t===w}shouldWalk(t,e){return!(4&~this.#dt)&&!(704&this.#dt)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#bt)return this.#bt;if(!(896&this.#dt))try{const t=await this.#G.promises.realpath(this.fullpath());return this.#bt=this.resolve(t)}catch(t){this.#St()}}realpathSync(){if(this.#bt)return this.#bt;if(!(896&this.#dt))try{const t=this.#G.realpathSync(this.fullpath());return this.#bt=this.resolve(t)}catch(t){this.#St()}}[D](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;const e=new Set([]);let r=[],i=this;for(;i&&i.parent;)e.add(i),i.#ct=r.join(this.sep),i.#ft=r.join("/"),i=i.parent,r.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#ct=void 0,i.#ft=void 0,i=i.parent}}Vl.PathBase=M;class C extends M{sep="\\";splitSep=_;constructor(t,e=0,r,i,n,s,o){super(t,e,r,i,n,s,o)}newChild(t,e=0,r={}){return new C(t,e,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(t){return s.win32.parse(t).root}getRoot(t){if((t=(t=>t.replace(/\//g,"\\").replace(g,"$1\\"))(t.toUpperCase()))===this.root.name)return this.root;for(const[e,r]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=r;return this.roots[t]=new F(t,this).root}sameRoot(t,e=this.root.name){return(t=t.toUpperCase().replace(/\//g,"\\").replace(g,"$1\\"))===e}}Vl.PathWin32=C;class N extends M{splitSep="/";sep="/";constructor(t,e=0,r,i,n,s,o){super(t,e,r,i,n,s,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=0,r={}){return new N(t,e,this.root,this.roots,this.nocase,this.childrenCache(),r)}}Vl.PathPosix=N;class j{root;rootPath;roots;cwd;#Ct;#Nt;#pt;nocase;#G;constructor(t=process.cwd(),e,r,{nocase:i,childrenCacheSize:n=16384,fs:s=f}={}){this.#G=m(s),(t instanceof URL||t.startsWith("file://"))&&(t=(0,o.fileURLToPath)(t));const a=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#Ct=new I,this.#Nt=new I,this.#pt=new P(n);const l=a.substring(this.rootPath.length).split(r);if(1!==l.length||l[0]||l.pop(),void 0===i)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#G),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1;const c=e.sep;let d=this.rootPath,p=!1;for(const t of l){const e=h--;u=u.child(t,{relative:new Array(e).fill("..").join(c),relativePosix:new Array(e).fill("..").join("/"),fullpath:d+=(p?"":c)+t}),p=!0}this.cwd=u}depth(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#pt}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){const i=t[r];if(i&&"."!==i&&(e=e?`${i}/${e}`:i,this.isAbsolute(i)))break}const r=this.#Ct.get(e);if(void 0!==r)return r;const i=this.cwd.resolve(e).fullpath();return this.#Ct.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){const i=t[r];if(i&&"."!==i&&(e=e?`${i}/${e}`:i,this.isAbsolute(i)))break}const r=this.#Nt.get(e);if(void 0!==r)return r;const i=this.cwd.resolve(e).fullpathPosix();return this.#Nt.set(e,i),i}relative(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);const{withFileTypes:r}=e;if(t.canReaddir()){const e=await t.readdir();return r?e:e.map(t=>t.name)}return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);const{withFileTypes:r=!0}=e;return t.canReaddir()?r?t.readdirSync():t.readdirSync().map(t=>t.name):[]}async lstat(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t.withFileTypes,t=this.cwd);const r=await t.readlink();return e?r:r?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t.withFileTypes,t=this.cwd);const r=t.readlinkSync();return e?r:r?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t.withFileTypes,t=this.cwd);const r=await t.realpath();return e?r:r?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t.withFileTypes,t=this.cwd);const r=t.realpathSync();return e?r:r?.fullpath()}async walk(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);const{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=e,o=[];n&&!n(t)||o.push(r?t:t.fullpath());const a=new Set,l=(t,e)=>{a.add(t),t.readdirCB((t,u)=>{if(t)return e(t);let h=u.length;if(!h)return e();const c=()=>{0===--h&&e()};for(const t of u)n&&!n(t)||o.push(r?t:t.fullpath()),i&&t.isSymbolicLink()?t.realpath().then(t=>t?.isUnknown()?t.lstat():t).then(t=>t?.shouldWalk(a,s)?l(t,c):c()):t.shouldWalk(a,s)?l(t,c):c()},!0)},u=t;return new Promise((t,e)=>{l(u,r=>{if(r)return e(r);t(o)})})}walkSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);const{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=e,o=[];n&&!n(t)||o.push(r?t:t.fullpath());const a=new Set([t]);for(const t of a){const e=t.readdirSync();for(const t of e){n&&!n(t)||o.push(r?t:t.fullpath());let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(a,s)&&a.add(e)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);const{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=e;n&&!n(t)||(yield r?t:t.fullpath());const o=new Set([t]);for(const t of o){const e=t.readdirSync();for(const t of e){n&&!n(t)||(yield r?t:t.fullpath());let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(o,s)&&o.add(e)}}}stream(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);const{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=e,o=new c.Minipass({objectMode:!0});n&&!n(t)||o.write(r?t:t.fullpath());const a=new Set,l=[t];let u=0;const h=()=>{let t=!1;for(;!t;){const e=l.shift();if(!e)return void(0===u&&o.end());u++,a.add(e);const c=(e,d,p=!1)=>{if(e)return o.emit("error",e);if(i&&!p){const t=[];for(const e of d)e.isSymbolicLink()&&t.push(e.realpath().then(t=>t?.isUnknown()?t.lstat():t));if(t.length)return void Promise.all(t).then(()=>c(null,d,!0))}for(const e of d)!e||n&&!n(e)||o.write(r?e:e.fullpath())||(t=!0);u--;for(const t of d){const e=t.realpathCached()||t;e.shouldWalk(a,s)&&l.push(e)}t&&!o.flowing?o.once("drain",h):f||h()};let f=!0;e.readdirCB(c,!0),f=!1}};return h(),o}streamSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);const{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:s}=e,o=new c.Minipass({objectMode:!0}),a=new Set;n&&!n(t)||o.write(r?t:t.fullpath());const l=[t];let u=0;const h=()=>{let t=!1;for(;!t;){const e=l.shift();if(!e)return void(0===u&&o.end());u++,a.add(e);const h=e.readdirSync();for(const e of h)n&&!n(e)||o.write(r?e:e.fullpath())||(t=!0);u--;for(const t of h){let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(a,s)&&l.push(e)}}t&&!o.flowing&&o.once("drain",h)};return h(),o}chdir(t=this.cwd){const e=this.cwd;this.cwd="string"==typeof t?this.cwd.resolve(t):t,this.cwd[D](e)}}Vl.PathScurryBase=j;class F extends j{sep="\\";constructor(t=process.cwd(),e={}){const{nocase:r=!0}=e;super(t,s.win32,"\\",{...e,nocase:r}),this.nocase=r;for(let t=this.cwd;t;t=t.parent)t.nocase=this.nocase}parseRootPath(t){return s.win32.parse(t).root.toUpperCase()}newRoot(t){return new C(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}}Vl.PathScurryWin32=F;class B extends j{sep="/";constructor(t=process.cwd(),e={}){const{nocase:r=!1}=e;super(t,s.posix,"/",{...e,nocase:r}),this.nocase=r}parseRootPath(t){return"/"}newRoot(t){return new N(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}}Vl.PathScurryPosix=B;class z extends B{constructor(t=process.cwd(),e={}){const{nocase:r=!0}=e;super(t,{...e,nocase:r})}}return Vl.PathScurryDarwin=z,Vl.Path="win32"===process.platform?C:N,Vl.PathScurry="win32"===process.platform?F:"darwin"===process.platform?z:B,Vl}var eu,ru={};function iu(){if(eu)return ru;eu=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.Pattern=void 0;const t=s.requireCommonjs();class e{#jt;#Ft;#Bt;length;#zt;#Wt;#Ut;#Gt;#qt;#Ht;#$t=!0;constructor(t,e,r,i){if(!(t.length>=1))throw new TypeError("empty pattern list");if(!(e.length>=1))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,r<0||r>=this.length)throw new TypeError("index out of range");if(this.#jt=t,this.#Ft=e,this.#Bt=r,this.#zt=i,0===this.#Bt)if(this.isUNC()){const[t,e,r,i,...n]=this.#jt,[s,o,a,l,...u]=this.#Ft;""===n[0]&&(n.shift(),u.shift());const h=[t,e,r,i,""].join("/"),c=[s,o,a,l,""].join("/");this.#jt=[h,...n],this.#Ft=[c,...u],this.length=this.#jt.length}else if(this.isDrive()||this.isAbsolute()){const[t,...e]=this.#jt,[r,...i]=this.#Ft;""===e[0]&&(e.shift(),i.shift());const n=t+"/",s=r+"/";this.#jt=[n,...e],this.#Ft=[s,...i],this.length=this.#jt.length}}pattern(){return this.#jt[this.#Bt]}isString(){return"string"==typeof this.#jt[this.#Bt]}isGlobstar(){return this.#jt[this.#Bt]===t.GLOBSTAR}isRegExp(){return this.#jt[this.#Bt]instanceof RegExp}globString(){return this.#Ut=this.#Ut||(0===this.#Bt?this.isAbsolute()?this.#Ft[0]+this.#Ft.slice(1).join("/"):this.#Ft.join("/"):this.#Ft.slice(this.#Bt).join("/"))}hasMore(){return this.length>this.#Bt+1}rest(){return void 0!==this.#Wt?this.#Wt:this.hasMore()?(this.#Wt=new e(this.#jt,this.#Ft,this.#Bt+1,this.#zt),this.#Wt.#Ht=this.#Ht,this.#Wt.#qt=this.#qt,this.#Wt.#Gt=this.#Gt,this.#Wt):this.#Wt=null}isUNC(){const t=this.#jt;return void 0!==this.#qt?this.#qt:this.#qt="win32"===this.#zt&&0===this.#Bt&&""===t[0]&&""===t[1]&&"string"==typeof t[2]&&!!t[2]&&"string"==typeof t[3]&&!!t[3]}isDrive(){const t=this.#jt;return void 0!==this.#Gt?this.#Gt:this.#Gt="win32"===this.#zt&&0===this.#Bt&&this.length>1&&"string"==typeof t[0]&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#jt;return void 0!==this.#Ht?this.#Ht:this.#Ht=""===t[0]&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#jt[0];return"string"==typeof t&&this.isAbsolute()&&0===this.#Bt?t:""}checkFollowGlobstar(){return!(0===this.#Bt||!this.isGlobstar()||!this.#$t)}markFollowGlobstar(){return!(0===this.#Bt||!this.isGlobstar()||!this.#$t)&&(this.#$t=!1,!0)}}return ru.Pattern=e,ru}var nu,su={},ou={};function au(){if(nu)return ou;nu=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.Ignore=void 0;const t=s.requireCommonjs(),e=iu(),r="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";return ou.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:i,noext:n,noglobstar:s,platform:o=r}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:e,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(const e of t)this.add(e)}add(r){const i=new t.Minimatch(r,this.mmopts);for(let r=0;r<i.set.length;r++){const n=i.set[r],s=i.globParts[r];if(!n||!s)throw new Error("invalid pattern object");for(;"."===n[0]&&"."===s[0];)n.shift(),s.shift();const o=new e.Pattern(n,s,0,this.platform),a=new t.Minimatch(o.globString(),this.mmopts),l="**"===s[s.length-1],u=o.isAbsolute();u?this.absolute.push(a):this.relative.push(a),l&&(u?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(t){const e=t.fullpath(),r=`${e}/`,i=t.relative()||".",n=`${i}/`;for(const t of this.relative)if(t.match(i)||t.match(n))return!0;for(const t of this.absolute)if(t.match(e)||t.match(r))return!0;return!1}childrenIgnored(t){const e=t.fullpath()+"/",r=(t.relative()||".")+"/";for(const t of this.relativeChildren)if(t.match(r))return!0;for(const t of this.absoluteChildren)if(t.match(e))return!0;return!1}},ou}var lu,uu,hu,cu={};function fu(){if(uu)return su;uu=1,Object.defineProperty(su,"__esModule",{value:!0}),su.GlobStream=su.GlobWalker=su.GlobUtil=void 0;const t=Jl(),e=au(),r=function(){if(lu)return cu;lu=1,Object.defineProperty(cu,"__esModule",{value:!0}),cu.Processor=cu.SubWalks=cu.MatchRecord=cu.HasWalkedCache=void 0;const t=s.requireCommonjs();class e{store;constructor(t=new Map){this.store=t}copy(){return new e(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){const r=t.fullpath(),i=this.store.get(r);i?i.add(e.globString()):this.store.set(r,new Set([e.globString()]))}}cu.HasWalkedCache=e;class r{store=new Map;add(t,e,r){const i=(e?2:0)|(r?1:0),n=this.store.get(t);this.store.set(t,void 0===n?i:i&n)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(2&e),!!(1&e)])}}cu.MatchRecord=r;class i{store=new Map;add(t,e){if(!t.canReaddir())return;const r=this.store.get(t);r?r.find(t=>t.globString()===e.globString())||r.push(e):this.store.set(t,[e])}get(t){const e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}}cu.SubWalks=i;class n{hasWalkedCache;matches=new r;subwalks=new i;patterns;follow;dot;opts;constructor(t,r){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=r?r.copy():new e}processPatterns(e,r){this.patterns=r;const i=r.map(t=>[e,t]);for(let[e,r]of i){this.hasWalkedCache.storeWalked(e,r);const i=r.root(),n=r.isAbsolute()&&!1!==this.opts.absolute;if(i){e=e.resolve("/"===i&&void 0!==this.opts.root?this.opts.root:i);const t=r.rest();if(!t){this.matches.add(e,!0,!1);continue}r=t}if(e.isENOENT())continue;let s,o,a=!1;for(;"string"==typeof(s=r.pattern())&&(o=r.rest());){const t=e.resolve(s);e=t,r=o,a=!0}if(s=r.pattern(),o=r.rest(),a){if(this.hasWalkedCache.hasWalked(e,r))continue;this.hasWalkedCache.storeWalked(e,r)}if("string"==typeof s){const t=".."===s||""===s||"."===s;this.matches.add(e.resolve(s),n,t);continue}if(s===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(e,r);const t=o?.pattern(),i=o?.rest();if(o&&(""!==t&&"."!==t||i)){if(".."===t){const t=e.parent||e;i?this.hasWalkedCache.hasWalked(t,i)||this.subwalks.add(t,i):this.matches.add(t,n,!0)}}else this.matches.add(e,n,""===t||"."===t)}else s instanceof RegExp&&this.subwalks.add(e,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(e,r){const i=this.subwalks.get(e),n=this.child();for(const e of r)for(const r of i){const i=r.isAbsolute(),s=r.pattern(),o=r.rest();s===t.GLOBSTAR?n.testGlobstar(e,r,o,i):s instanceof RegExp?n.testRegExp(e,s,o,i):n.testString(e,s,o,i)}return n}testGlobstar(t,e,r,i){if(!this.dot&&t.name.startsWith(".")||(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(r&&e.checkFollowGlobstar()?this.subwalks.add(t,r):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),r){const e=r.pattern();if("string"==typeof e&&".."!==e&&""!==e&&"."!==e)this.testString(t,e,r.rest(),i);else if(".."===e){const e=t.parent||t;this.subwalks.add(e,r)}else e instanceof RegExp&&this.testRegExp(t,e,r.rest(),i)}}testRegExp(t,e,r,i){e.test(t.name)&&(r?this.subwalks.add(t,r):this.matches.add(t,i,!1))}testString(t,e,r,i){t.isNamed(e)&&(r?this.subwalks.add(t,r):this.matches.add(t,i,!1))}}return cu.Processor=n,cu}();class i{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#Vt=[];#Zt;#Yt;signal;maxDepth;includeChildMatches;constructor(t,r,i){if(this.patterns=t,this.path=r,this.opts=i,this.#Yt=i.posix||"win32"!==i.platform?"/":"\\",this.includeChildMatches=!1!==i.includeChildMatches,(i.ignore||!this.includeChildMatches)&&(this.#Zt=((t,r)=>"string"==typeof t?new e.Ignore([t],r):Array.isArray(t)?new e.Ignore(t,r):t)(i.ignore??[],i),!this.includeChildMatches&&"function"!=typeof this.#Zt.add)){throw new Error("cannot ignore child matches, ignore lacks add() method.")}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#Vt.length=0}))}#Qt(t){return this.seen.has(t)||!!this.#Zt?.ignored?.(t)}#Kt(t){return!!this.#Zt?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;let t;for(this.paused=!1;!this.paused&&(t=this.#Vt.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#Vt.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=t.realpathCached()||await t.realpath(),!r)return;t=r}const i=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){const t=await i.realpath();t&&(t.isUnknown()||this.opts.stat)&&await t.lstat()}return this.matchCheckTest(i,e)}matchCheckTest(t,e){return!t||!(this.maxDepth===1/0||t.depth()<=this.maxDepth)||e&&!t.canReaddir()||this.opts.nodir&&t.isDirectory()||this.opts.nodir&&this.opts.follow&&t.isSymbolicLink()&&t.realpathCached()?.isDirectory()||this.#Qt(t)?void 0:t}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=t.realpathCached()||t.realpathSync(),!r)return;t=r}const i=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){const t=i.realpathSync();t&&(t?.isUnknown()||this.opts.stat)&&t.lstatSync()}return this.matchCheckTest(i,e)}matchFinish(t,e){if(this.#Qt(t))return;if(!this.includeChildMatches&&this.#Zt?.add){const e=`${t.relativePosix()}/**`;this.#Zt.add(e)}const r=void 0===this.opts.absolute?e:this.opts.absolute;this.seen.add(t);const i=this.opts.mark&&t.isDirectory()?this.#Yt:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(r){const e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+i)}else{const e=this.opts.posix?t.relativePosix():t.relative(),r=this.opts.dotRelative&&!e.startsWith(".."+this.#Yt)?"."+this.#Yt:"";this.matchEmit(e?r+e+i:"."+i)}}async match(t,e,r){const i=await this.matchCheck(t,r);i&&this.matchFinish(i,e)}matchSync(t,e,r){const i=this.matchCheckSync(t,r);i&&this.matchFinish(i,e)}walkCB(t,e,i){this.signal?.aborted&&i(),this.walkCB2(t,e,new r.Processor(this.opts),i)}walkCB2(t,e,r,i){if(this.#Kt(t))return i();if(this.signal?.aborted&&i(),this.paused)return void this.onResume(()=>this.walkCB2(t,e,r,i));r.processPatterns(t,e);let n=1;const s=()=>{0===--n&&i()};for(const[t,e,i]of r.matches.entries())this.#Qt(t)||(n++,this.match(t,e,i).then(()=>s()));for(const t of r.subwalkTargets()){if(this.maxDepth!==1/0&&t.depth()>=this.maxDepth)continue;n++;const e=t.readdirCached();t.calledReaddir()?this.walkCB3(t,e,r,s):t.readdirCB((e,i)=>this.walkCB3(t,i,r,s),!0)}s()}walkCB3(t,e,r,i){r=r.filterEntries(t,e);let n=1;const s=()=>{0===--n&&i()};for(const[t,e,i]of r.matches.entries())this.#Qt(t)||(n++,this.match(t,e,i).then(()=>s()));for(const[t,e]of r.subwalks.entries())n++,this.walkCB2(t,e,r.child(),s);s()}walkCBSync(t,e,i){this.signal?.aborted&&i(),this.walkCB2Sync(t,e,new r.Processor(this.opts),i)}walkCB2Sync(t,e,r,i){if(this.#Kt(t))return i();if(this.signal?.aborted&&i(),this.paused)return void this.onResume(()=>this.walkCB2Sync(t,e,r,i));r.processPatterns(t,e);let n=1;const s=()=>{0===--n&&i()};for(const[t,e,i]of r.matches.entries())this.#Qt(t)||this.matchSync(t,e,i);for(const t of r.subwalkTargets()){if(this.maxDepth!==1/0&&t.depth()>=this.maxDepth)continue;n++;const e=t.readdirSync();this.walkCB3Sync(t,e,r,s)}s()}walkCB3Sync(t,e,r,i){r=r.filterEntries(t,e);let n=1;const s=()=>{0===--n&&i()};for(const[t,e,i]of r.matches.entries())this.#Qt(t)||this.matchSync(t,e,i);for(const[t,e]of r.subwalks.entries())n++,this.walkCB2Sync(t,e,r.child(),s);s()}}su.GlobUtil=i;su.GlobWalker=class extends i{matches=new Set;constructor(t,e,r){super(t,e,r)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};return su.GlobStream=class extends i{results;constructor(e,r,i){super(e,r,i),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){const t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},su}function du(){if(hu)return $l;hu=1,Object.defineProperty($l,"__esModule",{value:!0}),$l.Glob=void 0;const t=s.requireCommonjs(),e=d,r=tu(),i=iu(),n=fu(),o="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";class a{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(n,s){if(!s)throw new TypeError("glob options required");if(this.withFileTypes=!!s.withFileTypes,this.signal=s.signal,this.follow=!!s.follow,this.dot=!!s.dot,this.dotRelative=!!s.dotRelative,this.nodir=!!s.nodir,this.mark=!!s.mark,s.cwd?(s.cwd instanceof URL||s.cwd.startsWith("file://"))&&(s.cwd=(0,e.fileURLToPath)(s.cwd)):this.cwd="",this.cwd=s.cwd||"",this.root=s.root,this.magicalBraces=!!s.magicalBraces,this.nobrace=!!s.nobrace,this.noext=!!s.noext,this.realpath=!!s.realpath,this.absolute=s.absolute,this.includeChildMatches=!1!==s.includeChildMatches,this.noglobstar=!!s.noglobstar,this.matchBase=!!s.matchBase,this.maxDepth="number"==typeof s.maxDepth?s.maxDepth:1/0,this.stat=!!s.stat,this.ignore=s.ignore,this.withFileTypes&&void 0!==this.absolute)throw new Error("cannot set absolute and withFileTypes:true");if("string"==typeof n&&(n=[n]),this.windowsPathsNoEscape=!!s.windowsPathsNoEscape||!1===s.allowWindowsEscape,this.windowsPathsNoEscape&&(n=n.map(t=>t.replace(/\\/g,"/"))),this.matchBase){if(s.noglobstar)throw new TypeError("base matching requires globstar");n=n.map(t=>t.includes("/")?t:`./**/${t}`)}if(this.pattern=n,this.platform=s.platform||o,this.opts={...s,platform:this.platform},s.scurry){if(this.scurry=s.scurry,void 0!==s.nocase&&s.nocase!==s.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{const t="win32"===s.platform?r.PathScurryWin32:"darwin"===s.platform?r.PathScurryDarwin:s.platform?r.PathScurryPosix:r.PathScurry;this.scurry=new t(this.cwd,{nocase:s.nocase,fs:s.fs})}this.nocase=this.scurry.nocase;const a="darwin"===this.platform||"win32"===this.platform,l={...s,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:a,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},u=this.pattern.map(e=>new t.Minimatch(e,l)),[h,c]=u.reduce((t,e)=>(t[0].push(...e.set),t[1].push(...e.globParts),t),[[],[]]);this.patterns=h.map((t,e)=>{const r=c[e];if(!r)throw new Error("invalid pattern object");return new i.Pattern(t,r,0,this.platform)})}async walk(){return[...await new n.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new n.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new n.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new n.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}return $l.Glob=a,$l}var pu,yu,bu,mu,gu={};function _u(){if(pu)return gu;pu=1,Object.defineProperty(gu,"__esModule",{value:!0}),gu.hasMagic=void 0;const t=s.requireCommonjs();return gu.hasMagic=(e,r={})=>{Array.isArray(e)||(e=[e]);for(const i of e)if(new t.Minimatch(i,r).hasMagic())return!0;return!1},gu}function wu(){if(bu)return xl.exports;bu=1;var t=a.requireGracefulFs(),e=o,r=function(){if(Bo)return Fo;Bo=1;var t=kl();return Fo=function(e){return null!=e&&e.length?t(e,1):[]}}(),i=function(){if(sl)return nl;sl=1;var t=Fl(),e=kl(),r=Ki(),i=Bl(),n=r(function(r,n){return i(r)?t(r,e(n,1,i,!0)):[]});return nl=n}(),n=Ul(),l=function(){if(El)return Sl;El=1;var t=Gi(),e=Gl(),r=rn(),i=Function.prototype,n=Object.prototype,s=i.toString,o=n.hasOwnProperty,a=s.call(Object);return Sl=function(i){if(!r(i)||"[object Object]"!=t(i))return!1;var n=e(i);if(null===n)return!0;var l=o.call(n,"constructor")&&n.constructor;return"function"==typeof l&&l instanceof l&&s.call(l)==a}}(),u=(yu||(yu=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.glob=t.sync=t.iterate=t.iterateSync=t.stream=t.streamSync=t.Ignore=t.hasMagic=t.Glob=t.unescape=t.escape=void 0,t.globStreamSync=u,t.globStream=h,t.globSync=c,t.globIterateSync=d,t.globIterate=p;const e=s.requireCommonjs(),r=du(),i=_u();var n=s.requireCommonjs();Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return n.escape}}),Object.defineProperty(t,"unescape",{enumerable:!0,get:function(){return n.unescape}});var o=du();Object.defineProperty(t,"Glob",{enumerable:!0,get:function(){return o.Glob}});var a=_u();Object.defineProperty(t,"hasMagic",{enumerable:!0,get:function(){return a.hasMagic}});var l=au();function u(t,e={}){return new r.Glob(t,e).streamSync()}function h(t,e={}){return new r.Glob(t,e).stream()}function c(t,e={}){return new r.Glob(t,e).walkSync()}async function f(t,e={}){return new r.Glob(t,e).walk()}function d(t,e={}){return new r.Glob(t,e).iterateSync()}function p(t,e={}){return new r.Glob(t,e).iterate()}Object.defineProperty(t,"Ignore",{enumerable:!0,get:function(){return l.Ignore}}),t.streamSync=u,t.stream=Object.assign(h,{sync:u}),t.iterateSync=d,t.iterate=Object.assign(p,{sync:d}),t.sync=Object.assign(c,{stream:u,iterate:d}),t.glob=Object.assign(f,{glob:f,globSync:c,sync:t.sync,globStream:h,stream:t.stream,globStreamSync:u,streamSync:t.streamSync,globIterate:p,iterate:t.iterate,globIterateSync:d,iterateSync:t.iterateSync,Glob:r.Glob,hasMagic:i.hasMagic,escape:e.escape,unescape:e.unescape}),t.glob.glob=t.glob}(Hl)),Hl),h=xl.exports={},c=/[\/\\]/g;return h.exists=function(){var r=e.join.apply(e,arguments);return t.existsSync(r)},h.expand=function(...s){var o=l(s[0])?s.shift():{},a=Array.isArray(s[0])?s[0]:s;if(0===a.length)return[];var h=function(t,e){var s=[];return r(t).forEach(function(t){var r=0===t.indexOf("!");r&&(t=t.slice(1));var o=e(t);s=r?i(s,o):n(s,o)}),s}(a,function(t){return u.sync(t,o)});return o.filter&&(h=h.filter(function(r){r=e.join(o.cwd||"",r);try{return"function"==typeof o.filter?o.filter(r):t.statSync(r)[o.filter]()}catch(t){return!1}})),h},h.expandMapping=function(t,r,i){i=Object.assign({rename:function(t,r){return e.join(t||"",r)}},i);var n=[],s={};return h.expand(i,t).forEach(function(t){var o=t;i.flatten&&(o=e.basename(o)),i.ext&&(o=o.replace(/(\.[^\/]*)?$/,i.ext));var a=i.rename(r,o,i);i.cwd&&(t=e.join(i.cwd,t)),a=a.replace(c,"/"),t=t.replace(c,"/"),s[a]?s[a].src.push(t):(n.push({src:[t],dest:a}),s[a]=n[n.length-1])}),n},h.normalizeFilesArray=function(t){var e=[];return t.forEach(function(t){("src"in t||"dest"in t)&&e.push(t)}),0===e.length?[]:e=_(e).chain().forEach(function(t){"src"in t&&t.src&&(Array.isArray(t.src)?t.src=r(t.src):t.src=[t.src])}).map(function(t){var e=Object.assign({},t);if(delete e.src,delete e.dest,t.expand)return h.expandMapping(t.src,t.dest,e).map(function(e){var r=Object.assign({},t);return r.orig=Object.assign({},t),r.src=e.src,r.dest=e.dest,["expand","cwd","flatten","rename","ext"].forEach(function(t){delete r[t]}),r});var i=Object.assign({},t);return i.orig=Object.assign({},t),"src"in i&&Object.defineProperty(i,"src",{enumerable:!0,get:function i(){var n;return"result"in i||(n=t.src,n=Array.isArray(n)?r(n):[n],i.result=h.expand(e,n)),i.result}}),"dest"in i&&(i.dest=t.dest),i}).flatten().value()},xl.exports}function vu(){if(mu)return Ue.exports;mu=1;var t=a.requireGracefulFs(),e=o,r=function(){if(je)return Ne;je=1;const t=t=>null!==t&&"object"==typeof t&&"function"==typeof t.pipe;return t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,Ne=t}(),i=Ni(),n=ji(),s=Cn();u.Stream;var l=Io().PassThrough,h=Ue.exports={};return h.file=wu(),h.collectStream=function(t,e){var r=[],i=0;t.on("error",e),t.on("data",function(t){r.push(t),i+=t.length}),t.on("end",function(){var t=Buffer.alloc(i),n=0;r.forEach(function(e){e.copy(t,n),n+=e.length}),e(null,t)})},h.dateify=function(t){return(t=t||new Date)instanceof Date||(t="string"==typeof t?new Date(t):new Date),t},h.defaults=function(t,e,r){var i=arguments;return i[0]=i[0]||{},s(...i)},h.isStream=function(t){return r(t)},h.lazyReadStream=function(e){return new i.Readable(function(){return t.createReadStream(e)})},h.normalizeInputSource=function(t){return null===t?Buffer.alloc(0):"string"==typeof t?Buffer.from(t):h.isStream(t)?t.pipe(new l):t},h.sanitizePath=function(t){return n(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")},h.trailingSlashIt=function(t){return"/"!==t.slice(-1)?t+"/":t},h.unixifyPath=function(t){return n(t,!1).replace(/^\w+:/,"")},h.walkdir=function(r,i,n){var s=[];"function"==typeof i&&(n=i,i=r),t.readdir(r,function(o,a){var l,u,c=0;if(o)return n(o);!function o(){if(!(l=a[c++]))return n(null,s);u=e.join(r,l),t.stat(u,function(t,r){s.push({path:u,relative:e.relative(i,u).replace(/\\/g,"/"),stats:r}),r&&r.isDirectory()?h.walkdir(u,i,function(t,e){if(t)return n(t);e.forEach(function(t){s.push(t)}),o()}):o()})}()})},Ue.exports}var Su,Eu,xu,ku={exports:{}};
|
|
13
|
+
/**
|
|
14
|
+
* Archiver Core
|
|
15
|
+
*
|
|
16
|
+
* @ignore
|
|
17
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
18
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
19
|
+
*/function Tu(){if(xu)return Eu;xu=1;var t=i,e=x(),r=We,n=o,s=vu(),a=l.inherits,u=(Su||(Su=1,function(t){const e={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function r(t,r){Error.captureStackTrace(this,this.constructor),this.message=e[t]||t,this.code=t,this.data=r}l.inherits(r,Error),t.exports=r}(ku)),ku.exports),h=Io().Transform,c="win32"===process.platform,f=function(t,e){if(!(this instanceof f))return new f(t,e);"string"!=typeof t&&(e=t,t="zip"),e=this.options=s.defaults(e,{highWaterMark:1048576,statConcurrency:4}),h.call(this,e),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=r.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=r.queue(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};return a(f,h),f.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()},f.prototype._append=function(e,r){var i={source:null,filepath:e};(r=r||{}).name||(r.name=e),r.sourcePath=e,i.data=r,this._entriesCount++,r.stats&&r.stats instanceof t.Stats?(i=this._updateQueueTaskWithStats(i,r.stats))&&(r.stats.size&&(this._fsEntriesTotalBytes+=r.stats.size),this._queue.push(i)):this._statQueue.push(i)},f.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)},f.prototype._maybeFinalize=function(){return!(this._state.finalizing||this._state.finalized||this._state.aborted)&&(!!(this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle())&&(this._finalize(),!0))},f.prototype._moduleAppend=function(t,e,r){this._state.aborted?r():this._module.append(t,e,function(t){if(this._task=null,this._state.aborted)this._shutdown();else{if(t)return this.emit("error",t),void setImmediate(r);this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}}.bind(this))},f.prototype._moduleFinalize=function(){"function"==typeof this._module.finalize?this._module.finalize():"function"==typeof this._module.end?this._module.end():this.emit("error",new u("NOENDMETHOD"))},f.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0},f.prototype._moduleSupports=function(t){return!(!this._module.supports||!this._module.supports[t])&&this._module.supports[t]},f.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1},f.prototype._normalizeEntryData=function(t,e){t=s.defaults(t,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),e&&!1===t.stats&&(t.stats=e);var r="directory"===t.type;return t.name&&("string"==typeof t.prefix&&""!==t.prefix&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=s.sanitizePath(t.name),"symlink"!==t.type&&"/"===t.name.slice(-1)?(r=!0,t.type="directory"):r&&(t.name+="/")),"number"==typeof t.mode?t.mode&=c?511:4095:t.stats&&null===t.mode?(t.mode=c?511&t.stats.mode:4095&t.stats.mode,c&&r&&(t.mode=493)):null===t.mode&&(t.mode=r?493:420),t.stats&&null===t.date?t.date=t.stats.mtime:t.date=s.dateify(t.date),t},f.prototype._onModuleError=function(t){this.emit("error",t)},f.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()},f.prototype._onQueueTask=function(t,e){var r=()=>{t.data.callback&&t.data.callback(),e()};this._state.finalizing||this._state.finalized||this._state.aborted?r():(this._task=t,this._moduleAppend(t.source,t.data,r))},f.prototype._onStatQueueTask=function(e,r){this._state.finalizing||this._state.finalized||this._state.aborted?r():t.lstat(e.filepath,function(t,i){if(this._state.aborted)setImmediate(r);else{if(t)return this._entriesCount--,this.emit("warning",t),void setImmediate(r);(e=this._updateQueueTaskWithStats(e,i))&&(i.size&&(this._fsEntriesTotalBytes+=i.size),this._queue.push(e)),setImmediate(r)}}.bind(this))},f.prototype._shutdown=function(){this._moduleUnpipe(),this.end()},f.prototype._transform=function(t,e,r){t&&(this._pointer+=t.length),r(null,t)},f.prototype._updateQueueTaskWithStats=function(e,r){if(r.isFile())e.data.type="file",e.data.sourceType="stream",e.source=s.lazyReadStream(e.filepath);else if(r.isDirectory()&&this._moduleSupports("directory"))e.data.name=s.trailingSlashIt(e.data.name),e.data.type="directory",e.data.sourcePath=s.trailingSlashIt(e.filepath),e.data.sourceType="buffer",e.source=Buffer.concat([]);else{if(!r.isSymbolicLink()||!this._moduleSupports("symlink"))return r.isDirectory()?this.emit("warning",new u("DIRECTORYNOTSUPPORTED",e.data)):r.isSymbolicLink()?this.emit("warning",new u("SYMLINKNOTSUPPORTED",e.data)):this.emit("warning",new u("ENTRYNOTSUPPORTED",e.data)),null;var i=t.readlinkSync(e.filepath),o=n.dirname(e.filepath);e.data.type="symlink",e.data.linkname=n.relative(o,n.resolve(o,i)),e.data.sourceType="buffer",e.source=Buffer.concat([])}return e.data=this._normalizeEntryData(e.data,r),e},f.prototype.abort=function(){return this._state.aborted||this._state.finalized||this._abort(),this},f.prototype.append=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new u("QUEUECLOSED")),this;if("string"!=typeof(e=this._normalizeEntryData(e)).name||0===e.name.length)return this.emit("error",new u("ENTRYNAMEREQUIRED")),this;if("directory"===e.type&&!this._moduleSupports("directory"))return this.emit("error",new u("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=s.normalizeInputSource(t),Buffer.isBuffer(t))e.sourceType="buffer";else{if(!s.isStream(t))return this.emit("error",new u("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;e.sourceType="stream"}return this._entriesCount++,this._queue.push({data:e,source:t}),this},f.prototype.directory=function(t,r,i){if(this._state.finalize||this._state.aborted)return this.emit("error",new u("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new u("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,!1===r?r="":"string"!=typeof r&&(r=t);var n=!1;"function"==typeof i?(n=i,i={}):"object"!=typeof i&&(i={});var s=e(t,{stat:!0,dot:!0});return s.on("error",function(t){this.emit("error",t)}.bind(this)),s.on("match",function(e){s.pause();var o=!1,a=Object.assign({},i);a.name=e.relative,a.prefix=r,a.stats=e.stat,a.callback=s.resume.bind(s);try{if(n)if(!1===(a=n(a)))o=!0;else if("object"!=typeof a)throw new u("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}catch(t){return void this.emit("error",t)}o?s.resume():this._append(e.absolute,a)}.bind(this)),s.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},f.prototype.file=function(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new u("QUEUECLOSED")),this):"string"!=typeof t||0===t.length?(this.emit("error",new u("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)},f.prototype.glob=function(t,r,i){this._pending++,r=s.defaults(r,{stat:!0,pattern:t});var n=e(r.cwd||".",r);return n.on("error",function(t){this.emit("error",t)}.bind(this)),n.on("match",function(t){n.pause();var e=Object.assign({},i);e.callback=n.resume.bind(n),e.stats=t.stat,e.name=t.relative,this._append(t.absolute,e)}.bind(this)),n.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},f.prototype.finalize=function(){if(this._state.aborted){var t=new u("ABORTED");return this.emit("error",t),Promise.reject(t)}if(this._state.finalize){var e=new u("FINALIZING");return this.emit("error",e),Promise.reject(e)}this._state.finalize=!0,0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise(function(t,e){var i;r._module.on("end",function(){i||t()}),r._module.on("error",function(t){i=!0,e(t)})})},f.prototype.setFormat=function(t){return this._format?(this.emit("error",new u("FORMATSET")),this):(this._format=t,this)},f.prototype.setModule=function(t){return this._state.aborted?(this.emit("error",new u("ABORTED")),this):this._state.module?(this.emit("error",new u("MODULESET")),this):(this._module=t,this._modulePipe(),this)},f.prototype.symlink=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new u("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new u("SYMLINKFILEPATHREQUIRED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new u("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new u("SYMLINKNOTSUPPORTED",{filepath:t})),this;var i={type:"symlink"};return i.name=t.replace(/\\/g,"/"),i.linkname=e.replace(/\\/g,"/"),i.sourceType="buffer","number"==typeof r&&(i.mode=r),this._entriesCount++,this._queue.push({data:i,source:Buffer.concat([])}),this},f.prototype.pointer=function(){return this._pointer},f.prototype.use=function(t){return this._streams.push(t),this},Eu=f}var Ru,Au={exports:{}},Lu={exports:{}};function Ou(){if(Ru)return Lu.exports;Ru=1;var t=Lu.exports=function(){};return t.prototype.getName=function(){},t.prototype.getSize=function(){},t.prototype.getLastModifiedDate=function(){},t.prototype.isDirectory=function(){},Lu.exports}var Iu,Pu,Du,Mu,Cu,Nu,ju,Fu={exports:{}},Bu={exports:{}},zu={exports:{}};function Wu(){if(Iu)return zu.exports;Iu=1;var t=zu.exports={};return t.dateToDos=function(t,e){var r=(e=e||!1)?t.getFullYear():t.getUTCFullYear();return r<1980?2162688:r>=2044?2141175677:r-1980<<25|(e?t.getMonth():t.getUTCMonth())+1<<21|(e?t.getDate():t.getUTCDate())<<16|(e?t.getHours():t.getUTCHours())<<11|(e?t.getMinutes():t.getUTCMinutes())<<5|(e?t.getSeconds():t.getUTCSeconds())/2},t.dosToDate=function(t){return new Date(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1)},t.fromDosTime=function(e){return t.dosToDate(e.readUInt32LE(0))},t.getEightBytes=function(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e},t.getShortBytes=function(t){var e=Buffer.alloc(2);return e.writeUInt16LE((65535&t)>>>0,0),e},t.getShortBytesValue=function(t,e){return t.readUInt16LE(e)},t.getLongBytes=function(t){var e=Buffer.alloc(4);return e.writeUInt32LE((4294967295&t)>>>0,0),e},t.getLongBytesValue=function(t,e){return t.readUInt32LE(e)},t.toDosTime=function(e){return t.getLongBytes(t.dateToDos(e))},zu.exports}function Uu(){if(Pu)return Bu.exports;Pu=1;var t=Wu(),e=Bu.exports=function(){return this instanceof e?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new e};return e.prototype.encode=function(){return t.getShortBytes((this.descriptor?8:0)|(this.utf8?2048:0)|(this.encryption?1:0)|(this.strongEncryption?64:0))},e.prototype.parse=function(r,i){var n=t.getShortBytesValue(r,i),s=new e;return s.useDataDescriptor(!!(8&n)),s.useUTF8ForNames(!!(2048&n)),s.useStrongEncryption(!!(64&n)),s.useEncryption(!!(1&n)),s.setSlidingDictionarySize(2&n?8192:4096),s.setNumberOfShannonFanoTrees(4&n?3:2),s},e.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t},e.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees},e.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t},e.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize},e.prototype.useDataDescriptor=function(t){this.descriptor=t},e.prototype.usesDataDescriptor=function(){return this.descriptor},e.prototype.useEncryption=function(t){this.encryption=t},e.prototype.usesEncryption=function(){return this.encryption},e.prototype.useStrongEncryption=function(t){this.strongEncryption=t},e.prototype.usesStrongEncryption=function(){return this.strongEncryption},e.prototype.useUTF8ForNames=function(t){this.utf8=t},e.prototype.usesUTF8ForNames=function(){return this.utf8},Bu.exports}function Gu(){return Nu?Cu:(Nu=1,Cu={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1})}function qu(){if(ju)return Fu.exports;ju=1;var t=l.inherits,e=ji(),r=Ou(),i=Uu(),n=Mu?Du:(Mu=1,Du={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}),s=Gu(),o=Wu(),a=Fu.exports=function(t){if(!(this instanceof a))return new a(t);r.call(this),this.platform=s.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new i,this.crc=0,this.time=-1,this.minver=s.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)};return t(a,r),a.prototype.getCentralDirectoryExtra=function(){return this.getExtra()},a.prototype.getComment=function(){return null!==this.comment?this.comment:""},a.prototype.getCompressedSize=function(){return this.csize},a.prototype.getCrc=function(){return this.crc},a.prototype.getExternalAttributes=function(){return this.exattr},a.prototype.getExtra=function(){return null!==this.extra?this.extra:s.EMPTY},a.prototype.getGeneralPurposeBit=function(){return this.gpb},a.prototype.getInternalAttributes=function(){return this.inattr},a.prototype.getLastModifiedDate=function(){return this.getTime()},a.prototype.getLocalFileDataExtra=function(){return this.getExtra()},a.prototype.getMethod=function(){return this.method},a.prototype.getName=function(){return this.name},a.prototype.getPlatform=function(){return this.platform},a.prototype.getSize=function(){return this.size},a.prototype.getTime=function(){return-1!==this.time?o.dosToDate(this.time):-1},a.prototype.getTimeDos=function(){return-1!==this.time?this.time:0},a.prototype.getUnixMode=function(){return this.platform!==s.PLATFORM_UNIX?0:this.getExternalAttributes()>>s.SHORT_SHIFT&s.SHORT_MASK},a.prototype.getVersionNeededToExtract=function(){return this.minver},a.prototype.setComment=function(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t},a.prototype.setCompressedSize=function(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t},a.prototype.setCrc=function(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t},a.prototype.setExternalAttributes=function(t){this.exattr=t>>>0},a.prototype.setExtra=function(t){this.extra=t},a.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof i))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t},a.prototype.setInternalAttributes=function(t){this.inattr=t},a.prototype.setMethod=function(t){if(t<0)throw new Error("invalid entry compression method");this.method=t},a.prototype.setName=function(t,r=!1){t=e(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),r&&(t=`/${t}`),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t},a.prototype.setPlatform=function(t){this.platform=t},a.prototype.setSize=function(t){if(t<0)throw new Error("invalid entry size");this.size=t},a.prototype.setTime=function(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=o.dateToDos(t,e)},a.prototype.setUnixMode=function(t){var e=0;e|=(t|=this.isDirectory()?s.S_IFDIR:s.S_IFREG)<<s.SHORT_SHIFT|(this.isDirectory()?s.S_DOS_D:s.S_DOS_A),this.setExternalAttributes(e),this.mode=t&s.MODE_MASK,this.platform=s.PLATFORM_UNIX},a.prototype.setVersionNeededToExtract=function(t){this.minver=t},a.prototype.isDirectory=function(){return"/"===this.getName().slice(-1)},a.prototype.isUnixSymlink=function(){return(this.getUnixMode()&n.FILE_TYPE_FLAG)===n.LINK_FLAG},a.prototype.isZip64=function(){return this.csize>s.ZIP64_MAGIC||this.size>s.ZIP64_MAGIC},Fu.exports}var Hu,$u,Vu={exports:{}};function Zu(){if($u)return Hu;$u=1;const t=t=>null!==t&&"object"==typeof t&&"function"==typeof t.pipe;return t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,Hu=t}var Yu,Qu,Ku={exports:{}};function Xu(){if(Yu)return Ku.exports;Yu=1,u.Stream;var t=Io().PassThrough,e=Zu();return(Ku.exports={}).normalizeInputSource=function(r){if(null===r)return Buffer.alloc(0);if("string"==typeof r)return Buffer.from(r);if(e(r)&&!r._readableState){var i=new t;return r.pipe(i),i}return r},Ku.exports}function Ju(){if(Qu)return Vu.exports;Qu=1;var t=l.inherits,e=Zu(),r=Io().Transform,i=Ou(),n=Xu(),s=Vu.exports=function(t){if(!(this instanceof s))return new s(t);r.call(this,t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};return t(s,r),s.prototype._appendBuffer=function(t,e,r){},s.prototype._appendStream=function(t,e,r){},s.prototype._emitErrorCallback=function(t){t&&this.emit("error",t)},s.prototype._finish=function(t){},s.prototype._normalizeEntry=function(t){},s.prototype._transform=function(t,e,r){r(null,t)},s.prototype.entry=function(t,r,s){if(r=r||null,"function"!=typeof s&&(s=this._emitErrorCallback.bind(this)),t instanceof i)if(this._archive.finish||this._archive.finished)s(new Error("unacceptable entry after finish"));else{if(!this._archive.processing){if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,r=n.normalizeInputSource(r),Buffer.isBuffer(r))this._appendBuffer(t,r,s);else{if(!e(r))return this._archive.processing=!1,void s(new Error("input source must be valid Stream or Buffer instance"));this._appendStream(t,r,s)}return this}s(new Error("already processing an entry"))}else s(new Error("not a valid instance of ArchiveEntry"))},s.prototype.finish=function(){this._archive.processing?this._archive.finish=!0:this._finish()},s.prototype.getBytesWritten=function(){return this.offset},s.prototype.write=function(t,e){return t&&(this.offset+=t.length),r.prototype.write.call(this,t,e)},Vu.exports}var th,eh,rh,ih,nh,sh,oh,ah,lh,uh,hh,ch,fh={exports:{}};function dh(){if(eh)return th;eh=1;const{Transform:t}=Io(),e=v.requireCrc32();return th=class extends t{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(t,r,i){t&&(this.checksum=e.buf(t,this.checksum)>>>0,this.rawSize+=t.length),i(null,t)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}}}function ph(){if(ih)return rh;ih=1;const{DeflateRaw:t}=S,e=v.requireCrc32();return rh=class extends t{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(t,e){return t&&(this.compressedSize+=t.length),super.push(t,e)}_transform(t,r,i){t&&(this.checksum=e.buf(t,this.checksum)>>>0,this.rawSize+=t.length),super._transform(t,r,i)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(t=!1){return t?this.compressedSize:this.rawSize}}}function yh(){return sh?nh:(sh=1,nh={CRC32Stream:dh(),DeflateCRC32Stream:ph()})}function bh(){if(oh)return fh.exports;oh=1;var t=l.inherits,e=v.requireCrc32(),{CRC32Stream:r}=yh(),{DeflateCRC32Stream:i}=yh(),n=Ju();qu(),Uu();var s=Gu();Xu();var o=Wu(),a=fh.exports=function(t){if(!(this instanceof a))return new a(t);t=this.options=this._defaults(t),n.call(this,t),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};return t(a,n),a.prototype._afterAppend=function(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()},a.prototype._appendBuffer=function(t,r,i){0===r.length&&t.setMethod(s.METHOD_STORED);var n=t.getMethod();return n===s.METHOD_STORED&&(t.setSize(r.length),t.setCompressedSize(r.length),t.setCrc(e.buf(r)>>>0)),this._writeLocalFileHeader(t),n===s.METHOD_STORED?(this.write(r),this._afterAppend(t),void i(null,t)):n===s.METHOD_DEFLATED?void this._smartStream(t,i).end(r):void i(new Error("compression method "+n+" not implemented"))},a.prototype._appendStream=function(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(s.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(t);var i=this._smartStream(t,r);e.once("error",function(t){i.emit("error",t),i.end()}),e.pipe(i)},a.prototype._defaults=function(t){return"object"!=typeof t&&(t={}),"object"!=typeof t.zlib&&(t.zlib={}),"number"!=typeof t.zlib.level&&(t.zlib.level=s.ZLIB_BEST_SPEED),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t},a.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()},a.prototype._normalizeEntry=function(t){-1===t.getMethod()&&t.setMethod(s.METHOD_DEFLATED),t.getMethod()===s.METHOD_DEFLATED&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(s.MIN_VERSION_DATA_DESCRIPTOR)),-1===t.getTime()&&t.setTime(new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}},a.prototype._smartStream=function(t,e){var n=t.getMethod()===s.METHOD_DEFLATED?new i(this.options.zlib):new r,o=null;return n.once("end",function(){var r=n.digest().readUInt32BE(0);t.setCrc(r),t.setSize(n.size()),t.setCompressedSize(n.size(!0)),this._afterAppend(t),e(o,t)}.bind(this)),n.once("error",function(t){o=t}),n.pipe(this,{end:!1}),n},a.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=s.ZIP64_MAGIC_SHORT,e=s.ZIP64_MAGIC,r=s.ZIP64_MAGIC),this.write(o.getLongBytes(s.SIG_EOCD)),this.write(s.SHORT_ZERO),this.write(s.SHORT_ZERO),this.write(o.getShortBytes(t)),this.write(o.getShortBytes(t)),this.write(o.getLongBytes(e)),this.write(o.getLongBytes(r));var i=this.getComment(),n=Buffer.byteLength(i);this.write(o.getShortBytes(n)),this.write(i)},a.prototype._writeCentralDirectoryZip64=function(){this.write(o.getLongBytes(s.SIG_ZIP64_EOCD)),this.write(o.getEightBytes(44)),this.write(o.getShortBytes(s.MIN_VERSION_ZIP64)),this.write(o.getShortBytes(s.MIN_VERSION_ZIP64)),this.write(s.LONG_ZERO),this.write(s.LONG_ZERO),this.write(o.getEightBytes(this._entries.length)),this.write(o.getEightBytes(this._entries.length)),this.write(o.getEightBytes(this._archive.centralLength)),this.write(o.getEightBytes(this._archive.centralOffset)),this.write(o.getLongBytes(s.SIG_ZIP64_EOCD_LOC)),this.write(s.LONG_ZERO),this.write(o.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(o.getLongBytes(1))},a.prototype._writeCentralFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),i=t._offsets.file,n=t.getSize(),a=t.getCompressedSize();if(t.isZip64()||i>s.ZIP64_MAGIC){n=s.ZIP64_MAGIC,a=s.ZIP64_MAGIC,i=s.ZIP64_MAGIC,t.setVersionNeededToExtract(s.MIN_VERSION_ZIP64);var l=Buffer.concat([o.getShortBytes(s.ZIP64_EXTRA_ID),o.getShortBytes(24),o.getEightBytes(t.getSize()),o.getEightBytes(t.getCompressedSize()),o.getEightBytes(t._offsets.file)],28);t.setExtra(l)}this.write(o.getLongBytes(s.SIG_CFH)),this.write(o.getShortBytes(t.getPlatform()<<8|s.VERSION_MADEBY)),this.write(o.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(o.getShortBytes(r)),this.write(o.getLongBytes(t.getTimeDos())),this.write(o.getLongBytes(t.getCrc())),this.write(o.getLongBytes(a)),this.write(o.getLongBytes(n));var u=t.getName(),h=t.getComment(),c=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(u=Buffer.from(u),h=Buffer.from(h)),this.write(o.getShortBytes(u.length)),this.write(o.getShortBytes(c.length)),this.write(o.getShortBytes(h.length)),this.write(s.SHORT_ZERO),this.write(o.getShortBytes(t.getInternalAttributes())),this.write(o.getLongBytes(t.getExternalAttributes())),this.write(o.getLongBytes(i)),this.write(u),this.write(c),this.write(h)},a.prototype._writeDataDescriptor=function(t){this.write(o.getLongBytes(s.SIG_DD)),this.write(o.getLongBytes(t.getCrc())),t.isZip64()?(this.write(o.getEightBytes(t.getCompressedSize())),this.write(o.getEightBytes(t.getSize()))):(this.write(o.getLongBytes(t.getCompressedSize())),this.write(o.getLongBytes(t.getSize())))},a.prototype._writeLocalFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),i=t.getName(),n=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(s.MIN_VERSION_ZIP64)),e.usesUTF8ForNames()&&(i=Buffer.from(i)),t._offsets.file=this.offset,this.write(o.getLongBytes(s.SIG_LFH)),this.write(o.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(o.getShortBytes(r)),this.write(o.getLongBytes(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(s.LONG_ZERO),this.write(s.LONG_ZERO),this.write(s.LONG_ZERO)):(this.write(o.getLongBytes(t.getCrc())),this.write(o.getLongBytes(t.getCompressedSize())),this.write(o.getLongBytes(t.getSize()))),this.write(o.getShortBytes(i.length)),this.write(o.getShortBytes(n.length)),this.write(i),this.write(n),t._offsets.contents=this.offset},a.prototype.getComment=function(t){return null!==this._archive.comment?this._archive.comment:""},a.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>s.ZIP64_MAGIC_SHORT||this._archive.centralLength>s.ZIP64_MAGIC||this._archive.centralOffset>s.ZIP64_MAGIC},a.prototype.setComment=function(t){this._archive.comment=t},fh.exports}function mh(){return lh?ah:(lh=1,ah={ArchiveEntry:Ou(),ZipArchiveEntry:qu(),ArchiveOutputStream:Ju(),ZipArchiveOutputStream:bh()})}
|
|
20
|
+
/**
|
|
21
|
+
* ZipStream
|
|
22
|
+
*
|
|
23
|
+
* @ignore
|
|
24
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
|
|
25
|
+
* @copyright (c) 2014 Chris Talkington, contributors.
|
|
26
|
+
*/function gh(){if(ch)return hh;ch=1;var t=function(){if(uh)return Au.exports;uh=1;var t=l.inherits,e=mh().ZipArchiveOutputStream,r=mh().ZipArchiveEntry,i=vu(),n=Au.exports=function(t){if(!(this instanceof n))return new n(t);(t=this.options=t||{}).zlib=t.zlib||{},e.call(this,t),"number"==typeof t.level&&t.level>=0&&(t.zlib.level=t.level,delete t.level),t.forceZip64||"number"!=typeof t.zlib.level||0!==t.zlib.level||(t.store=!0),t.namePrependSlash=t.namePrependSlash||!1,t.comment&&t.comment.length>0&&this.setComment(t.comment)};return t(n,e),n.prototype._normalizeFileData=function(t){var e="directory"===(t=i.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""})).type,r="symlink"===t.type;return t.name&&(t.name=i.sanitizePath(t.name),r||"/"!==t.name.slice(-1)?e&&(t.name+="/"):(e=!0,t.type="directory")),(e||r)&&(t.store=!0),t.date=i.dateify(t.date),t},n.prototype.entry=function(t,i,n){if("function"!=typeof n&&(n=this._emitErrorCallback.bind(this)),"file"===(i=this._normalizeFileData(i)).type||"directory"===i.type||"symlink"===i.type)if("string"==typeof i.name&&0!==i.name.length){if("symlink"!==i.type||"string"==typeof i.linkname){var s=new r(i.name);return s.setTime(i.date,this.options.forceLocalTime),i.namePrependSlash&&s.setName(i.name,!0),i.store&&s.setMethod(0),i.comment.length>0&&s.setComment(i.comment),"symlink"===i.type&&"number"!=typeof i.mode&&(i.mode=40960),"number"==typeof i.mode&&("symlink"===i.type&&(i.mode|=40960),s.setUnixMode(i.mode)),"symlink"===i.type&&"string"==typeof i.linkname&&(t=Buffer.from(i.linkname)),e.prototype.entry.call(this,s,t,n)}n(new Error("entry linkname must be a non-empty string value when type equals symlink"))}else n(new Error("entry name must be a non-empty string value"));else n(new Error(i.type+" entries not currently supported"))},n.prototype.finalize=function(){this.finish()},Au.exports}
|
|
27
|
+
/**
|
|
28
|
+
* ZIP Format Plugin
|
|
29
|
+
*
|
|
30
|
+
* @module plugins/zip
|
|
31
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
32
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
33
|
+
*/(),e=vu(),r=function(i){if(!(this instanceof r))return new r(i);i=this.options=e.defaults(i,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new t(i)};return r.prototype.append=function(t,e,r){this.engine.entry(t,e,r)},r.prototype.finalize=function(){this.engine.finalize()},r.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},r.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},r.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)},hh=r}var _h,wh,vh,Sh,Eh,xh,kh,Th,Rh,Ah,Lh,Oh,Ih,Ph,Dh,Mh,Ch={};function Nh(){if(xh)return Eh;xh=1;const t=Sh?vh:(Sh=1,vh=class{constructor(t){if(!(t>0)||t-1&t)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(t),this.mask=t-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(t){return void 0===this.buffer[this.top]&&(this.buffer[this.top]=t,this.top=this.top+1&this.mask,!0)}shift(){const t=this.buffer[this.btm];if(void 0!==t)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,t}peek(){return this.buffer[this.btm]}isEmpty(){return void 0===this.buffer[this.btm]}});return Eh=class{constructor(e){this.hwm=e||16,this.head=new t(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){const r=this.head;this.head=r.next=new t(2*this.head.buffer.length),this.head.push(e)}}shift(){0!==this.length&&this.length--;const t=this.tail.shift();if(void 0===t&&this.tail.next){const t=this.tail.next;return this.tail.next=null,this.tail=t,this.tail.shift()}return t}peek(){const t=this.tail.peek();return void 0===t&&this.tail.next?this.tail.next.peek():t}isEmpty(){return 0===this.length}}}function jh(){if(Th)return kh;function t(t){return Buffer.isBuffer(t)?t:Buffer.from(t.buffer,t.byteOffset,t.byteLength)}return Th=1,kh={isBuffer:function(t){return Buffer.isBuffer(t)||t instanceof Uint8Array},isEncoding:function(t){return Buffer.isEncoding(t)},alloc:function(t,e,r){return Buffer.alloc(t,e,r)},allocUnsafe:function(t){return Buffer.allocUnsafe(t)},allocUnsafeSlow:function(t){return Buffer.allocUnsafeSlow(t)},byteLength:function(t,e){return Buffer.byteLength(t,e)},compare:function(t,e){return Buffer.compare(t,e)},concat:function(t,e){return Buffer.concat(t,e)},copy:function(e,r,i,n,s){return t(e).copy(r,i,n,s)},equals:function(e,r){return t(e).equals(r)},fill:function(e,r,i,n,s){return t(e).fill(r,i,n,s)},from:function(t,e,r){return Buffer.from(t,e,r)},includes:function(e,r,i,n){return t(e).includes(r,i,n)},indexOf:function(e,r,i,n){return t(e).indexOf(r,i,n)},lastIndexOf:function(e,r,i,n){return t(e).lastIndexOf(r,i,n)},swap16:function(e){return t(e).swap16()},swap32:function(e){return t(e).swap32()},swap64:function(e){return t(e).swap64()},toBuffer:t,toString:function(e,r,i,n){return t(e).toString(r,i,n)},write:function(e,r,i,n,s){return t(e).write(r,i,n,s)},readDoubleBE:function(e,r){return t(e).readDoubleBE(r)},readDoubleLE:function(e,r){return t(e).readDoubleLE(r)},readFloatBE:function(e,r){return t(e).readFloatBE(r)},readFloatLE:function(e,r){return t(e).readFloatLE(r)},readInt32BE:function(e,r){return t(e).readInt32BE(r)},readInt32LE:function(e,r){return t(e).readInt32LE(r)},readUInt32BE:function(e,r){return t(e).readUInt32BE(r)},readUInt32LE:function(e,r){return t(e).readUInt32LE(r)},writeDoubleBE:function(e,r,i){return t(e).writeDoubleBE(r,i)},writeDoubleLE:function(e,r,i){return t(e).writeDoubleLE(r,i)},writeFloatBE:function(e,r,i){return t(e).writeFloatBE(r,i)},writeFloatLE:function(e,r,i){return t(e).writeFloatLE(r,i)},writeInt32BE:function(e,r,i){return t(e).writeInt32BE(r,i)},writeInt32LE:function(e,r,i){return t(e).writeInt32LE(r,i)},writeUInt32BE:function(e,r,i){return t(e).writeUInt32BE(r,i)},writeUInt32LE:function(e,r,i){return t(e).writeUInt32LE(r,i)}},kh}function Fh(){if(Oh)return Lh;Oh=1;const t=jh();function e(t,e){const r=t.byteLength;if(r<=e)return 0;const i=Math.max(e,r-4);let n=r-1;for(;n>i&&128==(192&t[n]);)n--;if(n<e)return 0;const s=t[n];let o;if(s<=127)return 0;if(s>=194&&s<=223)o=2;else if(s>=224&&s<=239)o=3;else{if(!(s>=240&&s<=244))return 0;o=4}const a=r-n;return a<o?a:0}return Lh=class{constructor(){this._reset()}get remaining(){return this.bytesSeen}decode(r){if(0===r.byteLength)return"";if(0===this.bytesNeeded&&0===e(r,0))return this.bytesSeen=function(t){const e=t.byteLength;if(0===e)return 0;const r=t[e-1];if(r<=127)return 0;if(128!=(192&r))return 1;const i=Math.max(0,e-4);let n=e-2;for(;n>=i&&128==(192&t[n]);)n--;if(n<0)return 1;const s=t[n];let o;if(s>=194&&s<=223)o=2;else if(s>=224&&s<=239)o=3;else{if(!(s>=240&&s<=244))return 1;o=4}if(e-n!==o)return 1;if(o>=3){const e=t[n+1];if(224===s&&e<160)return 1;if(237===s&&e>159)return 1;if(240===s&&e<144)return 1;if(244===s&&e>143)return 1}return 0}(r),t.toString(r,"utf8");let i="",n=0;if(this.bytesNeeded>0){for(;n<r.byteLength;){const t=r[n];if(t<this.lowerBoundary||t>this.upperBoundary){i+="�",this._reset();break}if(this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|63&t,this.bytesSeen++,n++,this.bytesSeen===this.bytesNeeded){i+=String.fromCodePoint(this.codePoint),this._reset();break}}if(this.bytesNeeded>0)return i}const s=e(r,n),o=r.byteLength-s;o>n&&(i+=t.toString(r,"utf8",n,o));for(let t=o;t<r.byteLength;t++){const e=r[t];0!==this.bytesNeeded?e<this.lowerBoundary||e>this.upperBoundary?(i+="�",t--,this._reset()):(this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|63&e,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(i+=String.fromCodePoint(this.codePoint),this._reset())):e<=127?(this.bytesSeen=0,i+=String.fromCharCode(e)):e>=194&&e<=223?(this.bytesNeeded=2,this.bytesSeen=1,this.codePoint=31&e):e>=224&&e<=239?(224===e?this.lowerBoundary=160:237===e&&(this.upperBoundary=159),this.bytesNeeded=3,this.bytesSeen=1,this.codePoint=15&e):e>=240&&e<=244?(240===e?this.lowerBoundary=144:244===e&&(this.upperBoundary=143),this.bytesNeeded=4,this.bytesSeen=1,this.codePoint=7&e):(this.bytesSeen=1,i+="�")}return i}flush(){const t=this.bytesNeeded>0?"�":"";return this._reset(),t}_reset(){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191}}}function Bh(){if(Ph)return Ih;Ph=1;const t=function(){if(Ah)return Rh;Ah=1;const t=jh();return Rh=class{constructor(t){this.encoding=t}get remaining(){return 0}decode(e){return t.toString(e,this.encoding)}flush(){return""}}}(),e=Fh();return Ih=class{constructor(r="utf8"){switch(this.encoding=function(t){switch(t=t.toLowerCase()){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:throw new Error("Unknown encoding: "+t)}}(r),this.encoding){case"utf8":this.decoder=new e;break;case"utf16le":case"base64":throw new Error("Unsupported encoding: "+this.encoding);default:this.decoder=new t(this.encoding)}}get remaining(){return this.decoder.remaining}push(t){return"string"==typeof t?t:this.decoder.decode(t)}write(t){return this.push(t)}end(t){let e="";return t&&(e=this.push(t)),e+=this.decoder.flush(),e}}}function zh(){if(Mh)return Dh;Mh=1;const{EventEmitter:t}=wh?_h:(wh=1,_h=n),e=new Error("Stream was destroyed"),i=new Error("Premature close"),s=Nh(),o=Bh(),a="undefined"==typeof queueMicrotask?t=>r.commonjsGlobal.process.nextTick(t):queueMicrotask,l=536870911,u=1^l,h=2^l,c=32,f=64,d=128,p=256,y=1024,b=2048,m=4096,g=8192,_=16384,w=32768,v=131072,S=131328,E=16^l,x=536805375,k=768^l,T=536838143,R=536739839,A=1<<18,L=2<<18,O=4<<18,I=8<<18,P=16<<18,D=32<<18,M=64<<18,C=128<<18,N=256<<18,j=512<<18,F=1024<<18,B=535822335,z=503316479,W=268435455,U=262160,G=536608751,q=8404992,H=14,$=15,V=8405006,Z=33587200,Y=33587215,Q=2359296,K=270794767,X=Symbol.asyncIterator||Symbol("asyncIterator");class J{constructor(t,{highWaterMark:e=16384,map:r=null,mapWritable:i,byteLength:n,byteLengthWritable:o}={}){this.stream=t,this.queue=new s,this.highWaterMark=e,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=o||n||Et,this.map=i||r,this.afterWrite=ot.bind(this),this.afterUpdateNextTick=ut.bind(this)}get ended(){return 0!==(this.stream._duplexState&D)}push(t){return!(142606350&this.stream._duplexState)&&(null!==this.map&&(t=this.map(t)),this.buffered+=this.byteLength(t),this.queue.push(t),this.buffered<this.highWaterMark?(this.stream._duplexState|=I,!0):(this.stream._duplexState|=6291456,!1))}shift(){const t=this.queue.shift();return this.buffered-=this.byteLength(t),0===this.buffered&&(this.stream._duplexState&=534773759),t}end(t){"function"==typeof t?this.stream.once("finish",t):null!=t&&this.push(t),this.stream._duplexState=(this.stream._duplexState|j)&B}autoBatch(t,e){const r=[],i=this.stream;for(r.push(t);(i._duplexState&K)===Q;)r.push(i._writableState.shift());if(0!==(i._duplexState&$))return e(null);i._writev(r,e)}update(){const t=this.stream;t._duplexState|=L;do{for(;(t._duplexState&K)===I;){const e=this.shift();t._duplexState|=67371008,t._write(e,this.afterWrite)}1310720&t._duplexState||this.updateNonPrimary()}while(!0===this.continueUpdate());t._duplexState&=536346623}updateNonPrimary(){const t=this.stream;if((144965647&t._duplexState)===j)return t._duplexState=t._duplexState|A,void t._final(nt.bind(this));4!==(t._duplexState&H)?1===(t._duplexState&Y)&&(t._duplexState=(t._duplexState|U)&u,t._open(ht.bind(this))):0===(t._duplexState&Z)&&(t._duplexState|=U,t._destroy(st.bind(this)))}continueUpdate(){return 0!==(this.stream._duplexState&C)&&(this.stream._duplexState&=z,!0)}updateCallback(){(35127311&this.stream._duplexState)===O?this.update():this.updateNextTick()}updateNextTick(){0===(this.stream._duplexState&C)&&(this.stream._duplexState|=C,0===(this.stream._duplexState&L)&&a(this.afterUpdateNextTick))}}class tt{constructor(t,{highWaterMark:e=16384,map:r=null,mapReadable:i,byteLength:n,byteLengthReadable:o}={}){this.stream=t,this.queue=new s,this.highWaterMark=0===e?1:e,this.buffered=0,this.readAhead=e>0,this.error=null,this.pipeline=null,this.byteLength=o||n||Et,this.map=i||r,this.pipeTo=null,this.afterRead=at.bind(this),this.afterUpdateNextTick=lt.bind(this)}get ended(){return 0!==(this.stream._duplexState&_)}pipe(t,e){if(null!==this.pipeTo)throw new Error("Can only pipe to one destination");if("function"!=typeof e&&(e=null),this.stream._duplexState|=512,this.pipeTo=t,this.pipeline=new rt(this.stream,t,e),e&&this.stream.on("error",xt),St(t))t._writableState.pipeline=this.pipeline,e&&t.on("error",xt),t.on("finish",this.pipeline.finished.bind(this.pipeline));else{const e=this.pipeline.done.bind(this.pipeline,t),r=this.pipeline.done.bind(this.pipeline,t,null);t.on("error",e),t.on("close",r),t.on("finish",this.pipeline.finished.bind(this.pipeline))}t.on("drain",it.bind(this)),this.stream.emit("piping",t),t.emit("pipe",this.stream)}push(t){const e=this.stream;return null===t?(this.highWaterMark=0,e._duplexState=536805311&e._duplexState|1024,!1):null!==this.map&&null===(t=this.map(t))?(e._duplexState&=x,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(t),this.queue.push(t),e._duplexState=(e._duplexState|d)&x,this.buffered<this.highWaterMark)}shift(){const t=this.queue.shift();return this.buffered-=this.byteLength(t),0===this.buffered&&(this.stream._duplexState&=536862591),t}unshift(t){const e=[null!==this.map?this.map(t):t];for(;this.buffered>0;)e.push(this.shift());for(let t=0;t<e.length-1;t++){const r=e[t];this.buffered+=this.byteLength(r),this.queue.push(r)}this.push(e[e.length-1])}read(){const t=this.stream;if((16527&t._duplexState)===d){const e=this.shift();return null!==this.pipeTo&&!1===this.pipeTo.write(e)&&(t._duplexState&=k),0!==(t._duplexState&b)&&t.emit("data",e),e}return!1===this.readAhead&&(t._duplexState|=v,this.updateNextTick()),null}drain(){const t=this.stream;for(;(16527&t._duplexState)===d&&768&t._duplexState;){const e=this.shift();null!==this.pipeTo&&!1===this.pipeTo.write(e)&&(t._duplexState&=k),0!==(t._duplexState&b)&&t.emit("data",e)}}update(){const t=this.stream;t._duplexState|=c;do{for(this.drain();this.buffered<this.highWaterMark&&(214047&t._duplexState)===v;)t._duplexState|=65552,t._read(this.afterRead),this.drain();4224==(12431&t._duplexState)&&(t._duplexState|=g,t.emit("readable")),80&t._duplexState||this.updateNonPrimary()}while(!0===this.continueUpdate());t._duplexState&=536870879}updateNonPrimary(){const t=this.stream;(1167&t._duplexState)===y&&(t._duplexState=536869887&t._duplexState|16384,t.emit("end"),(t._duplexState&V)===q&&(t._duplexState|=4),null!==this.pipeTo&&this.pipeTo.end()),4!==(t._duplexState&H)?1===(t._duplexState&Y)&&(t._duplexState=(t._duplexState|U)&u,t._open(ht.bind(this))):0===(t._duplexState&Z)&&(t._duplexState|=U,t._destroy(st.bind(this)))}continueUpdate(){return 0!==(this.stream._duplexState&w)&&(this.stream._duplexState&=T,!0)}updateCallback(){(32879&this.stream._duplexState)===f?this.update():this.updateNextTick()}updateNextTickIfOpen(){32769&this.stream._duplexState||(this.stream._duplexState|=w,0===(this.stream._duplexState&c)&&a(this.afterUpdateNextTick))}updateNextTick(){0===(this.stream._duplexState&w)&&(this.stream._duplexState|=w,0===(this.stream._duplexState&c)&&a(this.afterUpdateNextTick))}}class et{constructor(t){this.data=null,this.afterTransform=ct.bind(t),this.afterFinal=null}}class rt{constructor(t,e,r){this.from=t,this.to=e,this.afterPipe=r,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(t,e){e&&(this.error=e),t!==this.to||(this.to=null,null===this.from)?t!==this.from||(this.from=null,null===this.to)?(null!==this.afterPipe&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null):0===(t._duplexState&_)&&this.to.destroy(this.error||new Error("Readable stream closed before ending")):0!==(this.from._duplexState&_)&&this.pipeToFinished||this.from.destroy(this.error||new Error("Writable stream closed prematurely"))}}function it(){this.stream._duplexState|=512,this.updateCallback()}function nt(t){const e=this.stream;t&&e.destroy(t),0===(e._duplexState&H)&&(e._duplexState|=D,e.emit("finish")),(e._duplexState&V)===q&&(e._duplexState|=4),e._duplexState&=402391039,0===(e._duplexState&L)?this.update():this.updateNextTick()}function st(t){const r=this.stream;t||this.error===e||(t=this.error),t&&r.emit("error",t),r._duplexState|=8,r.emit("close");const i=r._readableState,n=r._writableState;if(null!==i&&null!==i.pipeline&&i.pipeline.done(r,t),null!==n){for(;null!==n.drains&&n.drains.length>0;)n.drains.shift().resolve(!1);null!==n.pipeline&&n.pipeline.done(r,t)}}function ot(t){const e=this.stream;t&&e.destroy(t),e._duplexState&=469499903,null!==this.drains&&function(t){for(let e=0;e<t.length;e++)0===--t[e].writes&&(t.shift().resolve(!0),e--)}(this.drains),(6553615&e._duplexState)===P&&(e._duplexState&=532676607,(e._duplexState&M)===M&&e.emit("drain")),this.updateCallback()}function at(t){t&&this.stream.destroy(t),this.stream._duplexState&=E,!1===this.readAhead&&0===(this.stream._duplexState&p)&&(this.stream._duplexState&=R),this.updateCallback()}function lt(){0===(this.stream._duplexState&c)&&(this.stream._duplexState&=T,this.update())}function ut(){0===(this.stream._duplexState&L)&&(this.stream._duplexState&=z,this.update())}function ht(t){const e=this.stream;t&&e.destroy(t),4&e._duplexState||(17423&e._duplexState||(e._duplexState|=f),142606351&e._duplexState||(e._duplexState|=O),e.emit("open")),e._duplexState&=G,null!==e._writableState&&e._writableState.updateCallback(),null!==e._readableState&&e._readableState.updateCallback()}function ct(t,e){null!=e&&this.push(e),this._writableState.afterWrite(t)}function ft(t){null!==this._readableState&&("data"===t&&(this._duplexState|=133376,this._readableState.updateNextTick()),"readable"===t&&(this._duplexState|=m,this._readableState.updateNextTick())),null!==this._writableState&&"drain"===t&&(this._duplexState|=M,this._writableState.updateNextTick())}class dt extends t{constructor(t){super(),this._duplexState=0,this._readableState=null,this._writableState=null,t&&(t.open&&(this._open=t.open),t.destroy&&(this._destroy=t.destroy),t.predestroy&&(this._predestroy=t.predestroy),t.signal&&t.signal.addEventListener("abort",kt.bind(this))),this.on("newListener",ft)}_open(t){t(null)}_destroy(t){t(null)}_predestroy(){}get readable(){return null!==this._readableState||void 0}get writable(){return null!==this._writableState||void 0}get destroyed(){return!!(8&this._duplexState)}get destroying(){return 0!==(this._duplexState&H)}destroy(t){0===(this._duplexState&H)&&(t||(t=e),this._duplexState=535822271&this._duplexState|4,null!==this._readableState&&(this._readableState.highWaterMark=0,this._readableState.error=t),null!==this._writableState&&(this._writableState.highWaterMark=0,this._writableState.error=t),this._duplexState|=2,this._predestroy(),this._duplexState&=h,null!==this._readableState&&this._readableState.updateNextTick(),null!==this._writableState&&this._writableState.updateNextTick())}}class pt extends dt{constructor(t){super(t),this._duplexState|=8519681,this._readableState=new tt(this,t),t&&(!1===this._readableState.readAhead&&(this._duplexState&=R),t.read&&(this._read=t.read),t.eagerOpen&&this._readableState.updateNextTick(),t.encoding&&this.setEncoding(t.encoding))}setEncoding(t){const e=new o(t),r=this._readableState.map||wt;return this._readableState.map=function(t){const i=e.push(t);return""===i&&(0!==t.byteLength||e.remaining>0)?null:r(i)},this}_read(t){t(null)}pipe(t,e){return this._readableState.updateNextTick(),this._readableState.pipe(t,e),t}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(t){return this._readableState.updateNextTickIfOpen(),this._readableState.push(t)}unshift(t){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(t)}resume(){return this._duplexState|=S,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=!1===this._readableState.readAhead?536739583:536870655,this}static _fromAsyncIterator(t,e){let r;const i=new pt({...e,read(e){t.next().then(n).then(e.bind(null,null)).catch(e)},predestroy(){r=t.return()},destroy(t){if(!r)return t(null);r.then(t.bind(null,null)).catch(t)}});return i;function n(t){t.done?i.push(null):i.push(t.value)}}static from(t,e){if(function(t){return St(t)&&t.readable}(t))return t;if(t[X])return this._fromAsyncIterator(t[X](),e);Array.isArray(t)||(t=void 0===t?[]:[t]);let r=0;return new pt({...e,read(e){this.push(r===t.length?null:t[r++]),e(null)}})}static isBackpressured(t){return!!(17422&t._duplexState)||t._readableState.buffered>=t._readableState.highWaterMark}static isPaused(t){return 0===(t._duplexState&p)}[X](){const t=this;let r=null,i=null,n=null;return this.on("error",t=>{r=t}),this.on("readable",function(){null!==i&&s(t.read())}),this.on("close",function(){null!==i&&s(null)}),{[X](){return this},next:()=>new Promise(function(e,r){i=e,n=r;const o=t.read();null!==o?s(o):8&t._duplexState&&s(null)}),return:()=>o(null),throw:t=>o(t)};function s(s){null!==n&&(r?n(r):null===s&&0===(t._duplexState&_)?n(e):i({value:s,done:null===s}),n=i=null)}function o(e){return t.destroy(e),new Promise((r,i)=>{if(8&t._duplexState)return r({value:void 0,done:!0});t.once("close",function(){e?i(e):r({value:void 0,done:!0})})})}}}class yt extends dt{constructor(t){super(t),this._duplexState|=16385,this._writableState=new J(this,t),t&&(t.writev&&(this._writev=t.writev),t.write&&(this._write=t.write),t.final&&(this._final=t.final),t.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=F}uncork(){this._duplexState&=W,this._writableState.updateNextTick()}_writev(t,e){e(null)}_write(t,e){this._writableState.autoBatch(t,e)}_final(t){t(null)}static isBackpressured(t){return!!(146800654&t._duplexState)}static drained(t){if(t.destroyed)return Promise.resolve(!1);const e=t._writableState;var r;const i=((r=t)._writev!==yt.prototype._writev&&r._writev!==bt.prototype._writev?Math.min(1,e.queue.length):e.queue.length)+(t._duplexState&N?1:0);return 0===i?Promise.resolve(!0):(null===e.drains&&(e.drains=[]),new Promise(t=>{e.drains.push({writes:i,resolve:t})}))}write(t){return this._writableState.updateNextTick(),this._writableState.push(t)}end(t){return this._writableState.updateNextTick(),this._writableState.end(t),this}}class bt extends pt{constructor(t){super(t),this._duplexState=1|this._duplexState&v,this._writableState=new J(this,t),t&&(t.writev&&(this._writev=t.writev),t.write&&(this._write=t.write),t.final&&(this._final=t.final))}cork(){this._duplexState|=F}uncork(){this._duplexState&=W,this._writableState.updateNextTick()}_writev(t,e){e(null)}_write(t,e){this._writableState.autoBatch(t,e)}_final(t){t(null)}write(t){return this._writableState.updateNextTick(),this._writableState.push(t)}end(t){return this._writableState.updateNextTick(),this._writableState.end(t),this}}class mt extends bt{constructor(t){super(t),this._transformState=new et(this),t&&(t.transform&&(this._transform=t.transform),t.flush&&(this._flush=t.flush))}_write(t,e){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=t:this._transform(t,this._transformState.afterTransform)}_read(t){if(null!==this._transformState.data){const e=this._transformState.data;this._transformState.data=null,t(null),this._transform(e,this._transformState.afterTransform)}else t(null)}destroy(t){super.destroy(t),null!==this._transformState.data&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(t,e){e(null,t)}_flush(t){t(null)}_final(t){this._transformState.afterFinal=t,this._flush(gt.bind(this))}}function gt(t,e){const r=this._transformState.afterFinal;if(t)return r(t);null!=e&&this.push(e),this.push(null),r(null)}function _t(t,...e){const r=Array.isArray(t)?[...t,...e]:[t,...e],n=r.length&&"function"==typeof r[r.length-1]?r.pop():null;if(r.length<2)throw new Error("Pipeline requires at least 2 streams");let s=r[0],o=null,a=null;for(let t=1;t<r.length;t++)o=r[t],St(s)?s.pipe(o,u):(l(s,!0,t>1,u),s.pipe(o)),s=o;if(n){let t=!1;const e=St(o)||!(!o._writableState||!o._writableState.autoDestroy);o.on("error",t=>{null===a&&(a=t)}),o.on("finish",()=>{t=!0,e||n(a)}),e&&o.on("close",()=>n(a||(t?null:i)))}return o;function l(t,e,r,n){t.on("error",n),t.on("close",function(){if(t._readableState&&!t._readableState.ended)return n(i);if(r&&t._writableState&&!t._writableState.ended)return n(i)})}function u(t){if(t&&!a){a=t;for(const e of r)e.destroy(t)}}}function wt(t){return t}function vt(t){return!!t._readableState||!!t._writableState}function St(t){return"number"==typeof t._duplexState&&vt(t)}function Et(t){return function(t){return"object"==typeof t&&null!==t&&"number"==typeof t.byteLength}(t)?t.byteLength:1024}function xt(){}function kt(){this.destroy(new Error("Stream aborted."))}return Dh={pipeline:_t,pipelinePromise:function(...t){return new Promise((e,r)=>_t(...t,t=>{if(t)return r(t);e()}))},isStream:vt,isStreamx:St,isEnded:function(t){return!!t._readableState&&t._readableState.ended},isFinished:function(t){return!!t._writableState&&t._writableState.ended},isDisturbed:function(t){return!!(1&~t._duplexState)||0!==(t._duplexState&Z)},getStreamError:function(t,r={}){const i=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return r.all||i!==e?i:null},Stream:dt,Writable:yt,Readable:pt,Duplex:bt,Transform:mt,PassThrough:class extends mt{}},Dh}var Wh,Uh,Gh,qh={};function Hh(){if(Wh)return qh;Wh=1;const t=jh(),e="0".charCodeAt(0),r=t.from([117,115,116,97,114,0]),i=t.from([e,e]),n=t.from([117,115,116,97,114,32]),s=t.from([32,0]),o=257,a=263;function l(t,e,r,i){for(;r<i;r++)if(t[r]===e)return r;return i}function u(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function h(t,e){return(t=t.toString(8)).length>e?"7777777777777777777".slice(0,e)+" ":"0000000000000000000".slice(0,e-t.length)+t+" "}function c(e,r,i){if(128&(e=e.subarray(r,r+i))[r=0])return function(t){let e;if(128===t[0])e=!0;else{if(255!==t[0])return null;e=!1}const r=[];let i;for(i=t.length-1;i>0;i--){const n=t[i];e?r.push(n):r.push(255-n)}let n=0;const s=r.length;for(i=0;i<s;i++)n+=r[i]*Math.pow(256,i);return e?n:-1*n}(e);{for(;r<e.length&&32===e[r];)r++;const i=function(t,e,r){return"number"!=typeof t?r:(t=~~t)>=e?e:t>=0||(t+=e)>=0?t:0}(l(e,32,r,e.length),e.length,e.length);for(;r<i&&0===e[r];)r++;return i===r?0:parseInt(t.toString(e.subarray(r,i)),8)}}function f(e,r,i,n){return t.toString(e.subarray(r,l(e,0,r,r+i)),n)}function d(e){const r=t.byteLength(e);let i=Math.floor(Math.log(r)/Math.log(10))+1;return r+i>=Math.pow(10,i)&&i++,r+i+e}return qh.decodeLongPath=function(t,e){return f(t,0,t.length,e)},qh.encodePax=function(e){let r="";e.name&&(r+=d(" path="+e.name+"\n")),e.linkname&&(r+=d(" linkpath="+e.linkname+"\n"));const i=e.pax;if(i)for(const t in i)r+=d(" "+t+"="+i[t]+"\n");return t.from(r)},qh.decodePax=function(e){const r={};for(;e.length;){let i=0;for(;i<e.length&&32!==e[i];)i++;const n=parseInt(t.toString(e.subarray(0,i)),10);if(!n)return r;const s=t.toString(e.subarray(i+1,n-1)),o=s.indexOf("=");if(-1===o)return r;r[s.slice(0,o)]=s.slice(o+1),e=e.subarray(n)}return r},qh.encode=function(n){const s=t.alloc(512);let a=n.name,l="";if(5===n.typeflag&&"/"!==a[a.length-1]&&(a+="/"),t.byteLength(a)!==a.length)return null;for(;t.byteLength(a)>100;){const t=a.indexOf("/");if(-1===t)return null;l+=l?"/"+a.slice(0,t):a.slice(0,t),a=a.slice(t+1)}return t.byteLength(a)>100||t.byteLength(l)>155||n.linkname&&t.byteLength(n.linkname)>100?null:(t.write(s,a),t.write(s,h(4095&n.mode,6),100),t.write(s,h(n.uid,6),108),t.write(s,h(n.gid,6),116),function(e,r,i){e.toString(8).length>11?function(t,e,r){e[r]=128;for(let i=11;i>0;i--)e[r+i]=255&t,t=Math.floor(t/256)}(e,r,i):t.write(r,h(e,11),i)}(n.size,s,124),t.write(s,h(n.mtime.getTime()/1e3|0,11),136),s[156]=e+function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}(n.type),n.linkname&&t.write(s,n.linkname,157),t.copy(r,s,o),t.copy(i,s,263),n.uname&&t.write(s,n.uname,265),n.gname&&t.write(s,n.gname,297),t.write(s,h(n.devmajor||0,6),329),t.write(s,h(n.devminor||0,6),337),l&&t.write(s,l,345),t.write(s,h(u(s),6),148),s)},qh.decode=function(i,l,h){let d=0===i[156]?0:i[156]-e,p=f(i,0,100,l);const y=c(i,100,8),b=c(i,108,8),m=c(i,116,8),g=c(i,124,12),_=c(i,136,12),w=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}(d),v=0===i[157]?null:f(i,157,100,l),S=f(i,265,32),E=f(i,297,32),x=c(i,329,8),k=c(i,337,8),T=u(i);if(256===T)return null;if(T!==c(i,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(function(e){return t.equals(r,e.subarray(o,263))}(i))i[345]&&(p=f(i,345,155,l)+"/"+p);else if(function(e){return t.equals(n,e.subarray(o,263))&&t.equals(s,e.subarray(a,265))}(i));else if(!h)throw new Error("Invalid tar header: unknown format.");return 0===d&&p&&"/"===p[p.length-1]&&(d=5),{name:p,mode:y,uid:b,gid:m,size:g,mtime:new Date(1e3*_),type:w,linkname:v,uname:S,gname:E,devmajor:x,devminor:k,pax:null}},qh}var $h,Vh,Zh,Yh,Qh,Kh,Xh,Jh,tc,ec,rc,ic,nc={exports:{}};function sc(){if($h)return nc.exports;$h=1;const t={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{nc.exports=require("fs").constants||t}catch{nc.exports=t}return nc.exports}function oc(){if(Zh)return Vh;Zh=1;const{Readable:t,Writable:e,getStreamError:r}=zh(),i=jh(),n=sc(),s=Hh(),o=i.alloc(1024);class a extends e{constructor(t,e,r){super({mapWritable:c,eagerOpen:!0}),this.written=0,this.header=e,this._callback=r,this._linkname=null,this._isLinkname="symlink"===e.type&&!e.linkname,this._isVoid="file"!==e.type&&"contiguous-file"!==e.type,this._finished=!1,this._pack=t,this._openCallback=null,null===this._pack._stream?this._pack._stream=this:this._pack._pending.push(this)}_open(t){this._openCallback=t,this._pack._stream===this&&this._continueOpen()}_continuePack(t){if(null===this._callback)return;const e=this._callback;this._callback=null,e(t)}_continueOpen(){null===this._pack._stream&&(this._pack._stream=this);const t=this._openCallback;if(this._openCallback=null,null!==t){if(this._pack.destroying)return t(new Error("pack stream destroyed"));if(this._pack._finalized)return t(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),t(null)}}_write(t,e){return this._isLinkname?(this._linkname=this._linkname?i.concat([this._linkname,t]):t,e(null)):this._isVoid?t.byteLength>0?e(new Error("No body allowed for this entry")):e():(this.written+=t.byteLength,this._pack.push(t)?e():void(this._pack._drain=e))}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?i.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),h(this._pack,this.header.size),this._pack._done(this))}_final(t){if(this.written!==this.header.size)return t(new Error("Size mismatch"));this._finish(),t(null)}_getError(){return r(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(t){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),t()}}class l extends t{constructor(t){super(t),this._drain=u,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(t,e,r){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");"function"==typeof e&&(r=e,e=null),r||(r=u),t.size&&"symlink"!==t.type||(t.size=0),t.type||(t.type=function(t){switch(t&n.S_IFMT){case n.S_IFBLK:return"block-device";case n.S_IFCHR:return"character-device";case n.S_IFDIR:return"directory";case n.S_IFIFO:return"fifo";case n.S_IFLNK:return"symlink"}return"file"}(t.mode)),t.mode||(t.mode="directory"===t.type?493:420),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),"string"==typeof e&&(e=i.from(e));const s=new a(this,t,r);return i.isBuffer(e)?(t.size=e.byteLength,s.write(e),s.end(),s):(s._isVoid,s)}finalize(){this._stream||this._pending.length>0?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(o),this.push(null))}_done(t){t===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(t){if(!t.pax){const e=s.encode(t);if(e)return void this.push(e)}this._encodePax(t)}_encodePax(t){const e=s.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.byteLength,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(s.encode(r)),this.push(e),h(this,e.byteLength),r.size=t.size,r.type=t.type,this.push(s.encode(r))}_doDrain(){const t=this._drain;this._drain=u,t()}_predestroy(){const t=r(this);for(this._stream&&this._stream.destroy(t);this._pending.length;){const e=this._pending.shift();e.destroy(t),e._continueOpen()}this._doDrain()}_read(t){this._doDrain(),t()}}function u(){}function h(t,e){(e&=511)&&t.push(o.subarray(0,512-e))}function c(t){return i.isBuffer(t)?t:i.from(t)}return Vh=function(t){return new l(t)}}function ac(){return Yh||(Yh=1,Ch.extract=function(){if(Gh)return Uh;Gh=1;const{Writable:t,Readable:e,getStreamError:r}=zh(),i=Nh(),n=jh(),s=Hh(),o=n.alloc(0);class a{constructor(){this.buffered=0,this.shifted=0,this.queue=new i,this._offset=0}push(t){this.buffered+=t.byteLength,this.queue.push(t)}shiftFirst(t){return 0===this._buffered?null:this._next(t)}shift(t){if(t>this.buffered)return null;if(0===t)return o;let e=this._next(t);if(t===e.byteLength)return e;const r=[e];for(;(t-=e.byteLength)>0;)e=this._next(t),r.push(e);return n.concat(r)}_next(t){const e=this.queue.peek(),r=e.byteLength-this._offset;if(t>=r){const t=this._offset?e.subarray(this._offset,e.byteLength):e;return this.queue.shift(),this._offset=0,this.buffered-=r,this.shifted+=r,t}return this.buffered-=t,this.shifted+=t,e.subarray(this._offset,this._offset+=t)}}class l extends e{constructor(t,e,r){super(),this.header=e,this.offset=r,this._parent=t}_read(t){0===this.header.size&&this.push(null),this._parent._stream===this&&this._parent._update(),t(null)}_predestroy(){this._parent.destroy(r(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=c(this.header.size),this._parent._update())}_destroy(t){this._detach(),t(null)}}class u extends t{constructor(t){super(t),t||(t={}),this._buffer=new a,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=h,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=t.filenameEncoding||"utf-8",this._allowUnknownFormat=!!t.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(t){if(this._locked=!1,t)return this.destroy(t),void this._continueWrite(t);this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=s.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(t){return this._continueWrite(t),!1}if(!this._header)return!0;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,!0}return this._locked=!0,this._applyLongHeaders(),0===this._header.size||"directory"===this._header.type?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(t){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=s.decodeLongPath(t,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=s.decodeLongPath(t,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=s.decodePax(t);break;case"pax-header":this._pax=null===this._paxGlobal?s.decodePax(t):Object.assign({},this._paxGlobal,s.decodePax(t))}}_consumeLongHeader(){this._longHeader=!1,this._missing=c(this._header.size);const t=this._buffer.shift(this._header.size);try{this._decodeLongHeader(t)}catch(t){return this._continueWrite(t),!1}return!0}_consumeStream(){const t=this._buffer.shiftFirst(this._missing);if(null===t)return!1;this._missing-=t.byteLength;const e=this._stream.push(t);return 0===this._missing?(this._stream.push(null),e&&this._stream._detach(),e&&!1===this._locked):e}_createStream(){return new l(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(null!==this._stream){if(!1===this._consumeStream())return;continue}if(!0===this._longHeader){if(this._missing>this._buffer.buffered)break;if(!1===this._consumeLongHeader())return!1;continue}const t=this._buffer.shiftFirst(this._missing);null!==t&&(this._missing-=t.byteLength);continue}if(this._buffer.buffered<512)break;if(null!==this._stream||!1===this._consumeHeader())return}this._continueWrite(null)}_continueWrite(t){const e=this._callback;this._callback=h,e(t)}_write(t,e){this._callback=e,this._buffer.push(t),this._update()}_final(t){this._finished=0===this._missing&&0===this._buffer.buffered,t(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(t){this._stream&&this._stream.destroy(r(this)),t(null)}[Symbol.asyncIterator](){let t=null,e=null,r=null,i=null,n=null;const s=this;return this.on("entry",function(t,s,o){n=o,s.on("error",h),e?(e({value:s,done:!1}),e=r=null):i=s}),this.on("error",e=>{t=e}),this.on("close",function(){o(t),e&&(t?r(t):e({value:void 0,done:!0}),e=r=null)}),{[Symbol.asyncIterator](){return this},next:()=>new Promise(a),return:()=>l(null),throw:t=>l(t)};function o(t){if(!n)return;const e=n;n=null,e(t)}function a(n,a){return t?a(t):i?(n({value:i,done:!1}),void(i=null)):(e=n,r=a,o(null),void(s._finished&&e&&(e({value:void 0,done:!0}),e=r=null)))}function l(t){return s.destroy(t),o(t),new Promise((e,r)=>{if(s.destroyed)return e({value:void 0,done:!0});s.once("close",function(){t?r(t):e({value:void 0,done:!0})})})}}}function h(){}function c(t){return(t&=511)&&512-t}return Uh=function(t){return new u(t)}}(),Ch.pack=oc()),Ch}
|
|
34
|
+
/**
|
|
35
|
+
* TAR Format Plugin
|
|
36
|
+
*
|
|
37
|
+
* @module plugins/tar
|
|
38
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
39
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
40
|
+
*/function lc(){if(Jh)return Xh;function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}Jh=1;const e=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function r(t){if(Buffer.isBuffer(t))return t;if("number"==typeof t)return Buffer.alloc(t);if("string"==typeof t)return Buffer.from(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function i(t,i){t=r(t),Buffer.isBuffer(i)&&(i=i.readUInt32BE(0));let n=-1^i;for(var s=0;s<t.length;s++)n=e[255&(n^t[s])]^n>>>8;return-1^n}function n(){return function(t){const e=r(4);return e.writeInt32BE(t,0),e}(i.apply(null,arguments))}n.signed=function(){return i.apply(null,arguments)},n.unsigned=function(){return i.apply(null,arguments)>>>0};return Xh=t(n)}
|
|
41
|
+
/**
|
|
42
|
+
* JSON Format Plugin
|
|
43
|
+
*
|
|
44
|
+
* @module plugins/json
|
|
45
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
46
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
47
|
+
*/var uc=function(){if(ic)return rc;ic=1;var t=Tu(),e={},r=function(t,e){return r.create(t,e)};return r.create=function(r,i){if(e[r]){var n=new t(r,i);return n.setFormat(r),n.setModule(new e[r](i)),n}throw new Error("create("+r+"): format not registered")},r.registerFormat=function(t,r){if(e[t])throw new Error("register("+t+"): format already registered");if("function"!=typeof r)throw new Error("register("+t+"): format module invalid");if("function"!=typeof r.prototype.append||"function"!=typeof r.prototype.finalize)throw new Error("register("+t+"): format module missing methods");e[t]=r},r.isRegisteredFormat=function(t){return!!e[t]},r.registerFormat("zip",gh()),r.registerFormat("tar",function(){if(Kh)return Qh;Kh=1;var t=S,e=ac(),r=vu(),i=function(n){if(!(this instanceof i))return new i(n);"object"!=typeof(n=this.options=r.defaults(n,{gzip:!1})).gzipOptions&&(n.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=e.pack(n),this.compressor=!1,n.gzip&&(this.compressor=t.createGzip(n.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};return i.prototype._onCompressorError=function(t){this.engine.emit("error",t)},i.prototype.append=function(t,e,i){var n=this;function s(t,r){t?i(t):n.engine.entry(e,r,function(t){i(t,e)})}if(e.mtime=e.date,"buffer"===e.sourceType)s(null,t);else if("stream"===e.sourceType&&e.stats){e.size=e.stats.size;var o=n.engine.entry(e,function(t){i(t,e)});t.pipe(o)}else"stream"===e.sourceType&&r.collectStream(t,s)},i.prototype.finalize=function(){this.engine.finalize()},i.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},i.prototype.pipe=function(t,e){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(t,e):this.engine.pipe.apply(this.engine,arguments)},i.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)},Qh=i}()),r.registerFormat("json",function(){if(ec)return tc;ec=1;var t=l.inherits,e=Io().Transform,r=lc(),i=vu(),n=function(t){if(!(this instanceof n))return new n(t);t=this.options=i.defaults(t,{}),e.call(this,t),this.supports={directory:!0,symlink:!0},this.files=[]};return t(n,e),n.prototype._transform=function(t,e,r){r(null,t)},n.prototype._writeStringified=function(){var t=JSON.stringify(this.files);this.write(t)},n.prototype.append=function(t,e,n){var s=this;function o(t,i){t?n(t):(e.size=i.length||0,e.crc32=r.unsigned(i),s.files.push(e),n(null,e))}e.crc32=0,"buffer"===e.sourceType?o(null,t):"stream"===e.sourceType&&i.collectStream(t,o)},n.prototype.finalize=function(){this._writeStringified(),this.end()},tc=n}
|
|
48
|
+
/**
|
|
49
|
+
* Archiver Vending
|
|
50
|
+
*
|
|
51
|
+
* @ignore
|
|
52
|
+
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
53
|
+
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
54
|
+
*/()),rc=r}(),hc=E({__proto__:null,default:r.getDefaultExportFromCjs(uc)},[uc]);exports.index=hc;
|