@mcp-com-ai/shared-utils 1.1.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +121 -121
- package/dist/logger.js +32 -32
- package/dist/workspace.d.ts +54 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,190 +1,190 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var gv=Object.create;var{getPrototypeOf:yv,defineProperty:tf,getOwnPropertyNames:bv}=Object;var rf=Object.prototype.hasOwnProperty;function wv(e){return this[e]}var _v,vv,za=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var i=t?_v??=new WeakMap:vv??=new WeakMap,a=i.get(e);if(a)return a}r=e!=null?gv(yv(e)):{};let l=t||!e||!e.__esModule||!rf.call(e,"default")?tf(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let u of bv(e))if(!rf.call(l,u))tf(l,u,{get:wv.bind(e,u),enumerable:!0})}if(n)i.set(e,l);return l};var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var W=import.meta.require;var Ie=v(function(WC,gf){class to extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
3
3
|
Found: ${e.toString().split(`
|
|
4
4
|
`)[0]}
|
|
5
|
-
`);Error.captureStackTrace(this,
|
|
6
|
-
`)!=-1,n=this._styles,
|
|
7
|
-
`));return!0}
|
|
5
|
+
`);Error.captureStackTrace(this,to)}}gf.exports=(e)=>{if(e.length>2)throw new to(e);function t(n={}){this.options=n}t.prototype.transform=e;function r(n){return new t(n)}return r.Format=t,r}});var _f=v(function(UC,wf){var bf={};wf.exports=bf;var yf={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(yf).forEach(function(e){var t=yf[e],r=bf[e]=[];r.open="\x1B["+t[0]+"m",r.close="\x1B["+t[1]+"m"})});var Sf=v(function(HC,vf){vf.exports=function(e,t){t=t||process.argv||[];var r=t.indexOf("--"),n=/^-{1,2}/.test(e)?"":"--",i=t.indexOf(n+e);return i!==-1&&(r===-1?!0:i<r)}});var xf=v(function(VC,kf){var Bv=W("os"),Qe=Sf(),qe=process.env,$r=void 0;if(Qe("no-color")||Qe("no-colors")||Qe("color=false"))$r=!1;else if(Qe("color")||Qe("colors")||Qe("color=true")||Qe("color=always"))$r=!0;if("FORCE_COLOR"in qe)$r=qe.FORCE_COLOR.length===0||parseInt(qe.FORCE_COLOR,10)!==0;function Wv(e){if(e===0)return!1;return{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Uv(e){if($r===!1)return 0;if(Qe("color=16m")||Qe("color=full")||Qe("color=truecolor"))return 3;if(Qe("color=256"))return 2;if(e&&!e.isTTY&&$r!==!0)return 0;var t=$r?1:0;if(process.platform==="win32"){var r=Bv.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586)return Number(r[2])>=14931?3:2;return 1}if("CI"in qe){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(i){return i in qe})||qe.CI_NAME==="codeship")return 1;return t}if("TEAMCITY_VERSION"in qe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(qe.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in qe){var n=parseInt((qe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(qe.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(qe.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(qe.TERM))return 1;if("COLORTERM"in qe)return 1;if(qe.TERM==="dumb")return t;return t}function ro(e){var t=Uv(e);return Wv(t)}kf.exports={supportsColor:ro,stdout:ro(process.stdout),stderr:ro(process.stderr)}});var Of=v(function(GC,Ef){Ef.exports=function(t,r){var n="";t=t||"Run the trap, drop the bass",t=t.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 t.forEach(function(a){a=a.toLowerCase();var l=i[a]||[" "],u=Math.floor(Math.random()*l.length);if(typeof i[a]<"u")n+=i[a][u];else n+=a}),n}});var Tf=v(function(KC,Mf){Mf.exports=function(t,r){t=t||" 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 a(h){var d=Math.floor(Math.random()*h);return d}function l(h){var d=!1;return i.filter(function(b){d=b===h}),d}function u(h,d){var b="",m,g;d=d||{},d.up=typeof d.up<"u"?d.up:!0,d.mid=typeof d.mid<"u"?d.mid:!0,d.down=typeof d.down<"u"?d.down:!0,d.size=typeof d.size<"u"?d.size:"maxi",h=h.split("");for(g in h){if(l(g))continue;switch(b=b+h[g],m={up:0,down:0,mid:0},d.size){case"mini":m.up=a(8),m.mid=a(2),m.down=a(8);break;case"maxi":m.up=a(16)+3,m.mid=a(4)+1,m.down=a(64)+3;break;default:m.up=a(8)+1,m.mid=a(6)/2,m.down=a(8)+1;break}var S=["up","mid","down"];for(var y in S){var _=S[y];for(var k=0;k<=m[_];k++)if(d[_])b=b+n[_][a(n[_].length)]}}return b}return u(t,r)}});var Af=v(function(zC,Nf){Nf.exports=function(e){return function(t,r,n){if(t===" ")return t;switch(r%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}});var Lf=v(function(JC,Df){Df.exports=function(e){return function(t,r,n){return r%2===0?t:e.inverse(t)}}});var Pf=v(function(QC,qf){qf.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(r,n,i){if(r===" ")return r;else return e[t[n++%t.length]](r)}}});var Cf=v(function(ZC,Rf){Rf.exports=function(e){var t=["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:e[t[Math.round(Math.random()*(t.length-2))]](r)}}});var Yf=v(function(e5,$f){var K={};$f.exports=K;K.themes={};var Hv=W("util"),rr=K.styles=_f(),If=Object.defineProperties,Vv=new RegExp(/[\r\n]+/g);K.supportsColor=xf().supportsColor;if(typeof K.enabled>"u")K.enabled=K.supportsColor()!==!1;K.enable=function(){K.enabled=!0};K.disable=function(){K.enabled=!1};K.stripColors=K.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var XC=K.stylize=function(t,r){if(!K.enabled)return t+"";var n=rr[r];if(!n&&r in K)return K[r](t);return n.open+t+n.close},Gv=/[|\\{}()[\]^$+*?.]/g,Kv=function(e){if(typeof e!=="string")throw TypeError("Expected a string");return e.replace(Gv,"\\$&")};function Ff(e){var t=function r(){return Jv.apply(r,arguments)};return t._styles=e,t.__proto__=zv,t}var jf=function(){var e={};return rr.grey=rr.gray,Object.keys(rr).forEach(function(t){rr[t].closeRe=new RegExp(Kv(rr[t].close),"g"),e[t]={get:function(){return Ff(this._styles.concat(t))}}}),e}(),zv=If(function(){},jf);function Jv(){var e=Array.prototype.slice.call(arguments),t=e.map(function(l){if(l!=null&&l.constructor===String)return l;else return Hv.inspect(l)}).join(" ");if(!K.enabled||!t)return t;var r=t.indexOf(`
|
|
6
|
+
`)!=-1,n=this._styles,i=n.length;while(i--){var a=rr[n[i]];if(t=a.open+t.replace(a.closeRe,a.open)+a.close,r)t=t.replace(Vv,function(l){return a.close+l+a.open})}return t}K.setTheme=function(e){if(typeof e==="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 t in e)(function(r){K[r]=function(n){if(typeof e[r]==="object"){var i=n;for(var a in e[r])i=K[e[r][a]](i);return i}return K[e[r]](n)}})(t)};function Qv(){var e={};return Object.keys(jf).forEach(function(t){e[t]={get:function(){return Ff([t])}}}),e}var Zv=function(t,r){var n=r.split("");return n=n.map(t),n.join("")};K.trap=Of();K.zalgo=Tf();K.maps={};K.maps.america=Af()(K);K.maps.zebra=Lf()(K);K.maps.rainbow=Pf()(K);K.maps.random=Cf()(K);for(no in K.maps)(function(e){K[e]=function(t){return Zv(K.maps[e],t)}})(no);var no;If(K,Qv())});var io=v(function(t5,Bf){var Xv=Yf();Bf.exports=Xv});var Wf=v(function(e1){e1.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};e1.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var Uf=v(function(n1){n1.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};n1.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var Hf=v(function(a1){a1.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};a1.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var Vf=v(function(Ji){Object.defineProperty(Ji,"cli",{value:Wf()});Object.defineProperty(Ji,"npm",{value:Uf()});Object.defineProperty(Ji,"syslog",{value:Hf()})});var pe=v(function(An){Object.defineProperty(An,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(An,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(An,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(An,"configs",{value:Vf()})});var Zi=v(function(o5,Qi){var oo=io(),{LEVEL:so,MESSAGE:ao}=pe();oo.enabled=!0;var Gf=/\s+/;class Ze{constructor(e={}){if(e.colors)this.addColors(e.colors);this.options=e}static addColors(e){let t=Object.keys(e).reduce((r,n)=>(r[n]=Gf.test(e[n])?e[n].split(Gf):e[n],r),{});return Ze.allColors=Object.assign({},Ze.allColors||{},t),Ze.allColors}addColors(e){return Ze.addColors(e)}colorize(e,t,r){if(typeof r>"u")r=t;if(!Array.isArray(Ze.allColors[e]))return oo[Ze.allColors[e]](r);for(let n=0,i=Ze.allColors[e].length;n<i;n++)r=oo[Ze.allColors[e][n]](r);return r}transform(e,t){if(t.all&&typeof e[ao]==="string")e[ao]=this.colorize(e[so],e.level,e[ao]);if(t.level||t.all||!t.message)e.level=this.colorize(e[so],e.level);if(t.all||t.message)e.message=this.colorize(e[so],e.level,e.message);return e}}Qi.exports=(e)=>new Ze(e);Qi.exports.Colorizer=Qi.exports.Format=Ze});var zf=v(function(l5,Kf){var{Colorizer:u1}=Zi();Kf.exports=(e)=>(u1.addColors(e.colors||e),e)});var Qf=v(function(u5,Jf){var c1=Ie();Jf.exports=c1((e)=>(e.message=` ${e.message}`,e))});var eh=v(function(c5,Xf){var f1=Ie(),{LEVEL:Zf,MESSAGE:lo}=pe();Xf.exports=f1((e,{stack:t,cause:r})=>{if(e instanceof Error){let i=Object.assign({},e,{level:e.level,[Zf]:e[Zf]||e.level,message:e.message,[lo]:e[lo]||e.message});if(t)i.stack=e.stack;if(r)i.cause=e.cause;return i}if(!(e.message instanceof Error))return e;let n=e.message;if(Object.assign(e,n),e.message=n.message,e[lo]=n.message,t)e.stack=n.stack;if(r)e.cause=n.cause;return e})});var co=v(function(f5,Xi){var{configs:h1,LEVEL:th,MESSAGE:uo}=pe();class Yr{constructor(e={levels:h1.npm.levels}){this.paddings=Yr.paddingForLevels(e.levels,e.filler),this.options=e}static getLongestLevel(e){let t=Object.keys(e).map((r)=>r.length);return Math.max(...t)}static paddingForLevel(e,t,r){let n=r+1-e.length,i=Math.floor(n/t.length);return`${t}${t.repeat(i)}`.slice(0,n)}static paddingForLevels(e,t=" "){let r=Yr.getLongestLevel(e);return Object.keys(e).reduce((n,i)=>(n[i]=Yr.paddingForLevel(i,t,r),n),{})}transform(e,t){if(e.message=`${this.paddings[e[th]]}${e.message}`,e[uo])e[uo]=`${this.paddings[e[th]]}${e[uo]}`;return e}}Xi.exports=(e)=>new Yr(e);Xi.exports.Padder=Xi.exports.Format=Yr});var rh=v(function(h5,ho){var{Colorizer:d1}=Zi(),{Padder:p1}=co(),{configs:m1,MESSAGE:g1}=pe();class fo{constructor(e={}){if(!e.levels)e.levels=m1.cli.levels;this.colorizer=new d1(e),this.padder=new p1(e),this.options=e}transform(e,t){return this.colorizer.transform(this.padder.transform(e,t),t),e[g1]=`${e.level}:${e.message}`,e}}ho.exports=(e)=>new fo(e);ho.exports.Format=fo});var ih=v(function(d5,po){var y1=Ie();function nh(e){if(!e.every(b1))return;return(t)=>{let r=t;for(let n=0;n<e.length;n++)if(r=e[n].transform(r,e[n].options),!r)return!1;return r}}function b1(e){if(typeof e.transform!=="function")throw Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
|
|
7
|
+
`));return!0}po.exports=(...e)=>{let t=y1(nh(e)),r=t();return r.Format=t.Format,r};po.exports.cascade=nh});var Ln=v(function(p5,oh){var{hasOwnProperty:Dn}=Object.prototype,ir=yo();ir.configure=yo;ir.stringify=ir;ir.default=ir;p5.stringify=ir;p5.configure=yo;oh.exports=ir;var w1=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Pt(e){if(e.length<5000&&!w1.test(e))return`"${e}"`;return JSON.stringify(e)}function mo(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let n=e[r],i=r;while(i!==0&&e[i-1]>n)e[i]=e[i-1],i--;e[i]=n}return e}var _1=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function go(e){return _1.call(e)!==void 0&&e.length!==0}function sh(e,t,r){if(e.length<r)r=e.length;let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let a=1;a<r;a++)i+=`${t}"${a}":${n}${e[a]}`;return i}function v1(e){if(Dn.call(e,"circularValue")){let t=e.circularValue;if(typeof t==="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw TypeError("Converting circular structure to JSON")}};throw TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function S1(e){let t;if(Dn.call(e,"deterministic")){if(t=e.deterministic,typeof t!=="boolean"&&typeof t!=="function")throw TypeError('The "deterministic" argument must be of type boolean or comparator function')}return t===void 0?!0:t}function k1(e,t){let r;if(Dn.call(e,t)){if(r=e[t],typeof r!=="boolean")throw TypeError(`The "${t}" argument must be of type boolean`)}return r===void 0?!0:r}function ah(e,t){let r;if(Dn.call(e,t)){if(r=e[t],typeof r!=="number")throw TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw TypeError(`The "${t}" argument must be an integer`);if(r<1)throw RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function nr(e){if(e===1)return"1 item";return`${e} items`}function x1(e){let t=new Set;for(let r of e)if(typeof r==="string"||typeof r==="number")t.add(String(r));return t}function E1(e){if(Dn.call(e,"strict")){let t=e.strict;if(typeof t!=="boolean")throw TypeError('The "strict" argument must be of type boolean');if(t)return(r)=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;if(typeof r!=="function")n+=` (${r.toString()})`;throw Error(n)}}}function yo(e){e={...e};let t=E1(e);if(t){if(e.bigint===void 0)e.bigint=!1;if(!("circularValue"in e))e.circularValue=Error}let r=v1(e),n=k1(e,"bigint"),i=S1(e),a=typeof i==="function"?i:void 0,l=ah(e,"maximumDepth"),u=ah(e,"maximumBreadth");function h(S,y,_,k,O,A){let E=y[S];if(typeof E==="object"&&E!==null&&typeof E.toJSON==="function")E=E.toJSON(S);switch(E=k.call(y,S,E),typeof E){case"string":return Pt(E);case"object":{if(E===null)return"null";if(_.indexOf(E)!==-1)return r;let T="",q=",",L=A;if(Array.isArray(E)){if(E.length===0)return"[]";if(l<_.length+1)return'"[Array]"';if(_.push(E),O!=="")A+=O,T+=`
|
|
8
8
|
${A}`,q=`,
|
|
9
|
-
${A}`;let H=Math.min(
|
|
10
|
-
${L}`;return _.pop(),`[${T}]`}let F=Object.keys(
|
|
11
|
-
${A}`,I=" ";let
|
|
9
|
+
${A}`;let H=Math.min(E.length,u),me=0;for(;me<H-1;me++){let nt=h(String(me),E,_,k,O,A);T+=nt!==void 0?nt:"null",T+=q}let Oe=h(String(me),E,_,k,O,A);if(T+=Oe!==void 0?Oe:"null",E.length-1>u){let nt=E.length-u-1;T+=`${q}"... ${nr(nt)} not stringified"`}if(O!=="")T+=`
|
|
10
|
+
${L}`;return _.pop(),`[${T}]`}let F=Object.keys(E),N=F.length;if(N===0)return"{}";if(l<_.length+1)return'"[Object]"';let I="",ne="";if(O!=="")A+=O,q=`,
|
|
11
|
+
${A}`,I=" ";let Z=Math.min(N,u);if(i&&!go(E))F=mo(F,a);_.push(E);for(let H=0;H<Z;H++){let me=F[H],Oe=h(me,E,_,k,O,A);if(Oe!==void 0)T+=`${ne}${Pt(me)}:${I}${Oe}`,ne=q}if(N>u){let H=N-u;T+=`${ne}"...":${I}"${nr(H)} not stringified"`,ne=q}if(O!==""&&ne.length>1)T=`
|
|
12
12
|
${A}${T}
|
|
13
|
-
${L}`;return _.pop(),`{${T}}`}case"number":return isFinite(
|
|
13
|
+
${L}`;return _.pop(),`{${T}}`}case"number":return isFinite(E)?String(E):t?t(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(E);default:return t?t(E):void 0}}function d(S,y,_,k,O,A){if(typeof y==="object"&&y!==null&&typeof y.toJSON==="function")y=y.toJSON(S);switch(typeof y){case"string":return Pt(y);case"object":{if(y===null)return"null";if(_.indexOf(y)!==-1)return r;let E=A,T="",q=",";if(Array.isArray(y)){if(y.length===0)return"[]";if(l<_.length+1)return'"[Array]"';if(_.push(y),O!=="")A+=O,T+=`
|
|
14
14
|
${A}`,q=`,
|
|
15
|
-
${A}`;let N=Math.min(y.length,u),I=0;for(;I<N-1;I++){let
|
|
16
|
-
${
|
|
17
|
-
${A}`,L=" ";let F="";for(let N of
|
|
15
|
+
${A}`;let N=Math.min(y.length,u),I=0;for(;I<N-1;I++){let Z=d(String(I),y[I],_,k,O,A);T+=Z!==void 0?Z:"null",T+=q}let ne=d(String(I),y[I],_,k,O,A);if(T+=ne!==void 0?ne:"null",y.length-1>u){let Z=y.length-u-1;T+=`${q}"... ${nr(Z)} not stringified"`}if(O!=="")T+=`
|
|
16
|
+
${E}`;return _.pop(),`[${T}]`}_.push(y);let L="";if(O!=="")A+=O,q=`,
|
|
17
|
+
${A}`,L=" ";let F="";for(let N of k){let I=d(N,y[N],_,k,O,A);if(I!==void 0)T+=`${F}${Pt(N)}:${L}${I}`,F=q}if(O!==""&&F.length>1)T=`
|
|
18
18
|
${A}${T}
|
|
19
|
-
${
|
|
20
|
-
${O}`,
|
|
21
|
-
${O}`,
|
|
22
|
-
${A}`,_.pop(),`[${I}]`}let
|
|
23
|
-
${O}`,L="",F="",N=Math.min(T,u);if(
|
|
19
|
+
${E}`;return _.pop(),`{${T}}`}case"number":return isFinite(y)?String(y):t?t(y):"null";case"boolean":return y===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(y);default:return t?t(y):void 0}}function b(S,y,_,k,O){switch(typeof y){case"string":return Pt(y);case"object":{if(y===null)return"null";if(typeof y.toJSON==="function"){if(y=y.toJSON(S),typeof y!=="object")return b(S,y,_,k,O);if(y===null)return"null"}if(_.indexOf(y)!==-1)return r;let A=O;if(Array.isArray(y)){if(y.length===0)return"[]";if(l<_.length+1)return'"[Array]"';_.push(y),O+=k;let I=`
|
|
20
|
+
${O}`,ne=`,
|
|
21
|
+
${O}`,Z=Math.min(y.length,u),H=0;for(;H<Z-1;H++){let Oe=b(String(H),y[H],_,k,O);I+=Oe!==void 0?Oe:"null",I+=ne}let me=b(String(H),y[H],_,k,O);if(I+=me!==void 0?me:"null",y.length-1>u){let Oe=y.length-u-1;I+=`${ne}"... ${nr(Oe)} not stringified"`}return I+=`
|
|
22
|
+
${A}`,_.pop(),`[${I}]`}let E=Object.keys(y),T=E.length;if(T===0)return"{}";if(l<_.length+1)return'"[Object]"';O+=k;let q=`,
|
|
23
|
+
${O}`,L="",F="",N=Math.min(T,u);if(go(y))L+=sh(y,q,u),E=E.slice(y.length),N-=y.length,F=q;if(i)E=mo(E,a);_.push(y);for(let I=0;I<N;I++){let ne=E[I],Z=b(ne,y[ne],_,k,O);if(Z!==void 0)L+=`${F}${Pt(ne)}: ${Z}`,F=q}if(T>u){let I=T-u;L+=`${F}"...": "${nr(I)} not stringified"`,F=q}if(F!=="")L=`
|
|
24
24
|
${O}${L}
|
|
25
|
-
${A}`;return _.pop(),`{${L}}`}case"number":return isFinite(y)?String(y):t?t(y):"null";case"boolean":return y===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(y);default:return t?t(y):void 0}}function m(S,y,_){switch(typeof y){case"string":return Lt(y);case"object":{if(y===null)return"null";if(typeof y.toJSON==="function"){if(y=y.toJSON(S),typeof y!=="object")return m(S,y,_);if(y===null)return"null"}if(_.indexOf(y)!==-1)return r;let E="",O=y.length!==void 0;if(O&&Array.isArray(y)){if(y.length===0)return"[]";if(l<_.length+1)return'"[Array]"';_.push(y);let L=Math.min(y.length,u),F=0;for(;F<L-1;F++){let I=m(String(F),y[F],_);E+=I!==void 0?I:"null",E+=","}let N=m(String(F),y[F],_);if(E+=N!==void 0?N:"null",y.length-1>u){let I=y.length-u-1;E+=`,"... ${er(I)} not stringified"`}return _.pop(),`[${E}]`}let A=Object.keys(y),k=A.length;if(k===0)return"{}";if(l<_.length+1)return'"[Object]"';let T="",q=Math.min(k,u);if(O&&no(y))E+=Vf(y,",",u),A=A.slice(y.length),q-=y.length,T=",";if(s)A=ro(A,a);_.push(y);for(let L=0;L<q;L++){let F=A[L],N=m(F,y[F],_);if(N!==void 0)E+=`${T}${Lt(F)}:${N}`,T=","}if(k>u){let L=k-u;E+=`${T}"...":"${er(L)} not stringified"`}return _.pop(),`{${E}}`}case"number":return isFinite(y)?String(y):t?t(y):"null";case"boolean":return y===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(y);default:return t?t(y):void 0}}function g(S,y,_){if(arguments.length>1){let E="";if(typeof _==="number")E=" ".repeat(Math.min(_,10));else if(typeof _==="string")E=_.slice(0,10);if(y!=null){if(typeof y==="function")return h("",{"":S},[],y,E,"");if(Array.isArray(y))return d("",S,[],i1(y),E,"")}if(E.length!==0)return b("",S,[],E,"")}return m("",S,[])}return g}});var io=v(function(r5,zf){var u1=Re(),{MESSAGE:c1}=fe(),f1=On();function h1(e,t){if(typeof t==="bigint")return t.toString();return t}zf.exports=u1((e,t)=>{let r=f1.configure(t);return e[c1]=r(e,t.replacer||h1,t.space),e})});var Qf=v(function(n5,Jf){var d1=Re();Jf.exports=d1((e,t)=>{if(t.message)return e.message=`[${t.label}] ${e.message}`,e;return e.label=t.label,e})});var Xf=v(function(s5,Zf){var p1=Re(),{MESSAGE:m1}=fe(),g1=On();Zf.exports=p1((e)=>{let t={};if(e.message)t["@message"]=e.message,delete e.message;if(e.timestamp)t["@timestamp"]=e.timestamp,delete e.timestamp;return t["@fields"]=e,e[m1]=g1(t),e})});var th=v(function(i5,eh){var y1=Re();function b1(e,t,r){let n=t.reduce((a,l)=>(a[l]=e[l],delete e[l],a),{}),s=Object.keys(e).reduce((a,l)=>(a[l]=e[l],delete e[l],a),{});return Object.assign(e,n,{[r]:s}),e}function w1(e,t,r){return e[r]=t.reduce((n,s)=>(n[s]=e[s],delete e[s],n),{}),e}eh.exports=y1((e,t={})=>{let r="metadata";if(t.key)r=t.key;let n=[];if(!t.fillExcept&&!t.fillWith)n.push("level"),n.push("message");if(t.fillExcept)n=t.fillExcept;if(n.length>0)return b1(e,n,r);if(t.fillWith)return w1(e,t.fillWith,r);return e})});var nh=v(function(a5,rh){var Ir=1000,Fr=Ir*60,jr=Fr*60,rr=jr*24,_1=rr*7,v1=rr*365.25;rh.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return S1(e);else if(r==="number"&&isFinite(e))return t.long?x1(e):E1(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function S1(e){if(e=String(e),e.length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*v1;case"weeks":case"week":case"w":return r*_1;case"days":case"day":case"d":return r*rr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*jr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Fr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ir;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function E1(e){var t=Math.abs(e);if(t>=rr)return Math.round(e/rr)+"d";if(t>=jr)return Math.round(e/jr)+"h";if(t>=Fr)return Math.round(e/Fr)+"m";if(t>=Ir)return Math.round(e/Ir)+"s";return e+"ms"}function x1(e){var t=Math.abs(e);if(t>=rr)return Ks(e,t,rr,"day");if(t>=jr)return Ks(e,t,jr,"hour");if(t>=Fr)return Ks(e,t,Fr,"minute");if(t>=Ir)return Ks(e,t,Ir,"second");return e+" ms"}function Ks(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var ih=v(function(Mn,sh){var k1=Re(),O1=nh();sh.exports=k1((e)=>{let t=+new Date;return Mn.diff=t-(Mn.prevTime||t),Mn.prevTime=t,e.ms=`+${O1(Mn.diff)}`,e})});var lh=v(function(o5,oh){var M1=U("util").inspect,T1=Re(),{LEVEL:N1,MESSAGE:ah,SPLAT:A1}=fe();oh.exports=T1((e,t={})=>{let r=Object.assign({},e);return delete r[N1],delete r[ah],delete r[A1],e[ah]=M1(r,!1,t.depth||null,t.colorize),e})});var uh=v(function(l5,zs){var{MESSAGE:D1}=fe();class ao{constructor(e){this.template=e}transform(e){return e[D1]=this.template(e),e}}zs.exports=(e)=>new ao(e);zs.exports.Printf=zs.exports.Format=ao});var hh=v(function(u5,fh){var L1=Re(),{MESSAGE:ch}=fe(),q1=On();fh.exports=L1((e)=>{let t=q1(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";if(t!=="{}")e[ch]=`${e.level}:${r} ${e.message} ${t}`;else e[ch]=`${e.level}:${r} ${e.message}`;return e})});var gh=v(function(c5,mh){var R1=U("util"),{SPLAT:dh}=fe(),C1=/%[scdjifoO%]/g,P1=/%%/g;class ph{constructor(e){this.options=e}_splat(e,t){let r=e.message,n=e[dh]||e.splat||[],s=r.match(P1),a=s&&s.length||0,u=t.length-a-n.length,h=u<0?n.splice(u,-1*u):[],d=h.length;if(d)for(let b=0;b<d;b++)Object.assign(e,h[b]);return e.message=R1.format(r,...n),e}transform(e){let t=e.message,r=e[dh]||e.splat;if(!r||!r.length)return e;let n=t&&t.match&&t.match(C1);if(!n&&(r||r.length)){let s=r.length>1?r.splice(0):r,a=s.length;if(a)for(let l=0;l<a;l++)Object.assign(e,s[l]);return e}if(n)return this._splat(e,n);return e}}mh.exports=(e)=>new ph(e)});var bh=v(function(Js,yh){(function(e,t){typeof Js==="object"&&typeof yh<"u"?t(Js):typeof define==="function"&&define.amd?define(["exports"],t):t(e.fecha={})})(Js,function(e){var t=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",n="\\d\\d",s="\\d{3}",a="\\d{4}",l="[^\\s]+",u=/\[([^]*?)\]/gm;function h(M,j){var G=[];for(var _e=0,B=M.length;_e<B;_e++)G.push(M[_e].substr(0,j));return G}var d=function(M){return function(j,G){var _e=G[M].map(function(Ae){return Ae.toLowerCase()}),B=_e.indexOf(j.toLowerCase());if(B>-1)return B;return null}};function b(M){var j=[];for(var G=1;G<arguments.length;G++)j[G-1]=arguments[G];for(var _e=0,B=j;_e<B.length;_e++){var Ae=B[_e];for(var De in Ae)M[De]=Ae[De]}return M}var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["January","February","March","April","May","June","July","August","September","October","November","December"],S=h(g,3),y=h(m,3),_={dayNamesShort:y,dayNames:m,monthNamesShort:S,monthNames:g,amPm:["am","pm"],DoFn:function(M){return M+["th","st","nd","rd"][M%10>3?0:(M-M%10!==10?1:0)*M%10]}},E=b({},_),O=function(M){return E=b(E,M)},A=function(M){return M.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},k=function(M,j){if(j===void 0)j=2;M=String(M);while(M.length<j)M="0"+M;return M},T={D:function(M){return String(M.getDate())},DD:function(M){return k(M.getDate())},Do:function(M,j){return j.DoFn(M.getDate())},d:function(M){return String(M.getDay())},dd:function(M){return k(M.getDay())},ddd:function(M,j){return j.dayNamesShort[M.getDay()]},dddd:function(M,j){return j.dayNames[M.getDay()]},M:function(M){return String(M.getMonth()+1)},MM:function(M){return k(M.getMonth()+1)},MMM:function(M,j){return j.monthNamesShort[M.getMonth()]},MMMM:function(M,j){return j.monthNames[M.getMonth()]},YY:function(M){return k(String(M.getFullYear()),4).substr(2)},YYYY:function(M){return k(M.getFullYear(),4)},h:function(M){return String(M.getHours()%12||12)},hh:function(M){return k(M.getHours()%12||12)},H:function(M){return String(M.getHours())},HH:function(M){return k(M.getHours())},m:function(M){return String(M.getMinutes())},mm:function(M){return k(M.getMinutes())},s:function(M){return String(M.getSeconds())},ss:function(M){return k(M.getSeconds())},S:function(M){return String(Math.round(M.getMilliseconds()/100))},SS:function(M){return k(Math.round(M.getMilliseconds()/10),2)},SSS:function(M){return k(M.getMilliseconds(),3)},a:function(M,j){return M.getHours()<12?j.amPm[0]:j.amPm[1]},A:function(M,j){return M.getHours()<12?j.amPm[0].toUpperCase():j.amPm[1].toUpperCase()},ZZ:function(M){var j=M.getTimezoneOffset();return(j>0?"-":"+")+k(Math.floor(Math.abs(j)/60)*100+Math.abs(j)%60,4)},Z:function(M){var j=M.getTimezoneOffset();return(j>0?"-":"+")+k(Math.floor(Math.abs(j)/60),2)+":"+k(Math.abs(j)%60,2)}},q=function(M){return+M-1},L=[null,r],F=[null,l],N=["isPm",l,function(M,j){var G=M.toLowerCase();if(G===j.amPm[0])return 0;else if(G===j.amPm[1])return 1;return null}],I=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(M){var j=(M+"").match(/([+-]|\d\d)/gi);if(j){var G=+j[1]*60+parseInt(j[2],10);return j[0]==="+"?G:-G}return 0}],re={D:["day",r],DD:["day",n],Do:["day",r+l,function(M){return parseInt(M,10)}],M:["month",r,q],MM:["month",n,q],YY:["year",n,function(M){var j=new Date,G=+(""+j.getFullYear()).substr(0,2);return+(""+(+M>68?G-1:G)+M)}],h:["hour",r,void 0,"isPm"],hh:["hour",n,void 0,"isPm"],H:["hour",r],HH:["hour",n],m:["minute",r],mm:["minute",n],s:["second",r],ss:["second",n],YYYY:["year",a],S:["millisecond","\\d",function(M){return+M*100}],SS:["millisecond",n,function(M){return+M*10}],SSS:["millisecond",s],d:L,dd:L,ddd:F,dddd:F,MMM:["month",l,d("monthNamesShort")],MMMM:["month",l,d("monthNames")],a:N,A:N,ZZ:I,Z:I},Q={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"},H=function(M){return b(Q,M)},he=function(M,j,G){if(j===void 0)j=Q.default;if(G===void 0)G={};if(typeof M==="number")M=new Date(M);if(Object.prototype.toString.call(M)!=="[object Date]"||isNaN(M.getTime()))throw Error("Invalid Date pass to format");j=Q[j]||j;var _e=[];j=j.replace(u,function(Ae,De){return _e.push(De),"@@@"});var B=b(b({},E),G);return j=j.replace(t,function(Ae){return T[Ae](M,B)}),j.replace(/@@@/g,function(){return _e.shift()})};function Ee(M,j,G){if(G===void 0)G={};if(typeof j!=="string")throw Error("Invalid format in fecha parse");if(j=Q[j]||j,M.length>1000)return null;var _e=new Date,B={year:_e.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Ae=[],De=[],Y=j.replace(u,function(zt,Mt){return De.push(A(Mt)),"@@@"}),vr={},vs={};Y=A(Y).replace(t,function(zt){var Mt=re[zt],xr=Mt[0],Le=Mt[1],kr=Mt[3];if(vr[xr])throw Error("Invalid format. "+xr+" specified twice in format");if(vr[xr]=!0,kr)vs[kr]=!0;return Ae.push(Mt),"("+Le+")"}),Object.keys(vs).forEach(function(zt){if(!vr[zt])throw Error("Invalid format. "+zt+" is required in specified format")}),Y=Y.replace(/@@@/g,function(){return De.shift()});var ht=M.match(new RegExp(Y,"i"));if(!ht)return null;var Ss=b(b({},E),G);for(var Fe=1;Fe<ht.length;Fe++){var Es=Ae[Fe-1],da=Es[0],xs=Es[2],ks=xs?xs(ht[Fe],Ss):+ht[Fe];if(ks==null)return null;B[da]=ks}if(B.isPm===1&&B.hour!=null&&+B.hour!==12)B.hour=+B.hour+12;else if(B.isPm===0&&+B.hour===12)B.hour=0;var Sr;if(B.timezoneOffset==null){Sr=new Date(B.year,B.month,B.day,B.hour,B.minute,B.second,B.millisecond);var Er=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]];for(var Fe=0,pa=Er.length;Fe<pa;Fe++)if(vr[Er[Fe][0]]&&B[Er[Fe][0]]!==Sr[Er[Fe][1]]())return null}else if(Sr=new Date(Date.UTC(B.year,B.month,B.day,B.hour,B.minute-B.timezoneOffset,B.second,B.millisecond)),B.month>11||B.month<0||B.day>31||B.day<1||B.hour>23||B.hour<0||B.minute>59||B.minute<0||B.second>59||B.second<0)return null;return Sr}var et={format:he,parse:Ee,defaultI18n:_,setGlobalDateI18n:O,setGlobalDateMasks:H};e.assign=b,e.default=et,e.format=he,e.parse=Ee,e.defaultI18n=_,e.setGlobalDateI18n=O,e.setGlobalDateMasks=H,Object.defineProperty(e,"__esModule",{value:!0})})});var _h=v(function(f5,wh){var I1=bh(),F1=Re();wh.exports=F1((e,t={})=>{if(t.format)e.timestamp=typeof t.format==="function"?t.format():I1.format(new Date,t.format);if(!e.timestamp)e.timestamp=new Date().toISOString();if(t.alias)e[t.alias]=e.timestamp;return e})});var Sh=v(function(h5,vh){var oo=Va(),j1=Re(),{MESSAGE:lo}=fe();vh.exports=j1((e,t)=>{if(t.level!==!1)e.level=oo.strip(e.level);if(t.message!==!1)e.message=oo.strip(String(e.message));if(t.raw!==!1&&e[lo])e[lo]=oo.strip(String(e[lo]));return e})});var uo=v(function($1){var Y1=$1.format=Re();$1.levels=Pf();function xe(e,t){Object.defineProperty(Y1,e,{get(){return t()},configurable:!0})}xe("align",function(){return Ff()});xe("errors",function(){return $f()});xe("cli",function(){return Uf()});xe("combine",function(){return Hf()});xe("colorize",function(){return Vs()});xe("json",function(){return io()});xe("label",function(){return Qf()});xe("logstash",function(){return Xf()});xe("metadata",function(){return th()});xe("ms",function(){return ih()});xe("padLevels",function(){return Za()});xe("prettyPrint",function(){return lh()});xe("printf",function(){return uh()});xe("simple",function(){return hh()});xe("splat",function(){return gh()});xe("timestamp",function(){return _h()});xe("uncolorize",function(){return Sh()})});var fo=v(function(U1){var{format:Eh}=U("util");U1.warn={deprecated(e){return()=>{throw Error(Eh("{ %s } was removed in winston@3.0.0.",e))}},useFormat(e){return()=>{throw Error([Eh("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
-
`))}},forFunctions(e,t,r){r.forEach((n)=>{e[n]=U1.warn[t](n)})},forProperties(e,t,r){r.forEach((n)=>{let s=U1.warn[t](n);Object.defineProperty(e,n,{get:s,set:s})})}}});var xh=v(function(g5,W1){W1.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 Oh=v(function(y5,kh){kh.exports=U("util").deprecate});var po=v(function(b5,Th){function H1(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;if(n||s){if(t)t(e);else if(e){if(!this._writableState)process.nextTick(ho,this,e);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(ho,this,e)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(e||null,function(a){if(!t&&a)if(!r._writableState)process.nextTick(Mh,r,a);else if(!r._writableState.errorEmitted)r._writableState.errorEmitted=!0,process.nextTick(Mh,r,a);else process.nextTick(Qs,r);else if(t)process.nextTick(Qs,r),t(a);else process.nextTick(Qs,r)}),this}function Mh(e,t){ho(e,t),Qs(e)}function Qs(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function V1(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function ho(e,t){e.emit("error",t)}function G1(e,t){var{_readableState:r,_writableState:n}=e;if(r&&r.autoDestroy||n&&n.autoDestroy)e.destroy(t);else e.emit("error",t)}Th.exports={destroy:H1,undestroy:V1,errorOrDestroy:G1}});var qt=v(function(Q1,Dh){var Ah={};function Be(e,t,r){if(!r)r=Error;function n(a,l,u){if(typeof t==="string")return t;else return t(a,l,u)}class s extends r{constructor(a,l,u){super(n(a,l,u))}}s.prototype.name=r.name,s.prototype.code=e,Ah[e]=s}function Nh(e,t){if(Array.isArray(e)){let r=e.length;if(e=e.map((n)=>String(n)),r>2)return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1];else if(r===2)return`one of ${t} ${e[0]} or ${e[1]}`;else return`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function K1(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function z1(e,t,r){if(r===void 0||r>e.length)r=e.length;return e.substring(r-t.length,r)===t}function J1(e,t,r){if(typeof r!=="number")r=0;if(r+t.length>e.length)return!1;else return e.indexOf(t,r)!==-1}Be("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Be("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;if(typeof t==="string"&&K1(t,"not "))n="must not be",t=t.replace(/^not /,"");else n="must be";let s;if(z1(e," argument"))s=`The ${e} ${n} ${Nh(t,"type")}`;else{let a=J1(e,".")?"property":"argument";s=`The "${e}" ${a} ${n} ${Nh(t,"type")}`}return s+=`. Received type ${typeof r}`,s},TypeError);Be("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Be("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Be("ERR_STREAM_PREMATURE_CLOSE","Premature close");Be("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Be("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Be("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Be("ERR_STREAM_WRITE_AFTER_END","write after end");Be("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Be("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Be("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Q1.codes=Ah});var mo=v(function(w5,Lh){var X1=qt().codes.ERR_INVALID_OPT_VALUE;function eS(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function tS(e,t,r,n){var s=eS(t,n,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var a=n?r:"highWaterMark";throw new X1(a,s)}return Math.floor(s)}return e.objectMode?16:16384}Lh.exports={getHighWaterMark:tS}});var qh=v(function(_5,go){if(typeof Object.create==="function")go.exports=function(t,r){if(r)t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};else go.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var Yr=v(function(v5,yo){try{if(Zs=U("util"),typeof Zs.inherits!=="function")throw"";yo.exports=Zs.inherits}catch(e){yo.exports=qh()}var Zs});var jh=v(function(S5,Fh){function Rh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ch(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rh(Object(r),!0).forEach(function(n){rS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rS(e,t,r){if(t=Ih(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function nS(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function Ph(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n)n.writable=!0;Object.defineProperty(e,Ih(n.key),n)}}function sS(e,t,r){if(t)Ph(e.prototype,t);if(r)Ph(e,r);return Object.defineProperty(e,"prototype",{writable:!1}),e}function Ih(e){var t=iS(e,"string");return typeof t==="symbol"?t:String(t)}function iS(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aS=U("buffer"),Xs=aS.Buffer,oS=U("util"),bo=oS.inspect,lS=bo&&bo.custom||"inspect";function uS(e,t,r){Xs.prototype.copy.call(e,t,r)}Fh.exports=function(){function e(){nS(this,e),this.head=null,this.tail=null,this.length=0}return sS(e,[{key:"push",value:function(r){var n={data:r,next:null};if(this.length>0)this.tail.next=n;else this.head=n;this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};if(this.length===0)this.tail=n;this.head=n,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var r=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--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"";var n=this.head,s=""+n.data;while(n=n.next)s+=r+n.data;return s}},{key:"concat",value:function(r){if(this.length===0)return Xs.alloc(0);var n=Xs.allocUnsafe(r>>>0),s=this.head,a=0;while(s)uS(s.data,n,a),a+=s.data.length,s=s.next;return n}},{key:"consume",value:function(r,n){var s;if(r<this.head.data.length)s=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r);else if(r===this.head.data.length)s=this.shift();else s=n?this._getString(r):this._getBuffer(r);return s}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,s=1,a=n.data;r-=a.length;while(n=n.next){var l=n.data,u=r>l.length?l.length:r;if(u===l.length)a+=l;else a+=l.slice(0,r);if(r-=u,r===0){if(u===l.length)if(++s,n.next)this.head=n.next;else this.head=this.tail=null;else this.head=n,n.data=l.slice(u);break}++s}return this.length-=s,a}},{key:"_getBuffer",value:function(r){var n=Xs.allocUnsafe(r),s=this.head,a=1;s.data.copy(n),r-=s.data.length;while(s=s.next){var l=s.data,u=r>l.length?l.length:r;if(l.copy(n,n.length-r,0,u),r-=u,r===0){if(u===l.length)if(++a,s.next)this.head=s.next;else this.head=this.tail=null;else this.head=s,s.data=l.slice(u);break}++a}return this.length-=a,n}},{key:lS,value:function(r,n){return bo(this,Ch(Ch({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var Bh=v(function(wo,$h){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ei=U("buffer"),nt=ei.Buffer;function Yh(e,t){for(var r in e)t[r]=e[r]}if(nt.from&&nt.alloc&&nt.allocUnsafe&&nt.allocUnsafeSlow)$h.exports=ei;else Yh(ei,wo),wo.Buffer=nr;function nr(e,t,r){return nt(e,t,r)}nr.prototype=Object.create(nt.prototype);Yh(nt,nr);nr.from=function(e,t,r){if(typeof e==="number")throw TypeError("Argument must not be a number");return nt(e,t,r)};nr.alloc=function(e,t,r){if(typeof e!=="number")throw TypeError("Argument must be a number");var n=nt(e);if(t!==void 0)if(typeof r==="string")n.fill(t,r);else n.fill(t);else n.fill(0);return n};nr.allocUnsafe=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return nt(e)};nr.allocUnsafeSlow=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return ei.SlowBuffer(e)}});var So=v(function(ES){var vo=Bh().Buffer,Uh=vo.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function cS(e){if(!e)return"utf8";var t;while(!0)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function fS(e){var t=cS(e);if(typeof t!=="string"&&(vo.isEncoding===Uh||!Uh(e)))throw Error("Unknown encoding: "+e);return t||e}ES.StringDecoder=Tn;function Tn(e){this.encoding=fS(e);var t;switch(this.encoding){case"utf16le":this.text=yS,this.end=bS,t=4;break;case"utf8":this.fillLast=pS,t=4;break;case"base64":this.text=wS,this.end=_S,t=3;break;default:this.write=vS,this.end=SS;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=vo.allocUnsafe(t)}Tn.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;if(r<e.length)return t?t+this.text(e,r):this.text(e,r);return t||""};Tn.prototype.end=gS;Tn.prototype.text=mS;Tn.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function _o(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function hS(e,t,r){var n=t.length-1;if(n<r)return 0;var s=_o(t[n]);if(s>=0){if(s>0)e.lastNeed=s-1;return s}if(--n<r||s===-2)return 0;if(s=_o(t[n]),s>=0){if(s>0)e.lastNeed=s-2;return s}if(--n<r||s===-2)return 0;if(s=_o(t[n]),s>=0){if(s>0)if(s===2)s=0;else e.lastNeed=s-3;return s}return 0}function dS(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}}function pS(e){var t=this.lastTotal-this.lastNeed,r=dS(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function mS(e,t){var r=hS(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function gS(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"\uFFFD";return t}function yS(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function bS(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function wS(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);if(this.lastNeed=3-r,this.lastTotal=3,r===1)this.lastChar[0]=e[e.length-1];else this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1];return e.toString("base64",t,e.length-r)}function _S(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function vS(e){return e.toString(this.encoding)}function SS(e){return e&&e.length?this.write(e):""}});var ti=v(function(x5,Vh){var Wh=qt().codes.ERR_STREAM_PREMATURE_CLOSE;function kS(e){var t=!1;return function(){if(t)return;t=!0;for(var r=arguments.length,n=Array(r),s=0;s<r;s++)n[s]=arguments[s];e.apply(this,n)}}function OS(){}function MS(e){return e.setHeader&&typeof e.abort==="function"}function Hh(e,t,r){if(typeof t==="function")return Hh(e,null,t);if(!t)t={};r=kS(r||OS);var n=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,a=function(){if(!e.writable)u()},l=e._writableState&&e._writableState.finished,u=function(){if(s=!1,l=!0,!n)r.call(e)},h=e._readableState&&e._readableState.endEmitted,d=function(){if(n=!1,h=!0,!s)r.call(e)},b=function(y){r.call(e,y)},m=function(){var y;if(n&&!h){if(!e._readableState||!e._readableState.ended)y=new Wh;return r.call(e,y)}if(s&&!l){if(!e._writableState||!e._writableState.ended)y=new Wh;return r.call(e,y)}},g=function(){e.req.on("finish",u)};if(MS(e))if(e.on("complete",u),e.on("abort",m),e.req)g();else e.on("request",g);else if(s&&!e._writableState)e.on("end",a),e.on("close",a);if(e.on("end",d),e.on("finish",u),t.error!==!1)e.on("error",b);return e.on("close",m),function(){if(e.removeListener("complete",u),e.removeListener("abort",m),e.removeListener("request",g),e.req)e.req.removeListener("finish",u);e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("end",d),e.removeListener("error",b),e.removeListener("close",m)}}Vh.exports=Hh});var Kh=v(function(k5,Gh){var ri;function Rt(e,t,r){if(t=TS(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function TS(e){var t=NS(e,"string");return typeof t==="symbol"?t:String(t)}function NS(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AS=ti(),Ct=Symbol("lastResolve"),sr=Symbol("lastReject"),Nn=Symbol("error"),ni=Symbol("ended"),ir=Symbol("lastPromise"),Eo=Symbol("handlePromise"),ar=Symbol("stream");function Pt(e,t){return{value:e,done:t}}function DS(e){var t=e[Ct];if(t!==null){var r=e[ar].read();if(r!==null)e[ir]=null,e[Ct]=null,e[sr]=null,t(Pt(r,!1))}}function LS(e){process.nextTick(DS,e)}function qS(e,t){return function(r,n){e.then(function(){if(t[ni]){r(Pt(void 0,!0));return}t[Eo](r,n)},n)}}var RS=Object.getPrototypeOf(function(){}),CS=Object.setPrototypeOf((ri={get stream(){return this[ar]},next:function(){var t=this,r=this[Nn];if(r!==null)return Promise.reject(r);if(this[ni])return Promise.resolve(Pt(void 0,!0));if(this[ar].destroyed)return new Promise(function(l,u){process.nextTick(function(){if(t[Nn])u(t[Nn]);else l(Pt(void 0,!0))})});var n=this[ir],s;if(n)s=new Promise(qS(n,this));else{var a=this[ar].read();if(a!==null)return Promise.resolve(Pt(a,!1));s=new Promise(this[Eo])}return this[ir]=s,s}},Rt(ri,Symbol.asyncIterator,function(){return this}),Rt(ri,"return",function(){var t=this;return new Promise(function(r,n){t[ar].destroy(null,function(s){if(s){n(s);return}r(Pt(void 0,!0))})})}),ri),RS),PS=function(t){var r,n=Object.create(CS,(r={},Rt(r,ar,{value:t,writable:!0}),Rt(r,Ct,{value:null,writable:!0}),Rt(r,sr,{value:null,writable:!0}),Rt(r,Nn,{value:null,writable:!0}),Rt(r,ni,{value:t._readableState.endEmitted,writable:!0}),Rt(r,Eo,{value:function(a,l){var u=n[ar].read();if(u)n[ir]=null,n[Ct]=null,n[sr]=null,a(Pt(u,!1));else n[Ct]=a,n[sr]=l},writable:!0}),r));return n[ir]=null,AS(t,function(s){if(s&&s.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[sr];if(a!==null)n[ir]=null,n[Ct]=null,n[sr]=null,a(s);n[Nn]=s;return}var l=n[Ct];if(l!==null)n[ir]=null,n[Ct]=null,n[sr]=null,l(Pt(void 0,!0));n[ni]=!0}),t.on("readable",LS.bind(null,n)),n};Gh.exports=PS});var Zh=v(function(O5,Qh){function zh(e,t,r,n,s,a,l){try{var u=e[a](l),h=u.value}catch(d){r(d);return}if(u.done)t(h);else Promise.resolve(h).then(n,s)}function IS(e){return function(){var t=this,r=arguments;return new Promise(function(n,s){var a=e.apply(t,r);function l(h){zh(a,n,s,l,u,"next",h)}function u(h){zh(a,n,s,l,u,"throw",h)}l(void 0)})}}function Jh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function FS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jh(Object(r),!0).forEach(function(n){jS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jS(e,t,r){if(t=YS(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function YS(e){var t=$S(e,"string");return typeof t==="symbol"?t:String(t)}function $S(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BS=qt().codes.ERR_INVALID_ARG_TYPE;function US(e,t,r){var n;if(t&&typeof t.next==="function")n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new BS("iterable",["Iterable"],t);var s=new e(FS({objectMode:!0},r)),a=!1;s._read=function(){if(!a)a=!0,l()};function l(){return u.apply(this,arguments)}function u(){return u=IS(function*(){try{var h=yield n.next(),{value:d,done:b}=h;if(b)s.push(null);else if(s.push(yield d))l();else a=!1}catch(m){s.destroy(m)}}),u.apply(this,arguments)}return s}Qh.exports=US});var qo=v(function(T5,ld){ld.exports=ee;var $r;ee.ReadableState=rd;var M5=U("events").EventEmitter,td=function(t,r){return t.listeners(r).length},Dn=U("stream"),si=U("buffer").Buffer,WS=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function HS(e){return si.from(e)}function VS(e){return si.isBuffer(e)||e instanceof WS}var xo=U("util"),V;if(xo&&xo.debuglog)V=xo.debuglog("stream");else V=function(){};var GS=jh(),Do=po(),KS=mo(),zS=KS.getHighWaterMark,ii=qt().codes,{ERR_INVALID_ARG_TYPE:JS,ERR_STREAM_PUSH_AFTER_EOF:QS,ERR_METHOD_NOT_IMPLEMENTED:ZS,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:XS}=ii,Br,ko,Oo;Yr()(ee,Dn);var An=Do.errorOrDestroy,Mo=["error","close","destroy","pause","resume"];function e2(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function rd(e,t,r){if($r=$r||or(),e=e||{},typeof r!=="boolean")r=t instanceof $r;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.readableObjectMode;if(this.highWaterMark=zS(this,e,"readableHighWaterMark",r),this.buffer=new GS,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding){if(!Br)Br=So().StringDecoder;this.decoder=new Br(e.encoding),this.encoding=e.encoding}}function ee(e){if($r=$r||or(),!(this instanceof ee))return new ee(e);var t=this instanceof $r;if(this._readableState=new rd(e,this,t),this.readable=!0,e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}Dn.call(this)}Object.defineProperty(ee.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(t){if(!this._readableState)return;this._readableState.destroyed=t}});ee.prototype.destroy=Do.destroy;ee.prototype._undestroy=Do.undestroy;ee.prototype._destroy=function(e,t){t(e)};ee.prototype.push=function(e,t){var r=this._readableState,n;if(!r.objectMode){if(typeof e==="string"){if(t=t||r.defaultEncoding,t!==r.encoding)e=si.from(e,t),t="";n=!0}}else n=!0;return nd(this,e,t,!1,n)};ee.prototype.unshift=function(e){return nd(this,e,null,!0,!1)};function nd(e,t,r,n,s){V("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,n2(e,a);else{var l;if(!s)l=t2(a,t);if(l)An(e,l);else if(a.objectMode||t&&t.length>0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==si.prototype)t=HS(t);if(n)if(a.endEmitted)An(e,new XS);else To(e,a,t,!0);else if(a.ended)An(e,new QS);else if(a.destroyed)return!1;else if(a.reading=!1,a.decoder&&!r)if(t=a.decoder.write(t),a.objectMode||t.length!==0)To(e,a,t,!1);else Ao(e,a);else To(e,a,t,!1)}else if(!n)a.reading=!1,Ao(e,a)}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function To(e,t,r,n){if(t.flowing&&t.length===0&&!t.sync)t.awaitDrain=0,e.emit("data",r);else{if(t.length+=t.objectMode?1:r.length,n)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)ai(e)}Ao(e,t)}function t2(e,t){var r;if(!VS(t)&&typeof t!=="string"&&t!==void 0&&!e.objectMode)r=new JS("chunk",["string","Buffer","Uint8Array"],t);return r}ee.prototype.isPaused=function(){return this._readableState.flowing===!1};ee.prototype.setEncoding=function(e){if(!Br)Br=So().StringDecoder;var t=new Br(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var r=this._readableState.buffer.head,n="";while(r!==null)n+=t.write(r.data),r=r.next;if(this._readableState.buffer.clear(),n!=="")this._readableState.buffer.push(n);return this._readableState.length=n.length,this};var Xh=1073741824;function r2(e){if(e>=Xh)e=Xh;else e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++;return e}function ed(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;if(e>t.highWaterMark)t.highWaterMark=r2(e);if(e<=t.length)return e;if(!t.ended)return t.needReadable=!0,0;return t.length}ee.prototype.read=function(e){V("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0)t.emittedReadable=!1;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){if(V("read: emitReadable",t.length,t.ended),t.length===0&&t.ended)No(this);else ai(this);return null}if(e=ed(e,t),e===0&&t.ended){if(t.length===0)No(this);return null}var n=t.needReadable;if(V("need readable",n),t.length===0||t.length-e<t.highWaterMark)n=!0,V("length less than watermark",n);if(t.ended||t.reading)n=!1,V("reading or ended",n);else if(n){if(V("do read"),t.reading=!0,t.sync=!0,t.length===0)t.needReadable=!0;if(this._read(t.highWaterMark),t.sync=!1,!t.reading)e=ed(r,t)}var s;if(e>0)s=ad(e,t);else s=null;if(s===null)t.needReadable=t.length<=t.highWaterMark,e=0;else t.length-=e,t.awaitDrain=0;if(t.length===0){if(!t.ended)t.needReadable=!0;if(r!==e&&t.ended)No(this)}if(s!==null)this.emit("data",s);return s};function n2(e,t){if(V("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length)t.buffer.push(r),t.length+=t.objectMode?1:r.length}if(t.ended=!0,t.sync)ai(e);else if(t.needReadable=!1,!t.emittedReadable)t.emittedReadable=!0,sd(e)}function ai(e){var t=e._readableState;if(V("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,!t.emittedReadable)V("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(sd,e)}function sd(e){var t=e._readableState;if(V("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended))e.emit("readable"),t.emittedReadable=!1;t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Lo(e)}function Ao(e,t){if(!t.readingMore)t.readingMore=!0,process.nextTick(s2,e,t)}function s2(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0)){var r=t.length;if(V("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}ee.prototype._read=function(e){An(this,new ZS("_read()"))};ee.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,V("pipe count=%d opts=%j",n.pipesCount,t);var s=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=s?u:_;if(n.endEmitted)process.nextTick(a);else r.once("end",a);e.on("unpipe",l);function l(E,O){if(V("onunpipe"),E===r){if(O&&O.hasUnpiped===!1)O.hasUnpiped=!0,b()}}function u(){V("onend"),e.end()}var h=i2(r);e.on("drain",h);var d=!1;function b(){if(V("cleanup"),e.removeListener("close",S),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",g),e.removeListener("unpipe",l),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",m),d=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain))h()}r.on("data",m);function m(E){V("ondata");var O=e.write(E);if(V("dest.write",O),O===!1){if((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&od(n.pipes,e)!==-1)&&!d)V("false write response, pause",n.awaitDrain),n.awaitDrain++;r.pause()}}function g(E){if(V("onerror",E),_(),e.removeListener("error",g),td(e,"error")===0)An(e,E)}e2(e,"error",g);function S(){e.removeListener("finish",y),_()}e.once("close",S);function y(){V("onfinish"),e.removeListener("close",S),_()}e.once("finish",y);function _(){V("unpipe"),r.unpipe(e)}if(e.emit("pipe",r),!n.flowing)V("pipe resume"),r.resume();return e};function i2(e){return function(){var r=e._readableState;if(V("pipeOnDrain",r.awaitDrain),r.awaitDrain)r.awaitDrain--;if(r.awaitDrain===0&&td(e,"data"))r.flowing=!0,Lo(e)}}ee.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;if(t.pipes=null,t.pipesCount=0,t.flowing=!1,e)e.emit("unpipe",this,r);return this}if(!e){var{pipes:n,pipesCount:s}=t;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<s;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var l=od(t.pipes,e);if(l===-1)return this;if(t.pipes.splice(l,1),t.pipesCount-=1,t.pipesCount===1)t.pipes=t.pipes[0];return e.emit("unpipe",this,r),this};ee.prototype.on=function(e,t){var r=Dn.prototype.on.call(this,e,t),n=this._readableState;if(e==="data"){if(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1)this.resume()}else if(e==="readable"){if(!n.endEmitted&&!n.readableListening){if(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,V("on readable",n.length,n.reading),n.length)ai(this);else if(!n.reading)process.nextTick(a2,this)}}return r};ee.prototype.addListener=ee.prototype.on;ee.prototype.removeListener=function(e,t){var r=Dn.prototype.removeListener.call(this,e,t);if(e==="readable")process.nextTick(id,this);return r};ee.prototype.removeAllListeners=function(e){var t=Dn.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===void 0)process.nextTick(id,this);return t};function id(e){var t=e._readableState;if(t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused)t.flowing=!0;else if(e.listenerCount("data")>0)e.resume()}function a2(e){V("readable nexttick read 0"),e.read(0)}ee.prototype.resume=function(){var e=this._readableState;if(!e.flowing)V("resume"),e.flowing=!e.readableListening,o2(this,e);return e.paused=!1,this};function o2(e,t){if(!t.resumeScheduled)t.resumeScheduled=!0,process.nextTick(l2,e,t)}function l2(e,t){if(V("resume",t.reading),!t.reading)e.read(0);if(t.resumeScheduled=!1,e.emit("resume"),Lo(e),t.flowing&&!t.reading)e.read(0)}ee.prototype.pause=function(){if(V("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)V("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function Lo(e){var t=e._readableState;V("flow",t.flowing);while(t.flowing&&e.read()!==null);}ee.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(V("wrapped end"),r.decoder&&!r.ended){var l=r.decoder.end();if(l&&l.length)t.push(l)}t.push(null)}),e.on("data",function(l){if(V("wrapped data"),r.decoder)l=r.decoder.write(l);if(r.objectMode&&(l===null||l===void 0))return;else if(!r.objectMode&&(!l||!l.length))return;var u=t.push(l);if(!u)n=!0,e.pause()});for(var s in e)if(this[s]===void 0&&typeof e[s]==="function")this[s]=function(u){return function(){return e[u].apply(e,arguments)}}(s);for(var a=0;a<Mo.length;a++)e.on(Mo[a],this.emit.bind(this,Mo[a]));return this._read=function(l){if(V("wrapped _read",l),n)n=!1,e.resume()},this};if(typeof Symbol==="function")ee.prototype[Symbol.asyncIterator]=function(){if(ko===void 0)ko=Kh();return ko(this)};Object.defineProperty(ee.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(ee.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(ee.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){if(this._readableState)this._readableState.flowing=t}});ee._fromList=ad;Object.defineProperty(ee.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ad(e,t){if(t.length===0)return null;var r;if(t.objectMode)r=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else r=t.buffer.consume(e,t.decoder);return r}function No(e){var t=e._readableState;if(V("endReadable",t.endEmitted),!t.endEmitted)t.ended=!0,process.nextTick(u2,t,e)}function u2(e,t){if(V("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished)t.destroy()}}}if(typeof Symbol==="function")ee.from=function(e,t){if(Oo===void 0)Oo=Zh();return Oo(ee,e,t)};function od(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var or=v(function(N5,cd){var c2=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};cd.exports=st;var ud=qo(),Ro=li();Yr()(st,ud);{oi=c2(Ro.prototype);for(Ln=0;Ln<oi.length;Ln++)if(qn=oi[Ln],!st.prototype[qn])st.prototype[qn]=Ro.prototype[qn]}var oi,qn,Ln;function st(e){if(!(this instanceof st))return new st(e);if(ud.call(this,e),Ro.call(this,e),this.allowHalfOpen=!0,e){if(e.readable===!1)this.readable=!1;if(e.writable===!1)this.writable=!1;if(e.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",f2)}}Object.defineProperty(st.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(st.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(st.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function f2(){if(this._writableState.ended)return;process.nextTick(h2,this)}function h2(e){e.end()}Object.defineProperty(st.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(t){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=t,this._writableState.destroyed=t}})});var li=v(function(A5,gd){gd.exports=le;function hd(e){var t=this;this.next=null,this.entry=null,this.finish=function(){j2(t,e)}}var Ur;le.WritableState=Cn;var d2={deprecate:Oh()},dd=U("stream"),ci=U("buffer").Buffer,p2=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function m2(e){return ci.from(e)}function g2(e){return ci.isBuffer(e)||e instanceof p2}var Po=po(),y2=mo(),b2=y2.getHighWaterMark,It=qt().codes,{ERR_INVALID_ARG_TYPE:w2,ERR_METHOD_NOT_IMPLEMENTED:_2,ERR_MULTIPLE_CALLBACK:v2,ERR_STREAM_CANNOT_PIPE:S2,ERR_STREAM_DESTROYED:E2,ERR_STREAM_NULL_VALUES:x2,ERR_STREAM_WRITE_AFTER_END:k2,ERR_UNKNOWN_ENCODING:O2}=It,Wr=Po.errorOrDestroy;Yr()(le,dd);function M2(){}function Cn(e,t,r){if(Ur=Ur||or(),e=e||{},typeof r!=="boolean")r=t instanceof Ur;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=b2(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){R2(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new hd(this)}Cn.prototype.getBuffer=function(){var t=this.bufferedRequest,r=[];while(t)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Cn.prototype,"buffer",{get:d2.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var ui;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")ui=Function.prototype[Symbol.hasInstance],Object.defineProperty(le,Symbol.hasInstance,{value:function(t){if(ui.call(this,t))return!0;if(this!==le)return!1;return t&&t._writableState instanceof Cn}});else ui=function(t){return t instanceof this};function le(e){Ur=Ur||or();var t=this instanceof Ur;if(!t&&!ui.call(le,this))return new le(e);if(this._writableState=new Cn(e,this,t),this.writable=!0,e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}dd.call(this)}le.prototype.pipe=function(){Wr(this,new S2)};function T2(e,t){var r=new k2;Wr(e,r),process.nextTick(t,r)}function N2(e,t,r,n){var s;if(r===null)s=new x2;else if(typeof r!=="string"&&!t.objectMode)s=new w2("chunk",["string","Buffer"],r);if(s)return Wr(e,s),process.nextTick(n,s),!1;return!0}le.prototype.write=function(e,t,r){var n=this._writableState,s=!1,a=!n.objectMode&&g2(e);if(a&&!ci.isBuffer(e))e=m2(e);if(typeof t==="function")r=t,t=null;if(a)t="buffer";else if(!t)t=n.defaultEncoding;if(typeof r!=="function")r=M2;if(n.ending)T2(this,r);else if(a||N2(this,n,e,r))n.pendingcb++,s=D2(this,n,a,e,t,r);return s};le.prototype.cork=function(){this._writableState.corked++};le.prototype.uncork=function(){var e=this._writableState;if(e.corked){if(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)pd(this,e)}};le.prototype.setDefaultEncoding=function(t){if(typeof t==="string")t=t.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new O2(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(le.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function A2(e,t,r){if(!e.objectMode&&e.decodeStrings!==!1&&typeof t==="string")t=ci.from(t,r);return t}Object.defineProperty(le.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function D2(e,t,r,n,s,a){if(!r){var l=A2(t,n,s);if(n!==l)r=!0,s="buffer",n=l}var u=t.objectMode?1:n.length;t.length+=u;var h=t.length<t.highWaterMark;if(!h)t.needDrain=!0;if(t.writing||t.corked){var d=t.lastBufferedRequest;if(t.lastBufferedRequest={chunk:n,encoding:s,isBuf:r,callback:a,next:null},d)d.next=t.lastBufferedRequest;else t.bufferedRequest=t.lastBufferedRequest;t.bufferedRequestCount+=1}else Co(e,t,!1,u,n,s,a);return h}function Co(e,t,r,n,s,a,l){if(t.writelen=n,t.writecb=l,t.writing=!0,t.sync=!0,t.destroyed)t.onwrite(new E2("write"));else if(r)e._writev(s,t.onwrite);else e._write(s,a,t.onwrite);t.sync=!1}function L2(e,t,r,n,s){if(--t.pendingcb,r)process.nextTick(s,n),process.nextTick(Rn,e,t),e._writableState.errorEmitted=!0,Wr(e,n);else s(n),e._writableState.errorEmitted=!0,Wr(e,n),Rn(e,t)}function q2(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function R2(e,t){var r=e._writableState,{sync:n,writecb:s}=r;if(typeof s!=="function")throw new v2;if(q2(r),t)L2(e,r,n,t,s);else{var a=md(r)||e.destroyed;if(!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest)pd(e,r);if(n)process.nextTick(fd,e,r,a,s);else fd(e,r,a,s)}}function fd(e,t,r,n){if(!r)C2(e,t);t.pendingcb--,n(),Rn(e,t)}function C2(e,t){if(t.length===0&&t.needDrain)t.needDrain=!1,e.emit("drain")}function pd(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=Array(n),a=t.corkedRequestsFree;a.entry=r;var l=0,u=!0;while(r){if(s[l]=r,!r.isBuf)u=!1;r=r.next,l+=1}if(s.allBuffers=u,Co(e,t,!0,t.length,s,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next)t.corkedRequestsFree=a.next,a.next=null;else t.corkedRequestsFree=new hd(t);t.bufferedRequestCount=0}else{while(r){var h=r.chunk,d=r.encoding,b=r.callback,m=t.objectMode?1:h.length;if(Co(e,t,!1,m,h,d,b),r=r.next,t.bufferedRequestCount--,t.writing)break}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r,t.bufferProcessing=!1}le.prototype._write=function(e,t,r){r(new _2("_write()"))};le.prototype._writev=null;le.prototype.end=function(e,t,r){var n=this._writableState;if(typeof e==="function")r=e,e=null,t=null;else if(typeof t==="function")r=t,t=null;if(e!==null&&e!==void 0)this.write(e,t);if(n.corked)n.corked=1,this.uncork();if(!n.ending)F2(this,n,r);return this};Object.defineProperty(le.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function md(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function P2(e,t){e._final(function(r){if(t.pendingcb--,r)Wr(e,r);t.prefinished=!0,e.emit("prefinish"),Rn(e,t)})}function I2(e,t){if(!t.prefinished&&!t.finalCalled)if(typeof e._final==="function"&&!t.destroyed)t.pendingcb++,t.finalCalled=!0,process.nextTick(P2,e,t);else t.prefinished=!0,e.emit("prefinish")}function Rn(e,t){var r=md(t);if(r){if(I2(e,t),t.pendingcb===0){if(t.finished=!0,e.emit("finish"),t.autoDestroy){var n=e._readableState;if(!n||n.autoDestroy&&n.endEmitted)e.destroy()}}}return r}function F2(e,t,r){if(t.ending=!0,Rn(e,t),r)if(t.finished)process.nextTick(r);else e.once("finish",r);t.ended=!0,e.writable=!1}function j2(e,t,r){var n=e.entry;e.entry=null;while(n){var s=n.callback;t.pendingcb--,s(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(le.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(t){if(!this._writableState)return;this._writableState.destroyed=t}});le.prototype.destroy=Po.destroy;le.prototype._undestroy=Po.undestroy;le.prototype._destroy=function(e,t){t(e)}});var Io=v(function(D5,wd){var Y2=U("util"),yd=li(),{LEVEL:bd}=fe(),Pn=wd.exports=function(t={}){if(yd.call(this,{objectMode:!0,highWaterMark:t.highWaterMark}),this.format=t.format,this.level=t.level,this.handleExceptions=t.handleExceptions,this.handleRejections=t.handleRejections,this.silent=t.silent,t.log)this.log=t.log;if(t.logv)this.logv=t.logv;if(t.close)this.close=t.close;this.once("pipe",(r)=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",(r)=>{if(r===this.parent){if(this.parent=null,this.close)this.close()}})};Y2.inherits(Pn,yd);Pn.prototype._write=function(t,r,n){if(this.silent||t.exception===!0&&!this.handleExceptions)return n(null);let s=this.level||this.parent&&this.parent.level;if(!s||this.levels[s]>=this.levels[t[bd]]){if(t&&!this.format)return this.log(t,n);let a,l;try{l=this.format.transform(Object.assign({},t),this.format.options)}catch(u){a=u}if(a||!l){if(n(),a)throw a;return}return this.log(l,n)}return this._writableState.sync=!1,n(null)};Pn.prototype._writev=function(t,r){if(this.logv){let n=t.filter(this._accept,this);if(!n.length)return r(null);return this.logv(n,r)}for(let n=0;n<t.length;n++){if(!this._accept(t[n]))continue;if(t[n].chunk&&!this.format){this.log(t[n].chunk,t[n].callback);continue}let s,a;try{a=this.format.transform(Object.assign({},t[n].chunk),this.format.options)}catch(l){s=l}if(s||!a){if(t[n].callback(),s)throw r(null),s}else this.log(a,t[n].callback)}return r(null)};Pn.prototype._accept=function(t){let r=t.chunk;if(this.silent)return!1;let n=this.level||this.parent&&this.parent.level;if(r.exception===!0||!n||this.levels[n]>=this.levels[r[bd]]){if(this.handleExceptions||r.exception!==!0)return!0}return!1};Pn.prototype._nop=function(){return}});var jo=v(function(L5,vd){var $2=U("util"),{LEVEL:Fo}=fe(),_d=Io(),In=vd.exports=function(t={}){if(_d.call(this,t),!t.transport||typeof t.transport.log!=="function")throw Error("Invalid transport, must be an object with a log method.");this.transport=t.transport,this.level=this.level||t.transport.level,this.handleExceptions=this.handleExceptions||t.transport.handleExceptions,this._deprecated();function r(n){this.emit("error",n,this.transport)}if(!this.transport.__winstonError)this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError)};$2.inherits(In,_d);In.prototype._write=function(t,r,n){if(this.silent||t.exception===!0&&!this.handleExceptions)return n(null);if(!this.level||this.levels[this.level]>=this.levels[t[Fo]])this.transport.log(t[Fo],t.message,t,this._nop);n(null)};In.prototype._writev=function(t,r){for(let n=0;n<t.length;n++)if(this._accept(t[n]))this.transport.log(t[n].chunk[Fo],t[n].chunk.message,t[n].chunk,this._nop),t[n].callback();return r(null)};In.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
27
|
-
`))};In.prototype.close=function(){if(this.transport.close)this.transport.close();if(this.transport.__winstonError)this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null}});var lr=v(function(q5,Yo){Yo.exports=Io();Yo.exports.LegacyTransportStream=jo()});var xd=v(function(R5,Ed){var B2=U("os"),{LEVEL:Sd,MESSAGE:Hr}=fe(),U2=lr();Ed.exports=class extends U2{constructor(t={}){super(t);this.name=t.name||"console",this.stderrLevels=this._stringArrayToSet(t.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(t.consoleWarnLevels),this.eol=typeof t.eol==="string"?t.eol:B2.EOL,this.forceConsole=t.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(t,r){if(setImmediate(()=>this.emit("logged",t)),this.stderrLevels[t[Sd]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${t[Hr]}${this.eol}`);else this._consoleError(t[Hr]);if(r)r();return}else if(this.consoleWarnLevels[t[Sd]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${t[Hr]}${this.eol}`);else this._consoleWarn(t[Hr]);if(r)r();return}if(console._stdout&&!this.forceConsole)console._stdout.write(`${t[Hr]}${this.eol}`);else this._consoleLog(t[Hr]);if(r)r()}_stringArrayToSet(t,r){if(!t)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(t))throw Error(r);return t.reduce((n,s)=>{if(typeof s!=="string")throw Error(r);return n[s]=!0,n},{})}}});var fi=v(function($o,kd){Object.defineProperty($o,"__esModule",{value:!0});$o.default=W2;function W2(e){return e&&typeof e.length==="number"&&e.length>=0&&e.length%1===0}kd.exports=$o.default});var Md=v(function(Bo,Od){Object.defineProperty(Bo,"__esModule",{value:!0});Bo.default=function(e){return function(...t){var r=t.pop();return e.call(this,t,r)}};Od.exports=Bo.default});var Dd=v(function(Ad){Object.defineProperty(Ad,"__esModule",{value:!0});Ad.fallback=Td;Ad.wrap=Nd;var G2=Ad.hasQueueMicrotask=typeof queueMicrotask==="function"&&queueMicrotask,K2=Ad.hasSetImmediate=typeof setImmediate==="function"&&setImmediate,z2=Ad.hasNextTick=typeof process==="object"&&typeof process.nextTick==="function";function Td(e){setTimeout(e,0)}function Nd(e){return(t,...r)=>e(()=>t(...r))}var Fn;if(G2)Fn=queueMicrotask;else if(K2)Fn=setImmediate;else if(z2)Fn=process.nextTick;else Fn=Td;Ad.default=Nd(Fn)});var Pd=v(function(Uo,Cd){Object.defineProperty(Uo,"__esModule",{value:!0});Uo.default=sE;var X2=Md(),eE=Rd(X2),tE=Dd(),rE=Rd(tE),nE=ur();function Rd(e){return e&&e.__esModule?e:{default:e}}function sE(e){if((0,nE.isAsync)(e))return function(...t){let r=t.pop(),n=e.apply(this,t);return Ld(n,r)};return(0,eE.default)(function(t,r){var n;try{n=e.apply(this,t)}catch(s){return r(s)}if(n&&typeof n.then==="function")return Ld(n,r);else r(null,n)})}function Ld(e,t){return e.then((r)=>{qd(t,null,r)},(r)=>{qd(t,r&&(r instanceof Error||r.message)?r:Error(r))})}function qd(e,t,r){try{e(t,r)}catch(n){(0,rE.default)((s)=>{throw s},n)}}Cd.exports=Uo.default});var ur=v(function(Fd){Object.defineProperty(Fd,"__esModule",{value:!0});Fd.isAsyncIterable=Fd.isAsyncGenerator=Fd.isAsync=void 0;var aE=Pd(),oE=lE(aE);function lE(e){return e&&e.__esModule?e:{default:e}}function Id(e){return e[Symbol.toStringTag]==="AsyncFunction"}function uE(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function cE(e){return typeof e[Symbol.asyncIterator]==="function"}function fE(e){if(typeof e!=="function")throw Error("expected a function");return Id(e)?(0,oE.default)(e):e}Fd.default=fE;Fd.isAsync=Id;Fd.isAsyncGenerator=uE;Fd.isAsyncIterable=cE});var Vr=v(function(Wo,Yd){Object.defineProperty(Wo,"__esModule",{value:!0});Wo.default=mE;function mE(e,t){if(!t)t=e.length;if(!t)throw Error("arity is undefined");function r(...n){if(typeof n[t-1]==="function")return e.apply(this,n);return new Promise((s,a)=>{n[t-1]=(l,...u)=>{if(l)return a(l);s(u.length>1?u:u[0])},e.apply(this,n)})}return r}Yd.exports=Wo.default});var Bd=v(function(Vo,$d){Object.defineProperty(Vo,"__esModule",{value:!0});var yE=fi(),bE=Ho(yE),wE=ur(),_E=Ho(wE),vE=Vr(),SE=Ho(vE);function Ho(e){return e&&e.__esModule?e:{default:e}}Vo.default=(0,SE.default)((e,t,r)=>{var n=(0,bE.default)(t)?[]:{};e(t,(s,a,l)=>{(0,_E.default)(s)((u,...h)=>{if(h.length<2)[h]=h;n[a]=h,l(u)})},(s)=>r(s,n))},3);$d.exports=Vo.default});var Ko=v(function(Go,Ud){Object.defineProperty(Go,"__esModule",{value:!0});Go.default=xE;function xE(e){function t(...r){if(e===null)return;var n=e;e=null,n.apply(this,r)}return Object.assign(t,e),t}Ud.exports=Go.default});var Hd=v(function(zo,Wd){Object.defineProperty(zo,"__esModule",{value:!0});zo.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()};Wd.exports=zo.default});var Kd=v(function(Jo,Gd){Object.defineProperty(Jo,"__esModule",{value:!0});Jo.default=RE;var ME=fi(),TE=Vd(ME),NE=Hd(),AE=Vd(NE);function Vd(e){return e&&e.__esModule?e:{default:e}}function DE(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}function LE(e){var t=-1;return function(){var n=e.next();if(n.done)return null;return t++,{value:n.value,key:t}}}function qE(e){var t=e?Object.keys(e):[],r=-1,n=t.length;return function s(){var a=t[++r];if(a==="__proto__")return s();return r<n?{value:e[a],key:a}:null}}function RE(e){if((0,TE.default)(e))return DE(e);var t=(0,AE.default)(e);return t?LE(t):qE(e)}Gd.exports=Jo.default});var Zo=v(function(Qo,zd){Object.defineProperty(Qo,"__esModule",{value:!0});Qo.default=PE;function PE(e){return function(...t){if(e===null)throw Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}zd.exports=Qo.default});var hi=v(function(Xo,Jd){Object.defineProperty(Xo,"__esModule",{value:!0});var FE={};Xo.default=FE;Jd.exports=Xo.default});var Zd=v(function(el,Qd){Object.defineProperty(el,"__esModule",{value:!0});el.default=UE;var YE=hi(),$E=BE(YE);function BE(e){return e&&e.__esModule?e:{default:e}}function UE(e,t,r,n){let s=!1,a=!1,l=!1,u=0,h=0;function d(){if(u>=t||l||s)return;l=!0,e.next().then(({value:g,done:S})=>{if(a||s)return;if(l=!1,S){if(s=!0,u<=0)n(null);return}u++,r(g,h,b),h++,d()}).catch(m)}function b(g,S){if(u-=1,a)return;if(g)return m(g);if(g===!1){s=!0,a=!0;return}if(S===$E.default||s&&u<=0)return s=!0,n(null);d()}function m(g){if(a)return;l=!1,s=!0,n(g)}d()}Qd.exports=el.default});var rp=v(function(tl,tp){Object.defineProperty(tl,"__esModule",{value:!0});var HE=Ko(),VE=jn(HE),GE=Kd(),KE=jn(GE),zE=Zo(),JE=jn(zE),Xd=ur(),QE=Zd(),ep=jn(QE),ZE=hi(),XE=jn(ZE);function jn(e){return e&&e.__esModule?e:{default:e}}tl.default=(e)=>(t,r,n)=>{if(n=(0,VE.default)(n),e<=0)throw RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if((0,Xd.isAsyncGenerator)(t))return(0,ep.default)(t,e,r,n);if((0,Xd.isAsyncIterable)(t))return(0,ep.default)(t[Symbol.asyncIterator](),e,r,n);var s=(0,KE.default)(t),a=!1,l=!1,u=0,h=!1;function d(m,g){if(l)return;if(u-=1,m)a=!0,n(m);else if(m===!1)a=!0,l=!0;else if(g===XE.default||a&&u<=0)return a=!0,n(null);else if(!h)b()}function b(){h=!0;while(u<e&&!a){var m=s();if(m===null){if(a=!0,u<=0)n(null);return}u+=1,r(m.value,m.key,(0,JE.default)(d))}h=!1}b()};tp.exports=tl.default});var sl=v(function(nl,np){Object.defineProperty(nl,"__esModule",{value:!0});var tx=rp(),rx=rl(tx),nx=ur(),sx=rl(nx),ix=Vr(),ax=rl(ix);function rl(e){return e&&e.__esModule?e:{default:e}}function ox(e,t,r,n){return(0,rx.default)(t)(e,(0,sx.default)(r),n)}nl.default=(0,ax.default)(ox,4);np.exports=nl.default});var ap=v(function(il,ip){Object.defineProperty(il,"__esModule",{value:!0});var ux=sl(),cx=sp(ux),fx=Vr(),hx=sp(fx);function sp(e){return e&&e.__esModule?e:{default:e}}function dx(e,t,r){return(0,cx.default)(e,1,t,r)}il.default=(0,hx.default)(dx,3);ip.exports=il.default});var up=v(function(al,lp){Object.defineProperty(al,"__esModule",{value:!0});al.default=wx;var mx=Bd(),gx=op(mx),yx=ap(),bx=op(yx);function op(e){return e&&e.__esModule?e:{default:e}}function wx(e,t){return(0,gx.default)(bx.default,e,t)}lp.exports=al.default});var ol=v(function(Y5,fp){fp.exports=St;var di=qt().codes,{ERR_METHOD_NOT_IMPLEMENTED:vx,ERR_MULTIPLE_CALLBACK:Sx,ERR_TRANSFORM_ALREADY_TRANSFORMING:Ex,ERR_TRANSFORM_WITH_LENGTH_0:xx}=di,pi=or();Yr()(St,pi);function kx(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Sx);if(r.writechunk=null,r.writecb=null,t!=null)this.push(t);n(e);var s=this._readableState;if(s.reading=!1,s.needReadable||s.length<s.highWaterMark)this._read(s.highWaterMark)}function St(e){if(!(this instanceof St))return new St(e);if(pi.call(this,e),this._transformState={afterTransform:kx.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",Ox)}function Ox(){var e=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(t,r){cp(e,t,r)});else cp(this,null,null)}St.prototype.push=function(e,t){return this._transformState.needTransform=!1,pi.prototype.push.call(this,e,t)};St.prototype._transform=function(e,t,r){r(new vx("_transform()"))};St.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var s=this._readableState;if(n.needTransform||s.needReadable||s.length<s.highWaterMark)this._read(s.highWaterMark)}};St.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&!t.transforming)t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform);else t.needTransform=!0};St.prototype._destroy=function(e,t){pi.prototype._destroy.call(this,e,function(r){t(r)})};function cp(e,t,r){if(t)return e.emit("error",t);if(r!=null)e.push(r);if(e._writableState.length)throw new xx;if(e._transformState.transforming)throw new Ex;return e.push(null)}});var pp=v(function($5,dp){dp.exports=Yn;var hp=ol();Yr()(Yn,hp);function Yn(e){if(!(this instanceof Yn))return new Yn(e);hp.call(this,e)}Yn.prototype._transform=function(e,t,r){r(null,e)}});var wp=v(function(B5,bp){var ll;function Mx(e){var t=!1;return function(){if(t)return;t=!0,e.apply(void 0,arguments)}}var yp=qt().codes,{ERR_MISSING_ARGS:Tx,ERR_STREAM_DESTROYED:Nx}=yp;function mp(e){if(e)throw e}function Ax(e){return e.setHeader&&typeof e.abort==="function"}function Dx(e,t,r,n){n=Mx(n);var s=!1;if(e.on("close",function(){s=!0}),ll===void 0)ll=ti();ll(e,{readable:t,writable:r},function(l){if(l)return n(l);s=!0,n()});var a=!1;return function(l){if(s)return;if(a)return;if(a=!0,Ax(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();n(l||new Nx("pipe"))}}function gp(e){e()}function Lx(e,t){return e.pipe(t)}function qx(e){if(!e.length)return mp;if(typeof e[e.length-1]!=="function")return mp;return e.pop()}function Rx(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=qx(t);if(Array.isArray(t[0]))t=t[0];if(t.length<2)throw new Tx("streams");var s,a=t.map(function(l,u){var h=u<t.length-1,d=u>0;return Dx(l,h,d,function(b){if(!s)s=b;if(b)a.forEach(gp);if(h)return;a.forEach(gp),n(s)})});return t.reduce(Lx)}bp.exports=Rx});var cr=v(function(Ue,Bn){var $n=U("stream");if(process.env.READABLE_STREAM==="disable"&&$n)Bn.exports=$n.Readable,Object.assign(Bn.exports,$n),Bn.exports.Stream=$n;else Ue=Bn.exports=qo(),Ue.Stream=$n||Ue,Ue.Readable=Ue,Ue.Writable=li(),Ue.Duplex=or(),Ue.Transform=ol(),Ue.PassThrough=pp(),Ue.finished=ti(),Ue.pipeline=wp()});var Sp=v(function(U5,vp){var Gr=[],Un=[],ul=function(){};function fl(e){if(~Gr.indexOf(e))return!1;return Gr.push(e),!0}function hl(e){ul=e}function Cx(e){var t=[];for(var r=0;r<Gr.length;r++){if(Gr[r].async){t.push(Gr[r]);continue}if(Gr[r](e))return!0}if(!t.length)return!1;return new Promise(function(s){Promise.all(t.map(function(l){return l(e)})).then(function(l){s(l.some(Boolean))})})}function dl(e){if(~Un.indexOf(e))return!1;return Un.push(e),!0}function cl(){ul.apply(ul,arguments)}function _p(e){for(var t=0;t<Un.length;t++)e=Un[t].apply(Un[t],arguments);return e}function pl(e,t){var r=Object.prototype.hasOwnProperty;for(var n in t)if(r.call(t,n))e[n]=t[n];return e}function Px(e){return e.enabled=!1,e.modify=dl,e.set=hl,e.use=fl,pl(function(){return!1},e)}function Ix(e){function t(){var r=Array.prototype.slice.call(arguments,0);return cl.call(cl,e,_p(r,e)),!0}return e.enabled=!0,e.modify=dl,e.set=hl,e.use=fl,pl(t,e)}vp.exports=function(t){return t.introduce=pl,t.enabled=Cx,t.process=_p,t.modify=dl,t.write=cl,t.nope=Px,t.yep=Ix,t.set=hl,t.use=fl,t}});var Tp=v(function(W5,Mp){var it={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]},xp=Object.create(null);for(let e in it)if(Object.hasOwn(it,e))xp[it[e]]=e;var be={to:{},get:{}};be.get=function(e){let t=e.slice(0,3).toLowerCase(),r,n;switch(t){case"hsl":{r=be.get.hsl(e),n="hsl";break}case"hwb":{r=be.get.hwb(e),n="hwb";break}default:{r=be.get.rgb(e),n="rgb";break}}if(!r)return null;return{model:n,value:r}};be.get.rgb=function(e){if(!e)return null;let t=/^#([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*)?\)$/,s=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,a=/^(\w+)$/,l=[0,0,0,1],u,h,d;if(u=e.match(r)){d=u[2],u=u[1];for(h=0;h<3;h++){let b=h*2;l[h]=Number.parseInt(u.slice(b,b+2),16)}if(d)l[3]=Number.parseInt(d,16)/255}else if(u=e.match(t)){u=u[1],d=u[3];for(h=0;h<3;h++)l[h]=Number.parseInt(u[h]+u[h],16);if(d)l[3]=Number.parseInt(d+d,16)/255}else if(u=e.match(n)){for(h=0;h<3;h++)l[h]=Number.parseInt(u[h+1],10);if(u[4])l[3]=u[5]?Number.parseFloat(u[4])*0.01:Number.parseFloat(u[4])}else if(u=e.match(s)){for(h=0;h<3;h++)l[h]=Math.round(Number.parseFloat(u[h+1])*2.55);if(u[4])l[3]=u[5]?Number.parseFloat(u[4])*0.01:Number.parseFloat(u[4])}else if(u=e.match(a)){if(u[1]==="transparent")return[0,0,0,0];if(!Object.hasOwn(it,u[1]))return null;return l=it[u[1]],l[3]=1,l}else return null;for(h=0;h<3;h++)l[h]=Ft(l[h],0,255);return l[3]=Ft(l[3],0,1),l};be.get.hsl=function(e){if(!e)return null;let t=/^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=e.match(t);if(r){let n=Number.parseFloat(r[4]),s=(Number.parseFloat(r[1])%360+360)%360,a=Ft(Number.parseFloat(r[2]),0,100),l=Ft(Number.parseFloat(r[3]),0,100),u=Ft(Number.isNaN(n)?1:n,0,1);return[s,a,l,u]}return null};be.get.hwb=function(e){if(!e)return null;let t=/^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=e.match(t);if(r){let n=Number.parseFloat(r[4]),s=(Number.parseFloat(r[1])%360+360)%360,a=Ft(Number.parseFloat(r[2]),0,100),l=Ft(Number.parseFloat(r[3]),0,100),u=Ft(Number.isNaN(n)?1:n,0,1);return[s,a,l,u]}return null};be.to.hex=function(...e){return"#"+mi(e[0])+mi(e[1])+mi(e[2])+(e[3]<1?mi(Math.round(e[3]*255)):"")};be.to.rgb=function(...e){return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};be.to.rgb.percent=function(...e){let t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"};be.to.hsl=function(...e){return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};be.to.hwb=function(...e){let t="";if(e.length>=4&&e[3]!==1)t=", "+e[3];return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};be.to.keyword=function(...e){return xp[e.slice(0,3)]};function Ft(e,t,r){return Math.min(Math.max(t,e),r)}function mi(e){let t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var kp={};for(let e of Object.keys(it))kp[it[e]]=e;var R={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"]}},Et=0.008856451679035631;function Kr(e){let t=e>0.0031308?1.055*e**0.4166666666666667-0.055:e*12.92;return Math.min(Math.max(0,t),1)}function zr(e){return e>0.04045?((e+0.055)/1.055)**2.4:e/12.92}for(let e of Object.keys(R)){if(!("channels"in R[e]))throw Error("missing channels property: "+e);if(!("labels"in R[e]))throw Error("missing channel labels property: "+e);if(R[e].labels.length!==R[e].channels)throw Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=R[e];delete R[e].channels,delete R[e].labels,Object.defineProperty(R[e],"channels",{value:t}),Object.defineProperty(R[e],"labels",{value:r})}R.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),a=Math.max(t,r,n),l=a-s,u,h;switch(a){case s:{u=0;break}case t:{u=(r-n)/l;break}case r:{u=2+(n-t)/l;break}case n:{u=4+(t-r)/l;break}}if(u=Math.min(u*60,360),u<0)u+=360;let d=(s+a)/2;if(a===s)h=0;else if(d<=0.5)h=l/(a+s);else h=l/(2-a-s);return[u,h*100,d*100]};R.rgb.hsv=function(e){let t,r,n,s,a,l=e[0]/255,u=e[1]/255,h=e[2]/255,d=Math.max(l,u,h),b=d-Math.min(l,u,h),m=function(g){return(d-g)/6/b+0.5};if(b===0)s=0,a=0;else{switch(a=b/d,t=m(l),r=m(u),n=m(h),d){case l:{s=n-r;break}case u:{s=0.3333333333333333+t-n;break}case h:{s=0.6666666666666666+r-t;break}}if(s<0)s+=1;else if(s>1)s-=1}return[s*360,a*100,d*100]};R.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],s=R.rgb.hsl(e)[0],a=0.00392156862745098*Math.min(t,Math.min(r,n));return n=1-0.00392156862745098*Math.max(t,Math.max(r,n)),[s,a*100,n*100]};R.rgb.oklab=function(e){let t=zr(e[0]/255),r=zr(e[1]/255),n=zr(e[2]/255),s=Math.cbrt(0.4122214708*t+0.5363325363*r+0.0514459929*n),a=Math.cbrt(0.2119034982*t+0.6806995451*r+0.1073969566*n),l=Math.cbrt(0.0883024619*t+0.2817188376*r+0.6299787005*n),u=0.2104542553*s+0.793617785*a-0.0040720468*l,h=1.9779984951*s-2.428592205*a+0.4505937099*l,d=0.0259040371*s+0.7827717662*a-0.808675766*l;return[u*100,h*100,d*100]};R.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-r,1-n),a=(1-t-s)/(1-s)||0,l=(1-r-s)/(1-s)||0,u=(1-n-s)/(1-s)||0;return[a*100,l*100,u*100,s*100]};function Fx(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}R.rgb.keyword=function(e){let t=kp[e];if(t)return t;let r=Number.POSITIVE_INFINITY,n;for(let s of Object.keys(it)){let a=it[s],l=Fx(e,a);if(l<r)r=l,n=s}return n};R.keyword.rgb=function(e){return it[e]};R.rgb.xyz=function(e){let t=zr(e[0]/255),r=zr(e[1]/255),n=zr(e[2]/255),s=t*0.4124564+r*0.3575761+n*0.1804375,a=t*0.2126729+r*0.7151522+n*0.072175,l=t*0.0193339+r*0.119192+n*0.9503041;return[s*100,a*100,l*100]};R.rgb.lab=function(e){let t=R.rgb.xyz(e),r=t[0],n=t[1],s=t[2];r/=95.047,n/=100,s/=108.883,r=r>Et?r**0.3333333333333333:7.787*r+0.13793103448275862,n=n>Et?n**0.3333333333333333:7.787*n+0.13793103448275862,s=s>Et?s**0.3333333333333333:7.787*s+0.13793103448275862;let a=116*n-16,l=500*(r-n),u=200*(n-s);return[a,l,u]};R.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s,a;if(r===0)return a=n*255,[a,a,a];let l=n<0.5?n*(1+r):n+r-n*r,u=2*n-l,h=[0,0,0];for(let d=0;d<3;d++){if(s=t+0.3333333333333333*-(d-1),s<0)s++;if(s>1)s--;if(6*s<1)a=u+(l-u)*6*s;else if(2*s<1)a=l;else if(3*s<2)a=u+(l-u)*(0.6666666666666666-s)*6;else a=u;h[d]=a*255}return h};R.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=r,a=Math.max(n,0.01);n*=2,r*=n<=1?n:2-n,s*=a<=1?a:2-a;let l=(n+r)/2,u=n===0?2*s/(a+s):2*r/(n+r);return[t,u*100,l*100]};R.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,s=Math.floor(t)%6,a=t-Math.floor(t),l=255*n*(1-r),u=255*n*(1-r*a),h=255*n*(1-r*(1-a));switch(n*=255,s){case 0:return[n,h,l];case 1:return[u,n,l];case 2:return[l,n,h];case 3:return[l,u,n];case 4:return[h,l,n];case 5:return[n,l,u]}};R.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=Math.max(n,0.01),a,l;l=(2-r)*n;let u=(2-r)*s;return a=r*s,a/=u<=1?u:2-u,a=a||0,l/=2,[t,a*100,l*100]};R.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s=r+n,a;if(s>1)r/=s,n/=s;let l=Math.floor(6*t),u=1-n;if(a=6*t-l,(l&1)!==0)a=1-a;let h=r+a*(u-r),d,b,m;switch(l){default:case 6:case 0:{d=u,b=h,m=r;break}case 1:{d=h,b=u,m=r;break}case 2:{d=r,b=u,m=h;break}case 3:{d=r,b=h,m=u;break}case 4:{d=h,b=r,m=u;break}case 5:{d=u,b=r,m=h;break}}return[d*255,b*255,m*255]};R.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=e[3]/100,a=1-Math.min(1,t*(1-s)+s),l=1-Math.min(1,r*(1-s)+s),u=1-Math.min(1,n*(1-s)+s);return[a*255,l*255,u*255]};R.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s,a,l;return s=t*3.2404542+r*-1.5371385+n*-0.4985314,a=t*-0.969266+r*1.8760108+n*0.041556,l=t*0.0556434+r*-0.2040259+n*1.0572252,s=Kr(s),a=Kr(a),l=Kr(l),[s*255,a*255,l*255]};R.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>Et?t**0.3333333333333333:7.787*t+0.13793103448275862,r=r>Et?r**0.3333333333333333:7.787*r+0.13793103448275862,n=n>Et?n**0.3333333333333333:7.787*n+0.13793103448275862;let s=116*r-16,a=500*(t-r),l=200*(r-n);return[s,a,l]};R.xyz.oklab=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=Math.cbrt(0.8189330101*t+0.3618667424*r-0.1288597137*n),a=Math.cbrt(0.0329845436*t+0.9293118715*r+0.0361456387*n),l=Math.cbrt(0.0482003018*t+0.2643662691*r+0.633851707*n),u=0.2104542553*s+0.793617785*a-0.0040720468*l,h=1.9779984951*s-2.428592205*a+0.4505937099*l,d=0.0259040371*s+0.7827717662*a-0.808675766*l;return[u*100,h*100,d*100]};R.oklab.oklch=function(e){return R.lab.lch(e)};R.oklab.xyz=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=(0.999999998*t+0.396337792*r+0.215803758*n)**3,a=(1.000000008*t-0.105561342*r-0.063854175*n)**3,l=(1.000000055*t-0.089484182*r-1.291485538*n)**3,u=1.227013851*s-0.55779998*a+0.281256149*l,h=-0.040580178*s+1.11225687*a-0.071676679*l,d=-0.076381285*s-0.421481978*a+1.58616322*l;return[u*100,h*100,d*100]};R.oklab.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=(t+0.3963377774*r+0.2158037573*n)**3,a=(t-0.1055613458*r-0.0638541728*n)**3,l=(t-0.0894841775*r-1.291485548*n)**3,u=Kr(4.0767416621*s-3.3077115913*a+0.2309699292*l),h=Kr(-1.2684380046*s+2.6097574011*a-0.3413193965*l),d=Kr(-0.0041960863*s-0.7034186147*a+1.707614701*l);return[u*255,h*255,d*255]};R.oklch.oklab=function(e){return R.lch.lab(e)};R.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],s,a,l;a=(t+16)/116,s=r/500+a,l=a-n/200;let u=a**3,h=s**3,d=l**3;return a=u>Et?u:(a-0.13793103448275862)/7.787,s=h>Et?h:(s-0.13793103448275862)/7.787,l=d>Et?d:(l-0.13793103448275862)/7.787,s*=95.047,a*=100,l*=108.883,[s,a,l]};R.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],s;if(s=Math.atan2(n,r)*360/2/Math.PI,s<0)s+=360;let l=Math.sqrt(r*r+n*n);return[t,l,s]};R.lch.lab=function(e){let t=e[0],r=e[1],s=e[2]/360*2*Math.PI,a=r*Math.cos(s),l=r*Math.sin(s);return[t,a,l]};R.rgb.ansi16=function(e,t=null){let[r,n,s]=e,a=t===null?R.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let l=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(r/255));if(a===2)l+=60;return l};R.hsv.ansi16=function(e){return R.rgb.ansi16(R.hsv.rgb(e),e[2])};R.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];if(t>>4===r>>4&&r>>4===n>>4){if(t<8)return 16;if(t>248)return 231;return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};R.ansi16.rgb=function(e){e=e[0];let t=e%10;if(t===0||t===7){if(e>50)t+=3.5;return t=t/10.5*255,[t,t,t]}let r=(Math.trunc(e>50)+1)*0.5,n=(t&1)*r*255,s=(t>>1&1)*r*255,a=(t>>2&1)*r*255;return[n,s,a]};R.ansi256.rgb=function(e){if(e=e[0],e>=232){let a=(e-232)*10+8;return[a,a,a]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,s=t%6/5*255;return[r,n,s]};R.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};R.hex.rgb=function(e){let t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let r=t[0];if(t[0].length===3)r=[...r].map((u)=>u+u).join("");let n=Number.parseInt(r,16),s=n>>16&255,a=n>>8&255,l=n&255;return[s,a,l]};R.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,r),n),a=Math.min(Math.min(t,r),n),l=s-a,u,h=l<1?a/(1-l):0;if(l<=0)u=0;else if(s===t)u=(r-n)/l%6;else if(s===r)u=2+(n-t)/l;else u=4+(t-r)/l;return u/=6,u%=1,[u*360,l*100,h*100]};R.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<0.5?2*t*r:2*t*(1-r),s=0;if(n<1)s=(r-0.5*n)/(1-n);return[e[0],n*100,s*100]};R.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,s=0;if(n<1)s=(r-n)/(1-n);return[e[0],n*100,s*100]};R.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let s=[0,0,0],a=t%1*6,l=a%1,u=1-l,h=0;switch(Math.floor(a)){case 0:{s[0]=1,s[1]=l,s[2]=0;break}case 1:{s[0]=u,s[1]=1,s[2]=0;break}case 2:{s[0]=0,s[1]=1,s[2]=l;break}case 3:{s[0]=0,s[1]=u,s[2]=1;break}case 4:{s[0]=l,s[1]=0,s[2]=1;break}default:s[0]=1,s[1]=0,s[2]=u}return h=(1-r)*n,[(r*s[0]+h)*255,(r*s[1]+h)*255,(r*s[2]+h)*255]};R.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),s=0;if(n>0)s=t/n;return[e[0],s*100,n*100]};R.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+0.5*t,s=0;if(n>0&&n<0.5)s=t/(2*n);else if(n>=0.5&&n<1)s=t/(2*(1-n));return[e[0],s*100,n*100]};R.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};R.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,s=n-t,a=0;if(s<1)a=(n-s)/(1-s);return[e[0],s*100,a*100]};R.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};R.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};R.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};R.gray.hsl=function(e){return[0,0,e[0]]};R.gray.hsv=R.gray.hsl;R.gray.hwb=function(e){return[0,100,e[0]]};R.gray.cmyk=function(e){return[0,0,0,e[0]]};R.gray.lab=function(e){return[e[0],0,0]};R.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(n.length)+n};R.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};function jx(){let e={},t=Object.keys(R);for(let{length:r}=t,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function Yx(e){let t=jx(),r=[e];t[e].distance=0;while(r.length>0){let n=r.pop(),s=Object.keys(R[n]);for(let{length:a}=s,l=0;l<a;l++){let u=s[l],h=t[u];if(h.distance===-1)h.distance=t[n].distance+1,h.parent=n,r.unshift(u)}}return t}function $x(e,t){return function(r){return t(e(r))}}function Bx(e,t){let r=[t[e].parent,e],n=R[t[e].parent][e],s=t[e].parent;while(t[s].parent)r.unshift(t[s].parent),n=$x(R[t[s].parent][s],n),s=t[s].parent;return n.conversion=r,n}function Ux(e){let t=Yx(e),r={},n=Object.keys(t);for(let{length:s}=n,a=0;a<s;a++){let l=n[a];if(t[l].parent===null)continue;r[l]=Bx(l,t)}return r}var ve={},Wx=Object.keys(R);function Hx(e){let t=function(...r){let n=r[0];if(n===void 0||n===null)return n;if(n.length>1)r=n;return e(r)};if("conversion"in e)t.conversion=e.conversion;return t}function Vx(e){let t=function(...r){let n=r[0];if(n===void 0||n===null)return n;if(n.length>1)r=n;let s=e(r);if(typeof s==="object")for(let{length:a}=s,l=0;l<a;l++)s[l]=Math.round(s[l]);return s};if("conversion"in e)t.conversion=e.conversion;return t}for(let e of Wx){ve[e]={},Object.defineProperty(ve[e],"channels",{value:R[e].channels}),Object.defineProperty(ve[e],"labels",{value:R[e].labels});let t=Ux(e),r=Object.keys(t);for(let n of r){let s=t[n];ve[e][n]=Vx(s),ve[e][n].raw=Hx(s)}}var Op=["keyword","gray","hex"],ml={};for(let e of Object.keys(ve))ml[[...ve[e].labels].sort().join("")]=e;var gl={};function ye(e,t){if(!(this instanceof ye))return new ye(e,t);if(t&&t in Op)t=null;if(t&&!(t in ve))throw Error("Unknown model: "+t);let r,n;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof ye)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==="string"){let s=be.get(e);if(s===null)throw Error("Unable to parse color from string: "+e);this.model=s.model,n=ve[this.model].channels,this.color=s.value.slice(0,n),this.valpha=typeof s.value[n]==="number"?s.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=ve[this.model].channels;let s=Array.prototype.slice.call(e,0,n);this.color=yl(s,n),this.valpha=typeof e[n]==="number"?e[n]:1}else if(typeof e==="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let s=Object.keys(e);if("alpha"in e)s.splice(s.indexOf("alpha"),1),this.valpha=typeof e.alpha==="number"?e.alpha:0;let a=s.sort().join("");if(!(a in ml))throw Error("Unable to parse color from object: "+JSON.stringify(e));this.model=ml[a];let{labels:l}=ve[this.model],u=[];for(r=0;r<l.length;r++)u.push(e[l[r]]);this.color=yl(u)}if(gl[this.model]){n=ve[this.model].channels;for(r=0;r<n;r++){let s=gl[this.model][r];if(s)this.color[r]=s(this.color[r])}}if(this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze)Object.freeze(this)}ye.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in be.to?this:this.rgb();t=t.round(typeof e==="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return be.to[t.model](...r)},percentString(e){let t=this.rgb().round(typeof e==="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return be.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=ve[this.model],{labels:r}=ve[this.model];for(let n=0;n<t;n++)e[r[n]]=this.color[n];if(this.valpha!==1)e.alpha=this.valpha;return e},unitArray(){let e=this.rgb().color;if(e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1)e.push(this.valpha);return e},unitObject(){let e=this.rgb().object();if(e.r/=255,e.g/=255,e.b/=255,this.valpha!==1)e.alpha=this.valpha;return e},round(e){return e=Math.max(e||0,0),new ye([...this.color.map(Kx(e)),this.valpha],this.model)},alpha(e){if(e!==void 0)return new ye([...this.color,Math.max(0,Math.min(1,e))],this.model);return this.valpha},red:ue("rgb",0,ge(255)),green:ue("rgb",1,ge(255)),blue:ue("rgb",2,ge(255)),hue:ue(["hsl","hsv","hsl","hwb","hcg"],0,(e)=>(e%360+360)%360),saturationl:ue("hsl",1,ge(100)),lightness:ue("hsl",2,ge(100)),saturationv:ue("hsv",1,ge(100)),value:ue("hsv",2,ge(100)),chroma:ue("hcg",1,ge(100)),gray:ue("hcg",2,ge(100)),white:ue("hwb",1,ge(100)),wblack:ue("hwb",2,ge(100)),cyan:ue("cmyk",0,ge(100)),magenta:ue("cmyk",1,ge(100)),yellow:ue("cmyk",2,ge(100)),black:ue("cmyk",3,ge(100)),x:ue("xyz",0,ge(95.047)),y:ue("xyz",1,ge(100)),z:ue("xyz",2,ge(108.833)),l:ue("lab",0,ge(100)),a:ue("lab",1),b:ue("lab",2),keyword(e){if(e!==void 0)return new ye(e);return ve[this.model].keyword(this.color)},hex(e){if(e!==void 0)return new ye(e);return be.to.hex(...this.rgb().round().color)},hexa(e){if(e!==void 0)return new ye(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();if(r.length===1)r="0"+r;return be.to.hex(...t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,n]of e.entries()){let s=n/255;t[r]=s<=0.04045?s/12.92:((s+0.055)/1.055)**2.4}return 0.2126*t[0]+0.7152*t[1]+0.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();if(t>r)return(t+0.05)/(r+0.05);return(r+0.05)/(t+0.05)},level(e){let t=this.contrast(e);if(t>=7)return"AAA";return t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*0.3+e[1]*0.59+e[2]*0.11;return ye.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),n=this.rgb(),s=t===void 0?0.5:t,a=2*s-1,l=r.alpha()-n.alpha(),u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2,h=1-u;return ye.rgb(u*r.red()+h*n.red(),u*r.green()+h*n.green(),u*r.blue()+h*n.blue(),r.alpha()*s+n.alpha()*(1-s))}};for(let e of Object.keys(ve)){if(Op.includes(e))continue;let{channels:t}=ve[e];ye.prototype[e]=function(...r){if(this.model===e)return new ye(this);if(r.length>0)return new ye(r,e);return new ye([...zx(ve[this.model][e].raw(this.color)),this.valpha],e)},ye[e]=function(...r){let n=r[0];if(typeof n==="number")n=yl(r,t);return new ye(n,e)}}function Gx(e,t){return Number(e.toFixed(t))}function Kx(e){return function(t){return Gx(t,e)}}function ue(e,t,r){e=Array.isArray(e)?e:[e];for(let n of e)(gl[n]||=[])[t]=r;return e=e[0],function(n){let s;if(n!==void 0){if(r)n=r(n);return s=this[e](),s.color[t]=n,s}if(s=this[e]().color[t],r)s=r(s);return s}}function ge(e){return function(t){return Math.max(0,Math.min(e,t))}}function zx(e){return Array.isArray(e)?e:[e]}function yl(e,t){for(let r=0;r<t;r++)if(typeof e[r]!=="number")e[r]=0;return e}function Jx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qx=function(t){for(var r=0,n=0;r<t.length;n=t.charCodeAt(r++)+((n<<5)-n));var s=Math.floor(Math.abs(Math.sin(n)*1e4%1*16777216)).toString(16);return"#"+Array(6-s.length+1).join("0")+s},Ep=Jx(Qx);function Zx(e,t){let r=e.split(t||":"),n=Ep(r[0]);if(!r.length)return n;for(let s=0,a=r.length-1;s<a;s++)n=ye(n).mix(ye(Ep(r[s+1]))).saturate(1).hex();return n}Mp.exports=Zx});var Ap=v(function(H5,Np){function Je(e,t){if(t)return new Je(e).style(t);if(!(this instanceof Je))return new Je(e);this.text=e}Je.prototype.prefix="\x1B[";Je.prototype.suffix="m";Je.prototype.hex=function(t){if(t=t[0]==="#"?t.substring(1):t,t.length===3)t=t.split(""),t[5]=t[2],t[4]=t[2],t[3]=t[1],t[2]=t[1],t[1]=t[0],t=t.join("");var r=t.substring(0,2),n=t.substring(2,4),s=t.substring(4,6);return[parseInt(r,16),parseInt(n,16),parseInt(s,16)]};Je.prototype.rgb=function(t,r,n){var s=t/255*5,a=r/255*5,l=n/255*5;return this.ansi(s,a,l)};Je.prototype.ansi=function(t,r,n){var s=Math.round(t),a=Math.round(r),l=Math.round(n);return 16+s*36+a*6+l};Je.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Je.prototype.style=function(t){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(t))+this.suffix+this.text+this.reset()};Np.exports=Je});var Lp=v(function(V5,Dp){var Xx=Tp(),ek=Ap();Dp.exports=function(t,r){var n=r.namespace,s=r.colors!==!1?ek(n+":",Xx(n)):n+":";return t[0]=s+" "+t[0],t}});var Rp=v(function(G5,qp){qp.exports=function(t,r){if(!r)return!1;var n=r.split(/[\s,]+/),s=0;for(;s<n.length;s++){if(r=n[s].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(t))return!1;continue}if(new RegExp("^"+r+"$").test(t))return!0}return!1}});var Pp=v(function(K5,Cp){var tk=Rp();Cp.exports=function(t){return function(n){try{return tk(n,t())}catch(s){}return!1}}});var Fp=v(function(z5,Ip){var rk=Pp();Ip.exports=rk(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var Yp=v(function(J5,jp){jp.exports=function(e,t){try{Function.prototype.apply.call(console.log,console,t)}catch(r){}}});var Wn=v(function(Q5,$p){var nk=Sp(),sk=U("tty").isatty(1),gi=nk(function e(t,r){if(r=r||{},r.colors="colors"in r?r.colors:sk,r.namespace=t,r.prod=!1,r.dev=!0,!e.enabled(t)&&!(r.force||e.force))return e.nope(r);return e.yep(r)});gi.modify(Lp());gi.use(Fp());gi.set(Yp());$p.exports=gi});var Up=v(function(Z5,Bp){var bl=U("fs"),{StringDecoder:ik}=U("string_decoder"),{Stream:ak}=cr();function ok(){}Bp.exports=(e,t)=>{let r=Buffer.alloc(65536),n=new ik("utf8"),s=new ak,a="",l=0,u=0;if(e.start===-1)delete e.start;if(s.readable=!0,s.destroy=()=>{s.destroyed=!0,s.emit("end"),s.emit("close")},bl.open(e.file,"a+","0644",(h,d)=>{if(h){if(!t)s.emit("error",h);else t(h);s.destroy();return}(function b(){if(s.destroyed){bl.close(d,ok);return}return bl.read(d,r,0,r.length,l,(m,g)=>{if(m){if(!t)s.emit("error",m);else t(m);s.destroy();return}if(!g){if(a){if(e.start==null||u>e.start)if(!t)s.emit("line",a);else t(null,a);u++,a=""}return setTimeout(b,1000)}let S=n.write(r.slice(0,g));if(!t)s.emit("data",S);S=(a+S).split(/\n+/);let y=S.length-1,_=0;for(;_<y;_++){if(e.start==null||u>e.start)if(!t)s.emit("line",S[_]);else t(null,S[_]);u++}return a=S[y],l+=g,b()})})()}),!t)return s;return s.destroy}});var Gp=v(function(X5,Vp){var Ce=U("fs"),Se=U("path"),Wp=up(),lk=U("zlib"),{MESSAGE:uk}=fe(),{Stream:ck,PassThrough:Hp}=cr(),fk=lr(),Qe=Wn()("winston:file"),hk=U("os"),dk=Up();Vp.exports=class extends fk{constructor(t={}){super(t);this.name=t.name||"file";function r(n,...s){s.slice(1).forEach((a)=>{if(t[a])throw Error(`Cannot set ${a} and ${n} together`)})}if(this._stream=new Hp,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),t.filename||t.dirname)r("filename or dirname","stream"),this._basename=this.filename=t.filename?Se.basename(t.filename):"winston.log",this.dirname=t.dirname||Se.dirname(t.filename),this.options=t.options||{flags:"a"};else if(t.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(t.stream)),this.dirname=Se.dirname(this._dest.path);else throw Error("Cannot log to file without filename or stream.");if(this.maxsize=t.maxsize||null,this.rotationFormat=t.rotationFormat||!1,this.zippedArchive=t.zippedArchive||!1,this.maxFiles=t.maxFiles||null,this.eol=typeof t.eol==="string"?t.eol:hk.EOL,this.tailable=t.tailable||!1,this.lazy=t.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname)this._createLogDirIfNotExist(this.dirname);if(!this.lazy)this.open()}finishIfEnding(){if(this._ending)if(this._opening)this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())});else this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}_final(t){if(this._opening){this.once("open",()=>this._final(t));return}if(this._stream.end(),!this._dest)return t();if(this._dest.writableFinished)return t();this._dest.once("finish",t),this._dest.once("error",t)}log(t,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(t,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(t,r)});return}if(this.lazy){if(!this._fileExist){if(!this._opening)this.open();this.once("open",()=>{this._fileExist=!0,this.log(t,r);return});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{if(!this._opening)this.open();this.once("open",()=>{this.log(t,r);return});return});return}}let n=`${t[uk]}${this.eol}`,s=Buffer.byteLength(n);function a(){if(this._size+=s,this._pendingSize-=s,Qe("logged %s %s",this._size,n),this.emit("logged",t),this._rotate)return;if(this._opening)return;if(!this._needsNewFile())return;if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}if(this._pendingSize+=s,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize))this.rotatedWhileOpening=!0;let l=this._stream.write(n,a.bind(this));if(!l)this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()});else r();return Qe("written",l,this._drain),this.finishIfEnding(),l}query(t,r){if(typeof t==="function")r=t,t={};t=m(t);let n=Se.join(this.dirname,this.filename),s="",a=[],l=0,u=Ce.createReadStream(n,{encoding:"utf8"});u.on("error",(g)=>{if(u.readable)u.destroy();if(!r)return;return g.code!=="ENOENT"?r(g):r(null,a)}),u.on("data",(g)=>{g=(s+g).split(/\n+/);let S=g.length-1,y=0;for(;y<S;y++){if(!t.start||l>=t.start)h(g[y]);l++}s=g[S]}),u.on("close",()=>{if(s)h(s,!0);if(t.order==="desc")a=a.reverse();if(r)r(null,a)});function h(g,S){try{let y=JSON.parse(g);if(b(y))d(y)}catch(y){if(!S)u.emit("error",y)}}function d(g){if(t.rows&&a.length>=t.rows&&t.order!=="desc"){if(u.readable)u.destroy();return}if(t.fields)g=t.fields.reduce((S,y)=>(S[y]=g[y],S),{});if(t.order==="desc"){if(a.length>=t.rows)a.shift()}a.push(g)}function b(g){if(!g)return;if(typeof g!=="object")return;let S=new Date(g.timestamp);if(t.from&&S<t.from||t.until&&S>t.until||t.level&&t.level!==g.level)return;return!0}function m(g){if(g=g||{},g.rows=g.rows||g.limit||10,g.start=g.start||0,g.until=g.until||new Date,typeof g.until!=="object")g.until=new Date(g.until);if(g.from=g.from||g.until-86400000,typeof g.from!=="object")g.from=new Date(g.from);return g.order=g.order||"desc",g}}stream(t={}){let r=Se.join(this.dirname,this.filename),n=new ck,s={file:r,start:t.start};return n.destroy=dk(s,(a,l)=>{if(a)return n.emit("error",a);try{n.emit("data",l),l=JSON.parse(l),n.emit("log",l)}catch(u){n.emit("error",u)}}),n}open(){if(!this.filename)return;if(this._opening)return;this._opening=!0,this.stat((t,r)=>{if(t)return this.emit("error",t);Qe("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{if(!this._stream.emit("rotate"))this._rotate=!1})})}stat(t){let r=this._getFile(),n=Se.join(this.dirname,r);Ce.stat(n,(s,a)=>{if(s&&s.code==="ENOENT")return Qe("ENOENT\xA0ok",n),this.filename=r,t(null,0);if(s)return Qe(`err ${s.code} ${n}`),t(s);if(!a||this._needsNewFile(a.size))return this._incFile(()=>this.stat(t));this.filename=r,t(null,a.size)})}close(t){if(!this._stream)return;this._stream.end(()=>{if(t)t();this.emit("flush"),this.emit("closed")})}_needsNewFile(t){return t=t||this._size,this.maxsize&&t>=this.maxsize}_onError(t){this.emit("error",t)}_setupStream(t){return t.on("error",this._onError),t}_cleanupStream(t){return t.removeListener("error",this._onError),t.destroy(),t}_rotateFile(){this._incFile(()=>this.open())}_endStream(t=()=>{}){if(this._dest)this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),t()});else t()}_createStream(t){let r=Se.join(this.dirname,this.filename);Qe("create stream start",r,this.options);let n=Ce.createWriteStream(r,this.options).on("error",(s)=>Qe(s)).on("close",()=>Qe("close",n.path,n.bytesWritten)).on("open",()=>{if(Qe("file open ok",r),this.emit("open",r),t.pipe(n),this.rotatedWhileOpening)this._stream=new Hp,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(n),t.end()});return Qe("create stream ok",r),n}_incFile(t){Qe("_incFile",this.filename);let r=Se.extname(this._basename),n=Se.basename(this._basename,r),s=[];if(this.zippedArchive)s.push(function(a){let l=this._created>0&&!this.tailable?this._created:"";this._compressFile(Se.join(this.dirname,`${n}${l}${r}`),Se.join(this.dirname,`${n}${l}${r}.gz`),a)}.bind(this));s.push(function(a){if(!this.tailable)this._created+=1,this._checkMaxFilesIncrementing(r,n,a);else this._checkMaxFilesTailable(r,n,a)}.bind(this)),Wp(s,t)}_getFile(){let t=Se.extname(this._basename),r=Se.basename(this._basename,t),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${n}${t}`:`${r}${t}`}_checkMaxFilesIncrementing(t,r,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);let s=this._created-this.maxFiles,a=s!==0?s:"",l=this.zippedArchive?".gz":"",u=`${r}${a}${t}${l}`,h=Se.join(this.dirname,u);Ce.unlink(h,n)}_checkMaxFilesTailable(t,r,n){let s=[];if(!this.maxFiles)return;let a=this.zippedArchive?".gz":"";for(let l=this.maxFiles-1;l>1;l--)s.push(function(u,h){let d=`${r}${u-1}${t}${a}`,b=Se.join(this.dirname,d);Ce.exists(b,(m)=>{if(!m)return h(null);d=`${r}${u}${t}${a}`,Ce.rename(b,Se.join(this.dirname,d),h)})}.bind(this,l));Wp(s,()=>{Ce.rename(Se.join(this.dirname,`${r}${t}${a}`),Se.join(this.dirname,`${r}1${t}${a}`),n)})}_compressFile(t,r,n){Ce.access(t,Ce.F_OK,(s)=>{if(s)return n();var a=lk.createGzip(),l=Ce.createReadStream(t),u=Ce.createWriteStream(r);u.on("finish",()=>{Ce.unlink(t,n)}),l.pipe(a).pipe(u)})}_createLogDirIfNotExist(t){if(!Ce.existsSync(t))Ce.mkdirSync(t,{recursive:!0})}}});var zp=v(function(eI,Kp){var pk=U("http"),mk=U("https"),{Stream:gk}=cr(),yk=lr(),{configure:bk}=On();Kp.exports=class extends yk{constructor(t={}){super(t);if(this.options=t,this.name=t.name||"http",this.ssl=!!t.ssl,this.host=t.host||"localhost",this.port=t.port,this.auth=t.auth,this.path=t.path||"",this.maximumDepth=t.maximumDepth,this.agent=t.agent,this.headers=t.headers||{},this.headers["content-type"]="application/json",this.batch=t.batch||!1,this.batchInterval=t.batchInterval||5000,this.batchCount=t.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},!this.port)this.port=this.ssl?443:80}log(t,r){if(this._request(t,null,null,(n,s)=>{if(s&&s.statusCode!==200)n=Error(`Invalid HTTP Status Code: ${s.statusCode}`);if(n)this.emit("warn",n);else this.emit("logged",t)}),r)setImmediate(r)}query(t,r){if(typeof t==="function")r=t,t={};t={method:"query",params:this.normalizeQuery(t)};let n=t.params.auth||null;delete t.params.auth;let s=t.params.path||null;delete t.params.path,this._request(t,n,s,(a,l,u)=>{if(l&&l.statusCode!==200)a=Error(`Invalid HTTP Status Code: ${l.statusCode}`);if(a)return r(a);if(typeof u==="string")try{u=JSON.parse(u)}catch(h){return r(h)}r(null,u)})}stream(t={}){let r=new gk;t={method:"stream",params:t};let n=t.params.path||null;delete t.params.path;let s=t.params.auth||null;delete t.params.auth;let a="",l=this._request(t,s,n);return r.destroy=()=>l.destroy(),l.on("data",(u)=>{u=(a+u).split(/\n+/);let h=u.length-1,d=0;for(;d<h;d++)try{r.emit("log",JSON.parse(u[d]))}catch(b){r.emit("error",b)}a=u[h]}),l.on("error",(u)=>r.emit("error",u)),r}_request(t,r,n,s){if(t=t||{},r=r||this.auth,n=n||this.path||"",this.batch)this._doBatch(t,s,r,n);else this._doRequest(t,s,r,n)}_doBatch(t,r,n,s){if(this.batchOptions.push(t),this.batchOptions.length===1){let a=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){a.batchTimeoutID=-1,a._doBatchRequest(a.batchCallback,n,s)},this.batchInterval)}if(this.batchOptions.length===this.batchCount)this._doBatchRequest(this.batchCallback,n,s)}_doBatchRequest(t,r,n){if(this.batchTimeoutID>0)clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1;let s=this.batchOptions.slice();this.batchOptions=[],this._doRequest(s,t,r,n)}_doRequest(t,r,n,s){let a=Object.assign({},this.headers);if(n&&n.bearer)a.Authorization=`Bearer ${n.bearer}`;let l=(this.ssl?mk:pk).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${s.replace(/^\//,"")}`,headers:a,auth:n&&n.username&&n.password?`${n.username}:${n.password}`:"",agent:this.agent});l.on("error",r),l.on("response",(h)=>h.on("end",()=>r(null,h)).resume());let u=bk({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});l.end(Buffer.from(u(t,this.options.replacer),"utf8"))}}});var wl=v(function(tI,Jp){var at=(e)=>e!==null&&typeof e==="object"&&typeof e.pipe==="function";at.writable=(e)=>at(e)&&e.writable!==!1&&typeof e._write==="function"&&typeof e._writableState==="object";at.readable=(e)=>at(e)&&e.readable!==!1&&typeof e._read==="function"&&typeof e._readableState==="object";at.duplex=(e)=>at.writable(e)&&at.readable(e);at.transform=(e)=>at.duplex(e)&&typeof e._transform==="function";Jp.exports=at});var Zp=v(function(rI,Qp){var wk=wl(),{MESSAGE:_k}=fe(),vk=U("os"),Sk=lr();Qp.exports=class extends Sk{constructor(t={}){super(t);if(!t.stream||!wk(t.stream))throw Error("options.stream is required.");this._stream=t.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=t.stream._writableState.objectMode,this.eol=typeof t.eol==="string"?t.eol:vk.EOL}log(t,r){if(setImmediate(()=>this.emit("logged",t)),this.isObjectMode){if(this._stream.write(t),r)r();return}if(this._stream.write(`${t[_k]}${this.eol}`),r)r();return}}});var Xp=v(function(Hn){Object.defineProperty(Hn,"Console",{configurable:!0,enumerable:!0,get(){return xd()}});Object.defineProperty(Hn,"File",{configurable:!0,enumerable:!0,get(){return Gp()}});Object.defineProperty(Hn,"Http",{configurable:!0,enumerable:!0,get(){return zp()}});Object.defineProperty(Hn,"Stream",{configurable:!0,enumerable:!0,get(){return Zp()}})});var bi=v(function(Ek){var yi=uo(),{configs:_l}=fe();Ek.cli=yi.levels(_l.cli);Ek.npm=yi.levels(_l.npm);Ek.syslog=yi.levels(_l.syslog);Ek.addColors=yi.levels});var tm=v(function(vl,em){Object.defineProperty(vl,"__esModule",{value:!0});var Tk=fi(),Nk=fr(Tk),Ak=hi(),Dk=fr(Ak),Lk=sl(),qk=fr(Lk),Rk=Ko(),Ck=fr(Rk),Pk=Zo(),Ik=fr(Pk),Fk=ur(),jk=fr(Fk),Yk=Vr(),$k=fr(Yk);function fr(e){return e&&e.__esModule?e:{default:e}}function Bk(e,t,r){r=(0,Ck.default)(r);var n=0,s=0,{length:a}=e,l=!1;if(a===0)r(null);function u(h,d){if(h===!1)l=!0;if(l===!0)return;if(h)r(h);else if(++s===a||d===Dk.default)r(null)}for(;n<a;n++)t(e[n],n,(0,Ik.default)(u))}function Uk(e,t,r){return(0,qk.default)(e,1/0,t,r)}function Wk(e,t,r){var n=(0,Nk.default)(e)?Bk:Uk;return n(e,(0,jk.default)(t),r)}vl.default=(0,$k.default)(Wk,3);em.exports=vl.default});var nm=v(function(Sl,rm){Object.defineProperty(Sl,"__esModule",{value:!0});Sl.default=Vk;function Vk(e){return(t,r,n)=>e(t,n)}rm.exports=Sl.default});var _i=v(function(El,sm){Object.defineProperty(El,"__esModule",{value:!0});var Kk=tm(),zk=wi(Kk),Jk=nm(),Qk=wi(Jk),Zk=ur(),Xk=wi(Zk),eO=Vr(),tO=wi(eO);function wi(e){return e&&e.__esModule?e:{default:e}}function rO(e,t,r){return(0,zk.default)(e,(0,Qk.default)((0,Xk.default)(t)),r)}El.default=(0,tO.default)(rO,3);sm.exports=El.default});var am=v(function(iI,im){var sO=Object.prototype.toString;im.exports=function(t){if(typeof t.displayName==="string"&&t.constructor.name)return t.displayName;else if(typeof t.name==="string"&&t.name)return t.name;if(typeof t==="object"&&t.constructor&&typeof t.constructor.name==="string")return t.constructor.name;var r=t.toString(),n=sO.call(t).slice(8,-1);if(n==="Function")r=r.substring(r.indexOf("(")+1,r.indexOf(")"));else r=n;return r||"anonymous"}});var xl=v(function(aI,om){var iO=am();om.exports=function(t){var r=0,n;function s(){if(r)return n;return r=1,n=t.apply(this,arguments),t=null,n}return s.displayName=iO(t),s}});var kl=v(function(lO){lO.get=function(e){var t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},n=Error.prepareStackTrace;Error.prepareStackTrace=function(a,l){return l},Error.captureStackTrace(r,e||lO.get);var s=r.stack;return Error.prepareStackTrace=n,Error.stackTraceLimit=t,s};lO.parse=function(e){if(!e.stack)return[];var t=this,r=e.stack.split(`
|
|
28
|
-
`).slice(1);return r.map(function(n){if(n.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:n,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var
|
|
29
|
-
`),stack:t&&t.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(t)}}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:
|
|
30
|
-
`),stack:t&&t.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(t)}}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:
|
|
31
|
-
`));if(S)this.exceptions.handle(S);if(y)this.rejections.handle(y)}getHighestLogLevel(){let e=
|
|
32
|
-
`))}_onEvent(e,t){function r(n){if(e==="error"&&!this.transports.includes(t))this.add(t);this.emit(e,n,t)}if(!t["__winston"+e])t["__winston"+e]=r.bind(this),t.on(e,t["__winston"+e])}_addDefaultMeta(e){if(this.defaultMeta)Object.assign(e,this.defaultMeta)}}function
|
|
25
|
+
${A}`;return _.pop(),`{${L}}`}case"number":return isFinite(y)?String(y):t?t(y):"null";case"boolean":return y===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(y);default:return t?t(y):void 0}}function m(S,y,_){switch(typeof y){case"string":return Pt(y);case"object":{if(y===null)return"null";if(typeof y.toJSON==="function"){if(y=y.toJSON(S),typeof y!=="object")return m(S,y,_);if(y===null)return"null"}if(_.indexOf(y)!==-1)return r;let k="",O=y.length!==void 0;if(O&&Array.isArray(y)){if(y.length===0)return"[]";if(l<_.length+1)return'"[Array]"';_.push(y);let L=Math.min(y.length,u),F=0;for(;F<L-1;F++){let I=m(String(F),y[F],_);k+=I!==void 0?I:"null",k+=","}let N=m(String(F),y[F],_);if(k+=N!==void 0?N:"null",y.length-1>u){let I=y.length-u-1;k+=`,"... ${nr(I)} not stringified"`}return _.pop(),`[${k}]`}let A=Object.keys(y),E=A.length;if(E===0)return"{}";if(l<_.length+1)return'"[Object]"';let T="",q=Math.min(E,u);if(O&&go(y))k+=sh(y,",",u),A=A.slice(y.length),q-=y.length,T=",";if(i)A=mo(A,a);_.push(y);for(let L=0;L<q;L++){let F=A[L],N=m(F,y[F],_);if(N!==void 0)k+=`${T}${Pt(F)}:${N}`,T=","}if(E>u){let L=E-u;k+=`${T}"...":"${nr(L)} not stringified"`}return _.pop(),`{${k}}`}case"number":return isFinite(y)?String(y):t?t(y):"null";case"boolean":return y===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(y);default:return t?t(y):void 0}}function g(S,y,_){if(arguments.length>1){let k="";if(typeof _==="number")k=" ".repeat(Math.min(_,10));else if(typeof _==="string")k=_.slice(0,10);if(y!=null){if(typeof y==="function")return h("",{"":S},[],y,k,"");if(Array.isArray(y))return d("",S,[],x1(y),k,"")}if(k.length!==0)return b("",S,[],k,"")}return m("",S,[])}return g}});var bo=v(function(m5,uh){var T1=Ie(),{MESSAGE:N1}=pe(),lh=Ln();function A1(e,t){if(typeof t==="bigint")return t.toString();return t}uh.exports=T1((e,t)=>{let r=lh.configure(t);return e[N1]=r(e,t.replacer||A1,t.space),e})});var fh=v(function(g5,ch){var D1=Ie();ch.exports=D1((e,t)=>{if(t.message)return e.message=`[${t.label}] ${e.message}`,e;return e.label=t.label,e})});var dh=v(function(y5,hh){var L1=Ie(),{MESSAGE:q1}=pe(),P1=Ln();hh.exports=L1((e)=>{let t={};if(e.message)t["@message"]=e.message,delete e.message;if(e.timestamp)t["@timestamp"]=e.timestamp,delete e.timestamp;return t["@fields"]=e,e[q1]=P1(t),e})});var mh=v(function(b5,ph){var R1=Ie();function C1(e,t,r){let n=t.reduce((a,l)=>(a[l]=e[l],delete e[l],a),{}),i=Object.keys(e).reduce((a,l)=>(a[l]=e[l],delete e[l],a),{});return Object.assign(e,n,{[r]:i}),e}function I1(e,t,r){return e[r]=t.reduce((n,i)=>(n[i]=e[i],delete e[i],n),{}),e}ph.exports=R1((e,t={})=>{let r="metadata";if(t.key)r=t.key;let n=[];if(!t.fillExcept&&!t.fillWith)n.push("level"),n.push("message");if(t.fillExcept)n=t.fillExcept;if(n.length>0)return C1(e,n,r);if(t.fillWith)return I1(e,t.fillWith,r);return e})});var yh=v(function(w5,gh){var Br=1000,Wr=Br*60,Ur=Wr*60,sr=Ur*24,F1=sr*7,j1=sr*365.25;gh.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return $1(e);else if(r==="number"&&isFinite(e))return t.long?B1(e):Y1(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function $1(e){if(e=String(e),e.length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*j1;case"weeks":case"week":case"w":return r*F1;case"days":case"day":case"d":return r*sr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ur;case"minutes":case"minute":case"mins":case"min":case"m":return r*Wr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Br;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function Y1(e){var t=Math.abs(e);if(t>=sr)return Math.round(e/sr)+"d";if(t>=Ur)return Math.round(e/Ur)+"h";if(t>=Wr)return Math.round(e/Wr)+"m";if(t>=Br)return Math.round(e/Br)+"s";return e+"ms"}function B1(e){var t=Math.abs(e);if(t>=sr)return es(e,t,sr,"day");if(t>=Ur)return es(e,t,Ur,"hour");if(t>=Wr)return es(e,t,Wr,"minute");if(t>=Br)return es(e,t,Br,"second");return e+" ms"}function es(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var wh=v(function(qn,bh){var W1=Ie(),U1=yh();bh.exports=W1((e)=>{let t=+new Date;return qn.diff=t-(qn.prevTime||t),qn.prevTime=t,e.ms=`+${U1(qn.diff)}`,e})});var Sh=v(function(_5,vh){var H1=W("util").inspect,V1=Ie(),{LEVEL:G1,MESSAGE:_h,SPLAT:K1}=pe();vh.exports=V1((e,t={})=>{let r=Object.assign({},e);return delete r[G1],delete r[_h],delete r[K1],e[_h]=H1(r,!1,t.depth||null,t.colorize),e})});var kh=v(function(v5,ts){var{MESSAGE:z1}=pe();class wo{constructor(e){this.template=e}transform(e){return e[z1]=this.template(e),e}}ts.exports=(e)=>new wo(e);ts.exports.Printf=ts.exports.Format=wo});var Oh=v(function(S5,Eh){var J1=Ie(),{MESSAGE:xh}=pe(),Q1=Ln();Eh.exports=J1((e)=>{let t=Q1(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";if(t!=="{}")e[xh]=`${e.level}:${r} ${e.message} ${t}`;else e[xh]=`${e.level}:${r} ${e.message}`;return e})});var Dh=v(function(k5,Ah){var Th=W("util"),{SPLAT:Mh}=pe(),Z1=/%[scdjifoO%]/g,X1=/%%/g;class Nh{constructor(e){this.options=e}_splat(e,t){let r=e.message,n=e[Mh]||e.splat||[],i=r.match(X1),a=i&&i.length||0,u=t.length-a-n.length,h=u<0?n.splice(u,-1*u):[],d=h.length;if(d)for(let b=0;b<d;b++)Object.assign(e,h[b]);return e.message=Th.format(r,...n),e}transform(e){let t=e.message,r=e[Mh]||e.splat;if(!r||!r.length)return e;let n=t&&t.match&&t.match(Z1);if(!n&&(r||r.length)){let i=r.length>1?r.splice(0):r,a=i.length;if(a)for(let l=0;l<a;l++)Object.assign(e,i[l]);return e}if(n)return this._splat(e,n);return e}}Ah.exports=(e)=>new Nh(e)});var qh=v(function(rs,Lh){(function(e,t){typeof rs==="object"&&typeof Lh<"u"?t(rs):typeof define==="function"&&define.amd?define(["exports"],t):t(e.fecha={})})(rs,function(e){var t=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",n="\\d\\d",i="\\d{3}",a="\\d{4}",l="[^\\s]+",u=/\[([^]*?)\]/gm;function h(M,j){var G=[];for(var ke=0,B=M.length;ke<B;ke++)G.push(M[ke].substr(0,j));return G}var d=function(M){return function(j,G){var ke=G[M].map(function(Pe){return Pe.toLowerCase()}),B=ke.indexOf(j.toLowerCase());if(B>-1)return B;return null}};function b(M){var j=[];for(var G=1;G<arguments.length;G++)j[G-1]=arguments[G];for(var ke=0,B=j;ke<B.length;ke++){var Pe=B[ke];for(var Re in Pe)M[Re]=Pe[Re]}return M}var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["January","February","March","April","May","June","July","August","September","October","November","December"],S=h(g,3),y=h(m,3),_={dayNamesShort:y,dayNames:m,monthNamesShort:S,monthNames:g,amPm:["am","pm"],DoFn:function(M){return M+["th","st","nd","rd"][M%10>3?0:(M-M%10!==10?1:0)*M%10]}},k=b({},_),O=function(M){return k=b(k,M)},A=function(M){return M.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},E=function(M,j){if(j===void 0)j=2;M=String(M);while(M.length<j)M="0"+M;return M},T={D:function(M){return String(M.getDate())},DD:function(M){return E(M.getDate())},Do:function(M,j){return j.DoFn(M.getDate())},d:function(M){return String(M.getDay())},dd:function(M){return E(M.getDay())},ddd:function(M,j){return j.dayNamesShort[M.getDay()]},dddd:function(M,j){return j.dayNames[M.getDay()]},M:function(M){return String(M.getMonth()+1)},MM:function(M){return E(M.getMonth()+1)},MMM:function(M,j){return j.monthNamesShort[M.getMonth()]},MMMM:function(M,j){return j.monthNames[M.getMonth()]},YY:function(M){return E(String(M.getFullYear()),4).substr(2)},YYYY:function(M){return E(M.getFullYear(),4)},h:function(M){return String(M.getHours()%12||12)},hh:function(M){return E(M.getHours()%12||12)},H:function(M){return String(M.getHours())},HH:function(M){return E(M.getHours())},m:function(M){return String(M.getMinutes())},mm:function(M){return E(M.getMinutes())},s:function(M){return String(M.getSeconds())},ss:function(M){return E(M.getSeconds())},S:function(M){return String(Math.round(M.getMilliseconds()/100))},SS:function(M){return E(Math.round(M.getMilliseconds()/10),2)},SSS:function(M){return E(M.getMilliseconds(),3)},a:function(M,j){return M.getHours()<12?j.amPm[0]:j.amPm[1]},A:function(M,j){return M.getHours()<12?j.amPm[0].toUpperCase():j.amPm[1].toUpperCase()},ZZ:function(M){var j=M.getTimezoneOffset();return(j>0?"-":"+")+E(Math.floor(Math.abs(j)/60)*100+Math.abs(j)%60,4)},Z:function(M){var j=M.getTimezoneOffset();return(j>0?"-":"+")+E(Math.floor(Math.abs(j)/60),2)+":"+E(Math.abs(j)%60,2)}},q=function(M){return+M-1},L=[null,r],F=[null,l],N=["isPm",l,function(M,j){var G=M.toLowerCase();if(G===j.amPm[0])return 0;else if(G===j.amPm[1])return 1;return null}],I=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(M){var j=(M+"").match(/([+-]|\d\d)/gi);if(j){var G=+j[1]*60+parseInt(j[2],10);return j[0]==="+"?G:-G}return 0}],ne={D:["day",r],DD:["day",n],Do:["day",r+l,function(M){return parseInt(M,10)}],M:["month",r,q],MM:["month",n,q],YY:["year",n,function(M){var j=new Date,G=+(""+j.getFullYear()).substr(0,2);return+(""+(+M>68?G-1:G)+M)}],h:["hour",r,void 0,"isPm"],hh:["hour",n,void 0,"isPm"],H:["hour",r],HH:["hour",n],m:["minute",r],mm:["minute",n],s:["second",r],ss:["second",n],YYYY:["year",a],S:["millisecond","\\d",function(M){return+M*100}],SS:["millisecond",n,function(M){return+M*10}],SSS:["millisecond",i],d:L,dd:L,ddd:F,dddd:F,MMM:["month",l,d("monthNamesShort")],MMMM:["month",l,d("monthNames")],a:N,A:N,ZZ:I,Z:I},Z={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"},H=function(M){return b(Z,M)},me=function(M,j,G){if(j===void 0)j=Z.default;if(G===void 0)G={};if(typeof M==="number")M=new Date(M);if(Object.prototype.toString.call(M)!=="[object Date]"||isNaN(M.getTime()))throw Error("Invalid Date pass to format");j=Z[j]||j;var ke=[];j=j.replace(u,function(Pe,Re){return ke.push(Re),"@@@"});var B=b(b({},k),G);return j=j.replace(t,function(Pe){return T[Pe](M,B)}),j.replace(/@@@/g,function(){return ke.shift()})};function Oe(M,j,G){if(G===void 0)G={};if(typeof j!=="string")throw Error("Invalid format in fecha parse");if(j=Z[j]||j,M.length>1000)return null;var ke=new Date,B={year:ke.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Pe=[],Re=[],Y=j.replace(u,function(Zt,Nt){return Re.push(A(Nt)),"@@@"}),Or={},Mi={};Y=A(Y).replace(t,function(Zt){var Nt=ne[Zt],Nr=Nt[0],Ce=Nt[1],Ar=Nt[3];if(Or[Nr])throw Error("Invalid format. "+Nr+" specified twice in format");if(Or[Nr]=!0,Ar)Mi[Ar]=!0;return Pe.push(Nt),"("+Ce+")"}),Object.keys(Mi).forEach(function(Zt){if(!Or[Zt])throw Error("Invalid format. "+Zt+" is required in specified format")}),Y=Y.replace(/@@@/g,function(){return Re.shift()});var mt=M.match(new RegExp(Y,"i"));if(!mt)return null;var Ti=b(b({},k),G);for(var $e=1;$e<mt.length;$e++){var Ni=Pe[$e-1],Ea=Ni[0],Ai=Ni[2],Di=Ai?Ai(mt[$e],Ti):+mt[$e];if(Di==null)return null;B[Ea]=Di}if(B.isPm===1&&B.hour!=null&&+B.hour!==12)B.hour=+B.hour+12;else if(B.isPm===0&&+B.hour===12)B.hour=0;var Mr;if(B.timezoneOffset==null){Mr=new Date(B.year,B.month,B.day,B.hour,B.minute,B.second,B.millisecond);var Tr=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]];for(var $e=0,Oa=Tr.length;$e<Oa;$e++)if(Or[Tr[$e][0]]&&B[Tr[$e][0]]!==Mr[Tr[$e][1]]())return null}else if(Mr=new Date(Date.UTC(B.year,B.month,B.day,B.hour,B.minute-B.timezoneOffset,B.second,B.millisecond)),B.month>11||B.month<0||B.day>31||B.day<1||B.hour>23||B.hour<0||B.minute>59||B.minute<0||B.second>59||B.second<0)return null;return Mr}var nt={format:me,parse:Oe,defaultI18n:_,setGlobalDateI18n:O,setGlobalDateMasks:H};e.assign=b,e.default=nt,e.format=me,e.parse=Oe,e.defaultI18n=_,e.setGlobalDateI18n=O,e.setGlobalDateMasks=H,Object.defineProperty(e,"__esModule",{value:!0})})});var Ch=v(function(x5,Rh){var Ph=qh(),eS=Ie();Rh.exports=eS((e,t={})=>{if(t.format)e.timestamp=typeof t.format==="function"?t.format():Ph.format(new Date,t.format);if(!e.timestamp)e.timestamp=new Date().toISOString();if(t.alias)e[t.alias]=e.timestamp;return e})});var Fh=v(function(E5,Ih){var Hr=io(),tS=Ie(),{MESSAGE:_o}=pe();Ih.exports=tS((e,t)=>{if(t.level!==!1)e.level=Hr.strip(e.level);if(t.message!==!1)e.message=Hr.strip(String(e.message));if(t.raw!==!1&&e[_o])e[_o]=Hr.strip(String(e[_o]));return e})});var vo=v(function(nS){var rS=nS.format=Ie();nS.levels=zf();function Me(e,t){Object.defineProperty(rS,e,{get(){return t()},configurable:!0})}Me("align",function(){return Qf()});Me("errors",function(){return eh()});Me("cli",function(){return rh()});Me("combine",function(){return ih()});Me("colorize",function(){return Zi()});Me("json",function(){return bo()});Me("label",function(){return fh()});Me("logstash",function(){return dh()});Me("metadata",function(){return mh()});Me("ms",function(){return wh()});Me("padLevels",function(){return co()});Me("prettyPrint",function(){return Sh()});Me("printf",function(){return kh()});Me("simple",function(){return Oh()});Me("splat",function(){return Dh()});Me("timestamp",function(){return Ch()});Me("uncolorize",function(){return Fh()})});var ko=v(function(sS){var{format:jh}=W("util");sS.warn={deprecated(e){return()=>{throw Error(jh("{ %s } was removed in winston@3.0.0.",e))}},useFormat(e){return()=>{throw Error([jh("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
+
`))}},forFunctions(e,t,r){r.forEach((n)=>{e[n]=sS.warn[t](n)})},forProperties(e,t,r){r.forEach((n)=>{let i=sS.warn[t](n);Object.defineProperty(e,n,{get:i,set:i})})}}});var $h=v(function(N5,aS){aS.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 Bh=v(function(A5,Yh){Yh.exports=W("util").deprecate});var Eo=v(function(D5,Uh){function oS(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;if(n||i){if(t)t(e);else if(e){if(!this._writableState)process.nextTick(xo,this,e);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(xo,this,e)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(e||null,function(a){if(!t&&a)if(!r._writableState)process.nextTick(Wh,r,a);else if(!r._writableState.errorEmitted)r._writableState.errorEmitted=!0,process.nextTick(Wh,r,a);else process.nextTick(ns,r);else if(t)process.nextTick(ns,r),t(a);else process.nextTick(ns,r)}),this}function Wh(e,t){xo(e,t),ns(e)}function ns(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function lS(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function xo(e,t){e.emit("error",t)}function uS(e,t){var{_readableState:r,_writableState:n}=e;if(r&&r.autoDestroy||n&&n.autoDestroy)e.destroy(t);else e.emit("error",t)}Uh.exports={destroy:oS,undestroy:lS,errorOrDestroy:uS}});var Rt=v(function(dS,Gh){var Vh={};function Ue(e,t,r){if(!r)r=Error;function n(a,l,u){if(typeof t==="string")return t;else return t(a,l,u)}class i extends r{constructor(a,l,u){super(n(a,l,u))}}i.prototype.name=r.name,i.prototype.code=e,Vh[e]=i}function Hh(e,t){if(Array.isArray(e)){let r=e.length;if(e=e.map((n)=>String(n)),r>2)return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1];else if(r===2)return`one of ${t} ${e[0]} or ${e[1]}`;else return`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function cS(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function fS(e,t,r){if(r===void 0||r>e.length)r=e.length;return e.substring(r-t.length,r)===t}function hS(e,t,r){if(typeof r!=="number")r=0;if(r+t.length>e.length)return!1;else return e.indexOf(t,r)!==-1}Ue("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Ue("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;if(typeof t==="string"&&cS(t,"not "))n="must not be",t=t.replace(/^not /,"");else n="must be";let i;if(fS(e," argument"))i=`The ${e} ${n} ${Hh(t,"type")}`;else{let a=hS(e,".")?"property":"argument";i=`The "${e}" ${a} ${n} ${Hh(t,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);Ue("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ue("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Ue("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ue("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Ue("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ue("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ue("ERR_STREAM_WRITE_AFTER_END","write after end");Ue("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ue("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Ue("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");dS.codes=Vh});var Oo=v(function(L5,Kh){var mS=Rt().codes.ERR_INVALID_OPT_VALUE;function gS(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function yS(e,t,r,n){var i=gS(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new mS(a,i)}return Math.floor(i)}return e.objectMode?16:16384}Kh.exports={getHighWaterMark:yS}});var zh=v(function(q5,Mo){if(typeof Object.create==="function")Mo.exports=function(t,r){if(r)t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};else Mo.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var Vr=v(function(P5,To){try{if(is=W("util"),typeof is.inherits!=="function")throw"";To.exports=is.inherits}catch(e){To.exports=zh()}var is});var td=v(function(R5,ed){function Jh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jh(Object(r),!0).forEach(function(n){bS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bS(e,t,r){if(t=Xh(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function wS(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function Zh(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n)n.writable=!0;Object.defineProperty(e,Xh(n.key),n)}}function _S(e,t,r){if(t)Zh(e.prototype,t);if(r)Zh(e,r);return Object.defineProperty(e,"prototype",{writable:!1}),e}function Xh(e){var t=vS(e,"string");return typeof t==="symbol"?t:String(t)}function vS(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SS=W("buffer"),ss=SS.Buffer,kS=W("util"),No=kS.inspect,xS=No&&No.custom||"inspect";function ES(e,t,r){ss.prototype.copy.call(e,t,r)}ed.exports=function(){function e(){wS(this,e),this.head=null,this.tail=null,this.length=0}return _S(e,[{key:"push",value:function(r){var n={data:r,next:null};if(this.length>0)this.tail.next=n;else this.head=n;this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};if(this.length===0)this.tail=n;this.head=n,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var r=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--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"";var n=this.head,i=""+n.data;while(n=n.next)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return ss.alloc(0);var n=ss.allocUnsafe(r>>>0),i=this.head,a=0;while(i)ES(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;if(r<this.head.data.length)i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r);else if(r===this.head.data.length)i=this.shift();else i=n?this._getString(r):this._getBuffer(r);return i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,a=n.data;r-=a.length;while(n=n.next){var l=n.data,u=r>l.length?l.length:r;if(u===l.length)a+=l;else a+=l.slice(0,r);if(r-=u,r===0){if(u===l.length)if(++i,n.next)this.head=n.next;else this.head=this.tail=null;else this.head=n,n.data=l.slice(u);break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=ss.allocUnsafe(r),i=this.head,a=1;i.data.copy(n),r-=i.data.length;while(i=i.next){var l=i.data,u=r>l.length?l.length:r;if(l.copy(n,n.length-r,0,u),r-=u,r===0){if(u===l.length)if(++a,i.next)this.head=i.next;else this.head=this.tail=null;else this.head=i,i.data=l.slice(u);break}++a}return this.length-=a,n}},{key:xS,value:function(r,n){return No(this,Qh(Qh({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var id=v(function(Ao,nd){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var as=W("buffer"),at=as.Buffer;function rd(e,t){for(var r in e)t[r]=e[r]}if(at.from&&at.alloc&&at.allocUnsafe&&at.allocUnsafeSlow)nd.exports=as;else rd(as,Ao),Ao.Buffer=ar;function ar(e,t,r){return at(e,t,r)}ar.prototype=Object.create(at.prototype);rd(at,ar);ar.from=function(e,t,r){if(typeof e==="number")throw TypeError("Argument must not be a number");return at(e,t,r)};ar.alloc=function(e,t,r){if(typeof e!=="number")throw TypeError("Argument must be a number");var n=at(e);if(t!==void 0)if(typeof r==="string")n.fill(t,r);else n.fill(t);else n.fill(0);return n};ar.allocUnsafe=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return at(e)};ar.allocUnsafeSlow=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return as.SlowBuffer(e)}});var qo=v(function(jS){var Lo=id().Buffer,sd=Lo.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function OS(e){if(!e)return"utf8";var t;while(!0)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function MS(e){var t=OS(e);if(typeof t!=="string"&&(Lo.isEncoding===sd||!sd(e)))throw Error("Unknown encoding: "+e);return t||e}jS.StringDecoder=Pn;function Pn(e){this.encoding=MS(e);var t;switch(this.encoding){case"utf16le":this.text=qS,this.end=PS,t=4;break;case"utf8":this.fillLast=AS,t=4;break;case"base64":this.text=RS,this.end=CS,t=3;break;default:this.write=IS,this.end=FS;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Lo.allocUnsafe(t)}Pn.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;if(r<e.length)return t?t+this.text(e,r):this.text(e,r);return t||""};Pn.prototype.end=LS;Pn.prototype.text=DS;Pn.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Do(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function TS(e,t,r){var n=t.length-1;if(n<r)return 0;var i=Do(t[n]);if(i>=0){if(i>0)e.lastNeed=i-1;return i}if(--n<r||i===-2)return 0;if(i=Do(t[n]),i>=0){if(i>0)e.lastNeed=i-2;return i}if(--n<r||i===-2)return 0;if(i=Do(t[n]),i>=0){if(i>0)if(i===2)i=0;else e.lastNeed=i-3;return i}return 0}function NS(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}}function AS(e){var t=this.lastTotal-this.lastNeed,r=NS(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function DS(e,t){var r=TS(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function LS(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"\uFFFD";return t}function qS(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function PS(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function RS(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);if(this.lastNeed=3-r,this.lastTotal=3,r===1)this.lastChar[0]=e[e.length-1];else this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1];return e.toString("base64",t,e.length-r)}function CS(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function IS(e){return e.toString(this.encoding)}function FS(e){return e&&e.length?this.write(e):""}});var os=v(function(I5,ld){var ad=Rt().codes.ERR_STREAM_PREMATURE_CLOSE;function YS(e){var t=!1;return function(){if(t)return;t=!0;for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}function BS(){}function WS(e){return e.setHeader&&typeof e.abort==="function"}function od(e,t,r){if(typeof t==="function")return od(e,null,t);if(!t)t={};r=YS(r||BS);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,a=function(){if(!e.writable)u()},l=e._writableState&&e._writableState.finished,u=function(){if(i=!1,l=!0,!n)r.call(e)},h=e._readableState&&e._readableState.endEmitted,d=function(){if(n=!1,h=!0,!i)r.call(e)},b=function(y){r.call(e,y)},m=function(){var y;if(n&&!h){if(!e._readableState||!e._readableState.ended)y=new ad;return r.call(e,y)}if(i&&!l){if(!e._writableState||!e._writableState.ended)y=new ad;return r.call(e,y)}},g=function(){e.req.on("finish",u)};if(WS(e))if(e.on("complete",u),e.on("abort",m),e.req)g();else e.on("request",g);else if(i&&!e._writableState)e.on("end",a),e.on("close",a);if(e.on("end",d),e.on("finish",u),t.error!==!1)e.on("error",b);return e.on("close",m),function(){if(e.removeListener("complete",u),e.removeListener("abort",m),e.removeListener("request",g),e.req)e.req.removeListener("finish",u);e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("end",d),e.removeListener("error",b),e.removeListener("close",m)}}ld.exports=od});var cd=v(function(F5,ud){var ls;function Ct(e,t,r){if(t=US(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function US(e){var t=HS(e,"string");return typeof t==="symbol"?t:String(t)}function HS(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VS=os(),It=Symbol("lastResolve"),or=Symbol("lastReject"),Rn=Symbol("error"),us=Symbol("ended"),lr=Symbol("lastPromise"),Po=Symbol("handlePromise"),ur=Symbol("stream");function Ft(e,t){return{value:e,done:t}}function GS(e){var t=e[It];if(t!==null){var r=e[ur].read();if(r!==null)e[lr]=null,e[It]=null,e[or]=null,t(Ft(r,!1))}}function KS(e){process.nextTick(GS,e)}function zS(e,t){return function(r,n){e.then(function(){if(t[us]){r(Ft(void 0,!0));return}t[Po](r,n)},n)}}var JS=Object.getPrototypeOf(function(){}),QS=Object.setPrototypeOf((ls={get stream(){return this[ur]},next:function(){var t=this,r=this[Rn];if(r!==null)return Promise.reject(r);if(this[us])return Promise.resolve(Ft(void 0,!0));if(this[ur].destroyed)return new Promise(function(l,u){process.nextTick(function(){if(t[Rn])u(t[Rn]);else l(Ft(void 0,!0))})});var n=this[lr],i;if(n)i=new Promise(zS(n,this));else{var a=this[ur].read();if(a!==null)return Promise.resolve(Ft(a,!1));i=new Promise(this[Po])}return this[lr]=i,i}},Ct(ls,Symbol.asyncIterator,function(){return this}),Ct(ls,"return",function(){var t=this;return new Promise(function(r,n){t[ur].destroy(null,function(i){if(i){n(i);return}r(Ft(void 0,!0))})})}),ls),JS),ZS=function(t){var r,n=Object.create(QS,(r={},Ct(r,ur,{value:t,writable:!0}),Ct(r,It,{value:null,writable:!0}),Ct(r,or,{value:null,writable:!0}),Ct(r,Rn,{value:null,writable:!0}),Ct(r,us,{value:t._readableState.endEmitted,writable:!0}),Ct(r,Po,{value:function(a,l){var u=n[ur].read();if(u)n[lr]=null,n[It]=null,n[or]=null,a(Ft(u,!1));else n[It]=a,n[or]=l},writable:!0}),r));return n[lr]=null,VS(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[or];if(a!==null)n[lr]=null,n[It]=null,n[or]=null,a(i);n[Rn]=i;return}var l=n[It];if(l!==null)n[lr]=null,n[It]=null,n[or]=null,l(Ft(void 0,!0));n[us]=!0}),t.on("readable",KS.bind(null,n)),n};ud.exports=ZS});var pd=v(function(j5,dd){function fd(e,t,r,n,i,a,l){try{var u=e[a](l),h=u.value}catch(d){r(d);return}if(u.done)t(h);else Promise.resolve(h).then(n,i)}function XS(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function l(h){fd(a,n,i,l,u,"next",h)}function u(h){fd(a,n,i,l,u,"throw",h)}l(void 0)})}}function hd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hd(Object(r),!0).forEach(function(n){t2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t2(e,t,r){if(t=r2(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function r2(e){var t=n2(e,"string");return typeof t==="symbol"?t:String(t)}function n2(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i2=Rt().codes.ERR_INVALID_ARG_TYPE;function s2(e,t,r){var n;if(t&&typeof t.next==="function")n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new i2("iterable",["Iterable"],t);var i=new e(e2({objectMode:!0},r)),a=!1;i._read=function(){if(!a)a=!0,l()};function l(){return u.apply(this,arguments)}function u(){return u=XS(function*(){try{var h=yield n.next(),{value:d,done:b}=h;if(b)i.push(null);else if(i.push(yield d))l();else a=!1}catch(m){i.destroy(m)}}),u.apply(this,arguments)}return i}dd.exports=s2});var Uo=v(function(Y5,xd){xd.exports=te;var Gr;te.ReadableState=bd;var $5=W("events").EventEmitter,yd=function(t,r){return t.listeners(r).length},In=W("stream"),cs=W("buffer").Buffer,a2=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o2(e){return cs.from(e)}function l2(e){return cs.isBuffer(e)||e instanceof a2}var Ro=W("util"),V;if(Ro&&Ro.debuglog)V=Ro.debuglog("stream");else V=function(){};var u2=td(),Bo=Eo(),c2=Oo(),f2=c2.getHighWaterMark,fs=Rt().codes,{ERR_INVALID_ARG_TYPE:h2,ERR_STREAM_PUSH_AFTER_EOF:d2,ERR_METHOD_NOT_IMPLEMENTED:p2,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:m2}=fs,Kr,Co,Io;Vr()(te,In);var Cn=Bo.errorOrDestroy,Fo=["error","close","destroy","pause","resume"];function g2(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function bd(e,t,r){if(Gr=Gr||cr(),e=e||{},typeof r!=="boolean")r=t instanceof Gr;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.readableObjectMode;if(this.highWaterMark=f2(this,e,"readableHighWaterMark",r),this.buffer=new u2,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding){if(!Kr)Kr=qo().StringDecoder;this.decoder=new Kr(e.encoding),this.encoding=e.encoding}}function te(e){if(Gr=Gr||cr(),!(this instanceof te))return new te(e);var t=this instanceof Gr;if(this._readableState=new bd(e,this,t),this.readable=!0,e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}In.call(this)}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(t){if(!this._readableState)return;this._readableState.destroyed=t}});te.prototype.destroy=Bo.destroy;te.prototype._undestroy=Bo.undestroy;te.prototype._destroy=function(e,t){t(e)};te.prototype.push=function(e,t){var r=this._readableState,n;if(!r.objectMode){if(typeof e==="string"){if(t=t||r.defaultEncoding,t!==r.encoding)e=cs.from(e,t),t="";n=!0}}else n=!0;return wd(this,e,t,!1,n)};te.prototype.unshift=function(e){return wd(this,e,null,!0,!1)};function wd(e,t,r,n,i){V("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,w2(e,a);else{var l;if(!i)l=y2(a,t);if(l)Cn(e,l);else if(a.objectMode||t&&t.length>0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==cs.prototype)t=o2(t);if(n)if(a.endEmitted)Cn(e,new m2);else jo(e,a,t,!0);else if(a.ended)Cn(e,new d2);else if(a.destroyed)return!1;else if(a.reading=!1,a.decoder&&!r)if(t=a.decoder.write(t),a.objectMode||t.length!==0)jo(e,a,t,!1);else Yo(e,a);else jo(e,a,t,!1)}else if(!n)a.reading=!1,Yo(e,a)}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function jo(e,t,r,n){if(t.flowing&&t.length===0&&!t.sync)t.awaitDrain=0,e.emit("data",r);else{if(t.length+=t.objectMode?1:r.length,n)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)hs(e)}Yo(e,t)}function y2(e,t){var r;if(!l2(t)&&typeof t!=="string"&&t!==void 0&&!e.objectMode)r=new h2("chunk",["string","Buffer","Uint8Array"],t);return r}te.prototype.isPaused=function(){return this._readableState.flowing===!1};te.prototype.setEncoding=function(e){if(!Kr)Kr=qo().StringDecoder;var t=new Kr(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var r=this._readableState.buffer.head,n="";while(r!==null)n+=t.write(r.data),r=r.next;if(this._readableState.buffer.clear(),n!=="")this._readableState.buffer.push(n);return this._readableState.length=n.length,this};var md=1073741824;function b2(e){if(e>=md)e=md;else e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++;return e}function gd(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;if(e>t.highWaterMark)t.highWaterMark=b2(e);if(e<=t.length)return e;if(!t.ended)return t.needReadable=!0,0;return t.length}te.prototype.read=function(e){V("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0)t.emittedReadable=!1;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){if(V("read: emitReadable",t.length,t.ended),t.length===0&&t.ended)$o(this);else hs(this);return null}if(e=gd(e,t),e===0&&t.ended){if(t.length===0)$o(this);return null}var n=t.needReadable;if(V("need readable",n),t.length===0||t.length-e<t.highWaterMark)n=!0,V("length less than watermark",n);if(t.ended||t.reading)n=!1,V("reading or ended",n);else if(n){if(V("do read"),t.reading=!0,t.sync=!0,t.length===0)t.needReadable=!0;if(this._read(t.highWaterMark),t.sync=!1,!t.reading)e=gd(r,t)}var i;if(e>0)i=Sd(e,t);else i=null;if(i===null)t.needReadable=t.length<=t.highWaterMark,e=0;else t.length-=e,t.awaitDrain=0;if(t.length===0){if(!t.ended)t.needReadable=!0;if(r!==e&&t.ended)$o(this)}if(i!==null)this.emit("data",i);return i};function w2(e,t){if(V("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length)t.buffer.push(r),t.length+=t.objectMode?1:r.length}if(t.ended=!0,t.sync)hs(e);else if(t.needReadable=!1,!t.emittedReadable)t.emittedReadable=!0,_d(e)}function hs(e){var t=e._readableState;if(V("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,!t.emittedReadable)V("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(_d,e)}function _d(e){var t=e._readableState;if(V("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended))e.emit("readable"),t.emittedReadable=!1;t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Wo(e)}function Yo(e,t){if(!t.readingMore)t.readingMore=!0,process.nextTick(_2,e,t)}function _2(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0)){var r=t.length;if(V("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}te.prototype._read=function(e){Cn(this,new p2("_read()"))};te.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,V("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?u:_;if(n.endEmitted)process.nextTick(a);else r.once("end",a);e.on("unpipe",l);function l(k,O){if(V("onunpipe"),k===r){if(O&&O.hasUnpiped===!1)O.hasUnpiped=!0,b()}}function u(){V("onend"),e.end()}var h=v2(r);e.on("drain",h);var d=!1;function b(){if(V("cleanup"),e.removeListener("close",S),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",g),e.removeListener("unpipe",l),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",m),d=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain))h()}r.on("data",m);function m(k){V("ondata");var O=e.write(k);if(V("dest.write",O),O===!1){if((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&kd(n.pipes,e)!==-1)&&!d)V("false write response, pause",n.awaitDrain),n.awaitDrain++;r.pause()}}function g(k){if(V("onerror",k),_(),e.removeListener("error",g),yd(e,"error")===0)Cn(e,k)}g2(e,"error",g);function S(){e.removeListener("finish",y),_()}e.once("close",S);function y(){V("onfinish"),e.removeListener("close",S),_()}e.once("finish",y);function _(){V("unpipe"),r.unpipe(e)}if(e.emit("pipe",r),!n.flowing)V("pipe resume"),r.resume();return e};function v2(e){return function(){var r=e._readableState;if(V("pipeOnDrain",r.awaitDrain),r.awaitDrain)r.awaitDrain--;if(r.awaitDrain===0&&yd(e,"data"))r.flowing=!0,Wo(e)}}te.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;if(t.pipes=null,t.pipesCount=0,t.flowing=!1,e)e.emit("unpipe",this,r);return this}if(!e){var{pipes:n,pipesCount:i}=t;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var l=kd(t.pipes,e);if(l===-1)return this;if(t.pipes.splice(l,1),t.pipesCount-=1,t.pipesCount===1)t.pipes=t.pipes[0];return e.emit("unpipe",this,r),this};te.prototype.on=function(e,t){var r=In.prototype.on.call(this,e,t),n=this._readableState;if(e==="data"){if(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1)this.resume()}else if(e==="readable"){if(!n.endEmitted&&!n.readableListening){if(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,V("on readable",n.length,n.reading),n.length)hs(this);else if(!n.reading)process.nextTick(S2,this)}}return r};te.prototype.addListener=te.prototype.on;te.prototype.removeListener=function(e,t){var r=In.prototype.removeListener.call(this,e,t);if(e==="readable")process.nextTick(vd,this);return r};te.prototype.removeAllListeners=function(e){var t=In.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===void 0)process.nextTick(vd,this);return t};function vd(e){var t=e._readableState;if(t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused)t.flowing=!0;else if(e.listenerCount("data")>0)e.resume()}function S2(e){V("readable nexttick read 0"),e.read(0)}te.prototype.resume=function(){var e=this._readableState;if(!e.flowing)V("resume"),e.flowing=!e.readableListening,k2(this,e);return e.paused=!1,this};function k2(e,t){if(!t.resumeScheduled)t.resumeScheduled=!0,process.nextTick(x2,e,t)}function x2(e,t){if(V("resume",t.reading),!t.reading)e.read(0);if(t.resumeScheduled=!1,e.emit("resume"),Wo(e),t.flowing&&!t.reading)e.read(0)}te.prototype.pause=function(){if(V("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)V("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function Wo(e){var t=e._readableState;V("flow",t.flowing);while(t.flowing&&e.read()!==null);}te.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(V("wrapped end"),r.decoder&&!r.ended){var l=r.decoder.end();if(l&&l.length)t.push(l)}t.push(null)}),e.on("data",function(l){if(V("wrapped data"),r.decoder)l=r.decoder.write(l);if(r.objectMode&&(l===null||l===void 0))return;else if(!r.objectMode&&(!l||!l.length))return;var u=t.push(l);if(!u)n=!0,e.pause()});for(var i in e)if(this[i]===void 0&&typeof e[i]==="function")this[i]=function(u){return function(){return e[u].apply(e,arguments)}}(i);for(var a=0;a<Fo.length;a++)e.on(Fo[a],this.emit.bind(this,Fo[a]));return this._read=function(l){if(V("wrapped _read",l),n)n=!1,e.resume()},this};if(typeof Symbol==="function")te.prototype[Symbol.asyncIterator]=function(){if(Co===void 0)Co=cd();return Co(this)};Object.defineProperty(te.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(te.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(te.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){if(this._readableState)this._readableState.flowing=t}});te._fromList=Sd;Object.defineProperty(te.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Sd(e,t){if(t.length===0)return null;var r;if(t.objectMode)r=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else r=t.buffer.consume(e,t.decoder);return r}function $o(e){var t=e._readableState;if(V("endReadable",t.endEmitted),!t.endEmitted)t.ended=!0,process.nextTick(E2,t,e)}function E2(e,t){if(V("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished)t.destroy()}}}if(typeof Symbol==="function")te.from=function(e,t){if(Io===void 0)Io=pd();return Io(te,e,t)};function kd(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var cr=v(function(B5,Od){var O2=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Od.exports=ot;var Ed=Uo(),Ho=ps();Vr()(ot,Ed);{ds=O2(Ho.prototype);for(Fn=0;Fn<ds.length;Fn++)if(jn=ds[Fn],!ot.prototype[jn])ot.prototype[jn]=Ho.prototype[jn]}var ds,jn,Fn;function ot(e){if(!(this instanceof ot))return new ot(e);if(Ed.call(this,e),Ho.call(this,e),this.allowHalfOpen=!0,e){if(e.readable===!1)this.readable=!1;if(e.writable===!1)this.writable=!1;if(e.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",M2)}}Object.defineProperty(ot.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(ot.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(ot.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function M2(){if(this._writableState.ended)return;process.nextTick(T2,this)}function T2(e){e.end()}Object.defineProperty(ot.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(t){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=t,this._writableState.destroyed=t}})});var ps=v(function(W5,Ld){Ld.exports=fe;function Td(e){var t=this;this.next=null,this.entry=null,this.finish=function(){tk(t,e)}}var zr;fe.WritableState=Yn;var N2={deprecate:Bh()},Nd=W("stream"),gs=W("buffer").Buffer,A2=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function D2(e){return gs.from(e)}function L2(e){return gs.isBuffer(e)||e instanceof A2}var Go=Eo(),q2=Oo(),P2=q2.getHighWaterMark,jt=Rt().codes,{ERR_INVALID_ARG_TYPE:R2,ERR_METHOD_NOT_IMPLEMENTED:C2,ERR_MULTIPLE_CALLBACK:I2,ERR_STREAM_CANNOT_PIPE:F2,ERR_STREAM_DESTROYED:j2,ERR_STREAM_NULL_VALUES:$2,ERR_STREAM_WRITE_AFTER_END:Y2,ERR_UNKNOWN_ENCODING:B2}=jt,Jr=Go.errorOrDestroy;Vr()(fe,Nd);function W2(){}function Yn(e,t,r){if(zr=zr||cr(),e=e||{},typeof r!=="boolean")r=t instanceof zr;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=P2(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){J2(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Td(this)}Yn.prototype.getBuffer=function(){var t=this.bufferedRequest,r=[];while(t)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Yn.prototype,"buffer",{get:N2.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var ms;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")ms=Function.prototype[Symbol.hasInstance],Object.defineProperty(fe,Symbol.hasInstance,{value:function(t){if(ms.call(this,t))return!0;if(this!==fe)return!1;return t&&t._writableState instanceof Yn}});else ms=function(t){return t instanceof this};function fe(e){zr=zr||cr();var t=this instanceof zr;if(!t&&!ms.call(fe,this))return new fe(e);if(this._writableState=new Yn(e,this,t),this.writable=!0,e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}Nd.call(this)}fe.prototype.pipe=function(){Jr(this,new F2)};function U2(e,t){var r=new Y2;Jr(e,r),process.nextTick(t,r)}function H2(e,t,r,n){var i;if(r===null)i=new $2;else if(typeof r!=="string"&&!t.objectMode)i=new R2("chunk",["string","Buffer"],r);if(i)return Jr(e,i),process.nextTick(n,i),!1;return!0}fe.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&L2(e);if(a&&!gs.isBuffer(e))e=D2(e);if(typeof t==="function")r=t,t=null;if(a)t="buffer";else if(!t)t=n.defaultEncoding;if(typeof r!=="function")r=W2;if(n.ending)U2(this,r);else if(a||H2(this,n,e,r))n.pendingcb++,i=G2(this,n,a,e,t,r);return i};fe.prototype.cork=function(){this._writableState.corked++};fe.prototype.uncork=function(){var e=this._writableState;if(e.corked){if(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)Ad(this,e)}};fe.prototype.setDefaultEncoding=function(t){if(typeof t==="string")t=t.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new B2(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(fe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function V2(e,t,r){if(!e.objectMode&&e.decodeStrings!==!1&&typeof t==="string")t=gs.from(t,r);return t}Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G2(e,t,r,n,i,a){if(!r){var l=V2(t,n,i);if(n!==l)r=!0,i="buffer",n=l}var u=t.objectMode?1:n.length;t.length+=u;var h=t.length<t.highWaterMark;if(!h)t.needDrain=!0;if(t.writing||t.corked){var d=t.lastBufferedRequest;if(t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},d)d.next=t.lastBufferedRequest;else t.bufferedRequest=t.lastBufferedRequest;t.bufferedRequestCount+=1}else Vo(e,t,!1,u,n,i,a);return h}function Vo(e,t,r,n,i,a,l){if(t.writelen=n,t.writecb=l,t.writing=!0,t.sync=!0,t.destroyed)t.onwrite(new j2("write"));else if(r)e._writev(i,t.onwrite);else e._write(i,a,t.onwrite);t.sync=!1}function K2(e,t,r,n,i){if(--t.pendingcb,r)process.nextTick(i,n),process.nextTick($n,e,t),e._writableState.errorEmitted=!0,Jr(e,n);else i(n),e._writableState.errorEmitted=!0,Jr(e,n),$n(e,t)}function z2(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function J2(e,t){var r=e._writableState,{sync:n,writecb:i}=r;if(typeof i!=="function")throw new I2;if(z2(r),t)K2(e,r,n,t,i);else{var a=Dd(r)||e.destroyed;if(!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest)Ad(e,r);if(n)process.nextTick(Md,e,r,a,i);else Md(e,r,a,i)}}function Md(e,t,r,n){if(!r)Q2(e,t);t.pendingcb--,n(),$n(e,t)}function Q2(e,t){if(t.length===0&&t.needDrain)t.needDrain=!1,e.emit("drain")}function Ad(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=Array(n),a=t.corkedRequestsFree;a.entry=r;var l=0,u=!0;while(r){if(i[l]=r,!r.isBuf)u=!1;r=r.next,l+=1}if(i.allBuffers=u,Vo(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next)t.corkedRequestsFree=a.next,a.next=null;else t.corkedRequestsFree=new Td(t);t.bufferedRequestCount=0}else{while(r){var h=r.chunk,d=r.encoding,b=r.callback,m=t.objectMode?1:h.length;if(Vo(e,t,!1,m,h,d,b),r=r.next,t.bufferedRequestCount--,t.writing)break}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r,t.bufferProcessing=!1}fe.prototype._write=function(e,t,r){r(new C2("_write()"))};fe.prototype._writev=null;fe.prototype.end=function(e,t,r){var n=this._writableState;if(typeof e==="function")r=e,e=null,t=null;else if(typeof t==="function")r=t,t=null;if(e!==null&&e!==void 0)this.write(e,t);if(n.corked)n.corked=1,this.uncork();if(!n.ending)ek(this,n,r);return this};Object.defineProperty(fe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Dd(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Z2(e,t){e._final(function(r){if(t.pendingcb--,r)Jr(e,r);t.prefinished=!0,e.emit("prefinish"),$n(e,t)})}function X2(e,t){if(!t.prefinished&&!t.finalCalled)if(typeof e._final==="function"&&!t.destroyed)t.pendingcb++,t.finalCalled=!0,process.nextTick(Z2,e,t);else t.prefinished=!0,e.emit("prefinish")}function $n(e,t){var r=Dd(t);if(r){if(X2(e,t),t.pendingcb===0){if(t.finished=!0,e.emit("finish"),t.autoDestroy){var n=e._readableState;if(!n||n.autoDestroy&&n.endEmitted)e.destroy()}}}return r}function ek(e,t,r){if(t.ending=!0,$n(e,t),r)if(t.finished)process.nextTick(r);else e.once("finish",r);t.ended=!0,e.writable=!1}function tk(e,t,r){var n=e.entry;e.entry=null;while(n){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(fe.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(t){if(!this._writableState)return;this._writableState.destroyed=t}});fe.prototype.destroy=Go.destroy;fe.prototype._undestroy=Go.undestroy;fe.prototype._destroy=function(e,t){t(e)}});var zo=v(function(U5,Rd){var qd=W("util"),Ko=ps(),{LEVEL:Pd}=pe(),Bn=Rd.exports=function(t={}){if(Ko.call(this,{objectMode:!0,highWaterMark:t.highWaterMark}),this.format=t.format,this.level=t.level,this.handleExceptions=t.handleExceptions,this.handleRejections=t.handleRejections,this.silent=t.silent,t.log)this.log=t.log;if(t.logv)this.logv=t.logv;if(t.close)this.close=t.close;this.once("pipe",(r)=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",(r)=>{if(r===this.parent){if(this.parent=null,this.close)this.close()}})};qd.inherits(Bn,Ko);Bn.prototype._write=function(t,r,n){if(this.silent||t.exception===!0&&!this.handleExceptions)return n(null);let i=this.level||this.parent&&this.parent.level;if(!i||this.levels[i]>=this.levels[t[Pd]]){if(t&&!this.format)return this.log(t,n);let a,l;try{l=this.format.transform(Object.assign({},t),this.format.options)}catch(u){a=u}if(a||!l){if(n(),a)throw a;return}return this.log(l,n)}return this._writableState.sync=!1,n(null)};Bn.prototype._writev=function(t,r){if(this.logv){let n=t.filter(this._accept,this);if(!n.length)return r(null);return this.logv(n,r)}for(let n=0;n<t.length;n++){if(!this._accept(t[n]))continue;if(t[n].chunk&&!this.format){this.log(t[n].chunk,t[n].callback);continue}let i,a;try{a=this.format.transform(Object.assign({},t[n].chunk),this.format.options)}catch(l){i=l}if(i||!a){if(t[n].callback(),i)throw r(null),i}else this.log(a,t[n].callback)}return r(null)};Bn.prototype._accept=function(t){let r=t.chunk;if(this.silent)return!1;let n=this.level||this.parent&&this.parent.level;if(r.exception===!0||!n||this.levels[n]>=this.levels[r[Pd]]){if(this.handleExceptions||r.exception!==!0)return!0}return!1};Bn.prototype._nop=function(){return}});var Zo=v(function(H5,Id){var Cd=W("util"),{LEVEL:Jo}=pe(),Qo=zo(),Wn=Id.exports=function(t={}){if(Qo.call(this,t),!t.transport||typeof t.transport.log!=="function")throw Error("Invalid transport, must be an object with a log method.");this.transport=t.transport,this.level=this.level||t.transport.level,this.handleExceptions=this.handleExceptions||t.transport.handleExceptions,this._deprecated();function r(n){this.emit("error",n,this.transport)}if(!this.transport.__winstonError)this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError)};Cd.inherits(Wn,Qo);Wn.prototype._write=function(t,r,n){if(this.silent||t.exception===!0&&!this.handleExceptions)return n(null);if(!this.level||this.levels[this.level]>=this.levels[t[Jo]])this.transport.log(t[Jo],t.message,t,this._nop);n(null)};Wn.prototype._writev=function(t,r){for(let n=0;n<t.length;n++)if(this._accept(t[n]))this.transport.log(t[n].chunk[Jo],t[n].chunk.message,t[n].chunk,this._nop),t[n].callback();return r(null)};Wn.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
27
|
+
`))};Wn.prototype.close=function(){if(this.transport.close)this.transport.close();if(this.transport.__winstonError)this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null}});var fr=v(function(V5,Xo){Xo.exports=zo();Xo.exports.LegacyTransportStream=Zo()});var Yd=v(function(G5,$d){var jd=W("os"),{LEVEL:Fd,MESSAGE:Qr}=pe(),rk=fr();$d.exports=class extends rk{constructor(t={}){super(t);this.name=t.name||"console",this.stderrLevels=this._stringArrayToSet(t.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(t.consoleWarnLevels),this.eol=typeof t.eol==="string"?t.eol:jd.EOL,this.forceConsole=t.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(t,r){if(setImmediate(()=>this.emit("logged",t)),this.stderrLevels[t[Fd]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${t[Qr]}${this.eol}`);else this._consoleError(t[Qr]);if(r)r();return}else if(this.consoleWarnLevels[t[Fd]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${t[Qr]}${this.eol}`);else this._consoleWarn(t[Qr]);if(r)r();return}if(console._stdout&&!this.forceConsole)console._stdout.write(`${t[Qr]}${this.eol}`);else this._consoleLog(t[Qr]);if(r)r()}_stringArrayToSet(t,r){if(!t)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(t))throw Error(r);return t.reduce((n,i)=>{if(typeof i!=="string")throw Error(r);return n[i]=!0,n},{})}}});var ys=v(function(el,Bd){Object.defineProperty(el,"__esModule",{value:!0});el.default=nk;function nk(e){return e&&typeof e.length==="number"&&e.length>=0&&e.length%1===0}Bd.exports=el.default});var Ud=v(function(tl,Wd){Object.defineProperty(tl,"__esModule",{value:!0});tl.default=function(e){return function(...t){var r=t.pop();return e.call(this,t,r)}};Wd.exports=tl.default});var Kd=v(function(Gd){Object.defineProperty(Gd,"__esModule",{value:!0});Gd.fallback=Hd;Gd.wrap=Vd;var ak=Gd.hasQueueMicrotask=typeof queueMicrotask==="function"&&queueMicrotask,ok=Gd.hasSetImmediate=typeof setImmediate==="function"&&setImmediate,lk=Gd.hasNextTick=typeof process==="object"&&typeof process.nextTick==="function";function Hd(e){setTimeout(e,0)}function Vd(e){return(t,...r)=>e(()=>t(...r))}var Un;if(ak)Un=queueMicrotask;else if(ok)Un=setImmediate;else if(lk)Un=process.nextTick;else Un=Hd;Gd.default=Vd(Un)});var Xd=v(function(rl,Zd){Object.defineProperty(rl,"__esModule",{value:!0});rl.default=yk;var hk=Ud(),dk=Qd(hk),pk=Kd(),mk=Qd(pk),gk=hr();function Qd(e){return e&&e.__esModule?e:{default:e}}function yk(e){if((0,gk.isAsync)(e))return function(...t){let r=t.pop(),n=e.apply(this,t);return zd(n,r)};return(0,dk.default)(function(t,r){var n;try{n=e.apply(this,t)}catch(i){return r(i)}if(n&&typeof n.then==="function")return zd(n,r);else r(null,n)})}function zd(e,t){return e.then((r)=>{Jd(t,null,r)},(r)=>{Jd(t,r&&(r instanceof Error||r.message)?r:Error(r))})}function Jd(e,t,r){try{e(t,r)}catch(n){(0,mk.default)((i)=>{throw i},n)}}Zd.exports=rl.default});var hr=v(function(tp){Object.defineProperty(tp,"__esModule",{value:!0});tp.isAsyncIterable=tp.isAsyncGenerator=tp.isAsync=void 0;var wk=Xd(),_k=vk(wk);function vk(e){return e&&e.__esModule?e:{default:e}}function ep(e){return e[Symbol.toStringTag]==="AsyncFunction"}function Sk(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function kk(e){return typeof e[Symbol.asyncIterator]==="function"}function xk(e){if(typeof e!=="function")throw Error("expected a function");return ep(e)?(0,_k.default)(e):e}tp.default=xk;tp.isAsync=ep;tp.isAsyncGenerator=Sk;tp.isAsyncIterable=kk});var Zr=v(function(nl,np){Object.defineProperty(nl,"__esModule",{value:!0});nl.default=Tk;function Tk(e,t){if(!t)t=e.length;if(!t)throw Error("arity is undefined");function r(...n){if(typeof n[t-1]==="function")return e.apply(this,n);return new Promise((i,a)=>{n[t-1]=(l,...u)=>{if(l)return a(l);i(u.length>1?u:u[0])},e.apply(this,n)})}return r}np.exports=nl.default});var sp=v(function(sl,ip){Object.defineProperty(sl,"__esModule",{value:!0});var Ak=ys(),Dk=il(Ak),Lk=hr(),qk=il(Lk),Pk=Zr(),Rk=il(Pk);function il(e){return e&&e.__esModule?e:{default:e}}sl.default=(0,Rk.default)((e,t,r)=>{var n=(0,Dk.default)(t)?[]:{};e(t,(i,a,l)=>{(0,qk.default)(i)((u,...h)=>{if(h.length<2)[h]=h;n[a]=h,l(u)})},(i)=>r(i,n))},3);ip.exports=sl.default});var ol=v(function(al,ap){Object.defineProperty(al,"__esModule",{value:!0});al.default=Ik;function Ik(e){function t(...r){if(e===null)return;var n=e;e=null,n.apply(this,r)}return Object.assign(t,e),t}ap.exports=al.default});var lp=v(function(ll,op){Object.defineProperty(ll,"__esModule",{value:!0});ll.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()};op.exports=ll.default});var fp=v(function(ul,cp){Object.defineProperty(ul,"__esModule",{value:!0});ul.default=Gk;var $k=ys(),Yk=up($k),Bk=lp(),Wk=up(Bk);function up(e){return e&&e.__esModule?e:{default:e}}function Uk(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}function Hk(e){var t=-1;return function(){var n=e.next();if(n.done)return null;return t++,{value:n.value,key:t}}}function Vk(e){var t=e?Object.keys(e):[],r=-1,n=t.length;return function i(){var a=t[++r];if(a==="__proto__")return i();return r<n?{value:e[a],key:a}:null}}function Gk(e){if((0,Yk.default)(e))return Uk(e);var t=(0,Wk.default)(e);return t?Hk(t):Vk(e)}cp.exports=ul.default});var fl=v(function(cl,hp){Object.defineProperty(cl,"__esModule",{value:!0});cl.default=zk;function zk(e){return function(...t){if(e===null)throw Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}hp.exports=cl.default});var bs=v(function(hl,dp){Object.defineProperty(hl,"__esModule",{value:!0});var Qk={};hl.default=Qk;dp.exports=hl.default});var mp=v(function(dl,pp){Object.defineProperty(dl,"__esModule",{value:!0});dl.default=rx;var Xk=bs(),ex=tx(Xk);function tx(e){return e&&e.__esModule?e:{default:e}}function rx(e,t,r,n){let i=!1,a=!1,l=!1,u=0,h=0;function d(){if(u>=t||l||i)return;l=!0,e.next().then(({value:g,done:S})=>{if(a||i)return;if(l=!1,S){if(i=!0,u<=0)n(null);return}u++,r(g,h,b),h++,d()}).catch(m)}function b(g,S){if(u-=1,a)return;if(g)return m(g);if(g===!1){i=!0,a=!0;return}if(S===ex.default||i&&u<=0)return i=!0,n(null);d()}function m(g){if(a)return;l=!1,i=!0,n(g)}d()}pp.exports=dl.default});var wp=v(function(pl,bp){Object.defineProperty(pl,"__esModule",{value:!0});var ix=ol(),sx=Hn(ix),ax=fp(),ox=Hn(ax),lx=fl(),ux=Hn(lx),gp=hr(),cx=mp(),yp=Hn(cx),fx=bs(),hx=Hn(fx);function Hn(e){return e&&e.__esModule?e:{default:e}}pl.default=(e)=>(t,r,n)=>{if(n=(0,sx.default)(n),e<=0)throw RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if((0,gp.isAsyncGenerator)(t))return(0,yp.default)(t,e,r,n);if((0,gp.isAsyncIterable)(t))return(0,yp.default)(t[Symbol.asyncIterator](),e,r,n);var i=(0,ox.default)(t),a=!1,l=!1,u=0,h=!1;function d(m,g){if(l)return;if(u-=1,m)a=!0,n(m);else if(m===!1)a=!0,l=!0;else if(g===hx.default||a&&u<=0)return a=!0,n(null);else if(!h)b()}function b(){h=!0;while(u<e&&!a){var m=i();if(m===null){if(a=!0,u<=0)n(null);return}u+=1,r(m.value,m.key,(0,ux.default)(d))}h=!1}b()};bp.exports=pl.default});var yl=v(function(gl,_p){Object.defineProperty(gl,"__esModule",{value:!0});var px=wp(),mx=ml(px),gx=hr(),yx=ml(gx),bx=Zr(),wx=ml(bx);function ml(e){return e&&e.__esModule?e:{default:e}}function _x(e,t,r,n){return(0,mx.default)(t)(e,(0,yx.default)(r),n)}gl.default=(0,wx.default)(_x,4);_p.exports=gl.default});var kp=v(function(bl,Sp){Object.defineProperty(bl,"__esModule",{value:!0});var Sx=yl(),kx=vp(Sx),xx=Zr(),Ex=vp(xx);function vp(e){return e&&e.__esModule?e:{default:e}}function Ox(e,t,r){return(0,kx.default)(e,1,t,r)}bl.default=(0,Ex.default)(Ox,3);Sp.exports=bl.default});var Op=v(function(wl,Ep){Object.defineProperty(wl,"__esModule",{value:!0});wl.default=Lx;var Tx=sp(),Nx=xp(Tx),Ax=kp(),Dx=xp(Ax);function xp(e){return e&&e.__esModule?e:{default:e}}function Lx(e,t){return(0,Nx.default)(Dx.default,e,t)}Ep.exports=wl.default});var _l=v(function(X5,Tp){Tp.exports=Et;var ws=Rt().codes,{ERR_METHOD_NOT_IMPLEMENTED:Px,ERR_MULTIPLE_CALLBACK:Rx,ERR_TRANSFORM_ALREADY_TRANSFORMING:Cx,ERR_TRANSFORM_WITH_LENGTH_0:Ix}=ws,_s=cr();Vr()(Et,_s);function Fx(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Rx);if(r.writechunk=null,r.writecb=null,t!=null)this.push(t);n(e);var i=this._readableState;if(i.reading=!1,i.needReadable||i.length<i.highWaterMark)this._read(i.highWaterMark)}function Et(e){if(!(this instanceof Et))return new Et(e);if(_s.call(this,e),this._transformState={afterTransform:Fx.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",jx)}function jx(){var e=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(t,r){Mp(e,t,r)});else Mp(this,null,null)}Et.prototype.push=function(e,t){return this._transformState.needTransform=!1,_s.prototype.push.call(this,e,t)};Et.prototype._transform=function(e,t,r){r(new Px("_transform()"))};Et.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;if(n.needTransform||i.needReadable||i.length<i.highWaterMark)this._read(i.highWaterMark)}};Et.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&!t.transforming)t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform);else t.needTransform=!0};Et.prototype._destroy=function(e,t){_s.prototype._destroy.call(this,e,function(r){t(r)})};function Mp(e,t,r){if(t)return e.emit("error",t);if(r!=null)e.push(r);if(e._writableState.length)throw new Ix;if(e._transformState.transforming)throw new Cx;return e.push(null)}});var Dp=v(function(eI,Ap){Ap.exports=Vn;var Np=_l();Vr()(Vn,Np);function Vn(e){if(!(this instanceof Vn))return new Vn(e);Np.call(this,e)}Vn.prototype._transform=function(e,t,r){r(null,e)}});var Cp=v(function(tI,Rp){var vl;function $x(e){var t=!1;return function(){if(t)return;t=!0,e.apply(void 0,arguments)}}var Pp=Rt().codes,{ERR_MISSING_ARGS:Yx,ERR_STREAM_DESTROYED:Bx}=Pp;function Lp(e){if(e)throw e}function Wx(e){return e.setHeader&&typeof e.abort==="function"}function Ux(e,t,r,n){n=$x(n);var i=!1;if(e.on("close",function(){i=!0}),vl===void 0)vl=os();vl(e,{readable:t,writable:r},function(l){if(l)return n(l);i=!0,n()});var a=!1;return function(l){if(i)return;if(a)return;if(a=!0,Wx(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();n(l||new Bx("pipe"))}}function qp(e){e()}function Hx(e,t){return e.pipe(t)}function Vx(e){if(!e.length)return Lp;if(typeof e[e.length-1]!=="function")return Lp;return e.pop()}function Gx(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Vx(t);if(Array.isArray(t[0]))t=t[0];if(t.length<2)throw new Yx("streams");var i,a=t.map(function(l,u){var h=u<t.length-1,d=u>0;return Ux(l,h,d,function(b){if(!i)i=b;if(b)a.forEach(qp);if(h)return;a.forEach(qp),n(i)})});return t.reduce(Hx)}Rp.exports=Gx});var dr=v(function(He,Kn){var Gn=W("stream");if(process.env.READABLE_STREAM==="disable"&&Gn)Kn.exports=Gn.Readable,Object.assign(Kn.exports,Gn),Kn.exports.Stream=Gn;else He=Kn.exports=Uo(),He.Stream=Gn||He,He.Readable=He,He.Writable=ps(),He.Duplex=cr(),He.Transform=_l(),He.PassThrough=Dp(),He.finished=os(),He.pipeline=Cp()});var jp=v(function(rI,Fp){var Xr=[],zn=[],Sl=function(){};function xl(e){if(~Xr.indexOf(e))return!1;return Xr.push(e),!0}function El(e){Sl=e}function Kx(e){var t=[];for(var r=0;r<Xr.length;r++){if(Xr[r].async){t.push(Xr[r]);continue}if(Xr[r](e))return!0}if(!t.length)return!1;return new Promise(function(i){Promise.all(t.map(function(l){return l(e)})).then(function(l){i(l.some(Boolean))})})}function Ol(e){if(~zn.indexOf(e))return!1;return zn.push(e),!0}function kl(){Sl.apply(Sl,arguments)}function Ip(e){for(var t=0;t<zn.length;t++)e=zn[t].apply(zn[t],arguments);return e}function Ml(e,t){var r=Object.prototype.hasOwnProperty;for(var n in t)if(r.call(t,n))e[n]=t[n];return e}function zx(e){return e.enabled=!1,e.modify=Ol,e.set=El,e.use=xl,Ml(function(){return!1},e)}function Jx(e){function t(){var r=Array.prototype.slice.call(arguments,0);return kl.call(kl,e,Ip(r,e)),!0}return e.enabled=!0,e.modify=Ol,e.set=El,e.use=xl,Ml(t,e)}Fp.exports=function(t){return t.introduce=Ml,t.enabled=Kx,t.process=Ip,t.modify=Ol,t.write=kl,t.nope=zx,t.yep=Jx,t.set=El,t.use=xl,t}});var Hp=v(function(nI,Up){var lt={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]},Yp=Object.create(null);for(let e in lt)if(Object.hasOwn(lt,e))Yp[lt[e]]=e;var ve={to:{},get:{}};ve.get=function(e){let t=e.slice(0,3).toLowerCase(),r,n;switch(t){case"hsl":{r=ve.get.hsl(e),n="hsl";break}case"hwb":{r=ve.get.hwb(e),n="hwb";break}default:{r=ve.get.rgb(e),n="rgb";break}}if(!r)return null;return{model:n,value:r}};ve.get.rgb=function(e){if(!e)return null;let t=/^#([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*)?\)$/,a=/^(\w+)$/,l=[0,0,0,1],u,h,d;if(u=e.match(r)){d=u[2],u=u[1];for(h=0;h<3;h++){let b=h*2;l[h]=Number.parseInt(u.slice(b,b+2),16)}if(d)l[3]=Number.parseInt(d,16)/255}else if(u=e.match(t)){u=u[1],d=u[3];for(h=0;h<3;h++)l[h]=Number.parseInt(u[h]+u[h],16);if(d)l[3]=Number.parseInt(d+d,16)/255}else if(u=e.match(n)){for(h=0;h<3;h++)l[h]=Number.parseInt(u[h+1],10);if(u[4])l[3]=u[5]?Number.parseFloat(u[4])*0.01:Number.parseFloat(u[4])}else if(u=e.match(i)){for(h=0;h<3;h++)l[h]=Math.round(Number.parseFloat(u[h+1])*2.55);if(u[4])l[3]=u[5]?Number.parseFloat(u[4])*0.01:Number.parseFloat(u[4])}else if(u=e.match(a)){if(u[1]==="transparent")return[0,0,0,0];if(!Object.hasOwn(lt,u[1]))return null;return l=lt[u[1]],l[3]=1,l}else return null;for(h=0;h<3;h++)l[h]=$t(l[h],0,255);return l[3]=$t(l[3],0,1),l};ve.get.hsl=function(e){if(!e)return null;let t=/^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=e.match(t);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,a=$t(Number.parseFloat(r[2]),0,100),l=$t(Number.parseFloat(r[3]),0,100),u=$t(Number.isNaN(n)?1:n,0,1);return[i,a,l,u]}return null};ve.get.hwb=function(e){if(!e)return null;let t=/^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=e.match(t);if(r){let n=Number.parseFloat(r[4]),i=(Number.parseFloat(r[1])%360+360)%360,a=$t(Number.parseFloat(r[2]),0,100),l=$t(Number.parseFloat(r[3]),0,100),u=$t(Number.isNaN(n)?1:n,0,1);return[i,a,l,u]}return null};ve.to.hex=function(...e){return"#"+vs(e[0])+vs(e[1])+vs(e[2])+(e[3]<1?vs(Math.round(e[3]*255)):"")};ve.to.rgb=function(...e){return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};ve.to.rgb.percent=function(...e){let t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"};ve.to.hsl=function(...e){return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};ve.to.hwb=function(...e){let t="";if(e.length>=4&&e[3]!==1)t=", "+e[3];return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};ve.to.keyword=function(...e){return Yp[e.slice(0,3)]};function $t(e,t,r){return Math.min(Math.max(t,e),r)}function vs(e){let t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var Bp={};for(let e of Object.keys(lt))Bp[lt[e]]=e;var P={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"]}},Ot=0.008856451679035631;function en(e){let t=e>0.0031308?1.055*e**0.4166666666666667-0.055:e*12.92;return Math.min(Math.max(0,t),1)}function tn(e){return e>0.04045?((e+0.055)/1.055)**2.4:e/12.92}for(let e of Object.keys(P)){if(!("channels"in P[e]))throw Error("missing channels property: "+e);if(!("labels"in P[e]))throw Error("missing channel labels property: "+e);if(P[e].labels.length!==P[e].channels)throw Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=P[e];delete P[e].channels,delete P[e].labels,Object.defineProperty(P[e],"channels",{value:t}),Object.defineProperty(P[e],"labels",{value:r})}P.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),l=a-i,u,h;switch(a){case i:{u=0;break}case t:{u=(r-n)/l;break}case r:{u=2+(n-t)/l;break}case n:{u=4+(t-r)/l;break}}if(u=Math.min(u*60,360),u<0)u+=360;let d=(i+a)/2;if(a===i)h=0;else if(d<=0.5)h=l/(a+i);else h=l/(2-a-i);return[u,h*100,d*100]};P.rgb.hsv=function(e){let t,r,n,i,a,l=e[0]/255,u=e[1]/255,h=e[2]/255,d=Math.max(l,u,h),b=d-Math.min(l,u,h),m=function(g){return(d-g)/6/b+0.5};if(b===0)i=0,a=0;else{switch(a=b/d,t=m(l),r=m(u),n=m(h),d){case l:{i=n-r;break}case u:{i=0.3333333333333333+t-n;break}case h:{i=0.6666666666666666+r-t;break}}if(i<0)i+=1;else if(i>1)i-=1}return[i*360,a*100,d*100]};P.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],i=P.rgb.hsl(e)[0],a=0.00392156862745098*Math.min(t,Math.min(r,n));return n=1-0.00392156862745098*Math.max(t,Math.max(r,n)),[i,a*100,n*100]};P.rgb.oklab=function(e){let t=tn(e[0]/255),r=tn(e[1]/255),n=tn(e[2]/255),i=Math.cbrt(0.4122214708*t+0.5363325363*r+0.0514459929*n),a=Math.cbrt(0.2119034982*t+0.6806995451*r+0.1073969566*n),l=Math.cbrt(0.0883024619*t+0.2817188376*r+0.6299787005*n),u=0.2104542553*i+0.793617785*a-0.0040720468*l,h=1.9779984951*i-2.428592205*a+0.4505937099*l,d=0.0259040371*i+0.7827717662*a-0.808675766*l;return[u*100,h*100,d*100]};P.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n),a=(1-t-i)/(1-i)||0,l=(1-r-i)/(1-i)||0,u=(1-n-i)/(1-i)||0;return[a*100,l*100,u*100,i*100]};function Qx(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}P.rgb.keyword=function(e){let t=Bp[e];if(t)return t;let r=Number.POSITIVE_INFINITY,n;for(let i of Object.keys(lt)){let a=lt[i],l=Qx(e,a);if(l<r)r=l,n=i}return n};P.keyword.rgb=function(e){return lt[e]};P.rgb.xyz=function(e){let t=tn(e[0]/255),r=tn(e[1]/255),n=tn(e[2]/255),i=t*0.4124564+r*0.3575761+n*0.1804375,a=t*0.2126729+r*0.7151522+n*0.072175,l=t*0.0193339+r*0.119192+n*0.9503041;return[i*100,a*100,l*100]};P.rgb.lab=function(e){let t=P.rgb.xyz(e),r=t[0],n=t[1],i=t[2];r/=95.047,n/=100,i/=108.883,r=r>Ot?r**0.3333333333333333:7.787*r+0.13793103448275862,n=n>Ot?n**0.3333333333333333:7.787*n+0.13793103448275862,i=i>Ot?i**0.3333333333333333:7.787*i+0.13793103448275862;let a=116*n-16,l=500*(r-n),u=200*(n-i);return[a,l,u]};P.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a;if(r===0)return a=n*255,[a,a,a];let l=n<0.5?n*(1+r):n+r-n*r,u=2*n-l,h=[0,0,0];for(let d=0;d<3;d++){if(i=t+0.3333333333333333*-(d-1),i<0)i++;if(i>1)i--;if(6*i<1)a=u+(l-u)*6*i;else if(2*i<1)a=l;else if(3*i<2)a=u+(l-u)*(0.6666666666666666-i)*6;else a=u;h[d]=a*255}return h};P.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,i=r,a=Math.max(n,0.01);n*=2,r*=n<=1?n:2-n,i*=a<=1?a:2-a;let l=(n+r)/2,u=n===0?2*i/(a+i):2*r/(n+r);return[t,u*100,l*100]};P.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),l=255*n*(1-r),u=255*n*(1-r*a),h=255*n*(1-r*(1-a));switch(n*=255,i){case 0:return[n,h,l];case 1:return[u,n,l];case 2:return[l,n,h];case 3:return[l,u,n];case 4:return[h,l,n];case 5:return[n,l,u]}};P.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,0.01),a,l;l=(2-r)*n;let u=(2-r)*i;return a=r*i,a/=u<=1?u:2-u,a=a||0,l/=2,[t,a*100,l*100]};P.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,i=r+n,a;if(i>1)r/=i,n/=i;let l=Math.floor(6*t),u=1-n;if(a=6*t-l,(l&1)!==0)a=1-a;let h=r+a*(u-r),d,b,m;switch(l){default:case 6:case 0:{d=u,b=h,m=r;break}case 1:{d=h,b=u,m=r;break}case 2:{d=r,b=u,m=h;break}case 3:{d=r,b=h,m=u;break}case 4:{d=h,b=r,m=u;break}case 5:{d=u,b=r,m=h;break}}return[d*255,b*255,m*255]};P.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100,a=1-Math.min(1,t*(1-i)+i),l=1-Math.min(1,r*(1-i)+i),u=1-Math.min(1,n*(1-i)+i);return[a*255,l*255,u*255]};P.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i,a,l;return i=t*3.2404542+r*-1.5371385+n*-0.4985314,a=t*-0.969266+r*1.8760108+n*0.041556,l=t*0.0556434+r*-0.2040259+n*1.0572252,i=en(i),a=en(a),l=en(l),[i*255,a*255,l*255]};P.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>Ot?t**0.3333333333333333:7.787*t+0.13793103448275862,r=r>Ot?r**0.3333333333333333:7.787*r+0.13793103448275862,n=n>Ot?n**0.3333333333333333:7.787*n+0.13793103448275862;let i=116*r-16,a=500*(t-r),l=200*(r-n);return[i,a,l]};P.xyz.oklab=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i=Math.cbrt(0.8189330101*t+0.3618667424*r-0.1288597137*n),a=Math.cbrt(0.0329845436*t+0.9293118715*r+0.0361456387*n),l=Math.cbrt(0.0482003018*t+0.2643662691*r+0.633851707*n),u=0.2104542553*i+0.793617785*a-0.0040720468*l,h=1.9779984951*i-2.428592205*a+0.4505937099*l,d=0.0259040371*i+0.7827717662*a-0.808675766*l;return[u*100,h*100,d*100]};P.oklab.oklch=function(e){return P.lab.lch(e)};P.oklab.xyz=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i=(0.999999998*t+0.396337792*r+0.215803758*n)**3,a=(1.000000008*t-0.105561342*r-0.063854175*n)**3,l=(1.000000055*t-0.089484182*r-1.291485538*n)**3,u=1.227013851*i-0.55779998*a+0.281256149*l,h=-0.040580178*i+1.11225687*a-0.071676679*l,d=-0.076381285*i-0.421481978*a+1.58616322*l;return[u*100,h*100,d*100]};P.oklab.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i=(t+0.3963377774*r+0.2158037573*n)**3,a=(t-0.1055613458*r-0.0638541728*n)**3,l=(t-0.0894841775*r-1.291485548*n)**3,u=en(4.0767416621*i-3.3077115913*a+0.2309699292*l),h=en(-1.2684380046*i+2.6097574011*a-0.3413193965*l),d=en(-0.0041960863*i-0.7034186147*a+1.707614701*l);return[u*255,h*255,d*255]};P.oklch.oklab=function(e){return P.lch.lab(e)};P.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],i,a,l;a=(t+16)/116,i=r/500+a,l=a-n/200;let u=a**3,h=i**3,d=l**3;return a=u>Ot?u:(a-0.13793103448275862)/7.787,i=h>Ot?h:(i-0.13793103448275862)/7.787,l=d>Ot?d:(l-0.13793103448275862)/7.787,i*=95.047,a*=100,l*=108.883,[i,a,l]};P.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],i;if(i=Math.atan2(n,r)*360/2/Math.PI,i<0)i+=360;let l=Math.sqrt(r*r+n*n);return[t,l,i]};P.lch.lab=function(e){let t=e[0],r=e[1],i=e[2]/360*2*Math.PI,a=r*Math.cos(i),l=r*Math.sin(i);return[t,a,l]};P.rgb.ansi16=function(e,t=null){let[r,n,i]=e,a=t===null?P.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let l=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));if(a===2)l+=60;return l};P.hsv.ansi16=function(e){return P.rgb.ansi16(P.hsv.rgb(e),e[2])};P.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];if(t>>4===r>>4&&r>>4===n>>4){if(t<8)return 16;if(t>248)return 231;return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};P.ansi16.rgb=function(e){e=e[0];let t=e%10;if(t===0||t===7){if(e>50)t+=3.5;return t=t/10.5*255,[t,t,t]}let r=(Math.trunc(e>50)+1)*0.5,n=(t&1)*r*255,i=(t>>1&1)*r*255,a=(t>>2&1)*r*255;return[n,i,a]};P.ansi256.rgb=function(e){if(e=e[0],e>=232){let a=(e-232)*10+8;return[a,a,a]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[r,n,i]};P.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};P.hex.rgb=function(e){let t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let r=t[0];if(t[0].length===3)r=[...r].map((u)=>u+u).join("");let n=Number.parseInt(r,16),i=n>>16&255,a=n>>8&255,l=n&255;return[i,a,l]};P.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),a=Math.min(Math.min(t,r),n),l=i-a,u,h=l<1?a/(1-l):0;if(l<=0)u=0;else if(i===t)u=(r-n)/l%6;else if(i===r)u=2+(n-t)/l;else u=4+(t-r)/l;return u/=6,u%=1,[u*360,l*100,h*100]};P.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<0.5?2*t*r:2*t*(1-r),i=0;if(n<1)i=(r-0.5*n)/(1-n);return[e[0],n*100,i*100]};P.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,i=0;if(n<1)i=(r-n)/(1-n);return[e[0],n*100,i*100]};P.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],a=t%1*6,l=a%1,u=1-l,h=0;switch(Math.floor(a)){case 0:{i[0]=1,i[1]=l,i[2]=0;break}case 1:{i[0]=u,i[1]=1,i[2]=0;break}case 2:{i[0]=0,i[1]=1,i[2]=l;break}case 3:{i[0]=0,i[1]=u,i[2]=1;break}case 4:{i[0]=l,i[1]=0,i[2]=1;break}default:i[0]=1,i[1]=0,i[2]=u}return h=(1-r)*n,[(r*i[0]+h)*255,(r*i[1]+h)*255,(r*i[2]+h)*255]};P.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),i=0;if(n>0)i=t/n;return[e[0],i*100,n*100]};P.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+0.5*t,i=0;if(n>0&&n<0.5)i=t/(2*n);else if(n>=0.5&&n<1)i=t/(2*(1-n));return[e[0],i*100,n*100]};P.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};P.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,i=n-t,a=0;if(i<1)a=(n-i)/(1-i);return[e[0],i*100,a*100]};P.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};P.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};P.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};P.gray.hsl=function(e){return[0,0,e[0]]};P.gray.hsv=P.gray.hsl;P.gray.hwb=function(e){return[0,100,e[0]]};P.gray.cmyk=function(e){return[0,0,0,e[0]]};P.gray.lab=function(e){return[e[0],0,0]};P.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(n.length)+n};P.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};function Zx(){let e={},t=Object.keys(P);for(let{length:r}=t,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function Xx(e){let t=Zx(),r=[e];t[e].distance=0;while(r.length>0){let n=r.pop(),i=Object.keys(P[n]);for(let{length:a}=i,l=0;l<a;l++){let u=i[l],h=t[u];if(h.distance===-1)h.distance=t[n].distance+1,h.parent=n,r.unshift(u)}}return t}function eE(e,t){return function(r){return t(e(r))}}function tE(e,t){let r=[t[e].parent,e],n=P[t[e].parent][e],i=t[e].parent;while(t[i].parent)r.unshift(t[i].parent),n=eE(P[t[i].parent][i],n),i=t[i].parent;return n.conversion=r,n}function rE(e){let t=Xx(e),r={},n=Object.keys(t);for(let{length:i}=n,a=0;a<i;a++){let l=n[a];if(t[l].parent===null)continue;r[l]=tE(l,t)}return r}var xe={},nE=Object.keys(P);function iE(e){let t=function(...r){let n=r[0];if(n===void 0||n===null)return n;if(n.length>1)r=n;return e(r)};if("conversion"in e)t.conversion=e.conversion;return t}function sE(e){let t=function(...r){let n=r[0];if(n===void 0||n===null)return n;if(n.length>1)r=n;let i=e(r);if(typeof i==="object")for(let{length:a}=i,l=0;l<a;l++)i[l]=Math.round(i[l]);return i};if("conversion"in e)t.conversion=e.conversion;return t}for(let e of nE){xe[e]={},Object.defineProperty(xe[e],"channels",{value:P[e].channels}),Object.defineProperty(xe[e],"labels",{value:P[e].labels});let t=rE(e),r=Object.keys(t);for(let n of r){let i=t[n];xe[e][n]=sE(i),xe[e][n].raw=iE(i)}}var Wp=["keyword","gray","hex"],Tl={};for(let e of Object.keys(xe))Tl[[...xe[e].labels].sort().join("")]=e;var Nl={};function _e(e,t){if(!(this instanceof _e))return new _e(e,t);if(t&&t in Wp)t=null;if(t&&!(t in xe))throw Error("Unknown model: "+t);let r,n;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof _e)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==="string"){let i=ve.get(e);if(i===null)throw Error("Unable to parse color from string: "+e);this.model=i.model,n=xe[this.model].channels,this.color=i.value.slice(0,n),this.valpha=typeof i.value[n]==="number"?i.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=xe[this.model].channels;let i=Array.prototype.slice.call(e,0,n);this.color=Al(i,n),this.valpha=typeof e[n]==="number"?e[n]:1}else if(typeof e==="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let i=Object.keys(e);if("alpha"in e)i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha==="number"?e.alpha:0;let a=i.sort().join("");if(!(a in Tl))throw Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Tl[a];let{labels:l}=xe[this.model],u=[];for(r=0;r<l.length;r++)u.push(e[l[r]]);this.color=Al(u)}if(Nl[this.model]){n=xe[this.model].channels;for(r=0;r<n;r++){let i=Nl[this.model][r];if(i)this.color[r]=i(this.color[r])}}if(this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze)Object.freeze(this)}_e.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in ve.to?this:this.rgb();t=t.round(typeof e==="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return ve.to[t.model](...r)},percentString(e){let t=this.rgb().round(typeof e==="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return ve.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=xe[this.model],{labels:r}=xe[this.model];for(let n=0;n<t;n++)e[r[n]]=this.color[n];if(this.valpha!==1)e.alpha=this.valpha;return e},unitArray(){let e=this.rgb().color;if(e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1)e.push(this.valpha);return e},unitObject(){let e=this.rgb().object();if(e.r/=255,e.g/=255,e.b/=255,this.valpha!==1)e.alpha=this.valpha;return e},round(e){return e=Math.max(e||0,0),new _e([...this.color.map(oE(e)),this.valpha],this.model)},alpha(e){if(e!==void 0)return new _e([...this.color,Math.max(0,Math.min(1,e))],this.model);return this.valpha},red:he("rgb",0,we(255)),green:he("rgb",1,we(255)),blue:he("rgb",2,we(255)),hue:he(["hsl","hsv","hsl","hwb","hcg"],0,(e)=>(e%360+360)%360),saturationl:he("hsl",1,we(100)),lightness:he("hsl",2,we(100)),saturationv:he("hsv",1,we(100)),value:he("hsv",2,we(100)),chroma:he("hcg",1,we(100)),gray:he("hcg",2,we(100)),white:he("hwb",1,we(100)),wblack:he("hwb",2,we(100)),cyan:he("cmyk",0,we(100)),magenta:he("cmyk",1,we(100)),yellow:he("cmyk",2,we(100)),black:he("cmyk",3,we(100)),x:he("xyz",0,we(95.047)),y:he("xyz",1,we(100)),z:he("xyz",2,we(108.833)),l:he("lab",0,we(100)),a:he("lab",1),b:he("lab",2),keyword(e){if(e!==void 0)return new _e(e);return xe[this.model].keyword(this.color)},hex(e){if(e!==void 0)return new _e(e);return ve.to.hex(...this.rgb().round().color)},hexa(e){if(e!==void 0)return new _e(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();if(r.length===1)r="0"+r;return ve.to.hex(...t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,n]of e.entries()){let i=n/255;t[r]=i<=0.04045?i/12.92:((i+0.055)/1.055)**2.4}return 0.2126*t[0]+0.7152*t[1]+0.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();if(t>r)return(t+0.05)/(r+0.05);return(r+0.05)/(t+0.05)},level(e){let t=this.contrast(e);if(t>=7)return"AAA";return t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*0.3+e[1]*0.59+e[2]*0.11;return _e.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),n=this.rgb(),i=t===void 0?0.5:t,a=2*i-1,l=r.alpha()-n.alpha(),u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2,h=1-u;return _e.rgb(u*r.red()+h*n.red(),u*r.green()+h*n.green(),u*r.blue()+h*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(let e of Object.keys(xe)){if(Wp.includes(e))continue;let{channels:t}=xe[e];_e.prototype[e]=function(...r){if(this.model===e)return new _e(this);if(r.length>0)return new _e(r,e);return new _e([...lE(xe[this.model][e].raw(this.color)),this.valpha],e)},_e[e]=function(...r){let n=r[0];if(typeof n==="number")n=Al(r,t);return new _e(n,e)}}function aE(e,t){return Number(e.toFixed(t))}function oE(e){return function(t){return aE(t,e)}}function he(e,t,r){e=Array.isArray(e)?e:[e];for(let n of e)(Nl[n]||=[])[t]=r;return e=e[0],function(n){let i;if(n!==void 0){if(r)n=r(n);return i=this[e](),i.color[t]=n,i}if(i=this[e]().color[t],r)i=r(i);return i}}function we(e){return function(t){return Math.max(0,Math.min(e,t))}}function lE(e){return Array.isArray(e)?e:[e]}function Al(e,t){for(let r=0;r<t;r++)if(typeof e[r]!=="number")e[r]=0;return e}function uE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cE=function(t){for(var r=0,n=0;r<t.length;n=t.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},$p=uE(cE);function fE(e,t){let r=e.split(t||":"),n=$p(r[0]);if(!r.length)return n;for(let i=0,a=r.length-1;i<a;i++)n=_e(n).mix(_e($p(r[i+1]))).saturate(1).hex();return n}Up.exports=fE});var Gp=v(function(iI,Vp){function Xe(e,t){if(t)return new Xe(e).style(t);if(!(this instanceof Xe))return new Xe(e);this.text=e}Xe.prototype.prefix="\x1B[";Xe.prototype.suffix="m";Xe.prototype.hex=function(t){if(t=t[0]==="#"?t.substring(1):t,t.length===3)t=t.split(""),t[5]=t[2],t[4]=t[2],t[3]=t[1],t[2]=t[1],t[1]=t[0],t=t.join("");var r=t.substring(0,2),n=t.substring(2,4),i=t.substring(4,6);return[parseInt(r,16),parseInt(n,16),parseInt(i,16)]};Xe.prototype.rgb=function(t,r,n){var i=t/255*5,a=r/255*5,l=n/255*5;return this.ansi(i,a,l)};Xe.prototype.ansi=function(t,r,n){var i=Math.round(t),a=Math.round(r),l=Math.round(n);return 16+i*36+a*6+l};Xe.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Xe.prototype.style=function(t){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(t))+this.suffix+this.text+this.reset()};Vp.exports=Xe});var zp=v(function(sI,Kp){var hE=Hp(),dE=Gp();Kp.exports=function(t,r){var n=r.namespace,i=r.colors!==!1?dE(n+":",hE(n)):n+":";return t[0]=i+" "+t[0],t}});var Qp=v(function(aI,Jp){Jp.exports=function(t,r){if(!r)return!1;var n=r.split(/[\s,]+/),i=0;for(;i<n.length;i++){if(r=n[i].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(t))return!1;continue}if(new RegExp("^"+r+"$").test(t))return!0}return!1}});var Xp=v(function(oI,Zp){var pE=Qp();Zp.exports=function(t){return function(n){try{return pE(n,t())}catch(i){}return!1}}});var tm=v(function(lI,em){var mE=Xp();em.exports=mE(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var nm=v(function(uI,rm){rm.exports=function(e,t){try{Function.prototype.apply.call(console.log,console,t)}catch(r){}}});var Jn=v(function(cI,im){var gE=jp(),yE=W("tty").isatty(1),Ss=gE(function e(t,r){if(r=r||{},r.colors="colors"in r?r.colors:yE,r.namespace=t,r.prod=!1,r.dev=!0,!e.enabled(t)&&!(r.force||e.force))return e.nope(r);return e.yep(r)});Ss.modify(zp());Ss.use(tm());Ss.set(nm());im.exports=Ss});var am=v(function(fI,sm){var rn=W("fs"),{StringDecoder:bE}=W("string_decoder"),{Stream:wE}=dr();function _E(){}sm.exports=(e,t)=>{let r=Buffer.alloc(65536),n=new bE("utf8"),i=new wE,a="",l=0,u=0;if(e.start===-1)delete e.start;if(i.readable=!0,i.destroy=()=>{i.destroyed=!0,i.emit("end"),i.emit("close")},rn.open(e.file,"a+","0644",(h,d)=>{if(h){if(!t)i.emit("error",h);else t(h);i.destroy();return}(function b(){if(i.destroyed){rn.close(d,_E);return}return rn.read(d,r,0,r.length,l,(m,g)=>{if(m){if(!t)i.emit("error",m);else t(m);i.destroy();return}if(!g){if(a){if(e.start==null||u>e.start)if(!t)i.emit("line",a);else t(null,a);u++,a=""}return setTimeout(b,1000)}let S=n.write(r.slice(0,g));if(!t)i.emit("data",S);S=(a+S).split(/\n+/);let y=S.length-1,_=0;for(;_<y;_++){if(e.start==null||u>e.start)if(!t)i.emit("line",S[_]);else t(null,S[_]);u++}return a=S[y],l+=g,b()})})()}),!t)return i;return i.destroy}});var hm=v(function(hI,fm){var ae=W("fs"),J=W("path"),om=Op(),um=W("zlib"),{MESSAGE:vE}=pe(),{Stream:SE,PassThrough:lm}=dr(),kE=fr(),et=Jn()("winston:file"),cm=W("os"),xE=am();fm.exports=class extends kE{constructor(t={}){super(t);this.name=t.name||"file";function r(n,...i){i.slice(1).forEach((a)=>{if(t[a])throw Error(`Cannot set ${a} and ${n} together`)})}if(this._stream=new lm,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),t.filename||t.dirname)r("filename or dirname","stream"),this._basename=this.filename=t.filename?J.basename(t.filename):"winston.log",this.dirname=t.dirname||J.dirname(t.filename),this.options=t.options||{flags:"a"};else if(t.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(t.stream)),this.dirname=J.dirname(this._dest.path);else throw Error("Cannot log to file without filename or stream.");if(this.maxsize=t.maxsize||null,this.rotationFormat=t.rotationFormat||!1,this.zippedArchive=t.zippedArchive||!1,this.maxFiles=t.maxFiles||null,this.eol=typeof t.eol==="string"?t.eol:cm.EOL,this.tailable=t.tailable||!1,this.lazy=t.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname)this._createLogDirIfNotExist(this.dirname);if(!this.lazy)this.open()}finishIfEnding(){if(this._ending)if(this._opening)this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())});else this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}_final(t){if(this._opening){this.once("open",()=>this._final(t));return}if(this._stream.end(),!this._dest)return t();if(this._dest.writableFinished)return t();this._dest.once("finish",t),this._dest.once("error",t)}log(t,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(t,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(t,r)});return}if(this.lazy){if(!this._fileExist){if(!this._opening)this.open();this.once("open",()=>{this._fileExist=!0,this.log(t,r);return});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{if(!this._opening)this.open();this.once("open",()=>{this.log(t,r);return});return});return}}let n=`${t[vE]}${this.eol}`,i=Buffer.byteLength(n);function a(){if(this._size+=i,this._pendingSize-=i,et("logged %s %s",this._size,n),this.emit("logged",t),this._rotate)return;if(this._opening)return;if(!this._needsNewFile())return;if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}if(this._pendingSize+=i,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize))this.rotatedWhileOpening=!0;let l=this._stream.write(n,a.bind(this));if(!l)this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()});else r();return et("written",l,this._drain),this.finishIfEnding(),l}query(t,r){if(typeof t==="function")r=t,t={};t=m(t);let n=J.join(this.dirname,this.filename),i="",a=[],l=0,u=ae.createReadStream(n,{encoding:"utf8"});u.on("error",(g)=>{if(u.readable)u.destroy();if(!r)return;return g.code!=="ENOENT"?r(g):r(null,a)}),u.on("data",(g)=>{g=(i+g).split(/\n+/);let S=g.length-1,y=0;for(;y<S;y++){if(!t.start||l>=t.start)h(g[y]);l++}i=g[S]}),u.on("close",()=>{if(i)h(i,!0);if(t.order==="desc")a=a.reverse();if(r)r(null,a)});function h(g,S){try{let y=JSON.parse(g);if(b(y))d(y)}catch(y){if(!S)u.emit("error",y)}}function d(g){if(t.rows&&a.length>=t.rows&&t.order!=="desc"){if(u.readable)u.destroy();return}if(t.fields)g=t.fields.reduce((S,y)=>(S[y]=g[y],S),{});if(t.order==="desc"){if(a.length>=t.rows)a.shift()}a.push(g)}function b(g){if(!g)return;if(typeof g!=="object")return;let S=new Date(g.timestamp);if(t.from&&S<t.from||t.until&&S>t.until||t.level&&t.level!==g.level)return;return!0}function m(g){if(g=g||{},g.rows=g.rows||g.limit||10,g.start=g.start||0,g.until=g.until||new Date,typeof g.until!=="object")g.until=new Date(g.until);if(g.from=g.from||g.until-86400000,typeof g.from!=="object")g.from=new Date(g.from);return g.order=g.order||"desc",g}}stream(t={}){let r=J.join(this.dirname,this.filename),n=new SE,i={file:r,start:t.start};return n.destroy=xE(i,(a,l)=>{if(a)return n.emit("error",a);try{n.emit("data",l),l=JSON.parse(l),n.emit("log",l)}catch(u){n.emit("error",u)}}),n}open(){if(!this.filename)return;if(this._opening)return;this._opening=!0,this.stat((t,r)=>{if(t)return this.emit("error",t);et("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{if(!this._stream.emit("rotate"))this._rotate=!1})})}stat(t){let r=this._getFile(),n=J.join(this.dirname,r);ae.stat(n,(i,a)=>{if(i&&i.code==="ENOENT")return et("ENOENT\xA0ok",n),this.filename=r,t(null,0);if(i)return et(`err ${i.code} ${n}`),t(i);if(!a||this._needsNewFile(a.size))return this._incFile(()=>this.stat(t));this.filename=r,t(null,a.size)})}close(t){if(!this._stream)return;this._stream.end(()=>{if(t)t();this.emit("flush"),this.emit("closed")})}_needsNewFile(t){return t=t||this._size,this.maxsize&&t>=this.maxsize}_onError(t){this.emit("error",t)}_setupStream(t){return t.on("error",this._onError),t}_cleanupStream(t){return t.removeListener("error",this._onError),t.destroy(),t}_rotateFile(){this._incFile(()=>this.open())}_endStream(t=()=>{}){if(this._dest)this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),t()});else t()}_createStream(t){let r=J.join(this.dirname,this.filename);et("create stream start",r,this.options);let n=ae.createWriteStream(r,this.options).on("error",(i)=>et(i)).on("close",()=>et("close",n.path,n.bytesWritten)).on("open",()=>{if(et("file open ok",r),this.emit("open",r),t.pipe(n),this.rotatedWhileOpening)this._stream=new lm,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(n),t.end()});return et("create stream ok",r),n}_incFile(t){et("_incFile",this.filename);let r=J.extname(this._basename),n=J.basename(this._basename,r),i=[];if(this.zippedArchive)i.push(function(a){let l=this._created>0&&!this.tailable?this._created:"";this._compressFile(J.join(this.dirname,`${n}${l}${r}`),J.join(this.dirname,`${n}${l}${r}.gz`),a)}.bind(this));i.push(function(a){if(!this.tailable)this._created+=1,this._checkMaxFilesIncrementing(r,n,a);else this._checkMaxFilesTailable(r,n,a)}.bind(this)),om(i,t)}_getFile(){let t=J.extname(this._basename),r=J.basename(this._basename,t),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${n}${t}`:`${r}${t}`}_checkMaxFilesIncrementing(t,r,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);let i=this._created-this.maxFiles,a=i!==0?i:"",l=this.zippedArchive?".gz":"",u=`${r}${a}${t}${l}`,h=J.join(this.dirname,u);ae.unlink(h,n)}_checkMaxFilesTailable(t,r,n){let i=[];if(!this.maxFiles)return;let a=this.zippedArchive?".gz":"";for(let l=this.maxFiles-1;l>1;l--)i.push(function(u,h){let d=`${r}${u-1}${t}${a}`,b=J.join(this.dirname,d);ae.exists(b,(m)=>{if(!m)return h(null);d=`${r}${u}${t}${a}`,ae.rename(b,J.join(this.dirname,d),h)})}.bind(this,l));om(i,()=>{ae.rename(J.join(this.dirname,`${r}${t}${a}`),J.join(this.dirname,`${r}1${t}${a}`),n)})}_compressFile(t,r,n){ae.access(t,ae.F_OK,(i)=>{if(i)return n();var a=um.createGzip(),l=ae.createReadStream(t),u=ae.createWriteStream(r);u.on("finish",()=>{ae.unlink(t,n)}),l.pipe(a).pipe(u)})}_createLogDirIfNotExist(t){if(!ae.existsSync(t))ae.mkdirSync(t,{recursive:!0})}}});var pm=v(function(dI,dm){var EE=W("http"),OE=W("https"),{Stream:ME}=dr(),TE=fr(),{configure:NE}=Ln();dm.exports=class extends TE{constructor(t={}){super(t);if(this.options=t,this.name=t.name||"http",this.ssl=!!t.ssl,this.host=t.host||"localhost",this.port=t.port,this.auth=t.auth,this.path=t.path||"",this.maximumDepth=t.maximumDepth,this.agent=t.agent,this.headers=t.headers||{},this.headers["content-type"]="application/json",this.batch=t.batch||!1,this.batchInterval=t.batchInterval||5000,this.batchCount=t.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},!this.port)this.port=this.ssl?443:80}log(t,r){if(this._request(t,null,null,(n,i)=>{if(i&&i.statusCode!==200)n=Error(`Invalid HTTP Status Code: ${i.statusCode}`);if(n)this.emit("warn",n);else this.emit("logged",t)}),r)setImmediate(r)}query(t,r){if(typeof t==="function")r=t,t={};t={method:"query",params:this.normalizeQuery(t)};let n=t.params.auth||null;delete t.params.auth;let i=t.params.path||null;delete t.params.path,this._request(t,n,i,(a,l,u)=>{if(l&&l.statusCode!==200)a=Error(`Invalid HTTP Status Code: ${l.statusCode}`);if(a)return r(a);if(typeof u==="string")try{u=JSON.parse(u)}catch(h){return r(h)}r(null,u)})}stream(t={}){let r=new ME;t={method:"stream",params:t};let n=t.params.path||null;delete t.params.path;let i=t.params.auth||null;delete t.params.auth;let a="",l=this._request(t,i,n);return r.destroy=()=>l.destroy(),l.on("data",(u)=>{u=(a+u).split(/\n+/);let h=u.length-1,d=0;for(;d<h;d++)try{r.emit("log",JSON.parse(u[d]))}catch(b){r.emit("error",b)}a=u[h]}),l.on("error",(u)=>r.emit("error",u)),r}_request(t,r,n,i){if(t=t||{},r=r||this.auth,n=n||this.path||"",this.batch)this._doBatch(t,i,r,n);else this._doRequest(t,i,r,n)}_doBatch(t,r,n,i){if(this.batchOptions.push(t),this.batchOptions.length===1){let a=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){a.batchTimeoutID=-1,a._doBatchRequest(a.batchCallback,n,i)},this.batchInterval)}if(this.batchOptions.length===this.batchCount)this._doBatchRequest(this.batchCallback,n,i)}_doBatchRequest(t,r,n){if(this.batchTimeoutID>0)clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1;let i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,t,r,n)}_doRequest(t,r,n,i){let a=Object.assign({},this.headers);if(n&&n.bearer)a.Authorization=`Bearer ${n.bearer}`;let l=(this.ssl?OE:EE).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${i.replace(/^\//,"")}`,headers:a,auth:n&&n.username&&n.password?`${n.username}:${n.password}`:"",agent:this.agent});l.on("error",r),l.on("response",(h)=>h.on("end",()=>r(null,h)).resume());let u=NE({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});l.end(Buffer.from(u(t,this.options.replacer),"utf8"))}}});var Dl=v(function(pI,mm){var ut=(e)=>e!==null&&typeof e==="object"&&typeof e.pipe==="function";ut.writable=(e)=>ut(e)&&e.writable!==!1&&typeof e._write==="function"&&typeof e._writableState==="object";ut.readable=(e)=>ut(e)&&e.readable!==!1&&typeof e._read==="function"&&typeof e._readableState==="object";ut.duplex=(e)=>ut.writable(e)&&ut.readable(e);ut.transform=(e)=>ut.duplex(e)&&typeof e._transform==="function";mm.exports=ut});var bm=v(function(mI,ym){var AE=Dl(),{MESSAGE:DE}=pe(),gm=W("os"),LE=fr();ym.exports=class extends LE{constructor(t={}){super(t);if(!t.stream||!AE(t.stream))throw Error("options.stream is required.");this._stream=t.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=t.stream._writableState.objectMode,this.eol=typeof t.eol==="string"?t.eol:gm.EOL}log(t,r){if(setImmediate(()=>this.emit("logged",t)),this.isObjectMode){if(this._stream.write(t),r)r();return}if(this._stream.write(`${t[DE]}${this.eol}`),r)r();return}}});var wm=v(function(Qn){Object.defineProperty(Qn,"Console",{configurable:!0,enumerable:!0,get(){return Yd()}});Object.defineProperty(Qn,"File",{configurable:!0,enumerable:!0,get(){return hm()}});Object.defineProperty(Qn,"Http",{configurable:!0,enumerable:!0,get(){return pm()}});Object.defineProperty(Qn,"Stream",{configurable:!0,enumerable:!0,get(){return bm()}})});var ks=v(function(qE){var Yt=vo(),{configs:Ll}=pe();qE.cli=Yt.levels(Ll.cli);qE.npm=Yt.levels(Ll.npm);qE.syslog=Yt.levels(Ll.syslog);qE.addColors=Yt.levels});var vm=v(function(ql,_m){Object.defineProperty(ql,"__esModule",{value:!0});var FE=ys(),jE=pr(FE),$E=bs(),YE=pr($E),BE=yl(),WE=pr(BE),UE=ol(),HE=pr(UE),VE=fl(),GE=pr(VE),KE=hr(),zE=pr(KE),JE=Zr(),QE=pr(JE);function pr(e){return e&&e.__esModule?e:{default:e}}function ZE(e,t,r){r=(0,HE.default)(r);var n=0,i=0,{length:a}=e,l=!1;if(a===0)r(null);function u(h,d){if(h===!1)l=!0;if(l===!0)return;if(h)r(h);else if(++i===a||d===YE.default)r(null)}for(;n<a;n++)t(e[n],n,(0,GE.default)(u))}function XE(e,t,r){return(0,WE.default)(e,1/0,t,r)}function eO(e,t,r){var n=(0,jE.default)(e)?ZE:XE;return n(e,(0,zE.default)(t),r)}ql.default=(0,QE.default)(eO,3);_m.exports=ql.default});var km=v(function(Pl,Sm){Object.defineProperty(Pl,"__esModule",{value:!0});Pl.default=rO;function rO(e){return(t,r,n)=>e(t,n)}Sm.exports=Pl.default});var Es=v(function(Rl,xm){Object.defineProperty(Rl,"__esModule",{value:!0});var iO=vm(),sO=xs(iO),aO=km(),oO=xs(aO),lO=hr(),uO=xs(lO),cO=Zr(),fO=xs(cO);function xs(e){return e&&e.__esModule?e:{default:e}}function hO(e,t,r){return(0,sO.default)(e,(0,oO.default)((0,uO.default)(t)),r)}Rl.default=(0,fO.default)(hO,3);xm.exports=Rl.default});var Om=v(function(bI,Em){var pO=Object.prototype.toString;Em.exports=function(t){if(typeof t.displayName==="string"&&t.constructor.name)return t.displayName;else if(typeof t.name==="string"&&t.name)return t.name;if(typeof t==="object"&&t.constructor&&typeof t.constructor.name==="string")return t.constructor.name;var r=t.toString(),n=pO.call(t).slice(8,-1);if(n==="Function")r=r.substring(r.indexOf("(")+1,r.indexOf(")"));else r=n;return r||"anonymous"}});var Cl=v(function(wI,Mm){var mO=Om();Mm.exports=function(t){var r=0,n;function i(){if(r)return n;return r=1,n=t.apply(this,arguments),t=null,n}return i.displayName=mO(t),i}});var Il=v(function(bO){bO.get=function(e){var t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},n=Error.prepareStackTrace;Error.prepareStackTrace=function(a,l){return l},Error.captureStackTrace(r,e||bO.get);var i=r.stack;return Error.prepareStackTrace=n,Error.stackTraceLimit=t,i};bO.parse=function(e){if(!e.stack)return[];var t=this,r=e.stack.split(`
|
|
28
|
+
`).slice(1);return r.map(function(n){if(n.match(/^\s*[-]{4,}$/))return t._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)return;var a=null,l=null,u=null,h=null,d=null,b=i[5]==="native";if(i[1]){u=i[1];var m=u.lastIndexOf(".");if(u[m-1]==".")m--;if(m>0){a=u.substr(0,m),l=u.substr(m+1);var g=a.indexOf(".Module");if(g>0)u=u.substr(g+1),a=a.substr(0,g)}h=null}if(l)h=a,d=l;if(l==="<anonymous>")d=null,u=null;var S={fileName:i[2]||null,lineNumber:parseInt(i[3],10)||null,functionName:u,typeName:h,methodName:d,columnNumber:parseInt(i[4],10)||null,native:b};return t._createParsedCallSite(S)}).filter(function(n){return!!n})};function Zn(e){for(var t in e)this[t]=e[t]}var gO=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],yO=["topLevel","eval","native","constructor"];gO.forEach(function(e){Zn.prototype[e]=null,Zn.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}});yO.forEach(function(e){Zn.prototype[e]=!1,Zn.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}});bO._createParsedCallSite=function(e){return new Zn(e)}});var Am=v(function(vI,Nm){var{Writable:vO}=dr();Nm.exports=class extends vO{constructor(t){super({objectMode:!0});if(!t)throw Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=t}_write(t,r,n){if(t.exception)return this.transport.log(t,n);return n(),!0}}});var jl=v(function(SI,Dm){var Os=W("os"),SO=Es(),Fl=Jn()("winston:exception"),kO=Cl(),Ms=Il(),xO=Am();Dm.exports=class{constructor(t){if(!t)throw Error("Logger is required to handle exceptions");this.logger=t,this.handlers=new Map}handle(...t){if(t.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(){if(this.catcher)process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((t)=>this.logger.unpipe(t))}getAllInfo(t){let r=null;if(t)r=typeof t==="string"?t:t.message;return{error:t,level:"error",message:[`uncaughtException: ${r||"(no error message)"}`,t&&t.stack||" No stack trace"].join(`
|
|
29
|
+
`),stack:t&&t.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(t)}}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:Os.loadavg(),uptime:Os.uptime()}}getTrace(t){return(t?Ms.parse(t):Ms.get()).map((n)=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(t){if(!this.handlers.has(t)){t.handleExceptions=!0;let r=new xO(t);this.handlers.set(t,r),this.logger.pipe(r)}}_uncaughtException(t){let r=this.getAllInfo(t),n=this._getExceptionHandlers(),i=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(t):this.logger.exitOnError,a;if(!n.length&&i)console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),i=!1;function l(){if(Fl("doExit",i),Fl("process._exiting",process._exiting),i&&!process._exiting){if(a)clearTimeout(a);process.exit(1)}}if(!n||n.length===0)return process.nextTick(l);if(SO(n,(u,h)=>{let d=kO(h),b=u.transport||u;function m(g){return()=>{Fl(g),d()}}b._ending=!0,b.once("finish",m("finished")),b.once("error",m("error"))},()=>i&&l()),this.logger.log(r),i)a=setTimeout(l,3000)}_getExceptionHandlers(){return this.logger.transports.filter((t)=>(t.transport||t).handleExceptions)}}});var qm=v(function(kI,Lm){var{Writable:EO}=dr();Lm.exports=class extends EO{constructor(t){super({objectMode:!0});if(!t)throw Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=t}_write(t,r,n){if(t.rejection)return this.transport.log(t,n);return n(),!0}}});var Yl=v(function(xI,Pm){var Ts=W("os"),OO=Es(),$l=Jn()("winston:rejection"),MO=Cl(),Ns=Il(),TO=qm();Pm.exports=class{constructor(t){if(!t)throw Error("Logger is required to handle rejections");this.logger=t,this.handlers=new Map}handle(...t){if(t.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(){if(this.catcher)process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((t)=>this.logger.unpipe(t))}getAllInfo(t){let r=null;if(t)r=typeof t==="string"?t:t.message;return{error:t,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,t&&t.stack||" No stack trace"].join(`
|
|
30
|
+
`),stack:t&&t.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(t)}}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:Ts.loadavg(),uptime:Ts.uptime()}}getTrace(t){return(t?Ns.parse(t):Ns.get()).map((n)=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(t){if(!this.handlers.has(t)){t.handleRejections=!0;let r=new TO(t);this.handlers.set(t,r),this.logger.pipe(r)}}_unhandledRejection(t){let r=this.getAllInfo(t),n=this._getRejectionHandlers(),i=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(t):this.logger.exitOnError,a;if(!n.length&&i)console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),i=!1;function l(){if($l("doExit",i),$l("process._exiting",process._exiting),i&&!process._exiting){if(a)clearTimeout(a);process.exit(1)}}if(!n||n.length===0)return process.nextTick(l);if(OO(n,(u,h)=>{let d=MO(h),b=u.transport||u;function m(g){return()=>{$l(g),d()}}b._ending=!0,b.once("finish",m("finished")),b.once("error",m("error"))},()=>i&&l()),this.logger.log(r),i)a=setTimeout(l,3000)}_getRejectionHandlers(){return this.logger.transports.filter((t)=>(t.transport||t).handleRejections)}}});var Im=v(function(EI,Cm){class Rm{constructor(e){let t=As();if(typeof e!=="object"||Array.isArray(e)||!(e instanceof t))throw Error("Logger is required for profiling");else this.logger=e,this.start=Date.now()}done(...e){if(typeof e[e.length-1]==="function")console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop();let t=typeof e[e.length-1]==="object"?e.pop():{};return t.level=t.level||"info",t.durationMs=Date.now()-this.start,this.logger.write(t)}}Cm.exports=Rm});var As=v(function(OI,Bm){var{Stream:NO,Transform:AO}=dr(),Fm=Es(),{LEVEL:ct,SPLAT:jm}=pe(),$m=Dl(),DO=jl(),LO=Yl(),qO=Zo(),PO=Im(),{warn:RO}=ko(),Ym=ks(),CO=/%[scdjifoO%]/g;class Bl extends AO{constructor(e){super({objectMode:!0});this.configure(e)}child(e){let t=this;return Object.create(t,{write:{value:function(r){let n=Object.assign({},e,r);if(r instanceof Error)n.stack=r.stack,n.message=r.message,n.cause=r.cause;t.write(n)}}})}configure({silent:e,format:t,defaultMeta:r,levels:n,level:i="info",exitOnError:a=!0,transports:l,colors:u,emitErrs:h,formatters:d,padLevels:b,rewriters:m,stripColors:g,exceptionHandlers:S,rejectionHandlers:y}={}){if(this.transports.length)this.clear();if(this.silent=e,this.format=t||this.format||bo()(),this.defaultMeta=r||null,this.levels=n||this.levels||Ym.npm.levels,this.level=i,this.exceptions)this.exceptions.unhandle();if(this.rejections)this.rejections.unhandle();if(this.exceptions=new DO(this),this.rejections=new LO(this),this.profilers={},this.exitOnError=a,l)l=Array.isArray(l)?l:[l],l.forEach((_)=>this.add(_));if(u||h||d||b||m||g)throw Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
31
|
+
`));if(S)this.exceptions.handle(S);if(y)this.rejections.handle(y)}getHighestLogLevel(){let e=Xn(this.levels,this.level);if(!this.transports||this.transports.length===0)return e;return this.transports.reduce((t,r)=>{let n=Xn(this.levels,r.level);return n!==null&&n>t?n:t},e)}isLevelEnabled(e){let t=Xn(this.levels,e);if(t===null)return!1;let r=Xn(this.levels,this.level);if(r===null)return!1;if(!this.transports||this.transports.length===0)return r>=t;return this.transports.findIndex((i)=>{let a=Xn(this.levels,i.level);if(a===null)a=r;return a>=t})!==-1}log(e,t,...r){if(arguments.length===1)return e[ct]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2){if(t&&typeof t==="object")return t[ct]=t.level=e,this._addDefaultMeta(t),this.write(t),this;return t={[ct]:e,level:e,message:t},this._addDefaultMeta(t),this.write(t),this}let[n]=r;if(typeof n==="object"&&n!==null){if(!(t&&t.match&&t.match(CO))){let a=Object.assign({},this.defaultMeta,n,{[ct]:e,[jm]:r,level:e,message:t});if(n.message)a.message=`${a.message} ${n.message}`;if(n.stack)a.stack=n.stack;if(n.cause)a.cause=n.cause;return this.write(a),this}}return this.write(Object.assign({},this.defaultMeta,{[ct]:e,[jm]:r,level:e,message:t})),this}_transform(e,t,r){if(this.silent)return r();if(!e[ct])e[ct]=e.level;if(!this.levels[e[ct]]&&this.levels[e[ct]]!==0)console.error("[winston] Unknown logger level: %s",e[ct]);if(!this._readableState.pipes)console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,r()}}_final(e){let t=this.transports.slice();Fm(t,(r,n)=>{if(!r||r.finished)return setImmediate(n);r.once("finish",n),r.end()},e)}add(e){let t=!$m(e)||e.log.length>2?new qO({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");if(this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions)this.exceptions.handle();if(e.handleRejections)this.rejections.handle();return this}remove(e){if(!e)return this;let t=e;if(!$m(e)||e.log.length>2)t=this.transports.filter((r)=>r.transport===e)[0];if(t)this.unpipe(t);return this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){RO.deprecated("setLevels")}query(e,t){if(typeof e==="function")t=e,e={};e=e||{};let r={},n=Object.assign({},e.query||{});function i(l,u){if(e.query&&typeof l.formatQuery==="function")e.query=l.formatQuery(n);l.query(e,(h,d)=>{if(h)return u(h);if(typeof l.formatResults==="function")d=l.formatResults(d,e.format);u(null,d)})}function a(l,u){i(l,(h,d)=>{if(u){if(d=h||d,d)r[l.name]=d;u()}u=null})}Fm(this.transports.filter((l)=>!!l.query),a,()=>t(null,r))}stream(e={}){let t=new NO,r=[];return t._streams=r,t.destroy=()=>{let n=r.length;while(n--)r[n].destroy()},this.transports.filter((n)=>!!n.stream).forEach((n)=>{let i=n.stream(e);if(!i)return;r.push(i),i.on("log",(a)=>{a.transport=a.transport||[],a.transport.push(n.name),t.emit("log",a)}),i.on("error",(a)=>{a.transport=a.transport||[],a.transport.push(n.name),t.emit("error",a)})}),t}startTimer(){return new PO(this)}profile(e,...t){let r=Date.now();if(this.profilers[e]){let n=this.profilers[e];if(delete this.profilers[e],typeof t[t.length-2]==="function")console.warn("Callback function no longer supported as of winston@3.0.0"),t.pop();let i=typeof t[t.length-1]==="object"?t.pop():{};return i.level=i.level||"info",i.durationMs=r-n,i.message=i.message||e,this.write(i)}return this.profilers[e]=r,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 Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
32
|
+
`))}_onEvent(e,t){function r(n){if(e==="error"&&!this.transports.includes(t))this.add(t);this.emit(e,n,t)}if(!t["__winston"+e])t["__winston"+e]=r.bind(this),t.on(e,t["__winston"+e])}_addDefaultMeta(e){if(this.defaultMeta)Object.assign(e,this.defaultMeta)}}function Xn(e,t){let r=e[t];if(!r&&r!==0)return null;return r}Object.defineProperty(Bl.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:e}=this._readableState;return!Array.isArray(e)?[e].filter(Boolean):e}});Bm.exports=Bl});var Wl=v(function(MI,Um){var{LEVEL:IO}=pe(),Wm=ks(),FO=As(),jO=Jn()("winston:create-logger");function $O(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}Um.exports=function(e={}){e.levels=e.levels||Wm.npm.levels;class t extends FO{constructor(n){super(n)}}let r=new t(e);return Object.keys(e.levels).forEach(function(n){if(jO('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}t.prototype[n]=function(...i){let a=this||r;if(i.length===1){let[l]=i,u=l&&l.message&&l||{message:l};return u.level=u[IO]=n,a._addDefaultMeta(u),a.write(u),this||r}if(i.length===0)return a.log(n,""),a;return a.log(n,...i)},t.prototype[$O(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var Vm=v(function(TI,Hm){var YO=Wl();Hm.exports=class{constructor(t={}){this.loggers=new Map,this.options=t}add(t,r){if(!this.loggers.has(t)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;if(n)r.transports=Array.isArray(n)?n.slice():[n];else r.transports=[];let i=YO(r);i.on("close",()=>this._delete(t)),this.loggers.set(t,i)}return this.loggers.get(t)}get(t,r){return this.add(t,r)}has(t){return!!this.loggers.has(t)}close(t){if(t)return this._removeLogger(t);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(t){if(!this.loggers.has(t))return;this.loggers.get(t).close(),this._delete(t)}_delete(t){this.loggers.delete(t)}}});var Ul=v(function(Be){var Ds=vo(),{warn:ei}=ko();Be.version=$h().version;Be.transports=wm();Be.config=ks();Be.addColors=Ds.levels;Be.format=Ds.format;Be.createLogger=Wl();Be.Logger=As();Be.ExceptionHandler=jl();Be.RejectionHandler=Yl();Be.Container=Vm();Be.Transport=fr();Be.loggers=new Be.Container;var ft=Be.createLogger();Object.keys(Be.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((e)=>Be[e]=(...t)=>ft[e](...t));Object.defineProperty(Be,"level",{get(){return ft.level},set(e){ft.level=e}});Object.defineProperty(Be,"exceptions",{get(){return ft.exceptions}});Object.defineProperty(Be,"rejections",{get(){return ft.rejections}});["exitOnError"].forEach((e)=>{Object.defineProperty(Be,e,{get(){return ft[e]},set(t){ft[e]=t}})});Object.defineProperty(Be,"default",{get(){return{exceptionHandlers:ft.exceptionHandlers,rejectionHandlers:ft.rejectionHandlers,transports:ft.transports}}});ei.deprecated(Be,"setLevels");ei.forFunctions(Be,"useFormat",["cli"]);ei.forProperties(Be,"useFormat",["padLevels","stripColors"]);ei.forFunctions(Be,"deprecated",["addRewriter","addFilter","clone","extend"]);ei.forProperties(Be,"deprecated",["emitErrs","levelLength"])});var tg=v(function(mr,eg){var Hl=W("crypto");mr=eg.exports=ti;function ti(e,t){return t=Zm(e,t),QO(e,t)}mr.sha1=function(e){return ti(e)};mr.keys=function(e){return ti(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})};mr.MD5=function(e){return ti(e,{algorithm:"md5",encoding:"hex"})};mr.keysMD5=function(e){return ti(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var nn=Hl.getHashes?Hl.getHashes().slice():["sha1","md5"];nn.push("passthrough");var Jm=["buffer","hex","binary","base64"];function Zm(e,t){t=t||{};var r={};if(r.algorithm=t.algorithm||"sha1",r.encoding=t.encoding||"hex",r.excludeValues=t.excludeValues?!0:!1,r.algorithm=r.algorithm.toLowerCase(),r.encoding=r.encoding.toLowerCase(),r.ignoreUnknown=t.ignoreUnknown!==!0?!1:!0,r.respectType=t.respectType===!1?!1:!0,r.respectFunctionNames=t.respectFunctionNames===!1?!1:!0,r.respectFunctionProperties=t.respectFunctionProperties===!1?!1:!0,r.unorderedArrays=t.unorderedArrays!==!0?!1:!0,r.unorderedSets=t.unorderedSets===!1?!1:!0,r.unorderedObjects=t.unorderedObjects===!1?!1:!0,r.replacer=t.replacer||void 0,r.excludeKeys=t.excludeKeys||void 0,typeof e>"u")throw Error("Object argument required.");for(var n=0;n<nn.length;++n)if(nn[n].toLowerCase()===r.algorithm.toLowerCase())r.algorithm=nn[n];if(nn.indexOf(r.algorithm)===-1)throw Error('Algorithm "'+r.algorithm+'" not supported. supported values: '+nn.join(", "));if(Jm.indexOf(r.encoding)===-1&&r.algorithm!=="passthrough")throw Error('Encoding "'+r.encoding+'" not supported. supported values: '+Jm.join(", "));return r}function Qm(e){if(typeof e!=="function")return!1;var t=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return t.exec(Function.prototype.toString.call(e))!=null}function QO(e,t){var r;if(t.algorithm!=="passthrough")r=Hl.createHash(t.algorithm);else r=new Xm;if(typeof r.write>"u")r.write=r.update,r.end=r.update;var n=Vl(t,r);if(n.dispatch(e),!r.update)r.end("");if(r.digest)return r.digest(t.encoding==="buffer"?void 0:t.encoding);var i=r.read();if(t.encoding==="buffer")return i;return i.toString(t.encoding)}mr.writeToStream=function(e,t,r){if(typeof r>"u")r=t,t={};return t=Zm(e,t),Vl(t,r).dispatch(e)};function Vl(e,t,r){r=r||[];var n=function(i){if(t.update)return t.update(i,"utf8");else return t.write(i,"utf8")};return{dispatch:function(i){if(e.replacer)i=e.replacer(i);var a=typeof i;if(i===null)a="null";return this["_"+a](i)},_object:function(i){var a=/\[object (.*)\]/i,l=Object.prototype.toString.call(i),u=a.exec(l);if(!u)u="unknown:["+l+"]";else u=u[1];u=u.toLowerCase();var h=null;if((h=r.indexOf(i))>=0)return this.dispatch("[CIRCULAR:"+h+"]");else r.push(i);if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(i))return n("buffer:"),n(i);if(u!=="object"&&u!=="function"&&u!=="asyncfunction")if(this["_"+u])this["_"+u](i);else if(e.ignoreUnknown)return n("["+u+"]");else throw Error('Unknown object type "'+u+'"');else{var d=Object.keys(i);if(e.unorderedObjects)d=d.sort();if(e.respectType!==!1&&!Qm(i))d.splice(0,0,"prototype","__proto__","constructor");if(e.excludeKeys)d=d.filter(function(m){return!e.excludeKeys(m)});n("object:"+d.length+":");var b=this;return d.forEach(function(m){if(b.dispatch(m),n(":"),!e.excludeValues)b.dispatch(i[m]);n(",")})}},_array:function(i,a){a=typeof a<"u"?a:e.unorderedArrays!==!1;var l=this;if(n("array:"+i.length+":"),!a||i.length<=1)return i.forEach(function(d){return l.dispatch(d)});var u=[],h=i.map(function(d){var b=new Xm,m=r.slice(),g=Vl(e,b,m);return g.dispatch(d),u=u.concat(m.slice(r.length)),b.read().toString()});return r=r.concat(u),h.sort(),this._array(h,!1)},_date:function(i){return n("date:"+i.toJSON())},_symbol:function(i){return n("symbol:"+i.toString())},_error:function(i){return n("error:"+i.toString())},_boolean:function(i){return n("bool:"+i.toString())},_string:function(i){n("string:"+i.length+":"),n(i.toString())},_function:function(i){if(n("fn:"),Qm(i))this.dispatch("[native]");else this.dispatch(i.toString());if(e.respectFunctionNames!==!1)this.dispatch("function-name:"+String(i.name));if(e.respectFunctionProperties)this._object(i)},_number:function(i){return n("number:"+i.toString())},_xml:function(i){return n("xml:"+i.toString())},_null:function(){return n("Null")},_undefined:function(){return n("Undefined")},_regexp:function(i){return n("regex:"+i.toString())},_uint8array:function(i){return n("uint8array:"),this.dispatch(Array.prototype.slice.call(i))},_uint8clampedarray:function(i){return n("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(i))},_int8array:function(i){return n("int8array:"),this.dispatch(Array.prototype.slice.call(i))},_uint16array:function(i){return n("uint16array:"),this.dispatch(Array.prototype.slice.call(i))},_int16array:function(i){return n("int16array:"),this.dispatch(Array.prototype.slice.call(i))},_uint32array:function(i){return n("uint32array:"),this.dispatch(Array.prototype.slice.call(i))},_int32array:function(i){return n("int32array:"),this.dispatch(Array.prototype.slice.call(i))},_float32array:function(i){return n("float32array:"),this.dispatch(Array.prototype.slice.call(i))},_float64array:function(i){return n("float64array:"),this.dispatch(Array.prototype.slice.call(i))},_arraybuffer:function(i){return n("arraybuffer:"),this.dispatch(new Uint8Array(i))},_url:function(i){return n("url:"+i.toString(),"utf8")},_map:function(i){n("map:");var a=Array.from(i);return this._array(a,e.unorderedSets!==!1)},_set:function(i){n("set:");var a=Array.from(i);return this._array(a,e.unorderedSets!==!1)},_file:function(i){return n("file:"),this.dispatch([i.name,i.size,i.type,i.lastModfied])},_blob:function(){if(e.ignoreUnknown)return n("[blob]");throw Error(`Hashing Blob objects is currently not supported
|
|
33
33
|
(see https://github.com/puleos/object-hash/issues/26)
|
|
34
34
|
Use "options.replacer" or "options.ignoreUnknown"
|
|
35
|
-
`)},_domwindow:function(){return n("domwindow")},_bigint:function(
|
|
35
|
+
`)},_domwindow:function(){return n("domwindow")},_bigint:function(i){return n("bigint:"+i.toString())},_process:function(){return n("process")},_timer:function(){return n("timer")},_pipe:function(){return n("pipe")},_tcp:function(){return n("tcp")},_udp:function(){return n("udp")},_tty:function(){return n("tty")},_statwatcher:function(){return n("statwatcher")},_securecontext:function(){return n("securecontext")},_connection:function(){return n("connection")},_zlib:function(){return n("zlib")},_context:function(){return n("context")},_nodescript:function(){return n("nodescript")},_httpparser:function(){return n("httpparser")},_dataview:function(){return n("dataview")},_signal:function(){return n("signal")},_fsevent:function(){return n("fsevent")},_tlswrap:function(){return n("tlswrap")}}}function Xm(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}});var rg=v(function(Gl,sn){//! moment.js
|
|
36
36
|
//! version : 2.30.1
|
|
37
37
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
38
38
|
//! license : MIT
|
|
39
39
|
//! momentjs.com
|
|
40
|
-
(function(e,t){typeof
|
|
41
|
-
[`+w+"] ";for(x in arguments[0])if(a(arguments[0],x))p+=x+": "+arguments[0][x]+", ";p=p.slice(0,-2)}else p=arguments[w];f.push(p)}F(
|
|
40
|
+
(function(e,t){typeof Gl==="object"&&typeof sn<"u"?sn.exports=t():typeof define==="function"&&define.amd?define(t):e.moment=t()})(Gl,function(){var e;function t(){return e.apply(null,arguments)}function r(s){e=s}function n(s){return s instanceof Array||Object.prototype.toString.call(s)==="[object Array]"}function i(s){return s!=null&&Object.prototype.toString.call(s)==="[object Object]"}function a(s,o){return Object.prototype.hasOwnProperty.call(s,o)}function l(s){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(s).length===0;else{var o;for(o in s)if(a(s,o))return!1;return!0}}function u(s){return s===void 0}function h(s){return typeof s==="number"||Object.prototype.toString.call(s)==="[object Number]"}function d(s){return s instanceof Date||Object.prototype.toString.call(s)==="[object Date]"}function b(s,o){var c=[],f,p=s.length;for(f=0;f<p;++f)c.push(o(s[f],f));return c}function m(s,o){for(var c in o)if(a(o,c))s[c]=o[c];if(a(o,"toString"))s.toString=o.toString;if(a(o,"valueOf"))s.valueOf=o.valueOf;return s}function g(s,o,c,f){return Lc(s,o,c,f,!0).utc()}function S(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function y(s){if(s._pf==null)s._pf=S();return s._pf}var _;if(Array.prototype.some)_=Array.prototype.some;else _=function(s){var o=Object(this),c=o.length>>>0,f;for(f=0;f<c;f++)if(f in o&&s.call(this,o[f],f,o))return!0;return!1};function k(s){var o=null,c=!1,f=s._d&&!isNaN(s._d.getTime());if(f){if(o=y(s),c=_.call(o.parsedDateParts,function(p){return p!=null}),f=o.overflow<0&&!o.empty&&!o.invalidEra&&!o.invalidMonth&&!o.invalidWeekday&&!o.weekdayMismatch&&!o.nullInput&&!o.invalidFormat&&!o.userInvalidated&&(!o.meridiem||o.meridiem&&c),s._strict)f=f&&o.charsLeftOver===0&&o.unusedTokens.length===0&&o.bigHour===void 0}if(Object.isFrozen==null||!Object.isFrozen(s))s._isValid=f;else return f;return s._isValid}function O(s){var o=g(NaN);if(s!=null)m(y(o),s);else y(o).userInvalidated=!0;return o}var A=t.momentProperties=[],E=!1;function T(s,o){var c,f,p,w=A.length;if(!u(o._isAMomentObject))s._isAMomentObject=o._isAMomentObject;if(!u(o._i))s._i=o._i;if(!u(o._f))s._f=o._f;if(!u(o._l))s._l=o._l;if(!u(o._strict))s._strict=o._strict;if(!u(o._tzm))s._tzm=o._tzm;if(!u(o._isUTC))s._isUTC=o._isUTC;if(!u(o._offset))s._offset=o._offset;if(!u(o._pf))s._pf=y(o);if(!u(o._locale))s._locale=o._locale;if(w>0){for(c=0;c<w;c++)if(f=A[c],p=o[f],!u(p))s[f]=p}return s}function q(s){if(T(this,s),this._d=new Date(s._d!=null?s._d.getTime():NaN),!this.isValid())this._d=new Date(NaN);if(E===!1)E=!0,t.updateOffset(this),E=!1}function L(s){return s instanceof q||s!=null&&s._isAMomentObject!=null}function F(s){if(t.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn)console.warn("Deprecation warning: "+s)}function N(s,o){var c=!0;return m(function(){if(t.deprecationHandler!=null)t.deprecationHandler(null,s);if(c){var f=[],p,w,x,R=arguments.length;for(w=0;w<R;w++){if(p="",typeof arguments[w]==="object"){p+=`
|
|
41
|
+
[`+w+"] ";for(x in arguments[0])if(a(arguments[0],x))p+=x+": "+arguments[0][x]+", ";p=p.slice(0,-2)}else p=arguments[w];f.push(p)}F(s+`
|
|
42
42
|
Arguments: `+Array.prototype.slice.call(f).join("")+`
|
|
43
|
-
`+Error().stack),c=!1}return o.apply(this,arguments)},o)}var I={};function re(i,o){if(t.deprecationHandler!=null)t.deprecationHandler(i,o);if(!I[i])F(o),I[i]=!0}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;function Q(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function H(i){var o,c;for(c in i)if(a(i,c))if(o=i[c],Q(o))this[c]=o;else this["_"+c]=o;this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function he(i,o){var c=m({},i),f;for(f in o)if(a(o,f))if(s(i[f])&&s(o[f]))c[f]={},m(c[f],i[f]),m(c[f],o[f]);else if(o[f]!=null)c[f]=o[f];else delete c[f];for(f in i)if(a(i,f)&&!a(o,f)&&s(i[f]))c[f]=m({},c[f]);return c}function Ee(i){if(i!=null)this.set(i)}var et;if(Object.keys)et=Object.keys;else et=function(i){var o,c=[];for(o in i)if(a(i,o))c.push(o);return c};var M={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function j(i,o,c){var f=this._calendar[i]||this._calendar.sameElse;return Q(f)?f.call(o,c):f}function G(i,o,c){var f=""+Math.abs(i),p=o-f.length,w=i>=0;return(w?c?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+f}var _e=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ae={},De={};function Y(i,o,c,f){var p=f;if(typeof f==="string")p=function(){return this[f]()};if(i)De[i]=p;if(o)De[o[0]]=function(){return G(p.apply(this,arguments),o[1],o[2])};if(c)De[c]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)}}function vr(i){if(i.match(/\[[\s\S]/))return i.replace(/^\[|\]$/g,"");return i.replace(/\\/g,"")}function vs(i){var o=i.match(_e),c,f;for(c=0,f=o.length;c<f;c++)if(De[o[c]])o[c]=De[o[c]];else o[c]=vr(o[c]);return function(p){var w="",x;for(x=0;x<f;x++)w+=Q(o[x])?o[x].call(p,i):o[x];return w}}function ht(i,o){if(!i.isValid())return i.localeData().invalidDate();return o=Ss(o,i.localeData()),Ae[o]=Ae[o]||vs(o),Ae[o](i)}function Ss(i,o){var c=5;function f(p){return o.longDateFormat(p)||p}B.lastIndex=0;while(c>=0&&B.test(i))i=i.replace(B,f),B.lastIndex=0,c-=1;return i}var Fe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Es(i){var o=this._longDateFormat[i],c=this._longDateFormat[i.toUpperCase()];if(o||!c)return o;return this._longDateFormat[i]=c.match(_e).map(function(f){if(f==="MMMM"||f==="MM"||f==="DD"||f==="dddd")return f.slice(1);return f}).join(""),this._longDateFormat[i]}var da="Invalid date";function xs(){return this._invalidDate}var ks="%d",Sr=/\d{1,2}/;function Er(i){return this._ordinal.replace("%d",i)}var pa={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function zt(i,o,c,f){var p=this._relativeTime[c];return Q(p)?p(i,o,c,f):p.replace(/%d/i,i)}function Mt(i,o){var c=this._relativeTime[i>0?"future":"past"];return Q(c)?c(o):c.replace(/%s/i,o)}var xr={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Le(i){return typeof i==="string"?xr[i]||xr[i.toLowerCase()]:void 0}function kr(i){var o={},c,f;for(f in i)if(a(i,f)){if(c=Le(f),c)o[c]=i[f]}return o}var p0={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function m0(i){var o=[],c;for(c in i)if(a(i,c))o.push({unit:c,priority:p0[c]});return o.sort(function(f,p){return f.priority-p.priority}),o}var Xu=/\d/,je=/\d\d/,ec=/\d{3}/,ma=/\d{4}/,Os=/[+-]?\d{6}/,se=/\d\d?/,tc=/\d\d\d\d?/,rc=/\d\d\d\d\d\d?/,Ms=/\d{1,3}/,ga=/\d{1,4}/,Ts=/[+-]?\d{1,6}/,Or=/\d+/,Ns=/[+-]?\d+/,g0=/Z|[+-]\d\d:?\d\d/gi,As=/Z|[+-]\d\d(?::?\d\d)?/gi,y0=/[+-]?\d+(\.\d{1,3})?/,dn=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Mr=/^[1-9]\d?/,ya=/^([1-9]\d|\d)/,Ds;Ds={};function P(i,o,c){Ds[i]=Q(o)?o:function(f,p){return f&&c?c:o}}function b0(i,o){if(!a(Ds,i))return new RegExp(w0(i));return Ds[i](o._strict,o._locale)}function w0(i){return dt(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(o,c,f,p,w){return c||f||p||w}))}function dt(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $e(i){if(i<0)return Math.ceil(i)||0;else return Math.floor(i)}function z(i){var o=+i,c=0;if(o!==0&&isFinite(o))c=$e(o);return c}var ba={};function ne(i,o){var c,f=o,p;if(typeof i==="string")i=[i];if(h(o))f=function(w,x){x[o]=z(w)};p=i.length;for(c=0;c<p;c++)ba[i[c]]=f}function pn(i,o){ne(i,function(c,f,p,w){p._w=p._w||{},o(c,p._w,p,w)})}function _0(i,o,c){if(o!=null&&a(ba,i))ba[i](o,c._a,c,i)}function Ls(i){return i%4===0&&i%100!==0||i%400===0}var ke=0,pt=1,tt=2,me=3,Ve=4,mt=5,Jt=6,v0=7,S0=8;Y("Y",0,0,function(){var i=this.year();return i<=9999?G(i,4):"+"+i}),Y(0,["YY",2],0,function(){return this.year()%100}),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),P("Y",Ns),P("YY",se,je),P("YYYY",ga,ma),P("YYYYY",Ts,Os),P("YYYYYY",Ts,Os),ne(["YYYYY","YYYYYY"],ke),ne("YYYY",function(i,o){o[ke]=i.length===2?t.parseTwoDigitYear(i):z(i)}),ne("YY",function(i,o){o[ke]=t.parseTwoDigitYear(i)}),ne("Y",function(i,o){o[ke]=parseInt(i,10)});function mn(i){return Ls(i)?366:365}t.parseTwoDigitYear=function(i){return z(i)+(z(i)>68?1900:2000)};var nc=Tr("FullYear",!0);function E0(){return Ls(this.year())}function Tr(i,o){return function(c){if(c!=null)return sc(this,i,c),t.updateOffset(this,o),this;else return gn(this,i)}}function gn(i,o){if(!i.isValid())return NaN;var{_d:c,_isUTC:f}=i;switch(o){case"Milliseconds":return f?c.getUTCMilliseconds():c.getMilliseconds();case"Seconds":return f?c.getUTCSeconds():c.getSeconds();case"Minutes":return f?c.getUTCMinutes():c.getMinutes();case"Hours":return f?c.getUTCHours():c.getHours();case"Date":return f?c.getUTCDate():c.getDate();case"Day":return f?c.getUTCDay():c.getDay();case"Month":return f?c.getUTCMonth():c.getMonth();case"FullYear":return f?c.getUTCFullYear():c.getFullYear();default:return NaN}}function sc(i,o,c){var f,p,w,x,C;if(!i.isValid()||isNaN(c))return;switch(f=i._d,p=i._isUTC,o){case"Milliseconds":return void(p?f.setUTCMilliseconds(c):f.setMilliseconds(c));case"Seconds":return void(p?f.setUTCSeconds(c):f.setSeconds(c));case"Minutes":return void(p?f.setUTCMinutes(c):f.setMinutes(c));case"Hours":return void(p?f.setUTCHours(c):f.setHours(c));case"Date":return void(p?f.setUTCDate(c):f.setDate(c));case"FullYear":break;default:return}w=c,x=i.month(),C=i.date(),C=C===29&&x===1&&!Ls(w)?28:C,p?f.setUTCFullYear(w,x,C):f.setFullYear(w,x,C)}function x0(i){if(i=Le(i),Q(this[i]))return this[i]();return this}function k0(i,o){if(typeof i==="object"){i=kr(i);var c=m0(i),f,p=c.length;for(f=0;f<p;f++)this[c[f].unit](i[c[f].unit])}else if(i=Le(i),Q(this[i]))return this[i](o);return this}function O0(i,o){return(i%o+o)%o}var ce;if(Array.prototype.indexOf)ce=Array.prototype.indexOf;else ce=function(i){var o;for(o=0;o<this.length;++o)if(this[o]===i)return o;return-1};function wa(i,o){if(isNaN(i)||isNaN(o))return NaN;var c=O0(o,12);return i+=(o-c)/12,c===1?Ls(i)?29:28:31-c%7%2}Y("M",["MM",2],"Mo",function(){return this.month()+1}),Y("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),Y("MMMM",0,0,function(i){return this.localeData().months(this,i)}),P("M",se,Mr),P("MM",se,je),P("MMM",function(i,o){return o.monthsShortRegex(i)}),P("MMMM",function(i,o){return o.monthsRegex(i)}),ne(["M","MM"],function(i,o){o[pt]=z(i)-1}),ne(["MMM","MMMM"],function(i,o,c,f){var p=c._locale.monthsParse(i,f,c._strict);if(p!=null)o[pt]=p;else y(c).invalidMonth=i});var M0="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ic="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ac=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,T0=dn,N0=dn;function A0(i,o){if(!i)return n(this._months)?this._months:this._months.standalone;return n(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||ac).test(o)?"format":"standalone"][i.month()]}function D0(i,o){if(!i)return n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone;return n(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[ac.test(o)?"format":"standalone"][i.month()]}function L0(i,o,c){var f,p,w,x=i.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(f=0;f<12;++f)w=g([2000,f]),this._shortMonthsParse[f]=this.monthsShort(w,"").toLocaleLowerCase(),this._longMonthsParse[f]=this.months(w,"").toLocaleLowerCase()}if(c)if(o==="MMM")return p=ce.call(this._shortMonthsParse,x),p!==-1?p:null;else return p=ce.call(this._longMonthsParse,x),p!==-1?p:null;else if(o==="MMM"){if(p=ce.call(this._shortMonthsParse,x),p!==-1)return p;return p=ce.call(this._longMonthsParse,x),p!==-1?p:null}else{if(p=ce.call(this._longMonthsParse,x),p!==-1)return p;return p=ce.call(this._shortMonthsParse,x),p!==-1?p:null}}function q0(i,o,c){var f,p,w;if(this._monthsParseExact)return L0.call(this,i,o,c);if(!this._monthsParse)this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(f=0;f<12;f++){if(p=g([2000,f]),c&&!this._longMonthsParse[f])this._longMonthsParse[f]=new RegExp("^"+this.months(p,"").replace(".","")+"$","i"),this._shortMonthsParse[f]=new RegExp("^"+this.monthsShort(p,"").replace(".","")+"$","i");if(!c&&!this._monthsParse[f])w="^"+this.months(p,"")+"|^"+this.monthsShort(p,""),this._monthsParse[f]=new RegExp(w.replace(".",""),"i");if(c&&o==="MMMM"&&this._longMonthsParse[f].test(i))return f;else if(c&&o==="MMM"&&this._shortMonthsParse[f].test(i))return f;else if(!c&&this._monthsParse[f].test(i))return f}}function oc(i,o){if(!i.isValid())return i;if(typeof o==="string"){if(/^\d+$/.test(o))o=z(o);else if(o=i.localeData().monthsParse(o),!h(o))return i}var c=o,f=i.date();return f=f<29?f:Math.min(f,wa(i.year(),c)),i._isUTC?i._d.setUTCMonth(c,f):i._d.setMonth(c,f),i}function lc(i){if(i!=null)return oc(this,i),t.updateOffset(this,!0),this;else return gn(this,"Month")}function R0(){return wa(this.year(),this.month())}function C0(i){if(this._monthsParseExact){if(!a(this,"_monthsRegex"))uc.call(this);if(i)return this._monthsShortStrictRegex;else return this._monthsShortRegex}else{if(!a(this,"_monthsShortRegex"))this._monthsShortRegex=T0;return this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex}}function P0(i){if(this._monthsParseExact){if(!a(this,"_monthsRegex"))uc.call(this);if(i)return this._monthsStrictRegex;else return this._monthsRegex}else{if(!a(this,"_monthsRegex"))this._monthsRegex=N0;return this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex}}function uc(){function i(W,J){return J.length-W.length}var o=[],c=[],f=[],p,w,x,C;for(p=0;p<12;p++)w=g([2000,p]),x=dt(this.monthsShort(w,"")),C=dt(this.months(w,"")),o.push(x),c.push(C),f.push(C),f.push(x);o.sort(i),c.sort(i),f.sort(i),this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function I0(i,o,c,f,p,w,x){var C;if(i<100&&i>=0){if(C=new Date(i+400,o,c,f,p,w,x),isFinite(C.getFullYear()))C.setFullYear(i)}else C=new Date(i,o,c,f,p,w,x);return C}function yn(i){var o,c;if(i<100&&i>=0){if(c=Array.prototype.slice.call(arguments),c[0]=i+400,o=new Date(Date.UTC.apply(null,c)),isFinite(o.getUTCFullYear()))o.setUTCFullYear(i)}else o=new Date(Date.UTC.apply(null,arguments));return o}function qs(i,o,c){var f=7+o-c,p=(7+yn(i,0,f).getUTCDay()-o)%7;return-p+f-1}function cc(i,o,c,f,p){var w=(7+c-f)%7,x=qs(i,f,p),C=1+7*(o-1)+w+x,W,J;if(C<=0)W=i-1,J=mn(W)+C;else if(C>mn(i))W=i+1,J=C-mn(i);else W=i,J=C;return{year:W,dayOfYear:J}}function bn(i,o,c){var f=qs(i.year(),o,c),p=Math.floor((i.dayOfYear()-f-1)/7)+1,w,x;if(p<1)x=i.year()-1,w=p+gt(x,o,c);else if(p>gt(i.year(),o,c))w=p-gt(i.year(),o,c),x=i.year()+1;else x=i.year(),w=p;return{week:w,year:x}}function gt(i,o,c){var f=qs(i,o,c),p=qs(i+1,o,c);return(mn(i)-f+p)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),P("w",se,Mr),P("ww",se,je),P("W",se,Mr),P("WW",se,je),pn(["w","ww","W","WW"],function(i,o,c,f){o[f.substr(0,1)]=z(i)});function F0(i){return bn(i,this._week.dow,this._week.doy).week}var j0={dow:0,doy:6};function Y0(){return this._week.dow}function $0(){return this._week.doy}function B0(i){var o=this.localeData().week(this);return i==null?o:this.add((i-o)*7,"d")}function U0(i){var o=bn(this,1,4).week;return i==null?o:this.add((i-o)*7,"d")}Y("d",0,"do","day"),Y("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),Y("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),Y("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),P("d",se),P("e",se),P("E",se),P("dd",function(i,o){return o.weekdaysMinRegex(i)}),P("ddd",function(i,o){return o.weekdaysShortRegex(i)}),P("dddd",function(i,o){return o.weekdaysRegex(i)}),pn(["dd","ddd","dddd"],function(i,o,c,f){var p=c._locale.weekdaysParse(i,f,c._strict);if(p!=null)o.d=p;else y(c).invalidWeekday=i}),pn(["d","e","E"],function(i,o,c,f){o[f]=z(i)});function W0(i,o){if(typeof i!=="string")return i;if(!isNaN(i))return parseInt(i,10);if(i=o.weekdaysParse(i),typeof i==="number")return i;return null}function H0(i,o){if(typeof i==="string")return o.weekdaysParse(i)%7||7;return isNaN(i)?null:i}function _a(i,o){return i.slice(o,7).concat(i.slice(0,o))}var V0="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),fc="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),G0="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),K0=dn,z0=dn,J0=dn;function Q0(i,o){var c=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(o)?"format":"standalone"];return i===!0?_a(c,this._week.dow):i?c[i.day()]:c}function Z0(i){return i===!0?_a(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function X0(i){return i===!0?_a(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function eb(i,o,c){var f,p,w,x=i.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[];for(f=0;f<7;++f)w=g([2000,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(w,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(w,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(w,"").toLocaleLowerCase()}if(c)if(o==="dddd")return p=ce.call(this._weekdaysParse,x),p!==-1?p:null;else if(o==="ddd")return p=ce.call(this._shortWeekdaysParse,x),p!==-1?p:null;else return p=ce.call(this._minWeekdaysParse,x),p!==-1?p:null;else if(o==="dddd"){if(p=ce.call(this._weekdaysParse,x),p!==-1)return p;if(p=ce.call(this._shortWeekdaysParse,x),p!==-1)return p;return p=ce.call(this._minWeekdaysParse,x),p!==-1?p:null}else if(o==="ddd"){if(p=ce.call(this._shortWeekdaysParse,x),p!==-1)return p;if(p=ce.call(this._weekdaysParse,x),p!==-1)return p;return p=ce.call(this._minWeekdaysParse,x),p!==-1?p:null}else{if(p=ce.call(this._minWeekdaysParse,x),p!==-1)return p;if(p=ce.call(this._weekdaysParse,x),p!==-1)return p;return p=ce.call(this._shortWeekdaysParse,x),p!==-1?p:null}}function tb(i,o,c){var f,p,w;if(this._weekdaysParseExact)return eb.call(this,i,o,c);if(!this._weekdaysParse)this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[];for(f=0;f<7;f++){if(p=g([2000,1]).day(f),c&&!this._fullWeekdaysParse[f])this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i");if(!this._weekdaysParse[f])w="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[f]=new RegExp(w.replace(".",""),"i");if(c&&o==="dddd"&&this._fullWeekdaysParse[f].test(i))return f;else if(c&&o==="ddd"&&this._shortWeekdaysParse[f].test(i))return f;else if(c&&o==="dd"&&this._minWeekdaysParse[f].test(i))return f;else if(!c&&this._weekdaysParse[f].test(i))return f}}function rb(i){if(!this.isValid())return i!=null?this:NaN;var o=gn(this,"Day");if(i!=null)return i=W0(i,this.localeData()),this.add(i-o,"d");else return o}function nb(i){if(!this.isValid())return i!=null?this:NaN;var o=(this.day()+7-this.localeData()._week.dow)%7;return i==null?o:this.add(i-o,"d")}function sb(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var o=H0(i,this.localeData());return this.day(this.day()%7?o:o-7)}else return this.day()||7}function ib(i){if(this._weekdaysParseExact){if(!a(this,"_weekdaysRegex"))va.call(this);if(i)return this._weekdaysStrictRegex;else return this._weekdaysRegex}else{if(!a(this,"_weekdaysRegex"))this._weekdaysRegex=K0;return this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex}}function ab(i){if(this._weekdaysParseExact){if(!a(this,"_weekdaysRegex"))va.call(this);if(i)return this._weekdaysShortStrictRegex;else return this._weekdaysShortRegex}else{if(!a(this,"_weekdaysShortRegex"))this._weekdaysShortRegex=z0;return this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}function ob(i){if(this._weekdaysParseExact){if(!a(this,"_weekdaysRegex"))va.call(this);if(i)return this._weekdaysMinStrictRegex;else return this._weekdaysMinRegex}else{if(!a(this,"_weekdaysMinRegex"))this._weekdaysMinRegex=J0;return this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function va(){function i(Me,vt){return vt.length-Me.length}var o=[],c=[],f=[],p=[],w,x,C,W,J;for(w=0;w<7;w++)x=g([2000,1]).day(w),C=dt(this.weekdaysMin(x,"")),W=dt(this.weekdaysShort(x,"")),J=dt(this.weekdays(x,"")),o.push(C),c.push(W),f.push(J),p.push(C),p.push(W),p.push(J);o.sort(i),c.sort(i),f.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Sa(){return this.hours()%12||12}function lb(){return this.hours()||24}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,Sa),Y("k",["kk",2],0,lb),Y("hmm",0,0,function(){return""+Sa.apply(this)+G(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+Sa.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+G(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)});function hc(i,o){Y(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),o)})}hc("a",!0),hc("A",!1);function dc(i,o){return o._meridiemParse}P("a",dc),P("A",dc),P("H",se,ya),P("h",se,Mr),P("k",se,Mr),P("HH",se,je),P("hh",se,je),P("kk",se,je),P("hmm",tc),P("hmmss",rc),P("Hmm",tc),P("Hmmss",rc),ne(["H","HH"],me),ne(["k","kk"],function(i,o,c){var f=z(i);o[me]=f===24?0:f}),ne(["a","A"],function(i,o,c){c._isPm=c._locale.isPM(i),c._meridiem=i}),ne(["h","hh"],function(i,o,c){o[me]=z(i),y(c).bigHour=!0}),ne("hmm",function(i,o,c){var f=i.length-2;o[me]=z(i.substr(0,f)),o[Ve]=z(i.substr(f)),y(c).bigHour=!0}),ne("hmmss",function(i,o,c){var f=i.length-4,p=i.length-2;o[me]=z(i.substr(0,f)),o[Ve]=z(i.substr(f,2)),o[mt]=z(i.substr(p)),y(c).bigHour=!0}),ne("Hmm",function(i,o,c){var f=i.length-2;o[me]=z(i.substr(0,f)),o[Ve]=z(i.substr(f))}),ne("Hmmss",function(i,o,c){var f=i.length-4,p=i.length-2;o[me]=z(i.substr(0,f)),o[Ve]=z(i.substr(f,2)),o[mt]=z(i.substr(p))});function ub(i){return(i+"").toLowerCase().charAt(0)==="p"}var cb=/[ap]\.?m?\.?/i,fb=Tr("Hours",!0);function hb(i,o,c){if(i>11)return c?"pm":"PM";else return c?"am":"AM"}var pc={calendar:M,longDateFormat:Fe,invalidDate:da,ordinal:ks,dayOfMonthOrdinalParse:Sr,relativeTime:pa,months:M0,monthsShort:ic,week:j0,weekdays:V0,weekdaysMin:G0,weekdaysShort:fc,meridiemParse:cb},ae={},wn={},_n;function db(i,o){var c,f=Math.min(i.length,o.length);for(c=0;c<f;c+=1)if(i[c]!==o[c])return c;return f}function mc(i){return i?i.toLowerCase().replace("_","-"):i}function pb(i){var o=0,c,f,p,w;while(o<i.length){w=mc(i[o]).split("-"),c=w.length,f=mc(i[o+1]),f=f?f.split("-"):null;while(c>0){if(p=Rs(w.slice(0,c).join("-")),p)return p;if(f&&f.length>=c&&db(w,f)>=c-1)break;c--}o++}return _n}function mb(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Rs(i){var o=null,c;if(ae[i]===void 0&&typeof Qr<"u"&&Qr&&Qr.exports&&mb(i))try{o=_n._abbr,c=U,c("./locale/"+i),Tt(o)}catch(f){ae[i]=null}return ae[i]}function Tt(i,o){var c;if(i){if(u(o))c=yt(i);else c=Ea(i,o);if(c)_n=c;else if(typeof console<"u"&&console.warn)console.warn("Locale "+i+" not found. Did you forget to load it?")}return _n._abbr}function Ea(i,o){if(o!==null){var c,f=pc;if(o.abbr=i,ae[i]!=null)re("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=ae[i]._config;else if(o.parentLocale!=null)if(ae[o.parentLocale]!=null)f=ae[o.parentLocale]._config;else if(c=Rs(o.parentLocale),c!=null)f=c._config;else{if(!wn[o.parentLocale])wn[o.parentLocale]=[];return wn[o.parentLocale].push({name:i,config:o}),null}if(ae[i]=new Ee(he(f,o)),wn[i])wn[i].forEach(function(p){Ea(p.name,p.config)});return Tt(i),ae[i]}else return delete ae[i],null}function gb(i,o){if(o!=null){var c,f,p=pc;if(ae[i]!=null&&ae[i].parentLocale!=null)ae[i].set(he(ae[i]._config,o));else{if(f=Rs(i),f!=null)p=f._config;if(o=he(p,o),f==null)o.abbr=i;c=new Ee(o),c.parentLocale=ae[i],ae[i]=c}Tt(i)}else if(ae[i]!=null){if(ae[i].parentLocale!=null){if(ae[i]=ae[i].parentLocale,i===Tt())Tt(i)}else if(ae[i]!=null)delete ae[i]}return ae[i]}function yt(i){var o;if(i&&i._locale&&i._locale._abbr)i=i._locale._abbr;if(!i)return _n;if(!n(i)){if(o=Rs(i),o)return o;i=[i]}return pb(i)}function yb(){return et(ae)}function xa(i){var o,c=i._a;if(c&&y(i).overflow===-2){if(o=c[pt]<0||c[pt]>11?pt:c[tt]<1||c[tt]>wa(c[ke],c[pt])?tt:c[me]<0||c[me]>24||c[me]===24&&(c[Ve]!==0||c[mt]!==0||c[Jt]!==0)?me:c[Ve]<0||c[Ve]>59?Ve:c[mt]<0||c[mt]>59?mt:c[Jt]<0||c[Jt]>999?Jt:-1,y(i)._overflowDayOfYear&&(o<ke||o>tt))o=tt;if(y(i)._overflowWeeks&&o===-1)o=v0;if(y(i)._overflowWeekday&&o===-1)o=S0;y(i).overflow=o}return i}var bb=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wb=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_b=/Z|[+-]\d\d(?::?\d\d)?/,Cs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ka=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],vb=/^\/?Date\((-?\d+)/i,Sb=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Eb={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function gc(i){var o,c,f=i._i,p=bb.exec(f)||wb.exec(f),w,x,C,W,J=Cs.length,Me=ka.length;if(p){y(i).iso=!0;for(o=0,c=J;o<c;o++)if(Cs[o][1].exec(p[1])){x=Cs[o][0],w=Cs[o][2]!==!1;break}if(x==null){i._isValid=!1;return}if(p[3]){for(o=0,c=Me;o<c;o++)if(ka[o][1].exec(p[3])){C=(p[2]||" ")+ka[o][0];break}if(C==null){i._isValid=!1;return}}if(!w&&C!=null){i._isValid=!1;return}if(p[4])if(_b.exec(p[4]))W="Z";else{i._isValid=!1;return}i._f=x+(C||"")+(W||""),Ma(i)}else i._isValid=!1}function xb(i,o,c,f,p,w){var x=[kb(i),ic.indexOf(o),parseInt(c,10),parseInt(f,10),parseInt(p,10)];if(w)x.push(parseInt(w,10));return x}function kb(i){var o=parseInt(i,10);if(o<=49)return 2000+o;else if(o<=999)return 1900+o;return o}function Ob(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Mb(i,o,c){if(i){var f=fc.indexOf(i),p=new Date(o[0],o[1],o[2]).getDay();if(f!==p)return y(c).weekdayMismatch=!0,c._isValid=!1,!1}return!0}function Tb(i,o,c){if(i)return Eb[i];else if(o)return 0;else{var f=parseInt(c,10),p=f%100,w=(f-p)/100;return w*60+p}}function yc(i){var o=Sb.exec(Ob(i._i)),c;if(o){if(c=xb(o[4],o[3],o[2],o[5],o[6],o[7]),!Mb(o[1],c,i))return;i._a=c,i._tzm=Tb(o[8],o[9],o[10]),i._d=yn.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),y(i).rfc2822=!0}else i._isValid=!1}function Nb(i){var o=vb.exec(i._i);if(o!==null){i._d=new Date(+o[1]);return}if(gc(i),i._isValid===!1)delete i._isValid;else return;if(yc(i),i._isValid===!1)delete i._isValid;else return;if(i._strict)i._isValid=!1;else t.createFromInputFallback(i)}t.createFromInputFallback=N("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function Nr(i,o,c){if(i!=null)return i;if(o!=null)return o;return c}function Ab(i){var o=new Date(t.now());if(i._useUTC)return[o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()];return[o.getFullYear(),o.getMonth(),o.getDate()]}function Oa(i){var o,c,f=[],p,w,x;if(i._d)return;if(p=Ab(i),i._w&&i._a[tt]==null&&i._a[pt]==null)Db(i);if(i._dayOfYear!=null){if(x=Nr(i._a[ke],p[ke]),i._dayOfYear>mn(x)||i._dayOfYear===0)y(i)._overflowDayOfYear=!0;c=yn(x,0,i._dayOfYear),i._a[pt]=c.getUTCMonth(),i._a[tt]=c.getUTCDate()}for(o=0;o<3&&i._a[o]==null;++o)i._a[o]=f[o]=p[o];for(;o<7;o++)i._a[o]=f[o]=i._a[o]==null?o===2?1:0:i._a[o];if(i._a[me]===24&&i._a[Ve]===0&&i._a[mt]===0&&i._a[Jt]===0)i._nextDay=!0,i._a[me]=0;if(i._d=(i._useUTC?yn:I0).apply(null,f),w=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null)i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm);if(i._nextDay)i._a[me]=24;if(i._w&&typeof i._w.d<"u"&&i._w.d!==w)y(i).weekdayMismatch=!0}function Db(i){var o,c,f,p,w,x,C,W,J;if(o=i._w,o.GG!=null||o.W!=null||o.E!=null){if(w=1,x=4,c=Nr(o.GG,i._a[ke],bn(ie(),1,4).year),f=Nr(o.W,1),p=Nr(o.E,1),p<1||p>7)W=!0}else if(w=i._locale._week.dow,x=i._locale._week.doy,J=bn(ie(),w,x),c=Nr(o.gg,i._a[ke],J.year),f=Nr(o.w,J.week),o.d!=null){if(p=o.d,p<0||p>6)W=!0}else if(o.e!=null){if(p=o.e+w,o.e<0||o.e>6)W=!0}else p=w;if(f<1||f>gt(c,w,x))y(i)._overflowWeeks=!0;else if(W!=null)y(i)._overflowWeekday=!0;else C=cc(c,f,p,w,x),i._a[ke]=C.year,i._dayOfYear=C.dayOfYear}t.ISO_8601=function(){},t.RFC_2822=function(){};function Ma(i){if(i._f===t.ISO_8601){gc(i);return}if(i._f===t.RFC_2822){yc(i);return}i._a=[],y(i).empty=!0;var o=""+i._i,c,f,p,w,x,C=o.length,W=0,J,Me;p=Ss(i._f,i._locale).match(_e)||[],Me=p.length;for(c=0;c<Me;c++){if(w=p[c],f=(o.match(b0(w,i))||[])[0],f){if(x=o.substr(0,o.indexOf(f)),x.length>0)y(i).unusedInput.push(x);o=o.slice(o.indexOf(f)+f.length),W+=f.length}if(De[w]){if(f)y(i).empty=!1;else y(i).unusedTokens.push(w);_0(w,f,i)}else if(i._strict&&!f)y(i).unusedTokens.push(w)}if(y(i).charsLeftOver=C-W,o.length>0)y(i).unusedInput.push(o);if(i._a[me]<=12&&y(i).bigHour===!0&&i._a[me]>0)y(i).bigHour=void 0;if(y(i).parsedDateParts=i._a.slice(0),y(i).meridiem=i._meridiem,i._a[me]=Lb(i._locale,i._a[me],i._meridiem),J=y(i).era,J!==null)i._a[ke]=i._locale.erasConvertYear(J,i._a[ke]);Oa(i),xa(i)}function Lb(i,o,c){var f;if(c==null)return o;if(i.meridiemHour!=null)return i.meridiemHour(o,c);else if(i.isPM!=null){if(f=i.isPM(c),f&&o<12)o+=12;if(!f&&o===12)o=0;return o}else return o}function qb(i){var o,c,f,p,w,x,C=!1,W=i._f.length;if(W===0){y(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;p<W;p++){if(w=0,x=!1,o=T({},i),i._useUTC!=null)o._useUTC=i._useUTC;if(o._f=i._f[p],Ma(o),E(o))x=!0;if(w+=y(o).charsLeftOver,w+=y(o).unusedTokens.length*10,y(o).score=w,!C){if(f==null||w<f||x){if(f=w,c=o,x)C=!0}}else if(w<f)f=w,c=o}m(i,c||o)}function Rb(i){if(i._d)return;var o=kr(i._i),c=o.day===void 0?o.date:o.day;i._a=b([o.year,o.month,c,o.hour,o.minute,o.second,o.millisecond],function(f){return f&&parseInt(f,10)}),Oa(i)}function Cb(i){var o=new q(xa(bc(i)));if(o._nextDay)o.add(1,"d"),o._nextDay=void 0;return o}function bc(i){var{_i:o,_f:c}=i;if(i._locale=i._locale||yt(i._l),o===null||c===void 0&&o==="")return O({nullInput:!0});if(typeof o==="string")i._i=o=i._locale.preparse(o);if(L(o))return new q(xa(o));else if(d(o))i._d=o;else if(n(c))qb(i);else if(c)Ma(i);else Pb(i);if(!E(i))i._d=null;return i}function Pb(i){var o=i._i;if(u(o))i._d=new Date(t.now());else if(d(o))i._d=new Date(o.valueOf());else if(typeof o==="string")Nb(i);else if(n(o))i._a=b(o.slice(0),function(c){return parseInt(c,10)}),Oa(i);else if(s(o))Rb(i);else if(h(o))i._d=new Date(o);else t.createFromInputFallback(i)}function wc(i,o,c,f,p){var w={};if(o===!0||o===!1)f=o,o=void 0;if(c===!0||c===!1)f=c,c=void 0;if(s(i)&&l(i)||n(i)&&i.length===0)i=void 0;return w._isAMomentObject=!0,w._useUTC=w._isUTC=p,w._l=c,w._i=i,w._f=o,w._strict=f,Cb(w)}function ie(i,o,c,f){return wc(i,o,c,f,!1)}var Ib=N("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=ie.apply(null,arguments);if(this.isValid()&&i.isValid())return i<this?this:i;else return O()}),Fb=N("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=ie.apply(null,arguments);if(this.isValid()&&i.isValid())return i>this?this:i;else return O()});function _c(i,o){var c,f;if(o.length===1&&n(o[0]))o=o[0];if(!o.length)return ie();c=o[0];for(f=1;f<o.length;++f)if(!o[f].isValid()||o[f][i](c))c=o[f];return c}function jb(){var i=[].slice.call(arguments,0);return _c("isBefore",i)}function Yb(){var i=[].slice.call(arguments,0);return _c("isAfter",i)}var $b=function(){return Date.now?Date.now():+new Date},vn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Bb(i){var o,c=!1,f,p=vn.length;for(o in i)if(a(i,o)&&!(ce.call(vn,o)!==-1&&(i[o]==null||!isNaN(i[o]))))return!1;for(f=0;f<p;++f)if(i[vn[f]]){if(c)return!1;if(parseFloat(i[vn[f]])!==z(i[vn[f]]))c=!0}return!0}function Ub(){return this._isValid}function Wb(){return Ge(NaN)}function Ps(i){var o=kr(i),c=o.year||0,f=o.quarter||0,p=o.month||0,w=o.week||o.isoWeek||0,x=o.day||0,C=o.hour||0,W=o.minute||0,J=o.second||0,Me=o.millisecond||0;this._isValid=Bb(o),this._milliseconds=+Me+J*1000+W*60000+C*1000*60*60,this._days=+x+w*7,this._months=+p+f*3+c*12,this._data={},this._locale=yt(),this._bubble()}function Is(i){return i instanceof Ps}function Ta(i){if(i<0)return Math.round(-1*i)*-1;else return Math.round(i)}function Hb(i,o,c){var f=Math.min(i.length,o.length),p=Math.abs(i.length-o.length),w=0,x;for(x=0;x<f;x++)if(c&&i[x]!==o[x]||!c&&z(i[x])!==z(o[x]))w++;return w+p}function vc(i,o){Y(i,0,0,function(){var c=this.utcOffset(),f="+";if(c<0)c=-c,f="-";return f+G(~~(c/60),2)+o+G(~~c%60,2)})}vc("Z",":"),vc("ZZ",""),P("Z",As),P("ZZ",As),ne(["Z","ZZ"],function(i,o,c){c._useUTC=!0,c._tzm=Na(As,i)});var Vb=/([\+\-]|\d\d)/gi;function Na(i,o){var c=(o||"").match(i),f,p,w;if(c===null)return null;return f=c[c.length-1]||[],p=(f+"").match(Vb)||["-",0,0],w=+(p[1]*60)+z(p[2]),w===0?0:p[0]==="+"?w:-w}function Aa(i,o){var c,f;if(o._isUTC)return c=o.clone(),f=(L(i)||d(i)?i.valueOf():ie(i).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+f),t.updateOffset(c,!1),c;else return ie(i).local()}function Da(i){return-Math.round(i._d.getTimezoneOffset())}t.updateOffset=function(){};function Gb(i,o,c){var f=this._offset||0,p;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i==="string"){if(i=Na(As,i),i===null)return this}else if(Math.abs(i)<16&&!c)i=i*60;if(!this._isUTC&&o)p=Da(this);if(this._offset=i,this._isUTC=!0,p!=null)this.add(p,"m");if(f!==i){if(!o||this._changeInProgress)kc(this,Ge(i-f,"m"),1,!1);else if(!this._changeInProgress)this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null}return this}else return this._isUTC?f:Da(this)}function Kb(i,o){if(i!=null){if(typeof i!=="string")i=-i;return this.utcOffset(i,o),this}else return-this.utcOffset()}function zb(i){return this.utcOffset(0,i)}function Jb(i){if(this._isUTC){if(this.utcOffset(0,i),this._isUTC=!1,i)this.subtract(Da(this),"m")}return this}function Qb(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==="string"){var i=Na(g0,this._i);if(i!=null)this.utcOffset(i);else this.utcOffset(0,!0)}return this}function Zb(i){if(!this.isValid())return!1;return i=i?ie(i).utcOffset():0,(this.utcOffset()-i)%60===0}function Xb(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ew(){if(!u(this._isDSTShifted))return this._isDSTShifted;var i={},o;if(T(i,this),i=bc(i),i._a)o=i._isUTC?g(i._a):ie(i._a),this._isDSTShifted=this.isValid()&&Hb(i._a,o.toArray())>0;else this._isDSTShifted=!1;return this._isDSTShifted}function tw(){return this.isValid()?!this._isUTC:!1}function rw(){return this.isValid()?this._isUTC:!1}function Sc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var nw=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,sw=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ge(i,o){var c=i,f=null,p,w,x;if(Is(i))c={ms:i._milliseconds,d:i._days,M:i._months};else if(h(i)||!isNaN(+i))if(c={},o)c[o]=+i;else c.milliseconds=+i;else if(f=nw.exec(i))p=f[1]==="-"?-1:1,c={y:0,d:z(f[tt])*p,h:z(f[me])*p,m:z(f[Ve])*p,s:z(f[mt])*p,ms:z(Ta(f[Jt]*1000))*p};else if(f=sw.exec(i))p=f[1]==="-"?-1:1,c={y:Qt(f[2],p),M:Qt(f[3],p),w:Qt(f[4],p),d:Qt(f[5],p),h:Qt(f[6],p),m:Qt(f[7],p),s:Qt(f[8],p)};else if(c==null)c={};else if(typeof c==="object"&&(("from"in c)||("to"in c)))x=iw(ie(c.from),ie(c.to)),c={},c.ms=x.milliseconds,c.M=x.months;if(w=new Ps(c),Is(i)&&a(i,"_locale"))w._locale=i._locale;if(Is(i)&&a(i,"_isValid"))w._isValid=i._isValid;return w}Ge.fn=Ps.prototype,Ge.invalid=Wb;function Qt(i,o){var c=i&&parseFloat(i.replace(",","."));return(isNaN(c)?0:c)*o}function Ec(i,o){var c={};if(c.months=o.month()-i.month()+(o.year()-i.year())*12,i.clone().add(c.months,"M").isAfter(o))--c.months;return c.milliseconds=+o-+i.clone().add(c.months,"M"),c}function iw(i,o){var c;if(!(i.isValid()&&o.isValid()))return{milliseconds:0,months:0};if(o=Aa(o,i),i.isBefore(o))c=Ec(i,o);else c=Ec(o,i),c.milliseconds=-c.milliseconds,c.months=-c.months;return c}function xc(i,o){return function(c,f){var p,w;if(f!==null&&!isNaN(+f))re(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),w=c,c=f,f=w;return p=Ge(c,f),kc(this,p,i),this}}function kc(i,o,c,f){var p=o._milliseconds,w=Ta(o._days),x=Ta(o._months);if(!i.isValid())return;if(f=f==null?!0:f,x)oc(i,gn(i,"Month")+x*c);if(w)sc(i,"Date",gn(i,"Date")+w*c);if(p)i._d.setTime(i._d.valueOf()+p*c);if(f)t.updateOffset(i,w||x)}var aw=xc(1,"add"),ow=xc(-1,"subtract");function Oc(i){return typeof i==="string"||i instanceof String}function lw(i){return L(i)||d(i)||Oc(i)||h(i)||cw(i)||uw(i)||i===null||i===void 0}function uw(i){var o=s(i)&&!l(i),c=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,w,x=f.length;for(p=0;p<x;p+=1)w=f[p],c=c||a(i,w);return o&&c}function cw(i){var o=n(i),c=!1;if(o)c=i.filter(function(f){return!h(f)&&Oc(i)}).length===0;return o&&c}function fw(i){var o=s(i)&&!l(i),c=!1,f=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],p,w;for(p=0;p<f.length;p+=1)w=f[p],c=c||a(i,w);return o&&c}function hw(i,o){var c=i.diff(o,"days",!0);return c<-6?"sameElse":c<-1?"lastWeek":c<0?"lastDay":c<1?"sameDay":c<2?"nextDay":c<7?"nextWeek":"sameElse"}function dw(i,o){if(arguments.length===1){if(!arguments[0])i=void 0,o=void 0;else if(lw(arguments[0]))i=arguments[0],o=void 0;else if(fw(arguments[0]))o=arguments[0],i=void 0}var c=i||ie(),f=Aa(c,this).startOf("day"),p=t.calendarFormat(this,f)||"sameElse",w=o&&(Q(o[p])?o[p].call(this,c):o[p]);return this.format(w||this.localeData().calendar(p,this,ie(c)))}function pw(){return new q(this)}function mw(i,o){var c=L(i)?i:ie(i);if(!(this.isValid()&&c.isValid()))return!1;if(o=Le(o)||"millisecond",o==="millisecond")return this.valueOf()>c.valueOf();else return c.valueOf()<this.clone().startOf(o).valueOf()}function gw(i,o){var c=L(i)?i:ie(i);if(!(this.isValid()&&c.isValid()))return!1;if(o=Le(o)||"millisecond",o==="millisecond")return this.valueOf()<c.valueOf();else return this.clone().endOf(o).valueOf()<c.valueOf()}function yw(i,o,c,f){var p=L(i)?i:ie(i),w=L(o)?o:ie(o);if(!(this.isValid()&&p.isValid()&&w.isValid()))return!1;return f=f||"()",(f[0]==="("?this.isAfter(p,c):!this.isBefore(p,c))&&(f[1]===")"?this.isBefore(w,c):!this.isAfter(w,c))}function bw(i,o){var c=L(i)?i:ie(i),f;if(!(this.isValid()&&c.isValid()))return!1;if(o=Le(o)||"millisecond",o==="millisecond")return this.valueOf()===c.valueOf();else return f=c.valueOf(),this.clone().startOf(o).valueOf()<=f&&f<=this.clone().endOf(o).valueOf()}function ww(i,o){return this.isSame(i,o)||this.isAfter(i,o)}function _w(i,o){return this.isSame(i,o)||this.isBefore(i,o)}function vw(i,o,c){var f,p,w;if(!this.isValid())return NaN;if(f=Aa(i,this),!f.isValid())return NaN;switch(p=(f.utcOffset()-this.utcOffset())*60000,o=Le(o),o){case"year":w=Fs(this,f)/12;break;case"month":w=Fs(this,f);break;case"quarter":w=Fs(this,f)/3;break;case"second":w=(this-f)/1000;break;case"minute":w=(this-f)/60000;break;case"hour":w=(this-f)/3600000;break;case"day":w=(this-f-p)/86400000;break;case"week":w=(this-f-p)/604800000;break;default:w=this-f}return c?w:$e(w)}function Fs(i,o){if(i.date()<o.date())return-Fs(o,i);var c=(o.year()-i.year())*12+(o.month()-i.month()),f=i.clone().add(c,"months"),p,w;if(o-f<0)p=i.clone().add(c-1,"months"),w=(o-f)/(f-p);else p=i.clone().add(c+1,"months"),w=(o-f)/(p-f);return-(c+w)||0}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Sw(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ew(i){if(!this.isValid())return null;var o=i!==!0,c=o?this.clone().utc():this;if(c.year()<0||c.year()>9999)return ht(c,o?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(Q(Date.prototype.toISOString))if(o)return this.toDate().toISOString();else return new Date(this.valueOf()+this.utcOffset()*60*1000).toISOString().replace("Z",ht(c,"Z"));return ht(c,o?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function xw(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",o="",c,f,p,w;if(!this.isLocal())i=this.utcOffset()===0?"moment.utc":"moment.parseZone",o="Z";return c="["+i+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",w=o+'[")]',this.format(c+f+p+w)}function kw(i){if(!i)i=this.isUtc()?t.defaultFormatUtc:t.defaultFormat;var o=ht(this,i);return this.localeData().postformat(o)}function Ow(i,o){if(this.isValid()&&(L(i)&&i.isValid()||ie(i).isValid()))return Ge({to:this,from:i}).locale(this.locale()).humanize(!o);else return this.localeData().invalidDate()}function Mw(i){return this.from(ie(),i)}function Tw(i,o){if(this.isValid()&&(L(i)&&i.isValid()||ie(i).isValid()))return Ge({from:this,to:i}).locale(this.locale()).humanize(!o);else return this.localeData().invalidDate()}function Nw(i){return this.to(ie(),i)}function Mc(i){var o;if(i===void 0)return this._locale._abbr;else{if(o=yt(i),o!=null)this._locale=o;return this}}var Tc=N("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){if(i===void 0)return this.localeData();else return this.locale(i)});function Nc(){return this._locale}var js=1000,Ar=60*js,Ys=60*Ar,Ac=3506328*Ys;function Dr(i,o){return(i%o+o)%o}function Dc(i,o,c){if(i<100&&i>=0)return new Date(i+400,o,c)-Ac;else return new Date(i,o,c).valueOf()}function Lc(i,o,c){if(i<100&&i>=0)return Date.UTC(i+400,o,c)-Ac;else return Date.UTC(i,o,c)}function Aw(i){var o,c;if(i=Le(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(c=this._isUTC?Lc:Dc,i){case"year":o=c(this.year(),0,1);break;case"quarter":o=c(this.year(),this.month()-this.month()%3,1);break;case"month":o=c(this.year(),this.month(),1);break;case"week":o=c(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":o=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":o=c(this.year(),this.month(),this.date());break;case"hour":o=this._d.valueOf(),o-=Dr(o+(this._isUTC?0:this.utcOffset()*Ar),Ys);break;case"minute":o=this._d.valueOf(),o-=Dr(o,Ar);break;case"second":o=this._d.valueOf(),o-=Dr(o,js);break}return this._d.setTime(o),t.updateOffset(this,!0),this}function Dw(i){var o,c;if(i=Le(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(c=this._isUTC?Lc:Dc,i){case"year":o=c(this.year()+1,0,1)-1;break;case"quarter":o=c(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":o=c(this.year(),this.month()+1,1)-1;break;case"week":o=c(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":o=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":o=c(this.year(),this.month(),this.date()+1)-1;break;case"hour":o=this._d.valueOf(),o+=Ys-Dr(o+(this._isUTC?0:this.utcOffset()*Ar),Ys)-1;break;case"minute":o=this._d.valueOf(),o+=Ar-Dr(o,Ar)-1;break;case"second":o=this._d.valueOf(),o+=js-Dr(o,js)-1;break}return this._d.setTime(o),t.updateOffset(this,!0),this}function Lw(){return this._d.valueOf()-(this._offset||0)*60000}function qw(){return Math.floor(this.valueOf()/1000)}function Rw(){return new Date(this.valueOf())}function Cw(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function Pw(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function Iw(){return this.isValid()?this.toISOString():null}function Fw(){return E(this)}function jw(){return m({},y(this))}function Yw(){return y(this).overflow}function $w(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Y("N",0,0,"eraAbbr"),Y("NN",0,0,"eraAbbr"),Y("NNN",0,0,"eraAbbr"),Y("NNNN",0,0,"eraName"),Y("NNNNN",0,0,"eraNarrow"),Y("y",["y",1],"yo","eraYear"),Y("y",["yy",2],0,"eraYear"),Y("y",["yyy",3],0,"eraYear"),Y("y",["yyyy",4],0,"eraYear"),P("N",La),P("NN",La),P("NNN",La),P("NNNN",Zw),P("NNNNN",Xw),ne(["N","NN","NNN","NNNN","NNNNN"],function(i,o,c,f){var p=c._locale.erasParse(i,f,c._strict);if(p)y(c).era=p;else y(c).invalidEra=i}),P("y",Or),P("yy",Or),P("yyy",Or),P("yyyy",Or),P("yo",e_),ne(["y","yy","yyy","yyyy"],ke),ne(["yo"],function(i,o,c,f){var p;if(c._locale._eraYearOrdinalRegex)p=i.match(c._locale._eraYearOrdinalRegex);if(c._locale.eraYearOrdinalParse)o[ke]=c._locale.eraYearOrdinalParse(i,p);else o[ke]=parseInt(i,10)});function Bw(i,o){var c,f,p,w=this._eras||yt("en")._eras;for(c=0,f=w.length;c<f;++c){switch(typeof w[c].since){case"string":p=t(w[c].since).startOf("day"),w[c].since=p.valueOf();break}switch(typeof w[c].until){case"undefined":w[c].until=1/0;break;case"string":p=t(w[c].until).startOf("day").valueOf(),w[c].until=p.valueOf();break}}return w}function Uw(i,o,c){var f,p,w=this.eras(),x,C,W;i=i.toUpperCase();for(f=0,p=w.length;f<p;++f)if(x=w[f].name.toUpperCase(),C=w[f].abbr.toUpperCase(),W=w[f].narrow.toUpperCase(),c)switch(o){case"N":case"NN":case"NNN":if(C===i)return w[f];break;case"NNNN":if(x===i)return w[f];break;case"NNNNN":if(W===i)return w[f];break}else if([x,C,W].indexOf(i)>=0)return w[f]}function Ww(i,o){var c=i.since<=i.until?1:-1;if(o===void 0)return t(i.since).year();else return t(i.since).year()+(o-i.offset)*c}function Hw(){var i,o,c,f=this.localeData().eras();for(i=0,o=f.length;i<o;++i){if(c=this.clone().startOf("day").valueOf(),f[i].since<=c&&c<=f[i].until)return f[i].name;if(f[i].until<=c&&c<=f[i].since)return f[i].name}return""}function Vw(){var i,o,c,f=this.localeData().eras();for(i=0,o=f.length;i<o;++i){if(c=this.clone().startOf("day").valueOf(),f[i].since<=c&&c<=f[i].until)return f[i].narrow;if(f[i].until<=c&&c<=f[i].since)return f[i].narrow}return""}function Gw(){var i,o,c,f=this.localeData().eras();for(i=0,o=f.length;i<o;++i){if(c=this.clone().startOf("day").valueOf(),f[i].since<=c&&c<=f[i].until)return f[i].abbr;if(f[i].until<=c&&c<=f[i].since)return f[i].abbr}return""}function Kw(){var i,o,c,f,p=this.localeData().eras();for(i=0,o=p.length;i<o;++i)if(c=p[i].since<=p[i].until?1:-1,f=this.clone().startOf("day").valueOf(),p[i].since<=f&&f<=p[i].until||p[i].until<=f&&f<=p[i].since)return(this.year()-t(p[i].since).year())*c+p[i].offset;return this.year()}function zw(i){if(!a(this,"_erasNameRegex"))qa.call(this);return i?this._erasNameRegex:this._erasRegex}function Jw(i){if(!a(this,"_erasAbbrRegex"))qa.call(this);return i?this._erasAbbrRegex:this._erasRegex}function Qw(i){if(!a(this,"_erasNarrowRegex"))qa.call(this);return i?this._erasNarrowRegex:this._erasRegex}function La(i,o){return o.erasAbbrRegex(i)}function Zw(i,o){return o.erasNameRegex(i)}function Xw(i,o){return o.erasNarrowRegex(i)}function e_(i,o){return o._eraYearOrdinalRegex||Or}function qa(){var i=[],o=[],c=[],f=[],p,w,x,C,W,J=this.eras();for(p=0,w=J.length;p<w;++p)x=dt(J[p].name),C=dt(J[p].abbr),W=dt(J[p].narrow),o.push(x),i.push(C),c.push(W),f.push(x),f.push(C),f.push(W);this._erasRegex=new RegExp("^("+f.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+c.join("|")+")","i")}Y(0,["gg",2],0,function(){return this.weekYear()%100}),Y(0,["GG",2],0,function(){return this.isoWeekYear()%100});function $s(i,o){Y(0,[i,i.length],0,o)}$s("gggg","weekYear"),$s("ggggg","weekYear"),$s("GGGG","isoWeekYear"),$s("GGGGG","isoWeekYear"),P("G",Ns),P("g",Ns),P("GG",se,je),P("gg",se,je),P("GGGG",ga,ma),P("gggg",ga,ma),P("GGGGG",Ts,Os),P("ggggg",Ts,Os),pn(["gggg","ggggg","GGGG","GGGGG"],function(i,o,c,f){o[f.substr(0,2)]=z(i)}),pn(["gg","GG"],function(i,o,c,f){o[f]=t.parseTwoDigitYear(i)});function t_(i){return qc.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function r_(i){return qc.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function n_(){return gt(this.year(),1,4)}function s_(){return gt(this.isoWeekYear(),1,4)}function i_(){var i=this.localeData()._week;return gt(this.year(),i.dow,i.doy)}function a_(){var i=this.localeData()._week;return gt(this.weekYear(),i.dow,i.doy)}function qc(i,o,c,f,p){var w;if(i==null)return bn(this,f,p).year;else{if(w=gt(i,f,p),o>w)o=w;return o_.call(this,i,o,c,f,p)}}function o_(i,o,c,f,p){var w=cc(i,o,c,f,p),x=yn(w.year,0,w.dayOfYear);return this.year(x.getUTCFullYear()),this.month(x.getUTCMonth()),this.date(x.getUTCDate()),this}Y("Q",0,"Qo","quarter"),P("Q",Xu),ne("Q",function(i,o){o[pt]=(z(i)-1)*3});function l_(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}Y("D",["DD",2],"Do","date"),P("D",se,Mr),P("DD",se,je),P("Do",function(i,o){return i?o._dayOfMonthOrdinalParse||o._ordinalParse:o._dayOfMonthOrdinalParseLenient}),ne(["D","DD"],tt),ne("Do",function(i,o){o[tt]=z(i.match(se)[0])});var Rc=Tr("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),P("DDD",Ms),P("DDDD",ec),ne(["DDD","DDDD"],function(i,o,c){c._dayOfYear=z(i)});function u_(i){var o=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/86400000)+1;return i==null?o:this.add(i-o,"d")}Y("m",["mm",2],0,"minute"),P("m",se,ya),P("mm",se,je),ne(["m","mm"],Ve);var c_=Tr("Minutes",!1);Y("s",["ss",2],0,"second"),P("s",se,ya),P("ss",se,je),ne(["s","ss"],mt);var f_=Tr("Seconds",!1);Y("S",0,0,function(){return~~(this.millisecond()/100)}),Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,function(){return this.millisecond()*10}),Y(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Y(0,["SSSSSS",6],0,function(){return this.millisecond()*1000}),Y(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Y(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Y(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),P("S",Ms,Xu),P("SS",Ms,je),P("SSS",Ms,ec);var Nt,Cc;for(Nt="SSSS";Nt.length<=9;Nt+="S")P(Nt,Or);function h_(i,o){o[Jt]=z(("0."+i)*1000)}for(Nt="S";Nt.length<=9;Nt+="S")ne(Nt,h_);Cc=Tr("Milliseconds",!1),Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");function d_(){return this._isUTC?"UTC":""}function p_(){return this._isUTC?"Coordinated Universal Time":""}var D=q.prototype;if(D.add=aw,D.calendar=dw,D.clone=pw,D.diff=vw,D.endOf=Dw,D.format=kw,D.from=Ow,D.fromNow=Mw,D.to=Tw,D.toNow=Nw,D.get=x0,D.invalidAt=Yw,D.isAfter=mw,D.isBefore=gw,D.isBetween=yw,D.isSame=bw,D.isSameOrAfter=ww,D.isSameOrBefore=_w,D.isValid=Fw,D.lang=Tc,D.locale=Mc,D.localeData=Nc,D.max=Fb,D.min=Ib,D.parsingFlags=jw,D.set=k0,D.startOf=Aw,D.subtract=ow,D.toArray=Cw,D.toObject=Pw,D.toDate=Rw,D.toISOString=Ew,D.inspect=xw,typeof Symbol<"u"&&Symbol.for!=null)D[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"};D.toJSON=Iw,D.toString=Sw,D.unix=qw,D.valueOf=Lw,D.creationData=$w,D.eraName=Hw,D.eraNarrow=Vw,D.eraAbbr=Gw,D.eraYear=Kw,D.year=nc,D.isLeapYear=E0,D.weekYear=t_,D.isoWeekYear=r_,D.quarter=D.quarters=l_,D.month=lc,D.daysInMonth=R0,D.week=D.weeks=B0,D.isoWeek=D.isoWeeks=U0,D.weeksInYear=i_,D.weeksInWeekYear=a_,D.isoWeeksInYear=n_,D.isoWeeksInISOWeekYear=s_,D.date=Rc,D.day=D.days=rb,D.weekday=nb,D.isoWeekday=sb,D.dayOfYear=u_,D.hour=D.hours=fb,D.minute=D.minutes=c_,D.second=D.seconds=f_,D.millisecond=D.milliseconds=Cc,D.utcOffset=Gb,D.utc=zb,D.local=Jb,D.parseZone=Qb,D.hasAlignedHourOffset=Zb,D.isDST=Xb,D.isLocal=tw,D.isUtcOffset=rw,D.isUtc=Sc,D.isUTC=Sc,D.zoneAbbr=d_,D.zoneName=p_,D.dates=N("dates accessor is deprecated. Use date instead.",Rc),D.months=N("months accessor is deprecated. Use month instead",lc),D.years=N("years accessor is deprecated. Use year instead",nc),D.zone=N("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Kb),D.isDSTShifted=N("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ew);function m_(i){return ie(i*1000)}function g_(){return ie.apply(null,arguments).parseZone()}function Pc(i){return i}var te=Ee.prototype;te.calendar=j,te.longDateFormat=Es,te.invalidDate=xs,te.ordinal=Er,te.preparse=Pc,te.postformat=Pc,te.relativeTime=zt,te.pastFuture=Mt,te.set=H,te.eras=Bw,te.erasParse=Uw,te.erasConvertYear=Ww,te.erasAbbrRegex=Jw,te.erasNameRegex=zw,te.erasNarrowRegex=Qw,te.months=A0,te.monthsShort=D0,te.monthsParse=q0,te.monthsRegex=P0,te.monthsShortRegex=C0,te.week=F0,te.firstDayOfYear=$0,te.firstDayOfWeek=Y0,te.weekdays=Q0,te.weekdaysMin=X0,te.weekdaysShort=Z0,te.weekdaysParse=tb,te.weekdaysRegex=ib,te.weekdaysShortRegex=ab,te.weekdaysMinRegex=ob,te.isPM=ub,te.meridiem=hb;function Bs(i,o,c,f){var p=yt(),w=g().set(f,o);return p[c](w,i)}function Ic(i,o,c){if(h(i))o=i,i=void 0;if(i=i||"",o!=null)return Bs(i,o,c,"month");var f,p=[];for(f=0;f<12;f++)p[f]=Bs(i,f,c,"month");return p}function Ra(i,o,c,f){if(typeof i==="boolean"){if(h(o))c=o,o=void 0;o=o||""}else{if(o=i,c=o,i=!1,h(o))c=o,o=void 0;o=o||""}var p=yt(),w=i?p._week.dow:0,x,C=[];if(c!=null)return Bs(o,(c+w)%7,f,"day");for(x=0;x<7;x++)C[x]=Bs(o,(x+w)%7,f,"day");return C}function y_(i,o){return Ic(i,o,"months")}function b_(i,o){return Ic(i,o,"monthsShort")}function w_(i,o,c){return Ra(i,o,c,"weekdays")}function __(i,o,c){return Ra(i,o,c,"weekdaysShort")}function v_(i,o,c){return Ra(i,o,c,"weekdaysMin")}Tt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var o=i%10,c=z(i%100/10)===1?"th":o===1?"st":o===2?"nd":o===3?"rd":"th";return i+c}}),t.lang=N("moment.lang is deprecated. Use moment.locale instead.",Tt),t.langData=N("moment.langData is deprecated. Use moment.localeData instead.",yt);var bt=Math.abs;function S_(){var i=this._data;return this._milliseconds=bt(this._milliseconds),this._days=bt(this._days),this._months=bt(this._months),i.milliseconds=bt(i.milliseconds),i.seconds=bt(i.seconds),i.minutes=bt(i.minutes),i.hours=bt(i.hours),i.months=bt(i.months),i.years=bt(i.years),this}function Fc(i,o,c,f){var p=Ge(o,c);return i._milliseconds+=f*p._milliseconds,i._days+=f*p._days,i._months+=f*p._months,i._bubble()}function E_(i,o){return Fc(this,i,o,1)}function x_(i,o){return Fc(this,i,o,-1)}function jc(i){if(i<0)return Math.floor(i);else return Math.ceil(i)}function k_(){var i=this._milliseconds,o=this._days,c=this._months,f=this._data,p,w,x,C,W;if(!(i>=0&&o>=0&&c>=0||i<=0&&o<=0&&c<=0))i+=jc(Ca(c)+o)*86400000,o=0,c=0;return f.milliseconds=i%1000,p=$e(i/1000),f.seconds=p%60,w=$e(p/60),f.minutes=w%60,x=$e(w/60),f.hours=x%24,o+=$e(x/24),W=$e(Yc(o)),c+=W,o-=jc(Ca(W)),C=$e(c/12),c%=12,f.days=o,f.months=c,f.years=C,this}function Yc(i){return i*4800/146097}function Ca(i){return i*146097/4800}function O_(i){if(!this.isValid())return NaN;var o,c,f=this._milliseconds;if(i=Le(i),i==="month"||i==="quarter"||i==="year")switch(o=this._days+f/86400000,c=this._months+Yc(o),i){case"month":return c;case"quarter":return c/3;case"year":return c/12}else switch(o=this._days+Math.round(Ca(this._months)),i){case"week":return o/7+f/604800000;case"day":return o+f/86400000;case"hour":return o*24+f/3600000;case"minute":return o*1440+f/60000;case"second":return o*86400+f/1000;case"millisecond":return Math.floor(o*86400000)+f;default:throw Error("Unknown unit "+i)}}function wt(i){return function(){return this.as(i)}}var $c=wt("ms"),M_=wt("s"),T_=wt("m"),N_=wt("h"),A_=wt("d"),D_=wt("w"),L_=wt("M"),q_=wt("Q"),R_=wt("y"),C_=$c;function P_(){return Ge(this)}function I_(i){return i=Le(i),this.isValid()?this[i+"s"]():NaN}function Zt(i){return function(){return this.isValid()?this._data[i]:NaN}}var F_=Zt("milliseconds"),j_=Zt("seconds"),Y_=Zt("minutes"),$_=Zt("hours"),B_=Zt("days"),U_=Zt("months"),W_=Zt("years");function H_(){return $e(this.days()/7)}var _t=Math.round,Lr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function V_(i,o,c,f,p){return p.relativeTime(o||1,!!c,i,f)}function G_(i,o,c,f){var p=Ge(i).abs(),w=_t(p.as("s")),x=_t(p.as("m")),C=_t(p.as("h")),W=_t(p.as("d")),J=_t(p.as("M")),Me=_t(p.as("w")),vt=_t(p.as("y")),At=w<=c.ss&&["s",w]||w<c.s&&["ss",w]||x<=1&&["m"]||x<c.m&&["mm",x]||C<=1&&["h"]||C<c.h&&["hh",C]||W<=1&&["d"]||W<c.d&&["dd",W];if(c.w!=null)At=At||Me<=1&&["w"]||Me<c.w&&["ww",Me];return At=At||J<=1&&["M"]||J<c.M&&["MM",J]||vt<=1&&["y"]||["yy",vt],At[2]=o,At[3]=+i>0,At[4]=f,V_.apply(null,At)}function K_(i){if(i===void 0)return _t;if(typeof i==="function")return _t=i,!0;return!1}function z_(i,o){if(Lr[i]===void 0)return!1;if(o===void 0)return Lr[i];if(Lr[i]=o,i==="s")Lr.ss=o-1;return!0}function J_(i,o){if(!this.isValid())return this.localeData().invalidDate();var c=!1,f=Lr,p,w;if(typeof i==="object")o=i,i=!1;if(typeof i==="boolean")c=i;if(typeof o==="object"){if(f=Object.assign({},Lr,o),o.s!=null&&o.ss==null)f.ss=o.s-1}if(p=this.localeData(),w=G_(this,!c,f,p),c)w=p.pastFuture(+this,w);return p.postformat(w)}var Pa=Math.abs;function qr(i){return(i>0)-(i<0)||+i}function Us(){if(!this.isValid())return this.localeData().invalidDate();var i=Pa(this._milliseconds)/1000,o=Pa(this._days),c=Pa(this._months),f,p,w,x,C=this.asSeconds(),W,J,Me,vt;if(!C)return"P0D";return f=$e(i/60),p=$e(f/60),i%=60,f%=60,w=$e(c/12),c%=12,x=i?i.toFixed(3).replace(/\.?0+$/,""):"",W=C<0?"-":"",J=qr(this._months)!==qr(C)?"-":"",Me=qr(this._days)!==qr(C)?"-":"",vt=qr(this._milliseconds)!==qr(C)?"-":"",W+"P"+(w?J+w+"Y":"")+(c?J+c+"M":"")+(o?Me+o+"D":"")+(p||f||i?"T":"")+(p?vt+p+"H":"")+(f?vt+f+"M":"")+(i?vt+x+"S":"")}var Z=Ps.prototype;Z.isValid=Ub,Z.abs=S_,Z.add=E_,Z.subtract=x_,Z.as=O_,Z.asMilliseconds=$c,Z.asSeconds=M_,Z.asMinutes=T_,Z.asHours=N_,Z.asDays=A_,Z.asWeeks=D_,Z.asMonths=L_,Z.asQuarters=q_,Z.asYears=R_,Z.valueOf=C_,Z._bubble=k_,Z.clone=P_,Z.get=I_,Z.milliseconds=F_,Z.seconds=j_,Z.minutes=Y_,Z.hours=$_,Z.days=B_,Z.weeks=H_,Z.months=U_,Z.years=W_,Z.humanize=J_,Z.toISOString=Us,Z.toString=Us,Z.toJSON=Us,Z.locale=Mc,Z.localeData=Nc,Z.toIsoString=N("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Us),Z.lang=Tc,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),P("x",Ns),P("X",y0),ne("X",function(i,o,c){c._d=new Date(parseFloat(i)*1000)}),ne("x",function(i,o,c){c._d=new Date(z(i))});//! moment.js
|
|
44
|
-
return t.version="2.30.1",r(
|
|
43
|
+
`+Error().stack),c=!1}return o.apply(this,arguments)},o)}var I={};function ne(s,o){if(t.deprecationHandler!=null)t.deprecationHandler(s,o);if(!I[s])F(o),I[s]=!0}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;function Z(s){return typeof Function<"u"&&s instanceof Function||Object.prototype.toString.call(s)==="[object Function]"}function H(s){var o,c;for(c in s)if(a(s,c))if(o=s[c],Z(o))this[c]=o;else this["_"+c]=o;this._config=s,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function me(s,o){var c=m({},s),f;for(f in o)if(a(o,f))if(i(s[f])&&i(o[f]))c[f]={},m(c[f],s[f]),m(c[f],o[f]);else if(o[f]!=null)c[f]=o[f];else delete c[f];for(f in s)if(a(s,f)&&!a(o,f)&&i(s[f]))c[f]=m({},c[f]);return c}function Oe(s){if(s!=null)this.set(s)}var nt;if(Object.keys)nt=Object.keys;else nt=function(s){var o,c=[];for(o in s)if(a(s,o))c.push(o);return c};var M={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function j(s,o,c){var f=this._calendar[s]||this._calendar.sameElse;return Z(f)?f.call(o,c):f}function G(s,o,c){var f=""+Math.abs(s),p=o-f.length,w=s>=0;return(w?c?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+f}var ke=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pe={},Re={};function Y(s,o,c,f){var p=f;if(typeof f==="string")p=function(){return this[f]()};if(s)Re[s]=p;if(o)Re[o[0]]=function(){return G(p.apply(this,arguments),o[1],o[2])};if(c)Re[c]=function(){return this.localeData().ordinal(p.apply(this,arguments),s)}}function Or(s){if(s.match(/\[[\s\S]/))return s.replace(/^\[|\]$/g,"");return s.replace(/\\/g,"")}function Mi(s){var o=s.match(ke),c,f;for(c=0,f=o.length;c<f;c++)if(Re[o[c]])o[c]=Re[o[c]];else o[c]=Or(o[c]);return function(p){var w="",x;for(x=0;x<f;x++)w+=Z(o[x])?o[x].call(p,s):o[x];return w}}function mt(s,o){if(!s.isValid())return s.localeData().invalidDate();return o=Ti(o,s.localeData()),Pe[o]=Pe[o]||Mi(o),Pe[o](s)}function Ti(s,o){var c=5;function f(p){return o.longDateFormat(p)||p}B.lastIndex=0;while(c>=0&&B.test(s))s=s.replace(B,f),B.lastIndex=0,c-=1;return s}var $e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Ni(s){var o=this._longDateFormat[s],c=this._longDateFormat[s.toUpperCase()];if(o||!c)return o;return this._longDateFormat[s]=c.match(ke).map(function(f){if(f==="MMMM"||f==="MM"||f==="DD"||f==="dddd")return f.slice(1);return f}).join(""),this._longDateFormat[s]}var Ea="Invalid date";function Ai(){return this._invalidDate}var Di="%d",Mr=/\d{1,2}/;function Tr(s){return this._ordinal.replace("%d",s)}var Oa={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Zt(s,o,c,f){var p=this._relativeTime[c];return Z(p)?p(s,o,c,f):p.replace(/%d/i,s)}function Nt(s,o){var c=this._relativeTime[s>0?"future":"past"];return Z(c)?c(o):c.replace(/%s/i,o)}var Nr={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ce(s){return typeof s==="string"?Nr[s]||Nr[s.toLowerCase()]:void 0}function Ar(s){var o={},c,f;for(f in s)if(a(s,f)){if(c=Ce(f),c)o[c]=s[f]}return o}var q0={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function P0(s){var o=[],c;for(c in s)if(a(s,c))o.push({unit:c,priority:q0[c]});return o.sort(function(f,p){return f.priority-p.priority}),o}var hc=/\d/,Ye=/\d\d/,dc=/\d{3}/,Ma=/\d{4}/,Li=/[+-]?\d{6}/,oe=/\d\d?/,pc=/\d\d\d\d?/,mc=/\d\d\d\d\d\d?/,qi=/\d{1,3}/,Ta=/\d{1,4}/,Pi=/[+-]?\d{1,6}/,Dr=/\d+/,Ri=/[+-]?\d+/,R0=/Z|[+-]\d\d:?\d\d/gi,Ci=/Z|[+-]\d\d(?::?\d\d)?/gi,C0=/[+-]?\d+(\.\d{1,3})?/,wn=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Lr=/^[1-9]\d?/,Na=/^([1-9]\d|\d)/,Ii;Ii={};function C(s,o,c){Ii[s]=Z(o)?o:function(f,p){return f&&c?c:o}}function I0(s,o){if(!a(Ii,s))return new RegExp(F0(s));return Ii[s](o._strict,o._locale)}function F0(s){return gt(s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(o,c,f,p,w){return c||f||p||w}))}function gt(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function We(s){if(s<0)return Math.ceil(s)||0;else return Math.floor(s)}function z(s){var o=+s,c=0;if(o!==0&&isFinite(o))c=We(o);return c}var Aa={};function se(s,o){var c,f=o,p;if(typeof s==="string")s=[s];if(h(o))f=function(w,x){x[o]=z(w)};p=s.length;for(c=0;c<p;c++)Aa[s[c]]=f}function _n(s,o){se(s,function(c,f,p,w){p._w=p._w||{},o(c,p._w,p,w)})}function j0(s,o,c){if(o!=null&&a(Aa,s))Aa[s](o,c._a,c,s)}function Fi(s){return s%4===0&&s%100!==0||s%400===0}var Te=0,yt=1,it=2,be=3,ze=4,bt=5,Xt=6,$0=7,Y0=8;Y("Y",0,0,function(){var s=this.year();return s<=9999?G(s,4):"+"+s}),Y(0,["YY",2],0,function(){return this.year()%100}),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),C("Y",Ri),C("YY",oe,Ye),C("YYYY",Ta,Ma),C("YYYYY",Pi,Li),C("YYYYYY",Pi,Li),se(["YYYYY","YYYYYY"],Te),se("YYYY",function(s,o){o[Te]=s.length===2?t.parseTwoDigitYear(s):z(s)}),se("YY",function(s,o){o[Te]=t.parseTwoDigitYear(s)}),se("Y",function(s,o){o[Te]=parseInt(s,10)});function vn(s){return Fi(s)?366:365}t.parseTwoDigitYear=function(s){return z(s)+(z(s)>68?1900:2000)};var gc=qr("FullYear",!0);function B0(){return Fi(this.year())}function qr(s,o){return function(c){if(c!=null)return yc(this,s,c),t.updateOffset(this,o),this;else return Sn(this,s)}}function Sn(s,o){if(!s.isValid())return NaN;var{_d:c,_isUTC:f}=s;switch(o){case"Milliseconds":return f?c.getUTCMilliseconds():c.getMilliseconds();case"Seconds":return f?c.getUTCSeconds():c.getSeconds();case"Minutes":return f?c.getUTCMinutes():c.getMinutes();case"Hours":return f?c.getUTCHours():c.getHours();case"Date":return f?c.getUTCDate():c.getDate();case"Day":return f?c.getUTCDay():c.getDay();case"Month":return f?c.getUTCMonth():c.getMonth();case"FullYear":return f?c.getUTCFullYear():c.getFullYear();default:return NaN}}function yc(s,o,c){var f,p,w,x,R;if(!s.isValid()||isNaN(c))return;switch(f=s._d,p=s._isUTC,o){case"Milliseconds":return void(p?f.setUTCMilliseconds(c):f.setMilliseconds(c));case"Seconds":return void(p?f.setUTCSeconds(c):f.setSeconds(c));case"Minutes":return void(p?f.setUTCMinutes(c):f.setMinutes(c));case"Hours":return void(p?f.setUTCHours(c):f.setHours(c));case"Date":return void(p?f.setUTCDate(c):f.setDate(c));case"FullYear":break;default:return}w=c,x=s.month(),R=s.date(),R=R===29&&x===1&&!Fi(w)?28:R,p?f.setUTCFullYear(w,x,R):f.setFullYear(w,x,R)}function W0(s){if(s=Ce(s),Z(this[s]))return this[s]();return this}function U0(s,o){if(typeof s==="object"){s=Ar(s);var c=P0(s),f,p=c.length;for(f=0;f<p;f++)this[c[f].unit](s[c[f].unit])}else if(s=Ce(s),Z(this[s]))return this[s](o);return this}function H0(s,o){return(s%o+o)%o}var de;if(Array.prototype.indexOf)de=Array.prototype.indexOf;else de=function(s){var o;for(o=0;o<this.length;++o)if(this[o]===s)return o;return-1};function Da(s,o){if(isNaN(s)||isNaN(o))return NaN;var c=H0(o,12);return s+=(o-c)/12,c===1?Fi(s)?29:28:31-c%7%2}Y("M",["MM",2],"Mo",function(){return this.month()+1}),Y("MMM",0,0,function(s){return this.localeData().monthsShort(this,s)}),Y("MMMM",0,0,function(s){return this.localeData().months(this,s)}),C("M",oe,Lr),C("MM",oe,Ye),C("MMM",function(s,o){return o.monthsShortRegex(s)}),C("MMMM",function(s,o){return o.monthsRegex(s)}),se(["M","MM"],function(s,o){o[yt]=z(s)-1}),se(["MMM","MMMM"],function(s,o,c,f){var p=c._locale.monthsParse(s,f,c._strict);if(p!=null)o[yt]=p;else y(c).invalidMonth=s});var V0="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),bc="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),wc=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,G0=wn,K0=wn;function z0(s,o){if(!s)return n(this._months)?this._months:this._months.standalone;return n(this._months)?this._months[s.month()]:this._months[(this._months.isFormat||wc).test(o)?"format":"standalone"][s.month()]}function J0(s,o){if(!s)return n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone;return n(this._monthsShort)?this._monthsShort[s.month()]:this._monthsShort[wc.test(o)?"format":"standalone"][s.month()]}function Q0(s,o,c){var f,p,w,x=s.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(f=0;f<12;++f)w=g([2000,f]),this._shortMonthsParse[f]=this.monthsShort(w,"").toLocaleLowerCase(),this._longMonthsParse[f]=this.months(w,"").toLocaleLowerCase()}if(c)if(o==="MMM")return p=de.call(this._shortMonthsParse,x),p!==-1?p:null;else return p=de.call(this._longMonthsParse,x),p!==-1?p:null;else if(o==="MMM"){if(p=de.call(this._shortMonthsParse,x),p!==-1)return p;return p=de.call(this._longMonthsParse,x),p!==-1?p:null}else{if(p=de.call(this._longMonthsParse,x),p!==-1)return p;return p=de.call(this._shortMonthsParse,x),p!==-1?p:null}}function Z0(s,o,c){var f,p,w;if(this._monthsParseExact)return Q0.call(this,s,o,c);if(!this._monthsParse)this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(f=0;f<12;f++){if(p=g([2000,f]),c&&!this._longMonthsParse[f])this._longMonthsParse[f]=new RegExp("^"+this.months(p,"").replace(".","")+"$","i"),this._shortMonthsParse[f]=new RegExp("^"+this.monthsShort(p,"").replace(".","")+"$","i");if(!c&&!this._monthsParse[f])w="^"+this.months(p,"")+"|^"+this.monthsShort(p,""),this._monthsParse[f]=new RegExp(w.replace(".",""),"i");if(c&&o==="MMMM"&&this._longMonthsParse[f].test(s))return f;else if(c&&o==="MMM"&&this._shortMonthsParse[f].test(s))return f;else if(!c&&this._monthsParse[f].test(s))return f}}function _c(s,o){if(!s.isValid())return s;if(typeof o==="string"){if(/^\d+$/.test(o))o=z(o);else if(o=s.localeData().monthsParse(o),!h(o))return s}var c=o,f=s.date();return f=f<29?f:Math.min(f,Da(s.year(),c)),s._isUTC?s._d.setUTCMonth(c,f):s._d.setMonth(c,f),s}function vc(s){if(s!=null)return _c(this,s),t.updateOffset(this,!0),this;else return Sn(this,"Month")}function X0(){return Da(this.year(),this.month())}function eb(s){if(this._monthsParseExact){if(!a(this,"_monthsRegex"))Sc.call(this);if(s)return this._monthsShortStrictRegex;else return this._monthsShortRegex}else{if(!a(this,"_monthsShortRegex"))this._monthsShortRegex=G0;return this._monthsShortStrictRegex&&s?this._monthsShortStrictRegex:this._monthsShortRegex}}function tb(s){if(this._monthsParseExact){if(!a(this,"_monthsRegex"))Sc.call(this);if(s)return this._monthsStrictRegex;else return this._monthsRegex}else{if(!a(this,"_monthsRegex"))this._monthsRegex=K0;return this._monthsStrictRegex&&s?this._monthsStrictRegex:this._monthsRegex}}function Sc(){function s(U,Q){return Q.length-U.length}var o=[],c=[],f=[],p,w,x,R;for(p=0;p<12;p++)w=g([2000,p]),x=gt(this.monthsShort(w,"")),R=gt(this.months(w,"")),o.push(x),c.push(R),f.push(R),f.push(x);o.sort(s),c.sort(s),f.sort(s),this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function rb(s,o,c,f,p,w,x){var R;if(s<100&&s>=0){if(R=new Date(s+400,o,c,f,p,w,x),isFinite(R.getFullYear()))R.setFullYear(s)}else R=new Date(s,o,c,f,p,w,x);return R}function kn(s){var o,c;if(s<100&&s>=0){if(c=Array.prototype.slice.call(arguments),c[0]=s+400,o=new Date(Date.UTC.apply(null,c)),isFinite(o.getUTCFullYear()))o.setUTCFullYear(s)}else o=new Date(Date.UTC.apply(null,arguments));return o}function ji(s,o,c){var f=7+o-c,p=(7+kn(s,0,f).getUTCDay()-o)%7;return-p+f-1}function kc(s,o,c,f,p){var w=(7+c-f)%7,x=ji(s,f,p),R=1+7*(o-1)+w+x,U,Q;if(R<=0)U=s-1,Q=vn(U)+R;else if(R>vn(s))U=s+1,Q=R-vn(s);else U=s,Q=R;return{year:U,dayOfYear:Q}}function xn(s,o,c){var f=ji(s.year(),o,c),p=Math.floor((s.dayOfYear()-f-1)/7)+1,w,x;if(p<1)x=s.year()-1,w=p+wt(x,o,c);else if(p>wt(s.year(),o,c))w=p-wt(s.year(),o,c),x=s.year()+1;else x=s.year(),w=p;return{week:w,year:x}}function wt(s,o,c){var f=ji(s,o,c),p=ji(s+1,o,c);return(vn(s)-f+p)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),C("w",oe,Lr),C("ww",oe,Ye),C("W",oe,Lr),C("WW",oe,Ye),_n(["w","ww","W","WW"],function(s,o,c,f){o[f.substr(0,1)]=z(s)});function nb(s){return xn(s,this._week.dow,this._week.doy).week}var ib={dow:0,doy:6};function sb(){return this._week.dow}function ab(){return this._week.doy}function ob(s){var o=this.localeData().week(this);return s==null?o:this.add((s-o)*7,"d")}function lb(s){var o=xn(this,1,4).week;return s==null?o:this.add((s-o)*7,"d")}Y("d",0,"do","day"),Y("dd",0,0,function(s){return this.localeData().weekdaysMin(this,s)}),Y("ddd",0,0,function(s){return this.localeData().weekdaysShort(this,s)}),Y("dddd",0,0,function(s){return this.localeData().weekdays(this,s)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),C("d",oe),C("e",oe),C("E",oe),C("dd",function(s,o){return o.weekdaysMinRegex(s)}),C("ddd",function(s,o){return o.weekdaysShortRegex(s)}),C("dddd",function(s,o){return o.weekdaysRegex(s)}),_n(["dd","ddd","dddd"],function(s,o,c,f){var p=c._locale.weekdaysParse(s,f,c._strict);if(p!=null)o.d=p;else y(c).invalidWeekday=s}),_n(["d","e","E"],function(s,o,c,f){o[f]=z(s)});function ub(s,o){if(typeof s!=="string")return s;if(!isNaN(s))return parseInt(s,10);if(s=o.weekdaysParse(s),typeof s==="number")return s;return null}function cb(s,o){if(typeof s==="string")return o.weekdaysParse(s)%7||7;return isNaN(s)?null:s}function La(s,o){return s.slice(o,7).concat(s.slice(0,o))}var fb="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),xc="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),hb="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),db=wn,pb=wn,mb=wn;function gb(s,o){var c=n(this._weekdays)?this._weekdays:this._weekdays[s&&s!==!0&&this._weekdays.isFormat.test(o)?"format":"standalone"];return s===!0?La(c,this._week.dow):s?c[s.day()]:c}function yb(s){return s===!0?La(this._weekdaysShort,this._week.dow):s?this._weekdaysShort[s.day()]:this._weekdaysShort}function bb(s){return s===!0?La(this._weekdaysMin,this._week.dow):s?this._weekdaysMin[s.day()]:this._weekdaysMin}function wb(s,o,c){var f,p,w,x=s.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[];for(f=0;f<7;++f)w=g([2000,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(w,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(w,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(w,"").toLocaleLowerCase()}if(c)if(o==="dddd")return p=de.call(this._weekdaysParse,x),p!==-1?p:null;else if(o==="ddd")return p=de.call(this._shortWeekdaysParse,x),p!==-1?p:null;else return p=de.call(this._minWeekdaysParse,x),p!==-1?p:null;else if(o==="dddd"){if(p=de.call(this._weekdaysParse,x),p!==-1)return p;if(p=de.call(this._shortWeekdaysParse,x),p!==-1)return p;return p=de.call(this._minWeekdaysParse,x),p!==-1?p:null}else if(o==="ddd"){if(p=de.call(this._shortWeekdaysParse,x),p!==-1)return p;if(p=de.call(this._weekdaysParse,x),p!==-1)return p;return p=de.call(this._minWeekdaysParse,x),p!==-1?p:null}else{if(p=de.call(this._minWeekdaysParse,x),p!==-1)return p;if(p=de.call(this._weekdaysParse,x),p!==-1)return p;return p=de.call(this._shortWeekdaysParse,x),p!==-1?p:null}}function _b(s,o,c){var f,p,w;if(this._weekdaysParseExact)return wb.call(this,s,o,c);if(!this._weekdaysParse)this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[];for(f=0;f<7;f++){if(p=g([2000,1]).day(f),c&&!this._fullWeekdaysParse[f])this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i");if(!this._weekdaysParse[f])w="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[f]=new RegExp(w.replace(".",""),"i");if(c&&o==="dddd"&&this._fullWeekdaysParse[f].test(s))return f;else if(c&&o==="ddd"&&this._shortWeekdaysParse[f].test(s))return f;else if(c&&o==="dd"&&this._minWeekdaysParse[f].test(s))return f;else if(!c&&this._weekdaysParse[f].test(s))return f}}function vb(s){if(!this.isValid())return s!=null?this:NaN;var o=Sn(this,"Day");if(s!=null)return s=ub(s,this.localeData()),this.add(s-o,"d");else return o}function Sb(s){if(!this.isValid())return s!=null?this:NaN;var o=(this.day()+7-this.localeData()._week.dow)%7;return s==null?o:this.add(s-o,"d")}function kb(s){if(!this.isValid())return s!=null?this:NaN;if(s!=null){var o=cb(s,this.localeData());return this.day(this.day()%7?o:o-7)}else return this.day()||7}function xb(s){if(this._weekdaysParseExact){if(!a(this,"_weekdaysRegex"))qa.call(this);if(s)return this._weekdaysStrictRegex;else return this._weekdaysRegex}else{if(!a(this,"_weekdaysRegex"))this._weekdaysRegex=db;return this._weekdaysStrictRegex&&s?this._weekdaysStrictRegex:this._weekdaysRegex}}function Eb(s){if(this._weekdaysParseExact){if(!a(this,"_weekdaysRegex"))qa.call(this);if(s)return this._weekdaysShortStrictRegex;else return this._weekdaysShortRegex}else{if(!a(this,"_weekdaysShortRegex"))this._weekdaysShortRegex=pb;return this._weekdaysShortStrictRegex&&s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}function Ob(s){if(this._weekdaysParseExact){if(!a(this,"_weekdaysRegex"))qa.call(this);if(s)return this._weekdaysMinStrictRegex;else return this._weekdaysMinRegex}else{if(!a(this,"_weekdaysMinRegex"))this._weekdaysMinRegex=mb;return this._weekdaysMinStrictRegex&&s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function qa(){function s(De,xt){return xt.length-De.length}var o=[],c=[],f=[],p=[],w,x,R,U,Q;for(w=0;w<7;w++)x=g([2000,1]).day(w),R=gt(this.weekdaysMin(x,"")),U=gt(this.weekdaysShort(x,"")),Q=gt(this.weekdays(x,"")),o.push(R),c.push(U),f.push(Q),p.push(R),p.push(U),p.push(Q);o.sort(s),c.sort(s),f.sort(s),p.sort(s),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Pa(){return this.hours()%12||12}function Mb(){return this.hours()||24}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,Pa),Y("k",["kk",2],0,Mb),Y("hmm",0,0,function(){return""+Pa.apply(this)+G(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+Pa.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+G(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)});function Ec(s,o){Y(s,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),o)})}Ec("a",!0),Ec("A",!1);function Oc(s,o){return o._meridiemParse}C("a",Oc),C("A",Oc),C("H",oe,Na),C("h",oe,Lr),C("k",oe,Lr),C("HH",oe,Ye),C("hh",oe,Ye),C("kk",oe,Ye),C("hmm",pc),C("hmmss",mc),C("Hmm",pc),C("Hmmss",mc),se(["H","HH"],be),se(["k","kk"],function(s,o,c){var f=z(s);o[be]=f===24?0:f}),se(["a","A"],function(s,o,c){c._isPm=c._locale.isPM(s),c._meridiem=s}),se(["h","hh"],function(s,o,c){o[be]=z(s),y(c).bigHour=!0}),se("hmm",function(s,o,c){var f=s.length-2;o[be]=z(s.substr(0,f)),o[ze]=z(s.substr(f)),y(c).bigHour=!0}),se("hmmss",function(s,o,c){var f=s.length-4,p=s.length-2;o[be]=z(s.substr(0,f)),o[ze]=z(s.substr(f,2)),o[bt]=z(s.substr(p)),y(c).bigHour=!0}),se("Hmm",function(s,o,c){var f=s.length-2;o[be]=z(s.substr(0,f)),o[ze]=z(s.substr(f))}),se("Hmmss",function(s,o,c){var f=s.length-4,p=s.length-2;o[be]=z(s.substr(0,f)),o[ze]=z(s.substr(f,2)),o[bt]=z(s.substr(p))});function Tb(s){return(s+"").toLowerCase().charAt(0)==="p"}var Nb=/[ap]\.?m?\.?/i,Ab=qr("Hours",!0);function Db(s,o,c){if(s>11)return c?"pm":"PM";else return c?"am":"AM"}var Mc={calendar:M,longDateFormat:$e,invalidDate:Ea,ordinal:Di,dayOfMonthOrdinalParse:Mr,relativeTime:Oa,months:V0,monthsShort:bc,week:ib,weekdays:fb,weekdaysMin:hb,weekdaysShort:xc,meridiemParse:Nb},ue={},En={},On;function Lb(s,o){var c,f=Math.min(s.length,o.length);for(c=0;c<f;c+=1)if(s[c]!==o[c])return c;return f}function Tc(s){return s?s.toLowerCase().replace("_","-"):s}function qb(s){var o=0,c,f,p,w;while(o<s.length){w=Tc(s[o]).split("-"),c=w.length,f=Tc(s[o+1]),f=f?f.split("-"):null;while(c>0){if(p=$i(w.slice(0,c).join("-")),p)return p;if(f&&f.length>=c&&Lb(w,f)>=c-1)break;c--}o++}return On}function Pb(s){return!!(s&&s.match("^[^/\\\\]*$"))}function $i(s){var o=null,c;if(ue[s]===void 0&&typeof sn<"u"&&sn&&sn.exports&&Pb(s))try{o=On._abbr,c=W,c("./locale/"+s),At(o)}catch(f){ue[s]=null}return ue[s]}function At(s,o){var c;if(s){if(u(o))c=_t(s);else c=Ra(s,o);if(c)On=c;else if(typeof console<"u"&&console.warn)console.warn("Locale "+s+" not found. Did you forget to load it?")}return On._abbr}function Ra(s,o){if(o!==null){var c,f=Mc;if(o.abbr=s,ue[s]!=null)ne("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=ue[s]._config;else if(o.parentLocale!=null)if(ue[o.parentLocale]!=null)f=ue[o.parentLocale]._config;else if(c=$i(o.parentLocale),c!=null)f=c._config;else{if(!En[o.parentLocale])En[o.parentLocale]=[];return En[o.parentLocale].push({name:s,config:o}),null}if(ue[s]=new Oe(me(f,o)),En[s])En[s].forEach(function(p){Ra(p.name,p.config)});return At(s),ue[s]}else return delete ue[s],null}function Rb(s,o){if(o!=null){var c,f,p=Mc;if(ue[s]!=null&&ue[s].parentLocale!=null)ue[s].set(me(ue[s]._config,o));else{if(f=$i(s),f!=null)p=f._config;if(o=me(p,o),f==null)o.abbr=s;c=new Oe(o),c.parentLocale=ue[s],ue[s]=c}At(s)}else if(ue[s]!=null){if(ue[s].parentLocale!=null){if(ue[s]=ue[s].parentLocale,s===At())At(s)}else if(ue[s]!=null)delete ue[s]}return ue[s]}function _t(s){var o;if(s&&s._locale&&s._locale._abbr)s=s._locale._abbr;if(!s)return On;if(!n(s)){if(o=$i(s),o)return o;s=[s]}return qb(s)}function Cb(){return nt(ue)}function Ca(s){var o,c=s._a;if(c&&y(s).overflow===-2){if(o=c[yt]<0||c[yt]>11?yt:c[it]<1||c[it]>Da(c[Te],c[yt])?it:c[be]<0||c[be]>24||c[be]===24&&(c[ze]!==0||c[bt]!==0||c[Xt]!==0)?be:c[ze]<0||c[ze]>59?ze:c[bt]<0||c[bt]>59?bt:c[Xt]<0||c[Xt]>999?Xt:-1,y(s)._overflowDayOfYear&&(o<Te||o>it))o=it;if(y(s)._overflowWeeks&&o===-1)o=$0;if(y(s)._overflowWeekday&&o===-1)o=Y0;y(s).overflow=o}return s}var Ib=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Fb=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,jb=/Z|[+-]\d\d(?::?\d\d)?/,Yi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ia=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],$b=/^\/?Date\((-?\d+)/i,Yb=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Bb={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nc(s){var o,c,f=s._i,p=Ib.exec(f)||Fb.exec(f),w,x,R,U,Q=Yi.length,De=Ia.length;if(p){y(s).iso=!0;for(o=0,c=Q;o<c;o++)if(Yi[o][1].exec(p[1])){x=Yi[o][0],w=Yi[o][2]!==!1;break}if(x==null){s._isValid=!1;return}if(p[3]){for(o=0,c=De;o<c;o++)if(Ia[o][1].exec(p[3])){R=(p[2]||" ")+Ia[o][0];break}if(R==null){s._isValid=!1;return}}if(!w&&R!=null){s._isValid=!1;return}if(p[4])if(jb.exec(p[4]))U="Z";else{s._isValid=!1;return}s._f=x+(R||"")+(U||""),ja(s)}else s._isValid=!1}function Wb(s,o,c,f,p,w){var x=[Ub(s),bc.indexOf(o),parseInt(c,10),parseInt(f,10),parseInt(p,10)];if(w)x.push(parseInt(w,10));return x}function Ub(s){var o=parseInt(s,10);if(o<=49)return 2000+o;else if(o<=999)return 1900+o;return o}function Hb(s){return s.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Vb(s,o,c){if(s){var f=xc.indexOf(s),p=new Date(o[0],o[1],o[2]).getDay();if(f!==p)return y(c).weekdayMismatch=!0,c._isValid=!1,!1}return!0}function Gb(s,o,c){if(s)return Bb[s];else if(o)return 0;else{var f=parseInt(c,10),p=f%100,w=(f-p)/100;return w*60+p}}function Ac(s){var o=Yb.exec(Hb(s._i)),c;if(o){if(c=Wb(o[4],o[3],o[2],o[5],o[6],o[7]),!Vb(o[1],c,s))return;s._a=c,s._tzm=Gb(o[8],o[9],o[10]),s._d=kn.apply(null,s._a),s._d.setUTCMinutes(s._d.getUTCMinutes()-s._tzm),y(s).rfc2822=!0}else s._isValid=!1}function Kb(s){var o=$b.exec(s._i);if(o!==null){s._d=new Date(+o[1]);return}if(Nc(s),s._isValid===!1)delete s._isValid;else return;if(Ac(s),s._isValid===!1)delete s._isValid;else return;if(s._strict)s._isValid=!1;else t.createFromInputFallback(s)}t.createFromInputFallback=N("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(s){s._d=new Date(s._i+(s._useUTC?" UTC":""))});function Pr(s,o,c){if(s!=null)return s;if(o!=null)return o;return c}function zb(s){var o=new Date(t.now());if(s._useUTC)return[o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()];return[o.getFullYear(),o.getMonth(),o.getDate()]}function Fa(s){var o,c,f=[],p,w,x;if(s._d)return;if(p=zb(s),s._w&&s._a[it]==null&&s._a[yt]==null)Jb(s);if(s._dayOfYear!=null){if(x=Pr(s._a[Te],p[Te]),s._dayOfYear>vn(x)||s._dayOfYear===0)y(s)._overflowDayOfYear=!0;c=kn(x,0,s._dayOfYear),s._a[yt]=c.getUTCMonth(),s._a[it]=c.getUTCDate()}for(o=0;o<3&&s._a[o]==null;++o)s._a[o]=f[o]=p[o];for(;o<7;o++)s._a[o]=f[o]=s._a[o]==null?o===2?1:0:s._a[o];if(s._a[be]===24&&s._a[ze]===0&&s._a[bt]===0&&s._a[Xt]===0)s._nextDay=!0,s._a[be]=0;if(s._d=(s._useUTC?kn:rb).apply(null,f),w=s._useUTC?s._d.getUTCDay():s._d.getDay(),s._tzm!=null)s._d.setUTCMinutes(s._d.getUTCMinutes()-s._tzm);if(s._nextDay)s._a[be]=24;if(s._w&&typeof s._w.d<"u"&&s._w.d!==w)y(s).weekdayMismatch=!0}function Jb(s){var o,c,f,p,w,x,R,U,Q;if(o=s._w,o.GG!=null||o.W!=null||o.E!=null){if(w=1,x=4,c=Pr(o.GG,s._a[Te],xn(le(),1,4).year),f=Pr(o.W,1),p=Pr(o.E,1),p<1||p>7)U=!0}else if(w=s._locale._week.dow,x=s._locale._week.doy,Q=xn(le(),w,x),c=Pr(o.gg,s._a[Te],Q.year),f=Pr(o.w,Q.week),o.d!=null){if(p=o.d,p<0||p>6)U=!0}else if(o.e!=null){if(p=o.e+w,o.e<0||o.e>6)U=!0}else p=w;if(f<1||f>wt(c,w,x))y(s)._overflowWeeks=!0;else if(U!=null)y(s)._overflowWeekday=!0;else R=kc(c,f,p,w,x),s._a[Te]=R.year,s._dayOfYear=R.dayOfYear}t.ISO_8601=function(){},t.RFC_2822=function(){};function ja(s){if(s._f===t.ISO_8601){Nc(s);return}if(s._f===t.RFC_2822){Ac(s);return}s._a=[],y(s).empty=!0;var o=""+s._i,c,f,p,w,x,R=o.length,U=0,Q,De;p=Ti(s._f,s._locale).match(ke)||[],De=p.length;for(c=0;c<De;c++){if(w=p[c],f=(o.match(I0(w,s))||[])[0],f){if(x=o.substr(0,o.indexOf(f)),x.length>0)y(s).unusedInput.push(x);o=o.slice(o.indexOf(f)+f.length),U+=f.length}if(Re[w]){if(f)y(s).empty=!1;else y(s).unusedTokens.push(w);j0(w,f,s)}else if(s._strict&&!f)y(s).unusedTokens.push(w)}if(y(s).charsLeftOver=R-U,o.length>0)y(s).unusedInput.push(o);if(s._a[be]<=12&&y(s).bigHour===!0&&s._a[be]>0)y(s).bigHour=void 0;if(y(s).parsedDateParts=s._a.slice(0),y(s).meridiem=s._meridiem,s._a[be]=Qb(s._locale,s._a[be],s._meridiem),Q=y(s).era,Q!==null)s._a[Te]=s._locale.erasConvertYear(Q,s._a[Te]);Fa(s),Ca(s)}function Qb(s,o,c){var f;if(c==null)return o;if(s.meridiemHour!=null)return s.meridiemHour(o,c);else if(s.isPM!=null){if(f=s.isPM(c),f&&o<12)o+=12;if(!f&&o===12)o=0;return o}else return o}function Zb(s){var o,c,f,p,w,x,R=!1,U=s._f.length;if(U===0){y(s).invalidFormat=!0,s._d=new Date(NaN);return}for(p=0;p<U;p++){if(w=0,x=!1,o=T({},s),s._useUTC!=null)o._useUTC=s._useUTC;if(o._f=s._f[p],ja(o),k(o))x=!0;if(w+=y(o).charsLeftOver,w+=y(o).unusedTokens.length*10,y(o).score=w,!R){if(f==null||w<f||x){if(f=w,c=o,x)R=!0}}else if(w<f)f=w,c=o}m(s,c||o)}function Xb(s){if(s._d)return;var o=Ar(s._i),c=o.day===void 0?o.date:o.day;s._a=b([o.year,o.month,c,o.hour,o.minute,o.second,o.millisecond],function(f){return f&&parseInt(f,10)}),Fa(s)}function ew(s){var o=new q(Ca(Dc(s)));if(o._nextDay)o.add(1,"d"),o._nextDay=void 0;return o}function Dc(s){var{_i:o,_f:c}=s;if(s._locale=s._locale||_t(s._l),o===null||c===void 0&&o==="")return O({nullInput:!0});if(typeof o==="string")s._i=o=s._locale.preparse(o);if(L(o))return new q(Ca(o));else if(d(o))s._d=o;else if(n(c))Zb(s);else if(c)ja(s);else tw(s);if(!k(s))s._d=null;return s}function tw(s){var o=s._i;if(u(o))s._d=new Date(t.now());else if(d(o))s._d=new Date(o.valueOf());else if(typeof o==="string")Kb(s);else if(n(o))s._a=b(o.slice(0),function(c){return parseInt(c,10)}),Fa(s);else if(i(o))Xb(s);else if(h(o))s._d=new Date(o);else t.createFromInputFallback(s)}function Lc(s,o,c,f,p){var w={};if(o===!0||o===!1)f=o,o=void 0;if(c===!0||c===!1)f=c,c=void 0;if(i(s)&&l(s)||n(s)&&s.length===0)s=void 0;return w._isAMomentObject=!0,w._useUTC=w._isUTC=p,w._l=c,w._i=s,w._f=o,w._strict=f,ew(w)}function le(s,o,c,f){return Lc(s,o,c,f,!1)}var rw=N("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var s=le.apply(null,arguments);if(this.isValid()&&s.isValid())return s<this?this:s;else return O()}),nw=N("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var s=le.apply(null,arguments);if(this.isValid()&&s.isValid())return s>this?this:s;else return O()});function qc(s,o){var c,f;if(o.length===1&&n(o[0]))o=o[0];if(!o.length)return le();c=o[0];for(f=1;f<o.length;++f)if(!o[f].isValid()||o[f][s](c))c=o[f];return c}function iw(){var s=[].slice.call(arguments,0);return qc("isBefore",s)}function sw(){var s=[].slice.call(arguments,0);return qc("isAfter",s)}var aw=function(){return Date.now?Date.now():+new Date},Mn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ow(s){var o,c=!1,f,p=Mn.length;for(o in s)if(a(s,o)&&!(de.call(Mn,o)!==-1&&(s[o]==null||!isNaN(s[o]))))return!1;for(f=0;f<p;++f)if(s[Mn[f]]){if(c)return!1;if(parseFloat(s[Mn[f]])!==z(s[Mn[f]]))c=!0}return!0}function lw(){return this._isValid}function uw(){return Je(NaN)}function Bi(s){var o=Ar(s),c=o.year||0,f=o.quarter||0,p=o.month||0,w=o.week||o.isoWeek||0,x=o.day||0,R=o.hour||0,U=o.minute||0,Q=o.second||0,De=o.millisecond||0;this._isValid=ow(o),this._milliseconds=+De+Q*1000+U*60000+R*1000*60*60,this._days=+x+w*7,this._months=+p+f*3+c*12,this._data={},this._locale=_t(),this._bubble()}function Wi(s){return s instanceof Bi}function $a(s){if(s<0)return Math.round(-1*s)*-1;else return Math.round(s)}function cw(s,o,c){var f=Math.min(s.length,o.length),p=Math.abs(s.length-o.length),w=0,x;for(x=0;x<f;x++)if(c&&s[x]!==o[x]||!c&&z(s[x])!==z(o[x]))w++;return w+p}function Pc(s,o){Y(s,0,0,function(){var c=this.utcOffset(),f="+";if(c<0)c=-c,f="-";return f+G(~~(c/60),2)+o+G(~~c%60,2)})}Pc("Z",":"),Pc("ZZ",""),C("Z",Ci),C("ZZ",Ci),se(["Z","ZZ"],function(s,o,c){c._useUTC=!0,c._tzm=Ya(Ci,s)});var fw=/([\+\-]|\d\d)/gi;function Ya(s,o){var c=(o||"").match(s),f,p,w;if(c===null)return null;return f=c[c.length-1]||[],p=(f+"").match(fw)||["-",0,0],w=+(p[1]*60)+z(p[2]),w===0?0:p[0]==="+"?w:-w}function Ba(s,o){var c,f;if(o._isUTC)return c=o.clone(),f=(L(s)||d(s)?s.valueOf():le(s).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+f),t.updateOffset(c,!1),c;else return le(s).local()}function Wa(s){return-Math.round(s._d.getTimezoneOffset())}t.updateOffset=function(){};function hw(s,o,c){var f=this._offset||0,p;if(!this.isValid())return s!=null?this:NaN;if(s!=null){if(typeof s==="string"){if(s=Ya(Ci,s),s===null)return this}else if(Math.abs(s)<16&&!c)s=s*60;if(!this._isUTC&&o)p=Wa(this);if(this._offset=s,this._isUTC=!0,p!=null)this.add(p,"m");if(f!==s){if(!o||this._changeInProgress)Fc(this,Je(s-f,"m"),1,!1);else if(!this._changeInProgress)this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null}return this}else return this._isUTC?f:Wa(this)}function dw(s,o){if(s!=null){if(typeof s!=="string")s=-s;return this.utcOffset(s,o),this}else return-this.utcOffset()}function pw(s){return this.utcOffset(0,s)}function mw(s){if(this._isUTC){if(this.utcOffset(0,s),this._isUTC=!1,s)this.subtract(Wa(this),"m")}return this}function gw(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==="string"){var s=Ya(R0,this._i);if(s!=null)this.utcOffset(s);else this.utcOffset(0,!0)}return this}function yw(s){if(!this.isValid())return!1;return s=s?le(s).utcOffset():0,(this.utcOffset()-s)%60===0}function bw(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ww(){if(!u(this._isDSTShifted))return this._isDSTShifted;var s={},o;if(T(s,this),s=Dc(s),s._a)o=s._isUTC?g(s._a):le(s._a),this._isDSTShifted=this.isValid()&&cw(s._a,o.toArray())>0;else this._isDSTShifted=!1;return this._isDSTShifted}function _w(){return this.isValid()?!this._isUTC:!1}function vw(){return this.isValid()?this._isUTC:!1}function Rc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Sw=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,kw=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Je(s,o){var c=s,f=null,p,w,x;if(Wi(s))c={ms:s._milliseconds,d:s._days,M:s._months};else if(h(s)||!isNaN(+s))if(c={},o)c[o]=+s;else c.milliseconds=+s;else if(f=Sw.exec(s))p=f[1]==="-"?-1:1,c={y:0,d:z(f[it])*p,h:z(f[be])*p,m:z(f[ze])*p,s:z(f[bt])*p,ms:z($a(f[Xt]*1000))*p};else if(f=kw.exec(s))p=f[1]==="-"?-1:1,c={y:er(f[2],p),M:er(f[3],p),w:er(f[4],p),d:er(f[5],p),h:er(f[6],p),m:er(f[7],p),s:er(f[8],p)};else if(c==null)c={};else if(typeof c==="object"&&(("from"in c)||("to"in c)))x=xw(le(c.from),le(c.to)),c={},c.ms=x.milliseconds,c.M=x.months;if(w=new Bi(c),Wi(s)&&a(s,"_locale"))w._locale=s._locale;if(Wi(s)&&a(s,"_isValid"))w._isValid=s._isValid;return w}Je.fn=Bi.prototype,Je.invalid=uw;function er(s,o){var c=s&&parseFloat(s.replace(",","."));return(isNaN(c)?0:c)*o}function Cc(s,o){var c={};if(c.months=o.month()-s.month()+(o.year()-s.year())*12,s.clone().add(c.months,"M").isAfter(o))--c.months;return c.milliseconds=+o-+s.clone().add(c.months,"M"),c}function xw(s,o){var c;if(!(s.isValid()&&o.isValid()))return{milliseconds:0,months:0};if(o=Ba(o,s),s.isBefore(o))c=Cc(s,o);else c=Cc(o,s),c.milliseconds=-c.milliseconds,c.months=-c.months;return c}function Ic(s,o){return function(c,f){var p,w;if(f!==null&&!isNaN(+f))ne(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),w=c,c=f,f=w;return p=Je(c,f),Fc(this,p,s),this}}function Fc(s,o,c,f){var p=o._milliseconds,w=$a(o._days),x=$a(o._months);if(!s.isValid())return;if(f=f==null?!0:f,x)_c(s,Sn(s,"Month")+x*c);if(w)yc(s,"Date",Sn(s,"Date")+w*c);if(p)s._d.setTime(s._d.valueOf()+p*c);if(f)t.updateOffset(s,w||x)}var Ew=Ic(1,"add"),Ow=Ic(-1,"subtract");function jc(s){return typeof s==="string"||s instanceof String}function Mw(s){return L(s)||d(s)||jc(s)||h(s)||Nw(s)||Tw(s)||s===null||s===void 0}function Tw(s){var o=i(s)&&!l(s),c=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,w,x=f.length;for(p=0;p<x;p+=1)w=f[p],c=c||a(s,w);return o&&c}function Nw(s){var o=n(s),c=!1;if(o)c=s.filter(function(f){return!h(f)&&jc(s)}).length===0;return o&&c}function Aw(s){var o=i(s)&&!l(s),c=!1,f=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],p,w;for(p=0;p<f.length;p+=1)w=f[p],c=c||a(s,w);return o&&c}function Dw(s,o){var c=s.diff(o,"days",!0);return c<-6?"sameElse":c<-1?"lastWeek":c<0?"lastDay":c<1?"sameDay":c<2?"nextDay":c<7?"nextWeek":"sameElse"}function Lw(s,o){if(arguments.length===1){if(!arguments[0])s=void 0,o=void 0;else if(Mw(arguments[0]))s=arguments[0],o=void 0;else if(Aw(arguments[0]))o=arguments[0],s=void 0}var c=s||le(),f=Ba(c,this).startOf("day"),p=t.calendarFormat(this,f)||"sameElse",w=o&&(Z(o[p])?o[p].call(this,c):o[p]);return this.format(w||this.localeData().calendar(p,this,le(c)))}function qw(){return new q(this)}function Pw(s,o){var c=L(s)?s:le(s);if(!(this.isValid()&&c.isValid()))return!1;if(o=Ce(o)||"millisecond",o==="millisecond")return this.valueOf()>c.valueOf();else return c.valueOf()<this.clone().startOf(o).valueOf()}function Rw(s,o){var c=L(s)?s:le(s);if(!(this.isValid()&&c.isValid()))return!1;if(o=Ce(o)||"millisecond",o==="millisecond")return this.valueOf()<c.valueOf();else return this.clone().endOf(o).valueOf()<c.valueOf()}function Cw(s,o,c,f){var p=L(s)?s:le(s),w=L(o)?o:le(o);if(!(this.isValid()&&p.isValid()&&w.isValid()))return!1;return f=f||"()",(f[0]==="("?this.isAfter(p,c):!this.isBefore(p,c))&&(f[1]===")"?this.isBefore(w,c):!this.isAfter(w,c))}function Iw(s,o){var c=L(s)?s:le(s),f;if(!(this.isValid()&&c.isValid()))return!1;if(o=Ce(o)||"millisecond",o==="millisecond")return this.valueOf()===c.valueOf();else return f=c.valueOf(),this.clone().startOf(o).valueOf()<=f&&f<=this.clone().endOf(o).valueOf()}function Fw(s,o){return this.isSame(s,o)||this.isAfter(s,o)}function jw(s,o){return this.isSame(s,o)||this.isBefore(s,o)}function $w(s,o,c){var f,p,w;if(!this.isValid())return NaN;if(f=Ba(s,this),!f.isValid())return NaN;switch(p=(f.utcOffset()-this.utcOffset())*60000,o=Ce(o),o){case"year":w=Ui(this,f)/12;break;case"month":w=Ui(this,f);break;case"quarter":w=Ui(this,f)/3;break;case"second":w=(this-f)/1000;break;case"minute":w=(this-f)/60000;break;case"hour":w=(this-f)/3600000;break;case"day":w=(this-f-p)/86400000;break;case"week":w=(this-f-p)/604800000;break;default:w=this-f}return c?w:We(w)}function Ui(s,o){if(s.date()<o.date())return-Ui(o,s);var c=(o.year()-s.year())*12+(o.month()-s.month()),f=s.clone().add(c,"months"),p,w;if(o-f<0)p=s.clone().add(c-1,"months"),w=(o-f)/(f-p);else p=s.clone().add(c+1,"months"),w=(o-f)/(p-f);return-(c+w)||0}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Yw(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Bw(s){if(!this.isValid())return null;var o=s!==!0,c=o?this.clone().utc():this;if(c.year()<0||c.year()>9999)return mt(c,o?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(Z(Date.prototype.toISOString))if(o)return this.toDate().toISOString();else return new Date(this.valueOf()+this.utcOffset()*60*1000).toISOString().replace("Z",mt(c,"Z"));return mt(c,o?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ww(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var s="moment",o="",c,f,p,w;if(!this.isLocal())s=this.utcOffset()===0?"moment.utc":"moment.parseZone",o="Z";return c="["+s+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",w=o+'[")]',this.format(c+f+p+w)}function Uw(s){if(!s)s=this.isUtc()?t.defaultFormatUtc:t.defaultFormat;var o=mt(this,s);return this.localeData().postformat(o)}function Hw(s,o){if(this.isValid()&&(L(s)&&s.isValid()||le(s).isValid()))return Je({to:this,from:s}).locale(this.locale()).humanize(!o);else return this.localeData().invalidDate()}function Vw(s){return this.from(le(),s)}function Gw(s,o){if(this.isValid()&&(L(s)&&s.isValid()||le(s).isValid()))return Je({from:this,to:s}).locale(this.locale()).humanize(!o);else return this.localeData().invalidDate()}function Kw(s){return this.to(le(),s)}function $c(s){var o;if(s===void 0)return this._locale._abbr;else{if(o=_t(s),o!=null)this._locale=o;return this}}var Yc=N("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(s){if(s===void 0)return this.localeData();else return this.locale(s)});function Bc(){return this._locale}var Hi=1000,Rr=60*Hi,Vi=60*Rr,Wc=3506328*Vi;function Cr(s,o){return(s%o+o)%o}function Uc(s,o,c){if(s<100&&s>=0)return new Date(s+400,o,c)-Wc;else return new Date(s,o,c).valueOf()}function Hc(s,o,c){if(s<100&&s>=0)return Date.UTC(s+400,o,c)-Wc;else return Date.UTC(s,o,c)}function zw(s){var o,c;if(s=Ce(s),s===void 0||s==="millisecond"||!this.isValid())return this;switch(c=this._isUTC?Hc:Uc,s){case"year":o=c(this.year(),0,1);break;case"quarter":o=c(this.year(),this.month()-this.month()%3,1);break;case"month":o=c(this.year(),this.month(),1);break;case"week":o=c(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":o=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":o=c(this.year(),this.month(),this.date());break;case"hour":o=this._d.valueOf(),o-=Cr(o+(this._isUTC?0:this.utcOffset()*Rr),Vi);break;case"minute":o=this._d.valueOf(),o-=Cr(o,Rr);break;case"second":o=this._d.valueOf(),o-=Cr(o,Hi);break}return this._d.setTime(o),t.updateOffset(this,!0),this}function Jw(s){var o,c;if(s=Ce(s),s===void 0||s==="millisecond"||!this.isValid())return this;switch(c=this._isUTC?Hc:Uc,s){case"year":o=c(this.year()+1,0,1)-1;break;case"quarter":o=c(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":o=c(this.year(),this.month()+1,1)-1;break;case"week":o=c(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":o=c(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":o=c(this.year(),this.month(),this.date()+1)-1;break;case"hour":o=this._d.valueOf(),o+=Vi-Cr(o+(this._isUTC?0:this.utcOffset()*Rr),Vi)-1;break;case"minute":o=this._d.valueOf(),o+=Rr-Cr(o,Rr)-1;break;case"second":o=this._d.valueOf(),o+=Hi-Cr(o,Hi)-1;break}return this._d.setTime(o),t.updateOffset(this,!0),this}function Qw(){return this._d.valueOf()-(this._offset||0)*60000}function Zw(){return Math.floor(this.valueOf()/1000)}function Xw(){return new Date(this.valueOf())}function e_(){var s=this;return[s.year(),s.month(),s.date(),s.hour(),s.minute(),s.second(),s.millisecond()]}function t_(){var s=this;return{years:s.year(),months:s.month(),date:s.date(),hours:s.hours(),minutes:s.minutes(),seconds:s.seconds(),milliseconds:s.milliseconds()}}function r_(){return this.isValid()?this.toISOString():null}function n_(){return k(this)}function i_(){return m({},y(this))}function s_(){return y(this).overflow}function a_(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Y("N",0,0,"eraAbbr"),Y("NN",0,0,"eraAbbr"),Y("NNN",0,0,"eraAbbr"),Y("NNNN",0,0,"eraName"),Y("NNNNN",0,0,"eraNarrow"),Y("y",["y",1],"yo","eraYear"),Y("y",["yy",2],0,"eraYear"),Y("y",["yyy",3],0,"eraYear"),Y("y",["yyyy",4],0,"eraYear"),C("N",Ua),C("NN",Ua),C("NNN",Ua),C("NNNN",y_),C("NNNNN",b_),se(["N","NN","NNN","NNNN","NNNNN"],function(s,o,c,f){var p=c._locale.erasParse(s,f,c._strict);if(p)y(c).era=p;else y(c).invalidEra=s}),C("y",Dr),C("yy",Dr),C("yyy",Dr),C("yyyy",Dr),C("yo",w_),se(["y","yy","yyy","yyyy"],Te),se(["yo"],function(s,o,c,f){var p;if(c._locale._eraYearOrdinalRegex)p=s.match(c._locale._eraYearOrdinalRegex);if(c._locale.eraYearOrdinalParse)o[Te]=c._locale.eraYearOrdinalParse(s,p);else o[Te]=parseInt(s,10)});function o_(s,o){var c,f,p,w=this._eras||_t("en")._eras;for(c=0,f=w.length;c<f;++c){switch(typeof w[c].since){case"string":p=t(w[c].since).startOf("day"),w[c].since=p.valueOf();break}switch(typeof w[c].until){case"undefined":w[c].until=1/0;break;case"string":p=t(w[c].until).startOf("day").valueOf(),w[c].until=p.valueOf();break}}return w}function l_(s,o,c){var f,p,w=this.eras(),x,R,U;s=s.toUpperCase();for(f=0,p=w.length;f<p;++f)if(x=w[f].name.toUpperCase(),R=w[f].abbr.toUpperCase(),U=w[f].narrow.toUpperCase(),c)switch(o){case"N":case"NN":case"NNN":if(R===s)return w[f];break;case"NNNN":if(x===s)return w[f];break;case"NNNNN":if(U===s)return w[f];break}else if([x,R,U].indexOf(s)>=0)return w[f]}function u_(s,o){var c=s.since<=s.until?1:-1;if(o===void 0)return t(s.since).year();else return t(s.since).year()+(o-s.offset)*c}function c_(){var s,o,c,f=this.localeData().eras();for(s=0,o=f.length;s<o;++s){if(c=this.clone().startOf("day").valueOf(),f[s].since<=c&&c<=f[s].until)return f[s].name;if(f[s].until<=c&&c<=f[s].since)return f[s].name}return""}function f_(){var s,o,c,f=this.localeData().eras();for(s=0,o=f.length;s<o;++s){if(c=this.clone().startOf("day").valueOf(),f[s].since<=c&&c<=f[s].until)return f[s].narrow;if(f[s].until<=c&&c<=f[s].since)return f[s].narrow}return""}function h_(){var s,o,c,f=this.localeData().eras();for(s=0,o=f.length;s<o;++s){if(c=this.clone().startOf("day").valueOf(),f[s].since<=c&&c<=f[s].until)return f[s].abbr;if(f[s].until<=c&&c<=f[s].since)return f[s].abbr}return""}function d_(){var s,o,c,f,p=this.localeData().eras();for(s=0,o=p.length;s<o;++s)if(c=p[s].since<=p[s].until?1:-1,f=this.clone().startOf("day").valueOf(),p[s].since<=f&&f<=p[s].until||p[s].until<=f&&f<=p[s].since)return(this.year()-t(p[s].since).year())*c+p[s].offset;return this.year()}function p_(s){if(!a(this,"_erasNameRegex"))Ha.call(this);return s?this._erasNameRegex:this._erasRegex}function m_(s){if(!a(this,"_erasAbbrRegex"))Ha.call(this);return s?this._erasAbbrRegex:this._erasRegex}function g_(s){if(!a(this,"_erasNarrowRegex"))Ha.call(this);return s?this._erasNarrowRegex:this._erasRegex}function Ua(s,o){return o.erasAbbrRegex(s)}function y_(s,o){return o.erasNameRegex(s)}function b_(s,o){return o.erasNarrowRegex(s)}function w_(s,o){return o._eraYearOrdinalRegex||Dr}function Ha(){var s=[],o=[],c=[],f=[],p,w,x,R,U,Q=this.eras();for(p=0,w=Q.length;p<w;++p)x=gt(Q[p].name),R=gt(Q[p].abbr),U=gt(Q[p].narrow),o.push(x),s.push(R),c.push(U),f.push(x),f.push(R),f.push(U);this._erasRegex=new RegExp("^("+f.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+c.join("|")+")","i")}Y(0,["gg",2],0,function(){return this.weekYear()%100}),Y(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Gi(s,o){Y(0,[s,s.length],0,o)}Gi("gggg","weekYear"),Gi("ggggg","weekYear"),Gi("GGGG","isoWeekYear"),Gi("GGGGG","isoWeekYear"),C("G",Ri),C("g",Ri),C("GG",oe,Ye),C("gg",oe,Ye),C("GGGG",Ta,Ma),C("gggg",Ta,Ma),C("GGGGG",Pi,Li),C("ggggg",Pi,Li),_n(["gggg","ggggg","GGGG","GGGGG"],function(s,o,c,f){o[f.substr(0,2)]=z(s)}),_n(["gg","GG"],function(s,o,c,f){o[f]=t.parseTwoDigitYear(s)});function __(s){return Vc.call(this,s,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function v_(s){return Vc.call(this,s,this.isoWeek(),this.isoWeekday(),1,4)}function S_(){return wt(this.year(),1,4)}function k_(){return wt(this.isoWeekYear(),1,4)}function x_(){var s=this.localeData()._week;return wt(this.year(),s.dow,s.doy)}function E_(){var s=this.localeData()._week;return wt(this.weekYear(),s.dow,s.doy)}function Vc(s,o,c,f,p){var w;if(s==null)return xn(this,f,p).year;else{if(w=wt(s,f,p),o>w)o=w;return O_.call(this,s,o,c,f,p)}}function O_(s,o,c,f,p){var w=kc(s,o,c,f,p),x=kn(w.year,0,w.dayOfYear);return this.year(x.getUTCFullYear()),this.month(x.getUTCMonth()),this.date(x.getUTCDate()),this}Y("Q",0,"Qo","quarter"),C("Q",hc),se("Q",function(s,o){o[yt]=(z(s)-1)*3});function M_(s){return s==null?Math.ceil((this.month()+1)/3):this.month((s-1)*3+this.month()%3)}Y("D",["DD",2],"Do","date"),C("D",oe,Lr),C("DD",oe,Ye),C("Do",function(s,o){return s?o._dayOfMonthOrdinalParse||o._ordinalParse:o._dayOfMonthOrdinalParseLenient}),se(["D","DD"],it),se("Do",function(s,o){o[it]=z(s.match(oe)[0])});var Gc=qr("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),C("DDD",qi),C("DDDD",dc),se(["DDD","DDDD"],function(s,o,c){c._dayOfYear=z(s)});function T_(s){var o=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/86400000)+1;return s==null?o:this.add(s-o,"d")}Y("m",["mm",2],0,"minute"),C("m",oe,Na),C("mm",oe,Ye),se(["m","mm"],ze);var N_=qr("Minutes",!1);Y("s",["ss",2],0,"second"),C("s",oe,Na),C("ss",oe,Ye),se(["s","ss"],bt);var A_=qr("Seconds",!1);Y("S",0,0,function(){return~~(this.millisecond()/100)}),Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,function(){return this.millisecond()*10}),Y(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Y(0,["SSSSSS",6],0,function(){return this.millisecond()*1000}),Y(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Y(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Y(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),C("S",qi,hc),C("SS",qi,Ye),C("SSS",qi,dc);var Dt,Kc;for(Dt="SSSS";Dt.length<=9;Dt+="S")C(Dt,Dr);function D_(s,o){o[Xt]=z(("0."+s)*1000)}for(Dt="S";Dt.length<=9;Dt+="S")se(Dt,D_);Kc=qr("Milliseconds",!1),Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");function L_(){return this._isUTC?"UTC":""}function q_(){return this._isUTC?"Coordinated Universal Time":""}var D=q.prototype;if(D.add=Ew,D.calendar=Lw,D.clone=qw,D.diff=$w,D.endOf=Jw,D.format=Uw,D.from=Hw,D.fromNow=Vw,D.to=Gw,D.toNow=Kw,D.get=W0,D.invalidAt=s_,D.isAfter=Pw,D.isBefore=Rw,D.isBetween=Cw,D.isSame=Iw,D.isSameOrAfter=Fw,D.isSameOrBefore=jw,D.isValid=n_,D.lang=Yc,D.locale=$c,D.localeData=Bc,D.max=nw,D.min=rw,D.parsingFlags=i_,D.set=U0,D.startOf=zw,D.subtract=Ow,D.toArray=e_,D.toObject=t_,D.toDate=Xw,D.toISOString=Bw,D.inspect=Ww,typeof Symbol<"u"&&Symbol.for!=null)D[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"};D.toJSON=r_,D.toString=Yw,D.unix=Zw,D.valueOf=Qw,D.creationData=a_,D.eraName=c_,D.eraNarrow=f_,D.eraAbbr=h_,D.eraYear=d_,D.year=gc,D.isLeapYear=B0,D.weekYear=__,D.isoWeekYear=v_,D.quarter=D.quarters=M_,D.month=vc,D.daysInMonth=X0,D.week=D.weeks=ob,D.isoWeek=D.isoWeeks=lb,D.weeksInYear=x_,D.weeksInWeekYear=E_,D.isoWeeksInYear=S_,D.isoWeeksInISOWeekYear=k_,D.date=Gc,D.day=D.days=vb,D.weekday=Sb,D.isoWeekday=kb,D.dayOfYear=T_,D.hour=D.hours=Ab,D.minute=D.minutes=N_,D.second=D.seconds=A_,D.millisecond=D.milliseconds=Kc,D.utcOffset=hw,D.utc=pw,D.local=mw,D.parseZone=gw,D.hasAlignedHourOffset=yw,D.isDST=bw,D.isLocal=_w,D.isUtcOffset=vw,D.isUtc=Rc,D.isUTC=Rc,D.zoneAbbr=L_,D.zoneName=q_,D.dates=N("dates accessor is deprecated. Use date instead.",Gc),D.months=N("months accessor is deprecated. Use month instead",vc),D.years=N("years accessor is deprecated. Use year instead",gc),D.zone=N("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",dw),D.isDSTShifted=N("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ww);function P_(s){return le(s*1000)}function R_(){return le.apply(null,arguments).parseZone()}function zc(s){return s}var re=Oe.prototype;re.calendar=j,re.longDateFormat=Ni,re.invalidDate=Ai,re.ordinal=Tr,re.preparse=zc,re.postformat=zc,re.relativeTime=Zt,re.pastFuture=Nt,re.set=H,re.eras=o_,re.erasParse=l_,re.erasConvertYear=u_,re.erasAbbrRegex=m_,re.erasNameRegex=p_,re.erasNarrowRegex=g_,re.months=z0,re.monthsShort=J0,re.monthsParse=Z0,re.monthsRegex=tb,re.monthsShortRegex=eb,re.week=nb,re.firstDayOfYear=ab,re.firstDayOfWeek=sb,re.weekdays=gb,re.weekdaysMin=bb,re.weekdaysShort=yb,re.weekdaysParse=_b,re.weekdaysRegex=xb,re.weekdaysShortRegex=Eb,re.weekdaysMinRegex=Ob,re.isPM=Tb,re.meridiem=Db;function Ki(s,o,c,f){var p=_t(),w=g().set(f,o);return p[c](w,s)}function Jc(s,o,c){if(h(s))o=s,s=void 0;if(s=s||"",o!=null)return Ki(s,o,c,"month");var f,p=[];for(f=0;f<12;f++)p[f]=Ki(s,f,c,"month");return p}function Va(s,o,c,f){if(typeof s==="boolean"){if(h(o))c=o,o=void 0;o=o||""}else{if(o=s,c=o,s=!1,h(o))c=o,o=void 0;o=o||""}var p=_t(),w=s?p._week.dow:0,x,R=[];if(c!=null)return Ki(o,(c+w)%7,f,"day");for(x=0;x<7;x++)R[x]=Ki(o,(x+w)%7,f,"day");return R}function C_(s,o){return Jc(s,o,"months")}function I_(s,o){return Jc(s,o,"monthsShort")}function F_(s,o,c){return Va(s,o,c,"weekdays")}function j_(s,o,c){return Va(s,o,c,"weekdaysShort")}function $_(s,o,c){return Va(s,o,c,"weekdaysMin")}At("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(s){var o=s%10,c=z(s%100/10)===1?"th":o===1?"st":o===2?"nd":o===3?"rd":"th";return s+c}}),t.lang=N("moment.lang is deprecated. Use moment.locale instead.",At),t.langData=N("moment.langData is deprecated. Use moment.localeData instead.",_t);var vt=Math.abs;function Y_(){var s=this._data;return this._milliseconds=vt(this._milliseconds),this._days=vt(this._days),this._months=vt(this._months),s.milliseconds=vt(s.milliseconds),s.seconds=vt(s.seconds),s.minutes=vt(s.minutes),s.hours=vt(s.hours),s.months=vt(s.months),s.years=vt(s.years),this}function Qc(s,o,c,f){var p=Je(o,c);return s._milliseconds+=f*p._milliseconds,s._days+=f*p._days,s._months+=f*p._months,s._bubble()}function B_(s,o){return Qc(this,s,o,1)}function W_(s,o){return Qc(this,s,o,-1)}function Zc(s){if(s<0)return Math.floor(s);else return Math.ceil(s)}function U_(){var s=this._milliseconds,o=this._days,c=this._months,f=this._data,p,w,x,R,U;if(!(s>=0&&o>=0&&c>=0||s<=0&&o<=0&&c<=0))s+=Zc(Ga(c)+o)*86400000,o=0,c=0;return f.milliseconds=s%1000,p=We(s/1000),f.seconds=p%60,w=We(p/60),f.minutes=w%60,x=We(w/60),f.hours=x%24,o+=We(x/24),U=We(Xc(o)),c+=U,o-=Zc(Ga(U)),R=We(c/12),c%=12,f.days=o,f.months=c,f.years=R,this}function Xc(s){return s*4800/146097}function Ga(s){return s*146097/4800}function H_(s){if(!this.isValid())return NaN;var o,c,f=this._milliseconds;if(s=Ce(s),s==="month"||s==="quarter"||s==="year")switch(o=this._days+f/86400000,c=this._months+Xc(o),s){case"month":return c;case"quarter":return c/3;case"year":return c/12}else switch(o=this._days+Math.round(Ga(this._months)),s){case"week":return o/7+f/604800000;case"day":return o+f/86400000;case"hour":return o*24+f/3600000;case"minute":return o*1440+f/60000;case"second":return o*86400+f/1000;case"millisecond":return Math.floor(o*86400000)+f;default:throw Error("Unknown unit "+s)}}function St(s){return function(){return this.as(s)}}var ef=St("ms"),V_=St("s"),G_=St("m"),K_=St("h"),z_=St("d"),J_=St("w"),Q_=St("M"),Z_=St("Q"),X_=St("y"),ev=ef;function tv(){return Je(this)}function rv(s){return s=Ce(s),this.isValid()?this[s+"s"]():NaN}function tr(s){return function(){return this.isValid()?this._data[s]:NaN}}var nv=tr("milliseconds"),iv=tr("seconds"),sv=tr("minutes"),av=tr("hours"),ov=tr("days"),lv=tr("months"),uv=tr("years");function cv(){return We(this.days()/7)}var kt=Math.round,Ir={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function fv(s,o,c,f,p){return p.relativeTime(o||1,!!c,s,f)}function hv(s,o,c,f){var p=Je(s).abs(),w=kt(p.as("s")),x=kt(p.as("m")),R=kt(p.as("h")),U=kt(p.as("d")),Q=kt(p.as("M")),De=kt(p.as("w")),xt=kt(p.as("y")),Lt=w<=c.ss&&["s",w]||w<c.s&&["ss",w]||x<=1&&["m"]||x<c.m&&["mm",x]||R<=1&&["h"]||R<c.h&&["hh",R]||U<=1&&["d"]||U<c.d&&["dd",U];if(c.w!=null)Lt=Lt||De<=1&&["w"]||De<c.w&&["ww",De];return Lt=Lt||Q<=1&&["M"]||Q<c.M&&["MM",Q]||xt<=1&&["y"]||["yy",xt],Lt[2]=o,Lt[3]=+s>0,Lt[4]=f,fv.apply(null,Lt)}function dv(s){if(s===void 0)return kt;if(typeof s==="function")return kt=s,!0;return!1}function pv(s,o){if(Ir[s]===void 0)return!1;if(o===void 0)return Ir[s];if(Ir[s]=o,s==="s")Ir.ss=o-1;return!0}function mv(s,o){if(!this.isValid())return this.localeData().invalidDate();var c=!1,f=Ir,p,w;if(typeof s==="object")o=s,s=!1;if(typeof s==="boolean")c=s;if(typeof o==="object"){if(f=Object.assign({},Ir,o),o.s!=null&&o.ss==null)f.ss=o.s-1}if(p=this.localeData(),w=hv(this,!c,f,p),c)w=p.pastFuture(+this,w);return p.postformat(w)}var Ka=Math.abs;function Fr(s){return(s>0)-(s<0)||+s}function zi(){if(!this.isValid())return this.localeData().invalidDate();var s=Ka(this._milliseconds)/1000,o=Ka(this._days),c=Ka(this._months),f,p,w,x,R=this.asSeconds(),U,Q,De,xt;if(!R)return"P0D";return f=We(s/60),p=We(f/60),s%=60,f%=60,w=We(c/12),c%=12,x=s?s.toFixed(3).replace(/\.?0+$/,""):"",U=R<0?"-":"",Q=Fr(this._months)!==Fr(R)?"-":"",De=Fr(this._days)!==Fr(R)?"-":"",xt=Fr(this._milliseconds)!==Fr(R)?"-":"",U+"P"+(w?Q+w+"Y":"")+(c?Q+c+"M":"")+(o?De+o+"D":"")+(p||f||s?"T":"")+(p?xt+p+"H":"")+(f?xt+f+"M":"")+(s?xt+x+"S":"")}var X=Bi.prototype;X.isValid=lw,X.abs=Y_,X.add=B_,X.subtract=W_,X.as=H_,X.asMilliseconds=ef,X.asSeconds=V_,X.asMinutes=G_,X.asHours=K_,X.asDays=z_,X.asWeeks=J_,X.asMonths=Q_,X.asQuarters=Z_,X.asYears=X_,X.valueOf=ev,X._bubble=U_,X.clone=tv,X.get=rv,X.milliseconds=nv,X.seconds=iv,X.minutes=sv,X.hours=av,X.days=ov,X.weeks=cv,X.months=lv,X.years=uv,X.humanize=mv,X.toISOString=zi,X.toString=zi,X.toJSON=zi,X.locale=$c,X.localeData=Bc,X.toIsoString=N("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",zi),X.lang=Yc,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),C("x",Ri),C("X",C0),se("X",function(s,o,c){c._d=new Date(parseFloat(s)*1000)}),se("x",function(s,o,c){c._d=new Date(z(s))});//! moment.js
|
|
44
|
+
return t.version="2.30.1",r(le),t.fn=D,t.min=iw,t.max=sw,t.now=aw,t.utc=g,t.unix=P_,t.months=C_,t.isDate=d,t.locale=At,t.invalid=O,t.duration=Je,t.isMoment=L,t.weekdays=F_,t.parseZone=R_,t.localeData=_t,t.isDuration=Wi,t.monthsShort=I_,t.weekdaysMin=$_,t.defineLocale=Ra,t.updateLocale=Rb,t.locales=Cb,t.weekdaysShort=j_,t.normalizeUnits=Ce,t.relativeTimeRounding=dv,t.relativeTimeThreshold=pv,t.calendarFormat=Dw,t.prototype=D,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t})});var lg=v(function(DI,og){/*!
|
|
45
45
|
* FileStreamRotator
|
|
46
46
|
* Copyright(c) 2012-2017 Holiday Extras.
|
|
47
47
|
* Copyright(c) 2017 Roger C.
|
|
48
48
|
* MIT Licensed
|
|
49
|
-
*/var de=U("fs"),jt=U("path"),dr=jm(),$m=U("crypto"),WO=U("events"),ut={};Wm.exports=ut;var Bm=["daily","test","m","h","custom"],Um="YYYYMMDDHHmm",HO=function(e,t){if(typeof t=="number"){switch(e){case"m":if(t<0||t>60)return!1;break;case"h":if(t<0||t>24)return!1;break}return{type:e,digit:t}}},VO=function(e){switch(e){case"custom":case"daily":return{type:e,digit:void 0};case"test":return{type:e,digit:0}}return!1};ut.getFrequency=function(e){var t=e.toLowerCase().match(/^(\d+)([mh])$/);if(t)return HO(t[2],parseInt(t[1]));var r=VO(e);if(r)return r;return!1};ut.parseFileSize=function(e){if(e&&typeof e=="string"){var t=e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(t)switch(t[2]){case"k":return t[1]*1024;case"m":return t[1]*1024*1024;case"g":return t[1]*1024*1024*1024}}return null};ut.getDate=function(e,t,r){t=t||Um;let n=r?dr.utc():dr().local();if(e&&Bm.indexOf(e.type)!==-1)switch(e.type){case"m":var s=Math.floor(n.minutes()/e.digit)*e.digit;return n.minutes(s).format(t);case"h":var a=Math.floor(n.hour()/e.digit)*e.digit;return n.hour(a).format(t);case"daily":case"custom":case"test":return n.format(t)}return n.format(t)};ut.setAuditLog=function(e,t,r){var n=null;if(e){var s=e.toString().substr(-1),a=e.toString().match(/^(\d+)/);if(Number(a[1])>0){var l=jt.dirname(r.replace(/%DATE%.+/,"_filename"));try{if(t){var u=jt.resolve(t);n=JSON.parse(de.readFileSync(u,{encoding:"utf-8"}))}else{var u=jt.resolve(l+"/.audit.json");n=JSON.parse(de.readFileSync(u,{encoding:"utf-8"}))}}catch(h){if(h.code!=="ENOENT")return null;n={keep:{days:!1,amount:Number(a[1])},auditLog:t||l+"/.audit.json",files:[]}}n.keep={days:s==="d",amount:Number(a[1])}}}return n};ut.writeAuditLog=function(e,t){try{Il(e.auditLog),de.writeFileSync(e.auditLog,JSON.stringify(e,null,4))}catch(r){if(t)console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",e.auditLog,"Error:",r)}};function Ym(e,t){if(e.hash===$m.createHash(e.hashType).update(e.name+"LOG_FILE"+e.date).digest("hex"))try{if(de.existsSync(e.name))de.unlinkSync(e.name)}catch(r){if(t)console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",e.name)}}function GO(e,t,r){let n=t||"current.log",s=jt.dirname(e),a=jt.basename(e),l=s+"/"+n;try{if(de.lstatSync(l).isSymbolicLink())de.unlinkSync(l),de.symlinkSync(a,l)}catch(u){if(u&&u.code=="ENOENT")try{de.symlinkSync(a,l)}catch(h){if(r)console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",l," -> ",a)}}}function KO(e,t,r){if(!e)return null;try{let n=de.lstatSync(e);return de.watch(e,function(s,a){if(s=="rename")try{let l=de.lstatSync(e)}catch(l){r(l,e)}})}catch(n){if(t)console.log(new Date,"[FileStreamRotator] Could not add watcher for "+e)}}ut.addLogToAudit=function(e,t,r,n){if(t&&t.files){var s=t.files.findIndex(function(d){return d.name===e});if(s!==-1)return t;var a=Date.now();if(t.files.push({date:a,name:e,hash:$m.createHash(t.hashType).update(e+"LOG_FILE"+a).digest("hex")}),t.keep.days){var l=dr().subtract(t.keep.amount,"days").valueOf(),u=t.files.filter(function(d){if(d.date>l)return!0;return d.hashType=t.hashType,Ym(d,n),r.emit("logRemoved",d),!1});t.files=u}else{var h=t.files.splice(-t.keep.amount);if(t.files.length>0)t.files.filter(function(d){return d.hashType=t.hashType,Ym(d,n),r.emit("logRemoved",d),!1});t.files=h}ut.writeAuditLog(t,n)}return t};ut.getStream=function(e){var t=null,r=null,n=this;if(!e.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;if(e.frequency)t=n.getFrequency(e.frequency);let s=n.setAuditLog(e.max_logs,e.audit_file,e.filename);if(s!=null)s.hashType=e.audit_hash_type!==void 0?e.audit_hash_type:"md5";n.verbose=e.verbose!==void 0?e.verbose:!0;var a=null,l=0,u=0;if(e.size)a=ut.parseFileSize(e.size);var h=e.date_format||Um;if(t&&t.type=="daily"){if(!e.date_format)h="YYYY-MM-DD";if(dr().format(h)!=dr().endOf("day").format(h)||dr().format(h)==dr().add(1,"day").format(h)){if(n.verbose)console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day");t.type="custom"}}if(t)r=e.frequency?n.getDate(t,h,e.utc):"";e.create_symlink=e.create_symlink||!1,e.extension=e.extension||"";var d=e.filename,b=null,m=d+(r?"."+r:"");if(d.match(/%DATE%/))m=d.replace(/%DATE%/g,r?r:n.getDate(null,h,e.utc));if(a){var g=null,S=m,y=null;if(s&&s.files&&s.files instanceof Array&&s.files.length>0){var _=s.files[s.files.length-1].name;if(_.match(S)){var E=_.match(S+"\\.(\\d+)");if(E)S=_,l=E[1]}}if(l==0&&S==m)S+=e.extension;while(y=de.existsSync(S))g=S,l++,S=m+"."+l+e.extension;if(g){var O=de.statSync(g);if(O.size<a)S=g,l--,u=O.size}m=S}else m+=e.extension;if(n.verbose)console.log(new Date,"[FileStreamRotator] Logging to: ",m);Il(m);var A=e.file_options||{flags:"a"},k=de.createWriteStream(m,A);if(r&&t&&Bm.indexOf(t.type)>-1||a>0){if(n.verbose)console.log(new Date,"[FileStreamRotator] Rotating file: ",t?t.type:"",a?"size: "+a:"");var T=new WO;T.auditLog=s,T.end=function(){k.end.apply(k,arguments)},Pl(k,T),T.on("close",function(){if(q)q.close()}),T.on("new",function(L){if(T.auditLog=n.addLogToAudit(L,T.auditLog,T,n.verbose),e.create_symlink)GO(L,e.symlink_name,n.verbose);if(e.watch_log)T.emit("addWatcher",L)});var q;return T.on("addWatcher",function(L){if(q)q.close();if(!e.watch_log)return;q=KO(L,n.verbose,function(F,N){T.emit("createLog",N)})}),T.on("createLog",function(L){try{let F=de.lstatSync(L)}catch(F){if(k&&k.end=="function")k.end();k=de.createWriteStream(L,A),T.emit("new",L),Pl(k,T)}}),T.write=function(L,F){var N=t?this.getDate(t,h,e.utc):r;if(N!=r||a&&u>a){var I=d+(r&&t?"."+N:"");if(d.match(/%DATE%/)&&r)I=d.replace(/%DATE%/g,N);if(a&&u>a)l++,I+="."+l+e.extension;else l=0,I+=e.extension;if(u=0,n.verbose)console.log(new Date,U("util").format("[FileStreamRotator] Changing logs from %s to %s",m,I));if(r=N,b=m,m=I,e.end_stream===!0)k.end();else k.destroy();Il(m),k=de.createWriteStream(I,A),T.emit("new",I),T.emit("rotate",b,I),Pl(k,T)}k.write(L,F),u+=Buffer.byteLength(L,F)}.bind(this),process.nextTick(function(){T.emit("new",m)}),T.emit("new",m),T}else{if(n.verbose)console.log(new Date,"[FileStreamRotator] File won't be rotated: ",e.frequency,e.size);return process.nextTick(function(){k.emit("new",m)}),k}};var Il=function(e){var t=jt.dirname(e);t.split(jt.sep).reduce(function(r,n){if(r+=n+jt.sep,!de.existsSync(r))try{de.mkdirSync(r)}catch(s){if(s.code!=="EEXIST")throw s}return r},"")},Pl=function(t,r){t.on("close",function(){r.emit("close")}),t.on("finish",function(){r.emit("finish")}),t.on("error",function(n){r.emit("error",n)}),t.on("open",function(n){r.emit("open",n)})}});var Jm=v(function(wI,zm){var xt=U("fs"),zO=U("os"),Zr=U("path"),JO=U("util"),Vm=U("zlib"),QO=Fm(),ZO=fe().MESSAGE,Gm=U("stream").PassThrough,Km=lr(),XO={json:!1,colorize:!1,eol:zO.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>new Date().toISOString()},Xr=function(e){e=e||{},Km.call(this,e);function t(a){Array.prototype.slice.call(arguments,1).forEach((l)=>{if(e[l])throw Error("Cannot set "+l+" and "+a+" together")})}function r(a){if(a&&typeof a==="string"){if(a.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return a}else if(a&&Number.isInteger(a)){let l=Math.round(a/1024);return l===0?"1k":l+"k"}return null}function n(a){return!/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(a)}function s(a){return!/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(a)}if(this.options=Object.assign({},XO,e),e.stream)t("stream","filename","maxsize"),this.logStream=new Gm,this.logStream.pipe(e.stream);else{if(this.filename=e.filename?Zr.basename(e.filename):"winston.log",this.dirname=e.dirname||Zr.dirname(e.filename),!n(this.filename)||!s(this.dirname))throw Error("Your path or filename contain an invalid character.");if(this.logStream=Hm().getStream({filename:Zr.join(this.dirname,this.filename),frequency:e.frequency?e.frequency:"custom",date_format:e.datePattern?e.datePattern:"YYYY-MM-DD",verbose:!1,size:r(e.maxSize),max_logs:e.maxFiles,end_stream:!0,audit_file:e.auditFile?e.auditFile:Zr.join(this.dirname,"."+QO(e)+"-audit.json"),file_options:e.options?e.options:{flags:"a"},utc:e.utc?e.utc:!1,extension:e.extension?e.extension:"",create_symlink:e.createSymlink?e.createSymlink:!1,symlink_name:e.symlinkName?e.symlinkName:"current.log",watch_log:e.watchLog?e.watchLog:!1,audit_hash_type:e.auditHashType?e.auditHashType:"sha256"}),this.logStream.on("new",(a)=>{this.emit("new",a)}),this.logStream.on("rotate",(a,l)=>{this.emit("rotate",a,l)}),this.logStream.on("logRemoved",(a)=>{if(e.zippedArchive){let l=a.name+".gz";try{xt.unlinkSync(l)}catch(u){if(u.code!=="ENOENT"){u.message=`Error occurred while removing ${l}: ${u.message}`,this.emit("error",u);return}}this.emit("logRemoved",l);return}this.emit("logRemoved",a.name)}),e.zippedArchive)this.logStream.on("rotate",(a)=>{try{if(!xt.existsSync(a))return}catch(d){d.message=`Error occurred while checking existence of ${a}: ${d.message}`,this.emit("error",d);return}try{if(xt.existsSync(`${a}.gz`))return}catch(d){d.message=`Error occurred while checking existence of ${a}.gz: ${d.message}`,this.emit("error",d);return}let l=Vm.createGzip(),u=xt.createReadStream(a);u.on("error",(d)=>{d.message=`Error occurred while reading ${a}: ${d.message}`,this.emit("error",d)});let h=xt.createWriteStream(a+".gz");h.on("error",(d)=>{d.message=`Error occurred while writing ${a}.gz: ${d.message}`,this.emit("error",d)}),u.pipe(l).pipe(h).on("finish",()=>{try{xt.unlinkSync(a)}catch(d){if(d.code!=="ENOENT"){d.message=`Error occurred while removing ${a}: ${d.message}`,this.emit("error",d);return}}this.emit("archive",a+".gz")})});if(e.watchLog)this.logStream.on("addWatcher",(a)=>{this.emit("addWatcher",a)})}};zm.exports=Xr;JO.inherits(Xr,Km);Xr.prototype.name="dailyRotateFile";var eM=function(){};Xr.prototype.log=function(e,t){t=t||eM,this.logStream.write(e[ZO]+this.options.eol),this.emit("logged",e),t(null,!0)};Xr.prototype.close=function(){if(this.logStream)this.logStream.end(()=>{this.emit("finish")})};Xr.prototype.query=function(e,t){if(typeof e==="function")t=e,e={};if(!this.options.json)throw Error("query() may not be used without the json option being set to true");if(!this.filename)throw Error("query() may not be used when initializing with a stream");let r=[];if(e=e||{},e.rows=e.rows||e.limit||10,e.start=e.start||0,e.until=e.until||new Date,typeof e.until!=="object")e.until=new Date(e.until);if(e.from=e.from||e.until-86400000,typeof e.from!=="object")e.from=new Date(e.from);e.order=e.order||"desc";let n=(()=>{let a=new RegExp(this.filename.replace("%DATE%",".*"),"i");return xt.readdirSync(this.dirname).filter((l)=>Zr.basename(l).match(a))})();if(n.length===0&&t)t(null,r);let s=(a)=>{if(!a)return;let l=Zr.join(this.dirname,a),u="",h;if(a.endsWith(".gz")){h=new Gm;let b=xt.createReadStream(l);b.on("error",(m)=>{m.message=`Error occurred while reading ${l}: ${m.message}`,h.emit("error",m)}),b.pipe(Vm.createGunzip()).pipe(h)}else h=xt.createReadStream(l,{encoding:"utf8"});h.on("error",(b)=>{if(h.readable)h.destroy();if(!t)return;return b.code==="ENOENT"?t(null,r):t(b)}),h.on("data",(b)=>{b=(u+b).split(/\n+/);let m=b.length-1;for(let g=0;g<m;g++)d(b[g]);u=b[m]}),h.on("end",()=>{if(u)d(u,!0);if(n.length)s(n.shift());else if(t){if(r.sort((g,S)=>{let y=new Date(g.timestamp).getTime(),_=new Date(S.timestamp).getTime();return y>_?1:y<_?-1:0}),e.order==="desc")r=r.reverse();let b=e.start||0,m=e.limit||r.length;if(r=r.slice(b,b+m),e.fields)r=r.map((g)=>{let S={};return e.fields.forEach((y)=>{S[y]=g[y]}),S});t(null,r)}});function d(b,m){try{let g=JSON.parse(b);if(!g||typeof g!=="object")return;let S=new Date(g.timestamp);if(e.from&&S<e.from||e.until&&S>e.until||e.level&&e.level!==g.level)return;r.push(g)}catch(g){if(!m)h.emit("error",g)}}};s(n.shift())}});var Xm=v(function(_I,Zm){var tM=Ll(),Qm=Jm();tM.transports.DailyRotateFile=Qm;Zm.exports=Qm});var X=v(function(gM){var jl=Symbol.for("yaml.alias"),ng=Symbol.for("yaml.document"),Si=Symbol.for("yaml.map"),sg=Symbol.for("yaml.pair"),Yl=Symbol.for("yaml.scalar"),Ei=Symbol.for("yaml.seq"),kt=Symbol.for("yaml.node.type"),uM=(e)=>!!e&&typeof e==="object"&&e[kt]===jl,cM=(e)=>!!e&&typeof e==="object"&&e[kt]===ng,fM=(e)=>!!e&&typeof e==="object"&&e[kt]===Si,hM=(e)=>!!e&&typeof e==="object"&&e[kt]===sg,ig=(e)=>!!e&&typeof e==="object"&&e[kt]===Yl,dM=(e)=>!!e&&typeof e==="object"&&e[kt]===Ei;function ag(e){if(e&&typeof e==="object")switch(e[kt]){case Si:case Ei:return!0}return!1}function pM(e){if(e&&typeof e==="object")switch(e[kt]){case jl:case Si:case Yl:case Ei:return!0}return!1}var mM=(e)=>(ig(e)||ag(e))&&!!e.anchor;gM.ALIAS=jl;gM.DOC=ng;gM.MAP=Si;gM.NODE_TYPE=kt;gM.PAIR=sg;gM.SCALAR=Yl;gM.SEQ=Ei;gM.hasAnchor=mM;gM.isAlias=uM;gM.isCollection=ag;gM.isDocument=cM;gM.isMap=fM;gM.isNode=pM;gM.isPair=hM;gM.isScalar=ig;gM.isSeq=dM});var Zn=v(function(qM){var we=X(),Pe=Symbol("break visit"),og=Symbol("skip children"),ct=Symbol("remove node");function xi(e,t){let r=lg(t);if(we.isDocument(e)){if(tn(null,e.contents,r,Object.freeze([e]))===ct)e.contents=null}else tn(null,e,r,Object.freeze([]))}xi.BREAK=Pe;xi.SKIP=og;xi.REMOVE=ct;function tn(e,t,r,n){let s=ug(e,t,r,n);if(we.isNode(s)||we.isPair(s))return cg(e,n,s),tn(e,s,r,n);if(typeof s!=="symbol"){if(we.isCollection(t)){n=Object.freeze(n.concat(t));for(let a=0;a<t.items.length;++a){let l=tn(a,t.items[a],r,n);if(typeof l==="number")a=l-1;else if(l===Pe)return Pe;else if(l===ct)t.items.splice(a,1),a-=1}}else if(we.isPair(t)){n=Object.freeze(n.concat(t));let a=tn("key",t.key,r,n);if(a===Pe)return Pe;else if(a===ct)t.key=null;let l=tn("value",t.value,r,n);if(l===Pe)return Pe;else if(l===ct)t.value=null}}return s}async function ki(e,t){let r=lg(t);if(we.isDocument(e)){if(await rn(null,e.contents,r,Object.freeze([e]))===ct)e.contents=null}else await rn(null,e,r,Object.freeze([]))}ki.BREAK=Pe;ki.SKIP=og;ki.REMOVE=ct;async function rn(e,t,r,n){let s=await ug(e,t,r,n);if(we.isNode(s)||we.isPair(s))return cg(e,n,s),rn(e,s,r,n);if(typeof s!=="symbol"){if(we.isCollection(t)){n=Object.freeze(n.concat(t));for(let a=0;a<t.items.length;++a){let l=await rn(a,t.items[a],r,n);if(typeof l==="number")a=l-1;else if(l===Pe)return Pe;else if(l===ct)t.items.splice(a,1),a-=1}}else if(we.isPair(t)){n=Object.freeze(n.concat(t));let a=await rn("key",t.key,r,n);if(a===Pe)return Pe;else if(a===ct)t.key=null;let l=await rn("value",t.value,r,n);if(l===Pe)return Pe;else if(l===ct)t.value=null}}return s}function lg(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value))return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e);return e}function ug(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(we.isMap(t))return r.Map?.(e,t,n);if(we.isSeq(t))return r.Seq?.(e,t,n);if(we.isPair(t))return r.Pair?.(e,t,n);if(we.isScalar(t))return r.Scalar?.(e,t,n);if(we.isAlias(t))return r.Alias?.(e,t,n);return}function cg(e,t,r){let n=t[t.length-1];if(we.isCollection(n))n.items[e]=r;else if(we.isPair(n))if(e==="key")n.key=r;else n.value=r;else if(we.isDocument(n))n.contents=r;else{let s=we.isAlias(n)?"alias":"scalar";throw Error(`Cannot replace node with ${s} parent`)}}qM.visit=xi;qM.visitAsync=ki});var $l=v(function(jM){var fg=X(),PM=Zn(),IM={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},FM=(e)=>e.replace(/[!,[\]{}]/g,(t)=>IM[t]);class We{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},We.defaultYaml,e),this.tags=Object.assign({},We.defaultTags,t)}clone(){let e=new We(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new We(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:We.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},We.defaultTags);break}return e}add(e,t){if(this.atNextDocument)this.yaml={explicit:We.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},We.defaultTags),this.atNextDocument=!1;let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2){if(t(0,"%TAG directive should contain exactly two parts"),r.length<2)return!1}let[s,a]=r;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;else{let a=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,a),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let a=e.slice(2,-1);if(a==="!"||a==="!!")return t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null;if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return a}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);if(!n)t(`The ${e} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(n)}catch(a){return t(String(a)),null}if(r==="!")return e;return t(`Could not resolve tag: ${e}`),null}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+FM(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),n;if(e&&r.length>0&&fg.isNode(e.contents)){let s={};PM.visit(e.contents,(a,l)=>{if(fg.isNode(l)&&l.tag)s[l.tag]=!0}),n=Object.keys(s)}else n=[];for(let[s,a]of r){if(s==="!!"&&a==="tag:yaml.org,2002:")continue;if(!e||n.some((l)=>l.startsWith(a)))t.push(`%TAG ${s} ${a}`)}return t.join(`
|
|
50
|
-
`)}}
|
|
51
|
-
`)?
|
|
49
|
+
*/var ge=W("fs"),Bt=W("path"),gr=rg(),ig=W("crypto"),ZO=W("events"),ht={};og.exports=ht;var sg=["daily","test","m","h","custom"],ag="YYYYMMDDHHmm",XO=function(e,t){if(typeof t=="number"){switch(e){case"m":if(t<0||t>60)return!1;break;case"h":if(t<0||t>24)return!1;break}return{type:e,digit:t}}},eM=function(e){switch(e){case"custom":case"daily":return{type:e,digit:void 0};case"test":return{type:e,digit:0}}return!1};ht.getFrequency=function(e){var t=e.toLowerCase().match(/^(\d+)([mh])$/);if(t)return XO(t[2],parseInt(t[1]));var r=eM(e);if(r)return r;return!1};ht.parseFileSize=function(e){if(e&&typeof e=="string"){var t=e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(t)switch(t[2]){case"k":return t[1]*1024;case"m":return t[1]*1024*1024;case"g":return t[1]*1024*1024*1024}}return null};ht.getDate=function(e,t,r){t=t||ag;let n=r?gr.utc():gr().local();if(e&&sg.indexOf(e.type)!==-1)switch(e.type){case"m":var i=Math.floor(n.minutes()/e.digit)*e.digit;return n.minutes(i).format(t);case"h":var a=Math.floor(n.hour()/e.digit)*e.digit;return n.hour(a).format(t);case"daily":case"custom":case"test":return n.format(t)}return n.format(t)};ht.setAuditLog=function(e,t,r){var n=null;if(e){var i=e.toString().substr(-1),a=e.toString().match(/^(\d+)/);if(Number(a[1])>0){var l=Bt.dirname(r.replace(/%DATE%.+/,"_filename"));try{if(t){var u=Bt.resolve(t);n=JSON.parse(ge.readFileSync(u,{encoding:"utf-8"}))}else{var u=Bt.resolve(l+"/.audit.json");n=JSON.parse(ge.readFileSync(u,{encoding:"utf-8"}))}}catch(h){if(h.code!=="ENOENT")return null;n={keep:{days:!1,amount:Number(a[1])},auditLog:t||l+"/.audit.json",files:[]}}n.keep={days:i==="d",amount:Number(a[1])}}}return n};ht.writeAuditLog=function(e,t){try{zl(e.auditLog),ge.writeFileSync(e.auditLog,JSON.stringify(e,null,4))}catch(r){if(t)console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",e.auditLog,"Error:",r)}};function ng(e,t){if(e.hash===ig.createHash(e.hashType).update(e.name+"LOG_FILE"+e.date).digest("hex"))try{if(ge.existsSync(e.name))ge.unlinkSync(e.name)}catch(r){if(t)console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",e.name)}}function tM(e,t,r){let n=t||"current.log",i=Bt.dirname(e),a=Bt.basename(e),l=i+"/"+n;try{if(ge.lstatSync(l).isSymbolicLink())ge.unlinkSync(l),ge.symlinkSync(a,l)}catch(u){if(u&&u.code=="ENOENT")try{ge.symlinkSync(a,l)}catch(h){if(r)console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",l," -> ",a)}}}function rM(e,t,r){if(!e)return null;try{let n=ge.lstatSync(e);return ge.watch(e,function(i,a){if(i=="rename")try{let l=ge.lstatSync(e)}catch(l){r(l,e)}})}catch(n){if(t)console.log(new Date,"[FileStreamRotator] Could not add watcher for "+e)}}ht.addLogToAudit=function(e,t,r,n){if(t&&t.files){var i=t.files.findIndex(function(d){return d.name===e});if(i!==-1)return t;var a=Date.now();if(t.files.push({date:a,name:e,hash:ig.createHash(t.hashType).update(e+"LOG_FILE"+a).digest("hex")}),t.keep.days){var l=gr().subtract(t.keep.amount,"days").valueOf(),u=t.files.filter(function(d){if(d.date>l)return!0;return d.hashType=t.hashType,ng(d,n),r.emit("logRemoved",d),!1});t.files=u}else{var h=t.files.splice(-t.keep.amount);if(t.files.length>0)t.files.filter(function(d){return d.hashType=t.hashType,ng(d,n),r.emit("logRemoved",d),!1});t.files=h}ht.writeAuditLog(t,n)}return t};ht.getStream=function(e){var t=null,r=null,n=this;if(!e.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;if(e.frequency)t=n.getFrequency(e.frequency);let i=n.setAuditLog(e.max_logs,e.audit_file,e.filename);if(i!=null)i.hashType=e.audit_hash_type!==void 0?e.audit_hash_type:"md5";n.verbose=e.verbose!==void 0?e.verbose:!0;var a=null,l=0,u=0;if(e.size)a=ht.parseFileSize(e.size);var h=e.date_format||ag;if(t&&t.type=="daily"){if(!e.date_format)h="YYYY-MM-DD";if(gr().format(h)!=gr().endOf("day").format(h)||gr().format(h)==gr().add(1,"day").format(h)){if(n.verbose)console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day");t.type="custom"}}if(t)r=e.frequency?n.getDate(t,h,e.utc):"";e.create_symlink=e.create_symlink||!1,e.extension=e.extension||"";var d=e.filename,b=null,m=d+(r?"."+r:"");if(d.match(/%DATE%/))m=d.replace(/%DATE%/g,r?r:n.getDate(null,h,e.utc));if(a){var g=null,S=m,y=null;if(i&&i.files&&i.files instanceof Array&&i.files.length>0){var _=i.files[i.files.length-1].name;if(_.match(S)){var k=_.match(S+"\\.(\\d+)");if(k)S=_,l=k[1]}}if(l==0&&S==m)S+=e.extension;while(y=ge.existsSync(S))g=S,l++,S=m+"."+l+e.extension;if(g){var O=ge.statSync(g);if(O.size<a)S=g,l--,u=O.size}m=S}else m+=e.extension;if(n.verbose)console.log(new Date,"[FileStreamRotator] Logging to: ",m);zl(m);var A=e.file_options||{flags:"a"},E=ge.createWriteStream(m,A);if(r&&t&&sg.indexOf(t.type)>-1||a>0){if(n.verbose)console.log(new Date,"[FileStreamRotator] Rotating file: ",t?t.type:"",a?"size: "+a:"");var T=new ZO;T.auditLog=i,T.end=function(){E.end.apply(E,arguments)},Kl(E,T),T.on("close",function(){if(q)q.close()}),T.on("new",function(L){if(T.auditLog=n.addLogToAudit(L,T.auditLog,T,n.verbose),e.create_symlink)tM(L,e.symlink_name,n.verbose);if(e.watch_log)T.emit("addWatcher",L)});var q;return T.on("addWatcher",function(L){if(q)q.close();if(!e.watch_log)return;q=rM(L,n.verbose,function(F,N){T.emit("createLog",N)})}),T.on("createLog",function(L){try{let F=ge.lstatSync(L)}catch(F){if(E&&E.end=="function")E.end();E=ge.createWriteStream(L,A),T.emit("new",L),Kl(E,T)}}),T.write=function(L,F){var N=t?this.getDate(t,h,e.utc):r;if(N!=r||a&&u>a){var I=d+(r&&t?"."+N:"");if(d.match(/%DATE%/)&&r)I=d.replace(/%DATE%/g,N);if(a&&u>a)l++,I+="."+l+e.extension;else l=0,I+=e.extension;if(u=0,n.verbose)console.log(new Date,W("util").format("[FileStreamRotator] Changing logs from %s to %s",m,I));if(r=N,b=m,m=I,e.end_stream===!0)E.end();else E.destroy();zl(m),E=ge.createWriteStream(I,A),T.emit("new",I),T.emit("rotate",b,I),Kl(E,T)}E.write(L,F),u+=Buffer.byteLength(L,F)}.bind(this),process.nextTick(function(){T.emit("new",m)}),T.emit("new",m),T}else{if(n.verbose)console.log(new Date,"[FileStreamRotator] File won't be rotated: ",e.frequency,e.size);return process.nextTick(function(){E.emit("new",m)}),E}};var zl=function(e){var t=Bt.dirname(e);t.split(Bt.sep).reduce(function(r,n){if(r+=n+Bt.sep,!ge.existsSync(r))try{ge.mkdirSync(r)}catch(i){if(i.code!=="EEXIST")throw i}return r},"")},Kl=function(t,r){t.on("close",function(){r.emit("close")}),t.on("finish",function(){r.emit("finish")}),t.on("error",function(n){r.emit("error",n)}),t.on("open",function(n){r.emit("open",n)})}});var dg=v(function(LI,hg){var Ee=W("fs"),ug=W("os"),Ve=W("path"),cg=W("util"),Ls=W("zlib"),nM=tg(),iM=pe().MESSAGE,fg=W("stream").PassThrough,Jl=fr(),sM={json:!1,colorize:!1,eol:ug.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>new Date().toISOString()},an=function(e){e=e||{},Jl.call(this,e);function t(a){Array.prototype.slice.call(arguments,1).forEach((l)=>{if(e[l])throw Error("Cannot set "+l+" and "+a+" together")})}function r(a){if(a&&typeof a==="string"){if(a.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return a}else if(a&&Number.isInteger(a)){let l=Math.round(a/1024);return l===0?"1k":l+"k"}return null}function n(a){return!/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(a)}function i(a){return!/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(a)}if(this.options=Object.assign({},sM,e),e.stream)t("stream","filename","maxsize"),this.logStream=new fg,this.logStream.pipe(e.stream);else{if(this.filename=e.filename?Ve.basename(e.filename):"winston.log",this.dirname=e.dirname||Ve.dirname(e.filename),!n(this.filename)||!i(this.dirname))throw Error("Your path or filename contain an invalid character.");if(this.logStream=lg().getStream({filename:Ve.join(this.dirname,this.filename),frequency:e.frequency?e.frequency:"custom",date_format:e.datePattern?e.datePattern:"YYYY-MM-DD",verbose:!1,size:r(e.maxSize),max_logs:e.maxFiles,end_stream:!0,audit_file:e.auditFile?e.auditFile:Ve.join(this.dirname,"."+nM(e)+"-audit.json"),file_options:e.options?e.options:{flags:"a"},utc:e.utc?e.utc:!1,extension:e.extension?e.extension:"",create_symlink:e.createSymlink?e.createSymlink:!1,symlink_name:e.symlinkName?e.symlinkName:"current.log",watch_log:e.watchLog?e.watchLog:!1,audit_hash_type:e.auditHashType?e.auditHashType:"sha256"}),this.logStream.on("new",(a)=>{this.emit("new",a)}),this.logStream.on("rotate",(a,l)=>{this.emit("rotate",a,l)}),this.logStream.on("logRemoved",(a)=>{if(e.zippedArchive){let l=a.name+".gz";try{Ee.unlinkSync(l)}catch(u){if(u.code!=="ENOENT"){u.message=`Error occurred while removing ${l}: ${u.message}`,this.emit("error",u);return}}this.emit("logRemoved",l);return}this.emit("logRemoved",a.name)}),e.zippedArchive)this.logStream.on("rotate",(a)=>{try{if(!Ee.existsSync(a))return}catch(d){d.message=`Error occurred while checking existence of ${a}: ${d.message}`,this.emit("error",d);return}try{if(Ee.existsSync(`${a}.gz`))return}catch(d){d.message=`Error occurred while checking existence of ${a}.gz: ${d.message}`,this.emit("error",d);return}let l=Ls.createGzip(),u=Ee.createReadStream(a);u.on("error",(d)=>{d.message=`Error occurred while reading ${a}: ${d.message}`,this.emit("error",d)});let h=Ee.createWriteStream(a+".gz");h.on("error",(d)=>{d.message=`Error occurred while writing ${a}.gz: ${d.message}`,this.emit("error",d)}),u.pipe(l).pipe(h).on("finish",()=>{try{Ee.unlinkSync(a)}catch(d){if(d.code!=="ENOENT"){d.message=`Error occurred while removing ${a}: ${d.message}`,this.emit("error",d);return}}this.emit("archive",a+".gz")})});if(e.watchLog)this.logStream.on("addWatcher",(a)=>{this.emit("addWatcher",a)})}};hg.exports=an;cg.inherits(an,Jl);an.prototype.name="dailyRotateFile";var aM=function(){};an.prototype.log=function(e,t){t=t||aM,this.logStream.write(e[iM]+this.options.eol),this.emit("logged",e),t(null,!0)};an.prototype.close=function(){if(this.logStream)this.logStream.end(()=>{this.emit("finish")})};an.prototype.query=function(e,t){if(typeof e==="function")t=e,e={};if(!this.options.json)throw Error("query() may not be used without the json option being set to true");if(!this.filename)throw Error("query() may not be used when initializing with a stream");let r=[];if(e=e||{},e.rows=e.rows||e.limit||10,e.start=e.start||0,e.until=e.until||new Date,typeof e.until!=="object")e.until=new Date(e.until);if(e.from=e.from||e.until-86400000,typeof e.from!=="object")e.from=new Date(e.from);e.order=e.order||"desc";let n=(()=>{let a=new RegExp(this.filename.replace("%DATE%",".*"),"i");return Ee.readdirSync(this.dirname).filter((l)=>Ve.basename(l).match(a))})();if(n.length===0&&t)t(null,r);let i=(a)=>{if(!a)return;let l=Ve.join(this.dirname,a),u="",h;if(a.endsWith(".gz")){h=new fg;let b=Ee.createReadStream(l);b.on("error",(m)=>{m.message=`Error occurred while reading ${l}: ${m.message}`,h.emit("error",m)}),b.pipe(Ls.createGunzip()).pipe(h)}else h=Ee.createReadStream(l,{encoding:"utf8"});h.on("error",(b)=>{if(h.readable)h.destroy();if(!t)return;return b.code==="ENOENT"?t(null,r):t(b)}),h.on("data",(b)=>{b=(u+b).split(/\n+/);let m=b.length-1;for(let g=0;g<m;g++)d(b[g]);u=b[m]}),h.on("end",()=>{if(u)d(u,!0);if(n.length)i(n.shift());else if(t){if(r.sort((g,S)=>{let y=new Date(g.timestamp).getTime(),_=new Date(S.timestamp).getTime();return y>_?1:y<_?-1:0}),e.order==="desc")r=r.reverse();let b=e.start||0,m=e.limit||r.length;if(r=r.slice(b,b+m),e.fields)r=r.map((g)=>{let S={};return e.fields.forEach((y)=>{S[y]=g[y]}),S});t(null,r)}});function d(b,m){try{let g=JSON.parse(b);if(!g||typeof g!=="object")return;let S=new Date(g.timestamp);if(e.from&&S<e.from||e.until&&S>e.until||e.level&&e.level!==g.level)return;r.push(g)}catch(g){if(!m)h.emit("error",g)}}};i(n.shift())}});var yg=v(function(qI,gg){var pg=Ul(),mg=dg();pg.transports.DailyRotateFile=mg;gg.exports=mg});var ee=v(function(vM){var Zl=Symbol.for("yaml.alias"),vg=Symbol.for("yaml.document"),qs=Symbol.for("yaml.map"),Sg=Symbol.for("yaml.pair"),Xl=Symbol.for("yaml.scalar"),Ps=Symbol.for("yaml.seq"),Mt=Symbol.for("yaml.node.type"),pM=(e)=>!!e&&typeof e==="object"&&e[Mt]===Zl,mM=(e)=>!!e&&typeof e==="object"&&e[Mt]===vg,gM=(e)=>!!e&&typeof e==="object"&&e[Mt]===qs,yM=(e)=>!!e&&typeof e==="object"&&e[Mt]===Sg,kg=(e)=>!!e&&typeof e==="object"&&e[Mt]===Xl,bM=(e)=>!!e&&typeof e==="object"&&e[Mt]===Ps;function xg(e){if(e&&typeof e==="object")switch(e[Mt]){case qs:case Ps:return!0}return!1}function wM(e){if(e&&typeof e==="object")switch(e[Mt]){case Zl:case qs:case Xl:case Ps:return!0}return!1}var _M=(e)=>(kg(e)||xg(e))&&!!e.anchor;vM.ALIAS=Zl;vM.DOC=vg;vM.MAP=qs;vM.NODE_TYPE=Mt;vM.PAIR=Sg;vM.SCALAR=Xl;vM.SEQ=Ps;vM.hasAnchor=_M;vM.isAlias=pM;vM.isCollection=xg;vM.isDocument=mM;vM.isMap=gM;vM.isNode=wM;vM.isPair=yM;vM.isScalar=kg;vM.isSeq=bM});var ii=v(function(FM){var Se=ee(),Fe=Symbol("break visit"),Eg=Symbol("skip children"),dt=Symbol("remove node");function Rs(e,t){let r=Og(t);if(Se.isDocument(e)){if(ln(null,e.contents,r,Object.freeze([e]))===dt)e.contents=null}else ln(null,e,r,Object.freeze([]))}Rs.BREAK=Fe;Rs.SKIP=Eg;Rs.REMOVE=dt;function ln(e,t,r,n){let i=Mg(e,t,r,n);if(Se.isNode(i)||Se.isPair(i))return Tg(e,n,i),ln(e,i,r,n);if(typeof i!=="symbol"){if(Se.isCollection(t)){n=Object.freeze(n.concat(t));for(let a=0;a<t.items.length;++a){let l=ln(a,t.items[a],r,n);if(typeof l==="number")a=l-1;else if(l===Fe)return Fe;else if(l===dt)t.items.splice(a,1),a-=1}}else if(Se.isPair(t)){n=Object.freeze(n.concat(t));let a=ln("key",t.key,r,n);if(a===Fe)return Fe;else if(a===dt)t.key=null;let l=ln("value",t.value,r,n);if(l===Fe)return Fe;else if(l===dt)t.value=null}}return i}async function Cs(e,t){let r=Og(t);if(Se.isDocument(e)){if(await un(null,e.contents,r,Object.freeze([e]))===dt)e.contents=null}else await un(null,e,r,Object.freeze([]))}Cs.BREAK=Fe;Cs.SKIP=Eg;Cs.REMOVE=dt;async function un(e,t,r,n){let i=await Mg(e,t,r,n);if(Se.isNode(i)||Se.isPair(i))return Tg(e,n,i),un(e,i,r,n);if(typeof i!=="symbol"){if(Se.isCollection(t)){n=Object.freeze(n.concat(t));for(let a=0;a<t.items.length;++a){let l=await un(a,t.items[a],r,n);if(typeof l==="number")a=l-1;else if(l===Fe)return Fe;else if(l===dt)t.items.splice(a,1),a-=1}}else if(Se.isPair(t)){n=Object.freeze(n.concat(t));let a=await un("key",t.key,r,n);if(a===Fe)return Fe;else if(a===dt)t.key=null;let l=await un("value",t.value,r,n);if(l===Fe)return Fe;else if(l===dt)t.value=null}}return i}function Og(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value))return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e);return e}function Mg(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(Se.isMap(t))return r.Map?.(e,t,n);if(Se.isSeq(t))return r.Seq?.(e,t,n);if(Se.isPair(t))return r.Pair?.(e,t,n);if(Se.isScalar(t))return r.Scalar?.(e,t,n);if(Se.isAlias(t))return r.Alias?.(e,t,n);return}function Tg(e,t,r){let n=t[t.length-1];if(Se.isCollection(n))n.items[e]=r;else if(Se.isPair(n))if(e==="key")n.key=r;else n.value=r;else if(Se.isDocument(n))n.contents=r;else{let i=Se.isAlias(n)?"alias":"scalar";throw Error(`Cannot replace node with ${i} parent`)}}FM.visit=Rs;FM.visitAsync=Cs});var eu=v(function(UM){var Ng=ee(),YM=ii(),BM={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},WM=(e)=>e.replace(/[!,[\]{}]/g,(t)=>BM[t]);class Ge{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ge.defaultYaml,e),this.tags=Object.assign({},Ge.defaultTags,t)}clone(){let e=new Ge(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new Ge(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ge.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ge.defaultTags);break}return e}add(e,t){if(this.atNextDocument)this.yaml={explicit:Ge.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ge.defaultTags),this.atNextDocument=!1;let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2){if(t(0,"%TAG directive should contain exactly two parts"),r.length<2)return!1}let[i,a]=r;return this.tags[i]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;else{let a=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,a),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let a=e.slice(2,-1);if(a==="!"||a==="!!")return t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null;if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return a}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);if(!n)t(`The ${e} tag has no suffix`);let i=this.tags[r];if(i)try{return i+decodeURIComponent(n)}catch(a){return t(String(a)),null}if(r==="!")return e;return t(`Could not resolve tag: ${e}`),null}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+WM(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),n;if(e&&r.length>0&&Ng.isNode(e.contents)){let i={};YM.visit(e.contents,(a,l)=>{if(Ng.isNode(l)&&l.tag)i[l.tag]=!0}),n=Object.keys(i)}else n=[];for(let[i,a]of r){if(i==="!!"&&a==="tag:yaml.org,2002:")continue;if(!e||n.some((l)=>l.startsWith(a)))t.push(`%TAG ${i} ${a}`)}return t.join(`
|
|
50
|
+
`)}}Ge.defaultYaml={explicit:!1,version:"1.2"};Ge.defaultTags={"!!":"tag:yaml.org,2002:"};UM.Directives=Ge});var Is=v(function(zM){var Ag=ee(),VM=ii();function GM(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(r)}return!0}function Dg(e){let t=new Set;return VM.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}}),t}function Lg(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}function KM(e,t){let r=[],n=new Map,i=null;return{onAnchor:(a)=>{r.push(a),i??(i=Dg(e));let l=Lg(t,i);return i.add(l),l},setAnchors:()=>{for(let a of r){let l=n.get(a);if(typeof l==="object"&&l.anchor&&(Ag.isScalar(l.node)||Ag.isCollection(l.node)))l.node.anchor=l.anchor;else{let u=Error("Failed to resolve repeated object (this should not happen)");throw u.source=a,u}}},sourceObjects:n}}zM.anchorIsValid=GM;zM.anchorNames=Dg;zM.createNodeAnchors=KM;zM.findNewAnchor=Lg});var tu=v(function(eT){function si(e,t,r,n){if(n&&typeof n==="object")if(Array.isArray(n))for(let i=0,a=n.length;i<a;++i){let l=n[i],u=si(e,n,String(i),l);if(u===void 0)delete n[i];else if(u!==l)n[i]=u}else if(n instanceof Map)for(let i of Array.from(n.keys())){let a=n.get(i),l=si(e,n,i,a);if(l===void 0)n.delete(i);else if(l!==a)n.set(i,l)}else if(n instanceof Set)for(let i of Array.from(n)){let a=si(e,n,i,i);if(a===void 0)n.delete(i);else if(a!==i)n.delete(i),n.add(a)}else for(let[i,a]of Object.entries(n)){let l=si(e,n,i,a);if(l===void 0)delete n[i];else if(l!==a)n[i]=l}return e.call(t,r,n)}eT.applyReviver=si});var Wt=v(function(nT){var rT=ee();function qg(e,t,r){if(Array.isArray(e))return e.map((n,i)=>qg(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!rT.hasAnchor(e))return e.toJSON(t,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=(a)=>{n.res=a,delete r.onCreate};let i=e.toJSON(t,r);if(r.onCreate)r.onCreate(i);return i}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}nT.toJS=qg});var Fs=v(function(oT){var sT=tu(),Pg=ee(),aT=Wt();class Rg{constructor(e){Object.defineProperty(this,Pg.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:i}={}){if(!Pg.isDocument(e))throw TypeError("A document argument is required");let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r==="number"?r:100},l=aT.toJS(this,"",a);if(typeof n==="function")for(let{count:u,res:h}of a.anchors.values())n(h,u);return typeof i==="function"?sT.applyReviver(i,{"":l},"",l):l}}oT.NodeBase=Rg});var ai=v(function(dT){var uT=Is(),cT=ii(),cn=ee(),fT=Fs(),hT=Wt();class Cg extends fT.NodeBase{constructor(e){super(cn.ALIAS);this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let r;if(t?.aliasResolveCache)r=t.aliasResolveCache;else if(r=[],cT.visit(e,{Node:(i,a)=>{if(cn.isAlias(a)||cn.hasAnchor(a))r.push(a)}}),t)t.aliasResolveCache=r;let n=void 0;for(let i of r){if(i===this)break;if(i.anchor===this.source)n=i}return n}toJSON(e,t){if(!t)return{source:this.source};let{anchors:r,doc:n,maxAliasCount:i}=t,a=this.resolve(n,t);if(!a){let u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(u)}let l=r.get(a);if(!l)hT.toJS(a,null,t),l=r.get(a);if(l?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0){if(l.count+=1,l.aliasCount===0)l.aliasCount=js(n,a,r);if(l.count*l.aliasCount>i)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return l.res}toString(e,t,r){let n=`*${this.source}`;if(e){if(uT.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(i)}if(e.implicitKey)return`${n} `}return n}}function js(e,t,r){if(cn.isAlias(t)){let n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(cn.isCollection(t)){let n=0;for(let i of t.items){let a=js(e,i,r);if(a>n)n=a}return n}else if(cn.isPair(t)){let n=js(e,t.key,r),i=js(e,t.value,r);return Math.max(n,i)}return 1}dT.Alias=Cg});var ye=v(function(wT){var mT=ee(),gT=Fs(),yT=Wt(),bT=(e)=>!e||typeof e!=="function"&&typeof e!=="object";class yr extends gT.NodeBase{constructor(e){super(mT.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:yT.toJS(this.value,e,t)}toString(){return String(this.value)}}yr.BLOCK_FOLDED="BLOCK_FOLDED";yr.BLOCK_LITERAL="BLOCK_LITERAL";yr.PLAIN="PLAIN";yr.QUOTE_DOUBLE="QUOTE_DOUBLE";yr.QUOTE_SINGLE="QUOTE_SINGLE";wT.Scalar=yr;wT.isScalarValue=bT});var oi=v(function(OT){var ST=ai(),br=ee(),Ig=ye(),kT="tag:yaml.org,2002:";function xT(e,t,r){if(t){let n=r.filter((a)=>a.tag===t),i=n.find((a)=>!a.format)??n[0];if(!i)throw Error(`Tag ${t} not found`);return i}return r.find((n)=>n.identify?.(e)&&!n.format)}function ET(e,t,r){if(br.isDocument(e))e=e.contents;if(br.isNode(e))return e;if(br.isPair(e)){let m=r.schema[br.MAP].createNode?.(r.schema,null,r);return m.items.push(e),m}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)e=e.valueOf();let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:a,schema:l,sourceObjects:u}=r,h=void 0;if(n&&e&&typeof e==="object")if(h=u.get(e),h)return h.anchor??(h.anchor=i(e)),new ST.Alias(h.anchor);else h={anchor:null,node:null},u.set(e,h);if(t?.startsWith("!!"))t=kT+t.slice(2);let d=xT(e,t,l.tags);if(!d){if(e&&typeof e.toJSON==="function")e=e.toJSON();if(!e||typeof e!=="object"){let m=new Ig.Scalar(e);if(h)h.node=m;return m}d=e instanceof Map?l[br.MAP]:(Symbol.iterator in Object(e))?l[br.SEQ]:l[br.MAP]}if(a)a(d),delete r.onTagObj;let b=d?.createNode?d.createNode(r.schema,e,r):typeof d?.nodeClass?.from==="function"?d.nodeClass.from(r.schema,e,r):new Ig.Scalar(e);if(t)b.tag=t;else if(!d.default)b.tag=d.tag;if(h)h.node=b;return b}OT.createNode=ET});var $s=v(function(AT){var TT=oi(),pt=ee(),NT=Fs();function ru(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){let a=t[i];if(typeof a==="number"&&Number.isInteger(a)&&a>=0){let l=[];l[a]=n,n=l}else n=new Map([[a,n]])}return TT.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var Fg=(e)=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class jg extends NT.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;if(t.items=t.items.map((r)=>pt.isNode(r)||pt.isPair(r)?r.clone(e):r),this.range)t.range=this.range.slice();return t}addIn(e,t){if(Fg(e))this.add(t);else{let[r,...n]=e,i=this.get(r,!0);if(pt.isCollection(i))i.addIn(n,t);else if(i===void 0&&this.schema)this.set(r,ru(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let n=this.get(t,!0);if(pt.isCollection(n))return n.deleteIn(r);else throw Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...n]=e,i=this.get(r,!0);if(n.length===0)return!t&&pt.isScalar(i)?i.value:i;else return pt.isCollection(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t)=>{if(!pt.isPair(t))return!1;let r=t.value;return r==null||e&&pt.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let n=this.get(t,!0);return pt.isCollection(n)?n.hasIn(r):!1}setIn(e,t){let[r,...n]=e;if(n.length===0)this.set(r,t);else{let i=this.get(r,!0);if(pt.isCollection(i))i.setIn(n,t);else if(i===void 0&&this.schema)this.set(r,ru(this.schema,n,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}}AT.Collection=jg;AT.collectionFromPath=ru;AT.isEmptyPath=Fg});var li=v(function(CT){var PT=(e)=>e.replace(/^(?!$)(?: $)?/gm,"#");function nu(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}var RT=(e,t,r)=>e.endsWith(`
|
|
51
|
+
`)?nu(r,t):r.includes(`
|
|
52
52
|
`)?`
|
|
53
|
-
`+
|
|
54
|
-
`){if(r==="block")_
|
|
53
|
+
`+nu(r,t):(e.endsWith(" ")?"":" ")+r;CT.indentComment=nu;CT.lineComment=RT;CT.stringifyComment=PT});var Yg=v(function(YT){function $T(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:a=20,onFold:l,onOverflow:u}={}){if(!i||i<0)return e;if(i<a)a=0;let h=Math.max(1+a,1+i-t.length);if(e.length<=h)return e;let d=[],b={},m=i-t.length;if(typeof n==="number")if(n>i-Math.max(2,a))d.push(0);else m=i-n;let g=void 0,S=void 0,y=!1,_=-1,k=-1,O=-1;if(r==="block"){if(_=$g(e,_,t.length),_!==-1)m=_+h}for(let E;E=e[_+=1];){if(r==="quoted"&&E==="\\"){switch(k=_,e[_+1]){case"x":_+=3;break;case"u":_+=5;break;case"U":_+=9;break;default:_+=1}O=_}if(E===`
|
|
54
|
+
`){if(r==="block")_=$g(e,_,t.length);m=_+t.length+h,g=void 0}else{if(E===" "&&S&&S!==" "&&S!==`
|
|
55
55
|
`&&S!=="\t"){let T=e[_+1];if(T&&T!==" "&&T!==`
|
|
56
|
-
`&&T!=="\t")g=_}if(_>=m)if(g)d.push(g),m=g+h,g=void 0;else if(r==="quoted"){while(S===" "||S==="\t")S=
|
|
56
|
+
`&&T!=="\t")g=_}if(_>=m)if(g)d.push(g),m=g+h,g=void 0;else if(r==="quoted"){while(S===" "||S==="\t")S=E,E=e[_+=1],y=!0;let T=_>O+1?_-2:k-1;if(b[T])return e;d.push(T),b[T]=!0,m=T+h,g=void 0}else y=!0}S=E}if(y&&u)u();if(d.length===0)return e;if(l)l();let A=e.slice(0,d[0]);for(let E=0;E<d.length;++E){let T=d[E],q=d[E+1]||e.length;if(T===0)A=`
|
|
57
57
|
${t}${e.slice(0,q)}`;else{if(r==="quoted"&&b[T])A+=`${e[T]}\\`;A+=`
|
|
58
|
-
${t}${e.slice(T+1,q)}`}}return A}function
|
|
59
|
-
`);n=t,
|
|
60
|
-
`){if(a-l>n)return!0;if(l=a+1,
|
|
58
|
+
${t}${e.slice(T+1,q)}`}}return A}function $g(e,t,r){let n=t,i=t+1,a=e[i];while(a===" "||a==="\t")if(t<i+r)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
|
59
|
+
`);n=t,i=t+1,a=e[i]}return n}YT.FOLD_BLOCK="block";YT.FOLD_FLOW="flow";YT.FOLD_QUOTED="quoted";YT.foldFlowLines=$T});var ci=v(function(zT){var tt=ye(),Ut=Yg(),Bs=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ws=(e)=>/^(%|---|\.\.\.)/m.test(e);function VT(e,t,r){if(!t||t<0)return!1;let n=t-r,i=e.length;if(i<=n)return!1;for(let a=0,l=0;a<i;++a)if(e[a]===`
|
|
60
|
+
`){if(a-l>n)return!0;if(l=a+1,i-l<=n)return!1}return!0}function ui(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Ws(e)?" ":""),l="",u=0;for(let h=0,d=r[h];d;d=r[++h]){if(d===" "&&r[h+1]==="\\"&&r[h+2]==="n")l+=r.slice(u,h)+"\\ ",h+=1,u=h,d="\\";if(d==="\\")switch(r[h+1]){case"u":{l+=r.slice(u,h);let b=r.substr(h+2,4);switch(b){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:if(b.substr(0,2)==="00")l+="\\x"+b.substr(2);else l+=r.substr(h,6)}h+=5,u=h+1}break;case"n":if(n||r[h+2]==='"'||r.length<i)h+=1;else{l+=r.slice(u,h)+`
|
|
61
61
|
|
|
62
62
|
`;while(r[h+2]==="\\"&&r[h+3]==="n"&&r[h+4]!=='"')l+=`
|
|
63
|
-
`,h+=2;if(l+=a,r[h+2]===" ")l+="\\";h+=1,u=h+1}break;default:h+=1}}return l=u?l+r.slice(u):r,n?l
|
|
64
|
-
`)||/[ \t]\n|\n[ \t]/.test(e))return
|
|
65
|
-
${r}`)+"'";return t.implicitKey?n
|
|
63
|
+
`,h+=2;if(l+=a,r[h+2]===" ")l+="\\";h+=1,u=h+1}break;default:h+=1}}return l=u?l+r.slice(u):r,n?l:Ut.foldFlowLines(l,a,Ut.FOLD_QUOTED,Bs(t,!1))}function iu(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
64
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return ui(e,t);let r=t.indent||(Ws(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
65
|
+
${r}`)+"'";return t.implicitKey?n:Ut.foldFlowLines(n,r,Ut.FOLD_FLOW,Bs(t,!1))}function fn(e,t){let{singleQuote:r}=t.options,n;if(r===!1)n=ui;else{let i=e.includes('"'),a=e.includes("'");if(i&&!a)n=iu;else if(a&&!i)n=ui;else n=r?iu:ui}return n(e,t)}var su;try{su=new RegExp(`(^|(?<!
|
|
66
66
|
))
|
|
67
67
|
+(?!
|
|
68
|
-
|$)`,"g")}catch{
|
|
68
|
+
|$)`,"g")}catch{su=/\n+(?!\n|$)/g}function Ys({comment:e,type:t,value:r},n,i,a){let{blockQuote:l,commentString:u,lineWidth:h}=n.options;if(!l||/\n[\t ]+$/.test(r))return fn(r,n);let d=n.indent||(n.forceBlockIndent||Ws(r)?" ":""),b=l==="literal"?!0:l==="folded"||t===tt.Scalar.BLOCK_FOLDED?!1:t===tt.Scalar.BLOCK_LITERAL?!0:!VT(r,h,d.length);if(!r)return b?`|
|
|
69
69
|
`:`>
|
|
70
70
|
`;let m,g;for(g=r.length;g>0;--g){let q=r[g-1];if(q!==`
|
|
71
71
|
`&&q!=="\t"&&q!==" ")break}let S=r.substring(g),y=S.indexOf(`
|
|
72
72
|
`);if(y===-1)m="-";else if(r===S||y!==S.length-1){if(m="+",a)a()}else m="";if(S){if(r=r.slice(0,-S.length),S[S.length-1]===`
|
|
73
|
-
`)S=S.slice(0,-1);S=S.replace(
|
|
74
|
-
`)O=
|
|
75
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`),L=!1,F=
|
|
73
|
+
`)S=S.slice(0,-1);S=S.replace(su,`$&${d}`)}let _=!1,k,O=-1;for(k=0;k<r.length;++k){let q=r[k];if(q===" ")_=!0;else if(q===`
|
|
74
|
+
`)O=k;else break}let A=r.substring(0,O<k?O+1:k);if(A)r=r.substring(A.length),A=A.replace(/\n+/g,`$&${d}`);let T=(_?d?"2":"1":"")+m;if(e){if(T+=" "+u(e.replace(/ ?[\r\n]+/g," ")),i)i()}if(!b){let q=r.replace(/\n+/g,`
|
|
75
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`),L=!1,F=Bs(n,!0);if(l!=="folded"&&t!==tt.Scalar.BLOCK_FOLDED)F.onOverflow=()=>{L=!0};let N=Ut.foldFlowLines(`${A}${q}${S}`,d,Ut.FOLD_BLOCK,F);if(!L)return`>${T}
|
|
76
76
|
${d}${N}`}return r=r.replace(/\n+/g,`$&${d}`),`|${T}
|
|
77
|
-
${d}${A}${r}${S}`}function
|
|
78
|
-
`)||b&&/[[\]{},]/.test(a))return
|
|
79
|
-
`)?
|
|
80
|
-
`))return
|
|
81
|
-
${h}`);if(l){let g=(_)=>_.default&&_.tag!=="tag:yaml.org,2002:str"&&_.test?.test(m),{compat:S,tags:y}=t.doc.schema;if(y.some(g)||S?.some(g))return
|
|
82
|
-
${t.indent}${u}`}
|
|
83
|
-
${u}:`}else if(
|
|
77
|
+
${d}${A}${r}${S}`}function GT(e,t,r,n){let{type:i,value:a}=e,{actualString:l,implicitKey:u,indent:h,indentStep:d,inFlow:b}=t;if(u&&a.includes(`
|
|
78
|
+
`)||b&&/[[\]{},]/.test(a))return fn(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return u||b||!a.includes(`
|
|
79
|
+
`)?fn(a,t):Ys(e,t,r,n);if(!u&&!b&&i!==tt.Scalar.PLAIN&&a.includes(`
|
|
80
|
+
`))return Ys(e,t,r,n);if(Ws(a)){if(h==="")return t.forceBlockIndent=!0,Ys(e,t,r,n);else if(u&&h===d)return fn(a,t)}let m=a.replace(/\n+/g,`$&
|
|
81
|
+
${h}`);if(l){let g=(_)=>_.default&&_.tag!=="tag:yaml.org,2002:str"&&_.test?.test(m),{compat:S,tags:y}=t.doc.schema;if(y.some(g)||S?.some(g))return fn(a,t)}return u?m:Ut.foldFlowLines(m,h,Ut.FOLD_FLOW,Bs(t,!1))}function KT(e,t,r,n){let{implicitKey:i,inFlow:a}=t,l=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)}),{type:u}=e;if(u!==tt.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(l.value))u=tt.Scalar.QUOTE_DOUBLE}let h=(b)=>{switch(b){case tt.Scalar.BLOCK_FOLDED:case tt.Scalar.BLOCK_LITERAL:return i||a?fn(l.value,t):Ys(l,t,r,n);case tt.Scalar.QUOTE_DOUBLE:return ui(l.value,t);case tt.Scalar.QUOTE_SINGLE:return iu(l.value,t);case tt.Scalar.PLAIN:return GT(l,t,r,n);default:return null}},d=h(u);if(d===null){let{defaultKeyType:b,defaultStringType:m}=t.options,g=i&&b||m;if(d=h(g),d===null)throw Error(`Unsupported default string type ${g}`)}return d}zT.stringifyString=KT});var fi=v(function(iN){var QT=Is(),Ht=ee(),ZT=li(),XT=ci();function eN(e,t){let r=Object.assign({blockQuote:!0,commentString:ZT.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent==="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function tN(e,t){if(t.tag){let i=e.filter((a)=>a.tag===t.tag);if(i.length>0)return i.find((a)=>a.format===t.format)??i[0]}let r=void 0,n;if(Ht.isScalar(t)){n=t.value;let i=e.filter((a)=>a.identify?.(n));if(i.length>1){let a=i.filter((l)=>l.test);if(a.length>0)i=a}r=i.find((a)=>a.format===t.format)??i.find((a)=>!a.format)}else n=t,r=e.find((i)=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw Error(`Tag not resolved for ${i} value`)}return r}function rN(e,t,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],a=(Ht.isScalar(e)||Ht.isCollection(e))&&e.anchor;if(a&&QT.anchorIsValid(a))r.add(a),i.push(`&${a}`);let l=e.tag??(t.default?null:t.tag);if(l)i.push(n.directives.tagString(l));return i.join(" ")}function nN(e,t,r,n){if(Ht.isPair(e))return e.toString(t,r,n);if(Ht.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let i=void 0,a=Ht.isNode(e)?e:t.doc.createNode(e,{onTagObj:(h)=>i=h});i??(i=tN(t.doc.schema.tags,a));let l=rN(a,i,t);if(l.length>0)t.indentAtStart=(t.indentAtStart??0)+l.length+1;let u=typeof i.stringify==="function"?i.stringify(a,t,r,n):Ht.isScalar(a)?XT.stringifyString(a,t,r,n):a.toString(t,r,n);if(!l)return u;return Ht.isScalar(a)||u[0]==="{"||u[0]==="["?`${l} ${u}`:`${l}
|
|
82
|
+
${t.indent}${u}`}iN.createStringifyContext=eN;iN.stringify=nN});var Ug=v(function(lN){var Tt=ee(),Bg=ye(),Wg=fi(),hi=li();function oN({key:e,value:t},r,n,i){let{allNullValues:a,doc:l,indent:u,indentStep:h,options:{commentString:d,indentSeq:b,simpleKeys:m}}=r,g=Tt.isNode(e)&&e.comment||null;if(m){if(g)throw Error("With simple keys, key nodes cannot have comments");if(Tt.isCollection(e)||!Tt.isNode(e)&&typeof e==="object")throw Error("With simple keys, collection cannot be used as a key value")}let S=!m&&(!e||g&&t==null&&!r.inFlow||Tt.isCollection(e)||(Tt.isScalar(e)?e.type===Bg.Scalar.BLOCK_FOLDED||e.type===Bg.Scalar.BLOCK_LITERAL:typeof e==="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!S&&(m||!a),indent:u+h});let y=!1,_=!1,k=Wg.stringify(e,r,()=>y=!0,()=>_=!0);if(!S&&!r.inFlow&&k.length>1024){if(m)throw Error("With simple keys, single line scalar must not span more than 1024 characters");S=!0}if(r.inFlow){if(a||t==null){if(y&&n)n();return k===""?"?":S?`? ${k}`:k}}else if(a&&!m||t==null&&S){if(k=`? ${k}`,g&&!y)k+=hi.lineComment(k,r.indent,d(g));else if(_&&i)i();return k}if(y)g=null;if(S){if(g)k+=hi.lineComment(k,r.indent,d(g));k=`? ${k}
|
|
83
|
+
${u}:`}else if(k=`${k}:`,g)k+=hi.lineComment(k,r.indent,d(g));let O,A,E;if(Tt.isNode(t))O=!!t.spaceBefore,A=t.commentBefore,E=t.comment;else if(O=!1,A=null,E=null,t&&typeof t==="object")t=l.createNode(t);if(r.implicitKey=!1,!S&&!g&&Tt.isScalar(t))r.indentAtStart=k.length+1;if(_=!1,!b&&h.length>=2&&!r.inFlow&&!S&&Tt.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor)r.indent=r.indent.substring(2);let T=!1,q=Wg.stringify(t,r,()=>T=!0,()=>_=!0),L=" ";if(g||O||A){if(L=O?`
|
|
84
84
|
`:"",A){let F=d(A);L+=`
|
|
85
|
-
${
|
|
86
|
-
`&&
|
|
85
|
+
${hi.indentComment(F,r.indent)}`}if(q===""&&!r.inFlow){if(L===`
|
|
86
|
+
`&&E)L=`
|
|
87
87
|
|
|
88
88
|
`}else L+=`
|
|
89
|
-
${r.indent}`}else if(!S&&
|
|
90
|
-
`),I=N!==-1,
|
|
89
|
+
${r.indent}`}else if(!S&&Tt.isCollection(t)){let F=q[0],N=q.indexOf(`
|
|
90
|
+
`),I=N!==-1,ne=r.inFlow??t.flow??t.items.length===0;if(I||!ne){let Z=!1;if(I&&(F==="&"||F==="!")){let H=q.indexOf(" ");if(F==="&"&&H!==-1&&H<N&&q[H+1]==="!")H=q.indexOf(" ",H+1);if(H===-1||N<H)Z=!0}if(!Z)L=`
|
|
91
91
|
${r.indent}`}}else if(q===""||q[0]===`
|
|
92
|
-
`)L="";if(
|
|
92
|
+
`)L="";if(k+=L+q,r.inFlow){if(T&&n)n()}else if(E&&!T)k+=hi.lineComment(k,r.indent,d(E));else if(_&&i)i();return k}lN.stringifyPair=oN});var au=v(function(hN){var Hg=W("process");function cN(e,...t){if(e==="debug")console.log(...t)}function fN(e,t){if(e==="debug"||e==="warn")if(typeof Hg.emitWarning==="function")Hg.emitWarning(t);else console.warn(t)}hN.debug=cN;hN.warn=fN});var Gs=v(function(gN){var Vs=ee(),Vg=ye(),Us="<<",Hs={identify:(e)=>e===Us||typeof e==="symbol"&&e.description===Us,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Vg.Scalar(Symbol(Us)),{addToJSMap:Gg}),stringify:()=>Us},mN=(e,t)=>(Hs.identify(t)||Vs.isScalar(t)&&(!t.type||t.type===Vg.Scalar.PLAIN)&&Hs.identify(t.value))&&e?.doc.schema.tags.some((r)=>r.tag===Hs.tag&&r.default);function Gg(e,t,r){let n=Kg(e,r);if(Vs.isSeq(n))for(let i of n.items)ou(e,t,i);else if(Array.isArray(n))for(let i of n)ou(e,t,i);else ou(e,t,n)}function ou(e,t,r){let n=Kg(e,r);if(!Vs.isMap(n))throw Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,e,Map);for(let[a,l]of i)if(t instanceof Map){if(!t.has(a))t.set(a,l)}else if(t instanceof Set)t.add(a);else if(!Object.prototype.hasOwnProperty.call(t,a))Object.defineProperty(t,a,{value:l,writable:!0,enumerable:!0,configurable:!0});return t}function Kg(e,t){return e&&Vs.isAlias(t)?t.resolve(e.doc,e):t}gN.addMergeToJSMap=Gg;gN.isMergeKey=mN;gN.merge=Hs});var uu=v(function(xN){var _N=au(),zg=Gs(),vN=fi(),Jg=ee(),lu=Wt();function SN(e,t,{key:r,value:n}){if(Jg.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(zg.isMergeKey(e,r))zg.addMergeToJSMap(e,t,n);else{let i=lu.toJS(r,"",e);if(t instanceof Map)t.set(i,lu.toJS(n,i,e));else if(t instanceof Set)t.add(i);else{let a=kN(r,i,e),l=lu.toJS(n,a,e);if(a in t)Object.defineProperty(t,a,{value:l,writable:!0,enumerable:!0,configurable:!0});else t[a]=l}}return t}function kN(e,t,r){if(t===null)return"";if(typeof t!=="object")return String(t);if(Jg.isNode(e)&&r?.doc){let n=vN.createStringifyContext(r.doc,{});n.anchors=new Set;for(let a of r.anchors.keys())n.anchors.add(a.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=e.toString(n);if(!r.mapKeyWarned){let a=JSON.stringify(i);if(a.length>40)a=a.substring(0,36)+'..."';_N.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${a}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return i}return JSON.stringify(t)}xN.addPairToJSMap=SN});var Vt=v(function(NN){var Qg=oi(),ON=Ug(),MN=uu(),Ks=ee();function TN(e,t,r){let n=Qg.createNode(e,void 0,r),i=Qg.createNode(t,void 0,r);return new zs(n,i)}class zs{constructor(e,t=null){Object.defineProperty(this,Ks.NODE_TYPE,{value:Ks.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;if(Ks.isNode(t))t=t.clone(e);if(Ks.isNode(r))r=r.clone(e);return new zs(t,r)}toJSON(e,t){let r=t?.mapAsMap?new Map:{};return MN.addPairToJSMap(t,r,this)}toString(e,t,r){return e?.doc?ON.stringifyPair(this,e,t,r):JSON.stringify(this)}}NN.Pair=zs;NN.createPair=TN});var cu=v(function(RN){var wr=ee(),Zg=fi(),Js=li();function LN(e,t,r){return(t.inFlow??e.flow?PN:qN)(e,t,r)}function qN({comment:e,items:t},r,{blockItemPrefix:n,flowChars:i,itemIndent:a,onChompKeep:l,onComment:u}){let{indent:h,options:{commentString:d}}=r,b=Object.assign({},r,{indent:a,type:null}),m=!1,g=[];for(let y=0;y<t.length;++y){let _=t[y],k=null;if(wr.isNode(_)){if(!m&&_.spaceBefore)g.push("");if(Qs(r,g,_.commentBefore,m),_.comment)k=_.comment}else if(wr.isPair(_)){let A=wr.isNode(_.key)?_.key:null;if(A){if(!m&&A.spaceBefore)g.push("");Qs(r,g,A.commentBefore,m)}}m=!1;let O=Zg.stringify(_,b,()=>k=null,()=>m=!0);if(k)O+=Js.lineComment(O,a,d(k));if(m&&k)m=!1;g.push(n+O)}let S;if(g.length===0)S=i.start+i.end;else{S=g[0];for(let y=1;y<g.length;++y){let _=g[y];S+=_?`
|
|
93
93
|
${h}${_}`:`
|
|
94
94
|
`}}if(e){if(S+=`
|
|
95
|
-
`+
|
|
96
|
-
`)),y<e.length-1)O+=",";else if(t.options.trailingComma){if(t.options.lineWidth>0)d||(d=m.reduce((A,
|
|
97
|
-
${a}${
|
|
95
|
+
`+Js.indentComment(d(e),h),u)u()}else if(m&&l)l();return S}function PN({items:e},t,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:a,flowCollectionPadding:l,options:{commentString:u}}=t;n+=a;let h=Object.assign({},t,{indent:n,inFlow:!0,type:null}),d=!1,b=0,m=[];for(let y=0;y<e.length;++y){let _=e[y],k=null;if(wr.isNode(_)){if(_.spaceBefore)m.push("");if(Qs(t,m,_.commentBefore,!1),_.comment)k=_.comment}else if(wr.isPair(_)){let A=wr.isNode(_.key)?_.key:null;if(A){if(A.spaceBefore)m.push("");if(Qs(t,m,A.commentBefore,!1),A.comment)d=!0}let E=wr.isNode(_.value)?_.value:null;if(E){if(E.comment)k=E.comment;if(E.commentBefore)d=!0}else if(_.value==null&&A?.comment)k=A.comment}if(k)d=!0;let O=Zg.stringify(_,h,()=>k=null);if(d||(d=m.length>b||O.includes(`
|
|
96
|
+
`)),y<e.length-1)O+=",";else if(t.options.trailingComma){if(t.options.lineWidth>0)d||(d=m.reduce((A,E)=>A+E.length+2,2)+(O.length+2)>t.options.lineWidth);if(d)O+=","}if(k)O+=Js.lineComment(O,n,u(k));m.push(O),b=m.length}let{start:g,end:S}=r;if(m.length===0)return g+S;else{if(!d){let y=m.reduce((_,k)=>_+k.length+2,2);d=t.options.lineWidth>0&&y>t.options.lineWidth}if(d){let y=g;for(let _ of m)y+=_?`
|
|
97
|
+
${a}${i}${_}`:`
|
|
98
98
|
`;return`${y}
|
|
99
|
-
${
|
|
100
|
-
`:" ")}return
|
|
101
|
-
${
|
|
102
|
-
${a.comment}`:n.comment}n=s}e.items[r]=Gi.isPair(n)?n:new ou.Pair(n)}else t("Expected a sequence for this tag");return e}function Kg(e,t,r){let{replacer:n}=r,s=new KA.YAMLSeq(e);s.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let l of t){if(typeof n==="function")l=n.call(t,String(a++),l);let u,h;if(Array.isArray(l))if(l.length===2)u=l[0],h=l[1];else throw TypeError(`Expected [key, value] tuple: ${l}`);else if(l&&l instanceof Object){let d=Object.keys(l);if(d.length===1)u=d[0],h=l[u];else throw TypeError(`Expected tuple with one key, not ${d.length} keys`)}else u=l;s.items.push(ou.createPair(u,h,r))}return s}var zA={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Gg,createNode:Kg};JA.createPairs=Kg;JA.pairs=zA;JA.resolvePairs=Gg});var uu=v(function(rD){var zg=X(),lu=Yt(),cs=Ht(),eD=Vt(),Jg=Ki();class yr extends eD.YAMLSeq{constructor(){super();this.add=cs.YAMLMap.prototype.add.bind(this),this.delete=cs.YAMLMap.prototype.delete.bind(this),this.get=cs.YAMLMap.prototype.get.bind(this),this.has=cs.YAMLMap.prototype.has.bind(this),this.set=cs.YAMLMap.prototype.set.bind(this),this.tag=yr.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;if(t?.onCreate)t.onCreate(r);for(let n of this.items){let s,a;if(zg.isPair(n))s=lu.toJS(n.key,"",t),a=lu.toJS(n.value,s,t);else s=lu.toJS(n,"",t);if(r.has(s))throw Error("Ordered maps must not include duplicate keys");r.set(s,a)}return r}static from(e,t,r){let n=Jg.createPairs(e,t,r),s=new this;return s.items=n.items,s}}yr.tag="tag:yaml.org,2002:omap";var tD={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:yr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=Jg.resolvePairs(e,t),n=[];for(let{key:s}of r.items)if(zg.isScalar(s))if(n.includes(s.value))t(`Ordered maps must not include duplicate keys: ${s.value}`);else n.push(s.value);return Object.assign(new yr,r)},createNode:(e,t,r)=>yr.from(e,t,r)};rD.YAMLOMap=yr;rD.omap=tD});var ty=v(function(iD){var Qg=pe();function Zg({value:e,source:t},r){if(t&&(e?Xg:ey).test.test(t))return t;return e?r.options.trueStr:r.options.falseStr}var Xg={identify:(e)=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Qg.Scalar(!0),stringify:Zg},ey={identify:(e)=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Qg.Scalar(!1),stringify:Zg};iD.falseTag=ey;iD.trueTag=Xg});var ry=v(function(hD){var lD=pe(),cu=ln(),uD={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:cu.stringifyNumber},cD={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():cu.stringifyNumber(e)}},fD={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new lD.Scalar(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let n=e.substring(r+1).replace(/_/g,"");if(n[n.length-1]==="0")t.minFractionDigits=n.length}return t},stringify:cu.stringifyNumber};hD.float=fD;hD.floatExp=cD;hD.floatNaN=uD});var sy=v(function(_D){var ny=ln(),fs=(e)=>typeof e==="bigint"||Number.isInteger(e);function zi(e,t,r,{intAsBigInt:n}){let s=e[0];if(s==="-"||s==="+")t+=1;if(e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let l=BigInt(e);return s==="-"?BigInt(-1)*l:l}let a=parseInt(e,r);return s==="-"?-1*a:a}function fu(e,t,r){let{value:n}=e;if(fs(n)){let s=n.toString(t);return n<0?"-"+r+s.substr(1):r+s}return ny.stringifyNumber(e)}var gD={identify:fs,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>zi(e,2,2,r),stringify:(e)=>fu(e,2,"0b")},yD={identify:fs,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>zi(e,1,8,r),stringify:(e)=>fu(e,8,"0")},bD={identify:fs,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>zi(e,0,10,r),stringify:ny.stringifyNumber},wD={identify:fs,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>zi(e,2,16,r),stringify:(e)=>fu(e,16,"0x")};_D.int=bD;_D.intBin=gD;_D.intHex=wD;_D.intOct=yD});var hu=v(function(OD){var Zi=X(),Ji=Ut(),Qi=Ht();class br extends Qi.YAMLMap{constructor(e){super(e);this.tag=br.tag}add(e){let t;if(Zi.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new Ji.Pair(e.key,null);else t=new Ji.Pair(e,null);if(!Qi.findPair(this.items,t.key))this.items.push(t)}get(e,t){let r=Qi.findPair(this.items,e);return!t&&Zi.isPair(r)?Zi.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=Qi.findPair(this.items,e);if(r&&!t)this.items.splice(this.items.indexOf(r),1);else if(!r&&t)this.items.push(new Ji.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);else throw Error("Set items must all have null values")}static from(e,t,r){let{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t){if(typeof n==="function")a=n.call(t,a,a);s.items.push(Ji.createPair(a,null,r))}return s}}br.tag="tag:yaml.org,2002:set";var kD={collection:"map",identify:(e)=>e instanceof Set,nodeClass:br,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>br.from(e,t,r),resolve(e,t){if(Zi.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new br,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};OD.YAMLSet=br;OD.set=kD});var pu=v(function(LD){var ND=ln();function du(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,s=(l)=>t?BigInt(l):Number(l),a=n.replace(/_/g,"").split(":").reduce((l,u)=>l*s(60)+s(u),s(0));return r==="-"?s(-1)*a:a}function iy(e){let{value:t}=e,r=(l)=>l;if(typeof t==="bigint")r=(l)=>BigInt(l);else if(isNaN(t)||!isFinite(t))return ND.stringifyNumber(e);let n="";if(t<0)n="-",t*=r(-1);let s=r(60),a=[t%s];if(t<60)a.unshift(0);else if(t=(t-a[0])/s,a.unshift(t%s),t>=60)t=(t-a[0])/s,a.unshift(t);return n+a.map((l)=>String(l).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var AD={identify:(e)=>typeof e==="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>du(e,r),stringify:iy},DD={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(e)=>du(e,!1),stringify:iy},ay={identify:(e)=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(ay.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,s,a,l,u]=t.map(Number),h=t[7]?Number((t[7]+"00").substr(1,3)):0,d=Date.UTC(r,n-1,s,a||0,l||0,u||0,h),b=t[8];if(b&&b!=="Z"){let m=du(b,!1);if(Math.abs(m)<30)m*=60;d-=60000*m}return new Date(d)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};LD.floatTime=DD;LD.intTime=AD;LD.timestamp=ay});var ly=v(function(VD){var PD=an(),ID=Wi(),FD=on(),jD=ls(),YD=au(),oy=ty(),mu=ry(),Xi=sy(),$D=Pi(),BD=uu(),UD=Ki(),WD=hu(),gu=pu(),HD=[PD.map,FD.seq,jD.string,ID.nullTag,oy.trueTag,oy.falseTag,Xi.intBin,Xi.intOct,Xi.int,Xi.intHex,mu.floatNaN,mu.floatExp,mu.float,YD.binary,$D.merge,BD.omap,UD.pairs,WD.set,gu.intTime,gu.floatTime,gu.timestamp];VD.schema=HD});var by=v(function(tL){var hy=an(),KD=Wi(),dy=on(),zD=ls(),JD=Zl(),yu=eu(),bu=ru(),QD=Wg(),ZD=Vg(),py=au(),hs=Pi(),my=uu(),gy=Ki(),uy=ly(),yy=hu(),ea=pu(),cy=new Map([["core",QD.schema],["failsafe",[hy.map,dy.seq,zD.string]],["json",ZD.schema],["yaml11",uy.schema],["yaml-1.1",uy.schema]]),fy={binary:py.binary,bool:JD.boolTag,float:yu.float,floatExp:yu.floatExp,floatNaN:yu.floatNaN,floatTime:ea.floatTime,int:bu.int,intHex:bu.intHex,intOct:bu.intOct,intTime:ea.intTime,map:hy.map,merge:hs.merge,null:KD.nullTag,omap:my.omap,pairs:gy.pairs,seq:dy.seq,set:yy.set,timestamp:ea.timestamp},XD={"tag:yaml.org,2002:binary":py.binary,"tag:yaml.org,2002:merge":hs.merge,"tag:yaml.org,2002:omap":my.omap,"tag:yaml.org,2002:pairs":gy.pairs,"tag:yaml.org,2002:set":yy.set,"tag:yaml.org,2002:timestamp":ea.timestamp};function eL(e,t,r){let n=cy.get(t);if(n&&!e)return r&&!n.includes(hs.merge)?n.concat(hs.merge):n.slice();let s=n;if(!s)if(Array.isArray(e))s=[];else{let a=Array.from(cy.keys()).filter((l)=>l!=="yaml11").map((l)=>JSON.stringify(l)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${a} or define customTags array`)}if(Array.isArray(e))for(let a of e)s=s.concat(a);else if(typeof e==="function")s=e(s.slice());if(r)s=s.concat(hs.merge);return s.reduce((a,l)=>{let u=typeof l==="string"?fy[l]:l;if(!u){let h=JSON.stringify(l),d=Object.keys(fy).map((b)=>JSON.stringify(b)).join(", ");throw Error(`Unknown custom tag ${h}; use one of ${d}`)}if(!a.includes(u))a.push(u);return a},[])}tL.coreKnownTags=XD;tL.getTags=eL});var vu=v(function(lL){var wu=X(),sL=an(),iL=on(),aL=ls(),ta=by(),oL=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class _u{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:s,sortMapEntries:a,toStringDefaults:l}){this.compat=Array.isArray(e)?ta.getTags(e,"compat"):e?ta.getTags(null,e):null,this.name=typeof s==="string"&&s||"core",this.knownTags=n?ta.coreKnownTags:{},this.tags=ta.getTags(t,this.name,r),this.toStringOptions=l??null,Object.defineProperty(this,wu.MAP,{value:sL.map}),Object.defineProperty(this,wu.SCALAR,{value:aL.string}),Object.defineProperty(this,wu.SEQ,{value:iL.seq}),this.sortMapEntries=typeof a==="function"?a:a===!0?oL:null}clone(){let e=Object.create(_u.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}lL.Schema=_u});var wy=v(function(hL){var cL=X(),Su=is(),ds=rs();function fL(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let h=e.directives.toString(e);if(h)r.push(h),n=!0;else if(e.directives.docStart)n=!0}if(n)r.push("---");let s=Su.createStringifyContext(e,t),{commentString:a}=s.options;if(e.commentBefore){if(r.length!==1)r.unshift("");let h=a(e.commentBefore);r.unshift(ds.indentComment(h,""))}let l=!1,u=null;if(e.contents){if(cL.isNode(e.contents)){if(e.contents.spaceBefore&&n)r.push("");if(e.contents.commentBefore){let b=a(e.contents.commentBefore);r.push(ds.indentComment(b,""))}s.forceBlockIndent=!!e.comment,u=e.contents.comment}let h=u?void 0:()=>l=!0,d=Su.stringify(e.contents,s,()=>u=null,h);if(u)d+=ds.lineComment(d,"",a(u));if((d[0]==="|"||d[0]===">")&&r[r.length-1]==="---")r[r.length-1]=`--- ${d}`;else r.push(d)}else r.push(Su.stringify(e.contents,s));if(e.directives?.docEnd)if(e.comment){let h=a(e.comment);if(h.includes(`
|
|
103
|
-
`))r.push("..."),r.push(
|
|
99
|
+
${i}${S}`}else return`${g}${l}${m.join(" ")}${l}${S}`}}function Qs({indent:e,options:{commentString:t}},r,n,i){if(n&&i)n=n.replace(/^\n+/,"");if(n){let a=Js.indentComment(t(n),e);r.push(a.trimStart())}}RN.stringifyCollection=LN});var Kt=v(function(YN){var IN=cu(),FN=uu(),jN=$s(),Gt=ee(),Zs=Vt(),$N=ye();function di(e,t){let r=Gt.isScalar(t)?t.value:t;for(let n of e)if(Gt.isPair(n)){if(n.key===t||n.key===r)return n;if(Gt.isScalar(n.key)&&n.key.value===r)return n}return}class Xg extends jN.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Gt.MAP,e);this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:i}=r,a=new this(e),l=(u,h)=>{if(typeof i==="function")h=i.call(t,u,h);else if(Array.isArray(i)&&!i.includes(u))return;if(h!==void 0||n)a.items.push(Zs.createPair(u,h,r))};if(t instanceof Map)for(let[u,h]of t)l(u,h);else if(t&&typeof t==="object")for(let u of Object.keys(t))l(u,t[u]);if(typeof e.sortMapEntries==="function")a.items.sort(e.sortMapEntries);return a}add(e,t){let r;if(Gt.isPair(e))r=e;else if(!e||typeof e!=="object"||!("key"in e))r=new Zs.Pair(e,e?.value);else r=new Zs.Pair(e.key,e.value);let n=di(this.items,r.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw Error(`Key ${r.key} already set`);if(Gt.isScalar(n.value)&&$N.isScalarValue(r.value))n.value.value=r.value;else n.value=r.value}else if(i){let a=this.items.findIndex((l)=>i(r,l)<0);if(a===-1)this.items.push(r);else this.items.splice(a,0,r)}else this.items.push(r)}delete(e){let t=di(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=di(this.items,e)?.value;return(!t&&Gt.isScalar(n)?n.value:n)??void 0}has(e){return!!di(this.items,e)}set(e,t){this.add(new Zs.Pair(e,t),!0)}toJSON(e,t,r){let n=r?new r:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(n);for(let i of this.items)FN.addPairToJSMap(t,n,i);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!Gt.isPair(n))throw Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);if(!e.allNullValues&&this.hasAllNullValues(!1))e=Object.assign({},e,{allNullValues:!0});return IN.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}YN.YAMLMap=Xg;YN.findPair=di});var hn=v(function(VN){var UN=ee(),ey=Kt(),HN={collection:"map",default:!0,nodeClass:ey.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!UN.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,r)=>ey.YAMLMap.from(e,t,r)};VN.map=HN});var zt=v(function(XN){var KN=oi(),zN=cu(),JN=$s(),ea=ee(),QN=ye(),ZN=Wt();class ty extends JN.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(ea.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){let t=Xs(e);if(typeof t!=="number")return!1;return this.items.splice(t,1).length>0}get(e,t){let r=Xs(e);if(typeof r!=="number")return;let n=this.items[r];return!t&&ea.isScalar(n)?n.value:n}has(e){let t=Xs(e);return typeof t==="number"&&t<this.items.length}set(e,t){let r=Xs(e);if(typeof r!=="number")throw Error(`Expected a valid index, not ${e}.`);let n=this.items[r];if(ea.isScalar(n)&&QN.isScalarValue(t))n.value=t;else this.items[r]=t}toJSON(e,t){let r=[];if(t?.onCreate)t.onCreate(r);let n=0;for(let i of this.items)r.push(ZN.toJS(i,String(n++),t));return r}toString(e,t,r){if(!e)return JSON.stringify(this);return zN.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t})}static from(e,t,r){let{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let l of t){if(typeof n==="function"){let u=t instanceof Set?l:String(a++);l=n.call(t,u,l)}i.items.push(KN.createNode(l,void 0,r))}}return i}}function Xs(e){let t=ea.isScalar(e)?e.value:e;if(t&&typeof t==="string")t=Number(t);return typeof t==="number"&&Number.isInteger(t)&&t>=0?t:null}XN.YAMLSeq=ty});var dn=v(function(nA){var tA=ee(),ry=zt(),rA={collection:"seq",default:!0,nodeClass:ry.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!tA.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,r)=>ry.YAMLSeq.from(e,t,r)};nA.seq=rA});var pi=v(function(oA){var sA=ci(),aA={identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify(e,t,r,n){return t=Object.assign({actualString:!0},t),sA.stringifyString(e,t,r,n)}};oA.string=aA});var ta=v(function(uA){var ny=ye(),iy={identify:(e)=>e==null,createNode:()=>new ny.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ny.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&iy.test.test(e)?e:t.options.nullStr};uA.nullTag=iy});var fu=v(function(hA){var fA=ye(),sy={identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(e)=>new fA.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&sy.test.test(e)){let n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?r.options.trueStr:r.options.falseStr}};hA.boolTag=sy});var pn=v(function(mA){function pA({format:e,minFractionDigits:t,tag:r,value:n}){if(typeof n==="bigint")return String(n);let i=typeof n==="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let a=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(a)&&!a.includes("e")){let l=a.indexOf(".");if(l<0)l=a.length,a+=".";let u=t-(a.length-l-1);while(u-- >0)a+="0"}return a}mA.stringifyNumber=pA});var du=v(function(vA){var yA=ye(),hu=pn(),bA={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:hu.stringifyNumber},wA={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():hu.stringifyNumber(e)}},_A={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new yA.Scalar(parseFloat(e)),r=e.indexOf(".");if(r!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-r-1;return t},stringify:hu.stringifyNumber};vA.float=_A;vA.floatExp=wA;vA.floatNaN=bA});var mu=v(function(TA){var ay=pn(),ra=(e)=>typeof e==="bigint"||Number.isInteger(e),pu=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function oy(e,t,r){let{value:n}=e;if(ra(n)&&n>=0)return r+n.toString(t);return ay.stringifyNumber(e)}var EA={identify:(e)=>ra(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>pu(e,2,8,r),stringify:(e)=>oy(e,8,"0o")},OA={identify:ra,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>pu(e,0,10,r),stringify:ay.stringifyNumber},MA={identify:(e)=>ra(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>pu(e,2,16,r),stringify:(e)=>oy(e,16,"0x")};TA.int=OA;TA.intHex=MA;TA.intOct=EA});var ly=v(function(FA){var LA=hn(),qA=ta(),PA=dn(),RA=pi(),CA=fu(),gu=du(),yu=mu(),IA=[LA.map,PA.seq,RA.string,qA.nullTag,CA.boolTag,yu.intOct,yu.int,yu.intHex,gu.floatNaN,gu.floatExp,gu.float];FA.schema=IA});var cy=v(function(VA){var $A=ye(),YA=hn(),BA=dn();function uy(e){return typeof e==="bigint"||Number.isInteger(e)}var na=({value:e})=>JSON.stringify(e),WA=[{identify:(e)=>typeof e==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(e)=>e,stringify:na},{identify:(e)=>e==null,createNode:()=>new $A.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:na},{identify:(e)=>typeof e==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(e)=>e==="true",stringify:na},{identify:uy,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>uy(e)?e.toString():JSON.stringify(e)},{identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(e)=>parseFloat(e),stringify:na}],UA={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},HA=[YA.map,BA.seq].concat(WA,UA);VA.schema=HA});var wu=v(function(JA){var mi=W("buffer"),bu=ye(),KA=ci(),zA={identify:(e)=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof mi.Buffer==="function")return mi.Buffer.from(e,"base64");else if(typeof atob==="function"){let r=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i<r.length;++i)n[i]=r.charCodeAt(i);return n}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,i,a){if(!r)return"";let l=r,u;if(typeof mi.Buffer==="function")u=l instanceof mi.Buffer?l.toString("base64"):mi.Buffer.from(l.buffer).toString("base64");else if(typeof btoa==="function"){let h="";for(let d=0;d<l.length;++d)h+=String.fromCharCode(l[d]);u=btoa(h)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=bu.Scalar.BLOCK_LITERAL),t!==bu.Scalar.QUOTE_DOUBLE){let h=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),d=Math.ceil(u.length/h),b=Array(d);for(let m=0,g=0;m<d;++m,g+=h)b[m]=u.substr(g,h);u=b.join(t===bu.Scalar.BLOCK_LITERAL?`
|
|
100
|
+
`:" ")}return KA.stringifyString({comment:e,type:t,value:u},n,i,a)}};JA.binary=zA});var sa=v(function(tD){var ia=ee(),_u=Vt(),ZA=ye(),XA=zt();function fy(e,t){if(ia.isSeq(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(ia.isPair(n))continue;else if(ia.isMap(n)){if(n.items.length>1)t("Each pair must have its own sequence indicator");let i=n.items[0]||new _u.Pair(new ZA.Scalar(null));if(n.commentBefore)i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
|
|
101
|
+
${i.key.commentBefore}`:n.commentBefore;if(n.comment){let a=i.value??i.key;a.comment=a.comment?`${n.comment}
|
|
102
|
+
${a.comment}`:n.comment}n=i}e.items[r]=ia.isPair(n)?n:new _u.Pair(n)}else t("Expected a sequence for this tag");return e}function hy(e,t,r){let{replacer:n}=r,i=new XA.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let l of t){if(typeof n==="function")l=n.call(t,String(a++),l);let u,h;if(Array.isArray(l))if(l.length===2)u=l[0],h=l[1];else throw TypeError(`Expected [key, value] tuple: ${l}`);else if(l&&l instanceof Object){let d=Object.keys(l);if(d.length===1)u=d[0],h=l[u];else throw TypeError(`Expected tuple with one key, not ${d.length} keys`)}else u=l;i.items.push(_u.createPair(u,h,r))}return i}var eD={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:fy,createNode:hy};tD.createPairs=hy;tD.pairs=eD;tD.resolvePairs=fy});var Su=v(function(oD){var dy=ee(),vu=Wt(),gi=Kt(),sD=zt(),py=sa();class _r extends sD.YAMLSeq{constructor(){super();this.add=gi.YAMLMap.prototype.add.bind(this),this.delete=gi.YAMLMap.prototype.delete.bind(this),this.get=gi.YAMLMap.prototype.get.bind(this),this.has=gi.YAMLMap.prototype.has.bind(this),this.set=gi.YAMLMap.prototype.set.bind(this),this.tag=_r.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;if(t?.onCreate)t.onCreate(r);for(let n of this.items){let i,a;if(dy.isPair(n))i=vu.toJS(n.key,"",t),a=vu.toJS(n.value,i,t);else i=vu.toJS(n,"",t);if(r.has(i))throw Error("Ordered maps must not include duplicate keys");r.set(i,a)}return r}static from(e,t,r){let n=py.createPairs(e,t,r),i=new this;return i.items=n.items,i}}_r.tag="tag:yaml.org,2002:omap";var aD={collection:"seq",identify:(e)=>e instanceof Map,nodeClass:_r,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=py.resolvePairs(e,t),n=[];for(let{key:i}of r.items)if(dy.isScalar(i))if(n.includes(i.value))t(`Ordered maps must not include duplicate keys: ${i.value}`);else n.push(i.value);return Object.assign(new _r,r)},createNode:(e,t,r)=>_r.from(e,t,r)};oD.YAMLOMap=_r;oD.omap=aD});var wy=v(function(cD){var my=ye();function gy({value:e,source:t},r){if(t&&(e?yy:by).test.test(t))return t;return e?r.options.trueStr:r.options.falseStr}var yy={identify:(e)=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new my.Scalar(!0),stringify:gy},by={identify:(e)=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new my.Scalar(!1),stringify:gy};cD.falseTag=by;cD.trueTag=yy});var _y=v(function(yD){var dD=ye(),ku=pn(),pD={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(e)=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ku.stringifyNumber},mD={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(e)=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():ku.stringifyNumber(e)}},gD={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new dD.Scalar(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let n=e.substring(r+1).replace(/_/g,"");if(n[n.length-1]==="0")t.minFractionDigits=n.length}return t},stringify:ku.stringifyNumber};yD.float=gD;yD.floatExp=mD;yD.floatNaN=pD});var Sy=v(function(ED){var vy=pn(),yi=(e)=>typeof e==="bigint"||Number.isInteger(e);function aa(e,t,r,{intAsBigInt:n}){let i=e[0];if(i==="-"||i==="+")t+=1;if(e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let l=BigInt(e);return i==="-"?BigInt(-1)*l:l}let a=parseInt(e,r);return i==="-"?-1*a:a}function xu(e,t,r){let{value:n}=e;if(yi(n)){let i=n.toString(t);return n<0?"-"+r+i.substr(1):r+i}return vy.stringifyNumber(e)}var vD={identify:yi,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>aa(e,2,2,r),stringify:(e)=>xu(e,2,"0b")},SD={identify:yi,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>aa(e,1,8,r),stringify:(e)=>xu(e,8,"0")},kD={identify:yi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>aa(e,0,10,r),stringify:vy.stringifyNumber},xD={identify:yi,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>aa(e,2,16,r),stringify:(e)=>xu(e,16,"0x")};ED.int=kD;ED.intBin=vD;ED.intHex=xD;ED.intOct=SD});var Eu=v(function(DD){var ua=ee(),oa=Vt(),la=Kt();class vr extends la.YAMLMap{constructor(e){super(e);this.tag=vr.tag}add(e){let t;if(ua.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new oa.Pair(e.key,null);else t=new oa.Pair(e,null);if(!la.findPair(this.items,t.key))this.items.push(t)}get(e,t){let r=la.findPair(this.items,e);return!t&&ua.isPair(r)?ua.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=la.findPair(this.items,e);if(r&&!t)this.items.splice(this.items.indexOf(r),1);else if(!r&&t)this.items.push(new oa.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);else throw Error("Set items must all have null values")}static from(e,t,r){let{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t){if(typeof n==="function")a=n.call(t,a,a);i.items.push(oa.createPair(a,null,r))}return i}}vr.tag="tag:yaml.org,2002:set";var AD={collection:"map",identify:(e)=>e instanceof Set,nodeClass:vr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>vr.from(e,t,r),resolve(e,t){if(ua.isMap(e))if(e.hasAllNullValues(!0))return Object.assign(new vr,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};DD.YAMLSet=vr;DD.set=AD});var Mu=v(function(ID){var PD=pn();function Ou(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,i=(l)=>t?BigInt(l):Number(l),a=n.replace(/_/g,"").split(":").reduce((l,u)=>l*i(60)+i(u),i(0));return r==="-"?i(-1)*a:a}function ky(e){let{value:t}=e,r=(l)=>l;if(typeof t==="bigint")r=(l)=>BigInt(l);else if(isNaN(t)||!isFinite(t))return PD.stringifyNumber(e);let n="";if(t<0)n="-",t*=r(-1);let i=r(60),a=[t%i];if(t<60)a.unshift(0);else if(t=(t-a[0])/i,a.unshift(t%i),t>=60)t=(t-a[0])/i,a.unshift(t);return n+a.map((l)=>String(l).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var RD={identify:(e)=>typeof e==="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>Ou(e,r),stringify:ky},CD={identify:(e)=>typeof e==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(e)=>Ou(e,!1),stringify:ky},xy={identify:(e)=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(xy.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,a,l,u]=t.map(Number),h=t[7]?Number((t[7]+"00").substr(1,3)):0,d=Date.UTC(r,n-1,i,a||0,l||0,u||0,h),b=t[8];if(b&&b!=="Z"){let m=Ou(b,!1);if(Math.abs(m)<30)m*=60;d-=60000*m}return new Date(d)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};ID.floatTime=CD;ID.intTime=RD;ID.timestamp=xy});var Oy=v(function(QD){var YD=hn(),BD=ta(),WD=dn(),UD=pi(),HD=wu(),Ey=wy(),Tu=_y(),ca=Sy(),VD=Gs(),GD=Su(),KD=sa(),zD=Eu(),Nu=Mu(),JD=[YD.map,WD.seq,UD.string,BD.nullTag,Ey.trueTag,Ey.falseTag,ca.intBin,ca.intOct,ca.int,ca.intHex,Tu.floatNaN,Tu.floatExp,Tu.float,HD.binary,VD.merge,GD.omap,KD.pairs,zD.set,Nu.intTime,Nu.floatTime,Nu.timestamp];QD.schema=JD});var Cy=v(function(aL){var Ay=hn(),XD=ta(),Dy=dn(),eL=pi(),tL=fu(),Au=du(),Du=mu(),rL=ly(),nL=cy(),Ly=wu(),bi=Gs(),qy=Su(),Py=sa(),My=Oy(),Ry=Eu(),fa=Mu(),Ty=new Map([["core",rL.schema],["failsafe",[Ay.map,Dy.seq,eL.string]],["json",nL.schema],["yaml11",My.schema],["yaml-1.1",My.schema]]),Ny={binary:Ly.binary,bool:tL.boolTag,float:Au.float,floatExp:Au.floatExp,floatNaN:Au.floatNaN,floatTime:fa.floatTime,int:Du.int,intHex:Du.intHex,intOct:Du.intOct,intTime:fa.intTime,map:Ay.map,merge:bi.merge,null:XD.nullTag,omap:qy.omap,pairs:Py.pairs,seq:Dy.seq,set:Ry.set,timestamp:fa.timestamp},iL={"tag:yaml.org,2002:binary":Ly.binary,"tag:yaml.org,2002:merge":bi.merge,"tag:yaml.org,2002:omap":qy.omap,"tag:yaml.org,2002:pairs":Py.pairs,"tag:yaml.org,2002:set":Ry.set,"tag:yaml.org,2002:timestamp":fa.timestamp};function sL(e,t,r){let n=Ty.get(t);if(n&&!e)return r&&!n.includes(bi.merge)?n.concat(bi.merge):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let a=Array.from(Ty.keys()).filter((l)=>l!=="yaml11").map((l)=>JSON.stringify(l)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${a} or define customTags array`)}if(Array.isArray(e))for(let a of e)i=i.concat(a);else if(typeof e==="function")i=e(i.slice());if(r)i=i.concat(bi.merge);return i.reduce((a,l)=>{let u=typeof l==="string"?Ny[l]:l;if(!u){let h=JSON.stringify(l),d=Object.keys(Ny).map((b)=>JSON.stringify(b)).join(", ");throw Error(`Unknown custom tag ${h}; use one of ${d}`)}if(!a.includes(u))a.push(u);return a},[])}aL.coreKnownTags=iL;aL.getTags=sL});var Pu=v(function(dL){var Lu=ee(),uL=hn(),cL=dn(),fL=pi(),ha=Cy(),hL=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class qu{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:a,toStringDefaults:l}){this.compat=Array.isArray(e)?ha.getTags(e,"compat"):e?ha.getTags(null,e):null,this.name=typeof i==="string"&&i||"core",this.knownTags=n?ha.coreKnownTags:{},this.tags=ha.getTags(t,this.name,r),this.toStringOptions=l??null,Object.defineProperty(this,Lu.MAP,{value:uL.map}),Object.defineProperty(this,Lu.SCALAR,{value:fL.string}),Object.defineProperty(this,Lu.SEQ,{value:cL.seq}),this.sortMapEntries=typeof a==="function"?a:a===!0?hL:null}clone(){let e=Object.create(qu.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}dL.Schema=qu});var Iy=v(function(yL){var mL=ee(),Ru=fi(),wi=li();function gL(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let h=e.directives.toString(e);if(h)r.push(h),n=!0;else if(e.directives.docStart)n=!0}if(n)r.push("---");let i=Ru.createStringifyContext(e,t),{commentString:a}=i.options;if(e.commentBefore){if(r.length!==1)r.unshift("");let h=a(e.commentBefore);r.unshift(wi.indentComment(h,""))}let l=!1,u=null;if(e.contents){if(mL.isNode(e.contents)){if(e.contents.spaceBefore&&n)r.push("");if(e.contents.commentBefore){let b=a(e.contents.commentBefore);r.push(wi.indentComment(b,""))}i.forceBlockIndent=!!e.comment,u=e.contents.comment}let h=u?void 0:()=>l=!0,d=Ru.stringify(e.contents,i,()=>u=null,h);if(u)d+=wi.lineComment(d,"",a(u));if((d[0]==="|"||d[0]===">")&&r[r.length-1]==="---")r[r.length-1]=`--- ${d}`;else r.push(d)}else r.push(Ru.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let h=a(e.comment);if(h.includes(`
|
|
103
|
+
`))r.push("..."),r.push(wi.indentComment(h,""));else r.push(`... ${h}`)}else r.push("...");else{let h=e.comment;if(h&&l)h=h.replace(/^\n+/,"");if(h){if((!l||u)&&r[r.length-1]!=="")r.push("");r.push(wi.indentComment(a(h),""))}}return r.join(`
|
|
104
104
|
`)+`
|
|
105
|
-
`}
|
|
106
|
-
`;l=u+l}if(/[^ ]/.test(l)){let u=1,h=r.linePos[1];if(h?.line===n&&h.col>
|
|
105
|
+
`}yL.stringifyDocument=gL});var _i=v(function(OL){var wL=ai(),mn=$s(),Ke=ee(),_L=Vt(),vL=Wt(),SL=Pu(),kL=Iy(),Cu=Is(),xL=tu(),EL=oi(),Iu=eu();class Fu{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ke.NODE_TYPE,{value:Ke.DOC});let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(r===void 0&&t)r=t,t=void 0;let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:a}=i;if(r?._directives){if(this.directives=r._directives.atDocument(),this.directives.yaml.explicit)a=this.directives.yaml.version}else this.directives=new Iu.Directives({version:a});this.setSchema(a,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(Fu.prototype,{[Ke.NODE_TYPE]:{value:Ke.DOC}});if(e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives)e.directives=this.directives.clone();if(e.schema=this.schema.clone(),e.contents=Ke.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range)e.range=this.range.slice();return e}add(e){if(gn(this.contents))this.contents.add(e)}addIn(e,t){if(gn(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=Cu.anchorNames(this);e.anchor=!t||r.has(t)?Cu.findNewAnchor(t||"a",r):t}return new wL.Alias(e.anchor)}createNode(e,t,r){let n=void 0;if(typeof t==="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let _=(O)=>typeof O==="number"||O instanceof String||O instanceof Number,k=t.filter(_).map(String);if(k.length>0)t=t.concat(k);n=t}else if(r===void 0&&t)r=t,t=void 0;let{aliasDuplicateObjects:i,anchorPrefix:a,flow:l,keepUndefined:u,onTagObj:h,tag:d}=r??{},{onAnchor:b,setAnchors:m,sourceObjects:g}=Cu.createNodeAnchors(this,a||"a"),S={aliasDuplicateObjects:i??!0,keepUndefined:u??!1,onAnchor:b,onTagObj:h,replacer:n,schema:this.schema,sourceObjects:g},y=EL.createNode(e,d,S);if(l&&Ke.isCollection(y))y.flow=!0;return m(),y}createPair(e,t,r={}){let n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new _L.Pair(n,i)}delete(e){return gn(this.contents)?this.contents.delete(e):!1}deleteIn(e){if(mn.isEmptyPath(e)){if(this.contents==null)return!1;return this.contents=null,!0}return gn(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Ke.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){if(mn.isEmptyPath(e))return!t&&Ke.isScalar(this.contents)?this.contents.value:this.contents;return Ke.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Ke.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){if(mn.isEmptyPath(e))return this.contents!==void 0;return Ke.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){if(this.contents==null)this.contents=mn.collectionFromPath(this.schema,[e],t);else if(gn(this.contents))this.contents.set(e,t)}setIn(e,t){if(mn.isEmptyPath(e))this.contents=t;else if(this.contents==null)this.contents=mn.collectionFromPath(this.schema,Array.from(e),t);else if(gn(this.contents))this.contents.setIn(e,t)}setSchema(e,t={}){if(typeof e==="number")e=String(e);let r;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new Iu.Directives({version:"1.1"});r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new Iu.Directives({version:e});r={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;r=null;break;default:{let n=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new SL.Schema(Object.assign(r,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:a}={}){let l={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n==="number"?n:100},u=vL.toJS(this.contents,t??"",l);if(typeof i==="function")for(let{count:h,res:d}of l.anchors.values())i(d,h);return typeof a==="function"?xL.applyReviver(a,{"":u},"",u):u}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return kL.stringifyDocument(this,e)}}function gn(e){if(Ke.isCollection(e))return!0;throw Error("Expected a YAML collection as document contents")}OL.Document=Fu});var vi=v(function(NL){class da extends Error{constructor(e,t,r,n){super();this.name=e,this.code=r,this.message=n,this.pos=t}}class Fy extends da{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class jy extends da{constructor(e,t,r){super("YAMLWarning",e,t,r)}}var TL=(e,t)=>(r)=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map((u)=>t.linePos(u));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let a=i-1,l=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(a>=60&&l.length>80){let u=Math.min(a-39,l.length-79);l="\u2026"+l.substring(u),a-=u-1}if(l.length>80)l=l.substring(0,79)+"\u2026";if(n>1&&/^ *$/.test(l.substring(0,a))){let u=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);if(u.length>80)u=u.substring(0,79)+`\u2026
|
|
106
|
+
`;l=u+l}if(/[^ ]/.test(l)){let u=1,h=r.linePos[1];if(h?.line===n&&h.col>i)u=Math.max(1,Math.min(h.col-i,80-a));let d=" ".repeat(a)+"^".repeat(u);r.message+=`:
|
|
107
107
|
|
|
108
108
|
${l}
|
|
109
109
|
${d}
|
|
110
|
-
`}};
|
|
111
|
-
`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(
|
|
112
|
-
`+_.comment;else u.comment=_.comment;continue}if(_.newlineAfterProp||
|
|
113
|
-
`+
|
|
114
|
-
`+L.comment;else d.comment=L.comment;m=L.end;continue}if(!l&&r.options.strict&&
|
|
115
|
-
`+F;else N.comment=F;L.comment=L.comment.substring(F.length+1)}}}if(!l&&!T&&!L.found){let F=q?e(r,q,L,
|
|
116
|
-
`+I.comment;else N.comment=I.comment;let
|
|
117
|
-
`+
|
|
118
|
-
`.repeat(Math.max(1,l.length-1)):"",
|
|
119
|
-
`;for(let _=b;_<u;++_){let[
|
|
120
|
-
`;else if(
|
|
110
|
+
`}};NL.YAMLError=da;NL.YAMLParseError=Fy;NL.YAMLWarning=jy;NL.prettifyError=TL});var Si=v(function(RL){function PL(e,{flow:t,indicator:r,next:n,offset:i,onError:a,parentIndent:l,startOnNewline:u}){let h=!1,d=u,b=u,m="",g="",S=!1,y=!1,_=null,k=null,O=null,A=null,E=null,T=null,q=null;for(let N of e){if(y){if(N.type!=="space"&&N.type!=="newline"&&N.type!=="comma")a(N.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");y=!1}if(_){if(d&&N.type!=="comment"&&N.type!=="newline")a(_,"TAB_AS_INDENT","Tabs are not allowed as indentation");_=null}switch(N.type){case"space":if(!t&&(r!=="doc-start"||n?.type!=="flow-collection")&&N.source.includes("\t"))_=N;b=!0;break;case"comment":{if(!b)a(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let I=N.source.substring(1)||" ";if(!m)m=I;else m+=g+I;g="",d=!1;break}case"newline":if(d){if(m)m+=N.source;else if(!T||r!=="seq-item-ind")h=!0}else g+=N.source;if(d=!0,S=!0,k||O)A=N;b=!0;break;case"anchor":if(k)a(N,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(N.source.endsWith(":"))a(N.offset+N.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);k=N,q??(q=N.offset),d=!1,b=!1,y=!0;break;case"tag":{if(O)a(N,"MULTIPLE_TAGS","A node can have at most one tag");O=N,q??(q=N.offset),d=!1,b=!1,y=!0;break}case r:if(k||O)a(N,"BAD_PROP_ORDER",`Anchors and tags must be after the ${N.source} indicator`);if(T)a(N,"UNEXPECTED_TOKEN",`Unexpected ${N.source} in ${t??"collection"}`);T=N,d=r==="seq-item-ind"||r==="explicit-key-ind",b=!1;break;case"comma":if(t){if(E)a(N,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);E=N,d=!1,b=!1;break}default:a(N,"UNEXPECTED_TOKEN",`Unexpected ${N.type} token`),d=!1,b=!1}}let L=e[e.length-1],F=L?L.offset+L.source.length:i;if(y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!==""))a(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(_&&(d&&_.indent<=l||n?.type==="block-map"||n?.type==="block-seq"))a(_,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:E,found:T,spaceBefore:h,comment:m,hasNewline:S,anchor:k,tag:O,newlineAfterProp:A,end:F,start:q??F}}RL.resolveProps=PL});var pa=v(function(IL){function ju(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
111
|
+
`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(ju(t.key)||ju(t.value))return!0}return!1;default:return!0}}IL.containsNewline=ju});var $u=v(function(YL){var jL=pa();function $L(e,t,r){if(t?.type==="flow-collection"){let n=t.end[0];if(n.indent===e&&(n.source==="]"||n.source==="}")&&jL.containsNewline(t))r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}YL.flowIndentCheck=$L});var Yu=v(function(UL){var $y=ee();function WL(e,t,r){let{uniqueKeys:n}=e.options;if(n===!1)return!1;let i=typeof n==="function"?n:(a,l)=>a===l||$y.isScalar(a)&&$y.isScalar(l)&&a.value===l.value;return t.some((a)=>i(a.key,r))}UL.mapIncludes=WL});var Hy=v(function(JL){var Yy=Vt(),VL=Kt(),By=Si(),GL=pa(),Wy=$u(),KL=Yu(),Uy="All mapping items must start at the same column";function zL({composeNode:e,composeEmptyNode:t},r,n,i,a){let u=new(a?.nodeClass??VL.YAMLMap)(r.schema);if(r.atRoot)r.atRoot=!1;let h=n.offset,d=null;for(let b of n.items){let{start:m,key:g,sep:S,value:y}=b,_=By.resolveProps(m,{indicator:"explicit-key-ind",next:g??S?.[0],offset:h,onError:i,parentIndent:n.indent,startOnNewline:!0}),k=!_.found;if(k){if(g){if(g.type==="block-seq")i(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in g&&g.indent!==n.indent)i(h,"BAD_INDENT",Uy)}if(!_.anchor&&!_.tag&&!S){if(d=_.end,_.comment)if(u.comment)u.comment+=`
|
|
112
|
+
`+_.comment;else u.comment=_.comment;continue}if(_.newlineAfterProp||GL.containsNewline(g))i(g??m[m.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(_.found?.indent!==n.indent)i(h,"BAD_INDENT",Uy);r.atKey=!0;let O=_.end,A=g?e(r,g,_,i):t(r,O,m,null,_,i);if(r.schema.compat)Wy.flowIndentCheck(n.indent,g,i);if(r.atKey=!1,KL.mapIncludes(r,u.items,A))i(O,"DUPLICATE_KEY","Map keys must be unique");let E=By.resolveProps(S??[],{indicator:"map-value-ind",next:y,offset:A.range[2],onError:i,parentIndent:n.indent,startOnNewline:!g||g.type==="block-scalar"});if(h=E.end,E.found){if(k){if(y?.type==="block-map"&&!E.hasNewline)i(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(r.options.strict&&_.start<E.found.offset-1024)i(A.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let T=y?e(r,y,E,i):t(r,h,S,null,E,i);if(r.schema.compat)Wy.flowIndentCheck(n.indent,y,i);h=T.range[2];let q=new Yy.Pair(A,T);if(r.options.keepSourceTokens)q.srcToken=b;u.items.push(q)}else{if(k)i(A.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(E.comment)if(A.comment)A.comment+=`
|
|
113
|
+
`+E.comment;else A.comment=E.comment;let T=new Yy.Pair(A);if(r.options.keepSourceTokens)T.srcToken=b;u.items.push(T)}}if(d&&d<h)i(d,"IMPOSSIBLE","Map comment with trailing content");return u.range=[n.offset,h,d??h],u}JL.resolveBlockMap=zL});var Vy=v(function(rq){var ZL=zt(),XL=Si(),eq=$u();function tq({composeNode:e,composeEmptyNode:t},r,n,i,a){let u=new(a?.nodeClass??ZL.YAMLSeq)(r.schema);if(r.atRoot)r.atRoot=!1;if(r.atKey)r.atKey=!1;let h=n.offset,d=null;for(let{start:b,value:m}of n.items){let g=XL.resolveProps(b,{indicator:"seq-item-ind",next:m,offset:h,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!g.found)if(g.anchor||g.tag||m)if(m?.type==="block-seq")i(g.end,"BAD_INDENT","All sequence items must start at the same column");else i(h,"MISSING_CHAR","Sequence item without - indicator");else{if(d=g.end,g.comment)u.comment=g.comment;continue}let S=m?e(r,m,g,i):t(r,g.end,b,null,g,i);if(r.schema.compat)eq.flowIndentCheck(n.indent,m,i);h=S.range[2],u.items.push(S)}return u.range=[n.offset,h,d??h],u}rq.resolveBlockSeq=tq});var yn=v(function(sq){function iq(e,t,r,n){let i="";if(e){let a=!1,l="";for(let u of e){let{source:h,type:d}=u;switch(d){case"space":a=!0;break;case"comment":{if(r&&!a)n(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let b=h.substring(1)||" ";if(!i)i=b;else i+=l+b;l="";break}case"newline":if(i)l+=h;a=!0;break;default:n(u,"UNEXPECTED_TOKEN",`Unexpected ${d} at node end`)}t+=h.length}}return{comment:i,offset:t}}sq.resolveEnd=iq});var zy=v(function(pq){var oq=ee(),lq=Vt(),Gy=Kt(),uq=zt(),cq=yn(),Ky=Si(),fq=pa(),hq=Yu(),Bu="Block collections are not allowed within flow collections",Wu=(e)=>e&&(e.type==="block-map"||e.type==="block-seq");function dq({composeNode:e,composeEmptyNode:t},r,n,i,a){let l=n.start.source==="{",u=l?"flow map":"flow sequence",d=new(a?.nodeClass??(l?Gy.YAMLMap:uq.YAMLSeq))(r.schema);d.flow=!0;let b=r.atRoot;if(b)r.atRoot=!1;if(r.atKey)r.atKey=!1;let m=n.offset+n.start.source.length;for(let k=0;k<n.items.length;++k){let O=n.items[k],{start:A,key:E,sep:T,value:q}=O,L=Ky.resolveProps(A,{flow:u,indicator:"explicit-key-ind",next:E??T?.[0],offset:m,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!L.found){if(!L.anchor&&!L.tag&&!T&&!q){if(k===0&&L.comma)i(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`);else if(k<n.items.length-1)i(L.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${u}`);if(L.comment)if(d.comment)d.comment+=`
|
|
114
|
+
`+L.comment;else d.comment=L.comment;m=L.end;continue}if(!l&&r.options.strict&&fq.containsNewline(E))i(E,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0){if(L.comma)i(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`)}else{if(!L.comma)i(L.start,"MISSING_CHAR",`Missing , between ${u} items`);if(L.comment){let F="";e:for(let N of A)switch(N.type){case"comma":case"space":break;case"comment":F=N.source.substring(1);break e;default:break e}if(F){let N=d.items[d.items.length-1];if(oq.isPair(N))N=N.value??N.key;if(N.comment)N.comment+=`
|
|
115
|
+
`+F;else N.comment=F;L.comment=L.comment.substring(F.length+1)}}}if(!l&&!T&&!L.found){let F=q?e(r,q,L,i):t(r,L.end,T,null,L,i);if(d.items.push(F),m=F.range[2],Wu(q))i(F.range,"BLOCK_IN_FLOW",Bu)}else{r.atKey=!0;let F=L.end,N=E?e(r,E,L,i):t(r,F,A,null,L,i);if(Wu(E))i(N.range,"BLOCK_IN_FLOW",Bu);r.atKey=!1;let I=Ky.resolveProps(T??[],{flow:u,indicator:"map-value-ind",next:q,offset:N.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(I.found){if(!l&&!L.found&&r.options.strict){if(T)for(let H of T){if(H===I.found)break;if(H.type==="newline"){i(H,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(L.start<I.found.offset-1024)i(I.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(q)if("source"in q&&q.source?.[0]===":")i(q,"MISSING_CHAR",`Missing space after : in ${u}`);else i(I.start,"MISSING_CHAR",`Missing , or : between ${u} items`);let ne=q?e(r,q,I,i):I.found?t(r,I.end,T,null,I,i):null;if(ne){if(Wu(q))i(ne.range,"BLOCK_IN_FLOW",Bu)}else if(I.comment)if(N.comment)N.comment+=`
|
|
116
|
+
`+I.comment;else N.comment=I.comment;let Z=new lq.Pair(N,ne);if(r.options.keepSourceTokens)Z.srcToken=O;if(l){let H=d;if(hq.mapIncludes(r,H.items,N))i(F,"DUPLICATE_KEY","Map keys must be unique");H.items.push(Z)}else{let H=new Gy.YAMLMap(r.schema);H.flow=!0,H.items.push(Z);let me=(ne??N).range;H.range=[N.range[0],me[1],me[2]],d.items.push(H)}m=ne?ne.range[2]:I.end}}let g=l?"}":"]",[S,...y]=n.end,_=m;if(S?.source===g)_=S.offset+S.source.length;else{let k=u[0].toUpperCase()+u.substring(1),O=b?`${k} must end with a ${g}`:`${k} in block collection must be sufficiently indented and end with a ${g}`;if(i(m,b?"MISSING_CHAR":"BAD_INDENT",O),S&&S.source.length!==1)y.unshift(S)}if(y.length>0){let k=cq.resolveEnd(y,_,r.options.strict,i);if(k.comment)if(d.comment)d.comment+=`
|
|
117
|
+
`+k.comment;else d.comment=k.comment;d.range=[n.offset,_,k.offset]}else d.range=[n.offset,_,_];return d}pq.resolveFlowCollection=dq});var Jy=v(function(xq){var gq=ee(),yq=ye(),bq=Kt(),wq=zt(),_q=Hy(),vq=Vy(),Sq=zy();function Uu(e,t,r,n,i,a){let l=r.type==="block-map"?_q.resolveBlockMap(e,t,r,n,a):r.type==="block-seq"?vq.resolveBlockSeq(e,t,r,n,a):Sq.resolveFlowCollection(e,t,r,n,a),u=l.constructor;if(i==="!"||i===u.tagName)return l.tag=u.tagName,l;if(i)l.tag=i;return l}function kq(e,t,r,n,i){let a=n.tag,l=!a?null:t.directives.tagName(a.source,(g)=>i(a,"TAG_RESOLVE_FAILED",g));if(r.type==="block-seq"){let{anchor:g,newlineAfterProp:S}=n,y=g&&a?g.offset>a.offset?g:a:g??a;if(y&&(!S||S.offset<y.offset))i(y,"MISSING_CHAR","Missing newline after block sequence props")}let u=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!a||!l||l==="!"||l===bq.YAMLMap.tagName&&u==="map"||l===wq.YAMLSeq.tagName&&u==="seq")return Uu(e,t,r,i,l);let h=t.schema.tags.find((g)=>g.tag===l&&g.collection===u);if(!h){let g=t.schema.knownTags[l];if(g?.collection===u)t.schema.tags.push(Object.assign({},g,{default:!1})),h=g;else{if(g)i(a,"BAD_COLLECTION_TYPE",`${g.tag} used for ${u} collection, but expects ${g.collection??"scalar"}`,!0);else i(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${l}`,!0);return Uu(e,t,r,i,l)}}let d=Uu(e,t,r,i,l,h),b=h.resolve?.(d,(g)=>i(a,"TAG_RESOLVE_FAILED",g),t.options)??d,m=gq.isNode(b)?b:new yq.Scalar(b);if(m.range=d.range,m.tag=l,h?.format)m.format=h.format;return m}xq.composeCollection=kq});var Vu=v(function(Nq){var Hu=ye();function Oq(e,t,r){let n=t.offset,i=Mq(t,e.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let a=i.mode===">"?Hu.Scalar.BLOCK_FOLDED:Hu.Scalar.BLOCK_LITERAL,l=t.source?Tq(t.source):[],u=l.length;for(let _=l.length-1;_>=0;--_){let k=l[_][1];if(k===""||k==="\r")u=_;else break}if(u===0){let _=i.chomp==="+"&&l.length>0?`
|
|
118
|
+
`.repeat(Math.max(1,l.length-1)):"",k=n+i.length;if(t.source)k+=t.source.length;return{value:_,type:a,comment:i.comment,range:[n,k,k]}}let h=t.indent+i.indent,d=t.offset+i.length,b=0;for(let _=0;_<u;++_){let[k,O]=l[_];if(O===""||O==="\r"){if(i.indent===0&&k.length>h)h=k.length}else{if(k.length<h)r(d+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(i.indent===0)h=k.length;if(b=_,h===0&&!e.atRoot)r(d,"BAD_INDENT","Block scalar values in collections must be indented");break}d+=k.length+O.length+1}for(let _=l.length-1;_>=u;--_)if(l[_][0].length>h)u=_+1;let m="",g="",S=!1;for(let _=0;_<b;++_)m+=l[_][0].slice(h)+`
|
|
119
|
+
`;for(let _=b;_<u;++_){let[k,O]=l[_];d+=k.length+O.length+1;let A=O[O.length-1]==="\r";if(A)O=O.slice(0,-1);if(O&&k.length<h){let T=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(d-O.length-(A?2:1),"BAD_INDENT",T),k=""}if(a===Hu.Scalar.BLOCK_LITERAL)m+=g+k.slice(h)+O,g=`
|
|
120
|
+
`;else if(k.length>h||O[0]==="\t"){if(g===" ")g=`
|
|
121
121
|
`;else if(!S&&g===`
|
|
122
122
|
`)g=`
|
|
123
123
|
|
|
124
|
-
`;m+=g+
|
|
124
|
+
`;m+=g+k.slice(h)+O,g=`
|
|
125
125
|
`,S=!0}else if(O==="")if(g===`
|
|
126
126
|
`)m+=`
|
|
127
127
|
`;else g=`
|
|
128
|
-
`;else m+=g+O,g=" ",S=!1}switch(
|
|
128
|
+
`;else m+=g+O,g=" ",S=!1}switch(i.chomp){case"-":break;case"+":for(let _=u;_<l.length;++_)m+=`
|
|
129
129
|
`+l[_][0].slice(h);if(m[m.length-1]!==`
|
|
130
130
|
`)m+=`
|
|
131
131
|
`;break;default:m+=`
|
|
132
|
-
`}let y=n+
|
|
132
|
+
`}let y=n+i.length+t.source.length;return{value:m,type:a,comment:i.comment,range:[n,y,y]}}function Mq({offset:e,props:t},r,n){if(t[0].type!=="block-scalar-header")return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],a=i[0],l=0,u="",h=-1;for(let g=1;g<i.length;++g){let S=i[g];if(!u&&(S==="-"||S==="+"))u=S;else{let y=Number(S);if(!l&&y)l=y;else if(h===-1)h=e+g}}if(h!==-1)n(h,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let d=!1,b="",m=i.length;for(let g=1;g<t.length;++g){let S=t[g];switch(S.type){case"space":d=!0;case"newline":m+=S.source.length;break;case"comment":if(r&&!d)n(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");m+=S.source.length,b=S.source.substring(1);break;case"error":n(S,"UNEXPECTED_TOKEN",S.message),m+=S.source.length;break;default:{let y=`Unexpected token in block scalar header: ${S.type}`;n(S,"UNEXPECTED_TOKEN",y);let _=S.source;if(_&&typeof _==="string")m+=_.length}}}return{mode:a,indent:l,chomp:u,comment:b,length:m}}function Tq(e){let t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),a=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let l=1;l<t.length;l+=2)a.push([t[l],t[l+1]]);return a}Nq.resolveBlockScalar=Oq});var Ku=v(function(jq){var Gu=ye(),Dq=yn();function Lq(e,t,r){let{offset:n,type:i,source:a,end:l}=e,u,h,d=(g,S,y)=>r(n+g,S,y);switch(i){case"scalar":u=Gu.Scalar.PLAIN,h=qq(a,d);break;case"single-quoted-scalar":u=Gu.Scalar.QUOTE_SINGLE,h=Pq(a,d);break;case"double-quoted-scalar":u=Gu.Scalar.QUOTE_DOUBLE,h=Rq(a,d);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+a.length,n+a.length]}}let b=n+a.length,m=Dq.resolveEnd(l,b,t,r);return{value:h,type:u,comment:m.comment,range:[n,b,m.offset]}}function qq(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}if(r)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return Qy(e)}function Pq(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return Qy(e.slice(1,-1)).replace(/''/g,"'")}function Qy(e){let t,r;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
133
133
|
`,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
134
|
-
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let
|
|
135
|
-
`)
|
|
136
|
-
`;else
|
|
137
|
-
`)continue;if(
|
|
138
|
-
`){let{fold:a,offset:l}=
|
|
134
|
+
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let i=n[1],a=" ",l=t.lastIndex;r.lastIndex=l;while(n=r.exec(e)){if(n[1]==="")if(a===`
|
|
135
|
+
`)i+=a;else a=`
|
|
136
|
+
`;else i+=a+n[1],a=" ";l=r.lastIndex}let u=/[ \t]*(.*)/sy;return u.lastIndex=l,n=u.exec(e),i+a+(n?.[1]??"")}function Rq(e,t){let r="";for(let n=1;n<e.length-1;++n){let i=e[n];if(i==="\r"&&e[n+1]===`
|
|
137
|
+
`)continue;if(i===`
|
|
138
|
+
`){let{fold:a,offset:l}=Cq(e,n);r+=a,n=l}else if(i==="\\"){let a=e[++n],l=Iq[a];if(l)r+=l;else if(a===`
|
|
139
139
|
`){a=e[n+1];while(a===" "||a==="\t")a=e[++n+1]}else if(a==="\r"&&e[n+1]===`
|
|
140
|
-
`){a=e[++n+1];while(a===" "||a==="\t")a=e[++n+1]}else if(a==="x"||a==="u"||a==="U"){let u=a==="x"?2:a==="u"?4:8;r+=
|
|
140
|
+
`){a=e[++n+1];while(a===" "||a==="\t")a=e[++n+1]}else if(a==="x"||a==="u"||a==="U"){let u=a==="x"?2:a==="u"?4:8;r+=Fq(e,n+1,u,t),n+=u}else{let u=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),r+=u}}else if(i===" "||i==="\t"){let a=n,l=e[n+1];while(l===" "||l==="\t")l=e[++n+1];if(l!==`
|
|
141
141
|
`&&!(l==="\r"&&e[n+2]===`
|
|
142
|
-
`))r+=n>a?e.slice(a,n+1):
|
|
142
|
+
`))r+=n>a?e.slice(a,n+1):i}else r+=i}if(e[e.length-1]!=='"'||e.length===1)t(e.length,"MISSING_CHAR",'Missing closing "quote');return r}function Cq(e,t){let r="",n=e[t+1];while(n===" "||n==="\t"||n===`
|
|
143
143
|
`||n==="\r"){if(n==="\r"&&e[t+2]!==`
|
|
144
144
|
`)break;if(n===`
|
|
145
145
|
`)r+=`
|
|
146
|
-
`;t+=1,n=e[t+1]}if(!r)r=" ";return{fold:r,offset:t}}var
|
|
147
|
-
`,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function
|
|
146
|
+
`;t+=1,n=e[t+1]}if(!r)r=" ";return{fold:r,offset:t}}var Iq={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
147
|
+
`,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function Fq(e,t,r,n){let i=e.substr(t,r),l=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(l)}catch{let u=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}}jq.resolveFlowScalar=Lq});var Xy=v(function(Vq){var Sr=ee(),Zy=ye(),Yq=Vu(),Bq=Ku();function Wq(e,t,r,n){let{value:i,type:a,comment:l,range:u}=t.type==="block-scalar"?Yq.resolveBlockScalar(e,t,n):Bq.resolveFlowScalar(t,e.options.strict,n),h=r?e.directives.tagName(r.source,(m)=>n(r,"TAG_RESOLVE_FAILED",m)):null,d;if(e.options.stringKeys&&e.atKey)d=e.schema[Sr.SCALAR];else if(h)d=Uq(e.schema,i,h,r,n);else if(t.type==="scalar")d=Hq(e,i,t,n);else d=e.schema[Sr.SCALAR];let b;try{let m=d.resolve(i,(g)=>n(r??t,"TAG_RESOLVE_FAILED",g),e.options);b=Sr.isScalar(m)?m:new Zy.Scalar(m)}catch(m){let g=m instanceof Error?m.message:String(m);n(r??t,"TAG_RESOLVE_FAILED",g),b=new Zy.Scalar(i)}if(b.range=u,b.source=i,a)b.type=a;if(h)b.tag=h;if(d.format)b.format=d.format;if(l)b.comment=l;return b}function Uq(e,t,r,n,i){if(r==="!")return e[Sr.SCALAR];let a=[];for(let u of e.tags)if(!u.collection&&u.tag===r)if(u.default&&u.test)a.push(u);else return u;for(let u of a)if(u.test?.test(t))return u;let l=e.knownTags[r];if(l&&!l.collection)return e.tags.push(Object.assign({},l,{default:!1,test:void 0})),l;return i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[Sr.SCALAR]}function Hq({atKey:e,directives:t,schema:r},n,i,a){let l=r.tags.find((u)=>(u.default===!0||e&&u.default==="key")&&u.test?.test(n))||r[Sr.SCALAR];if(r.compat){let u=r.compat.find((h)=>h.default&&h.test?.test(n))??r[Sr.SCALAR];if(l.tag!==u.tag){let h=t.tagString(l.tag),d=t.tagString(u.tag),b=`Value may be parsed as either ${h} or ${d}`;a(i,"TAG_RESOLVE_FAILED",b,!0)}}return l}Vq.composeScalar=Wq});var e0=v(function(zq){function Kq(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let i=t[n];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}i=t[++n];while(i?.type==="space")e+=i.source.length,i=t[++n];break}}return e}zq.emptyScalarPosition=Kq});var n0=v(function(iP){var Qq=ai(),Zq=ee(),Xq=Jy(),t0=Xy(),eP=yn(),tP=e0(),rP={composeNode:r0,composeEmptyNode:zu};function r0(e,t,r,n){let i=e.atKey,{spaceBefore:a,comment:l,anchor:u,tag:h}=r,d,b=!0;switch(t.type){case"alias":if(d=nP(e,t,n),u||h)n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(d=t0.composeScalar(e,t,h,n),u)d.anchor=u.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(d=Xq.composeCollection(rP,e,t,r,n),u)d.anchor=u.source.substring(1)}catch(m){let g=m instanceof Error?m.message:String(m);n(t,"RESOURCE_EXHAUSTION",g)}break;default:{let m=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",m),b=!1}}if(d??(d=zu(e,t.offset,void 0,null,r,n)),u&&d.anchor==="")n(u,"BAD_ALIAS","Anchor cannot be an empty string");if(i&&e.options.stringKeys&&(!Zq.isScalar(d)||typeof d.value!=="string"||d.tag&&d.tag!=="tag:yaml.org,2002:str"))n(h??t,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(a)d.spaceBefore=!0;if(l)if(t.type==="scalar"&&t.source==="")d.comment=l;else d.commentBefore=l;if(e.options.keepSourceTokens&&b)d.srcToken=t;return d}function zu(e,t,r,n,{spaceBefore:i,comment:a,anchor:l,tag:u,end:h},d){let b={type:"scalar",offset:tP.emptyScalarPosition(t,r,n),indent:-1,source:""},m=t0.composeScalar(e,b,u,d);if(l){if(m.anchor=l.source.substring(1),m.anchor==="")d(l,"BAD_ALIAS","Anchor cannot be an empty string")}if(i)m.spaceBefore=!0;if(a)m.comment=a,m.range[2]=h;return m}function nP({options:e},{offset:t,source:r,end:n},i){let a=new Qq.Alias(r.substring(1));if(a.source==="")i(t,"BAD_ALIAS","Alias cannot be an empty string");if(a.source.endsWith(":"))i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let l=t+r.length,u=eP.resolveEnd(n,l,e.strict,i);if(a.range=[t,l,u.offset],u.comment)a.comment=u.comment;return a}iP.composeEmptyNode=zu;iP.composeNode=r0});var s0=v(function(fP){var oP=_i(),i0=n0(),lP=yn(),uP=Si();function cP(e,t,{offset:r,start:n,value:i,end:a},l){let u=Object.assign({_directives:t},e),h=new oP.Document(void 0,u),d={atKey:!1,atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},b=uP.resolveProps(n,{indicator:"doc-start",next:i??a?.[0],offset:r,onError:l,parentIndent:0,startOnNewline:!0});if(b.found){if(h.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!b.hasNewline)l(b.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}h.contents=i?i0.composeNode(d,i,b,l):i0.composeEmptyNode(d,b.end,n,null,b,l);let m=h.contents.range[2],g=lP.resolveEnd(a,m,!1,l);if(g.comment)h.comment=g.comment;return h.range=[r,m,g.offset],h}fP.composeDoc=cP});var Ju=v(function(bP){var dP=W("process"),pP=eu(),mP=_i(),ki=vi(),a0=ee(),gP=s0(),yP=yn();function xi(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+(typeof r==="string"?r.length:1)]}function o0(e){let t="",r=!1,n=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case"#":t+=(t===""?"":n?`
|
|
148
148
|
|
|
149
149
|
`:`
|
|
150
|
-
`)+(a.substring(1)||" "),r=!0,n=!1;break;case"%":if(e[
|
|
151
|
-
${r}`:r;else if(n||e.directives.docStart||!
|
|
152
|
-
${l}`:r}else{let a=
|
|
153
|
-
${a}`:r}}if(t){for(let
|
|
154
|
-
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new
|
|
150
|
+
`)+(a.substring(1)||" "),r=!0,n=!1;break;case"%":if(e[i+1]?.[0]!=="#")i+=1;r=!1;break;default:if(!r)n=!0;r=!1}}return{comment:t,afterEmptyLine:n}}class l0{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,n,i)=>{let a=xi(t);if(i)this.warnings.push(new ki.YAMLWarning(a,r,n));else this.errors.push(new ki.YAMLParseError(a,r,n))},this.directives=new pP.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:n}=o0(this.prelude);if(r){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
151
|
+
${r}`:r;else if(n||e.directives.docStart||!i)e.commentBefore=r;else if(a0.isCollection(i)&&!i.flow&&i.items.length>0){let a=i.items[0];if(a0.isPair(a))a=a.key;let l=a.commentBefore;a.commentBefore=l?`${r}
|
|
152
|
+
${l}`:r}else{let a=i.commentBefore;i.commentBefore=a?`${r}
|
|
153
|
+
${a}`:r}}if(t){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:o0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let n of e)yield*this.next(n);yield*this.end(t,r)}*next(e){if(dP.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{let i=xi(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=gP.composeDoc(this.options,this.directives,e,this.onError);if(this.atDirectives&&!t.directives.docStart)this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(t,!1),this.doc)yield this.doc;this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new ki.YAMLParseError(xi(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(r);else this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){this.errors.push(new ki.YAMLParseError(xi(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=yP.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
|
154
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new ki.YAMLParseError(xi(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),n=new mP.Document(void 0,r);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");n.range=[0,t,t],this.decorate(n,!1),yield n}}}bP.Composer=l0});var f0=v(function(MP){var _P=Vu(),vP=Ku(),SP=vi(),u0=ci();function kP(e,t=!0,r){if(e){let n=(i,a,l)=>{let u=typeof i==="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(u,a,l);else throw new SP.YAMLParseError([u,u+1],a,l)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return vP.resolveFlowScalar(e,t,n);case"block-scalar":return _P.resolveBlockScalar({options:{strict:t}},e,n)}}return null}function xP(e,t){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:a=-1,type:l="PLAIN"}=t,u=u0.stringifyString({type:l,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),h=t.end??[{type:"newline",offset:-1,indent:n,source:`
|
|
155
155
|
`}];switch(u[0]){case"|":case">":{let d=u.indexOf(`
|
|
156
156
|
`),b=u.substring(0,d),m=u.substring(d+1)+`
|
|
157
|
-
`,g=[{type:"block-scalar-header",offset:a,indent:n,source:b}];if(!
|
|
158
|
-
`});return{type:"block-scalar",offset:a,indent:n,props:g,source:m}}case'"':return{type:"double-quoted-scalar",offset:a,indent:n,source:u,end:h};case"'":return{type:"single-quoted-scalar",offset:a,indent:n,source:u,end:h};default:return{type:"scalar",offset:a,indent:n,source:u,end:h}}}function
|
|
159
|
-
`),n=t.substring(0,r),
|
|
160
|
-
`;if(e.type==="block-scalar"){let a=e.props[0];if(a.type!=="block-scalar-header")throw Error("Invalid block scalar header");a.source=n,e.source=
|
|
161
|
-
`});for(let h of Object.keys(e))if(h!=="type"&&h!=="offset")delete e[h];Object.assign(e,{type:"block-scalar",indent:l,props:u,source:
|
|
162
|
-
`};delete e.items,Object.assign(e,{type:r,source:t,end:[
|
|
157
|
+
`,g=[{type:"block-scalar-header",offset:a,indent:n,source:b}];if(!c0(g,h))g.push({type:"newline",offset:-1,indent:n,source:`
|
|
158
|
+
`});return{type:"block-scalar",offset:a,indent:n,props:g,source:m}}case'"':return{type:"double-quoted-scalar",offset:a,indent:n,source:u,end:h};case"'":return{type:"single-quoted-scalar",offset:a,indent:n,source:u,end:h};default:return{type:"scalar",offset:a,indent:n,source:u,end:h}}}function EP(e,t,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:a=!1,type:l}=r,u="indent"in e?e.indent:null;if(n&&typeof u==="number")u+=2;if(!l)switch(e.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{let d=e.props[0];if(d.type!=="block-scalar-header")throw Error("Invalid block scalar header");l=d.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}let h=u0.stringifyString({type:l,value:t},{implicitKey:i||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(h[0]){case"|":case">":OP(e,h);break;case'"':Qu(e,h,"double-quoted-scalar");break;case"'":Qu(e,h,"single-quoted-scalar");break;default:Qu(e,h,"scalar")}}function OP(e,t){let r=t.indexOf(`
|
|
159
|
+
`),n=t.substring(0,r),i=t.substring(r+1)+`
|
|
160
|
+
`;if(e.type==="block-scalar"){let a=e.props[0];if(a.type!=="block-scalar-header")throw Error("Invalid block scalar header");a.source=n,e.source=i}else{let{offset:a}=e,l="indent"in e?e.indent:-1,u=[{type:"block-scalar-header",offset:a,indent:l,source:n}];if(!c0(u,"end"in e?e.end:void 0))u.push({type:"newline",offset:-1,indent:l,source:`
|
|
161
|
+
`});for(let h of Object.keys(e))if(h!=="type"&&h!=="offset")delete e[h];Object.assign(e,{type:"block-scalar",indent:l,props:u,source:i})}}function c0(e,t){if(t)for(let r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function Qu(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{let n=e.props.slice(1),i=t.length;if(e.props[0].type==="block-scalar-header")i-=e.props[0].source.length;for(let a of n)a.offset+=i;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
|
|
162
|
+
`};delete e.items,Object.assign(e,{type:r,source:t,end:[i]});break}default:{let n="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter((a)=>a.type==="space"||a.type==="comment"||a.type==="newline"):[];for(let a of Object.keys(e))if(a!=="type"&&a!=="offset")delete e[a];Object.assign(e,{type:r,indent:n,source:t,end:i})}}}MP.createScalarToken=xP;MP.resolveAsScalar=kP;MP.setScalarValue=EP});var h0=v(function(LP){var DP=(e)=>("type"in e)?ga(e):ma(e);function ga(e){switch(e.type){case"block-scalar":{let t="";for(let r of e.props)t+=ga(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(let r of e.items)t+=ma(r);return t}case"flow-collection":{let t=e.start.source;for(let r of e.items)t+=ma(r);for(let r of e.end)t+=r.source;return t}case"document":{let t=ma(e);if(e.end)for(let r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let r of e.end)t+=r.source;return t}}}function ma({start:e,key:t,sep:r,value:n}){let i="";for(let a of e)i+=a.source;if(t)i+=ga(t);if(r)for(let a of r)i+=a.source;if(n)i+=ga(n);return i}LP.stringify=DP});var m0=v(function(RP){var Zu=Symbol("break visit"),PP=Symbol("skip children"),d0=Symbol("remove item");function kr(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};p0(Object.freeze([]),e,t)}kr.BREAK=Zu;kr.SKIP=PP;kr.REMOVE=d0;kr.itemAtPath=(e,t)=>{let r=e;for(let[n,i]of t){let a=r?.[n];if(a&&"items"in a)r=a.items[i];else return}return r};kr.parentCollection=(e,t)=>{let r=kr.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw Error("Parent collection not found")};function p0(e,t,r){let n=r(t,e);if(typeof n==="symbol")return n;for(let i of["key","value"]){let a=t[i];if(a&&"items"in a){for(let l=0;l<a.items.length;++l){let u=p0(Object.freeze(e.concat([[i,l]])),a.items[l],r);if(typeof u==="number")l=u-1;else if(u===Zu)return Zu;else if(u===d0)a.items.splice(l,1),l-=1}if(typeof n==="function"&&i==="key")n=n(t,e)}}return typeof n==="function"?n(t,e):n}RP.visit=kr});var ya=v(function(WP){var Xu=f0(),IP=h0(),FP=m0(),ec="\uFEFF",tc="\x02",rc="\x18",nc="\x1F",jP=(e)=>!!e&&("items"in e),$P=(e)=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function YP(e){switch(e){case ec:return"<BOM>";case tc:return"<DOC>";case rc:return"<FLOW_END>";case nc:return"<SCALAR>";default:return JSON.stringify(e)}}function BP(e){switch(e){case ec:return"byte-order-mark";case tc:return"doc-mode";case rc:return"flow-error-end";case nc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
163
163
|
`:case`\r
|
|
164
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}
|
|
165
|
-
`:case"\r":case"\t":return!0;default:return!1}}var
|
|
166
|
-
\r `),
|
|
164
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}WP.createScalarToken=Xu.createScalarToken;WP.resolveAsScalar=Xu.resolveAsScalar;WP.setScalarValue=Xu.setScalarValue;WP.stringify=IP.stringify;WP.visit=FP.visit;WP.BOM=ec;WP.DOCUMENT=tc;WP.FLOW_END=rc;WP.SCALAR=nc;WP.isCollection=jP;WP.isScalar=$P;WP.prettyToken=YP;WP.tokenType=BP});var sc=v(function(sR){var Ei=ya();function rt(e){switch(e){case void 0:case" ":case`
|
|
165
|
+
`:case"\r":case"\t":return!0;default:return!1}}var g0=new Set("0123456789ABCDEFabcdef"),nR=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ba=new Set(",[]{}"),iR=new Set(` ,[]{}
|
|
166
|
+
\r `),ic=(e)=>!e||iR.has(e);class y0{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";while(r&&(t||this.hasChars(1)))r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t===`
|
|
167
167
|
`)return!0;if(t==="\r")return this.buffer[e+1]===`
|
|
168
168
|
`;return!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;while(t===" ")t=this.buffer[++r+e];if(t==="\r"){let n=this.buffer[r+e+1];if(n===`
|
|
169
169
|
`||!n&&!this.atEnd)return e+r+1}return t===`
|
|
170
|
-
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&
|
|
171
|
-
`,this.pos),this.lineEndPos=e;if(e===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[e-1]==="\r")e-=1;return this.buffer.substring(this.pos,e)}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===
|
|
172
|
-
`,this.pos);if(n!==-1){while(n!==-1){let
|
|
173
|
-
`,
|
|
174
|
-
`:e=
|
|
175
|
-
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=t;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let
|
|
176
|
-
`,
|
|
177
|
-
`)r=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let
|
|
178
|
-
`&&
|
|
170
|
+
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&rt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;if(typeof e!=="number"||e!==-1&&e<this.pos)e=this.buffer.indexOf(`
|
|
171
|
+
`,this.pos),this.lineEndPos=e;if(e===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[e-1]==="\r")e-=1;return this.buffer.substring(this.pos,e)}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Ei.BOM)yield*this.pushCount(1),e=e.substring(1);if(e[0]==="%"){let t=e.length,r=e.indexOf("#");while(r!==-1){let i=e[r-1];if(i===" "||i==="\t"){t=r-1;break}else r=e.indexOf("#",r+1)}while(!0){let i=e[t-1];if(i===" "||i==="\t")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Ei.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&rt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!rt(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&rt(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ic),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{if(e=yield*this.pushNewline(),e>0)t=yield*this.pushSpaces(!1),this.indentValue=r=t;else t=0;t+=yield*this.pushSpaces(!0)}while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if(r!==-1&&r<this.indentNext&&n[0]!=="#"||r===0&&(n.startsWith("---")||n.startsWith("..."))&&rt(n[3])){if(!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Ei.FLOW_END,yield*this.parseLineStart()}let i=0;while(n[i]===",")i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),n[i]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(ic),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||rt(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")while(t!==-1&&this.buffer[t+1]==="'")t=this.buffer.indexOf("'",t+2);else while(t!==-1){let i=0;while(this.buffer[t-1-i]==="\\")i+=1;if(i%2===0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),n=r.indexOf(`
|
|
172
|
+
`,this.pos);if(n!==-1){while(n!==-1){let i=this.continueScalar(n+1);if(i===-1)break;n=r.indexOf(`
|
|
173
|
+
`,i)}if(n!==-1)t=n-(r[n-1]==="\r"?2:1)}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;while(!0){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil((t)=>rt(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":t+=1;break;case`
|
|
174
|
+
`:e=i,t=0;break;case"\r":{let a=this.buffer[i+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
175
|
+
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=t;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
|
|
176
|
+
`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;r=this.buffer[n];while(r===" ")r=this.buffer[++n];if(r==="\t"){while(r==="\t"||r===" "||r==="\r"||r===`
|
|
177
|
+
`)r=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let i=e-1,a=this.buffer[i];if(a==="\r")a=this.buffer[--i];let l=i;while(a===" ")a=this.buffer[--i];if(a===`
|
|
178
|
+
`&&i>=this.pos&&i+1+t>l)e=i;else break}while(!0);return yield Ei.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,n;while(n=this.buffer[++r])if(n===":"){let i=this.buffer[r+1];if(rt(i)||e&&ba.has(i))break;t=r}else if(rt(n)){let i=this.buffer[r+1];if(n==="\r")if(i===`
|
|
179
179
|
`)r+=1,n=`
|
|
180
|
-
`,
|
|
181
|
-
`){let a=this.continueScalar(r+1);if(a===-1)break;r=Math.max(r,a-2)}}else{if(e&&
|
|
180
|
+
`,i=this.buffer[r+1];else t=r;if(i==="#"||e&&ba.has(i))break;if(n===`
|
|
181
|
+
`){let a=this.continueScalar(r+1);if(a===-1)break;r=Math.max(r,a-2)}}else{if(e&&ba.has(n))break;t=r}if(!n&&!this.atEnd)return this.setNext("plain-scalar");return yield Ei.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc"}*pushCount(e){if(e>0)return yield this.buffer.substr(this.pos,e),this.pos+=e,e;return 0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);if(r)return yield r,this.pos+=r.length,r.length;else if(t)yield"";return 0}*pushIndicators(){let e=0;e:while(!0){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(ic),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(rt(r)||t&&ba.has(r)){if(!t)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];while(!rt(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];while(t)if(nR.has(t))t=this.buffer[++e];else if(t==="%"&&g0.has(this.buffer[e+1])&&g0.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];if(e===`
|
|
182
182
|
`)return yield*this.pushCount(1);else if(e==="\r"&&this.charAt(1)===`
|
|
183
|
-
`)return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r==="\t");let n=t-this.pos;if(n>0)yield this.buffer.substr(this.pos,n),this.pos=t;return n}*pushUntil(e){let t=this.pos,r=this.buffer[t];while(!e(r))r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}
|
|
183
|
+
`)return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r==="\t");let n=t-this.pos;if(n>0)yield this.buffer.substr(this.pos,n),this.pos=t;return n}*pushUntil(e){let t=this.pos,r=this.buffer[t];while(!e(r))r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}sR.Lexer=y0});var ac=v(function(oR){class b0{constructor(){this.lineStarts=[],this.addNewLine=(e)=>this.lineStarts.push(e),this.linePos=(e)=>{let t=0,r=this.lineStarts.length;while(t<r){let i=t+r>>1;if(this.lineStarts[i]<e)t=i+1;else r=i}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}}oR.LineCounter=b0});var oc=v(function(fR){var uR=W("process"),w0=ya(),cR=sc();function Jt(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function _0(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function S0(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function wa(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function bn(e){if(e.length===0)return[];let t=e.length;e:while(--t>=0)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}while(e[++t]?.type==="space");return e.splice(t,e.length)}function _a(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function v0(e){if(e.start.type==="flow-seq-start"){for(let t of e.items)if(t.sep&&!t.value&&!Jt(t.start,"explicit-key-ind")&&!Jt(t.sep,"map-value-ind")){if(t.key)t.value=t.key;if(delete t.key,S0(t.value))if(t.value.end)_a(t.value.end,t.sep);else t.value.end=t.sep;else _a(t.start,t.sep);delete t.sep}}}class k0{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new cR.Lexer,this.onNewLine=e}*parse(e,t=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);if(!t)yield*this.end()}*next(e){if(this.source=e,uR.env.LOG_TOKENS)console.log("|",w0.prettyToken(e));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=w0.tokenType(e);if(!t){let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}else if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let r=this.peek(1);if(t.type==="block-scalar")t.indent="indent"in r?r.indent:0;else if(t.type==="flow-collection"&&r.type==="document")t.indent=0;if(t.type==="flow-collection")v0(t);switch(r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let n=r.items[r.items.length-1];if(n.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=r.items[r.items.length-1];if(n.value)r.items.push({start:[],value:t});else n.value=t;break}case"flow-collection":{let n=r.items[r.items.length-1];if(!n||n.value)r.items.push({start:[],key:t,sep:[]});else if(n.sep)n.value=t;else Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let n=t.items[t.items.length-1];if(n&&!n.sep&&!n.value&&n.start.length>0&&_0(n.start)===-1&&(t.indent===0||n.start.every((i)=>i.type!=="comment"||i.indent<t.indent))){if(r.type==="document")r.end=n.start;else r.items.push({start:n.start});t.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")e.start.push(this.sourceToken);this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{if(_0(e.start)!==-1)yield*this.pop(),yield*this.step();else e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);if(t)this.stack.push(t);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=wa(this.peek(2)),r=bn(t),n;if(e.end)n=e.end,n.push(this.sourceToken),delete e.end;else n=[this.sourceToken];let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
|
|
184
184
|
`)+1;while(t!==0)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
185
|
-
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let r="end"in t.value?t.value.end:void 0;if((Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment")r?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){
|
|
185
|
+
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let r="end"in t.value?t.value.end:void 0;if((Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment")r?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){_a(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",i=[];if(n&&t.sep&&!t.value){let a=[];for(let l=0;l<t.sep.length;++l){let u=t.sep[l];switch(u.type){case"newline":a.push(l);break;case"space":break;case"comment":if(u.indent>e.indent)a.length=0;break;default:a.length=0}}if(a.length>=2)i=t.sep.splice(a[1])}switch(this.type){case"anchor":case"tag":if(n||t.value)i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0;else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"explicit-key-ind":if(!t.sep&&!t.explicitKey)t.start.push(this.sourceToken),t.explicitKey=!0;else if(n||t.value)i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(!t.sep)if(Jt(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let a=bn(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Jt(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(S0(t.key)&&!Jt(t.sep,"newline")){let a=bn(t.start),{key:l,sep:u}=t;u.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:u}]})}else if(i.length>0)t.sep=t.sep.concat(i,this.sourceToken);else t.sep.push(this.sourceToken);else if(!t.sep)Object.assign(t,{key:null,sep:[this.sourceToken]});else if(t.value||n)e.items.push({start:i,key:null,sep:[this.sourceToken]});else if(Jt(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else t.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);if(n||t.value)e.items.push({start:i,key:a,sep:[]}),this.onKeyLine=!0;else if(t.sep)this.stack.push(a);else Object.assign(t,{key:a,sep:[]}),this.onKeyLine=!0;return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Jt(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(r)e.items.push({start:i});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let r="end"in t.value?t.value.end:void 0;if((Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment")r?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){_a(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;if(t.value||Jt(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!t||t.sep)e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return;case"map-value-ind":if(!t||t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!t||t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);if(!t||t.value)e.items.push({start:[],key:n,sep:[]});else if(t.sep)this.stack.push(n);else Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);if(r)this.stack.push(r);else yield*this.pop(),yield*this.step()}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let n=wa(r),i=bn(n);v0(e);let a=e.end.splice(1,e.end.length);a.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
186
186
|
`)+1;while(t!==0)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
187
|
-
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=
|
|
188
|
-
\u2026 (truncated)`:t}function
|
|
189
|
-
`))console.error(`${e}:`),console.error(n);else console.error(`${e}${n?`: ${n}`:""}`);for(let u of
|
|
190
|
-
${JSON.stringify(
|
|
187
|
+
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=wa(e),r=bn(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=wa(e),r=bn(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return!1;if(this.indent<=t)return!1;return e.every((r)=>r.type==="newline"||r.type==="space")}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}fR.Parser=k0});var T0=v(function(_R){var x0=Ju(),dR=_i(),Oi=vi(),pR=au(),mR=ee(),gR=ac(),E0=oc();function O0(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new gR.LineCounter||null,prettyErrors:t}}function yR(e,t={}){let{lineCounter:r,prettyErrors:n}=O0(t),i=new E0.Parser(r?.addNewLine),a=new x0.Composer(t),l=Array.from(a.compose(i.parse(e)));if(n&&r)for(let u of l)u.errors.forEach(Oi.prettifyError(e,r)),u.warnings.forEach(Oi.prettifyError(e,r));if(l.length>0)return l;return Object.assign([],{empty:!0},a.streamInfo())}function M0(e,t={}){let{lineCounter:r,prettyErrors:n}=O0(t),i=new E0.Parser(r?.addNewLine),a=new x0.Composer(t),l=null;for(let u of a.compose(i.parse(e),!0,e.length))if(!l)l=u;else if(l.options.logLevel!=="silent"){l.errors.push(new Oi.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(n&&r)l.errors.forEach(Oi.prettifyError(e,r)),l.warnings.forEach(Oi.prettifyError(e,r));return l}function bR(e,t,r){let n=void 0;if(typeof t==="function")n=t;else if(r===void 0&&t&&typeof t==="object")r=t;let i=M0(e,r);if(!i)return null;if(i.warnings.forEach((a)=>pR.warn(i.options.logLevel,a)),i.errors.length>0)if(i.options.logLevel!=="silent")throw i.errors[0];else i.errors=[];return i.toJS(Object.assign({reviver:n},r))}function wR(e,t,r){let n=null;if(typeof t==="function"||Array.isArray(t))n=t;else if(r===void 0&&t)r=t;if(typeof r==="string")r=r.length;if(typeof r==="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){let{keepUndefined:i}=r??t??{};if(!i)return}if(mR.isDocument(e)&&!n)return e.toString(r);return new dR.Document(e,n,r).toString(r)}_R.parse=bR;_R.parseAllDocuments=yR;_R.parseDocument=M0;_R.stringify=wR});var A0=v(function(IR){var ER=Ju(),OR=_i(),MR=Pu(),lc=vi(),TR=ai(),Qt=ee(),NR=Vt(),AR=ye(),DR=Kt(),LR=zt(),qR=ya(),PR=sc(),RR=ac(),CR=oc(),va=T0(),N0=ii();IR.Composer=ER.Composer;IR.Document=OR.Document;IR.Schema=MR.Schema;IR.YAMLError=lc.YAMLError;IR.YAMLParseError=lc.YAMLParseError;IR.YAMLWarning=lc.YAMLWarning;IR.Alias=TR.Alias;IR.isAlias=Qt.isAlias;IR.isCollection=Qt.isCollection;IR.isDocument=Qt.isDocument;IR.isMap=Qt.isMap;IR.isNode=Qt.isNode;IR.isPair=Qt.isPair;IR.isScalar=Qt.isScalar;IR.isSeq=Qt.isSeq;IR.Pair=NR.Pair;IR.Scalar=AR.Scalar;IR.YAMLMap=DR.YAMLMap;IR.YAMLSeq=LR.YAMLSeq;IR.CST=qR;IR.Lexer=PR.Lexer;IR.LineCounter=RR.LineCounter;IR.Parser=CR.Parser;IR.parse=va.parse;IR.parseAllDocuments=va.parseAllDocuments;IR.parseDocument=va.parseDocument;IR.stringify=va.stringify;IR.visit=N0.visit;IR.visitAsync=N0.visitAsync});var Tn={},Nn=Ja(),{isBunRuntime:Le,isCloudflareRuntime:nf,isNodeRuntime:Sv,hasFileSystemAccess:Ne,console:jr}=Nn,sf=Tn;Qa();function ce(e,t){let r=typeof process<"u"?process.env:void 0,n=r?r[e]:void 0,i=Le?Bun?.env?.[e]:void 0,a=sf[e],l=typeof a==="string"?a:void 0,u=nf?l??n??i:n??i??l;return u===void 0||u===""?t:u}function MC(e,t){if(typeof process<"u")process.env[e]=t;sf[e]=t}function TC(e){globalThis.__hapiRuntimeOverride="cloudflare",af(),Object.assign(Tn,e)}function NC(){delete globalThis.__hapiRuntimeOverride,af()}async function AC(e){if(!Le)throw Error(`File system access not available in this runtime: ${e}`);return await Bun.file(e).text()}async function DC(e){if(!Le)throw Error(`File system access not available in this runtime: ${e}`);return await Bun.file(e).json()}async function LC(e){return Le?await Bun.file(e).exists():!1}function qC(e){if(!Le)throw Error(`File system access not available in this runtime: ${e}`);return Bun.file(e)}function af(){let e=Ja();uf(e),Qa()}function of(){if(Ne)return;if(lf()!==void 0)return;let e=Ja();uf(e),Qa()}function Ja(){let e=lf(),t=kv(e),r=t?!1:xv(e),n=Ev(e,r);return{isBunRuntime:t,isCloudflareRuntime:r,isNodeRuntime:n,hasFileSystemAccess:!r&&(t||n),console:Ov()}}function kv(e){if(e==="bun")return!0;if(e==="cloudflare"||e==="node")return!1;return typeof Bun<"u"}function xv(e){if(e==="cloudflare")return!0;if(e==="bun"||e==="node")return!1;let t=typeof globalThis<"u"?globalThis:void 0,r=t?.navigator?.userAgent??"",n=typeof r==="string"&&r.includes("Cloudflare-Workers"),i=typeof t?.__ENVIRONMENT__==="string"&&t.__ENVIRONMENT__.toLowerCase()==="workerd",a=typeof t?.caches?.default<"u";return n||i||a}function Ev(e,t){if(e==="node")return!0;if(e==="bun"||e==="cloudflare")return!1;if(t)return!1;let r=typeof process<"u"?process.versions?.node:void 0;return typeof r==="string"&&r.length>0}function lf(){return typeof globalThis<"u"?globalThis.__hapiRuntimeOverride:void 0}function Ov(){let e=()=>{},t=typeof console<"u"?console:void 0;if(!t)return{log:e,info:e,warn:e,error:e,debug:e};let r=(i,a)=>typeof i==="function"?i.bind(t):a,n=r(t.log,e);return{log:n,info:r(t.info,n),warn:r(t.warn,n),error:r(t.error,n),debug:r(t.debug,n)}}function uf(e){Le=e.isBunRuntime,nf=e.isCloudflareRuntime,Sv=e.isNodeRuntime,Ne=e.hasFileSystemAccess,jr=e.console}function Qa(){let e=Mv();for(let t of Object.keys(Tn))delete Tn[t];Object.assign(Tn,e)}function Mv(){if(Le)return{...typeof Bun<"u"?Bun.env:{},...typeof process<"u"?process.env:{}};return(typeof process<"u"?process:void 0)?.env??{}}import st from"path";var qt=Ne?cf():ff(),{home:Tv,specs:Nv,config:Av,src:Dv,logs:Xa,certs:Lv,plugins:qv}=qt;function IC(){return{...qt}}function eo(){return Ne?cf():ff()}function cf(){let e=ce("HAPI_HOME"),t=e&&e.trim().length>0?Rv(e):Pv();return hf(t)}function ff(){return hf("/hapi")}function hf(e){return{home:e,specs:st.join(e,"specs"),config:st.join(e,"config"),src:st.join(e,"src"),logs:st.join(e,"logs"),certs:st.join(e,"certs"),plugins:st.join(e,"plugins")}}function Pv(){return st.join(Za(),".hapi")}function Rv(e){let t=e.trim(),r=t==="~"?Za():t.replace(/^~(?=[\\/])/,Za());return st.resolve(r)}function Za(){let e=Le?globalThis.Bun?.env??{}:{},t=e.HOME??e.USERPROFILE??ce("HOME")??ce("USERPROFILE")??Cv(ce("HOMEDRIVE"),ce("HOMEPATH"));return t?st.resolve(t):st.resolve(".")}function Cv(e,t){if(!e||!t)return;return`${e}${t}`}async function Iv(e){if(!Ne)return;try{let t=await import("fs/promises");await t.mkdir(e,{recursive:!0})}catch{}}async function FC(){if(!Ne)return;await Promise.all([Tv,Nv,Av,Dv,Xa,Lv,qv].map(Iv))}function df(e){if(typeof e==="string")return e;if(e&&typeof e.toString==="function")return e.toString();try{return JSON.stringify(e)}catch{return String(e)}}var pf=4000;function mf(e){if(!e)return;let t=e.trim();if(!t)return;return t.length>pf?`${t.slice(0,pf)}
|
|
188
|
+
\u2026 (truncated)`:t}function Fv(){return ce("HAPI_DEBUG")==="true"||ce("NODE_ENV")==="development"||ce("DEBUG")==="true"||process.argv.includes("--dev")}function jv(e){let t=[],r=e.toLowerCase();if(r.includes("wrangler")&&(r.includes("not found")||r.includes("command not found")))t.push("Wrangler CLI not found. Install with: bun add -g wrangler | npm i -g wrangler"),t.push("Then run: hapi cloudflare login");if(r.includes("not authenticated")||r.includes("unauthorized"))t.push("You may need to authenticate: hapi cloudflare login");if(r.includes("bun: command not found")||r.startsWith("bun: "))t.push("Bun runtime not found. Install from https://bun.sh and ensure `bun` is in PATH");if(r.includes("eaddrinuse")||r.includes("address already in use"))t.push("Port is in use. Try a different `--port` or stop the process holding it");if(r.includes("econnrefused")||r.includes("connection refused"))t.push("Connection refused. Ensure the target server is running and reachable");if(r.includes("enotfound")||r.includes("getaddrinfo enotfound"))t.push("Host not found. Check the URL or your network connectivity");if(r.includes("yaml")&&(r.includes("parse")||r.includes("syntax")))t.push("YAML parsing failed. Check the file for syntax/indentation issues");if(r.includes("could not connect")||r.includes("org.freedesktop.secrets")||r.includes("was not provided by any .service files"))t.push("OS secrets service (keyring/D-Bus) is unavailable \u2014 this is unrelated to any file path you passed. "+"Provide the key via a --public-key/--private-key file, a LICENSE_PUBLIC_KEY_PEM/LICENSE_PRIVATE_KEY_PEM env var, or start a session keyring (e.g. dbus-run-session).");else if(r.includes("no such file or directory")||r.includes("enoent"))t.push("File not found. Verify the path or provide the correct argument");if(r.includes("permission denied")||r.includes("eacces"))t.push("Permission denied. Try a different directory or adjust permissions");return t}function $v(e){let t=e,r=t?.stderr?df(t.stderr):void 0,n=t?.stdout?df(t.stdout):void 0,a=mf(r)||mf(n)||t?.message||"Unknown error";return{message:a.trim(),hints:jv(a),stack:t&&typeof t.stack==="string"?t.stack:void 0}}function YC(e,t,r={}){let{message:n,hints:i,stack:a}=$v(t),l=r.showStack??Fv();if(n.includes(`
|
|
189
|
+
`))console.error(`${e}:`),console.error(n);else console.error(`${e}${n?`: ${n}`:""}`);for(let u of i)console.error(`\u2022 ${u}`);if(l&&a)console.error("Stack:"),console.error(a)}class Yv extends Error{exitCode;hints;constructor(e,t={}){super(e);if(this.name="HapiCliError",this.exitCode=t.exitCode??1,this.hints=t.hints??[],t.cause!==void 0)this.cause=t.cause}}import ni from"path";import on from"fs";var Ae=null;of();if(Ne)try{let e=await Promise.resolve().then(() => za(Ul(),1));await Promise.resolve().then(() => za(yg(),1)),Ae=e.default??e}catch{Ae=null}var oM=typeof globalThis.it==="function"&&typeof globalThis.describe==="function",_g=Le&&typeof globalThis.Bun<"u"&&Array.isArray(globalThis.Bun.argv)&&globalThis.Bun.argv.includes("test")||oM,bg=()=>{let e=ce("NODE_ENV");return e==="production"||!e||e!=="development"},wg=ce("LOG_DIR"),lM=()=>_g?ni.resolve(process.cwd(),".test-hapi-home/logs"):Xa;Ae?.addColors({http:"magenta",debug:"grey"});var uM=Ae?.format.colorize(),cM=Ae?Ae.format.combine(Ae.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),Ae.format.printf((e)=>{let{timestamp:t,level:r,message:n,...i}=e,a=Object.keys(i).length?`
|
|
190
|
+
${JSON.stringify(i,null,2)}`:"";return uM?.colorize(r,`${t} [${r.toUpperCase()}]: ${n}${a}`)??`${t} [${r.toUpperCase()}]: ${n}${a}`})):void 0,fM=Ae?Ae.format.combine(Ae.format.timestamp(),Ae.format.json()):void 0,hM=(e)=>{let t=`[${e}]`,r=(n,...i)=>{(jr[n]??jr.log)(t,...i)};return{log:(n,...i)=>{(jr[typeof n==="string"?n:"log"]??jr.log)(t,...i)},info:(...n)=>r("info",...n),warn:(...n)=>r("warn",...n),error:(...n)=>r("error",...n),debug:(...n)=>r("debug",...n)}};function dM(e){let t=typeof e==="string"?{projectname:e}:e,r=t.projectname,n=ce("NODE_ENV")==="test"||_g,i=t.disableFileLogs||n&&ce("HAPI_ENABLE_TEST_FILE_LOGS")!=="true"||ce("HAPI_DISABLE_FILE_LOGS")==="true";if(!Ae)return hM(r);let a=t.logDir?ni.resolve(t.logDir):wg?ni.resolve(wg):lM(),l=!i;if(l&&Ne)try{on.mkdirSync(a,{recursive:!0});try{on.accessSync(a,on.constants.W_OK)}catch{throw Error("No write permission in log dir")}}catch{try{a=ni.resolve(process.cwd(),".test-hapi-home/logs"),on.mkdirSync(a,{recursive:!0}),on.accessSync(a,on.constants.W_OK)}catch{l=!1}}let u=[];if(l)u.push(new Ae.transports.DailyRotateFile({filename:ni.join(a,`${r}-hapi-%DATE%.log`),datePattern:"YYYY-MM-DD",maxSize:"20m",maxFiles:"14d",format:fM}));if(!bg()||i||!l)u.push(new Ae.transports.Console({format:cM}));return Ae.createLogger({level:bg()?ce("HAPI_LOG_LEVEL_PROD")??"info":ce("HAPI_LOG_LEVEL_DEV")??"debug",transports:u})}var Ql=null;function ri(){if(!Ql){let e=ce("HAPI_PROJECT_NAME")??"hapi";Ql=dM(e)}return Ql}var FI={log:(...e)=>ri().log(...e),info:(...e)=>ri().info(...e),warn:(...e)=>ri().warn(...e),error:(...e)=>ri().error(...e),debug:(...e)=>ri().debug(...e)};import cc from"path";var dC=["config","hapi.config"],pC=[".json",".yaml",".yml"],D0={},je=null;async function oj(e={}){if(je&&!e.force)return je;if(!Ne)return je=D0.global??{},uc(je),je;let t=await gC(eo().config);if(!t)return je={},uc(je),je;return je=await mC(t)??{},uc(je),je}async function lj(e){if(je={...e},!Ne){D0.global=je;return}let t=await import("fs/promises"),r=eo().config;await t.mkdir(r,{recursive:!0});let n=cc.join(r,"config.json");await t.writeFile(n,JSON.stringify(e,null,2),"utf8")}async function mC(e){if(!Ne)return null;let t=cc.extname(e).toLowerCase();try{let r=await yC(e);if(!r)return null;if(t===".json")return JSON.parse(r);if(t===".yaml"||t===".yml"){let n=await Promise.resolve().then(() => za(A0(),1));return n.parse(r)}return r}catch{return null}}async function gC(e){let t=await import("fs/promises");for(let r of dC)for(let n of pC){let i=cc.join(e,`${r}${n}`);try{return await t.access(i),i}catch{}}return null}async function yC(e){if(Le&&typeof globalThis.Bun<"u")try{return await globalThis.Bun.file(e).text()}catch{return null}try{let t=await import("fs/promises");return await t.readFile(e,"utf8")}catch{return null}}function uc(e){let t=ce("HAPI_INFRA_PROVIDER");if(t)e.infraProvider=t;let r=ce("HAPI_ANALYTICS_OPTOUT");if(r==="true"||r==="1")e.analyticsOptout=!0;let n=ce("HAPI_PLUGINS");if(n)e.plugins=n.split(",").map((i)=>i.trim()).filter(Boolean)}function uj(){je=null}var Sa=new Map;function fc(){if(!Le)return null;let e=globalThis.Bun?.secrets;if(!e||typeof e.get!=="function")return null;return e}var ka=(e,t)=>`${e}::${t}`;async function hj(e,t){let r=fc();if(r)try{return await r.get({service:e,name:t})}catch{return Sa.get(ka(e,t))??null}return Sa.get(ka(e,t))??null}async function dj(e,t,r){let n=fc();if(n)try{await n.set({service:e,name:t,value:r});return}catch{}Sa.set(ka(e,t),r)}async function pj(e,t){let r=fc();if(r)try{await r.delete({service:e,name:t});return}catch{}Sa.delete(ka(e,t))}import{readdir as bC,realpath as L0,readFile as wC}from"fs/promises";import xr from"path";class ie extends Error{constructor(e){super(e);this.name="HapiWorkspaceError"}}function wj(e,t=process.env){let r=[],n,i;for(let a=0;a<e.length;a+=1){let l=e[a]??"";if(l==="--workspace"||l==="--profile"){let u=e[++a];if(!u||u.startsWith("--"))throw new ie(`Missing value for ${l}`);if(l==="--workspace")n=u;else i=u;continue}if(l.startsWith("--workspace=")){n=l.slice(12);continue}if(l.startsWith("--profile=")){i=l.slice(10);continue}r.push(l)}return{argv:r,selector:n??t.HAPI_WORKSPACE,profile:i}}async function _j(e,t,r=process.cwd()){if(!e)return;if(!Ne)throw new ie("HAPI workspaces require native filesystem access.");let n=xr.resolve(r,e),i=await _C(n);if(!i.endsWith(".hapi-workspace"))throw new ie("Workspace files must end in .hapi-workspace.");let a=xr.dirname(i),l=await wC(i,"utf8"),u;try{u=JSON.parse(l)}catch{throw new ie(`Invalid JSON workspace descriptor: ${i}`)}let h=vC(u),d={source:await xa(a,h.paths?.source??"src"),contracts:await xa(a,h.paths?.contracts??"contracts"),state:await xa(a,h.paths?.state??".hapi")},b=t??h.defaultProfile,m=EC(h,b);if(m?.spec&&!/^[a-z][a-z0-9+.-]*:/i.test(m.spec))m.spec=await xa(a,m.spec);return{descriptor:i,root:a,id:h.id,name:h.name,paths:d,profile:b,profileSettings:m,plugins:{required:h.plugins?.required??[],optional:h.plugins?.optional??[]}}}async function _C(e){try{let t=(await bC(e)).filter((r)=>r.endsWith(".hapi-workspace"));if(t.length!==1)throw new ie(`Workspace directory must contain exactly one *.hapi-workspace file: ${e}`);return xr.join(e,t[0]??"")}catch(t){if(t instanceof ie)throw t;return e}}function vC(e){if(!Er(e)||e.hapiWorkspace!==1)throw new ie("Workspace must declare hapiWorkspace: 1.");let t=new Set(["hapiWorkspace","id","name","paths","plugins","profiles","defaultProfile"]);for(let r of Object.keys(e))if(!t.has(r))throw new ie(`Unsupported workspace field: ${r}`);if(typeof e.id!=="string"||!/^[a-z0-9]+(?:[a-z0-9-]*[a-z0-9])?$/.test(e.id))throw new ie("Workspace id must be a lowercase stable slug.");if(e.name!==void 0&&typeof e.name!=="string")throw new ie("Workspace name must be a string.");return SC(e.paths),kC(e.plugins),xC(e.profiles,e.defaultProfile),e}function SC(e){if(e===void 0)return;if(!Er(e))throw new ie("Workspace paths must be an object.");for(let[t,r]of Object.entries(e))if(!["source","contracts","state"].includes(t)||typeof r!=="string"||xr.isAbsolute(r)||r.split(/[\\/]+/).includes(".."))throw new ie(`Unsafe workspace path: paths.${t}`)}function kC(e){if(e===void 0)return;if(!Er(e))throw new ie("Workspace plugins must be an object.");for(let t of Object.keys(e)){if(!["required","optional"].includes(t)||!Array.isArray(e[t]))throw new ie(`Invalid workspace plugins.${t}`);for(let r of e[t])if(!Er(r)||typeof r.name!=="string"||typeof r.version!=="string"||!/^(?:@[\w.-]+\/)?[\w.-]+$/.test(r.name))throw new ie(`Invalid workspace plugin declaration in ${t}.`)}}function xC(e,t){if(e===void 0){if(t!==void 0)throw new ie("defaultProfile requires profiles.");return}if(!Er(e))throw new ie("Workspace profiles must be an object.");if(t!==void 0&&(typeof t!=="string"||!e[t]))throw new ie("defaultProfile must name a profile.");for(let[r,n]of Object.entries(e)){if(!Er(n)||n.extends!==void 0&&typeof n.extends!=="string")throw new ie(`Invalid workspace profile: ${r}`);if(n.serve!==void 0){if(!Er(n.serve)||Object.keys(n.serve).some((i)=>!["spec","capabilityClassifier","runtimeAuthority","mcp","capabilityGraph","capabilityPlanning"].includes(i)))throw new ie(`Unsupported setting in workspace profile: ${r}`);for(let i of["spec","capabilityClassifier"])if(n.serve[i]!==void 0&&typeof n.serve[i]!=="string")throw new ie(`Invalid workspace profile setting: ${r}.${i}`);for(let i of["mcp","capabilityGraph","capabilityPlanning"])if(n.serve[i]!==void 0&&typeof n.serve[i]!=="boolean")throw new ie(`Invalid workspace profile setting: ${r}.${i}`);if(n.serve.runtimeAuthority!==void 0&&!["decision","guarded"].includes(n.serve.runtimeAuthority))throw new ie(`Invalid workspace profile setting: ${r}.runtimeAuthority`)}}}function EC(e,t){if(!t)return;let r=e.profiles??{},n=new Set,i=(a)=>{if(n.has(a))throw new ie(`Cyclic workspace profile inheritance: ${a}`);let l=r[a];if(!l)throw new ie(`Unknown workspace profile: ${a}`);return n.add(a),{...l.extends?i(l.extends):{},...l.serve??{}}};return i(t)}async function xa(e,t){let r=xr.resolve(e,t);if(r!==e&&!r.startsWith(`${e}${xr.sep}`))throw new ie(`Workspace path escapes root: ${t}`);try{let[n,i]=await Promise.all([L0(e),L0(r)]);if(i!==n&&!i.startsWith(`${n}${xr.sep}`))throw new ie(`Workspace path resolves outside root: ${t}`)}catch(n){if(n instanceof ie)throw n}return r}function Er(e){return Boolean(e)&&typeof e==="object"&&!Array.isArray(e)}export{Yv as HapiCliError,ie as HapiWorkspaceError,uj as clearConfigCache,dM as createLogger,pj as deleteSecret,FC as ensureAllHapiDirs,Iv as ensureHapiDir,of as ensureRuntimeSynchronized,LC as fileExists,$v as formatCliError,qC as getBunFile,ce as getEnvVar,IC as getHapiPaths,hj as getSecret,Lv as hapiCerts,Av as hapiConfig,Tv as hapiHome,Xa as hapiLogs,qv as hapiPlugins,Nv as hapiSpecs,Dv as hapiSrc,Ne as hasFileSystemAccess,TC as initializeCloudflareRuntime,Le as isBunRuntime,nf as isCloudflareRuntime,Fv as isDebugEnabled,Sv as isNodeRuntime,oj as loadGlobalConfig,FI as logger,Rv as normalizeHapiHomePath,wj as parseWorkspaceBootstrap,YC as printCliError,mC as readConfigFile,DC as readJsonFile,AC as readTextFile,af as refreshRuntimeEnvironment,NC as resetRuntimeForTests,eo as resolveHapiPaths,_j as resolveHapiWorkspace,jr as runtimeConsole,sf as runtimeEnv,lj as saveGlobalConfig,MC as setEnvVar,dj as setSecret};
|