@kuroson/common-utils 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @kuroson/common-utils
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0f4cdd6: Add new exports
8
+ - 87c5564: Minify and reduce bundle size
9
+
10
+ ## 0.2.2
11
+
12
+ ### Patch Changes
13
+
14
+ - b8a3495: Patch dependencies
15
+
3
16
  ## 0.2.1
4
17
 
5
18
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1,61 +1,32 @@
1
- 'use strict';
2
-
3
- // src/index.ts
4
- var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
5
- var InputError = class extends Error {
6
- constructor(message, options) {
7
- super(message, options);
8
- this.name = "InputError";
9
- }
10
- };
11
- var RuntimeError = class extends Error {
12
- constructor(message, options) {
13
- super(message, options);
14
- this.name = "RuntimeError";
15
- }
16
- };
17
- var SettingsError = class extends Error {
18
- constructor(message, options) {
19
- super(message, options);
20
- this.name = "SettingsError";
21
- }
22
- };
23
- var HTTPError = class extends Error {
24
- status;
25
- message;
26
- originalError;
27
- constructor(status, message, originalError = void 0) {
28
- super(message);
29
- this.status = status;
30
- this.message = message;
31
- this.originalError = originalError;
32
- }
33
- getStatusCode() {
34
- return this.status;
35
- }
36
- getMessage() {
37
- return this.message;
38
- }
39
- };
40
- var parseError = (err) => {
41
- if (err instanceof Error) {
42
- return err.message;
43
- }
44
- if (typeof err === "string") {
45
- return err;
46
- }
47
- try {
48
- return JSON.stringify(err);
49
- } catch {
50
- return String(err);
51
- }
52
- };
53
-
54
- exports.HTTPError = HTTPError;
55
- exports.InputError = InputError;
56
- exports.RuntimeError = RuntimeError;
57
- exports.SettingsError = SettingsError;
58
- exports.parseError = parseError;
59
- exports.sleep = sleep;
60
- //# sourceMappingURL=index.cjs.map
1
+ 'use strict';var child_process=require('child_process');var el=Object.create;var Et=Object.defineProperty;var tl=Object.getOwnPropertyDescriptor;var rl=Object.getOwnPropertyNames;var nl=Object.getPrototypeOf,il=Object.prototype.hasOwnProperty;var R=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var sl=(t,e)=>()=>(t&&(e=t(t=0)),e);var c=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ol=(t,e)=>{for(var r in e)Et(t,r,{get:e[r],enumerable:true});},si=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of rl(e))!il.call(t,i)&&i!==r&&Et(t,i,{get:()=>e[i],enumerable:!(n=tl(e,i))||n.enumerable});return t};var al=(t,e,r)=>(r=t!=null?el(nl(t)):{},si(Et(r,"default",{value:t,enumerable:true}),t)),ul=t=>si(Et({},"__esModule",{value:true}),t);var z=c(($g,oi)=>{var Or=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
2
+ Found: ${e.toString().split(`
3
+ `)[0]}
4
+ `),Error.captureStackTrace(this,t);}};oi.exports=t=>{if(t.length>2)throw new Or(t);function e(n={}){this.options=n;}e.prototype.transform=t;function r(n){return new e(n)}return r.Format=e,r};});var fi=c((kg,li)=>{var ui={};li.exports=ui;var ai={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(ai).forEach(function(t){var e=ai[t],r=ui[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m";});});var hi=c((Fg,ci)=>{ci.exports=function(t,e){e=e||process.argv||[];var r=e.indexOf("--"),n=/^-{1,2}/.test(t)?"":"--",i=e.indexOf(n+t);return i!==-1&&(r===-1?true:i<r)};});var pi=c((Bg,di)=>{var ll=R("os"),Z=hi(),W=process.env,Pe=void 0;Z("no-color")||Z("no-colors")||Z("color=false")?Pe=false:(Z("color")||Z("colors")||Z("color=true")||Z("color=always"))&&(Pe=true);"FORCE_COLOR"in W&&(Pe=W.FORCE_COLOR.length===0||parseInt(W.FORCE_COLOR,10)!==0);function fl(t){return t===0?false:{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function cl(t){if(Pe===false)return 0;if(Z("color=16m")||Z("color=full")||Z("color=truecolor"))return 3;if(Z("color=256"))return 2;if(t&&!t.isTTY&&Pe!==true)return 0;var e=Pe?1:0;if(process.platform==="win32"){var r=ll.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 W)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(i){return i in W})||W.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in W)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(W.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in W){var n=parseInt((W.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(W.TERM_PROGRAM){case "iTerm.app":return n>=3?3:2;case "Hyper":return 3;case "Apple_Terminal":return 2}}return /-256(color)?$/i.test(W.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(W.TERM)||"COLORTERM"in W?1:(W.TERM==="dumb",e)}function Rr(t){var e=cl(t);return fl(e)}di.exports={supportsColor:Rr,stdout:Rr(process.stdout),stderr:Rr(process.stderr)};});var mi=c((Hg,gi)=>{gi.exports=function(e,r){var n="";e=e||"Run the trap, drop the bass",e=e.split("");var i={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 o=i[s]||[" "],a=Math.floor(Math.random()*o.length);typeof i[s]<"u"?n+=i[s][a]:n+=s;}),n};});var bi=c((Wg,yi)=>{yi.exports=function(e,r){e=e||" he is here ";var n={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"]},i=[].concat(n.up,n.down,n.mid);function s(u){var f=Math.floor(Math.random()*u);return f}function o(u){var f=false;return i.filter(function(d){f=d===u;}),f}function a(u,f){var d="",p,h;f=f||{},f.up=typeof f.up<"u"?f.up:true,f.mid=typeof f.mid<"u"?f.mid:true,f.down=typeof f.down<"u"?f.down:true,f.size=typeof f.size<"u"?f.size:"maxi",u=u.split("");for(h in u)if(!o(h)){switch(d=d+u[h],p={up:0,down:0,mid:0},f.size){case "mini":p.up=s(8),p.mid=s(2),p.down=s(8);break;case "maxi":p.up=s(16)+3,p.mid=s(4)+1,p.down=s(64)+3;break;default:p.up=s(8)+1,p.mid=s(6)/2,p.down=s(8)+1;break}var y=["up","mid","down"];for(var l in y)for(var m=y[l],b=0;b<=p[m];b++)f[m]&&(d=d+n[m][s(n[m].length)]);}return d}return a(e,r)};});var vi=c((Ug,_i)=>{_i.exports=function(t){return function(e,r,n){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 Ei=c((zg,wi)=>{wi.exports=function(t){return function(e,r,n){return r%2===0?e:t.inverse(e)}};});var xi=c((Gg,Si)=>{Si.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,n,i){return r===" "?r:t[e[n++%e.length]](r)}};});var Oi=c((Yg,Mi)=>{Mi.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,n,i){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}};});var ji=c((Kg,Li)=>{var S={};Li.exports=S;S.themes={};var hl=R("util"),Ee=S.styles=fi(),qi=Object.defineProperties,dl=new RegExp(/[\r\n]+/g);S.supportsColor=pi().supportsColor;typeof S.enabled>"u"&&(S.enabled=S.supportsColor()!==false);S.enable=function(){S.enabled=true;};S.disable=function(){S.enabled=false;};S.stripColors=S.strip=function(t){return (""+t).replace(/\x1B\[\d+m/g,"")};S.stylize=function(e,r){if(!S.enabled)return e+"";var n=Ee[r];return !n&&r in S?S[r](e):n.open+e+n.close};var pl=/[|\\{}()[\]^$+*?.]/g,gl=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(pl,"\\$&")};function Ti(t){var e=function r(){return yl.apply(r,arguments)};return e._styles=t,e.__proto__=ml,e}var Ai=(function(){var t={};return Ee.grey=Ee.gray,Object.keys(Ee).forEach(function(e){Ee[e].closeRe=new RegExp(gl(Ee[e].close),"g"),t[e]={get:function(){return Ti(this._styles.concat(e))}};}),t})(),ml=qi(function(){},Ai);function yl(){var t=Array.prototype.slice.call(arguments),e=t.map(function(o){return o!=null&&o.constructor===String?o:hl.inspect(o)}).join(" ");if(!S.enabled||!e)return e;for(var r=e.indexOf(`
5
+ `)!=-1,n=this._styles,i=n.length;i--;){var s=Ee[n[i]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(dl,function(o){return s.close+o+s.open}));}return e}S.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){S[r]=function(n){if(typeof t[r]=="object"){var i=n;for(var s in t[r])i=S[t[r][s]](i);return i}return S[t[r]](n)};})(e);};function bl(){var t={};return Object.keys(Ai).forEach(function(e){t[e]={get:function(){return Ti([e])}};}),t}var _l=function(e,r){var n=r.split("");return n=n.map(e),n.join("")};S.trap=mi();S.zalgo=bi();S.maps={};S.maps.america=vi()(S);S.maps.zebra=Ei()(S);S.maps.rainbow=xi()(S);S.maps.random=Oi()(S);for(Ri in S.maps)(function(t){S[t]=function(e){return _l(S.maps[t],e)};})(Ri);var Ri;qi(S,bl());});var qr=c((Jg,Ni)=>{var vl=ji();Ni.exports=vl;});var Pi=c(Tr=>{Tr.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};Tr.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"};});var Di=c(Ar=>{Ar.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};Ar.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"};});var Ci=c(Lr=>{Lr.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};Lr.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"};});var Ii=c(St=>{Object.defineProperty(St,"cli",{value:Pi()});Object.defineProperty(St,"npm",{value:Di()});Object.defineProperty(St,"syslog",{value:Ci()});});var D=c(Ke=>{Object.defineProperty(Ke,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Ke,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Ke,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Ke,"configs",{value:Ii()});});var Ot=c((r0,Mt)=>{var Pr=qr(),{LEVEL:jr,MESSAGE:Nr}=D();Pr.enabled=true;var $i=/\s+/,xt=class t{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e;}static addColors(e){let r=Object.keys(e).reduce((n,i)=>(n[i]=$i.test(e[i])?e[i].split($i):e[i],n),{});return t.allColors=Object.assign({},t.allColors||{},r),t.allColors}addColors(e){return t.addColors(e)}colorize(e,r,n){if(typeof n>"u"&&(n=r),!Array.isArray(t.allColors[e]))return Pr[t.allColors[e]](n);for(let i=0,s=t.allColors[e].length;i<s;i++)n=Pr[t.allColors[e][i]](n);return n}transform(e,r){return r.all&&typeof e[Nr]=="string"&&(e[Nr]=this.colorize(e[jr],e.level,e[Nr])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[jr],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[jr],e.level,e.message)),e}};Mt.exports=t=>new xt(t);Mt.exports.Colorizer=Mt.exports.Format=xt;});var Fi=c((n0,ki)=>{var{Colorizer:wl}=Ot();ki.exports=t=>(wl.addColors(t.colors||t),t);});var Hi=c((i0,Bi)=>{var El=z();Bi.exports=El(t=>(t.message=` ${t.message}`,t));});var zi=c((s0,Ui)=>{var Sl=z(),{LEVEL:Wi,MESSAGE:Dr}=D();Ui.exports=Sl((t,{stack:e,cause:r})=>{if(t instanceof Error){let i=Object.assign({},t,{level:t.level,[Wi]:t[Wi]||t.level,message:t.message,[Dr]:t[Dr]||t.message});return e&&(i.stack=t.stack),r&&(i.cause=t.cause),i}if(!(t.message instanceof Error))return t;let n=t.message;return Object.assign(t,n),t.message=n.message,t[Dr]=n.message,e&&(t.stack=n.stack),r&&(t.cause=n.cause),t});});var Ir=c((o0,qt)=>{var{configs:xl,LEVEL:Gi,MESSAGE:Cr}=D(),Rt=class t{constructor(e={levels:xl.npm.levels}){this.paddings=t.paddingForLevels(e.levels,e.filler),this.options=e;}static getLongestLevel(e){let r=Object.keys(e).map(n=>n.length);return Math.max(...r)}static paddingForLevel(e,r,n){let i=n+1-e.length,s=Math.floor(i/r.length);return `${r}${r.repeat(s)}`.slice(0,i)}static paddingForLevels(e,r=" "){let n=t.getLongestLevel(e);return Object.keys(e).reduce((i,s)=>(i[s]=t.paddingForLevel(s,r,n),i),{})}transform(e,r){return e.message=`${this.paddings[e[Gi]]}${e.message}`,e[Cr]&&(e[Cr]=`${this.paddings[e[Gi]]}${e[Cr]}`),e}};qt.exports=t=>new Rt(t);qt.exports.Padder=qt.exports.Format=Rt;});var Yi=c((a0,$r)=>{var{Colorizer:Ml}=Ot(),{Padder:Ol}=Ir(),{configs:Rl,MESSAGE:ql}=D(),Tt=class{constructor(e={}){e.levels||(e.levels=Rl.cli.levels),this.colorizer=new Ml(e),this.padder=new Ol(e),this.options=e;}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[ql]=`${e.level}:${e.message}`,e}};$r.exports=t=>new Tt(t);$r.exports.Format=Tt;});var Ki=c((u0,kr)=>{var Tl=z();function Vi(t){if(t.every(Al))return e=>{let r=e;for(let n=0;n<t.length;n++)if(r=t[n].transform(r,t[n].options),!r)return false;return r}}function Al(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(`
6
+ `));return true}kr.exports=(...t)=>{let e=Tl(Vi(t)),r=e();return r.Format=e.Format,r};kr.exports.cascade=Vi;});var Ze=c((Wr,Qi)=>{var{hasOwnProperty:Je}=Object.prototype,xe=Hr();xe.configure=Hr;xe.stringify=xe;xe.default=xe;Wr.stringify=xe;Wr.configure=Hr;Qi.exports=xe;var Ll=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function ce(t){return t.length<5e3&&!Ll.test(t)?`"${t}"`:JSON.stringify(t)}function Fr(t,e){if(t.length>200||e)return t.sort(e);for(let r=1;r<t.length;r++){let n=t[r],i=r;for(;i!==0&&t[i-1]>n;)t[i]=t[i-1],i--;t[i]=n;}return t}var jl=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Br(t){return jl.call(t)!==void 0&&t.length!==0}function Ji(t,e,r){t.length<r&&(r=t.length);let n=e===","?"":" ",i=`"0":${n}${t[0]}`;for(let s=1;s<r;s++)i+=`${e}"${s}":${n}${t[s]}`;return i}function Nl(t){if(Je.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 Pl(t){let e;if(Je.call(t,"deterministic")&&(e=t.deterministic,typeof e!="boolean"&&typeof e!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return e===void 0?true:e}function Dl(t,e){let r;if(Je.call(t,e)&&(r=t[e],typeof r!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return r===void 0?true:r}function Zi(t,e){let r;if(Je.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 Se(t){return t===1?"1 item":`${t} items`}function Cl(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function Il(t){if(Je.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 n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Hr(t){t={...t};let e=Il(t);e&&(t.bigint===void 0&&(t.bigint=false),"circularValue"in t||(t.circularValue=Error));let r=Nl(t),n=Dl(t,"bigint"),i=Pl(t),s=typeof i=="function"?i:void 0,o=Zi(t,"maximumDepth"),a=Zi(t,"maximumBreadth");function u(y,l,m,b,_,x){let v=l[y];switch(typeof v=="object"&&v!==null&&typeof v.toJSON=="function"&&(v=v.toJSON(y)),v=b.call(l,y,v),typeof v){case "string":return ce(v);case "object":{if(v===null)return "null";if(m.indexOf(v)!==-1)return r;let w="",T=",",L=x;if(Array.isArray(v)){if(v.length===0)return "[]";if(o<m.length+1)return '"[Array]"';m.push(v),_!==""&&(x+=_,w+=`
7
+ ${x}`,T=`,
8
+ ${x}`);let U=Math.min(v.length,a),ee=0;for(;ee<U-1;ee++){let wt=u(String(ee),v,m,b,_,x);w+=wt!==void 0?wt:"null",w+=T;}let te=u(String(ee),v,m,b,_,x);if(w+=te!==void 0?te:"null",v.length-1>a){let wt=v.length-a-1;w+=`${T}"... ${Se(wt)} not stringified"`;}return _!==""&&(w+=`
9
+ ${L}`),m.pop(),`[${w}]`}let q=Object.keys(v),j=q.length;if(j===0)return "{}";if(o<m.length+1)return '"[Object]"';let O="",H="";_!==""&&(x+=_,T=`,
10
+ ${x}`,O=" ");let J=Math.min(j,a);i&&!Br(v)&&(q=Fr(q,s)),m.push(v);for(let U=0;U<J;U++){let ee=q[U],te=u(ee,v,m,b,_,x);te!==void 0&&(w+=`${H}${ce(ee)}:${O}${te}`,H=T);}if(j>a){let U=j-a;w+=`${H}"...":${O}"${Se(U)} not stringified"`,H=T;}return _!==""&&H.length>1&&(w=`
11
+ ${x}${w}
12
+ ${L}`),m.pop(),`{${w}}`}case "number":return isFinite(v)?String(v):e?e(v):"null";case "boolean":return v===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(v);default:return e?e(v):void 0}}function f(y,l,m,b,_,x){switch(typeof l=="object"&&l!==null&&typeof l.toJSON=="function"&&(l=l.toJSON(y)),typeof l){case "string":return ce(l);case "object":{if(l===null)return "null";if(m.indexOf(l)!==-1)return r;let v=x,w="",T=",";if(Array.isArray(l)){if(l.length===0)return "[]";if(o<m.length+1)return '"[Array]"';m.push(l),_!==""&&(x+=_,w+=`
13
+ ${x}`,T=`,
14
+ ${x}`);let j=Math.min(l.length,a),O=0;for(;O<j-1;O++){let J=f(String(O),l[O],m,b,_,x);w+=J!==void 0?J:"null",w+=T;}let H=f(String(O),l[O],m,b,_,x);if(w+=H!==void 0?H:"null",l.length-1>a){let J=l.length-a-1;w+=`${T}"... ${Se(J)} not stringified"`;}return _!==""&&(w+=`
15
+ ${v}`),m.pop(),`[${w}]`}m.push(l);let L="";_!==""&&(x+=_,T=`,
16
+ ${x}`,L=" ");let q="";for(let j of b){let O=f(j,l[j],m,b,_,x);O!==void 0&&(w+=`${q}${ce(j)}:${L}${O}`,q=T);}return _!==""&&q.length>1&&(w=`
17
+ ${x}${w}
18
+ ${v}`),m.pop(),`{${w}}`}case "number":return isFinite(l)?String(l):e?e(l):"null";case "boolean":return l===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(l);default:return e?e(l):void 0}}function d(y,l,m,b,_){switch(typeof l){case "string":return ce(l);case "object":{if(l===null)return "null";if(typeof l.toJSON=="function"){if(l=l.toJSON(y),typeof l!="object")return d(y,l,m,b,_);if(l===null)return "null"}if(m.indexOf(l)!==-1)return r;let x=_;if(Array.isArray(l)){if(l.length===0)return "[]";if(o<m.length+1)return '"[Array]"';m.push(l),_+=b;let O=`
19
+ ${_}`,H=`,
20
+ ${_}`,J=Math.min(l.length,a),U=0;for(;U<J-1;U++){let te=d(String(U),l[U],m,b,_);O+=te!==void 0?te:"null",O+=H;}let ee=d(String(U),l[U],m,b,_);if(O+=ee!==void 0?ee:"null",l.length-1>a){let te=l.length-a-1;O+=`${H}"... ${Se(te)} not stringified"`;}return O+=`
21
+ ${x}`,m.pop(),`[${O}]`}let v=Object.keys(l),w=v.length;if(w===0)return "{}";if(o<m.length+1)return '"[Object]"';_+=b;let T=`,
22
+ ${_}`,L="",q="",j=Math.min(w,a);Br(l)&&(L+=Ji(l,T,a),v=v.slice(l.length),j-=l.length,q=T),i&&(v=Fr(v,s)),m.push(l);for(let O=0;O<j;O++){let H=v[O],J=d(H,l[H],m,b,_);J!==void 0&&(L+=`${q}${ce(H)}: ${J}`,q=T);}if(w>a){let O=w-a;L+=`${q}"...": "${Se(O)} not stringified"`,q=T;}return q!==""&&(L=`
23
+ ${_}${L}
24
+ ${x}`),m.pop(),`{${L}}`}case "number":return isFinite(l)?String(l):e?e(l):"null";case "boolean":return l===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(l);default:return e?e(l):void 0}}function p(y,l,m){switch(typeof l){case "string":return ce(l);case "object":{if(l===null)return "null";if(typeof l.toJSON=="function"){if(l=l.toJSON(y),typeof l!="object")return p(y,l,m);if(l===null)return "null"}if(m.indexOf(l)!==-1)return r;let b="",_=l.length!==void 0;if(_&&Array.isArray(l)){if(l.length===0)return "[]";if(o<m.length+1)return '"[Array]"';m.push(l);let L=Math.min(l.length,a),q=0;for(;q<L-1;q++){let O=p(String(q),l[q],m);b+=O!==void 0?O:"null",b+=",";}let j=p(String(q),l[q],m);if(b+=j!==void 0?j:"null",l.length-1>a){let O=l.length-a-1;b+=`,"... ${Se(O)} not stringified"`;}return m.pop(),`[${b}]`}let x=Object.keys(l),v=x.length;if(v===0)return "{}";if(o<m.length+1)return '"[Object]"';let w="",T=Math.min(v,a);_&&Br(l)&&(b+=Ji(l,",",a),x=x.slice(l.length),T-=l.length,w=","),i&&(x=Fr(x,s)),m.push(l);for(let L=0;L<T;L++){let q=x[L],j=p(q,l[q],m);j!==void 0&&(b+=`${w}${ce(q)}:${j}`,w=",");}if(v>a){let L=v-a;b+=`${w}"...":"${Se(L)} not stringified"`;}return m.pop(),`{${b}}`}case "number":return isFinite(l)?String(l):e?e(l):"null";case "boolean":return l===true?"true":"false";case "undefined":return;case "bigint":if(n)return String(l);default:return e?e(l):void 0}}function h(y,l,m){if(arguments.length>1){let b="";if(typeof m=="number"?b=" ".repeat(Math.min(m,10)):typeof m=="string"&&(b=m.slice(0,10)),l!=null){if(typeof l=="function")return u("",{"":y},[],l,b,"");if(Array.isArray(l))return f("",y,[],Cl(l),b,"")}if(b.length!==0)return d("",y,[],b,"")}return p("",y,[])}return h}});var Ur=c((l0,Xi)=>{var $l=z(),{MESSAGE:kl}=D(),Fl=Ze();function Bl(t,e){return typeof e=="bigint"?e.toString():e}Xi.exports=$l((t,e)=>{let r=Fl.configure(e);return t[kl]=r(t,e.replacer||Bl,e.space),t});});var ts=c((f0,es)=>{var Hl=z();es.exports=Hl((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t));});var ns=c((c0,rs)=>{var Wl=z(),{MESSAGE:Ul}=D(),zl=Ze();rs.exports=Wl(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[Ul]=zl(e),t});});var ss=c((h0,is)=>{var Gl=z();function Yl(t,e,r){let n=e.reduce((s,o)=>(s[o]=t[o],delete t[o],s),{}),i=Object.keys(t).reduce((s,o)=>(s[o]=t[o],delete t[o],s),{});return Object.assign(t,n,{[r]:i}),t}function Vl(t,e,r){return t[r]=e.reduce((n,i)=>(n[i]=t[i],delete t[i],n),{}),t}is.exports=Gl((t,e={})=>{let r="metadata";e.key&&(r=e.key);let n=[];return !e.fillExcept&&!e.fillWith&&(n.push("level"),n.push("message")),e.fillExcept&&(n=e.fillExcept),n.length>0?Yl(t,n,r):e.fillWith?Vl(t,e.fillWith,r):t});});var as=c((d0,os)=>{var De=1e3,Ce=De*60,Ie=Ce*60,Me=Ie*24,Kl=Me*7,Jl=Me*365.25;os.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Zl(t);if(r==="number"&&isFinite(t))return e.long?Xl(t):Ql(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Zl(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]),n=(e[2]||"ms").toLowerCase();switch(n){case "years":case "year":case "yrs":case "yr":case "y":return r*Jl;case "weeks":case "week":case "w":return r*Kl;case "days":case "day":case "d":return r*Me;case "hours":case "hour":case "hrs":case "hr":case "h":return r*Ie;case "minutes":case "minute":case "mins":case "min":case "m":return r*Ce;case "seconds":case "second":case "secs":case "sec":case "s":return r*De;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return r;default:return}}}}function Ql(t){var e=Math.abs(t);return e>=Me?Math.round(t/Me)+"d":e>=Ie?Math.round(t/Ie)+"h":e>=Ce?Math.round(t/Ce)+"m":e>=De?Math.round(t/De)+"s":t+"ms"}function Xl(t){var e=Math.abs(t);return e>=Me?At(t,e,Me,"day"):e>=Ie?At(t,e,Ie,"hour"):e>=Ce?At(t,e,Ce,"minute"):e>=De?At(t,e,De,"second"):t+" ms"}function At(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var ls=c((Qe,us)=>{var ef=z(),tf=as();us.exports=ef(t=>{let e=+new Date;return Qe.diff=e-(Qe.prevTime||e),Qe.prevTime=e,t.ms=`+${tf(Qe.diff)}`,t});});var hs=c((p0,cs)=>{var rf=R("util").inspect,nf=z(),{LEVEL:sf,MESSAGE:fs,SPLAT:of}=D();cs.exports=nf((t,e={})=>{let r=Object.assign({},t);return delete r[sf],delete r[fs],delete r[of],t[fs]=rf(r,false,e.depth||null,e.colorize),t});});var ds=c((g0,jt)=>{var{MESSAGE:af}=D(),Lt=class{constructor(e){this.template=e;}transform(e){return e[af]=this.template(e),e}};jt.exports=t=>new Lt(t);jt.exports.Printf=jt.exports.Format=Lt;});var ms=c((m0,gs)=>{var uf=z(),{MESSAGE:ps}=D(),lf=Ze();gs.exports=uf(t=>{let e=lf(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[ps]=`${t.level}:${r} ${t.message} ${e}`:t[ps]=`${t.level}:${r} ${t.message}`,t});});var _s=c((y0,bs)=>{var ff=R("util"),{SPLAT:ys}=D(),cf=/%[scdjifoO%]/g,hf=/%%/g,zr=class{constructor(e){this.options=e;}_splat(e,r){let n=e.message,i=e[ys]||e.splat||[],s=n.match(hf),o=s&&s.length||0,u=r.length-o-i.length,f=u<0?i.splice(u,-1*u):[],d=f.length;if(d)for(let p=0;p<d;p++)Object.assign(e,f[p]);return e.message=ff.format(n,...i),e}transform(e){let r=e.message,n=e[ys]||e.splat;if(!n||!n.length)return e;let i=r&&r.match&&r.match(cf);if(!i&&(n||n.length)){let s=n.length>1?n.splice(0):n,o=s.length;if(o)for(let a=0;a<o;a++)Object.assign(e,s[a]);return e}return i?this._splat(e,i):e}};bs.exports=t=>new zr(t);});var Cs={};ol(Cs,{assign:()=>pe,default:()=>vf,defaultI18n:()=>Gr,format:()=>Ps,parse:()=>Ds,setGlobalDateI18n:()=>js,setGlobalDateMasks:()=>Ns});function Ts(t,e){for(var r=[],n=0,i=t.length;n<i;n++)r.push(t[n].substr(0,e));return r}function pe(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var n=0,i=e;n<i.length;n++){var s=i[n];for(var o in s)t[o]=s[o];}return t}function Ds(t,e,r){if(r===void 0&&(r={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=Pt[e]||e,t.length>1e3)return null;var n=new Date,i={year:n.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},s=[],o=[],a=e.replace(qs,function(w,T){return o.push(ws(T)),"@@@"}),u={},f={};a=ws(a).replace(Rs,function(w){var T=bf[w],L=T[0],q=T[1],j=T[3];if(u[L])throw new Error("Invalid format. "+L+" specified twice in format");return u[L]=true,j&&(f[j]=true),s.push(T),"("+q+")"}),Object.keys(f).forEach(function(w){if(!u[w])throw new Error("Invalid format. "+w+" is required in specified format")}),a=a.replace(/@@@/g,function(){return o.shift()});var d=t.match(new RegExp(a,"i"));if(!d)return null;for(var p=pe(pe({},Nt),r),h=1;h<d.length;h++){var y=s[h-1],l=y[0],m=y[2],b=m?m(d[h],p):+d[h];if(b==null)return null;i[l]=b;}i.isPm===1&&i.hour!=null&&+i.hour!=12?i.hour=+i.hour+12:i.isPm===0&&+i.hour==12&&(i.hour=0);var _;if(i.timezoneOffset==null){_=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var x=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],h=0,v=x.length;h<v;h++)if(u[x[h][0]]&&i[x[h][0]]!==_[x[h][1]]())return null}else if(_=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return _}var Rs,de,he,df,pf,Xe,qs,vs,As,Ls,gf,mf,Gr,Nt,js,ws,G,yf,Es,Ss,xs,Ms,Os,bf,Pt,Ns,Ps,_f,vf,Is=sl(()=>{Rs=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,de="\\d\\d?",he="\\d\\d",df="\\d{3}",pf="\\d{4}",Xe="[^\\s]+",qs=/\[([^]*?)\]/gm;vs=function(t){return function(e,r){var n=r[t].map(function(s){return s.toLowerCase()}),i=n.indexOf(e.toLowerCase());return i>-1?i:null}};As=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ls=["January","February","March","April","May","June","July","August","September","October","November","December"],gf=Ts(Ls,3),mf=Ts(As,3),Gr={dayNamesShort:mf,dayNames:As,monthNamesShort:gf,monthNames:Ls,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},Nt=pe({},Gr),js=function(t){return Nt=pe(Nt,t)},ws=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},G=function(t,e){for(e===void 0&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},yf={D:function(t){return String(t.getDate())},DD:function(t){return G(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return G(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return G(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return G(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return G(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return G(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return G(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return G(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return G(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return G(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return G(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return (e>0?"-":"+")+G(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return (e>0?"-":"+")+G(Math.floor(Math.abs(e)/60),2)+":"+G(Math.abs(e)%60,2)}},Es=function(t){return +t-1},Ss=[null,de],xs=[null,Xe],Ms=["isPm",Xe,function(t,e){var r=t.toLowerCase();return r===e.amPm[0]?0:r===e.amPm[1]?1:null}],Os=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var r=+e[1]*60+parseInt(e[2],10);return e[0]==="+"?r:-r}return 0}],bf={D:["day",de],DD:["day",he],Do:["day",de+Xe,function(t){return parseInt(t,10)}],M:["month",de,Es],MM:["month",he,Es],YY:["year",he,function(t){var e=new Date,r=+(""+e.getFullYear()).substr(0,2);return +(""+(+t>68?r-1:r)+t)}],h:["hour",de,void 0,"isPm"],hh:["hour",he,void 0,"isPm"],H:["hour",de],HH:["hour",he],m:["minute",de],mm:["minute",he],s:["second",de],ss:["second",he],YYYY:["year",pf],S:["millisecond","\\d",function(t){return +t*100}],SS:["millisecond",he,function(t){return +t*10}],SSS:["millisecond",df],d:Ss,dd:Ss,ddd:xs,dddd:xs,MMM:["month",Xe,vs("monthNamesShort")],MMMM:["month",Xe,vs("monthNames")],a:Ms,A:Ms,ZZ:Os,Z:Os},Pt={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"},Ns=function(t){return pe(Pt,t)},Ps=function(t,e,r){if(e===void 0&&(e=Pt.default),r===void 0&&(r={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");e=Pt[e]||e;var n=[];e=e.replace(qs,function(s,o){return n.push(o),"@@@"});var i=pe(pe({},Nt),r);return e=e.replace(Rs,function(s){return yf[s](t,i)}),e.replace(/@@@/g,function(){return n.shift()})};_f={format:Ps,parse:Ds,defaultI18n:Gr,setGlobalDateI18n:js,setGlobalDateMasks:Ns},vf=_f;});var ks=c((b0,$s)=>{var wf=(Is(),ul(Cs)),Ef=z();$s.exports=Ef((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():wf.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t));});var Bs=c((_0,Fs)=>{var Yr=qr(),Sf=z(),{MESSAGE:Vr}=D();Fs.exports=Sf((t,e)=>(e.level!==false&&(t.level=Yr.strip(t.level)),e.message!==false&&(t.message=Yr.strip(String(t.message))),e.raw!==false&&t[Vr]&&(t[Vr]=Yr.strip(String(t[Vr]))),t));});var Jr=c(Kr=>{var xf=Kr.format=z();Kr.levels=Fi();function B(t,e){Object.defineProperty(xf,t,{get(){return e()},configurable:true});}B("align",function(){return Hi()});B("errors",function(){return zi()});B("cli",function(){return Yi()});B("combine",function(){return Ki()});B("colorize",function(){return Ot()});B("json",function(){return Ur()});B("label",function(){return ts()});B("logstash",function(){return ns()});B("metadata",function(){return ss()});B("ms",function(){return ls()});B("padLevels",function(){return Ir()});B("prettyPrint",function(){return hs()});B("printf",function(){return ds()});B("simple",function(){return ms()});B("splat",function(){return _s()});B("timestamp",function(){return ks()});B("uncolorize",function(){return Bs()});});var Zr=c(Dt=>{var{format:Hs}=R("util");Dt.warn={deprecated(t){return ()=>{throw new Error(Hs("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return ()=>{throw new Error([Hs("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
25
+ `))}},forFunctions(t,e,r){r.forEach(n=>{t[n]=Dt.warn[e](n);});},forProperties(t,e,r){r.forEach(n=>{let i=Dt.warn[e](n);Object.defineProperty(t,n,{get:i,set:i});});}};});var Ws=c((E0,Mf)=>{Mf.exports={name:"winston",description:"A logger for just about everything.",version:"3.19.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.8","@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",jest:"^29.7.0",rimraf:"5.0.10",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:"jest","test:unit":"jest -c test/jest.config.unit.js","test:integration":"jest -c test/jest.config.integration.js","test:typescript":"npx --package typescript tsc --project test",build:"babel lib -d dist",prebuild:"rimraf dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"};});var zs=c((S0,Us)=>{Us.exports=R("util").deprecate;});var Qr=c((x0,Gs)=>{Gs.exports=R("stream");});var en=c((M0,Vs)=>{function Of(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=true,process.nextTick(Xr,this,t)):process.nextTick(Xr,this,t)),this):(this._readableState&&(this._readableState.destroyed=true),this._writableState&&(this._writableState.destroyed=true),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Ct,r):(r._writableState.errorEmitted=true,process.nextTick(Ys,r,s)):process.nextTick(Ys,r,s):e?(process.nextTick(Ct,r),e(s)):process.nextTick(Ct,r);}),this)}function Ys(t,e){Xr(t,e),Ct(t);}function Ct(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close");}function Rf(){this._readableState&&(this._readableState.destroyed=false,this._readableState.reading=false,this._readableState.ended=false,this._readableState.endEmitted=false),this._writableState&&(this._writableState.destroyed=false,this._writableState.ended=false,this._writableState.ending=false,this._writableState.finalCalled=false,this._writableState.prefinished=false,this._writableState.finished=false,this._writableState.errorEmitted=false);}function Xr(t,e){t.emit("error",e);}function qf(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e);}Vs.exports={destroy:Of,undestroy:Rf,errorOrDestroy:qf};});var ge=c((O0,Zs)=>{var Js={};function V(t,e,r){r||(r=Error);function n(s,o,a){return typeof e=="string"?e:e(s,o,a)}class i extends r{constructor(o,a,u){super(n(o,a,u));}}i.prototype.name=r.name,i.prototype.code=t,Js[t]=i;}function Ks(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),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 Tf(t,e,r){return t.substr(0,e.length)===e}function Af(t,e,r){return (r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Lf(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?false:t.indexOf(e,r)!==-1}V("ERR_INVALID_OPT_VALUE",function(t,e){return 'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);V("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&Tf(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(Af(t," argument"))i=`The ${t} ${n} ${Ks(e,"type")}`;else {let s=Lf(t,".")?"property":"argument";i=`The "${t}" ${s} ${n} ${Ks(e,"type")}`;}return i+=`. Received type ${typeof r}`,i},TypeError);V("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");V("ERR_METHOD_NOT_IMPLEMENTED",function(t){return "The "+t+" method is not implemented"});V("ERR_STREAM_PREMATURE_CLOSE","Premature close");V("ERR_STREAM_DESTROYED",function(t){return "Cannot call "+t+" after a stream was destroyed"});V("ERR_MULTIPLE_CALLBACK","Callback called multiple times");V("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");V("ERR_STREAM_WRITE_AFTER_END","write after end");V("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);V("ERR_UNKNOWN_ENCODING",function(t){return "Unknown encoding: "+t},TypeError);V("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Zs.exports.codes=Js;});var tn=c((R0,Qs)=>{var jf=ge().codes.ERR_INVALID_OPT_VALUE;function Nf(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Pf(t,e,r,n){var i=Nf(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new jf(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}Qs.exports={getHighWaterMark:Pf};});var Xs=c((q0,rn)=>{typeof Object.create=="function"?rn.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}}));}:rn.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e;}};});var $e=c((T0,sn)=>{try{if(nn=R("util"),typeof nn.inherits!="function")throw "";sn.exports=nn.inherits;}catch{sn.exports=Xs();}var nn;});var so=c((A0,io)=>{function eo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n);}return r}function to(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eo(Object(r),true).forEach(function(n){Df(t,n,r[n]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n));});}return t}function Df(t,e,r){return e=no(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function Cf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ro(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||false,n.configurable=true,"value"in n&&(n.writable=true),Object.defineProperty(t,no(n.key),n);}}function If(t,e,r){return e&&ro(t.prototype,e),Object.defineProperty(t,"prototype",{writable:false}),t}function no(t){var e=$f(t,"string");return typeof e=="symbol"?e:String(e)}function $f(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return (String)(t)}var kf=R("buffer"),It=kf.Buffer,Ff=R("util"),on=Ff.inspect,Bf=on&&on.custom||"inspect";function Hf(t,e,r){It.prototype.copy.call(t,e,r);}io.exports=(function(){function t(){Cf(this,t),this.head=null,this.tail=null,this.length=0;}return If(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length;}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++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 n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return It.alloc(0);for(var n=It.allocUnsafe(r>>>0),i=this.head,s=0;i;)Hf(i.data,n,s),s+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,s=n.data;for(r-=s.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++i;}return this.length-=i,s}},{key:"_getBuffer",value:function(r){var n=It.allocUnsafe(r),i=this.head,s=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,a),r-=a,r===0){a===o.length?(++s,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++s;}return this.length-=s,n}},{key:Bf,value:function(r,n){return on(this,to(to({},n),{},{depth:0,customInspect:false}))}}]),t})();});var uo=c((an,ao)=>{var $t=R("buffer"),re=$t.Buffer;function oo(t,e){for(var r in t)e[r]=t[r];}re.from&&re.alloc&&re.allocUnsafe&&re.allocUnsafeSlow?ao.exports=$t:(oo($t,an),an.Buffer=Oe);function Oe(t,e,r){return re(t,e,r)}Oe.prototype=Object.create(re.prototype);oo(re,Oe);Oe.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return re(t,e,r)};Oe.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=re(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Oe.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return re(t)};Oe.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return $t.SlowBuffer(t)};});var fn=c(fo=>{var ln=uo().Buffer,lo=ln.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 true;default:return false}};function Wf(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=true;}}function Uf(t){var e=Wf(t);if(typeof e!="string"&&(ln.isEncoding===lo||!lo(t)))throw new Error("Unknown encoding: "+t);return e||t}fo.StringDecoder=et;function et(t){this.encoding=Uf(t);var e;switch(this.encoding){case "utf16le":this.text=Jf,this.end=Zf,e=4;break;case "utf8":this.fillLast=Yf,e=4;break;case "base64":this.text=Qf,this.end=Xf,e=3;break;default:this.write=ec,this.end=tc;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ln.allocUnsafe(e);}et.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||""};et.prototype.end=Kf;et.prototype.text=Vf;et.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 un(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function zf(t,e,r){var n=e.length-1;if(n<r)return 0;var i=un(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=un(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=un(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function Gf(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 Yf(t){var e=this.lastTotal-this.lastNeed,r=Gf(this,t);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 Vf(t,e){var r=zf(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function Kf(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Jf(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=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 Zf(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 Qf(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 Xf(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function ec(t){return t.toString(this.encoding)}function tc(t){return t&&t.length?this.write(t):""}});var kt=c((j0,po)=>{var co=ge().codes.ERR_STREAM_PREMATURE_CLOSE;function rc(t){var e=false;return function(){if(!e){e=true;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n);}}}function nc(){}function ic(t){return t.setHeader&&typeof t.abort=="function"}function ho(t,e,r){if(typeof e=="function")return ho(t,null,e);e||(e={}),r=rc(r||nc);var n=e.readable||e.readable!==false&&t.readable,i=e.writable||e.writable!==false&&t.writable,s=function(){t.writable||a();},o=t._writableState&&t._writableState.finished,a=function(){i=false,o=true,n||r.call(t);},u=t._readableState&&t._readableState.endEmitted,f=function(){n=false,u=true,i||r.call(t);},d=function(l){r.call(t,l);},p=function(){var l;if(n&&!u)return (!t._readableState||!t._readableState.ended)&&(l=new co),r.call(t,l);if(i&&!o)return (!t._writableState||!t._writableState.ended)&&(l=new co),r.call(t,l)},h=function(){t.req.on("finish",a);};return ic(t)?(t.on("complete",a),t.on("abort",p),t.req?h():t.on("request",h)):i&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",f),t.on("finish",a),e.error!==false&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",a),t.removeListener("abort",p),t.removeListener("request",h),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",f),t.removeListener("error",d),t.removeListener("close",p);}}po.exports=ho;});var mo=c((N0,go)=>{var Ft;function me(t,e,r){return e=sc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function sc(t){var e=oc(t,"string");return typeof e=="symbol"?e:String(e)}function oc(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(t)}var ac=kt(),ye=Symbol("lastResolve"),Re=Symbol("lastReject"),tt=Symbol("error"),Bt=Symbol("ended"),qe=Symbol("lastPromise"),cn=Symbol("handlePromise"),Te=Symbol("stream");function be(t,e){return {value:t,done:e}}function uc(t){var e=t[ye];if(e!==null){var r=t[Te].read();r!==null&&(t[qe]=null,t[ye]=null,t[Re]=null,e(be(r,false)));}}function lc(t){process.nextTick(uc,t);}function fc(t,e){return function(r,n){t.then(function(){if(e[Bt]){r(be(void 0,true));return}e[cn](r,n);},n);}}var cc=Object.getPrototypeOf(function(){}),hc=Object.setPrototypeOf((Ft={get stream(){return this[Te]},next:function(){var e=this,r=this[tt];if(r!==null)return Promise.reject(r);if(this[Bt])return Promise.resolve(be(void 0,true));if(this[Te].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[tt]?a(e[tt]):o(be(void 0,true));});});var n=this[qe],i;if(n)i=new Promise(fc(n,this));else {var s=this[Te].read();if(s!==null)return Promise.resolve(be(s,false));i=new Promise(this[cn]);}return this[qe]=i,i}},me(Ft,Symbol.asyncIterator,function(){return this}),me(Ft,"return",function(){var e=this;return new Promise(function(r,n){e[Te].destroy(null,function(i){if(i){n(i);return}r(be(void 0,true));});})}),Ft),cc),dc=function(e){var r,n=Object.create(hc,(r={},me(r,Te,{value:e,writable:true}),me(r,ye,{value:null,writable:true}),me(r,Re,{value:null,writable:true}),me(r,tt,{value:null,writable:true}),me(r,Bt,{value:e._readableState.endEmitted,writable:true}),me(r,cn,{value:function(s,o){var a=n[Te].read();a?(n[qe]=null,n[ye]=null,n[Re]=null,s(be(a,false))):(n[ye]=s,n[Re]=o);},writable:true}),r));return n[qe]=null,ac(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=n[Re];s!==null&&(n[qe]=null,n[ye]=null,n[Re]=null,s(i)),n[tt]=i;return}var o=n[ye];o!==null&&(n[qe]=null,n[ye]=null,n[Re]=null,o(be(void 0,true))),n[Bt]=true;}),e.on("readable",lc.bind(null,n)),n};go.exports=dc;});var vo=c((P0,_o)=>{function yo(t,e,r,n,i,s,o){try{var a=t[s](o),u=a.value;}catch(f){r(f);return}a.done?e(u):Promise.resolve(u).then(n,i);}function pc(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function o(u){yo(s,n,i,o,a,"next",u);}function a(u){yo(s,n,i,o,a,"throw",u);}o(void 0);})}}function bo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n);}return r}function gc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bo(Object(r),true).forEach(function(n){mc(t,n,r[n]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n));});}return t}function mc(t,e,r){return e=yc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true}):t[e]=r,t}function yc(t){var e=bc(t,"string");return typeof e=="symbol"?e:String(e)}function bc(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(t)}var _c=ge().codes.ERR_INVALID_ARG_TYPE;function vc(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new _c("iterable",["Iterable"],e);var i=new t(gc({objectMode:true},r)),s=false;i._read=function(){s||(s=true,o());};function o(){return a.apply(this,arguments)}function a(){return a=pc(function*(){try{var u=yield n.next(),f=u.value,d=u.done;d?i.push(null):i.push(yield f)?o():s=!1;}catch(p){i.destroy(p);}}),a.apply(this,arguments)}return i}_o.exports=vc;});var wn=c((C0,Ao)=>{Ao.exports=M;var ke;M.ReadableState=xo;R("events").EventEmitter;var So=function(e,r){return e.listeners(r).length},nt=Qr(),Ht=R("buffer").Buffer,wc=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ec(t){return Ht.from(t)}function Sc(t){return Ht.isBuffer(t)||t instanceof wc}var hn=R("util"),E;hn&&hn.debuglog?E=hn.debuglog("stream"):E=function(){};var xc=so(),_n=en(),Mc=tn(),Oc=Mc.getHighWaterMark,Wt=ge().codes,Rc=Wt.ERR_INVALID_ARG_TYPE,qc=Wt.ERR_STREAM_PUSH_AFTER_EOF,Tc=Wt.ERR_METHOD_NOT_IMPLEMENTED,Ac=Wt.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Fe,dn,pn;$e()(M,nt);var rt=_n.errorOrDestroy,gn=["error","close","destroy","pause","resume"];function Lc(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 xo(t,e,r){ke=ke||Ae(),t=t||{},typeof r!="boolean"&&(r=e instanceof ke),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Oc(this,t,"readableHighWaterMark",r),this.buffer=new xc,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=false,this.endEmitted=false,this.reading=false,this.sync=true,this.needReadable=false,this.emittedReadable=false,this.readableListening=false,this.resumeScheduled=false,this.paused=true,this.emitClose=t.emitClose!==false,this.autoDestroy=!!t.autoDestroy,this.destroyed=false,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=false,this.decoder=null,this.encoding=null,t.encoding&&(Fe||(Fe=fn().StringDecoder),this.decoder=new Fe(t.encoding),this.encoding=t.encoding);}function M(t){if(ke=ke||Ae(),!(this instanceof M))return new M(t);var e=this instanceof ke;this._readableState=new xo(t,this,e),this.readable=true,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),nt.call(this);}Object.defineProperty(M.prototype,"destroyed",{enumerable:false,get:function(){return this._readableState===void 0?false:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e);}});M.prototype.destroy=_n.destroy;M.prototype._undestroy=_n.undestroy;M.prototype._destroy=function(t,e){e(t);};M.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=true:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ht.from(t,e),e=""),n=true),Mo(this,t,e,false,n)};M.prototype.unshift=function(t){return Mo(this,t,null,true,false)};function Mo(t,e,r,n,i){E("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=false,Pc(t,s);else {var o;if(i||(o=jc(s,e)),o)rt(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Ht.prototype&&(e=Ec(e)),n)s.endEmitted?rt(t,new Ac):mn(t,s,e,true);else if(s.ended)rt(t,new qc);else {if(s.destroyed)return false;s.reading=false,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?mn(t,s,e,false):bn(t,s)):mn(t,s,e,false);}else n||(s.reading=false,bn(t,s));}return !s.ended&&(s.length<s.highWaterMark||s.length===0)}function mn(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Ut(t)),bn(t,e);}function jc(t,e){var r;return !Sc(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Rc("chunk",["string","Buffer","Uint8Array"],e)),r}M.prototype.isPaused=function(){return this._readableState.flowing===false};M.prototype.setEncoding=function(t){Fe||(Fe=fn().StringDecoder);var e=new Fe(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var wo=1073741824;function Nc(t){return t>=wo?t=wo:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Eo(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=Nc(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=true,0))}M.prototype.read=function(t){E("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=false),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return E("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?yn(this):Ut(this),null;if(t=Eo(t,e),t===0&&e.ended)return e.length===0&&yn(this),null;var n=e.needReadable;E("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=true,E("length less than watermark",n)),e.ended||e.reading?(n=false,E("reading or ended",n)):n&&(E("do read"),e.reading=true,e.sync=true,e.length===0&&(e.needReadable=true),this._read(e.highWaterMark),e.sync=false,e.reading||(t=Eo(r,e)));var i;return t>0?i=qo(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=true),r!==t&&e.ended&&yn(this)),i!==null&&this.emit("data",i),i};function Pc(t,e){if(E("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=true,e.sync?Ut(t):(e.needReadable=false,e.emittedReadable||(e.emittedReadable=true,Oo(t)));}}function Ut(t){var e=t._readableState;E("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=false,e.emittedReadable||(E("emitReadable",e.flowing),e.emittedReadable=true,process.nextTick(Oo,t));}function Oo(t){var e=t._readableState;E("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=false),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,vn(t);}function bn(t,e){e.readingMore||(e.readingMore=true,process.nextTick(Dc,t,e));}function Dc(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(E("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=false;}M.prototype._read=function(t){rt(this,new Tc("_read()"));};M.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,E("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==false)&&t!==process.stdout&&t!==process.stderr,s=i?a:m;n.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(b,_){E("onunpipe"),b===r&&_&&_.hasUnpiped===false&&(_.hasUnpiped=true,d());}function a(){E("onend"),t.end();}var u=Cc(r);t.on("drain",u);var f=false;function d(){E("cleanup"),t.removeListener("close",y),t.removeListener("finish",l),t.removeListener("drain",u),t.removeListener("error",h),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",m),r.removeListener("data",p),f=true,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u();}r.on("data",p);function p(b){E("ondata");var _=t.write(b);E("dest.write",_),_===false&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&To(n.pipes,t)!==-1)&&!f&&(E("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause());}function h(b){E("onerror",b),m(),t.removeListener("error",h),So(t,"error")===0&&rt(t,b);}Lc(t,"error",h);function y(){t.removeListener("finish",l),m();}t.once("close",y);function l(){E("onfinish"),t.removeListener("close",y),m();}t.once("finish",l);function m(){E("unpipe"),r.unpipe(t);}return t.emit("pipe",r),n.flowing||(E("pipe resume"),r.resume()),t};function Cc(t){return function(){var r=t._readableState;E("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&So(t,"data")&&(r.flowing=true,vn(t));}}M.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:false};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=false,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=false;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:false});return this}var o=To(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};M.prototype.on=function(t,e){var r=nt.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==false&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=true,n.flowing=false,n.emittedReadable=false,E("on readable",n.length,n.reading),n.length?Ut(this):n.reading||process.nextTick(Ic,this)),r};M.prototype.addListener=M.prototype.on;M.prototype.removeListener=function(t,e){var r=nt.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Ro,this),r};M.prototype.removeAllListeners=function(t){var e=nt.prototype.removeAllListeners.apply(this,arguments);return (t==="readable"||t===void 0)&&process.nextTick(Ro,this),e};function Ro(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=true:t.listenerCount("data")>0&&t.resume();}function Ic(t){E("readable nexttick read 0"),t.read(0);}M.prototype.resume=function(){var t=this._readableState;return t.flowing||(E("resume"),t.flowing=!t.readableListening,$c(this,t)),t.paused=false,this};function $c(t,e){e.resumeScheduled||(e.resumeScheduled=true,process.nextTick(kc,t,e));}function kc(t,e){E("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=false,t.emit("resume"),vn(t),e.flowing&&!e.reading&&t.read(0);}M.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==false&&(E("pause"),this._readableState.flowing=false,this.emit("pause")),this._readableState.paused=true,this};function vn(t){var e=t._readableState;for(E("flow",e.flowing);e.flowing&&t.read()!==null;);}M.prototype.wrap=function(t){var e=this,r=this._readableState,n=false;t.on("end",function(){if(E("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o);}e.push(null);}),t.on("data",function(o){if(E("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(n=true,t.pause());}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(a){return function(){return t[a].apply(t,arguments)}})(i));for(var s=0;s<gn.length;s++)t.on(gn[s],this.emit.bind(this,gn[s]));return this._read=function(o){E("wrapped _read",o),n&&(n=false,t.resume());},this};typeof Symbol=="function"&&(M.prototype[Symbol.asyncIterator]=function(){return dn===void 0&&(dn=mo()),dn(this)});Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(M.prototype,"readableBuffer",{enumerable:false,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(M.prototype,"readableFlowing",{enumerable:false,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e);}});M._fromList=qo;Object.defineProperty(M.prototype,"readableLength",{enumerable:false,get:function(){return this._readableState.length}});function qo(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 yn(t){var e=t._readableState;E("endReadable",e.endEmitted),e.endEmitted||(e.ended=true,process.nextTick(Fc,e,t));}function Fc(t,e){if(E("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=true,e.readable=false,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy();}}typeof Symbol=="function"&&(M.from=function(t,e){return pn===void 0&&(pn=vo()),pn(M,t,e)});function To(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return -1}});var Ae=c((I0,jo)=>{var Bc=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};jo.exports=ne;var Lo=wn(),Sn=Yt();$e()(ne,Lo);for(En=Bc(Sn.prototype),zt=0;zt<En.length;zt++)Gt=En[zt],ne.prototype[Gt]||(ne.prototype[Gt]=Sn.prototype[Gt]);var En,Gt,zt;function ne(t){if(!(this instanceof ne))return new ne(t);Lo.call(this,t),Sn.call(this,t),this.allowHalfOpen=true,t&&(t.readable===false&&(this.readable=false),t.writable===false&&(this.writable=false),t.allowHalfOpen===false&&(this.allowHalfOpen=false,this.once("end",Hc)));}Object.defineProperty(ne.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(ne.prototype,"writableBuffer",{enumerable:false,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(ne.prototype,"writableLength",{enumerable:false,get:function(){return this._writableState.length}});function Hc(){this._writableState.ended||process.nextTick(Wc,this);}function Wc(t){t.end();}Object.defineProperty(ne.prototype,"destroyed",{enumerable:false,get:function(){return this._readableState===void 0||this._writableState===void 0?false: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 Yt=c(($0,$o)=>{$o.exports=N;function Po(t){var e=this;this.next=null,this.entry=null,this.finish=function(){mh(e,t);};}var Be;N.WritableState=st;var Uc={deprecate:zs()},Do=Qr(),Kt=R("buffer").Buffer,zc=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Gc(t){return Kt.from(t)}function Yc(t){return Kt.isBuffer(t)||t instanceof zc}var Mn=en(),Vc=tn(),Kc=Vc.getHighWaterMark,_e=ge().codes,Jc=_e.ERR_INVALID_ARG_TYPE,Zc=_e.ERR_METHOD_NOT_IMPLEMENTED,Qc=_e.ERR_MULTIPLE_CALLBACK,Xc=_e.ERR_STREAM_CANNOT_PIPE,eh=_e.ERR_STREAM_DESTROYED,th=_e.ERR_STREAM_NULL_VALUES,rh=_e.ERR_STREAM_WRITE_AFTER_END,nh=_e.ERR_UNKNOWN_ENCODING,He=Mn.errorOrDestroy;$e()(N,Do);function ih(){}function st(t,e,r){Be=Be||Ae(),t=t||{},typeof r!="boolean"&&(r=e instanceof Be),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Kc(this,t,"writableHighWaterMark",r),this.finalCalled=false,this.needDrain=false,this.ending=false,this.ended=false,this.finished=false,this.destroyed=false;var n=t.decodeStrings===false;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=false,this.corked=0,this.sync=true,this.bufferProcessing=false,this.onwrite=function(i){ch(e,i);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=false,this.errorEmitted=false,this.emitClose=t.emitClose!==false,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Po(this);}st.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(st.prototype,"buffer",{get:Uc.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var Vt;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Vt=Function.prototype[Symbol.hasInstance],Object.defineProperty(N,Symbol.hasInstance,{value:function(e){return Vt.call(this,e)?true:this!==N?false:e&&e._writableState instanceof st}})):Vt=function(e){return e instanceof this};function N(t){Be=Be||Ae();var e=this instanceof Be;if(!e&&!Vt.call(N,this))return new N(t);this._writableState=new st(t,this,e),this.writable=true,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)),Do.call(this);}N.prototype.pipe=function(){He(this,new Xc);};function sh(t,e){var r=new rh;He(t,r),process.nextTick(e,r);}function oh(t,e,r,n){var i;return r===null?i=new th:typeof r!="string"&&!e.objectMode&&(i=new Jc("chunk",["string","Buffer"],r)),i?(He(t,i),process.nextTick(n,i),false):true}N.prototype.write=function(t,e,r){var n=this._writableState,i=false,s=!n.objectMode&&Yc(t);return s&&!Kt.isBuffer(t)&&(t=Gc(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=ih),n.ending?sh(this,r):(s||oh(this,n,t,r))&&(n.pendingcb++,i=uh(this,n,s,t,e,r)),i};N.prototype.cork=function(){this._writableState.corked++;};N.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Co(this,t));};N.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 nh(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(N.prototype,"writableBuffer",{enumerable:false,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ah(t,e,r){return !t.objectMode&&t.decodeStrings!==false&&typeof e=="string"&&(e=Kt.from(e,r)),e}Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function uh(t,e,r,n,i,s){if(!r){var o=ah(e,n,i);n!==o&&(r=true,i="buffer",n=o);}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=true),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1;}else xn(t,e,false,a,n,i,s);return u}function xn(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=true,e.sync=true,e.destroyed?e.onwrite(new eh("write")):r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=false;}function lh(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(it,t,e),t._writableState.errorEmitted=true,He(t,n)):(i(n),t._writableState.errorEmitted=true,He(t,n),it(t,e));}function fh(t){t.writing=false,t.writecb=null,t.length-=t.writelen,t.writelen=0;}function ch(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new Qc;if(fh(r),e)lh(t,r,n,e,i);else {var s=Io(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Co(t,r),n?process.nextTick(No,t,r,s,i):No(t,r,s,i);}}function No(t,e,r,n){r||hh(t,e),e.pendingcb--,n(),it(t,e);}function hh(t,e){e.length===0&&e.needDrain&&(e.needDrain=false,t.emit("drain"));}function Co(t,e){e.bufferProcessing=true;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=true;r;)i[o]=r,r.isBuf||(a=false),r=r.next,o+=1;i.allBuffers=a,xn(t,e,true,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Po(e),e.bufferedRequestCount=0;}else {for(;r;){var u=r.chunk,f=r.encoding,d=r.callback,p=e.objectMode?1:u.length;if(xn(t,e,false,p,u,f,d),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null);}e.bufferedRequest=r,e.bufferProcessing=false;}N.prototype._write=function(t,e,r){r(new Zc("_write()"));};N.prototype._writev=null;N.prototype.end=function(t,e,r){var n=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),n.corked&&(n.corked=1,this.uncork()),n.ending||gh(this,n,r),this};Object.defineProperty(N.prototype,"writableLength",{enumerable:false,get:function(){return this._writableState.length}});function Io(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function dh(t,e){t._final(function(r){e.pendingcb--,r&&He(t,r),e.prefinished=true,t.emit("prefinish"),it(t,e);});}function ph(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=true,process.nextTick(dh,t,e)):(e.prefinished=true,t.emit("prefinish")));}function it(t,e){var r=Io(e);if(r&&(ph(t,e),e.pendingcb===0&&(e.finished=true,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy();}return r}function gh(t,e,r){e.ending=true,it(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=true,t.writable=false;}function mh(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next;}e.corkedRequestsFree.next=t;}Object.defineProperty(N.prototype,"destroyed",{enumerable:false,get:function(){return this._writableState===void 0?false:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e);}});N.prototype.destroy=Mn.destroy;N.prototype._undestroy=Mn.undestroy;N.prototype._destroy=function(t,e){e(t);};});var On=c((k0,Bo)=>{var yh=R("util"),ko=Yt(),{LEVEL:Fo}=D(),ot=Bo.exports=function(e={}){ko.call(this,{objectMode:true,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());});};yh.inherits(ot,ko);ot.prototype._write=function(e,r,n){if(this.silent||e.exception===true&&!this.handleExceptions)return n(null);let i=this.level||this.parent&&this.parent.level;if(!i||this.levels[i]>=this.levels[e[Fo]]){if(e&&!this.format)return this.log(e,n);let s,o;try{o=this.format.transform(Object.assign({},e),this.format.options);}catch(a){s=a;}if(s||!o){if(n(),s)throw s;return}return this.log(o,n)}return this._writableState.sync=false,n(null)};ot.prototype._writev=function(e,r){if(this.logv){let n=e.filter(this._accept,this);return n.length?this.logv(n,r):r(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let i,s;try{s=this.format.transform(Object.assign({},e[n].chunk),this.format.options);}catch(o){i=o;}if(i||!s){if(e[n].callback(),i)throw r(null),i}else this.log(s,e[n].callback);}return r(null)};ot.prototype._accept=function(e){let r=e.chunk;if(this.silent)return false;let n=this.level||this.parent&&this.parent.level;return !!((r.exception===true||!n||this.levels[n]>=this.levels[r[Fo]])&&(this.handleExceptions||r.exception!==true))};ot.prototype._nop=function(){};});var qn=c((F0,Wo)=>{var bh=R("util"),{LEVEL:Rn}=D(),Ho=On(),at=Wo.exports=function(e={}){if(Ho.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(n){this.emit("error",n,this.transport);}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError));};bh.inherits(at,Ho);at.prototype._write=function(e,r,n){if(this.silent||e.exception===true&&!this.handleExceptions)return n(null);(!this.level||this.levels[this.level]>=this.levels[e[Rn]])&&this.transport.log(e[Rn],e.message,e,this._nop),n(null);};at.prototype._writev=function(e,r){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[Rn],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return r(null)};at.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(`
26
+ `));};at.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null);};});var We=c((B0,Tn)=>{Tn.exports=On();Tn.exports.LegacyTransportStream=qn();});var Go=c((W0,zo)=>{var _h=R("os"),{LEVEL:Uo,MESSAGE:Ue}=D(),vh=We();zo.exports=class extends vh{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:_h.EOL,this.forceConsole=e.forceConsole||false,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[Uo]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[Ue]}${this.eol}`):this._consoleError(e[Ue]),r&&r();return}else if(this.consoleWarnLevels[e[Uo]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[Ue]}${this.eol}`):this._consoleWarn(e[Ue]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[Ue]}${this.eol}`):this._consoleLog(e[Ue]),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((n,i)=>{if(typeof i!="string")throw new Error(r);return n[i]=true,n},{})}};});var Zt=c((Jt,Yo)=>{Object.defineProperty(Jt,"__esModule",{value:true});Jt.default=wh;function wh(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}Yo.exports=Jt.default;});var Ko=c((Qt,Vo)=>{Object.defineProperty(Qt,"__esModule",{value:true});Qt.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};Vo.exports=Qt.default;});var Qo=c(ve=>{Object.defineProperty(ve,"__esModule",{value:true});ve.fallback=Jo;ve.wrap=Zo;var Eh=ve.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,Sh=ve.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,xh=ve.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function Jo(t){setTimeout(t,0);}function Zo(t){return (e,...r)=>t(()=>e(...r))}var ut;Eh?ut=queueMicrotask:Sh?ut=setImmediate:xh?ut=process.nextTick:ut=Jo;ve.default=Zo(ut);});var na=c((Xt,ra)=>{Object.defineProperty(Xt,"__esModule",{value:true});Xt.default=Ah;var Mh=Ko(),Oh=ta(Mh),Rh=Qo(),qh=ta(Rh),Th=Le();function ta(t){return t&&t.__esModule?t:{default:t}}function Ah(t){return (0, Th.isAsync)(t)?function(...e){let r=e.pop(),n=t.apply(this,e);return Xo(n,r)}:(0, Oh.default)(function(e,r){var n;try{n=t.apply(this,e);}catch(i){return r(i)}if(n&&typeof n.then=="function")return Xo(n,r);r(null,n);})}function Xo(t,e){return t.then(r=>{ea(e,null,r);},r=>{ea(e,r&&(r instanceof Error||r.message)?r:new Error(r));})}function ea(t,e,r){try{t(e,r);}catch(n){(0, qh.default)(i=>{throw i},n);}}ra.exports=Xt.default;});var Le=c(ue=>{Object.defineProperty(ue,"__esModule",{value:true});ue.isAsyncIterable=ue.isAsyncGenerator=ue.isAsync=void 0;var Lh=na(),jh=Nh(Lh);function Nh(t){return t&&t.__esModule?t:{default:t}}function ia(t){return t[Symbol.toStringTag]==="AsyncFunction"}function Ph(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function Dh(t){return typeof t[Symbol.asyncIterator]=="function"}function Ch(t){if(typeof t!="function")throw new Error("expected a function");return ia(t)?(0, jh.default)(t):t}ue.default=Ch;ue.isAsync=ia;ue.isAsyncGenerator=Ph;ue.isAsyncIterable=Dh;});var ze=c((er,sa)=>{Object.defineProperty(er,"__esModule",{value:true});er.default=Ih;function Ih(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...n){return typeof n[e-1]=="function"?t.apply(this,n):new Promise((i,s)=>{n[e-1]=(o,...a)=>{if(o)return s(o);i(a.length>1?a:a[0]);},t.apply(this,n);})}return r}sa.exports=er.default;});var aa=c((tr,oa)=>{Object.defineProperty(tr,"__esModule",{value:true});var $h=Zt(),kh=An($h),Fh=Le(),Bh=An(Fh),Hh=ze(),Wh=An(Hh);function An(t){return t&&t.__esModule?t:{default:t}}tr.default=(0, Wh.default)((t,e,r)=>{var n=(0, kh.default)(e)?[]:{};t(e,(i,s,o)=>{(0, Bh.default)(i)((a,...u)=>{u.length<2&&([u]=u),n[s]=u,o(a);});},i=>r(i,n));},3);oa.exports=tr.default;});var Ln=c((rr,ua)=>{Object.defineProperty(rr,"__esModule",{value:true});rr.default=Uh;function Uh(t){function e(...r){if(t!==null){var n=t;t=null,n.apply(this,r);}}return Object.assign(e,t),e}ua.exports=rr.default;});var fa=c((nr,la)=>{Object.defineProperty(nr,"__esModule",{value:true});nr.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};la.exports=nr.default;});var da=c((ir,ha)=>{Object.defineProperty(ir,"__esModule",{value:true});ir.default=Qh;var zh=Zt(),Gh=ca(zh),Yh=fa(),Vh=ca(Yh);function ca(t){return t&&t.__esModule?t:{default:t}}function Kh(t){var e=-1,r=t.length;return function(){return ++e<r?{value:t[e],key:e}:null}}function Jh(t){var e=-1;return function(){var n=t.next();return n.done?null:(e++,{value:n.value,key:e})}}function Zh(t){var e=t?Object.keys(t):[],r=-1,n=e.length;return function i(){var s=e[++r];return s==="__proto__"?i():r<n?{value:t[s],key:s}:null}}function Qh(t){if((0, Gh.default)(t))return Kh(t);var e=(0, Vh.default)(t);return e?Jh(e):Zh(t)}ha.exports=ir.default;});var jn=c((sr,pa)=>{Object.defineProperty(sr,"__esModule",{value:true});sr.default=Xh;function Xh(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e);}}pa.exports=sr.default;});var ar=c((or,ga)=>{Object.defineProperty(or,"__esModule",{value:true});var ed={};or.default=ed;ga.exports=or.default;});var ya=c((ur,ma)=>{Object.defineProperty(ur,"__esModule",{value:true});ur.default=id;var td=ar(),rd=nd(td);function nd(t){return t&&t.__esModule?t:{default:t}}function id(t,e,r,n){let i=false,s=false,o=false,a=0,u=0;function f(){a>=e||o||i||(o=true,t.next().then(({value:h,done:y})=>{if(!(s||i)){if(o=false,y){i=true,a<=0&&n(null);return}a++,r(h,u,d),u++,f();}}).catch(p));}function d(h,y){if(a-=1,!s){if(h)return p(h);if(h===false){i=true,s=true;return}if(y===rd.default||i&&a<=0)return i=true,n(null);f();}}function p(h){s||(o=false,i=true,n(h));}f();}ma.exports=ur.default;});var wa=c((lr,va)=>{Object.defineProperty(lr,"__esModule",{value:true});var sd=Ln(),od=lt(sd),ad=da(),ud=lt(ad),ld=jn(),fd=lt(ld),ba=Le(),cd=ya(),_a=lt(cd),hd=ar(),dd=lt(hd);function lt(t){return t&&t.__esModule?t:{default:t}}lr.default=t=>(e,r,n)=>{if(n=(0, od.default)(n),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return n(null);if((0, ba.isAsyncGenerator)(e))return (0, _a.default)(e,t,r,n);if((0, ba.isAsyncIterable)(e))return (0, _a.default)(e[Symbol.asyncIterator](),t,r,n);var i=(0, ud.default)(e),s=false,o=false,a=0,u=false;function f(p,h){if(!o)if(a-=1,p)s=true,n(p);else if(p===false)s=true,o=true;else {if(h===dd.default||s&&a<=0)return s=true,n(null);u||d();}}function d(){for(u=true;a<t&&!s;){var p=i();if(p===null){s=true,a<=0&&n(null);return}a+=1,r(p.value,p.key,(0, fd.default)(f));}u=false;}d();};va.exports=lr.default;});var Pn=c((fr,Ea)=>{Object.defineProperty(fr,"__esModule",{value:true});var pd=wa(),gd=Nn(pd),md=Le(),yd=Nn(md),bd=ze(),_d=Nn(bd);function Nn(t){return t&&t.__esModule?t:{default:t}}function vd(t,e,r,n){return (0, gd.default)(e)(t,(0, yd.default)(r),n)}fr.default=(0, _d.default)(vd,4);Ea.exports=fr.default;});var Ma=c((cr,xa)=>{Object.defineProperty(cr,"__esModule",{value:true});var wd=Pn(),Ed=Sa(wd),Sd=ze(),xd=Sa(Sd);function Sa(t){return t&&t.__esModule?t:{default:t}}function Md(t,e,r){return (0, Ed.default)(t,1,e,r)}cr.default=(0, xd.default)(Md,3);xa.exports=cr.default;});var qa=c((hr,Ra)=>{Object.defineProperty(hr,"__esModule",{value:true});hr.default=Ad;var Od=aa(),Rd=Oa(Od),qd=Ma(),Td=Oa(qd);function Oa(t){return t&&t.__esModule?t:{default:t}}function Ad(t,e){return (0, Rd.default)(Td.default,t,e)}Ra.exports=hr.default;});var Dn=c((G0,Aa)=>{Aa.exports=le;var dr=ge().codes,Ld=dr.ERR_METHOD_NOT_IMPLEMENTED,jd=dr.ERR_MULTIPLE_CALLBACK,Nd=dr.ERR_TRANSFORM_ALREADY_TRANSFORMING,Pd=dr.ERR_TRANSFORM_WITH_LENGTH_0,pr=Ae();$e()(le,pr);function Dd(t,e){var r=this._transformState;r.transforming=false;var n=r.writecb;if(n===null)return this.emit("error",new jd);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=false,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark);}function le(t){if(!(this instanceof le))return new le(t);pr.call(this,t),this._transformState={afterTransform:Dd.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=true,this._readableState.sync=false,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Cd);}function Cd(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Ta(t,e,r);}):Ta(this,null,null);}le.prototype.push=function(t,e){return this._transformState.needTransform=false,pr.prototype.push.call(this,t,e)};le.prototype._transform=function(t,e,r){r(new Ld("_transform()"));};le.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark);}};le.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=true,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=true;};le.prototype._destroy=function(t,e){pr.prototype._destroy.call(this,t,function(r){e(r);});};function Ta(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Pd;if(t._transformState.transforming)throw new Nd;return t.push(null)}});var Na=c((Y0,ja)=>{ja.exports=ft;var La=Dn();$e()(ft,La);function ft(t){if(!(this instanceof ft))return new ft(t);La.call(this,t);}ft.prototype._transform=function(t,e,r){r(null,t);};});var $a=c((V0,Ia)=>{var Cn;function Id(t){var e=false;return function(){e||(e=true,t.apply(void 0,arguments));}}var Ca=ge().codes,$d=Ca.ERR_MISSING_ARGS,kd=Ca.ERR_STREAM_DESTROYED;function Pa(t){if(t)throw t}function Fd(t){return t.setHeader&&typeof t.abort=="function"}function Bd(t,e,r,n){n=Id(n);var i=false;t.on("close",function(){i=true;}),Cn===void 0&&(Cn=kt()),Cn(t,{readable:e,writable:r},function(o){if(o)return n(o);i=true,n();});var s=false;return function(o){if(!i&&!s){if(s=true,Fd(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(o||new kd("pipe"));}}}function Da(t){t();}function Hd(t,e){return t.pipe(e)}function Wd(t){return !t.length||typeof t[t.length-1]!="function"?Pa:t.pop()}function Ud(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=Wd(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new $d("streams");var i,s=e.map(function(o,a){var u=a<e.length-1,f=a>0;return Bd(o,u,f,function(d){i||(i=d),d&&s.forEach(Da),!u&&(s.forEach(Da),n(i));})});return e.reduce(Hd)}Ia.exports=Ud;});var je=c((K,ht)=>{var ct=R("stream");process.env.READABLE_STREAM==="disable"&&ct?(ht.exports=ct.Readable,Object.assign(ht.exports,ct),ht.exports.Stream=ct):(K=ht.exports=wn(),K.Stream=ct||K,K.Readable=K,K.Writable=Yt(),K.Duplex=Ae(),K.Transform=Dn(),K.PassThrough=Na(),K.finished=kt(),K.pipeline=$a());});var Wn=c((K0,Fa)=>{var Ge=[],dt=[],In=function(){};function kn(t){return ~Ge.indexOf(t)?false:(Ge.push(t),true)}function Fn(t){In=t;}function zd(t){for(var e=[],r=0;r<Ge.length;r++){if(Ge[r].async){e.push(Ge[r]);continue}if(Ge[r](t))return true}return e.length?new Promise(function(i){Promise.all(e.map(function(o){return o(t)})).then(function(o){i(o.some(Boolean));});}):false}function Bn(t){return ~dt.indexOf(t)?false:(dt.push(t),true)}function $n(){In.apply(In,arguments);}function ka(t){for(var e=0;e<dt.length;e++)t=dt[e].apply(dt[e],arguments);return t}function Hn(t,e){var r=Object.prototype.hasOwnProperty;for(var n in e)r.call(e,n)&&(t[n]=e[n]);return t}function Gd(t){return t.enabled=false,t.modify=Bn,t.set=Fn,t.use=kn,Hn(function(){return false},t)}function Yd(t){function e(){var r=Array.prototype.slice.call(arguments,0);return $n.call($n,t,ka(r,t)),true}return t.enabled=true,t.modify=Bn,t.set=Fn,t.use=kn,Hn(e,t)}Fa.exports=function(e){return e.introduce=Hn,e.enabled=zd,e.process=ka,e.modify=Bn,e.write=$n,e.nope=Gd,e.yep=Yd,e.set=Fn,e.use=kn,e};});var Ha=c((J0,Ba)=>{var Vd=Wn(),Kd=Vd(function t(e,r){return r=r||{},r.namespace=e,r.prod=true,r.dev=false,r.force||t.force?t.yep(r):t.nope(r)});Ba.exports=Kd;});var Va=c((Z0,Ya)=>{var ie={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]},Ua=Object.create(null);for(let t in ie)Object.hasOwn(ie,t)&&(Ua[ie[t]]=t);var $={to:{},get:{}};$.get=function(t){let e=t.slice(0,3).toLowerCase(),r,n;switch(e){case "hsl":{r=$.get.hsl(t),n="hsl";break}case "hwb":{r=$.get.hwb(t),n="hwb";break}default:{r=$.get.rgb(t),n="rgb";break}}return r?{model:n,value:r}:null};$.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],a,u,f;if(a=t.match(r)){for(f=a[2],a=a[1],u=0;u<3;u++){let d=u*2;o[u]=Number.parseInt(a.slice(d,d+2),16);}f&&(o[3]=Number.parseInt(f,16)/255);}else if(a=t.match(e)){for(a=a[1],f=a[3],u=0;u<3;u++)o[u]=Number.parseInt(a[u]+a[u],16);f&&(o[3]=Number.parseInt(f+f,16)/255);}else if(a=t.match(n)){for(u=0;u<3;u++)o[u]=Number.parseInt(a[u+1],10);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]));}else if(a=t.match(i)){for(u=0;u<3;u++)o[u]=Math.round(Number.parseFloat(a[u+1])*2.55);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]));}else return (a=t.match(s))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(ie,a[1])?(o=ie[a[1]],o[3]=1,o):null:null;for(u=0;u<3;u++)o[u]=we(o[u],0,255);return o[3]=we(o[3],0,1),o};$.get.hsl=function(t){if(!t)return null;let 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){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,s=we(Number.parseFloat(r[2]),0,100),o=we(Number.parseFloat(r[3]),0,100),a=we(Number.isNaN(n)?1:n,0,1);return [i,s,o,a]}return null};$.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,s=we(Number.parseFloat(r[2]),0,100),o=we(Number.parseFloat(r[3]),0,100),a=we(Number.isNaN(n)?1:n,0,1);return [i,s,o,a]}return null};$.to.hex=function(...t){return "#"+gr(t[0])+gr(t[1])+gr(t[2])+(t[3]<1?gr(Math.round(t[3]*255)):"")};$.to.rgb=function(...t){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]+")"};$.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"};$.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};$.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};$.to.keyword=function(...t){return Ua[t.slice(0,3)]};function we(t,e,r){return Math.min(Math.max(e,t),r)}function gr(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var za={};for(let t of Object.keys(ie))za[ie[t]]=t;var g={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"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},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"]}},fe=(6/29)**3;function Ye(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function Ve(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(g)){if(!("channels"in g[t]))throw new Error("missing channels property: "+t);if(!("labels"in g[t]))throw new Error("missing channel labels property: "+t);if(g[t].labels.length!==g[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=g[t];delete g[t].channels,delete g[t].labels,Object.defineProperty(g[t],"channels",{value:e}),Object.defineProperty(g[t],"labels",{value:r});}g.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),o=s-i,a,u;switch(s){case i:{a=0;break}case e:{a=(r-n)/o;break}case r:{a=2+(n-e)/o;break}case n:{a=4+(e-r)/o;break}}a=Math.min(a*60,360),a<0&&(a+=360);let f=(i+s)/2;return s===i?u=0:f<=.5?u=o/(s+i):u=o/(2-s-i),[a,u*100,f*100]};g.rgb.hsv=function(t){let e,r,n,i,s,o=t[0]/255,a=t[1]/255,u=t[2]/255,f=Math.max(o,a,u),d=f-Math.min(o,a,u),p=function(h){return (f-h)/6/d+1/2};if(d===0)i=0,s=0;else {switch(s=d/f,e=p(o),r=p(a),n=p(u),f){case o:{i=n-r;break}case a:{i=1/3+e-n;break}case u:{i=2/3+r-e;break}}i<0?i+=1:i>1&&(i-=1);}return [i*360,s*100,f*100]};g.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=g.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};g.rgb.oklab=function(t){let e=Ve(t[0]/255),r=Ve(t[1]/255),n=Ve(t[2]/255),i=Math.cbrt(.4122214708*e+.5363325363*r+.0514459929*n),s=Math.cbrt(.2119034982*e+.6806995451*r+.1073969566*n),o=Math.cbrt(.0883024619*e+.2817188376*r+.6299787005*n),a=.2104542553*i+.793617785*s-.0040720468*o,u=1.9779984951*i-2.428592205*s+.4505937099*o,f=.0259040371*i+.7827717662*s-.808675766*o;return [a*100,u*100,f*100]};g.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),s=(1-e-i)/(1-i)||0,o=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return [s*100,o*100,a*100,i*100]};function Jd(t,e){return (t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}g.rgb.keyword=function(t){let e=za[t];if(e)return e;let r=Number.POSITIVE_INFINITY,n;for(let i of Object.keys(ie)){let s=ie[i],o=Jd(t,s);o<r&&(r=o,n=i);}return n};g.keyword.rgb=function(t){return ie[t]};g.rgb.xyz=function(t){let e=Ve(t[0]/255),r=Ve(t[1]/255),n=Ve(t[2]/255),i=e*.4124564+r*.3575761+n*.1804375,s=e*.2126729+r*.7151522+n*.072175,o=e*.0193339+r*.119192+n*.9503041;return [i*100,s*100,o*100]};g.rgb.lab=function(t){let e=g.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>fe?r**(1/3):7.787*r+16/116,n=n>fe?n**(1/3):7.787*n+16/116,i=i>fe?i**(1/3):7.787*i+16/116;let s=116*n-16,o=500*(r-n),a=200*(n-i);return [s,o,a]};g.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s;if(r===0)return s=n*255,[s,s,s];let o=n<.5?n*(1+r):n+r-n*r,a=2*n-o,u=[0,0,0];for(let f=0;f<3;f++)i=e+1/3*-(f-1),i<0&&i++,i>1&&i--,6*i<1?s=a+(o-a)*6*i:2*i<1?s=o:3*i<2?s=a+(o-a)*(2/3-i)*6:s=a,u[f]=s*255;return u};g.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;let o=(n+r)/2,a=n===0?2*i/(s+i):2*r/(n+r);return [e,a*100,o*100]};g.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),u=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return [n,u,o];case 1:return [a,n,o];case 2:return [o,n,u];case 3:return [o,a,n];case 4:return [u,o,n];case 5:return [n,o,a]}};g.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o;o=(2-r)*n;let a=(2-r)*i;return s=r*i,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};g.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s;i>1&&(r/=i,n/=i);let o=Math.floor(6*e),a=1-n;s=6*e-o,(o&1)!==0&&(s=1-s);let u=r+s*(a-r),f,d,p;switch(o){default:case 6:case 0:{f=a,d=u,p=r;break}case 1:{f=u,d=a,p=r;break}case 2:{f=r,d=a,p=u;break}case 3:{f=r,d=u,p=a;break}case 4:{f=u,d=r,p=a;break}case 5:{f=a,d=r,p=u;break}}return [f*255,d*255,p*255]};g.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return [s*255,o*255,a*255]};g.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2404542+r*-1.5371385+n*-0.4985314,s=e*-0.969266+r*1.8760108+n*.041556,o=e*.0556434+r*-0.2040259+n*1.0572252,i=Ye(i),s=Ye(s),o=Ye(o),[i*255,s*255,o*255]};g.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>fe?e**(1/3):7.787*e+16/116,r=r>fe?r**(1/3):7.787*r+16/116,n=n>fe?n**(1/3):7.787*n+16/116;let i=116*r-16,s=500*(e-r),o=200*(r-n);return [i,s,o]};g.xyz.oklab=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=Math.cbrt(.8189330101*e+.3618667424*r-.1288597137*n),s=Math.cbrt(.0329845436*e+.9293118715*r+.0361456387*n),o=Math.cbrt(.0482003018*e+.2643662691*r+.633851707*n),a=.2104542553*i+.793617785*s-.0040720468*o,u=1.9779984951*i-2.428592205*s+.4505937099*o,f=.0259040371*i+.7827717662*s-.808675766*o;return [a*100,u*100,f*100]};g.oklab.oklch=function(t){return g.lab.lch(t)};g.oklab.xyz=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=(.999999998*e+.396337792*r+.215803758*n)**3,s=(1.000000008*e-.105561342*r-.063854175*n)**3,o=(1.000000055*e-.089484182*r-1.291485538*n)**3,a=1.227013851*i-.55779998*s+.281256149*o,u=-0.040580178*i+1.11225687*s-.071676679*o,f=-0.076381285*i-.421481978*s+1.58616322*o;return [a*100,u*100,f*100]};g.oklab.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=(e+.3963377774*r+.2158037573*n)**3,s=(e-.1055613458*r-.0638541728*n)**3,o=(e-.0894841775*r-1.291485548*n)**3,a=Ye(4.0767416621*i-3.3077115913*s+.2309699292*o),u=Ye(-1.2684380046*i+2.6097574011*s-.3413193965*o),f=Ye(-0.0041960863*i-.7034186147*s+1.707614701*o);return [a*255,u*255,f*255]};g.oklch.oklab=function(t){return g.lch.lab(t)};g.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;let a=s**3,u=i**3,f=o**3;return s=a>fe?a:(s-16/116)/7.787,i=u>fe?u:(i-16/116)/7.787,o=f>fe?f:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};g.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(r*r+n*n);return [e,o,i]};g.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,s=r*Math.cos(i),o=r*Math.sin(i);return [e,s,o]};g.rgb.ansi16=function(t,e=null){let[r,n,i]=t,s=e===null?g.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};g.hsv.ansi16=function(t){return g.rgb.ansi16(g.hsv.rgb(t),t[2])};g.rgb.ansi256=function(t){let e=t[0],r=t[1],n=t[2];return e>>4===r>>4&&r>>4===n>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};g.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(Math.trunc(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return [n,i,s]};g.ansi256.rgb=function(t){if(t=t[0],t>=232){let s=(t-232)*10+8;return [s,s,s]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return [r,n,i]};g.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return "000000".slice(r.length)+r};g.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return [0,0,0];let r=e[0];e[0].length===3&&(r=[...r].map(a=>a+a).join(""));let n=Number.parseInt(r,16),i=n>>16&255,s=n>>8&255,o=n&255;return [i,s,o]};g.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),s=Math.min(Math.min(e,r),n),o=i-s,a,u=o<1?s/(1-o):0;return o<=0?a=0:i===e?a=(r-n)/o%6:i===r?a=2+(n-e)/o:a=4+(e-r)/o,a/=6,a%=1,[a*360,o*100,u*100]};g.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};g.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};g.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return [n*255,n*255,n*255];let i=[0,0,0],s=e%1*6,o=s%1,a=1-o,u=0;switch(Math.floor(s)){case 0:{i[0]=1,i[1]=o,i[2]=0;break}case 1:{i[0]=a,i[1]=1,i[2]=0;break}case 2:{i[0]=0,i[1]=1,i[2]=o;break}case 3:{i[0]=0,i[1]=a,i[2]=1;break}case 4:{i[0]=o,i[1]=0,i[2]=1;break}default:i[0]=1,i[1]=0,i[2]=a;}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};g.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};g.hcg.hsl=function(t){let e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};g.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return [t[0],(n-e)*100,(1-n)*100]};g.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]};g.apple.rgb=function(t){return [t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};g.rgb.apple=function(t){return [t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};g.gray.rgb=function(t){return [t[0]/100*255,t[0]/100*255,t[0]/100*255]};g.gray.hsl=function(t){return [0,0,t[0]]};g.gray.hsv=g.gray.hsl;g.gray.hwb=function(t){return [0,100,t[0]]};g.gray.cmyk=function(t){return [0,0,0,t[0]]};g.gray.lab=function(t){return [t[0],0,0]};g.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return "000000".slice(n.length)+n};g.rgb.gray=function(t){return [(t[0]+t[1]+t[2])/3/255*100]};function Zd(){let t={},e=Object.keys(g);for(let{length:r}=e,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Qd(t){let e=Zd(),r=[t];for(e[t].distance=0;r.length>0;){let n=r.pop(),i=Object.keys(g[n]);for(let{length:s}=i,o=0;o<s;o++){let a=i[o],u=e[a];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(a));}}return e}function Xd(t,e){return function(r){return e(t(r))}}function ep(t,e){let r=[e[t].parent,t],n=g[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=Xd(g[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}function tp(t){let e=Qd(t),r={},n=Object.keys(e);for(let{length:i}=n,s=0;s<i;s++){let o=n[s];e[o].parent!==null&&(r[o]=ep(o,e));}return r}var k={},rp=Object.keys(g);function np(t){let e=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return "conversion"in t&&(e.conversion=t.conversion),e}function ip(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let{length:s}=i,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return "conversion"in t&&(e.conversion=t.conversion),e}for(let t of rp){k[t]={},Object.defineProperty(k[t],"channels",{value:g[t].channels}),Object.defineProperty(k[t],"labels",{value:g[t].labels});let e=tp(t),r=Object.keys(e);for(let n of r){let i=e[n];k[t][n]=ip(i),k[t][n].raw=np(i);}}var Ga=["keyword","gray","hex"],Un={};for(let t of Object.keys(k))Un[[...k[t].labels].sort().join("")]=t;var zn={};function I(t,e){if(!(this instanceof I))return new I(t,e);if(e&&e in Ga&&(e=null),e&&!(e in k))throw new Error("Unknown model: "+e);let r,n;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof I)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let i=$.get(t);if(i===null)throw new Error("Unable to parse color from string: "+t);this.model=i.model,n=k[this.model].channels,this.color=i.value.slice(0,n),this.valpha=typeof i.value[n]=="number"?i.value[n]:1;}else if(t.length>0){this.model=e||"rgb",n=k[this.model].channels;let i=Array.prototype.slice.call(t,0,n);this.color=Gn(i,n),this.valpha=typeof t[n]=="number"?t[n]:1;}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else {this.valpha=1;let i=Object.keys(t);"alpha"in t&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=i.sort().join("");if(!(s in Un))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=Un[s];let{labels:o}=k[this.model],a=[];for(r=0;r<o.length;r++)a.push(t[o[r]]);this.color=Gn(a);}if(zn[this.model])for(n=k[this.model].channels,r=0;r<n;r++){let i=zn[this.model][r];i&&(this.color[r]=i(this.color[r]));}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this);}I.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in $.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:[...e.color,this.valpha];return $.to[e.model](...r)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:[...e.color,this.valpha];return $.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=k[this.model],{labels:r}=k[this.model];for(let n=0;n<e;n++)t[r[n]]=this.color[n];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new I([...this.color.map(op(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new I([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:P("rgb",0,C(255)),green:P("rgb",1,C(255)),blue:P("rgb",2,C(255)),hue:P(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:P("hsl",1,C(100)),lightness:P("hsl",2,C(100)),saturationv:P("hsv",1,C(100)),value:P("hsv",2,C(100)),chroma:P("hcg",1,C(100)),gray:P("hcg",2,C(100)),white:P("hwb",1,C(100)),wblack:P("hwb",2,C(100)),cyan:P("cmyk",0,C(100)),magenta:P("cmyk",1,C(100)),yellow:P("cmyk",2,C(100)),black:P("cmyk",3,C(100)),x:P("xyz",0,C(95.047)),y:P("xyz",1,C(100)),z:P("xyz",2,C(108.833)),l:P("lab",0,C(100)),a:P("lab",1),b:P("lab",2),keyword(t){return t!==void 0?new I(t):k[this.model].keyword(this.color)},hex(t){return t!==void 0?new I(t):$.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new I(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),$.to.hex(...e)+r},rgbNumber(){let t=this.rgb().color;return (t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[r,n]of t.entries()){let i=n/255;e[r]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4;}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return (t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return !this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return I.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let r=t.rgb(),n=this.rgb(),i=e===void 0?.5:e,s=2*i-1,o=r.alpha()-n.alpha(),a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-a;return I.rgb(a*r.red()+u*n.red(),a*r.green()+u*n.green(),a*r.blue()+u*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(let t of Object.keys(k)){if(Ga.includes(t))continue;let{channels:e}=k[t];I.prototype[t]=function(...r){return this.model===t?new I(this):r.length>0?new I(r,t):new I([...ap(k[this.model][t].raw(this.color)),this.valpha],t)},I[t]=function(...r){let n=r[0];return typeof n=="number"&&(n=Gn(r,e)),new I(n,t)};}function sp(t,e){return Number(t.toFixed(e))}function op(t){return function(e){return sp(e,t)}}function P(t,e,r){t=Array.isArray(t)?t:[t];for(let n of t)(zn[n]||=[])[e]=r;return t=t[0],function(n){let i;return n!==void 0?(r&&(n=r(n)),i=this[t](),i.color[e]=n,i):(i=this[t]().color[e],r&&(i=r(i)),i)}}function C(t){return function(e){return Math.max(0,Math.min(t,e))}}function ap(t){return Array.isArray(t)?t:[t]}function Gn(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}function up(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lp=function(e){for(var r=0,n=0;r<e.length;n=e.charCodeAt(r++)+((n<<5)-n));var i=Math.floor(Math.abs(Math.sin(n)*1e4%1*16777216)).toString(16);return "#"+Array(6-i.length+1).join("0")+i},Wa=up(lp);function fp(t,e){let r=t.split(e||":"),n=Wa(r[0]);if(!r.length)return n;for(let i=0,s=r.length-1;i<s;i++)n=I(n).mix(I(Wa(r[i+1]))).saturate(1).hex();return n}Ya.exports=fp;});var Ja=c((Q0,Ka)=>{function Q(t,e){if(e)return new Q(t).style(e);if(!(this instanceof Q))return new Q(t);this.text=t;}Q.prototype.prefix="\x1B[";Q.prototype.suffix="m";Q.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),n=e.substring(2,4),i=e.substring(4,6);return [parseInt(r,16),parseInt(n,16),parseInt(i,16)]};Q.prototype.rgb=function(e,r,n){var i=e/255*5,s=r/255*5,o=n/255*5;return this.ansi(i,s,o)};Q.prototype.ansi=function(e,r,n){var i=Math.round(e),s=Math.round(r),o=Math.round(n);return 16+i*36+s*6+o};Q.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Q.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Ka.exports=Q;});var Qa=c((X0,Za)=>{var cp=Va(),hp=Ja();Za.exports=function(e,r){var n=r.namespace,i=r.colors!==false?hp(n+":",cp(n)):n+":";return e[0]=i+" "+e[0],e};});var eu=c((em,Xa)=>{Xa.exports=function(e,r){if(!r)return false;for(var n=r.split(/[\s,]+/),i=0;i<n.length;i++){if(r=n[i].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return false;continue}if(new RegExp("^"+r+"$").test(e))return true}return false};});var ru=c((tm,tu)=>{var dp=eu();tu.exports=function(e){return function(n){try{return dp(n,e())}catch{}return false}};});var iu=c((rm,nu)=>{var pp=ru();nu.exports=pp(function(){return process.env.DEBUG||process.env.DIAGNOSTICS});});var ou=c((nm,su)=>{su.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e);}catch{}};});var uu=c((im,au)=>{var gp=Wn(),mp=R("tty").isatty(1),mr=gp(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:mp,r.namespace=e,r.prod=false,r.dev=true,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});mr.modify(Qa());mr.use(iu());mr.set(ou());au.exports=mr;});var pt=c((sm,Yn)=>{process.env.NODE_ENV==="production"?Yn.exports=Ha():Yn.exports=uu();});var fu=c((om,lu)=>{var Vn=R("fs"),{StringDecoder:yp}=R("string_decoder"),{Stream:bp}=je();function _p(){}lu.exports=(t,e)=>{let r=Buffer.alloc(65536),n=new yp("utf8"),i=new bp,s="",o=0,a=0;return t.start===-1&&delete t.start,i.readable=true,i.destroy=()=>{i.destroyed=true,i.emit("end"),i.emit("close");},Vn.open(t.file,"a+","0644",(u,f)=>{if(u){e?e(u):i.emit("error",u),i.destroy();return}(function d(){if(i.destroyed){Vn.close(f,_p);return}return Vn.read(f,r,0,r.length,o,(p,h)=>{if(p){e?e(p):i.emit("error",p),i.destroy();return}if(!h)return s&&((t.start==null||a>t.start)&&(e?e(null,s):i.emit("line",s)),a++,s=""),setTimeout(d,1e3);let y=n.write(r.slice(0,h));e||i.emit("data",y),y=(s+y).split(/\n+/);let l=y.length-1,m=0;for(;m<l;m++)(t.start==null||a>t.start)&&(e?e(null,y[m]):i.emit("line",y[m])),a++;return s=y[l],o+=h,d()})})();}),e?i.destroy:i};});var pu=c((um,du)=>{var Y=R("fs"),F=R("path"),cu=qa(),vp=R("zlib"),{MESSAGE:wp}=D(),{Stream:Ep,PassThrough:hu}=je(),Sp=We(),X=pt()("winston:file"),xp=R("os"),Mp=fu();du.exports=class extends Sp{constructor(e={}){super(e),this.name=e.name||"file";function r(n,...i){i.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${n} together`)});}if(this._stream=new hu,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?F.basename(e.filename):"winston.log",this.dirname=e.dirname||F.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=F.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||false,this.zippedArchive=e.zippedArchive||false,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:xp.EOL,this.tailable=e.tailable||false,this.lazy=e.lazy||false,this._size=0,this._pendingSize=0,this._created=0,this._drain=false,this._opening=false,this._ending=false,this._fileExist=false,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())));}_final(e){if(this._opening){this.once("open",()=>this._final(e));return}if(this._stream.end(),!this._dest||this._dest.writableFinished)return e();this._dest.once("finish",e),this._dest.once("error",e);}log(e,r=()=>{}){if(this.silent)return r(),true;if(this._drain){this._stream.once("drain",()=>{this._drain=false,this.log(e,r);});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=false,this.log(e,r);});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=true,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 n=`${e[wp]}${this.eol}`,i=Buffer.byteLength(n);function s(){if(this._size+=i,this._pendingSize-=i,X("logged %s %s",this._size,n),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed");});return}this._rotate=true,this._endStream(()=>this._rotateFile());}}this._pendingSize+=i,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=true);let o=this._stream.write(n,s.bind(this));return o?r():(this._drain=true,this._stream.once("drain",()=>{this._drain=false,r();})),X("written",o,this._drain),this.finishIfEnding(),o}query(e,r){typeof e=="function"&&(r=e,e={}),e=p(e);let n=F.join(this.dirname,this.filename),i="",s=[],o=0,a=Y.createReadStream(n,{encoding:"utf8"});a.on("error",h=>{if(a.readable&&a.destroy(),!!r)return h.code!=="ENOENT"?r(h):r(null,s)}),a.on("data",h=>{h=(i+h).split(/\n+/);let y=h.length-1,l=0;for(;l<y;l++)(!e.start||o>=e.start)&&u(h[l]),o++;i=h[y];}),a.on("close",()=>{i&&u(i,true),e.order==="desc"&&(s=s.reverse()),r&&r(null,s);});function u(h,y){try{let l=JSON.parse(h);d(l)&&f(l);}catch(l){y||a.emit("error",l);}}function f(h){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){a.readable&&a.destroy();return}e.fields&&(h=e.fields.reduce((y,l)=>(y[l]=h[l],y),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(h);}function d(h){if(!h||typeof h!="object")return;let y=new Date(h.timestamp);if(!(e.from&&y<e.from||e.until&&y>e.until||e.level&&e.level!==h.level))return true}function p(h){return h=h||{},h.rows=h.rows||h.limit||10,h.start=h.start||0,h.until=h.until||new Date,typeof h.until!="object"&&(h.until=new Date(h.until)),h.from=h.from||h.until-1440*60*1e3,typeof h.from!="object"&&(h.from=new Date(h.from)),h.order=h.order||"desc",h}}stream(e={}){let r=F.join(this.dirname,this.filename),n=new Ep,i={file:r,start:e.start};return n.destroy=Mp(i,(s,o)=>{if(s)return n.emit("error",s);try{n.emit("data",o),o=JSON.parse(o),n.emit("log",o);}catch(a){n.emit("error",a);}}),n}open(){this.filename&&(this._opening||(this._opening=true,this.stat((e,r)=>{if(e)return this.emit("error",e);X("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=false,this.once("open",()=>{this._stream.emit("rotate")||(this._rotate=false);});})));}stat(e){let r=this._getFile(),n=F.join(this.dirname,r);Y.stat(n,(i,s)=>{if(i&&i.code==="ENOENT")return X("ENOENT\xA0ok",n),this.filename=r,e(null,0);if(i)return X(`err ${i.code} ${n}`),e(i);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=F.join(this.dirname,this.filename);X("create stream start",r,this.options);let n=Y.createWriteStream(r,this.options).on("error",i=>X(i)).on("close",()=>X("close",n.path,n.bytesWritten)).on("open",()=>{X("file open ok",r),this.emit("open",r),e.pipe(n),this.rotatedWhileOpening&&(this._stream=new hu,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=false,this._cleanupStream(n),e.end());});return X("create stream ok",r),n}_incFile(e){X("_incFile",this.filename);let r=F.extname(this._basename),n=F.basename(this._basename,r),i=[];this.zippedArchive&&i.push(function(s){let o=this._created>0&&!this.tailable?this._created:"";this._compressFile(F.join(this.dirname,`${n}${o}${r}`),F.join(this.dirname,`${n}${o}${r}.gz`),s);}.bind(this)),i.push(function(s){this.tailable?this._checkMaxFilesTailable(r,n,s):(this._created+=1,this._checkMaxFilesIncrementing(r,n,s));}.bind(this)),cu(i,e);}_getFile(){let e=F.extname(this._basename),r=F.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created;return !this.tailable&&this._created?`${r}${n}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);let i=this._created-this.maxFiles,s=i!==0?i:"",o=this.zippedArchive?".gz":"",a=`${r}${s}${e}${o}`,u=F.join(this.dirname,a);Y.unlink(u,n);}_checkMaxFilesTailable(e,r,n){let i=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let o=this.maxFiles-1;o>1;o--)i.push(function(a,u){let f=`${r}${a-1}${e}${s}`,d=F.join(this.dirname,f);Y.exists(d,p=>{if(!p)return u(null);f=`${r}${a}${e}${s}`,Y.rename(d,F.join(this.dirname,f),u);});}.bind(this,o));cu(i,()=>{Y.rename(F.join(this.dirname,`${r}${e}${s}`),F.join(this.dirname,`${r}1${e}${s}`),n);});}_compressFile(e,r,n){Y.access(e,Y.F_OK,i=>{if(i)return n();var s=vp.createGzip(),o=Y.createReadStream(e),a=Y.createWriteStream(r);a.on("finish",()=>{Y.unlink(e,n);}),o.pipe(s).pipe(a);});}_createLogDirIfNotExist(e){Y.existsSync(e)||Y.mkdirSync(e,{recursive:true});}};});var mu=c((fm,gu)=>{var Op=R("http"),Rp=R("https"),{Stream:qp}=je(),Tp=We(),{configure:Ap}=Ze();gu.exports=class extends Tp{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||false,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,(n,i)=>{i&&i.statusCode!==200&&(n=new Error(`Invalid HTTP Status Code: ${i.statusCode}`)),n?this.emit("warn",n):this.emit("logged",e);}),r&&setImmediate(r);}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let n=e.params.auth||null;delete e.params.auth;let i=e.params.path||null;delete e.params.path,this._request(e,n,i,(s,o,a)=>{if(o&&o.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${o.statusCode}`)),s)return r(s);if(typeof a=="string")try{a=JSON.parse(a);}catch(u){return r(u)}r(null,a);});}stream(e={}){let r=new qp;e={method:"stream",params:e};let n=e.params.path||null;delete e.params.path;let i=e.params.auth||null;delete e.params.auth;let s="",o=this._request(e,i,n);return r.destroy=()=>o.destroy(),o.on("data",a=>{a=(s+a).split(/\n+/);let u=a.length-1,f=0;for(;f<u;f++)try{r.emit("log",JSON.parse(a[f]));}catch(d){r.emit("error",d);}s=a[u];}),o.on("error",a=>r.emit("error",a)),r}_request(e,r,n,i){e=e||{},r=r||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,i,r,n):this._doRequest(e,i,r,n);}_doBatch(e,r,n,i){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,n,i);},this.batchInterval);}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,i);}_doBatchRequest(e,r,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,e,r,n);}_doRequest(e,r,n,i){let s=Object.assign({},this.headers);n&&n.bearer&&(s.Authorization=`Bearer ${n.bearer}`);let o=(this.ssl?Rp:Op).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${i.replace(/^\//,"")}`,headers:s,auth:n&&n.username&&n.password?`${n.username}:${n.password}`:"",agent:this.agent});o.on("error",r),o.on("response",u=>u.on("end",()=>r(null,u)).resume());let a=Ap({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});o.end(Buffer.from(a(e,this.options.replacer),"utf8"));}};});var Kn=c((cm,yu)=>{var se=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";se.writable=t=>se(t)&&t.writable!==false&&typeof t._write=="function"&&typeof t._writableState=="object";se.readable=t=>se(t)&&t.readable!==false&&typeof t._read=="function"&&typeof t._readableState=="object";se.duplex=t=>se.writable(t)&&se.readable(t);se.transform=t=>se.duplex(t)&&typeof t._transform=="function";yu.exports=se;});var _u=c((dm,bu)=>{var Lp=Kn(),{MESSAGE:jp}=D(),Np=R("os"),Pp=We();bu.exports=class extends Pp{constructor(e={}){if(super(e),!e.stream||!Lp(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:Np.EOL;}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[jp]}${this.eol}`),r&&r();}};});var vu=c(gt=>{Object.defineProperty(gt,"Console",{configurable:true,enumerable:true,get(){return Go()}});Object.defineProperty(gt,"File",{configurable:true,enumerable:true,get(){return pu()}});Object.defineProperty(gt,"Http",{configurable:true,enumerable:true,get(){return mu()}});Object.defineProperty(gt,"Stream",{configurable:true,enumerable:true,get(){return _u()}});});var br=c(mt=>{var yr=Jr(),{configs:Jn}=D();mt.cli=yr.levels(Jn.cli);mt.npm=yr.levels(Jn.npm);mt.syslog=yr.levels(Jn.syslog);mt.addColors=yr.levels;});var Eu=c((_r,wu)=>{Object.defineProperty(_r,"__esModule",{value:true});var Dp=Zt(),Cp=Ne(Dp),Ip=ar(),$p=Ne(Ip),kp=Pn(),Fp=Ne(kp),Bp=Ln(),Hp=Ne(Bp),Wp=jn(),Up=Ne(Wp),zp=Le(),Gp=Ne(zp),Yp=ze(),Vp=Ne(Yp);function Ne(t){return t&&t.__esModule?t:{default:t}}function Kp(t,e,r){r=(0, Hp.default)(r);var n=0,i=0,{length:s}=t,o=false;s===0&&r(null);function a(u,f){u===false&&(o=true),o!==true&&(u?r(u):(++i===s||f===$p.default)&&r(null));}for(;n<s;n++)e(t[n],n,(0, Up.default)(a));}function Jp(t,e,r){return (0, Fp.default)(t,1/0,e,r)}function Zp(t,e,r){var n=(0, Cp.default)(t)?Kp:Jp;return n(t,(0, Gp.default)(e),r)}_r.default=(0, Vp.default)(Zp,3);wu.exports=_r.default;});var xu=c((vr,Su)=>{Object.defineProperty(vr,"__esModule",{value:true});vr.default=Qp;function Qp(t){return (e,r,n)=>t(e,n)}Su.exports=vr.default;});var Sr=c((Er,Mu)=>{Object.defineProperty(Er,"__esModule",{value:true});var Xp=Eu(),eg=wr(Xp),tg=xu(),rg=wr(tg),ng=Le(),ig=wr(ng),sg=ze(),og=wr(sg);function wr(t){return t&&t.__esModule?t:{default:t}}function ag(t,e,r){return (0, eg.default)(t,(0, rg.default)((0, ig.default)(e)),r)}Er.default=(0, og.default)(ag,3);Mu.exports=Er.default;});var Ru=c((mm,Ou)=>{var ug=Object.prototype.toString;Ou.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(),n=ug.call(e).slice(8,-1);return n==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=n,r||"anonymous"};});var Zn=c((ym,qu)=>{var lg=Ru();qu.exports=function(e){var r=0,n;function i(){return r||(r=1,n=e.apply(this,arguments),e=null),n}return i.displayName=lg(e),i};});var Qn=c(bt=>{bt.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},n=Error.prepareStackTrace;Error.prepareStackTrace=function(s,o){return o},Error.captureStackTrace(r,t||bt.get);var i=r.stack;return Error.prepareStackTrace=n,Error.stackTraceLimit=e,i};bt.parse=function(t){if(!t.stack)return [];var e=this,r=t.stack.split(`
27
+ `).slice(1);return r.map(function(n){if(n.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:n,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var i=n.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(i){var s=null,o=null,a=null,u=null,f=null,d=i[5]==="native";if(i[1]){a=i[1];var p=a.lastIndexOf(".");if(a[p-1]=="."&&p--,p>0){s=a.substr(0,p),o=a.substr(p+1);var h=s.indexOf(".Module");h>0&&(a=a.substr(h+1),s=s.substr(0,h));}u=null;}o&&(u=s,f=o),o==="<anonymous>"&&(f=null,a=null);var y={fileName:i[2]||null,lineNumber:parseInt(i[3],10)||null,functionName:a,typeName:u,methodName:f,columnNumber:parseInt(i[4],10)||null,native:d};return e._createParsedCallSite(y)}}).filter(function(n){return !!n})};function yt(t){for(var e in t)this[e]=t[e];}var fg=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],cg=["topLevel","eval","native","constructor"];fg.forEach(function(t){yt.prototype[t]=null,yt.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]};});cg.forEach(function(t){yt.prototype[t]=false,yt.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]};});bt._createParsedCallSite=function(t){return new yt(t)};});var Au=c((vm,Tu)=>{var{Writable:hg}=je();Tu.exports=class extends hg{constructor(e){if(super({objectMode:true}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=true,this.transport=e;}_write(e,r,n){return e.exception?this.transport.log(e,n):(n(),true)}};});var ei=c((Em,Nu)=>{var Lu=R("os"),dg=Sr(),Xn=pt()("winston:exception"),pg=Zn(),ju=Qn(),gg=Au();Nu.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(n=>this._addHandler(n));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=false,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(`
28
+ `),stack:e&&e.stack,exception:true,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:Lu.loadavg(),uptime:Lu.uptime()}}getTrace(e){return (e?ju.parse(e):ju.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=true;let r=new gg(e);this.handlers.set(e,r),this.logger.pipe(r);}}_uncaughtException(e){let r=this.getAllInfo(e),n=this._getExceptionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),i=false);function o(){Xn("doExit",i),Xn("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1));}if(!n||n.length===0)return process.nextTick(o);dg(n,(a,u)=>{let f=pg(u),d=a.transport||a;function p(h){return ()=>{Xn(h),f();}}d._ending=true,d.once("finish",p("finished")),d.once("error",p("error"));},()=>i&&o()),this.logger.log(r),i&&(s=setTimeout(o,3e3));}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}};});var Du=c((xm,Pu)=>{var{Writable:mg}=je();Pu.exports=class extends mg{constructor(e){if(super({objectMode:true}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=true,this.transport=e;}_write(e,r,n){return e.rejection?this.transport.log(e,n):(n(),true)}};});var ri=c((Om,$u)=>{var Cu=R("os"),yg=Sr(),ti=pt()("winston:rejection"),bg=Zn(),Iu=Qn(),_g=Du();$u.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(n=>this._addHandler(n));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=false,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(`
29
+ `),stack:e&&e.stack,rejection:true,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:Cu.loadavg(),uptime:Cu.uptime()}}getTrace(e){return (e?Iu.parse(e):Iu.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=true;let r=new _g(e);this.handlers.set(e,r),this.logger.pipe(r);}}_unhandledRejection(e){let r=this.getAllInfo(e),n=this._getRejectionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),i=false);function o(){ti("doExit",i),ti("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1));}if(!n||n.length===0)return process.nextTick(o);yg(n,(a,u)=>{let f=bg(u),d=a.transport||a;function p(h){return ()=>{ti(h),f();}}d._ending=true,d.once("finish",p("finished")),d.once("error",p("error"));},()=>i&&o()),this.logger.log(r),i&&(s=setTimeout(o,3e3));}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}};});var Fu=c((Rm,ku)=>{var ni=class{constructor(e){let r=xr();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)}};ku.exports=ni;});var xr=c((qm,Uu)=>{var{Stream:vg,Transform:wg}=je(),Bu=Sr(),{LEVEL:oe,SPLAT:Hu}=D(),Wu=Kn(),Eg=ei(),Sg=ri(),xg=qn(),Mg=Fu(),{warn:Og}=Zr(),Rg=br(),qg=/%[scdjifoO%]/g,Mr=class extends wg{constructor(e){super({objectMode:true}),this.configure(e);}child(e){let r=this;return Object.create(r,{write:{value:function(n){let i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message,i.cause=n.cause),r.write(i);}}})}configure({silent:e,format:r,defaultMeta:n,levels:i,level:s="info",exitOnError:o=true,transports:a,colors:u,emitErrs:f,formatters:d,padLevels:p,rewriters:h,stripColors:y,exceptionHandlers:l,rejectionHandlers:m}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||Ur()(),this.defaultMeta=n||null,this.levels=i||this.levels||Rg.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new Eg(this),this.rejections=new Sg(this),this.profilers={},this.exitOnError=o,a&&(a=Array.isArray(a)?a:[a],a.forEach(b=>this.add(b))),u||f||d||p||h||y)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(`
30
+ `));l&&this.exceptions.handle(l),m&&this.rejections.handle(m);}getHighestLogLevel(){let e=_t(this.levels,this.level);return !this.transports||this.transports.length===0?e:this.transports.reduce((r,n)=>{let i=_t(this.levels,n.level);return i!==null&&i>r?i:r},e)}isLevelEnabled(e){let r=_t(this.levels,e);if(r===null)return false;let n=_t(this.levels,this.level);return n===null?false:!this.transports||this.transports.length===0?n>=r:this.transports.findIndex(s=>{let o=_t(this.levels,s.level);return o===null&&(o=n),o>=r})!==-1}log(e,r,...n){if(arguments.length===1)return e[oe]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[oe]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[oe]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[i]=n;if(typeof i=="object"&&i!==null&&!(r&&r.match&&r.match(qg))){let o=Object.assign({},this.defaultMeta,i,{[oe]:e,[Hu]:n,level:e,message:r});return i.message&&(o.message=`${o.message} ${i.message}`),i.stack&&(o.stack=i.stack),i.cause&&(o.cause=i.cause),this.write(o),this}return this.write(Object.assign({},this.defaultMeta,{[oe]:e,[Hu]:n,level:e,message:r})),this}_transform(e,r,n){if(this.silent)return n();e[oe]||(e[oe]=e.level),!this.levels[e[oe]]&&this.levels[e[oe]]!==0&&console.error("[winston] Unknown logger level: %s",e[oe]),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=false,n();}}_final(e){let r=this.transports.slice();Bu(r,(n,i)=>{if(!n||n.finished)return setImmediate(i);n.once("finish",i),n.end();},e);}add(e){let r=!Wu(e)||e.log.length>2?new xg({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 (!Wu(e)||e.log.length>2)&&(r=this.transports.filter(n=>n.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(){Og.deprecated("setLevels");}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let n={},i=Object.assign({},e.query||{});function s(a,u){e.query&&typeof a.formatQuery=="function"&&(e.query=a.formatQuery(i)),a.query(e,(f,d)=>{if(f)return u(f);typeof a.formatResults=="function"&&(d=a.formatResults(d,e.format)),u(null,d);});}function o(a,u){s(a,(f,d)=>{u&&(d=f||d,d&&(n[a.name]=d),u()),u=null;});}Bu(this.transports.filter(a=>!!a.query),o,()=>r(null,n));}stream(e={}){let r=new vg,n=[];return r._streams=n,r.destroy=()=>{let i=n.length;for(;i--;)n[i].destroy();},this.transports.filter(i=>!!i.stream).forEach(i=>{let s=i.stream(e);s&&(n.push(s),s.on("log",o=>{o.transport=o.transport||[],o.transport.push(i.name),r.emit("log",o);}),s.on("error",o=>{o.transport=o.transport||[],o.transport.push(i.name),r.emit("error",o);}));}),r}startTimer(){return new Mg(this)}profile(e,...r){let n=Date.now();if(this.profilers[e]){let i=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=n-i,s.message=s.message||e,this.write(s)}return this.profilers[e]=n,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(`
31
+ `))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r);}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]));}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta);}};function _t(t,e){let r=t[e];return !r&&r!==0?null:r}Object.defineProperty(Mr.prototype,"transports",{configurable:false,enumerable:true,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Uu.exports=Mr;});var ii=c((Tm,zu)=>{var{LEVEL:Tg}=D(),Ag=br(),Lg=xr(),jg=pt()("winston:create-logger");function Ng(t){return "is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}zu.exports=function(t={}){t.levels=t.levels||Ag.npm.levels;class e extends Lg{constructor(i){super(i);}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(jg('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let s=this||r;if(i.length===1){let[o]=i,a=o&&o.message&&o||{message:o};return a.level=a[Tg]=n,s._addDefaultMeta(a),s.write(a),this||r}return i.length===0?(s.log(n,""),s):s.log(n,...i)},e.prototype[Ng(n)]=function(){return (this||r).isLevelEnabled(n)};}),r};});var Yu=c((Lm,Gu)=>{var Pg=ii();Gu.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 n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=Pg(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i);}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,n)=>this._removeLogger(n));}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e);}_delete(e){this.loggers.delete(e);}};});var Ku=c(A=>{var Vu=Jr(),{warn:vt}=Zr();A.version=Ws().version;A.transports=vu();A.config=br();A.addColors=Vu.levels;A.format=Vu.format;A.createLogger=ii();A.Logger=xr();A.ExceptionHandler=ei();A.RejectionHandler=ri();A.Container=Yu();A.Transport=We();A.loggers=new A.Container;var ae=A.createLogger();Object.keys(A.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>A[t]=(...e)=>ae[t](...e));Object.defineProperty(A,"level",{get(){return ae.level},set(t){ae.level=t;}});Object.defineProperty(A,"exceptions",{get(){return ae.exceptions}});Object.defineProperty(A,"rejections",{get(){return ae.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(A,t,{get(){return ae[t]},set(e){ae[t]=e;}});});Object.defineProperty(A,"default",{get(){return {exceptionHandlers:ae.exceptionHandlers,rejectionHandlers:ae.rejectionHandlers,transports:ae.transports}}});vt.deprecated(A,"setLevels");vt.forFunctions(A,"useFormat",["cli"]);vt.forProperties(A,"useFormat",["padLevels","stripColors"]);vt.forFunctions(A,"deprecated",["addRewriter","addFilter","clone","extend"]);vt.forProperties(A,"deprecated",["emitErrs","levelLength"]);});al(Ku());var Dm=t=>new Promise(e=>setTimeout(e,t)),Ju=class extends Error{constructor(e,r){super(e,r),this.name="InputError";}},Zu=class extends Error{constructor(e,r){super(e,r),this.name="RuntimeError";}},Qu=class extends Error{constructor(e,r){super(e,r),this.name="SettingsError";}},Xu=class extends Error{status;message;originalError;constructor(e,r,n=void 0){super(r),this.status=e,this.message=r,this.originalError=n;}getStatusCode(){return this.status}getMessage(){return this.message}},Cg=t=>{if(t instanceof Error)return t.message;if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}},Cm=async(t,e,r=true,n="")=>(e.info(`${n!==""?n+" ":""}Executing: '${t}'`),new Promise((i,s)=>{child_process.exec(t,(o,a,u)=>{o&&(r&&e.error(`Error with command: ${t}. ${Cg(o)}`),s(o)),i(a);});}));exports.HTTPError=Xu;exports.InputError=Ju;exports.RuntimeError=Zu;exports.SettingsError=Qu;exports.executeCommand=Cm;exports.parseError=Cg;exports.sleep=Dm;//# sourceMappingURL=index.cjs.map
61
32
  //# sourceMappingURL=index.cjs.map