@bigbinary/neeto-playwright-reporter 3.0.0-beta.1 → 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/extractReporterConfig.mjs +95 -0
- package/bin/neetoplaydash.mjs +106 -14
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -6,5 +6,5 @@ import e from"os";import t from"domain";import n,{readFileSync as i}from"fs";imp
|
|
|
6
6
|
* MIT Licensed
|
|
7
7
|
*/
|
|
8
8
|
function(e){var t,n,i,a=si.exports,r=o.extname,s=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function u(e){if(!e||"string"!=typeof e)return!1;var t=s.exec(e),n=t&&a[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!c.test(t[1]))&&"UTF-8"}e.charset=u,e.charsets={lookup:u},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var n=-1===t.indexOf("/")?e.lookup(t):t;if(!n)return!1;if(-1===n.indexOf("charset")){var i=e.charset(n);i&&(n+="; charset="+i.toLowerCase())}return n},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var n=s.exec(t),i=n&&e.extensions[n[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var n=r("x."+t).toLowerCase().substr(1);if(!n)return!1;return e.types[n]||!1},e.types=Object.create(null),t=e.extensions,n=e.types,i=["nginx","apache",void 0,"iana"],Object.keys(a).forEach(function(e){var o=a[e],r=o.extensions;if(r&&r.length){t[e]=r;for(var s=0;s<r.length;s++){var c=r[s];if(n[c]){var u=i.indexOf(a[n[c]].source),p=i.indexOf(o.source);if("application/octet-stream"!==n[c]&&(u>p||u===p&&"application/"===n[c].substr(0,12)))continue}n[c]=e}}})}(ri);var ci=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)},ui=function(e){var t=!1;return ci(function(){t=!0}),function(n,i){t?e(n,i):ci(function(){e(n,i)})}};var pi=function(e){Object.keys(e.jobs).forEach(li.bind(e)),e.jobs={}};function li(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}var di=ui,mi=pi,fi=function(e,t,n,i){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=function(e,t,n,i){var o;o=2==e.length?e(n,di(i)):e(n,t,di(i));return o}(t,o,e[o],function(e,t){o in n.jobs&&(delete n.jobs[o],e?mi(n):n.results[o]=t,i(e,n.results))})};var hi=function(e,t){var n=!Array.isArray(e),i={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};t&&i.keyedList.sort(n?t:function(n,i){return t(e[n],e[i])});return i};var vi=pi,xi=ui,gi=function(e){if(!Object.keys(this.jobs).length)return;this.index=this.size,vi(this),xi(e)(null,this.results)};var bi=fi,yi=hi,Di=gi,wi=function(e,t,n){var i=yi(e);for(;i.index<(i.keyedList||e).length;)bi(e,t,i,function(e,t){e?n(e,t):0!==Object.keys(i.jobs).length||n(null,i.results)}),i.index++;return Di.bind(i,n)};var _i={exports:{}},Ei=fi,Ci=hi,Fi=gi;function Ti(e,t){return e<t?-1:e>t?1:0}_i.exports=function(e,t,n,i){var o=Ci(e,n);return Ei(e,t,o,function n(a,r){a?i(a,r):(o.index++,o.index<(o.keyedList||e).length?Ei(e,t,o,n):i(null,o.results))}),Fi.bind(o,i)},_i.exports.ascending=Ti,_i.exports.descending=function(e,t){return-1*Ti(e,t)};var Ai=_i.exports,ki=function(e,t,n){return Ai(e,t,null,n)};var ji,Si,Oi={parallel:wi,serial:ki,serialOrdered:_i.exports},Ri=Object,Bi=Error,Pi=EvalError,Ii=RangeError,Ni=ReferenceError,Li=SyntaxError;function Ui(){return Si?ji:(Si=1,ji=TypeError)}var zi=URIError,qi=Math.abs,Mi=Math.floor,Hi=Math.max,$i=Math.min,Gi=Math.pow,Ki=Math.round,Wi=Number.isNaN||function(e){return e!=e},Vi=Object.getOwnPropertyDescriptor;if(Vi)try{Vi([],"length")}catch(e){Vi=null}var Yi=Vi,Ji=Object.defineProperty||!1;if(Ji)try{Ji({},"a",{value:1})}catch(e){Ji=!1}var Xi,Zi,Qi,eo,to,no,io,oo,ao=Ji;function ro(){return Zi?Xi:(Zi=1,Xi=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var i in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0})}function so(){return no?to:(no=1,to="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function co(){return oo?io:(oo=1,io=Ri.getPrototypeOf||null)}var uo,po,lo,mo,fo,ho,vo,xo,go,bo,yo,Do,wo,_o,Eo=Object.prototype.toString,Co=Math.max,Fo=function(e,t){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},To=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Eo.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,i=function(e,t){for(var n=[],i=t,o=0;i<e.length;i+=1,o+=1)n[o]=e[i];return n}(arguments,1),o=Co(0,t.length-i.length),a=[],r=0;r<o;r++)a[r]="$"+r;if(n=Function("binder","return function ("+function(e,t){for(var n="",i=0;i<e.length;i+=1)n+=e[i],i+1<e.length&&(n+=t);return n}(a,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var o=t.apply(this,Fo(i,arguments));return Object(o)===o?o:this}return t.apply(e,Fo(i,arguments))}),t.prototype){var s=function(){};s.prototype=t.prototype,n.prototype=new s,s.prototype=null}return n},Ao=Function.prototype.bind||To;function ko(){return po?uo:(po=1,uo=Function.prototype.call)}function jo(){return mo?lo:(mo=1,lo=Function.prototype.apply)}function So(){if(xo)return vo;xo=1;var e=Ao,t=jo(),n=ko(),i=ho?fo:(ho=1,fo="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return vo=i||e.call(n,t)}function Oo(){if(Do)return yo;Do=1;var e,t=function(){if(bo)return go;bo=1;var e=Ao,t=Ui(),n=ko(),i=So();return go=function(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return i(e,n,o)}}(),n=Yi;try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var i=!!e&&n&&n(Object.prototype,"__proto__"),o=Object,a=o.getPrototypeOf;return yo=i&&"function"==typeof i.get?t([i.get]):"function"==typeof a&&function(e){return a(null==e?e:o(e))}}var Ro,Bo=Function.prototype.call,Po=Object.prototype.hasOwnProperty,Io=Ao.call(Bo,Po),No=Ri,Lo=Bi,Uo=Pi,zo=Ii,qo=Ni,Mo=Li,Ho=Ui(),$o=zi,Go=qi,Ko=Mi,Wo=Hi,Vo=$i,Yo=Gi,Jo=Ki,Xo=function(e){return Wi(e)||0===e?e:e<0?-1:1},Zo=Function,Qo=function(e){try{return Zo('"use strict"; return ('+e+").constructor;")()}catch(e){}},ea=Yi,ta=ao,na=function(){throw new Ho},ia=ea?function(){try{return na}catch(e){try{return ea(arguments,"callee").get}catch(e){return na}}}():na,oa=function(){if(eo)return Qi;eo=1;var e="undefined"!=typeof Symbol&&Symbol,t=ro();return Qi=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}()(),aa=function(){if(_o)return wo;_o=1;var e=so(),t=co(),n=Oo();return wo=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:n?function(e){return n(e)}:null}(),ra=co(),sa=so(),ca=jo(),ua=ko(),pa={},la="undefined"!=typeof Uint8Array&&aa?aa(Uint8Array):Ro,da={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?Ro:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?Ro:ArrayBuffer,"%ArrayIteratorPrototype%":oa&&aa?aa([][Symbol.iterator]()):Ro,"%AsyncFromSyncIteratorPrototype%":Ro,"%AsyncFunction%":pa,"%AsyncGenerator%":pa,"%AsyncGeneratorFunction%":pa,"%AsyncIteratorPrototype%":pa,"%Atomics%":"undefined"==typeof Atomics?Ro:Atomics,"%BigInt%":"undefined"==typeof BigInt?Ro:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?Ro:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?Ro:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?Ro:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Lo,"%eval%":eval,"%EvalError%":Uo,"%Float16Array%":"undefined"==typeof Float16Array?Ro:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?Ro:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?Ro:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?Ro:FinalizationRegistry,"%Function%":Zo,"%GeneratorFunction%":pa,"%Int8Array%":"undefined"==typeof Int8Array?Ro:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?Ro:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?Ro:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":oa&&aa?aa(aa([][Symbol.iterator]())):Ro,"%JSON%":"object"==typeof JSON?JSON:Ro,"%Map%":"undefined"==typeof Map?Ro:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&oa&&aa?aa((new Map)[Symbol.iterator]()):Ro,"%Math%":Math,"%Number%":Number,"%Object%":No,"%Object.getOwnPropertyDescriptor%":ea,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?Ro:Promise,"%Proxy%":"undefined"==typeof Proxy?Ro:Proxy,"%RangeError%":zo,"%ReferenceError%":qo,"%Reflect%":"undefined"==typeof Reflect?Ro:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?Ro:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&oa&&aa?aa((new Set)[Symbol.iterator]()):Ro,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Ro:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":oa&&aa?aa(""[Symbol.iterator]()):Ro,"%Symbol%":oa?Symbol:Ro,"%SyntaxError%":Mo,"%ThrowTypeError%":ia,"%TypedArray%":la,"%TypeError%":Ho,"%Uint8Array%":"undefined"==typeof Uint8Array?Ro:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Ro:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?Ro:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?Ro:Uint32Array,"%URIError%":$o,"%WeakMap%":"undefined"==typeof WeakMap?Ro:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?Ro:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?Ro:WeakSet,"%Function.prototype.call%":ua,"%Function.prototype.apply%":ca,"%Object.defineProperty%":ta,"%Object.getPrototypeOf%":ra,"%Math.abs%":Go,"%Math.floor%":Ko,"%Math.max%":Wo,"%Math.min%":Vo,"%Math.pow%":Yo,"%Math.round%":Jo,"%Math.sign%":Xo,"%Reflect.getPrototypeOf%":sa};if(aa)try{null.error}catch(e){var ma=aa(aa(e));da["%Error.prototype%"]=ma}var fa,ha,va=function e(t){var n;if("%AsyncFunction%"===t)n=Qo("async function () {}");else if("%GeneratorFunction%"===t)n=Qo("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=Qo("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&aa&&(n=aa(o.prototype))}return da[t]=n,n},xa={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ga=Ao,ba=Io,ya=ga.call(ua,Array.prototype.concat),Da=ga.call(ca,Array.prototype.splice),wa=ga.call(ua,String.prototype.replace),_a=ga.call(ua,String.prototype.slice),Ea=ga.call(ua,RegExp.prototype.exec),Ca=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Fa=/\\(\\)?/g,Ta=function(e,t){var n,i=e;if(ba(xa,i)&&(i="%"+(n=xa[i])[0]+"%"),ba(da,i)){var o=da[i];if(o===pa&&(o=va(i)),void 0===o&&!t)throw new Ho("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new Mo("intrinsic "+e+" does not exist!")};var Aa=function(e,t){if("string"!=typeof e||0===e.length)throw new Ho("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Ho('"allowMissing" argument must be a boolean');if(null===Ea(/^%?[^%]*%?$/,e))throw new Mo("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=_a(e,0,1),n=_a(e,-1);if("%"===t&&"%"!==n)throw new Mo("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new Mo("invalid intrinsic syntax, expected opening `%`");var i=[];return wa(e,Ca,function(e,t,n,o){i[i.length]=n?wa(o,Fa,"$1"):t||e}),i}(e),i=n.length>0?n[0]:"",o=Ta("%"+i+"%",t),a=o.name,r=o.value,s=!1,c=o.alias;c&&(i=c[0],Da(n,ya([0,1],c)));for(var u=1,p=!0;u<n.length;u+=1){var l=n[u],d=_a(l,0,1),m=_a(l,-1);if(('"'===d||"'"===d||"`"===d||'"'===m||"'"===m||"`"===m)&&d!==m)throw new Mo("property names with quotes must have matching quotes");if("constructor"!==l&&p||(s=!0),ba(da,a="%"+(i+="."+l)+"%"))r=da[a];else if(null!=r){if(!(l in r)){if(!t)throw new Ho("base intrinsic for "+e+" exists, but the property is not available.");return}if(ea&&u+1>=n.length){var f=ea(r,l);r=(p=!!f)&&"get"in f&&!("originalValue"in f.get)?f.get:r[l]}else p=ba(r,l),r=r[l];p&&!s&&(da[a]=r)}}return r}("%Object.defineProperty%",!0),ka=function(){if(ha)return fa;ha=1;var e=ro();return fa=function(){return e()&&!!Symbol.toStringTag}}()(),ja=Io,Sa=Ui(),Oa=ka?Symbol.toStringTag:null,Ra=oi,Ba=r,Pa=o,Ia=c,Na=u,La=s.parse,Ua=n,za=l.Stream,qa=m,Ma=ri,Ha=Oi,$a=function(e,t){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(void 0!==n&&"boolean"!=typeof n||void 0!==i&&"boolean"!=typeof i)throw new Sa("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");!Oa||!n&&ja(e,Oa)||(Aa?Aa(e,Oa,{configurable:!i,enumerable:!1,value:t,writable:!1}):e[Oa]=t)},Ga=Io,Ka=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e};function Wa(e){if(!(this instanceof Wa))return new Wa(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Ra.call(this),e=e||{})this[t]=e[t]}Ba.inherits(Wa,Ra),Wa.LINE_BREAK="\r\n",Wa.DEFAULT_CONTENT_TYPE="application/octet-stream",Wa.prototype.append=function(e,t,n){"string"==typeof(n=n||{})&&(n={filename:n});var i=Ra.prototype.append.bind(this);if("number"!=typeof t&&null!=t||(t=String(t)),Array.isArray(t))this._error(new Error("Arrays are not supported."));else{var o=this._multiPartHeader(e,t,n),a=this._multiPartFooter();i(o),i(t),i(a),this._trackLength(o,t,n)}},Wa.prototype._trackLength=function(e,t,n){var i=0;null!=n.knownLength?i+=Number(n.knownLength):Buffer.isBuffer(t)?i=t.length:"string"==typeof t&&(i=Buffer.byteLength(t)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(e)+Wa.LINE_BREAK.length,t&&(t.path||t.readable&&Ga(t,"httpVersion")||t instanceof za)&&(n.knownLength||this._valuesToMeasure.push(t))},Wa.prototype._lengthRetriever=function(e,t){Ga(e,"fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):Ua.stat(e.path,function(n,i){if(n)t(n);else{var o=i.size-(e.start?e.start:0);t(null,o)}}):Ga(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ga(e,"httpModule")?(e.on("response",function(n){e.pause(),t(null,Number(n.headers["content-length"]))}),e.resume()):t("Unknown stream")},Wa.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var i,o=this._getContentDisposition(t,n),a=this._getContentType(t,n),r="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(o||[]),"Content-Type":[].concat(a||[])};for(var c in"object"==typeof n.header&&Ka(s,n.header),s)if(Ga(s,c)){if(null==(i=s[c]))continue;Array.isArray(i)||(i=[i]),i.length&&(r+=c+": "+i.join("; ")+Wa.LINE_BREAK)}return"--"+this.getBoundary()+Wa.LINE_BREAK+r+Wa.LINE_BREAK},Wa.prototype._getContentDisposition=function(e,t){var n;if("string"==typeof t.filepath?n=Pa.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?n=Pa.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ga(e,"httpVersion")&&(n=Pa.basename(e.client._httpMessage.path||"")),n)return'filename="'+n+'"'},Wa.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=Ma.lookup(e.name)),!n&&e&&e.path&&(n=Ma.lookup(e.path)),!n&&e&&e.readable&&Ga(e,"httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=Ma.lookup(t.filepath||t.filename)),!n&&e&&"object"==typeof e&&(n=Wa.DEFAULT_CONTENT_TYPE),n},Wa.prototype._multiPartFooter=function(){return function(e){var t=Wa.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},Wa.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Wa.LINE_BREAK},Wa.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ga(e,t)&&(n[t.toLowerCase()]=e[t]);return n},Wa.prototype.setBoundary=function(e){if("string"!=typeof e)throw new TypeError("FormData boundary must be a string");this._boundary=e},Wa.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},Wa.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,i=this._streams.length;n<i;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(Wa.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},Wa.prototype._generateBoundary=function(){this._boundary="--------------------------"+qa.randomBytes(12).toString("hex")},Wa.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},Wa.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},Wa.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?Ha.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,i){n?e(n):(i.forEach(function(e){t+=e}),e(null,t))}):process.nextTick(e.bind(this,null,t))},Wa.prototype.submit=function(e,t){var n,i,o={method:"post"};return"string"==typeof e?(e=La(e),i=Ka({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(i=Ka(e,o)).port||(i.port="https:"===i.protocol?443:80),i.headers=this.getHeaders(e.headers),n="https:"===i.protocol?Na.request(i):Ia.request(i),this.getLength(function(e,i){if(e&&"Unknown stream"!==e)this._error(e);else if(i&&n.setHeader("Content-Length",i),this.pipe(n),t){var o,a=function(e,i){return n.removeListener("error",a),n.removeListener("response",o),t.call(this,e,i)};o=a.bind(this,null),n.on("error",a),n.on("response",o)}}.bind(this)),n},Wa.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},Wa.prototype.toString=function(){return"[object FormData]"},$a(Wa.prototype,"FormData");var Va=Wa;function Ya(e){return Vn.isPlainObject(e)||Vn.isArray(e)}function Ja(e){return Vn.endsWith(e,"[]")?e.slice(0,-2):e}function Xa(e,t,n){return e?e.concat(t).map(function(e,t){return e=Ja(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Za=Vn.toFlatObject(Vn,{},null,function(e){return/^is[A-Z]/.test(e)});function Qa(e,t,n){if(!Vn.isObject(e))throw new TypeError("target must be an object");t=t||new(Va||FormData);const i=(n=Vn.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Vn.isUndefined(t[e])})).metaTokens,o=n.visitor||u,a=n.dots,r=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Vn.isSpecCompliantForm(t);if(!Vn.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Vn.isDate(e))return e.toISOString();if(Vn.isBoolean(e))return e.toString();if(!s&&Vn.isBlob(e))throw new Yn("Blob is not supported. Use a Buffer instead.");return Vn.isArrayBuffer(e)||Vn.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(Vn.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(Vn.isArray(e)&&function(e){return Vn.isArray(e)&&!e.some(Ya)}(e)||(Vn.isFileList(e)||Vn.endsWith(n,"[]"))&&(s=Vn.toArray(e)))return n=Ja(n),s.forEach(function(e,i){!Vn.isUndefined(e)&&null!==e&&t.append(!0===r?Xa([n],i,a):null===r?n:n+"[]",c(e))}),!1;return!!Ya(e)||(t.append(Xa(o,n,a),c(e)),!1)}const p=[],l=Object.assign(Za,{defaultVisitor:u,convertValue:c,isVisitable:Ya});if(!Vn.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!Vn.isUndefined(n)){if(-1!==p.indexOf(n))throw Error("Circular reference detected in "+i.join("."));p.push(n),Vn.forEach(n,function(n,a){!0===(!(Vn.isUndefined(n)||null===n)&&o.call(t,n,Vn.isString(a)?a.trim():a,i,l))&&e(n,i?i.concat(a):[a])}),p.pop()}}(e),t}function er(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function tr(e,t){this._pairs=[],e&&Qa(e,this,t)}const nr=tr.prototype;function ir(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function or(e,t,n){if(!t)return e;const i=n&&n.encode||ir;Vn.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(a=o?o(t,n):Vn.isURLSearchParams(t)?t.toString():new tr(t,n).toString(i),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}nr.append=function(e,t){this._pairs.push([e,t])},nr.toString=function(e){const t=e?function(t){return e.call(this,t,er)}:er;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class ar{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Vn.forEach(this.handlers,function(t){null!==t&&e(t)})}}var rr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sr=s.URLSearchParams;const cr="abcdefghijklmnopqrstuvwxyz",ur="0123456789",pr={DIGIT:ur,ALPHA:cr,ALPHA_DIGIT:cr+cr.toUpperCase()+ur};var lr={isNode:!0,classes:{URLSearchParams:sr,FormData:Va,Blob:"undefined"!=typeof Blob&&Blob||null},ALPHABET:pr,generateString:(e=16,t=pr.ALPHA_DIGIT)=>{let n="";const{length:i}=t,o=new Uint32Array(e);m.randomFillSync(o);for(let a=0;a<e;a++)n+=t[o[a]%i];return n},protocols:["http","https","file","data"]};const dr="undefined"!=typeof window&&"undefined"!=typeof document,mr="object"==typeof navigator&&navigator||void 0,fr=dr&&(!mr||["ReactNative","NativeScript","NS"].indexOf(mr.product)<0),hr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,vr=dr&&window.location.href||"http://localhost";var xr={...Object.freeze({__proto__:null,hasBrowserEnv:dr,hasStandardBrowserEnv:fr,hasStandardBrowserWebWorkerEnv:hr,navigator:mr,origin:vr}),...lr};function gr(e){function t(e,n,i,o){let a=e[o++];if("__proto__"===a)return!0;const r=Number.isFinite(+a),s=o>=e.length;if(a=!a&&Vn.isArray(i)?i.length:a,s)return Vn.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!r;i[a]&&Vn.isObject(i[a])||(i[a]=[]);return t(e,n,i[a],o)&&Vn.isArray(i[a])&&(i[a]=function(e){const t={},n=Object.keys(e);let i;const o=n.length;let a;for(i=0;i<o;i++)a=n[i],t[a]=e[a];return t}(i[a])),!r}if(Vn.isFormData(e)&&Vn.isFunction(e.entries)){const n={};return Vn.forEachEntry(e,(e,i)=>{t(function(e){return Vn.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),i,n,0)}),n}return null}const br={transitional:rr,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=Vn.isObject(e);o&&Vn.isHTMLForm(e)&&(e=new FormData(e));if(Vn.isFormData(e))return i?JSON.stringify(gr(e)):e;if(Vn.isArrayBuffer(e)||Vn.isBuffer(e)||Vn.isStream(e)||Vn.isFile(e)||Vn.isBlob(e)||Vn.isReadableStream(e))return e;if(Vn.isArrayBufferView(e))return e.buffer;if(Vn.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Qa(e,new xr.classes.URLSearchParams,{visitor:function(e,t,n,i){return xr.isNode&&Vn.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=Vn.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Qa(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,n){if(Vn.isString(e))try{return(t||JSON.parse)(e),Vn.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||br.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(Vn.isResponse(e)||Vn.isReadableStream(e))return e;if(e&&Vn.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw Yn.from(e,Yn.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Vn.forEach(["delete","get","head","post","put","patch"],e=>{br.headers[e]={}});const yr=Vn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Dr=Symbol("internals");function wr(e){return e&&String(e).trim().toLowerCase()}function _r(e){return!1===e||null==e?e:Vn.isArray(e)?e.map(_r):String(e)}function Er(e,t,n,i,o){return Vn.isFunction(i)?i.call(this,t,n):(o&&(t=n),Vn.isString(t)?Vn.isString(i)?-1!==t.indexOf(i):Vn.isRegExp(i)?i.test(t):void 0:void 0)}let Cr=class{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function o(e,t,n){const o=wr(t);if(!o)throw new Error("header name must be a non-empty string");const a=Vn.findKey(i,o);(!a||void 0===i[a]||!0===n||void 0===n&&!1!==i[a])&&(i[a||t]=_r(e))}const a=(e,t)=>Vn.forEach(e,(e,n)=>o(e,n,t));if(Vn.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Vn.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,i,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),i=e.substring(o+1).trim(),!n||t[n]&&yr[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t})(e),t);else if(Vn.isObject(e)&&Vn.isIterable(e)){let n,i,o={};for(const t of e){if(!Vn.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[i=t[0]]=(n=o[i])?Vn.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=wr(e)){const n=Vn.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(Vn.isFunction(t))return t.call(this,e,n);if(Vn.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=wr(e)){const n=Vn.findKey(this,e);return!(!n||void 0===this[n]||t&&!Er(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function o(e){if(e=wr(e)){const o=Vn.findKey(n,e);!o||t&&!Er(0,n[o],o,t)||(delete n[o],i=!0)}}return Vn.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const o=t[n];e&&!Er(0,this[o],o,e,!0)||(delete this[o],i=!0)}return i}normalize(e){const t=this,n={};return Vn.forEach(this,(i,o)=>{const a=Vn.findKey(n,o);if(a)return t[a]=_r(i),void delete t[o];const r=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();r!==o&&delete t[o],t[r]=_r(i),n[r]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Vn.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&Vn.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Dr]=this[Dr]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=wr(e);t[i]||(!function(e,t){const n=Vn.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(e,n,o){return this[i].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[i]=!0)}return Vn.isArray(e)?e.forEach(i):i(e),this}};function Fr(e,t){const n=this||br,i=t||n,o=Cr.from(i.headers);let a=i.data;return Vn.forEach(e,function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Tr(e){return!(!e||!e.__CANCEL__)}function Ar(e,t,n){Yn.call(this,null==e?"canceled":e,Yn.ERR_CANCELED,t,n),this.name="CanceledError"}function kr(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new Yn("Request failed with status code "+n.status,[Yn.ERR_BAD_REQUEST,Yn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function jr(e,t,n){let i=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(i||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}Cr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Vn.reduceDescriptors(Cr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Vn.freezeMethods(Cr),Vn.inherits(Ar,Yn,{__CANCEL__:!0});var Sr={},Or=s.parse,Rr={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Br=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function Pr(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}Sr.getProxyForUrl=function(e){var t="string"==typeof e?Or(e):e||{},n=t.protocol,i=t.host,o=t.port;if("string"!=typeof i||!i||"string"!=typeof n)return"";if(n=n.split(":",1)[0],!function(e,t){var n=(Pr("npm_config_no_proxy")||Pr("no_proxy")).toLowerCase();if(!n)return!0;if("*"===n)return!1;return n.split(/[,\s]/).every(function(n){if(!n)return!0;var i=n.match(/^(.+):(\d+)$/),o=i?i[1]:n,a=i?parseInt(i[2]):0;return!(!a||a===t)||(/^[.*]/.test(o)?("*"===o.charAt(0)&&(o=o.slice(1)),!Br.call(e,o)):e!==o)})}(i=i.replace(/:\d*$/,""),o=parseInt(o)||Rr[n]||0))return"";var a=Pr("npm_config_"+n+"_proxy")||Pr(n+"_proxy")||Pr("npm_config_proxy")||Pr("all_proxy");return a&&-1===a.indexOf("://")&&(a=n+"://"+a),a};var Ir,Nr,Lr,Ur,zr,qr={exports:{}},Mr={exports:{}},Hr={exports:{}};function $r(){if(Nr)return Ir;Nr=1;var e=1e3,t=60*e,n=60*t,i=24*n,o=7*i,a=365.25*i;function r(e,t,n,i){var o=t>=1.5*n;return Math.round(e/n)+" "+i+(o?"s":"")}return Ir=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function(r){if((r=String(r)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function(o){var a=Math.abs(o);if(a>=i)return r(o,a,i,"day");if(a>=n)return r(o,a,n,"hour");if(a>=t)return r(o,a,t,"minute");if(a>=e)return r(o,a,e,"second");return o+" ms"}(s):function(o){var a=Math.abs(o);if(a>=i)return Math.round(o/i)+"d";if(a>=n)return Math.round(o/n)+"h";if(a>=t)return Math.round(o/t)+"m";if(a>=e)return Math.round(o/e)+"s";return o+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},Ir}function Gr(){if(Ur)return Lr;return Ur=1,Lr=function(e){function t(e){let i,o,a,r=null;function s(...e){if(!s.enabled)return;const n=s,o=Number(new Date),a=o-(i||o);n.diff=a,n.prev=i,n.curr=o,i=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let r=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(i,o)=>{if("%%"===i)return"%";r++;const a=t.formatters[o];if("function"==typeof a){const t=e[r];i=a.call(n,t),e.splice(r,1),r--}return i}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==r?r:(o!==t.namespaces&&(o=t.namespaces,a=t.enabled(e)),a),set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function i(e,t){let n=0,i=0,o=-1,a=0;for(;n<e.length;)if(i<t.length&&(t[i]===e[n]||"*"===t[i]))"*"===t[i]?(o=i,a=n,i++):(n++,i++);else{if(-1===o)return!1;i=o+1,a++,n=a}for(;i<t.length&&"*"===t[i];)i++;return i===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(i(e,n))return!1;for(const n of t.names)if(i(e,n))return!0;return!1},t.humanize=$r(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},Lr}var Kr,Wr,Vr,Yr,Jr,Xr,Zr,Qr={exports:{}};function es(){return Wr?Kr:(Wr=1,Kr=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",i=t.indexOf(n+e),o=t.indexOf("--");return-1!==i&&(-1===o||i<o)})}function ts(){return Jr||(Jr=1,function(t,n){const i=v,o=r;n.init=function(e){e.inspectOpts={};const t=Object.keys(n.inspectOpts);for(let i=0;i<t.length;i++)e.inspectOpts[t[i]]=n.inspectOpts[t[i]]},n.log=function(...e){return process.stderr.write(o.formatWithOptions(n.inspectOpts,...e)+"\n")},n.formatArgs=function(e){const{namespace:i,useColors:o}=this;if(o){const n=this.color,o="[3"+(n<8?n:"8;5;"+n),a=` ${o};1m${i} [0m`;e[0]=a+e[0].split("\n").join("\n"+a),e.push(o+"m+"+t.exports.humanize(this.diff)+"[0m")}else e[0]=function(){if(n.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+i+" "+e[0]},n.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},n.load=function(){return process.env.DEBUG},n.useColors=function(){return"colors"in n.inspectOpts?Boolean(n.inspectOpts.colors):i.isatty(process.stderr.fd)},n.destroy=o.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),n.colors=[6,2,3,4,5,1];try{const t=function(){if(Yr)return Vr;Yr=1;const t=e,n=v,i=es(),{env:o}=process;let a;function r(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function s(e,n){if(0===a)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!n&&void 0===a)return 0;const r=a||0;if("dumb"===o.TERM)return r;if("win32"===process.platform){const e=t.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in o)||"codeship"===o.CI_NAME?1:r;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:r}return i("no-color")||i("no-colors")||i("color=false")||i("color=never")?a=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(a=1),"FORCE_COLOR"in o&&(a="true"===o.FORCE_COLOR?1:"false"===o.FORCE_COLOR?0:0===o.FORCE_COLOR.length?1:Math.min(parseInt(o.FORCE_COLOR,10),3)),Vr={supportsColor:function(e){return r(s(e,e&&e.isTTY))},stdout:r(s(!0,n.isatty(1))),stderr:r(s(!0,n.isatty(2)))},Vr}();t&&(t.stderr||t).level>=2&&(n.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}n.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let i=process.env[t];return i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i)),e[n]=i,e},{}),t.exports=Gr()(n);const{formatters:a}=t.exports;a.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},a.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}}(Qr,Qr.exports)),Qr.exports}function ns(){return Xr||(Xr=1,e=Mr,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=(zr||(zr=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(i++,"%c"===e&&(o=i))}),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=Gr()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Hr,Hr.exports)),Hr.exports):e.exports=ts()),Mr.exports;var e}var is,os,as,rs=s,ss=rs.URL,cs=c,us=u,ps=l.Writable,ls=h,ds=function(){if(!Zr){try{Zr=ns()("follow-redirects")}catch(e){}"function"!=typeof Zr&&(Zr=function(){})}Zr.apply(null,arguments)};is="undefined"!=typeof process,os="undefined"!=typeof window&&"undefined"!=typeof document,as=Rs(Error.captureStackTrace),is||!os&&as||console.warn("The follow-redirects package should be excluded from browser builds.");var ms=!1;try{ls(new ss(""))}catch(e){ms="ERR_INVALID_URL"===e.code}var fs=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],hs=["abort","aborted","connect","error","socket","timeout"],vs=Object.create(null);hs.forEach(function(e){vs[e]=function(t,n,i){this._redirectable.emit(e,t,n,i)}});var xs=js("ERR_INVALID_URL","Invalid URL",TypeError),gs=js("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),bs=js("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",gs),ys=js("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Ds=js("ERR_STREAM_WRITE_AFTER_END","write after end"),ws=ps.prototype.destroy||Cs;function _s(e,t){ps.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof gs?e:new gs({cause:e}))}},this._performRequest()}function Es(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach(function(i){var o=i+":",a=n[o]=e[i],r=t[i]=Object.create(a);Object.defineProperties(r,{request:{value:function(e,i,a){var r;return r=e,ss&&r instanceof ss?e=As(e):Os(e)?e=As(Fs(e)):(a=i,i=Ts(e),e={protocol:o}),Rs(i)&&(a=i,i=null),(i=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,i)).nativeProtocols=n,Os(i.host)||Os(i.hostname)||(i.hostname="::1"),ls.equal(i.protocol,o,"protocol mismatch"),ds("options",i),new _s(i,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var i=r.request(e,t,n);return i.end(),i},configurable:!0,enumerable:!0,writable:!0}})}),t}function Cs(){}function Fs(e){var t;if(ms)t=new ss(e);else if(!Os((t=Ts(rs.parse(e))).protocol))throw new xs({input:e});return t}function Ts(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new xs({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new xs({input:e.href||e});return e}function As(e,t){var n=t||{};for(var i of fs)n[i]=e[i];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function ks(e,t){var n;for(var i in t)e.test(i)&&(n=t[i],delete t[i]);return null==n?void 0:String(n).trim()}function js(e,t,n){function i(n){Rs(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(n||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function Ss(e,t){for(var n of hs)e.removeListener(n,vs[n]);e.on("error",Cs),e.destroy(t)}function Os(e){return"string"==typeof e||e instanceof String}function Rs(e){return"function"==typeof e}_s.prototype=Object.create(ps.prototype),_s.prototype.abort=function(){Ss(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},_s.prototype.destroy=function(e){return Ss(this._currentRequest,e),ws.call(this,e),this},_s.prototype.write=function(e,t,n){if(this._ending)throw new Ds;if(!Os(e)&&("object"!=typeof(i=e)||!("length"in i)))throw new TypeError("data should be a string, Buffer or Uint8Array");var i;Rs(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new ys),this.abort()):n&&n()},_s.prototype.end=function(e,t,n){if(Rs(e)?(n=e,e=t=null):Rs(t)&&(n=t,t=null),e){var i=this,o=this._currentRequest;this.write(e,t,function(){i._ended=!0,o.end(null,null,n)}),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},_s.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},_s.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},_s.prototype.setTimeout=function(e,t){var n=this;function i(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),a()},e),i(t)}function a(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",a),n.removeListener("error",a),n.removeListener("response",a),n.removeListener("close",a),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",i),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){_s.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}),["aborted","connection","socket"].forEach(function(e){Object.defineProperty(_s.prototype,e,{get:function(){return this._currentRequest[e]}})}),_s.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},_s.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var o of(i._redirectable=this,hs))i.on(o,vs[o]);if(this._currentUrl=/^\//.test(this._options.path)?rs.format(this._options):this._options.path,this._isRedirect){var a=0,r=this,s=this._requestBodyBuffers;!function e(t){if(i===r._currentRequest)if(t)r.emit("error",t);else if(a<s.length){var n=s[a++];i.finished||i.write(n.data,n.encoding,e)}else r._ended&&i.end()}()}},_s.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,i=e.headers.location;if(!i||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(Ss(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new bs;var o=this._options.beforeRedirect;o&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var a=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],ks(/^content-/i,this._options.headers));var r,s,c=ks(/^host$/i,this._options.headers),u=Fs(this._currentUrl),p=c||u.host,l=/^\w+:/.test(i)?this._currentUrl:rs.format(Object.assign(u,{host:p})),d=(r=i,s=l,ms?new ss(r,s):Fs(rs.resolve(s,r)));if(ds("redirecting to",d.href),this._isRedirect=!0,As(d,this._options),(d.protocol!==u.protocol&&"https:"!==d.protocol||d.host!==p&&!function(e,t){ls(Os(e)&&Os(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(d.host,p))&&ks(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Rs(o)){var m={headers:e.headers,statusCode:t},f={url:l,method:a,headers:n};o(this._options,m,f),this._sanitizeOptions(this._options)}this._performRequest()},qr.exports=Es({http:cs,https:us}),qr.exports.wrap=Es;const Bs="1.13.2";function Ps(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const Is=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;const Ns=Symbol("internals");class Ls extends l.Transform{constructor(e){e=Vn.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(e,t)=>!Vn.isUndefined(t[e])),super({readableHighWaterMark:e.chunkSize});const t=this[Ns]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",e=>{"progress"===e&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){const t=this[Ns];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){const i=this[Ns],o=i.maxRate,a=this.readableHighWaterMark,r=i.timeWindow,s=o/(1e3/r),c=!1!==i.minChunkSize?Math.max(i.minChunkSize,.01*s):0,u=(e,t)=>{const n=Buffer.byteLength(e);i.bytesSeen+=n,i.bytes+=n,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(e)?process.nextTick(t):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(t)}},p=(e,t)=>{const n=Buffer.byteLength(e);let p,l=null,d=a,m=0;if(o){const e=Date.now();(!i.ts||(m=e-i.ts)>=r)&&(i.ts=e,p=s-i.bytes,i.bytes=p<0?-p:0,m=0),p=s-i.bytes}if(o){if(p<=0)return setTimeout(()=>{t(null,e)},r-m);p<d&&(d=p)}d&&n>d&&n-d>c&&(l=e.subarray(d),e=e.subarray(0,d)),u(e,l?()=>{process.nextTick(t,null,l)}:t)};p(e,function e(t,i){if(t)return n(t);i?p(i,e):n(null)})}}const{asyncIterator:Us}=Symbol,zs=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Us]?yield*e[Us]():yield e},qs=xr.ALPHABET.ALPHA_DIGIT+"-_",Ms="function"==typeof TextEncoder?new TextEncoder:new r.TextEncoder,Hs="\r\n",$s=Ms.encode(Hs);class Gs{constructor(e,t){const{escapeName:n}=this.constructor,i=Vn.isString(t);let o=`Content-Disposition: form-data; name="${n(e)}"${!i&&t.name?`; filename="${n(t.name)}"`:""}${Hs}`;i?t=Ms.encode(String(t).replace(/\r?\n|\r\n?/g,Hs)):o+=`Content-Type: ${t.type||"application/octet-stream"}${Hs}`,this.headers=Ms.encode(o+Hs),this.contentLength=i?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;Vn.isTypedArray(e)?yield e:yield*zs(e),yield $s}static escapeName(e){return String(e).replace(/[\r\n"]/g,e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e]))}}class Ks extends l.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,n)}}const Ws=(e,t)=>Vn.isAsyncFn(e)?function(...n){const i=n.pop();e.apply(this,n).then(e=>{try{t?i(null,...t(e)):i(null,e)}catch(e){i(e)}},i)}:e;const Vs=(e,t,n=3)=>{let i=0;const o=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let o,a=0,r=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=i[r];o||(o=c),n[a]=s,i[a]=c;let p=r,l=0;for(;p!==a;)l+=n[p++],p%=e;if(a=(a+1)%e,a===r&&(r=(r+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*l/d):void 0}}(50,250);return function(e,t){let n,i,o=0,a=1e3/t;const r=(t,a=Date.now())=>{o=a,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=a?r(e,t):(n=e,i||(i=setTimeout(()=>{i=null,r(n)},a-s)))},()=>n&&r(n)]}(n=>{const a=n.loaded,r=n.lengthComputable?n.total:void 0,s=a-i,c=o(s);i=a;e({loaded:a,total:r,progress:r?a/r:void 0,bytes:s,rate:c||void 0,estimated:c&&r&&a<=r?(r-a)/c:void 0,event:n,lengthComputable:null!=r,[t?"download":"upload"]:!0})},n)},Ys=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},Js=e=>(...t)=>Vn.asap(()=>e(...t));const Xs={flush:x.constants.Z_SYNC_FLUSH,finishFlush:x.constants.Z_SYNC_FLUSH},Zs={flush:x.constants.BROTLI_OPERATION_FLUSH,finishFlush:x.constants.BROTLI_OPERATION_FLUSH},Qs=Vn.isFunction(x.createBrotliDecompress),{http:ec,https:tc}=qr.exports,nc=/https:?/,ic=xr.protocols.map(e=>e+":"),oc=(e,[t,n])=>(e.on("end",n).on("error",n),t);const ac=new class{constructor(){this.sessions=Object.create(null)}getSession(e,t){t=Object.assign({sessionTimeout:1e3},t);let n=this.sessions[e];if(n){let e=n.length;for(let i=0;i<e;i++){const[e,o]=n[i];if(!e.destroyed&&!e.closed&&r.isDeepStrictEqual(o,t))return e}}const i=f.connect(e,t);let o;const a=()=>{if(o)return;o=!0;let t=n,a=t.length,r=a;for(;r--;)if(t[r][0]===i)return void(1===a?delete this.sessions[e]:t.splice(r,1))},s=i.request,{sessionTimeout:c}=t;if(null!=c){let e,t=0;i.request=function(){const n=s.apply(this,arguments);return t++,e&&(clearTimeout(e),e=null),n.once("close",()=>{--t||(e=setTimeout(()=>{e=null,a()},c))}),n}}i.once("close",a);let u=[i,t];return n?n.push(u):n=this.sessions[e]=[u],i}};function rc(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function sc(e,t,n){let i=t;if(!i&&!1!==i){const e=Sr.getProxyForUrl(n);e&&(i=new URL(e))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));const t=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=i.hostname||i.host;e.hostname=t,e.host=t,e.port=i.port,e.path=n,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(e){sc(e,t,e.href)}}const cc="undefined"!=typeof process&&"process"===Vn.kindOf(process),uc=(e,t)=>(({address:e,family:t})=>{if(!Vn.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(Vn.isObject(e)?e:{address:e,family:t}),pc={request(e,t){const n=e.protocol+"//"+e.hostname+":"+(e.port||80),{http2Options:i,headers:o}=e,a=ac.getSession(n,i),{HTTP2_HEADER_SCHEME:r,HTTP2_HEADER_METHOD:s,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:u}=f.constants,p={[r]:e.protocol.replace(":",""),[s]:e.method,[c]:e.path};Vn.forEach(o,(e,t)=>{":"!==t.charAt(0)&&(p[t]=e)});const l=a.request(p);return l.once("response",e=>{const n=l,i=(e=Object.assign({},e))[u];delete e[u],n.headers=e,n.statusCode=+i,t(n)}),l}};var lc=cc&&function(e){return t=async function(t,n,i){let{data:o,lookup:a,family:s,httpVersion:p=1,http2Options:m}=e;const{responseType:f,responseEncoding:h}=e,v=e.method.toUpperCase();let g,y,D=!1;if(p=+p,Number.isNaN(p))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(1!==p&&2!==p)throw TypeError(`Unsupported protocol version '${p}'`);const w=2===p;if(a){const e=Ws(a,e=>Vn.isArray(e)?e:[e]);a=(t,n,i)=>{e(t,n,(e,t,o)=>{if(e)return i(e);const a=Vn.isArray(t)?t.map(e=>uc(e)):[uc(t,o)];n.all?i(e,a):i(e,a[0].address,a[0].family)})}}const _=new b;function E(t){try{_.emit("abort",!t||t.type?new Ar(null,e,y):t)}catch(e){console.warn("emit error",e)}}_.once("abort",n);const C=()=>{e.cancelToken&&e.cancelToken.unsubscribe(E),e.signal&&e.signal.removeEventListener("abort",E),_.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(E),e.signal&&(e.signal.aborted?E():e.signal.addEventListener("abort",E))),i((e,t)=>{if(g=!0,t)return D=!0,void C();const{data:n}=e;if(n instanceof l.Readable||n instanceof l.Duplex){const e=l.finished(n,()=>{e(),C()})}else C()});const F=jr(e.baseURL,e.url,e.allowAbsoluteUrls),T=new URL(F,xr.hasBrowserEnv?xr.origin:void 0),A=T.protocol||ic[0];if("data:"===A){if(e.maxContentLength>-1){const t=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),i=e.slice(t+1);if(/;base64/i.test(n)){let e=i.length;const t=i.length;for(let n=0;n<t;n++)if(37===i.charCodeAt(n)&&n+2<t){const t=i.charCodeAt(n+1),o=i.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102)&&(e-=2,n+=2)}let n=0,o=t-1;const a=e=>e>=2&&37===i.charCodeAt(e-2)&&51===i.charCodeAt(e-1)&&(68===i.charCodeAt(e)||100===i.charCodeAt(e));o>=0&&(61===i.charCodeAt(o)?(n++,o--):a(o)&&(n++,o-=3)),1===n&&o>=0&&(61===i.charCodeAt(o)||a(o))&&n++;const r=3*Math.floor(e/4)-(n||0);return r>0?r:0}return Buffer.byteLength(i,"utf8")}(String(e.url||F||""));if(t>e.maxContentLength)return n(new Yn("maxContentLength size of "+e.maxContentLength+" exceeded",Yn.ERR_BAD_RESPONSE,e))}let i;if("GET"!==v)return kr(t,n,{status:405,statusText:"method not allowed",headers:{},config:e});try{i=function(e,t,n){const i=n&&n.Blob||xr.classes.Blob,o=Ps(e);if(void 0===t&&i&&(t=!0),"data"===o){e=o.length?e.slice(o.length+1):e;const n=Is.exec(e);if(!n)throw new Yn("Invalid URL",Yn.ERR_INVALID_URL);const a=n[1],r=n[2],s=n[3],c=Buffer.from(decodeURIComponent(s),r?"base64":"utf8");if(t){if(!i)throw new Yn("Blob is not supported",Yn.ERR_NOT_SUPPORT);return new i([c],{type:a})}return c}throw new Yn("Unsupported protocol "+o,Yn.ERR_NOT_SUPPORT)}(e.url,"blob"===f,{Blob:e.env&&e.env.Blob})}catch(t){throw Yn.from(t,Yn.ERR_BAD_REQUEST,e)}return"text"===f?(i=i.toString(h),h&&"utf8"!==h||(i=Vn.stripBOM(i))):"stream"===f&&(i=l.Readable.from(i)),kr(t,n,{data:i,status:200,statusText:"OK",headers:new Cr,config:e})}if(-1===ic.indexOf(A))return n(new Yn("Unsupported protocol "+A,Yn.ERR_BAD_REQUEST,e));const k=Cr.from(e.headers).normalize();k.set("User-Agent","axios/"+Bs,!1);const{onUploadProgress:j,onDownloadProgress:S}=e,O=e.maxRate;let R,B;if(Vn.isSpecCompliantForm(o)){const e=k.getContentType(/boundary=([-_\w\d]{10,70})/i);o=((e,t,n)=>{const{tag:i="form-data-boundary",size:o=25,boundary:a=i+"-"+xr.generateString(o,qs)}=n||{};if(!Vn.isFormData(e))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");const r=Ms.encode("--"+a+Hs),s=Ms.encode("--"+a+"--"+Hs);let c=s.byteLength;const u=Array.from(e.entries()).map(([e,t])=>{const n=new Gs(e,t);return c+=n.size,n});c+=r.byteLength*u.length,c=Vn.toFiniteNumber(c);const p={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(c)&&(p["Content-Length"]=c),t&&t(p),d.from(async function*(){for(const e of u)yield r,yield*e.encode();yield s}())})(o,e=>{k.set(e)},{tag:`axios-${Bs}-boundary`,boundary:e&&e[1]||void 0})}else if(Vn.isFormData(o)&&Vn.isFunction(o.getHeaders)){if(k.set(o.getHeaders()),!k.hasContentLength())try{const e=await r.promisify(o.getLength).call(o);Number.isFinite(e)&&e>=0&&k.setContentLength(e)}catch(e){}}else if(Vn.isBlob(o)||Vn.isFile(o))o.size&&k.setContentType(o.type||"application/octet-stream"),k.setContentLength(o.size||0),o=l.Readable.from(zs(o));else if(o&&!Vn.isStream(o)){if(Buffer.isBuffer(o));else if(Vn.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else{if(!Vn.isString(o))return n(new Yn("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Yn.ERR_BAD_REQUEST,e));o=Buffer.from(o,"utf-8")}if(k.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return n(new Yn("Request body larger than maxBodyLength limit",Yn.ERR_BAD_REQUEST,e))}const P=Vn.toFiniteNumber(k.getContentLength());let I,N;Vn.isArray(O)?(R=O[0],B=O[1]):R=B=O,o&&(j||R)&&(Vn.isStream(o)||(o=l.Readable.from(o,{objectMode:!1})),o=l.pipeline([o,new Ls({maxRate:Vn.toFiniteNumber(R)})],Vn.noop),j&&o.on("progress",oc(o,Ys(P,Vs(Js(j),!1,3))))),e.auth&&(I=(e.auth.username||"")+":"+(e.auth.password||"")),!I&&T.username&&(I=T.username+":"+T.password),I&&k.delete("authorization");try{N=or(T.pathname+T.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const i=new Error(t.message);return i.config=e,i.url=e.url,i.exists=!0,n(i)}k.set("Accept-Encoding","gzip, compress, deflate"+(Qs?", br":""),!1);const L={path:N,method:v,headers:k.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:I,protocol:A,family:s,beforeRedirect:rc,beforeRedirects:{},http2Options:m};let U;!Vn.isUndefined(a)&&(L.lookup=a),e.socketPath?L.socketPath=e.socketPath:(L.hostname=T.hostname.startsWith("[")?T.hostname.slice(1,-1):T.hostname,L.port=T.port,sc(L,e.proxy,A+"//"+T.hostname+(T.port?":"+T.port:"")+L.path));const z=nc.test(L.protocol);if(L.agent=z?e.httpsAgent:e.httpAgent,w?U=pc:e.transport?U=e.transport:0===e.maxRedirects?U=z?u:c:(e.maxRedirects&&(L.maxRedirects=e.maxRedirects),e.beforeRedirect&&(L.beforeRedirects.config=e.beforeRedirect),U=z?tc:ec),e.maxBodyLength>-1?L.maxBodyLength=e.maxBodyLength:L.maxBodyLength=1/0,e.insecureHTTPParser&&(L.insecureHTTPParser=e.insecureHTTPParser),y=U.request(L,function(i){if(y.destroyed)return;const o=[i],a=Vn.toFiniteNumber(i.headers["content-length"]);if(S||B){const e=new Ls({maxRate:Vn.toFiniteNumber(B)});S&&e.on("progress",oc(e,Ys(a,Vs(Js(S),!0,3)))),o.push(e)}let r=i;const s=i.req||y;if(!1!==e.decompress&&i.headers["content-encoding"])switch("HEAD"!==v&&204!==i.statusCode||delete i.headers["content-encoding"],(i.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":o.push(x.createUnzip(Xs)),delete i.headers["content-encoding"];break;case"deflate":o.push(new Ks),o.push(x.createUnzip(Xs)),delete i.headers["content-encoding"];break;case"br":Qs&&(o.push(x.createBrotliDecompress(Zs)),delete i.headers["content-encoding"])}r=o.length>1?l.pipeline(o,Vn.noop):o[0];const c={status:i.statusCode,statusText:i.statusMessage,headers:new Cr(i.headers),config:e,request:s};if("stream"===f)c.data=r,kr(t,n,c);else{const i=[];let o=0;r.on("data",function(t){i.push(t),o+=t.length,e.maxContentLength>-1&&o>e.maxContentLength&&(D=!0,r.destroy(),E(new Yn("maxContentLength size of "+e.maxContentLength+" exceeded",Yn.ERR_BAD_RESPONSE,e,s)))}),r.on("aborted",function(){if(D)return;const t=new Yn("stream has been aborted",Yn.ERR_BAD_RESPONSE,e,s);r.destroy(t),n(t)}),r.on("error",function(t){y.destroyed||n(Yn.from(t,null,e,s))}),r.on("end",function(){try{let e=1===i.length?i[0]:Buffer.concat(i);"arraybuffer"!==f&&(e=e.toString(h),h&&"utf8"!==h||(e=Vn.stripBOM(e))),c.data=e}catch(t){return n(Yn.from(t,null,e,c.request,c))}kr(t,n,c)})}_.once("abort",e=>{r.destroyed||(r.emit("error",e),r.destroy())})}),_.once("abort",e=>{y.close?y.close():y.destroy(e)}),y.on("error",function(t){n(Yn.from(t,null,e,y))}),y.on("socket",function(e){e.setKeepAlive(!0,6e4)}),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void E(new Yn("error trying to parse `config.timeout` to int",Yn.ERR_BAD_OPTION_VALUE,e,y));y.setTimeout(t,function(){if(g)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||rr;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),E(new Yn(t,n.clarifyTimeoutError?Yn.ETIMEDOUT:Yn.ECONNABORTED,e,y))})}else y.setTimeout(0);if(Vn.isStream(o)){let t=!1,n=!1;o.on("end",()=>{t=!0}),o.once("error",e=>{n=!0,y.destroy(e)}),o.on("close",()=>{t||n||E(new Ar("Request stream has been aborted",e,y))}),o.pipe(y)}else o&&y.write(o),y.end()},new Promise((e,n)=>{let i,o;const a=(e,t)=>{o||(o=!0,i&&i(e,t))},r=e=>{a(e,!0),n(e)};t(t=>{a(t),e(t)},r,e=>i=e).catch(r)});var t},dc=xr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,xr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(xr.origin),xr.navigator&&/(msie|trident)/i.test(xr.navigator.userAgent)):()=>!0,mc=xr.hasStandardBrowserEnv?{write(e,t,n,i,o,a,r){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];Vn.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Vn.isString(i)&&s.push(`path=${i}`),Vn.isString(o)&&s.push(`domain=${o}`),!0===a&&s.push("secure"),Vn.isString(r)&&s.push(`SameSite=${r}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};const fc=e=>e instanceof Cr?{...e}:e;function hc(e,t){t=t||{};const n={};function i(e,t,n,i){return Vn.isPlainObject(e)&&Vn.isPlainObject(t)?Vn.merge.call({caseless:i},e,t):Vn.isPlainObject(t)?Vn.merge({},t):Vn.isArray(t)?t.slice():t}function o(e,t,n,o){return Vn.isUndefined(t)?Vn.isUndefined(e)?void 0:i(void 0,e,0,o):i(e,t,0,o)}function a(e,t){if(!Vn.isUndefined(t))return i(void 0,t)}function r(e,t){return Vn.isUndefined(t)?Vn.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function s(n,o,a){return a in t?i(n,o):a in e?i(void 0,n):void 0}const c={url:a,method:a,data:a,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:s,headers:(e,t,n)=>o(fc(e),fc(t),0,!0)};return Vn.forEach(Object.keys({...e,...t}),function(i){const a=c[i]||o,r=a(e[i],t[i],i);Vn.isUndefined(r)&&a!==s||(n[i]=r)}),n}var vc=e=>{const t=hc({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:r,auth:s}=t;if(t.headers=r=Cr.from(r),t.url=or(jr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&r.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Vn.isFormData(n))if(xr.hasStandardBrowserEnv||xr.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if(Vn.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&r.set(e,n)})}if(xr.hasStandardBrowserEnv&&(i&&Vn.isFunction(i)&&(i=i(t)),i||!1!==i&&dc(t.url))){const e=o&&a&&mc.read(a);e&&r.set(o,e)}return t};var xc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const i=vc(e);let o=i.data;const a=Cr.from(i.headers).normalize();let r,s,c,u,p,{responseType:l,onUploadProgress:d,onDownloadProgress:m}=i;function f(){u&&u(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(r),i.signal&&i.signal.removeEventListener("abort",r)}let h=new XMLHttpRequest;function v(){if(!h)return;const i=Cr.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());kr(function(e){t(e),f()},function(e){n(e),f()},{data:l&&"text"!==l&&"json"!==l?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:i,config:e,request:h}),h=null}h.open(i.method.toUpperCase(),i.url,!0),h.timeout=i.timeout,"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(v)},h.onabort=function(){h&&(n(new Yn("Request aborted",Yn.ECONNABORTED,e,h)),h=null)},h.onerror=function(t){const i=new Yn(t&&t.message?t.message:"Network Error",Yn.ERR_NETWORK,e,h);i.event=t||null,n(i),h=null},h.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const o=i.transitional||rr;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new Yn(t,o.clarifyTimeoutError?Yn.ETIMEDOUT:Yn.ECONNABORTED,e,h)),h=null},void 0===o&&a.setContentType(null),"setRequestHeader"in h&&Vn.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),Vn.isUndefined(i.withCredentials)||(h.withCredentials=!!i.withCredentials),l&&"json"!==l&&(h.responseType=i.responseType),m&&([c,p]=Vs(m,!0),h.addEventListener("progress",c)),d&&h.upload&&([s,u]=Vs(d),h.upload.addEventListener("progress",s),h.upload.addEventListener("loadend",u)),(i.cancelToken||i.signal)&&(r=t=>{h&&(n(!t||t.type?new Ar(null,e,h):t),h.abort(),h=null)},i.cancelToken&&i.cancelToken.subscribe(r),i.signal&&(i.signal.aborted?r():i.signal.addEventListener("abort",r)));const x=Ps(i.url);x&&-1===xr.protocols.indexOf(x)?n(new Yn("Unsupported protocol "+x+":",Yn.ERR_BAD_REQUEST,e)):h.send(o||null)})};const gc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const o=function(e){if(!n){n=!0,r();const t=e instanceof Error?e:this.reason;i.abort(t instanceof Yn?t:new Ar(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,o(new Yn(`timeout ${t} of ms exceeded`,Yn.ETIMEDOUT))},t);const r=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=i;return s.unsubscribe=()=>Vn.asap(r),s}},bc=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let i,o=0;for(;o<n;)i=o+t,yield e.slice(o,i),o=i},yc=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Dc=(e,t,n,i)=>{const o=async function*(e,t){for await(const n of yc(e))yield*bc(n,t)}(e,t);let a,r=0,s=e=>{a||(a=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await o.next();if(t)return s(),void e.close();let a=i.byteLength;if(n){let e=r+=a;n(e)}e.enqueue(new Uint8Array(i))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:wc}=Vn,_c=(({Request:e,Response:t})=>({Request:e,Response:t}))(Vn.global),{ReadableStream:Ec,TextEncoder:Cc}=Vn.global,Fc=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Tc=e=>{e=Vn.merge.call({skipUndefined:!0},_c,e);const{fetch:t,Request:n,Response:i}=e,o=t?wc(t):"function"==typeof fetch,a=wc(n),r=wc(i);if(!o)return!1;const s=o&&wc(Ec),c=o&&("function"==typeof Cc?(u=new Cc,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const p=a&&s&&Fc(()=>{let e=!1;const t=new n(xr.origin,{body:new Ec,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),l=r&&s&&Fc(()=>Vn.isReadableStream(new i("").body)),d={stream:l&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let i=t&&t[e];if(i)return i.call(t);throw new Yn(`Response type '${e}' is not supported`,Yn.ERR_NOT_SUPPORT,n)})});const m=async(e,t)=>{const i=Vn.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(Vn.isBlob(e))return e.size;if(Vn.isSpecCompliantForm(e)){const t=new n(xr.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Vn.isArrayBufferView(e)||Vn.isArrayBuffer(e)?e.byteLength:(Vn.isURLSearchParams(e)&&(e+=""),Vn.isString(e)?(await c(e)).byteLength:void 0)})(t):i};return async e=>{let{url:o,method:r,data:s,signal:c,cancelToken:u,timeout:f,onDownloadProgress:h,onUploadProgress:v,responseType:x,headers:g,withCredentials:b="same-origin",fetchOptions:y}=vc(e),D=t||fetch;x=x?(x+"").toLowerCase():"text";let w=gc([c,u&&u.toAbortSignal()],f),_=null;const E=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let C;try{if(v&&p&&"get"!==r&&"head"!==r&&0!==(C=await m(g,s))){let e,t=new n(o,{method:"POST",body:s,duplex:"half"});if(Vn.isFormData(s)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=Ys(C,Vs(Js(v)));s=Dc(t.body,65536,e,n)}}Vn.isString(b)||(b=b?"include":"omit");const t=a&&"credentials"in n.prototype,c={...y,signal:w,method:r.toUpperCase(),headers:g.normalize().toJSON(),body:s,duplex:"half",credentials:t?b:void 0};_=a&&new n(o,c);let u=await(a?D(_,y):D(o,c));const f=l&&("stream"===x||"response"===x);if(l&&(h||f&&E)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=Vn.toFiniteNumber(u.headers.get("content-length")),[n,o]=h&&Ys(t,Vs(Js(h),!0))||[];u=new i(Dc(u.body,65536,n,()=>{o&&o(),E&&E()}),e)}x=x||"text";let F=await d[Vn.findKey(d,x)||"text"](u,e);return!f&&E&&E(),await new Promise((t,n)=>{kr(t,n,{data:F,headers:Cr.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:_})})}catch(t){if(E&&E(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Yn("Network Error",Yn.ERR_NETWORK,e,_),{cause:t.cause||t});throw Yn.from(t,t&&t.code,e,_)}}},Ac=new Map,kc=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:o}=t,a=[i,o,n];let r,s,c=a.length,u=Ac;for(;c--;)r=a[c],s=u.get(r),void 0===s&&u.set(r,s=c?new Map:Tc(t)),u=s;return s};kc();const jc={http:lc,xhr:xc,fetch:{get:kc}};Vn.forEach(jc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Sc=e=>`- ${e}`,Oc=e=>Vn.isFunction(e)||null===e||!1===e;var Rc={getAdapter:function(e,t){e=Vn.isArray(e)?e:[e];const{length:n}=e;let i,o;const a={};for(let r=0;r<n;r++){let n;if(i=e[r],o=i,!Oc(i)&&(o=jc[(n=String(i)).toLowerCase()],void 0===o))throw new Yn(`Unknown adapter '${n}'`);if(o&&(Vn.isFunction(o)||(o=o.get(t))))break;a[n||"#"+r]=o}if(!o){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Yn("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Sc).join("\n"):" "+Sc(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o},adapters:jc};function Bc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ar(null,e)}function Pc(e){Bc(e),e.headers=Cr.from(e.headers),e.data=Fr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Rc.getAdapter(e.adapter||br.adapter,e)(e).then(function(t){return Bc(e),t.data=Fr.call(e,e.transformResponse,t),t.headers=Cr.from(t.headers),t},function(t){return Tr(t)||(Bc(e),t&&t.response&&(t.response.data=Fr.call(e,e.transformResponse,t.response),t.response.headers=Cr.from(t.response.headers))),Promise.reject(t)})}const Ic={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ic[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Nc={};Ic.transitional=function(e,t,n){function i(e,t){return"[Axios v"+Bs+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,a)=>{if(!1===e)throw new Yn(i(o," has been removed"+(t?" in "+t:"")),Yn.ERR_DEPRECATED);return t&&!Nc[o]&&(Nc[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}},Ic.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Lc={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Yn("options must be an object",Yn.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let o=i.length;for(;o-- >0;){const a=i[o],r=t[a];if(r){const t=e[a],n=void 0===t||r(t,a,e);if(!0!==n)throw new Yn("option "+a+" must be "+n,Yn.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Yn("Unknown option "+a,Yn.ERR_BAD_OPTION)}},validators:Ic};const Uc=Lc.validators;let zc=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ar,response:new ar}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=hc(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:o}=t;void 0!==n&&Lc.assertOptions(n,{silentJSONParsing:Uc.transitional(Uc.boolean),forcedJSONParsing:Uc.transitional(Uc.boolean),clarifyTimeoutError:Uc.transitional(Uc.boolean)},!1),null!=i&&(Vn.isFunction(i)?t.paramsSerializer={serialize:i}:Lc.assertOptions(i,{encode:Uc.function,serialize:Uc.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Lc.assertOptions(t,{baseUrl:Uc.spelling("baseURL"),withXsrfToken:Uc.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&Vn.merge(o.common,o[t.method]);o&&Vn.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Cr.concat(a,o);const r=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,r.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let p,l=0;if(!s){const e=[Pc.bind(this),void 0];for(e.unshift(...r),e.push(...c),p=e.length,u=Promise.resolve(t);l<p;)u=u.then(e[l++],e[l++]);return u}p=r.length;let d=t;for(;l<p;){const e=r[l++],t=r[l++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Pc.call(this,d)}catch(e){return Promise.reject(e)}for(l=0,p=c.length;l<p;)u=u.then(c[l++],c[l++]);return u}getUri(e){return or(jr((e=hc(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Vn.forEach(["delete","get","head","options"],function(e){zc.prototype[e]=function(t,n){return this.request(hc(n||{},{method:e,url:t,data:(n||{}).data}))}}),Vn.forEach(["post","put","patch"],function(e){function t(t){return function(n,i,o){return this.request(hc(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}zc.prototype[e]=t(),zc.prototype[e+"Form"]=t(!0)});const qc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(qc).forEach(([e,t])=>{qc[t]=e});const Mc=function e(t){const n=new zc(t),i=an(zc.prototype.request,n);return Vn.extend(i,zc.prototype,n,{allOwnKeys:!0}),Vn.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(hc(t,n))},i}(br);Mc.Axios=zc,Mc.CanceledError=Ar,Mc.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const i=new Promise(e=>{n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e(function(e,i,o){n.reason||(n.reason=new Ar(e,i,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Mc.isCancel=Tr,Mc.VERSION=Bs,Mc.toFormData=Qa,Mc.AxiosError=Yn,Mc.Cancel=Mc.CanceledError,Mc.all=function(e){return Promise.all(e)},Mc.spread=function(e){return function(t){return e.apply(null,t)}},Mc.isAxiosError=function(e){return Vn.isObject(e)&&!0===e.isAxiosError},Mc.mergeConfig=hc,Mc.AxiosHeaders=Cr,Mc.formToJSON=e=>gr(Vn.isHTMLForm(e)?new FormData(e):e),Mc.getAdapter=Rc.getAdapter,Mc.HttpStatusCode=qc,Mc.default=Mc;const{Axios:Hc,AxiosError:$c,CanceledError:Gc,isCancel:Kc,CancelToken:Wc,VERSION:Vc,all:Yc,Cancel:Jc,isAxiosError:Xc,spread:Zc,toFormData:Qc,AxiosHeaders:eu,HttpStatusCode:tu,formToJSON:nu,getAdapter:iu,mergeConfig:ou}=Mc,au="=".repeat(10),ru={requestFailed:(e,t,n)=>`API request attempt ${e} failed. ${t} retries left. Error: ${n}`,allRetriesFailed:e=>`API call failed after all retries: ${e}`},su={schedulingFailed:e=>`Heartbeat scheduling failed: ${e}`,emergencyTriggered:"Emergency heartbeat triggered - no successful heartbeat in 100+ seconds",emergencyFailed:e=>`Emergency heartbeat failed: ${e}`,failed:e=>`Heartbeat failed: ${e}`,attemptFailed:(e,t,n)=>`Heartbeat attempt ${e} failed. ${t} retries left. Error: ${n}`},cu={testData:(e,t)=>{let n=`\n-------Started reporting to NeetoPlaydash 🎭-------\nCI Build ID: ${e}\n`;return t&&(n+=`Total shards: ${t.total}\nCurrent shards: ${t.current}\n`),n+=`${"-".repeat(50)}\n`,n}},uu={startingTest:({titlePath:e,historyId:t,retry:n,repeatEachIndex:i})=>`${au}Starting ${e}${au}\n Time: ${(new Date).toUTCString()}\n History ID: ${t}${n?`\nRetry: ${n}`:""}${i?`\nRepeat index: ${i}`:""}`},pu={reportedTest:({title:e,status:t,historyId:n,completedAt:i,error:o,isTestReported:a=!0,retry:r,repeatEachIndex:s})=>{let c=`\n\n${a?"------------Reported to NeetoPlaydash------------":"-".repeat(49)}\n Title: ${e}\n History id: ${n}\n Status: ${t}\n Completed at: ${i}${r?`\nRetry: ${r}`:""}${s?`\nRepeat index: ${s}`:""}\n`;return c=o?c.concat(` Error:\n\n ${o.replaceAll("\n","\n ")}`):c,c.concat(`\n${"-".repeat(49)}\n`)}},lu={runReported:"Run completed and reported to NeetoPlaydash 🎉\n\n",finalStatus:({currentShard:e,status:t,duration:n})=>{let i=`------------------Run completed-------------------\n Status: ${t}\n Duration: ${(e=>{const t={hour:Math.floor(e/36e5),minute:Math.floor(e/6e4)%60,second:Math.floor(e/1e3)%60,millisecond:Math.floor(e)%1e3};return Object.entries(t).filter(([e,t])=>0!==t).map(([e,t])=>t+" "+(1!==t?`${e}s`:e)).join(", ")})(null!=n?n:0)}\n`;return i=0!==e?i.concat(` Shard: ${e}`):i,i.concat(`\n${"-".repeat(50)}\n`)},dashboardUrlHeader:"View the run in the dashboard"};var du={exports:{}},mu={};function fu(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var hu=fu;fu.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},fu.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},fu.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(void 0===n){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1)}var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},n),this._options.unref&&this._timer.unref(),!0},fu.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},fu.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},fu.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},fu.prototype.start=fu.prototype.try,fu.prototype.errors=function(){return this._errors},fu.prototype.attempts=function(){return this._attempts},fu.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,i=0;i<this._errors.length;i++){var o=this._errors[i],a=o.message,r=(e[a]||0)+1;e[a]=r,r>=n&&(t=o,n=r)}return t},function(e){var t=hu;e.operation=function(n){var i=e.timeouts(n);return new t(i,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],o=0;o<t.retries;o++)i.push(this.createTimeout(o,t));return e&&e.forever&&!i.length&&i.push(this.createTimeout(o,t)),i.sort(function(e,t){return e-t}),i},e.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,i=Math.round(n*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return i=Math.min(i,t.maxTimeout)},e.wrap=function(t,n,i){if(n instanceof Array&&(i=n,n=null),!i)for(var o in i=[],t)"function"==typeof t[o]&&i.push(o);for(var a=0;a<i.length;a++){var r=i[a],s=t[r];t[r]=function(i){var o=e.operation(n),a=Array.prototype.slice.call(arguments,1),r=a.pop();a.push(function(e){o.retry(e)||(e&&(arguments[0]=o.mainError()),r.apply(this,arguments))}),o.attempt(function(){i.apply(t,a)})}.bind(t,s),t[r].options=n}}}(mu);var vu=k(du.exports=mu);const xu=Object.prototype.toString,gu=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function bu(e){var t;if(!(e&&(t=e,"[object Error]"===xu.call(t))&&"TypeError"===e.name&&"string"==typeof e.message))return!1;const{message:n,stack:i}=e;return"Load failed"===n?void 0===i||"__sentry_captured__"in e:!!n.startsWith("error sending request for url")||gu.has(n)}class yu extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,({message:e}=e)):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}const Du=(e,t,n)=>{const i=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=i,e};async function wu(e,t){return new Promise((n,i)=>{t={...t},t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>!0,t.retries??=10;const o=vu.operation(t),a=()=>{o.stop(),i(t.signal?.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",a,{once:!0});const r=()=>{t.signal?.removeEventListener("abort",a),o.stop()};o.attempt(async a=>{try{const t=await e(a);r(),n(t)}catch(e){try{if(!(e instanceof Error))throw new TypeError(`Non-error was thrown: "${e}". You should only throw errors.`);if(e instanceof yu)throw e.originalError;if(e instanceof TypeError&&!bu(e))throw e;if(Du(e,a,t),await t.shouldRetry(e)||(o.stop(),i(e)),await t.onFailedAttempt(e),!o.retry(e))throw o.mainError()}catch(e){Du(e,a,t),r(),i(e)}}})})}const _u={retries:3,minTimeout:1e3,maxTimeout:8e3,factor:2,isCritical:!1,additionalRetryStatusCodes:[]},Eu=(e,t={})=>(async(e,t={})=>{const n={..._u,...t};return wu(async()=>{var t;try{return await e()}catch(e){const i=e;if(!((e,t=[])=>{var n;if("ETIMEDOUT"===e.code||"ECONNRESET"===e.code||"ECONNABORTED"===e.code||"ENOTFOUND"===e.code||"EAI_AGAIN"===e.code)return!0;if(e.message&&e.message.toLowerCase().includes("timeout"))return!0;if(null===(n=e.response)||void 0===n?void 0:n.status){const n=e.response.status;return n>=500||404===n||408===n||429===n||t.includes(n)}return!0})(i,n.additionalRetryStatusCodes))throw new yu(`Non-retriable error: ${(null===(t=i.response)||void 0===t?void 0:t.status)||i.code}`);throw e}},{retries:n.retries,minTimeout:n.minTimeout,maxTimeout:n.maxTimeout,factor:n.factor,onFailedAttempt:e=>{n.isCritical?q.error(ru.requestFailed(e.attemptNumber,e.retriesLeft,e.message)):q.warning(ru.requestFailed(e.attemptNumber,e.retriesLeft,e.message))}})})(e,{...t,isCritical:!0}),Cu="/api/v1",Fu=e=>{const t=(n=e,Object.entries(n).reduce((e,t)=>(e[Wt(t[0])]=t[1],e),{}));var n;return Eu(()=>Mc.post(`${Cu}/reporter/runs`,{run:t},{skipSnakeCaseConversion:!0}),{additionalRetryStatusCodes:[422]})},Tu=(e,t)=>Eu(()=>Mc.put(`${Cu}/reporter/runs/${e}`,{run:t}),{additionalRetryStatusCodes:[422]}),Au=e=>Mc.get(`${Cu}/reporter/runs/${e}/heartbeat`),ku=(e,t)=>Eu(()=>Mc.post(`${Cu}/reporter/runs/${e}/test_entities`,{testEntity:t}),{additionalRetryStatusCodes:[422]});class ju{constructor(e,t={interval:4e4,maxRetries:3,requestTimeout:3e3,retryDelay:1e3,emergencyThreshold:1e5}){this.ciBuildId=e,this.options=t,this.interval=null,this.emergencyTimeout=null,this.isServiceActive=!1,this.isHeartbeatInProgress=!1,this.lastSuccessfulHeartbeat=0,this.start=async()=>{this.isServiceActive||(this.isServiceActive=!0,this.lastSuccessfulHeartbeat=Date.now(),await this.sendHeartbeat(),this.scheduleNextHeartbeat(),this.scheduleEmergencyCheck())},this.stop=()=>{this.interval&&(clearInterval(this.interval),this.interval=null),this.emergencyTimeout&&(clearTimeout(this.emergencyTimeout),this.emergencyTimeout=null),this.isServiceActive=!1},this.scheduleNextHeartbeat=()=>{this.interval=setInterval(()=>{this.isHeartbeatInProgress||this.sendHeartbeat().catch(e=>{var t;q.error(su.schedulingFailed(null!==(t=null==e?void 0:e.message)&&void 0!==t?t:String(e)))})},this.options.interval)},this.scheduleEmergencyCheck=()=>{this.emergencyTimeout=setTimeout(()=>{Date.now()-this.lastSuccessfulHeartbeat>this.options.emergencyThreshold&&(q.warning(su.emergencyTriggered),this.isHeartbeatInProgress||this.sendEmergencyHeartbeat()),this.isServiceActive&&this.scheduleEmergencyCheck()},this.options.emergencyThreshold)},this.sendHeartbeat=async()=>{if(!this.isHeartbeatInProgress){this.isHeartbeatInProgress=!0;try{await wu(async()=>{await Au(this.ciBuildId),this.lastSuccessfulHeartbeat=Date.now()},{retries:this.options.maxRetries,minTimeout:this.options.retryDelay,maxTimeout:this.options.retryDelay,onFailedAttempt:e=>{var t;const n=e;if(null===(t=n.response)||void 0===t?void 0:t.status){const e=n.response.status;if(e>=400&&e<500&&404!==e&&408!==e)throw new yu(`Non-retriable client error: ${e}`)}q.warning(su.attemptFailed(e.attemptNumber,e.retriesLeft,e.message))}})}catch(e){this.handleHeartbeatFailure(e)}finally{this.isHeartbeatInProgress=!1}}},this.sendEmergencyHeartbeat=async()=>{var e;this.isHeartbeatInProgress=!0;try{await Au(this.ciBuildId),this.lastSuccessfulHeartbeat=Date.now()}catch(t){q.error(su.emergencyFailed(null!==(e=null==t?void 0:t.message)&&void 0!==e?e:String(t))),this.handleHeartbeatFailure(t)}finally{this.isHeartbeatInProgress=!1}},this.handleHeartbeatFailure=e=>{var t;const n=e instanceof yu;q.error(su.failed(null!==(t=null==e?void 0:e.message)&&void 0!==t?t:String(e))),n&&(q.redText(N.stopped),this.stop(),process.exit(1))},this.sendImmediateHeartbeat=async()=>{this.isHeartbeatInProgress||await this.sendHeartbeat()}}get status(){return{isServiceActive:this.isServiceActive,isHeartbeatInProgress:this.isHeartbeatInProgress,lastHeartbeat:this.lastSuccessfulHeartbeat}}}const Su=({command:e,messageOnError:t,shouldThrowError:n=!1,logLevel:i="warning"})=>{try{return y.execSync(e).toString().trim()}catch(e){if(n)throw e;q[i](t)}},Ou=(e,t)=>{var n;const{title:i,parent:a,location:{file:r}}=e,s=e.titlePath(),c=null===(n=a.project())||void 0===n?void 0:n.name,u=o.relative(t,r),p=(({titlePath:e,title:t,project:n,rootDir:i,file:a})=>e.filter((e,r)=>0!==r&&e!==t&&e!==n&&e!==o.relative(i,a)))({titlePath:s,title:i,project:c,rootDir:t,file:r});return{title:i,describe:p,project:c,spec:u,historyId:(({projectId:e,specName:t,describeTitles:n,testTitle:i})=>{const o=`[project=${e}]${t}${[...n,i].join("")}`,a=Zt(o);return`${Zt(t)}-${a}`})({projectId:null!=c?c:"",specName:u,describeTitles:p,testTitle:i})}},Ru=({rootDir:e},t)=>Me(t.allTests().map(t=>Ou(t,e))),Bu=async(e,t,n)=>{var i,o,a,r,s,c,u,p;let l=t.shard;if(!l){const e=process.env.NEETO_PLAYDASH_CURRENT_SHARD,t=process.env.NEETO_PLAYDASH_TOTAL_SHARDS;e&&t&&(l={current:parseInt(e),total:parseInt(t)})}e.config=t;const d=e.currentShard=null!==(i=null==l?void 0:l.current)&&void 0!==i?i:0;O.setContext({ciBuildId:e.ciBuildId,currentShard:null==l?void 0:l.current,rootDir:t.rootDir});const m=n.allTests();e.totalTestCount=m.length,e.rootDir=t.rootDir;const f=l?{...t,shard:l}:t,h={commitId:null!==(o=e.commitId)&&void 0!==o?o:Su({command:"git rev-parse HEAD",messageOnError:R.failedToGetCommitSha}),commitName:null!==(a=e.title)&&void 0!==a?a:Su({command:"git show-branch --no-name HEAD",messageOnError:R.failedToGetCommitMessage}),author:null!==(r=e.author)&&void 0!==r?r:Su({command:"git show -s --format='%an' HEAD",messageOnError:R.failedToGetBranch}),branch:null!==(s=e.branch)&&void 0!==s?s:Su({command:"git branch --show-current",messageOnError:R.failedToGetBranch}),tags:"string"==typeof e.tags?e.tags.split(","):e.tags,ciBuildId:e.ciBuildId,configuration:{...f,baseDir:process.cwd()},shards:Yt({currentShard:d})};try{if(await Fu(h),e.hasRunStarted=!0,0===e.totalTestCount)return void q.redText(R.noTestsToReport);e.heartbeatManager=new ju(e.ciBuildId),await e.heartbeatManager.start();const{data:i}=await ku(e.ciBuildId,{testEntities:Ru(t,n),shard:d});e.attempts=i,q.log(cu.testData(e.ciBuildId,l))}catch(i){e.shouldNotReportTest=!0;const o=i,a=null===(c=o.response)||void 0===c?void 0:c.data;q.error(null!==(u=null==a?void 0:a.error)&&void 0!==u?u:o.message),q.error(R.failedToInitializeRun),await nn({context:{...h,testEntities:Ru(t,n)},error:i,title:"onBegin"}),((e,t)=>{var n,i;const{error:o}=e&&(e instanceof $c&&(null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.data)||{error:void 0}),a=e&&(e instanceof $c?null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.status:void 0);t.shouldNotReportTest=!0,"Project does not exist."===o&&404===a?(q.redText(R.invalidProjectKey),process.exit(1)):"Could not authenticate, invalid API Key"===o&&401===a||"api-key"===t.apiKey?(q.redText(R.invalidApiKey),process.exit(1)):[F,T].includes(o||"")&&422===a?(q.redText(R.duplicateCiBuildId),process.exit(1)):(422===a&&(process.kill(process.pid,"SIGKILL"),process.exit(1)),tn(a)&&q.yellowText(null!=o?o:null==e?void 0:e.message),q.yellowText(R.testsWillNotBeReported))})(o,e),null===(p=e.heartbeatManager)||void 0===p||p.stop()}},Pu=(e,t,n)=>Eu(()=>Mc.post(`${Cu}/reporter/runs/${e}/test_entities/${t}/attempts`,n),{additionalRetryStatusCodes:[422]}),Iu=({ciBuildId:e,historyId:t,id:n,payload:i})=>Eu(()=>Mc.put(`${Cu}/reporter/runs/${e}/test_entities/${t}/attempts/${n}`,i),{additionalRetryStatusCodes:[422]}),Nu=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);const Lu="axios-retry";function Uu(e){return!e.response&&(!!e.code&&(!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&(e=>!Nu.has(e&&e.code))(e)))}const zu=["get","head","options"],qu=zu.concat(["put","delete"]);function Mu(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Hu(e){return!!e.config?.method&&(Mu(e)&&-1!==qu.indexOf(e.config.method))}function $u(e){return Uu(e)||Hu(e)}function Gu(e=void 0){const t=e?.response?.headers["retry-after"];if(!t)return 0;let n=1e3*(Number(t)||0);return 0===n&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}const Ku={retries:3,retryCondition:$u,retryDelay:function(e=0,t=void 0){return Math.max(0,Gu(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Wu(e,t,n=!1){const i=function(e,t){return{...Ku,...t,...e[Lu]}}(e,t||{});return i.retryCount=i.retryCount||0,i.lastRequestTime&&!n||(i.lastRequestTime=Date.now()),e[Lu]=i,i}const Vu=(e,t)=>{const n=e.interceptors.request.use(e=>(Wu(e,t,!0),e[Lu]?.validateResponse&&(e.validateStatus=()=>!1),e)),i=e.interceptors.response.use(null,async n=>{const{config:i}=n;if(!i)return Promise.reject(n);const o=Wu(i,t);return n.response&&o.validateResponse?.(n.response)?n.response:await async function(e,t){const{retries:n,retryCondition:i}=e,o=(e.retryCount||0)<n&&i(t);if("object"==typeof o)try{return!1!==await o}catch(e){return!1}return o}(o,n)?async function(e,t,n,i){t.retryCount+=1;const{retryDelay:o,shouldResetTimeout:a,onRetry:r}=t,s=o(t.retryCount,n);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,i),!a&&i.timeout&&t.lastRequestTime){const e=Date.now()-t.lastRequestTime,o=i.timeout-e-s;if(o<=0)return Promise.reject(n);i.timeout=o}return i.transformRequest=[e=>e],await r(t.retryCount,n,i),i.signal?.aborted?Promise.resolve(e(i)):new Promise(t=>{const n=()=>{clearTimeout(o),t(e(i))},o=setTimeout(()=>{t(e(i)),i.signal?.removeEventListener&&i.signal.removeEventListener("abort",n)},s);i.signal?.addEventListener&&i.signal.addEventListener("abort",n,{once:!0})})}(e,o,n,i):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(o,n),Promise.reject(n))});return{requestInterceptorId:n,responseInterceptorId:i}};Vu.isNetworkError=Uu,Vu.isSafeRequestError=function(e){return!!e.config?.method&&(Mu(e)&&-1!==zu.indexOf(e.config.method))},Vu.isIdempotentRequestError=Hu,Vu.isNetworkOrIdempotentRequestError=$u,Vu.exponentialDelay=function(e=0,t=void 0,n=100){const i=2**e*n,o=Math.max(i,Gu(t));return o+.2*o*Math.random()},Vu.linearDelay=function(e=100){return(t=0,n=void 0)=>{const i=t*e;return Math.max(i,Gu(n))}},Vu.isRetryableError=Mu;const Yu="Content-Type",Ju="Accept",Xu="X-Api-Key",Zu="Project-Key",Qu="Reporter-Version",ep=e=>e===Object(e)&&!(e instanceof Buffer);function tp({projectKey:e,baseURL:t,apiKey:n}){const i=new u.Agent({keepAlive:!0,keepAliveMsecs:6e4,timeout:9e4});Mc.defaults.baseURL=t||process.env.NEETO_PLAYDASH_API_BASE_URL||"https://connect.neetoplaydash.com",Mc.defaults.skipSnakeCaseConversion=!1,Mc.defaults.headers.common.Connection="keep-alive",Mc.defaults.httpsAgent=i,Mc.defaults.timeout=9e4,(({projectKey:e,apiKey:t})=>{Mc.defaults.headers={...Mc.defaults.headers,[Zu]:e,[Qu]:on(),[Xu]:null!=t?t:"",[Ju]:"application/json",[Yu]:"application/json"}})({projectKey:e,apiKey:n}),Mc.interceptors.request.use(e=>{const t=e.data;return ep(t)&&!e.skipSnakeCaseConversion&&(e.data=Vt(t,function(e,t){return[Wt(e),t]})),e}),Mc.interceptors.response.use(e=>{const t=e.data;return ep(t)&&(e.data=Vt(t,function(e,t){return[(n=e,n.replace(/(_\w)/g,function(e){return e[1].toUpperCase()})),t];var n})),e}),Vu(Mc,{retries:3,retryDelay:e=>Math.min(1e3*Math.pow(2,e-1),1e4),retryCondition:e=>{var t;const n=null===(t=e.status)||void 0===t?void 0:t.toString();return!!Vu.isNetworkOrIdempotentRequestError(e)||(!!("ETIMEDOUT"===e.code||"ECONNRESET"===e.code||"ECONNABORTED"===e.code||"ENOTFOUND"===e.code||"EAI_AGAIN"===e.code||e.message&&e.message.toLowerCase().includes("timeout"))||!!n&&(n.startsWith("5")||"404"===n||"408"===n||"429"===n))}})}const np=Mc.create({timeout:0,httpsAgent:new u.Agent({timeout:0})}),ip=["screenshot","video","trace","lighthouse"],op=({location:e,snippet:t})=>{if(!e)return null;const{file:n,line:i,column:o}=e;return`# ${n} (${i}:${o}) \n\n\n ${t}`},ap={KB:1024,MB:Math.pow(1024,2)},rp=(e,t)=>parseFloat((e/ap[t]).toFixed(2));var sp=class{constructor(e,t,n){this.etaBufferLength=e||100,this.valueBuffer=[n],this.timeBuffer=[t],this.eta="0"}update(e,t,n){this.valueBuffer.push(t),this.timeBuffer.push(e),this.calculate(n-t)}getTime(){return this.eta}calculate(e){const t=this.valueBuffer.length,n=Math.min(this.etaBufferLength,t),i=(this.valueBuffer[t-1]-this.valueBuffer[t-n])/(this.timeBuffer[t-1]-this.timeBuffer[t-n]);this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);const o=Math.ceil(e/i/1e3);isNaN(o)?this.eta="NULL":isFinite(o)?this.eta=o>1e7?"INF":o<0?0:o:this.eta="INF"}};const cp=D;var up=class{constructor(e){this.stream=e,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("7")}cursorRestore(){this.stream.isTTY&&this.stream.write("8")}cursor(e){this.stream.isTTY&&(e?this.stream.write("[?25h"):this.stream.write("[?25l"))}cursorTo(e=null,t=null){this.stream.isTTY&&cp.cursorTo(this.stream,e,t)}cursorRelative(e=null,t=null){this.stream.isTTY&&(this.dy=this.dy+t,cp.moveCursor(this.stream,e,t))}cursorRelativeReset(){this.stream.isTTY&&(cp.moveCursor(this.stream,0,-this.dy),cp.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&cp.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&cp.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&cp.clearScreenDown(this.stream)}newline(){this.stream.write("\n"),this.dy++}write(e,t=!1){!0===this.linewrap&&!1===t?this.stream.write(e.substr(0,this.getWidth())):this.stream.write(e)}lineWrapping(e){this.stream.isTTY&&(this.linewrap=e,e?this.stream.write("[?7h"):this.stream.write("[?7l"))}isTTY(){return!0===this.stream.isTTY}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}},pp={exports:{}};const lp=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};var dp={exports:{}};const mp=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));dp.exports=mp,dp.exports.default=mp;const fp=e=>"string"==typeof e?e.replace(lp(),""):e,hp=dp.exports,vp=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},xp=e=>{if("string"!=typeof e||0===e.length)return 0;if(0===(e=fp(e)).length)return 0;e=e.replace(vp()," ");let t=0;for(let n=0;n<e.length;n++){const i=e.codePointAt(n);i<=31||i>=127&&i<=159||(i>=768&&i<=879||(i>65535&&n++,t+=hp(i)?2:1))}return t};pp.exports=xp,pp.exports.default=xp;var gp=function(e,t,n){if(!0!==t.autopadding)return e;return"percentage"===n?(i=e,(t.autopaddingChar+i).slice(-3)):e;var i},bp=function(e,t){const n=Math.round(e*t.barsize),i=t.barsize-n;return t.barCompleteString.substr(0,n)+t.barGlue+t.barIncompleteString.substr(0,i)},yp=function(e,t,n){function i(e){return n?n*Math.round(e/n):e}function o(e){return(t.autopaddingChar+e).slice(-2)}return e>3600?o(Math.floor(e/3600))+"h"+o(i(e%3600/60))+"m":e>60?o(Math.floor(e/60))+"m"+o(i(e%60))+"s":e>10?o(i(e))+"s":o(e)+"s"};const Dp=pp.exports,wp=gp,_p=bp,Ep=yp;var Cp=function(e,t,n){let i=e.format;const o=e.formatTime||Ep,a=e.formatValue||wp,r=e.formatBar||_p,s=Math.floor(100*t.progress)+"",c=t.stopTime||Date.now(),u=Math.round((c-t.startTime)/1e3),p=Object.assign({},n,{bar:r(t.progress,e),percentage:a(s,e,"percentage"),total:a(t.total,e,"total"),value:a(t.value,e,"value"),eta:a(t.eta,e,"eta"),eta_formatted:o(t.eta,e,5),duration:a(u,e,"duration"),duration_formatted:o(u,e,1)});i=i.replace(/\{(\w+)\}/g,function(e,t){return void 0!==p[t]?p[t]:e});const l=Math.max(0,t.maxWidth-Dp(i)-2),d=Math.floor(l/2);switch(e.align){case"right":i=l>0?" ".repeat(l)+i:i;break;case"center":i=d>0?" ".repeat(d)+i:i}return i};function Fp(e,t){return null==e?t:e}var Tp={parse:function(e,t){const n={},i=Object.assign({},t,e);return n.throttleTime=1e3/Fp(i.fps,10),n.stream=Fp(i.stream,process.stderr),n.terminal=Fp(i.terminal,null),n.clearOnComplete=Fp(i.clearOnComplete,!1),n.stopOnComplete=Fp(i.stopOnComplete,!1),n.barsize=Fp(i.barsize,40),n.align=Fp(i.align,"left"),n.hideCursor=Fp(i.hideCursor,!1),n.linewrap=Fp(i.linewrap,!1),n.barGlue=Fp(i.barGlue,""),n.barCompleteChar=Fp(i.barCompleteChar,"="),n.barIncompleteChar=Fp(i.barIncompleteChar,"-"),n.format=Fp(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Fp(i.formatTime,null),n.formatValue=Fp(i.formatValue,null),n.formatBar=Fp(i.formatBar,null),n.etaBufferLength=Fp(i.etaBuffer,10),n.etaAsynchronousUpdate=Fp(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Fp(i.progressCalculationRelative,!1),n.synchronousUpdate=Fp(i.synchronousUpdate,!0),n.noTTYOutput=Fp(i.noTTYOutput,!1),n.notTTYSchedule=Fp(i.notTTYSchedule,2e3),n.emptyOnZero=Fp(i.emptyOnZero,!1),n.forceRedraw=Fp(i.forceRedraw,!1),n.autopadding=Fp(i.autopadding,!1),n.gracefulExit=Fp(i.gracefulExit,!1),n},assignDerivedOptions:function(e){return e.barCompleteString=e.barCompleteChar.repeat(e.barsize+1),e.barIncompleteString=e.barIncompleteChar.repeat(e.barsize+1),e.autopaddingChar=e.autopadding?Fp(e.autopaddingChar," "):"",e}};const Ap=sp,kp=up,jp=Cp,Sp=Tp,Op=g;var Rp=class extends Op{constructor(e){super(),this.options=Sp.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new kp(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Ap(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter="function"==typeof this.options.format?this.options.format:jp}render(e=!1){const t={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();const n=this.formatter(this.options,t,this.payload);(e||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(e,t,n){this.value=t||0,this.total=void 0!==e&&e>=0?e:100,this.startValue=t||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Ap(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",e,t)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(e,t={}){"number"==typeof e&&(this.value=e,this.eta.update(Date.now(),e,this.total));const n=("object"==typeof e?e:t)||{};this.emit("update",this.total,this.value);for(const e in n)this.payload[e]=n[e];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let e=this.value/this.total;return this.options.progressCalculationRelative&&(e=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(e)&&(e=this.options&&this.options.emptyOnZero?0:1),e=Math.min(Math.max(e,0),1),e}increment(e=1,t={}){"object"==typeof e?this.update(this.value+1,e):this.update(this.value+e,t)}getTotal(){return this.total}setTotal(e){void 0!==e&&e>=0&&(this.total=e)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}};const Bp=Rp,Pp=Tp;const Ip=up,Np=Rp,Lp=Tp,Up=g;var zp={legacy:{format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"},shades_classic:{format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"},shades_grey:{format:" [90m{bar}[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"},rect:{format:" {bar}■ {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"■",barIncompleteChar:" "}};const qp=class extends Bp{constructor(e,t){super(Pp.parse(e,t)),this.timer=null,this.options.noTTYOutput&&!1===this.terminal.isTTY()&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&!1===this.terminal.isTTY()&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(e,t){this.timer&&(super.update(e,t),this.options.synchronousUpdate&&this.lastRedraw+2*this.options.throttleTime<Date.now()&&this.render())}start(e,t,n){!1===this.options.noTTYOutput&&!1===this.terminal.isTTY()||(null===this.sigintCallback&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),!0===this.options.hideCursor&&this.terminal.cursor(!1),!1===this.options.linewrap&&this.terminal.lineWrapping(!1),super.start(e,t,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,!0===this.options.hideCursor&&this.terminal.cursor(!0),!1===this.options.linewrap&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}},Mp=class extends Up{constructor(e,t){super(),this.bars=[],this.options=Lp.parse(e,t),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new Ip(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(e,t,n,i={}){const o=new Np(Object.assign({},this.options,{terminal:this.terminal},i));return this.bars.push(o),!1===this.options.noTTYOutput&&!1===this.terminal.isTTY()||(null===this.sigintCallback&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(!0===this.options.hideCursor&&this.terminal.cursor(!1),!1===this.options.linewrap&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,o.start(e,t,n),this.emit("start")),o}remove(e){const t=this.bars.indexOf(e);return!(t<0)&&(this.bars.splice(t,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render();this.emit("redraw-post"),this.options.noTTYOutput&&!1===this.terminal.isTTY()&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(e=>e.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,!0===this.options.hideCursor&&this.terminal.cursor(!0),!1===this.options.linewrap&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render(),this.bars[e].stop();this.terminal.newline()}this.emit("stop")}log(e){this.loggingBuffer.push(e)}};var Hp={Bar:qp,SingleBar:qp,MultiBar:Mp,Presets:zp,Format:{Formatter:Cp,BarFormat:bp,ValueFormat:gp,TimeFormat:yp}};const $p=(e,t)=>"flaky"===e?e:t,Gp=async(e,{url:t,headers:n},i)=>{const o=e.byteLength/1024>1024?"MB":"KB";const a=new Hp.Bar({format:`Uploading ${i} [{bar}] | {value}/{total} ${o} - ETA: {eta_formatted}`,clearOnComplete:!0},Hp.Presets.rect);return a.start(rp(e.byteLength,o),0),await((e,{url:t,headers:n},i)=>Eu(()=>np.put(t,e,{...i,headers:n,timeout:0})))(e,{url:t,headers:n},{onUploadProgress:e=>{e.total&&e.lengthComputable&&a.update(rp(e.loaded,o))}}),a};var Kp,Wp,Vp={exports:{}};
|
|
9
|
-
/*! https://mths.be/wtf8 v1.0.1 by @mathias */Kp=Vp,Wp=Vp.exports,function(e){var t=Wp,n=Kp&&Kp.exports==t&&Kp,i="object"==typeof A&&A;i.global!==i&&i.window!==i||(e=i);var o,a,r,s=String.fromCharCode;function c(e){for(var t,n,i=[],o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),o--):i.push(t);return i}function u(e,t){return s(e>>t&63|128)}function p(e){if(!(4294967168&e))return s(e);var t="";return 4294965248&e?4294901760&e?4292870144&e||(t=s(e>>18&7|240),t+=u(e,12),t+=u(e,6)):(t=s(e>>12&15|224),t+=u(e,6)):t=s(e>>6&31|192),t+=s(63&e|128)}function l(){if(r>=a)throw Error("Invalid byte index");var e=255&o[r];if(r++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function d(){var e,t;if(r>a)throw Error("Invalid byte index");if(r==a)return!1;if(e=255&o[r],r++,!(128&e))return e;if(192==(224&e)){if((t=(31&e)<<6|l())>=128)return t;throw Error("Invalid continuation byte")}if(224==(240&e)){if((t=(15&e)<<12|l()<<6|l())>=2048)return t;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=(15&e)<<18|l()<<12|l()<<6|l())>=65536&&t<=1114111)return t;throw Error("Invalid WTF-8 detected")}var m={version:"1.0.1",encode:function(e){for(var t=c(e),n=t.length,i=-1,o="";++i<n;)o+=p(t[i]);return o},decode:function(e){o=c(e),a=o.length,r=0;for(var t,n=[];!1!==(t=d());)n.push(t);return function(e){for(var t,n=e.length,i=-1,o="";++i<n;)(t=e[i])>65535&&(o+=s((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=s(t);return o}(n)}};if(t&&!t.nodeType)if(n)n.exports=m;else{var f={}.hasOwnProperty;for(var h in m)f.call(m,h)&&(t[h]=m[h])}else e.wtf8=m}(A);var Yp=Vp.exports;const Jp=async(e,t,{status:n,duration:o,errors:a,error:r,retry:s,attachments:c})=>{var u;const l=new Date,{currentShard:d,rootDir:m,ciBuildId:f}=e,{title:h,repeatEachIndex:v}=t,{historyId:x}=Ou(t,m),g=t.outcome(),b=Qt(s,v),y={shard:d,isExpected:"expected"===g,repeatEachIndex:v,status:$p(g,n)};try{e.pendingTestEnds.add(Qt(x,b));const t={outcome:y,status:n,duration:o,log:Yp.encode(a.map(e=>{var t;return(null!==(t=e.message)&&void 0!==t?t:"").replace(/[\uD800-\uDFFF]/g,"?")}).join("\n")),screenshots:[],videos:[],traces:[],lighthouses:[],completedAt:l.toString(),errorSnippet:r&&op(r)};if(e.shouldNotReportTest)return;const s=Qt(x,b);if(e.startedAttempts.has(s)||(q.warning(`Waiting for attempt to be started: ${h} (${x}-${b})`),await Xt(()=>e.startedAttempts.has(s)),e.startedAttempts.has(s)||q.error(`Attempt was never started for test "${h}" (${x}-${b}). This test cannot be reported.`)),e.shouldNotReportTest)return;q.underline(h);const u=c.map(({name:e,path:t,body:n,contentType:o})=>{if(ip.includes(e))try{const a=t?i(t):n,r=((e,t,n)=>(null!=e?e:`${t}.${n.split("/")[1]}`).replaceAll("/","-"))(t,e,o),{file:s,...c}=((e,t,n)=>{const i=e.byteLength;return{file:e,filename:n,checksum:p.createHash("md5").update(Uint8Array.from(e)).digest("base64"),byteSize:i,contentType:t}})(a,o,r);return{file:s,metadata:c,name:e}}catch(n){const i=n instanceof Error?n.message:String(n);return void q.yellowText(`Skipping missing file: ${t||e} - ${i}`)}}).filter(Kt(void 0)),d={metadata:we("metadata",u)};q.warning(`Requesting direct upload URLs for ${u.length} file(s): ${h}`);const m=Date.now(),{data:v}=await(({ciBuildId:e,historyId:t},n)=>Eu(()=>Mc.post(`/api/v2/reporter/runs/${e}/test_entities/${t}/direct_uploads`,{blob:n}),{additionalRetryStatusCodes:[422]}))({ciBuildId:e.ciBuildId,historyId:x},d);q.warning(`Received direct upload URLs in ${Date.now()-m}ms: ${h}`);const g=Date.now(),D=await Promise.all(v.map(async({signedId:e,directUpload:n},i)=>{var o,a;return t[`${null===(o=u[i])||void 0===o?void 0:o.name}s`].push(e),Gp(u[i].file,n,`${h} - ${null===(a=u[i])||void 0===a?void 0:a.name}`)}));e.progressBars.push(...D),Gt(u)&&q.warning(`Uploaded ${u.length} file(s) in ${Date.now()-g}ms: ${h}`),q.warning(`Reporting test result to server: ${h} (${x}-${b})`);const w=Date.now(),_=Iu({ciBuildId:f,historyId:x,id:e.attempts[x][b],payload:t});e.testResultCalls.push(_),await _,q.warning(`Test result reported in ${Date.now()-w}ms: ${h}`)}catch(r){await nn({context:{historyId:x,attemptIndex:b,title:h,status:n,outcome:y,duration:o,completedAt:l},error:r,title:"onTestEnd"}),q.error(r.message),q.error(I.failedToReportTest(h,x)),await(null===(u=e.heartbeatManager)||void 0===u?void 0:u.sendImmediateHeartbeat())}finally{q.log(pu.reportedTest({title:h,status:n,historyId:x,completedAt:l,error:r&&`${op(r)}\n\n${Yp.encode(a.map(e=>{var t;return(null!==(t=e.message)&&void 0!==t?t:"").replace(/[\uD800-\uDFFF]/g,"?")}).join("\n"))}`,isTestReported:!e.shouldNotReportTest,retry:s,repeatEachIndex:v})),e.pendingTestEnds.delete(Qt(x,b)),e.startedAttempts.delete(Qt(x,b))}},Xp=w.extend({generateLighthouseMetaData:async({},e,t)=>{let n=0;const{title:i,outputDir:o}=t;await e(()=>{const e=i.replace(/[:]/g,"_");return{formats:{html:!0},name:n?e:`${e}-${n++}`,directory:o,get pathToLightHouseHTMLReport(){return`${o}/${this.name}.html`}}})},attachLighthouseReport:async({},e,t)=>{await e(async e=>{e.endsWith(".html")?await t.attach("lighthouse",{path:e,contentType:"text/html"}):q.redText(U.attachLightHouseReport.unsupportedFileType(e))})}}),Zp=(e,t)=>{_.setDefaultResultOrder("ipv4first");tp({projectKey:t.projectKey||process.env.NEETO_PROJECT_KEY||"",baseURL:t.baseURL||process.env.NEETO_PLAYDASH_API_BASE_URL||"",apiKey:t.apiKey||process.env.NEETO_API_KEY||"",ciBuildId:t.ciBuildId||process.env.NEETO_CI_BUILD_ID||""}),process.on("unhandledRejection",async t=>{var n,i,o;try{const a=null===(n=t.response)||void 0===n?void 0:n.data;await nn({context:{},error:t,title:"unhandledRejection"}),await(async e=>{try{await Au(e)}catch(e){q.error(e.message),q.error(JSON.stringify(e,null,4)),q.redText(N.stopped),process.exit(1)}})(e.ciBuildId),q.error(null!==(o=null!==(i=null==a?void 0:a.error)&&void 0!==i?i:t.message)&&void 0!==o?o:JSON.stringify(t))}catch(t){q.error("Honeybadger failed :(")}})};class Qp{constructor(e){var t;this.reportLifecycleError=async(e,t,n={})=>{var i,o,a;let r=null;t instanceof $c&&(r=null!==(a=null===(o=null===(i=null==t?void 0:t.response)||void 0===i?void 0:i.data)||void 0===o?void 0:o.error)&&void 0!==a?a:null==t?void 0:t.message),q.error(`${e} failed: ${null!=r?r:String(t)}`),await nn({context:{lifecycle:e,ciBuildId:this.ciBuildId,...n},error:t,title:`${e} - Fire and Forget Handler`})},this.onBegin=(e,t)=>{Bu(this,e,t).catch(t=>this.reportLifecycleError("onBegin",t,{configDetails:JSON.stringify(e,null,2)}))},this.onTestBegin=(e,t)=>{(async(e,t,{retry:n})=>{var i,o,a;const{title:r,repeatEachIndex:s}=t,{rootDir:c,currentShard:u,ciBuildId:p}=e,{historyId:l}=Ou(t,c),d=(new Date).toString(),m=Qt(n,s);if(e.shouldNotReportTest)q.invertBackground(uu.startingTest({titlePath:r,historyId:l,retry:n,repeatEachIndex:s}));else try{if(e.pendingTestBegins.add(Qt(l,m)),await Xt(()=>{var t,n;const i=Gt(e.attempts),o=$e(null===(n=null===(t=e.attempts)||void 0===t?void 0:t[l])||void 0===n?void 0:n["0-0"]);return i&&o}),q.invertBackground(uu.startingTest({titlePath:r,historyId:l,retry:n,repeatEachIndex:s})),e.shouldNotReportTest)return;const t={status:"running",startedAt:d,shard:u,repeatEachIndex:s};if(0===n&&0===s)await Iu({ciBuildId:p,historyId:l,id:null===(o=null===(i=e.attempts)||void 0===i?void 0:i[l])||void 0===o?void 0:o["0-0"],payload:t});else{const{data:{attemptId:n}}=await Pu(p,l,t);e.attempts=We(e.attempts,{[l]:{[m]:n}})}}catch(t){await nn({context:{historyId:l,attemptIndex:m,title:r},error:t,title:"onTestBegin"}),q.error(t.message),q.error(B.failedToReportTest(r,l)),await(null===(a=e.heartbeatManager)||void 0===a?void 0:a.sendImmediateHeartbeat())}finally{e.pendingTestBegins.delete(Qt(l,m)),e.startedAttempts.add(Qt(l,m))}})(this,e,t).catch(t=>this.reportLifecycleError("onTestBegin",t,{testTitle:e.title,testLocation:e.location}))},this.onTestEnd=(e,t)=>{Jp(this,e,t).catch(n=>this.reportLifecycleError("onTestEnd",n,{testTitle:e.title,testLocation:e.location,testStatus:t.status,testDuration:t.duration}))},this.onEnd=e=>(async(e,{status:t,duration:n})=>{var i,o,a,r;const{currentShard:s}=e;let c=null;try{if(await Xt(()=>{const t=e.hasRunStarted||e.shouldNotReportTest,n=0===e.pendingTestBegins.size,i=0===e.pendingTestEnds.size,o=0===e.startedAttempts.size;return t&&n&&i&&o}),q.bold(lu.finalStatus({currentShard:s,status:t,duration:n})),e.shouldNotReportTest)return;if(0===e.totalTestCount)return void await Tu(e.ciBuildId,{shards:Yt({currentShard:s,status:"passed",duration:n})});await Promise.allSettled(e.testResultCalls);const o=await Tu(e.ciBuildId,{shards:Yt({currentShard:s,status:t,duration:n})});c=null===(i=null==o?void 0:o.data)||void 0===i?void 0:i.dashboardUrl}catch(e){const i=null===(o=e.response)||void 0===o?void 0:o.data;await nn({context:{runStatus:t,runDuration:n},error:e,title:"onEnd"}),q.error(null!==(a=i.error)&&void 0!==a?a:e.message),q.error(P.failedToReportRunStatus)}finally{e.shouldNotReportTest||0===e.totalTestCount||(q.invertBackground(lu.runReported),c&&(q.underline(lu.dashboardUrlHeader),q.log(c))),null===(r=e.heartbeatManager)||void 0===r||r.stop()}})(this,e);const n={projectKey:e.projectKey||process.env.NEETO_PROJECT_KEY||"",baseURL:e.baseURL||process.env.NEETO_PLAYDASH_API_BASE_URL||"",apiKey:e.apiKey||process.env.NEETO_API_KEY||"",ciBuildId:e.ciBuildId||process.env.NEETO_CI_BUILD_ID||"",tags:e.tags,title:e.title,commitId:e.commitId,author:e.author,branch:e.branch};this.attempts={},this.tags=n.tags,this.ciBuildId=n.ciBuildId,this.title=n.title,this.commitId=n.commitId,this.author=n.author,this.branch=n.branch,this.testResultCalls=[],this.totalTestCount=0,this.hasRunStarted=!1,this.heartbeatManager=null,this.rootDir="",this.currentShard=0,this.progressBars=[],this.startedAttempts=new Set,this.shouldNotReportTest=!1,this.pendingTestBegins=new Set,this.pendingTestEnds=new Set,this.apiKey=n.apiKey,O.configure({apiKey:en("9d5d98e72929dae3c8b3701f50032da1a02b80f9dc29a8e448a601871e5c82fd0ac2fa33c46443709cdb3eabc54a06ab"),environment:(null===(t=null==n?void 0:n.baseURL)||void 0===t?void 0:t.includes(".net"))?"staging":"production"}),O.setContext({...n,reporterVersion:on()}),Zp(this,n)}onStdOut(e,t){t&&q.bold(`Log from test "${t.title}"`),q.log(e.toString())}}export{Qp as default,Xp as test};
|
|
9
|
+
/*! https://mths.be/wtf8 v1.0.1 by @mathias */Kp=Vp,Wp=Vp.exports,function(e){var t=Wp,n=Kp&&Kp.exports==t&&Kp,i="object"==typeof A&&A;i.global!==i&&i.window!==i||(e=i);var o,a,r,s=String.fromCharCode;function c(e){for(var t,n,i=[],o=0,a=e.length;o<a;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),o--):i.push(t);return i}function u(e,t){return s(e>>t&63|128)}function p(e){if(!(4294967168&e))return s(e);var t="";return 4294965248&e?4294901760&e?4292870144&e||(t=s(e>>18&7|240),t+=u(e,12),t+=u(e,6)):(t=s(e>>12&15|224),t+=u(e,6)):t=s(e>>6&31|192),t+=s(63&e|128)}function l(){if(r>=a)throw Error("Invalid byte index");var e=255&o[r];if(r++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function d(){var e,t;if(r>a)throw Error("Invalid byte index");if(r==a)return!1;if(e=255&o[r],r++,!(128&e))return e;if(192==(224&e)){if((t=(31&e)<<6|l())>=128)return t;throw Error("Invalid continuation byte")}if(224==(240&e)){if((t=(15&e)<<12|l()<<6|l())>=2048)return t;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=(15&e)<<18|l()<<12|l()<<6|l())>=65536&&t<=1114111)return t;throw Error("Invalid WTF-8 detected")}var m={version:"1.0.1",encode:function(e){for(var t=c(e),n=t.length,i=-1,o="";++i<n;)o+=p(t[i]);return o},decode:function(e){o=c(e),a=o.length,r=0;for(var t,n=[];!1!==(t=d());)n.push(t);return function(e){for(var t,n=e.length,i=-1,o="";++i<n;)(t=e[i])>65535&&(o+=s((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=s(t);return o}(n)}};if(t&&!t.nodeType)if(n)n.exports=m;else{var f={}.hasOwnProperty;for(var h in m)f.call(m,h)&&(t[h]=m[h])}else e.wtf8=m}(A);var Yp=Vp.exports;const Jp=async(e,t,{status:n,duration:o,errors:a,error:r,retry:s,attachments:c})=>{var u;const l=new Date,{currentShard:d,rootDir:m,ciBuildId:f}=e,{title:h,repeatEachIndex:v}=t,{historyId:x}=Ou(t,m),g=t.outcome(),b=Qt(s,v),y={shard:d,isExpected:"expected"===g,repeatEachIndex:v,status:$p(g,n)};try{e.pendingTestEnds.add(Qt(x,b));const t={outcome:y,status:n,duration:o,log:Yp.encode(a.map(e=>{var t;return(null!==(t=e.message)&&void 0!==t?t:"").replace(/[\uD800-\uDFFF]/g,"?")}).join("\n")),screenshots:[],videos:[],traces:[],lighthouses:[],completedAt:l.toString(),errorSnippet:r&&op(r)};if(e.shouldNotReportTest)return;const s=Qt(x,b);if(e.startedAttempts.has(s)||(q.warning(`Waiting for attempt to be started: ${h} (${x}-${b})`),await Xt(()=>e.startedAttempts.has(s)),e.startedAttempts.has(s)||q.error(`Attempt was never started for test "${h}" (${x}-${b}). This test cannot be reported.`)),e.shouldNotReportTest)return;q.underline(h);const u=c.map(({name:e,path:t,body:n,contentType:o})=>{if(ip.includes(e))try{const a=t?i(t):n,r=((e,t,n)=>(null!=e?e:`${t}.${n.split("/")[1]}`).replaceAll("/","-"))(t,e,o),{file:s,...c}=((e,t,n)=>{const i=e.byteLength;return{file:e,filename:n,checksum:p.createHash("md5").update(Uint8Array.from(e)).digest("base64"),byteSize:i,contentType:t}})(a,o,r);return{file:s,metadata:c,name:e}}catch(n){const i=n instanceof Error?n.message:String(n);return void q.yellowText(`Skipping missing file: ${t||e} - ${i}`)}}).filter(Kt(void 0)),d={metadata:we("metadata",u)};q.warning(`Requesting direct upload URLs for ${u.length} file(s): ${h}`);const m=Date.now(),{data:v}=await(({ciBuildId:e,historyId:t},n)=>Eu(()=>Mc.post(`/api/v2/reporter/runs/${e}/test_entities/${t}/direct_uploads`,{blob:n}),{additionalRetryStatusCodes:[422]}))({ciBuildId:e.ciBuildId,historyId:x},d);q.warning(`Received direct upload URLs in ${Date.now()-m}ms: ${h}`);const g=Date.now(),D=await Promise.all(v.map(async({signedId:e,directUpload:n},i)=>{var o,a;return t[`${null===(o=u[i])||void 0===o?void 0:o.name}s`].push(e),Gp(u[i].file,n,`${h} - ${null===(a=u[i])||void 0===a?void 0:a.name}`)}));e.progressBars.push(...D),Gt(u)&&q.warning(`Uploaded ${u.length} file(s) in ${Date.now()-g}ms: ${h}`),q.warning(`Reporting test result to server: ${h} (${x}-${b})`);const w=Date.now(),_=Iu({ciBuildId:f,historyId:x,id:e.attempts[x][b],payload:t});e.testResultCalls.push(_),await _,q.warning(`Test result reported in ${Date.now()-w}ms: ${h}`)}catch(r){await nn({context:{historyId:x,attemptIndex:b,title:h,status:n,outcome:y,duration:o,completedAt:l},error:r,title:"onTestEnd"}),q.error(r.message),q.error(I.failedToReportTest(h,x)),await(null===(u=e.heartbeatManager)||void 0===u?void 0:u.sendImmediateHeartbeat())}finally{q.log(pu.reportedTest({title:h,status:n,historyId:x,completedAt:l,error:r&&`${op(r)}\n\n${Yp.encode(a.map(e=>{var t;return(null!==(t=e.message)&&void 0!==t?t:"").replace(/[\uD800-\uDFFF]/g,"?")}).join("\n"))}`,isTestReported:!e.shouldNotReportTest,retry:s,repeatEachIndex:v})),e.pendingTestEnds.delete(Qt(x,b)),e.startedAttempts.delete(Qt(x,b))}},Xp=w.extend({generateLighthouseMetaData:async({},e,t)=>{let n=0;const{title:i,outputDir:o}=t;await e(()=>{const e=i.replace(/[:]/g,"_");return{formats:{html:!0},name:n?e:`${e}-${n++}`,directory:o,get pathToLightHouseHTMLReport(){return`${o}/${this.name}.html`}}})},attachLighthouseReport:async({},e,t)=>{await e(async e=>{e.endsWith(".html")?await t.attach("lighthouse",{path:e,contentType:"text/html"}):q.redText(U.attachLightHouseReport.unsupportedFileType(e))})}}),Zp=(e,t)=>{_.setDefaultResultOrder("ipv4first");tp({projectKey:t.projectKey||process.env.NEETO_PROJECT_KEY||"",baseURL:t.baseURL||process.env.NEETO_PLAYDASH_API_BASE_URL||"",apiKey:t.apiKey||process.env.NEETO_API_KEY||"",ciBuildId:t.ciBuildId||process.env.NEETO_CI_BUILD_ID||""}),process.on("unhandledRejection",async t=>{var n,i,o;try{const a=null===(n=t.response)||void 0===n?void 0:n.data;await nn({context:{},error:t,title:"unhandledRejection"}),await(async e=>{try{await Au(e)}catch(e){q.error(e.message),q.error(JSON.stringify(e,null,4)),q.redText(N.stopped),process.exit(1)}})(e.ciBuildId),q.error(null!==(o=null!==(i=null==a?void 0:a.error)&&void 0!==i?i:t.message)&&void 0!==o?o:JSON.stringify(t))}catch(t){q.error("Honeybadger failed :(")}})};class Qp{constructor(e){var t;this.reportLifecycleError=async(e,t,n={})=>{var i,o,a;let r=null;t instanceof $c&&(r=null!==(a=null===(o=null===(i=null==t?void 0:t.response)||void 0===i?void 0:i.data)||void 0===o?void 0:o.error)&&void 0!==a?a:null==t?void 0:t.message),q.error(`${e} failed: ${null!=r?r:String(t)}`),await nn({context:{lifecycle:e,ciBuildId:this.ciBuildId,...n},error:t,title:`${e} - Fire and Forget Handler`})},this.onBegin=(e,t)=>{Bu(this,e,t).catch(t=>this.reportLifecycleError("onBegin",t,{configDetails:JSON.stringify(e,null,2)}))},this.onTestBegin=(e,t)=>{(async(e,t,{retry:n})=>{var i,o,a;const{title:r,repeatEachIndex:s}=t,{rootDir:c,currentShard:u,ciBuildId:p}=e,{historyId:l}=Ou(t,c),d=(new Date).toString(),m=Qt(n,s);if(e.shouldNotReportTest)q.invertBackground(uu.startingTest({titlePath:r,historyId:l,retry:n,repeatEachIndex:s}));else try{if(e.pendingTestBegins.add(Qt(l,m)),await Xt(()=>{var t,n;const i=Gt(e.attempts),o=$e(null===(n=null===(t=e.attempts)||void 0===t?void 0:t[l])||void 0===n?void 0:n["0-0"]);return i&&o}),q.invertBackground(uu.startingTest({titlePath:r,historyId:l,retry:n,repeatEachIndex:s})),e.shouldNotReportTest)return;const t={status:"running",startedAt:d,shard:u,repeatEachIndex:s};if(0===n&&0===s)await Iu({ciBuildId:p,historyId:l,id:null===(o=null===(i=e.attempts)||void 0===i?void 0:i[l])||void 0===o?void 0:o["0-0"],payload:t});else{const{data:{attemptId:n}}=await Pu(p,l,t);e.attempts=We(e.attempts,{[l]:{[m]:n}})}}catch(t){await nn({context:{historyId:l,attemptIndex:m,title:r},error:t,title:"onTestBegin"}),q.error(t.message),q.error(B.failedToReportTest(r,l)),await(null===(a=e.heartbeatManager)||void 0===a?void 0:a.sendImmediateHeartbeat())}finally{e.pendingTestBegins.delete(Qt(l,m)),e.startedAttempts.add(Qt(l,m))}})(this,e,t).catch(t=>this.reportLifecycleError("onTestBegin",t,{testTitle:e.title,testLocation:e.location}))},this.onTestEnd=(e,t)=>{Jp(this,e,t).catch(n=>this.reportLifecycleError("onTestEnd",n,{testTitle:e.title,testLocation:e.location,testStatus:t.status,testDuration:t.duration}))},this.onEnd=e=>(async(e,{status:t,duration:n})=>{var i,o,a,r;const{currentShard:s}=e;let c=null;try{if(await Xt(()=>{const t=e.hasRunStarted||e.shouldNotReportTest,n=0===e.pendingTestBegins.size,i=0===e.pendingTestEnds.size,o=0===e.startedAttempts.size;return t&&n&&i&&o}),q.bold(lu.finalStatus({currentShard:s,status:t,duration:n})),e.shouldNotReportTest)return;if(0===e.totalTestCount)return void await Tu(e.ciBuildId,{shards:Yt({currentShard:s,status:"passed",duration:n})});await Promise.allSettled(e.testResultCalls);const o=await Tu(e.ciBuildId,{shards:Yt({currentShard:s,status:t,duration:n})});c=null===(i=null==o?void 0:o.data)||void 0===i?void 0:i.dashboardUrl}catch(e){const i=null===(o=e.response)||void 0===o?void 0:o.data;await nn({context:{runStatus:t,runDuration:n},error:e,title:"onEnd"}),q.error(null!==(a=i.error)&&void 0!==a?a:e.message),q.error(P.failedToReportRunStatus)}finally{e.shouldNotReportTest||0===e.totalTestCount||(q.invertBackground(lu.runReported),c&&(q.underline(lu.dashboardUrlHeader),q.log(c))),null===(r=e.heartbeatManager)||void 0===r||r.stop()}})(this,e);const n={projectKey:e.projectKey||process.env.NEETO_PROJECT_KEY||"",baseURL:e.baseURL||process.env.NEETO_PLAYDASH_API_BASE_URL||"",apiKey:e.apiKey||process.env.NEETO_API_KEY||"",ciBuildId:e.ciBuildId||process.env.NEETO_CI_BUILD_ID||"",tags:e.tags||(()=>{const e=process.env.NEETO_PLAYDASH_TAGS;if(e)return e.includes(",")?e.split(","):e})()||[],title:e.title||process.env.NEETO_PLAYDASH_TITLE,commitId:e.commitId||process.env.NEETO_PLAYDASH_COMMIT_ID,author:e.author||process.env.NEETO_PLAYDASH_AUTHOR,branch:e.branch||process.env.NEETO_PLAYDASH_BRANCH};this.attempts={},this.tags=n.tags,this.ciBuildId=n.ciBuildId,this.title=n.title,this.commitId=n.commitId,this.author=n.author,this.branch=n.branch,this.testResultCalls=[],this.totalTestCount=0,this.hasRunStarted=!1,this.heartbeatManager=null,this.rootDir="",this.currentShard=0,this.progressBars=[],this.startedAttempts=new Set,this.shouldNotReportTest=!1,this.pendingTestBegins=new Set,this.pendingTestEnds=new Set,this.apiKey=n.apiKey,O.configure({apiKey:en("9d5d98e72929dae3c8b3701f50032da1a02b80f9dc29a8e448a601871e5c82fd0ac2fa33c46443709cdb3eabc54a06ab"),environment:(null===(t=null==n?void 0:n.baseURL)||void 0===t?void 0:t.includes(".net"))?"staging":"production"}),O.setContext({...n,reporterVersion:on()}),Zp(this,n)}onStdOut(e,t){t&&q.bold(`Log from test "${t.title}"`),q.log(e.toString())}}export{Qp as default,Xp as test};
|
|
10
10
|
//# sourceMappingURL=index.js.map
|