@stlite/desktop 0.76.0 → 0.76.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/dump_artifacts.js +35 -35
- package/build/assets/{FileDownload.esm-B0LHj-_3.js → FileDownload.esm-BP72wB_u.js} +1 -1
- package/build/assets/{FormClearHelper-CQJ4hAhl.js → FormClearHelper-BIZNCxvb.js} +1 -1
- package/build/assets/{Hooks-CaWvNnPE.js → Hooks-C30HoPXz.js} +1 -1
- package/build/assets/{InputInstructions-dmd87zjO.js → InputInstructions-B9wXy3U4.js} +1 -1
- package/build/assets/{ProgressBar-DOQ5M8oh.js → ProgressBar-BlPlcnwu.js} +1 -1
- package/build/assets/{RenderInPortalIfExists-CtbwYFE8.js → RenderInPortalIfExists-DSHuT3NO.js} +1 -1
- package/build/assets/{Toolbar-CSZCGrJs.js → Toolbar-B1zMj-jg.js} +1 -1
- package/build/assets/{base-input-DriCPmTX.js → base-input-CMN1_Ew_.js} +1 -1
- package/build/assets/{createSuper-BZXlc4Td.js → createSuper-D4gvBB5j.js} +1 -1
- package/build/assets/{data-grid-overlay-editor-gv8SW6cw.js → data-grid-overlay-editor-CgsMGcDx.js} +1 -1
- package/build/assets/{downloader-B5dbWt3Y.js → downloader-Dv4W7rem.js} +1 -1
- package/build/assets/{es6-yncbwHpI.js → es6-R_bosjbV.js} +2 -2
- package/build/assets/{getPrototypeOf-CbwKLcHO.js → getPrototypeOf-CHt6AZp_.js} +1 -1
- package/build/assets/{iframeResizer.contentWindow-uu2vIiUi.js → iframeResizer.contentWindow-9-Xlr32c.js} +1 -1
- package/build/assets/{index-B02vCrpB.js → index-8qq2hPcx.js} +1 -1
- package/build/assets/{index-C3MTxsAN.js → index-B0CwOTPz.js} +1 -1
- package/build/assets/{index-Do5EoDM5.js → index-B1L1envm.js} +1 -1
- package/build/assets/{index-LOOgUeUX.js → index-B3bELqRU.js} +1 -1
- package/build/assets/{index-DYpupVEb.js → index-B3quCHCi.js} +1 -1
- package/build/assets/{index-e4S25aVD.js → index-BB6FwCEX.js} +1 -1
- package/build/assets/{index-CdMvOMb7.js → index-BDNxxQ4v.js} +1 -1
- package/build/assets/{index-BpYNJC6s.js → index-BEeaeEPl.js} +1 -1
- package/build/assets/{index-D3ZPLnGE.js → index-BKKZmTqZ.js} +1 -1
- package/build/assets/{index-Cnquoj5Q.js → index-BL2qQWaL.js} +1 -1
- package/build/assets/{index-IPja5Suf.js → index-BLvsCvkf.js} +1 -1
- package/build/assets/{index-RheWSraw.js → index-BZMvJ6Yf.js} +1 -1
- package/build/assets/{index-CH7n-Ppq.js → index-Be0wHUx-.js} +1 -1
- package/build/assets/{index-CVNSqCzF.js → index-BkBgJKWs.js} +1 -1
- package/build/assets/{index-C3174axP.js → index-Bu07mO_x.js} +1 -1
- package/build/assets/{index-DDWzHXvN.js → index-C9-3Tvo1.js} +1 -1
- package/build/assets/{index-CH2ZvTfO.js → index-CMQsen11.js} +1 -1
- package/build/assets/{index-BMPhLnQ5.js → index-CRKAbc7H.js} +1 -1
- package/build/assets/{index-BvFTSm46.js → index-Cjn3IAUe.js} +1 -1
- package/build/assets/{index-wvUDp42d.js → index-CoumX680.js} +1 -1
- package/build/assets/{index-BNNuO9xH.js → index-CxiUGvN5.js} +1 -1
- package/build/assets/{index-kDtQE3bj.js → index-D2caMYlF.js} +1 -1
- package/build/assets/{index-CkJQJhep.js → index-D7beHGbk.js} +5 -5
- package/build/assets/{index-XDu91tM_.js → index-DBeV5cvz.js} +1 -1
- package/build/assets/{index-DKDi9zAJ.js → index-DP9siobZ.js} +1 -1
- package/build/assets/{index-BqCUmN8g.js → index-D_ZpMtCx.js} +1 -1
- package/build/assets/{index-B8fuFO6f.js → index-DfPuZgVe.js} +1 -1
- package/build/assets/{index-D6uye6hf.js → index-DgKoCzGM.js} +1 -1
- package/build/assets/{index-BTcFSez7.js → index-DjNlghsG.js} +1 -1
- package/build/assets/{index-BIUCqSQk.js → index-DmCDp6tz.js} +1 -1
- package/build/assets/{index-DI8uuyv8.js → index-DqEaj7EU.js} +1 -1
- package/build/assets/{index-gy-vJk95.js → index-DuoBWGu3.js} +5 -5
- package/build/assets/{index-Cnm_EPJy.js → index-DxHnoro7.js} +1 -1
- package/build/assets/{index-BrGUvTwf.js → index-UQryvozB.js} +1 -1
- package/build/assets/{index-B976k_ae.js → index-W-TZSd1E.js} +1 -1
- package/build/assets/{index-C0PQ0fkc.js → index-bnfkOWdV.js} +1 -1
- package/build/assets/{index-C_hLmnGD.js → index-dkm5JtmN.js} +1 -1
- package/build/assets/{input-BPMs_pbL.js → input-OLwqq6dJ.js} +1 -1
- package/build/assets/{memory-BTS-Apkp.js → memory-K1u1sl9P.js} +1 -1
- package/build/assets/{number-overlay-editor-mb8oKGeo.js → number-overlay-editor-BPRtr2ZH.js} +1 -1
- package/build/assets/{sandbox-CX6LT8_0.js → sandbox-CuSVz6A0.js} +1 -1
- package/build/assets/{slicedToArray-CXJqkkAS.js → slicedToArray-CFP8r_hv.js} +1 -1
- package/build/assets/{textarea-Bt4dlZO-.js → textarea-BgOZDoS8.js} +1 -1
- package/build/assets/{timepicker-CmQYPfbc.js → timepicker-BD9p-9JQ.js} +1 -1
- package/build/assets/{uniqueId-DKCcDw-W.js → uniqueId-D81S8Chc.js} +1 -1
- package/build/assets/{useBasicWidgetState-HYzN-eIJ.js → useBasicWidgetState-DgnZoFWi.js} +1 -1
- package/build/assets/{useOnInputChange-DBbXtTXT.js → useOnInputChange-DTjT_cKQ.js} +1 -1
- package/build/assets/{withFullScreenWrapper-Dibt3YfW.js → withFullScreenWrapper-BzdPuFtI.js} +1 -1
- package/build/electron/main.js +2 -2
- package/build/index.html +1 -1
- package/package.json +5 -5
- package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
package/bin/dump_artifacts.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var dg=Object.create;var rl=Object.defineProperty;var pg=Object.getOwnPropertyDescriptor;var gg=Object.getOwnPropertyNames;var mg=Object.getPrototypeOf,yg=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var bg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of gg(e))!yg.call(t,n)&&n!==r&&rl(t,n,{get:()=>e[n],enumerable:!(i=pg(e,n))||i.enumerable});return t};var pe=(t,e,r)=>(r=t!=null?dg(mg(t)):{},bg(e||!t||!t.__esModule?rl(r,"default",{value:t,enumerable:!0}):r,t));var Ee=w((uE,il)=>{"use strict";var Os=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
3
3
|
Found: ${e.toString().split(`
|
|
4
4
|
`)[0]}
|
|
5
|
-
`),Error.captureStackTrace(this,t)}};il.exports=t=>{if(t.length>2)throw new Os(t);function e(i={}){this.options=i}e.prototype.transform=t;function r(i){return new e(i)}return r.Format=e,r}});var ol=w((
|
|
6
|
-
`)!=-1,i=this._styles,n=i.length;n--;){var s=Ct[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(
|
|
7
|
-
`));return!0}$s.exports=(...t)=>{let e=
|
|
8
|
-
${
|
|
9
|
-
${
|
|
10
|
-
${k}`),y.pop(),`[${
|
|
11
|
-
${
|
|
12
|
-
${
|
|
13
|
-
${k}`),y.pop(),`{${
|
|
14
|
-
${
|
|
15
|
-
${
|
|
16
|
-
${
|
|
17
|
-
${
|
|
18
|
-
${
|
|
19
|
-
${
|
|
20
|
-
${
|
|
21
|
-
${
|
|
22
|
-
${
|
|
23
|
-
${
|
|
24
|
-
${
|
|
25
|
-
${_}`),y.pop(),`{${k}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function h(c,f,y){switch(typeof f){case"string":return dt(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(c),typeof f!="object")return h(c,f,y);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let b="";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f);let O=Math.min(f.length,a),k=0;for(;k<O-1;k++){let F=h(String(k),f[k],y);b+=F!==void 0?F:"null",b+=","}let D=h(String(k),f[k],y);if(b+=D!==void 0?D:"null",f.length-1>a){let F=f.length-a-1;b+=`,"... ${jt(F)} not stringified"`}return y.pop(),`[${b}]`}let S=Object.keys(f),_=S.length;if(_===0)return"{}";if(s<y.length+1)return'"[Object]"';let x="",R=Math.min(_,a);Bs(f)&&(b+=Yl(f,",",a),S=S.slice(f.length),R-=f.length,x=","),n&&(S=Ws(S)),y.push(f);for(let O=0;O<R;O++){let k=S[O],D=h(k,f[k],y);D!==void 0&&(b+=`${x}${dt(k)}:${D}`,x=",")}if(_>a){let O=_-a;b+=`${x}"...":"${jt(O)} not stringified"`}return y.pop(),`{${b}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function p(c,f,y){if(arguments.length>1){let b="";if(typeof y=="number"?b=" ".repeat(Math.min(y,10)):typeof y=="string"&&(b=y.slice(0,10)),f!=null){if(typeof f=="function")return o("",{"":c},[],f,b,"");if(Array.isArray(f))return l("",c,[],Ug(f),b,"")}if(b.length!==0)return u("",c,[],b,"")}return h("",c,[])}return p}});var Hs=w((qE,Zl)=>{"use strict";var Hg=Re(),{MESSAGE:Gg}=re(),Yg=Pr();function Vg(t,e){return typeof e=="bigint"?e.toString():e}Zl.exports=Hg((t,e)=>{let r=Yg.configure(e);return t[Gg]=r(t,e.replacer||Vg,e.space),t})});var Xl=w((CE,Ql)=>{"use strict";var Kg=Re();Ql.exports=Kg((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var tu=w((jE,eu)=>{"use strict";var Jg=Re(),{MESSAGE:Zg}=re(),Qg=Pr();eu.exports=Jg(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[Zg]=Qg(e),t})});var iu=w((LE,ru)=>{"use strict";var Xg=Re();function em(t,e,r){let i=e.reduce((s,a)=>(s[a]=t[a],delete t[a],s),{}),n=Object.keys(t).reduce((s,a)=>(s[a]=t[a],delete t[a],s),{});return Object.assign(t,i,{[r]:n}),t}function tm(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}ru.exports=Xg((t,e={})=>{let r="metadata";e.key&&(r=e.key);let i=[];return!e.fillExcept&&!e.fillWith&&(i.push("level"),i.push("message")),e.fillExcept&&(i=e.fillExcept),i.length>0?em(t,i,r):e.fillWith?tm(t,e.fillWith,r):t})});var su=w((NE,nu)=>{var tr=1e3,rr=tr*60,ir=rr*60,Nt=ir*24,rm=Nt*7,im=Nt*365.25;nu.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return nm(t);if(r==="number"&&isFinite(t))return e.long?am(t):sm(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function nm(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*im;case"weeks":case"week":case"w":return r*rm;case"days":case"day":case"d":return r*Nt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ir;case"minutes":case"minute":case"mins":case"min":case"m":return r*rr;case"seconds":case"second":case"secs":case"sec":case"s":return r*tr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function sm(t){var e=Math.abs(t);return e>=Nt?Math.round(t/Nt)+"d":e>=ir?Math.round(t/ir)+"h":e>=rr?Math.round(t/rr)+"m":e>=tr?Math.round(t/tr)+"s":t+"ms"}function am(t){var e=Math.abs(t);return e>=Nt?Ii(t,e,Nt,"day"):e>=ir?Ii(t,e,ir,"hour"):e>=rr?Ii(t,e,rr,"minute"):e>=tr?Ii(t,e,tr,"second"):t+" ms"}function Ii(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var ou=w((Dr,au)=>{"use strict";var om=Re(),lm=su();au.exports=om(t=>{let e=+new Date;return Dr.diff=e-(Dr.prevTime||e),Dr.prevTime=e,t.ms=`+${lm(Dr.diff)}`,t})});var fu=w((FE,uu)=>{"use strict";var um=require("util").inspect,fm=Re(),{LEVEL:hm,MESSAGE:lu,SPLAT:cm}=re();uu.exports=fm((t,e={})=>{let r=Object.assign({},t);return delete r[hm],delete r[lu],delete r[cm],t[lu]=um(r,!1,e.depth||null,e.colorize),t})});var hu=w((IE,Wi)=>{"use strict";var{MESSAGE:dm}=re(),$i=class{constructor(e){this.template=e}transform(e){return e[dm]=this.template(e),e}};Wi.exports=t=>new $i(t);Wi.exports.Printf=Wi.exports.Format=$i});var pu=w(($E,du)=>{"use strict";var pm=Re(),{MESSAGE:cu}=re(),gm=Pr();du.exports=pm(t=>{let e=gm(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[cu]=`${t.level}:${r} ${t.message} ${e}`:t[cu]=`${t.level}:${r} ${t.message}`,t})});var yu=w((WE,mu)=>{"use strict";var mm=require("util"),{SPLAT:gu}=re(),ym=/%[scdjifoO%]/g,bm=/%%/g,Gs=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[gu]||e.splat||[],s=i.match(bm),a=s&&s.length||0,l=r.length-a-n.length,u=l<0?n.splice(l,-1*l):[],h=u.length;if(h)for(let p=0;p<h;p++)Object.assign(e,u[p]);return e.message=mm.format(i,...n),e}transform(e){let r=e.message,i=e[gu]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(ym);if(!n&&(i||i.length)){let s=i.length>1?i.splice(0):i,a=s.length;if(a)for(let o=0;o<a;o++)Object.assign(e,s[o]);return e}return n?this._splat(e,n):e}};mu.exports=t=>new Gs(t)});var wu=w((Bi,bu)=>{(function(t,e){typeof Bi=="object"&&typeof bu<"u"?e(Bi):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(Bi,function(t){"use strict";var e=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",i="\\d\\d",n="\\d{3}",s="\\d{4}",a="[^\\s]+",o=/\[([^]*?)\]/gm;function l(E,M){for(var U=[],de=0,P=E.length;de<P;de++)U.push(E[de].substr(0,M));return U}var u=function(E){return function(M,U){var de=U[E].map(function(Ee){return Ee.toLowerCase()}),P=de.indexOf(M.toLowerCase());return P>-1?P:null}};function h(E){for(var M=[],U=1;U<arguments.length;U++)M[U-1]=arguments[U];for(var de=0,P=M;de<P.length;de++){var Ee=P[de];for(var rt in Ee)E[rt]=Ee[rt]}return E}var p=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"],f=l(c,3),y=l(p,3),b={dayNamesShort:y,dayNames:p,monthNamesShort:f,monthNames:c,amPm:["am","pm"],DoFn:function(E){return E+["th","st","nd","rd"][E%10>3?0:(E-E%10!==10?1:0)*E%10]}},S=h({},b),_=function(E){return S=h(S,E)},x=function(E){return E.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},R=function(E,M){for(M===void 0&&(M=2),E=String(E);E.length<M;)E="0"+E;return E},O={D:function(E){return String(E.getDate())},DD:function(E){return R(E.getDate())},Do:function(E,M){return M.DoFn(E.getDate())},d:function(E){return String(E.getDay())},dd:function(E){return R(E.getDay())},ddd:function(E,M){return M.dayNamesShort[E.getDay()]},dddd:function(E,M){return M.dayNames[E.getDay()]},M:function(E){return String(E.getMonth()+1)},MM:function(E){return R(E.getMonth()+1)},MMM:function(E,M){return M.monthNamesShort[E.getMonth()]},MMMM:function(E,M){return M.monthNames[E.getMonth()]},YY:function(E){return R(String(E.getFullYear()),4).substr(2)},YYYY:function(E){return R(E.getFullYear(),4)},h:function(E){return String(E.getHours()%12||12)},hh:function(E){return R(E.getHours()%12||12)},H:function(E){return String(E.getHours())},HH:function(E){return R(E.getHours())},m:function(E){return String(E.getMinutes())},mm:function(E){return R(E.getMinutes())},s:function(E){return String(E.getSeconds())},ss:function(E){return R(E.getSeconds())},S:function(E){return String(Math.round(E.getMilliseconds()/100))},SS:function(E){return R(Math.round(E.getMilliseconds()/10),2)},SSS:function(E){return R(E.getMilliseconds(),3)},a:function(E,M){return E.getHours()<12?M.amPm[0]:M.amPm[1]},A:function(E,M){return E.getHours()<12?M.amPm[0].toUpperCase():M.amPm[1].toUpperCase()},ZZ:function(E){var M=E.getTimezoneOffset();return(M>0?"-":"+")+R(Math.floor(Math.abs(M)/60)*100+Math.abs(M)%60,4)},Z:function(E){var M=E.getTimezoneOffset();return(M>0?"-":"+")+R(Math.floor(Math.abs(M)/60),2)+":"+R(Math.abs(M)%60,2)}},k=function(E){return+E-1},D=[null,r],F=[null,a],N=["isPm",a,function(E,M){var U=E.toLowerCase();return U===M.amPm[0]?0:U===M.amPm[1]?1:null}],B=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(E){var M=(E+"").match(/([+-]|\d\d)/gi);if(M){var U=+M[1]*60+parseInt(M[2],10);return M[0]==="+"?U:-U}return 0}],te={D:["day",r],DD:["day",i],Do:["day",r+a,function(E){return parseInt(E,10)}],M:["month",r,k],MM:["month",i,k],YY:["year",i,function(E){var M=new Date,U=+(""+M.getFullYear()).substr(0,2);return+(""+(+E>68?U-1:U)+E)}],h:["hour",r,void 0,"isPm"],hh:["hour",i,void 0,"isPm"],H:["hour",r],HH:["hour",i],m:["minute",r],mm:["minute",i],s:["second",r],ss:["second",i],YYYY:["year",s],S:["millisecond","\\d",function(E){return+E*100}],SS:["millisecond",i,function(E){return+E*10}],SSS:["millisecond",n],d:D,dd:D,ddd:F,dddd:F,MMM:["month",a,u("monthNamesShort")],MMMM:["month",a,u("monthNames")],a:N,A:N,ZZ:B,Z:B},J={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},ye=function(E){return h(J,E)},be=function(E,M,U){if(M===void 0&&(M=J.default),U===void 0&&(U={}),typeof E=="number"&&(E=new Date(E)),Object.prototype.toString.call(E)!=="[object Date]"||isNaN(E.getTime()))throw new Error("Invalid Date pass to format");M=J[M]||M;var de=[];M=M.replace(o,function(Ee,rt){return de.push(rt),"@@@"});var P=h(h({},S),U);return M=M.replace(e,function(Ee){return O[Ee](E,P)}),M.replace(/@@@/g,function(){return de.shift()})};function tt(E,M,U){if(U===void 0&&(U={}),typeof M!="string")throw new Error("Invalid format in fecha parse");if(M=J[M]||M,E.length>1e3)return null;var de=new Date,P={year:de.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Ee=[],rt=[],kt=M.replace(o,function(Dt,ct){return rt.push(x(ct)),"@@@"}),He={},Mr={};kt=x(kt).replace(e,function(Dt){var ct=te[Dt],Xt=ct[0],Ts=ct[1],Ai=ct[3];if(He[Xt])throw new Error("Invalid format. "+Xt+" specified twice in format");return He[Xt]=!0,Ai&&(Mr[Ai]=!0),Ee.push(ct),"("+Ts+")"}),Object.keys(Mr).forEach(function(Dt){if(!He[Dt])throw new Error("Invalid format. "+Dt+" is required in specified format")}),kt=kt.replace(/@@@/g,function(){return rt.shift()});var Qt=E.match(new RegExp(kt,"i"));if(!Qt)return null;for(var Es=h(h({},S),U),Te=1;Te<Qt.length;Te++){var Ar=Ee[Te-1],Rs=Ar[0],ft=Ar[2],Mi=ft?ft(Qt[Te],Es):+Qt[Te];if(Mi==null)return null;P[Rs]=Mi}P.isPm===1&&P.hour!=null&&+P.hour!=12?P.hour=+P.hour+12:P.isPm===0&&+P.hour==12&&(P.hour=0);var Pt;if(P.timezoneOffset==null){Pt=new Date(P.year,P.month,P.day,P.hour,P.minute,P.second,P.millisecond);for(var ht=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],Te=0,xs=ht.length;Te<xs;Te++)if(He[ht[Te][0]]&&P[ht[Te][0]]!==Pt[ht[Te][1]]())return null}else if(Pt=new Date(Date.UTC(P.year,P.month,P.day,P.hour,P.minute-P.timezoneOffset,P.second,P.millisecond)),P.month>11||P.month<0||P.day>31||P.day<1||P.hour>23||P.hour<0||P.minute>59||P.minute<0||P.second>59||P.second<0)return null;return Pt}var Ss={format:be,parse:tt,defaultI18n:b,setGlobalDateI18n:_,setGlobalDateMasks:ye};t.assign=h,t.default=Ss,t.format=be,t.parse=tt,t.defaultI18n=b,t.setGlobalDateI18n=_,t.setGlobalDateMasks=ye,Object.defineProperty(t,"__esModule",{value:!0})})});var _u=w((BE,vu)=>{"use strict";var wm=wu(),vm=Re();vu.exports=vm((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():wm.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Eu=w((UE,Su)=>{"use strict";var Ys=As(),_m=Re(),{MESSAGE:Vs}=re();Su.exports=_m((t,e)=>(e.level!==!1&&(t.level=Ys.strip(t.level)),e.message!==!1&&(t.message=Ys.strip(String(t.message))),e.raw!==!1&&t[Vs]&&(t[Vs]=Ys.strip(String(t[Vs]))),t))});var Js=w(Ks=>{"use strict";var Sm=Ks.format=Re();Ks.levels=Nl();function le(t,e){Object.defineProperty(Sm,t,{get(){return e()},configurable:!0})}le("align",function(){return Il()});le("errors",function(){return Bl()});le("cli",function(){return zl()});le("combine",function(){return Gl()});le("colorize",function(){return Ci()});le("json",function(){return Hs()});le("label",function(){return Xl()});le("logstash",function(){return tu()});le("metadata",function(){return iu()});le("ms",function(){return ou()});le("padLevels",function(){return Fs()});le("prettyPrint",function(){return fu()});le("printf",function(){return hu()});le("simple",function(){return pu()});le("splat",function(){return yu()});le("timestamp",function(){return _u()});le("uncolorize",function(){return Eu()})});var Zs=w(Ui=>{"use strict";var{format:Ru}=require("util");Ui.warn={deprecated(t){return()=>{throw new Error(Ru("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Ru("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
-
`))}},forFunctions(t,e,r){r.forEach(i=>{t[i]=Ui.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=Ui.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var xu=w((GE,Em)=>{Em.exports={name:"winston",description:"A logger for just about everything.",version:"3.13.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.4.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.7.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^5.0.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",mocha:"^10.3.0",nyc:"^15.1.0",rimraf:"^5.0.5",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var Qs=w((YE,Tu)=>{Tu.exports=require("util").deprecate});var Xs=w((VE,Ou)=>{Ou.exports=require("stream")});var ta=w((KE,Au)=>{"use strict";function Rm(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(ea,this,t)):process.nextTick(ea,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(zi,r):(r._writableState.errorEmitted=!0,process.nextTick(Mu,r,s)):process.nextTick(Mu,r,s):e?(process.nextTick(zi,r),e(s)):process.nextTick(zi,r)}),this)}function Mu(t,e){ea(t,e),zi(t)}function zi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function xm(){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 ea(t,e){t.emit("error",e)}function Tm(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Au.exports={destroy:Rm,undestroy:xm,errorOrDestroy:Tm}});var nr=w((JE,Du)=>{"use strict";var Pu={};function De(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,Pu[t]=n}function ku(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Om(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Mm(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Am(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}De("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);De("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Om(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Mm(t," argument"))n=`The ${t} ${i} ${ku(e,"type")}`;else{let s=Am(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${ku(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);De("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");De("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});De("ERR_STREAM_PREMATURE_CLOSE","Premature close");De("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});De("ERR_MULTIPLE_CALLBACK","Callback called multiple times");De("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");De("ERR_STREAM_WRITE_AFTER_END","write after end");De("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);De("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);De("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Du.exports.codes=Pu});var ra=w((ZE,qu)=>{"use strict";var km=nr().codes.ERR_INVALID_OPT_VALUE;function Pm(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Dm(t,e,r,i){var n=Pm(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new km(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}qu.exports={getHighWaterMark:Dm}});var Cu=w((QE,ia)=>{typeof Object.create=="function"?ia.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ia.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var it=w((XE,sa)=>{try{if(na=require("util"),typeof na.inherits!="function")throw"";sa.exports=na.inherits}catch{sa.exports=Cu()}var na});var $u=w((e2,Iu)=>{"use strict";function ju(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Lu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ju(Object(r),!0).forEach(function(i){qm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ju(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function qm(t,e,r){return e=Fu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Fu(i.key),i)}}function jm(t,e,r){return e&&Nu(t.prototype,e),r&&Nu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Fu(t){var e=Lm(t,"string");return typeof e=="symbol"?e:String(e)}function Lm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Nm=require("buffer"),Hi=Nm.Buffer,Fm=require("util"),aa=Fm.inspect,Im=aa&&aa.custom||"inspect";function $m(t,e,r){Hi.prototype.copy.call(t,e,r)}Iu.exports=function(){function t(){Cm(this,t),this.head=null,this.tail=null,this.length=0}return jm(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Hi.alloc(0);for(var i=Hi.allocUnsafe(r>>>0),n=this.head,s=0;n;)$m(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Hi.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:Im,value:function(r,i){return aa(this,Lu(Lu({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var la=w((oa,Bu)=>{var Gi=require("buffer"),Ge=Gi.Buffer;function Wu(t,e){for(var r in t)e[r]=t[r]}Ge.from&&Ge.alloc&&Ge.allocUnsafe&&Ge.allocUnsafeSlow?Bu.exports=Gi:(Wu(Gi,oa),oa.Buffer=Ft);function Ft(t,e,r){return Ge(t,e,r)}Ft.prototype=Object.create(Ge.prototype);Wu(Ge,Ft);Ft.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ge(t,e,r)};Ft.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ge(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Ft.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ge(t)};Ft.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Gi.SlowBuffer(t)}});var ha=w(zu=>{"use strict";var fa=la().Buffer,Uu=fa.isEncoding||function(t){switch(t=""+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 Wm(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}}function Bm(t){var e=Wm(t);if(typeof e!="string"&&(fa.isEncoding===Uu||!Uu(t)))throw new Error("Unknown encoding: "+t);return e||t}zu.StringDecoder=qr;function qr(t){this.encoding=Bm(t);var e;switch(this.encoding){case"utf16le":this.text=Vm,this.end=Km,e=4;break;case"utf8":this.fillLast=Hm,e=4;break;case"base64":this.text=Jm,this.end=Zm,e=3;break;default:this.write=Qm,this.end=Xm;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fa.allocUnsafe(e)}qr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)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||""};qr.prototype.end=Ym;qr.prototype.text=Gm;qr.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};function ua(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Um(t,e,r){var i=e.length-1;if(i<r)return 0;var n=ua(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=ua(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=ua(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function zm(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Hm(t){var e=this.lastTotal-this.lastNeed,r=zm(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Gm(t,e){var r=Um(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Ym(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Vm(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 Km(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 Jm(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?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 Zm(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Qm(t){return t.toString(this.encoding)}function Xm(t){return t&&t.length?this.write(t):""}});var Vu=w((r2,Yu)=>{"use strict";var Hu=nr().codes.ERR_STREAM_PREMATURE_CLOSE;function ey(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function ty(){}function ry(t){return t.setHeader&&typeof t.abort=="function"}function Gu(t,e,r){if(typeof e=="function")return Gu(t,null,e);e||(e={}),r=ey(r||ty);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},h=function(y){r.call(t,y)},p=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new Hu),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Hu),r.call(t,y)},c=function(){t.req.on("finish",o)};return ry(t)?(t.on("complete",o),t.on("abort",p),t.req?c():t.on("request",c)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",o),t.removeListener("abort",p),t.removeListener("request",c),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",h),t.removeListener("close",p)}}Yu.exports=Gu});var Ju=w((i2,Ku)=>{"use strict";var Yi;function pt(t,e,r){return e=iy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iy(t){var e=ny(t,"string");return typeof e=="symbol"?e:String(e)}function ny(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var sy=Vu(),gt=Symbol("lastResolve"),It=Symbol("lastReject"),Cr=Symbol("error"),Vi=Symbol("ended"),$t=Symbol("lastPromise"),ca=Symbol("handlePromise"),Wt=Symbol("stream");function mt(t,e){return{value:t,done:e}}function ay(t){var e=t[gt];if(e!==null){var r=t[Wt].read();r!==null&&(t[$t]=null,t[gt]=null,t[It]=null,e(mt(r,!1)))}}function oy(t){process.nextTick(ay,t)}function ly(t,e){return function(r,i){t.then(function(){if(e[Vi]){r(mt(void 0,!0));return}e[ca](r,i)},i)}}var uy=Object.getPrototypeOf(function(){}),fy=Object.setPrototypeOf((Yi={get stream(){return this[Wt]},next:function(){var e=this,r=this[Cr];if(r!==null)return Promise.reject(r);if(this[Vi])return Promise.resolve(mt(void 0,!0));if(this[Wt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Cr]?o(e[Cr]):a(mt(void 0,!0))})});var i=this[$t],n;if(i)n=new Promise(ly(i,this));else{var s=this[Wt].read();if(s!==null)return Promise.resolve(mt(s,!1));n=new Promise(this[ca])}return this[$t]=n,n}},pt(Yi,Symbol.asyncIterator,function(){return this}),pt(Yi,"return",function(){var e=this;return new Promise(function(r,i){e[Wt].destroy(null,function(n){if(n){i(n);return}r(mt(void 0,!0))})})}),Yi),uy),hy=function(e){var r,i=Object.create(fy,(r={},pt(r,Wt,{value:e,writable:!0}),pt(r,gt,{value:null,writable:!0}),pt(r,It,{value:null,writable:!0}),pt(r,Cr,{value:null,writable:!0}),pt(r,Vi,{value:e._readableState.endEmitted,writable:!0}),pt(r,ca,{value:function(s,a){var o=i[Wt].read();o?(i[$t]=null,i[gt]=null,i[It]=null,s(mt(o,!1))):(i[gt]=s,i[It]=a)},writable:!0}),r));return i[$t]=null,sy(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[It];s!==null&&(i[$t]=null,i[gt]=null,i[It]=null,s(n)),i[Cr]=n;return}var a=i[gt];a!==null&&(i[$t]=null,i[gt]=null,i[It]=null,a(mt(void 0,!0))),i[Vi]=!0}),e.on("readable",oy.bind(null,i)),i};Ku.exports=hy});var ef=w((n2,Xu)=>{"use strict";function Zu(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function cy(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Zu(s,i,n,a,o,"next",l)}function o(l){Zu(s,i,n,a,o,"throw",l)}a(void 0)})}}function Qu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function dy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qu(Object(r),!0).forEach(function(i){py(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function py(t,e,r){return e=gy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gy(t){var e=my(t,"string");return typeof e=="symbol"?e:String(e)}function my(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var yy=nr().codes.ERR_INVALID_ARG_TYPE;function by(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new yy("iterable",["Iterable"],e);var n=new t(dy({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=cy(function*(){try{var l=yield i.next(),u=l.value,h=l.done;h?n.push(null):n.push(yield u)?a():s=!1}catch(p){n.destroy(p)}}),o.apply(this,arguments)}return n}Xu.exports=by});var cf=w((a2,hf)=>{"use strict";hf.exports=$;var sr;$.ReadableState=sf;var s2=require("events").EventEmitter,nf=function(e,r){return e.listeners(r).length},Lr=Xs(),Ki=require("buffer").Buffer,wy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function vy(t){return Ki.from(t)}function _y(t){return Ki.isBuffer(t)||t instanceof wy}var da=require("util"),C;da&&da.debuglog?C=da.debuglog("stream"):C=function(){};var Sy=$u(),va=ta(),Ey=ra(),Ry=Ey.getHighWaterMark,Ji=nr().codes,xy=Ji.ERR_INVALID_ARG_TYPE,Ty=Ji.ERR_STREAM_PUSH_AFTER_EOF,Oy=Ji.ERR_METHOD_NOT_IMPLEMENTED,My=Ji.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ar,pa,ga;it()($,Lr);var jr=va.errorOrDestroy,ma=["error","close","destroy","pause","resume"];function Ay(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function sf(t,e,r){sr=sr||Nr(),t=t||{},typeof r!="boolean"&&(r=e instanceof sr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Ry(this,t,"readableHighWaterMark",r),this.buffer=new Sy,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.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(ar||(ar=ha().StringDecoder),this.decoder=new ar(t.encoding),this.encoding=t.encoding)}function $(t){if(sr=sr||Nr(),!(this instanceof $))return new $(t);var e=this instanceof sr;this._readableState=new sf(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Lr.call(this)}Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});$.prototype.destroy=va.destroy;$.prototype._undestroy=va.undestroy;$.prototype._destroy=function(t,e){e(t)};$.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ki.from(t,e),e=""),i=!0),af(this,t,e,!1,i)};$.prototype.unshift=function(t){return af(this,t,null,!0,!1)};function af(t,e,r,i,n){C("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Dy(t,s);else{var a;if(n||(a=ky(s,e)),a)jr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Ki.prototype&&(e=vy(e)),i)s.endEmitted?jr(t,new My):ya(t,s,e,!0);else if(s.ended)jr(t,new Ty);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?ya(t,s,e,!1):wa(t,s)):ya(t,s,e,!1)}else i||(s.reading=!1,wa(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function ya(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Zi(t)),wa(t,e)}function ky(t,e){var r;return!_y(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new xy("chunk",["string","Buffer","Uint8Array"],e)),r}$.prototype.isPaused=function(){return this._readableState.flowing===!1};$.prototype.setEncoding=function(t){ar||(ar=ha().StringDecoder);var e=new ar(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var tf=1073741824;function Py(t){return t>=tf?t=tf:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function rf(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Py(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}$.prototype.read=function(t){C("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return C("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ba(this):Zi(this),null;if(t=rf(t,e),t===0&&e.ended)return e.length===0&&ba(this),null;var i=e.needReadable;C("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,C("length less than watermark",i)),e.ended||e.reading?(i=!1,C("reading or ended",i)):i&&(C("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=rf(r,e)));var n;return t>0?n=uf(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ba(this)),n!==null&&this.emit("data",n),n};function Dy(t,e){if(C("onEofChunk"),!e.ended){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,e.sync?Zi(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,of(t)))}}function Zi(t){var e=t._readableState;C("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(C("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(of,t))}function of(t){var e=t._readableState;C("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,_a(t)}function wa(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(qy,t,e))}function qy(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(C("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}$.prototype._read=function(t){jr(this,new Oy("_read()"))};$.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,C("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(S,_){C("onunpipe"),S===r&&_&&_.hasUnpiped===!1&&(_.hasUnpiped=!0,h())}function o(){C("onend"),t.end()}var l=Cy(r);t.on("drain",l);var u=!1;function h(){C("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",c),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",p),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",p);function p(S){C("ondata");var _=t.write(S);C("dest.write",_),_===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&ff(i.pipes,t)!==-1)&&!u&&(C("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function c(S){C("onerror",S),b(),t.removeListener("error",c),nf(t,"error")===0&&jr(t,S)}Ay(t,"error",c);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){C("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){C("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(C("pipe resume"),r.resume()),t};function Cy(t){return function(){var r=t._readableState;C("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&nf(t,"data")&&(r.flowing=!0,_a(t))}}$.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(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 a=ff(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};$.prototype.on=function(t,e){var r=Lr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,C("on readable",i.length,i.reading),i.length?Zi(this):i.reading||process.nextTick(jy,this)),r};$.prototype.addListener=$.prototype.on;$.prototype.removeListener=function(t,e){var r=Lr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(lf,this),r};$.prototype.removeAllListeners=function(t){var e=Lr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(lf,this),e};function lf(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function jy(t){C("readable nexttick read 0"),t.read(0)}$.prototype.resume=function(){var t=this._readableState;return t.flowing||(C("resume"),t.flowing=!t.readableListening,Ly(this,t)),t.paused=!1,this};function Ly(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Ny,t,e))}function Ny(t,e){C("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),_a(t),e.flowing&&!e.reading&&t.read(0)}$.prototype.pause=function(){return C("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(C("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function _a(t){var e=t._readableState;for(C("flow",e.flowing);e.flowing&&t.read()!==null;);}$.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(C("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(C("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<ma.length;s++)t.on(ma[s],this.emit.bind(this,ma[s]));return this._read=function(a){C("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&($.prototype[Symbol.asyncIterator]=function(){return pa===void 0&&(pa=Ju()),pa(this)});Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty($.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty($.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});$._fromList=uf;Object.defineProperty($.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function uf(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ba(t){var e=t._readableState;C("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Fy,e,t))}function Fy(t,e){if(C("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&($.from=function(t,e){return ga===void 0&&(ga=ef()),ga($,t,e)});function ff(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Nr=w((o2,pf)=>{"use strict";var Iy=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};pf.exports=Ye;var df=cf(),Ea=Ra();it()(Ye,df);for(Sa=Iy(Ea.prototype),Qi=0;Qi<Sa.length;Qi++)Xi=Sa[Qi],Ye.prototype[Xi]||(Ye.prototype[Xi]=Ea.prototype[Xi]);var Sa,Xi,Qi;function Ye(t){if(!(this instanceof Ye))return new Ye(t);df.call(this,t),Ea.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",$y)))}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function $y(){this._writableState.ended||process.nextTick(Wy,this)}function Wy(t){t.end()}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Ra=w((l2,vf)=>{"use strict";vf.exports=Y;function mf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){p0(e,t)}}var or;Y.WritableState=Ir;var By={deprecate:Qs()},yf=Xs(),tn=require("buffer").Buffer,Uy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function zy(t){return tn.from(t)}function Hy(t){return tn.isBuffer(t)||t instanceof Uy}var Ta=ta(),Gy=ra(),Yy=Gy.getHighWaterMark,yt=nr().codes,Vy=yt.ERR_INVALID_ARG_TYPE,Ky=yt.ERR_METHOD_NOT_IMPLEMENTED,Jy=yt.ERR_MULTIPLE_CALLBACK,Zy=yt.ERR_STREAM_CANNOT_PIPE,Qy=yt.ERR_STREAM_DESTROYED,Xy=yt.ERR_STREAM_NULL_VALUES,e0=yt.ERR_STREAM_WRITE_AFTER_END,t0=yt.ERR_UNKNOWN_ENCODING,lr=Ta.errorOrDestroy;it()(Y,yf);function r0(){}function Ir(t,e,r){or=or||Nr(),t=t||{},typeof r!="boolean"&&(r=e instanceof or),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Yy(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){u0(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new mf(this)}Ir.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ir.prototype,"buffer",{get:By.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var en;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(en=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return en.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof Ir}})):en=function(e){return e instanceof this};function Y(t){or=or||Nr();var e=this instanceof or;if(!e&&!en.call(Y,this))return new Y(t);this._writableState=new Ir(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),yf.call(this)}Y.prototype.pipe=function(){lr(this,new Zy)};function i0(t,e){var r=new e0;lr(t,r),process.nextTick(e,r)}function n0(t,e,r,i){var n;return r===null?n=new Xy:typeof r!="string"&&!e.objectMode&&(n=new Vy("chunk",["string","Buffer"],r)),n?(lr(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Hy(t);return s&&!tn.isBuffer(t)&&(t=zy(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=r0),i.ending?i0(this,r):(s||n0(this,i,t,r))&&(i.pendingcb++,n=a0(this,i,s,t,e,r)),n};Y.prototype.cork=function(){this._writableState.corked++};Y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&bf(this,t))};Y.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new t0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function s0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=tn.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a0(t,e,r,i,n,s){if(!r){var a=s0(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else xa(t,e,!1,o,i,n,s);return l}function xa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Qy("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function o0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Fr,t,e),t._writableState.errorEmitted=!0,lr(t,i)):(n(i),t._writableState.errorEmitted=!0,lr(t,i),Fr(t,e))}function l0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function u0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Jy;if(l0(r),e)o0(t,r,i,e,n);else{var s=wf(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&bf(t,r),i?process.nextTick(gf,t,r,s,n):gf(t,r,s,n)}}function gf(t,e,r,i){r||f0(t,e),e.pendingcb--,i(),Fr(t,e)}function f0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function bf(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,xa(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new mf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,h=r.callback,p=e.objectMode?1:l.length;if(xa(t,e,!1,p,l,u,h),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Y.prototype._write=function(t,e,r){r(new Ky("_write()"))};Y.prototype._writev=null;Y.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||d0(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function wf(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function h0(t,e){t._final(function(r){e.pendingcb--,r&&lr(t,r),e.prefinished=!0,t.emit("prefinish"),Fr(t,e)})}function c0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(h0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Fr(t,e){var r=wf(e);if(r&&(c0(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function d0(t,e,r){e.ending=!0,Fr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function p0(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Y.prototype.destroy=Ta.destroy;Y.prototype._undestroy=Ta.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var Oa=w((u2,Ef)=>{"use strict";var g0=require("util"),_f=Ra(),{LEVEL:Sf}=re(),$r=Ef.exports=function(e={}){_f.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};g0.inherits($r,_f);$r.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);let n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[Sf]]){if(e&&!this.format)return this.log(e,i);let s,a;try{a=this.format.transform(Object.assign({},e),this.format.options)}catch(o){s=o}if(s||!a){if(i(),s)throw s;return}return this.log(a,i)}return this._writableState.sync=!1,i(null)};$r.prototype._writev=function(e,r){if(this.logv){let i=e.filter(this._accept,this);return i.length?this.logv(i,r):r(null)}for(let i=0;i<e.length;i++){if(!this._accept(e[i]))continue;if(e[i].chunk&&!this.format){this.log(e[i].chunk,e[i].callback);continue}let n,s;try{s=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(a){n=a}if(n||!s){if(e[i].callback(),n)throw r(null),n}else this.log(s,e[i].callback)}return r(null)};$r.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let i=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!i||this.levels[i]>=this.levels[r[Sf]])&&(this.handleExceptions||r.exception!==!0))};$r.prototype._nop=function(){}});var Aa=w((f2,xf)=>{"use strict";var m0=require("util"),{LEVEL:Ma}=re(),Rf=Oa(),Wr=xf.exports=function(e={}){if(Rf.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(i){this.emit("error",i,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};m0.inherits(Wr,Rf);Wr.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[Ma]])&&this.transport.log(e[Ma],e.message,e,this._nop),i(null)};Wr.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[Ma],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};Wr.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
27
|
-
`))};Wr.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var ur=w((h2,ka)=>{"use strict";ka.exports=Oa();ka.exports.LegacyTransportStream=Aa()});var Mf=w((d2,Of)=>{"use strict";var y0=require("os"),{LEVEL:Tf,MESSAGE:fr}=re(),b0=ur();Of.exports=class extends b0{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:y0.EOL,this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[Tf]]){console._stderr?console._stderr.write(`${e[fr]}${this.eol}`):console.error(e[fr]),r&&r();return}else if(this.consoleWarnLevels[e[Tf]]){console._stderr?console._stderr.write(`${e[fr]}${this.eol}`):console.warn(e[fr]),r&&r();return}console._stdout?console._stdout.write(`${e[fr]}${this.eol}`):console.log(e[fr]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}}});var nn=w((rn,Af)=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.default=w0;function w0(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}Af.exports=rn.default});var Pf=w((sn,kf)=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};kf.exports=sn.default});var Cf=w(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.fallback=Df;bt.wrap=qf;var v0=bt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,_0=bt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,S0=bt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function Df(t){setTimeout(t,0)}function qf(t){return(e,...r)=>t(()=>e(...r))}var Br;v0?Br=queueMicrotask:_0?Br=setImmediate:S0?Br=process.nextTick:Br=Df;bt.default=qf(Br)});var If=w((an,Ff)=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.default=M0;var E0=Pf(),R0=Nf(E0),x0=Cf(),T0=Nf(x0),O0=Bt();function Nf(t){return t&&t.__esModule?t:{default:t}}function M0(t){return(0,O0.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return jf(i,r)}:(0,R0.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return jf(i,r);r(null,i)})}function jf(t,e){return t.then(r=>{Lf(e,null,r)},r=>{Lf(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function Lf(t,e,r){try{t(e,r)}catch(i){(0,T0.default)(n=>{throw n},i)}}Ff.exports=an.default});var Bt=w(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.isAsyncIterable=nt.isAsyncGenerator=nt.isAsync=void 0;var A0=If(),k0=P0(A0);function P0(t){return t&&t.__esModule?t:{default:t}}function $f(t){return t[Symbol.toStringTag]==="AsyncFunction"}function D0(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function q0(t){return typeof t[Symbol.asyncIterator]=="function"}function C0(t){if(typeof t!="function")throw new Error("expected a function");return $f(t)?(0,k0.default)(t):t}nt.default=C0;nt.isAsync=$f;nt.isAsyncGenerator=D0;nt.isAsyncIterable=q0});var hr=w((on,Wf)=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.default=j0;function j0(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,s)=>{i[e-1]=(a,...o)=>{if(a)return s(a);n(o.length>1?o:o[0])},t.apply(this,i)})}return r}Wf.exports=on.default});var Uf=w((ln,Bf)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});var L0=nn(),N0=Pa(L0),F0=Bt(),I0=Pa(F0),$0=hr(),W0=Pa($0);function Pa(t){return t&&t.__esModule?t:{default:t}}ln.default=(0,W0.default)((t,e,r)=>{var i=(0,N0.default)(e)?[]:{};t(e,(n,s,a)=>{(0,I0.default)(n)((o,...l)=>{l.length<2&&([l]=l),i[s]=l,a(o)})},n=>r(n,i))},3);Bf.exports=ln.default});var Da=w((un,zf)=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.default=B0;function B0(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}zf.exports=un.default});var Gf=w((fn,Hf)=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Hf.exports=fn.default});var Kf=w((hn,Vf)=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.default=J0;var U0=nn(),z0=Yf(U0),H0=Gf(),G0=Yf(H0);function Yf(t){return t&&t.__esModule?t:{default:t}}function Y0(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function V0(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function K0(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return s==="__proto__"?n():r<i?{value:t[s],key:s}:null}}function J0(t){if((0,z0.default)(t))return Y0(t);var e=(0,G0.default)(t);return e?V0(e):K0(t)}Vf.exports=hn.default});var qa=w((cn,Jf)=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.default=Z0;function Z0(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Jf.exports=cn.default});var pn=w((dn,Zf)=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});var Q0={};dn.default=Q0;Zf.exports=dn.default});var Xf=w((gn,Qf)=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.default=rb;var X0=pn(),eb=tb(X0);function tb(t){return t&&t.__esModule?t:{default:t}}function rb(t,e,r,i){let n=!1,s=!1,a=!1,o=0,l=0;function u(){o>=e||a||n||(a=!0,t.next().then(({value:c,done:f})=>{if(!(s||n)){if(a=!1,f){n=!0,o<=0&&i(null);return}o++,r(c,l,h),l++,u()}}).catch(p))}function h(c,f){if(o-=1,!s){if(c)return p(c);if(c===!1){n=!0,s=!0;return}if(f===eb.default||n&&o<=0)return n=!0,i(null);u()}}function p(c){s||(a=!1,n=!0,i(c))}u()}Qf.exports=gn.default});var ih=w((mn,rh)=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});var ib=Da(),nb=Ur(ib),sb=Kf(),ab=Ur(sb),ob=qa(),lb=Ur(ob),eh=Bt(),ub=Xf(),th=Ur(ub),fb=pn(),hb=Ur(fb);function Ur(t){return t&&t.__esModule?t:{default:t}}mn.default=t=>(e,r,i)=>{if(i=(0,nb.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,eh.isAsyncGenerator)(e))return(0,th.default)(e,t,r,i);if((0,eh.isAsyncIterable)(e))return(0,th.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,ab.default)(e),s=!1,a=!1,o=0,l=!1;function u(p,c){if(!a)if(o-=1,p)s=!0,i(p);else if(p===!1)s=!0,a=!0;else{if(c===hb.default||s&&o<=0)return s=!0,i(null);l||h()}}function h(){for(l=!0;o<t&&!s;){var p=n();if(p===null){s=!0,o<=0&&i(null);return}o+=1,r(p.value,p.key,(0,lb.default)(u))}l=!1}h()};rh.exports=mn.default});var ja=w((yn,nh)=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});var cb=ih(),db=Ca(cb),pb=Bt(),gb=Ca(pb),mb=hr(),yb=Ca(mb);function Ca(t){return t&&t.__esModule?t:{default:t}}function bb(t,e,r,i){return(0,db.default)(e)(t,(0,gb.default)(r),i)}yn.default=(0,yb.default)(bb,4);nh.exports=yn.default});var oh=w((bn,ah)=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});var wb=ja(),vb=sh(wb),_b=hr(),Sb=sh(_b);function sh(t){return t&&t.__esModule?t:{default:t}}function Eb(t,e,r){return(0,vb.default)(t,1,e,r)}bn.default=(0,Sb.default)(Eb,3);ah.exports=bn.default});var fh=w((wn,uh)=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.default=Mb;var Rb=Uf(),xb=lh(Rb),Tb=oh(),Ob=lh(Tb);function lh(t){return t&&t.__esModule?t:{default:t}}function Mb(t,e){return(0,xb.default)(Ob.default,t,e)}uh.exports=wn.default});var La=w((m2,hh)=>{hh.exports=require("stream")});var yh=w((y2,mh)=>{"use strict";function ch(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function dh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ch(Object(r),!0).forEach(function(i){Ab(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Ab(t,e,r){return e=gh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,gh(i.key),i)}}function Pb(t,e,r){return e&&ph(t.prototype,e),r&&ph(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function gh(t){var e=Db(t,"string");return typeof e=="symbol"?e:String(e)}function Db(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qb=require("buffer"),vn=qb.Buffer,Cb=require("util"),Na=Cb.inspect,jb=Na&&Na.custom||"inspect";function Lb(t,e,r){vn.prototype.copy.call(t,e,r)}mh.exports=function(){function t(){kb(this,t),this.head=null,this.tail=null,this.length=0}return Pb(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return vn.alloc(0);for(var i=vn.allocUnsafe(r>>>0),n=this.head,s=0;n;)Lb(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=vn.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:jb,value:function(r,i){return Na(this,dh(dh({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var Ia=w((b2,wh)=>{"use strict";function Nb(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Fa,this,t)):process.nextTick(Fa,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(_n,r):(r._writableState.errorEmitted=!0,process.nextTick(bh,r,s)):process.nextTick(bh,r,s):e?(process.nextTick(_n,r),e(s)):process.nextTick(_n,r)}),this)}function bh(t,e){Fa(t,e),_n(t)}function _n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Fb(){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 Fa(t,e){t.emit("error",e)}function Ib(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}wh.exports={destroy:Nb,undestroy:Fb,errorOrDestroy:Ib}});var wt=w((w2,Sh)=>{"use strict";var _h={};function qe(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,_h[t]=n}function vh(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function $b(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Wb(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Bb(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}qe("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);qe("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&$b(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Wb(t," argument"))n=`The ${t} ${i} ${vh(e,"type")}`;else{let s=Bb(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${vh(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);qe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qe("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});qe("ERR_STREAM_PREMATURE_CLOSE","Premature close");qe("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});qe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qe("ERR_STREAM_WRITE_AFTER_END","write after end");qe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qe("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);qe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Sh.exports.codes=_h});var $a=w((v2,Eh)=>{"use strict";var Ub=wt().codes.ERR_INVALID_OPT_VALUE;function zb(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Hb(t,e,r,i){var n=zb(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Ub(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Eh.exports={getHighWaterMark:Hb}});var Ua=w((_2,Ah)=>{"use strict";Ah.exports=V;function xh(t){var e=this;this.next=null,this.entry=null,this.finish=function(){bw(e,t)}}var cr;V.WritableState=Hr;var Gb={deprecate:Qs()},Th=La(),En=require("buffer").Buffer,Yb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Vb(t){return En.from(t)}function Kb(t){return En.isBuffer(t)||t instanceof Yb}var Ba=Ia(),Jb=$a(),Zb=Jb.getHighWaterMark,vt=wt().codes,Qb=vt.ERR_INVALID_ARG_TYPE,Xb=vt.ERR_METHOD_NOT_IMPLEMENTED,ew=vt.ERR_MULTIPLE_CALLBACK,tw=vt.ERR_STREAM_CANNOT_PIPE,rw=vt.ERR_STREAM_DESTROYED,iw=vt.ERR_STREAM_NULL_VALUES,nw=vt.ERR_STREAM_WRITE_AFTER_END,sw=vt.ERR_UNKNOWN_ENCODING,dr=Ba.errorOrDestroy;it()(V,Th);function aw(){}function Hr(t,e,r){cr=cr||Ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof cr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Zb(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){dw(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new xh(this)}Hr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Hr.prototype,"buffer",{get:Gb.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Sn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Sn=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:function(e){return Sn.call(this,e)?!0:this!==V?!1:e&&e._writableState instanceof Hr}})):Sn=function(e){return e instanceof this};function V(t){cr=cr||Ut();var e=this instanceof cr;if(!e&&!Sn.call(V,this))return new V(t);this._writableState=new Hr(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Th.call(this)}V.prototype.pipe=function(){dr(this,new tw)};function ow(t,e){var r=new nw;dr(t,r),process.nextTick(e,r)}function lw(t,e,r,i){var n;return r===null?n=new iw:typeof r!="string"&&!e.objectMode&&(n=new Qb("chunk",["string","Buffer"],r)),n?(dr(t,n),process.nextTick(i,n),!1):!0}V.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Kb(t);return s&&!En.isBuffer(t)&&(t=Vb(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=aw),i.ending?ow(this,r):(s||lw(this,i,t,r))&&(i.pendingcb++,n=fw(this,i,s,t,e,r)),n};V.prototype.cork=function(){this._writableState.corked++};V.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Oh(this,t))};V.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new sw(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function uw(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=En.from(e,r)),e}Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function fw(t,e,r,i,n,s){if(!r){var a=uw(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Wa(t,e,!1,o,i,n,s);return l}function Wa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new rw("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function hw(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(zr,t,e),t._writableState.errorEmitted=!0,dr(t,i)):(n(i),t._writableState.errorEmitted=!0,dr(t,i),zr(t,e))}function cw(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function dw(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new ew;if(cw(r),e)hw(t,r,i,e,n);else{var s=Mh(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Oh(t,r),i?process.nextTick(Rh,t,r,s,n):Rh(t,r,s,n)}}function Rh(t,e,r,i){r||pw(t,e),e.pendingcb--,i(),zr(t,e)}function pw(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Oh(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,Wa(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new xh(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,h=r.callback,p=e.objectMode?1:l.length;if(Wa(t,e,!1,p,l,u,h),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}V.prototype._write=function(t,e,r){r(new Xb("_write()"))};V.prototype._writev=null;V.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||yw(this,i,r),this};Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Mh(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function gw(t,e){t._final(function(r){e.pendingcb--,r&&dr(t,r),e.prefinished=!0,t.emit("prefinish"),zr(t,e)})}function mw(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(gw,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function zr(t,e){var r=Mh(e);if(r&&(mw(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function yw(t,e,r){e.ending=!0,zr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function bw(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});V.prototype.destroy=Ba.destroy;V.prototype._undestroy=Ba.undestroy;V.prototype._destroy=function(t,e){e(t)}});var Ut=w((S2,Ph)=>{"use strict";var ww=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Ph.exports=Ve;var kh=Ga(),Ha=Ua();it()(Ve,kh);for(za=ww(Ha.prototype),Rn=0;Rn<za.length;Rn++)xn=za[Rn],Ve.prototype[xn]||(Ve.prototype[xn]=Ha.prototype[xn]);var za,xn,Rn;function Ve(t){if(!(this instanceof Ve))return new Ve(t);kh.call(this,t),Ha.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",vw)))}Object.defineProperty(Ve.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ve.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ve.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function vw(){this._writableState.ended||process.nextTick(_w,this)}function _w(t){t.end()}Object.defineProperty(Ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Ka=w(qh=>{"use strict";var Va=la().Buffer,Dh=Va.isEncoding||function(t){switch(t=""+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 Sw(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}}function Ew(t){var e=Sw(t);if(typeof e!="string"&&(Va.isEncoding===Dh||!Dh(t)))throw new Error("Unknown encoding: "+t);return e||t}qh.StringDecoder=Gr;function Gr(t){this.encoding=Ew(t);var e;switch(this.encoding){case"utf16le":this.text=Aw,this.end=kw,e=4;break;case"utf8":this.fillLast=Tw,e=4;break;case"base64":this.text=Pw,this.end=Dw,e=3;break;default:this.write=qw,this.end=Cw;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Va.allocUnsafe(e)}Gr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)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||""};Gr.prototype.end=Mw;Gr.prototype.text=Ow;Gr.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};function Ya(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Rw(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Ya(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Ya(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Ya(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function xw(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Tw(t){var e=this.lastTotal-this.lastNeed,r=xw(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Ow(t,e){var r=Rw(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Mw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Aw(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 kw(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 Pw(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?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 Dw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function qw(t){return t.toString(this.encoding)}function Cw(t){return t&&t.length?this.write(t):""}});var Tn=w((R2,Lh)=>{"use strict";var Ch=wt().codes.ERR_STREAM_PREMATURE_CLOSE;function jw(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function Lw(){}function Nw(t){return t.setHeader&&typeof t.abort=="function"}function jh(t,e,r){if(typeof e=="function")return jh(t,null,e);e||(e={}),r=jw(r||Lw);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},h=function(y){r.call(t,y)},p=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new Ch),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Ch),r.call(t,y)},c=function(){t.req.on("finish",o)};return Nw(t)?(t.on("complete",o),t.on("abort",p),t.req?c():t.on("request",c)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",o),t.removeListener("abort",p),t.removeListener("request",c),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",h),t.removeListener("close",p)}}Lh.exports=jh});var Fh=w((x2,Nh)=>{"use strict";var On;function _t(t,e,r){return e=Fw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fw(t){var e=Iw(t,"string");return typeof e=="symbol"?e:String(e)}function Iw(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var $w=Tn(),St=Symbol("lastResolve"),zt=Symbol("lastReject"),Yr=Symbol("error"),Mn=Symbol("ended"),Ht=Symbol("lastPromise"),Ja=Symbol("handlePromise"),Gt=Symbol("stream");function Et(t,e){return{value:t,done:e}}function Ww(t){var e=t[St];if(e!==null){var r=t[Gt].read();r!==null&&(t[Ht]=null,t[St]=null,t[zt]=null,e(Et(r,!1)))}}function Bw(t){process.nextTick(Ww,t)}function Uw(t,e){return function(r,i){t.then(function(){if(e[Mn]){r(Et(void 0,!0));return}e[Ja](r,i)},i)}}var zw=Object.getPrototypeOf(function(){}),Hw=Object.setPrototypeOf((On={get stream(){return this[Gt]},next:function(){var e=this,r=this[Yr];if(r!==null)return Promise.reject(r);if(this[Mn])return Promise.resolve(Et(void 0,!0));if(this[Gt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Yr]?o(e[Yr]):a(Et(void 0,!0))})});var i=this[Ht],n;if(i)n=new Promise(Uw(i,this));else{var s=this[Gt].read();if(s!==null)return Promise.resolve(Et(s,!1));n=new Promise(this[Ja])}return this[Ht]=n,n}},_t(On,Symbol.asyncIterator,function(){return this}),_t(On,"return",function(){var e=this;return new Promise(function(r,i){e[Gt].destroy(null,function(n){if(n){i(n);return}r(Et(void 0,!0))})})}),On),zw),Gw=function(e){var r,i=Object.create(Hw,(r={},_t(r,Gt,{value:e,writable:!0}),_t(r,St,{value:null,writable:!0}),_t(r,zt,{value:null,writable:!0}),_t(r,Yr,{value:null,writable:!0}),_t(r,Mn,{value:e._readableState.endEmitted,writable:!0}),_t(r,Ja,{value:function(s,a){var o=i[Gt].read();o?(i[Ht]=null,i[St]=null,i[zt]=null,s(Et(o,!1))):(i[St]=s,i[zt]=a)},writable:!0}),r));return i[Ht]=null,$w(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[zt];s!==null&&(i[Ht]=null,i[St]=null,i[zt]=null,s(n)),i[Yr]=n;return}var a=i[St];a!==null&&(i[Ht]=null,i[St]=null,i[zt]=null,a(Et(void 0,!0))),i[Mn]=!0}),e.on("readable",Bw.bind(null,i)),i};Nh.exports=Gw});var Bh=w((T2,Wh)=>{"use strict";function Ih(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function Yw(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Ih(s,i,n,a,o,"next",l)}function o(l){Ih(s,i,n,a,o,"throw",l)}a(void 0)})}}function $h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Vw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$h(Object(r),!0).forEach(function(i){Kw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$h(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Kw(t,e,r){return e=Jw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jw(t){var e=Zw(t,"string");return typeof e=="symbol"?e:String(e)}function Zw(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Qw=wt().codes.ERR_INVALID_ARG_TYPE;function Xw(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new Qw("iterable",["Iterable"],e);var n=new t(Vw({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Yw(function*(){try{var l=yield i.next(),u=l.value,h=l.done;h?n.push(null):n.push(yield u)?a():s=!1}catch(p){n.destroy(p)}}),o.apply(this,arguments)}return n}Wh.exports=Xw});var Ga=w((M2,Qh)=>{"use strict";Qh.exports=W;var pr;W.ReadableState=Gh;var O2=require("events").EventEmitter,Hh=function(e,r){return e.listeners(r).length},Kr=La(),An=require("buffer").Buffer,ev=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function tv(t){return An.from(t)}function rv(t){return An.isBuffer(t)||t instanceof ev}var Za=require("util"),j;Za&&Za.debuglog?j=Za.debuglog("stream"):j=function(){};var iv=yh(),no=Ia(),nv=$a(),sv=nv.getHighWaterMark,kn=wt().codes,av=kn.ERR_INVALID_ARG_TYPE,ov=kn.ERR_STREAM_PUSH_AFTER_EOF,lv=kn.ERR_METHOD_NOT_IMPLEMENTED,uv=kn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,gr,Qa,Xa;it()(W,Kr);var Vr=no.errorOrDestroy,eo=["error","close","destroy","pause","resume"];function fv(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Gh(t,e,r){pr=pr||Ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof pr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=sv(this,t,"readableHighWaterMark",r),this.buffer=new iv,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.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(gr||(gr=Ka().StringDecoder),this.decoder=new gr(t.encoding),this.encoding=t.encoding)}function W(t){if(pr=pr||Ut(),!(this instanceof W))return new W(t);var e=this instanceof pr;this._readableState=new Gh(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Kr.call(this)}Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});W.prototype.destroy=no.destroy;W.prototype._undestroy=no.undestroy;W.prototype._destroy=function(t,e){e(t)};W.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=An.from(t,e),e=""),i=!0),Yh(this,t,e,!1,i)};W.prototype.unshift=function(t){return Yh(this,t,null,!0,!1)};function Yh(t,e,r,i,n){j("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,dv(t,s);else{var a;if(n||(a=hv(s,e)),a)Vr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==An.prototype&&(e=tv(e)),i)s.endEmitted?Vr(t,new uv):to(t,s,e,!0);else if(s.ended)Vr(t,new ov);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?to(t,s,e,!1):io(t,s)):to(t,s,e,!1)}else i||(s.reading=!1,io(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function to(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Pn(t)),io(t,e)}function hv(t,e){var r;return!rv(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new av("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){gr||(gr=Ka().StringDecoder);var e=new gr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Uh=1073741824;function cv(t){return t>=Uh?t=Uh:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function zh(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=cv(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}W.prototype.read=function(t){j("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return j("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ro(this):Pn(this),null;if(t=zh(t,e),t===0&&e.ended)return e.length===0&&ro(this),null;var i=e.needReadable;j("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,j("length less than watermark",i)),e.ended||e.reading?(i=!1,j("reading or ended",i)):i&&(j("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=zh(r,e)));var n;return t>0?n=Jh(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ro(this)),n!==null&&this.emit("data",n),n};function dv(t,e){if(j("onEofChunk"),!e.ended){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,e.sync?Pn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Vh(t)))}}function Pn(t){var e=t._readableState;j("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(j("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Vh,t))}function Vh(t){var e=t._readableState;j("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,so(t)}function io(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(pv,t,e))}function pv(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(j("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}W.prototype._read=function(t){Vr(this,new lv("_read()"))};W.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,j("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(S,_){j("onunpipe"),S===r&&_&&_.hasUnpiped===!1&&(_.hasUnpiped=!0,h())}function o(){j("onend"),t.end()}var l=gv(r);t.on("drain",l);var u=!1;function h(){j("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",c),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",p),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",p);function p(S){j("ondata");var _=t.write(S);j("dest.write",_),_===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Zh(i.pipes,t)!==-1)&&!u&&(j("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function c(S){j("onerror",S),b(),t.removeListener("error",c),Hh(t,"error")===0&&Vr(t,S)}fv(t,"error",c);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){j("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){j("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(j("pipe resume"),r.resume()),t};function gv(t){return function(){var r=t._readableState;j("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Hh(t,"data")&&(r.flowing=!0,so(t))}}W.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(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 a=Zh(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};W.prototype.on=function(t,e){var r=Kr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,j("on readable",i.length,i.reading),i.length?Pn(this):i.reading||process.nextTick(mv,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=Kr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Kh,this),r};W.prototype.removeAllListeners=function(t){var e=Kr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Kh,this),e};function Kh(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function mv(t){j("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){var t=this._readableState;return t.flowing||(j("resume"),t.flowing=!t.readableListening,yv(this,t)),t.paused=!1,this};function yv(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(bv,t,e))}function bv(t,e){j("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),so(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return j("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(j("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function so(t){var e=t._readableState;for(j("flow",e.flowing);e.flowing&&t.read()!==null;);}W.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(j("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(j("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<eo.length;s++)t.on(eo[s],this.emit.bind(this,eo[s]));return this._read=function(a){j("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(W.prototype[Symbol.asyncIterator]=function(){return Qa===void 0&&(Qa=Fh()),Qa(this)});Object.defineProperty(W.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(W.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(W.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});W._fromList=Jh;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Jh(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ro(t){var e=t._readableState;j("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(wv,e,t))}function wv(t,e){if(j("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(W.from=function(t,e){return Xa===void 0&&(Xa=Bh()),Xa(W,t,e)});function Zh(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ao=w((A2,ec)=>{"use strict";ec.exports=st;var Dn=wt().codes,vv=Dn.ERR_METHOD_NOT_IMPLEMENTED,_v=Dn.ERR_MULTIPLE_CALLBACK,Sv=Dn.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ev=Dn.ERR_TRANSFORM_WITH_LENGTH_0,qn=Ut();it()(st,qn);function Rv(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new _v);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function st(t){if(!(this instanceof st))return new st(t);qn.call(this,t),this._transformState={afterTransform:Rv.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",xv)}function xv(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Xh(t,e,r)}):Xh(this,null,null)}st.prototype.push=function(t,e){return this._transformState.needTransform=!1,qn.prototype.push.call(this,t,e)};st.prototype._transform=function(t,e,r){r(new vv("_transform()"))};st.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)}};st.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};st.prototype._destroy=function(t,e){qn.prototype._destroy.call(this,t,function(r){e(r)})};function Xh(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Ev;if(t._transformState.transforming)throw new Sv;return t.push(null)}});var ic=w((k2,rc)=>{"use strict";rc.exports=Jr;var tc=ao();it()(Jr,tc);function Jr(t){if(!(this instanceof Jr))return new Jr(t);tc.call(this,t)}Jr.prototype._transform=function(t,e,r){r(null,t)}});var lc=w((P2,oc)=>{"use strict";var oo;function Tv(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var ac=wt().codes,Ov=ac.ERR_MISSING_ARGS,Mv=ac.ERR_STREAM_DESTROYED;function nc(t){if(t)throw t}function Av(t){return t.setHeader&&typeof t.abort=="function"}function kv(t,e,r,i){i=Tv(i);var n=!1;t.on("close",function(){n=!0}),oo===void 0&&(oo=Tn()),oo(t,{readable:e,writable:r},function(a){if(a)return i(a);n=!0,i()});var s=!1;return function(a){if(!n&&!s){if(s=!0,Av(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new Mv("pipe"))}}}function sc(t){t()}function Pv(t,e){return t.pipe(e)}function Dv(t){return!t.length||typeof t[t.length-1]!="function"?nc:t.pop()}function qv(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=Dv(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Ov("streams");var n,s=e.map(function(a,o){var l=o<e.length-1,u=o>0;return kv(a,l,u,function(h){n||(n=h),h&&s.forEach(sc),!l&&(s.forEach(sc),i(n))})});return e.reduce(Pv)}oc.exports=qv});var Yt=w((Ce,Qr)=>{var Zr=require("stream");process.env.READABLE_STREAM==="disable"&&Zr?(Qr.exports=Zr.Readable,Object.assign(Qr.exports,Zr),Qr.exports.Stream=Zr):(Ce=Qr.exports=Ga(),Ce.Stream=Zr||Ce,Ce.Readable=Ce,Ce.Writable=Ua(),Ce.Duplex=Ut(),Ce.Transform=ao(),Ce.PassThrough=ic(),Ce.finished=Tn(),Ce.pipeline=lc())});var go=w((D2,fc)=>{var mr=[],Xr=[],lo=function(){};function fo(t){return~mr.indexOf(t)?!1:(mr.push(t),!0)}function ho(t){lo=t}function Cv(t){for(var e=[],r=0;r<mr.length;r++){if(mr[r].async){e.push(mr[r]);continue}if(mr[r](t))return!0}return e.length?new Promise(function(n){Promise.all(e.map(function(a){return a(t)})).then(function(a){n(a.some(Boolean))})}):!1}function co(t){return~Xr.indexOf(t)?!1:(Xr.push(t),!0)}function uo(){lo.apply(lo,arguments)}function uc(t){for(var e=0;e<Xr.length;e++)t=Xr[e].apply(Xr[e],arguments);return t}function po(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function jv(t){return t.enabled=!1,t.modify=co,t.set=ho,t.use=fo,po(function(){return!1},t)}function Lv(t){function e(){var r=Array.prototype.slice.call(arguments,0);return uo.call(uo,t,uc(r,t)),!0}return t.enabled=!0,t.modify=co,t.set=ho,t.use=fo,po(e,t)}fc.exports=function(e){return e.introduce=po,e.enabled=Cv,e.process=uc,e.modify=co,e.write=uo,e.nope=jv,e.yep=Lv,e.set=ho,e.use=fo,e}});var cc=w((q2,hc)=>{var Nv=go(),Fv=Nv(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});hc.exports=Fv});var pc=w((C2,dc)=>{"use strict";dc.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var mc=w((j2,gc)=>{gc.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var wc=w((L2,bc)=>{"use strict";var Iv=mc(),$v=Array.prototype.concat,Wv=Array.prototype.slice,yc=bc.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];Iv(s)?r=$v.call(r,Wv.call(s)):r.push(s)}return r};yc.wrap=function(t){return function(){return t(yc(arguments))}}});var Ec=w((N2,Sc)=>{var ei=pc(),ti=wc(),vc=Object.hasOwnProperty,_c=Object.create(null);for(Cn in ei)vc.call(ei,Cn)&&(_c[ei[Cn]]=Cn);var Cn,Oe=Sc.exports={to:{},get:{}};Oe.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Oe.get.hsl(t),i="hsl";break;case"hwb":r=Oe.get.hwb(t),i="hwb";break;default:r=Oe.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Oe.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],o,l,u;if(o=t.match(r)){for(u=o[2],o=o[1],l=0;l<3;l++){var h=l*2;a[l]=parseInt(o.slice(h,h+2),16)}u&&(a[3]=parseInt(u,16)/255)}else if(o=t.match(e)){for(o=o[1],u=o[3],l=0;l<3;l++)a[l]=parseInt(o[l]+o[l],16);u&&(a[3]=parseInt(u+u,16)/255)}else if(o=t.match(i)){for(l=0;l<3;l++)a[l]=parseInt(o[l+1],0);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else if(o=t.match(n)){for(l=0;l<3;l++)a[l]=Math.round(parseFloat(o[l+1])*2.55);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else return(o=t.match(s))?o[1]==="transparent"?[0,0,0,0]:vc.call(ei,o[1])?(a=ei[o[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=Rt(a[l],0,255);return a[3]=Rt(a[3],0,1),a};Oe.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Rt(parseFloat(r[2]),0,100),a=Rt(parseFloat(r[3]),0,100),o=Rt(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Oe.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Rt(parseFloat(r[2]),0,100),a=Rt(parseFloat(r[3]),0,100),o=Rt(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Oe.to.hex=function(){var t=ti(arguments);return"#"+jn(t[0])+jn(t[1])+jn(t[2])+(t[3]<1?jn(Math.round(t[3]*255)):"")};Oe.to.rgb=function(){var t=ti(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};Oe.to.rgb.percent=function(){var t=ti(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};Oe.to.hsl=function(){var t=ti(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Oe.to.hwb=function(){var t=ti(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Oe.to.keyword=function(t){return _c[t.slice(0,3)]};function Rt(t,e,r){return Math.min(Math.max(e,t),r)}function jn(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var xc=w((F2,Rc)=>{"use strict";Rc.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var mo=w((I2,Ac)=>{var Vt=xc(),Mc={};for(Ln in Vt)Vt.hasOwnProperty(Ln)&&(Mc[Vt[Ln]]=Ln);var Ln,A=Ac.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(ve in A)if(A.hasOwnProperty(ve)){if(!("channels"in A[ve]))throw new Error("missing channels property: "+ve);if(!("labels"in A[ve]))throw new Error("missing channel labels property: "+ve);if(A[ve].labels.length!==A[ve].channels)throw new Error("channel and label counts mismatch: "+ve);Tc=A[ve].channels,Oc=A[ve].labels,delete A[ve].channels,delete A[ve].labels,Object.defineProperty(A[ve],"channels",{value:Tc}),Object.defineProperty(A[ve],"labels",{value:Oc})}var Tc,Oc,ve;A.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=s-n,o,l,u;return s===n?o=0:e===s?o=(r-i)/a:r===s?o=2+(i-e)/a:i===s&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),u=(n+s)/2,s===n?l=0:u<=.5?l=a/(s+n):l=a/(2-s-n),[o,l*100,u*100]};A.rgb.hsv=function(t){var e,r,i,n,s,a=t[0]/255,o=t[1]/255,l=t[2]/255,u=Math.max(a,o,l),h=u-Math.min(a,o,l),p=function(c){return(u-c)/6/h+1/2};return h===0?n=s=0:(s=h/u,e=p(a),r=p(o),i=p(l),a===u?n=i-r:o===u?n=1/3+e-i:l===u&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,u*100]};A.rgb.hwb=function(t){var e=t[0],r=t[1],i=t[2],n=A.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};A.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n,s,a,o;return o=Math.min(1-e,1-r,1-i),n=(1-e-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-i-o)/(1-o)||0,[n*100,s*100,a*100,o*100]};function Bv(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}A.rgb.keyword=function(t){var e=Mc[t];if(e)return e;var r=1/0,i;for(var n in Vt)if(Vt.hasOwnProperty(n)){var s=Vt[n],a=Bv(t,s);a<r&&(r=a,i=n)}return i};A.keyword.rgb=function(t){return Vt[t]};A.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var n=e*.4124+r*.3576+i*.1805,s=e*.2126+r*.7152+i*.0722,a=e*.0193+r*.1192+i*.9505;return[n*100,s*100,a*100]};A.rgb.lab=function(t){var e=A.rgb.xyz(t),r=e[0],i=e[1],n=e[2],s,a,o;return r/=95.047,i/=100,n/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,s=116*i-16,a=500*(r-i),o=200*(i-n),[s,a,o]};A.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s,a,o,l;if(r===0)return l=i*255,[l,l,l];i<.5?s=i*(1+r):s=i+r-i*r,n=2*i-s,o=[0,0,0];for(var u=0;u<3;u++)a=e+1/3*-(u-1),a<0&&a++,a>1&&a--,6*a<1?l=n+(s-n)*6*a:2*a<1?l=s:3*a<2?l=n+(s-n)*(2/3-a)*6:l=n,o[u]=l*255;return o};A.hsl.hsv=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01),a,o;return i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s,o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r),[e,a*100,o*100]};A.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),a=255*i*(1-r),o=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,a];case 1:return[o,i,a];case 2:return[a,i,l];case 3:return[a,o,i];case 4:return[l,a,i];case 5:return[i,a,o]}};A.hsv.hsl=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,a,o;return o=(2-r)*i,s=(2-r)*n,a=r*n,a/=s<=1?s:2-s,a=a||0,o/=2,[e,a*100,o*100]};A.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s,a,o,l;n>1&&(r/=n,i/=n),s=Math.floor(6*e),a=1-i,o=6*e-s,s&1&&(o=1-o),l=r+o*(a-r);var u,h,p;switch(s){default:case 6:case 0:u=a,h=l,p=r;break;case 1:u=l,h=a,p=r;break;case 2:u=r,h=a,p=l;break;case 3:u=r,h=l,p=a;break;case 4:u=l,h=r,p=a;break;case 5:u=a,h=r,p=l;break}return[u*255,h*255,p*255]};A.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s,a,o;return s=1-Math.min(1,e*(1-n)+n),a=1-Math.min(1,r*(1-n)+n),o=1-Math.min(1,i*(1-n)+n),[s*255,a*255,o*255]};A.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,a;return n=e*3.2406+r*-1.5372+i*-.4986,s=e*-.9689+r*1.8758+i*.0415,a=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[n*255,s*255,a*255]};A.xyz.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return e/=95.047,r/=100,i/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=116*r-16,s=500*(e-r),a=200*(r-i),[n,s,a]};A.lab.xyz=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;s=(e+16)/116,n=r/500+s,a=s-i/200;var o=Math.pow(s,3),l=Math.pow(n,3),u=Math.pow(a,3);return s=o>.008856?o:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,a=u>.008856?u:(a-16/116)/7.787,n*=95.047,s*=100,a*=108.883,[n,s,a]};A.lab.lch=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return n=Math.atan2(i,r),s=n*360/2/Math.PI,s<0&&(s+=360),a=Math.sqrt(r*r+i*i),[e,a,s]};A.lch.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return a=i/360*2*Math.PI,n=r*Math.cos(a),s=r*Math.sin(a),[e,n,s]};A.rgb.ansi16=function(t){var e=t[0],r=t[1],i=t[2],n=1 in arguments?arguments[1]:A.rgb.hsv(t)[2];if(n=Math.round(n/50),n===0)return 30;var s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return n===2&&(s+=60),s};A.hsv.ansi16=function(t){return A.rgb.ansi16(A.hsv.rgb(t),t[2])};A.rgb.ansi256=function(t){var e=t[0],r=t[1],i=t[2];if(e===r&&r===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var n=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5);return n};A.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};A.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,i=Math.floor(t/36)/5*255,n=Math.floor((r=t%36)/6)/5*255,s=r%6/5*255;return[i,n,s]};A.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};A.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var i=parseInt(r,16),n=i>>16&255,s=i>>8&255,a=i&255;return[n,s,a]};A.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),a=n-s,o,l;return a<1?o=s/(1-a):o=0,a<=0?l=0:n===e?l=(r-i)/a%6:n===r?l=2+(i-e)/a:l=4+(e-r)/a+4,l/=6,l%=1,[l*360,a*100,o*100]};A.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1,n=0;return r<.5?i=2*e*r:i=2*e*(1-r),i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};A.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};A.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];var n=[0,0,0],s=e%1*6,a=s%1,o=1-a,l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};A.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};A.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,i=r*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};A.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};A.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1-r,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};A.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};A.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};A.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};A.gray.hsl=A.gray.hsv=function(t){return[0,0,t[0]]};A.gray.hwb=function(t){return[0,100,t[0]]};A.gray.cmyk=function(t){return[0,0,0,t[0]]};A.gray.lab=function(t){return[t[0],0,0]};A.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,i=r.toString(16).toUpperCase();return"000000".substring(i.length)+i};A.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var Pc=w(($2,kc)=>{var Nn=mo();function Uv(){for(var t={},e=Object.keys(Nn),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function zv(t){var e=Uv(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys(Nn[i]),s=n.length,a=0;a<s;a++){var o=n[a],l=e[o];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,r.unshift(o))}return e}function Hv(t,e){return function(r){return e(t(r))}}function Gv(t,e){for(var r=[e[t].parent,t],i=Nn[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=Hv(Nn[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}kc.exports=function(t){for(var e=zv(t),r={},i=Object.keys(e),n=i.length,s=0;s<n;s++){var a=i[s],o=e[a];o.parent!==null&&(r[a]=Gv(a,e))}return r}});var qc=w((W2,Dc)=>{var yo=mo(),Yv=Pc(),yr={},Vv=Object.keys(yo);function Kv(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Jv(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var i=t(r);if(typeof i=="object")for(var n=i.length,s=0;s<n;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}Vv.forEach(function(t){yr[t]={},Object.defineProperty(yr[t],"channels",{value:yo[t].channels}),Object.defineProperty(yr[t],"labels",{value:yo[t].labels});var e=Yv(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];yr[t][i]=Jv(n),yr[t][i].raw=Kv(n)})});Dc.exports=yr});var Lc=w((B2,jc)=>{"use strict";var ri=Ec(),Me=qc(),vo=[].slice,Cc=["keyword","gray","hex"],bo={};Object.keys(Me).forEach(function(t){bo[vo.call(Me[t].labels).sort().join("")]=t});var Fn={};function ue(t,e){if(!(this instanceof ue))return new ue(t,e);if(e&&e in Cc&&(e=null),e&&!(e in Me))throw new Error("Unknown model: "+e);var r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof ue)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=ri.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Me[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(t.length){this.model=e||"rgb",i=Me[this.model].channels;var s=vo.call(t,0,i);this.color=wo(s,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;var a=Object.keys(t);"alpha"in t&&(a.splice(a.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);var o=a.sort().join("");if(!(o in bo))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=bo[o];var l=Me[this.model].labels,u=[];for(r=0;r<l.length;r++)u.push(t[l[r]]);this.color=wo(u)}if(Fn[this.model])for(i=Me[this.model].channels,r=0;r<i;r++){var h=Fn[this.model][r];h&&(this.color[r]=h(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ue.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in ri.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);var r=e.valpha===1?e.color:e.color.concat(this.valpha);return ri.to[e.model](r)},percentString:function(t){var e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:e.color.concat(this.valpha);return ri.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Me[this.model].channels,r=Me[this.model].labels,i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new ue(this.color.map(Qv(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new ue(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:K("rgb",0,ie(255)),green:K("rgb",1,ie(255)),blue:K("rgb",2,ie(255)),hue:K(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:K("hsl",1,ie(100)),lightness:K("hsl",2,ie(100)),saturationv:K("hsv",1,ie(100)),value:K("hsv",2,ie(100)),chroma:K("hcg",1,ie(100)),gray:K("hcg",2,ie(100)),white:K("hwb",1,ie(100)),wblack:K("hwb",2,ie(100)),cyan:K("cmyk",0,ie(100)),magenta:K("cmyk",1,ie(100)),yellow:K("cmyk",2,ie(100)),black:K("cmyk",3,ie(100)),x:K("xyz",0,ie(100)),y:K("xyz",1,ie(100)),z:K("xyz",2,ie(100)),l:K("lab",0,ie(100)),a:K("lab",1),b:K("lab",2),keyword:function(t){return arguments.length?new ue(t):Me[this.model].keyword(this.color)},hex:function(t){return arguments.length?new ue(t):ri.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity:function(){for(var t=this.rgb().color,e=[],r=0;r<t.length;r++){var i=t[r]/255;e[r]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return ue.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,a=r.alpha()-i.alpha(),o=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,l=1-o;return ue.rgb(o*r.red()+l*i.red(),o*r.green()+l*i.green(),o*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};Object.keys(Me).forEach(function(t){if(Cc.indexOf(t)===-1){var e=Me[t].channels;ue.prototype[t]=function(){if(this.model===t)return new ue(this);if(arguments.length)return new ue(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new ue(Xv(Me[this.model][t].raw(this.color)).concat(r),t)},ue[t]=function(r){return typeof r=="number"&&(r=wo(vo.call(arguments),e)),new ue(r,t)}}});function Zv(t,e){return Number(t.toFixed(e))}function Qv(t){return function(e){return Zv(e,t)}}function K(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(Fn[i]||(Fn[i]=[]))[e]=r}),t=t[0],function(i){var n;return arguments.length?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function ie(t){return function(e){return Math.max(0,Math.min(t,e))}}function Xv(t){return Array.isArray(t)?t:[t]}function wo(t,e){for(var r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}jc.exports=ue});var Fc=w((U2,Nc)=>{"use strict";Nc.exports=function(e){for(var r=0,i=0;r<e.length;i=e.charCodeAt(r++)+((i<<5)-i));var n=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-n.length+1).join("0")+n}});var Bc=w((z2,Wc)=>{"use strict";var Ic=Lc(),$c=Fc();Wc.exports=function(e,r){var i=e.split(r||":"),n=$c(i[0]);if(!i.length)return n;for(var s=0,a=i.length-1;s<a;s++)n=Ic(n).mix(Ic($c(i[s+1]))).saturate(1).hex();return n}});var zc=w((H2,Uc)=>{"use strict";function Ie(t,e){if(e)return new Ie(t).style(e);if(!(this instanceof Ie))return new Ie(t);this.text=t}Ie.prototype.prefix="\x1B[";Ie.prototype.suffix="m";Ie.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),i=e.substring(2,4),n=e.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(n,16)]};Ie.prototype.rgb=function(e,r,i){var n=e/255*5,s=r/255*5,a=i/255*5;return this.ansi(n,s,a)};Ie.prototype.ansi=function(e,r,i){var n=Math.round(e),s=Math.round(r),a=Math.round(i);return 16+n*36+s*6+a};Ie.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Ie.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Uc.exports=Ie});var Gc=w((G2,Hc)=>{var e1=Bc(),t1=zc();Hc.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?t1(i+":",e1(i)):i+":";return e[0]=n+" "+e[0],e}});var Vc=w((Y2,Yc)=>{"use strict";Yc.exports=function(e,r){if(!r)return!1;for(var i=r.split(/[\s,]+/),n=0;n<i.length;n++){if(r=i[n].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var Jc=w((V2,Kc)=>{var r1=Vc();Kc.exports=function(e){return function(i){try{return r1(i,e())}catch{}return!1}}});var Qc=w((K2,Zc)=>{var i1=Jc();Zc.exports=i1(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var ed=w((J2,Xc)=>{Xc.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var rd=w((Z2,td)=>{var n1=go(),s1=require("tty").isatty(1),In=n1(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:s1,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});In.modify(Gc());In.use(Qc());In.set(ed());td.exports=In});var ii=w((Q2,_o)=>{process.env.NODE_ENV==="production"?_o.exports=cc():_o.exports=rd()});var nd=w((X2,id)=>{"use strict";var So=require("fs"),{StringDecoder:a1}=require("string_decoder"),{Stream:o1}=Yt();function l1(){}id.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new a1("utf8"),n=new o1,s="",a=0,o=0;return t.start===-1&&delete t.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close")},So.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function h(){if(n.destroyed){So.close(u,l1);return}return So.read(u,r,0,r.length,a,(p,c)=>{if(p){e?e(p):n.emit("error",p),n.destroy();return}if(!c)return s&&((t.start==null||o>t.start)&&(e?e(null,s):n.emit("line",s)),o++,s=""),setTimeout(h,1e3);let f=i.write(r.slice(0,c));e||n.emit("data",f),f=(s+f).split(/\n+/);let y=f.length-1,b=0;for(;b<y;b++)(t.start==null||o>t.start)&&(e?e(null,f[b]):n.emit("line",f[b])),o++;return s=f[y],a+=c,h()})})()}),e?n.destroy:n}});var ld=w((tR,od)=>{"use strict";var xe=require("fs"),ne=require("path"),sd=fh(),u1=require("zlib"),{MESSAGE:f1}=re(),{Stream:h1,PassThrough:ad}=Yt(),c1=ur(),$e=ii()("winston:file"),d1=require("os"),p1=nd();od.exports=class extends c1{constructor(e={}){super(e),this.name=e.name||"file";function r(i,...n){n.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${i} together`)})}if(this._stream=new ad,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?ne.basename(e.filename):"winston.log",this.dirname=e.dirname||ne.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=ne.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:d1.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let i=`${e[f1]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,$e("logged %s %s",this._size,i),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let a=this._stream.write(i,s.bind(this));return a?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),$e("written",a,this._drain),this.finishIfEnding(),a}query(e,r){typeof e=="function"&&(r=e,e={}),e=p(e);let i=ne.join(this.dirname,this.filename),n="",s=[],a=0,o=xe.createReadStream(i,{encoding:"utf8"});o.on("error",c=>{if(o.readable&&o.destroy(),!!r)return c.code!=="ENOENT"?r(c):r(null,s)}),o.on("data",c=>{c=(n+c).split(/\n+/);let f=c.length-1,y=0;for(;y<f;y++)(!e.start||a>=e.start)&&l(c[y]),a++;n=c[f]}),o.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(c,f){try{let y=JSON.parse(c);h(y)&&u(y)}catch(y){f||o.emit("error",y)}}function u(c){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){o.readable&&o.destroy();return}e.fields&&(c=e.fields.reduce((f,y)=>(f[y]=c[y],f),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(c)}function h(c){if(!c||typeof c!="object")return;let f=new Date(c.timestamp);if(!(e.from&&f<e.from||e.until&&f>e.until||e.level&&e.level!==c.level))return!0}function p(c){return c=c||{},c.rows=c.rows||c.limit||10,c.start=c.start||0,c.until=c.until||new Date,typeof c.until!="object"&&(c.until=new Date(c.until)),c.from=c.from||c.until-24*60*60*1e3,typeof c.from!="object"&&(c.from=new Date(c.from)),c.order=c.order||"desc",c}}stream(e={}){let r=ne.join(this.dirname,this.filename),i=new h1,n={file:r,start:e.start};return i.destroy=p1(n,(s,a)=>{if(s)return i.emit("error",s);try{i.emit("data",a),a=JSON.parse(a),i.emit("log",a)}catch(o){i.emit("error",o)}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);$e("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.eventNames().includes("rotate")?this._stream.emit("rotate"):this._rotate=!1})})))}stat(e){let r=this._getFile(),i=ne.join(this.dirname,r);xe.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return $e("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return $e(`err ${n.code} ${i}`),e(n);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,s.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=ne.join(this.dirname,this.filename);$e("create stream start",r,this.options);let i=xe.createWriteStream(r,this.options).on("error",n=>$e(n)).on("close",()=>$e("close",i.path,i.bytesWritten)).on("open",()=>{$e("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new ad,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return $e("create stream ok",r),i}_incFile(e){$e("_incFile",this.filename);let r=ne.extname(this._basename),i=ne.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let a=this._created>0&&!this.tailable?this._created:"";this._compressFile(ne.join(this.dirname,`${i}${a}${r}`),ne.join(this.dirname,`${i}${a}${r}.gz`),s)}.bind(this)),n.push(function(s){this.tailable?this._checkMaxFilesTailable(r,i,s):(this._created+=1,this._checkMaxFilesIncrementing(r,i,s))}.bind(this)),sd(n,e)}_getFile(){let e=ne.extname(this._basename),r=ne.basename(this._basename,e),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let n=this._created-this.maxFiles,s=n!==0?n:"",a=this.zippedArchive?".gz":"",o=`${r}${s}${e}${a}`,l=ne.join(this.dirname,o);xe.unlink(l,i)}_checkMaxFilesTailable(e,r,i){let n=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let a=this.maxFiles-1;a>1;a--)n.push(function(o,l){let u=`${r}${o-1}${e}${s}`,h=ne.join(this.dirname,u);xe.exists(h,p=>{if(!p)return l(null);u=`${r}${o}${e}${s}`,xe.rename(h,ne.join(this.dirname,u),l)})}.bind(this,a));sd(n,()=>{xe.rename(ne.join(this.dirname,`${r}${e}${s}`),ne.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){xe.access(e,xe.F_OK,n=>{if(n)return i();var s=u1.createGzip(),a=xe.createReadStream(e),o=xe.createWriteStream(r);o.on("finish",()=>{xe.unlink(e,i)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){xe.existsSync(e)||xe.mkdirSync(e,{recursive:!0})}}});var fd=w((iR,ud)=>{"use strict";var g1=require("http"),m1=require("https"),{Stream:y1}=Yt(),b1=ur(),{configure:w1}=Pr();ud.exports=class extends b1{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(i,n)=>{n&&n.statusCode!==200&&(i=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),i?this.emit("warn",i):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let i=e.params.auth||null;delete e.params.auth;let n=e.params.path||null;delete e.params.path,this._request(e,i,n,(s,a,o)=>{if(a&&a.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${a.statusCode}`)),s)return r(s);if(typeof o=="string")try{o=JSON.parse(o)}catch(l){return r(l)}r(null,o)})}stream(e={}){let r=new y1;e={method:"stream",params:e};let i=e.params.path||null;delete e.params.path;let n=e.params.auth||null;delete e.params.auth;let s="",a=this._request(e,n,i);return r.destroy=()=>a.destroy(),a.on("data",o=>{o=(s+o).split(/\n+/);let l=o.length-1,u=0;for(;u<l;u++)try{r.emit("log",JSON.parse(o[u]))}catch(h){r.emit("error",h)}s=o[l]}),a.on("error",o=>r.emit("error",o)),r}_request(e,r,i,n){e=e||{},r=r||this.auth,i=i||this.path||"",this.batch?this._doBatch(e,n,r,i):this._doRequest(e,n,r,i)}_doBatch(e,r,i,n){if(this.batchOptions.push(e),this.batchOptions.length===1){let s=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){s.batchTimeoutID=-1,s._doBatchRequest(s.batchCallback,i,n)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,i,n)}_doBatchRequest(e,r,i){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,e,r,i)}_doRequest(e,r,i,n){let s=Object.assign({},this.headers);i&&i.bearer&&(s.Authorization=`Bearer ${i.bearer}`);let a=(this.ssl?m1:g1).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${n.replace(/^\//,"")}`,headers:s,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});a.on("error",r),a.on("response",l=>l.on("end",()=>r(null,l)).resume());let o=w1({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});a.end(Buffer.from(o(e,this.options.replacer),"utf8"))}}});var Eo=w((nR,hd)=>{"use strict";var Ke=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Ke.writable=t=>Ke(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Ke.readable=t=>Ke(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Ke.duplex=t=>Ke.writable(t)&&Ke.readable(t);Ke.transform=t=>Ke.duplex(t)&&typeof t._transform=="function";hd.exports=Ke});var dd=w((aR,cd)=>{"use strict";var v1=Eo(),{MESSAGE:_1}=re(),S1=require("os"),E1=ur();cd.exports=class extends E1{constructor(e={}){if(super(e),!e.stream||!v1(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:S1.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[_1]}${this.eol}`),r&&r()}}});var pd=w(ni=>{"use strict";Object.defineProperty(ni,"Console",{configurable:!0,enumerable:!0,get(){return Mf()}});Object.defineProperty(ni,"File",{configurable:!0,enumerable:!0,get(){return ld()}});Object.defineProperty(ni,"Http",{configurable:!0,enumerable:!0,get(){return fd()}});Object.defineProperty(ni,"Stream",{configurable:!0,enumerable:!0,get(){return dd()}})});var Wn=w(si=>{"use strict";var $n=Js(),{configs:Ro}=re();si.cli=$n.levels(Ro.cli);si.npm=$n.levels(Ro.npm);si.syslog=$n.levels(Ro.syslog);si.addColors=$n.levels});var md=w((Bn,gd)=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});var R1=nn(),x1=Kt(R1),T1=pn(),O1=Kt(T1),M1=ja(),A1=Kt(M1),k1=Da(),P1=Kt(k1),D1=qa(),q1=Kt(D1),C1=Bt(),j1=Kt(C1),L1=hr(),N1=Kt(L1);function Kt(t){return t&&t.__esModule?t:{default:t}}function F1(t,e,r){r=(0,P1.default)(r);var i=0,n=0,{length:s}=t,a=!1;s===0&&r(null);function o(l,u){l===!1&&(a=!0),a!==!0&&(l?r(l):(++n===s||u===O1.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,q1.default)(o))}function I1(t,e,r){return(0,A1.default)(t,1/0,e,r)}function $1(t,e,r){var i=(0,x1.default)(t)?F1:I1;return i(t,(0,j1.default)(e),r)}Bn.default=(0,N1.default)($1,3);gd.exports=Bn.default});var bd=w((Un,yd)=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.default=W1;function W1(t){return(e,r,i)=>t(e,i)}yd.exports=Un.default});var Gn=w((Hn,wd)=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});var B1=md(),U1=zn(B1),z1=bd(),H1=zn(z1),G1=Bt(),Y1=zn(G1),V1=hr(),K1=zn(V1);function zn(t){return t&&t.__esModule?t:{default:t}}function J1(t,e,r){return(0,U1.default)(t,(0,H1.default)((0,Y1.default)(e)),r)}Hn.default=(0,K1.default)(J1,3);wd.exports=Hn.default});var _d=w((uR,vd)=>{"use strict";var Z1=Object.prototype.toString;vd.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),i=Z1.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var xo=w((fR,Sd)=>{"use strict";var Q1=_d();Sd.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=Q1(e),n}});var To=w(oi=>{oi.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,a){return a},Error.captureStackTrace(r,t||oi.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};oi.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
28
|
-
`).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:i,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=i.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var s=null,a=null,o=null,l=null,u=null,
|
|
29
|
-
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:xd.loadavg(),uptime:xd.uptime()}}getTrace(e){return(e?Td.parse(e):Td.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new
|
|
30
|
-
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:kd.loadavg(),uptime:kd.uptime()}}getTrace(e){return(e?Pd.parse(e):Pd.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new
|
|
31
|
-
`));y&&this.exceptions.handle(y),b&&this.rejections.handle(b)}isLevelEnabled(e){let r=Do(this.levels,e);if(r===null)return!1;let i=Do(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let a=Do(this.levels,s.level);return a===null&&(a=i),a>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[Je]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Je]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Je]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(r&&r.match&&r.match(
|
|
32
|
-
`))}_onEvent(e,r){function i(n){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,n,r)}r["__winston"+e]||(r["__winston"+e]=i.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function Do(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Vn.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Fd.exports=Vn});var qo=w((SR,Id)=>{"use strict";var{LEVEL:b_}=re(),w_=Wn(),v_=Yn(),__=ii()("winston:create-logger");function S_(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Id.exports=function(t={}){t.levels=t.levels||w_.npm.levels;class e extends v_{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(__('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[i]=function(...n){let s=this||r;if(n.length===1){let[a]=n,o=a&&a.message&&a||{message:a};return o.level=o[b_]=i,s._addDefaultMeta(o),s.write(o),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[S_(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Wd=w((RR,$d)=>{"use strict";var E_=qo();$d.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let i=r.transports||this.options.transports;i?r.transports=Array.isArray(i)?i.slice():[i]:r.transports=[];let n=E_(r);n.on("close",()=>this._delete(e)),this.loggers.set(e,n)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,i)=>this._removeLogger(i))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Ud=w(H=>{"use strict";var Bd=Js(),{warn:li}=Zs();H.version=xu().version;H.transports=pd();H.config=Wn();H.addColors=Bd.levels;H.format=Bd.format;H.createLogger=qo();H.Logger=Yn();H.ExceptionHandler=Mo();H.RejectionHandler=ko();H.Container=Wd();H.Transport=ur();H.loggers=new H.Container;var Ze=H.createLogger();Object.keys(H.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>H[t]=(...e)=>Ze[t](...e));Object.defineProperty(H,"level",{get(){return Ze.level},set(t){Ze.level=t}});Object.defineProperty(H,"exceptions",{get(){return Ze.exceptions}});Object.defineProperty(H,"rejections",{get(){return Ze.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(H,t,{get(){return Ze[t]},set(e){Ze[t]=e}})});Object.defineProperty(H,"default",{get(){return{exceptionHandlers:Ze.exceptionHandlers,rejectionHandlers:Ze.rejectionHandlers,transports:Ze.transports}}});li.deprecated(H,"setLevels");li.forFunctions(H,"useFormat",["cli"]);li.forProperties(H,"useFormat",["padLevels","stripColors"]);li.forFunctions(H,"deprecated",["addRewriter","addFilter","clone","extend"]);li.forProperties(H,"deprecated",["emitErrs","levelLength"])});var Zn=w((Jn,Gd)=>{(function(t,e){typeof Jn=="object"&&typeof Gd<"u"?e(Jn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(Jn,function(t){"use strict";class e extends TypeError{constructor(g,m){let v,{message:T,explanation:q,...z}=g,{path:Z}=g,Q=Z.length===0?T:`At path: ${Z.join(".")} -- ${T}`;super(q??Q),q!=null&&(this.cause=Q),Object.assign(this,z),this.name=this.constructor.name,this.failures=()=>v??(v=[g,...m()])}}function r(d){return i(d)&&typeof d[Symbol.iterator]=="function"}function i(d){return typeof d=="object"&&d!=null}function n(d){if(Object.prototype.toString.call(d)!=="[object Object]")return!1;let g=Object.getPrototypeOf(d);return g===null||g===Object.prototype}function s(d){return typeof d=="symbol"?d.toString():typeof d=="string"?JSON.stringify(d):`${d}`}function a(d){let{done:g,value:m}=d.next();return g?void 0:m}function o(d,g,m,v){if(d===!0)return;d===!1?d={}:typeof d=="string"&&(d={message:d});let{path:T,branch:q}=g,{type:z}=m,{refinement:Z,message:Q=`Expected a value of type \`${z}\`${Z?` with refinement \`${Z}\``:""}, but received: \`${s(v)}\``}=d;return{value:v,type:z,refinement:Z,key:T[T.length-1],path:T,branch:q,...d,message:Q}}function*l(d,g,m,v){r(d)||(d=[d]);for(let T of d){let q=o(T,g,m,v);q&&(yield q)}}function*u(d,g,m={}){let{path:v=[],branch:T=[d],coerce:q=!1,mask:z=!1}=m,Z={path:v,branch:T};if(q&&(d=g.coercer(d,Z),z&&g.type!=="type"&&i(g.schema)&&i(d)&&!Array.isArray(d)))for(let G in d)g.schema[G]===void 0&&delete d[G];let Q="valid";for(let G of g.validator(d,Z))G.explanation=m.message,Q="not_valid",yield[G,void 0];for(let[G,Pe,fg]of g.entries(d,Z)){let hg=u(Pe,fg,{path:G===void 0?v:[...v,G],branch:G===void 0?T:[...T,Pe],coerce:q,mask:z,message:m.message});for(let ki of hg)ki[0]?(Q=ki[0].refinement!=null?"not_refined":"not_valid",yield[ki[0],void 0]):q&&(Pe=ki[1],G===void 0?d=Pe:d instanceof Map?d.set(G,Pe):d instanceof Set?d.add(Pe):i(d)&&(Pe!==void 0||G in d)&&(d[G]=Pe))}if(Q!=="not_valid")for(let G of g.refiner(d,Z))G.explanation=m.message,Q="not_refined",yield[G,void 0];Q==="valid"&&(yield[void 0,d])}class h{constructor(g){let{type:m,schema:v,validator:T,refiner:q,coercer:z=Q=>Q,entries:Z=function*(){}}=g;this.type=m,this.schema=v,this.entries=Z,this.coercer=z,T?this.validator=(Q,G)=>{let Pe=T(Q,G);return l(Pe,G,this,Q)}:this.validator=()=>[],q?this.refiner=(Q,G)=>{let Pe=q(Q,G);return l(Pe,G,this,Q)}:this.refiner=()=>[]}assert(g,m){return p(g,this,m)}create(g,m){return c(g,this,m)}is(g){return y(g,this)}mask(g,m){return f(g,this,m)}validate(g,m={}){return b(g,this,m)}}function p(d,g,m){let v=b(d,g,{message:m});if(v[0])throw v[0]}function c(d,g,m){let v=b(d,g,{coerce:!0,message:m});if(v[0])throw v[0];return v[1]}function f(d,g,m){let v=b(d,g,{coerce:!0,mask:!0,message:m});if(v[0])throw v[0];return v[1]}function y(d,g){return!b(d,g)[0]}function b(d,g,m={}){let v=u(d,g,m),T=a(v);return T[0]?[new e(T[0],function*(){for(let z of v)z[0]&&(yield z[0])}),void 0]:[void 0,T[1]]}function S(...d){let g=d[0].type==="type",m=d.map(T=>T.schema),v=Object.assign({},...m);return g?ft(v):He(v)}function _(d,g){return new h({type:d,schema:null,validator:g})}function x(d,g){return new h({...d,refiner:(m,v)=>m===void 0||d.refiner(m,v),validator(m,v){return m===void 0?!0:(g(m,v),d.validator(m,v))}})}function R(d){return new h({type:"dynamic",schema:null,*entries(g,m){yield*d(g,m).entries(g,m)},validator(g,m){return d(g,m).validator(g,m)},coercer(g,m){return d(g,m).coercer(g,m)},refiner(g,m){return d(g,m).refiner(g,m)}})}function O(d){let g;return new h({type:"lazy",schema:null,*entries(m,v){g??(g=d()),yield*g.entries(m,v)},validator(m,v){return g??(g=d()),g.validator(m,v)},coercer(m,v){return g??(g=d()),g.coercer(m,v)},refiner(m,v){return g??(g=d()),g.refiner(m,v)}})}function k(d,g){let{schema:m}=d,v={...m};for(let T of g)delete v[T];switch(d.type){case"type":return ft(v);default:return He(v)}}function D(d){let g=d instanceof h,m=g?{...d.schema}:{...d};for(let v in m)m[v]=Mr(m[v]);return g&&d.type==="type"?ft(m):He(m)}function F(d,g){let{schema:m}=d,v={};for(let T of g)v[T]=m[T];switch(d.type){case"type":return ft(v);default:return He(v)}}function N(d,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),_(d,g)}function B(){return _("any",()=>!0)}function te(d){return new h({type:"array",schema:d,*entries(g){if(d&&Array.isArray(g))for(let[m,v]of g.entries())yield[m,v,d]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${s(g)}`}})}function J(){return _("bigint",d=>typeof d=="bigint")}function ye(){return _("boolean",d=>typeof d=="boolean")}function be(){return _("date",d=>d instanceof Date&&!isNaN(d.getTime())||`Expected a valid \`Date\` object, but received: ${s(d)}`)}function tt(d){let g={},m=d.map(v=>s(v)).join();for(let v of d)g[v]=v;return new h({type:"enums",schema:g,validator(v){return d.includes(v)||`Expected one of \`${m}\`, but received: ${s(v)}`}})}function Ss(){return _("func",d=>typeof d=="function"||`Expected a function, but received: ${s(d)}`)}function E(d){return _("instance",g=>g instanceof d||`Expected a \`${d.name}\` instance, but received: ${s(g)}`)}function M(){return _("integer",d=>typeof d=="number"&&!isNaN(d)&&Number.isInteger(d)||`Expected an integer, but received: ${s(d)}`)}function U(d){return new h({type:"intersection",schema:null,*entries(g,m){for(let v of d)yield*v.entries(g,m)},*validator(g,m){for(let v of d)yield*v.validator(g,m)},*refiner(g,m){for(let v of d)yield*v.refiner(g,m)}})}function de(d){let g=s(d),m=typeof d;return new h({type:"literal",schema:m==="string"||m==="number"||m==="boolean"?d:null,validator(v){return v===d||`Expected the literal \`${g}\`, but received: ${s(v)}`}})}function P(d,g){return new h({type:"map",schema:null,*entries(m){if(d&&g&&m instanceof Map)for(let[v,T]of m.entries())yield[v,v,d],yield[v,T,g]},coercer(m){return m instanceof Map?new Map(m):m},validator(m){return m instanceof Map||`Expected a \`Map\` object, but received: ${s(m)}`}})}function Ee(){return _("never",()=>!1)}function rt(d){return new h({...d,validator:(g,m)=>g===null||d.validator(g,m),refiner:(g,m)=>g===null||d.refiner(g,m)})}function kt(){return _("number",d=>typeof d=="number"&&!isNaN(d)||`Expected a number, but received: ${s(d)}`)}function He(d){let g=d?Object.keys(d):[],m=Ee();return new h({type:"object",schema:d||null,*entries(v){if(d&&i(v)){let T=new Set(Object.keys(v));for(let q of g)T.delete(q),yield[q,v[q],d[q]];for(let q of T)yield[q,v[q],m]}},validator(v){return i(v)||`Expected an object, but received: ${s(v)}`},coercer(v){return i(v)?{...v}:v}})}function Mr(d){return new h({...d,validator:(g,m)=>g===void 0||d.validator(g,m),refiner:(g,m)=>g===void 0||d.refiner(g,m)})}function Qt(d,g){return new h({type:"record",schema:null,*entries(m){if(i(m))for(let v in m){let T=m[v];yield[v,v,d],yield[v,T,g]}},validator(m){return i(m)||`Expected an object, but received: ${s(m)}`}})}function Es(){return _("regexp",d=>d instanceof RegExp)}function Te(d){return new h({type:"set",schema:null,*entries(g){if(d&&g instanceof Set)for(let m of g)yield[m,m,d]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${s(g)}`}})}function Ar(){return _("string",d=>typeof d=="string"||`Expected a string, but received: ${s(d)}`)}function Rs(d){let g=Ee();return new h({type:"tuple",schema:null,*entries(m){if(Array.isArray(m)){let v=Math.max(d.length,m.length);for(let T=0;T<v;T++)yield[T,m[T],d[T]||g]}},validator(m){return Array.isArray(m)||`Expected an array, but received: ${s(m)}`}})}function ft(d){let g=Object.keys(d);return new h({type:"type",schema:d,*entries(m){if(i(m))for(let v of g)yield[v,m[v],d[v]]},validator(m){return i(m)||`Expected an object, but received: ${s(m)}`},coercer(m){return i(m)?{...m}:m}})}function Mi(d){let g=d.map(m=>m.type).join(" | ");return new h({type:"union",schema:null,coercer(m){for(let v of d){let[T,q]=v.validate(m,{coerce:!0});if(!T)return q}return m},validator(m,v){let T=[];for(let q of d){let[...z]=u(m,q,v),[Z]=z;if(Z[0])for(let[Q]of z)Q&&T.push(Q);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${s(m)}`,...T]}})}function Pt(){return _("unknown",()=>!0)}function ht(d,g,m){return new h({...d,coercer:(v,T)=>y(v,g)?d.coercer(m(v,T),T):d.coercer(v,T)})}function xs(d,g,m={}){return ht(d,Pt(),v=>{let T=typeof g=="function"?g():g;if(v===void 0)return T;if(!m.strict&&n(v)&&n(T)){let q={...v},z=!1;for(let Z in T)q[Z]===void 0&&(q[Z]=T[Z],z=!0);if(z)return q}return v})}function Dt(d){return ht(d,Ar(),g=>g.trim())}function ct(d){return qt(d,"empty",g=>{let m=Xt(g);return m===0||`Expected an empty ${d.type} but received one with a size of \`${m}\``})}function Xt(d){return d instanceof Map||d instanceof Set?d.size:d.length}function Ts(d,g,m={}){let{exclusive:v}=m;return qt(d,"max",T=>v?T<g:T<=g||`Expected a ${d.type} less than ${v?"":"or equal to "}${g} but received \`${T}\``)}function Ai(d,g,m={}){let{exclusive:v}=m;return qt(d,"min",T=>v?T>g:T>=g||`Expected a ${d.type} greater than ${v?"":"or equal to "}${g} but received \`${T}\``)}function og(d){return qt(d,"nonempty",g=>Xt(g)>0||`Expected a nonempty ${d.type} but received an empty one`)}function lg(d,g){return qt(d,"pattern",m=>g.test(m)||`Expected a ${d.type} matching \`/${g.source}/\` but received "${m}"`)}function ug(d,g,m=g){let v=`Expected a ${d.type}`,T=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return qt(d,"size",q=>{if(typeof q=="number"||q instanceof Date)return g<=q&&q<=m||`${v} ${T} but received \`${q}\``;if(q instanceof Map||q instanceof Set){let{size:z}=q;return g<=z&&z<=m||`${v} with a size ${T} but received one with a size of \`${z}\``}else{let{length:z}=q;return g<=z&&z<=m||`${v} with a length ${T} but received one with a length of \`${z}\``}})}function qt(d,g,m){return new h({...d,*refiner(v,T){yield*d.refiner(v,T);let q=m(v,T),z=l(q,T,d,v);for(let Z of z)yield{...Z,refinement:g}}})}t.Struct=h,t.StructError=e,t.any=B,t.array=te,t.assert=p,t.assign=S,t.bigint=J,t.boolean=ye,t.coerce=ht,t.create=c,t.date=be,t.defaulted=xs,t.define=_,t.deprecated=x,t.dynamic=R,t.empty=ct,t.enums=tt,t.func=Ss,t.instance=E,t.integer=M,t.intersection=U,t.is=y,t.lazy=O,t.literal=de,t.map=P,t.mask=f,t.max=Ts,t.min=Ai,t.never=Ee,t.nonempty=og,t.nullable=rt,t.number=kt,t.object=He,t.omit=k,t.optional=Mr,t.partial=D,t.pattern=lg,t.pick=F,t.record=Qt,t.refine=qt,t.regexp=Es,t.set=Te,t.size=ug,t.string=Ar,t.struct=N,t.trimmed=Dt,t.tuple=Rs,t.type=ft,t.union=Mi,t.unknown=Pt,t.validate=b})});var Xd=w(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.validateRequirements=void 0;var M_="[",A_="(<=>!~",k_=";",P_="@",D_=new RegExp(`[${M_+A_+k_+P_}]`);function q_(t){return t.split(D_)[0].trim()}function C_(t){return t.forEach(r=>{let i;try{i=new URL(r)}catch{return}if(i.protocol==="emfs:"||i.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${r})`)}),t.filter(r=>q_(r)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${r}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}Qn.validateRequirements=C_});var ep=w(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.parseRequirementsTxt=void 0;var j_=/\s#.*$/;function L_(t){return t.split(`
|
|
33
|
-
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(j_,"")).map(e=>e.trim()).filter(e=>e!=="")}Xn.parseRequirementsTxt=L_});var tp=w(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.PromiseDelegate=void 0;var Co=class{promise;resolveInternal;rejectInternal;constructor(){this.promise=new Promise((e,r)=>{this.resolveInternal=e,this.rejectInternal=r})}resolve(e){this.resolveInternal(e)}reject(e){this.rejectInternal(e)}};es.PromiseDelegate=Co});var rp=w(at=>{"use strict";var N_=at&&at.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(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){i===void 0&&(i=r),t[i]=e[r]}),jo=at&&at.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&N_(e,t,r)};Object.defineProperty(at,"__esModule",{value:!0});jo(Xd(),at);jo(ep(),at);jo(tp(),at)});var op=w((IR,ap)=>{"use strict";ap.exports=np;function np(t,e,r){t instanceof RegExp&&(t=ip(t,r)),e instanceof RegExp&&(e=ip(e,r));var i=sp(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function ip(t,e){var r=e.match(t);return r?r[0]:null}np.range=sp;function sp(t,e,r){var i,n,s,a,o,l=r.indexOf(t),u=r.indexOf(e,l+1),h=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;h>=0&&!o;)h==l?(i.push(h),l=r.indexOf(t,h+1)):i.length==1?o=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,a=u),u=r.indexOf(e,h+1)),h=l<u&&l>=0?l:u;i.length&&(o=[s,a])}return o}});var gp=w(($R,pp)=>{var lp=op();pp.exports=$_;var up="\0SLASH"+Math.random()+"\0",fp="\0OPEN"+Math.random()+"\0",No="\0CLOSE"+Math.random()+"\0",hp="\0COMMA"+Math.random()+"\0",cp="\0PERIOD"+Math.random()+"\0";function Lo(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function F_(t){return t.split("\\\\").join(up).split("\\{").join(fp).split("\\}").join(No).split("\\,").join(hp).split("\\.").join(cp)}function I_(t){return t.split(up).join("\\").split(fp).join("{").split(No).join("}").split(hp).join(",").split(cp).join(".")}function dp(t){if(!t)return[""];var e=[],r=lp("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=dp(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function $_(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),fi(F_(t),!0).map(I_)):[]}function W_(t){return"{"+t+"}"}function B_(t){return/^-?0\d/.test(t)}function U_(t,e){return t<=e}function z_(t,e){return t>=e}function fi(t,e){var r=[],i=lp("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?fi(i.post,!1):[""];if(/\$$/.test(i.pre))for(var a=0;a<s.length;a++){var o=n+"{"+i.body+"}"+s[a];r.push(o)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),h=l||u,p=i.body.indexOf(",")>=0;if(!h&&!p)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+No+i.post,fi(t)):[t];var c;if(h)c=i.body.split(/\.\./);else if(c=dp(i.body),c.length===1&&(c=fi(c[0],!1).map(W_),c.length===1))return s.map(function(te){return i.pre+c[0]+te});var f;if(h){var y=Lo(c[0]),b=Lo(c[1]),S=Math.max(c[0].length,c[1].length),_=c.length==3?Math.abs(Lo(c[2])):1,x=U_,R=b<y;R&&(_*=-1,x=z_);var O=c.some(B_);f=[];for(var k=y;x(k,b);k+=_){var D;if(u)D=String.fromCharCode(k),D==="\\"&&(D="");else if(D=String(k),O){var F=S-D.length;if(F>0){var N=new Array(F+1).join("0");k<0?D="-"+N+D.slice(1):D=N+D}}f.push(D)}}else{f=[];for(var B=0;B<c.length;B++)f.push.apply(f,fi(c[B],!1))}for(var B=0;B<f.length;B++)for(var a=0;a<s.length;a++){var o=n+f[B]+s[a];(!e||h||o)&&r.push(o)}}return r}});var ig=pe(require("yargs")),ng=require("yargs/helpers"),ce=pe(require("node:path")),ut=pe(require("node:fs/promises")),tl=pe(require("fs-extra")),Oi=require("pyodide");var zd=pe(require("node:path")),Hd=pe(require("node:fs/promises"));var xt=pe(Ud()),I=xt.createLogger({transports:[new xt.transports.Console({format:xt.format.combine(xt.format.splat(),xt.format.cli())})]});function ui(t){process.emitWarning(t,{type:"DeprecationWarning"})}var Kn=class{sourceUrl;isRemote;_data=null;constructor(e){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://")}async readJson(e){let r=zd.default.join(this.sourceUrl,e);if(this.isRemote){I.debug(`Fetching ${r}`);let i=await fetch(r);if(!i.ok)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);return await i.json()}else{I.debug(`Reading ${r}`);let i=await Hd.default.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;I.info("Load pyodide-lock.json");let e=await this.readJson("pyodide-lock.json");return this._data=e.packages,e.packages}async getPackageInfoByName(e){let r=await this.loadPrebuiltPackageData(),i=Object.values(r).find(n=>n.name===e);if(i==null)throw new Error(`Package ${e} is not found in the lock file.`);return i}};var Vd=pe(require("node:fs/promises")),Kd=pe(Zn());var X=pe(Zn()),Yd=X.object({entrypoint:X.string(),embed:X.defaulted(X.boolean(),!1),idbfsMountpoints:X.optional(X.array(X.string())),nodeJsWorker:X.defaulted(X.boolean(),!1),nodefsMountpoints:X.optional(X.record(X.string(),X.string()))});function R_(t){let e=Kd.mask(t??{},Yd);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function Jd(t){let e=R_({...t.packageJsonStliteDesktopField,...t.fallbacks});I.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);I.info(`Dump the manifest file -> ${t.manifestFilePath}`),await Vd.default.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var Zd=pe(require("node:path")),fe=pe(Zn());async function Qd(t){let{files:e,entrypoint:r}=x_(t),i=await T_(t),n=await O_(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function x_(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){ui("Missing `stlite.desktop.files` and `stlite.desktop.entrypoint` in `package.json`. Falling back to the `appHomeDirSource` argument to determine the app directory. Please update your `package.json` as this fallback is deprecated and will be removed in a future release.");let s=r;if(typeof s!="string")throw new Error("The `appHomeDirSource` argument is required when `stlite.desktop.files` and `stlite.desktop.entrypoint` are not found in the package.json. Note that `appHomeDirSource` is deprecated and will be removed in the future, so please specify `stlite.desktop.files` and `stlite.desktop.entrypoint` in the package.json.");i=[s],n=`./${s}/streamlit_app.py`}else r!=null&&ui("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return fe.assert(n,fe.string(),"The `stlite.desktop.entrypoint` field must be a string."),fe.assert(i,fe.array(fe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function T_(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;fe.assert(i,fe.optional(fe.array(fe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(ui("The `packages` argument is deprecated and will be removed in a future release. Use `stlite.desktop.dependencies` in your `package.json` instead."),n=r),[...i??[],...n]}async function O_(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;fe.assert(n,fe.optional(fe.array(fe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>Zd.default.resolve(e,o)),a=[];return i!=null&&i.length>0&&(ui("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),a=i),[...s??[],...a]}var _s=pe(rp());var Ep=pe(gp(),1);var hi=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var H_={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ci=t=>t.replace(/[[\]\\-]/g,"\\$&"),G_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mp=t=>t.join(""),yp=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=r+1,a=!1,o=!1,l=!1,u=!1,h=r,p="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&a&&!l){h=s+1;break}if(a=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[S,[_,x,R]]of Object.entries(H_))if(t.startsWith(S,s)){if(p)return["$.",!1,t.length-r,!0];s+=S.length,R?n.push(_):i.push(_),o=o||x;continue e}}if(l=!1,p){b>p?i.push(ci(p)+"-"+ci(b)):b===p&&i.push(ci(b)),p="",s++;continue}if(t.startsWith("-]",s+1)){i.push(ci(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){p=b,s+=2;continue}i.push(ci(b)),s++}if(h<s)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,t.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let b=i[0].length===2?i[0].slice(-1):i[0];return[G_(b),!1,h-r,!1]}let c="["+(u?"^":"")+mp(i)+"]",f="["+(u?"":"^")+mp(n)+"]";return[i.length&&n.length?"("+c+"|"+f+")":i.length?c:f,o,h-r,!0]};var We=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Y_=new Set(["!","?","+","*","@"]),bp=t=>Y_.has(t),V_="(?!(?:^|/)\\.\\.?(?:$|/))",ts="(?!\\.)",K_=new Set(["[","."]),J_=new Set(["..","."]),Z_=new Set("().*{}+?[]^$\\!"),Q_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fo="[^/]",wp=Fo+"*?",vp=Fo+"+?",br=class t{type;#e;#r;#s=!1;#i=[];#o;#u;#h;#l=!1;#a;#t;#g=!1;constructor(e,r,i={}){this.type=e,e&&(this.#r=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#h=this.#e===this?[]:this.#e.#h,e==="!"&&!this.#e.#l&&this.#h.push(this),this.#u=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#t!==void 0?this.#t:this.type?this.#t=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#t=this.#i.map(e=>String(e)).join("")}#y(){if(this!==this.#e)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let e;for(;e=this.#h.pop();){if(e.type!=="!")continue;let r=e,i=r.#o;for(;i;){for(let n=r.#u+1;!i.type&&n<i.#i.length;n++)for(let s of e.#i){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#i[n])}r=i,i=r.#o}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#o===this))throw new Error("invalid part: "+r);this.#i.push(r)}}toJSON(){let e=this.type===null?this.#i.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#i.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#l&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#u===0)return!0;let e=this.#o;for(let r=0;r<this.#u;r++){let i=e.#i[r];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#i.length:0;return this.#u===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let i of this.#i)r.copyIn(i);return r}static#d(e,r,i,n){let s=!1,a=!1,o=-1,l=!1;if(r.type===null){let f=i,y="";for(;f<e.length;){let b=e.charAt(f++);if(s||b==="\\"){s=!s,y+=b;continue}if(a){f===o+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(f===o+2&&l)&&(a=!1),y+=b;continue}else if(b==="["){a=!0,o=f,l=!1,y+=b;continue}if(!n.noext&&bp(b)&&e.charAt(f)==="("){r.push(y),y="";let S=new t(b,r);f=t.#d(e,S,f,n),r.push(S);continue}y+=b}return r.push(y),f}let u=i+1,h=new t(null,r),p=[],c="";for(;u<e.length;){let f=e.charAt(u++);if(s||f==="\\"){s=!s,c+=f;continue}if(a){u===o+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(u===o+2&&l)&&(a=!1),c+=f;continue}else if(f==="["){a=!0,o=u,l=!1,c+=f;continue}if(bp(f)&&e.charAt(u)==="("){h.push(c),c="";let y=new t(f,h);h.push(y),u=t.#d(e,y,u,n);continue}if(f==="|"){h.push(c),c="",p.push(h),h=new t(null,r);continue}if(f===")")return c===""&&r.#i.length===0&&(r.#g=!0),h.push(c),c="",r.push(...p,h),u;c+=f}return r.type=null,r.#r=void 0,r.#i=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#d(e,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,i,n,s]=this.toRegExpSource();if(!(n||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}toRegExpSource(e){let r=e??!!this.#a.dot;if(this.#e===this&&this.#y(),!this.type){let l=this.isStart()&&this.isEnd(),u=this.#i.map(f=>{let[y,b,S,_]=typeof f=="string"?t.#v(f,this.#r,l):f.toRegExpSource(e);return this.#r=this.#r||S,this.#s=this.#s||_,y}).join(""),h="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&J_.has(this.#i[0]))){let y=K_,b=r&&y.has(u.charAt(0))||u.startsWith("\\.")&&y.has(u.charAt(2))||u.startsWith("\\.\\.")&&y.has(u.charAt(4)),S=!r&&!e&&y.has(u.charAt(0));h=b?V_:S?ts:""}let p="";return this.isEnd()&&this.#e.#l&&this.#o?.type==="!"&&(p="(?:$|\\/)"),[h+u+p,We(u),this.#r=!!this.#r,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#c(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#i=[l],this.type=null,this.#r=void 0,[l,We(this.toString()),!1,!1]}let a=!i||e||r||!ts?"":this.#c(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#g)o=(this.isStart()&&!r?ts:"")+vp;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?ts:"")+wp+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,We(s),this.#r=!!this.#r,this.#s]}#c(e){return this.#i.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,s,a]=r.toRegExpSource(e);return this.#s=this.#s||a,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#v(e,r,i=!1){let n=!1,s="",a=!1;for(let o=0;o<e.length;o++){let l=e.charAt(o);if(n){n=!1,s+=(Z_.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,h,p,c]=yp(e,o);if(p){s+=u,a=a||h,o+=p-1,r=r||c;continue}}if(l==="*"){i&&e==="*"?s+=vp:s+=wp,r=!0;continue}if(l==="?"){s+=Fo,r=!0;continue}s+=Q_(l)}return[s,We(e),!!r,a]}};var wr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var _e=(t,e,r={})=>(hi(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Ae(e,r).match(t)),X_=/^\*+([^+@!?\*\[\(]*)$/,eS=t=>e=>!e.startsWith(".")&&e.endsWith(t),tS=t=>e=>e.endsWith(t),rS=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),iS=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),nS=/^\*+\.\*+$/,sS=t=>!t.startsWith(".")&&t.includes("."),aS=t=>t!=="."&&t!==".."&&t.includes("."),oS=/^\.\*+$/,lS=t=>t!=="."&&t!==".."&&t.startsWith("."),uS=/^\*+$/,fS=t=>t.length!==0&&!t.startsWith("."),hS=t=>t.length!==0&&t!=="."&&t!=="..",cS=/^\?+([^+@!?\*\[\(]*)?$/,dS=([t,e=""])=>{let r=Rp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},pS=([t,e=""])=>{let r=xp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},gS=([t,e=""])=>{let r=xp([t]);return e?i=>r(i)&&i.endsWith(e):r},mS=([t,e=""])=>{let r=Rp([t]);return e?i=>r(i)&&i.endsWith(e):r},Rp=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},xp=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},Tp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_p={win32:{sep:"\\"},posix:{sep:"/"}},yS=Tp==="win32"?_p.win32.sep:_p.posix.sep;_e.sep=yS;var he=Symbol("globstar **");_e.GLOBSTAR=he;var bS="[^/]",wS=bS+"*?",vS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",_S="(?:(?!(?:\\/|^)\\.).)*?",SS=(t,e={})=>r=>_e(r,t,e);_e.filter=SS;var je=(t,e={})=>Object.assign({},t,e),ES=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return _e;let e=_e;return Object.assign((i,n,s={})=>e(i,n,je(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,je(t,s))}static defaults(n){return e.defaults(je(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,je(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,je(t,s))}},unescape:(i,n={})=>e.unescape(i,je(t,n)),escape:(i,n={})=>e.escape(i,je(t,n)),filter:(i,n={})=>e.filter(i,je(t,n)),defaults:i=>e.defaults(je(t,i)),makeRe:(i,n={})=>e.makeRe(i,je(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,je(t,n)),match:(i,n,s={})=>e.match(i,n,je(t,s)),sep:e.sep,GLOBSTAR:he})};_e.defaults=ES;var Op=(t,e={})=>(hi(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Ep.default)(t));_e.braceExpand=Op;var RS=(t,e={})=>new Ae(t,e).makeRe();_e.makeRe=RS;var xS=(t,e,r={})=>{let i=new Ae(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};_e.match=xS;var Sp=/[?*]|[+@!]\(.*?\)|\[|\]/,TS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ae=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){hi(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||Tp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((s,a,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Sp.test(s[2]))&&!Sp.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(u)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)e[i][n]==="**"&&(e[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((i,n)=>{let s=i[i.length-1];return n==="**"&&s==="**"?i:n===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let s=e[n];n===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let n=e[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,e.splice(i-1,2),i-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let i of e){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let a=n;for(;i[a+1]==="**";)a++;a>n&&i.splice(n+1,a-n);let o=i[n+1],l=i[n+2],u=i[n+3];if(o!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,i.splice(n,1);let h=i.slice(0);h[n]="**",e.push(h),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<i.length-1;a++){let o=i[a];a===1&&o===""&&i[0]===""||(o==="."||o==="")&&(r=!0,i.splice(a,1),a--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let s=0;for(;(s=i.indexOf("..",s+1))!==-1;){let a=i[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=s===1&&i[s+1]==="**"?["."]:[];i.splice(s-1,2,...l),i.length===0&&i.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let i=r+1;i<e.length;i++){let n=this.partsMatch(e[r],e[i],!this.preserveMultipleSlashes);n&&(e[r]=n,e[i]=[])}return e.filter(r=>r.length)}partsMatch(e,r,i=!1){let n=0,s=0,a=[],o="";for(;n<e.length&&s<r.length;)if(e[n]===r[s])a.push(o==="b"?r[s]:e[n]),n++,s++;else if(i&&e[n]==="**"&&r[s]===e[n+1])a.push(e[n]),n++;else if(i&&r[s]==="**"&&e[n]===r[s+1])a.push(r[s]),s++;else if(e[n]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(o==="b")return!1;o="a",a.push(e[n]),n++,s++}else if(r[s]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="a")return!1;o="b",a.push(r[s]),n++,s++}else return!1;return e.length===r.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i=!1){let n=this.options;if(this.isWindows){let b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),_=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),x=!_&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),R=S?3:b?0:void 0,O=x?3:_?0:void 0;if(typeof R=="number"&&typeof O=="number"){let[k,D]=[e[R],r[O]];k.toLowerCase()===D.toLowerCase()&&(r[O]=k,O>R?r=r.slice(O):R>O&&(e=e.slice(R)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var a=0,o=0,l=e.length,u=r.length;a<l&&o<u;a++,o++){this.debug("matchOne loop");var h=r[o],p=e[a];if(this.debug(r,h,p),h===!1)return!1;if(h===he){this.debug("GLOBSTAR",[r,h,p]);var c=a,f=o+1;if(f===u){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!n.dot&&e[a].charAt(0)===".")return!1;return!0}for(;c<l;){var y=e[c];if(this.debug(`
|
|
34
|
-
globstar while`,e,
|
|
35
|
-
>>> no match, partial?`,e,c,r,f),c===l))}let b;if(typeof h=="string"?(b=p===h,this.debug("string match",h,p,b)):(b=h.test(p),this.debug("pattern match",h,p,b)),!b)return!1}if(a===l&&o===u)return!0;if(a===l)return i;if(o===u)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return Op(this.pattern,this.options)}parse(e){hi(e);let r=this.options;if(e==="**")return he;if(e==="")return"";let i,n=null;(i=e.match(uS))?n=r.dot?hS:fS:(i=e.match(X_))?n=(r.nocase?r.dot?iS:rS:r.dot?tS:eS)(i[1]):(i=e.match(cS))?n=(r.nocase?r.dot?pS:dS:r.dot?gS:mS)(i):(i=e.match(nS))?n=r.dot?aS:sS:(i=e.match(oS))&&(n=lS);let s=br.fromGlob(e,this.options).toMMPattern();return n?Object.assign(s,{test:n}):s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?wS:r.dot?vS:_S,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(h=>{if(h instanceof RegExp)for(let p of h.flags.split(""))n.add(p);return typeof h=="string"?TS(h):h===he?he:h._src});return u.forEach((h,p)=>{let c=u[p+1],f=u[p-1];h!==he||f===he||(f===void 0?c!==void 0&&c!==he?u[p+1]="(?:\\/|"+i+"\\/)?"+c:u[p]=i:c===void 0?u[p-1]=f+"(?:\\/|"+i+")?":c!==he&&(u[p-1]=f+"(?:\\/|\\/"+i+"\\/)"+c,u[p+1]=he))}),u.filter(h=>h!==he).join("/")}).join("|"),[a,o]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let a=n[n.length-1];if(!a)for(let o=n.length-2;!a&&o>=0;o--)a=n[o];for(let o=0;o<s.length;o++){let l=s[o],u=n;if(i.matchBase&&l.length===1&&(u=[a]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return _e.defaults(e).Minimatch}};_e.AST=br;_e.Minimatch=Ae;_e.escape=wr;_e.unescape=We;var vr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ap=new Set,Io=typeof process=="object"&&process?process:{},kp=(t,e,r,i)=>{typeof Io.emitWarning=="function"?Io.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},rs=globalThis.AbortController,Mp=globalThis.AbortSignal;if(typeof rs>"u"){Mp=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},rs=class{constructor(){e()}signal=new Mp;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let t=Io.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,kp("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))}}var OS=t=>!Ap.has(t),ax=Symbol("type"),Tt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Pp=t=>Tt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_r:null:null,_r=class extends Array{constructor(e){super(e),this.fill(0)}},$o=class t{heap;length;static#e=!1;static create(e){let r=Pp(e);if(!r)return[];t.#e=!0;let i=new t(e,r);return t.#e=!1,i}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},di=class t{#e;#r;#s;#i;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#h;#l;#a;#t;#g;#y;#d;#c;#v;#m;#x;#T;#_;#w;#M;#p;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#_,sizes:e.#x,keyMap:e.#l,keyList:e.#a,valList:e.#t,next:e.#g,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#v,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,i,n,s)=>e.#C(r,i,n,s),moveToTail:r=>e.#q(r),indexes:r=>e.#R(r),rindexes:r=>e.#A(r),isStale:r=>e.#b(r)}}get max(){return this.#e}get maxSize(){return this.#r}get calculatedSize(){return this.#h}get size(){return this.#u}get fetchMethod(){return this.#o}get dispose(){return this.#s}get disposeAfter(){return this.#i}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:l,dispose:u,disposeAfter:h,noDisposeOnSet:p,noUpdateTTL:c,maxSize:f=0,maxEntrySize:y=0,sizeCalculation:b,fetchMethod:S,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:O,ignoreFetchAbort:k}=e;if(r!==0&&!Tt(r))throw new TypeError("max option must be a nonnegative integer");let D=r?Pp(r):Array;if(!D)throw new Error("invalid max value: "+r);if(this.#e=r,this.#r=f,this.maxEntrySize=y||this.#r,this.sizeCalculation=b,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=S,this.#M=!!S,this.#l=new Map,this.#a=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#g=new D(r),this.#y=new D(r),this.#d=0,this.#c=0,this.#v=$o.create(r),this.#u=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof h=="function"?(this.#i=h,this.#m=[]):(this.#i=void 0,this.#m=void 0),this.#w=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!_,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#r!==0&&!Tt(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Tt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=Tt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!Tt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#k()}if(this.#e===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#r){let F="LRU_CACHE_UNBOUNDED";OS(F)&&(Ap.add(F),kp("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,t))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#k(){let e=new _r(this.#e),r=new _r(this.#e);this.#_=e,this.#T=r,this.#n=(s,a,o=vr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.delete(this.#a[s])},a+1);l.unref&&l.unref()}},this.#O=s=>{r[s]=e[s]!==0?vr.now():0},this.#S=(s,a)=>{if(e[a]){let o=e[a],l=r[a];if(!o||!l)return;s.ttl=o,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=o-u}};let i=0,n=()=>{let s=vr.now();if(this.ttlResolution>0){i=s;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return s};this.getRemainingTTL=s=>{let a=this.#l.get(s);if(a===void 0)return 0;let o=e[a],l=r[a];if(!o||!l)return 1/0;let u=(i||n())-l;return o-u},this.#b=s=>{let a=r[s],o=e[s];return!!o&&!!a&&(i||n())-a>o}}#O=()=>{};#S=()=>{};#n=()=>{};#b=()=>!1;#P(){let e=new _r(this.#e);this.#h=0,this.#x=e,this.#E=r=>{this.#h-=e[r],e[r]=0},this.#L=(r,i,n,s)=>{if(this.#f(i))return 0;if(!Tt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!Tt(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#j=(r,i,n)=>{if(e[r]=i,this.#r){let s=this.#r-e[r];for(;this.#h>s;)this.#D(!0)}this.#h+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#h)}}#E=e=>{};#j=(e,r,i)=>{};#L=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#c;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#d));)r=this.#y[r]}*#A({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#d;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#c));)r=this.#g[r]}#N(e){return e!==void 0&&this.#l.get(this.#a[e])===e}*entries(){for(let e of this.#R())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*rentries(){for(let e of this.#A())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*keys(){for(let e of this.#R()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*rkeys(){for(let e of this.#A()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*values(){for(let e of this.#R())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#A())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#a[i],this))return this.get(this.#a[i],r)}}forEach(e,r=this){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}rforEach(e,r=this){for(let i of this.#A()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}purgeStale(){let e=!1;for(let r of this.#A({allowStale:!0}))this.#b(r)&&(this.delete(this.#a[r]),e=!0);return e}info(e){let r=this.#l.get(e);if(r===void 0)return;let i=this.#t[r],n=this.#f(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#_&&this.#T){let a=this.#_[r],o=this.#T[r];if(a&&o){let l=a-(vr.now()-o);s.ttl=l,s.start=Date.now()}}return this.#x&&(s.size=this.#x[r]),s}dump(){let e=[];for(let r of this.#R({allowStale:!0})){let i=this.#a[r],n=this.#t[r],s=this.#f(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let a={value:s};if(this.#_&&this.#T){a.ttl=this.#_[r];let o=vr.now()-this.#T[r];a.start=Math.floor(Date.now()-o)}this.#x&&(a.size=this.#x[r]),e.unshift([i,a])}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=vr.now()-n}this.set(r,i.value,i)}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,h=this.#L(e,r,i.size||0,o);if(this.maxEntrySize&&h>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let p=this.#u===0?void 0:this.#l.get(e);if(p===void 0)p=this.#u===0?this.#c:this.#v.length!==0?this.#v.pop():this.#u===this.#e?this.#D(!1):this.#u,this.#a[p]=e,this.#t[p]=r,this.#l.set(e,p),this.#g[this.#c]=p,this.#y[p]=this.#c,this.#c=p,this.#u++,this.#j(p,h,l),l&&(l.set="add"),u=!1;else{this.#q(p);let c=this.#t[p];if(r!==c){if(this.#M&&this.#f(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=c;f!==void 0&&!a&&(this.#w&&this.#s?.(f,e,"set"),this.#p&&this.#m?.push([f,e,"set"]))}else a||(this.#w&&this.#s?.(c,e,"set"),this.#p&&this.#m?.push([c,e,"set"]));if(this.#E(p),this.#j(p,h,l),this.#t[p]=r,l){l.set="replace";let f=c&&this.#f(c)?c.__staleWhileFetching:c;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(n!==0&&!this.#_&&this.#k(),this.#_&&(u||this.#n(p,n,s),l&&this.#S(l,p)),!a&&this.#p&&this.#m){let c=this.#m,f;for(;f=c?.shift();)this.#i?.(...f)}return this}pop(){try{for(;this.#u;){let e=this.#t[this.#d];if(this.#D(!0),this.#f(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}}#D(e){let r=this.#d,i=this.#a[r],n=this.#t[r];return this.#M&&this.#f(n)?n.__abortController.abort(new Error("evicted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,i,"evict"),this.#p&&this.#m?.push([n,i,"evict"])),this.#E(r),e&&(this.#a[r]=void 0,this.#t[r]=void 0,this.#v.push(r)),this.#u===1?(this.#d=this.#c=0,this.#v.length=0):this.#d=this.#g[r],this.#l.delete(i),this.#u--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#l.get(e);if(s!==void 0){let a=this.#t[s];if(this.#f(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#b(s))n&&(n.has="stale",this.#S(n,s));else return i&&this.#O(s),n&&(n.has="hit",this.#S(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#l.get(e);if(n===void 0||!i&&this.#b(n))return;let s=this.#t[n];return this.#f(s)?s.__staleWhileFetching:s}#C(e,r,i,n){let s=r===void 0?void 0:this.#t[r];if(this.#f(s))return s;let a=new rs,{signal:o}=i;o?.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:n},u=(b,S=!1)=>{let{aborted:_}=a.signal,x=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(_&&!S?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,x&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),_&&!x&&!S)return p(a.signal.reason);let R=f;return this.#t[r]===f&&(b===void 0?R.__staleWhileFetching?this.#t[r]=R.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,b,l.options))),b},h=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),p(b)),p=b=>{let{aborted:S}=a.signal,_=S&&i.allowStaleOnFetchAbort,x=_||i.allowStaleOnFetchRejection,R=x||i.noDeleteOnFetchRejection,O=f;if(this.#t[r]===f&&(!R||O.__staleWhileFetching===void 0?this.delete(e):_||(this.#t[r]=O.__staleWhileFetching)),x)return i.status&&O.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),O.__staleWhileFetching;if(O.__returned===O)throw b},c=(b,S)=>{let _=this.#o?.(e,s,l);_&&_ instanceof Promise&&_.then(x=>b(x===void 0?void 0:x),S),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=x=>u(x,!0)))})};i.status&&(i.status.fetchDispatched=!0);let f=new Promise(c).then(u,h),y=Object.assign(f,{__abortController:a,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,y,{...l.options,status:void 0}),r=this.#l.get(e)):this.#t[r]=y,y}#f(e){if(!this.#M)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof rs}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:b,forceRefresh:S=!1,status:_,signal:x}=r;if(!this.#M)return _&&(_.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:_});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:h,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:y,ignoreFetchAbort:f,status:_,signal:x},O=this.#l.get(e);if(O===void 0){_&&(_.fetch="miss");let k=this.#C(e,O,R,b);return k.__returned=k}else{let k=this.#t[O];if(this.#f(k)){let te=i&&k.__staleWhileFetching!==void 0;return _&&(_.fetch="inflight",te&&(_.returnedStale=!0)),te?k.__staleWhileFetching:k.__returned=k}let D=this.#b(O);if(!S&&!D)return _&&(_.fetch="hit"),this.#q(O),n&&this.#O(O),_&&this.#S(_,O),k;let F=this.#C(e,O,R,b),B=F.__staleWhileFetching!==void 0&&i;return _&&(_.fetch=D?"stale":"refresh",B&&D&&(_.returnedStale=!0)),B?F.__staleWhileFetching:F.__returned=F}}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=r,o=this.#l.get(e);if(o!==void 0){let l=this.#t[o],u=this.#f(l);return a&&this.#S(a,o),this.#b(o)?(a&&(a.get="stale"),u?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.delete(e),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#q(o),n&&this.#O(o),l))}else a&&(a.get="miss")}#F(e,r){this.#y[r]=e,this.#g[e]=r}#q(e){e!==this.#c&&(e===this.#d?this.#d=this.#g[e]:this.#F(this.#y[e],this.#g[e]),this.#F(this.#c,e),this.#c=e)}delete(e){let r=!1;if(this.#u!==0){let i=this.#l.get(e);if(i!==void 0)if(r=!0,this.#u===1)this.clear();else{this.#E(i);let n=this.#t[i];if(this.#f(n)?n.__abortController.abort(new Error("deleted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,e,"delete"),this.#p&&this.#m?.push([n,e,"delete"])),this.#l.delete(e),this.#a[i]=void 0,this.#t[i]=void 0,i===this.#c)this.#c=this.#y[i];else if(i===this.#d)this.#d=this.#g[i];else{let s=this.#y[i];this.#g[s]=this.#g[i];let a=this.#g[i];this.#y[a]=this.#y[i]}this.#u--,this.#v.push(i)}}if(this.#p&&this.#m?.length){let i=this.#m,n;for(;n=i?.shift();)this.#i?.(...n)}return r}clear(){for(let e of this.#A({allowStale:!0})){let r=this.#t[e];if(this.#f(r))r.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#w&&this.#s?.(r,i,"delete"),this.#p&&this.#m?.push([r,i,"delete"])}}if(this.#l.clear(),this.#t.fill(void 0),this.#a.fill(void 0),this.#_&&this.#T&&(this.#_.fill(0),this.#T.fill(0)),this.#x&&this.#x.fill(0),this.#d=0,this.#c=0,this.#v.length=0,this.#h=0,this.#u=0,this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}};var Rr=require("path"),Wp=require("url"),NS=pe(require("fs"),1),et=require("fs"),At=require("fs/promises");var us=require("events"),Yo=pe(require("stream"),1),Lp=require("string_decoder"),Dp=typeof process=="object"&&process?process:{stdout:null,stderr:null},MS=t=>!!t&&typeof t=="object"&&(t instanceof Mt||t instanceof Yo.default||AS(t)||kS(t)),AS=t=>!!t&&typeof t=="object"&&t instanceof us.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==Yo.default.Writable.prototype.pipe,kS=t=>!!t&&typeof t=="object"&&t instanceof us.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",ot=Symbol("EOF"),lt=Symbol("maybeEmitEnd"),Ot=Symbol("emittedEnd"),is=Symbol("emittingEnd"),pi=Symbol("emittedError"),ns=Symbol("closed"),qp=Symbol("read"),ss=Symbol("flush"),Cp=Symbol("flushChunk"),Be=Symbol("encoding"),Sr=Symbol("decoder"),se=Symbol("flowing"),gi=Symbol("paused"),Er=Symbol("resume"),ae=Symbol("buffer"),Se=Symbol("pipes"),oe=Symbol("bufferLength"),Wo=Symbol("bufferPush"),as=Symbol("bufferShift"),ge=Symbol("objectMode"),ee=Symbol("destroyed"),Bo=Symbol("error"),Uo=Symbol("emitData"),jp=Symbol("emitEnd"),zo=Symbol("emitEnd2"),Qe=Symbol("async"),Ho=Symbol("abort"),os=Symbol("aborted"),mi=Symbol("signal"),Jt=Symbol("dataListeners"),ke=Symbol("discarded"),yi=t=>Promise.resolve().then(t),PS=t=>t(),DS=t=>t==="end"||t==="finish"||t==="prefinish",qS=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,CS=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),ls=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Er](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Go=class extends ls{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}},jS=t=>!!t.objectMode,LS=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Mt=class extends us.EventEmitter{[se]=!1;[gi]=!1;[Se]=[];[ae]=[];[ge];[Be];[Qe];[Sr];[ot]=!1;[Ot]=!1;[is]=!1;[ns]=!1;[pi]=null;[oe]=0;[ee]=!1;[mi];[os]=!1;[Jt]=0;[ke]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");jS(r)?(this[ge]=!0,this[Be]=null):LS(r)?(this[Be]=r.encoding,this[ge]=!1):(this[ge]=!1,this[Be]=null),this[Qe]=!!r.async,this[Sr]=this[Be]?new Lp.StringDecoder(this[Be]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[ae]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Se]});let{signal:i}=r;i&&(this[mi]=i,i.aborted?this[Ho]():i.addEventListener("abort",()=>this[Ho]()))}get bufferLength(){return this[oe]}get encoding(){return this[Be]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ge]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Qe]}set async(e){this[Qe]=this[Qe]||!!e}[Ho](){this[os]=!0,this.emit("abort",this[mi]?.reason),this.destroy(this[mi]?.reason)}get aborted(){return this[os]}set aborted(e){}write(e,r,i){if(this[os])return!1;if(this[ot])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Qe]?yi:PS;if(!this[ge]&&!Buffer.isBuffer(e)){if(CS(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(qS(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ge]?(this[se]&&this[oe]!==0&&this[ss](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):e.length?(typeof e=="string"&&!(r===this[Be]&&!this[Sr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Be]&&(e=this[Sr].write(e)),this[se]&&this[oe]!==0&&this[ss](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):(this[oe]!==0&&this.emit("readable"),i&&n(i),this[se])}read(e){if(this[ee])return null;if(this[ke]=!1,this[oe]===0||e===0||e&&e>this[oe])return this[lt](),null;this[ge]&&(e=null),this[ae].length>1&&!this[ge]&&(this[ae]=[this[Be]?this[ae].join(""):Buffer.concat(this[ae],this[oe])]);let r=this[qp](e||null,this[ae][0]);return this[lt](),r}[qp](e,r){if(this[ge])this[as]();else{let i=r;e===i.length||e===null?this[as]():typeof i=="string"?(this[ae][0]=i.slice(e),r=i.slice(0,e),this[oe]-=e):(this[ae][0]=i.subarray(e),r=i.subarray(0,e),this[oe]-=e)}return this.emit("data",r),!this[ae].length&&!this[ot]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r="utf8"),e!==void 0&&this.write(e,r),i&&this.once("end",i),this[ot]=!0,this.writable=!1,(this[se]||!this[gi])&&this[lt](),this}[Er](){this[ee]||(!this[Jt]&&!this[Se].length&&(this[ke]=!0),this[gi]=!1,this[se]=!0,this.emit("resume"),this[ae].length?this[ss]():this[ot]?this[lt]():this.emit("drain"))}resume(){return this[Er]()}pause(){this[se]=!1,this[gi]=!0,this[ke]=!1}get destroyed(){return this[ee]}get flowing(){return this[se]}get paused(){return this[gi]}[Wo](e){this[ge]?this[oe]+=1:this[oe]+=e.length,this[ae].push(e)}[as](){return this[ge]?this[oe]-=1:this[oe]-=this[ae][0].length,this[ae].shift()}[ss](e=!1){do;while(this[Cp](this[as]())&&this[ae].length);!e&&!this[ae].length&&!this[ot]&&this.emit("drain")}[Cp](e){return this.emit("data",e),this[se]}pipe(e,r){if(this[ee])return e;this[ke]=!1;let i=this[Ot];return r=r||{},e===Dp.stdout||e===Dp.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Se].push(r.proxyErrors?new Go(this,e,r):new ls(this,e,r)),this[Qe]?yi(()=>this[Er]()):this[Er]()),e}unpipe(e){let r=this[Se].find(i=>i.dest===e);r&&(this[Se].length===1?(this[se]&&this[Jt]===0&&(this[se]=!1),this[Se]=[]):this[Se].splice(this[Se].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[ke]=!1,this[Jt]++,!this[Se].length&&!this[se]&&this[Er]();else if(e==="readable"&&this[oe]!==0)super.emit("readable");else if(DS(e)&&this[Ot])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[pi]){let n=r;this[Qe]?yi(()=>n.call(this,this[pi])):n.call(this,this[pi])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Jt]=this.listeners("data").length,this[Jt]===0&&!this[ke]&&!this[Se].length&&(this[se]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Jt]=0,!this[ke]&&!this[Se].length&&(this[se]=!1)),r}get emittedEnd(){return this[Ot]}[lt](){!this[is]&&!this[Ot]&&!this[ee]&&this[ae].length===0&&this[ot]&&(this[is]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ns]&&this.emit("close"),this[is]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[ge]&&!i?!1:this[Qe]?(yi(()=>this[Uo](i)),!0):this[Uo](i);if(e==="end")return this[jp]();if(e==="close"){if(this[ns]=!0,!this[Ot]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[pi]=i,super.emit(Bo,i);let s=!this[mi]||this.listeners("error").length?super.emit("error",i):!1;return this[lt](),s}else if(e==="resume"){let s=super.emit("resume");return this[lt](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...r);return this[lt](),n}[Uo](e){for(let i of this[Se])i.dest.write(e)===!1&&this.pause();let r=this[ke]?!1:super.emit("data",e);return this[lt](),r}[jp](){return this[Ot]?!1:(this[Ot]=!0,this.readable=!1,this[Qe]?(yi(()=>this[zo]()),!0):this[zo]())}[zo](){if(this[Sr]){let r=this[Sr].end();if(r){for(let i of this[Se])i.dest.write(r);this[ke]||super.emit("data",r)}}for(let r of this[Se])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ge]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[ge]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[ge])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Be]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ee,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ke]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[ot])return r();let s,a,o=p=>{this.off("data",l),this.off("end",u),this.off(ee,h),r(),a(p)},l=p=>{this.off("error",o),this.off("end",u),this.off(ee,h),this.pause(),s({value:p,done:!!this[ot]})},u=()=>{this.off("error",o),this.off("data",l),this.off(ee,h),r(),s({done:!0,value:void 0})},h=()=>o(new Error("stream destroyed"));return new Promise((p,c)=>{a=c,s=p,this.once(ee,h),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ke]=!1;let e=!1,r=()=>(this.pause(),this.off(Bo,r),this.off(ee,r),this.off("end",r),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(Bo,r),this.once(ee,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ee])return e?this.emit("error",e):this.emit(ee),this;this[ee]=!0,this[ke]=!0,this[ae].length=0,this[oe]=0;let r=this;return typeof r.close=="function"&&!this[ns]&&r.close(),e?this.emit("error",e):this.emit(ee),this}static get isStream(){return MS}};var FS=et.realpathSync.native,wi={lstatSync:et.lstatSync,readdir:et.readdir,readdirSync:et.readdirSync,readlinkSync:et.readlinkSync,realpathSync:FS,promises:{lstat:At.lstat,readdir:At.readdir,readlink:At.readlink,realpath:At.realpath}},Bp=t=>!t||t===wi||t===NS?wi:{...wi,...t,promises:{...wi.promises,...t.promises||{}}},Up=/^\\\\\?\\([a-z]:)\\?$/i,IS=t=>t.replace(/\//g,"\\").replace(Up,"$1\\"),$S=/[\\\/]/,Ne=0,zp=1,Hp=2,Xe=4,Gp=6,Yp=8,Zt=10,Vp=12,Le=15,bi=~Le,Vo=16,Np=32,vi=64,Ue=128,fs=256,cs=512,Fp=vi|Ue|cs,WS=1023,Ko=t=>t.isFile()?Yp:t.isDirectory()?Xe:t.isSymbolicLink()?Zt:t.isCharacterDevice()?Hp:t.isBlockDevice()?Gp:t.isSocket()?Vp:t.isFIFO()?zp:Ne,Ip=new Map,_i=t=>{let e=Ip.get(t);if(e)return e;let r=t.normalize("NFKD");return Ip.set(t,r),r},$p=new Map,hs=t=>{let e=$p.get(t);if(e)return e;let r=_i(t.toLowerCase());return $p.set(t,r),r},ds=class extends di{constructor(){super({max:256})}},Jo=class extends di{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},Kp=Symbol("PathScurry setAsCwd"),me=class{name;root;roots;parent;nocase;#e;#r;get dev(){return this.#r}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#u;get gid(){return this.#u}#h;get rdev(){return this.#h}#l;get blksize(){return this.#l}#a;get ino(){return this.#a}#t;get size(){return this.#t}#g;get blocks(){return this.#g}#y;get atimeMs(){return this.#y}#d;get mtimeMs(){return this.#d}#c;get ctimeMs(){return this.#c}#v;get birthtimeMs(){return this.#v}#m;get atime(){return this.#m}#x;get mtime(){return this.#x}#T;get ctime(){return this.#T}#_;get birthtime(){return this.#_}#w;#M;#p;#k;#O;#S;#n;#b;#P;#E;get path(){return(this.parent||this).fullpath()}constructor(e,r=Ne,i,n,s,a,o){this.name=e,this.#w=s?hs(e):_i(e),this.#n=r&WS,this.nocase=s,this.roots=n,this.root=i||this,this.#b=a,this.#p=o.fullpath,this.#O=o.relative,this.#S=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=Bp(o.fs)}depth(){return this.#M!==void 0?this.#M:this.parent?this.#M=this.parent.depth()+1:this.#M=0}childrenCache(){return this.#b}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#j(n):this.#j(n)}#j(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#b.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#b.set(this,r),this.#n&=~Vo,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?hs(e):_i(e);for(let l of i)if(l.#w===n)return l;let s=this.parent?this.sep:"",a=this.#p?this.#p+s+e:void 0,o=this.newChild(e,Ne,{...r,parent:this,fullpath:a});return this.canReaddir()||(o.#n|=Ue),i.push(o),o}relative(){if(this.#O!==void 0)return this.#O;let e=this.name,r=this.parent;if(!r)return this.#O=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.#S!==void 0)return this.#S;let e=this.name,r=this.parent;if(!r)return this.#S=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#p!==void 0)return this.#p;let e=this.name,r=this.parent;if(!r)return this.#p=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#p=n}fullpathPosix(){if(this.#k!==void 0)return this.#k;if(this.sep==="/")return this.#k=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#k=`//?/${n}`:this.#k=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#k=i}isUnknown(){return(this.#n&Le)===Ne}isType(e){return this[`is${e}`]()}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(this.#n&Le)===Yp}isDirectory(){return(this.#n&Le)===Xe}isCharacterDevice(){return(this.#n&Le)===Hp}isBlockDevice(){return(this.#n&Le)===Gp}isFIFO(){return(this.#n&Le)===zp}isSocket(){return(this.#n&Le)===Vp}isSymbolicLink(){return(this.#n&Zt)===Zt}lstatCached(){return this.#n&Np?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#E}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let e=this.#n&Le;return!(e!==Ne&&e!==Zt||this.#n&fs||this.#n&Ue)}calledReaddir(){return!!(this.#n&Vo)}isENOENT(){return!!(this.#n&Ue)}isNamed(e){return this.nocase?this.#w===hs(e):this.#w===_i(e)}async readlink(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}readlinkSync(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}#L(e){this.#n|=Vo;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#R()}}#R(){this.#n&Ue||(this.#n=(this.#n|Ue)&bi,this.#A())}#A(){let e=this.children();e.provisional=0;for(let r of e)r.#R()}#N(){this.#n|=cs,this.#D()}#D(){if(this.#n&vi)return;let e=this.#n;(e&Le)===Xe&&(e&=bi),this.#n=e|vi,this.#A()}#C(e=""){e==="ENOTDIR"||e==="EPERM"?this.#D():e==="ENOENT"?this.#R():this.children().provisional=0}#f(e=""){e==="ENOTDIR"?this.parent.#D():e==="ENOENT"&&this.#R()}#F(e=""){let r=this.#n;r|=fs,e==="ENOENT"&&(r|=Ue),(e==="EINVAL"||e==="UNKNOWN")&&(r&=bi),this.#n=r,e==="ENOTDIR"&&this.parent&&this.parent.#D()}#q(e,r){return this.#z(e,r)||this.#U(e,r)}#U(e,r){let i=Ko(e),n=this.newChild(e.name,i,{parent:this}),s=n.#n&Le;return s!==Xe&&s!==Zt&&s!==Ne&&(n.#n|=vi),r.unshift(n),r.provisional++,n}#z(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?hs(e.name):_i(e.name))===n.#w)return this.#H(e,n,i,r)}}#H(e,r,i,n){let s=r.name;return r.#n=r.#n&bi|Ko(e),s!==e.name&&(r.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(r)),n.provisional++,r}async lstat(){if(!(this.#n&Ue))try{return this.#B(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#f(e.code)}}lstatSync(){if(!(this.#n&Ue))try{return this.#B(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#f(e.code)}}#B(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:a,blocks:o,ctime:l,ctimeMs:u,dev:h,gid:p,ino:c,mode:f,mtime:y,mtimeMs:b,nlink:S,rdev:_,size:x,uid:R}=e;this.#m=r,this.#y=i,this.#_=n,this.#v=s,this.#l=a,this.#g=o,this.#T=l,this.#c=u,this.#r=h,this.#u=p,this.#a=c,this.#s=f,this.#x=y,this.#d=b,this.#i=S,this.#h=_,this.#t=x,this.#o=R;let O=Ko(e);this.#n=this.#n&bi|O|Np,O!==Ne&&O!==Xe&&O!==Zt&&(this.#n|=vi)}#$=[];#W=!1;#G(e){this.#W=!1;let r=this.#$.slice();this.#$.length=0,r.forEach(i=>i(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#$.push(e),this.#W)return;this.#W=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,a)=>{if(s)this.#C(s.code),i.provisional=0;else{for(let o of a)this.#q(o,i);this.#L(i)}this.#G(i.slice(0,i.provisional))})}#I;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#I)await this.#I;else{let i=()=>{};this.#I=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#q(n,e);this.#L(e)}catch(n){this.#C(n.code),e.provisional=0}this.#I=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let i of this.#e.readdirSync(r,{withFileTypes:!0}))this.#q(i,e);this.#L(e)}catch(i){this.#C(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#n&Fp)return!1;let e=Le&this.#n;return e===Ne||e===Xe||e===Zt}shouldWalk(e,r){return(this.#n&Xe)===Xe&&!(this.#n&Fp)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#E)return this.#E;if(!((cs|fs|Ue)&this.#n))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#E)return this.#E;if(!((cs|fs|Ue)&this.#n))try{let e=this.#e.realpathSync(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}[Kp](e){if(e===this)return;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#O=i.join(this.sep),n.#S=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#O=void 0,n.#S=void 0,n=n.parent}},ps=class t extends me{sep="\\";splitSep=$S;constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Rr.win32.parse(e).root}getRoot(e){if(e=IS(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,i]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=i;return this.roots[e]=new xr(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Up,"$1\\"),e===r}},gs=class t extends me{splitSep="/";sep="/";constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},ms=class{root;rootPath;roots;cwd;#e;#r;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=wi}={}){this.#i=Bp(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Wp.fileURLToPath)(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new ds,this.#r=new ds,this.#s=new Jo(s);let l=o.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1,p=r.sep,c=this.rootPath,f=!1;for(let y of l){let b=h--;u=u.child(y,{relative:new Array(b).fill("..").join(p),relativePosix:new Array(b).fill("..").join("/"),fullpath:c+=(f?"":p)+y}),f=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#e.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpath();return this.#e.set(r,n),n}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#r.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#r.set(r,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i}=r;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0}=r;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.readlink();return r?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return r?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.realpath();return r?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return r?i:i?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set,u=(p,c)=>{l.add(p),p.readdirCB((f,y)=>{if(f)return c(f);let b=y.length;if(!b)return c();let S=()=>{--b===0&&c()};for(let _ of y)(!s||s(_))&&o.push(i?_:_.fullpath()),n&&_.isSymbolicLink()?_.realpath().then(x=>x?.isUnknown()?x.lstat():x).then(x=>x?.shouldWalk(l,a)?u(x,S):S()):_.shouldWalk(l,a)?u(_,S):S()},!0)},h=e;return new Promise((p,c)=>{u(h,f=>{if(f)return c(f);p(o)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let h=u.readdirSync();for(let p of h){(!s||s(p))&&o.push(i?p:p.fullpath());let c=p;if(p.isSymbolicLink()){if(!(n&&(c=p.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(l,a)&&l.add(c)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r;(!s||s(e))&&(yield i?e:e.fullpath());let o=new Set([e]);for(let l of o){let u=l.readdirSync();for(let h of u){(!s||s(h))&&(yield i?h:h.fullpath());let p=h;if(h.isSymbolicLink()){if(!(n&&(p=h.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(o,a)&&o.add(p)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Mt({objectMode:!0});(!s||s(e))&&o.write(i?e:e.fullpath());let l=new Set,u=[e],h=0,p=()=>{let c=!1;for(;!c;){let f=u.shift();if(!f){h===0&&o.end();return}h++,l.add(f);let y=(S,_,x=!1)=>{if(S)return o.emit("error",S);if(n&&!x){let R=[];for(let O of _)O.isSymbolicLink()&&R.push(O.realpath().then(k=>k?.isUnknown()?k.lstat():k));if(R.length){Promise.all(R).then(()=>y(null,_,!0));return}}for(let R of _)R&&(!s||s(R))&&(o.write(i?R:R.fullpath())||(c=!0));h--;for(let R of _){let O=R.realpathCached()||R;O.shouldWalk(l,a)&&u.push(O)}c&&!o.flowing?o.once("drain",p):b||p()},b=!0;f.readdirCB(y,!0),b=!1}};return p(),o}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Mt({objectMode:!0}),l=new Set;(!s||s(e))&&o.write(i?e:e.fullpath());let u=[e],h=0,p=()=>{let c=!1;for(;!c;){let f=u.shift();if(!f){h===0&&o.end();return}h++,l.add(f);let y=f.readdirSync();for(let b of y)(!s||s(b))&&(o.write(i?b:b.fullpath())||(c=!0));h--;for(let b of y){let S=b;if(b.isSymbolicLink()){if(!(n&&(S=b.realpathSync())))continue;S.isUnknown()&&S.lstatSync()}S.shouldWalk(l,a)&&u.push(S)}}c&&!o.flowing&&o.once("drain",p)};return p(),o}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Kp](r)}},xr=class extends ms{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,Rr.win32,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Rr.win32.parse(e).root.toUpperCase()}newRoot(e){return new ps(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Tr=class extends ms{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,Rr.posix,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new gs(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Si=class extends Tr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},hx=process.platform==="win32"?ps:gs,Jp=process.platform==="win32"?xr:process.platform==="darwin"?Si:Tr;var Zp=require("url");var BS=t=>t.length>=1,US=t=>t.length>=1,Or=class t{#e;#r;#s;length;#i;#o;#u;#h;#l;#a;#t=!0;constructor(e,r,i,n){if(!BS(e))throw new TypeError("empty pattern list");if(!US(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#r=r,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,a,o,l,...u]=this.#e,[h,p,c,f,...y]=this.#r;u[0]===""&&(u.shift(),y.shift());let b=[s,a,o,l,""].join("/"),S=[h,p,c,f,""].join("/");this.#e=[b,...u],this.#r=[S,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...a]=this.#e,[o,...l]=this.#r;a[0]===""&&(a.shift(),l.shift());let u=s+"/",h=o+"/";this.#e=[u,...a],this.#r=[h,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===he}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#u=this.#u||(this.#s===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new t(this.#e,this.#r,this.#s+1,this.#i),this.#o.#a=this.#a,this.#o.#l=this.#l,this.#o.#h=this.#h,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#l!==void 0?this.#l:this.#l=this.#i==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#t)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#t?!1:(this.#t=!1,!0)}};var zS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ei=class{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=zS}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];let o={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let l of e){let u=new Ae(l,o);for(let h=0;h<u.set.length;h++){let p=u.set[h],c=u.globParts[h];if(!p||!c)throw new Error("invalid pattern object");for(;p[0]==="."&&c[0]===".";)p.shift(),c.shift();let f=new Or(p,c,0,a),y=new Ae(f.globString(),o),b=c[c.length-1]==="**",S=f.isAbsolute();S?this.absolute.push(y):this.relative.push(y),b&&(S?this.absoluteChildren.push(y):this.relativeChildren.push(y))}}}ignored(e){let r=e.fullpath(),i=`${r}/`,n=e.relative()||".",s=`${n}/`;for(let a of this.relative)if(a.match(n)||a.match(s))return!0;for(let a of this.absolute)if(a.match(r)||a.match(i))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(r))return!0;return!1}};var Zo=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let i=e.fullpath(),n=this.store.get(i);n?n.add(r.globString()):this.store.set(i,new Set([r.globString()]))}},Qo=class{store=new Map;add(e,r,i){let n=(r?2:0)|(i?1:0),s=this.store.get(e);this.store.set(e,s===void 0?n:n&s)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}},Xo=class{store=new Map;add(e,r){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(n=>n.globString()===r.globString())||i.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ri=class t{hasWalkedCache;matches=new Qo;subwalks=new Xo;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Zo}processPatterns(e,r){this.patterns=r;let i=r.map(n=>[e,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let a=s.root(),o=s.isAbsolute()&&this.opts.absolute!==!1;if(a){n=n.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let p=s.rest();if(p)s=p;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,h=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,h=!0;if(l=s.pattern(),u=s.rest(),h){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let p=l===".."||l===""||l===".";this.matches.add(n.resolve(l),o,p);continue}else if(l===he){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let p=u?.pattern(),c=u?.rest();if(!u||(p===""||p===".")&&!c)this.matches.add(n,o,p===""||p===".");else if(p===".."){let f=n.parent||n;c?this.hasWalkedCache.hasWalked(f,c)||this.subwalks.add(f,c):this.matches.add(f,o,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let i=this.subwalks.get(e),n=this.child();for(let s of r)for(let a of i){let o=a.isAbsolute(),l=a.pattern(),u=a.rest();l===he?n.testGlobstar(s,a,u,o):l instanceof RegExp?n.testRegExp(s,l,u,o):n.testString(s,l,u,o)}return n}testGlobstar(e,r,i,n){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(e,i):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let a=e.parent||e;this.subwalks.add(a,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,r,i,n){r.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,r,i,n){e.isNamed(r)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var HS=(t,e)=>typeof t=="string"?new Ei([t],e):Array.isArray(t)?new Ei(t,e):t,ys=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#r;#s;signal;maxDepth;constructor(e,r,i){this.patterns=e,this.path=r,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",i.ignore&&(this.#r=HS(i.ignore,i)),this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){return this.seen.has(e)||!!this.#r?.ignored?.(e)}#o(e){return!!this.#r?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=await s.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#i(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=s.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#i(e))return;let i=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+n)}else{let s=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!s.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(s?a+s+n:"."+n)}}async match(e,r,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,r)}matchSync(e,r,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,r)}walkCB(e,r,i){this.signal?.aborted&&i(),this.walkCB2(e,r,new Ri(this.opts),i)}walkCB2(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirCached();o.calledReaddir()?this.walkCB3(o,l,i,a):o.readdirCB((u,h)=>this.walkCB3(o,h,i,a),!0)}a()}walkCB3(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let[o,l]of i.subwalks.entries())s++,this.walkCB2(o,l,i.child(),a);a()}walkCBSync(e,r,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,r,new Ri(this.opts),i)}walkCB2Sync(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirSync();this.walkCB3Sync(o,l,i,a)}a()}walkCB3Sync(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let[o,l]of i.subwalks.entries())s++,this.walkCB2Sync(o,l,i.child(),a);a()}},xi=class extends ys{matches;constructor(e,r,i){super(e,r,i),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(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}},Ti=class extends ys{results;constructor(e,r,i){super(e,r,i),this.results=new Mt({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,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}};var GS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ze=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,Zp.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||GS,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?xr:r.platform==="darwin"?Si:r.platform?Tr:Jp;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new Ae(l,n)),[a,o]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=a.map((l,u)=>{let h=o[u];if(!h)throw new Error("invalid pattern object");return new Or(l,h,0,this.platform)})}async walk(){return[...await new xi(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}).walk()]}walkSync(){return[...new xi(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}).walkSync()]}stream(){return new Ti(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}).stream()}streamSync(){return new Ti(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}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var el=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new Ae(r,e).hasMagic())return!0;return!1};function ws(t,e={}){return new ze(t,e).streamSync()}function Xp(t,e={}){return new ze(t,e).stream()}function eg(t,e={}){return new ze(t,e).walkSync()}async function Qp(t,e={}){return new ze(t,e).walk()}function vs(t,e={}){return new ze(t,e).iterateSync()}function tg(t,e={}){return new ze(t,e).iterate()}var YS=ws,VS=Object.assign(Xp,{sync:ws}),KS=vs,JS=Object.assign(tg,{sync:vs}),ZS=Object.assign(eg,{stream:ws,iterate:vs}),bs=Object.assign(Qp,{glob:Qp,globSync:eg,sync:ZS,globStream:Xp,stream:VS,globStreamSync:ws,streamSync:YS,globIterate:tg,iterate:JS,globIterateSync:vs,iterateSync:KS,Glob:ze,hasMagic:el,escape:wr,unescape:We});bs.glob=bs;var QS="../build",XS="../wheels";async function sg(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`
|
|
36
|
-
`))}async function
|
|
5
|
+
`),Error.captureStackTrace(this,t)}};il.exports=t=>{if(t.length>2)throw new Os(t);function e(i={}){this.options=i}e.prototype.transform=t;function r(i){return new e(i)}return r.Format=e,r}});var ol=w((fE,al)=>{var sl={};al.exports=sl;var nl={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(nl).forEach(function(t){var e=nl[t],r=sl[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var ul=w((hE,ll)=>{"use strict";ll.exports=function(t,e){e=e||process.argv||[];var r=e.indexOf("--"),i=/^-{1,2}/.test(t)?"":"--",n=e.indexOf(i+t);return n!==-1&&(r===-1?!0:n<r)}});var hl=w((cE,fl)=>{"use strict";var wg=require("os"),Ie=ul(),we=process.env,er=void 0;Ie("no-color")||Ie("no-colors")||Ie("color=false")?er=!1:(Ie("color")||Ie("colors")||Ie("color=true")||Ie("color=always"))&&(er=!0);"FORCE_COLOR"in we&&(er=we.FORCE_COLOR.length===0||parseInt(we.FORCE_COLOR,10)!==0);function vg(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function _g(t){if(er===!1)return 0;if(Ie("color=16m")||Ie("color=full")||Ie("color=truecolor"))return 3;if(Ie("color=256"))return 2;if(t&&!t.isTTY&&er!==!0)return 0;var e=er?1:0;if(process.platform==="win32"){var r=wg.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in we)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in we})||we.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in we)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(we.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in we){var i=parseInt((we.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(we.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(we.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(we.TERM)||"COLORTERM"in we?1:(we.TERM==="dumb",e)}function Ms(t){var e=_g(t);return vg(e)}fl.exports={supportsColor:Ms,stdout:Ms(process.stdout),stderr:Ms(process.stderr)}});var dl=w((dE,cl)=>{cl.exports=function(e,r){var i="";e=e||"Run the trap, drop the bass",e=e.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(s){s=s.toLowerCase();var a=n[s]||[" "],o=Math.floor(Math.random()*a.length);typeof n[s]<"u"?i+=n[s][o]:i+=s}),i}});var gl=w((pE,pl)=>{pl.exports=function(e,r){e=e||" he is here ";var i={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},n=[].concat(i.up,i.down,i.mid);function s(l){var u=Math.floor(Math.random()*l);return u}function a(l){var u=!1;return n.filter(function(c){u=c===l}),u}function o(l,u){var c="",h,d;u=u||{},u.up=typeof u.up<"u"?u.up:!0,u.mid=typeof u.mid<"u"?u.mid:!0,u.down=typeof u.down<"u"?u.down:!0,u.size=typeof u.size<"u"?u.size:"maxi",l=l.split("");for(d in l)if(!a(d)){switch(c=c+l[d],h={up:0,down:0,mid:0},u.size){case"mini":h.up=s(8),h.mid=s(2),h.down=s(8);break;case"maxi":h.up=s(16)+3,h.mid=s(4)+1,h.down=s(64)+3;break;default:h.up=s(8)+1,h.mid=s(6)/2,h.down=s(8)+1;break}var f=["up","mid","down"];for(var y in f)for(var b=f[y],_=0;_<=h[b];_++)u[b]&&(c=c+i[b][s(i[b].length)])}return c}return o(e,r)}});var yl=w((gE,ml)=>{ml.exports=function(t){return function(e,r,i){if(e===" ")return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}}});var wl=w((mE,bl)=>{bl.exports=function(t){return function(e,r,i){return r%2===0?e:t.inverse(e)}}});var _l=w((yE,vl)=>{vl.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,i,n){return r===" "?r:t[e[i++%e.length]](r)}}});var El=w((bE,Sl)=>{Sl.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,i,n){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}}});var Al=w((vE,Ml)=>{var j={};Ml.exports=j;j.themes={};var Sg=require("util"),Ct=j.styles=ol(),xl=Object.defineProperties,Eg=new RegExp(/[\r\n]+/g);j.supportsColor=hl().supportsColor;typeof j.enabled>"u"&&(j.enabled=j.supportsColor()!==!1);j.enable=function(){j.enabled=!0};j.disable=function(){j.enabled=!1};j.stripColors=j.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var wE=j.stylize=function(e,r){if(!j.enabled)return e+"";var i=Ct[r];return!i&&r in j?j[r](e):i.open+e+i.close},Rg=/[|\\{}()[\]^$+*?.]/g,xg=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Rg,"\\$&")};function Tl(t){var e=function r(){return Og.apply(r,arguments)};return e._styles=t,e.__proto__=Tg,e}var Ol=function(){var t={};return Ct.grey=Ct.gray,Object.keys(Ct).forEach(function(e){Ct[e].closeRe=new RegExp(xg(Ct[e].close),"g"),t[e]={get:function(){return Tl(this._styles.concat(e))}}}),t}(),Tg=xl(function(){},Ol);function Og(){var t=Array.prototype.slice.call(arguments),e=t.map(function(a){return a!=null&&a.constructor===String?a:Sg.inspect(a)}).join(" ");if(!j.enabled||!e)return e;for(var r=e.indexOf(`
|
|
6
|
+
`)!=-1,i=this._styles,n=i.length;n--;){var s=Ct[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(Eg,function(a){return s.close+a+s.open}))}return e}j.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(r){j[r]=function(i){if(typeof t[r]=="object"){var n=i;for(var s in t[r])n=j[t[r][s]](n);return n}return j[t[r]](i)}})(e)};function Mg(){var t={};return Object.keys(Ol).forEach(function(e){t[e]={get:function(){return Tl([e])}}}),t}var Ag=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};j.trap=dl();j.zalgo=gl();j.maps={};j.maps.america=yl()(j);j.maps.zebra=wl()(j);j.maps.rainbow=_l()(j);j.maps.random=El()(j);for(Rl in j.maps)(function(t){j[t]=function(e){return Ag(j.maps[t],e)}})(Rl);var Rl;xl(j,Mg())});var As=w((_E,kl)=>{var kg=Al();kl.exports=kg});var Pl=w(ks=>{"use strict";ks.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};ks.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var Dl=w(Ps=>{"use strict";Ps.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};Ps.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var ql=w(Ds=>{"use strict";Ds.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};Ds.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var Cl=w(Ci=>{"use strict";Object.defineProperty(Ci,"cli",{value:Pl()});Object.defineProperty(Ci,"npm",{value:Dl()});Object.defineProperty(Ci,"syslog",{value:ql()})});var te=w(kr=>{"use strict";Object.defineProperty(kr,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(kr,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(kr,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(kr,"configs",{value:Cl()})});var Ni=w((OE,ji)=>{"use strict";var Ls=As(),{LEVEL:qs,MESSAGE:Cs}=te();Ls.enabled=!0;var Ll=/\s+/,Li=class t{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e}static addColors(e){let r=Object.keys(e).reduce((i,n)=>(i[n]=Ll.test(e[n])?e[n].split(Ll):e[n],i),{});return t.allColors=Object.assign({},t.allColors||{},r),t.allColors}addColors(e){return t.addColors(e)}colorize(e,r,i){if(typeof i>"u"&&(i=r),!Array.isArray(t.allColors[e]))return Ls[t.allColors[e]](i);for(let n=0,s=t.allColors[e].length;n<s;n++)i=Ls[t.allColors[e][n]](i);return i}transform(e,r){return r.all&&typeof e[Cs]=="string"&&(e[Cs]=this.colorize(e[qs],e.level,e[Cs])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[qs],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[qs],e.level,e.message)),e}};ji.exports=t=>new Li(t);ji.exports.Colorizer=ji.exports.Format=Li});var Nl=w((ME,jl)=>{"use strict";var{Colorizer:Pg}=Ni();jl.exports=t=>(Pg.addColors(t.colors||t),t)});var Il=w((AE,Fl)=>{"use strict";var Dg=Ee();Fl.exports=Dg(t=>(t.message=` ${t.message}`,t))});var Bl=w((kE,Wl)=>{"use strict";var qg=Ee(),{LEVEL:$l,MESSAGE:js}=te();Wl.exports=qg((t,{stack:e,cause:r})=>{if(t instanceof Error){let n=Object.assign({},t,{level:t.level,[$l]:t[$l]||t.level,message:t.message,[js]:t[js]||t.message});return e&&(n.stack=t.stack),r&&(n.cause=t.cause),n}if(!(t.message instanceof Error))return t;let i=t.message;return Object.assign(t,i),t.message=i.message,t[js]=i.message,e&&(t.stack=i.stack),r&&(t.cause=i.cause),t})});var Fs=w((PE,Ii)=>{"use strict";var{configs:Cg,LEVEL:Ul,MESSAGE:Ns}=te(),Fi=class t{constructor(e={levels:Cg.npm.levels}){this.paddings=t.paddingForLevels(e.levels,e.filler),this.options=e}static getLongestLevel(e){let r=Object.keys(e).map(i=>i.length);return Math.max(...r)}static paddingForLevel(e,r,i){let n=i+1-e.length,s=Math.floor(n/r.length);return`${r}${r.repeat(s)}`.slice(0,n)}static paddingForLevels(e,r=" "){let i=t.getLongestLevel(e);return Object.keys(e).reduce((n,s)=>(n[s]=t.paddingForLevel(s,r,i),n),{})}transform(e,r){return e.message=`${this.paddings[e[Ul]]}${e.message}`,e[Ns]&&(e[Ns]=`${this.paddings[e[Ul]]}${e[Ns]}`),e}};Ii.exports=t=>new Fi(t);Ii.exports.Padder=Ii.exports.Format=Fi});var zl=w((DE,Is)=>{"use strict";var{Colorizer:Lg}=Ni(),{Padder:jg}=Fs(),{configs:Ng,MESSAGE:Fg}=te(),$i=class{constructor(e={}){e.levels||(e.levels=Ng.cli.levels),this.colorizer=new Lg(e),this.padder=new jg(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[Fg]=`${e.level}:${e.message}`,e}};Is.exports=t=>new $i(t);Is.exports.Format=$i});var Gl=w((qE,$s)=>{"use strict";var Ig=Ee();function Hl(t){if(t.every($g))return e=>{let r=e;for(let i=0;i<t.length;i++)if(r=t[i].transform(r,t[i].options),!r)return!1;return r}}function $g(t){if(typeof t.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
|
|
7
|
+
`));return!0}$s.exports=(...t)=>{let e=Ig(Hl(t)),r=e();return r.Format=e.Format,r};$s.exports.cascade=Hl});var Pr=w((zs,Jl)=>{"use strict";var{hasOwnProperty:Wi}=Object.prototype,jt=Us();jt.configure=Us;jt.stringify=jt;jt.default=jt;zs.stringify=jt;zs.configure=Us;Jl.exports=jt;var Wg=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function ct(t){return t.length<5e3&&!Wg.test(t)?`"${t}"`:JSON.stringify(t)}function Ws(t){if(t.length>200)return t.sort();for(let e=1;e<t.length;e++){let r=t[e],i=e;for(;i!==0&&t[i-1]>r;)t[i]=t[i-1],i--;t[i]=r}return t}var Bg=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Bs(t){return Bg.call(t)!==void 0&&t.length!==0}function Yl(t,e,r){t.length<r&&(r=t.length);let i=e===","?"":" ",n=`"0":${i}${t[0]}`;for(let s=1;s<r;s++)n+=`${e}"${s}":${i}${t[s]}`;return n}function Ug(t){if(Wi.call(t,"circularValue")){let e=t.circularValue;if(typeof e=="string")return`"${e}"`;if(e==null)return e;if(e===Error||e===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Vl(t,e){let r;if(Wi.call(t,e)&&(r=t[e],typeof r!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return r===void 0?!0:r}function Kl(t,e){let r;if(Wi.call(t,e)){if(r=t[e],typeof r!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${e}" argument must be an integer`);if(r<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return r===void 0?1/0:r}function Lt(t){return t===1?"1 item":`${t} items`}function zg(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function Hg(t){if(Wi.call(t,"strict")){let e=t.strict;if(typeof e!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(e)return r=>{let i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function Us(t){t={...t};let e=Hg(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=Ug(t),i=Vl(t,"bigint"),n=Vl(t,"deterministic"),s=Kl(t,"maximumDepth"),a=Kl(t,"maximumBreadth");function o(d,f,y,b,_,E){let R=f[d];switch(typeof R=="object"&&R!==null&&typeof R.toJSON=="function"&&(R=R.toJSON(d)),R=b.call(f,d,R),typeof R){case"string":return ct(R);case"object":{if(R===null)return"null";if(y.indexOf(R)!==-1)return r;let x="",O=",",k=E;if(Array.isArray(R)){if(R.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(R),_!==""&&(E+=_,x+=`
|
|
8
|
+
${E}`,O=`,
|
|
9
|
+
${E}`);let K=Math.min(R.length,a),ye=0;for(;ye<K-1;ye++){let tt=o(String(ye),R,y,b,_,E);x+=tt!==void 0?tt:"null",x+=O}let be=o(String(ye),R,y,b,_,E);if(x+=be!==void 0?be:"null",R.length-1>a){let tt=R.length-a-1;x+=`${O}"... ${Lt(tt)} not stringified"`}return _!==""&&(x+=`
|
|
10
|
+
${k}`),y.pop(),`[${x}]`}let q=Object.keys(R),F=q.length;if(F===0)return"{}";if(s<y.length+1)return'"[Object]"';let N="",U="";_!==""&&(E+=_,O=`,
|
|
11
|
+
${E}`,N=" ");let ee=Math.min(F,a);n&&!Bs(R)&&(q=Ws(q)),y.push(R);for(let K=0;K<ee;K++){let ye=q[K],be=o(ye,R,y,b,_,E);be!==void 0&&(x+=`${U}${ct(ye)}:${N}${be}`,U=O)}if(F>a){let K=F-a;x+=`${U}"...":${N}"${Lt(K)} not stringified"`,U=O}return _!==""&&U.length>1&&(x=`
|
|
12
|
+
${E}${x}
|
|
13
|
+
${k}`),y.pop(),`{${x}}`}case"number":return isFinite(R)?String(R):e?e(R):"null";case"boolean":return R===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(R);default:return e?e(R):void 0}}function l(d,f,y,b,_,E){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(d)),typeof f){case"string":return ct(f);case"object":{if(f===null)return"null";if(y.indexOf(f)!==-1)return r;let R=E,x="",O=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f),_!==""&&(E+=_,x+=`
|
|
14
|
+
${E}`,O=`,
|
|
15
|
+
${E}`);let F=Math.min(f.length,a),N=0;for(;N<F-1;N++){let ee=l(String(N),f[N],y,b,_,E);x+=ee!==void 0?ee:"null",x+=O}let U=l(String(N),f[N],y,b,_,E);if(x+=U!==void 0?U:"null",f.length-1>a){let ee=f.length-a-1;x+=`${O}"... ${Lt(ee)} not stringified"`}return _!==""&&(x+=`
|
|
16
|
+
${R}`),y.pop(),`[${x}]`}y.push(f);let k="";_!==""&&(E+=_,O=`,
|
|
17
|
+
${E}`,k=" ");let q="";for(let F of b){let N=l(F,f[F],y,b,_,E);N!==void 0&&(x+=`${q}${ct(F)}:${k}${N}`,q=O)}return _!==""&&q.length>1&&(x=`
|
|
18
|
+
${E}${x}
|
|
19
|
+
${R}`),y.pop(),`{${x}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function u(d,f,y,b,_){switch(typeof f){case"string":return ct(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return u(d,f,y,b,_);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let E=_;if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f),_+=b;let N=`
|
|
20
|
+
${_}`,U=`,
|
|
21
|
+
${_}`,ee=Math.min(f.length,a),K=0;for(;K<ee-1;K++){let be=u(String(K),f[K],y,b,_);N+=be!==void 0?be:"null",N+=U}let ye=u(String(K),f[K],y,b,_);if(N+=ye!==void 0?ye:"null",f.length-1>a){let be=f.length-a-1;N+=`${U}"... ${Lt(be)} not stringified"`}return N+=`
|
|
22
|
+
${E}`,y.pop(),`[${N}]`}let R=Object.keys(f),x=R.length;if(x===0)return"{}";if(s<y.length+1)return'"[Object]"';_+=b;let O=`,
|
|
23
|
+
${_}`,k="",q="",F=Math.min(x,a);Bs(f)&&(k+=Yl(f,O,a),R=R.slice(f.length),F-=f.length,q=O),n&&(R=Ws(R)),y.push(f);for(let N=0;N<F;N++){let U=R[N],ee=u(U,f[U],y,b,_);ee!==void 0&&(k+=`${q}${ct(U)}: ${ee}`,q=O)}if(x>a){let N=x-a;k+=`${q}"...": "${Lt(N)} not stringified"`,q=O}return q!==""&&(k=`
|
|
24
|
+
${_}${k}
|
|
25
|
+
${E}`),y.pop(),`{${k}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function c(d,f,y){switch(typeof f){case"string":return ct(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return c(d,f,y);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let b="";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f);let O=Math.min(f.length,a),k=0;for(;k<O-1;k++){let F=c(String(k),f[k],y);b+=F!==void 0?F:"null",b+=","}let q=c(String(k),f[k],y);if(b+=q!==void 0?q:"null",f.length-1>a){let F=f.length-a-1;b+=`,"... ${Lt(F)} not stringified"`}return y.pop(),`[${b}]`}let _=Object.keys(f),E=_.length;if(E===0)return"{}";if(s<y.length+1)return'"[Object]"';let R="",x=Math.min(E,a);Bs(f)&&(b+=Yl(f,",",a),_=_.slice(f.length),x-=f.length,R=","),n&&(_=Ws(_)),y.push(f);for(let O=0;O<x;O++){let k=_[O],q=c(k,f[k],y);q!==void 0&&(b+=`${R}${ct(k)}:${q}`,R=",")}if(E>a){let O=E-a;b+=`${R}"...":"${Lt(O)} not stringified"`}return y.pop(),`{${b}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function h(d,f,y){if(arguments.length>1){let b="";if(typeof y=="number"?b=" ".repeat(Math.min(y,10)):typeof y=="string"&&(b=y.slice(0,10)),f!=null){if(typeof f=="function")return o("",{"":d},[],f,b,"");if(Array.isArray(f))return l("",d,[],zg(f),b,"")}if(b.length!==0)return u("",d,[],b,"")}return c("",d,[])}return h}});var Hs=w((CE,Zl)=>{"use strict";var Gg=Ee(),{MESSAGE:Yg}=te(),Vg=Pr();function Kg(t,e){return typeof e=="bigint"?e.toString():e}Zl.exports=Gg((t,e)=>{let r=Vg.configure(e);return t[Yg]=r(t,e.replacer||Kg,e.space),t})});var Xl=w((LE,Ql)=>{"use strict";var Jg=Ee();Ql.exports=Jg((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var tu=w((jE,eu)=>{"use strict";var Zg=Ee(),{MESSAGE:Qg}=te(),Xg=Pr();eu.exports=Zg(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[Qg]=Xg(e),t})});var iu=w((NE,ru)=>{"use strict";var em=Ee();function tm(t,e,r){let i=e.reduce((s,a)=>(s[a]=t[a],delete t[a],s),{}),n=Object.keys(t).reduce((s,a)=>(s[a]=t[a],delete t[a],s),{});return Object.assign(t,i,{[r]:n}),t}function rm(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}ru.exports=em((t,e={})=>{let r="metadata";e.key&&(r=e.key);let i=[];return!e.fillExcept&&!e.fillWith&&(i.push("level"),i.push("message")),e.fillExcept&&(i=e.fillExcept),i.length>0?tm(t,i,r):e.fillWith?rm(t,e.fillWith,r):t})});var su=w((FE,nu)=>{var tr=1e3,rr=tr*60,ir=rr*60,Nt=ir*24,im=Nt*7,nm=Nt*365.25;nu.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return sm(t);if(r==="number"&&isFinite(t))return e.long?om(t):am(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function sm(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*nm;case"weeks":case"week":case"w":return r*im;case"days":case"day":case"d":return r*Nt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ir;case"minutes":case"minute":case"mins":case"min":case"m":return r*rr;case"seconds":case"second":case"secs":case"sec":case"s":return r*tr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function am(t){var e=Math.abs(t);return e>=Nt?Math.round(t/Nt)+"d":e>=ir?Math.round(t/ir)+"h":e>=rr?Math.round(t/rr)+"m":e>=tr?Math.round(t/tr)+"s":t+"ms"}function om(t){var e=Math.abs(t);return e>=Nt?Bi(t,e,Nt,"day"):e>=ir?Bi(t,e,ir,"hour"):e>=rr?Bi(t,e,rr,"minute"):e>=tr?Bi(t,e,tr,"second"):t+" ms"}function Bi(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var ou=w((Dr,au)=>{"use strict";var lm=Ee(),um=su();au.exports=lm(t=>{let e=+new Date;return Dr.diff=e-(Dr.prevTime||e),Dr.prevTime=e,t.ms=`+${um(Dr.diff)}`,t})});var fu=w((IE,uu)=>{"use strict";var fm=require("util").inspect,hm=Ee(),{LEVEL:cm,MESSAGE:lu,SPLAT:dm}=te();uu.exports=hm((t,e={})=>{let r=Object.assign({},t);return delete r[cm],delete r[lu],delete r[dm],t[lu]=fm(r,!1,e.depth||null,e.colorize),t})});var hu=w(($E,zi)=>{"use strict";var{MESSAGE:pm}=te(),Ui=class{constructor(e){this.template=e}transform(e){return e[pm]=this.template(e),e}};zi.exports=t=>new Ui(t);zi.exports.Printf=zi.exports.Format=Ui});var pu=w((WE,du)=>{"use strict";var gm=Ee(),{MESSAGE:cu}=te(),mm=Pr();du.exports=gm(t=>{let e=mm(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[cu]=`${t.level}:${r} ${t.message} ${e}`:t[cu]=`${t.level}:${r} ${t.message}`,t})});var yu=w((BE,mu)=>{"use strict";var ym=require("util"),{SPLAT:gu}=te(),bm=/%[scdjifoO%]/g,wm=/%%/g,Gs=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[gu]||e.splat||[],s=i.match(wm),a=s&&s.length||0,l=r.length-a-n.length,u=l<0?n.splice(l,-1*l):[],c=u.length;if(c)for(let h=0;h<c;h++)Object.assign(e,u[h]);return e.message=ym.format(i,...n),e}transform(e){let r=e.message,i=e[gu]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(bm);if(!n&&(i||i.length)){let s=i.length>1?i.splice(0):i,a=s.length;if(a)for(let o=0;o<a;o++)Object.assign(e,s[o]);return e}return n?this._splat(e,n):e}};mu.exports=t=>new Gs(t)});var wu=w((Hi,bu)=>{(function(t,e){typeof Hi=="object"&&typeof bu<"u"?e(Hi):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(Hi,function(t){"use strict";var e=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",i="\\d\\d",n="\\d{3}",s="\\d{4}",a="[^\\s]+",o=/\[([^]*?)\]/gm;function l(S,M){for(var z=[],de=0,P=S.length;de<P;de++)z.push(S[de].substr(0,M));return z}var u=function(S){return function(M,z){var de=z[S].map(function(ke){return ke.toLowerCase()}),P=de.indexOf(M.toLowerCase());return P>-1?P:null}};function c(S){for(var M=[],z=1;z<arguments.length;z++)M[z-1]=arguments[z];for(var de=0,P=M;de<P.length;de++){var ke=P[de];for(var Fe in ke)S[Fe]=ke[Fe]}return S}var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],f=l(d,3),y=l(h,3),b={dayNamesShort:y,dayNames:h,monthNamesShort:f,monthNames:d,amPm:["am","pm"],DoFn:function(S){return S+["th","st","nd","rd"][S%10>3?0:(S-S%10!==10?1:0)*S%10]}},_=c({},b),E=function(S){return _=c(_,S)},R=function(S){return S.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},x=function(S,M){for(M===void 0&&(M=2),S=String(S);S.length<M;)S="0"+S;return S},O={D:function(S){return String(S.getDate())},DD:function(S){return x(S.getDate())},Do:function(S,M){return M.DoFn(S.getDate())},d:function(S){return String(S.getDay())},dd:function(S){return x(S.getDay())},ddd:function(S,M){return M.dayNamesShort[S.getDay()]},dddd:function(S,M){return M.dayNames[S.getDay()]},M:function(S){return String(S.getMonth()+1)},MM:function(S){return x(S.getMonth()+1)},MMM:function(S,M){return M.monthNamesShort[S.getMonth()]},MMMM:function(S,M){return M.monthNames[S.getMonth()]},YY:function(S){return x(String(S.getFullYear()),4).substr(2)},YYYY:function(S){return x(S.getFullYear(),4)},h:function(S){return String(S.getHours()%12||12)},hh:function(S){return x(S.getHours()%12||12)},H:function(S){return String(S.getHours())},HH:function(S){return x(S.getHours())},m:function(S){return String(S.getMinutes())},mm:function(S){return x(S.getMinutes())},s:function(S){return String(S.getSeconds())},ss:function(S){return x(S.getSeconds())},S:function(S){return String(Math.round(S.getMilliseconds()/100))},SS:function(S){return x(Math.round(S.getMilliseconds()/10),2)},SSS:function(S){return x(S.getMilliseconds(),3)},a:function(S,M){return S.getHours()<12?M.amPm[0]:M.amPm[1]},A:function(S,M){return S.getHours()<12?M.amPm[0].toUpperCase():M.amPm[1].toUpperCase()},ZZ:function(S){var M=S.getTimezoneOffset();return(M>0?"-":"+")+x(Math.floor(Math.abs(M)/60)*100+Math.abs(M)%60,4)},Z:function(S){var M=S.getTimezoneOffset();return(M>0?"-":"+")+x(Math.floor(Math.abs(M)/60),2)+":"+x(Math.abs(M)%60,2)}},k=function(S){return+S-1},q=[null,r],F=[null,a],N=["isPm",a,function(S,M){var z=S.toLowerCase();return z===M.amPm[0]?0:z===M.amPm[1]?1:null}],U=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(S){var M=(S+"").match(/([+-]|\d\d)/gi);if(M){var z=+M[1]*60+parseInt(M[2],10);return M[0]==="+"?z:-z}return 0}],ee={D:["day",r],DD:["day",i],Do:["day",r+a,function(S){return parseInt(S,10)}],M:["month",r,k],MM:["month",i,k],YY:["year",i,function(S){var M=new Date,z=+(""+M.getFullYear()).substr(0,2);return+(""+(+S>68?z-1:z)+S)}],h:["hour",r,void 0,"isPm"],hh:["hour",i,void 0,"isPm"],H:["hour",r],HH:["hour",i],m:["minute",r],mm:["minute",i],s:["second",r],ss:["second",i],YYYY:["year",s],S:["millisecond","\\d",function(S){return+S*100}],SS:["millisecond",i,function(S){return+S*10}],SSS:["millisecond",n],d:q,dd:q,ddd:F,dddd:F,MMM:["month",a,u("monthNamesShort")],MMMM:["month",a,u("monthNames")],a:N,A:N,ZZ:U,Z:U},K={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},ye=function(S){return c(K,S)},be=function(S,M,z){if(M===void 0&&(M=K.default),z===void 0&&(z={}),typeof S=="number"&&(S=new Date(S)),Object.prototype.toString.call(S)!=="[object Date]"||isNaN(S.getTime()))throw new Error("Invalid Date pass to format");M=K[M]||M;var de=[];M=M.replace(o,function(ke,Fe){return de.push(Fe),"@@@"});var P=c(c({},_),z);return M=M.replace(e,function(ke){return O[ke](S,P)}),M.replace(/@@@/g,function(){return de.shift()})};function tt(S,M,z){if(z===void 0&&(z={}),typeof M!="string")throw new Error("Invalid format in fecha parse");if(M=K[M]||M,S.length>1e3)return null;var de=new Date,P={year:de.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},ke=[],Fe=[],At=M.replace(o,function(Dt,ht){return Fe.push(R(ht)),"@@@"}),Qt={},ut={};At=R(At).replace(e,function(Dt){var ht=ee[Dt],Ar=ht[0],Pi=ht[1],Di=ht[3];if(Qt[Ar])throw new Error("Invalid format. "+Ar+" specified twice in format");return Qt[Ar]=!0,Di&&(ut[Di]=!0),ke.push(ht),"("+Pi+")"}),Object.keys(ut).forEach(function(Dt){if(!Qt[Dt])throw new Error("Invalid format. "+Dt+" is required in specified format")}),At=At.replace(/@@@/g,function(){return Fe.shift()});var kt=S.match(new RegExp(At,"i"));if(!kt)return null;for(var Ts=c(c({},_),z),xe=1;xe<kt.length;xe++){var Mi=ke[xe-1],Ai=Mi[0],ki=Mi[2],ft=ki?ki(kt[xe],Ts):+kt[xe];if(ft==null)return null;P[Ai]=ft}P.isPm===1&&P.hour!=null&&+P.hour!=12?P.hour=+P.hour+12:P.isPm===0&&+P.hour==12&&(P.hour=0);var Xt;if(P.timezoneOffset==null){Xt=new Date(P.year,P.month,P.day,P.hour,P.minute,P.second,P.millisecond);for(var Pt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],xe=0,Mr=Pt.length;xe<Mr;xe++)if(Qt[Pt[xe][0]]&&P[Pt[xe][0]]!==Xt[Pt[xe][1]]())return null}else if(Xt=new Date(Date.UTC(P.year,P.month,P.day,P.hour,P.minute-P.timezoneOffset,P.second,P.millisecond)),P.month>11||P.month<0||P.day>31||P.day<1||P.hour>23||P.hour<0||P.minute>59||P.minute<0||P.second>59||P.second<0)return null;return Xt}var xs={format:be,parse:tt,defaultI18n:b,setGlobalDateI18n:E,setGlobalDateMasks:ye};t.assign=c,t.default=xs,t.format=be,t.parse=tt,t.defaultI18n=b,t.setGlobalDateI18n=E,t.setGlobalDateMasks=ye,Object.defineProperty(t,"__esModule",{value:!0})})});var _u=w((UE,vu)=>{"use strict";var vm=wu(),_m=Ee();vu.exports=_m((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():vm.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Eu=w((zE,Su)=>{"use strict";var Ys=As(),Sm=Ee(),{MESSAGE:Vs}=te();Su.exports=Sm((t,e)=>(e.level!==!1&&(t.level=Ys.strip(t.level)),e.message!==!1&&(t.message=Ys.strip(String(t.message))),e.raw!==!1&&t[Vs]&&(t[Vs]=Ys.strip(String(t[Vs]))),t))});var Js=w(Ks=>{"use strict";var Em=Ks.format=Ee();Ks.levels=Nl();function le(t,e){Object.defineProperty(Em,t,{get(){return e()},configurable:!0})}le("align",function(){return Il()});le("errors",function(){return Bl()});le("cli",function(){return zl()});le("combine",function(){return Gl()});le("colorize",function(){return Ni()});le("json",function(){return Hs()});le("label",function(){return Xl()});le("logstash",function(){return tu()});le("metadata",function(){return iu()});le("ms",function(){return ou()});le("padLevels",function(){return Fs()});le("prettyPrint",function(){return fu()});le("printf",function(){return hu()});le("simple",function(){return pu()});le("splat",function(){return yu()});le("timestamp",function(){return _u()});le("uncolorize",function(){return Eu()})});var Zs=w(Gi=>{"use strict";var{format:Ru}=require("util");Gi.warn={deprecated(t){return()=>{throw new Error(Ru("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Ru("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
+
`))}},forFunctions(t,e,r){r.forEach(i=>{t[i]=Gi.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=Gi.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var xu=w((YE,Rm)=>{Rm.exports={name:"winston",description:"A logger for just about everything.",version:"3.17.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",mocha:"^10.3.0",nyc:"^17.1.0",rimraf:"5.0.1",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var Qs=w((VE,Tu)=>{Tu.exports=require("util").deprecate});var Xs=w((KE,Ou)=>{Ou.exports=require("stream")});var ta=w((JE,Au)=>{"use strict";function xm(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(ea,this,t)):process.nextTick(ea,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Yi,r):(r._writableState.errorEmitted=!0,process.nextTick(Mu,r,s)):process.nextTick(Mu,r,s):e?(process.nextTick(Yi,r),e(s)):process.nextTick(Yi,r)}),this)}function Mu(t,e){ea(t,e),Yi(t)}function Yi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Tm(){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 ea(t,e){t.emit("error",e)}function Om(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Au.exports={destroy:xm,undestroy:Tm,errorOrDestroy:Om}});var nr=w((ZE,Du)=>{"use strict";var Pu={};function De(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,Pu[t]=n}function ku(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Mm(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Am(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function km(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}De("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);De("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Mm(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Am(t," argument"))n=`The ${t} ${i} ${ku(e,"type")}`;else{let s=km(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${ku(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);De("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");De("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});De("ERR_STREAM_PREMATURE_CLOSE","Premature close");De("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});De("ERR_MULTIPLE_CALLBACK","Callback called multiple times");De("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");De("ERR_STREAM_WRITE_AFTER_END","write after end");De("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);De("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);De("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Du.exports.codes=Pu});var ra=w((QE,qu)=>{"use strict";var Pm=nr().codes.ERR_INVALID_OPT_VALUE;function Dm(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function qm(t,e,r,i){var n=Dm(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Pm(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}qu.exports={getHighWaterMark:qm}});var Cu=w((XE,ia)=>{typeof Object.create=="function"?ia.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ia.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var rt=w((e2,sa)=>{try{if(na=require("util"),typeof na.inherits!="function")throw"";sa.exports=na.inherits}catch{sa.exports=Cu()}var na});var $u=w((t2,Iu)=>{"use strict";function Lu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function ju(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lu(Object(r),!0).forEach(function(i){Cm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Cm(t,e,r){return e=Fu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Lm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Fu(i.key),i)}}function jm(t,e,r){return e&&Nu(t.prototype,e),r&&Nu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Fu(t){var e=Nm(t,"string");return typeof e=="symbol"?e:String(e)}function Nm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Fm=require("buffer"),Vi=Fm.Buffer,Im=require("util"),aa=Im.inspect,$m=aa&&aa.custom||"inspect";function Wm(t,e,r){Vi.prototype.copy.call(t,e,r)}Iu.exports=function(){function t(){Lm(this,t),this.head=null,this.tail=null,this.length=0}return jm(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Vi.alloc(0);for(var i=Vi.allocUnsafe(r>>>0),n=this.head,s=0;n;)Wm(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Vi.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:$m,value:function(r,i){return aa(this,ju(ju({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var la=w((oa,Bu)=>{var Ki=require("buffer"),Ge=Ki.Buffer;function Wu(t,e){for(var r in t)e[r]=t[r]}Ge.from&&Ge.alloc&&Ge.allocUnsafe&&Ge.allocUnsafeSlow?Bu.exports=Ki:(Wu(Ki,oa),oa.Buffer=Ft);function Ft(t,e,r){return Ge(t,e,r)}Ft.prototype=Object.create(Ge.prototype);Wu(Ge,Ft);Ft.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ge(t,e,r)};Ft.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ge(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Ft.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ge(t)};Ft.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ki.SlowBuffer(t)}});var ha=w(zu=>{"use strict";var fa=la().Buffer,Uu=fa.isEncoding||function(t){switch(t=""+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 Bm(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}}function Um(t){var e=Bm(t);if(typeof e!="string"&&(fa.isEncoding===Uu||!Uu(t)))throw new Error("Unknown encoding: "+t);return e||t}zu.StringDecoder=qr;function qr(t){this.encoding=Um(t);var e;switch(this.encoding){case"utf16le":this.text=Km,this.end=Jm,e=4;break;case"utf8":this.fillLast=Gm,e=4;break;case"base64":this.text=Zm,this.end=Qm,e=3;break;default:this.write=Xm,this.end=ey;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fa.allocUnsafe(e)}qr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)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||""};qr.prototype.end=Vm;qr.prototype.text=Ym;qr.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};function ua(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function zm(t,e,r){var i=e.length-1;if(i<r)return 0;var n=ua(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=ua(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=ua(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Hm(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Gm(t){var e=this.lastTotal-this.lastNeed,r=Hm(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Ym(t,e){var r=zm(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Vm(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Km(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 Jm(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 Zm(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?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 Qm(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Xm(t){return t.toString(this.encoding)}function ey(t){return t&&t.length?this.write(t):""}});var Vu=w((i2,Yu)=>{"use strict";var Hu=nr().codes.ERR_STREAM_PREMATURE_CLOSE;function ty(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function ry(){}function iy(t){return t.setHeader&&typeof t.abort=="function"}function Gu(t,e,r){if(typeof e=="function")return Gu(t,null,e);e||(e={}),r=ty(r||ry);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(y){r.call(t,y)},h=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new Hu),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Hu),r.call(t,y)},d=function(){t.req.on("finish",o)};return iy(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",h)}}Yu.exports=Gu});var Ju=w((n2,Ku)=>{"use strict";var Ji;function dt(t,e,r){return e=ny(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ny(t){var e=sy(t,"string");return typeof e=="symbol"?e:String(e)}function sy(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ay=Vu(),pt=Symbol("lastResolve"),It=Symbol("lastReject"),Cr=Symbol("error"),Zi=Symbol("ended"),$t=Symbol("lastPromise"),ca=Symbol("handlePromise"),Wt=Symbol("stream");function gt(t,e){return{value:t,done:e}}function oy(t){var e=t[pt];if(e!==null){var r=t[Wt].read();r!==null&&(t[$t]=null,t[pt]=null,t[It]=null,e(gt(r,!1)))}}function ly(t){process.nextTick(oy,t)}function uy(t,e){return function(r,i){t.then(function(){if(e[Zi]){r(gt(void 0,!0));return}e[ca](r,i)},i)}}var fy=Object.getPrototypeOf(function(){}),hy=Object.setPrototypeOf((Ji={get stream(){return this[Wt]},next:function(){var e=this,r=this[Cr];if(r!==null)return Promise.reject(r);if(this[Zi])return Promise.resolve(gt(void 0,!0));if(this[Wt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Cr]?o(e[Cr]):a(gt(void 0,!0))})});var i=this[$t],n;if(i)n=new Promise(uy(i,this));else{var s=this[Wt].read();if(s!==null)return Promise.resolve(gt(s,!1));n=new Promise(this[ca])}return this[$t]=n,n}},dt(Ji,Symbol.asyncIterator,function(){return this}),dt(Ji,"return",function(){var e=this;return new Promise(function(r,i){e[Wt].destroy(null,function(n){if(n){i(n);return}r(gt(void 0,!0))})})}),Ji),fy),cy=function(e){var r,i=Object.create(hy,(r={},dt(r,Wt,{value:e,writable:!0}),dt(r,pt,{value:null,writable:!0}),dt(r,It,{value:null,writable:!0}),dt(r,Cr,{value:null,writable:!0}),dt(r,Zi,{value:e._readableState.endEmitted,writable:!0}),dt(r,ca,{value:function(s,a){var o=i[Wt].read();o?(i[$t]=null,i[pt]=null,i[It]=null,s(gt(o,!1))):(i[pt]=s,i[It]=a)},writable:!0}),r));return i[$t]=null,ay(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[It];s!==null&&(i[$t]=null,i[pt]=null,i[It]=null,s(n)),i[Cr]=n;return}var a=i[pt];a!==null&&(i[$t]=null,i[pt]=null,i[It]=null,a(gt(void 0,!0))),i[Zi]=!0}),e.on("readable",ly.bind(null,i)),i};Ku.exports=cy});var ef=w((s2,Xu)=>{"use strict";function Zu(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function dy(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Zu(s,i,n,a,o,"next",l)}function o(l){Zu(s,i,n,a,o,"throw",l)}a(void 0)})}}function Qu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function py(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qu(Object(r),!0).forEach(function(i){gy(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function gy(t,e,r){return e=my(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function my(t){var e=yy(t,"string");return typeof e=="symbol"?e:String(e)}function yy(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var by=nr().codes.ERR_INVALID_ARG_TYPE;function wy(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new by("iterable",["Iterable"],e);var n=new t(py({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=dy(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}Xu.exports=wy});var cf=w((o2,hf)=>{"use strict";hf.exports=W;var sr;W.ReadableState=sf;var a2=require("events").EventEmitter,nf=function(e,r){return e.listeners(r).length},jr=Xs(),Qi=require("buffer").Buffer,vy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _y(t){return Qi.from(t)}function Sy(t){return Qi.isBuffer(t)||t instanceof vy}var da=require("util"),C;da&&da.debuglog?C=da.debuglog("stream"):C=function(){};var Ey=$u(),va=ta(),Ry=ra(),xy=Ry.getHighWaterMark,Xi=nr().codes,Ty=Xi.ERR_INVALID_ARG_TYPE,Oy=Xi.ERR_STREAM_PUSH_AFTER_EOF,My=Xi.ERR_METHOD_NOT_IMPLEMENTED,Ay=Xi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ar,pa,ga;rt()(W,jr);var Lr=va.errorOrDestroy,ma=["error","close","destroy","pause","resume"];function ky(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function sf(t,e,r){sr=sr||Nr(),t=t||{},typeof r!="boolean"&&(r=e instanceof sr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=xy(this,t,"readableHighWaterMark",r),this.buffer=new Ey,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.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(ar||(ar=ha().StringDecoder),this.decoder=new ar(t.encoding),this.encoding=t.encoding)}function W(t){if(sr=sr||Nr(),!(this instanceof W))return new W(t);var e=this instanceof sr;this._readableState=new sf(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),jr.call(this)}Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});W.prototype.destroy=va.destroy;W.prototype._undestroy=va.undestroy;W.prototype._destroy=function(t,e){e(t)};W.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Qi.from(t,e),e=""),i=!0),af(this,t,e,!1,i)};W.prototype.unshift=function(t){return af(this,t,null,!0,!1)};function af(t,e,r,i,n){C("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,qy(t,s);else{var a;if(n||(a=Py(s,e)),a)Lr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Qi.prototype&&(e=_y(e)),i)s.endEmitted?Lr(t,new Ay):ya(t,s,e,!0);else if(s.ended)Lr(t,new Oy);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?ya(t,s,e,!1):wa(t,s)):ya(t,s,e,!1)}else i||(s.reading=!1,wa(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function ya(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&en(t)),wa(t,e)}function Py(t,e){var r;return!Sy(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Ty("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){ar||(ar=ha().StringDecoder);var e=new ar(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var tf=1073741824;function Dy(t){return t>=tf?t=tf:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function rf(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Dy(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}W.prototype.read=function(t){C("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return C("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ba(this):en(this),null;if(t=rf(t,e),t===0&&e.ended)return e.length===0&&ba(this),null;var i=e.needReadable;C("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,C("length less than watermark",i)),e.ended||e.reading?(i=!1,C("reading or ended",i)):i&&(C("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=rf(r,e)));var n;return t>0?n=uf(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ba(this)),n!==null&&this.emit("data",n),n};function qy(t,e){if(C("onEofChunk"),!e.ended){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,e.sync?en(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,of(t)))}}function en(t){var e=t._readableState;C("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(C("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(of,t))}function of(t){var e=t._readableState;C("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,_a(t)}function wa(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Cy,t,e))}function Cy(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(C("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}W.prototype._read=function(t){Lr(this,new My("_read()"))};W.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,C("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(_,E){C("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){C("onend"),t.end()}var l=Ly(r);t.on("drain",l);var u=!1;function c(){C("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",h);function h(_){C("ondata");var E=t.write(_);C("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&ff(i.pipes,t)!==-1)&&!u&&(C("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){C("onerror",_),b(),t.removeListener("error",d),nf(t,"error")===0&&Lr(t,_)}ky(t,"error",d);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){C("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){C("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(C("pipe resume"),r.resume()),t};function Ly(t){return function(){var r=t._readableState;C("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&nf(t,"data")&&(r.flowing=!0,_a(t))}}W.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(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 a=ff(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};W.prototype.on=function(t,e){var r=jr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,C("on readable",i.length,i.reading),i.length?en(this):i.reading||process.nextTick(jy,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=jr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(lf,this),r};W.prototype.removeAllListeners=function(t){var e=jr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(lf,this),e};function lf(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function jy(t){C("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){var t=this._readableState;return t.flowing||(C("resume"),t.flowing=!t.readableListening,Ny(this,t)),t.paused=!1,this};function Ny(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Fy,t,e))}function Fy(t,e){C("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),_a(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return C("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(C("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function _a(t){var e=t._readableState;for(C("flow",e.flowing);e.flowing&&t.read()!==null;);}W.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(C("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(C("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<ma.length;s++)t.on(ma[s],this.emit.bind(this,ma[s]));return this._read=function(a){C("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(W.prototype[Symbol.asyncIterator]=function(){return pa===void 0&&(pa=Ju()),pa(this)});Object.defineProperty(W.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(W.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(W.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});W._fromList=uf;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function uf(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ba(t){var e=t._readableState;C("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Iy,e,t))}function Iy(t,e){if(C("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(W.from=function(t,e){return ga===void 0&&(ga=ef()),ga(W,t,e)});function ff(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Nr=w((l2,pf)=>{"use strict";var $y=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};pf.exports=Ye;var df=cf(),Ea=Ra();rt()(Ye,df);for(Sa=$y(Ea.prototype),tn=0;tn<Sa.length;tn++)rn=Sa[tn],Ye.prototype[rn]||(Ye.prototype[rn]=Ea.prototype[rn]);var Sa,rn,tn;function Ye(t){if(!(this instanceof Ye))return new Ye(t);df.call(this,t),Ea.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Wy)))}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Wy(){this._writableState.ended||process.nextTick(By,this)}function By(t){t.end()}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Ra=w((u2,vf)=>{"use strict";vf.exports=G;function mf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){g0(e,t)}}var or;G.WritableState=Ir;var Uy={deprecate:Qs()},yf=Xs(),sn=require("buffer").Buffer,zy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Hy(t){return sn.from(t)}function Gy(t){return sn.isBuffer(t)||t instanceof zy}var Ta=ta(),Yy=ra(),Vy=Yy.getHighWaterMark,mt=nr().codes,Ky=mt.ERR_INVALID_ARG_TYPE,Jy=mt.ERR_METHOD_NOT_IMPLEMENTED,Zy=mt.ERR_MULTIPLE_CALLBACK,Qy=mt.ERR_STREAM_CANNOT_PIPE,Xy=mt.ERR_STREAM_DESTROYED,e0=mt.ERR_STREAM_NULL_VALUES,t0=mt.ERR_STREAM_WRITE_AFTER_END,r0=mt.ERR_UNKNOWN_ENCODING,lr=Ta.errorOrDestroy;rt()(G,yf);function i0(){}function Ir(t,e,r){or=or||Nr(),t=t||{},typeof r!="boolean"&&(r=e instanceof or),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Vy(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){f0(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new mf(this)}Ir.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ir.prototype,"buffer",{get:Uy.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var nn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(nn=Function.prototype[Symbol.hasInstance],Object.defineProperty(G,Symbol.hasInstance,{value:function(e){return nn.call(this,e)?!0:this!==G?!1:e&&e._writableState instanceof Ir}})):nn=function(e){return e instanceof this};function G(t){or=or||Nr();var e=this instanceof or;if(!e&&!nn.call(G,this))return new G(t);this._writableState=new Ir(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),yf.call(this)}G.prototype.pipe=function(){lr(this,new Qy)};function n0(t,e){var r=new t0;lr(t,r),process.nextTick(e,r)}function s0(t,e,r,i){var n;return r===null?n=new e0:typeof r!="string"&&!e.objectMode&&(n=new Ky("chunk",["string","Buffer"],r)),n?(lr(t,n),process.nextTick(i,n),!1):!0}G.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Gy(t);return s&&!sn.isBuffer(t)&&(t=Hy(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=i0),i.ending?n0(this,r):(s||s0(this,i,t,r))&&(i.pendingcb++,n=o0(this,i,s,t,e,r)),n};G.prototype.cork=function(){this._writableState.corked++};G.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&bf(this,t))};G.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new r0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(G.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function a0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=sn.from(e,r)),e}Object.defineProperty(G.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o0(t,e,r,i,n,s){if(!r){var a=a0(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else xa(t,e,!1,o,i,n,s);return l}function xa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Xy("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function l0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Fr,t,e),t._writableState.errorEmitted=!0,lr(t,i)):(n(i),t._writableState.errorEmitted=!0,lr(t,i),Fr(t,e))}function u0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function f0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Zy;if(u0(r),e)l0(t,r,i,e,n);else{var s=wf(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&bf(t,r),i?process.nextTick(gf,t,r,s,n):gf(t,r,s,n)}}function gf(t,e,r,i){r||h0(t,e),e.pendingcb--,i(),Fr(t,e)}function h0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function bf(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,xa(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new mf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(xa(t,e,!1,h,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}G.prototype._write=function(t,e,r){r(new Jy("_write()"))};G.prototype._writev=null;G.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||p0(this,i,r),this};Object.defineProperty(G.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function wf(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function c0(t,e){t._final(function(r){e.pendingcb--,r&&lr(t,r),e.prefinished=!0,t.emit("prefinish"),Fr(t,e)})}function d0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(c0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Fr(t,e){var r=wf(e);if(r&&(d0(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function p0(t,e,r){e.ending=!0,Fr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function g0(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(G.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});G.prototype.destroy=Ta.destroy;G.prototype._undestroy=Ta.undestroy;G.prototype._destroy=function(t,e){e(t)}});var Oa=w((f2,Ef)=>{"use strict";var m0=require("util"),_f=Ra(),{LEVEL:Sf}=te(),$r=Ef.exports=function(e={}){_f.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};m0.inherits($r,_f);$r.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);let n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[Sf]]){if(e&&!this.format)return this.log(e,i);let s,a;try{a=this.format.transform(Object.assign({},e),this.format.options)}catch(o){s=o}if(s||!a){if(i(),s)throw s;return}return this.log(a,i)}return this._writableState.sync=!1,i(null)};$r.prototype._writev=function(e,r){if(this.logv){let i=e.filter(this._accept,this);return i.length?this.logv(i,r):r(null)}for(let i=0;i<e.length;i++){if(!this._accept(e[i]))continue;if(e[i].chunk&&!this.format){this.log(e[i].chunk,e[i].callback);continue}let n,s;try{s=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(a){n=a}if(n||!s){if(e[i].callback(),n)throw r(null),n}else this.log(s,e[i].callback)}return r(null)};$r.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let i=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!i||this.levels[i]>=this.levels[r[Sf]])&&(this.handleExceptions||r.exception!==!0))};$r.prototype._nop=function(){}});var Aa=w((h2,xf)=>{"use strict";var y0=require("util"),{LEVEL:Ma}=te(),Rf=Oa(),Wr=xf.exports=function(e={}){if(Rf.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(i){this.emit("error",i,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};y0.inherits(Wr,Rf);Wr.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[Ma]])&&this.transport.log(e[Ma],e.message,e,this._nop),i(null)};Wr.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[Ma],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};Wr.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
27
|
+
`))};Wr.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var ur=w((c2,ka)=>{"use strict";ka.exports=Oa();ka.exports.LegacyTransportStream=Aa()});var Mf=w((p2,Of)=>{"use strict";var b0=require("os"),{LEVEL:Tf,MESSAGE:fr}=te(),w0=ur();Of.exports=class extends w0{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:b0.EOL,this.forceConsole=e.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[Tf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[fr]}${this.eol}`):this._consoleError(e[fr]),r&&r();return}else if(this.consoleWarnLevels[e[Tf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[fr]}${this.eol}`):this._consoleWarn(e[fr]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[fr]}${this.eol}`):this._consoleLog(e[fr]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}}});var on=w((an,Af)=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.default=v0;function v0(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}Af.exports=an.default});var Pf=w((ln,kf)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};kf.exports=ln.default});var Cf=w(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.fallback=Df;yt.wrap=qf;var _0=yt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,S0=yt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,E0=yt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function Df(t){setTimeout(t,0)}function qf(t){return(e,...r)=>t(()=>e(...r))}var Br;_0?Br=queueMicrotask:S0?Br=setImmediate:E0?Br=process.nextTick:Br=Df;yt.default=qf(Br)});var If=w((un,Ff)=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.default=A0;var R0=Pf(),x0=Nf(R0),T0=Cf(),O0=Nf(T0),M0=Bt();function Nf(t){return t&&t.__esModule?t:{default:t}}function A0(t){return(0,M0.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return Lf(i,r)}:(0,x0.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return Lf(i,r);r(null,i)})}function Lf(t,e){return t.then(r=>{jf(e,null,r)},r=>{jf(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function jf(t,e,r){try{t(e,r)}catch(i){(0,O0.default)(n=>{throw n},i)}}Ff.exports=un.default});var Bt=w(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.isAsyncIterable=it.isAsyncGenerator=it.isAsync=void 0;var k0=If(),P0=D0(k0);function D0(t){return t&&t.__esModule?t:{default:t}}function $f(t){return t[Symbol.toStringTag]==="AsyncFunction"}function q0(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function C0(t){return typeof t[Symbol.asyncIterator]=="function"}function L0(t){if(typeof t!="function")throw new Error("expected a function");return $f(t)?(0,P0.default)(t):t}it.default=L0;it.isAsync=$f;it.isAsyncGenerator=q0;it.isAsyncIterable=C0});var hr=w((fn,Wf)=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.default=j0;function j0(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,s)=>{i[e-1]=(a,...o)=>{if(a)return s(a);n(o.length>1?o:o[0])},t.apply(this,i)})}return r}Wf.exports=fn.default});var Uf=w((hn,Bf)=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});var N0=on(),F0=Pa(N0),I0=Bt(),$0=Pa(I0),W0=hr(),B0=Pa(W0);function Pa(t){return t&&t.__esModule?t:{default:t}}hn.default=(0,B0.default)((t,e,r)=>{var i=(0,F0.default)(e)?[]:{};t(e,(n,s,a)=>{(0,$0.default)(n)((o,...l)=>{l.length<2&&([l]=l),i[s]=l,a(o)})},n=>r(n,i))},3);Bf.exports=hn.default});var Da=w((cn,zf)=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.default=U0;function U0(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}zf.exports=cn.default});var Gf=w((dn,Hf)=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Hf.exports=dn.default});var Kf=w((pn,Vf)=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.default=Z0;var z0=on(),H0=Yf(z0),G0=Gf(),Y0=Yf(G0);function Yf(t){return t&&t.__esModule?t:{default:t}}function V0(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function K0(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function J0(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return s==="__proto__"?n():r<i?{value:t[s],key:s}:null}}function Z0(t){if((0,H0.default)(t))return V0(t);var e=(0,Y0.default)(t);return e?K0(e):J0(t)}Vf.exports=pn.default});var qa=w((gn,Jf)=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.default=Q0;function Q0(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Jf.exports=gn.default});var yn=w((mn,Zf)=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});var X0={};mn.default=X0;Zf.exports=mn.default});var Xf=w((bn,Qf)=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.default=ib;var eb=yn(),tb=rb(eb);function rb(t){return t&&t.__esModule?t:{default:t}}function ib(t,e,r,i){let n=!1,s=!1,a=!1,o=0,l=0;function u(){o>=e||a||n||(a=!0,t.next().then(({value:d,done:f})=>{if(!(s||n)){if(a=!1,f){n=!0,o<=0&&i(null);return}o++,r(d,l,c),l++,u()}}).catch(h))}function c(d,f){if(o-=1,!s){if(d)return h(d);if(d===!1){n=!0,s=!0;return}if(f===tb.default||n&&o<=0)return n=!0,i(null);u()}}function h(d){s||(a=!1,n=!0,i(d))}u()}Qf.exports=bn.default});var ih=w((wn,rh)=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});var nb=Da(),sb=Ur(nb),ab=Kf(),ob=Ur(ab),lb=qa(),ub=Ur(lb),eh=Bt(),fb=Xf(),th=Ur(fb),hb=yn(),cb=Ur(hb);function Ur(t){return t&&t.__esModule?t:{default:t}}wn.default=t=>(e,r,i)=>{if(i=(0,sb.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,eh.isAsyncGenerator)(e))return(0,th.default)(e,t,r,i);if((0,eh.isAsyncIterable)(e))return(0,th.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,ob.default)(e),s=!1,a=!1,o=0,l=!1;function u(h,d){if(!a)if(o-=1,h)s=!0,i(h);else if(h===!1)s=!0,a=!0;else{if(d===cb.default||s&&o<=0)return s=!0,i(null);l||c()}}function c(){for(l=!0;o<t&&!s;){var h=n();if(h===null){s=!0,o<=0&&i(null);return}o+=1,r(h.value,h.key,(0,ub.default)(u))}l=!1}c()};rh.exports=wn.default});var La=w((vn,nh)=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var db=ih(),pb=Ca(db),gb=Bt(),mb=Ca(gb),yb=hr(),bb=Ca(yb);function Ca(t){return t&&t.__esModule?t:{default:t}}function wb(t,e,r,i){return(0,pb.default)(e)(t,(0,mb.default)(r),i)}vn.default=(0,bb.default)(wb,4);nh.exports=vn.default});var oh=w((_n,ah)=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});var vb=La(),_b=sh(vb),Sb=hr(),Eb=sh(Sb);function sh(t){return t&&t.__esModule?t:{default:t}}function Rb(t,e,r){return(0,_b.default)(t,1,e,r)}_n.default=(0,Eb.default)(Rb,3);ah.exports=_n.default});var fh=w((Sn,uh)=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.default=Ab;var xb=Uf(),Tb=lh(xb),Ob=oh(),Mb=lh(Ob);function lh(t){return t&&t.__esModule?t:{default:t}}function Ab(t,e){return(0,Tb.default)(Mb.default,t,e)}uh.exports=Sn.default});var ja=w((y2,hh)=>{hh.exports=require("stream")});var yh=w((b2,mh)=>{"use strict";function ch(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function dh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ch(Object(r),!0).forEach(function(i){kb(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function kb(t,e,r){return e=gh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,gh(i.key),i)}}function Db(t,e,r){return e&&ph(t.prototype,e),r&&ph(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function gh(t){var e=qb(t,"string");return typeof e=="symbol"?e:String(e)}function qb(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Cb=require("buffer"),En=Cb.Buffer,Lb=require("util"),Na=Lb.inspect,jb=Na&&Na.custom||"inspect";function Nb(t,e,r){En.prototype.copy.call(t,e,r)}mh.exports=function(){function t(){Pb(this,t),this.head=null,this.tail=null,this.length=0}return Db(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return En.alloc(0);for(var i=En.allocUnsafe(r>>>0),n=this.head,s=0;n;)Nb(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=En.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:jb,value:function(r,i){return Na(this,dh(dh({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var Ia=w((w2,wh)=>{"use strict";function Fb(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Fa,this,t)):process.nextTick(Fa,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Rn,r):(r._writableState.errorEmitted=!0,process.nextTick(bh,r,s)):process.nextTick(bh,r,s):e?(process.nextTick(Rn,r),e(s)):process.nextTick(Rn,r)}),this)}function bh(t,e){Fa(t,e),Rn(t)}function Rn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Ib(){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 Fa(t,e){t.emit("error",e)}function $b(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}wh.exports={destroy:Fb,undestroy:Ib,errorOrDestroy:$b}});var bt=w((v2,Sh)=>{"use strict";var _h={};function qe(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,_h[t]=n}function vh(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Wb(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Bb(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Ub(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}qe("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);qe("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Wb(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Bb(t," argument"))n=`The ${t} ${i} ${vh(e,"type")}`;else{let s=Ub(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${vh(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);qe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qe("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});qe("ERR_STREAM_PREMATURE_CLOSE","Premature close");qe("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});qe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qe("ERR_STREAM_WRITE_AFTER_END","write after end");qe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qe("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);qe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Sh.exports.codes=_h});var $a=w((_2,Eh)=>{"use strict";var zb=bt().codes.ERR_INVALID_OPT_VALUE;function Hb(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Gb(t,e,r,i){var n=Hb(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new zb(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Eh.exports={getHighWaterMark:Gb}});var Ua=w((S2,Ah)=>{"use strict";Ah.exports=Y;function xh(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ww(e,t)}}var cr;Y.WritableState=Hr;var Yb={deprecate:Qs()},Th=ja(),Tn=require("buffer").Buffer,Vb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Kb(t){return Tn.from(t)}function Jb(t){return Tn.isBuffer(t)||t instanceof Vb}var Ba=Ia(),Zb=$a(),Qb=Zb.getHighWaterMark,wt=bt().codes,Xb=wt.ERR_INVALID_ARG_TYPE,ew=wt.ERR_METHOD_NOT_IMPLEMENTED,tw=wt.ERR_MULTIPLE_CALLBACK,rw=wt.ERR_STREAM_CANNOT_PIPE,iw=wt.ERR_STREAM_DESTROYED,nw=wt.ERR_STREAM_NULL_VALUES,sw=wt.ERR_STREAM_WRITE_AFTER_END,aw=wt.ERR_UNKNOWN_ENCODING,dr=Ba.errorOrDestroy;rt()(Y,Th);function ow(){}function Hr(t,e,r){cr=cr||Ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof cr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Qb(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){pw(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new xh(this)}Hr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Hr.prototype,"buffer",{get:Yb.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var xn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(xn=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return xn.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof Hr}})):xn=function(e){return e instanceof this};function Y(t){cr=cr||Ut();var e=this instanceof cr;if(!e&&!xn.call(Y,this))return new Y(t);this._writableState=new Hr(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Th.call(this)}Y.prototype.pipe=function(){dr(this,new rw)};function lw(t,e){var r=new sw;dr(t,r),process.nextTick(e,r)}function uw(t,e,r,i){var n;return r===null?n=new nw:typeof r!="string"&&!e.objectMode&&(n=new Xb("chunk",["string","Buffer"],r)),n?(dr(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Jb(t);return s&&!Tn.isBuffer(t)&&(t=Kb(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=ow),i.ending?lw(this,r):(s||uw(this,i,t,r))&&(i.pendingcb++,n=hw(this,i,s,t,e,r)),n};Y.prototype.cork=function(){this._writableState.corked++};Y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Oh(this,t))};Y.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new aw(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function fw(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Tn.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function hw(t,e,r,i,n,s){if(!r){var a=fw(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Wa(t,e,!1,o,i,n,s);return l}function Wa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new iw("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function cw(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(zr,t,e),t._writableState.errorEmitted=!0,dr(t,i)):(n(i),t._writableState.errorEmitted=!0,dr(t,i),zr(t,e))}function dw(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function pw(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new tw;if(dw(r),e)cw(t,r,i,e,n);else{var s=Mh(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Oh(t,r),i?process.nextTick(Rh,t,r,s,n):Rh(t,r,s,n)}}function Rh(t,e,r,i){r||gw(t,e),e.pendingcb--,i(),zr(t,e)}function gw(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Oh(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,Wa(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new xh(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(Wa(t,e,!1,h,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Y.prototype._write=function(t,e,r){r(new ew("_write()"))};Y.prototype._writev=null;Y.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||bw(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Mh(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function mw(t,e){t._final(function(r){e.pendingcb--,r&&dr(t,r),e.prefinished=!0,t.emit("prefinish"),zr(t,e)})}function yw(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(mw,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function zr(t,e){var r=Mh(e);if(r&&(yw(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function bw(t,e,r){e.ending=!0,zr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function ww(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Y.prototype.destroy=Ba.destroy;Y.prototype._undestroy=Ba.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var Ut=w((E2,Ph)=>{"use strict";var vw=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Ph.exports=Ve;var kh=Ga(),Ha=Ua();rt()(Ve,kh);for(za=vw(Ha.prototype),On=0;On<za.length;On++)Mn=za[On],Ve.prototype[Mn]||(Ve.prototype[Mn]=Ha.prototype[Mn]);var za,Mn,On;function Ve(t){if(!(this instanceof Ve))return new Ve(t);kh.call(this,t),Ha.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",_w)))}Object.defineProperty(Ve.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ve.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ve.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function _w(){this._writableState.ended||process.nextTick(Sw,this)}function Sw(t){t.end()}Object.defineProperty(Ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Ka=w(qh=>{"use strict";var Va=la().Buffer,Dh=Va.isEncoding||function(t){switch(t=""+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 Ew(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}}function Rw(t){var e=Ew(t);if(typeof e!="string"&&(Va.isEncoding===Dh||!Dh(t)))throw new Error("Unknown encoding: "+t);return e||t}qh.StringDecoder=Gr;function Gr(t){this.encoding=Rw(t);var e;switch(this.encoding){case"utf16le":this.text=kw,this.end=Pw,e=4;break;case"utf8":this.fillLast=Ow,e=4;break;case"base64":this.text=Dw,this.end=qw,e=3;break;default:this.write=Cw,this.end=Lw;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Va.allocUnsafe(e)}Gr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)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||""};Gr.prototype.end=Aw;Gr.prototype.text=Mw;Gr.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};function Ya(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function xw(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Ya(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Ya(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Ya(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Tw(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Ow(t){var e=this.lastTotal-this.lastNeed,r=Tw(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Mw(t,e){var r=xw(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Aw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function kw(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 Pw(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 Dw(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?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 qw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Cw(t){return t.toString(this.encoding)}function Lw(t){return t&&t.length?this.write(t):""}});var An=w((x2,jh)=>{"use strict";var Ch=bt().codes.ERR_STREAM_PREMATURE_CLOSE;function jw(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function Nw(){}function Fw(t){return t.setHeader&&typeof t.abort=="function"}function Lh(t,e,r){if(typeof e=="function")return Lh(t,null,e);e||(e={}),r=jw(r||Nw);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(y){r.call(t,y)},h=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new Ch),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Ch),r.call(t,y)},d=function(){t.req.on("finish",o)};return Fw(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",h)}}jh.exports=Lh});var Fh=w((T2,Nh)=>{"use strict";var kn;function vt(t,e,r){return e=Iw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Iw(t){var e=$w(t,"string");return typeof e=="symbol"?e:String(e)}function $w(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ww=An(),_t=Symbol("lastResolve"),zt=Symbol("lastReject"),Yr=Symbol("error"),Pn=Symbol("ended"),Ht=Symbol("lastPromise"),Ja=Symbol("handlePromise"),Gt=Symbol("stream");function St(t,e){return{value:t,done:e}}function Bw(t){var e=t[_t];if(e!==null){var r=t[Gt].read();r!==null&&(t[Ht]=null,t[_t]=null,t[zt]=null,e(St(r,!1)))}}function Uw(t){process.nextTick(Bw,t)}function zw(t,e){return function(r,i){t.then(function(){if(e[Pn]){r(St(void 0,!0));return}e[Ja](r,i)},i)}}var Hw=Object.getPrototypeOf(function(){}),Gw=Object.setPrototypeOf((kn={get stream(){return this[Gt]},next:function(){var e=this,r=this[Yr];if(r!==null)return Promise.reject(r);if(this[Pn])return Promise.resolve(St(void 0,!0));if(this[Gt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Yr]?o(e[Yr]):a(St(void 0,!0))})});var i=this[Ht],n;if(i)n=new Promise(zw(i,this));else{var s=this[Gt].read();if(s!==null)return Promise.resolve(St(s,!1));n=new Promise(this[Ja])}return this[Ht]=n,n}},vt(kn,Symbol.asyncIterator,function(){return this}),vt(kn,"return",function(){var e=this;return new Promise(function(r,i){e[Gt].destroy(null,function(n){if(n){i(n);return}r(St(void 0,!0))})})}),kn),Hw),Yw=function(e){var r,i=Object.create(Gw,(r={},vt(r,Gt,{value:e,writable:!0}),vt(r,_t,{value:null,writable:!0}),vt(r,zt,{value:null,writable:!0}),vt(r,Yr,{value:null,writable:!0}),vt(r,Pn,{value:e._readableState.endEmitted,writable:!0}),vt(r,Ja,{value:function(s,a){var o=i[Gt].read();o?(i[Ht]=null,i[_t]=null,i[zt]=null,s(St(o,!1))):(i[_t]=s,i[zt]=a)},writable:!0}),r));return i[Ht]=null,Ww(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[zt];s!==null&&(i[Ht]=null,i[_t]=null,i[zt]=null,s(n)),i[Yr]=n;return}var a=i[_t];a!==null&&(i[Ht]=null,i[_t]=null,i[zt]=null,a(St(void 0,!0))),i[Pn]=!0}),e.on("readable",Uw.bind(null,i)),i};Nh.exports=Yw});var Bh=w((O2,Wh)=>{"use strict";function Ih(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function Vw(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Ih(s,i,n,a,o,"next",l)}function o(l){Ih(s,i,n,a,o,"throw",l)}a(void 0)})}}function $h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Kw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$h(Object(r),!0).forEach(function(i){Jw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$h(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Jw(t,e,r){return e=Zw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zw(t){var e=Qw(t,"string");return typeof e=="symbol"?e:String(e)}function Qw(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Xw=bt().codes.ERR_INVALID_ARG_TYPE;function ev(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new Xw("iterable",["Iterable"],e);var n=new t(Kw({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Vw(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}Wh.exports=ev});var Ga=w((A2,Qh)=>{"use strict";Qh.exports=B;var pr;B.ReadableState=Gh;var M2=require("events").EventEmitter,Hh=function(e,r){return e.listeners(r).length},Kr=ja(),Dn=require("buffer").Buffer,tv=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function rv(t){return Dn.from(t)}function iv(t){return Dn.isBuffer(t)||t instanceof tv}var Za=require("util"),L;Za&&Za.debuglog?L=Za.debuglog("stream"):L=function(){};var nv=yh(),no=Ia(),sv=$a(),av=sv.getHighWaterMark,qn=bt().codes,ov=qn.ERR_INVALID_ARG_TYPE,lv=qn.ERR_STREAM_PUSH_AFTER_EOF,uv=qn.ERR_METHOD_NOT_IMPLEMENTED,fv=qn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,gr,Qa,Xa;rt()(B,Kr);var Vr=no.errorOrDestroy,eo=["error","close","destroy","pause","resume"];function hv(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Gh(t,e,r){pr=pr||Ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof pr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=av(this,t,"readableHighWaterMark",r),this.buffer=new nv,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.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(gr||(gr=Ka().StringDecoder),this.decoder=new gr(t.encoding),this.encoding=t.encoding)}function B(t){if(pr=pr||Ut(),!(this instanceof B))return new B(t);var e=this instanceof pr;this._readableState=new Gh(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Kr.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});B.prototype.destroy=no.destroy;B.prototype._undestroy=no.undestroy;B.prototype._destroy=function(t,e){e(t)};B.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Dn.from(t,e),e=""),i=!0),Yh(this,t,e,!1,i)};B.prototype.unshift=function(t){return Yh(this,t,null,!0,!1)};function Yh(t,e,r,i,n){L("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,pv(t,s);else{var a;if(n||(a=cv(s,e)),a)Vr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Dn.prototype&&(e=rv(e)),i)s.endEmitted?Vr(t,new fv):to(t,s,e,!0);else if(s.ended)Vr(t,new lv);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?to(t,s,e,!1):io(t,s)):to(t,s,e,!1)}else i||(s.reading=!1,io(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function to(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Cn(t)),io(t,e)}function cv(t,e){var r;return!iv(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new ov("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){gr||(gr=Ka().StringDecoder);var e=new gr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Uh=1073741824;function dv(t){return t>=Uh?t=Uh:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function zh(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=dv(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}B.prototype.read=function(t){L("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return L("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ro(this):Cn(this),null;if(t=zh(t,e),t===0&&e.ended)return e.length===0&&ro(this),null;var i=e.needReadable;L("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,L("length less than watermark",i)),e.ended||e.reading?(i=!1,L("reading or ended",i)):i&&(L("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=zh(r,e)));var n;return t>0?n=Jh(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ro(this)),n!==null&&this.emit("data",n),n};function pv(t,e){if(L("onEofChunk"),!e.ended){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,e.sync?Cn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Vh(t)))}}function Cn(t){var e=t._readableState;L("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(L("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Vh,t))}function Vh(t){var e=t._readableState;L("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,so(t)}function io(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(gv,t,e))}function gv(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(L("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}B.prototype._read=function(t){Vr(this,new uv("_read()"))};B.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,L("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(_,E){L("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){L("onend"),t.end()}var l=mv(r);t.on("drain",l);var u=!1;function c(){L("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",h);function h(_){L("ondata");var E=t.write(_);L("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Zh(i.pipes,t)!==-1)&&!u&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){L("onerror",_),b(),t.removeListener("error",d),Hh(t,"error")===0&&Vr(t,_)}hv(t,"error",d);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){L("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){L("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(L("pipe resume"),r.resume()),t};function mv(t){return function(){var r=t._readableState;L("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Hh(t,"data")&&(r.flowing=!0,so(t))}}B.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(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 a=Zh(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};B.prototype.on=function(t,e){var r=Kr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,L("on readable",i.length,i.reading),i.length?Cn(this):i.reading||process.nextTick(yv,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=Kr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Kh,this),r};B.prototype.removeAllListeners=function(t){var e=Kr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Kh,this),e};function Kh(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function yv(t){L("readable nexttick read 0"),t.read(0)}B.prototype.resume=function(){var t=this._readableState;return t.flowing||(L("resume"),t.flowing=!t.readableListening,bv(this,t)),t.paused=!1,this};function bv(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(wv,t,e))}function wv(t,e){L("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),so(t),e.flowing&&!e.reading&&t.read(0)}B.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(L("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function so(t){var e=t._readableState;for(L("flow",e.flowing);e.flowing&&t.read()!==null;);}B.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(L("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(L("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<eo.length;s++)t.on(eo[s],this.emit.bind(this,eo[s]));return this._read=function(a){L("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return Qa===void 0&&(Qa=Fh()),Qa(this)});Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});B._fromList=Jh;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Jh(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ro(t){var e=t._readableState;L("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(vv,e,t))}function vv(t,e){if(L("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(B.from=function(t,e){return Xa===void 0&&(Xa=Bh()),Xa(B,t,e)});function Zh(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ao=w((k2,ec)=>{"use strict";ec.exports=nt;var Ln=bt().codes,_v=Ln.ERR_METHOD_NOT_IMPLEMENTED,Sv=Ln.ERR_MULTIPLE_CALLBACK,Ev=Ln.ERR_TRANSFORM_ALREADY_TRANSFORMING,Rv=Ln.ERR_TRANSFORM_WITH_LENGTH_0,jn=Ut();rt()(nt,jn);function xv(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Sv);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function nt(t){if(!(this instanceof nt))return new nt(t);jn.call(this,t),this._transformState={afterTransform:xv.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Tv)}function Tv(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Xh(t,e,r)}):Xh(this,null,null)}nt.prototype.push=function(t,e){return this._transformState.needTransform=!1,jn.prototype.push.call(this,t,e)};nt.prototype._transform=function(t,e,r){r(new _v("_transform()"))};nt.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)}};nt.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};nt.prototype._destroy=function(t,e){jn.prototype._destroy.call(this,t,function(r){e(r)})};function Xh(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Rv;if(t._transformState.transforming)throw new Ev;return t.push(null)}});var ic=w((P2,rc)=>{"use strict";rc.exports=Jr;var tc=ao();rt()(Jr,tc);function Jr(t){if(!(this instanceof Jr))return new Jr(t);tc.call(this,t)}Jr.prototype._transform=function(t,e,r){r(null,t)}});var lc=w((D2,oc)=>{"use strict";var oo;function Ov(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var ac=bt().codes,Mv=ac.ERR_MISSING_ARGS,Av=ac.ERR_STREAM_DESTROYED;function nc(t){if(t)throw t}function kv(t){return t.setHeader&&typeof t.abort=="function"}function Pv(t,e,r,i){i=Ov(i);var n=!1;t.on("close",function(){n=!0}),oo===void 0&&(oo=An()),oo(t,{readable:e,writable:r},function(a){if(a)return i(a);n=!0,i()});var s=!1;return function(a){if(!n&&!s){if(s=!0,kv(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new Av("pipe"))}}}function sc(t){t()}function Dv(t,e){return t.pipe(e)}function qv(t){return!t.length||typeof t[t.length-1]!="function"?nc:t.pop()}function Cv(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=qv(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Mv("streams");var n,s=e.map(function(a,o){var l=o<e.length-1,u=o>0;return Pv(a,l,u,function(c){n||(n=c),c&&s.forEach(sc),!l&&(s.forEach(sc),i(n))})});return e.reduce(Dv)}oc.exports=Cv});var Yt=w((Ce,Qr)=>{var Zr=require("stream");process.env.READABLE_STREAM==="disable"&&Zr?(Qr.exports=Zr.Readable,Object.assign(Qr.exports,Zr),Qr.exports.Stream=Zr):(Ce=Qr.exports=Ga(),Ce.Stream=Zr||Ce,Ce.Readable=Ce,Ce.Writable=Ua(),Ce.Duplex=Ut(),Ce.Transform=ao(),Ce.PassThrough=ic(),Ce.finished=An(),Ce.pipeline=lc())});var go=w((q2,fc)=>{var mr=[],Xr=[],lo=function(){};function fo(t){return~mr.indexOf(t)?!1:(mr.push(t),!0)}function ho(t){lo=t}function Lv(t){for(var e=[],r=0;r<mr.length;r++){if(mr[r].async){e.push(mr[r]);continue}if(mr[r](t))return!0}return e.length?new Promise(function(n){Promise.all(e.map(function(a){return a(t)})).then(function(a){n(a.some(Boolean))})}):!1}function co(t){return~Xr.indexOf(t)?!1:(Xr.push(t),!0)}function uo(){lo.apply(lo,arguments)}function uc(t){for(var e=0;e<Xr.length;e++)t=Xr[e].apply(Xr[e],arguments);return t}function po(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function jv(t){return t.enabled=!1,t.modify=co,t.set=ho,t.use=fo,po(function(){return!1},t)}function Nv(t){function e(){var r=Array.prototype.slice.call(arguments,0);return uo.call(uo,t,uc(r,t)),!0}return t.enabled=!0,t.modify=co,t.set=ho,t.use=fo,po(e,t)}fc.exports=function(e){return e.introduce=po,e.enabled=Lv,e.process=uc,e.modify=co,e.write=uo,e.nope=jv,e.yep=Nv,e.set=ho,e.use=fo,e}});var cc=w((C2,hc)=>{var Fv=go(),Iv=Fv(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});hc.exports=Iv});var pc=w((L2,dc)=>{"use strict";dc.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var mc=w((j2,gc)=>{gc.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var wc=w((N2,bc)=>{"use strict";var $v=mc(),Wv=Array.prototype.concat,Bv=Array.prototype.slice,yc=bc.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];$v(s)?r=Wv.call(r,Bv.call(s)):r.push(s)}return r};yc.wrap=function(t){return function(){return t(yc(arguments))}}});var Ec=w((F2,Sc)=>{var ei=pc(),ti=wc(),vc=Object.hasOwnProperty,_c=Object.create(null);for(Nn in ei)vc.call(ei,Nn)&&(_c[ei[Nn]]=Nn);var Nn,Te=Sc.exports={to:{},get:{}};Te.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Te.get.hsl(t),i="hsl";break;case"hwb":r=Te.get.hwb(t),i="hwb";break;default:r=Te.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Te.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],o,l,u;if(o=t.match(r)){for(u=o[2],o=o[1],l=0;l<3;l++){var c=l*2;a[l]=parseInt(o.slice(c,c+2),16)}u&&(a[3]=parseInt(u,16)/255)}else if(o=t.match(e)){for(o=o[1],u=o[3],l=0;l<3;l++)a[l]=parseInt(o[l]+o[l],16);u&&(a[3]=parseInt(u+u,16)/255)}else if(o=t.match(i)){for(l=0;l<3;l++)a[l]=parseInt(o[l+1],0);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else if(o=t.match(n)){for(l=0;l<3;l++)a[l]=Math.round(parseFloat(o[l+1])*2.55);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else return(o=t.match(s))?o[1]==="transparent"?[0,0,0,0]:vc.call(ei,o[1])?(a=ei[o[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=Et(a[l],0,255);return a[3]=Et(a[3],0,1),a};Te.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Et(parseFloat(r[2]),0,100),a=Et(parseFloat(r[3]),0,100),o=Et(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Te.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Et(parseFloat(r[2]),0,100),a=Et(parseFloat(r[3]),0,100),o=Et(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Te.to.hex=function(){var t=ti(arguments);return"#"+Fn(t[0])+Fn(t[1])+Fn(t[2])+(t[3]<1?Fn(Math.round(t[3]*255)):"")};Te.to.rgb=function(){var t=ti(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};Te.to.rgb.percent=function(){var t=ti(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};Te.to.hsl=function(){var t=ti(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Te.to.hwb=function(){var t=ti(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Te.to.keyword=function(t){return _c[t.slice(0,3)]};function Et(t,e,r){return Math.min(Math.max(e,t),r)}function Fn(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var xc=w((I2,Rc)=>{"use strict";Rc.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var mo=w(($2,Ac)=>{var Vt=xc(),Mc={};for(In in Vt)Vt.hasOwnProperty(In)&&(Mc[Vt[In]]=In);var In,A=Ac.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(ve in A)if(A.hasOwnProperty(ve)){if(!("channels"in A[ve]))throw new Error("missing channels property: "+ve);if(!("labels"in A[ve]))throw new Error("missing channel labels property: "+ve);if(A[ve].labels.length!==A[ve].channels)throw new Error("channel and label counts mismatch: "+ve);Tc=A[ve].channels,Oc=A[ve].labels,delete A[ve].channels,delete A[ve].labels,Object.defineProperty(A[ve],"channels",{value:Tc}),Object.defineProperty(A[ve],"labels",{value:Oc})}var Tc,Oc,ve;A.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=s-n,o,l,u;return s===n?o=0:e===s?o=(r-i)/a:r===s?o=2+(i-e)/a:i===s&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),u=(n+s)/2,s===n?l=0:u<=.5?l=a/(s+n):l=a/(2-s-n),[o,l*100,u*100]};A.rgb.hsv=function(t){var e,r,i,n,s,a=t[0]/255,o=t[1]/255,l=t[2]/255,u=Math.max(a,o,l),c=u-Math.min(a,o,l),h=function(d){return(u-d)/6/c+1/2};return c===0?n=s=0:(s=c/u,e=h(a),r=h(o),i=h(l),a===u?n=i-r:o===u?n=1/3+e-i:l===u&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,u*100]};A.rgb.hwb=function(t){var e=t[0],r=t[1],i=t[2],n=A.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};A.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n,s,a,o;return o=Math.min(1-e,1-r,1-i),n=(1-e-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-i-o)/(1-o)||0,[n*100,s*100,a*100,o*100]};function Uv(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}A.rgb.keyword=function(t){var e=Mc[t];if(e)return e;var r=1/0,i;for(var n in Vt)if(Vt.hasOwnProperty(n)){var s=Vt[n],a=Uv(t,s);a<r&&(r=a,i=n)}return i};A.keyword.rgb=function(t){return Vt[t]};A.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var n=e*.4124+r*.3576+i*.1805,s=e*.2126+r*.7152+i*.0722,a=e*.0193+r*.1192+i*.9505;return[n*100,s*100,a*100]};A.rgb.lab=function(t){var e=A.rgb.xyz(t),r=e[0],i=e[1],n=e[2],s,a,o;return r/=95.047,i/=100,n/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,s=116*i-16,a=500*(r-i),o=200*(i-n),[s,a,o]};A.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s,a,o,l;if(r===0)return l=i*255,[l,l,l];i<.5?s=i*(1+r):s=i+r-i*r,n=2*i-s,o=[0,0,0];for(var u=0;u<3;u++)a=e+1/3*-(u-1),a<0&&a++,a>1&&a--,6*a<1?l=n+(s-n)*6*a:2*a<1?l=s:3*a<2?l=n+(s-n)*(2/3-a)*6:l=n,o[u]=l*255;return o};A.hsl.hsv=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01),a,o;return i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s,o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r),[e,a*100,o*100]};A.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),a=255*i*(1-r),o=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,a];case 1:return[o,i,a];case 2:return[a,i,l];case 3:return[a,o,i];case 4:return[l,a,i];case 5:return[i,a,o]}};A.hsv.hsl=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,a,o;return o=(2-r)*i,s=(2-r)*n,a=r*n,a/=s<=1?s:2-s,a=a||0,o/=2,[e,a*100,o*100]};A.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s,a,o,l;n>1&&(r/=n,i/=n),s=Math.floor(6*e),a=1-i,o=6*e-s,s&1&&(o=1-o),l=r+o*(a-r);var u,c,h;switch(s){default:case 6:case 0:u=a,c=l,h=r;break;case 1:u=l,c=a,h=r;break;case 2:u=r,c=a,h=l;break;case 3:u=r,c=l,h=a;break;case 4:u=l,c=r,h=a;break;case 5:u=a,c=r,h=l;break}return[u*255,c*255,h*255]};A.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s,a,o;return s=1-Math.min(1,e*(1-n)+n),a=1-Math.min(1,r*(1-n)+n),o=1-Math.min(1,i*(1-n)+n),[s*255,a*255,o*255]};A.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,a;return n=e*3.2406+r*-1.5372+i*-.4986,s=e*-.9689+r*1.8758+i*.0415,a=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[n*255,s*255,a*255]};A.xyz.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return e/=95.047,r/=100,i/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=116*r-16,s=500*(e-r),a=200*(r-i),[n,s,a]};A.lab.xyz=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;s=(e+16)/116,n=r/500+s,a=s-i/200;var o=Math.pow(s,3),l=Math.pow(n,3),u=Math.pow(a,3);return s=o>.008856?o:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,a=u>.008856?u:(a-16/116)/7.787,n*=95.047,s*=100,a*=108.883,[n,s,a]};A.lab.lch=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return n=Math.atan2(i,r),s=n*360/2/Math.PI,s<0&&(s+=360),a=Math.sqrt(r*r+i*i),[e,a,s]};A.lch.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return a=i/360*2*Math.PI,n=r*Math.cos(a),s=r*Math.sin(a),[e,n,s]};A.rgb.ansi16=function(t){var e=t[0],r=t[1],i=t[2],n=1 in arguments?arguments[1]:A.rgb.hsv(t)[2];if(n=Math.round(n/50),n===0)return 30;var s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return n===2&&(s+=60),s};A.hsv.ansi16=function(t){return A.rgb.ansi16(A.hsv.rgb(t),t[2])};A.rgb.ansi256=function(t){var e=t[0],r=t[1],i=t[2];if(e===r&&r===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var n=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5);return n};A.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};A.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,i=Math.floor(t/36)/5*255,n=Math.floor((r=t%36)/6)/5*255,s=r%6/5*255;return[i,n,s]};A.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};A.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var i=parseInt(r,16),n=i>>16&255,s=i>>8&255,a=i&255;return[n,s,a]};A.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),a=n-s,o,l;return a<1?o=s/(1-a):o=0,a<=0?l=0:n===e?l=(r-i)/a%6:n===r?l=2+(i-e)/a:l=4+(e-r)/a+4,l/=6,l%=1,[l*360,a*100,o*100]};A.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1,n=0;return r<.5?i=2*e*r:i=2*e*(1-r),i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};A.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};A.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];var n=[0,0,0],s=e%1*6,a=s%1,o=1-a,l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};A.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};A.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,i=r*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};A.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};A.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1-r,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};A.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};A.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};A.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};A.gray.hsl=A.gray.hsv=function(t){return[0,0,t[0]]};A.gray.hwb=function(t){return[0,100,t[0]]};A.gray.cmyk=function(t){return[0,0,0,t[0]]};A.gray.lab=function(t){return[t[0],0,0]};A.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,i=r.toString(16).toUpperCase();return"000000".substring(i.length)+i};A.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var Pc=w((W2,kc)=>{var $n=mo();function zv(){for(var t={},e=Object.keys($n),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function Hv(t){var e=zv(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys($n[i]),s=n.length,a=0;a<s;a++){var o=n[a],l=e[o];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,r.unshift(o))}return e}function Gv(t,e){return function(r){return e(t(r))}}function Yv(t,e){for(var r=[e[t].parent,t],i=$n[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=Gv($n[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}kc.exports=function(t){for(var e=Hv(t),r={},i=Object.keys(e),n=i.length,s=0;s<n;s++){var a=i[s],o=e[a];o.parent!==null&&(r[a]=Yv(a,e))}return r}});var qc=w((B2,Dc)=>{var yo=mo(),Vv=Pc(),yr={},Kv=Object.keys(yo);function Jv(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Zv(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var i=t(r);if(typeof i=="object")for(var n=i.length,s=0;s<n;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}Kv.forEach(function(t){yr[t]={},Object.defineProperty(yr[t],"channels",{value:yo[t].channels}),Object.defineProperty(yr[t],"labels",{value:yo[t].labels});var e=Vv(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];yr[t][i]=Zv(n),yr[t][i].raw=Jv(n)})});Dc.exports=yr});var jc=w((U2,Lc)=>{"use strict";var ri=Ec(),Oe=qc(),vo=[].slice,Cc=["keyword","gray","hex"],bo={};Object.keys(Oe).forEach(function(t){bo[vo.call(Oe[t].labels).sort().join("")]=t});var Wn={};function ue(t,e){if(!(this instanceof ue))return new ue(t,e);if(e&&e in Cc&&(e=null),e&&!(e in Oe))throw new Error("Unknown model: "+e);var r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof ue)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=ri.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Oe[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(t.length){this.model=e||"rgb",i=Oe[this.model].channels;var s=vo.call(t,0,i);this.color=wo(s,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;var a=Object.keys(t);"alpha"in t&&(a.splice(a.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);var o=a.sort().join("");if(!(o in bo))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=bo[o];var l=Oe[this.model].labels,u=[];for(r=0;r<l.length;r++)u.push(t[l[r]]);this.color=wo(u)}if(Wn[this.model])for(i=Oe[this.model].channels,r=0;r<i;r++){var c=Wn[this.model][r];c&&(this.color[r]=c(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ue.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in ri.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);var r=e.valpha===1?e.color:e.color.concat(this.valpha);return ri.to[e.model](r)},percentString:function(t){var e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:e.color.concat(this.valpha);return ri.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Oe[this.model].channels,r=Oe[this.model].labels,i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new ue(this.color.map(Xv(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new ue(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:V("rgb",0,ie(255)),green:V("rgb",1,ie(255)),blue:V("rgb",2,ie(255)),hue:V(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:V("hsl",1,ie(100)),lightness:V("hsl",2,ie(100)),saturationv:V("hsv",1,ie(100)),value:V("hsv",2,ie(100)),chroma:V("hcg",1,ie(100)),gray:V("hcg",2,ie(100)),white:V("hwb",1,ie(100)),wblack:V("hwb",2,ie(100)),cyan:V("cmyk",0,ie(100)),magenta:V("cmyk",1,ie(100)),yellow:V("cmyk",2,ie(100)),black:V("cmyk",3,ie(100)),x:V("xyz",0,ie(100)),y:V("xyz",1,ie(100)),z:V("xyz",2,ie(100)),l:V("lab",0,ie(100)),a:V("lab",1),b:V("lab",2),keyword:function(t){return arguments.length?new ue(t):Oe[this.model].keyword(this.color)},hex:function(t){return arguments.length?new ue(t):ri.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity:function(){for(var t=this.rgb().color,e=[],r=0;r<t.length;r++){var i=t[r]/255;e[r]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return ue.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,a=r.alpha()-i.alpha(),o=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,l=1-o;return ue.rgb(o*r.red()+l*i.red(),o*r.green()+l*i.green(),o*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};Object.keys(Oe).forEach(function(t){if(Cc.indexOf(t)===-1){var e=Oe[t].channels;ue.prototype[t]=function(){if(this.model===t)return new ue(this);if(arguments.length)return new ue(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new ue(e1(Oe[this.model][t].raw(this.color)).concat(r),t)},ue[t]=function(r){return typeof r=="number"&&(r=wo(vo.call(arguments),e)),new ue(r,t)}}});function Qv(t,e){return Number(t.toFixed(e))}function Xv(t){return function(e){return Qv(e,t)}}function V(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(Wn[i]||(Wn[i]=[]))[e]=r}),t=t[0],function(i){var n;return arguments.length?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function ie(t){return function(e){return Math.max(0,Math.min(t,e))}}function e1(t){return Array.isArray(t)?t:[t]}function wo(t,e){for(var r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}Lc.exports=ue});var Fc=w((z2,Nc)=>{"use strict";Nc.exports=function(e){for(var r=0,i=0;r<e.length;i=e.charCodeAt(r++)+((i<<5)-i));var n=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-n.length+1).join("0")+n}});var Bc=w((H2,Wc)=>{"use strict";var Ic=jc(),$c=Fc();Wc.exports=function(e,r){var i=e.split(r||":"),n=$c(i[0]);if(!i.length)return n;for(var s=0,a=i.length-1;s<a;s++)n=Ic(n).mix(Ic($c(i[s+1]))).saturate(1).hex();return n}});var zc=w((G2,Uc)=>{"use strict";function $e(t,e){if(e)return new $e(t).style(e);if(!(this instanceof $e))return new $e(t);this.text=t}$e.prototype.prefix="\x1B[";$e.prototype.suffix="m";$e.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),i=e.substring(2,4),n=e.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(n,16)]};$e.prototype.rgb=function(e,r,i){var n=e/255*5,s=r/255*5,a=i/255*5;return this.ansi(n,s,a)};$e.prototype.ansi=function(e,r,i){var n=Math.round(e),s=Math.round(r),a=Math.round(i);return 16+n*36+s*6+a};$e.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};$e.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Uc.exports=$e});var Gc=w((Y2,Hc)=>{var t1=Bc(),r1=zc();Hc.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?r1(i+":",t1(i)):i+":";return e[0]=n+" "+e[0],e}});var Vc=w((V2,Yc)=>{"use strict";Yc.exports=function(e,r){if(!r)return!1;for(var i=r.split(/[\s,]+/),n=0;n<i.length;n++){if(r=i[n].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var Jc=w((K2,Kc)=>{var i1=Vc();Kc.exports=function(e){return function(i){try{return i1(i,e())}catch{}return!1}}});var Qc=w((J2,Zc)=>{var n1=Jc();Zc.exports=n1(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var ed=w((Z2,Xc)=>{Xc.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var rd=w((Q2,td)=>{var s1=go(),a1=require("tty").isatty(1),Bn=s1(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:a1,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Bn.modify(Gc());Bn.use(Qc());Bn.set(ed());td.exports=Bn});var ii=w((X2,_o)=>{process.env.NODE_ENV==="production"?_o.exports=cc():_o.exports=rd()});var nd=w((eR,id)=>{"use strict";var So=require("fs"),{StringDecoder:o1}=require("string_decoder"),{Stream:l1}=Yt();function u1(){}id.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new o1("utf8"),n=new l1,s="",a=0,o=0;return t.start===-1&&delete t.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close")},So.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){So.close(u,u1);return}return So.read(u,r,0,r.length,a,(h,d)=>{if(h){e?e(h):n.emit("error",h),n.destroy();return}if(!d)return s&&((t.start==null||o>t.start)&&(e?e(null,s):n.emit("line",s)),o++,s=""),setTimeout(c,1e3);let f=i.write(r.slice(0,d));e||n.emit("data",f),f=(s+f).split(/\n+/);let y=f.length-1,b=0;for(;b<y;b++)(t.start==null||o>t.start)&&(e?e(null,f[b]):n.emit("line",f[b])),o++;return s=f[y],a+=d,c()})})()}),e?n.destroy:n}});var ld=w((rR,od)=>{"use strict";var Re=require("fs"),ne=require("path"),sd=fh(),f1=require("zlib"),{MESSAGE:h1}=te(),{Stream:c1,PassThrough:ad}=Yt(),d1=ur(),We=ii()("winston:file"),p1=require("os"),g1=nd();od.exports=class extends d1{constructor(e={}){super(e),this.name=e.name||"file";function r(i,...n){n.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${i} together`)})}if(this._stream=new ad,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?ne.basename(e.filename):"winston.log",this.dirname=e.dirname||ne.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=ne.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:p1.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let i=`${e[h1]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,We("logged %s %s",this._size,i),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let a=this._stream.write(i,s.bind(this));return a?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),We("written",a,this._drain),this.finishIfEnding(),a}query(e,r){typeof e=="function"&&(r=e,e={}),e=h(e);let i=ne.join(this.dirname,this.filename),n="",s=[],a=0,o=Re.createReadStream(i,{encoding:"utf8"});o.on("error",d=>{if(o.readable&&o.destroy(),!!r)return d.code!=="ENOENT"?r(d):r(null,s)}),o.on("data",d=>{d=(n+d).split(/\n+/);let f=d.length-1,y=0;for(;y<f;y++)(!e.start||a>=e.start)&&l(d[y]),a++;n=d[f]}),o.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(d,f){try{let y=JSON.parse(d);c(y)&&u(y)}catch(y){f||o.emit("error",y)}}function u(d){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){o.readable&&o.destroy();return}e.fields&&(d=e.fields.reduce((f,y)=>(f[y]=d[y],f),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(d)}function c(d){if(!d||typeof d!="object")return;let f=new Date(d.timestamp);if(!(e.from&&f<e.from||e.until&&f>e.until||e.level&&e.level!==d.level))return!0}function h(d){return d=d||{},d.rows=d.rows||d.limit||10,d.start=d.start||0,d.until=d.until||new Date,typeof d.until!="object"&&(d.until=new Date(d.until)),d.from=d.from||d.until-24*60*60*1e3,typeof d.from!="object"&&(d.from=new Date(d.from)),d.order=d.order||"desc",d}}stream(e={}){let r=ne.join(this.dirname,this.filename),i=new c1,n={file:r,start:e.start};return i.destroy=g1(n,(s,a)=>{if(s)return i.emit("error",s);try{i.emit("data",a),a=JSON.parse(a),i.emit("log",a)}catch(o){i.emit("error",o)}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);We("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.emit("rotate")||(this._rotate=!1)})})))}stat(e){let r=this._getFile(),i=ne.join(this.dirname,r);Re.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return We("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return We(`err ${n.code} ${i}`),e(n);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,s.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=ne.join(this.dirname,this.filename);We("create stream start",r,this.options);let i=Re.createWriteStream(r,this.options).on("error",n=>We(n)).on("close",()=>We("close",i.path,i.bytesWritten)).on("open",()=>{We("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new ad,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return We("create stream ok",r),i}_incFile(e){We("_incFile",this.filename);let r=ne.extname(this._basename),i=ne.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let a=this._created>0&&!this.tailable?this._created:"";this._compressFile(ne.join(this.dirname,`${i}${a}${r}`),ne.join(this.dirname,`${i}${a}${r}.gz`),s)}.bind(this)),n.push(function(s){this.tailable?this._checkMaxFilesTailable(r,i,s):(this._created+=1,this._checkMaxFilesIncrementing(r,i,s))}.bind(this)),sd(n,e)}_getFile(){let e=ne.extname(this._basename),r=ne.basename(this._basename,e),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let n=this._created-this.maxFiles,s=n!==0?n:"",a=this.zippedArchive?".gz":"",o=`${r}${s}${e}${a}`,l=ne.join(this.dirname,o);Re.unlink(l,i)}_checkMaxFilesTailable(e,r,i){let n=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let a=this.maxFiles-1;a>1;a--)n.push(function(o,l){let u=`${r}${o-1}${e}${s}`,c=ne.join(this.dirname,u);Re.exists(c,h=>{if(!h)return l(null);u=`${r}${o}${e}${s}`,Re.rename(c,ne.join(this.dirname,u),l)})}.bind(this,a));sd(n,()=>{Re.rename(ne.join(this.dirname,`${r}${e}${s}`),ne.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){Re.access(e,Re.F_OK,n=>{if(n)return i();var s=f1.createGzip(),a=Re.createReadStream(e),o=Re.createWriteStream(r);o.on("finish",()=>{Re.unlink(e,i)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){Re.existsSync(e)||Re.mkdirSync(e,{recursive:!0})}}});var fd=w((nR,ud)=>{"use strict";var m1=require("http"),y1=require("https"),{Stream:b1}=Yt(),w1=ur(),{configure:v1}=Pr();ud.exports=class extends w1{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(i,n)=>{n&&n.statusCode!==200&&(i=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),i?this.emit("warn",i):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let i=e.params.auth||null;delete e.params.auth;let n=e.params.path||null;delete e.params.path,this._request(e,i,n,(s,a,o)=>{if(a&&a.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${a.statusCode}`)),s)return r(s);if(typeof o=="string")try{o=JSON.parse(o)}catch(l){return r(l)}r(null,o)})}stream(e={}){let r=new b1;e={method:"stream",params:e};let i=e.params.path||null;delete e.params.path;let n=e.params.auth||null;delete e.params.auth;let s="",a=this._request(e,n,i);return r.destroy=()=>a.destroy(),a.on("data",o=>{o=(s+o).split(/\n+/);let l=o.length-1,u=0;for(;u<l;u++)try{r.emit("log",JSON.parse(o[u]))}catch(c){r.emit("error",c)}s=o[l]}),a.on("error",o=>r.emit("error",o)),r}_request(e,r,i,n){e=e||{},r=r||this.auth,i=i||this.path||"",this.batch?this._doBatch(e,n,r,i):this._doRequest(e,n,r,i)}_doBatch(e,r,i,n){if(this.batchOptions.push(e),this.batchOptions.length===1){let s=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){s.batchTimeoutID=-1,s._doBatchRequest(s.batchCallback,i,n)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,i,n)}_doBatchRequest(e,r,i){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,e,r,i)}_doRequest(e,r,i,n){let s=Object.assign({},this.headers);i&&i.bearer&&(s.Authorization=`Bearer ${i.bearer}`);let a=(this.ssl?y1:m1).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${n.replace(/^\//,"")}`,headers:s,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});a.on("error",r),a.on("response",l=>l.on("end",()=>r(null,l)).resume());let o=v1({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});a.end(Buffer.from(o(e,this.options.replacer),"utf8"))}}});var Eo=w((sR,hd)=>{"use strict";var Ke=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Ke.writable=t=>Ke(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Ke.readable=t=>Ke(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Ke.duplex=t=>Ke.writable(t)&&Ke.readable(t);Ke.transform=t=>Ke.duplex(t)&&typeof t._transform=="function";hd.exports=Ke});var dd=w((oR,cd)=>{"use strict";var _1=Eo(),{MESSAGE:S1}=te(),E1=require("os"),R1=ur();cd.exports=class extends R1{constructor(e={}){if(super(e),!e.stream||!_1(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:E1.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[S1]}${this.eol}`),r&&r()}}});var pd=w(ni=>{"use strict";Object.defineProperty(ni,"Console",{configurable:!0,enumerable:!0,get(){return Mf()}});Object.defineProperty(ni,"File",{configurable:!0,enumerable:!0,get(){return ld()}});Object.defineProperty(ni,"Http",{configurable:!0,enumerable:!0,get(){return fd()}});Object.defineProperty(ni,"Stream",{configurable:!0,enumerable:!0,get(){return dd()}})});var zn=w(si=>{"use strict";var Un=Js(),{configs:Ro}=te();si.cli=Un.levels(Ro.cli);si.npm=Un.levels(Ro.npm);si.syslog=Un.levels(Ro.syslog);si.addColors=Un.levels});var md=w((Hn,gd)=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});var x1=on(),T1=Kt(x1),O1=yn(),M1=Kt(O1),A1=La(),k1=Kt(A1),P1=Da(),D1=Kt(P1),q1=qa(),C1=Kt(q1),L1=Bt(),j1=Kt(L1),N1=hr(),F1=Kt(N1);function Kt(t){return t&&t.__esModule?t:{default:t}}function I1(t,e,r){r=(0,D1.default)(r);var i=0,n=0,{length:s}=t,a=!1;s===0&&r(null);function o(l,u){l===!1&&(a=!0),a!==!0&&(l?r(l):(++n===s||u===M1.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,C1.default)(o))}function $1(t,e,r){return(0,k1.default)(t,1/0,e,r)}function W1(t,e,r){var i=(0,T1.default)(t)?I1:$1;return i(t,(0,j1.default)(e),r)}Hn.default=(0,F1.default)(W1,3);gd.exports=Hn.default});var bd=w((Gn,yd)=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.default=B1;function B1(t){return(e,r,i)=>t(e,i)}yd.exports=Gn.default});var Kn=w((Vn,wd)=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});var U1=md(),z1=Yn(U1),H1=bd(),G1=Yn(H1),Y1=Bt(),V1=Yn(Y1),K1=hr(),J1=Yn(K1);function Yn(t){return t&&t.__esModule?t:{default:t}}function Z1(t,e,r){return(0,z1.default)(t,(0,G1.default)((0,V1.default)(e)),r)}Vn.default=(0,J1.default)(Z1,3);wd.exports=Vn.default});var _d=w((fR,vd)=>{"use strict";var Q1=Object.prototype.toString;vd.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),i=Q1.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var xo=w((hR,Sd)=>{"use strict";var X1=_d();Sd.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=X1(e),n}});var To=w(oi=>{oi.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,a){return a},Error.captureStackTrace(r,t||oi.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};oi.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
28
|
+
`).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:i,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=i.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var s=null,a=null,o=null,l=null,u=null,c=n[5]==="native";if(n[1]){o=n[1];var h=o.lastIndexOf(".");if(o[h-1]=="."&&h--,h>0){s=o.substr(0,h),a=o.substr(h+1);var d=s.indexOf(".Module");d>0&&(o=o.substr(d+1),s=s.substr(0,d))}l=null}a&&(l=s,u=a),a==="<anonymous>"&&(u=null,o=null);var f={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:o,typeName:l,methodName:u,columnNumber:parseInt(n[4],10)||null,native:c};return e._createParsedCallSite(f)}}).filter(function(i){return!!i})};function ai(t){for(var e in t)this[e]=t[e]}var e_=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],t_=["topLevel","eval","native","constructor"];e_.forEach(function(t){ai.prototype[t]=null,ai.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});t_.forEach(function(t){ai.prototype[t]=!1,ai.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});oi._createParsedCallSite=function(t){return new ai(t)}});var Rd=w((pR,Ed)=>{"use strict";var{Writable:r_}=Yt();Ed.exports=class extends r_{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e}_write(e,r,i){return e.exception?this.transport.log(e,i):(i(),!0)}}});var Mo=w((mR,Od)=>{"use strict";var xd=require("os"),i_=Kn(),Oo=ii()("winston:exception"),n_=xo(),Td=To(),s_=Rd();Od.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(i=>this._addHandler(i));this._addHandler(r)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}unhandle(){this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`uncaughtException: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
29
|
+
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:xd.loadavg(),uptime:xd.uptime()}}getTrace(e){return(e?Td.parse(e):Td.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new s_(e);this.handlers.set(e,r),this.logger.pipe(r)}}_uncaughtException(e){let r=this.getAllInfo(e),i=this._getExceptionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!i.length&&n&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),n=!1);function a(){Oo("doExit",n),Oo("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);i_(i,(o,l)=>{let u=n_(l),c=o.transport||o;function h(d){return()=>{Oo(d),u()}}c._ending=!0,c.once("finish",h("finished")),c.once("error",h("error"))},()=>n&&a()),this.logger.log(r),n&&(s=setTimeout(a,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var Ad=w((bR,Md)=>{"use strict";var{Writable:a_}=Yt();Md.exports=class extends a_{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,r,i){return e.rejection?this.transport.log(e,i):(i(),!0)}}});var ko=w((vR,Dd)=>{"use strict";var kd=require("os"),o_=Kn(),Ao=ii()("winston:rejection"),l_=xo(),Pd=To(),u_=Ad();Dd.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(i=>this._addHandler(i));this._addHandler(r)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
30
|
+
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:kd.loadavg(),uptime:kd.uptime()}}getTrace(e){return(e?Pd.parse(e):Pd.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new u_(e);this.handlers.set(e,r),this.logger.pipe(r)}}_unhandledRejection(e){let r=this.getAllInfo(e),i=this._getRejectionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!i.length&&n&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),n=!1);function a(){Ao("doExit",n),Ao("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);o_(i,(o,l)=>{let u=l_(l),c=o.transport||o;function h(d){return()=>{Ao(d),u()}}c._ending=!0,c.once("finish",h("finished")),c.once("error",h("error"))},()=>n&&a()),this.logger.log(r),n&&(s=setTimeout(a,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var Cd=w((_R,qd)=>{"use strict";var Po=class{constructor(e){let r=Jn();if(typeof e!="object"||Array.isArray(e)||!(e instanceof r))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){typeof e[e.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());let r=typeof e[e.length-1]=="object"?e.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};qd.exports=Po});var Jn=w((SR,Fd)=>{"use strict";var{Stream:f_,Transform:h_}=Yt(),Ld=Kn(),{LEVEL:Je,SPLAT:jd}=te(),Nd=Eo(),c_=Mo(),d_=ko(),p_=Aa(),g_=Cd(),{warn:m_}=Zs(),y_=zn(),b_=/%[scdjifoO%]/g,Zn=class extends h_{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){let r=this;return Object.create(r,{write:{value:function(i){let n=Object.assign({},e,i);i instanceof Error&&(n.stack=i.stack,n.message=i.message),r.write(n)}}})}configure({silent:e,format:r,defaultMeta:i,levels:n,level:s="info",exitOnError:a=!0,transports:o,colors:l,emitErrs:u,formatters:c,padLevels:h,rewriters:d,stripColors:f,exceptionHandlers:y,rejectionHandlers:b}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||Hs()(),this.defaultMeta=i||null,this.levels=n||this.levels||y_.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new c_(this),this.rejections=new d_(this),this.profilers={},this.exitOnError=a,o&&(o=Array.isArray(o)?o:[o],o.forEach(_=>this.add(_))),l||u||c||h||d||f)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
31
|
+
`));y&&this.exceptions.handle(y),b&&this.rejections.handle(b)}isLevelEnabled(e){let r=Do(this.levels,e);if(r===null)return!1;let i=Do(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let a=Do(this.levels,s.level);return a===null&&(a=i),a>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[Je]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Je]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Je]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(r&&r.match&&r.match(b_))){let a=Object.assign({},this.defaultMeta,n,{[Je]:e,[jd]:i,level:e,message:r});return n.message&&(a.message=`${a.message} ${n.message}`),n.stack&&(a.stack=n.stack),n.cause&&(a.cause=n.cause),this.write(a),this}return this.write(Object.assign({},this.defaultMeta,{[Je]:e,[jd]:i,level:e,message:r})),this}_transform(e,r,i){if(this.silent)return i();e[Je]||(e[Je]=e.level),!this.levels[e[Je]]&&this.levels[e[Je]]!==0&&console.error("[winston] Unknown logger level: %s",e[Je]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,i()}}_final(e){let r=this.transports.slice();Ld(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},e)}add(e){let r=!Nd(e)||e.log.length>2?new p_({transport:e}):e;if(!r._writableState||!r._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",r),this._onEvent("warn",r),this.pipe(r),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let r=e;return(!Nd(e)||e.log.length>2)&&(r=this.transports.filter(i=>i.transport===e)[0]),r&&this.unpipe(r),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){m_.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let i={},n=Object.assign({},e.query||{});function s(o,l){e.query&&typeof o.formatQuery=="function"&&(e.query=o.formatQuery(n)),o.query(e,(u,c)=>{if(u)return l(u);typeof o.formatResults=="function"&&(c=o.formatResults(c,e.format)),l(null,c)})}function a(o,l){s(o,(u,c)=>{l&&(c=u||c,c&&(i[o.name]=c),l()),l=null})}Ld(this.transports.filter(o=>!!o.query),a,()=>r(null,i))}stream(e={}){let r=new f_,i=[];return r._streams=i,r.destroy=()=>{let n=i.length;for(;n--;)i[n].destroy()},this.transports.filter(n=>!!n.stream).forEach(n=>{let s=n.stream(e);s&&(i.push(s),s.on("log",a=>{a.transport=a.transport||[],a.transport.push(n.name),r.emit("log",a)}),s.on("error",a=>{a.transport=a.transport||[],a.transport.push(n.name),r.emit("error",a)}))}),r}startTimer(){return new g_(this)}profile(e,...r){let i=Date.now();if(this.profilers[e]){let n=this.profilers[e];delete this.profilers[e],typeof r[r.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),r.pop());let s=typeof r[r.length-1]=="object"?r.pop():{};return s.level=s.level||"info",s.durationMs=i-n,s.message=s.message||e,this.write(s)}return this.profilers[e]=i,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
32
|
+
`))}_onEvent(e,r){function i(n){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,n,r)}r["__winston"+e]||(r["__winston"+e]=i.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function Do(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Zn.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Fd.exports=Zn});var qo=w((ER,Id)=>{"use strict";var{LEVEL:w_}=te(),v_=zn(),__=Jn(),S_=ii()("winston:create-logger");function E_(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Id.exports=function(t={}){t.levels=t.levels||v_.npm.levels;class e extends __{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(S_('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[i]=function(...n){let s=this||r;if(n.length===1){let[a]=n,o=a&&a.message&&a||{message:a};return o.level=o[w_]=i,s._addDefaultMeta(o),s.write(o),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[E_(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Wd=w((xR,$d)=>{"use strict";var R_=qo();$d.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let i=r.transports||this.options.transports;i?r.transports=Array.isArray(i)?i.slice():[i]:r.transports=[];let n=R_(r);n.on("close",()=>this._delete(e)),this.loggers.set(e,n)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,i)=>this._removeLogger(i))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Ud=w(H=>{"use strict";var Bd=Js(),{warn:li}=Zs();H.version=xu().version;H.transports=pd();H.config=zn();H.addColors=Bd.levels;H.format=Bd.format;H.createLogger=qo();H.Logger=Jn();H.ExceptionHandler=Mo();H.RejectionHandler=ko();H.Container=Wd();H.Transport=ur();H.loggers=new H.Container;var Ze=H.createLogger();Object.keys(H.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>H[t]=(...e)=>Ze[t](...e));Object.defineProperty(H,"level",{get(){return Ze.level},set(t){Ze.level=t}});Object.defineProperty(H,"exceptions",{get(){return Ze.exceptions}});Object.defineProperty(H,"rejections",{get(){return Ze.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(H,t,{get(){return Ze[t]},set(e){Ze[t]=e}})});Object.defineProperty(H,"default",{get(){return{exceptionHandlers:Ze.exceptionHandlers,rejectionHandlers:Ze.rejectionHandlers,transports:Ze.transports}}});li.deprecated(H,"setLevels");li.forFunctions(H,"useFormat",["cli"]);li.forProperties(H,"useFormat",["padLevels","stripColors"]);li.forFunctions(H,"deprecated",["addRewriter","addFilter","clone","extend"]);li.forProperties(H,"deprecated",["emitErrs","levelLength"])});var es=w((Xn,Gd)=>{(function(t,e){typeof Xn=="object"&&typeof Gd<"u"?e(Xn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(Xn,function(t){"use strict";class e extends TypeError{constructor(g,m){let v,{message:T,explanation:D,...$}=g,{path:J}=g,Z=J.length===0?T:`At path: ${J.join(".")} -- ${T}`;super(D??Z),D!=null&&(this.cause=Z),Object.assign(this,$),this.name=this.constructor.name,this.failures=()=>v??(v=[g,...m()])}}function r(p){return i(p)&&typeof p[Symbol.iterator]=="function"}function i(p){return typeof p=="object"&&p!=null}function n(p){return i(p)&&!Array.isArray(p)}function s(p){if(Object.prototype.toString.call(p)!=="[object Object]")return!1;let g=Object.getPrototypeOf(p);return g===null||g===Object.prototype}function a(p){return typeof p=="symbol"?p.toString():typeof p=="string"?JSON.stringify(p):`${p}`}function o(p){let{done:g,value:m}=p.next();return g?void 0:m}function l(p,g,m,v){if(p===!0)return;p===!1?p={}:typeof p=="string"&&(p={message:p});let{path:T,branch:D}=g,{type:$}=m,{refinement:J,message:Z=`Expected a value of type \`${$}\`${J?` with refinement \`${J}\``:""}, but received: \`${a(v)}\``}=p;return{value:v,type:$,refinement:J,key:T[T.length-1],path:T,branch:D,...p,message:Z}}function*u(p,g,m,v){r(p)||(p=[p]);for(let T of p){let D=l(T,g,m,v);D&&(yield D)}}function*c(p,g,m={}){let{path:v=[],branch:T=[p],coerce:D=!1,mask:$=!1}=m,J={path:v,branch:T,mask:$};D&&(p=g.coercer(p,J));let Z="valid";for(let re of g.validator(p,J))re.explanation=m.message,Z="not_valid",yield[re,void 0];for(let[re,Pe,hg]of g.entries(p,J)){let cg=c(Pe,hg,{path:re===void 0?v:[...v,re],branch:re===void 0?T:[...T,Pe],coerce:D,mask:$,message:m.message});for(let qi of cg)qi[0]?(Z=qi[0].refinement!=null?"not_refined":"not_valid",yield[qi[0],void 0]):D&&(Pe=qi[1],re===void 0?p=Pe:p instanceof Map?p.set(re,Pe):p instanceof Set?p.add(Pe):i(p)&&(Pe!==void 0||re in p)&&(p[re]=Pe))}if(Z!=="not_valid")for(let re of g.refiner(p,J))re.explanation=m.message,Z="not_refined",yield[re,void 0];Z==="valid"&&(yield[void 0,p])}class h{constructor(g){let{type:m,schema:v,validator:T,refiner:D,coercer:$=Z=>Z,entries:J=function*(){}}=g;this.type=m,this.schema=v,this.entries=J,this.coercer=$,T?this.validator=(Z,re)=>{let Pe=T(Z,re);return u(Pe,re,this,Z)}:this.validator=()=>[],D?this.refiner=(Z,re)=>{let Pe=D(Z,re);return u(Pe,re,this,Z)}:this.refiner=()=>[]}assert(g,m){return d(g,this,m)}create(g,m){return f(g,this,m)}is(g){return b(g,this)}mask(g,m){return y(g,this,m)}validate(g,m={}){return _(g,this,m)}}function d(p,g,m){let v=_(p,g,{message:m});if(v[0])throw v[0]}function f(p,g,m){let v=_(p,g,{coerce:!0,message:m});if(v[0])throw v[0];return v[1]}function y(p,g,m){let v=_(p,g,{coerce:!0,mask:!0,message:m});if(v[0])throw v[0];return v[1]}function b(p,g){return!_(p,g)[0]}function _(p,g,m={}){let v=c(p,g,m),T=o(v);return T[0]?[new e(T[0],function*(){for(let $ of v)$[0]&&(yield $[0])}),void 0]:[void 0,T[1]]}function E(...p){let g=p[0].type==="type",m=p.map(T=>T.schema),v=Object.assign({},...m);return g?ft(v):ut(v)}function R(p,g){return new h({type:p,schema:null,validator:g})}function x(p,g){return new h({...p,refiner:(m,v)=>m===void 0||p.refiner(m,v),validator(m,v){return m===void 0?!0:(g(m,v),p.validator(m,v))}})}function O(p){return new h({type:"dynamic",schema:null,*entries(g,m){yield*p(g,m).entries(g,m)},validator(g,m){return p(g,m).validator(g,m)},coercer(g,m){return p(g,m).coercer(g,m)},refiner(g,m){return p(g,m).refiner(g,m)}})}function k(p){let g;return new h({type:"lazy",schema:null,*entries(m,v){g??(g=p()),yield*g.entries(m,v)},validator(m,v){return g??(g=p()),g.validator(m,v)},coercer(m,v){return g??(g=p()),g.coercer(m,v)},refiner(m,v){return g??(g=p()),g.refiner(m,v)}})}function q(p,g){let{schema:m}=p,v={...m};for(let T of g)delete v[T];switch(p.type){case"type":return ft(v);default:return ut(v)}}function F(p){let g=p instanceof h,m=g?{...p.schema}:{...p};for(let v in m)m[v]=kt(m[v]);return g&&p.type==="type"?ft(m):ut(m)}function N(p,g){let{schema:m}=p,v={};for(let T of g)v[T]=m[T];switch(p.type){case"type":return ft(v);default:return ut(v)}}function U(p,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),R(p,g)}function ee(){return R("any",()=>!0)}function K(p){return new h({type:"array",schema:p,*entries(g){if(p&&Array.isArray(g))for(let[m,v]of g.entries())yield[m,v,p]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${a(g)}`}})}function ye(){return R("bigint",p=>typeof p=="bigint")}function be(){return R("boolean",p=>typeof p=="boolean")}function tt(){return R("date",p=>p instanceof Date&&!isNaN(p.getTime())||`Expected a valid \`Date\` object, but received: ${a(p)}`)}function xs(p){let g={},m=p.map(v=>a(v)).join();for(let v of p)g[v]=v;return new h({type:"enums",schema:g,validator(v){return p.includes(v)||`Expected one of \`${m}\`, but received: ${a(v)}`}})}function S(){return R("func",p=>typeof p=="function"||`Expected a function, but received: ${a(p)}`)}function M(p){return R("instance",g=>g instanceof p||`Expected a \`${p.name}\` instance, but received: ${a(g)}`)}function z(){return R("integer",p=>typeof p=="number"&&!isNaN(p)&&Number.isInteger(p)||`Expected an integer, but received: ${a(p)}`)}function de(p){return new h({type:"intersection",schema:null,*entries(g,m){for(let v of p)yield*v.entries(g,m)},*validator(g,m){for(let v of p)yield*v.validator(g,m)},*refiner(g,m){for(let v of p)yield*v.refiner(g,m)}})}function P(p){let g=a(p),m=typeof p;return new h({type:"literal",schema:m==="string"||m==="number"||m==="boolean"?p:null,validator(v){return v===p||`Expected the literal \`${g}\`, but received: ${a(v)}`}})}function ke(p,g){return new h({type:"map",schema:null,*entries(m){if(p&&g&&m instanceof Map)for(let[v,T]of m.entries())yield[v,v,p],yield[v,T,g]},coercer(m){return m instanceof Map?new Map(m):m},validator(m){return m instanceof Map||`Expected a \`Map\` object, but received: ${a(m)}`}})}function Fe(){return R("never",()=>!1)}function At(p){return new h({...p,validator:(g,m)=>g===null||p.validator(g,m),refiner:(g,m)=>g===null||p.refiner(g,m)})}function Qt(){return R("number",p=>typeof p=="number"&&!isNaN(p)||`Expected a number, but received: ${a(p)}`)}function ut(p){let g=p?Object.keys(p):[],m=Fe();return new h({type:"object",schema:p||null,*entries(v){if(p&&i(v)){let T=new Set(Object.keys(v));for(let D of g)T.delete(D),yield[D,v[D],p[D]];for(let D of T)yield[D,v[D],m]}},validator(v){return n(v)||`Expected an object, but received: ${a(v)}`},coercer(v,T){if(!n(v))return v;let D={...v};if(T.mask&&p)for(let $ in D)p[$]===void 0&&delete D[$];return D}})}function kt(p){return new h({...p,validator:(g,m)=>g===void 0||p.validator(g,m),refiner:(g,m)=>g===void 0||p.refiner(g,m)})}function Ts(p,g){return new h({type:"record",schema:null,*entries(m){if(i(m))for(let v in m){let T=m[v];yield[v,v,p],yield[v,T,g]}},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function xe(){return R("regexp",p=>p instanceof RegExp)}function Mi(p){return new h({type:"set",schema:null,*entries(g){if(p&&g instanceof Set)for(let m of g)yield[m,m,p]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${a(g)}`}})}function Ai(){return R("string",p=>typeof p=="string"||`Expected a string, but received: ${a(p)}`)}function ki(p){let g=Fe();return new h({type:"tuple",schema:null,*entries(m){if(Array.isArray(m)){let v=Math.max(p.length,m.length);for(let T=0;T<v;T++)yield[T,m[T],p[T]||g]}},validator(m){return Array.isArray(m)||`Expected an array, but received: ${a(m)}`},coercer(m){return Array.isArray(m)?m.slice():m}})}function ft(p){let g=Object.keys(p);return new h({type:"type",schema:p,*entries(m){if(i(m))for(let v of g)yield[v,m[v],p[v]]},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function Xt(p){let g=p.map(m=>m.type).join(" | ");return new h({type:"union",schema:null,coercer(m,v){for(let T of p){let[D,$]=T.validate(m,{coerce:!0,mask:v.mask});if(!D)return $}return m},validator(m,v){let T=[];for(let D of p){let[...$]=c(m,D,v),[J]=$;if(J[0])for(let[Z]of $)Z&&T.push(Z);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${a(m)}`,...T]}})}function Pt(){return R("unknown",()=>!0)}function Mr(p,g,m){return new h({...p,coercer:(v,T)=>b(v,g)?p.coercer(m(v,T),T):p.coercer(v,T)})}function Dt(p,g,m={}){return Mr(p,Pt(),v=>{let T=typeof g=="function"?g():g;if(v===void 0)return T;if(!m.strict&&s(v)&&s(T)){let D={...v},$=!1;for(let J in T)D[J]===void 0&&(D[J]=T[J],$=!0);if($)return D}return v})}function ht(p){return Mr(p,Ai(),g=>g.trim())}function Ar(p){return qt(p,"empty",g=>{let m=Pi(g);return m===0||`Expected an empty ${p.type} but received one with a size of \`${m}\``})}function Pi(p){return p instanceof Map||p instanceof Set?p.size:p.length}function Di(p,g,m={}){let{exclusive:v}=m;return qt(p,"max",T=>v?T<g:T<=g||`Expected a ${p.type} less than ${v?"":"or equal to "}${g} but received \`${T}\``)}function og(p,g,m={}){let{exclusive:v}=m;return qt(p,"min",T=>v?T>g:T>=g||`Expected a ${p.type} greater than ${v?"":"or equal to "}${g} but received \`${T}\``)}function lg(p){return qt(p,"nonempty",g=>Pi(g)>0||`Expected a nonempty ${p.type} but received an empty one`)}function ug(p,g){return qt(p,"pattern",m=>g.test(m)||`Expected a ${p.type} matching \`/${g.source}/\` but received "${m}"`)}function fg(p,g,m=g){let v=`Expected a ${p.type}`,T=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return qt(p,"size",D=>{if(typeof D=="number"||D instanceof Date)return g<=D&&D<=m||`${v} ${T} but received \`${D}\``;if(D instanceof Map||D instanceof Set){let{size:$}=D;return g<=$&&$<=m||`${v} with a size ${T} but received one with a size of \`${$}\``}else{let{length:$}=D;return g<=$&&$<=m||`${v} with a length ${T} but received one with a length of \`${$}\``}})}function qt(p,g,m){return new h({...p,*refiner(v,T){yield*p.refiner(v,T);let D=m(v,T),$=u(D,T,p,v);for(let J of $)yield{...J,refinement:g}}})}t.Struct=h,t.StructError=e,t.any=ee,t.array=K,t.assert=d,t.assign=E,t.bigint=ye,t.boolean=be,t.coerce=Mr,t.create=f,t.date=tt,t.defaulted=Dt,t.define=R,t.deprecated=x,t.dynamic=O,t.empty=Ar,t.enums=xs,t.func=S,t.instance=M,t.integer=z,t.intersection=de,t.is=b,t.lazy=k,t.literal=P,t.map=ke,t.mask=y,t.max=Di,t.min=og,t.never=Fe,t.nonempty=lg,t.nullable=At,t.number=Qt,t.object=ut,t.omit=q,t.optional=kt,t.partial=F,t.pattern=ug,t.pick=N,t.record=Ts,t.refine=qt,t.regexp=xe,t.set=Mi,t.size=fg,t.string=Ai,t.struct=U,t.trimmed=ht,t.tuple=ki,t.type=ft,t.union=Xt,t.unknown=Pt,t.validate=_})});var Xd=w(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.validateRequirements=void 0;var A_="[",k_="(<=>!~",P_=";",D_="@",q_=new RegExp(`[${A_+k_+P_+D_}]`);function C_(t){return t.split(q_)[0].trim()}function L_(t){return t.forEach(r=>{let i;try{i=new URL(r)}catch{return}if(i.protocol==="emfs:"||i.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${r})`)}),t.filter(r=>C_(r)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${r}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}ts.validateRequirements=L_});var ep=w(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.parseRequirementsTxt=void 0;var j_=/\s#.*$/;function N_(t){return t.split(`
|
|
33
|
+
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(j_,"")).map(e=>e.trim()).filter(e=>e!=="")}rs.parseRequirementsTxt=N_});var tp=w(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.PromiseDelegate=void 0;var Co=class{promise;resolveInternal;rejectInternal;constructor(){this.promise=new Promise((e,r)=>{this.resolveInternal=e,this.rejectInternal=r})}resolve(e){this.resolveInternal(e)}reject(e){this.rejectInternal(e)}};is.PromiseDelegate=Co});var rp=w(st=>{"use strict";var F_=st&&st.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(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){i===void 0&&(i=r),t[i]=e[r]}),Lo=st&&st.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&F_(e,t,r)};Object.defineProperty(st,"__esModule",{value:!0});Lo(Xd(),st);Lo(ep(),st);Lo(tp(),st)});var op=w(($R,ap)=>{"use strict";ap.exports=np;function np(t,e,r){t instanceof RegExp&&(t=ip(t,r)),e instanceof RegExp&&(e=ip(e,r));var i=sp(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function ip(t,e){var r=e.match(t);return r?r[0]:null}np.range=sp;function sp(t,e,r){var i,n,s,a,o,l=r.indexOf(t),u=r.indexOf(e,l+1),c=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;c>=0&&!o;)c==l?(i.push(c),l=r.indexOf(t,c+1)):i.length==1?o=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,a=u),u=r.indexOf(e,c+1)),c=l<u&&l>=0?l:u;i.length&&(o=[s,a])}return o}});var gp=w((WR,pp)=>{var lp=op();pp.exports=W_;var up="\0SLASH"+Math.random()+"\0",fp="\0OPEN"+Math.random()+"\0",No="\0CLOSE"+Math.random()+"\0",hp="\0COMMA"+Math.random()+"\0",cp="\0PERIOD"+Math.random()+"\0";function jo(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function I_(t){return t.split("\\\\").join(up).split("\\{").join(fp).split("\\}").join(No).split("\\,").join(hp).split("\\.").join(cp)}function $_(t){return t.split(up).join("\\").split(fp).join("{").split(No).join("}").split(hp).join(",").split(cp).join(".")}function dp(t){if(!t)return[""];var e=[],r=lp("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=dp(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function W_(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),fi(I_(t),!0).map($_)):[]}function B_(t){return"{"+t+"}"}function U_(t){return/^-?0\d/.test(t)}function z_(t,e){return t<=e}function H_(t,e){return t>=e}function fi(t,e){var r=[],i=lp("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?fi(i.post,!1):[""];if(/\$$/.test(i.pre))for(var a=0;a<s.length;a++){var o=n+"{"+i.body+"}"+s[a];r.push(o)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),c=l||u,h=i.body.indexOf(",")>=0;if(!c&&!h)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+No+i.post,fi(t)):[t];var d;if(c)d=i.body.split(/\.\./);else if(d=dp(i.body),d.length===1&&(d=fi(d[0],!1).map(B_),d.length===1))return s.map(function(ee){return i.pre+d[0]+ee});var f;if(c){var y=jo(d[0]),b=jo(d[1]),_=Math.max(d[0].length,d[1].length),E=d.length==3?Math.abs(jo(d[2])):1,R=z_,x=b<y;x&&(E*=-1,R=H_);var O=d.some(U_);f=[];for(var k=y;R(k,b);k+=E){var q;if(u)q=String.fromCharCode(k),q==="\\"&&(q="");else if(q=String(k),O){var F=_-q.length;if(F>0){var N=new Array(F+1).join("0");k<0?q="-"+N+q.slice(1):q=N+q}}f.push(q)}}else{f=[];for(var U=0;U<d.length;U++)f.push.apply(f,fi(d[U],!1))}for(var U=0;U<f.length;U++)for(var a=0;a<s.length;a++){var o=n+f[U]+s[a];(!e||c||o)&&r.push(o)}}return r}});var ig=pe(require("yargs")),ng=require("yargs/helpers"),ce=pe(require("node:path")),lt=pe(require("node:fs/promises")),tl=pe(require("fs-extra")),Oi=require("pyodide");var zd=pe(require("node:path")),Hd=pe(require("node:fs/promises"));var Rt=pe(Ud()),I=Rt.createLogger({transports:[new Rt.transports.Console({format:Rt.format.combine(Rt.format.splat(),Rt.format.cli())})]});function ui(t){process.emitWarning(t,{type:"DeprecationWarning"})}var Qn=class{sourceUrl;isRemote;_data=null;constructor(e){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://")}async readJson(e){let r=zd.default.join(this.sourceUrl,e);if(this.isRemote){I.debug(`Fetching ${r}`);let i=await fetch(r);if(!i.ok)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);return await i.json()}else{I.debug(`Reading ${r}`);let i=await Hd.default.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;I.info("Load pyodide-lock.json");let e=await this.readJson("pyodide-lock.json");return this._data=e.packages,e.packages}async getPackageInfoByName(e){let r=await this.loadPrebuiltPackageData(),i=Object.values(r).find(n=>n.name===e);if(i==null)throw new Error(`Package ${e} is not found in the lock file.`);return i}};var Vd=pe(require("node:fs/promises")),Kd=pe(es());var Q=pe(es()),Yd=Q.object({entrypoint:Q.string(),embed:Q.defaulted(Q.boolean(),!1),idbfsMountpoints:Q.optional(Q.array(Q.string())),nodeJsWorker:Q.defaulted(Q.boolean(),!1),nodefsMountpoints:Q.optional(Q.record(Q.string(),Q.string()))});function x_(t){let e=Kd.mask(t??{},Yd);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function Jd(t){let e=x_({...t.packageJsonStliteDesktopField,...t.fallbacks});I.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);I.info(`Dump the manifest file -> ${t.manifestFilePath}`),await Vd.default.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var Zd=pe(require("node:path")),fe=pe(es());async function Qd(t){let{files:e,entrypoint:r}=T_(t),i=await O_(t),n=await M_(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function T_(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){ui("Missing `stlite.desktop.files` and `stlite.desktop.entrypoint` in `package.json`. Falling back to the `appHomeDirSource` argument to determine the app directory. Please update your `package.json` as this fallback is deprecated and will be removed in a future release.");let s=r;if(typeof s!="string")throw new Error("The `appHomeDirSource` argument is required when `stlite.desktop.files` and `stlite.desktop.entrypoint` are not found in the package.json. Note that `appHomeDirSource` is deprecated and will be removed in the future, so please specify `stlite.desktop.files` and `stlite.desktop.entrypoint` in the package.json.");i=[s],n=`./${s}/streamlit_app.py`}else r!=null&&ui("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return fe.assert(n,fe.string(),"The `stlite.desktop.entrypoint` field must be a string."),fe.assert(i,fe.array(fe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function O_(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;fe.assert(i,fe.optional(fe.array(fe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(ui("The `packages` argument is deprecated and will be removed in a future release. Use `stlite.desktop.dependencies` in your `package.json` instead."),n=r),[...i??[],...n]}async function M_(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;fe.assert(n,fe.optional(fe.array(fe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>Zd.default.resolve(e,o)),a=[];return i!=null&&i.length>0&&(ui("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),a=i),[...s??[],...a]}var Rs=pe(rp());var Ep=pe(gp(),1);var hi=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var G_={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ci=t=>t.replace(/[[\]\\-]/g,"\\$&"),Y_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mp=t=>t.join(""),yp=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=r+1,a=!1,o=!1,l=!1,u=!1,c=r,h="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&a&&!l){c=s+1;break}if(a=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[_,[E,R,x]]of Object.entries(G_))if(t.startsWith(_,s)){if(h)return["$.",!1,t.length-r,!0];s+=_.length,x?n.push(E):i.push(E),o=o||R;continue e}}if(l=!1,h){b>h?i.push(ci(h)+"-"+ci(b)):b===h&&i.push(ci(b)),h="",s++;continue}if(t.startsWith("-]",s+1)){i.push(ci(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=b,s+=2;continue}i.push(ci(b)),s++}if(c<s)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,t.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let b=i[0].length===2?i[0].slice(-1):i[0];return[Y_(b),!1,c-r,!1]}let d="["+(u?"^":"")+mp(i)+"]",f="["+(u?"":"^")+mp(n)+"]";return[i.length&&n.length?"("+d+"|"+f+")":i.length?d:f,o,c-r,!0]};var Be=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var V_=new Set(["!","?","+","*","@"]),bp=t=>V_.has(t),K_="(?!(?:^|/)\\.\\.?(?:$|/))",ns="(?!\\.)",J_=new Set(["[","."]),Z_=new Set(["..","."]),Q_=new Set("().*{}+?[]^$\\!"),X_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fo="[^/]",wp=Fo+"*?",vp=Fo+"+?",br=class t{type;#e;#r;#s=!1;#i=[];#o;#u;#h;#l=!1;#a;#t;#g=!1;constructor(e,r,i={}){this.type=e,e&&(this.#r=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#h=this.#e===this?[]:this.#e.#h,e==="!"&&!this.#e.#l&&this.#h.push(this),this.#u=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#t!==void 0?this.#t:this.type?this.#t=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#t=this.#i.map(e=>String(e)).join("")}#y(){if(this!==this.#e)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let e;for(;e=this.#h.pop();){if(e.type!=="!")continue;let r=e,i=r.#o;for(;i;){for(let n=r.#u+1;!i.type&&n<i.#i.length;n++)for(let s of e.#i){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#i[n])}r=i,i=r.#o}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#o===this))throw new Error("invalid part: "+r);this.#i.push(r)}}toJSON(){let e=this.type===null?this.#i.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#i.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#l&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#u===0)return!0;let e=this.#o;for(let r=0;r<this.#u;r++){let i=e.#i[r];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#i.length:0;return this.#u===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let i of this.#i)r.copyIn(i);return r}static#d(e,r,i,n){let s=!1,a=!1,o=-1,l=!1;if(r.type===null){let f=i,y="";for(;f<e.length;){let b=e.charAt(f++);if(s||b==="\\"){s=!s,y+=b;continue}if(a){f===o+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(f===o+2&&l)&&(a=!1),y+=b;continue}else if(b==="["){a=!0,o=f,l=!1,y+=b;continue}if(!n.noext&&bp(b)&&e.charAt(f)==="("){r.push(y),y="";let _=new t(b,r);f=t.#d(e,_,f,n),r.push(_);continue}y+=b}return r.push(y),f}let u=i+1,c=new t(null,r),h=[],d="";for(;u<e.length;){let f=e.charAt(u++);if(s||f==="\\"){s=!s,d+=f;continue}if(a){u===o+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(u===o+2&&l)&&(a=!1),d+=f;continue}else if(f==="["){a=!0,o=u,l=!1,d+=f;continue}if(bp(f)&&e.charAt(u)==="("){c.push(d),d="";let y=new t(f,c);c.push(y),u=t.#d(e,y,u,n);continue}if(f==="|"){c.push(d),d="",h.push(c),c=new t(null,r);continue}if(f===")")return d===""&&r.#i.length===0&&(r.#g=!0),c.push(d),d="",r.push(...h,c),u;d+=f}return r.type=null,r.#r=void 0,r.#i=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#d(e,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,i,n,s]=this.toRegExpSource();if(!(n||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}get options(){return this.#a}toRegExpSource(e){let r=e??!!this.#a.dot;if(this.#e===this&&this.#y(),!this.type){let l=this.isStart()&&this.isEnd(),u=this.#i.map(f=>{let[y,b,_,E]=typeof f=="string"?t.#v(f,this.#r,l):f.toRegExpSource(e);return this.#r=this.#r||_,this.#s=this.#s||E,y}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&Z_.has(this.#i[0]))){let y=J_,b=r&&y.has(u.charAt(0))||u.startsWith("\\.")&&y.has(u.charAt(2))||u.startsWith("\\.\\.")&&y.has(u.charAt(4)),_=!r&&!e&&y.has(u.charAt(0));c=b?K_:_?ns:""}let h="";return this.isEnd()&&this.#e.#l&&this.#o?.type==="!"&&(h="(?:$|\\/)"),[c+u+h,Be(u),this.#r=!!this.#r,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#c(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#i=[l],this.type=null,this.#r=void 0,[l,Be(this.toString()),!1,!1]}let a=!i||e||r||!ns?"":this.#c(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#g)o=(this.isStart()&&!r?ns:"")+vp;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?ns:"")+wp+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,Be(s),this.#r=!!this.#r,this.#s]}#c(e){return this.#i.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,s,a]=r.toRegExpSource(e);return this.#s=this.#s||a,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#v(e,r,i=!1){let n=!1,s="",a=!1;for(let o=0;o<e.length;o++){let l=e.charAt(o);if(n){n=!1,s+=(Q_.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,c,h,d]=yp(e,o);if(h){s+=u,a=a||c,o+=h-1,r=r||d;continue}}if(l==="*"){i&&e==="*"?s+=vp:s+=wp,r=!0;continue}if(l==="?"){s+=Fo,r=!0;continue}s+=X_(l)}return[s,Be(e),!!r,a]}};var wr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var _e=(t,e,r={})=>(hi(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Me(e,r).match(t)),eS=/^\*+([^+@!?\*\[\(]*)$/,tS=t=>e=>!e.startsWith(".")&&e.endsWith(t),rS=t=>e=>e.endsWith(t),iS=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),nS=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),sS=/^\*+\.\*+$/,aS=t=>!t.startsWith(".")&&t.includes("."),oS=t=>t!=="."&&t!==".."&&t.includes("."),lS=/^\.\*+$/,uS=t=>t!=="."&&t!==".."&&t.startsWith("."),fS=/^\*+$/,hS=t=>t.length!==0&&!t.startsWith("."),cS=t=>t.length!==0&&t!=="."&&t!=="..",dS=/^\?+([^+@!?\*\[\(]*)?$/,pS=([t,e=""])=>{let r=Rp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},gS=([t,e=""])=>{let r=xp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},mS=([t,e=""])=>{let r=xp([t]);return e?i=>r(i)&&i.endsWith(e):r},yS=([t,e=""])=>{let r=Rp([t]);return e?i=>r(i)&&i.endsWith(e):r},Rp=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},xp=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},Tp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_p={win32:{sep:"\\"},posix:{sep:"/"}},bS=Tp==="win32"?_p.win32.sep:_p.posix.sep;_e.sep=bS;var he=Symbol("globstar **");_e.GLOBSTAR=he;var wS="[^/]",vS=wS+"*?",_S="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",SS="(?:(?!(?:\\/|^)\\.).)*?",ES=(t,e={})=>r=>_e(r,t,e);_e.filter=ES;var Le=(t,e={})=>Object.assign({},t,e),RS=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return _e;let e=_e;return Object.assign((i,n,s={})=>e(i,n,Le(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Le(t,s))}static defaults(n){return e.defaults(Le(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,Le(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Le(t,s))}},unescape:(i,n={})=>e.unescape(i,Le(t,n)),escape:(i,n={})=>e.escape(i,Le(t,n)),filter:(i,n={})=>e.filter(i,Le(t,n)),defaults:i=>e.defaults(Le(t,i)),makeRe:(i,n={})=>e.makeRe(i,Le(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Le(t,n)),match:(i,n,s={})=>e.match(i,n,Le(t,s)),sep:e.sep,GLOBSTAR:he})};_e.defaults=RS;var Op=(t,e={})=>(hi(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Ep.default)(t));_e.braceExpand=Op;var xS=(t,e={})=>new Me(t,e).makeRe();_e.makeRe=xS;var TS=(t,e,r={})=>{let i=new Me(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};_e.match=TS;var Sp=/[?*]|[+@!]\(.*?\)|\[|\]/,OS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Me=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){hi(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||Tp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((s,a,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Sp.test(s[2]))&&!Sp.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(c=>this.parse(c))];if(u)return[s[0],...s.slice(1).map(c=>this.parse(c))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)e[i][n]==="**"&&(e[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((i,n)=>{let s=i[i.length-1];return n==="**"&&s==="**"?i:n===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let s=e[n];n===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let n=e[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,e.splice(i-1,2),i-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let i of e){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let a=n;for(;i[a+1]==="**";)a++;a>n&&i.splice(n+1,a-n);let o=i[n+1],l=i[n+2],u=i[n+3];if(o!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,i.splice(n,1);let c=i.slice(0);c[n]="**",e.push(c),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<i.length-1;a++){let o=i[a];a===1&&o===""&&i[0]===""||(o==="."||o==="")&&(r=!0,i.splice(a,1),a--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let s=0;for(;(s=i.indexOf("..",s+1))!==-1;){let a=i[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=s===1&&i[s+1]==="**"?["."]:[];i.splice(s-1,2,...l),i.length===0&&i.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let i=r+1;i<e.length;i++){let n=this.partsMatch(e[r],e[i],!this.preserveMultipleSlashes);if(n){e[r]=[],e[i]=n;break}}return e.filter(r=>r.length)}partsMatch(e,r,i=!1){let n=0,s=0,a=[],o="";for(;n<e.length&&s<r.length;)if(e[n]===r[s])a.push(o==="b"?r[s]:e[n]),n++,s++;else if(i&&e[n]==="**"&&r[s]===e[n+1])a.push(e[n]),n++;else if(i&&r[s]==="**"&&e[n]===r[s+1])a.push(r[s]),s++;else if(e[n]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(o==="b")return!1;o="a",a.push(e[n]),n++,s++}else if(r[s]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="a")return!1;o="b",a.push(r[s]),n++,s++}else return!1;return e.length===r.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i=!1){let n=this.options;if(this.isWindows){let b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),_=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),R=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),x=_?3:b?0:void 0,O=R?3:E?0:void 0;if(typeof x=="number"&&typeof O=="number"){let[k,q]=[e[x],r[O]];k.toLowerCase()===q.toLowerCase()&&(r[O]=k,O>x?r=r.slice(O):x>O&&(e=e.slice(x)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var a=0,o=0,l=e.length,u=r.length;a<l&&o<u;a++,o++){this.debug("matchOne loop");var c=r[o],h=e[a];if(this.debug(r,c,h),c===!1)return!1;if(c===he){this.debug("GLOBSTAR",[r,c,h]);var d=a,f=o+1;if(f===u){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!n.dot&&e[a].charAt(0)===".")return!1;return!0}for(;d<l;){var y=e[d];if(this.debug(`
|
|
34
|
+
globstar while`,e,d,r,f,y),this.matchOne(e.slice(d),r.slice(f),i))return this.debug("globstar found match!",d,l,y),!0;if(y==="."||y===".."||!n.dot&&y.charAt(0)==="."){this.debug("dot detected!",e,d,r,f);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(i&&(this.debug(`
|
|
35
|
+
>>> no match, partial?`,e,d,r,f),d===l))}let b;if(typeof c=="string"?(b=h===c,this.debug("string match",c,h,b)):(b=c.test(h),this.debug("pattern match",c,h,b)),!b)return!1}if(a===l&&o===u)return!0;if(a===l)return i;if(o===u)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return Op(this.pattern,this.options)}parse(e){hi(e);let r=this.options;if(e==="**")return he;if(e==="")return"";let i,n=null;(i=e.match(fS))?n=r.dot?cS:hS:(i=e.match(eS))?n=(r.nocase?r.dot?nS:iS:r.dot?rS:tS)(i[1]):(i=e.match(dS))?n=(r.nocase?r.dot?gS:pS:r.dot?mS:yS)(i):(i=e.match(sS))?n=r.dot?oS:aS:(i=e.match(lS))&&(n=uS);let s=br.fromGlob(e,this.options).toMMPattern();return n&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:n}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?vS:r.dot?_S:SS,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(c=>{if(c instanceof RegExp)for(let h of c.flags.split(""))n.add(h);return typeof c=="string"?OS(c):c===he?he:c._src});return u.forEach((c,h)=>{let d=u[h+1],f=u[h-1];c!==he||f===he||(f===void 0?d!==void 0&&d!==he?u[h+1]="(?:\\/|"+i+"\\/)?"+d:u[h]=i:d===void 0?u[h-1]=f+"(?:\\/|"+i+")?":d!==he&&(u[h-1]=f+"(?:\\/|\\/"+i+"\\/)"+d,u[h+1]=he))}),u.filter(c=>c!==he).join("/")}).join("|"),[a,o]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let a=n[n.length-1];if(!a)for(let o=n.length-2;!a&&o>=0;o--)a=n[o];for(let o=0;o<s.length;o++){let l=s[o],u=n;if(i.matchBase&&l.length===1&&(u=[a]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return _e.defaults(e).Minimatch}};_e.AST=br;_e.Minimatch=Me;_e.escape=wr;_e.unescape=Be;var vr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ap=new Set,Io=typeof process=="object"&&process?process:{},kp=(t,e,r,i)=>{typeof Io.emitWarning=="function"?Io.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},ss=globalThis.AbortController,Mp=globalThis.AbortSignal;if(typeof ss>"u"){Mp=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},ss=class{constructor(){e()}signal=new Mp;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let t=Io.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,kp("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))}}var MS=t=>!Ap.has(t),ox=Symbol("type"),xt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Pp=t=>xt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_r:null:null,_r=class extends Array{constructor(e){super(e),this.fill(0)}},$o=class t{heap;length;static#e=!1;static create(e){let r=Pp(e);if(!r)return[];t.#e=!0;let i=new t(e,r);return t.#e=!1,i}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},di=class t{#e;#r;#s;#i;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#h;#l;#a;#t;#g;#y;#d;#c;#v;#m;#x;#T;#_;#w;#M;#p;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#_,sizes:e.#x,keyMap:e.#l,keyList:e.#a,valList:e.#t,next:e.#g,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#v,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,i,n,s)=>e.#C(r,i,n,s),moveToTail:r=>e.#q(r),indexes:r=>e.#R(r),rindexes:r=>e.#A(r),isStale:r=>e.#b(r)}}get max(){return this.#e}get maxSize(){return this.#r}get calculatedSize(){return this.#h}get size(){return this.#u}get fetchMethod(){return this.#o}get dispose(){return this.#s}get disposeAfter(){return this.#i}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:l,dispose:u,disposeAfter:c,noDisposeOnSet:h,noUpdateTTL:d,maxSize:f=0,maxEntrySize:y=0,sizeCalculation:b,fetchMethod:_,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:O,ignoreFetchAbort:k}=e;if(r!==0&&!xt(r))throw new TypeError("max option must be a nonnegative integer");let q=r?Pp(r):Array;if(!q)throw new Error("invalid max value: "+r);if(this.#e=r,this.#r=f,this.maxEntrySize=y||this.#r,this.sizeCalculation=b,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(_!==void 0&&typeof _!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=_,this.#M=!!_,this.#l=new Map,this.#a=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#g=new q(r),this.#y=new q(r),this.#d=0,this.#c=0,this.#v=$o.create(r),this.#u=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof c=="function"?(this.#i=c,this.#m=[]):(this.#i=void 0,this.#m=void 0),this.#w=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#r!==0&&!xt(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!xt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!R,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=xt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!xt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#k()}if(this.#e===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#r){let F="LRU_CACHE_UNBOUNDED";MS(F)&&(Ap.add(F),kp("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,t))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#k(){let e=new _r(this.#e),r=new _r(this.#e);this.#_=e,this.#T=r,this.#n=(s,a,o=vr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.delete(this.#a[s])},a+1);l.unref&&l.unref()}},this.#O=s=>{r[s]=e[s]!==0?vr.now():0},this.#S=(s,a)=>{if(e[a]){let o=e[a],l=r[a];if(!o||!l)return;s.ttl=o,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=o-u}};let i=0,n=()=>{let s=vr.now();if(this.ttlResolution>0){i=s;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return s};this.getRemainingTTL=s=>{let a=this.#l.get(s);if(a===void 0)return 0;let o=e[a],l=r[a];if(!o||!l)return 1/0;let u=(i||n())-l;return o-u},this.#b=s=>{let a=r[s],o=e[s];return!!o&&!!a&&(i||n())-a>o}}#O=()=>{};#S=()=>{};#n=()=>{};#b=()=>!1;#P(){let e=new _r(this.#e);this.#h=0,this.#x=e,this.#E=r=>{this.#h-=e[r],e[r]=0},this.#j=(r,i,n,s)=>{if(this.#f(i))return 0;if(!xt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!xt(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#L=(r,i,n)=>{if(e[r]=i,this.#r){let s=this.#r-e[r];for(;this.#h>s;)this.#D(!0)}this.#h+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#h)}}#E=e=>{};#L=(e,r,i)=>{};#j=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#c;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#d));)r=this.#y[r]}*#A({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#d;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#c));)r=this.#g[r]}#N(e){return e!==void 0&&this.#l.get(this.#a[e])===e}*entries(){for(let e of this.#R())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*rentries(){for(let e of this.#A())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*keys(){for(let e of this.#R()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*rkeys(){for(let e of this.#A()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*values(){for(let e of this.#R())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#A())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#a[i],this))return this.get(this.#a[i],r)}}forEach(e,r=this){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}rforEach(e,r=this){for(let i of this.#A()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}purgeStale(){let e=!1;for(let r of this.#A({allowStale:!0}))this.#b(r)&&(this.delete(this.#a[r]),e=!0);return e}info(e){let r=this.#l.get(e);if(r===void 0)return;let i=this.#t[r],n=this.#f(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#_&&this.#T){let a=this.#_[r],o=this.#T[r];if(a&&o){let l=a-(vr.now()-o);s.ttl=l,s.start=Date.now()}}return this.#x&&(s.size=this.#x[r]),s}dump(){let e=[];for(let r of this.#R({allowStale:!0})){let i=this.#a[r],n=this.#t[r],s=this.#f(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let a={value:s};if(this.#_&&this.#T){a.ttl=this.#_[r];let o=vr.now()-this.#T[r];a.start=Math.floor(Date.now()-o)}this.#x&&(a.size=this.#x[r]),e.unshift([i,a])}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=vr.now()-n}this.set(r,i.value,i)}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,c=this.#j(e,r,i.size||0,o);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let h=this.#u===0?void 0:this.#l.get(e);if(h===void 0)h=this.#u===0?this.#c:this.#v.length!==0?this.#v.pop():this.#u===this.#e?this.#D(!1):this.#u,this.#a[h]=e,this.#t[h]=r,this.#l.set(e,h),this.#g[this.#c]=h,this.#y[h]=this.#c,this.#c=h,this.#u++,this.#L(h,c,l),l&&(l.set="add"),u=!1;else{this.#q(h);let d=this.#t[h];if(r!==d){if(this.#M&&this.#f(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=d;f!==void 0&&!a&&(this.#w&&this.#s?.(f,e,"set"),this.#p&&this.#m?.push([f,e,"set"]))}else a||(this.#w&&this.#s?.(d,e,"set"),this.#p&&this.#m?.push([d,e,"set"]));if(this.#E(h),this.#L(h,c,l),this.#t[h]=r,l){l.set="replace";let f=d&&this.#f(d)?d.__staleWhileFetching:d;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(n!==0&&!this.#_&&this.#k(),this.#_&&(u||this.#n(h,n,s),l&&this.#S(l,h)),!a&&this.#p&&this.#m){let d=this.#m,f;for(;f=d?.shift();)this.#i?.(...f)}return this}pop(){try{for(;this.#u;){let e=this.#t[this.#d];if(this.#D(!0),this.#f(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}}#D(e){let r=this.#d,i=this.#a[r],n=this.#t[r];return this.#M&&this.#f(n)?n.__abortController.abort(new Error("evicted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,i,"evict"),this.#p&&this.#m?.push([n,i,"evict"])),this.#E(r),e&&(this.#a[r]=void 0,this.#t[r]=void 0,this.#v.push(r)),this.#u===1?(this.#d=this.#c=0,this.#v.length=0):this.#d=this.#g[r],this.#l.delete(i),this.#u--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#l.get(e);if(s!==void 0){let a=this.#t[s];if(this.#f(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#b(s))n&&(n.has="stale",this.#S(n,s));else return i&&this.#O(s),n&&(n.has="hit",this.#S(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#l.get(e);if(n===void 0||!i&&this.#b(n))return;let s=this.#t[n];return this.#f(s)?s.__staleWhileFetching:s}#C(e,r,i,n){let s=r===void 0?void 0:this.#t[r];if(this.#f(s))return s;let a=new ss,{signal:o}=i;o?.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:n},u=(b,_=!1)=>{let{aborted:E}=a.signal,R=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(E&&!_?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,R&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),E&&!R&&!_)return h(a.signal.reason);let x=f;return this.#t[r]===f&&(b===void 0?x.__staleWhileFetching?this.#t[r]=x.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,b,l.options))),b},c=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),h(b)),h=b=>{let{aborted:_}=a.signal,E=_&&i.allowStaleOnFetchAbort,R=E||i.allowStaleOnFetchRejection,x=R||i.noDeleteOnFetchRejection,O=f;if(this.#t[r]===f&&(!x||O.__staleWhileFetching===void 0?this.delete(e):E||(this.#t[r]=O.__staleWhileFetching)),R)return i.status&&O.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),O.__staleWhileFetching;if(O.__returned===O)throw b},d=(b,_)=>{let E=this.#o?.(e,s,l);E&&E instanceof Promise&&E.then(R=>b(R===void 0?void 0:R),_),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=R=>u(R,!0)))})};i.status&&(i.status.fetchDispatched=!0);let f=new Promise(d).then(u,c),y=Object.assign(f,{__abortController:a,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,y,{...l.options,status:void 0}),r=this.#l.get(e)):this.#t[r]=y,y}#f(e){if(!this.#M)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof ss}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:b,forceRefresh:_=!1,status:E,signal:R}=r;if(!this.#M)return E&&(E.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:E});let x={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:y,ignoreFetchAbort:f,status:E,signal:R},O=this.#l.get(e);if(O===void 0){E&&(E.fetch="miss");let k=this.#C(e,O,x,b);return k.__returned=k}else{let k=this.#t[O];if(this.#f(k)){let ee=i&&k.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",ee&&(E.returnedStale=!0)),ee?k.__staleWhileFetching:k.__returned=k}let q=this.#b(O);if(!_&&!q)return E&&(E.fetch="hit"),this.#q(O),n&&this.#O(O),E&&this.#S(E,O),k;let F=this.#C(e,O,x,b),U=F.__staleWhileFetching!==void 0&&i;return E&&(E.fetch=q?"stale":"refresh",U&&q&&(E.returnedStale=!0)),U?F.__staleWhileFetching:F.__returned=F}}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=r,o=this.#l.get(e);if(o!==void 0){let l=this.#t[o],u=this.#f(l);return a&&this.#S(a,o),this.#b(o)?(a&&(a.get="stale"),u?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.delete(e),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#q(o),n&&this.#O(o),l))}else a&&(a.get="miss")}#F(e,r){this.#y[r]=e,this.#g[e]=r}#q(e){e!==this.#c&&(e===this.#d?this.#d=this.#g[e]:this.#F(this.#y[e],this.#g[e]),this.#F(this.#c,e),this.#c=e)}delete(e){let r=!1;if(this.#u!==0){let i=this.#l.get(e);if(i!==void 0)if(r=!0,this.#u===1)this.clear();else{this.#E(i);let n=this.#t[i];if(this.#f(n)?n.__abortController.abort(new Error("deleted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,e,"delete"),this.#p&&this.#m?.push([n,e,"delete"])),this.#l.delete(e),this.#a[i]=void 0,this.#t[i]=void 0,i===this.#c)this.#c=this.#y[i];else if(i===this.#d)this.#d=this.#g[i];else{let s=this.#y[i];this.#g[s]=this.#g[i];let a=this.#g[i];this.#y[a]=this.#y[i]}this.#u--,this.#v.push(i)}}if(this.#p&&this.#m?.length){let i=this.#m,n;for(;n=i?.shift();)this.#i?.(...n)}return r}clear(){for(let e of this.#A({allowStale:!0})){let r=this.#t[e];if(this.#f(r))r.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#w&&this.#s?.(r,i,"delete"),this.#p&&this.#m?.push([r,i,"delete"])}}if(this.#l.clear(),this.#t.fill(void 0),this.#a.fill(void 0),this.#_&&this.#T&&(this.#_.fill(0),this.#T.fill(0)),this.#x&&this.#x.fill(0),this.#d=0,this.#c=0,this.#v.length=0,this.#h=0,this.#u=0,this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}};var Rr=require("path"),Wp=require("url"),FS=pe(require("fs"),1),et=require("fs"),Mt=require("fs/promises");var cs=require("events"),Yo=pe(require("stream"),1),jp=require("string_decoder"),Dp=typeof process=="object"&&process?process:{stdout:null,stderr:null},AS=t=>!!t&&typeof t=="object"&&(t instanceof Ot||t instanceof Yo.default||kS(t)||PS(t)),kS=t=>!!t&&typeof t=="object"&&t instanceof cs.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==Yo.default.Writable.prototype.pipe,PS=t=>!!t&&typeof t=="object"&&t instanceof cs.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",at=Symbol("EOF"),ot=Symbol("maybeEmitEnd"),Tt=Symbol("emittedEnd"),as=Symbol("emittingEnd"),pi=Symbol("emittedError"),os=Symbol("closed"),qp=Symbol("read"),ls=Symbol("flush"),Cp=Symbol("flushChunk"),Ue=Symbol("encoding"),Sr=Symbol("decoder"),se=Symbol("flowing"),gi=Symbol("paused"),Er=Symbol("resume"),ae=Symbol("buffer"),Se=Symbol("pipes"),oe=Symbol("bufferLength"),Wo=Symbol("bufferPush"),us=Symbol("bufferShift"),ge=Symbol("objectMode"),X=Symbol("destroyed"),Bo=Symbol("error"),Uo=Symbol("emitData"),Lp=Symbol("emitEnd"),zo=Symbol("emitEnd2"),Qe=Symbol("async"),Ho=Symbol("abort"),fs=Symbol("aborted"),mi=Symbol("signal"),Jt=Symbol("dataListeners"),Ae=Symbol("discarded"),yi=t=>Promise.resolve().then(t),DS=t=>t(),qS=t=>t==="end"||t==="finish"||t==="prefinish",CS=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,LS=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),hs=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Er](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Go=class extends hs{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}},jS=t=>!!t.objectMode,NS=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Ot=class extends cs.EventEmitter{[se]=!1;[gi]=!1;[Se]=[];[ae]=[];[ge];[Ue];[Qe];[Sr];[at]=!1;[Tt]=!1;[as]=!1;[os]=!1;[pi]=null;[oe]=0;[X]=!1;[mi];[fs]=!1;[Jt]=0;[Ae]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");jS(r)?(this[ge]=!0,this[Ue]=null):NS(r)?(this[Ue]=r.encoding,this[ge]=!1):(this[ge]=!1,this[Ue]=null),this[Qe]=!!r.async,this[Sr]=this[Ue]?new jp.StringDecoder(this[Ue]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[ae]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Se]});let{signal:i}=r;i&&(this[mi]=i,i.aborted?this[Ho]():i.addEventListener("abort",()=>this[Ho]()))}get bufferLength(){return this[oe]}get encoding(){return this[Ue]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ge]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Qe]}set async(e){this[Qe]=this[Qe]||!!e}[Ho](){this[fs]=!0,this.emit("abort",this[mi]?.reason),this.destroy(this[mi]?.reason)}get aborted(){return this[fs]}set aborted(e){}write(e,r,i){if(this[fs])return!1;if(this[at])throw new Error("write after end");if(this[X])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Qe]?yi:DS;if(!this[ge]&&!Buffer.isBuffer(e)){if(LS(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(CS(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ge]?(this[se]&&this[oe]!==0&&this[ls](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):e.length?(typeof e=="string"&&!(r===this[Ue]&&!this[Sr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Ue]&&(e=this[Sr].write(e)),this[se]&&this[oe]!==0&&this[ls](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):(this[oe]!==0&&this.emit("readable"),i&&n(i),this[se])}read(e){if(this[X])return null;if(this[Ae]=!1,this[oe]===0||e===0||e&&e>this[oe])return this[ot](),null;this[ge]&&(e=null),this[ae].length>1&&!this[ge]&&(this[ae]=[this[Ue]?this[ae].join(""):Buffer.concat(this[ae],this[oe])]);let r=this[qp](e||null,this[ae][0]);return this[ot](),r}[qp](e,r){if(this[ge])this[us]();else{let i=r;e===i.length||e===null?this[us]():typeof i=="string"?(this[ae][0]=i.slice(e),r=i.slice(0,e),this[oe]-=e):(this[ae][0]=i.subarray(e),r=i.subarray(0,e),this[oe]-=e)}return this.emit("data",r),!this[ae].length&&!this[at]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r="utf8"),e!==void 0&&this.write(e,r),i&&this.once("end",i),this[at]=!0,this.writable=!1,(this[se]||!this[gi])&&this[ot](),this}[Er](){this[X]||(!this[Jt]&&!this[Se].length&&(this[Ae]=!0),this[gi]=!1,this[se]=!0,this.emit("resume"),this[ae].length?this[ls]():this[at]?this[ot]():this.emit("drain"))}resume(){return this[Er]()}pause(){this[se]=!1,this[gi]=!0,this[Ae]=!1}get destroyed(){return this[X]}get flowing(){return this[se]}get paused(){return this[gi]}[Wo](e){this[ge]?this[oe]+=1:this[oe]+=e.length,this[ae].push(e)}[us](){return this[ge]?this[oe]-=1:this[oe]-=this[ae][0].length,this[ae].shift()}[ls](e=!1){do;while(this[Cp](this[us]())&&this[ae].length);!e&&!this[ae].length&&!this[at]&&this.emit("drain")}[Cp](e){return this.emit("data",e),this[se]}pipe(e,r){if(this[X])return e;this[Ae]=!1;let i=this[Tt];return r=r||{},e===Dp.stdout||e===Dp.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Se].push(r.proxyErrors?new Go(this,e,r):new hs(this,e,r)),this[Qe]?yi(()=>this[Er]()):this[Er]()),e}unpipe(e){let r=this[Se].find(i=>i.dest===e);r&&(this[Se].length===1?(this[se]&&this[Jt]===0&&(this[se]=!1),this[Se]=[]):this[Se].splice(this[Se].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[Ae]=!1,this[Jt]++,!this[Se].length&&!this[se]&&this[Er]();else if(e==="readable"&&this[oe]!==0)super.emit("readable");else if(qS(e)&&this[Tt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[pi]){let n=r;this[Qe]?yi(()=>n.call(this,this[pi])):n.call(this,this[pi])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Jt]=this.listeners("data").length,this[Jt]===0&&!this[Ae]&&!this[Se].length&&(this[se]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Jt]=0,!this[Ae]&&!this[Se].length&&(this[se]=!1)),r}get emittedEnd(){return this[Tt]}[ot](){!this[as]&&!this[Tt]&&!this[X]&&this[ae].length===0&&this[at]&&(this[as]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[os]&&this.emit("close"),this[as]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==X&&this[X])return!1;if(e==="data")return!this[ge]&&!i?!1:this[Qe]?(yi(()=>this[Uo](i)),!0):this[Uo](i);if(e==="end")return this[Lp]();if(e==="close"){if(this[os]=!0,!this[Tt]&&!this[X])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[pi]=i,super.emit(Bo,i);let s=!this[mi]||this.listeners("error").length?super.emit("error",i):!1;return this[ot](),s}else if(e==="resume"){let s=super.emit("resume");return this[ot](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...r);return this[ot](),n}[Uo](e){for(let i of this[Se])i.dest.write(e)===!1&&this.pause();let r=this[Ae]?!1:super.emit("data",e);return this[ot](),r}[Lp](){return this[Tt]?!1:(this[Tt]=!0,this.readable=!1,this[Qe]?(yi(()=>this[zo]()),!0):this[zo]())}[zo](){if(this[Sr]){let r=this[Sr].end();if(r){for(let i of this[Se])i.dest.write(r);this[Ae]||super.emit("data",r)}}for(let r of this[Se])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ge]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[ge]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[ge])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ue]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(X,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ae]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[at])return r();let s,a,o=h=>{this.off("data",l),this.off("end",u),this.off(X,c),r(),a(h)},l=h=>{this.off("error",o),this.off("end",u),this.off(X,c),this.pause(),s({value:h,done:!!this[at]})},u=()=>{this.off("error",o),this.off("data",l),this.off(X,c),r(),s({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((h,d)=>{a=d,s=h,this.once(X,c),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Ae]=!1;let e=!1,r=()=>(this.pause(),this.off(Bo,r),this.off(X,r),this.off("end",r),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(Bo,r),this.once(X,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[X])return e?this.emit("error",e):this.emit(X),this;this[X]=!0,this[Ae]=!0,this[ae].length=0,this[oe]=0;let r=this;return typeof r.close=="function"&&!this[os]&&r.close(),e?this.emit("error",e):this.emit(X),this}static get isStream(){return AS}};var IS=et.realpathSync.native,wi={lstatSync:et.lstatSync,readdir:et.readdir,readdirSync:et.readdirSync,readlinkSync:et.readlinkSync,realpathSync:IS,promises:{lstat:Mt.lstat,readdir:Mt.readdir,readlink:Mt.readlink,realpath:Mt.realpath}},Bp=t=>!t||t===wi||t===FS?wi:{...wi,...t,promises:{...wi.promises,...t.promises||{}}},Up=/^\\\\\?\\([a-z]:)\\?$/i,$S=t=>t.replace(/\//g,"\\").replace(Up,"$1\\"),WS=/[\\\/]/,Ne=0,zp=1,Hp=2,Xe=4,Gp=6,Yp=8,Zt=10,Vp=12,je=15,bi=~je,Vo=16,Np=32,vi=64,ze=128,ds=256,gs=512,Fp=vi|ze|gs,BS=1023,Ko=t=>t.isFile()?Yp:t.isDirectory()?Xe:t.isSymbolicLink()?Zt:t.isCharacterDevice()?Hp:t.isBlockDevice()?Gp:t.isSocket()?Vp:t.isFIFO()?zp:Ne,Ip=new Map,_i=t=>{let e=Ip.get(t);if(e)return e;let r=t.normalize("NFKD");return Ip.set(t,r),r},$p=new Map,ps=t=>{let e=$p.get(t);if(e)return e;let r=_i(t.toLowerCase());return $p.set(t,r),r},ms=class extends di{constructor(){super({max:256})}},Jo=class extends di{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},Kp=Symbol("PathScurry setAsCwd"),me=class{name;root;roots;parent;nocase;#e;#r;get dev(){return this.#r}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#u;get gid(){return this.#u}#h;get rdev(){return this.#h}#l;get blksize(){return this.#l}#a;get ino(){return this.#a}#t;get size(){return this.#t}#g;get blocks(){return this.#g}#y;get atimeMs(){return this.#y}#d;get mtimeMs(){return this.#d}#c;get ctimeMs(){return this.#c}#v;get birthtimeMs(){return this.#v}#m;get atime(){return this.#m}#x;get mtime(){return this.#x}#T;get ctime(){return this.#T}#_;get birthtime(){return this.#_}#w;#M;#p;#k;#O;#S;#n;#b;#P;#E;get path(){return(this.parent||this).fullpath()}constructor(e,r=Ne,i,n,s,a,o){this.name=e,this.#w=s?ps(e):_i(e),this.#n=r&BS,this.nocase=s,this.roots=n,this.root=i||this,this.#b=a,this.#p=o.fullpath,this.#O=o.relative,this.#S=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=Bp(o.fs)}depth(){return this.#M!==void 0?this.#M:this.parent?this.#M=this.parent.depth()+1:this.#M=0}childrenCache(){return this.#b}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#L(n):this.#L(n)}#L(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#b.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#b.set(this,r),this.#n&=~Vo,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?ps(e):_i(e);for(let l of i)if(l.#w===n)return l;let s=this.parent?this.sep:"",a=this.#p?this.#p+s+e:void 0,o=this.newChild(e,Ne,{...r,parent:this,fullpath:a});return this.canReaddir()||(o.#n|=ze),i.push(o),o}relative(){if(this.#O!==void 0)return this.#O;let e=this.name,r=this.parent;if(!r)return this.#O=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.#S!==void 0)return this.#S;let e=this.name,r=this.parent;if(!r)return this.#S=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#p!==void 0)return this.#p;let e=this.name,r=this.parent;if(!r)return this.#p=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#p=n}fullpathPosix(){if(this.#k!==void 0)return this.#k;if(this.sep==="/")return this.#k=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#k=`//?/${n}`:this.#k=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#k=i}isUnknown(){return(this.#n&je)===Ne}isType(e){return this[`is${e}`]()}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(this.#n&je)===Yp}isDirectory(){return(this.#n&je)===Xe}isCharacterDevice(){return(this.#n&je)===Hp}isBlockDevice(){return(this.#n&je)===Gp}isFIFO(){return(this.#n&je)===zp}isSocket(){return(this.#n&je)===Vp}isSymbolicLink(){return(this.#n&Zt)===Zt}lstatCached(){return this.#n&Np?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#E}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let e=this.#n&je;return!(e!==Ne&&e!==Zt||this.#n&ds||this.#n&ze)}calledReaddir(){return!!(this.#n&Vo)}isENOENT(){return!!(this.#n&ze)}isNamed(e){return this.nocase?this.#w===ps(e):this.#w===_i(e)}async readlink(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}readlinkSync(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}#j(e){this.#n|=Vo;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#R()}}#R(){this.#n&ze||(this.#n=(this.#n|ze)&bi,this.#A())}#A(){let e=this.children();e.provisional=0;for(let r of e)r.#R()}#N(){this.#n|=gs,this.#D()}#D(){if(this.#n&vi)return;let e=this.#n;(e&je)===Xe&&(e&=bi),this.#n=e|vi,this.#A()}#C(e=""){e==="ENOTDIR"||e==="EPERM"?this.#D():e==="ENOENT"?this.#R():this.children().provisional=0}#f(e=""){e==="ENOTDIR"?this.parent.#D():e==="ENOENT"&&this.#R()}#F(e=""){let r=this.#n;r|=ds,e==="ENOENT"&&(r|=ze),(e==="EINVAL"||e==="UNKNOWN")&&(r&=bi),this.#n=r,e==="ENOTDIR"&&this.parent&&this.parent.#D()}#q(e,r){return this.#z(e,r)||this.#U(e,r)}#U(e,r){let i=Ko(e),n=this.newChild(e.name,i,{parent:this}),s=n.#n&je;return s!==Xe&&s!==Zt&&s!==Ne&&(n.#n|=vi),r.unshift(n),r.provisional++,n}#z(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?ps(e.name):_i(e.name))===n.#w)return this.#H(e,n,i,r)}}#H(e,r,i,n){let s=r.name;return r.#n=r.#n&bi|Ko(e),s!==e.name&&(r.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(r)),n.provisional++,r}async lstat(){if(!(this.#n&ze))try{return this.#B(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#f(e.code)}}lstatSync(){if(!(this.#n&ze))try{return this.#B(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#f(e.code)}}#B(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:a,blocks:o,ctime:l,ctimeMs:u,dev:c,gid:h,ino:d,mode:f,mtime:y,mtimeMs:b,nlink:_,rdev:E,size:R,uid:x}=e;this.#m=r,this.#y=i,this.#_=n,this.#v=s,this.#l=a,this.#g=o,this.#T=l,this.#c=u,this.#r=c,this.#u=h,this.#a=d,this.#s=f,this.#x=y,this.#d=b,this.#i=_,this.#h=E,this.#t=R,this.#o=x;let O=Ko(e);this.#n=this.#n&bi|O|Np,O!==Ne&&O!==Xe&&O!==Zt&&(this.#n|=vi)}#$=[];#W=!1;#G(e){this.#W=!1;let r=this.#$.slice();this.#$.length=0,r.forEach(i=>i(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#$.push(e),this.#W)return;this.#W=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,a)=>{if(s)this.#C(s.code),i.provisional=0;else{for(let o of a)this.#q(o,i);this.#j(i)}this.#G(i.slice(0,i.provisional))})}#I;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#I)await this.#I;else{let i=()=>{};this.#I=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#q(n,e);this.#j(e)}catch(n){this.#C(n.code),e.provisional=0}this.#I=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let i of this.#e.readdirSync(r,{withFileTypes:!0}))this.#q(i,e);this.#j(e)}catch(i){this.#C(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#n&Fp)return!1;let e=je&this.#n;return e===Ne||e===Xe||e===Zt}shouldWalk(e,r){return(this.#n&Xe)===Xe&&!(this.#n&Fp)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#E)return this.#E;if(!((gs|ds|ze)&this.#n))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#E)return this.#E;if(!((gs|ds|ze)&this.#n))try{let e=this.#e.realpathSync(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}[Kp](e){if(e===this)return;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#O=i.join(this.sep),n.#S=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#O=void 0,n.#S=void 0,n=n.parent}},ys=class t extends me{sep="\\";splitSep=WS;constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Rr.win32.parse(e).root}getRoot(e){if(e=$S(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,i]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=i;return this.roots[e]=new xr(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Up,"$1\\"),e===r}},bs=class t extends me{splitSep="/";sep="/";constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},ws=class{root;rootPath;roots;cwd;#e;#r;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=wi}={}){this.#i=Bp(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Wp.fileURLToPath)(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new ms,this.#r=new ms,this.#s=new Jo(s);let l=o.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let u=this.root,c=l.length-1,h=r.sep,d=this.rootPath,f=!1;for(let y of l){let b=c--;u=u.child(y,{relative:new Array(b).fill("..").join(h),relativePosix:new Array(b).fill("..").join("/"),fullpath:d+=(f?"":h)+y}),f=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#e.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpath();return this.#e.set(r,n),n}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#r.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#r.set(r,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i}=r;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0}=r;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.readlink();return r?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return r?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.realpath();return r?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return r?i:i?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set,u=(h,d)=>{l.add(h),h.readdirCB((f,y)=>{if(f)return d(f);let b=y.length;if(!b)return d();let _=()=>{--b===0&&d()};for(let E of y)(!s||s(E))&&o.push(i?E:E.fullpath()),n&&E.isSymbolicLink()?E.realpath().then(R=>R?.isUnknown()?R.lstat():R).then(R=>R?.shouldWalk(l,a)?u(R,_):_()):E.shouldWalk(l,a)?u(E,_):_()},!0)},c=e;return new Promise((h,d)=>{u(c,f=>{if(f)return d(f);h(o)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let c=u.readdirSync();for(let h of c){(!s||s(h))&&o.push(i?h:h.fullpath());let d=h;if(h.isSymbolicLink()){if(!(n&&(d=h.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(l,a)&&l.add(d)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r;(!s||s(e))&&(yield i?e:e.fullpath());let o=new Set([e]);for(let l of o){let u=l.readdirSync();for(let c of u){(!s||s(c))&&(yield i?c:c.fullpath());let h=c;if(c.isSymbolicLink()){if(!(n&&(h=c.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(o,a)&&o.add(h)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Ot({objectMode:!0});(!s||s(e))&&o.write(i?e:e.fullpath());let l=new Set,u=[e],c=0,h=()=>{let d=!1;for(;!d;){let f=u.shift();if(!f){c===0&&o.end();return}c++,l.add(f);let y=(_,E,R=!1)=>{if(_)return o.emit("error",_);if(n&&!R){let x=[];for(let O of E)O.isSymbolicLink()&&x.push(O.realpath().then(k=>k?.isUnknown()?k.lstat():k));if(x.length){Promise.all(x).then(()=>y(null,E,!0));return}}for(let x of E)x&&(!s||s(x))&&(o.write(i?x:x.fullpath())||(d=!0));c--;for(let x of E){let O=x.realpathCached()||x;O.shouldWalk(l,a)&&u.push(O)}d&&!o.flowing?o.once("drain",h):b||h()},b=!0;f.readdirCB(y,!0),b=!1}};return h(),o}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Ot({objectMode:!0}),l=new Set;(!s||s(e))&&o.write(i?e:e.fullpath());let u=[e],c=0,h=()=>{let d=!1;for(;!d;){let f=u.shift();if(!f){c===0&&o.end();return}c++,l.add(f);let y=f.readdirSync();for(let b of y)(!s||s(b))&&(o.write(i?b:b.fullpath())||(d=!0));c--;for(let b of y){let _=b;if(b.isSymbolicLink()){if(!(n&&(_=b.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(l,a)&&u.push(_)}}d&&!o.flowing&&o.once("drain",h)};return h(),o}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Kp](r)}},xr=class extends ws{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,Rr.win32,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Rr.win32.parse(e).root.toUpperCase()}newRoot(e){return new ys(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Tr=class extends ws{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,Rr.posix,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new bs(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Si=class extends Tr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},cx=process.platform==="win32"?ys:bs,Jp=process.platform==="win32"?xr:process.platform==="darwin"?Si:Tr;var Zp=require("url");var US=t=>t.length>=1,zS=t=>t.length>=1,Or=class t{#e;#r;#s;length;#i;#o;#u;#h;#l;#a;#t=!0;constructor(e,r,i,n){if(!US(e))throw new TypeError("empty pattern list");if(!zS(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#r=r,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,a,o,l,...u]=this.#e,[c,h,d,f,...y]=this.#r;u[0]===""&&(u.shift(),y.shift());let b=[s,a,o,l,""].join("/"),_=[c,h,d,f,""].join("/");this.#e=[b,...u],this.#r=[_,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...a]=this.#e,[o,...l]=this.#r;a[0]===""&&(a.shift(),l.shift());let u=s+"/",c=o+"/";this.#e=[u,...a],this.#r=[c,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===he}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#u=this.#u||(this.#s===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new t(this.#e,this.#r,this.#s+1,this.#i),this.#o.#a=this.#a,this.#o.#l=this.#l,this.#o.#h=this.#h,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#l!==void 0?this.#l:this.#l=this.#i==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#t)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#t?!1:(this.#t=!1,!0)}};var HS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ei=class{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=HS}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];let o={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let l of e){let u=new Me(l,o);for(let c=0;c<u.set.length;c++){let h=u.set[c],d=u.globParts[c];if(!h||!d)throw new Error("invalid pattern object");for(;h[0]==="."&&d[0]===".";)h.shift(),d.shift();let f=new Or(h,d,0,a),y=new Me(f.globString(),o),b=d[d.length-1]==="**",_=f.isAbsolute();_?this.absolute.push(y):this.relative.push(y),b&&(_?this.absoluteChildren.push(y):this.relativeChildren.push(y))}}}ignored(e){let r=e.fullpath(),i=`${r}/`,n=e.relative()||".",s=`${n}/`;for(let a of this.relative)if(a.match(n)||a.match(s))return!0;for(let a of this.absolute)if(a.match(r)||a.match(i))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(r))return!0;return!1}};var Zo=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let i=e.fullpath(),n=this.store.get(i);n?n.add(r.globString()):this.store.set(i,new Set([r.globString()]))}},Qo=class{store=new Map;add(e,r,i){let n=(r?2:0)|(i?1:0),s=this.store.get(e);this.store.set(e,s===void 0?n:n&s)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}},Xo=class{store=new Map;add(e,r){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(n=>n.globString()===r.globString())||i.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ri=class t{hasWalkedCache;matches=new Qo;subwalks=new Xo;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Zo}processPatterns(e,r){this.patterns=r;let i=r.map(n=>[e,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let a=s.root(),o=s.isAbsolute()&&this.opts.absolute!==!1;if(a){n=n.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let h=s.rest();if(h)s=h;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,c=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,c=!0;if(l=s.pattern(),u=s.rest(),c){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let h=l===".."||l===""||l===".";this.matches.add(n.resolve(l),o,h);continue}else if(l===he){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let h=u?.pattern(),d=u?.rest();if(!u||(h===""||h===".")&&!d)this.matches.add(n,o,h===""||h===".");else if(h===".."){let f=n.parent||n;d?this.hasWalkedCache.hasWalked(f,d)||this.subwalks.add(f,d):this.matches.add(f,o,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let i=this.subwalks.get(e),n=this.child();for(let s of r)for(let a of i){let o=a.isAbsolute(),l=a.pattern(),u=a.rest();l===he?n.testGlobstar(s,a,u,o):l instanceof RegExp?n.testRegExp(s,l,u,o):n.testString(s,l,u,o)}return n}testGlobstar(e,r,i,n){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(e,i):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let a=e.parent||e;this.subwalks.add(a,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,r,i,n){r.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,r,i,n){e.isNamed(r)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var GS=(t,e)=>typeof t=="string"?new Ei([t],e):Array.isArray(t)?new Ei(t,e):t,vs=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#r;#s;signal;maxDepth;constructor(e,r,i){this.patterns=e,this.path=r,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",i.ignore&&(this.#r=GS(i.ignore,i)),this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){return this.seen.has(e)||!!this.#r?.ignored?.(e)}#o(e){return!!this.#r?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=await s.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#i(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=s.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#i(e))return;let i=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+n)}else{let s=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!s.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(s?a+s+n:"."+n)}}async match(e,r,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,r)}matchSync(e,r,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,r)}walkCB(e,r,i){this.signal?.aborted&&i(),this.walkCB2(e,r,new Ri(this.opts),i)}walkCB2(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirCached();o.calledReaddir()?this.walkCB3(o,l,i,a):o.readdirCB((u,c)=>this.walkCB3(o,c,i,a),!0)}a()}walkCB3(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let[o,l]of i.subwalks.entries())s++,this.walkCB2(o,l,i.child(),a);a()}walkCBSync(e,r,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,r,new Ri(this.opts),i)}walkCB2Sync(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirSync();this.walkCB3Sync(o,l,i,a)}a()}walkCB3Sync(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let[o,l]of i.subwalks.entries())s++,this.walkCB2Sync(o,l,i.child(),a);a()}},xi=class extends vs{matches;constructor(e,r,i){super(e,r,i),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(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}},Ti=class extends vs{results;constructor(e,r,i){super(e,r,i),this.results=new Ot({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,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}};var YS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",He=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,Zp.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||YS,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?xr:r.platform==="darwin"?Si:r.platform?Tr:Jp;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new Me(l,n)),[a,o]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=a.map((l,u)=>{let c=o[u];if(!c)throw new Error("invalid pattern object");return new Or(l,c,0,this.platform)})}async walk(){return[...await new xi(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}).walk()]}walkSync(){return[...new xi(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}).walkSync()]}stream(){return new Ti(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}).stream()}streamSync(){return new Ti(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}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var el=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new Me(r,e).hasMagic())return!0;return!1};function Ss(t,e={}){return new He(t,e).streamSync()}function Xp(t,e={}){return new He(t,e).stream()}function eg(t,e={}){return new He(t,e).walkSync()}async function Qp(t,e={}){return new He(t,e).walk()}function Es(t,e={}){return new He(t,e).iterateSync()}function tg(t,e={}){return new He(t,e).iterate()}var VS=Ss,KS=Object.assign(Xp,{sync:Ss}),JS=Es,ZS=Object.assign(tg,{sync:Es}),QS=Object.assign(eg,{stream:Ss,iterate:Es}),_s=Object.assign(Qp,{glob:Qp,globSync:eg,sync:QS,globStream:Xp,stream:KS,globStreamSync:Ss,streamSync:VS,globIterate:tg,iterate:ZS,globIterateSync:Es,iterateSync:JS,Glob:He,hasMagic:el,escape:wr,unescape:Be});_s.glob=_s;var XS="../build",eE="../wheels";async function sg(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`
|
|
36
|
+
`))}async function tE(t){I.info("Copy the build directory (the bare built app files) to this directory...");let e=ce.default.resolve(__dirname,XS);if(!(await lt.default.stat(e)).isDirectory())throw new Error(`The source ${e} does not exist.`);if(e===t.copyTo){I.warn(`sourceDir == destDir (${e}). Are you in the development environment? Skip copying the directory.`);return}if(t.keepOld)try{await lt.default.access(t.copyTo),I.info(`${t.copyTo} already exists. Use it and skip copying.`);return}catch{throw new Error(`${t.copyTo} does not exist even though the \`keepOld\` option is specified`)}I.debug(`Copy ${e} to ${t.copyTo}`),await lt.default.rm(t.copyTo,{recursive:!0,force:!0}),await tl.default.copy(e,t.copyTo,{errorOnExist:!0})}async function rE(t){if(t.requirements.length===0)return[];let e=await(0,Oi.loadPyodide)({packageCacheDir:t.pyodideRuntimeDir});return e._api.setCdnUrl(t.pyodideSource),await ag(e,{requirements:t.requirements}),Object.entries(e.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function rg(t,e){I.debug("Preparing the local wheel: %s",e);let r=await lt.default.readFile(e),i="/tmp/"+ce.default.basename(e);t.FS.writeFile(i,r);let n=`emfs:${i}`;return I.debug("The local wheel %s is prepared as %s",e,n),n}async function ag(t,e){await sg(t,"micropip");let r=t.pyimport("micropip"),i=[...e.requirements],n=ce.default.join(__dirname,eE),s=await rg(t,ce.default.join(n,"stlite_lib-0.1.0-py3-none-any.whl"));i.push(s);let a=await rg(t,ce.default.join(n,"streamlit-1.41.0-cp312-none-any.whl"));i.push(a),I.info("Install the packages: %j",i),await r.install.callKwargs(i,{keep_going:!0})}async function iE(t){I.info("Create the site-packages snapshot file...");let e=await(0,Oi.loadPyodide)({packageCacheDir:t.pyodideRuntimeDir});e._api.setCdnUrl(t.pyodideSource),await sg(e,"micropip");let r=e.pyimport("micropip"),i=new Qn(t.pyodideSource),n=[];if(t.usedPrebuiltPackages.length>0){I.info("Mocking prebuilt packages so that they will not be included in the site-packages snapshot because these will be installed from the vendored wheel files at runtime...");for(let o of t.usedPrebuiltPackages){let l=await i.getPackageInfoByName(o);if(l==null)throw new Error(`Package ${o} is not found in the lock file.`);I.debug(`Mock ${l.name} ${l.version}`),r.add_mock_package(l.name,l.version),n.push(l.name)}}I.info("Install the requirements %j",t.requirements),await ag(e,{requirements:t.requirements}),I.info("Remove the mocked packages: %j",n),n.forEach(o=>r.remove_mock_package(o)),I.info("Archive the site-packages director(y|ies)");let s="/tmp/site-packages-snapshot.tar.gz";await e.runPythonAsync(`
|
|
37
37
|
import os
|
|
38
38
|
import tarfile
|
|
39
39
|
import site
|
|
@@ -46,8 +46,8 @@ globstar while`,e,c,r,f,y),this.matchOne(e.slice(c),r.slice(f),i))return this.de
|
|
|
46
46
|
print("Add site-package:", site_packages)
|
|
47
47
|
print(os.listdir(site_packages))
|
|
48
48
|
gzf.add(site_packages)
|
|
49
|
-
`),I.info("Extract the archive file from EMFS");let a=e.FS.readFile(s);I.info(`Save the archive file (${t.saveTo})`),await
|
|
50
|
-
`);await
|
|
49
|
+
`),I.info("Extract the archive file from EMFS");let a=e.FS.readFile(s);I.info(`Save the archive file (${t.saveTo})`),await lt.default.writeFile(t.saveTo,a)}async function nE(t){I.info("Copy the app directory..."),await Promise.all(t.filePathPatterns.map(async e=>{let r=await _s(e,{cwd:t.cwd,absolute:!1});if(r.length===0){I.warn(`No files match the pattern "${e}" in "${t.cwd}".`);return}await Promise.all(r.map(async i=>{let n=ce.default.resolve(t.cwd,i),s=ce.default.resolve(t.destAppDir,i);I.debug(`Copy ${n} to ${s}`),await tl.default.copy(n,s,{errorOnExist:!0})}))}))}async function sE(t,e){try{await lt.default.access(ce.default.resolve(t,e))}catch{throw new Error(`The entrypoint file "${e}" is not included in the bundled files.`)}}async function aE(t){let e=await lt.default.readFile(t,{encoding:"utf-8"});return(0,Rs.parseRequirementsTxt)(e)}async function oE(t,e){let r=e.join(`
|
|
50
|
+
`);await lt.default.writeFile(t,r,{encoding:"utf-8"})}(0,ig.default)((0,ng.hideBin)(process.argv)).command("* [appHomeDirSource] [packages..]","Put the user code and data and the snapshot of the required packages into the build artifact.",()=>{}).positional("appHomeDirSource",{describe:"[Deprecated] The source directory of the user code and data that will be mounted in the Pyodide file system at app runtime",type:"string",demandOption:!1}).positional("packages",{describe:"[Deprecated] Package names to install.",type:"string",array:!0}).options("project",{describe:"The project directory",type:"string",alias:"p",default:process.cwd()}).options("requirement",{describe:"Install from the given requirements file. This option can be used multiple times.",array:!0,type:"string",alias:"r",default:[],deprecated:!0}).options("keepOldBuild",{type:"boolean",default:!1,alias:"k",describe:"Keep the existing build directory contents except appHomeDir."}).options("pyodideSource",{type:"string",describe:"The base URL or path of the Pyodide files to download or copy, such as the prebuild package wheels and pyodide-lock.json",default:`https://cdn.jsdelivr.net/pyodide/v${Oi.version}/full/`,coerce:t=>(t.endsWith("/")||(t+="/"),t)}).options("logLevel",{type:"string",default:"info",describe:"The log level",choices:["debug","info","warn","error"]}).parseAsync().then(async t=>{I.level=t.logLevel,I.debug("Command line arguments: %j",t);let e=t.project,r=ce.default.resolve(e,"./build"),i=ce.default.resolve(e,"./package.json"),n=require(i),s=await Qd({pathResolutionRoot:e,packageJsonStliteDesktopField:n.stlite?.desktop,fallbacks:{appHomeDirSource:t.appHomeDirSource,packages:t.packages,requirementsTxtFilePaths:t.requirement}});I.info("File/directory patterns to be included: %j",s.files),I.info("Entrypoint: %s",s.entrypoint),I.info("Dependencies: %j",s.dependencies),I.info("`requirements.txt` files: %j",s.requirementsTxtFilePaths);let a=await Promise.all(s.requirementsTxtFilePaths.map(async c=>aE(c))).then(c=>c.flat());I.info("Dependencies from `requirements.txt` files: %j",a);let o=(0,Rs.validateRequirements)([...s.dependencies,...a]);I.info("Validated dependency list: %j",o),await tE({copyTo:r,keepOld:t.keepOldBuild});let l=await rE({pyodideSource:t.pyodideSource,pyodideRuntimeDir:ce.default.resolve(r,"./pyodide"),requirements:o});I.info("The prebuilt packages loaded for the given requirements: %j",l);let u=ce.default.resolve(r,"./app_files");await nE({cwd:e,filePathPatterns:s.files,destAppDir:u}),sE(u,s.entrypoint),await iE({requirements:o,usedPrebuiltPackages:l,pyodideSource:t.pyodideSource,pyodideRuntimeDir:ce.default.resolve(r,"./pyodide"),saveTo:ce.default.resolve(r,"./site-packages-snapshot.tar.gz")}),await oE(ce.default.resolve(r,"./prebuilt-packages.txt"),l),await Jd({packageJsonStliteDesktopField:n.stlite?.desktop,manifestFilePath:ce.default.resolve(r,"./stlite-manifest.json"),fallbacks:{entrypoint:s.entrypoint}})});
|
|
51
51
|
/*! Bundled license information:
|
|
52
52
|
|
|
53
53
|
safe-buffer/index.js:
|